=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function UA(e,t){if(e){if("string"==typeof e)return MA(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)?MA(e,t):void 0}}function MA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev =0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev =0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function HA(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function YA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PA(e,t){for(var r=0;r 1&&void 0!==arguments[1]?arguments[1]:null,A=this.pos;if(e){for(this.ensureBuffer(A+e),t=A+e;!this.eof&&this.bufferLength n&&(t=n)}else{for(;!this.eof;)this.readBlock(r);t=this.bufferLength}return this.pos=t,this.buffer.subarray(A,t)}},{key:"getImageData",value:(r=JA().mark((function e(t){var r,A,n=arguments;return JA().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>1&&void 0!==n[1]?n[1]:null,this.canAsyncDecodeImageFromBuffer){e.next=3;break}return e.abrupt("return",this.getBytes(t,r));case 3:return e.next=5,this.stream.asyncGetBytes();case 5:return A=e.sent,e.abrupt("return",this.decodeImage(A,r));case 7:case"end":return e.stop()}}),e,this)})),A=function(){var e=this,t=arguments;return new Promise((function(A,n){var i=r.apply(e,t);function a(e){HA(i,A,n,a,o,"next",e)}function o(e){HA(i,A,n,a,o,"throw",e)}a(void 0)}))},function(e){return A.apply(this,arguments)})},{key:"reset",value:function(){this.pos=0}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)for(;!this.eof;)this.readBlock();else for(var A=e+t;this.bufferLength<=A&&!this.eof;)this.readBlock();return new ar(this.buffer,e,t,r)}},{key:"getBaseStreams",value:function(){return this.str?this.str.getBaseStreams():null}}]);var r,A}(),VA=function(e){function t(e){var r,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;YA(this,t);var n,i=0,a=LA(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;i+=o instanceof XA?o._rawMinBufferLength:o.length}}catch(e){a.e(e)}finally{a.f()}return(r=TA(this,t,[i])).streams=e,r._onError=A,r}return WA(t,XA),OA(t,[{key:"readBlock",value:function(){var e=this.streams;if(0!==e.length){var t,r=e.shift();try{t=r.getBytes()}catch(e){var A;if(this._onError)return void this._onError(e,null===(A=r.dict)||void 0===A?void 0:A.objId);throw e}var n=this.bufferLength,i=n+t.length;this.ensureBuffer(i).set(t,n),this.bufferLength=i}else this.eof=!0}},{key:"getBaseStreams",value:function(){var e,t=[],r=LA(this.streams);try{for(r.s();!(e=r.n()).done;){var A=e.value.getBaseStreams();A&&t.push.apply(t,NA(A))}}catch(e){r.e(e)}finally{r.f()}return t.length>0?t:null}}])}();function zA(e,t){for(var r=0;r =0;--A)r[n+A]=255&a,a>>=8}}else this.eof=!0}}],A&&zA(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r >1,A=this.ensureBuffer(this.bufferLength+r),n=this.bufferLength,i=this.firstDigit,a=function(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 an(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)?an(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=void 0;if(o>=48&&o<=57)s=15&o;else{if(!(o>=65&&o<=70||o>=97&&o<=102)){if(62===o){this.eof=!0;break}continue}s=9+(15&o)}i<0?i=s:(A[n++]=i<<4|s,i=-1)}}catch(e){a.e(e)}finally{a.f()}i>=0&&this.eof&&(A[n++]=i<<4,i=-1),this.firstDigit=i,this.bufferLength=n}else this.eof=!0}}])&&on(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function In(e,t){for(var r=0;r 1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t||"function"!=typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');for(this.source=t,this.eof=!1,this.encoding=n.K||0,this.eoline=n.EndOfLine||!1,this.byteAlign=n.EncodedByteAlign||!1,this.columns=n.Columns||1728,this.rows=n.Rows||0,this.eoblock=null===(r=n.EndOfBlock)||void 0===r||r,this.black=n.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(A=this._lookBits(12));)this._eatBits(1);1===A&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))},(t=[{key:"readNextChar",value:function(){if(this.eof)return-1;var e,t,r,A,n,i=this.refLine,a=this.codingLine,o=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var s,c,g;if(this.err=!1,this.nextLine2D){for(A=0;a[A] =64);do{c+=g=this._getWhiteCode()}while(g>=64)}else{do{s+=g=this._getWhiteCode()}while(g>=64);do{c+=g=this._getBlackCode()}while(g>=64)}for(this._addPixels(a[this.codingPos]+s,t),a[this.codingPos] 0?--e:++e;i[e]<=a[this.codingPos]&&i[e] 0?--e:++e;i[e]<=a[this.codingPos]&&i[e] 0?--e:++e;i[e]<=a[this.codingPos]&&i[e] =64);else do{s+=g=this._getWhiteCode()}while(g>=64);this._addPixels(a[this.codingPos]+s,t),t^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(s=this._lookBits(12),this.eoline)for(;s!==Cn&&1!==s;)this._eatBits(1),s=this._lookBits(12);else for(;0===s;)this._eatBits(1),s=this._lookBits(12);1===s?(this._eatBits(12),u=!0):s===Cn&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&u&&this.byteAlign){if(1===(s=this._lookBits(12))){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(A=0;A<4;++A)1!==(s=this._lookBits(12))&&T("bad rtc code: "+s),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if((s=this._lookBits(13))===Cn)return this.eof=!0,-1;if(s>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&s))}this.outputBits=a[0]>0?a[this.codingPos=0]:a[this.codingPos=1],this.row++}if(this.outputBits>=8)n=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&a[this.codingPos] r?(n<<=r,1&this.codingPos||(n|=255>>8-r),this.outputBits-=r,r=0):(n<<=this.outputBits,1&this.codingPos||(n|=255>>8-this.outputBits),r-=this.outputBits,this.outputBits=0,a[this.codingPos] 0&&(n<<=r,r=0))}while(r)}return this.black&&(n^=255),n}},{key:"_addPixels",value:function(e,t){var r=this.codingLine,A=this.codingPos;e>r[A]&&(e>this.columns&&(T("row is wrong length"),this.err=!0,e=this.columns),1&A^t&&++A,r[A]=e),this.codingPos=A}},{key:"_addPixelsNeg",value:function(e,t){var r=this.codingLine,A=this.codingPos;if(e>r[A])e>this.columns&&(T("row is wrong length"),this.err=!0,e=this.columns),1&A^t&&++A,r[A]=e;else if(e 0&&e =n){var o=r[a-n];if(o[0]===i)return this._eatBits(i),[!0,o[1],!0]}}return[!1,0,!1]}},{key:"_getTwoDimCode",value:function(){var e,t=0;if(this.eoblock){var r;if(t=this._lookBits(7),(null===(r=e=Bn[t])||void 0===r?void 0:r[0])>0)return this._eatBits(e[0]),e[1]}else{var A=this._findTableCode(1,7,Bn);if(A[0]&&A[2])return A[1]}return T("Bad two dim code"),Cn}},{key:"_getWhiteCode",value:function(){var e,t=0;if(this.eoblock){if((t=this._lookBits(12))===Cn)return 1;if((e=t>>5==0?Qn[t]:En[t>>3])[0]>0)return this._eatBits(e[0]),e[1]}else{var r=this._findTableCode(1,9,En);if(r[0])return r[1];if((r=this._findTableCode(11,12,Qn))[0])return r[1]}return T("bad white code"),this._eatBits(1),1}},{key:"_getBlackCode",value:function(){var e,t;if(this.eoblock){if((e=this._lookBits(13))===Cn)return 1;if((t=e>>7==0?dn[e]:e>>9==0&&e>>7!=0?yn[(e>>1)-64]:pn[e>>7])[0]>0)return this._eatBits(t[0]),t[1]}else{var r=this._findTableCode(2,6,pn);if(r[0])return r[1];if((r=this._findTableCode(7,12,yn,64))[0])return r[1];if((r=this._findTableCode(10,13,dn))[0])return r[1]}return T("bad black code"),this._eatBits(1),1}},{key:"_lookBits",value:function(e){for(var t;this.inputBits >16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}},{key:"_eatBits",value:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}])&&In(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function mn(e,t){for(var r=0;r e.getByte()};return n.ccittFaxDecoder=new vn(i,{K:A.get("K"),EndOfLine:A.get("EndOfLine"),EncodedByteAlign:A.get("EncodedByteAlign"),Columns:A.get("Columns"),Rows:A.get("Rows"),EndOfBlock:A.get("EndOfBlock"),BlackIs1:A.get("BlackIs1")}),n}return function(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&&Sn(e,t)}(t,XA),r=t,(A=[{key:"readBlock",value:function(){for(;!this.eof;){var e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}])&&mn(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function xn(){xn=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n =0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev =0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev =0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Rn(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Gn(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Rn(i,A,n,a,o,"next",e)}function o(e){Rn(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Nn(e,t){for(var r=0;r >e,this.codeSize=A-=e,t}},{key:"getCode",value:function(e){for(var t,r=this.str,A=e[0],n=e[1],i=this.codeSize,a=this.codeBuf;i >16,c=65535&o;if(s<1||i >s,this.codeSize=i-s,c}},{key:"generateHuffmanTable",value:function(e){var t,r=e.length,A=0;for(t=0;tA&&(A=e[t]);for(var n=1<>=1;for(t=g;t >=1)){var n,i;if(1===t)n=jn,i=Wn;else{if(2!==t)throw new re("Unknown block type in flate stream");var a,o=this.getBits(5)+257,s=this.getBits(5)+1,c=this.getBits(4)+4,g=new Uint8Array(Kn.length);for(a=0;a 0;)C[a++]=I}n=this.generateHuffmanTable(C.subarray(0,o)),i=this.generateHuffmanTable(C.subarray(o,f))}for(var E=(e=this.buffer)?e.length:0,d=this.bufferLength;;){var y=this.getCode(n);if(y<256)d+1>=E&&(E=(e=this.ensureBuffer(d+1)).length),e[d++]=y;else{if(256===y)return void(this.bufferLength=d);var p=(y=Tn[y-=257])>>16;p>0&&(p=this.getBits(p)),r=(65535&y)+p,y=this.getCode(i),(p=(y=qn[y])>>16)>0&&(p=this.getBits(p));var v=(65535&y)+p;d+r>=E&&(E=(e=this.ensureBuffer(d+r)).length);for(var m=0;m >9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768},(t=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t 65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,A=e[t]>>1,n=1&e[t],i=$n[A],a=i.qe,o=this.a-a;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0==(32768&o));return this.a=o,e[t]=A<<1|n,r}}])&&Vn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ti(e){return function(e){if(Array.isArray(e))return ni(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ai(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 ri(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ai(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ai(e,t){if(e){if("string"==typeof e)return ni(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)?ni(e,t):void 0}}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r >>0}var a,o=i(1),s=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===o?a=s:s>0&&(a=-s),a>=Bi&&a<=Ci?a:null}function Ei(e,t,r){for(var A=e.getContexts("IAID"),n=1,i=0;i =S&&m =F)for(J=J<<1&C,u=0;u =0&&b =0&&(k=N[w][b])&&(J|=k< =e?F<<=1:F=F<<1|y[D][S];for(g=0;g =E||S<0||S>=Q?F<<=1:F=F<<1|A[D][S];var x=p.readBit(v,F);b[k]=x}}return y}function ki(e,t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q){if(e&&t)throw new hi("refinement with Huffman is not supported");var E,d,y=[];for(E=0;E1&&(D=e?Q.readBits(B):Qi(m,"IAIT",v));var S=a*w+D,F=e?h.symbolIDTable.decode(Q):Ei(m,v,s),x=t&&(e?Q.readBit():Qi(m,"IARI",v)),R=o[F],G=R[0].length,N=R.length;if(x){var L=Qi(m,"IARDW",v),U=Qi(m,"IARDH",v);R=bi(G+=L,N+=U,I,R,(L>>1)+Qi(m,"IARDX",v),(U>>1)+Qi(m,"IARDY",v),!1,f,C)}var M=0;c?1&u?M=N-1:k+=N-1:u>1?k+=G-1:M=G-1;var J=S-(1&u?0:N-1),H=k-(2&u?G-1:0),Y=void 0,P=void 0,O=void 0;if(c){for(Y=0;Y >5&7,s=[31&a],c=t+6;if(7===a){o=536870911&kt(e,c-1),c+=3;var g=o+7>>3;for(s[0]=e[c++];--g>0;)s.push(e[c++])}else if(5===a||6===a)throw new hi("invalid referred-to flags");r.retainBits=s;var u=4;r.number<=256?u=1:r.number<=65536&&(u=2);var l,h,I=[];for(l=0;l >>24&255,Q[3]=C.height>>16&255,Q[4]=C.height>>8&255,Q[5]=255&C.height,l=c,h=e.length;l >2&3,g.huffmanDWSelector=u>>4&3,g.bitmapSizeSelector=u>>6&1,g.aggregationInstancesSelector=u>>7&1,g.bitmapCodingContextUsed=!!(256&u),g.bitmapCodingContextRetained=!!(512&u),g.template=u>>10&3,g.refinementTemplate=u>>12&1,c+=2,!g.huffman){for(i=0===g.template?4:1,A=[],n=0;n>2&3,l.stripSize=1< >4&3,l.transposed=!!(64&h),l.combinationOperator=h>>7&3,l.defaultPixelValue=h>>9&1,l.dsOffset=h<<17>>27,l.refinementTemplate=h>>15&1,l.huffman){var I=bt(o,c);c+=2,l.huffmanFS=3&I,l.huffmanDS=I>>2&3,l.huffmanDT=I>>4&3,l.huffmanRefinementDW=I>>6&3,l.huffmanRefinementDH=I>>8&3,l.huffmanRefinementDX=I>>10&3,l.huffmanRefinementDY=I>>12&3,l.huffmanRefinementSizeSelector=!!(16384&I)}if(l.refinement&&!l.refinementTemplate){for(A=[],n=0;n<2;n++)A.push({x:wt(o,c),y:wt(o,c+1)}),c+=2;l.refinementAt=A}l.numberOfSymbolInstances=kt(o,c),c+=4,r=[l,a.referredTo,o,c,s];break;case 16:var f={},C=o[c++];f.mmr=!!(1&C),f.template=C>>1&3,f.patternWidth=o[c++],f.patternHeight=o[c++],f.maxPatternIndex=kt(o,c),c+=4,r=[f,a.number,o,c,s];break;case 22:case 23:var B={};B.info=Fi(o,c),c+=xi;var Q=o[c++];B.mmr=!!(1&Q),B.template=Q>>1&3,B.enableSkip=!!(8&Q),B.combinationOperator=Q>>4&7,B.defaultPixelValue=Q>>7&1,B.gridWidth=kt(o,c),c+=4,B.gridHeight=kt(o,c),c+=4,B.gridOffsetX=4294967295&kt(o,c),c+=4,B.gridOffsetY=4294967295&kt(o,c),c+=4,B.gridVectorX=bt(o,c),c+=2,B.gridVectorY=bt(o,c),c+=2,r=[B,a.referredTo,o,c,s];break;case 38:case 39:var E={};E.info=Fi(o,c),c+=xi;var d=o[c++];if(E.mmr=!!(1&d),E.template=d>>1&3,E.prediction=!!(8&d),!E.mmr){for(i=0===E.template?4:1,A=[],n=0;n>2&1,y.combinationOperator=p>>3&3,y.requiresBuffer=!!(32&p),y.combinationOperatorOverride=!!(64&p),r=[y];break;case 49:case 50:case 51:case 62:break;case 53:r=[a.number,o,c,s];break;default:throw new hi("segment type ".concat(a.typeName,"(").concat(a.type,") is not implemented"))}var v="on"+a.typeName;v in t&&t[v].apply(t,r)}function Gi(e,t){for(var r=0,A=e.length;r>3,r=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&r.fill(255),this.buffer=r}},{key:"drawBitmap",value:function(e,t){var r,A,n,i,a=this.currentPageInfo,o=e.width,s=e.height,c=a.width+7>>3,g=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,u=this.buffer,l=128>>(7&e.x),h=e.y*c+(e.x>>3);switch(g){case 0:for(r=0;r >=1)||(n=128,i++);h+=c}break;case 2:for(r=0;r>=1)||(n=128,i++);h+=c}break;default:throw new hi("operator ".concat(g," is not supported"))}}},{key:"onImmediateGenericRegion",value:function(e,t,r,A){var n=e.info,i=new fi(t,r,A),a=wi(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,i);this.drawBitmap(n,a)}},{key:"onImmediateLosslessGenericRegion",value:function(){this.onImmediateGenericRegion.apply(this,arguments)}},{key:"onSymbolDictionary",value:function(e,t,r,A,n,i){var a,o;e.huffman&&(a=function(e,t,r){var A,n,i,a=0;switch(e.huffmanDHSelector){case 0:case 1:A=Hi(e.huffmanDHSelector+4);break;case 3:A=Pi(a,t,r),a++;break;default:throw new hi("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:n=Hi(e.huffmanDWSelector+2);break;case 3:n=Pi(a,t,r),a++;break;default:throw new hi("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=Pi(a,t,r),a++):i=Hi(1),{tableDeltaHeight:A,tableDeltaWidth:n,tableBitmapSize:i,tableAggregateInstances:e.aggregationInstancesSelector?Pi(a,t,r):Hi(1)}}(e,r,this.customTables),o=new Yi(A,n,i));var s=this.symbols;s||(this.symbols=s={});var c,g=[],u=ri(r);try{for(u.s();!(c=u.n()).done;){var l=s[c.value];l&&g.push.apply(g,ti(l))}}catch(e){u.e(e)}finally{u.f()}var h=new fi(A,n,i);s[t]=function(e,t,r,A,n,i,a,o,s,c,g,u){if(e&&t)throw new hi("symbol refinement with Huffman is not supported");var l,h,I=[],f=0,C=mt(r.length+A),B=g.decoder,Q=g.contextCache;for(e&&(l=Hi(1),h=[],C=Math.max(C,1));I.length1)v=ki(e,t,E,f,0,m,1,r.concat(I),C,0,0,1,0,i,s,c,g,0,u);else{var w=Ei(Q,B,C),b=Qi(Q,"IARDX",B),k=Qi(Q,"IARDY",B);v=bi(E,f,s,w=32){var u=void 0,l=void 0,h=void 0;switch(g){case 32:if(0===c)throw new hi("no previous value in symbol ID table");l=n.readBits(2)+3,u=i[c-1].prefixLength;break;case 33:l=n.readBits(3)+3,u=0;break;case 34:l=n.readBits(7)+11,u=0;break;default:throw new hi("invalid code length in symbol ID table")}for(h=0;h =0;f--)b=e?Ki(w,s,c,!0):wi(!1,s,c,r,!1,null,m,I),U[f]=b;for(k=0;k =0;C--)F|=(S^=U[C][k][D])< >8,(R=g+k*h+D*l>>8)>=0&&R+y<=A&&G>=0&&G+p<=n)for(f=0;f =n))for(L=Q[J],N=x[f],C=0;C
=0&&M>1&7),g=1+(i>>4&7),u=[],l=a;do{A=s.readBits(c),n=s.readBits(g),u.push(new Li([l,A,n,0])),l+=1< >r&1;if(r<=0)this.children[A]=new e(t);else{var n=this.children[A];n||(this.children[A]=n=new e(null)),n.buildTree(t,r-1)}}},{key:"decodeNode",value:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new hi("invalid Huffman data");return r.decodeNode(e)}}])}(),Mi=function(){return ai((function e(t,r){si(this,e),r||this.assignPrefixCodes(t),this.rootNode=new Ui(null);for(var A=0,n=t.length;A 0&&this.rootNode.buildTree(i,i.prefixLength-1)}}),[{key:"decode",value:function(e){return this.rootNode.decodeNode(e)}},{key:"assignPrefixCodes",value:function(e){for(var t=e.length,r=0,A=0;A =this.end)throw new hi("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e}},{key:"readBits",value:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()< =this.end?-1:this.data[this.position++]}}])}();function Pi(e,t,r){for(var A=0,n=0,i=t.length;n>g&1,g--}if(A&&!o)for(var l=0;l<5&&-1!==i.readNextChar();l++);return a}var Ti=function(){return ai((function e(){si(this,e)}),[{key:"parseChunks",value:function(e){return function(e){for(var t=new Ni,r=0,A=e.length;re.length)&&(t=e.length);for(var r=0,A=Array(t);r >3,C=7&i,B=t.length;n=new Uint32Array(n.buffer);for(var Q=0,E=0;E=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r 0&&!e[i-1];)i--;var a,o=[{children:[],index:0}],s=o[0];for(r=0;r0;)s=o.pop();for(s.index++,o.push(s);o.length<=r;)o.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a;n++}r+19&&void 0!==arguments[9]&&arguments[9],g=r.mcusPerLine,u=r.progressive,l=t,h=0,I=0;function f(){if(I>0)return I--,h>>I&1;if(255===(h=e[t++])){var A=e[t++];if(A){if(220===A&&c){var n=bt(e,t+=2);if(t+=2,n>0&&n!==r.scanLines)throw new la("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===A){if(c){var i=p*(8===r.precision?8:0);if(i>0&&Math.round(r.scanLines/i)>=5)throw new la("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect \`scanLines\` parameter",i)}throw new ha("Found EOI marker (0xFFD9) while parsing scan data")}throw new ua("unexpected marker ".concat((h<<8|A).toString(16)))}}return I=7,h>>>7}function C(e){for(var t=e;;){switch(typeof(t=t[f()])){case"number":return t;case"object":continue}throw new ua("invalid huffman sequence")}}function B(e){for(var t=0;e>0;)t=t<<1|f(),e--;return t}function Q(e){if(1===e)return 1===f()?1:-1;var t=B(e);return t>=1< 0)d--;else for(var r=i,A=a;r<=A;){var n=C(e.huffmanTableAC),o=15&n,c=n>>4;if(0!==o){var g=Ia[r+=c];e.blockData[t+g]=Q(o)*(1< >4,0==(r=15&A))c<15?(d=B(c)+(1<>4;if(0!==a){var s=Ia[n+=o];e.blockData[t+s]=Q(a),n++}else{if(o<15)break;n+=16}}};for(var R,G,N,L=0,U=1===x?A[0].blocksPerLine*A[0].blocksPerColumn:g*r.mcusPerColumn;L<=U;){var M=n?Math.min(U-L,n):U;if(M>0){for(b=0;b 0?"unexpected":"excessive"," MCU data, current marker is: ").concat(R.invalid)),t=R.offset),!(R.marker>=65488&&R.marker<=65495))break;t+=2}return t-l}function ba(e,t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d=e.quantizationTable,y=e.blockData;if(!d)throw new ua("missing required Quantization Table.");for(var p=0;p<64;p+=8)u=y[t+p],l=y[t+p+1],h=y[t+p+2],I=y[t+p+3],f=y[t+p+4],C=y[t+p+5],B=y[t+p+6],Q=y[t+p+7],u*=d[p],0!=(l|h|I|f|C|B|Q)?(l*=d[p+1],h*=d[p+2],I*=d[p+3],f*=d[p+4],C*=d[p+5],B*=d[p+6],Q*=d[p+7],n=(A=(A=ya*u+128>>8)+(n=ya*f+128>>8)+1>>1)-n,E=(i=h)*da+(a=B)*Ea+128>>8,i=i*Ea-a*da+128>>8,c=(o=(o=pa*(l-Q)+128>>8)+(c=C<<4)+1>>1)-c,s=(g=(g=pa*(l+Q)+128>>8)+(s=I<<4)+1>>1)-s,a=(A=A+(a=E)+1>>1)-a,i=(n=n+i+1>>1)-i,E=o*Qa+g*Ba+2048>>12,o=o*Ba-g*Qa+2048>>12,g=E,E=s*Ca+c*fa+2048>>12,s=s*fa-c*Ca+2048>>12,c=E,r[p]=A+g,r[p+7]=A-g,r[p+1]=n+c,r[p+6]=n-c,r[p+2]=i+s,r[p+5]=i-s,r[p+3]=a+o,r[p+4]=a-o):(E=ya*u+512>>10,r[p]=E,r[p+1]=E,r[p+2]=E,r[p+3]=E,r[p+4]=E,r[p+5]=E,r[p+6]=E,r[p+7]=E);for(var v=0;v<8;++v)u=r[v],0!=((l=r[v+8])|(h=r[v+16])|(I=r[v+24])|(f=r[v+32])|(C=r[v+40])|(B=r[v+48])|(Q=r[v+56]))?(n=(A=4112+((A=ya*u+2048>>12)+(n=ya*f+2048>>12)+1>>1))-n,E=(i=h)*da+(a=B)*Ea+2048>>12,i=i*Ea-a*da+2048>>12,a=E,c=(o=(o=pa*(l-Q)+2048>>12)+(c=C)+1>>1)-c,s=(g=(g=pa*(l+Q)+2048>>12)+(s=I)+1>>1)-s,E=o*Qa+g*Ba+2048>>12,o=o*Ba-g*Qa+2048>>12,g=E,E=s*Ca+c*fa+2048>>12,s=s*fa-c*Ca+2048>>12,(u=(A=A+a+1>>1)+g)<16?u=0:u>=4080?u=255:u>>=4,(l=(n=n+i+1>>1)+(c=E))<16?l=0:l>=4080?l=255:l>>=4,(h=(i=n-i)+s)<16?h=0:h>=4080?h=255:h>>=4,(I=(a=A-a)+o)<16?I=0:I>=4080?I=255:I>>=4,(f=a-o)<16?f=0:f>=4080?f=255:f>>=4,(C=i-s)<16?C=0:C>=4080?C=255:C>>=4,(B=n-c)<16?B=0:B>=4080?B=255:B>>=4,(Q=A-g)<16?Q=0:Q>=4080?Q=255:Q>>=4,y[t+v]=u,y[t+v+8]=l,y[t+v+16]=h,y[t+v+24]=I,y[t+v+32]=f,y[t+v+40]=C,y[t+v+48]=B,y[t+v+56]=Q):(E=(E=ya*u+8192>>14)<-2040?0:E>=2024?255:E+2056>>4,y[t+v]=E,y[t+v+8]=E,y[t+v+16]=E,y[t+v+24]=E,y[t+v+32]=E,y[t+v+40]=E,y[t+v+48]=E,y[t+v+56]=E)}function ka(e,t){for(var r=t.blocksPerLine,A=t.blocksPerColumn,n=new Int16Array(64),i=0;i2&&void 0!==arguments[2]?arguments[2]:t,A=e.length-1,n=r =A)return null;var i=bt(e,t);if(i>=65472&&i<=65534)return{invalid:null,marker:i,offset:t};for(var a=bt(e,n);!(a>=65472&&a<=65534);){if(++n>=A)return null;a=bt(e,n)}return{invalid:i.toString(16),marker:a,offset:n}}var Sa=function(){return Aa((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.decodeTransform,A=void 0===r?null:r,n=t.colorTransform,i=void 0===n?-1:n;ia(this,e),this._decodeTransform=A,this._colorTransform=i}),[{key:"parse",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).dnlScanLines,r=void 0===t?null:t;function A(){var t=bt(e,o),r=(o+=2)+t-2,A=Da(e,r,o);null!=A&&A.invalid&&(q("readDataBlock - incorrect length, current marker is: "+A.invalid),r=A.offset);var n=e.subarray(o,r);return o+=n.length,n}function n(e){var t,r=Math.ceil(e.samplesPerLine/8/e.maxH),A=Math.ceil(e.scanLines/8/e.maxV),n=ea(e.components);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=Math.ceil(Math.ceil(e.samplesPerLine/8)*i.h/e.maxH),o=Math.ceil(Math.ceil(e.scanLines/8)*i.v/e.maxV),s=r*i.h,c=A*i.v*64*(s+1);i.blockData=new Int16Array(c),i.blocksPerLine=a,i.blocksPerColumn=o}}catch(e){n.e(e)}finally{n.f()}e.mcusPerLine=r,e.mcusPerColumn=A}var i,a,o=0,s=null,c=null,g=0,u=[],l=[],h=[],I=bt(e,o);if(o+=2,65496!==I)throw new ua("SOI not found");I=bt(e,o),o+=2;e:for(;65497!==I;){var f=void 0,C=void 0,B=void 0;switch(I){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var Q=A();65504===I&&74===Q[0]&&70===Q[1]&&73===Q[2]&&70===Q[3]&&0===Q[4]&&(s={version:{major:Q[5],minor:Q[6]},densityUnits:Q[7],xDensity:Q[8]<<8|Q[9],yDensity:Q[10]<<8|Q[11],thumbWidth:Q[12],thumbHeight:Q[13],thumbData:Q.subarray(14,14+3*Q[12]*Q[13])}),65518===I&&65===Q[0]&&100===Q[1]&&111===Q[2]&&98===Q[3]&&101===Q[4]&&(c={version:Q[5]<<8|Q[6],flags0:Q[7]<<8|Q[8],flags1:Q[9]<<8|Q[10],transformCode:Q[11]});break;case 65499:for(var E=bt(e,o)+(o+=2)-2;o >4==0)for(C=0;C<64;C++)y[Ia[C]]=e[o++];else{if(d>>4!=1)throw new ua("DQT - invalid table spec");for(C=0;C<64;C++)y[Ia[C]]=bt(e,o),o+=2}u[15&d]=y}break;case 65472:case 65473:case 65474:if(i)throw new ua("Only single frame JPEGs supported");o+=2,(i={}).extended=65473===I,i.progressive=65474===I,i.precision=e[o++];var p=bt(e,o);o+=2,i.scanLines=r||p,i.samplesPerLine=bt(e,o),o+=2,i.components=[],i.componentIds={};var v=e[o++],m=0,w=0;for(f=0;f >4,D=15&e[o+1];m >4==0?h:l)[15&x]=va(R,N)}break;case 65501:a=bt(e,o+=2),o+=2;break;case 65498:var L=1==++g&&!r;o+=2;var U=e[o++],M=[];for(f=0;f>4],Y.huffmanTableAC=l[15&P],M.push(Y)}var O=e[o++],K=e[o++],T=e[o++];try{var j=wa(e,o,i,M,a,O,K,T>>4,15&T,L);o+=j}catch(t){if(t instanceof la)return q("".concat(t.message," -- attempting to re-parse the JPEG image.")),this.parse(e,{dnlScanLines:t.scanLines});if(t instanceof ha){q("".concat(t.message," -- ignoring the rest of the image data."));break e}throw t}break;case 65500:o+=4;break;case 65535:255!==e[o]&&o--;break;default:var W=Da(e,o-2,o-3);if(null!=W&&W.invalid){q("JpegImage.parse - unexpected data, current marker is: "+W.invalid),o=W.offset;break}if(!W||o>=e.length-1){q("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new ua("JpegImage.parse - unknown marker: "+I.toString(16))}I=bt(e,o),o+=2}if(!i)throw new ua("JpegImage.parse - no frame data found.");this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=s,this.adobe=c,this.components=[];var Z,_=ea(i.components);try{for(_.s();!(Z=_.n()).done;){var X=Z.value,V=u[X.quantizationId];V&&(X.quantizationTable=V),this.components.push({index:X.index,output:ka(0,X),scaleX:X.h/i.maxH,scaleY:X.v/i.maxV,blocksPerLine:X.blocksPerLine,blocksPerColumn:X.blocksPerColumn})}}catch(e){_.e(e)}finally{_.f()}this.numComponents=this.components.length}},{key:"_getLinearizedBlockData",value:function(e,t){var r,A,n,i,a,o,s,c,g,u,l,h,I=arguments.length>2&&void 0!==arguments[2]&&arguments[2],f=this.width/e,C=this.height/t,B=0,Q=this.components.length,E=e*t*Q,d=new Uint8ClampedArray(E),y=new Uint32Array(e),p=4294967288;for(s=0;s >8)+v[g+1];return d}},{key:"_isColorConversionNeeded",get:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}},{key:"_convertYccToRgb",value:function(e){for(var t,r,A,n=0,i=e.length;n4)throw new ua("Unsupported color mode");var c=this._getLinearizedBlockData(t,r,s);if(1===this.numComponents&&(n||a)){var g=c.length*(n?4:3),u=new Uint8ClampedArray(g),l=0;if(n)!function(e,t){if(se.isLittleEndian)for(var r=0,A=e.length;r0&&(e=e.subarray(t));break}var A={decodeTransform:void 0,colorTransform:void 0},n=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(n)){for(var i=this.dict.get("BPC","BitsPerComponent")||8,a=n.length,o=new Int32Array(a),s=!1,c=(1<0&&void 0!==arguments[0]?arguments[0]:{};new Promise((function(r,A){e=r,t=A})),r.decode=function(e,t){var A=t.numComponents,n=void 0===A?4:A,i=t.isIndexedColormap,a=void 0!==i&&i,o=t.smaskInData,s=void 0!==o&&o,c=e.length,g=r._malloc(c);r.HEAPU8.set(e,g);var u=r._jp2_decode(g,c,n>0?n:0,!!a,!!s);if(r._free(g),u){var l=r.errorMessages;return l?(delete r.errorMessages,l):"Unknown error"}var h=r.imageData;return r.imageData=null,h};var A=Object.assign({},r),n="./this.program",i="";"undefined"!=typeof document&&document.currentScript&&(i=document.currentScript.src),Ma&&(i=Ma),i=i.startsWith("blob:")?"":i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1);var a,o,s,c,g,u=r.print||console.log.bind(console),l=r.printErr||console.error.bind(console);function h(){var e=o.buffer;r.HEAP8=s=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAPU8=c=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU32=g=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}Object.assign(r,A),A=null,r.arguments&&r.arguments,r.thisProgram&&(n=r.thisProgram),r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary);var I,f=[],C=[],B=[],Q=0,E=null,d=null,y="data:application/octet-stream;base64,",p=function(e){return e.startsWith(y)};function v(e,t){var r,A=function(e){if(e==I&&a)return new Uint8Array(a);var t=function(e){if(p(e))return function(e){for(var t=atob(e),r=new Uint8Array(t.length),A=0;A0;)e.shift()(r)};r.noExitRuntime;var w,b=function(e){var t=(e-o.buffer.byteLength+65535)/65536;try{return o.grow(t),h(),1}catch(e){}},k={},D=function(){if(!D.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t in k)void 0===k[t]?delete e[t]:e[t]=k[t];var r=[];for(var t in e)r.push("".concat(t,"=").concat(e[t]));D.strings=r}return D.strings},S=[null,[],[]],F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,x=function(e,t,r){for(var A=t+r,n=t;e[n]&&!(n>=A);)++n;if(n-t>16&&e.buffer&&F)return F.decode(e.subarray(t,n));for(var i="";t >10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|o)}else i+=String.fromCharCode(a)}return i},R=function(e,t){return e?x(c,e,t):""},G={c:function(e,t,r){return c.copyWithin(e,t,t+r)},g:function(e,t){e>>=2;var A=r.imageData=new Uint8ClampedArray(t),n=r.HEAP32.subarray(e,e+t);A.set(n)},f:function(e,t,A,n){e>>=2,t>>=2,A>>=2;for(var i=r.imageData=new Uint8ClampedArray(3*n),a=r.HEAP32.subarray(e,e+n),o=r.HEAP32.subarray(t,t+n),s=r.HEAP32.subarray(A,A+n),c=0;c >=2,t>>=2,A>>=2,n>>=2;for(var a=r.imageData=new Uint8ClampedArray(4*i),o=r.HEAP32.subarray(e,e+i),s=r.HEAP32.subarray(t,t+i),c=r.HEAP32.subarray(A,A+i),g=r.HEAP32.subarray(n,n+i),u=0;u>>=0)>r)return!1;for(var A,n=1;n<=4;n*=2){var i=t*(1+.2/n);i=Math.min(i,e+100663296);var a=Math.min(r,(A=Math.max(e,i))+(65536-A%65536)%65536);if(b(a))return!0}return!1},l:function(e,t){var r=0;return D().forEach((function(A,n){var i=t+r;g[e+4*n>>2]=i,function(e,t){for(var r=0;r >2]=r.length;var A=0;return r.forEach((function(e){return A+=e.length+1})),g[t>>2]=A,0},n:function(e){return 52},j:function(e,t,r,A,n){return 70},b:function(e,t,r,A){for(var n,i,a,o=0,s=0;s >2],I=g[t+4>>2];t+=8;for(var f=0;f>2]=o,0},o:function(e,t){e>>=2;for(var A=r.imageData=new Uint8ClampedArray(4*t),n=r.HEAP32.subarray(e,e+t),i=0;i >=2,t>>=2;for(var n=r.imageData=new Uint8ClampedArray(4*A),i=r.HEAP32.subarray(e,e+A),a=r.HEAP32.subarray(t,t+A),o=0;o>=2,t>>=2,A>>=2;for(var i=r.imageData=new Uint8ClampedArray(4*n),a=r.HEAP32.subarray(e,e+n),o=r.HEAP32.subarray(t,t+n),s=r.HEAP32.subarray(A,A+n),c=0;c 0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),f.unshift(e);var e;m(f)}(),Q>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t()))}if(N.q,r._malloc=N.r,r._free=N.s,r._jp2_decode=N.u,d=function e(){w||L(),w||(d=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return L(),r});const Ya=Ha;function Pa(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function Oa(e,t){for(var r=0;r =0;)if(65361==(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,A=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.getInt32()>>>0;return e.skip(16),{width:r-n,height:A-i,bitsPerComponent:8,componentsCount:e.getUint16()}}throw new Xa("No size marker found in JPX stream")}}])}(),za={_:null};function $a(e,t){for(var r=0;r >>t&(1< 0;if(B<256)l[0]=B,h=1;else{if(!(B>=258)){if(256===B){g=9,a=258,h=0;continue}this.eof=!0,delete this.lzwState;break}if(B=0;t--)l[t]=o[r],r=c[r];else l[h++]=l[0]}if(Q&&(c[a]=u,s[a]=s[u]+1,o[a]=l[0],g=++a+i&a+i-1?g:0|Math.min(Math.log(a+i)/.6931471805599453+1,12)),u=B,A<(I+=h)){do{A+=512}while(A15))throw new re("Unsupported predictor: ".concat(i));n.readBlock=2===i?n.readBlockTiff:n.readBlockPng,n.str=e,n.dict=e.dict;var a=n.colors=A.get("Colors")||1,o=n.bits=A.get("BPC","BitsPerComponent")||8,s=n.columns=A.get("Columns")||1;return n.pixBytes=a*o+7>>3,n.rowBytes=s*a*o+7>>3,Co(n,n)}return function(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&&Eo(e,t)}(t,XA),r=t,(A=[{key:"readBlockTiff",value:function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),A=this.bits,n=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var a,o=0,s=0,c=0,g=0,u=t;if(1===A&&1===n)for(a=0;a >1,l^=l>>2,o=(1&(l^=l>>4))<<7,r[u++]=l}else if(8===A){for(a=0;a >8&255,r[u++]=255&I}}else{var f=new Uint8Array(n+1),C=(1<>c-A)&C,c-=A,s=s<=8&&(r[Q++]=s>>g-8&255,g-=8);g>0&&(r[Q++]=(s<<8-g)+(o&(1<<8-g)-1))}this.bufferLength+=e}}},{key:"readBlockPng",value:function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),A=this.str.getBytes(e);if(this.eof=!A.length,!this.eof){var n=this.bufferLength,i=this.ensureBuffer(n+e),a=i.subarray(n-e,n);0===a.length&&(a=new Uint8Array(e));var o,s,c,g=n;switch(r){case 0:for(o=0;o >1)+A[o];for(;o >1)+A[o]&255,g++;break;case 4:for(o=0;o 0){var n=this.str.getBytes(A);t.set(n,r),r+=A}}else{A=257-A;var i=e[1];t=this.ensureBuffer(r+A+1);for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function xo(e,t){if(e){if("string"==typeof e)return Ro(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)?Ro(e,t):void 0}}function Ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r 0&&void 0!==arguments[0]?arguments[0]:null,t=this.buf1;if(this.shift(),t instanceof Me)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":for(var r=[];!Te(this.buf1,"]")&&this.buf1!==Re;)r.push(this.getObj(e));if(this.buf1===Re){if(this.recoveryMode)return r;throw new Bt("End of file inside array.")}return this.shift(),r;case"<<":for(var A=new He(this.xref);!Te(this.buf1,">>")&&this.buf1!==Re;)if(this.buf1 instanceof Ue){var n=this.buf1.name;if(this.shift(),this.buf1===Re)break;A.set(n,this.getObj(e))}else T("Malformed dictionary: key must be a name object"),this.shift();if(this.buf1===Re){if(this.recoveryMode)return A;throw new Bt("End of file inside dictionary.")}return Te(this.buf2,"stream")?this.allowStreams?this.makeStream(A,e):A:(this.shift(),A);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&Te(this.buf2,"R")){var i=Ye.get(t,this.buf1);return this.shift(),this.shift(),i}return t}return"string"==typeof t&&e?e.decryptString(t):t}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,A=this.lexer.knownCommands,n=e.pos,i=0;-1!==(t=e.getByte());)if(0===i)i=69===t?1:0;else if(1===i)i=73===t?2:0;else if(32===t||10===t||13===t){r=e.pos;var a=e.peekBytes(15),o=a.length;if(0===o)break;for(var s=0;s 127)){i=0;break}if(2!==i)continue;if(!A){q("findDefaultInlineStreamEnd - \`lexer.knownCommands\` is undefined.");continue}var c=new Oo(new ar(a.slice()),A);c._hexStringWarn=function(){};for(var g=0;;){var u=c.getObj();if(u===Re){i=0;break}if(u instanceof Me){var l=A[u.cmd];if(!l){i=0;break}if(l.variableArgs?g<=l.numArgs:g===l.numArgs)break;g=0}else g++}if(2===i)break}else i=0;-1===t&&(q("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),r&&(q('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-r))));var h=4;return e.skip(-h),t=e.peekByte(),e.skip(h),Dt(t)||h--,e.pos-h-n}},{key:"findDCTDecodeInlineStreamEnd",value:function(e){for(var t,r,A=e.pos,n=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:n=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:(r=e.getUint16())>2?e.skip(r-2):e.skip(-2)}if(n)break}var i=e.pos-A;return-1===t?(q("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCII85DecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte());)if(126===t){var A=e.pos;for(t=e.peekByte();Dt(t);)e.skip(),t=e.peekByte();if(62===t){e.skip();break}if(e.pos>A){var n=e.peekBytes(2);if(69===n[0]&&73===n[1])break}}var i=e.pos-r;return-1===t?(q("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var A=e.pos-r;return-1===t?(q("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-A),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),A)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,A=r.stream,n=Object.create(null);!Te(this.buf1,"ID")&&this.buf1!==Re;){if(!(this.buf1 instanceof Ue))throw new re("Dictionary key must be a name object");var i=this.buf1.name;if(this.shift(),this.buf1===Re)break;n[i]=this.getObj(e)}-1!==r.beginInlineImagePos&&(t=A.pos-r.beginInlineImagePos);var a,o=this.xref.fetchIfRef(n.F||n.Filter);if(o instanceof Ue)a=o.name;else if(Array.isArray(o)){var s=this.xref.fetchIfRef(o[0]);s instanceof Ue&&(a=s.name)}var c,g,u=A.pos;switch(a){case"DCT":case"DCTDecode":c=this.findDCTDecodeInlineStreamEnd(A);break;case"A85":case"ASCII85Decode":c=this.findASCII85DecodeInlineStreamEnd(A);break;case"AHx":case"ASCIIHexDecode":c=this.findASCIIHexDecodeInlineStreamEnd(A);break;default:c=this.findDefaultInlineStreamEnd(A)}if(c<1e3&&t>0){var l=A.pos;A.pos=r.beginInlineImagePos,g=function(e){for(var t=[],r=e.length,A=0;A =A){var g,u=!1,l=Fo(n);try{for(l.s();!(g=l.n()).done;){for(var h=g.value,I=h.length,f=0;f=i){u=!0;break}if(f>=I){Dt(a[s+c+f])&&(T('Found "'.concat(ne([].concat(So(r),So(h))),'" when ')+"searching for endstream command."),u=!0);break}}}catch(e){l.e(e)}finally{l.f()}if(u)return t.pos+=s,t.pos-e}s++}t.pos+=o}return-1}var Yo=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Po(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var Oo=function(){return Lo((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Go(this,e),this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=r,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}),[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function(){return this.stream.peekByte()}},{key:"getNumber",value:function(){var e=this.currentChar,t=!1,r=0,A=1;if(45===e?(A=-1,45===(e=this.nextChar())&&(e=this.nextChar())):43===e&&(e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){var n="Invalid number: ".concat(String.fromCharCode(e)," (charCode ").concat(e,")");if(Dt(e)||-1===e)return T('Lexer.getNumber - "'.concat(n,'".')),0;throw new re(n)}for(var i=e-48,a=0,o=1;(e=this.nextChar())>=0;)if(e>=48&&e<=57){var s=e-48;t?a=10*a+s:(0!==r&&(r*=10),i=10*i+s)}else if(46===e){if(0!==r)break;r=1}else if(45===e)q("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(43===(e=this.peekChar())||45===e)o=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(i/=r),t&&(i*=Math.pow(10,o*a)),A*i}},{key:"getString",value:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var A=this.nextChar();;){var n=!1;switch(0|A){case-1:q("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(A=this.nextChar()){case-1:q("Unterminated string"),t=!0;break;case 110:r.push("\\n");break;case 114:r.push("\\r");break;case 116:r.push("\\t");break;case 98:r.push("\\b");break;case 102:r.push("\\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(A));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var i=15&A;n=!0,(A=this.nextChar())>=48&&A<=55&&(i=(i<<3)+(15&A),(A=this.nextChar())>=48&&A<=55&&(n=!1,i=(i<<3)+(15&A))),r.push(String.fromCharCode(i));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(A))}break;default:r.push(String.fromCharCode(A))}if(t)break;n||(A=this.nextChar())}return r.join("")}},{key:"getName",value:function(){var e,t,r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!Yo[e];)if(35===e){if(e=this.nextChar(),Yo[e]){q("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}var A=Po(e);if(-1!==A){t=e;var n=Po(e=this.nextChar());if(-1===n){if(q("Lexer_getName: Illegal digit (".concat(String.fromCharCode(e),") ")+"in hexadecimal number."),r.push("#",String.fromCharCode(t)),Yo[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(A<<4|n))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&q("Name token is longer than allowed by the spec: ".concat(r.length)),Ue.get(r.join(""))}},{key:"_hexStringWarn",value:function(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||q("getHexString - ignoring invalid character: ".concat(e)):q("getHexString - ignoring additional invalid characters.")}},{key:"getHexString",value:function(){var e=this.strBuf;e.length=0;var t=this.currentChar,r=-1,A=-1;for(this._hexStringNumWarn=0;;){if(t<0){q("Unterminated hex string");break}if(62===t){this.nextChar();break}1!==Yo[t]?(-1===(A=Po(t))?this._hexStringWarn(t):-1===r?r=A:(e.push(String.fromCharCode(r<<4|A)),r=-1),t=this.nextChar()):t=this.nextChar()}return-1!==r&&e.push(String.fromCharCode(r<<4)),e.join("")}},{key:"getObj",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return Re;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==Yo[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),Me.get("[");case 93:return this.nextChar(),Me.get("]");case 60:return 60===(t=this.nextChar())?(this.nextChar(),Me.get("<<")):this.getHexString();case 62:return 62===(t=this.nextChar())?(this.nextChar(),Me.get(">>")):Me.get(">");case 123:return this.nextChar(),Me.get("{");case 125:return this.nextChar(),Me.get("}");case 41:throw this.nextChar(),new re("Illegal character: ".concat(t))}var r=String.fromCharCode(t);if(t<32||t>127){var A=this.peekChar();if(A>=32&&A<=127)return this.nextChar(),Me.get(r)}for(var n=this.knownCommands,i=void 0!==(null==n?void 0:n[r]);(t=this.nextChar())>=0&&!Yo[t];){var a=r+String.fromCharCode(t);if(i&&void 0===n[a])break;if(128===r.length)throw new re("Command token too long: ".concat(r.length));r=a,i=void 0!==(null==n?void 0:n[r])}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),Me.get(r)))}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;e>=0;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}])}(),Ko=function(){return Lo((function e(){Go(this,e)}),null,[{key:"create",value:function(e){function t(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=e.get(t);if(Number.isInteger(A)&&(r?A>=0:A>0))return A;throw new Error('The "'.concat(t,'" parameter in the linearization ')+"dictionary is invalid.")}var r,A,n=new Jo({lexer:new Oo(e),xref:null}),i=n.getObj(),a=n.getObj(),o=n.getObj(),s=n.getObj();if(!(Number.isInteger(i)&&Number.isInteger(a)&&Te(o,"obj")&&s instanceof He&&"number"==typeof(r=s.get("Linearized"))&&r>0))return null;if((A=t(s,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:A,hints:function(e){var t,r=e.get("H");if(Array.isArray(r)&&(2===(t=r.length)||4===t)){for(var A=0;A 0))throw new Error("Hint (".concat(A,") in the linearization dictionary is invalid."))}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(s),objectNumberFirst:t(s,"O"),endFirst:t(s,"E"),numPages:t(s,"N"),mainXRefEntriesOffset:t(s,"T"),pageFirst:s.has("P")?t(s,"P",!0):0}}}])}();function To(){To=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n =0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev =0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev =0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function qo(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function jo(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){qo(i,A,n,a,o,"next",e)}function o(e){qo(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Wo(e,t,r){return t=_o(t),function(e,t){if(t&&("object"==typeof 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)}(e,Zo()?Reflect.construct(t,r||[],_o(e).constructor):t.apply(e,r))}function Zo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zo=function(){return!!e})()}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_o(e)}function Xo(e,t){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xo(e,t)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zo(e,t){for(var r=0;r 0&&void 0!==arguments[0]&&arguments[0];Vo(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}),[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){if(t-e>rs)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){if(t-e>rs)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");for(var A=r.length-1;e<=t;){this._map[e++]=r;var n=r.charCodeAt(A)+1;r=n>255?r.substring(0,A-1)+String.fromCharCode(r.charCodeAt(A-1)+1)+"\\0":r.substring(0,A)+String.fromCharCode(n)}}},{key:"mapBfRangeToArray",value:function(e,t,r){if(t-e>rs)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");for(var A=r.length,n=0;e<=t&&n>>0;for(var o=n[i],s=0,c=o.length;s =g&&A<=u)return r.charcode=A,void(r.length=i+1)}}r.charcode=0,r.length=1}},{key:"getCharCodeLength",value:function(e){for(var t=this.codespaceRanges,r=0,A=t.length;r=o&&e<=s)return r+1}return 1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}])}(),ns=function(e){function t(e,r){var A;return Vo(this,t),(A=Wo(this,t)).vertical=e,A.addCodespaceRange(r,0,65535),A}return function(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&&Xo(e,t)}(t,As),$o(t,[{key:"mapCidRange",value:function(e,t,r){j("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){j("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){j("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){j("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){j("should not access .isIdentityCMap")}}])}();function is(e){for(var t=0,r=0;r >>0}function as(e){if("string"!=typeof e)throw new re("Malformed CMap: expected string.")}function os(e){if(!Number.isInteger(e))throw new re("Malformed CMap: expected int.")}function ss(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endbfchar"))return;as(r);var A=is(r);as(r=t.getObj());var n=r;e.mapOne(A,n)}}function cs(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endbfrange"))return;as(r);var A=is(r);as(r=t.getObj());var n=is(r);if(r=t.getObj(),Number.isInteger(r)||"string"==typeof r){var i=Number.isInteger(r)?String.fromCharCode(r):r;e.mapBfRange(A,n,i)}else{if(!Te(r,"["))break;r=t.getObj();for(var a=[];!Te(r,"]")&&r!==Re;)a.push(r),r=t.getObj();e.mapBfRangeToArray(A,n,a)}}throw new re("Invalid bf range.")}function gs(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcidchar"))return;as(r);var A=is(r);os(r=t.getObj());var n=r;e.mapOne(A,n)}}function us(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcidrange"))return;as(r);var A=is(r);as(r=t.getObj());var n=is(r);os(r=t.getObj());var i=r;e.mapCidRange(A,n,i)}}function ls(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcodespacerange"))return;if("string"!=typeof r)break;var A=is(r);if("string"!=typeof(r=t.getObj()))break;var n=is(r);e.addCodespaceRange(r.length,A,n)}throw new re("Invalid codespace range.")}function hs(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function Is(e,t){var r=t.getObj();r instanceof Ue&&(e.name=r.name)}function fs(e,t,r,A){return Cs.apply(this,arguments)}function Cs(){return(Cs=jo(To().mark((function e(t,r,A,n){var i,a,o;return To().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,(o=r.getObj())!==Re){e.next=7;break}return e.abrupt("break",39);case 7:if(!(o instanceof Ue)){e.next=12;break}"WMode"===o.name?hs(t,r):"CMapName"===o.name&&Is(t,r),i=o,e.next=29;break;case 12:if(!(o instanceof Me)){e.next=29;break}e.t0=o.cmd,e.next="endcmap"===e.t0?16:"usecmap"===e.t0?17:"begincodespacerange"===e.t0?19:"beginbfchar"===e.t0?21:"begincidchar"===e.t0?23:"beginbfrange"===e.t0?25:"begincidrange"===e.t0?27:29;break;case 16:return e.abrupt("break",39);case 17:return i instanceof Ue&&(a=i.name),e.abrupt("break",29);case 19:return ls(t,r),e.abrupt("break",29);case 21:return ss(t,r),e.abrupt("break",29);case 23:return gs(t,r),e.abrupt("break",29);case 25:return cs(t,r),e.abrupt("break",29);case 27:return us(t,r),e.abrupt("break",29);case 29:e.next=37;break;case 31:if(e.prev=31,e.t1=e.catch(1),!(e.t1 instanceof Ct)){e.next=35;break}throw e.t1;case 35:return q("Invalid cMap data: "+e.t1),e.abrupt("continue",0);case 37:e.next=0;break;case 39:if(!n&&a&&(n=a),!n){e.next=42;break}return e.abrupt("return",Bs(t,A,n));case 42:return e.abrupt("return",t);case 43:case"end":return e.stop()}}),e,null,[[1,31]])})))).apply(this,arguments)}function Bs(e,t,r){return Qs.apply(this,arguments)}function Qs(){return(Qs=jo(To().mark((function e(t,r,A){var n,i;return To().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Es(A,r);case 2:if(t.useCMap=e.sent,0===t.numCodespaceRanges){for(n=t.useCMap.codespaceRanges,i=0;i =e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ps(e,t){if(e){if("string"==typeof e)return Os(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)?Os(e,t):void 0}}function Os(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r =t)throw new re("Invalid CFF header");0!==r&&(T("cff data is shifted"),e=e.subarray(r),this.bytes=e);var A=e[0],n=e[1],i=e[2],a=e[3];return{obj:new zs(A,n,i,a),endPos:i}}},{key:"parseDict",value:function(e){var t=0;var r,A=[],n=[];t=0;for(var i=e.length;t>4,o=15&i;if(15===a)break;if(r+=A[a],15===o)break;r+=A[o]}return parseFloat(r)}():28===r?r=((r=e[t++])<<24|e[t++]<<16)>>16:29===r?r=(r=(r=(r=e[t++])<<8|e[t++])<<8|e[t++])<<8|e[t++]:r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:(q('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)))}return n}},{key:"parseIndex",value:function(e){var t,r,A=new ec,n=this.bytes,i=n[e++]<<8|n[e++],a=[],o=e;if(0!==i){var s=n[e++],c=e+(i+1)*s-1;for(t=0,r=i+1;t 10)return!1;for(var n=e.stackSize,i=e.stack,a=t.length,o=0;o>16,o+=2,n++;else if(14===s){if(n>=4&&(n-=4,this.seacAnalysisEnabled))return e.seac=i.slice(n,n+4),!1;c=Zs[s]}else if(s>=32&&s<=246)i[n]=s-139,n++;else if(s>=247&&s<=254)i[n]=s<251?(s-247<<8)+t[o]+108:-(s-251<<8)-t[o]-108,o++,n++;else if(255===s)i[n]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536,o+=4,n++;else if(19===s||20===s){if(e.hints+=n>>1,0===e.hints){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}o+=e.hints+7>>3,n%=2,c=Zs[s]}else{if(10===s||29===s){var u=10===s?r:A;if(!u)return q("Missing subrsIndex for "+(c=Zs[s]).id),!1;var l=32768;u.count<1240?l=107:u.count<33900&&(l=1131);var h=i[--n]+l;if(h<0||h>=u.count||isNaN(h))return q("Out of bounds subrIndex for "+(c=Zs[s]).id),!1;if(e.stackSize=n,e.callDepth++,!this.parseCharString(e,u.get(h),r,A))return!1;e.callDepth--,n=e.stackSize;continue}if(11===s)return e.stackSize=n,!0;if(0===s&&o===t.length)t[o-1]=14,c=Zs[14];else{if(9===s){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}c=Zs[s]}}if(c){if(c.stem&&(e.hints+=n>>1,3===s||23===s?e.hasVStems=!0:!e.hasVStems||1!==s&&18!==s||(q("CFF stem hints are in wrong order"),t[o-1]=1===s?3:23)),"min"in c&&!e.undefStack&&n =2&&c.stem?n%=2:n>1&&q("Found too many parameters for stack-clearing command"),n>0&&(e.width=i[n-1])),"stackDelta"in c?("stackFn"in c&&c.stackFn(i,n),n+=c.stackDelta):c.stackClearing?n=0:c.resetStack?(n=0,e.undefStack=!1):c.undefStack&&(n=0,e.undefStack=!0,e.firstStackClearing=!1)}}return a =i.length&&(q("Invalid fd index for glyph index."),h=!1),h&&(I=(f=i[C].privateDict).subrsIndex)}else r&&(I=r);if(h&&(h=this.parseCharString(l,u,I,A)),null!==l.width){var B=f.getByName("nominalWidthX");s[g]=B+l.width}else{var Q=f.getByName("defaultWidthX");s[g]=Q}null!==l.seac&&(o[g]=l.seac),h||t.set(g,new Uint8Array([14]))}return{charStrings:t,seacs:o,widths:s}}},{key:"emptyPrivateDictionary",value:function(e){var t=this.createDict(ic,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}},{key:"parsePrivateDict",value:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],A=t[1];if(0===r||A>=this.bytes.length)this.emptyPrivateDictionary(e);else{var n=A+r,i=this.bytes.subarray(A,n),a=this.parseDict(i),o=this.createDict(ic,a,e.strings);if(e.privateDict=o,0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06),o.getByName("Subrs")){var s=o.getByName("Subrs"),c=A+s;if(0===s||c>=this.bytes.length)this.emptyPrivateDictionary(e);else{var g=this.parseIndex(c);o.subrsIndex=g.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)}},{key:"parseCharsets",value:function(e,t,r,A){if(0===e)return new oc(!0,ac.ISO_ADOBE,ps);if(1===e)return new oc(!0,ac.EXPERT,vs);if(2===e)return new oc(!0,ac.EXPERT_SUBSET,ms);var n,i,a,o=this.bytes,s=e,c=o[e++],g=[A?0:".notdef"];switch(t-=1,c){case 0:for(a=0;a =65535)q("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}}])}(),zs=qs((function e(t,r,A,n){Ks(this,e),this.major=t,this.minor=r,this.hdrSize=A,this.offSize=n})),$s=function(){return qs((function e(){Ks(this,e),this.strings=[]}),[{key:"get",value:function(e){return e>=0&&e<=390?Ws[e]:e-391<=this.strings.length?this.strings[e-391]:Ws[0]}},{key:"getSID",value:function(e){var t=Ws.indexOf(e);return-1!==t?t:-1!==(t=this.strings.indexOf(e))?t+391:-1}},{key:"add",value:function(e){this.strings.push(e)}},{key:"count",get:function(){return this.strings.length}}])}(),ec=function(){return qs((function e(){Ks(this,e),this.objects=[],this.length=0}),[{key:"add",value:function(e){this.length+=e.length,this.objects.push(e)}},{key:"set",value:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}},{key:"get",value:function(e){return this.objects[e]}},{key:"count",get:function(){return this.objects.length}}])}(),tc=function(){return qs((function e(t,r){Ks(this,e),this.keyToNameMap=t.keyToNameMap,this.nameToKeyMap=t.nameToKeyMap,this.defaults=t.defaults,this.types=t.types,this.opcodes=t.opcodes,this.order=t.order,this.strings=r,this.values=Object.create(null)}),[{key:"setByKey",value:function(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;var r,A=Ys(t);try{for(A.s();!(r=A.n()).done;){var n=r.value;if(isNaN(n))return q('Invalid CFFDict value: "'.concat(t,'" for key "').concat(e,'".')),!0}}catch(e){A.e(e)}finally{A.f()}var i=this.types[e];return"num"!==i&&"sid"!==i&&"offset"!==i||(t=t[0]),this.values[e]=t,!0}},{key:"setByName",value:function(e,t){if(!(e in this.nameToKeyMap))throw new re('Invalid dictionary name "'.concat(e,'"'));this.values[this.nameToKeyMap[e]]=t}},{key:"hasName",value:function(e){return this.nameToKeyMap[e]in this.values}},{key:"getByName",value:function(e){if(!(e in this.nameToKeyMap))throw new re("Invalid dictionary name ".concat(e,'"'));var t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}},{key:"removeByName",value:function(e){delete this.values[this.nameToKeyMap[e]]}}],[{key:"createTables",value:function(e){var t,r={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},A=Ys(e);try{for(A.s();!(t=A.n()).done;){var n=t.value,i=Array.isArray(n[0])?(n[0][0]<<8)+n[0][1]:n[0];r.keyToNameMap[i]=n[1],r.nameToKeyMap[n[1]]=i,r.types[i]=n[2],r.defaults[i]=n[3],r.opcodes[i]=Array.isArray(n[0])?n[0]:[n[0]],r.order.push(i)}}catch(e){A.e(e)}finally{A.f()}return r}}])}(),rc=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],Ac=function(e){function t(e){var r;return Ks(this,t),(r=Ns(this,t,[t.tables,e])).privateDict=null,r}return Ms(t,tc),qs(t,null,[{key:"tables",get:function(){return _(this,"tables",this.createTables(rc))}}])}(),nc=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],ic=function(e){function t(e){var r;return Ks(this,t),(r=Ns(this,t,[t.tables,e])).subrsIndex=null,r}return Ms(t,tc),qs(t,null,[{key:"tables",get:function(){return _(this,"tables",this.createTables(nc))}}])}(),ac={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},oc=qs((function e(t,r,A,n){Ks(this,e),this.predefined=t,this.format=r,this.charset=A,this.raw=n})),sc=qs((function e(t,r,A,n){Ks(this,e),this.predefined=t,this.format=r,this.encoding=A,this.raw=n})),cc=function(){return qs((function e(t,r){Ks(this,e),this.format=t,this.fdSelect=r}),[{key:"getFDIndex",value:function(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}])}(),gc=function(){return qs((function e(){Ks(this,e),this.offsets=Object.create(null)}),[{key:"isTracking",value:function(e){return e in this.offsets}},{key:"track",value:function(e,t){if(e in this.offsets)throw new re("Already tracking location of ".concat(e));this.offsets[e]=t}},{key:"offset",value:function(e){for(var t in this.offsets)this.offsets[t]+=e}},{key:"setEntryLocation",value:function(e,t,r){if(!(e in this.offsets))throw new re("Not tracking location of ".concat(e));for(var A=r.data,n=this.offsets[e],i=0,a=t.length;i>24&255,A[c]=l>>16&255,A[g]=l>>8&255,A[u]=255&l}}}])}(),uc=function(){function e(t){Ks(this,e),this.cff=t}return qs(e,[{key:"compile",value:function(){var e=this.cff,t={data:[],length:0,add(e){try{var t;(t=this.data).push.apply(t,Gs(e))}catch(t){this.data=this.data.concat(e)}this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var A=this.compileNameIndex(e.names);if(t.add(A),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var n=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");var i,a=Ys(e.fdArray);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=n.slice(0);o.hasName("FontMatrix")&&(s=ge.transform(s,o.getByName("FontMatrix"))),o.setByName("FontMatrix",s)}}catch(e){a.e(e)}finally{a.f()}}var c=e.topDict.getByName("XUID");(null==c?void 0:c.length)>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);var g=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(g.output);var u=g.trackers[0],l=this.compileStringIndex(e.strings.strings);t.add(l);var h=this.compileIndex(e.globalSubrIndex);if(t.add(h),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)u.setEntryLocation("Encoding",[e.encoding.format],t);else{var I=this.compileEncoding(e.encoding);u.setEntryLocation("Encoding",[t.length],t),t.add(I)}var f=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);u.setEntryLocation("charset",[t.length],t),t.add(f);var C=this.compileCharStrings(e.charStrings);if(u.setEntryLocation("CharStrings",[t.length],t),t.add(C),e.isCIDFont){u.setEntryLocation("FDSelect",[t.length],t);var B=this.compileFDSelect(e.fdSelect);t.add(B),g=this.compileTopDicts(e.fdArray,t.length,!0),u.setEntryLocation("FDArray",[t.length],t),t.add(g.output);var Q=g.trackers;this.compilePrivateDicts(e.fdArray,Q,t)}return this.compilePrivateDicts([e.topDict],[u],t),t.add([0]),t.data}},{key:"encodeNumber",value:function(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}},{key:"encodeFloat",value:function(t){var r=t.toString(),A=e.EncodeFloatRegExp.exec(r);if(A){var n=parseFloat("1e"+((A[2]?+A[2]:0)+A[1].length));r=(Math.round(t*n)/n).toString()}var i,a,o="";for(i=0,a=r.length;i=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e]}},{key:"compileHeader",value:function(e){return[e.major,e.minor,4,e.offSize]}},{key:"compileNameIndex",value:function(e){var t,r=new ec,A=Ys(e);try{for(A.s();!(t=A.n()).done;){for(var n=t.value,i=Math.min(n.length,127),a=new Array(i),o=0;o"~"||"["===s||"]"===s||"("===s||")"===s||"{"===s||"}"===s||"<"===s||">"===s||"/"===s||"%"===s)&&(s="_"),a[o]=s}""===(a=a.join(""))&&(a="Bad_Font_Name"),r.add(ie(a))}}catch(e){A.e(e)}finally{A.f()}return this.compileIndex(r)}},{key:"compileTopDicts",value:function(e,t,r){var A,n=[],i=new ec,a=Ys(e);try{for(a.s();!(A=a.n()).done;){var o=A.value;r&&(o.removeByName("CIDFontVersion"),o.removeByName("CIDFontRevision"),o.removeByName("CIDFontType"),o.removeByName("CIDCount"),o.removeByName("UIDBase"));var s=new gc,c=this.compileDict(o,s);n.push(s),i.add(c),s.offset(t)}}catch(e){a.e(e)}finally{a.f()}return{trackers:n,output:i=this.compileIndex(i,n)}}},{key:"compilePrivateDicts",value:function(e,t,r){for(var A=0,n=e.length;A >8&255,255&i]);else{(n=new Uint8Array(1+2*i))[0]=0;for(var a=0,o=e.charset.length,s=!1,c=1;c >8&255,n[c+1]=255&g}}return this.compileTypedArray(n)}},{key:"compileEncoding",value:function(e){return this.compileTypedArray(e.raw)}},{key:"compileFDSelect",value:function(e){var t,r,A=e.format;switch(A){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=A,r=0;r >8&255,255&r,a),n=a)}var o=(i.length-3)/3;i[1]=o>>8&255,i[2]=255&o,i.push(r>>8&255,255&r),t=new Uint8Array(i)}return this.compileTypedArray(t)}},{key:"compileTypedArray",value:function(e){return Array.from(e)}},{key:"compileIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.objects,A=r.length;if(0===A)return[0,0];var n,i,a=[A>>8&255,255&A],o=1;for(n=0;n>8&255,255&s):3===i?a.push(s>>16&255,s>>8&255,255&s):a.push(s>>>24&255,s>>16&255,s>>8&255,255&s),r[n]&&(s+=r[n].length);for(n=0;n=5&&n<=7))return-1;A=e.substring(1)}if(A===A.toUpperCase()&&(r=parseInt(A,16))>=0)return r}return-1}var Cc=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function Bc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(-1!==t)for(var r=Cc[t],A=0,n=r.length;A =r[A]&&e<=r[A+1])return t;for(var i=0,a=Cc.length;i=o[s]&&e<=o[s+1])return i;return-1}var Qc=new RegExp("^(\\\\s)|(\\\\p{Mn})|(\\\\p{Cf})$","u"),Ec=new Map,dc=!0,yc=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function pc(e,t){if(void 0!==t[e])return e;var r=fc(e,t);if(-1!==r)for(var A in t)if(t[A]===r)return A;return T("Unable to recover a standard glyph name for: "+e),e}function vc(e,t,r){var A,n,i,a=Object.create(null),o=!!(4&e.flags);if(e.isInternalFont)for(i=t,n=0;n =0?A:0;else if(e.baseEncodingName)for(i=Rs(e.baseEncodingName),n=0;n =0?A:0;else if(o)for(n in t)a[n]=t[n];else for(i=Ds,n=0;n =0?A:0;var s,c=e.differences;if(c)for(n in c){var g=c[n];if(-1===(A=r.indexOf(g))){s||(s=lc());var u=pc(g,s);u!==g&&(A=r.indexOf(u))}a[n]=A>=0?A:0}return a}function mc(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\\s/g,"")}var wc=ft((function(e){e[8211]=65074,e[8212]=65073,e[8229]=65072,e[8230]=65049,e[12289]=65041,e[12290]=65042,e[12296]=65087,e[12297]=65088,e[12298]=65085,e[12299]=65086,e[12300]=65089,e[12301]=65090,e[12302]=65091,e[12303]=65092,e[12304]=65083,e[12305]=65084,e[12308]=65081,e[12309]=65082,e[12310]=65047,e[12311]=65048,e[65103]=65076,e[65281]=65045,e[65288]=65077,e[65289]=65078,e[65292]=65040,e[65306]=65043,e[65307]=65044,e[65311]=65046,e[65339]=65095,e[65341]=65096,e[65343]=65075,e[65371]=65079,e[65373]=65080})),bc=ft((function(e){e["Times-Roman"]="Times-Roman",e.Helvetica="Helvetica",e.Courier="Courier",e.Symbol="Symbol",e["Times-Bold"]="Times-Bold",e["Helvetica-Bold"]="Helvetica-Bold",e["Courier-Bold"]="Courier-Bold",e.ZapfDingbats="ZapfDingbats",e["Times-Italic"]="Times-Italic",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Courier-Oblique"]="Courier-Oblique",e["Times-BoldItalic"]="Times-BoldItalic",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Courier-BoldOblique"]="Courier-BoldOblique",e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",e["Arial-BoldMT-Bold"]="Helvetica-Bold",e["Arial-ItalicMT-Italic"]="Helvetica-Oblique",e.ArialUnicodeMS="Helvetica",e["ArialUnicodeMS-Bold"]="Helvetica-Bold",e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",e["ArialUnicodeMS-Italic"]="Helvetica-Oblique",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"})),kc=ft((function(e){e.Courier="FoxitFixed.pfb",e["Courier-Bold"]="FoxitFixedBold.pfb",e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",e["Courier-Oblique"]="FoxitFixedItalic.pfb",e.Helvetica="LiberationSans-Regular.ttf",e["Helvetica-Bold"]="LiberationSans-Bold.ttf",e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",e["Helvetica-Oblique"]="LiberationSans-Italic.ttf",e["Times-Roman"]="FoxitSerif.pfb",e["Times-Bold"]="FoxitSerifBold.pfb",e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",e["Times-Italic"]="FoxitSerifItalic.pfb",e.Symbol="FoxitSymbol.pfb",e.ZapfDingbats="FoxitDingbats.pfb",e["LiberationSans-Regular"]="LiberationSans-Regular.ttf",e["LiberationSans-Bold"]="LiberationSans-Bold.ttf",e["LiberationSans-Italic"]="LiberationSans-Italic.ttf",e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"})),Dc=ft((function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e.GillSansMT="Helvetica",e["GillSansMT-Bold"]="Helvetica-Bold",e["GillSansMT-BoldItalic"]="Helvetica-BoldOblique",e["GillSansMT-Italic"]="Helvetica-Oblique",e.Impact="Helvetica",e["ItcSymbol-Bold"]="Helvetica-Bold",e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",e["ItcSymbol-Book"]="Helvetica",e["ItcSymbol-BookItalic"]="Helvetica-Oblique",e["ItcSymbol-Medium"]="Helvetica",e["ItcSymbol-MediumItalic"]="Helvetica-Oblique",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica"})),Sc=ft((function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e.LiberationSerif=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0})),Fc=ft((function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0,e.Wingdings=!0,e["Wingdings-Bold"]=!0,e["Wingdings-Regular"]=!0})),xc=ft((function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[179]=8220,e[180]=8221,e[181]=8216,e[182]=8217,e[200]=193,e[203]=205,e[207]=211,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[226]=352,e[227]=353,e[228]=381,e[229]=382,e[233]=221,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[267]=282,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[283]=344,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[672]=1488,e[673]=1489,e[674]=1490,e[675]=1491,e[676]=1492,e[677]=1493,e[678]=1494,e[679]=1495,e[680]=1496,e[681]=1497,e[682]=1498,e[683]=1499,e[684]=1500,e[685]=1501,e[686]=1502,e[687]=1503,e[688]=1504,e[689]=1505,e[690]=1506,e[691]=1507,e[692]=1508,e[693]=1509,e[694]=1510,e[695]=1511,e[696]=1512,e[697]=1513,e[698]=1514,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377})),Rc=ft((function(e){e[227]=322,e[264]=261,e[291]=346})),Gc=ft((function(e){e[1]=32,e[4]=65,e[5]=192,e[6]=193,e[9]=196,e[17]=66,e[18]=67,e[21]=268,e[24]=68,e[28]=69,e[29]=200,e[30]=201,e[32]=282,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[48]=204,e[49]=205,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[76]=210,e[80]=214,e[87]=80,e[89]=81,e[90]=82,e[92]=344,e[94]=83,e[97]=352,e[100]=84,e[104]=85,e[109]=220,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[124]=221,e[127]=90,e[129]=381,e[258]=97,e[259]=224,e[260]=225,e[263]=228,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[275]=269,e[282]=100,e[286]=101,e[287]=232,e[288]=233,e[290]=283,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[350]=236,e[351]=237,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[382]=242,e[383]=243,e[386]=246,e[393]=112,e[395]=113,e[396]=114,e[398]=345,e[400]=115,e[401]=347,e[403]=353,e[410]=116,e[437]=117,e[442]=252,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[457]=253,e[460]=122,e[462]=382,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45}));function Nc(e){var t=mc(e);return bc()[t]}function Lc(e){var t=mc(e);return!!(bc()[t]||Dc()[t]||Sc()[t]||Fc()[t])}function Uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mc(e,t){for(var r=0;r 0&&void 0!==arguments[0]?arguments[0]:[];Uc(this,e),this._map=t}),[{key:"length",get:function(){return this._map.length}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"get",value:function(e){return this._map[e]}},{key:"charCodeOf",value:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1}},{key:"amend",value:function(e){for(var t in e)this._map[t]=e[t]}}])}(),Pc=function(){return Jc((function e(t,r){Uc(this,e),this.firstChar=t,this.lastChar=r}),[{key:"length",get:function(){return this.lastChar+1-this.firstChar}},{key:"forEach",value:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)}},{key:"has",value:function(e){return this.firstChar<=e&&e<=this.lastChar}},{key:"get",value:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}},{key:"amend",value:function(e){j("Should not call amend()")}}])}();function Oc(e,t){for(var r=0;r 0){o=Object.create(null);for(var c=0,g=n.length;c =0){var s=A[o];s&&(i[a]=s)}}i.length>0&&(this.properties.builtInEncoding=i)}}}])&&Oc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function qc(e,t,r){return t=Wc(t),function(e,t){if(t&&("object"==typeof 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)}(e,jc()?Reflect.construct(t,r||[],Wc(e).constructor):t.apply(e,r))}function jc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jc=function(){return!!e})()}function Wc(e){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wc(e)}function Zc(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&&_c(e,t)}function _c(e,t){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_c(e,t)}function Xc(e){return function(e){if(Array.isArray(e))return Vc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Vc(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)?Vc(e,t):void 0}}(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 Vc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r >>0}function Ag(e,t){return e[t]<<8|e[t+1]}function ng(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function ig(e,t){return e[t]<<24>>24}function ag(e,t){return ng(e,t)/16384}function og(e){var t=e.length,r=32768;return t<1240?r=107:t<33900&&(r=1131),r}function sg(e,t,r){var A,n,i,a=1===Ag(e,t+2)?rg(e,t+8):rg(e,t+16),o=Ag(e,t+a);if(4===o){Ag(e,t+a+2);var s=Ag(e,t+a+6)>>1;for(n=t+a+14,A=[],i=0;i >1;r0;)v.push({flags:a})}for(E=0;E >1,h=!0;break;case 4:c+=o.pop(),n(s,c),h=!0;break;case 5:for(;o.length>0;)s+=o.shift(),c+=o.shift(),i(s,c);break;case 6:for(;o.length>0&&(i(s+=o.shift(),c),0!==o.length);)c+=o.shift(),i(s,c);break;case 7:for(;o.length>0&&(c+=o.shift(),i(s,c),0!==o.length);)i(s+=o.shift(),c);break;case 8:for(;o.length>0;)f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 10:if(y=o.pop(),p=null,r.isCFFCIDFont){var v=r.fdSelect.getFDIndex(A);if(v>=0&&v
Math.abs(c-D)?s+=o.shift():c+=o.shift(),a(f,B,C,Q,s,c);break;default:throw new re("unknown operator: 12 ".concat(I))}break;case 14:if(o.length>=4){var S=o.pop(),F=o.pop();c=o.pop(),s=o.pop(),t.add(5),t.add(8,[s,c]);var x=gg(r.cmap,String.fromCharCode(r.glyphNameMap[Ds[S]]));lg(r.glyphs[x.glyphId],t,r,x.glyphId),t.add(4),x=gg(r.cmap,String.fromCharCode(r.glyphNameMap[Ds[F]])),lg(r.glyphs[x.glyphId],t,r,x.glyphId)}return;case 19:case 20:l+=(g+=o.length>>1)+7>>3,h=!0;break;case 21:c+=o.pop(),n(s+=o.pop(),c),h=!0;break;case 22:n(s+=o.pop(),c),h=!0;break;case 24:for(;o.length>2;)f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);s+=o.shift(),c+=o.shift(),i(s,c);break;case 25:for(;o.length>6;)s+=o.shift(),c+=o.shift(),i(s,c);f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 26:for(o.length%2&&(s+=o.shift());o.length>0;)f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C,c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 27:for(o.length%2&&(c+=o.shift());o.length>0;)a(f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q);break;case 28:o.push((u[l]<<24|u[l+1]<<16)>>16),l+=2;break;case 29:y=o.pop()+r.gsubrsBias,(p=r.gsubrs[y])&&e(p);break;case 30:for(;o.length>0&&(f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+(1===o.length?o.shift():0),a(f,B,C,Q,s,c),0!==o.length);)f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s=C+(1===o.length?o.shift():0),c);break;case 31:for(;o.length>0&&(f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s=C+(1===o.length?o.shift():0),c),0!==o.length);)f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+(1===o.length?o.shift():0),a(f,B,C,Q,s,c);break;default:if(I<32)throw new re("unknown operator: ".concat(I));I<247?o.push(I-139):I<251?o.push(256*(I-247)+u[l++]+108):I<255?o.push(256*-(I-251)-u[l++]-108):(o.push((u[l]<<24|u[l+1]<<16|u[l+2]<<8|u[l+3])/65536),l+=4)}h&&(o.length=0)}}(e)}var hg=[],Ig=function(){return eg((function e(){var t,r,A;zc(this,e),t=this,A=[],(r=tg(r="cmds"))in t?Object.defineProperty(t,r,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[r]=A}),[{key:"add",value:function(e,t){if(t)if(St(t,null)){var r;(r=this.cmds).push.apply(r,[e].concat(Xc(t)))}else{var A;q('Commands.add - "'.concat(e,'" has at least one non-number arg: "').concat(t,'".'));var n=t.map((function(e){return"number"==typeof e?e:0}));(A=this.cmds).push.apply(A,[e].concat(Xc(n)))}else this.cmds.push(e)}}])}(),fg=function(){return eg((function e(t){zc(this,e),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}),[{key:"getPathJs",value:function(e){var t,r,A,n=gg(this.cmap,e),i=n.charCode,a=n.glyphId,o=this.compiledGlyphs[a];if(!o){try{o=this.compileGlyph(this.glyphs[a],a)}catch(e){o=hg,A=e}this.compiledGlyphs[a]=o}if(null!==(r=(t=this.compiledCharCodeToGlyphId)[i])&&void 0!==r||(t[i]=a),A)throw A;return o}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return hg;var r=this.fontMatrix;if(this.isCFFCIDFont){var A=this.fdSelect.getFDIndex(t);A>=0&&A =e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function vg(e,t){if(e){if("string"==typeof e)return mg(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)?mg(e,t):void 0}}function mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r 131070,A=r?4:2,n=new DataView(new ArrayBuffer((this.glyphs.length+1)*A));r?n.setUint32(0,0):n.setUint16(0,0);var i,a=0,o=0,s=pg(this.glyphs);try{for(s.s();!(i=s.n()).done;)a=(a+=i.value.write(a,t))+3&-4,o+=A,r?n.setUint32(o,a):n.setUint16(o,a>>1)}catch(e){s.e(e)}finally{s.f()}return{isLocationLong:r,loca:new Uint8Array(n.buffer),glyf:new Uint8Array(t.buffer)}}},{key:"scale",value:function(e){for(var t=0,r=this.glyphs.length;t 255?t+=2:g>0&&(t+=1),r=s,(g=Math.abs(c-A))>255?t+=2:g>0&&(t+=1),A=c}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"write",value:function(e,t){var r,A=e,n=[],i=[],a=[],o=0,s=0,c=pg(this.contours);try{for(c.s();!(r=c.n()).done;){for(var g=r.value,u=0,l=g.xCoordinates.length;u =0?18:2,n.push(C)):n.push(f)}o=I;var B=g.yCoordinates[u];if(0==(f=B-s))h|=32,i.push(0);else{var Q=Math.abs(f);Q<=255?(h|=f>=0?36:4,i.push(Q)):i.push(f)}s=B,a.push(h)}t.setUint16(e,n.length-1),e+=2}}catch(e){c.e(e)}finally{c.f()}t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length);for(var E=0,d=a;E =-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2),e}},{key:"write",value:function(e,t){var r=e;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),t.setUint16(e,this.flags),t.setUint16(e+2,this.glyphIndex),e+=4,1&this.flags?(2&this.flags?(t.setInt16(e,this.argument1),t.setInt16(e+2,this.argument2)):(t.setUint16(e,this.argument1),t.setUint16(e+2,this.argument2)),e+=4):(t.setUint8(e,this.argument1),t.setUint8(e+1,this.argument2),e+=2),256&this.flags&&(t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length)),e-r}},{key:"scale",value:function(e,t){}}],[{key:"parse",value:function(t,r){var A,n,i=t,a=[],o=r.getUint16(t),s=r.getUint16(t+2);t+=4,1&o?(2&o?(A=r.getInt16(t),n=r.getInt16(t+2)):(A=r.getUint16(t),n=r.getUint16(t+2)),t+=4,o^=1):(2&o?(A=r.getInt8(t),n=r.getInt8(t+1)):(A=r.getUint8(t),n=r.getUint8(t+1)),t+=2),8&o?(a.push(r.getUint16(t)),t+=2):64&o?(a.push(r.getUint16(t),r.getUint16(t+2)),t+=4):128&o&&(a.push(r.getUint16(t),r.getUint16(t+2),r.getUint16(t+4),r.getUint16(t+6)),t+=8);var c=null;if(256&o){var g=r.getUint16(t);t+=2,c=new Uint8Array(r).slice(t,t+g),t+=g}return[t-i,new e({flags:o,glyphIndex:s,argument1:A,argument2:n,transf:a,instructions:c})]}}])}();function Lg(e,t){for(var r=0;r e.length)&&(t=e.length);for(var r=0,A=Array(t);r >8&255,e[t+1]=255&r}function Hg(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function Yg(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(var A=0,n=r.length;A =e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}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,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(r);try{for(a.s();!(i=a.n()).done;){var o=i.value;e[t++]=255&o}}catch(e){a.e(e)}finally{a.f()}}}var Pg=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sfnt=t,this.tables=Object.create(null)}return t=e,A=[{key:"getSearchParams",value:function(e,t){for(var r=1,A=0;(r^e)>r;)r<<=1,A++;var n=r*t;return{range:n,entry:A,rangeShift:t*e-n}}}],(r=[{key:"toArray",value:function(){var t=this.sfnt,r=this.tables,A=Object.keys(r);A.sort();var n,i,a,o,s,c=A.length,g=12+16*c,u=[g];for(n=0;n