const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-FRV-O2Jm.js","assets/geotiff-BaoeLn6q.js","assets/openlayers-J9qS6Th1.js","assets/openlayers-BtPuoxOl.css","assets/pako-Xa-UToif.js"])))=>i.map(i=>d[i]); import{I as yu,i as Il}from"./pako-Xa-UToif.js";import{_ as is}from"./geotiff-BaoeLn6q.js";function xe(e){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(e)}var Xr=Uint8Array,Or=Uint16Array,Es=Int32Array,Os=new Xr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bs=new Xr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wu=new Xr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),uh=function(e,t){for(var r=new Or(31),n=0;n<31;++n)r[n]=t+=1<>1|(je&21845)<<1;Vn=(Vn&52428)>>2|(Vn&13107)<<2,Vn=(Vn&61680)>>4|(Vn&3855)<<4,Ls[je]=((Vn&65280)>>8|(Vn&255)<<8)>>1}var La=(function(e,t,r){for(var n=e.length,a=0,o=new Or(t);a>h]=d}else for(u=new Or(n),a=0;a>15-e[a]);return u}),mi=new Xr(288);for(var je=0;je<144;++je)mi[je]=8;for(var je=144;je<256;++je)mi[je]=9;for(var je=256;je<280;++je)mi[je]=7;for(var je=280;je<288;++je)mi[je]=8;var vo=new Xr(32);for(var je=0;je<32;++je)vo[je]=5;var Ol=La(mi,9,0),Bl=La(vo,5,0),lh=function(e){return(e+7)/8|0},Ml=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new Xr(e.subarray(t,r))},Pn=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},xa=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},as=function(e,t){for(var r=[],n=0;nN&&(N=o[n].s);var g=new Or(N+1),B=Ns(r[v-1],g,0);if(B>t){var n=0,j=0,M=B-t,C=1<t)j+=C-(1<>=M;j>0;){var K=o[n].s;g[K]=0&&j;--n){var tt=o[n].s;g[tt]==t&&(--g[tt],++j)}B=t}return{t:new Xr(g),l:B}},Ns=function(e,t,r){return e.s==-1?Math.max(Ns(e.l,t,r+1),Ns(e.r,t,r+1)):t[e.s]=r},Au=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Or(++t),n=0,a=e[0],o=1,f=function(h){r[n++]=h},u=1;u<=t;++u)if(e[u]==a&&u!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)f(32754);o>2&&(f(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(f(a),--o;o>6;o-=6)f(8304);o>2&&(f(o-3<<5|8208),o=0)}for(;o--;)f(a);o=1,a=e[u]}return{c:r.subarray(0,n),n:t}},Aa=function(e,t){for(var r=0,n=0;n>8,e[a+2]=e[a]^255,e[a+3]=e[a+1]^255;for(var o=0;o4&&!dt[wu[E-1]];--E);var q=d+5<<3,T=Aa(a,mi)+Aa(o,vo)+f,rt=Aa(a,N)+Aa(o,j)+f+14+3*E+Aa(Pt,dt)+2*Pt[16]+3*Pt[17]+7*Pt[18];if(h>=0&&q<=T&&q<=rt)return fh(t,v,e.subarray(h,h+d));var at,ut,Q,lt;if(Pn(t,v,1+(rt15&&(Pn(t,v,O[et]>>5&127),v+=O[et]>>12)}}else at=Ol,ut=mi,Q=Bl,lt=vo;for(var et=0;et255){var D=z>>18&31;xa(t,v,at[D+257]),v+=ut[D+257],D>7&&(Pn(t,v,z>>23&31),v+=Os[D]);var V=z&31;xa(t,v,Q[V]),v+=lt[V],V>3&&(xa(t,v,z>>5&8191),v+=Bs[V])}else xa(t,v,at[z]),v+=ut[z]}return xa(t,v,at[256]),v+ut[256]},Dl=new Es([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ch=new Xr(0),Rl=function(e,t,r,n,a,o){var f=o.z||e.length,u=new Xr(n+f+5*(1+Math.ceil(f/7e3))+a),h=u.subarray(n,u.length-a),d=o.l,v=(o.r||0)&7;if(t){v&&(h[0]=o.r>>3);for(var y=Dl[t-1],N=y>>13,g=y&8191,B=(1<7e3||dt>24576)&&(at>423||!d)){v=Lu(e,h,0,tt,gt,xt,et,dt,E,U-E,v),dt=Pt=et=0,E=U;for(var ut=0;ut<286;++ut)gt[ut]=0;for(var ut=0;ut<30;++ut)xt[ut]=0}var Q=2,lt=0,At=g,mt=T-rt&32767;if(at>2&&q==K(U-mt))for(var A=Math.min(N,at)-1,O=Math.min(32767,U),D=Math.min(258,at);mt<=O&&--At&&T!=rt;){if(e[U+Q]==e[U+Q-mt]){for(var z=0;zQ){if(Q=z,lt=mt,z>A)break;for(var V=Math.min(mt,z-2),X=0,ut=0;utX&&(X=ct,rt=nt)}}}T=rt,rt=j[T],mt+=T-rt&32767}if(lt){tt[dt++]=268435456|As[Q]<<18|xu[lt];var wt=As[Q]&31,_t=xu[lt]&31;et+=Os[wt]+Bs[_t],++gt[257+wt],++xt[_t],_=U+Q,++Pt}else tt[dt++]=e[U],++gt[e[U]]}}for(U=Math.max(U,_);U=f&&(h[v/8|0]=d,St=f),v=fh(h,v+1,e.subarray(U,St))}o.i=f}return Ml(u,0,n+lh(v)+a)},dh=function(){var e=1,t=0;return{p:function(r){for(var n=e,a=t,o=r.length|0,f=0;f!=o;){for(var u=Math.min(f+2655,o);f>16),a=(a&65535)+15*(a>>16)}e=n,t=a},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},Tl=function(e,t,r,n,a){if(!a&&(a={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),f=new Xr(o.length+e.length);f.set(o),f.set(e,o.length),e=f,a.w=o.length}return Rl(e,t.level==null?6:t.level,t.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,a)},ph=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ql=function(e,t){var r=t.level,n=r==0?0:r<6?1:r==9?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var a=dh();a.p(t.dictionary),ph(e,2,a.d())}};function Ss(e,t){t||(t={});var r=dh();r.p(e);var n=Tl(e,t,t.dictionary?6:2,4);return ql(n,t),ph(n,n.length-4,r.d()),n}var Ul=typeof TextDecoder<"u"&&new TextDecoder,zl=0;try{Ul.decode(ch,{stream:!0}),zl=1}catch{}function Hl(e){if(Array.isArray(e))return e}function Wl(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,f,u=[],h=!0,d=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(h=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);h=!0);}catch(v){d=!0,a=v}finally{try{if(!h&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(d)throw a}}return u}}function Nu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),os={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Ms{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=Kl,r={}){let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);const a=r.offset?r.offset>>>0:0,o=t.byteLength-a;let f=a;(ArrayBuffer.isView(t)||t instanceof Ms)&&(t.byteLength!==t.buffer.byteLength&&(f=t.byteOffset+a),t=t.buffer),n?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,o),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const n=(this.offset+t)*2,a=new Uint8Array(n);a.set(new Uint8Array(this.buffer)),this.buffer=a.buffer,this.length=n,this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,r){const n=os[r].BYTES_PER_ELEMENT*t,a=this.byteOffset+this.offset,o=this.buffer.slice(a,a+n);if(this.littleEndian===Xl&&r!=="uint8"&&r!=="int8"){const u=new Uint8Array(this.buffer.slice(a,a+n));u.reverse();const h=new os[r](u.buffer);return this.offset+=n,h.reverse(),h}const f=new os[r](o);return this.offset+=n,f}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let n=0;nthis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}const gh=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t=t>>>1;gh[e]=t}const Pu=4294967295;function $l(e,t,r){let n=e;for(let a=0;a>>8;return n}function Zl(e,t){return($l(Pu,e,t)^Pu)>>>0}function ku(e,t,r){const n=e.readUint32(),a=Zl(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(a!==n)throw new Error(`CRC mismatch for chunk ${r}. Expected ${n}, found ${a}`)}function vh(e,t,r){for(let n=0;n>1)&255}else{for(;o>1)&255;for(;o>1)&255}}function wh(e,t,r,n,a){let o=0;if(r.length===0){for(;o=r||xt>=n))for(let Pt=0;Pt>8&255}const sf=new Uint16Array([255]),uf=new Uint8Array(sf.buffer),hf=uf[0]===255,lf=new Uint8Array(0);function Cu(e){const{data:t,width:r,height:n,channels:a,depth:o}=e,f=Math.ceil(o/8)*a,u=Math.ceil(o/8*a*r),h=new Uint8Array(n*u);let d=lf,v=0,y,N;for(let g=0;g>8&255}const ho=Uint8Array.of(137,80,78,71,13,10,26,10);function Fu(e){if(!cf(e.readBytes(ho.length)))throw new Error("wrong PNG signature")}function cf(e){if(e.length79)throw new Error("keyword length must be between 1 and 79")}const vf=/^[\u0000-\u00FF]*$/;function mf(e){if(!vf.test(e))throw new Error("invalid latin1 text")}function bf(e,t,r){const n=Ah(t);e[n]=yf(t,r-n.length-1)}function Ah(e){for(e.mark();e.readByte()!==pf;);const t=e.offset;e.reset();const r=xh.decode(e.readBytes(t-e.offset-1));return e.skip(1),gf(r),r}function yf(e,t){return xh.decode(e.readBytes(t))}const Er={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},ss={UNKNOWN:-1,DEFLATE:0},Iu={UNKNOWN:-1,ADAPTIVE:0},us={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},ao={NONE:0,BACKGROUND:1,PREVIOUS:2},hs={SOURCE:0,OVER:1};class wf extends Ms{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,r={}){super(t);const{checkCrc:n=!1}=r;this._checkCrc=n,this._inflator=new yu,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=ss.UNKNOWN,this._filterMethod=Iu.UNKNOWN,this._interlaceMethod=us.UNKNOWN,this._colorType=Er.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Fu(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeChunk(t,r)}return this.decodeImage(),this._png}decodeApng(){for(Fu(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(t,r)}return this.decodeApngImage(),this._apng}decodeChunk(t,r){const n=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case df:bf(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?ku(this,t+4,r):this.skip(4)}decodeApngChunk(t,r){const n=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,r),this.offset=n+t;break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?ku(this,t+4,r):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=xf(this.readUint8());const r=this.readUint8();this._colorType=r;let n;switch(r){case Er.GREYSCALE:n=1;break;case Er.TRUECOLOUR:n=3;break;case Er.INDEXED_COLOUR:n=1;break;case Er.GREYSCALE_ALPHA:n=2;break;case Er.TRUECOLOUR_ALPHA:n=4;break;case Er.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==ss.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const r=t/3;this._hasPalette=!0;const n=[];this._palette=n;for(let a=0;athis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let r=0;rthis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let r=0;for(;r{const u=((o+r.yOffset)*this._png.width+r.xOffset+f)*this._png.channels,h=(o*r.width+f)*this._png.channels;return{index:u,frameIndex:h}};switch(r.blendOp){case hs.SOURCE:for(let o=0;o=200&&t.status<=299}function oo(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var pi=Kt.saveAs||((typeof window>"u"?"undefined":xe(window))!=="object"||window!==Kt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,r){var n=Kt.URL||Kt.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener",typeof e=="string"?(a.href=e,a.origin!==location.origin?Eu(a.href)?fs(e,t,r):oo(a,a.target="_blank"):oo(a)):(a.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(a.href)},4e4),setTimeout(function(){oo(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e=="string")if(Eu(e))fs(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){oo(n)})}else navigator.msSaveOrOpenBlob((function(a,o){return o===void 0?o={autoBom:!1}:xe(o)!=="object"&&(Se.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a})(e,r),t)}:function(e,t,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return fs(e,t,r);var a=e.type==="application/octet-stream",o=/constructor/i.test(Kt.HTMLElement)||Kt.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||a&&o)&&(typeof FileReader>"u"?"undefined":xe(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var v=u.result;v=f?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=v:location=v,n=null},u.readAsDataURL(e)}else{var h=Kt.URL||Kt.webkitURL,d=h.createObjectURL(e);n?n.location=d:location.href=d,n=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function Lh(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],n=0;n255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),h=this.g.toString(16),d=this.b.toString(16);return u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),d.length==1&&(d="0"+d),"#"+u+h+d}}var lo=Kt.atob.bind(Kt),Ou=Kt.btoa.bind(Kt);/** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */function cs(e,t){var r=e[0],n=e[1],a=e[2],o=e[3];r=dr(r,n,a,o,t[0],7,-680876936),o=dr(o,r,n,a,t[1],12,-389564586),a=dr(a,o,r,n,t[2],17,606105819),n=dr(n,a,o,r,t[3],22,-1044525330),r=dr(r,n,a,o,t[4],7,-176418897),o=dr(o,r,n,a,t[5],12,1200080426),a=dr(a,o,r,n,t[6],17,-1473231341),n=dr(n,a,o,r,t[7],22,-45705983),r=dr(r,n,a,o,t[8],7,1770035416),o=dr(o,r,n,a,t[9],12,-1958414417),a=dr(a,o,r,n,t[10],17,-42063),n=dr(n,a,o,r,t[11],22,-1990404162),r=dr(r,n,a,o,t[12],7,1804603682),o=dr(o,r,n,a,t[13],12,-40341101),a=dr(a,o,r,n,t[14],17,-1502002290),r=pr(r,n=dr(n,a,o,r,t[15],22,1236535329),a,o,t[1],5,-165796510),o=pr(o,r,n,a,t[6],9,-1069501632),a=pr(a,o,r,n,t[11],14,643717713),n=pr(n,a,o,r,t[0],20,-373897302),r=pr(r,n,a,o,t[5],5,-701558691),o=pr(o,r,n,a,t[10],9,38016083),a=pr(a,o,r,n,t[15],14,-660478335),n=pr(n,a,o,r,t[4],20,-405537848),r=pr(r,n,a,o,t[9],5,568446438),o=pr(o,r,n,a,t[14],9,-1019803690),a=pr(a,o,r,n,t[3],14,-187363961),n=pr(n,a,o,r,t[8],20,1163531501),r=pr(r,n,a,o,t[13],5,-1444681467),o=pr(o,r,n,a,t[2],9,-51403784),a=pr(a,o,r,n,t[7],14,1735328473),r=gr(r,n=pr(n,a,o,r,t[12],20,-1926607734),a,o,t[5],4,-378558),o=gr(o,r,n,a,t[8],11,-2022574463),a=gr(a,o,r,n,t[11],16,1839030562),n=gr(n,a,o,r,t[14],23,-35309556),r=gr(r,n,a,o,t[1],4,-1530992060),o=gr(o,r,n,a,t[4],11,1272893353),a=gr(a,o,r,n,t[7],16,-155497632),n=gr(n,a,o,r,t[10],23,-1094730640),r=gr(r,n,a,o,t[13],4,681279174),o=gr(o,r,n,a,t[0],11,-358537222),a=gr(a,o,r,n,t[3],16,-722521979),n=gr(n,a,o,r,t[6],23,76029189),r=gr(r,n,a,o,t[9],4,-640364487),o=gr(o,r,n,a,t[12],11,-421815835),a=gr(a,o,r,n,t[15],16,530742520),r=vr(r,n=gr(n,a,o,r,t[2],23,-995338651),a,o,t[0],6,-198630844),o=vr(o,r,n,a,t[7],10,1126891415),a=vr(a,o,r,n,t[14],15,-1416354905),n=vr(n,a,o,r,t[5],21,-57434055),r=vr(r,n,a,o,t[12],6,1700485571),o=vr(o,r,n,a,t[3],10,-1894986606),a=vr(a,o,r,n,t[10],15,-1051523),n=vr(n,a,o,r,t[1],21,-2054922799),r=vr(r,n,a,o,t[8],6,1873313359),o=vr(o,r,n,a,t[15],10,-30611744),a=vr(a,o,r,n,t[6],15,-1560198380),n=vr(n,a,o,r,t[13],21,1309151649),r=vr(r,n,a,o,t[4],6,-145523070),o=vr(o,r,n,a,t[11],10,-1120210379),a=vr(a,o,r,n,t[2],15,718787259),n=vr(n,a,o,r,t[9],21,-343485551),e[0]=Yn(r,e[0]),e[1]=Yn(n,e[1]),e[2]=Yn(a,e[2]),e[3]=Yn(o,e[3])}function xo(e,t,r,n,a,o){return t=Yn(Yn(t,e),Yn(n,o)),Yn(t<>>32-a,r)}function dr(e,t,r,n,a,o,f){return xo(t&r|~t&n,e,t,a,o,f)}function pr(e,t,r,n,a,o,f){return xo(t&n|r&~n,e,t,a,o,f)}function gr(e,t,r,n,a,o,f){return xo(t^r^n,e,t,a,o,f)}function vr(e,t,r,n,a,o,f){return xo(r^(t|~n),e,t,a,o,f)}function Nh(e){var t,r=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)cs(n,Lf(e.substring(t-64,t)));e=e.substring(t-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(cs(n,a),t=0;t<16;t++)a[t]=0;return a[14]=8*r,cs(n,a),n}function Lf(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}var Bu="0123456789abcdef".split("");function Nf(e){for(var t="",r=0;r<4;r++)t+=Bu[e>>8*r+4&15]+Bu[e>>8*r&15];return t}function Sf(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function _s(e){return Nh(e).map(Sf).join("")}var _f=(function(e){for(var t=0;t>16)+(t>>16)+(r>>16)<<16|65535&r}return e+t&4294967295}/** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function Ps(e,t){var r,n,a,o;if(e!==r){for(var f=(a=e,o=1+(256/e.length|0),new Array(o+1).join(a)),u=[],h=0;h<256;h++)u[h]=h;var d=0;for(h=0;h<256;h++){var v=u[h];d=(d+v+f.charCodeAt(h))%256,u[h]=u[d],u[d]=v}r=e,n=u}else u=n;var y=t.length,N=0,g=0,B="";for(h=0;h€/\f©þdSiz";var o=(t+this.padding).substr(0,32),f=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,f),this.P=-(1+(255^a)),this.encryptionKey=_s(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Ps(this.encryptionKey,this.padding)}function Vi(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n126?"#"+("0"+a.toString(16)).slice(-2):e[n]}return t}function Du(e){if(xe(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,n,a){if(a=a||!1,typeof r!="string"||typeof n!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var o=Math.random().toString(35);return t[r][o]=[n,!!a],o},this.unsubscribe=function(r){for(var n in t)if(t[n][r])return delete t[n][r],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),a=[];for(var o in t[r]){var f=t[r][o];try{f[0].apply(e,n)}catch(u){Kt.console&&Se.error("jsPDF PubSub Error",u.message,u)}f[1]&&a.push(o)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function mo(e){if(!(this instanceof mo))return new mo(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function Sh(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function gi(e,t,r,n,a){if(!(this instanceof gi))return new gi(e,t,r,n,a);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,Sh.call(this,n,a)}function Gi(e,t,r,n,a){if(!(this instanceof Gi))return new Gi(e,t,r,n,a);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,Sh.call(this,n,a)}function Rt(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],a=arguments[2],o=arguments[3],f=[],u=1,h=16,d="S",v=null;xe(e=e||{})==="object"&&(r=e.orientation,n=e.unit||n,a=e.format||a,o=e.compress||e.compressPdf||o,(v=e.encryption||null)!==null&&(v.userPassword=v.userPassword||"",v.ownerPassword=v.ownerPassword||"",v.userPermissions=v.userPermissions||[]),u=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(h=e.floatPrecision),d=e.defaultPathOperation||"S"),f=e.filters||(o===!0?["FlateEncode"]:f),n=n||"mm",r=(""+(r||"P")).toLowerCase();var y=e.putOnlyUsedFonts||!1,N={},g={internal:{},__private__:{}};g.__private__.PubSub=Du;var B="1.3",j=g.__private__.getPdfVersion=function(){return B};g.__private__.setPdfVersion=function(l){B=l};var M={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};g.__private__.getPageFormats=function(){return M};var C=g.__private__.getPageFormat=function(l){return M[l]};a=a||"a4";var Y="compat",K="advanced",tt=Y;function gt(){this.saveGraphicsState(),P(new Gt(re,0,0,-re,0,ei()*re).toString()+" cm"),this.setFontSize(this.getFontSize()/re),d="n",tt=K}function xt(){this.restoreGraphicsState(),d="S",tt=Y}var Pt=g.__private__.combineFontStyleAndFontWeight=function(l,m){if(l=="bold"&&m=="normal"||l=="bold"&&m==400||l=="normal"&&m=="italic"||l=="bold"&&m=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return m&&(l=m==400||m==="normal"?l==="italic"?"italic":"normal":m!=700&&m!=="bold"||l!=="normal"?(m==700?"bold":m)+""+l:"bold"),l};g.advancedAPI=function(l){var m=tt===Y;return m&>.call(this),typeof l!="function"||(l(this),m&&xt.call(this)),this},g.compatAPI=function(l){var m=tt===K;return m&&xt.call(this),typeof l!="function"||(l(this),m&>.call(this)),this},g.isAdvancedAPI=function(){return tt===K};var et,U=function(l){if(tt!==K)throw new Error(l+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},dt=g.roundToPrecision=g.__private__.roundToPrecision=function(l,m){var k=t||m;if(isNaN(l)||isNaN(k))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return l.toFixed(k).replace(/0+$/,"")};et=g.hpf=g.__private__.hpf=typeof h=="number"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return dt(l,h)}:h==="smart"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return dt(l,l>-1&&l<1?16:5)}:function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return dt(l,16)};var _=g.f2=g.__private__.f2=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f2");return dt(l,2)},E=g.__private__.f3=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f3");return dt(l,3)},q=g.scale=g.__private__.scale=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.scale");return tt===Y?l*re:tt===K?l:void 0},T=function(l){return q((function(m){return tt===Y?ei()-m:tt===K?m:void 0})(l))};g.__private__.setPrecision=g.setPrecision=function(l){typeof parseInt(l,10)=="number"&&(t=parseInt(l,10))};var rt,at="00000000000000000000000000000000",ut=g.__private__.getFileId=function(){return at},Q=g.__private__.setFileId=function(l){return at=l!==void 0&&/^[a-fA-F0-9]{32}$/.test(l)?l.toUpperCase():at.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),v!==null&&(ir=new Wi(v.userPermissions,v.userPassword,v.ownerPassword,at)),at};g.setFileId=function(l){return Q(l),this},g.getFileId=function(){return ut()};var lt=g.__private__.convertDateToPDFDate=function(l){var m=l.getTimezoneOffset(),k=m<0?"+":"-",R=Math.floor(Math.abs(m/60)),G=Math.abs(m%60),ot=[k,D(R),"'",D(G),"'"].join("");return["D:",l.getFullYear(),D(l.getMonth()+1),D(l.getDate()),D(l.getHours()),D(l.getMinutes()),D(l.getSeconds()),ot].join("")},At=g.__private__.convertPDFDateToDate=function(l){var m=parseInt(l.substr(2,4),10),k=parseInt(l.substr(6,2),10)-1,R=parseInt(l.substr(8,2),10),G=parseInt(l.substr(10,2),10),ot=parseInt(l.substr(12,2),10),pt=parseInt(l.substr(14,2),10);return new Date(m,k,R,G,ot,pt,0)},mt=g.__private__.setCreationDate=function(l){var m;if(l===void 0&&(l=new Date),l instanceof Date)m=lt(l);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(l))throw new Error("Invalid argument passed to jsPDF.setCreationDate");m=l}return rt=m},A=g.__private__.getCreationDate=function(l){var m=rt;return l==="jsDate"&&(m=At(rt)),m};g.setCreationDate=function(l){return mt(l),this},g.getCreationDate=function(l){return A(l)};var O,D=g.__private__.padd2=function(l){return("0"+parseInt(l)).slice(-2)},z=g.__private__.padd2Hex=function(l){return("00"+(l=l.toString())).substr(l.length)},V=0,X=[],nt=[],it=0,ct=[],wt=[],_t=!1,St=nt;g.__private__.setCustomOutputDestination=function(l){_t=!0,St=l};var Tt=function(l){_t||(St=l)};g.__private__.resetCustomOutputDestination=function(){_t=!1,St=nt};var P=g.__private__.out=function(l){return l=l.toString(),it+=l.length+1,St.push(l),St},Nt=g.__private__.write=function(l){return P(arguments.length===1?l.toString():Array.prototype.join.call(arguments," "))},ae=g.__private__.getArrayBuffer=function(l){for(var m=l.length,k=new ArrayBuffer(m),R=new Uint8Array(k);m--;)R[m]=l.charCodeAt(m);return k},Ht=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];g.__private__.getStandardFonts=function(){return Ht};var bt=e.fontSize||16;g.__private__.setFontSize=g.setFontSize=function(l){return bt=tt===K?l/re:l,this};var Wt,Ct=g.__private__.getFontSize=g.getFontSize=function(){return tt===Y?bt:bt*re},zt=e.R2L||!1;g.__private__.setR2L=g.setR2L=function(l){return zt=l,this},g.__private__.getR2L=g.getR2L=function(){return zt};var qt,me=g.__private__.setZoomMode=function(l){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(l))Wt=l;else if(isNaN(l)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(l)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+l+'" is not recognized.');Wt=l}else Wt=parseInt(l,10)};g.__private__.getZoomMode=function(){return Wt};var he,Zt=g.__private__.setPageMode=function(l){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(l)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+l+'" is not recognized.');qt=l};g.__private__.getPageMode=function(){return qt};var fe=g.__private__.setLayoutMode=function(l){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(l)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+l+'" is not recognized.');he=l};g.__private__.getLayoutMode=function(){return he},g.__private__.setDisplayMode=g.setDisplayMode=function(l,m,k){return me(l),fe(m),Zt(k),this};var le={title:"",subject:"",author:"",keywords:"",creator:""};g.__private__.getDocumentProperty=function(l){if(Object.keys(le).indexOf(l)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return le[l]},g.__private__.getDocumentProperties=function(){return le},g.__private__.setDocumentProperties=g.setProperties=g.setDocumentProperties=function(l){for(var m in le)le.hasOwnProperty(m)&&l[m]&&(le[m]=l[m]);return this},g.__private__.setDocumentProperty=function(l,m){if(Object.keys(le).indexOf(l)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return le[l]=m};var Bt,re,Dt,Ue,ge,oe={},se={},Ee=[],Ut={},_e={},Yt={},Qt={},Oe=null,ue=0,Vt=[],be=new Du(g),Kn=e.hotfixes||[],ur={},dn={},Qr=[],Gt=function l(m,k,R,G,ot,pt){if(!(this instanceof l))return new l(m,k,R,G,ot,pt);isNaN(m)&&(m=1),isNaN(k)&&(k=0),isNaN(R)&&(R=0),isNaN(G)&&(G=1),isNaN(ot)&&(ot=0),isNaN(pt)&&(pt=0),this._matrix=[m,k,R,G,ot,pt]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Gt.prototype.join=function(l){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(et).join(l)},Gt.prototype.multiply=function(l){var m=l.sx*this.sx+l.shy*this.shx,k=l.sx*this.shy+l.shy*this.sy,R=l.shx*this.sx+l.sy*this.shx,G=l.shx*this.shy+l.sy*this.sy,ot=l.tx*this.sx+l.ty*this.shx+this.tx,pt=l.tx*this.shy+l.ty*this.sy+this.ty;return new Gt(m,k,R,G,ot,pt)},Gt.prototype.decompose=function(){var l=this.sx,m=this.shy,k=this.shx,R=this.sy,G=this.tx,ot=this.ty,pt=Math.sqrt(l*l+m*m),jt=(l/=pt)*k+(m/=pt)*R;k-=l*jt,R-=m*jt;var It=Math.sqrt(k*k+R*R);return jt/=It,l*(R/=It)>16&255,R=It>>8&255,G=255&It}if(R===void 0||ot===void 0&&k===R&&R===G)m=typeof k=="string"?k+" "+pt[0]:l.precision===2?_(k/255)+" "+pt[0]:E(k/255)+" "+pt[0];else if(ot===void 0||xe(ot)==="object"){if(ot&&!isNaN(ot.a)&&ot.a===0)return["1.","1.","1.",pt[1]].join(" ");m=typeof k=="string"?[k,R,G,pt[1]].join(" "):l.precision===2?[_(k/255),_(R/255),_(G/255),pt[1]].join(" "):[E(k/255),E(R/255),E(G/255),pt[1]].join(" ")}else m=typeof k=="string"?[k,R,G,ot,pt[2]].join(" "):l.precision===2?[_(k),_(R),_(G),_(ot),pt[2]].join(" "):[E(k),E(R),E(G),E(ot),pt[2]].join(" ");return m},Wr=g.__private__.getFilters=function(){return f},Dr=g.__private__.putStream=function(l){var m=(l=l||{}).data||"",k=l.filters||Wr(),R=l.alreadyAppliedFilters||[],G=l.addLength1||!1,ot=m.length,pt=l.objectId,jt=function(Fe){return Fe};if(v!==null&&pt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");v!==null&&(jt=ir.encryptor(pt,0));var It={};k===!0&&(k=["FlateEncode"]);var Xt=l.additionalKeyValues||[],te=(It=Rt.API.processDataByFilters!==void 0?Rt.API.processDataByFilters(m,k):{data:m,reverseChain:[]}).reverseChain+(Array.isArray(R)?R.join(" "):R.toString());if(It.data.length!==0&&(Xt.push({key:"Length",value:It.data.length}),G===!0&&Xt.push({key:"Length1",value:ot})),te.length!=0)if(te.split("/").length-1==1)Xt.push({key:"Filter",value:te});else{Xt.push({key:"Filter",value:"["+te+"]"});for(var de=0;de>"),It.data.length!==0&&(P("stream"),P(jt(It.data)),P("endstream"))},$n=g.__private__.putPage=function(l){var m=l.number,k=l.data,R=l.objId,G=l.contentsObjId;nr(R,!0),P("<>"),P("endobj");var ot=k.join(` `);return tt===K&&(ot+=` Q`),nr(G,!0),Dr({data:ot,filters:Wr(),objectId:G}),P("endobj"),R},en=g.__private__.putPages=function(){var l,m,k=[];for(l=1;l<=ue;l++)Vt[l].objId=er(),Vt[l].contentsObjId=er();for(l=1;l<=ue;l++)k.push($n({number:l,data:wt[l],objId:Vt[l].objId,contentsObjId:Vt[l].contentsObjId,mediaBox:Vt[l].mediaBox,cropBox:Vt[l].cropBox,bleedBox:Vt[l].bleedBox,trimBox:Vt[l].trimBox,artBox:Vt[l].artBox,userUnit:Vt[l].userUnit,rootDictionaryObjId:Fn,resourceDictionaryObjId:zr}));nr(Fn,!0),P("<>"),P("endobj"),be.publish("postPutPages")},Zn=function(l){be.publish("putFont",{font:l,out:P,newObject:De,putStream:Dr}),l.isAlreadyPutted!==!0&&(l.objectNumber=De(),P("<<"),P("/Type /Font"),P("/BaseFont /"+Vi(l.postScriptName)),P("/Subtype /Type1"),typeof l.encoding=="string"&&P("/Encoding /"+l.encoding),P("/FirstChar 32"),P("/LastChar 255"),P(">>"),P("endobj"))},wi=function(l){l.objectNumber=De();var m=[];m.push({key:"Type",value:"/XObject"}),m.push({key:"Subtype",value:"/Form"}),m.push({key:"BBox",value:"["+[et(l.x),et(l.y),et(l.x+l.width),et(l.y+l.height)].join(" ")+"]"}),m.push({key:"Matrix",value:"["+l.matrix.toString()+"]"});var k=l.pages[1].join(` `);Dr({data:k,additionalKeyValues:m,objectId:l.objectNumber}),P("endobj")},xi=function(l,m){m||(m=21);var k=De(),R=(function(pt,jt){var It,Xt=[],te=1/(jt-1);for(It=0;It<1;It+=te)Xt.push(It);if(Xt.push(1),pt[0].offset!=0){var de={offset:0,color:pt[0].color};pt.unshift(de)}if(pt[pt.length-1].offset!=1){var Ke={offset:1,color:pt[pt.length-1].color};pt.push(Ke)}for(var Le="",Ae=0,Fe=0;Fept[Ae+1].offset;)Ae++;var Be=pt[Ae].offset,Me=(It-Be)/(pt[Ae+1].offset-Be),hr=pt[Ae].color,xn=pt[Ae+1].color;Le+=z(Math.round((1-Me)*hr[0]+Me*xn[0]).toString(16))+z(Math.round((1-Me)*hr[1]+Me*xn[1]).toString(16))+z(Math.round((1-Me)*hr[2]+Me*xn[2]).toString(16))}return Le.trim()})(l.colors,m),G=[];G.push({key:"FunctionType",value:"0"}),G.push({key:"Domain",value:"[0.0 1.0]"}),G.push({key:"Size",value:"["+m+"]"}),G.push({key:"BitsPerSample",value:"8"}),G.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),G.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Dr({data:R,additionalKeyValues:G,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:k}),P("endobj"),l.objectNumber=De(),P("<< /ShadingType "+l.type),P("/ColorSpace /DeviceRGB");var ot="/Coords ["+et(parseFloat(l.coords[0]))+" "+et(parseFloat(l.coords[1]))+" ";l.type===2?ot+=et(parseFloat(l.coords[2]))+" "+et(parseFloat(l.coords[3])):ot+=et(parseFloat(l.coords[2]))+" "+et(parseFloat(l.coords[3]))+" "+et(parseFloat(l.coords[4]))+" "+et(parseFloat(l.coords[5])),P(ot+="]"),l.matrix&&P("/Matrix ["+l.matrix.toString()+"]"),P("/Function "+k+" 0 R"),P("/Extend [true true]"),P(">>"),P("endobj")},Ai=function(l,m){var k=er(),R=De();m.push({resourcesOid:k,objectOid:R}),l.objectNumber=R;var G=[];G.push({key:"Type",value:"/Pattern"}),G.push({key:"PatternType",value:"1"}),G.push({key:"PaintType",value:"1"}),G.push({key:"TilingType",value:"1"}),G.push({key:"BBox",value:"["+l.boundingBox.map(et).join(" ")+"]"}),G.push({key:"XStep",value:et(l.xStep)}),G.push({key:"YStep",value:et(l.yStep)}),G.push({key:"Resources",value:k+" 0 R"}),l.matrix&&G.push({key:"Matrix",value:"["+l.matrix.toString()+"]"}),Dr({data:l.stream,additionalKeyValues:G,objectId:l.objectNumber}),P("endobj")},Lo=function(l){for(var m in l.objectNumber=De(),P("<<"),l)switch(m){case"opacity":P("/ca "+_(l[m]));break;case"stroke-opacity":P("/CA "+_(l[m]))}P(">>"),P("endobj")},Zi=function(l){nr(l.resourcesOid,!0),P("<<"),P("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var m in P("/Font <<"),oe)oe.hasOwnProperty(m)&&(y===!1||y===!0&&N.hasOwnProperty(m))&&P("/"+m+" "+oe[m].objectNumber+" 0 R");P(">>")})(),(function(){if(Object.keys(Ut).length>0){for(var m in P("/Shading <<"),Ut)Ut.hasOwnProperty(m)&&Ut[m]instanceof gi&&Ut[m].objectNumber>=0&&P("/"+m+" "+Ut[m].objectNumber+" 0 R");be.publish("putShadingPatternDict"),P(">>")}})(),(function(m){if(Object.keys(Ut).length>0){for(var k in P("/Pattern <<"),Ut)Ut.hasOwnProperty(k)&&Ut[k]instanceof g.TilingPattern&&Ut[k].objectNumber>=0&&Ut[k].objectNumber>")}})(l.objectOid),(function(){if(Object.keys(Yt).length>0){var m;for(m in P("/ExtGState <<"),Yt)Yt.hasOwnProperty(m)&&Yt[m].objectNumber>=0&&P("/"+m+" "+Yt[m].objectNumber+" 0 R");be.publish("putGStateDict"),P(">>")}})(),(function(){for(var m in P("/XObject <<"),ur)ur.hasOwnProperty(m)&&ur[m].objectNumber>=0&&P("/"+m+" "+ur[m].objectNumber+" 0 R");be.publish("putXobjectDict"),P(">>")})(),P(">>"),P("endobj")},Sa=function(l){se[l.fontName]=se[l.fontName]||{},se[l.fontName][l.fontStyle]=l.id},_a=function(l,m,k,R,G){var ot={id:"F"+(Object.keys(oe).length+1).toString(10),postScriptName:l,fontName:m,fontStyle:k,encoding:R,isStandardFont:G||!1,metadata:{}};return be.publish("addFont",{font:ot,instance:this}),oe[ot.id]=ot,Sa(ot),ot.id},Rr=g.__private__.pdfEscape=g.pdfEscape=function(l,m){return(function(k,R){var G,ot,pt,jt,It,Xt,te,de,Ke;if(pt=(R=R||{}).sourceEncoding||"Unicode",It=R.outputEncoding,(R.autoencode||It)&&oe[Bt].metadata&&oe[Bt].metadata[pt]&&oe[Bt].metadata[pt].encoding&&(jt=oe[Bt].metadata[pt].encoding,!It&&oe[Bt].encoding&&(It=oe[Bt].encoding),!It&&jt.codePages&&(It=jt.codePages[0]),typeof It=="string"&&(It=jt[It]),It)){for(te=!1,Xt=[],G=0,ot=k.length;G>8&&(te=!0);k=Xt.join("")}for(G=k.length;te===void 0&&G!==0;)k.charCodeAt(G-1)>>8&&(te=!0),G--;if(!te)return k;for(Xt=R.noBOM?[]:[254,255],G=0,ot=k.length;G>8)>>8)throw new Error("Character at position "+G+" of string '"+k+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Xt.push(Ke),Xt.push(de-(Ke<<8))}return String.fromCharCode.apply(void 0,Xt)})(l,m).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qi=g.__private__.beginPage=function(l){wt[++ue]=[],Vt[ue]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(l[0]),topRightY:Number(l[1])}},ka(ue),Tt(wt[O])},Pa=function(l,m){var k,R,G;switch(r=m||r,typeof l=="string"&&(k=C(l.toLowerCase()),Array.isArray(k)&&(R=k[0],G=k[1])),Array.isArray(l)&&(R=l[0]*re,G=l[1]*re),isNaN(R)&&(R=a[0],G=a[1]),(R>14400||G>14400)&&(Se.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),R=Math.min(14400,R),G=Math.min(14400,G)),a=[R,G],r.substr(0,1)){case"l":G>R&&(a=[G,R]);break;case"p":R>G&&(a=[G,R])}Qi(a),Eo(Jt),P(ki),ia!==0&&P(ia+" J"),En!==0&&P(En+" j"),be.publish("addPage",{pageNumber:ue})},ta=function(l){l>0&&l<=ue&&(wt.splice(l,1),Vt.splice(l,1),ue--,O>ue&&(O=ue),this.setPage(O))},ka=function(l){l>0&&l<=ue&&(O=l)},Ca=g.__private__.getNumberOfPages=g.getNumberOfPages=function(){return wt.length-1},Fa=function(l,m,k){var R,G=void 0;return k=k||{},l=l!==void 0?l:oe[Bt].fontName,m=m!==void 0?m:oe[Bt].fontStyle,R=l.toLowerCase(),se[R]!==void 0&&se[R][m]!==void 0?G=se[R][m]:se[l]!==void 0&&se[l][m]!==void 0?G=se[l][m]:k.disableWarning===!1&&Se.warn("Unable to look up font label for font '"+l+"', '"+m+"'. Refer to getFontList() for available fonts."),G||k.noFallback||(G=se.times[m])==null&&(G=se.times.normal),G},rn=g.__private__.putInfo=function(){var l=De(),m=function(R){return R};for(var k in v!==null&&(m=ir.encryptor(l,0)),P("<<"),P("/Producer ("+Rr(m("jsPDF "+Rt.version))+")"),le)le.hasOwnProperty(k)&&le[k]&&P("/"+k.substr(0,1).toUpperCase()+k.substr(1)+" ("+Rr(m(le[k]))+")");P("/CreationDate ("+Rr(m(rt))+")"),P(">>"),P("endobj")},Li=g.__private__.putCatalog=function(l){var m=(l=l||{}).rootDictionaryObjId||Fn;switch(De(),P("<<"),P("/Type /Catalog"),P("/Pages "+m+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":P("/OpenAction [3 0 R /FitH null]");break;case"fullheight":P("/OpenAction [3 0 R /FitV null]");break;case"fullpage":P("/OpenAction [3 0 R /Fit]");break;case"original":P("/OpenAction [3 0 R /XYZ null null 1]");break;default:var k=""+Wt;k.substr(k.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&P("/OpenAction [3 0 R /XYZ null null "+_(Wt)+"]")}switch(he||(he="continuous"),he){case"continuous":P("/PageLayout /OneColumn");break;case"single":P("/PageLayout /SinglePage");break;case"two":case"twoleft":P("/PageLayout /TwoColumnLeft");break;case"tworight":P("/PageLayout /TwoColumnRight")}qt&&P("/PageMode /"+qt),be.publish("putCatalog"),P(">>"),P("endobj")},No=g.__private__.putTrailer=function(){P("trailer"),P("<<"),P("/Size "+(V+1)),P("/Root "+V+" 0 R"),P("/Info "+(V-1)+" 0 R"),v!==null&&P("/Encrypt "+ir.oid+" 0 R"),P("/ID [ <"+at+"> <"+at+"> ]"),P(">>")},Je=g.__private__.putHeader=function(){P("%PDF-"+B),P("%ºß¬à")},Ia=g.__private__.putXRef=function(){var l="0000000000";P("xref"),P("0 "+(V+1)),P("0000000000 65535 f ");for(var m=1;m<=V;m++)typeof X[m]=="function"?P((l+X[m]()).slice(-10)+" 00000 n "):X[m]!==void 0?P((l+X[m]).slice(-10)+" 00000 n "):P("0000000000 00000 n ")},nn=g.__private__.buildDocument=function(){var l;V=0,it=0,nt=[],X=[],ct=[],Fn=er(),zr=er(),Tt(nt),be.publish("buildDocument"),Je(),en(),(function(){be.publish("putAdditionalObjects");for(var k=0;k"),P("/O <"+ir.toHexString(ir.O)+">"),P("/P "+ir.P),P(">>"),P("endobj")),rn(),Li();var m=it;return Ia(),No(),P("startxref"),P(""+m),P("%%EOF"),Tt(wt[O]),nt.join(` `)},Ni=g.__private__.getBlob=function(l){return new Blob([ae(l)],{type:"application/pdf"})},ea=function(l){for(;l.firstChild;)l.removeChild(l.firstChild)},_r=function(l){var m,k=l.document,R=k.documentElement,G=k.head,ot=k.body;return G||(G=k.createElement("head"),R.appendChild(G)),ot||(ot=k.createElement("body"),R.appendChild(ot)),ea(G),ea(ot),(m=k.createElement("style")).appendChild(k.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),G.appendChild(m),{document:k,body:ot}},Si=g.output=g.__private__.output=(Mr=function(l,m){switch(typeof(m=m||{})=="string"?m={filename:m}:m.filename=m.filename||"generated.pdf",l){case void 0:return nn();case"save":g.save(m.filename);break;case"arraybuffer":return ae(nn());case"blob":return Ni(nn());case"bloburi":case"bloburl":if(Kt.URL!==void 0&&typeof Kt.URL.createObjectURL=="function")return Kt.URL&&Kt.URL.createObjectURL(Ni(nn()))||void 0;Se.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var k="",R=nn();try{k=Ou(R)}catch{k=Ou(unescape(encodeURIComponent(R)))}return"data:application/pdf;filename="+encodeURIComponent(m.filename)+";base64,"+k;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var G="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ot=!m.pdfObjectUrl;ot||(G=m.pdfObjectUrl);var pt=Kt.open();if(pt!==null){var jt=_r(pt),It=jt.document.createElement("script"),Xt=this;It.src=G,ot&&(It.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",It.crossOrigin="anonymous"),It.onload=function(){pt.PDFObject.embed(Xt.output("dataurlstring"),m)},jt.body.appendChild(It)}return pt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var te=m.pdfJsUrl||"examples/PDF.js/web/viewer.html",de=Kt.open();if(de!==null){var Ke=_r(de),Le=Ke.document.createElement("iframe"),Ae=te.indexOf("?")===-1?"?":"&";Xt=this,Le.id="pdfViewer",Le.width="500px",Le.height="400px",Le.src=te+Ae+"file=&downloadName="+encodeURIComponent(m.filename),Le.onload=function(){de.document.title=m.filename,Le.contentWindow.PDFViewerApplication.open(Xt.output("bloburl"))},Ke.body.appendChild(Le)}return de}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Kt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Fe=Kt.open();if(Fe!==null){var Be=_r(Fe),Me=Be.document.createElement("iframe");Me.src=this.output("datauristring",m),Be.body.appendChild(Me),Fe.document.title=m.filename}if(Fe||typeof safari>"u")return Fe;break;case"datauri":case"dataurl":return Kt.document.location.href=this.output("datauristring",m);default:return null}},Mr.foo=function(){try{return Mr.apply(this,arguments)}catch(k){var l=k.stack||"";~l.indexOf(" at ")&&(l=l.split(" at ")[1]);var m="Error in function "+l.split(` `)[0].split("<")[0]+": "+k.message;if(!Kt.console)throw new Error(m);Kt.console.error(m,k),Kt.alert&&alert(m)}},Mr.foo.bar=Mr,Mr.foo),vn=function(l){return Array.isArray(Kn)===!0&&Kn.indexOf(l)>-1};switch(n){case"pt":re=1;break;case"mm":re=72/25.4;break;case"cm":re=72/2.54;break;case"in":re=72;break;case"px":re=vn("px_scaling")==1?.75:96/72;break;case"pc":case"em":re=12;break;case"ex":re=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);re=n}var ir=null;mt(),Q();var ja=g.__private__.getPageInfo=g.getPageInfo=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Vt[l].objId,pageNumber:l,pageContext:Vt[l]}},So=g.__private__.getPageInfoByObjId=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var m in Vt)if(Vt[m].objId===l)break;return ja(m)},_o=g.__private__.getCurrentPageInfo=g.getCurrentPageInfo=function(){return{objId:Vt[O].objId,pageNumber:O,pageContext:Vt[O]}};g.addPage=function(){return Pa.apply(this,arguments),this},g.setPage=function(){return ka.apply(this,arguments),Tt.call(this,wt[O]),this},g.insertPage=function(l){return this.addPage(),this.movePage(O,l),this},g.movePage=function(l,m){var k,R;if(l>m){k=wt[l],R=Vt[l];for(var G=l;G>m;G--)wt[G]=wt[G-1],Vt[G]=Vt[G-1];wt[m]=k,Vt[m]=R,this.setPage(m)}else if(l0&&(typeof l=="string"?l=Ae.splitTextToSize(l,te):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(Pe,ke){return Pe.concat(Ae.splitTextToSize(ke,te))},[]))),ot={text:l,x:m,y:k,options:R,mutex:{pdfEscape:Rr,activeFontKey:Bt,fonts:oe,activeFontSize:bt}},be.publish("preProcessText",ot),l=ot.text,jt=(R=ot.options).angle,Le instanceof Gt==0&&jt&&typeof jt=="number"){jt*=Math.PI/180,R.rotationDirection===0&&(jt=-jt),tt===K&&(jt=-jt);var ha=Math.cos(jt),sn=Math.sin(jt);Le=new Gt(ha,sn,-sn,ha,0,0)}else jt&&jt instanceof Gt&&(Le=jt);tt!==K||Le||(Le=gn),(Xt=R.charSpace||Ci)!==void 0&&(Me+=et(q(Xt))+` Tc `,this.setCharSpace(this.getCharSpace()||0)),(Ke=R.horizontalScale)!==void 0&&(Me+=et(100*Ke)+` Tz `),R.lang;var mr=-1,qa=R.renderingMode!==void 0?R.renderingMode:R.stroke,Oi=Ae.internal.getCurrentPageInfo().pageContext;switch(qa){case 0:case!1:case"fill":mr=0;break;case 1:case!0:case"stroke":mr=1;break;case 2:case"fillThenStroke":mr=2;break;case 3:case"invisible":mr=3;break;case 4:case"fillAndAddForClipping":mr=4;break;case 5:case"strokeAndAddPathForClipping":mr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":mr=6;break;case 7:case"addToPathForClipping":mr=7}var Ua=Oi.usedRenderingMode!==void 0?Oi.usedRenderingMode:-1;mr!==-1?Me+=mr+` Tr `:Ua!==-1&&(Me+=`0 Tr `),mr!==-1&&(Oi.usedRenderingMode=mr),It=R.align||"left";var Tr,si=bt*hr,la=Ae.internal.pageSize.getWidth(),Bi=oe[Bt];Xt=R.charSpace||Ci,te=R.maxWidth||0,de=Object.assign({autoencode:!0,noBOM:!0},R.flags);var ui=[],fa=function(Pe){return Ae.getStringUnitWidth(Pe,{font:Bi,charSpace:Xt,fontSize:bt,doKerning:!1})*bt/xn};if(Object.prototype.toString.call(l)==="[object Array]"){var br;pt=ri(l),It!=="left"&&(Tr=pt.map(fa));var Ar,Mi=0;if(It==="right"){m-=Tr[0],l=[],lr=pt.length;for(var Bn=0;Bn0?(te-Tr[Xe])/ca:0;Xe":")"),fi=parseFloat(pt[fr][1]),ci=parseFloat(pt[fr][2]);break;case 0:Dn=(Be?"<":"(")+pt[fr]+(Be?">":")"),fi=mn(m),ci=bn(k)}ui!==void 0&&ui[fr]!==void 0&&(Rn=ui[fr]+` Tw `),fr===0?l.push(Rn+Ti(fi,ci,Le)+Dn):An===0?l.push(Rn+Dn):An===1&&l.push(Rn+Ti(fi,ci,Le)+Dn)}l=An===0?l.join(` Tj T* `):l.join(` Tj `),l+=` Tj `;var hn=`BT /`;return hn+=Bt+" "+bt+` Tf `,hn+=et(bt*hr)+` TL `,hn+=on+` `,hn+=Me,hn+=l,P(hn+="ET"),N[Bt]=!0,Ae};var Po=g.__private__.clip=g.clip=function(l){return P(l==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return Po("evenodd")},g.__private__.discardPath=g.discardPath=function(){return P("n"),this};var an=g.__private__.isValidStyle=function(l){var m=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(l)!==-1&&(m=!0),m};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(l){return an(l)&&(d=l),this};var Ea=g.__private__.getStyle=g.getStyle=function(l){var m=d;switch(l){case"D":case"S":m="S";break;case"F":m="f";break;case"FD":case"DF":m="B";break;case"f":case"f*":case"B":case"B*":m=l}return m},_i=g.close=function(){return P("h"),this};g.stroke=function(){return P("S"),this},g.fill=function(l){return Pi("f",l),this},g.fillEvenOdd=function(l){return Pi("f*",l),this},g.fillStroke=function(l){return Pi("B",l),this},g.fillStrokeEvenOdd=function(l){return Pi("B*",l),this};var Pi=function(l,m){xe(m)==="object"?Co(m,l):P(l)},ra=function(l){l===null||tt===K&&l===void 0||(l=Ea(l),P(l))};function ko(l,m,k,R,G){var ot=new Gi(m||this.boundingBox,k||this.xStep,R||this.yStep,this.gState,G||this.matrix);ot.stream=this.stream;var pt=l+"$$"+this.cloneIndex+++"$$";return Br(pt,ot),ot}var Co=function(l,m){var k=_e[l.key],R=Ut[k];if(R instanceof gi)P("q"),P(Fo(m)),R.gState&&g.setGState(R.gState),P(l.matrix.toString()+" cm"),P("/"+k+" sh"),P("Q");else if(R instanceof Gi){var G=new Gt(1,0,0,-1,0,ei());l.matrix&&(G=G.multiply(l.matrix||gn),k=ko.call(R,l.key,l.boundingBox,l.xStep,l.yStep,G).id),P("q"),P("/Pattern cs"),P("/"+k+" scn"),R.gState&&g.setGState(R.gState),P(m),P("Q")}},Fo=function(l){switch(l){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},In=g.moveTo=function(l,m){return P(et(q(l))+" "+et(T(m))+" m"),this},Oa=g.lineTo=function(l,m){return P(et(q(l))+" "+et(T(m))+" l"),this},jn=g.curveTo=function(l,m,k,R,G,ot){return P([et(q(l)),et(T(m)),et(q(k)),et(T(R)),et(q(G)),et(T(ot)),"c"].join(" ")),this};g.__private__.line=g.line=function(l,m,k,R,G){if(isNaN(l)||isNaN(m)||isNaN(k)||isNaN(R)||!an(G))throw new Error("Invalid arguments passed to jsPDF.line");return tt===Y?this.lines([[k-l,R-m]],l,m,[1,1],G||"S"):this.lines([[k-l,R-m]],l,m,[1,1]).stroke()},g.__private__.lines=g.lines=function(l,m,k,R,G,ot){var pt,jt,It,Xt,te,de,Ke,Le,Ae,Fe,Be,Me;if(typeof l=="number"&&(Me=k,k=m,m=l,l=Me),R=R||[1,1],ot=ot||!1,isNaN(m)||isNaN(k)||!Array.isArray(l)||!Array.isArray(R)||!an(G)||typeof ot!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(In(m,k),pt=R[0],jt=R[1],Xt=l.length,Fe=m,Be=k,It=0;It>8&255,e>>16&255,e>>24&255)},Wi.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Wi.prototype.hexToBytes=function(e){for(var t=[],r=0;r>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return Ps(r,n)}},mo.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||xe(e)!==xe(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return n===0},Rt.API={events:[]},Rt.version="4.2.1";var qe=Rt.API,Ds=1,yi=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},zi=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},bi=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var r=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(r.length===1?"0"+r:r)})},$t=function(e){return e.toFixed(2)},Gn=function(e){return e.toFixed(5)};qe.__acroform__={};var Sr=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Ru=function(e){return e*Ds},ln=function(e){var t=new Ph,r=Ft.internal.getHeight(e)||0,n=Ft.internal.getWidth(e)||0;return t.BBox=[0,0,Number($t(n)),Number($t(r))],t},Pf=qe.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<0;){t="",o--;var d,v,y=so("3",e,o).height,N=e.multiline?f-o:(f-y)/2,g=N+=2,B=0,j=0,M=0;if(o<=0){t=`(...) Tj `,t+="% Width of Text: "+so(t,e,o=12).width+", FieldWidth:"+u+` `;break}for(var C="",Y=0,K=0;Kf)continue t;C+=a[K][M],tt=!0,j=K,K--}else{C=(C+=a[K][M]+" ").substr(C.length-1)==" "?C.substr(0,C.length-1):C;var gt=parseInt(K),xt=h(gt,C,o),Pt=K>=a.length-1;if(xt&&!Pt){C+=" ",M=0;continue}if(xt||Pt){if(Pt)j=gt;else if(e.multiline&&(y+2)*(Y+2)+2>f)continue t}else{if(!e.multiline||(y+2)*(Y+2)+2>f)continue t;j=gt}}for(var et="",U=B;U<=j;U++){var dt=a[U];if(e.multiline){if(U===j){et+=dt[M]+" ",M=(M+1)%dt.length;continue}if(U===B){et+=dt[dt.length-1]+" ";continue}}et+=dt[0]+" "}switch(et=et.substr(et.length-1)==" "?et.substr(0,et.length-1):et,v=so(et,e,o).width,e.textAlign){case"right":d=u-v-2;break;case"center":d=(u-v)/2;break;default:d=2}t+=$t(d)+" "+$t(g)+` Td `,t+="("+yi(et)+`) Tj `,t+=-$t(d)+` 0 Td `,g=-(o+2),v=0,B=tt?j:j+1,Y++,C=""}break}return n.text=t,n.fontSize=o,n},so=function(e,t,r){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),a=t.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:a}},jf={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Ef=function(e,t){var r={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===r.type&&n.object===r.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},Of=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if($r.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(jf)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Ds=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new kh,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in n)if(n.hasOwnProperty(a)){var o=n[a];o.objId=void 0,o.hasAnnotation&&Ef(o,r)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(r){(function(n,a){var o=!n;for(var f in n||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(f)){var u=n[f],h=[],d=u.Rect;if(u.Rect&&(u.Rect=Ff(u.Rect,a)),a.internal.newObjectDeferredBegin(u.objId,!0),u.DA=Ft.createDefaultAppearanceStream(u),xe(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(h=u.getKeyValueListForStream()),u.Rect=d,u.hasAppearanceStream&&!u.appearanceStreamContent){var v=If(u);h.push({key:"AP",value:"<>"}),a.internal.acroformPlugin.xForms.push(v)}if(u.appearanceStreamContent){var y="";for(var N in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(N)){var g=u.appearanceStreamContent[N];if(y+="/"+N+" ",y+="<<",Object.keys(g).length>=1||Array.isArray(g)){for(var f in g)if(g.hasOwnProperty(f)){var B=g[f];typeof B=="function"&&(B=B.call(a,u)),y+="/"+f+" "+B+" ",a.internal.acroformPlugin.xForms.indexOf(B)>=0||a.internal.acroformPlugin.xForms.push(B)}}else typeof(B=g)=="function"&&(B=B.call(a,u)),y+="/"+f+" "+B,a.internal.acroformPlugin.xForms.indexOf(B)>=0||a.internal.acroformPlugin.xForms.push(B);y+=">>"}h.push({key:"AP",value:`<< `+y+">>"})}a.internal.putStream({additionalKeyValues:h,objectId:u.objId}),a.internal.out("endobj")}o&&(function(j,M){for(var C in j)if(j.hasOwnProperty(C)){var Y=C,K=j[C];M.internal.newObjectDeferredBegin(K.objId,!0),xe(K)==="object"&&typeof K.putStream=="function"&&K.putStream(),delete j[Y]}})(a.internal.acroformPlugin.xForms,a)})(r,e)}),e.internal.acroformPlugin.isInitialized=!0}},_h=qe.__acroform__.arrayToPdfArray=function(e,t,r){var n=function(f){return f};if(Array.isArray(e)){for(var a="[",o=0;o0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var r=function(n){return n};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+yi(r(e))+")"}},set:function(r){e=r}})};Sr(kh,fn);var $r=function e(){fn.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(C){if(isNaN(C))throw new Error('Invalid value "'+C+'" for attribute F supplied.');t=C}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ve(t,3)},set:function(C){C?this.F=Ge(t,3):this.F=Ye(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(C){if(isNaN(C))throw new Error('Invalid value "'+C+'" for attribute Ff supplied.');r=C}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(C){n=C!==void 0?C:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(C){n[0]=C}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(C){n[1]=C}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(C){n[2]=C}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(C){n[3]=C}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(C){switch(C){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=C;break;default:throw new Error('Invalid value "'+C+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof bo)return;o="FieldObject"+e.FieldNum++}var C=function(Y){return Y};return this.scope&&(C=this.scope.internal.getEncryptor(this.objId)),"("+yi(C(o))+")"},set:function(C){o=C.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(C){o=C}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(C){f=C}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(C){u=C}});var h=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return h},set:function(C){h=C}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Ds:d},set:function(C){d=C}});var v="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return v},set:function(C){v=C}});var y="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!y||this instanceof bo||this instanceof vi))return ds(y,this.objId,this.scope)},set:function(C){C=C.toString(),y=C}});var N=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(N)return this instanceof rr==0?ds(N,this.objId,this.scope):N},set:function(C){C=C.toString(),N=this instanceof rr==0?C.substr(0,1)==="("?zi(C.substr(1,C.length-2)):zi(C):C}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof rr==1?zi(N.substr(1,N.length-1)):N},set:function(C){C=C.toString(),N=this instanceof rr==1?"/"+bi(C):C}});var g=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(g)return g},set:function(C){this.V=C}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof rr==0?ds(g,this.objId,this.scope):g},set:function(C){C=C.toString(),g=this instanceof rr==0?C.substr(0,1)==="("?zi(C.substr(1,C.length-2)):zi(C):C}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof rr==1?zi(g.substr(1,g.length-1)):g},set:function(C){C=C.toString(),g=this instanceof rr==1?"/"+bi(C):C}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var B,j=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return j},set:function(C){C=!!C,j=C}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(B)return B},set:function(C){B=C}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,1)},set:function(C){C?this.Ff=Ge(this.Ff,1):this.Ff=Ye(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,2)},set:function(C){C?this.Ff=Ge(this.Ff,2):this.Ff=Ye(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,3)},set:function(C){C?this.Ff=Ge(this.Ff,3):this.Ff=Ye(this.Ff,3)}});var M=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(M!==null)return M},set:function(C){if([0,1,2].indexOf(C)===-1)throw new Error('Invalid value "'+C+'" for attribute Q supplied.');M=C}}),Object.defineProperty(this,"textAlign",{get:function(){var C;switch(M){case 0:default:C="left";break;case 1:C="center";break;case 2:C="right"}return C},configurable:!0,enumerable:!0,set:function(C){switch(C){case"right":case 2:M=2;break;case"center":case 1:M=1;break;default:M=0}}})};Sr($r,fn);var Yi=function(){$r.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){e=r}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return _h(t,this.objId,this.scope)},set:function(r){var n,a;a=[],typeof(n=r)=="string"&&(a=(function(o,f,u){u||(u=1);for(var h,d=[];h=f.exec(o);)d.push(h[u]);return d})(n,/\((.*?)\)/g)),t=a}}),this.getOptions=function(){return t},this.setOptions=function(r){t=r,this.sort&&t.sort()},this.addOption=function(r){r=(r=r||"").toString(),t.push(r),this.sort&&t.sort()},this.removeOption=function(r,n){for(n=n||!1,r=(r=r||"").toString();t.indexOf(r)!==-1&&(t.splice(t.indexOf(r),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,18)},set:function(r){r?this.Ff=Ge(this.Ff,18):this.Ff=Ye(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=Ge(this.Ff,19):this.Ff=Ye(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,20)},set:function(r){r?(this.Ff=Ge(this.Ff,20),t.sort()):this.Ff=Ye(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,22)},set:function(r){r?this.Ff=Ge(this.Ff,22):this.Ff=Ye(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,23)},set:function(r){r?this.Ff=Ge(this.Ff,23):this.Ff=Ye(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,27)},set:function(r){r?this.Ff=Ge(this.Ff,27):this.Ff=Ye(this.Ff,27)}}),this.hasAppearanceStream=!1};Sr(Yi,$r);var Ji=function(){Yi.call(this),this.fontName="helvetica",this.combo=!1};Sr(Ji,Yi);var Ki=function(){Ji.call(this),this.combo=!0};Sr(Ki,Ji);var fo=function(){Ki.call(this),this.edit=!0};Sr(fo,Ki);var rr=function(){$r.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,15)},set:function(r){r?this.Ff=Ge(this.Ff,15):this.Ff=Ye(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,16)},set:function(r){r?this.Ff=Ge(this.Ff,16):this.Ff=Ye(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,17)},set:function(r){r?this.Ff=Ge(this.Ff,17):this.Ff=Ye(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,26)},set:function(r){r?this.Ff=Ge(this.Ff,26):this.Ff=Ye(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(o){return o};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,a=[];for(n in a.push("<<"),t)a.push("/"+n+" ("+yi(r(t[n]))+")");return a.push(">>"),a.join(` `)}},set:function(r){xe(r)==="object"&&(t=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(r){typeof r=="string"&&(t.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){var n=r==null?"":r.toString();n.substr(0,1)==="/"&&(n=n.substr(1)),e="/"+bi(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(r){e="/"+bi(r)}})};Sr(rr,$r);var co=function(){rr.call(this),this.pushButton=!0};Sr(co,rr);var Xi=function(){rr.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};Sr(Xi,rr);var bo=function(){var e,t;$r.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){e=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(a){t=a}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(u){return u};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var o,f=[];for(o in f.push("<<"),n)f.push("/"+o+" ("+yi(a(n[o]))+")");return f.push(">>"),f.join(` `)},set:function(a){xe(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),r="/"+bi(o)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),r="/"+bi(o)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ft.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Sr(bo,$r),Xi.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},Xi.prototype.createOption=function(e){var t=new bo;return t.Parent=this,t.optionName=e,this.Kids.push(t),Bf.call(this.scope,t),t};var po=function(){rr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ft.CheckBox.createAppearanceStream()};Sr(po,rr);var vi=function(){$r.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,13)},set:function(t){t?this.Ff=Ge(this.Ff,13):this.Ff=Ye(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,21)},set:function(t){t?this.Ff=Ge(this.Ff,21):this.Ff=Ye(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,23)},set:function(t){t?this.Ff=Ge(this.Ff,23):this.Ff=Ye(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,24)},set:function(t){t?this.Ff=Ge(this.Ff,24):this.Ff=Ye(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,25)},set:function(t){t?this.Ff=Ge(this.Ff,25):this.Ff=Ye(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,26)},set:function(t){t?this.Ff=Ge(this.Ff,26):this.Ff=Ye(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Sr(vi,$r);var go=function(){vi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,14)},set:function(e){e?this.Ff=Ge(this.Ff,14):this.Ff=Ye(this.Ff,14)}}),this.password=!0};Sr(go,vi);var Ft={CheckBox:{createAppearanceStream:function(){return{N:{On:Ft.CheckBox.YesNormal},D:{On:Ft.CheckBox.YesPushDown,Off:Ft.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),o=ks(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+$t(o.fontSize)+" Tf "+a),r.push("BT"),r.push(o.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join(` `),t},YesNormal:function(e){var t=ln(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),a=[],o=Ft.internal.getHeight(e),f=Ft.internal.getWidth(e),u=ks(e,e.caption);return a.push("1 g"),a.push("0 0 "+$t(f)+" "+$t(o)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+$t(f-1)+" "+$t(o-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+r+" "+$t(u.fontSize)+" Tf "+n),a.push(u.text),a.push("ET"),a.push("Q"),t.stream=a.join(` `),t},OffPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(` `),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Ft.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Ft.RadioButton.Circle.YesNormal,t.D[e]=Ft.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.getWidth(e)<=Ft.internal.getHeight(e)?Ft.internal.getWidth(e)/4:Ft.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Ft.internal.Bezier_C,o=Number((n*a).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(` `),t},YesPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.getWidth(e)<=Ft.internal.getHeight(e)?Ft.internal.getWidth(e)/4:Ft.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),o=Number((a*Ft.internal.Bezier_C).toFixed(5)),f=Number((n*Ft.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),r.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),r.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),r.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+f+" "+f+" "+n+" 0 "+n+" c"),r.push("-"+f+" "+n+" -"+n+" "+f+" -"+n+" 0 c"),r.push("-"+n+" -"+f+" -"+f+" -"+n+" 0 -"+n+" c"),r.push(f+" -"+n+" "+n+" -"+f+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(` `),t},OffPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.getWidth(e)<=Ft.internal.getHeight(e)?Ft.internal.getWidth(e)/4:Ft.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),o=Number((a*Ft.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),r.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),r.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),r.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(` `),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Ft.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Ft.RadioButton.Cross.YesNormal,t.D[e]=Ft.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+$t(Ft.internal.getWidth(e)-2)+" "+$t(Ft.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push($t(n.x1.x)+" "+$t(n.x1.y)+" m"),r.push($t(n.x2.x)+" "+$t(n.x2.y)+" l"),r.push($t(n.x4.x)+" "+$t(n.x4.y)+" m"),r.push($t(n.x3.x)+" "+$t(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(` `),t},YesPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=Ft.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+$t(Ft.internal.getWidth(e)-2)+" "+$t(Ft.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push($t(r.x1.x)+" "+$t(r.x1.y)+" m"),n.push($t(r.x2.x)+" "+$t(r.x2.y)+" l"),n.push($t(r.x4.x)+" "+$t(r.x4.y)+" m"),n.push($t(r.x3.x)+" "+$t(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(` `),t},OffPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(` `),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Ft.internal.getWidth(e),r=Ft.internal.getHeight(e),n=Math.min(t,r);return{x1:{x:(t-n)/2,y:(r-n)/2+n},x2:{x:(t-n)/2+n,y:(r-n)/2},x3:{x:(t-n)/2,y:(r-n)/2},x4:{x:(t-n)/2+n,y:(r-n)/2+n}}}},Ft.internal.getWidth=function(e){var t=0;return xe(e)==="object"&&(t=Ru(e.Rect[2])),t},Ft.internal.getHeight=function(e){var t=0;return xe(e)==="object"&&(t=Ru(e.Rect[3])),t};var Bf=qe.addField=function(e){if(Of(this,e),!(e instanceof $r))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};qe.AcroFormChoiceField=Yi,qe.AcroFormListBox=Ji,qe.AcroFormComboBox=Ki,qe.AcroFormEditBox=fo,qe.AcroFormButton=rr,qe.AcroFormPushButton=co,qe.AcroFormRadioButton=Xi,qe.AcroFormCheckBox=po,qe.AcroFormTextField=vi,qe.AcroFormPasswordField=go,qe.AcroFormAppearance=Ft,qe.AcroForm={ChoiceField:Yi,ListBox:Ji,ComboBox:Ki,EditBox:fo,Button:rr,PushButton:co,RadioButton:Xi,CheckBox:po,TextField:vi,PasswordField:go,Appearance:Ft},Rt.AcroForm={ChoiceField:Yi,ListBox:Ji,ComboBox:Ki,EditBox:fo,Button:rr,PushButton:co,RadioButton:Xi,CheckBox:po,TextField:vi,PasswordField:go,Appearance:Ft};Rt.AcroForm;function Ch(e){return e.reduce(function(t,r,n){return t[r]=n,t},{})}(function(e){var t="addImage_";e.__addimage__={};var r="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=e.__addimage__.getImageFileTypeByImageData=function(_,E){var q,T,rt,at,ut,Q=r;if((E=E||r)==="RGBA"||_.data!==void 0&&_.data instanceof Uint8ClampedArray&&"height"in _&&"width"in _)return"RGBA";if(xt(_))for(ut in n)for(rt=n[ut],q=0;q>"}),"transparency"in E&&Array.isArray(E.transparency)&&E.transparency.length>0){for(var ut="",Q=0,lt=E.transparency.length;Q>",j.content=o;var K=j.objId+" 0 R";o="<>";else if(n.options.pageNumber)switch(o="<=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length>=1};var d=e.__arabicParser__.arabicLetterHasFinalForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length>=3};var v=e.__arabicParser__.arabicLetterHasMedialForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length==4},y=e.__arabicParser__.resolveLigatures=function(j){var M=0,C=r,Y="",K=0;for(M=0;M>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(e){var t=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(u){r=u}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(u){n=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(u){a=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(u){o=u}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(u){f=u}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(r,n){var a;if((r=r||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Rt.API),(function(e){var t={left:0,top:0,bottom:0,right:0},r=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var h=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return h},set:function(j){h=j}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(j){d=j}});var v=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return v},set:function(j){v=j}});var y=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return y},set:function(j){y=j}});var N=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return N},set:function(j){N=j}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(j){g=j}});var B=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return B},set:function(j){B=j}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(h){return n.call(this),this.internal.__cell__.headerFunction=typeof h=="function"?h:void 0,this},e.getTextDimensions=function(h,d){n.call(this);var v=(d=d||{}).fontSize||this.getFontSize(),y=d.font||this.getFont(),N=d.scaleFactor||this.internal.scaleFactor,g=0,B=0,j=0,M=this;if(!Array.isArray(h)&&typeof h!="string"){if(typeof h!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");h=String(h)}var C=d.maxWidth;C>0?typeof h=="string"?h=this.splitTextToSize(h,C):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(K,tt){return K.concat(M.splitTextToSize(tt,C))},[])):h=Array.isArray(h)?h:[h];for(var Y=0;Ythis.getPageHeight()?(this.cellAddPage(),h.y=y.top,g&&N&&(this.printHeaderRow(h.lineNumber,!0),h.y+=N[0].height)):h.y=d.y+d.height||h.y),h.text[0]!==void 0&&(this.rect(h.x,h.y,h.width,h.height,r===!0?"FD":void 0),h.align==="right"?this.text(h.text,h.x+h.width-v,h.y+v,{align:"right",baseline:"top"}):h.align==="center"?this.text(h.text,h.x+h.width/2,h.y+v,{align:"center",baseline:"top",maxWidth:h.width-v-v}):this.text(h.text,h.x+v,h.y+v,{align:"left",baseline:"top",maxWidth:h.width-v-v})),this.internal.__cell__.lastCell=h,this};e.table=function(h,d,v,y,N){if(n.call(this),!v)throw new Error("No data for PDF table.");var g,B,j,M,C=[],Y=[],K=[],tt={},gt={},xt=[],Pt=[],et=(N=N||{}).autoSize||!1,U=N.printHeaders!==!1,dt=N.css&&N.css["font-size"]!==void 0?16*N.css["font-size"]:N.fontSize||12,_=N.margins||Object.assign({width:this.getPageWidth()},t),E=typeof N.padding=="number"?N.padding:3,q=N.headerBackgroundColor||"#c8c8c8",T=N.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=U,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=dt,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=q,this.internal.__cell__.headerTextColor=T,this.setFontSize(dt),y==null)Y=C=Object.keys(v[0]),K=C.map(function(){return"left"});else if(Array.isArray(y)&&xe(y[0])==="object")for(C=y.map(function(At){return At.name}),Y=y.map(function(At){return At.prompt||At.name||""}),K=y.map(function(At){return At.align||"left"}),g=0;g0&&this.setTableHeaderRow(N),this.setFont(void 0,"normal"),r=!1}})(Rt.API);var Fh={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Ih=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Cs=Ch(Ih),jh=[100,200,300,400,500,600,700,800,900],Mf=Ch(jh);function ps(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),r=(function(o){return Fh[o=o||"normal"]?o:"normal"})(e.style),n=(function(o){return o?typeof o=="number"?o>=100&&o<=900&&o%100==0?o:400:/^\d00$/.test(o)?parseInt(o):o==="bold"?700:400:400})(e.weight),a=(function(o){return typeof Cs[o=o||"normal"]=="number"?o:"normal"})(e.stretch);return{family:t,style:r,weight:n,stretch:a,src:e.src||[],ref:e.ref||{name:t,style:[a,r,n].join(" ")}}}function Tu(e,t,r,n){var a;for(a=r;a>=0&&a=0&&a>>1)&255}return a}function Xu(e,t,r){var n=e.length,a=[];a[0]=4;for(var o=0;o>o&f}function $u(e,t,r,n){var a=r*n,o=Math.floor(a/8),f=16-(a-8*o+n),u=(1<>8&255;d.setUint8(v,N)}})(e,o,Eh(e,o)&~(u<>7,f=1<<1+(7&a);e[t++],e[t++];var u=null,h=null;o&&(u=t,h=f,t+=3*f);var d=!0,v=[],y=0,N=null,g=0,B=null;for(this.width=r,this.height=n;d&&t=0))throw Error("Invalid block size");if(_===0)break;t+=_}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var j=e[t++];y=e[t++]|e[t++]<<8,N=e[t++],1&j||(N=null),g=j>>2&7,t++;break;case 254:for(;;){if(!((_=e[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var M=e[t++]|e[t++]<<8,C=e[t++]|e[t++]<<8,Y=e[t++]|e[t++]<<8,K=e[t++]|e[t++]<<8,tt=e[t++],gt=tt>>6&1,xt=1<<1+(7&tt),Pt=u,et=h,U=!1;tt>>7&&(U=!0,Pt=t,et=xt,t+=3*xt);var dt=t;for(t++;;){var _;if(!((_=e[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}v.push({x:M,y:C,width:Y,height:K,has_local_palette:U,palette_offset:Pt,palette_size:et,data_offset:dt,data_length:t-dt,transparent_index:N,interlaced:!!gt,delay:y,disposal:g});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return v.length},this.loopCount=function(){return B},this.frameInfo=function(E){if(E<0||E>=v.length)throw new Error("Frame index out of range.");return v[E]},this.decodeAndBlitFrameBGRA=function(E,q){var T=this.frameInfo(E),rt=T.width*T.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var at=new Uint8Array(rt);Zu(e,T.data_offset,at,rt);var ut=T.palette_offset,Q=T.transparent_index;Q===null&&(Q=256);var lt=T.width,At=r-lt,mt=lt,A=4*(T.y*r+T.x),O=4*((T.y+T.height)*r+T.x),D=A,z=4*At;T.interlaced===!0&&(z+=4*r*7);for(var V=8,X=0,nt=at.length;X=O&&(z=4*At+4*r*(V-1),D=A+(lt+At)*(V<<1),V>>=1)),it===Q)D+=4;else{var ct=e[ut+3*it],wt=e[ut+3*it+1],_t=e[ut+3*it+2];q[D++]=_t,q[D++]=wt,q[D++]=ct,q[D++]=255}--mt}},this.decodeAndBlitFrameRGBA=function(E,q){var T=this.frameInfo(E),rt=T.width*T.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var at=new Uint8Array(rt);Zu(e,T.data_offset,at,rt);var ut=T.palette_offset,Q=T.transparent_index;Q===null&&(Q=256);var lt=T.width,At=r-lt,mt=lt,A=4*(T.y*r+T.x),O=4*((T.y+T.height)*r+T.x),D=A,z=4*At;T.interlaced===!0&&(z+=4*r*7);for(var V=8,X=0,nt=at.length;X=O&&(z=4*At+4*r*(V-1),D=A+(lt+At)*(V<<1),V>>=1)),it===Q)D+=4;else{var ct=e[ut+3*it],wt=e[ut+3*it+1],_t=e[ut+3*it+2];q[D++]=ct,q[D++]=wt,q[D++]=_t,q[D++]=255}--mt}}}function Zu(e,t,r,n){for(var a=e[t++],o=1<>=h,v-=h,M!==o){if(M===f)break;for(var C=Mo;)K=B[K]>>8,++Y;var tt=K;if(N+Y+(C!==M?1:0)>n)return void Se.log("Warning, gif stream longer than expected.");r[N++]=tt;var gt=N+=Y;for(C!==M&&(r[N++]=tt),K=C;Y--;)K=B[K],r[--gt]=255&K,K>>=8;j!==null&&u<4096&&(B[u++]=j<<8|tt,u>=d+1&&h<12&&(++h,d=d<<1|1)),j=M}else u=f+1,d=(1<<(h=a+1))-1,j=null}return N!==n&&Se.log("Warning, gif stream shorter than expected."),r}/** * @license Copyright (c) 2008, Adobe Systems Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Adobe Systems Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */function ms(e){var t,r,n,a,o,f=Math.floor,u=new Array(64),h=new Array(64),d=new Array(64),v=new Array(64),y=new Array(65535),N=new Array(65535),g=new Array(64),B=new Array(64),j=[],M=0,C=7,Y=new Array(64),K=new Array(64),tt=new Array(64),gt=new Array(256),xt=new Array(2048),Pt=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],et=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],dt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],_=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],rt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function at(A,O){for(var D=0,z=0,V=new Array,X=1;X<=16;X++){for(var nt=1;nt<=A[X];nt++)V[O[z]]=[],V[O[z]][0]=D,V[O[z]][1]=X,z++,D++;D*=2}return V}function ut(A){for(var O=A[0],D=A[1]-1;D>=0;)O&1<>8&255),Q(255&A)}function At(A,O,D,z,V){for(var X,nt=V[0],it=V[240],ct=(function(bt,Wt){var Ct,zt,qt,me,he,Zt,fe,le,Bt,re,Dt=0;for(Bt=0;Bt<8;++Bt){Ct=bt[Dt],zt=bt[Dt+1],qt=bt[Dt+2],me=bt[Dt+3],he=bt[Dt+4],Zt=bt[Dt+5],fe=bt[Dt+6];var Ue=Ct+(le=bt[Dt+7]),ge=Ct-le,oe=zt+fe,se=zt-fe,Ee=qt+Zt,Ut=qt-Zt,_e=me+he,Yt=me-he,Qt=Ue+_e,Oe=Ue-_e,ue=oe+Ee,Vt=oe-Ee;bt[Dt]=Qt+ue,bt[Dt+4]=Qt-ue;var be=.707106781*(Vt+Oe);bt[Dt+2]=Oe+be,bt[Dt+6]=Oe-be;var Kn=.382683433*((Qt=Yt+Ut)-(Vt=se+ge)),ur=.5411961*Qt+Kn,dn=1.306562965*Vt+Kn,Qr=.707106781*(ue=Ut+se),Gt=ge+Qr,pn=ge-Qr;bt[Dt+5]=pn+ur,bt[Dt+3]=pn-ur,bt[Dt+1]=Gt+dn,bt[Dt+7]=Gt-dn,Dt+=8}for(Dt=0,Bt=0;Bt<8;++Bt){Ct=bt[Dt],zt=bt[Dt+8],qt=bt[Dt+16],me=bt[Dt+24],he=bt[Dt+32],Zt=bt[Dt+40],fe=bt[Dt+48];var gn=Ct+(le=bt[Dt+56]),Br=Ct-le,Mr=zt+fe,De=zt-fe,er=qt+Zt,nr=qt-Zt,Xn=me+he,Fn=me-he,zr=gn+Xn,tn=gn-Xn,Hr=Mr+er,Wr=Mr-er;bt[Dt]=zr+Hr,bt[Dt+32]=zr-Hr;var Dr=.707106781*(Wr+tn);bt[Dt+16]=tn+Dr,bt[Dt+48]=tn-Dr;var $n=.382683433*((zr=Fn+nr)-(Wr=De+Br)),en=.5411961*zr+$n,Zn=1.306562965*Wr+$n,wi=.707106781*(Hr=nr+De),xi=Br+wi,Ai=Br-wi;bt[Dt+40]=Ai+en,bt[Dt+24]=Ai-en,bt[Dt+8]=xi+Zn,bt[Dt+56]=xi-Zn,Dt++}for(Bt=0;Bt<64;++Bt)re=bt[Bt]*Wt[Bt],g[Bt]=re>0?re+.5|0:re-.5|0;return g})(A,O),wt=0;wt<64;++wt)B[Pt[wt]]=ct[wt];var _t=B[0]-D;D=B[0],_t==0?ut(z[0]):(ut(z[N[X=32767+_t]]),ut(y[X]));for(var St=63;St>0&&B[St]==0;)St--;if(St==0)return ut(nt),D;for(var Tt,P=1;P<=St;){for(var Nt=P;B[P]==0&&P<=St;)++P;var ae=P-Nt;if(ae>=16){Tt=ae>>4;for(var Ht=1;Ht<=Tt;++Ht)ut(it);ae&=15}X=32767+B[P],ut(V[(ae<<4)+N[X]]),ut(y[X]),P++}return St!=63&&ut(nt),D}function mt(A){A=Math.min(Math.max(A,1),100),o!=A&&((function(O){for(var D=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],z=0;z<64;z++){var V=f((D[z]*O+50)/100);V=Math.min(Math.max(V,1),255),u[Pt[z]]=V}for(var X=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],nt=0;nt<64;nt++){var it=f((X[nt]*O+50)/100);it=Math.min(Math.max(it,1),255),h[Pt[nt]]=it}for(var ct=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],wt=0,_t=0;_t<8;_t++)for(var St=0;St<8;St++)d[wt]=1/(u[Pt[wt]]*ct[_t]*ct[St]*8),v[wt]=1/(h[Pt[wt]]*ct[_t]*ct[St]*8),wt++})(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),o=A)}this.encode=function(A,O){O&&mt(O),j=new Array,M=0,C=7,lt(65496),lt(65504),lt(16),Q(74),Q(70),Q(73),Q(70),Q(0),Q(1),Q(1),Q(0),lt(1),lt(1),Q(0),Q(0),(function(){lt(65499),lt(132),Q(0);for(var zt=0;zt<64;zt++)Q(u[zt]);Q(1);for(var qt=0;qt<64;qt++)Q(h[qt])})(),(function(zt,qt){lt(65472),lt(17),Q(8),lt(qt),lt(zt),Q(3),Q(1),Q(17),Q(0),Q(2),Q(17),Q(1),Q(3),Q(17),Q(1)})(A.width,A.height),(function(){lt(65476),lt(418),Q(0);for(var zt=0;zt<16;zt++)Q(et[zt+1]);for(var qt=0;qt<=11;qt++)Q(U[qt]);Q(16);for(var me=0;me<16;me++)Q(dt[me+1]);for(var he=0;he<=161;he++)Q(_[he]);Q(1);for(var Zt=0;Zt<16;Zt++)Q(E[Zt+1]);for(var fe=0;fe<=11;fe++)Q(q[fe]);Q(17);for(var le=0;le<16;le++)Q(T[le+1]);for(var Bt=0;Bt<=161;Bt++)Q(rt[Bt])})(),lt(65498),lt(12),Q(3),Q(1),Q(0),Q(2),Q(17),Q(3),Q(17),Q(0),Q(63),Q(0);var D=0,z=0,V=0;M=0,C=7,this.encode.displayName="_encode_";for(var X,nt,it,ct,wt,_t,St,Tt,P,Nt=A.data,ae=A.width,Ht=A.height,bt=4*ae,Wt=0;Wt>3)*bt+(St=4*(7&P)),Wt+Tt>=Ht&&(_t-=bt*(Wt+1+Tt-Ht)),X+St>=bt&&(_t-=X+St-bt+4),nt=Nt[_t++],it=Nt[_t++],ct=Nt[_t++],Y[P]=(xt[nt]+xt[it+256|0]+xt[ct+512|0]>>16)-128,K[P]=(xt[nt+768|0]+xt[it+1024|0]+xt[ct+1280|0]>>16)-128,tt[P]=(xt[nt+1280|0]+xt[it+1536|0]+xt[ct+1792|0]>>16)-128;D=At(Y,d,D,t,n),z=At(K,v,z,r,a),V=At(tt,v,V,r,a),X+=32}Wt+=8}if(C>=0){var Ct=[];Ct[1]=C+1,Ct[0]=(1<E;E++)if(U[dt+E]!=_.charCodeAt(E))return!0;return!1}function n(U,dt,_,E,q){for(var T=0;TT+1?[]:new dt),!(rt.length>>0;i&c;)c>>>=1;return c?(i&c-1)+c:i}function _(i,s,c,p,b){t(!(p%c));do i[s+(p-=c)]=b;while(0=b),512>=b)var w=o(512);else if((w=o(b))==null)return 0;return(function(x,L,S,F,H,Z){var I,W,J=L,st=1<I;++I){if($[I]>1<(ne-=$[I]))return 0;for(;0<$[I];--$[I])(F=new q).g=I,F.value=Z[W++],_(x,J+Mt,H,Et,F),Mt=dt(Mt,I)}for(I=S+1,H=2;15>=I;++I,H<<=1){if(kt+=ne<<=1,0>(ne-=$[I]))return 0;for(;0<$[I];--$[I]){if(F=new q,(Mt&vt)!=yt){for(J+=Et,ft=1<<(yt=I)-S;15>yt&&!(0>=(ft-=$[yt]));)++yt,ft<<=1;st+=Et=1<<(ft=yt-S),x[L+(yt=Mt&vt)].g=ft+S,x[L+yt].value=J-L-yt}F.g=I-S,F.value=Z[W++],_(x,J+(Mt>>S),H,Et,F),Mt=dt(Mt,I)}}return kt!=2*ht[15]-1?0:st})(i,s,c,p,b,w)}function q(){this.value=this.g=0}function T(){this.value=this.g=0}function rt(){this.G=f(5,q),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(Bi,T)}function at(i,s,c,p){t(i!=null),t(s!=null),t(2147483648>p),i.Ca=254,i.I=0,i.b=-8,i.Ka=0,i.oa=s,i.pa=c,i.Jd=s,i.Yc=c+p,i.Zc=4<=p?c+p-4+1:c,nt(i)}function ut(i,s){for(var c=0;0p),i.Sb=p,i.Ra=0,i.u=0,i.h=0,4>>=8,i.Ra+=i.oa[i.pa+i.bb]<>>0,++i.bb,i.u-=8;z(i)&&(i.h=1,i.u=0)}function mt(i,s){if(t(0<=s),!i.h&&s<=fa){var c=D(i)&ui[s];return i.u+=s,At(i),c}return i.h=1,i.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function O(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function D(i){return i.Ra>>>(i.u&br-1)>>>0}function z(i){return t(i.bb<=i.Sb),i.h||i.bb==i.Sb&&i.u>br}function V(i,s){i.u=s,i.h=z(i)}function X(i){i.u>=Ar&&(t(i.u>=Ar),At(i))}function nt(i){t(i!=null&&i.oa!=null),i.pa>>0,i.b+=8):(t(i!=null&&i.oa!=null),i.pai.b&&nt(i);var p=i.b,b=c*s>>>8,w=(i.I>>>p>b)+0;for(w?(c-=b,i.I-=b+1<

>>0):c=b+1,p=c,b=0;256<=p;)b+=8,p>>=8;return p=7^b+Mi[p],i.b-=p,i.Ca=(c<>24&255,i[s+1]=c>>16&255,i[s+2]=c>>8&255,i[s+3]=255&c}function _t(i,s){return i[s+0]|i[s+1]<<8}function St(i,s){return _t(i,s)|i[s+2]<<16}function Tt(i,s){return _t(i,s)|_t(i,s+2)<<16}function P(i,s){var c=1<=b||0>=w?0:(c[0]=b,p[0]=w,1)}function bt(i,s){return i+(1<>>s}function Wt(i,s){return((4278255360&i)+(4278255360&s)>>>0&4278255360)+((16711935&i)+(16711935&s)>>>0&16711935)>>>0}function Ct(i,s){U[s]=function(c,p,b,w,x,L,S){var F;for(F=0;F>>1)+(i&s)>>>0}function me(i){return 0<=i&&256>i?i:0>i?0:255>1))}function Zt(i,s,c){return Math.abs(s-c)-Math.abs(i-c)}function fe(i,s,c,p,b,w,x){for(p=w[x-1],c=0;c>8&255,S=16711935&(S=(S=16711935&x)+((L<<16)+L));p[b+w]=(4278255360&x)+S>>>0}}function Bt(i,s){s.jd=255&i,s.hd=i>>8&255,s.ud=i>>16&255}function re(i,s,c,p,b,w){var x;for(x=0;x>>8,F=L,H=255&(H=(H=L>>>16)+((i.jd<<24>>24)*(S<<24>>24)>>>5));F=255&(F=(F+=(i.hd<<24>>24)*(S<<24>>24)>>>5)+((i.ud<<24>>24)*(H<<24>>24)>>>5)),b[w+x]=(4278255360&L)+(H<<16)+F}}function Dt(i,s,c,p,b){U[s]=function(w,x,L,S,F,H,Z,I,W){for(S=Z;S>w.b,W=w.Ea,J=w.K[0],st=w.w;if(8>I)for(w=(1<>=I}else U["VP8LMapColor"+c](S,F,J,st,H,Z,x,L,W)}}function Ue(i,s,c,p,b){for(c=s+c;s>16&255,p[b++]=w>>8&255,p[b++]=255&w}}function ge(i,s,c,p,b){for(c=s+c;s>16&255,p[b++]=w>>8&255,p[b++]=255&w,p[b++]=w>>24&255}}function oe(i,s,c,p,b){for(c=s+c;s>16&240|x>>12&15,x=240&x|x>>28&15;p[b++]=w,p[b++]=x}}function se(i,s,c,p,b){for(c=s+c;s>16&248|x>>13&7,x=x>>5&224|x>>3&31;p[b++]=w,p[b++]=x}}function Ee(i,s,c,p,b){for(c=s+c;s>8&255,p[b++]=w>>16&255}}function Ut(i,s,c,p,b,w){if(w==0)for(c=s+c;s>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else n(p,b,i,s,c)}function _e(i,s){U[s][0]=U[i+"0"],U[s][1]=U[i+"1"],U[s][2]=U[i+"2"],U[s][3]=U[i+"3"],U[s][4]=U[i+"4"],U[s][5]=U[i+"5"],U[s][6]=U[i+"6"],U[s][7]=U[i+"7"],U[s][8]=U[i+"8"],U[s][9]=U[i+"9"],U[s][10]=U[i+"10"],U[s][11]=U[i+"11"],U[s][12]=U[i+"12"],U[s][13]=U[i+"13"],U[s][14]=U[i+"0"],U[s][15]=U[i+"0"]}function Yt(i){return i==Wo||i==Vo||i==Ja||i==Go}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Oe(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ue(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Oe,this.sd=null}function Vt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Kn(i){return alert("todo:WebPSamplerProcessPlane"),i.T}function ur(i,s){var c=i.T,p=s.ba.f.RGBA,b=p.eb,w=p.fb+i.ka*p.A,x=Ur[s.ba.S],L=i.y,S=i.O,F=i.f,H=i.N,Z=i.ea,I=i.W,W=s.cc,J=s.dc,st=s.Mc,$=s.Nc,ht=i.ka,ft=i.ka+i.T,yt=i.U,vt=yt+1>>1;for(ht==0?x(L,S,null,null,F,H,Z,I,F,H,Z,I,b,w,null,null,yt):(x(s.ec,s.fc,L,S,W,J,st,$,F,H,Z,I,b,w-p.A,b,w,yt),++c);ht+2c,b=c==Va||c==Ga||c==Ya||c==Ho||c==12||Yt(c);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!Tr(s.Oa,i,b?11:12))return 0;if(b&&Yt(c)&&xn(),i.da)alert("todo:use_scaling");else{if(p){if(s.Ib=Kn,i.Kb){if(c=i.U+1>>1,s.memory=o(i.U+2*c),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+i.U,s.Mc=s.cc,s.Nc=s.dc+c,s.Ib=ur,xn()}}else alert("todo:EmitYUV");b&&(s.Jb=dn,p&&Me())}if(p&&!au){for(i=0;256>i;++i)cl[i]=89858*(i-128)+Xa>>Ka,gl[i]=-22014*(i-128)+Xa,pl[i]=-45773*(i-128),dl[i]=113618*(i-128)+Xa>>Ka;for(i=ma;i>Ka,vl[i-ma]=rn(s,255),ml[i-ma]=rn(s+8>>4,15);au=1}return 1}function Gt(i){var s=i.ma,c=i.U,p=i.T;return t(!(1&i.ka)),0>=c||0>=p?0:(c=s.Ib(i,s),s.Jb!=null&&s.Jb(i,s,c),s.Dc+=c,1)}function pn(i){i.ma.memory=null}function gn(i,s,c,p){return mt(i,8)!=47?0:(s[0]=mt(i,14)+1,c[0]=mt(i,14)+1,p[0]=mt(i,1),mt(i,3)!=0?0:!i.h)}function Br(i,s){if(4>i)return i+1;var c=i-2>>1;return(2+(1&i)<>4)*i+(8-(15&c)))?c:1;var c}function De(i,s,c){var p=D(c),b=i[s+=255&p].g-8;return 0>>0,t(8>=c.g),i.g}function nr(i,s,c){var p=i.xc;return t((s=p==0?0:i.vc[i.md*(c>>p)+(s>>p)])>Et.b)*kt;st<$;){var ce=ne,Ze=Et,ie=1;for(Mn(I,W,ht,ft-yt,1,ht,ft);ieyt&&(Ot=yt),(0,Vr[ce[Ze++]>>8&15])(I,W+ +ie,ht,ft+ie-yt,Ot-ie,ht,ft+ie),ie=Ot}W+=yt,ft+=yt,++st&Mt||(Et+=kt)}Z!=F.nc&&n(S,L-J,S,L+(Z-H-1)*J,J);break;case 1:for(J=I,$=W,yt=(I=F.Ea)-(ft=I&~(ht=(W=1<>F.b)*st;H=b),0w.o&&(p=w.o),c=p?c=0:(b[0]+=4*w.v,w.ka=c-w.j,w.U=w.va-w.v,w.T=p-c,c=1),c){if(L=L[0],11>(c=i.ca).S){var H=c.f.RGBA,Z=(p=c.S,b=w.U,w=w.T,F=H.eb,H.A),I=w;for(H=H.fb+i.Ma*H.A;0p){var b=i.l.width,w=c.ca,x=c.tb+b*p,L=i.V,S=i.Ba+i.c*p,F=i.gc;t(i.ab==1),t(F[0].hc==3),Uo(F[0],p,s,L,S,w,x),tn(c,p,s,w,x,b)}i.C=i.Ma=s}function Wr(i,s,c,p,b,w,x){var L=i.$/p,S=i.$%p,F=i.m,H=i.s,Z=c+i.$,I=Z;b=c+p*b;var W=c+p*w,J=280+H.ua,st=i.Pb?L:16777216,$=0=st){var Mt=Z-c;t((st=i).Pb),st.wd=st.m,st.xd=Mt,0ne.g?(V(vt,vt.u+ne.g),Mt[kt]=ne.value,vt=0):(V(vt,vt.u+ne.g-256),t(256<=ne.value),vt=ne.value),vt==0&&(yt=!0)}else vt=De(ft.G[0],ft.H[0],F);if(F.h)break;if(yt||256>vt){if(!yt)if(ft.nd)s[Z]=(ft.qb|vt<<8)>>>0;else{if(X(F),yt=De(ft.G[1],ft.H[1],F),X(F),Mt=De(ft.G[2],ft.H[2],F),kt=De(ft.G[3],ft.H[3],F),F.h)break;s[Z]=(kt<<24|yt<<16|vt<<8|Mt)>>>0}if(yt=!1,++Z,++S>=p&&(S=0,++L,x!=null&&L<=w&&!(L%16)&&x(i,L),$!=null))for(;I>>$.Mb]=vt}else if(280>vt){if(vt=Br(vt-256,F),Mt=De(ft.G[4],ft.H[4],F),X(F),Mt=Mr(p,Mt=Br(Mt,F)),F.h)break;if(Z-c=p;)S-=p,++L,x!=null&&L<=w&&!(L%16)&&x(i,L);if(t(Z<=b),S&ht&&(ft=nr(H,S,L)),$!=null)for(;I>>$.Mb]=vt}else{if(!(vt>>$.Mb]=vt;vt=Z,t(!(yt>>>(Mt=$).Xa)),s[vt]=Mt.X[yt],yt=!0}yt||t(F.h==z(F))}if(i.Pb&&F.h&&Zw?w:L),i.a=0,i.$=Z-c}return 1}return i.a=3,0}function Dr(i){t(i!=null),i.vc=null,i.yc=null,i.Ya=null;var s=i.Wa;s!=null&&(s.X=null),i.vb=null,t(i!=null)}function $n(){var i=new jt;return i==null?null:(i.a=0,i.xb=tu,_e("Predictor","VP8LPredictors"),_e("Predictor","VP8LPredictors_C"),_e("PredictorAdd","VP8LPredictorsAdd"),_e("PredictorAdd","VP8LPredictorsAdd_C"),Di=le,li=re,ca=Ue,da=ge,Ri=oe,fi=se,ci=Ee,U.VP8LMapColor32b=Xe,U.VP8LMapColor8b=un,i)}function en(i,s,c,p,b){var w=1,x=[i],L=[s],S=p.m,F=p.s,H=null,Z=0;t:for(;;){if(c)for(;w&&mt(S,1);){var I=x,W=L,J=p,st=1,$=J.m,ht=J.gc[J.ab],ft=mt($,2);if(J.Oc&1<=J.ab),ft){case 0:case 1:ht.b=mt($,3)+2,st=en(bt(ht.Ea,ht.b),bt(ht.nc,ht.b),0,J,ht.K),ht.K=ht.K[0];break;case 3:var yt,vt=mt($,8)+1,Mt=16>Et.b),Ze=o(ce);if(Ze==null)yt=0;else{var ie=Et.K[0],Ot=Et.w;for(Ze[0]=Et.K[0][0],kt=1;kt<1*ne;++kt)Ze[kt]=Wt(ie[Ot+kt],Ze[kt-1]);for(;kt<4*ce;++kt)Ze[kt]=0;Et.K[0]=null,Et.K[0]=Ze,yt=1}}st=yt;break;case 2:break;default:t(0)}w=st}}if(x=x[0],L=L[0],w&&mt(S,1)&&!(w=1<=(Z=mt(S,4))&&11>=Z)){p.a=3;break t}var Lt;if(Lt=w)e:{var He,ee,pe,Ie=p,ar=x,yr=L,Re=Z,cr=c,wr=Ie.m,Qe=Ie.s,ve=[null],ye=1,Te=0,we=Qh[Re];r:for(;;){if(cr&&mt(wr,1)){var or=mt(wr,3)+2,Yr=bt(ar,or),We=bt(yr,or),Lr=Yr*We;if(!en(Yr,We,0,Ie,ve))break r;for(ve=ve[0],Qe.xc=or,He=0;He>8&65535;ve[He]=Ne,Ne>=ye&&(ye=Ne+1)}}if(wr.h)break r;for(ee=0;5>ee;++ee){var tr=Zs[ee];!ee&&0=xr),Fr=Cr;var Nr=o(Te);if(Fr==null||Nr==null||kr==null){Ie.a=1;break r}var Ir=kr;for(He=pe=0;Heee;++ee){tr=Zs[ee],jr[ee]=Ir,Jr[ee]=pe,!ee&&0ro)break n}else Zo=ro;for(ya=0;yaUi)cu[ya++]=Ui,Ui!=0&&(du=Ui);else{var Pl=Ui==16,vu=Ui-16,kl=Kh[vu],mu=mt(zn,Jh[vu])+kl;if(ya+mu>ro)break n;for(var Cl=Pl?du:0;0=ee){var wa,ts=Nr[0];for(wa=1;wats&&(ts=Nr[wa]);sr+=ts}}if(Ce.nd=Sn,Ce.Qb=0,Sn&&(Ce.qb=(jr[3][Jr[3]+0].value<<24|jr[1][Jr[1]+0].value<<16|jr[2][Jr[2]+0].value)>>>0,di==0&&256>jr[0][Jr[0]+0].value&&(Ce.Qb=1,Ce.qb+=jr[0][Jr[0]+0].value<<8)),Ce.jc=!Ce.Qb&&6>sr,Ce.jc){var no,_n=Ce;for(no=0;no>=er(io,8,Wn),Hn>>=er(_n.G[1][_n.H[1]+Hn],16,Wn),Hn>>=er(_n.G[2][_n.H[2]+Hn],0,Wn),er(_n.G[3][_n.H[3]+Hn],24,Wn))}}}Qe.vc=ve,Qe.Wb=ye,Qe.Ya=Fr,Qe.yc=kr,Lt=1;break e}Lt=0}if(!(w=Lt)){p.a=3;break t}if(0p+1?[]:0),!(b.lengthi?0:i>s?s:i}function Li(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function No(){var i=new Fa;return i!=null&&(i.a=0,i.sc="OK",i.cb=0,i.Xb=0,va||(va=Ni)),i}function Je(i,s,c){return i.a==0&&(i.a=s,i.sc=c,i.cb=0),0}function Ia(i,s,c){return 3<=c&&i[s+0]==157&&i[s+1]==1&&i[s+2]==42}function nn(i,s){if(i==null)return 0;if(i.a=0,i.sc="OK",s==null)return Je(i,2,"null VP8Io passed to VP8GetHeaders()");var c=s.data,p=s.w,b=s.ha;if(4>b)return Je(i,7,"Truncated header.");var w=c[p+0]|c[p+1]<<8|c[p+2]<<16,x=i.Od;if(x.Rb=!(1&w),x.td=w>>1&7,x.yd=w>>4&1,x.ub=w>>5,3b)return Je(i,7,"cannot parse picture header");if(!Ia(c,p,b))return Je(i,3,"Bad code word");L.c=16383&(c[p+4]<<8|c[p+3]),L.Td=c[p+4]>>6,L.i=16383&(c[p+6]<<8|c[p+5]),L.Ud=c[p+6]>>6,p+=7,b-=7,i.za=L.c+15>>4,i.Ub=L.i+15>>4,s.width=L.c,s.height=L.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,a((w=i.Pa).jb,0,255,w.jb.length),t((w=i.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,a(w.Zb,0,0,w.Zb.length),a(w.Lb,0,0,w.Lb)}if(x.ub>b)return Je(i,7,"bad partition length");at(w=i.m,c,p,x.ub),p+=x.ub,b-=x.ub,x.Rb&&(L.Ld=it(w),L.Kd=it(w)),L=i.Qa;var S,F=i.Pa;if(t(w!=null),t(L!=null),L.Cb=it(w),L.Cb){if(L.Bb=it(w),it(w)){for(L.Fb=it(w),S=0;4>S;++S)L.Zb[S]=it(w)?Q(w,7):0;for(S=0;4>S;++S)L.Lb[S]=it(w)?Q(w,6):0}if(L.Bb)for(S=0;3>S;++S)F.jb[S]=it(w)?ut(w,8):255}else L.Bb=0;if(w.Ka)return Je(i,3,"cannot parse segment header");if((L=i.ed).zd=it(w),L.Tb=ut(w,6),L.wb=ut(w,3),L.Pc=it(w),L.Pc&&it(w)){for(F=0;4>F;++F)it(w)&&(L.vd[F]=Q(w,6));for(F=0;4>F;++F)it(w)&&(L.od[F]=Q(w,6))}if(i.L=L.Tb==0?0:L.zd?1:2,w.Ka)return Je(i,3,"cannot parse filter header");var H=b;if(b=S=p,p=S+H,L=H,i.Xb=(1<L&&(Z=L),at(i.Jc[+H],c,S,Z),S+=Z,L-=Z,b+=3}at(i.Jc[+F],c,S,L),c=SZ;++Z){if(H.Cb){var I=H.Zb[Z];H.Fb||(I+=c)}else{if(0>16,8>W.Eb[1]&&(W.Eb[1]=8),W.Qc[0]=Yo[rn(I+F,117)],W.Qc[1]=Jo[rn(I+S,127)],W.lc=I+S}if(!x.Rb)return Je(i,4,"Not a key frame.");for(it(w),x=i.Pa,c=0;4>c;++c){for(b=0;8>b;++b)for(p=0;3>p;++p)for(L=0;11>L;++L)F=ct(w,al[c][b][p][L])?ut(w,8):nl[c][b][p][L],x.Wc[c][b].Yb[p][L]=F;for(b=0;17>b;++b)x.Xc[c][b]=x.Wc[c][ol[b]]}return i.kc=it(w),i.kc&&(i.Bd=ut(w,8)),i.cb=1}function Ni(i,s,c,p,b,w,x){var L=s[b].Yb[c];for(c=0;16>b;++b){if(!ct(i,L[c+0]))return b;for(;!ct(i,L[c+1]);)if(L=s[++b].Yb[0],c=0,b==16)return 16;var S=s[b+1].Yb;if(ct(i,L[c+2])){var F=i,H=0;if(ct(F,(I=L)[(Z=c)+3]))if(ct(F,I[Z+6])){for(L=0,Z=2*(H=ct(F,I[Z+8]))+(I=ct(F,I[Z+9+H])),H=0,I=el[Z];I[L];++L)H+=H+ct(F,I[L]);H+=3+(8<(F=i).b&&nt(F);var Z,I=F.b,W=(Z=F.Ca>>1)-(F.I>>I)>>31;--F.b,F.Ca+=W,F.Ca|=1,F.I-=(Z+1&W)<>3),i[s+c+32*p]=-256&b?0>b?0:255:b}function Si(i,s,c,p,b,w){_r(i,s,0,c,p+b),_r(i,s,1,c,p+w),_r(i,s,2,c,p-w),_r(i,s,3,c,p-b)}function vn(i){return(20091*i>>16)+i}function ir(i,s,c,p){var b,w=0,x=o(16);for(b=0;4>b;++b){var L=i[s+0]+i[s+8],S=i[s+0]-i[s+8],F=(35468*i[s+4]>>16)-vn(i[s+12]),H=vn(i[s+4])+(35468*i[s+12]>>16);x[w+0]=L+H,x[w+1]=S+F,x[w+2]=S-F,x[w+3]=L-H,w+=4,s++}for(b=w=0;4>b;++b)L=(i=x[w+0]+4)+x[w+8],S=i-x[w+8],F=(35468*x[w+4]>>16)-vn(x[w+12]),_r(c,p,0,0,L+(H=vn(x[w+4])+(35468*x[w+12]>>16))),_r(c,p,1,0,S+F),_r(c,p,2,0,S-F),_r(c,p,3,0,L-H),w++,p+=32}function ja(i,s,c,p){var b=i[s+0]+4,w=35468*i[s+4]>>16,x=vn(i[s+4]),L=35468*i[s+1]>>16;Si(c,p,0,b+x,i=vn(i[s+1]),L),Si(c,p,1,b+w,i,L),Si(c,p,2,b-w,i,L),Si(c,p,3,b-x,i,L)}function So(i,s,c,p,b){ir(i,s,c,p),b&&ir(i,s+16,c,p+4)}function _o(i,s,c,p){An(i,s+0,c,p,1),An(i,s+32,c,p+128,1)}function Po(i,s,c,p){var b;for(i=i[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)_r(c,p,s,b,i)}function an(i,s,c,p){i[s+0]&&fr(i,s+0,c,p),i[s+16]&&fr(i,s+16,c,p+4),i[s+32]&&fr(i,s+32,c,p+128),i[s+48]&&fr(i,s+48,c,p+128+4)}function Ea(i,s,c,p){var b,w=o(16);for(b=0;4>b;++b){var x=i[s+0+b]+i[s+12+b],L=i[s+4+b]+i[s+8+b],S=i[s+4+b]-i[s+8+b],F=i[s+0+b]-i[s+12+b];w[0+b]=x+L,w[8+b]=x-L,w[4+b]=F+S,w[12+b]=F-S}for(b=0;4>b;++b)x=(i=w[0+4*b]+3)+w[3+4*b],L=w[1+4*b]+w[2+4*b],S=w[1+4*b]-w[2+4*b],F=i-w[3+4*b],c[p+0]=x+L>>3,c[p+16]=F+S>>3,c[p+32]=x-L>>3,c[p+48]=F-S>>3,p+=64}function _i(i,s,c){var p,b=s-32,w=Pr,x=255-i[b-1];for(p=0;pc;++c)n(i,s+32*c,i,s-32,16)}function Fo(i,s){var c;for(c=16;0p;++p)a(s,c+32*p,i,16)}function Oa(i,s){var c,p=16;for(c=0;16>c;++c)p+=i[s-1+32*c]+i[s+c-32];In(p>>5,i,s)}function jn(i,s){var c,p=8;for(c=0;16>c;++c)p+=i[s-1+32*c];In(p>>4,i,s)}function Io(i,s){var c,p=8;for(c=0;16>c;++c)p+=i[s+c-32];In(p>>4,i,s)}function Qn(i,s){In(128,i,s)}function Jt(i,s,c){return i+2*s+c+2>>2}function jo(i,s){var c,p=s-32;for(p=new Uint8Array([Jt(i[p-1],i[p+0],i[p+1]),Jt(i[p+0],i[p+1],i[p+2]),Jt(i[p+1],i[p+2],i[p+3]),Jt(i[p+2],i[p+3],i[p+4])]),c=0;4>c;++c)n(i,s+32*c,p,0,p.length)}function Eo(i,s){var c=i[s-1],p=i[s-1+32],b=i[s-1+64],w=i[s-1+96];wt(i,s+0,16843009*Jt(i[s-1-32],c,p)),wt(i,s+32,16843009*Jt(c,p,b)),wt(i,s+64,16843009*Jt(p,b,w)),wt(i,s+96,16843009*Jt(b,w,w))}function Oo(i,s){var c,p=4;for(c=0;4>c;++c)p+=i[s+c-32]+i[s-1+32*c];for(p>>=3,c=0;4>c;++c)a(i,s+32*c,p,4)}function Bo(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1-32],x=i[s+0-32],L=i[s+1-32],S=i[s+2-32],F=i[s+3-32];i[s+0+96]=Jt(p,b,i[s-1+96]),i[s+1+96]=i[s+0+64]=Jt(c,p,b),i[s+2+96]=i[s+1+64]=i[s+0+32]=Jt(w,c,p),i[s+3+96]=i[s+2+64]=i[s+1+32]=i[s+0+0]=Jt(x,w,c),i[s+3+64]=i[s+2+32]=i[s+1+0]=Jt(L,x,w),i[s+3+32]=i[s+2+0]=Jt(S,L,x),i[s+3+0]=Jt(F,S,L)}function Mo(i,s){var c=i[s+1-32],p=i[s+2-32],b=i[s+3-32],w=i[s+4-32],x=i[s+5-32],L=i[s+6-32],S=i[s+7-32];i[s+0+0]=Jt(i[s+0-32],c,p),i[s+1+0]=i[s+0+32]=Jt(c,p,b),i[s+2+0]=i[s+1+32]=i[s+0+64]=Jt(p,b,w),i[s+3+0]=i[s+2+32]=i[s+1+64]=i[s+0+96]=Jt(b,w,x),i[s+3+32]=i[s+2+64]=i[s+1+96]=Jt(w,x,L),i[s+3+64]=i[s+2+96]=Jt(x,L,S),i[s+3+96]=Jt(L,S,S)}function mn(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1-32],x=i[s+0-32],L=i[s+1-32],S=i[s+2-32],F=i[s+3-32];i[s+0+0]=i[s+1+64]=w+x+1>>1,i[s+1+0]=i[s+2+64]=x+L+1>>1,i[s+2+0]=i[s+3+64]=L+S+1>>1,i[s+3+0]=S+F+1>>1,i[s+0+96]=Jt(b,p,c),i[s+0+64]=Jt(p,c,w),i[s+0+32]=i[s+1+96]=Jt(c,w,x),i[s+1+32]=i[s+2+96]=Jt(w,x,L),i[s+2+32]=i[s+3+96]=Jt(x,L,S),i[s+3+32]=Jt(L,S,F)}function bn(i,s){var c=i[s+0-32],p=i[s+1-32],b=i[s+2-32],w=i[s+3-32],x=i[s+4-32],L=i[s+5-32],S=i[s+6-32],F=i[s+7-32];i[s+0+0]=c+p+1>>1,i[s+1+0]=i[s+0+64]=p+b+1>>1,i[s+2+0]=i[s+1+64]=b+w+1>>1,i[s+3+0]=i[s+2+64]=w+x+1>>1,i[s+0+32]=Jt(c,p,b),i[s+1+32]=i[s+0+96]=Jt(p,b,w),i[s+2+32]=i[s+1+96]=Jt(b,w,x),i[s+3+32]=i[s+2+96]=Jt(w,x,L),i[s+3+64]=Jt(x,L,S),i[s+3+96]=Jt(L,S,F)}function Do(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1+96];i[s+0+0]=c+p+1>>1,i[s+2+0]=i[s+0+32]=p+b+1>>1,i[s+2+32]=i[s+0+64]=b+w+1>>1,i[s+1+0]=Jt(c,p,b),i[s+3+0]=i[s+1+32]=Jt(p,b,w),i[s+3+32]=i[s+1+64]=Jt(b,w,w),i[s+3+64]=i[s+2+64]=i[s+0+96]=i[s+1+96]=i[s+2+96]=i[s+3+96]=w}function Ro(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1+96],x=i[s-1-32],L=i[s+0-32],S=i[s+1-32],F=i[s+2-32];i[s+0+0]=i[s+2+32]=c+x+1>>1,i[s+0+32]=i[s+2+64]=p+c+1>>1,i[s+0+64]=i[s+2+96]=b+p+1>>1,i[s+0+96]=w+b+1>>1,i[s+3+0]=Jt(L,S,F),i[s+2+0]=Jt(x,L,S),i[s+1+0]=i[s+3+32]=Jt(c,x,L),i[s+1+32]=i[s+3+64]=Jt(p,c,x),i[s+1+64]=i[s+3+96]=Jt(b,p,c),i[s+1+96]=Jt(w,b,p)}function ki(i,s){var c;for(c=0;8>c;++c)n(i,s+32*c,i,s-32,8)}function na(i,s){var c;for(c=0;8>c;++c)a(i,s,i[s-1],8),s+=32}function on(i,s,c){var p;for(p=0;8>p;++p)a(s,c+32*p,i,8)}function To(i,s){var c,p=8;for(c=0;8>c;++c)p+=i[s+c-32]+i[s-1+32*c];on(p>>4,i,s)}function Ci(i,s){var c,p=4;for(c=0;8>c;++c)p+=i[s+c-32];on(p>>3,i,s)}function qo(i,s){var c,p=4;for(c=0;8>c;++c)p+=i[s-1+32*c];on(p>>3,i,s)}function ia(i,s){on(128,i,s)}function En(i,s,c){var p=i[s-c],b=i[s+0],w=3*(b-p)+zo[1020+i[s-2*c]-i[s+c]],x=Ha[112+(w+4>>3)];i[s-c]=Pr[255+p+Ha[112+(w+3>>3)]],i[s+0]=Pr[255+b-x]}function aa(i,s,c,p){var b=i[s+0],w=i[s+c];return qr[255+i[s-2*c]-i[s-c]]>p||qr[255+w-b]>p}function ti(i,s,c,p){return 4*qr[255+i[s-c]-i[s+0]]+qr[255+i[s-2*c]-i[s+c]]<=p}function oa(i,s,c,p,b){var w=i[s-3*c],x=i[s-2*c],L=i[s-c],S=i[s+0],F=i[s+c],H=i[s+2*c],Z=i[s+3*c];return 4*qr[255+L-S]+qr[255+x-F]>p?0:qr[255+i[s-4*c]-w]<=b&&qr[255+w-x]<=b&&qr[255+x-L]<=b&&qr[255+Z-H]<=b&&qr[255+H-F]<=b&&qr[255+F-S]<=b}function Fi(i,s,c,p){var b=2*p+1;for(p=0;16>p;++p)ti(i,s+p,c,b)&&En(i,s+p,c)}function sa(i,s,c,p){var b=2*p+1;for(p=0;16>p;++p)ti(i,s+p*c,1,b)&&En(i,s+p*c,1)}function Ii(i,s,c,p){var b;for(b=3;0>7,ht=18*ft+63>>7,ft=9*ft+63>>7;S[F-3*H]=Pr[255+S[F-3*H]+ft],S[F-2*H]=Pr[255+Z+ht],S[F-H]=Pr[255+I+$],S[F+0]=Pr[255+W-$],S[F+H]=Pr[255+J-ht],S[F+2*H]=Pr[255+st-ft]}s+=p}}function wn(i,s,c,p,b,w,x,L){for(w=2*w+1;0>3)],st=Ha[112+(st+3>>3)],$=J+1>>1;S[F-2*H]=Pr[255+S[F-2*H]+$],S[F-H]=Pr[255+Z+st],S[F+0]=Pr[255+I-J],S[F+H]=Pr[255+W-$]}s+=p}}function Ma(i,s,c,p,b,w){yn(i,s,c,1,16,p,b,w)}function Da(i,s,c,p,b,w){yn(i,s,1,c,16,p,b,w)}function Ra(i,s,c,p,b,w){var x;for(x=3;0F?0:255:F)&255,F=S,b[w+L]=H}}function Ke(i,s,c,p){var b=s.width,w=s.o;if(t(i!=null&&s!=null),0>c||0>=p||c+p>w)return null;if(!i.Cc){if(i.ga==null){var x;if(i.ga=new It,(x=i.ga==null)||(x=s.width*s.o,t(i.Gb.length==0),i.Gb=o(x),i.Uc=0,i.Gb==null?x=0:(i.mb=i.Gb,i.nb=i.Uc,i.rc=null,x=1),x=!x),!x){x=i.ga;var L=i.Fa,S=i.P,F=i.qc,H=i.mb,Z=i.nb,I=S+1,W=F-1,J=x.l;if(t(L!=null&&H!=null&&s!=null),qn[0]=null,qn[1]=Xt,qn[2]=te,qn[3]=de,x.ca=H,x.tb=Z,x.c=s.width,x.i=s.height,t(0=F)s=0;else if(x.$a=3&L[S+0],x.Z=L[S+0]>>2&3,x.Lc=L[S+0]>>4&3,S=L[S+0]>>6&3,0>x.$a||1=x.c*x.i;x=!s}if(x)return null;i.ga.Lc!=1?i.Ga=0:p=w-c}t(i.ga!=null),t(c+p<=w);t:{if(s=(L=i.ga).c,w=L.l.o,L.$a==0){if(I=i.rc,W=i.Vc,J=i.Fa,S=i.P+1+c*s,F=i.mb,H=i.nb+c*s,t(S<=i.P+i.qc),L.Z!=0)for(t(qn[L.Z]!=null),x=0;x=s)s=1;else if(L.ic||Me(),L.ic){L=x.V,I=x.Ba,W=x.c;var st=x.i,$=(J=1,S=x.$/W,F=x.$%W,H=x.m,Z=x.s,x.$),ht=W*st,ft=W*s,yt=Z.wc,vt=$(st=De(vt.G[0],vt.H[0],H)))L[I+$]=st,++$,++F>=W&&(F=0,++S<=s&&!(S%16)&&Hr(x,S));else{if(!(280>st)){J=0;break e}st=Br(st-256,H);var Mt,kt=De(vt.G[4],vt.H[4],H);if(X(H),!($>=(kt=Mr(W,kt=Br(kt,H)))&&ht-$>=st)){J=0;break e}for(Mt=0;Mt=W;)F-=W,++S<=s&&!(S%16)&&Hr(x,S);$s?s:S);break e}!J||H.h&&$=w&&(i.Cc=1),p=1}if(!p)return null;if(i.Cc&&((p=i.ga)!=null&&(p.mc=null),i.ga=null,0>23,L[S+4*x+1]=L[S+4*x+1]*Z>>23,L[S+4*x+2]=L[S+4*x+2]*Z>>23)}s+=w}}function Ae(i,s,c,p,b){for(;0>4)*S>>16;i[s+2*w+0]=(240&x|x>>4)*S>>16&240|(15&x|x<<4)*S>>16>>4&15,i[s+2*w+1]=240&F|L}s+=b}}function Fe(i,s,c,p,b,w,x,L){var S,F,H=255;for(F=0;F>8}function Me(){ga=Le,zs=Ae,Hs=Fe,Ws=Be}function hr(i,s,c){U[i]=function(p,b,w,x,L,S,F,H,Z,I,W,J,st,$,ht,ft,yt){var vt,Mt=yt-1>>1,kt=L[S+0]|F[H+0]<<16,ne=Z[I+0]|W[J+0]<<16;t(p!=null);var Et=3*kt+ne+131074>>2;for(s(p[b+0],255&Et,Et>>16,st,$),w!=null&&(Et=3*ne+kt+131074>>2,s(w[x+0],255&Et,Et>>16,ht,ft)),vt=1;vt<=Mt;++vt){var ce=L[S+vt]|F[H+vt]<<16,Ze=Z[I+vt]|W[J+vt]<<16,ie=kt+ce+ne+Ze+524296,Ot=ie+2*(ce+ne)>>3;Et=Ot+kt>>1,kt=(ie=ie+2*(kt+Ze)>>3)+ce>>1,s(p[b+2*vt-1],255&Et,Et>>16,st,$+(2*vt-1)*c),s(p[b+2*vt-0],255&kt,kt>>16,st,$+(2*vt-0)*c),w!=null&&(Et=ie+ne>>1,kt=Ot+Ze>>1,s(w[x+2*vt-1],255&Et,Et>>16,ht,ft+(2*vt-1)*c),s(w[x+2*vt+0],255&kt,kt>>16,ht,ft+(2*vt+0)*c)),kt=ce,ne=Ze}1&yt||(Et=3*kt+ne+131074>>2,s(p[b+yt-1],255&Et,Et>>16,st,$+(yt-1)*c),w!=null&&(Et=3*ne+kt+131074>>2,s(w[x+yt-1],255&Et,Et>>16,ht,ft+(yt-1)*c)))}}function xn(){Ur[Wa]=ul,Ur[Va]=eu,Ur[Xs]=hl,Ur[Ga]=ru,Ur[Ya]=nu,Ur[Ho]=iu,Ur[$s]=ll,Ur[Wo]=eu,Ur[Vo]=ru,Ur[Ja]=nu,Ur[Go]=iu}function ua(i){return i&-16384?0>i?0:255:i>>fl}function ri(i,s){return ua((19077*i>>8)+(26149*s>>8)-14234)}function ni(i,s,c){return ua((19077*i>>8)-(6419*s>>8)-(13320*c>>8)+8708)}function On(i,s){return ua((19077*i>>8)+(33050*s>>8)-17685)}function ii(i,s,c,p,b){p[b+0]=ri(i,c),p[b+1]=ni(i,s,c),p[b+2]=On(i,s)}function ji(i,s,c,p,b){p[b+0]=On(i,s),p[b+1]=ni(i,s,c),p[b+2]=ri(i,c)}function Ei(i,s,c,p,b){var w=ni(i,s,c);s=w<<3&224|On(i,s)>>3,p[b+0]=248&ri(i,c)|w>>5,p[b+1]=s}function lr(i,s,c,p,b){var w=240&On(i,s)|15;p[b+0]=240&ri(i,c)|ni(i,s,c)>>4,p[b+1]=w}function ai(i,s,c,p,b){p[b+0]=255,ii(i,s,c,p,b+1)}function oi(i,s,c,p,b){ji(i,s,c,p,b),p[b+3]=255}function ha(i,s,c,p,b){ii(i,s,c,p,b),p[b+3]=255}function sn(i,s,c){U[i]=function(p,b,w,x,L,S,F,H,Z){for(var I=H+(-2&Z)*c;H!=I;)s(p[b+0],w[x+0],L[S+0],F,H),s(p[b+1],w[x+0],L[S+0],F,H+c),b+=2,++x,++S,H+=2*c;1&Z&&s(p[b+0],w[x+0],L[S+0],F,H)}}function mr(i,s,c){return c==0?i==0?s==0?6:5:s==0?4:0:c}function qa(i,s,c,p,b){switch(i>>>30){case 3:An(s,c,p,b,0);break;case 2:Rn(s,c,p,b);break;case 1:fr(s,c,p,b)}}function Oi(i,s){var c,p,b=s.M,w=s.Nb,x=i.oc,L=i.pc+40,S=i.oc,F=i.pc+584,H=i.oc,Z=i.pc+600;for(c=0;16>c;++c)x[L+32*c-1]=129;for(c=0;8>c;++c)S[F+32*c-1]=129,H[Z+32*c-1]=129;for(0c;++c)n(x,L+32*c-4,x,L+32*c+12,4);for(c=-1;8>c;++c)n(S,F+32*c-4,S,F+32*c+4,4),n(H,Z+32*c-4,H,Z+32*c+4,4)}var W=i.Gd,J=i.Hd+p,st=I.ad,$=I.Hc;if(0=i.za-1?a(ht,ft,W[J].y[15],4):n(ht,ft,W[J+1].y,0,4)),c=0;4>c;c++)ht[ft+128+c]=ht[ft+256+c]=ht[ft+384+c]=ht[ft+0+c];for(c=0;16>c;++c,$<<=2)ht=x,ft=L+ou[c],Gr[I.Ob[c]](ht,ft),qa($,st,16*+c,ht,ft)}else if(ht=mr(p,b,I.Ob[0]),Tn[ht](x,L),$!=0)for(c=0;16>c;++c,$<<=2)qa($,st,16*+c,x,L+ou[c]);for(c=I.Gc,ht=mr(p,b,I.Dd),Nn[ht](S,F),Nn[ht](H,Z),$=st,ht=S,ft=F,255&(I=0|c)&&(170&I?Ti($,256,ht,ft):hn($,256,ht,ft)),I=H,$=Z,255&(c>>=8)&&(170&c?Ti(st,320,I,$):hn(st,320,I,$)),bc;++c)n(W,J+c*i.R,x,L+32*c,16);for(c=0;8>c;++c)n(st,I+c*i.B,S,F+32*c,8),n($,ht+c*i.B,H,Z+32*c,8)}}function Ua(i,s,c,p,b,w,x,L,S){var F=[0],H=[0],Z=0,I=S!=null?S.kd:0,W=S??new G;if(i==null||12>c)return 7;W.data=i,W.w=s,W.ha=c,s=[s],c=[c],W.gb=[W.gb];t:{var J=s,st=c,$=W.gb;if(t(i!=null),t(st!=null),t($!=null),$[0]=0,12<=st[0]&&!r(i,J[0],"RIFF")){if(r(i,J[0]+8,"WEBP")){$=3;break t}var ht=Tt(i,J[0]+4);if(12>ht||4294967286st[0]-8){$=7;break t}$[0]=ht,J[0]+=12,st[0]-=12}$=0}if($!=0)return $;for(ht=0$[0])$=7;else{if(!r(ft,st[0],"VP8X")){if(Tt(ft,st[0]+4)!=10){$=3;break t}if(18>$[0]){$=7;break t}var kt=Tt(ft,st[0]+8),ne=1+St(ft,st[0]+12);if(2147483648<=ne*(ft=1+St(ft,st[0]+15))){$=3;break t}Mt!=null&&(Mt[0]=kt),yt!=null&&(yt[0]=ne),vt!=null&&(vt[0]=ft),st[0]+=18,$[0]-=18,Et[0]=1}$=0}}if(Z=Z[0],J=J[0],$!=0)return $;if(st=!!(2&J),!ht&&Z)return 3;if(w!=null&&(w[0]=!!(16&J)),x!=null&&(x[0]=st),L!=null&&(L[0]=0),x=F[0],J=H[0],Z&&st&&S==null){$=0;break}if(4>c){$=7;break}if(ht&&Z||!ht&&!Z&&!r(i,s[0],"ALPH")){c=[c],W.na=[W.na],W.P=[W.P],W.Sa=[W.Sa];t:{kt=i,$=s,ht=c;var Et=W.gb;yt=W.na,vt=W.P,Mt=W.Sa,ne=22,t(kt!=null),t(ht!=null),ft=$[0];var ce=ht[0];for(t(yt!=null),t(Mt!=null),yt[0]=null,vt[0]=null,Mt[0]=0;;){if($[0]=ft,ht[0]=ce,8>ce){$=7;break t}var Ze=Tt(kt,ft+4);if(4294967286Et){$=3;break t}if(!r(kt,ft,"VP8 ")||!r(kt,ft,"VP8L")){$=0;break t}if(ce[0]ht[0])$=7;else{if(ft||ne){if(Et=Tt(Et,kt+4),12<=yt&&Et>yt-12){$=3;break t}if(I&&Et>ht[0]-8){$=7;break t}vt[0]=Et,$[0]+=8,ht[0]-=8,Mt[0]=ne}else Mt[0]=5<=ht[0]&&Et[kt+0]==47&&!(Et[kt+4]>>5),vt[0]=ht[0];$=0}if(c=c[0],W.Ja=W.Ja[0],W.xa=W.xa[0],s=s[0],$!=0)break;if(4294967286c){$=7;break}L=x,I=J,st=w,i==null||5>c?i=0:5<=c&&i[s+0]==47&&!(i[s+4]>>5)?(ht=[0],Et=[0],yt=[0],lt(vt=new O,i,s,c),gn(vt,ht,Et,yt)?(L!=null&&(L[0]=ht[0]),I!=null&&(I[0]=Et[0]),st!=null&&(st[0]=yt[0]),i=1):i=0):i=0}else{if(10>c){$=7;break}L=J,i==null||10>c||!Ia(i,s+3,c-3)?i=0:(I=i[s+0]|i[s+1]<<8|i[s+2]<<16,st=16383&(i[s+7]<<8|i[s+6]),i=16383&(i[s+9]<<8|i[s+8]),1&I||3<(I>>1&7)||!(I>>4&1)||I>>5>=W.Ja||!st||!i?i=0:(x&&(x[0]=st),L&&(L[0]=i),i=1))}if(!i||(x=x[0],J=J[0],Z&&(F[0]!=x||H[0]!=J)))return 3;S!=null&&(S[0]=W,S.offset=s-S.w,t(4294967286>s-S.w),t(S.offset==S.ha-c));break}return $==0||$==7&&Z&&S==null?(w!=null&&(w[0]|=W.na!=null&&0c||(w&=-2,x&=-2),0>w||0>x||0>=L||0>=S||w+L>p||x+S>b))return 0;if(s.v=w,s.j=x,s.va=w+L,s.o=x+S,s.U=L,s.T=S,s.da=i!=null&&0i.S){var s=i.f.RGBA;s.fb+=(i.height-1)*s.A,s.A=-s.A}else s=i.f.kb,i=i.height,s.O+=(i-1)*s.fa,s.fa=-s.fa,s.N+=(i-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(i-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(i-1)*s.lb,s.lb=-s.lb);return 0}function la(i,s,c,p){if(p==null||0>=i||0>=s)return 2;if(c!=null){if(c.Da){var b=c.cd,w=c.bd,x=-2&c.v,L=-2&c.j;if(0>x||0>L||0>=b||0>=w||x+b>i||L+w>s)return 2;i=b,s=w}if(c.da){if(!Ht(i,s,b=[c.ib],w=[c.hb]))return 2;i=b[0],s=w[0]}}p.width=i,p.height=s;t:{var S=p.width,F=p.height;if(i=p.S,0>=S||0>=F||!(i>=Wa&&13>i))i=2;else{if(0>=p.Rd&&p.sd==null){x=w=b=s=0;var H=(L=S*su[i])*F;if(11>i||(w=(F+1)/2*(s=(S+1)/2),i==12&&(x=(b=S)*F)),(F=o(H+2*w+x))==null){i=1;break t}p.sd=F,11>i?((S=p.f.RGBA).eb=F,S.fb=0,S.A=L,S.size=H):((S=p.f.kb).y=F,S.O=0,S.fa=L,S.Fd=H,S.f=F,S.N=0+H,S.Ab=s,S.Cd=w,S.ea=F,S.W=0+H+w,S.Db=s,S.Ed=w,i==12&&(S.F=F,S.J=0+H+2*w),S.Tc=x,S.lb=b)}if(s=1,b=p.S,w=p.width,x=p.height,b>=Wa&&13>b)if(11>b)i=p.f.RGBA,s&=(L=Math.abs(i.A))*(x-1)+w<=i.size,s&=L>=w*su[b],s&=i.eb!=null;else{i=p.f.kb,L=(w+1)/2,H=(x+1)/2,S=Math.abs(i.fa),F=Math.abs(i.Ab);var Z=Math.abs(i.Db),I=Math.abs(i.lb),W=I*(x-1)+w;s&=S*(x-1)+w<=i.Fd,s&=F*(H-1)+L<=i.Cd,s=(s&=Z*(H-1)+L<=i.Ed)&S>=w&F>=L&Z>=L,s&=i.y!=null,s&=i.f!=null,s&=i.ea!=null,b==12&&(s&=I>=w,s&=W<=i.Tc,s&=i.F!=null)}else s=0;i=s?0:2}}return i!=0||c!=null&&c.fd&&(i=si(p)),i}var Bi=64,ui=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],fa=24,br=32,Ar=8,Mi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Ct("Predictor0","PredictorAdd0"),U.Predictor0=function(){return 4278190080},U.Predictor1=function(i){return i},U.Predictor2=function(i,s,c){return s[c+0]},U.Predictor3=function(i,s,c){return s[c+1]},U.Predictor4=function(i,s,c){return s[c-1]},U.Predictor5=function(i,s,c){return qt(qt(i,s[c+1]),s[c+0])},U.Predictor6=function(i,s,c){return qt(i,s[c-1])},U.Predictor7=function(i,s,c){return qt(i,s[c+0])},U.Predictor8=function(i,s,c){return qt(s[c-1],s[c+0])},U.Predictor9=function(i,s,c){return qt(s[c+0],s[c+1])},U.Predictor10=function(i,s,c){return qt(qt(i,s[c-1]),qt(s[c+0],s[c+1]))},U.Predictor11=function(i,s,c){var p=s[c+0];return 0>=Zt(p>>24&255,i>>24&255,(s=s[c-1])>>24&255)+Zt(p>>16&255,i>>16&255,s>>16&255)+Zt(p>>8&255,i>>8&255,s>>8&255)+Zt(255&p,255&i,255&s)?p:i},U.Predictor12=function(i,s,c){var p=s[c+0];return(me((i>>24&255)+(p>>24&255)-((s=s[c-1])>>24&255))<<24|me((i>>16&255)+(p>>16&255)-(s>>16&255))<<16|me((i>>8&255)+(p>>8&255)-(s>>8&255))<<8|me((255&i)+(255&p)-(255&s)))>>>0},U.Predictor13=function(i,s,c){var p=s[c-1];return(he((i=qt(i,s[c+0]))>>24&255,p>>24&255)<<24|he(i>>16&255,p>>16&255)<<16|he(i>>8&255,p>>8&255)<<8|he(255&i,255&p))>>>0};var Bn=U.PredictorAdd0;U.PredictorAdd1=fe,Ct("Predictor2","PredictorAdd2"),Ct("Predictor3","PredictorAdd3"),Ct("Predictor4","PredictorAdd4"),Ct("Predictor5","PredictorAdd5"),Ct("Predictor6","PredictorAdd6"),Ct("Predictor7","PredictorAdd7"),Ct("Predictor8","PredictorAdd8"),Ct("Predictor9","PredictorAdd9"),Ct("Predictor10","PredictorAdd10"),Ct("Predictor11","PredictorAdd11"),Ct("Predictor12","PredictorAdd12"),Ct("Predictor13","PredictorAdd13");var Mn=U.PredictorAdd2;Dt("ColorIndexInverseTransform","MapARGB","32b",function(i){return i>>8&255},function(i){return i}),Dt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(i){return i},function(i){return i>>8&255});var Di,hi=U.ColorIndexInverseTransform,Xe=U.MapARGB,Uo=U.VP8LColorIndexInverseTransformAlpha,un=U.MapAlpha,Vr=U.VP8LPredictorsAdd=[];Vr.length=16,(U.VP8LPredictors=[]).length=16,(U.VP8LPredictorsAdd_C=[]).length=16,(U.VP8LPredictors_C=[]).length=16;var li,ca,da,Ri,fi,ci,Dn,An,Rn,Ti,fr,hn,Pe,ke,ze,$e,Ln,pa,qi,za,Rs,Ts,qs,Us,ga,zs,Hs,Ws,Vs=o(511),Gs=o(2041),Ys=o(225),Js=o(767),Ks=0,zo=Gs,Ha=Ys,Pr=Js,qr=Vs,Wa=0,Va=1,Xs=2,Ga=3,Ya=4,Ho=5,$s=6,Wo=7,Vo=8,Ja=9,Go=10,Jh=[2,3,7],Kh=[3,3,11],Zs=[280,256,256,256,40],Xh=[0,1,1,1,0],$h=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zh=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Qh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],tl=8,Yo=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Jo=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],va=null,el=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],rl=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Qs=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],nl=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],il=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],al=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ol=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Tn=[],Gr=[],Nn=[],sl=1,tu=2,qn=[],Ur=[];hr("UpsampleRgbLinePair",ii,3),hr("UpsampleBgrLinePair",ji,3),hr("UpsampleRgbaLinePair",ha,4),hr("UpsampleBgraLinePair",oi,4),hr("UpsampleArgbLinePair",ai,4),hr("UpsampleRgba4444LinePair",lr,2),hr("UpsampleRgb565LinePair",Ei,2);var ul=U.UpsampleRgbLinePair,hl=U.UpsampleBgrLinePair,eu=U.UpsampleRgbaLinePair,ru=U.UpsampleBgraLinePair,nu=U.UpsampleArgbLinePair,iu=U.UpsampleRgba4444LinePair,ll=U.UpsampleRgb565LinePair,Ka=16,Xa=1<p.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),p.ca.f.kb.F!=null&&Me()),p.Pb&&0(S=c.Md)?0:100F;++F)12>(Z=b.pb[F]).lc&&(Z.ia=S*bl[0>Z.lc?0:Z.lc]>>3),H|=Z.ia;H&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=c.Id,100b.Ga&&(b.Ga=0)}(function(I,W){if(I==null)return 0;if(W==null)return Je(I,2,"NULL VP8Io parameter in VP8Decode().");if(!I.cb&&!nn(I,W))return 0;if(t(I.cb),W.ac==null||W.ac(W)){W.ob&&(I.L=0);var J=$a[I.L];if(I.L==2?(I.yb=0,I.zb=0):(I.yb=W.v-J>>4,I.zb=W.j-J>>4,0>I.yb&&(I.yb=0),0>I.zb&&(I.zb=0)),I.Va=W.o+15+J>>4,I.Hb=W.va+15+J>>4,I.Hb>I.za&&(I.Hb=I.za),I.Va>I.Ub&&(I.Va=I.Ub),0J;++J){var $;if(I.Qa.Cb){var ht=I.Qa.Lb[J];I.Qa.Fb||(ht+=st.Tb)}else ht=st.Tb;for($=0;1>=$;++$){var ft=I.gd[J][$],yt=ht;if(st.Pc&&(yt+=st.vd[0],$&&(yt+=st.od[0])),0<(yt=0>yt?0:63>2:vt>>1)>9-st.wb&&(vt=9-st.wb),1>vt&&(vt=1),ft.dd=vt,ft.tc=2*yt+vt,ft.ld=40<=yt?2:15<=yt?1:0}else ft.tc=0;ft.La=$}}}J=0}else Je(I,6,"Frame setup failed"),J=I.a;if(J=J==0){if(J){I.$c=0,0I.Vb){if(I.Vb=0,I.Ec=o(ft),I.Fc=0,I.Ec==null){J=Je(I,1,"no memory during frame initialization.");break e}I.Vb=ft}ft=I.Ec,yt=I.Fc,I.Ac=ft,I.Bc=yt,yt+=st,I.Gd=f(Mt,Ca),I.Hd=0,I.rb=f(kt+1,Qi),I.sb=1,I.wa=ne?f(ne,Rr):null,I.Y=0,I.D.Nb=0,I.D.wa=I.wa,I.D.Y=I.Y,0=J;++J)Vs[255+J]=0>J?-J:J;for(J=-1020;1020>=J;++J)Gs[1020+J]=-128>J?-128:127=J;++J)Ys[112+J]=-16>J?-16:15=J;++J)Js[255+J]=0>J?0:255pe;++pe){var Qe,ve=yr[0+pe];for(Qe=0;4>Qe;++Qe){ve=il[Ie[ar+Qe]][ve];for(var ye=Qs[ct(ee,ve[0])];0>3;for(ye=0;256>ye;ye+=16)pe[cr+ye]=Lr}or=1,Yr=ar[0]}var Ne=15&ee.la,tr=15&wr.la;for(ye=0;4>ye;++ye){var kr=1&tr;for(Lr=we=0;4>Lr;++Lr)Ne=Ne>>1|(kr=(We=va(Ie,Yr,We=kr+(1&Ne),Re.Sc,or,pe,cr))>or)<<7,we=we<<2|(3>=4,tr=tr>>1|kr<<7,Qe=(Qe<<8|we)>>>0}for(Yr=Ne,or=tr>>4,Te=0;4>Te;Te+=2){for(we=0,Ne=ee.la>>4+Te,tr=wr.la>>4+Te,ye=0;2>ye;++ye){for(kr=1&tr,Lr=0;2>Lr;++Lr)We=kr+(1&Ne),Ne=Ne>>1|(kr=0<(We=va(Ie,ar[2],We,Re.Qc,0,pe,cr)))<<3,we=we<<2|(3>=2,tr=tr>>1|kr<<5}ve|=we<<4*Te,Yr|=Ne<<4<=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(ie.M=Ot.M,ie.uc=ee,Oi(Ot,ie),He=1,ie=(we=Ot.D).Nb,ee=(ve=$a[Ot.L])*Ot.R,Ie=ve/2*Ot.B,ye=16*ie*Ot.R,Lr=8*ie*Ot.B,ar=Ot.sa,yr=Ot.ta-ee+ye,Re=Ot.qa,pe=Ot.ra-Ie+Lr,cr=Ot.Ha,wr=Ot.Ia-Ie+Lr,tr=(Ne=we.M)==0,Qe=Ne>=Ot.Va-1,Ot.Aa==2&&Oi(Ot,we),we.uc)for(kr=(We=Ot).D.M,t(We.D.uc),we=We.yb;weLt.o&&(Ne=Lt.o),Lt.F=null,Lt.J=null,Ot.Fa!=null&&0>1),Lt.W+=Ot.B*(ve>>1),Lt.F!=null&&(Lt.J+=Lt.width*ve)),we>1,Lt.W+=Lt.v>>1,Lt.F!=null&&(Lt.J+=Lt.v),Lt.ka=we-Lt.j,Lt.U=Lt.va-Lt.v,Lt.T=Ne-we,He=Lt.put(Lt))}ie+1!=Ot.Ic||Qe||(n(Ot.sa,Ot.ta-ee,ar,yr+16*Ot.R,ee),n(Ot.qa,Ot.ra-Ie,Re,pe+8*Ot.B,Ie),n(Ot.Ha,Ot.Ia-Ie,cr,wr+8*Ot.B,Ie))}if(!He)return Je(ce,6,"Output aborted.")}return 1})(I,W)),W.bc!=null&&W.bc(W),J&=1}return J?(I.cb=0,J):0})(i,p)||(s=i.a)}}else s=i.a}s==0&&x.Oa!=null&&x.Oa.fd&&(s=si(x.ba))}x=s}w=x!=0?null:11>w?L.f.RGBA.eb:L.f.kb.y}else w=null;return w};var su=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(U,dt){for(var _="",E=0;E<4;E++)_+=String.fromCharCode(U[dt++]);return _}function v(U,dt){return U[dt+0]|U[dt+1]<<8}function y(U,dt){return(U[dt+0]|U[dt+1]<<8|U[dt+2]<<16)>>>0}function N(U,dt){return(U[dt+0]|U[dt+1]<<8|U[dt+2]<<16|U[dt+3]<<24)>>>0}new h;var g=[0],B=[0],j=[],M=new h,C=e,Y=(function(U,dt){var _={},E=0,q=!1,T=0,rt=0;if(_.frames=[],!(function(A,O){for(var D=0;D<4;D++)if(A[O+D]!="RIFF".charCodeAt(D))return!0;return!1})(U,dt)){for(N(U,dt+=4),dt+=8;dt>1&1}at!="ANMF"&&(dt+=Q)}return _}})(C,0);Y.response=C,Y.rgbaoutput=!0,Y.dataurl=!1;var K=Y.header?Y.header:null,tt=Y.frames?Y.frames:null;if(K){K.loop_counter=K.loop_count,g=[K.canvas_height],B=[K.canvas_width];for(var gt=0;gt'+r.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")+"",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function Vf(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(e){var t,r,n,a,o,f,u,h,d,v=function(A){return A=A||{},this.isStrokeTransparent=A.isStrokeTransparent||!1,this.strokeOpacity=A.strokeOpacity||1,this.strokeStyle=A.strokeStyle||"#000000",this.fillStyle=A.fillStyle||"#000000",this.isFillTransparent=A.isFillTransparent||!1,this.fillOpacity=A.fillOpacity||1,this.font=A.font||"10px sans-serif",this.textBaseline=A.textBaseline||"alphabetic",this.textAlign=A.textAlign||"left",this.lineWidth=A.lineWidth||1,this.lineJoin=A.lineJoin||"miter",this.lineCap=A.lineCap||"butt",this.path=A.path||[],this.transform=A.transform!==void 0?A.transform.clone():new h,this.globalCompositeOperation=A.globalCompositeOperation||"normal",this.globalAlpha=A.globalAlpha||1,this.clip_path=A.clip_path||[],this.currentPoint=A.currentPoint||new f,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new f,this.lineDashOffset=A.lineDashOffset||0,this.lineDash=A.lineDash||[],this.margin=A.margin||[0,0,0,0],this.prevPageLastElemOffset=A.prevPageLastElemOffset||0,this.ignoreClearRect=typeof A.ignoreClearRect!="boolean"||A.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new y(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,f=this.internal.Point,u=this.internal.Rectangle,h=this.internal.Matrix,d=new v}]);var y=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var O=A;Object.defineProperty(this,"pdf",{get:function(){return O}});var D=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return D},set:function(P){D=!!P}});var z=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return z},set:function(P){z=!!P}});var V=0;Object.defineProperty(this,"posX",{get:function(){return V},set:function(P){isNaN(P)||(V=P)}});var X=0;Object.defineProperty(this,"posY",{get:function(){return X},set:function(P){isNaN(P)||(X=P)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(P){var Nt;typeof P=="number"?Nt=[P,P,P,P]:((Nt=new Array(4))[0]=P[0],Nt[1]=P.length>=2?P[1]:Nt[0],Nt[2]=P.length>=3?P[2]:Nt[0],Nt[3]=P.length>=4?P[3]:Nt[1]),d.margin=Nt}});var nt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return nt},set:function(P){nt=P}});var it=0;Object.defineProperty(this,"lastBreak",{get:function(){return it},set:function(P){it=P}});var ct=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ct},set:function(P){ct=P}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(P){P instanceof v&&(d=P)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(P){d.path=P}});var wt=[];Object.defineProperty(this,"ctxStack",{get:function(){return wt},set:function(P){wt=P}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(P){var Nt;Nt=N(P),this.ctx.fillStyle=Nt.style,this.ctx.isFillTransparent=Nt.a===0,this.ctx.fillOpacity=Nt.a,this.pdf.setFillColor(Nt.r,Nt.g,Nt.b,{a:Nt.a}),this.pdf.setTextColor(Nt.r,Nt.g,Nt.b,{a:Nt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(P){var Nt=N(P);this.ctx.strokeStyle=Nt.style,this.ctx.isStrokeTransparent=Nt.a===0,this.ctx.strokeOpacity=Nt.a,Nt.a===0?this.pdf.setDrawColor(255,255,255):(Nt.a,this.pdf.setDrawColor(Nt.r,Nt.g,Nt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(P){["butt","round","square"].indexOf(P)!==-1&&(this.ctx.lineCap=P,this.pdf.setLineCap(P))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(P){isNaN(P)||(this.ctx.lineWidth=P,this.pdf.setLineWidth(P))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(P){["bevel","round","miter"].indexOf(P)!==-1&&(this.ctx.lineJoin=P,this.pdf.setLineJoin(P))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(P){isNaN(P)||(this.ctx.miterLimit=P,this.pdf.setMiterLimit(P))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(P){this.ctx.textBaseline=P}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(P){["right","end","center","left","start"].indexOf(P)!==-1&&(this.ctx.textAlign=P)}});var _t=null,St=null,Tt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Tt},set:function(P){_t=null,St=null,Tt=P}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(P){var Nt;if(this.ctx.font=P,(Nt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(P))!==null){var ae=Nt[1];Nt[2];var Ht=Nt[3],bt=Nt[4];Nt[5];var Wt=Nt[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(bt)[2];bt=Math.floor(Ct==="px"?parseFloat(bt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(bt)*this.pdf.getFontSize():parseFloat(bt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(bt);var zt=(function(Dt){var Ue,ge,oe=[],se=Dt.trim();if(se==="")return gs;if(se in qu)return[qu[se]];for(;se!=="";){switch(ge=null,Ue=(se=zu(se)).charAt(0)){case'"':case"'":ge=Rf(se.substring(1),Ue);break;default:ge=Tf(se)}if(ge===null||(oe.push(ge[0]),(se=zu(ge[1]))!==""&&se.charAt(0)!==","))return gs;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var qt=(function(Dt,Ue){var ge=Dt.getFontList(),oe=JSON.stringify(ge);if(_t===null||St!==oe){var se=(function(Ee){var Ut=[];return Object.keys(Ee).forEach(function(_e){Ee[_e].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:_e,weight:"bold"};break;case"italic":Qt={family:_e,style:"italic"};break;case"bolditalic":Qt={family:_e,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:_e}}Qt!==null&&(Qt.ref={name:_e,style:Yt},Ut.push(Qt))})}),Ut})(ge);_t=(function(Ee){for(var Ut={},_e=0;_e=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var fe="",le={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Bt=0;Bt=2*Math.PI&&(z=0,V=2*Math.PI),this.path.push({type:"arc",x:A,y:O,radius:D,startAngle:z,endAngle:V,counterclockwise:X})},y.prototype.arcTo=function(A,O,D,z,V){throw new Error("arcTo not implemented.")},y.prototype.rect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,O),this.lineTo(A+D,O),this.lineTo(A+D,O+z),this.lineTo(A,O+z),this.lineTo(A,O),this.lineTo(A+D,O),this.lineTo(A,O)},y.prototype.fillRect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var V={};this.lineCap!=="butt"&&(V.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(V.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,O,D,z),this.fill(),V.hasOwnProperty("lineCap")&&(this.lineCap=V.lineCap),V.hasOwnProperty("lineJoin")&&(this.lineJoin=V.lineJoin)}},y.prototype.strokeRect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(A,O,D,z),this.stroke())},y.prototype.clearRect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,O,D,z))},y.prototype.save=function(A){A=typeof A!="boolean"||A;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,D=0;D0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};y.prototype.drawImage=function(A,O,D,z,V,X,nt,it,ct){var wt=this.pdf.getImageProperties(A),_t=1,St=1,Tt=1,P=1;z!==void 0&&it!==void 0&&(Tt=it/z,P=ct/V,_t=wt.width/z*it/z,St=wt.height/V*ct/V),X===void 0&&(X=O,nt=D,O=0,D=0),z!==void 0&&it===void 0&&(it=z,ct=V),z===void 0&&it===void 0&&(it=wt.width,ct=wt.height);var Nt=this.ctx.transform.decompose(),ae=Q(Nt.rotate.shx),Ht=new h,bt=(Ht=(Ht=(Ht=Ht.multiply(Nt.translate)).multiply(Nt.skew)).multiply(Nt.scale)).applyToRectangle(new u(X-O*Tt,nt-D*P,z*_t,V*St));if(this.autoPaging){for(var Wt,Ct=M.call(this,bt),zt=[],qt=0;qtme||Ztbt||Ct0)){for(;ct>=0;ct--)if(V[ct-1].close!==!0&&V[ct-1].begin!==!0){V[ct-1].deltas.push(D),V[ct-1].abs.push(it);break}}break;case"bct":D=[it.x1-X[nt-1].x,it.y1-X[nt-1].y,it.x2-X[nt-1].x,it.y2-X[nt-1].y,it.x-X[nt-1].x,it.y-X[nt-1].y],V[V.length-1].deltas.push(D);break;case"qct":var wt=X[nt-1].x+2/3*(it.x1-X[nt-1].x),_t=X[nt-1].y+2/3*(it.y1-X[nt-1].y),St=it.x+2/3*(it.x1-it.x),Tt=it.y+2/3*(it.y1-it.y),P=it.x,Nt=it.y;D=[wt-X[nt-1].x,_t-X[nt-1].y,St-X[nt-1].x,Tt-X[nt-1].y,P-X[nt-1].x,Nt-X[nt-1].y],V[V.length-1].deltas.push(D);break;case"arc":V.push({deltas:[],abs:[],arc:!0}),Array.isArray(V[V.length-1].abs)&&V[V.length-1].abs.push(it)}}z=O?null:A==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*A.scale),V=this.lineWidth,this.lineWidth=V*A.scale);var re=this.autoPaging!=="text";if(re||Bt.y+Bt.h<=qt){if(re||Bt.y>=Ct&&Bt.x<=he){var Dt=re?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||he-Bt.x)[0],Ue=Y([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-fe+Ct+this.ctx.prevPageLastElemOffset)[0],ge=re&&(Wt>Ht||Wt=.01&&(this.pdf.setFontSize(z),this.lineWidth=V)}}else A.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*A.scale),V=this.lineWidth,this.lineWidth=V*A.scale),this.pdf.text(A.text,ct.x+this.posX,ct.y+this.posY,{angle:A.angle,align:O,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=V)},q=function(A,O,D,z){D=D||0,z=z||0,this.pdf.internal.out(r(A+D)+" "+n(O+z)+" l")},T=function(A,O,D){return this.pdf.lines(A,O,D,null,null)},rt=function(A,O,D,z,V,X,nt,it){this.pdf.internal.out([t(a(D+A)),t(o(z+O)),t(a(V+A)),t(o(X+O)),t(a(nt+A)),t(o(it+O)),"c"].join(" "))},at=function(A,O,D,z){for(var V=2*Math.PI,X=Math.PI/2;O>D;)O-=V;var nt=Math.abs(D-O);nt1e-5;){var _t=wt+ct*Math.min(nt,X);it.push(ut.call(this,A,wt,_t)),nt-=Math.abs(_t-wt),wt=_t}return it},ut=function(A,O,D){var z=(D-O)/2,V=A*Math.cos(z),X=A*Math.sin(z),nt=V,it=-X,ct=nt*nt+it*it,wt=ct+nt*V+it*X,_t=4/3*(Math.sqrt(2*ct*wt)-wt)/(nt*X-it*V),St=nt-_t*it,Tt=it+_t*nt,P=St,Nt=-Tt,ae=z+O,Ht=Math.cos(ae),bt=Math.sin(ae);return{x1:A*Math.cos(O),y1:A*Math.sin(O),x2:St*Ht-Tt*bt,y2:St*bt+Tt*Ht,x3:P*Ht-Nt*bt,y3:P*bt+Nt*Ht,x4:A*Math.cos(D),y4:A*Math.sin(D)}},Q=function(A){return 180*A/Math.PI},lt=function(A,O,D,z,V,X){var nt=A+.5*(D-A),it=O+.5*(z-O),ct=V+.5*(D-V),wt=X+.5*(z-X),_t=Math.min(A,V,nt,ct),St=Math.max(A,V,nt,ct),Tt=Math.min(O,X,it,wt),P=Math.max(O,X,it,wt);return new u(_t,Tt,St-_t,P-Tt)},At=function(A,O,D,z,V,X,nt,it){var ct,wt,_t,St,Tt,P,Nt,ae,Ht,bt,Wt,Ct,zt,qt,me=D-A,he=z-O,Zt=V-D,fe=X-z,le=nt-V,Bt=it-X;for(wt=0;wt<41;wt++)Ht=(Nt=(_t=A+(ct=wt/40)*me)+ct*((Tt=D+ct*Zt)-_t))+ct*(Tt+ct*(V+ct*le-Tt)-Nt),bt=(ae=(St=O+ct*he)+ct*((P=z+ct*fe)-St))+ct*(P+ct*(X+ct*Bt-P)-ae),wt==0?(Wt=Ht,Ct=bt,zt=Ht,qt=bt):(Wt=Math.min(Wt,Ht),Ct=Math.min(Ct,bt),zt=Math.max(zt,Ht),qt=Math.max(qt,bt));return new u(Math.round(Wt),Math.round(Ct),Math.round(zt-Wt),Math.round(qt-Ct))},mt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,O,D=(A=this.ctx.lineDash,O=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:O}));this.prevLineDash!==D&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=D)}}})(Rt.API),(function(e){var t=function(f){var u,h,d,v,y,N,g,B,j,M;for(h=[],d=0,v=(f+=u="\0\0\0\0".slice(f.length%4||4)).length;v>d;d+=4)(y=(f.charCodeAt(d)<<24)+(f.charCodeAt(d+1)<<16)+(f.charCodeAt(d+2)<<8)+f.charCodeAt(d+3))!==0?(N=(y=((y=((y=((y=(y-(M=y%85))/85)-(j=y%85))/85)-(B=y%85))/85)-(g=y%85))/85)%85,h.push(N+33,g+33,B+33,j+33,M+33)):h.push(122);return(function(C,Y){for(var K=Y;K>0;K--)C.pop()})(h,u.length),String.fromCharCode.apply(String,h)+"~>"},r=function(f){var u,h,d,v,y,N=String,g="length",B=255,j="charCodeAt",M="slice",C="replace";for(f[M](-2),f=f[M](0,-2)[C](/\s/g,"")[C]("z","!!!!!"),d=[],v=0,y=(f+=u="uuuuu"[M](f[g]%5||5))[g];y>v;v+=5)h=52200625*(f[j](v)-33)+614125*(f[j](v+1)-33)+7225*(f[j](v+2)-33)+85*(f[j](v+3)-33)+(f[j](v+4)-33),d.push(B&h>>24,B&h>>16,B&h>>8,B&h);return(function(Y,K){for(var tt=K;tt>0;tt--)Y.pop()})(d,u[g]),N.fromCharCode.apply(N,d)},n=function(f){return f.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(f){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),u.test(f)===!1)return"";for(var h="",d=0;dimport("./html2canvas.esm-B0tyYwQk.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function r(){return(Kt.DOMPurify?Promise.resolve(Kt.DOMPurify):is(()=>import("./purify.es-BgtpMKW3.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load dompurify: "+u))}).then(function(u){return u.default?u.default:u})}var n=function(u){var h=xe(u);return h==="undefined"?"undefined":h==="string"||u instanceof String?"string":h==="number"||u instanceof Number?"number":h==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":h==="object"?"object":"unknown"},a=function(u,h){var d=document.createElement(u);for(var v in h.className&&(d.className=h.className),h.innerHTML&&h.dompurify&&(d.innerHTML=h.dompurify.sanitize(h.innerHTML)),h.style)d.style[v]=h.style[v];return d},o=function u(h,d){for(var v=h.nodeType===3?document.createTextNode(h.nodeValue):h.cloneNode(!1),y=h.firstChild;y;y=y.nextSibling)d!==!0&&y.nodeType===1&&y.nodeName==="SCRIPT"||v.appendChild(u(y,d));return h.nodeType===1&&(h.nodeName==="CANVAS"?(v.width=h.width,v.height=h.height,v.getContext("2d").drawImage(h,0,0)):h.nodeName!=="TEXTAREA"&&h.nodeName!=="SELECT"||(v.value=h.value),v.addEventListener("load",function(){v.scrollTop=h.scrollTop,v.scrollLeft=h.scrollLeft},!0)),v},f=function u(h){var d=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),v=u.convert(Promise.resolve(),d);return(v=v.setProgress(1,u,1,[u])).set(h)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(u,h){return u.__proto__=h||f.prototype,u},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(u,h){return this.then(function(){switch(h=h||(function(d){switch(n(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(u),h){case"string":return this.then(r).then(function(d){return this.set({src:a("div",{innerHTML:u,dompurify:d})})});case"element":return this.set({src:u});case"canvas":return this.set({canvas:u});case"img":return this.set({img:u});default:return this.error("Unknown source type.")}})},f.prototype.to=function(u){switch(u){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var u={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},h=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);h.tagName==="BODY"&&(u.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:u}),this.prop.container.appendChild(h),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,h(this.prop.container,d)}).then(function(h){(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var d=this.opt.jsPDF,v=this.opt.fontFaces,y=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,N=Object.assign({async:!0,allowTaint:!0,scale:y,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete N.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=v,v)for(var g=0;gj&&(B=M,M=j,j=B);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",j>M&&(B=M,M=j,j=B)}return{width:M,height:j,unit:h,k:y,orientation:u}},e.html=function(u,h){(h=h||{}).callback=h.callback||function(){},h.html2canvas=h.html2canvas||{},h.html2canvas.canvas=h.html2canvas.canvas||this.canvas,h.jsPDF=h.jsPDF||this,h.fontFaces=h.fontFaces?h.fontFaces.map(ps):null;var d=new f(h);return h.worker?d:d.from(u).doCallback()}})(Rt.API),Rt.API.addJS=function(e){var t,r,n=(function(a){for(var o="",f=0;f=0&&a[d]==="\\";d--)h++;o+=h%2==0?"\\"+u:u}else o+=u}return o})(e);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&r!==void 0&&this.internal.out("/Names <>")}),this},(function(e){var t;e.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=r.outline.render().split(/\r\n/),o=0;o> endobj")}var g=r.internal.newObject();for(r.internal.write("<< /Names [ "),o=0;o>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+g+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var r=this;r.outline.root.children.length>0&&(r.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&r.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,a,o){var f={title:a,options:o,children:[]};return n==null&&(n=this.root),n.children.push(f),f},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var a=0;a0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,o=0;o0&&this.line("/Prev "+this.makeRef(n.children[o-1])),o0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var u=this.count=this.count_r({count:0},f);if(u>0&&this.line("/Count "+u),f.options&&f.options.pageNumber){var h=r.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+h.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var d=0;d> \r endobj\r `},r.outline.count_r=function(n,a){for(var o=0;o1){T=!0,at=void 0;var V=U*dt;ut=new Uint8Array(V);for(var X=new DataView(_.buffer),nt=0;nt536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[e]()}catch(r){Se.log("bit decode error:"+r)}},Kr.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a>7-u&1];this.data[f+4*u]=h.blue,this.data[f+4*u+1]=h.green,this.data[f+4*u+2]=h.red,this.data[f+4*u+3]=255}r!==0&&(this.pos+=4-r)}},Kr.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a>4,h=15&o,d=this.palette[u];if(this.data[f]=d.blue,this.data[f+1]=d.green,this.data[f+2]=d.red,this.data[f+3]=255,2*a+1>=this.width)break;d=this.palette[h],this.data[f+4]=d.blue,this.data[f+4+1]=d.green,this.data[f+4+2]=d.red,this.data[f+4+3]=255}t!==0&&(this.pos+=4-t)}},Kr.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a>5&t)/t*255|0,h=(o>>10&t)/t*255|0,d=o>>15?255:0,v=n*this.width*4+4*a;this.data[v]=h,this.data[v+1]=u,this.data[v+2]=f,this.data[v+3]=d}this.pos+=e}},Kr.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,o=0;o>5&r)/r*255|0,d=(f>>11)/t*255|0,v=a*this.width*4+4*o;this.data[v]=d,this.data[v+1]=h,this.data[v+2]=u,this.data[v+3]=255}this.pos+=e}},Kr.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;rn&&(a.push(e.slice(h,o)),u=0,h=o),u+=t[o],o++;return h!==o&&a.push(e.slice(h,o)),a},Vu=function(e,t,r){r||(r={});var n,a,o,f,u,h,d,v=[],y=[v],N=r.textIndent||0,g=0,B=0,j=e.split(" "),M=uo.apply(this,[" ",r])[0];if(h=r.lineIndent===-1?j[0].length+2:r.lineIndent||0){var C=Array(h).join(" "),Y=[];j.map(function(tt){(tt=tt.split(/\s*\n/)).length>1?Y=Y.concat(tt.map(function(gt,xt){return(xt&>.length?` `:"")+gt})):Y.push(tt[0])}),j=Y,h=Hu.apply(this,[C,r])}for(o=0,f=j.length;ot||K){if(B>t){for(u=Wu.apply(this,[n,a,t-(N+g),t]),v.push(u.shift()),v=[u.pop()];u.length;)y.push([u.shift()]);B=a.slice(n.length-(v[0]?v[0].length:0)).reduce(function(tt,gt){return tt+gt},0)}else v=[n];y.push(v),N=B+h,g=M}else v.push(n),N+=g+B,g=M}return d=h?function(tt,gt){return(gt?C:"")+tt.join(" ")}:function(tt){return tt.join(" ")},y.map(d)},Hi.splitTextToSize=function(e,t,r){var n,a=(r=r||{}).fontSize||this.internal.getFontSize(),o=function(v){if(v.widths&&v.kerning)return{widths:v.widths,kerning:v.kerning};var y=this.internal.getFont(v.fontName,v.fontStyle),N="Unicode";return y.metadata[N]?{widths:y.metadata[N].widths||{0:1},kerning:y.metadata[N].kerning||{}}:{font:y.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/a;o.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/a:0,o.lineIndent=r.lineIndent;var u,h,d=[];for(u=0,h=n.length;uimport("./index.es-FRV-O2Jm.js"),__vite__mapDeps([0,1,2,3,4]))).catch(function(N){return Promise.reject(new Error("Could not load canvg: "+N))}).then(function(N){return N.default?N.default:N}).then(function(N){return N.fromString(d,e,v)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(N){return N.render(v)}).then(function(){y.addImage(h.toDataURL("image/jpeg",1),t,r,n,a,f,u)})},Rt.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a1){for(v=0;v>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},Rt.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",Vf),this.internal.events.subscribe("postPutResources",Wf)),this},(function(e){var t=e.API,r=t.pdfEscape16=function(o,f){for(var u,h=f.metadata.Unicode.widths,d=["","0","00","000","0000"],v=[""],y=0,N=o.length;y> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange`,h=[],y=0,N=(u=Object.keys(o).sort(function(g,B){return g-B})).length;y=100&&(v+=` `+h.length+` beginbfchar `+h.join(` `)+` endbfchar`,h=[]),o[f]!==void 0&&o[f]!==null&&typeof o[f].toString=="function"&&(d=("0000"+o[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),h.push("<"+f+"><"+d+">"));return h.length&&(v+=` `+h.length+` beginbfchar `+h.join(` `)+` endbfchar `),v+`endcmap CMapName currentdict /CMap defineresource pop end end`};t.events.push(["putFont",function(o){(function(f){var u=f.font,h=f.out,d=f.newObject,v=f.putStream;if(u.metadata instanceof e.API.TTFFont&&u.encoding==="Identity-H"){for(var y=u.metadata.Unicode.widths,N=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),g="",B=0;B>"),h("endobj");var Y=d();h("<<"),h("/Type /Font"),h("/BaseFont /"+Vi(u.fontName)),h("/FontDescriptor "+C+" 0 R"),h("/W "+e.API.PDFObject.convert(y)),h("/CIDToGIDMap /Identity"),h("/DW 1000"),h("/Subtype /CIDFontType2"),h("/CIDSystemInfo"),h("<<"),h("/Supplement 0"),h("/Registry (Adobe)"),h("/Ordering ("+u.encoding+")"),h(">>"),h(">>"),h("endobj"),u.objectNumber=d(),h("<<"),h("/Type /Font"),h("/Subtype /Type0"),h("/ToUnicode "+M+" 0 R"),h("/BaseFont /"+Vi(u.fontName)),h("/Encoding /"+u.encoding),h("/DescendantFonts ["+Y+" 0 R]"),h(">>"),h("endobj"),u.isAlreadyPutted=!0}})(o)}]),t.events.push(["putFont",function(o){(function(f){var u=f.font,h=f.out,d=f.newObject,v=f.putStream;if(u.metadata instanceof e.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var y=u.metadata.rawData,N="",g=0;g>"),h("endobj"),u.objectNumber=d();for(var C=0;C>"),h("endobj"),u.isAlreadyPutted=!0}})(o)}]);var a=function(o){var f,u=o.text||"",h=o.x,d=o.y,v=o.options||{},y=o.mutex||{},N=y.pdfEscape,g=y.activeFontKey,B=y.fonts,j=g,M="",C=0,Y="",K=B[j].encoding;if(B[j].encoding!=="Identity-H")return{text:u,x:h,y:d,options:v,mutex:y};for(Y=u,j=g,Array.isArray(u)&&(Y=u[0]),C=0;C","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],C=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),Y=!1,K=0;this.__bidiEngine__={};var tt=function(_){var E=_.charCodeAt(),q=E>>8,T=j[q];return T!==void 0?y[256*T+(255&E)]:q===252||q===253?"AL":C.test(q)?"L":q===8?"R":"N"},gt=function(_){for(var E,q=0;q<_.length;q++){if((E=tt(_.charAt(q)))==="L")return!1;if(E==="R")return!0}return!1},xt=function(_,E,q,T){var rt,at,ut,Q,lt=E[T];switch(lt){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":Y=!1;break;case"N":case"AN":break;case"EN":Y&&(lt="AN");break;case"AL":Y=!0,lt="R";break;case"WS":case"BN":lt="N";break;case"CS":T<1||T+1>=E.length||(rt=q[T-1])!=="EN"&&rt!=="AN"||(at=E[T+1])!=="EN"&&at!=="AN"?lt="N":Y&&(at="AN"),lt=at===rt?at:"N";break;case"ES":lt=(rt=T>0?q[T-1]:"B")==="EN"&&T+10&&q[T-1]==="EN"){lt="EN";break}if(Y){lt="N";break}for(ut=T+1,Q=E.length;ut=1425&&At<=2303||At===64286;if(rt=E[ut],mt&&(rt==="R"||rt==="AL")){lt="R";break}}}lt=T<1||(rt=E[T-1])==="B"?"N":q[T-1];break;case"B":Y=!1,a=!0,lt=K;break;case"S":o=!0,lt="N"}return lt},Pt=function(_,E,q){var T=_.split("");return q&&et(T,q,{hiLevel:K}),T.reverse(),E&&E.reverse(),T.join("")},et=function(_,E,q){var T,rt,at,ut,Q,lt=-1,At=_.length,mt=0,A=[],O=K?g:N,D=[];for(Y=!1,a=!1,o=!1,rt=0;rt0)if(T===16){for(rt=lt;rt-1){for(rt=lt;rt=0&&z[it]==="WS";it--)V[it]=K}})(D,E,At)},U=function(_,E,q,T,rt){if(!(rt.hiLevel<_)){if(_===1&&K===1&&!a)return E.reverse(),void(q&&q.reverse());for(var at,ut,Q,lt,At=E.length,mt=0;mt=_){for(Q=mt+1;Q=_;)Q++;for(lt=mt,ut=Q-1;lt=0&&(at[At]=M[lt+1])})(T,q,rt),U(2,T,E,q,rt),U(1,T,E,q,rt),T.join("")};return this.__bidiEngine__.doBidiReorder=function(_,E,q){if((function(rt,at){if(at)for(var ut=0;ut>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(o=this.familyClass)===1||o===2||o===3||o===4||o===5||o===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var r;return((r=this.cmap.unicode)!=null?r.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},e.prototype.widthOfString=function(t,r,n){var a,o,f,u;for(f=0,o=0,u=(t=""+t).length;0<=u?ou;o=0<=u?++o:--o)a=t.charCodeAt(o),f+=this.widthOfGlyph(this.characterToGlyph(a))+n*(1e3/r)||0;return f*(r/1e3)},e.prototype.lineHeight=function(t,r){var n;return r==null&&(r=!1),n=r?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},e})();var Zr,Jn=(function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var r,n;for(n=[],r=0;0<=t?rt;r=0<=t?++r:--r)n[r]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(t){var r,n,a;for(a=[],r=0,n=t.length;0<=n?rn;r=0<=n?++r:--r)a.push(this.writeByte(t.charCodeAt(r)));return a},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,r,n,a,o,f,u,h;return t=this.readByte(),r=this.readByte(),n=this.readByte(),a=this.readByte(),o=this.readByte(),f=this.readByte(),u=this.readByte(),h=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^n)+4294967296*(255^a)+16777216*(255^o)+65536*(255^f)+256*(255^u)+(255^h)+1):72057594037927940*t+281474976710656*r+1099511627776*n+4294967296*a+16777216*o+65536*f+256*u+h},e.prototype.writeLongLong=function(t){var r,n;return r=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var r,n;for(r=[],n=0;0<=t?nt;n=0<=t?++n:--n)r.push(this.readByte());return r},e.prototype.write=function(t){var r,n,a,o;for(o=[],n=0,a=t.length;no;a=0<=o?++a:--a)n={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[n.tag]=n}return t.prototype.encode=function(r){var n,a,o,f,u,h,d,v,y,N,g,B,j;for(j in g=Object.keys(r).length,h=Math.log(2),y=16*Math.floor(Math.log(g)/h),f=Math.floor(y/h),v=16*g-y,(a=new Jn).writeInt(this.scalarType),a.writeShort(g),a.writeShort(y),a.writeShort(f),a.writeShort(v),o=16*g,d=a.pos+o,u=null,B=[],r)for(N=r[j],a.writeString(j),a.writeInt(e(N)),a.writeInt(d),a.writeInt(N.length),B=B.concat(N),j==="head"&&(u=d),d+=N.length;d%4;)B.push(0),d++;return a.write(B),n=2981146554-e(a.data),a.pos=u+8,a.writeUInt32(n),a.data},e=function(r){var n,a,o,f;for(r=Bh.call(r);r.length%4;)r.push(0);for(o=new Jn(r),a=0,n=0,f=r.length;nN;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),t.pos+=2,j=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?ttN;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),d=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?ttN;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),v=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?ttN;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),a=(this.length-t.pos+this.offset)/2,u=(function(){var tt,gt;for(gt=[],h=tt=0;0<=a?tta;h=0<=a?++tt:--tt)gt.push(t.readUInt16());return gt})(),h=C=0,K=o.length;C=M;n=B<=M?++Y:--Y)v[h]===0?f=n+d[h]:(f=u[v[h]/2+(n-B)-(N-h)]||0)!==0&&(f+=d[h]),this.codeMap[n]=65535&f}t.pos=y}return e.encode=function(t,r){var n,a,o,f,u,h,d,v,y,N,g,B,j,M,C,Y,K,tt,gt,xt,Pt,et,U,dt,_,E,q,T,rt,at,ut,Q,lt,At,mt,A,O,D,z,V,X,nt,it,ct,wt,_t;switch(T=new Jn,f=Object.keys(t).sort(function(St,Tt){return St-Tt}),r){case"macroman":for(j=0,M=(function(){var St=[];for(B=0;B<256;++B)St.push(0);return St})(),Y={0:0},o={},rt=0,lt=f.length;rt=32768)for(h.push(0),xt.push(2*(g.length+U-B)),a=Q=_;_<=v?Q<=v:Q>=v;a=_<=v?++Q:--Q)g.push(n[a].new);else h.push(q-_),xt.push(0)}for(T.writeUInt16(3),T.writeUInt16(1),T.writeUInt32(12),T.writeUInt16(4),T.writeUInt16(16+8*U+2*g.length),T.writeUInt16(0),T.writeUInt16(dt),T.writeUInt16(et),T.writeUInt16(N),T.writeUInt16(Pt),X=0,A=y.length;Xa;n=0<=a?++n:--n)r=new th(t,this.offset),this.tables.push(r),r.isUnicode&&this.unicode==null&&(this.unicode=r);return!0},e.encode=function(t,r){var n,a;return r==null&&(r="macroman"),n=th.encode(t,r),(a=new Jn).writeUInt16(0),a.writeUInt16(1),n.table=a.data.concat(n.subtable),n},e})(),Kf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e})(),Xf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var r,n;for(n=[],r=0;r<10;++r)n.push(t.readByte());return n})(),this.charRange=(function(){var r,n;for(n=[],r=0;r<4;++r)n.push(t.readInt());return n})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var r,n;for(n=[],r=0;r<2;r=++r)n.push(t.readInt());return n})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e})(),$f=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="post",e.prototype.parse=function(t){var r,n,a;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var o;for(n=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=n?on;o=0<=n?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],a=[];t.posu;o=0<=u?++f:--f)h.push(t.readUInt32());return h}.call(this)}},e})(),Zf=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},Qf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="name",e.prototype.parse=function(t){var r,n,a,o,f,u,h,d,v,y,N;for(t.pos=this.offset,t.readShort(),r=t.readShort(),u=t.readShort(),n=[],o=0;0<=r?or;o=0<=r?++o:--o)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+u+t.readShort()});for(h={},o=v=0,y=n.length;vu;r=0<=u?++r:--r)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var d,v;for(v=[],r=d=0;0<=a?da;r=0<=a?++d:--d)v.push(t.readInt16());return v})(),this.widths=function(){var d,v,y,N;for(N=[],d=0,v=(y=this.metrics).length;da;r=0<=a?++f:--f)h.push(this.widths.push(n));return h},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e})(),Bh=[].slice,rc=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var r,n,a,o,f,u,h,d,v,y;return t in this.cache?this.cache[t]:(o=this.file.loca,r=this.file.contents,n=o.indexOf(t),(a=o.lengthOf(t))===0?this.cache[t]=null:(r.pos=this.offset+n,f=(u=new Jn(r.read(a))).readShort(),d=u.readShort(),y=u.readShort(),h=u.readShort(),v=u.readShort(),this.cache[t]=f===-1?new ic(u,d,y,h,v):new nc(u,f,d,y,h,v),this.cache[t]))},e.prototype.encode=function(t,r,n){var a,o,f,u,h;for(f=[],o=[],u=0,h=r.length;u0&&(a+=h)}for(var d=new Array(4*n.length),v=0;v>8,d[4*v+1]=(16711680&n[v])>>16,d[4*v]=(4278190080&n[v])>>24;return d},e})(),oc=(function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,r,n,a,o;for(r in a=this.font.cmap.tables[0].codeMap,t={},o=this.subset)n=o[r],t[r]=a[n];return t},e.prototype.glyphsFor=function(t){var r,n,a,o,f,u,h;for(a={},f=0,u=t.length;f0)for(o in h=this.glyphsFor(r))n=h[o],a[o]=n;return a},e.prototype.encode=function(t,r){var n,a,o,f,u,h,d,v,y,N,g,B,j,M,C;for(a in n=Oh.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(t),g={0:0},C=n.charMap)g[(h=C[a]).old]=h.new;for(B in N=n.maxGlyphID,f)B in g||(g[B]=N++);return v=(function(Y){var K,tt;for(K in tt={},Y)tt[Y[K]]=K;return tt})(g),y=Object.keys(v).sort(function(Y,K){return Y-K}),j=(function(){var Y,K,tt;for(tt=[],Y=0,K=y.length;Y>"),o.join(` `)}return""+r},t})();function Mh(e,t,r,n,a){n=n||{};var o=1.15,f=a.internal.scaleFactor,u=a.internal.getFontSize()/f,h=a.getLineHeightFactor?a.getLineHeightFactor():o,d=u*h,v=/\r\n|\r|\n/g,y="",N=1;if((n.valign==="middle"||n.valign==="bottom"||n.halign==="center"||n.halign==="right")&&(y=typeof e=="string"?e.split(v):e,N=y.length||1),r+=u*(2-o),n.valign==="middle"?r-=N/2*d:n.valign==="bottom"&&(r-=N*d),n.halign==="center"||n.halign==="right"){var g=u;if(n.halign==="center"&&(g*=.5),y&&N>=1){for(var B=0;B0,n=t||t===0;return r&&n?"DF":r?"S":n?"F":null}function Ao(e,t){var r,n,a,o;if(e=e||t,Array.isArray(e)){if(e.length>=4)return{top:e[0],right:e[1],bottom:e[2],left:e[3]};if(e.length===3)return{top:e[0],right:e[1],bottom:e[2],left:e[1]};if(e.length===2)return{top:e[0],right:e[1],bottom:e[0],left:e[1]};e.length===1?e=e[0]:e=t}return typeof e=="object"?(typeof e.vertical=="number"&&(e.top=e.vertical,e.bottom=e.vertical),typeof e.horizontal=="number"&&(e.right=e.horizontal,e.left=e.horizontal),{left:(r=e.left)!==null&&r!==void 0?r:t,top:(n=e.top)!==null&&n!==void 0?n:t,right:(a=e.right)!==null&&a!==void 0?a:t,bottom:(o=e.bottom)!==null&&o!==void 0?o:t}):(typeof e!="number"&&(e=t),{top:e,right:e,bottom:e,left:e})}function Uh(e,t){var r=Ao(t.settings.margin,0);return e.pageSize().width-(r.left+r.right)}function hc(e,t,r,n,a){var o={},f=1.3333333333333333,u=bs(t,function(K){return a.getComputedStyle(K).backgroundColor});u!=null&&(o.fillColor=u);var h=bs(t,function(K){return a.getComputedStyle(K).color});h!=null&&(o.textColor=h);var d=fc(n,r);d&&(o.cellPadding=d);var v="borderTopColor",y=f*r,N=n.borderTopWidth;if(n.borderBottomWidth===N&&n.borderRightWidth===N&&n.borderLeftWidth===N){var g=(parseFloat(N)||0)/y;g&&(o.lineWidth=g)}else o.lineWidth={top:(parseFloat(n.borderTopWidth)||0)/y,right:(parseFloat(n.borderRightWidth)||0)/y,bottom:(parseFloat(n.borderBottomWidth)||0)/y,left:(parseFloat(n.borderLeftWidth)||0)/y},o.lineWidth.top||(o.lineWidth.right?v="borderRightColor":o.lineWidth.bottom?v="borderBottomColor":o.lineWidth.left&&(v="borderLeftColor"));var B=bs(t,function(K){return a.getComputedStyle(K)[v]});B!=null&&(o.lineColor=B);var j=["left","right","center","justify"];j.indexOf(n.textAlign)!==-1&&(o.halign=n.textAlign),j=["middle","bottom","top"],j.indexOf(n.verticalAlign)!==-1&&(o.valign=n.verticalAlign);var M=parseInt(n.fontSize||"");isNaN(M)||(o.fontSize=M/f);var C=lc(n);C&&(o.fontStyle=C);var Y=(n.fontFamily||"").toLowerCase();return e.indexOf(Y)!==-1&&(o.font=Y),o}function lc(e){var t="";return(e.fontWeight==="bold"||e.fontWeight==="bolder"||parseInt(e.fontWeight)>=700)&&(t="bold"),(e.fontStyle==="italic"||e.fontStyle==="oblique")&&(t+="italic"),t}function bs(e,t){var r=zh(e,t);if(!r)return null;var n=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!n||!Array.isArray(n))return null;var a=[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])],o=parseInt(n[4]);return o===0||isNaN(a[0])||isNaN(a[1])||isNaN(a[2])?null:a}function zh(e,t){var r=t(e);return r==="rgba(0, 0, 0, 0)"||r==="transparent"||r==="initial"||r==="inherit"?e.parentElement==null?null:zh(e.parentElement,t):r}function fc(e,t){var r=[e.paddingTop,e.paddingRight,e.paddingBottom,e.paddingLeft],n=96/(72/t),a=(parseInt(e.lineHeight)-parseInt(e.fontSize))/t/2,o=r.map(function(u){return parseInt(u||"0")/n}),f=Ao(o,0);return a>f.top&&(f.top=a),a>f.bottom&&(f.bottom=a),f}function Hh(e,t,r,n,a){var o,f;n===void 0&&(n=!1),a===void 0&&(a=!1);var u;typeof t=="string"?u=r.document.querySelector(t):u=t;var h=Object.keys(e.getFontList()),d=e.scaleFactor(),v=[],y=[],N=[];if(!u)return console.error("Html table could not be found with input: ",t),{head:v,body:y,foot:N};for(var g=0;g0&&(a||y.display!=="none"))return f}function dc(e){var t=e.cloneNode(!0);return t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(/ +/g," "),t.innerHTML=t.innerHTML.split(//).map(function(r){return r.trim()}).join(` `),t.innerText||t.textContent||""}function pc(e,t,r){for(var n=0,a=[e,t,r];n0?"_".concat(h):"");var v={dataKey:d};a.push(v)}}),a}var Is=(function(){function e(t,r,n){this.table=r,this.pageNumber=r.pageNumber,this.settings=r.settings,this.cursor=n,this.doc=t.getDocument()}return e})(),Ac=(function(e){Dh(t,e);function t(r,n,a,o,f,u){var h=e.call(this,r,n,u)||this;return h.cell=a,h.row=o,h.column=f,h.section=o.section,h}return t})(Is),Lc=(function(){function e(t,r){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=r.columns,this.head=r.head,this.body=r.body,this.foot=r.foot}return e.prototype.getHeadHeight=function(t){return this.head.reduce(function(r,n){return r+n.getMaxCellHeight(t)},0)},e.prototype.getFootHeight=function(t){return this.foot.reduce(function(r,n){return r+n.getMaxCellHeight(t)},0)},e.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},e.prototype.callCellHooks=function(t,r,n,a,o,f){for(var u=0,h=r;u1:!1}).length>0},e.prototype.canEntireRowFit=function(t,r){return this.getMaxCellHeight(r)<=t},e.prototype.getMinimumRowHeight=function(t,r){var n=this;return t.reduce(function(a,o){var f=n.cells[o.index];if(!f)return 0;var u=r.getLineHeight(f.styles.fontSize),h=f.padding("vertical"),d=h+u;return d>a?d:a},0)},e})(),Vh=(function(){function e(t,r,n){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=r,this.section=n,this.raw=t;var o=t;t!=null&&typeof t=="object"&&!Array.isArray(t)?(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,o=(a=t.content)!==null&&a!==void 0?a:t,t._element&&(this.raw=t._element)):(this.rowSpan=1,this.colSpan=1);var f=o!=null?""+o:"",u=/\r\n|\r|\n/g;this.text=f.split(u)}return e.prototype.getTextPos=function(){var t;if(this.styles.valign==="top")t=this.y+this.padding("top");else if(this.styles.valign==="bottom")t=this.y+this.height-this.padding("bottom");else{var r=this.height-this.padding("vertical");t=this.y+r/2+this.padding("top")}var n;if(this.styles.halign==="right")n=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");n=this.x+a/2+this.padding("left")}else n=this.x+this.padding("left");return{x:n,y:t}},e.prototype.getContentHeight=function(t,r){r===void 0&&(r=1.15);var n=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/t*r,o=n*a+this.padding("vertical");return Math.max(o,this.styles.minCellHeight)},e.prototype.padding=function(t){var r=Ao(this.styles.cellPadding,0);return t==="vertical"?r.top+r.bottom:t==="horizontal"?r.left+r.right:r[t]},e})(),Nc=(function(){function e(t,r,n){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=r,this.index=n}return e.prototype.getMaxCustomCellWidth=function(t){for(var r=0,n=0,a=t.allRows();n.1/e.scaleFactor()&&(a=a<1?a:Math.round(a),console.log("Of the table content, ".concat(a," units width could not fit page"))),kc(t),Cc(t,e),Pc(t)}function _c(e,t){var r=e.scaleFactor(),n=t.settings.horizontalPageBreak,a=Uh(e,t);t.allRows().forEach(function(o){for(var f=0,u=t.columns;fa?(d.minWidth=a,d.wrappedWidth=a):(d.minWidth=d.contentWidth,d.wrappedWidth=d.contentWidth);else{var g=10/r;d.minWidth=d.styles.minCellWidth||g,d.wrappedWidth=d.contentWidth,d.minWidth>d.wrappedWidth&&(d.wrappedWidth=d.minWidth)}}}}),t.allRows().forEach(function(o){for(var f=0,u=t.columns;f1&&!h.minWidth&&(h.minWidth=d.minWidth),d.colSpan>1&&!h.wrappedWidth&&(h.wrappedWidth=d.minWidth))}})}function js(e,t,r){for(var n=t,a=e.reduce(function(g,B){return g+B.wrappedWidth},0),o=0;or(g):!0});N.length&&(t=js(N,t,r))}return t}function Pc(e){for(var t={},r=1,n=e.allRows(),a=0;a1)r--,delete o.cells[h.index];else if(d)d.cell.height+=o.height,r=d.cell.colSpan,delete o.cells[h.index],d.left--,d.left<=1&&delete t[h.index];else{var v=o.cells[h.index];if(!v)continue;if(v.height=o.height,v.rowSpan>1){var y=n.length-a,N=v.rowSpan>y?y:v.rowSpan;t[h.index]={cell:v,left:N,row:o}}}}}function kc(e){for(var t=e.allRows(),r=0;r1&&e.columns[u+1])o+=h.width,delete n.cells[h.index];else if(a){var d=a;delete n.cells[h.index],a=null,d.width=h.width+o}else{var d=n.cells[h.index];if(!d)continue;if(f=d.colSpan,o=0,d.colSpan>1){a=d,o+=h.width;continue}d.width=h.width+o}}}function Cc(e,t){for(var r={count:0,height:0},n=0,a=e.allRows();n1&&r.count*r.height0&&r.height>N&&(N=r.height),N>o.height&&(o.height=N)}}r.count--}}function rh(e,t,r,n,a){return e.map(function(o){return Fc(o,t,r,n,a)})}function Fc(e,t,r,n,a){var o=1e4*n.scaleFactor();if(t=Math.ceil(t*o)/o,t>=yo(e,r,n))return e;for(;t0?r:null}function Ec(e,t){if(e==="head"){if(typeof t=="object")return t.header||null;if(typeof t=="string"||typeof t=="number")return t}else if(e==="foot"&&typeof t=="object")return t.footer;return null}function Oc(e){return e.map(function(t,r){var n,a;return typeof t=="object"?a=(n=t.dataKey)!==null&&n!==void 0?n:r:a=r,new Nc(a,t,r)})}function Bc(e,t,r,n,a,o,f){var u=uc(n),h;e==="head"?h=a.headStyles:e==="body"?h=a.bodyStyles:e==="foot"&&(h=a.footStyles);var d=kn({},u.table,u[e],a.styles,h),v=a.columnStyles[t.dataKey]||a.columnStyles[t.index]||{},y=e==="body"?v:{},N=e==="body"&&r%2===0?kn({},u.alternateRow,a.alternateRowStyles):{},g=sc(o),B=kn({},g,d,N,y);return kn(B,f)}function Mc(e,t,r){var n;r===void 0&&(r={});var a=Uh(e,t),o=new Map,f=[],u=[],h=[];Array.isArray(t.settings.horizontalPageBreakRepeat)?h=t.settings.horizontalPageBreakRepeat:(typeof t.settings.horizontalPageBreakRepeat=="string"||typeof t.settings.horizontalPageBreakRepeat=="number")&&(h=[t.settings.horizontalPageBreakRepeat]),h.forEach(function(N){var g=t.columns.find(function(B){return B.dataKey===N||B.index===N});g&&!o.has(g.index)&&(o.set(g.index,!0),f.push(g.index),u.push(t.columns[g.index]),a-=g.wrappedWidth)});for(var d=!0,v=(n=r?.start)!==null&&n!==void 0?n:0;v=y)d=!1,f.push(v),u.push(t.columns[v]),a-=y;else break;v++}return{colIndexes:f,columns:u,lastIndex:v-1}}function Dc(e,t){for(var r=[],n=0;nv.pageSize().height)&&(Yh(v),o.y=a.top),t.callWillDrawPageHooks(v,o);var y=kn({},o);t.startPageNumber=v.pageNumber(),r.horizontalPageBreak?Tc(v,t,y,o):(v.applyStyles(v.userStyles),(r.showHead==="firstPage"||r.showHead==="everyPage")&&t.head.forEach(function(N){return Cn(v,t,N,o,t.columns)}),v.applyStyles(v.userStyles),t.body.forEach(function(N,g){var B=g===t.body.length-1;wo(v,t,N,B,y,o,t.columns)}),v.applyStyles(v.userStyles),(r.showFoot==="lastPage"||r.showFoot==="everyPage")&&t.foot.forEach(function(N){return Cn(v,t,N,o,t.columns)})),Th(v,t,y,o),t.callEndPageHooks(v,o),t.finalY=o.y,e.lastAutoTable=t,v.applyStyles(v.userStyles)}function Tc(e,t,r,n){var a=Dc(e,t),o=t.settings;if(o.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(d,v){e.applyStyles(e.userStyles),v>0?Na(e,t,r,n,d.columns,!0):ih(e,t,n,d.columns),qc(e,t,r,n,d.columns),ws(e,t,n,d.columns)});else for(var f=-1,u=a[0],h=function(){var d=f;if(u){e.applyStyles(e.userStyles);var v=u.columns;f>=0?Na(e,t,r,n,v,!0):ih(e,t,n,v),d=ah(e,t,f+1,n,v),ws(e,t,n,v)}var y=d-f;a.slice(1).forEach(function(N){e.applyStyles(e.userStyles),Na(e,t,r,n,N.columns,!0),ah(e,t,f+1,n,N.columns,y),ws(e,t,n,N.columns)}),f=d};fy&&(v.text=d.text.splice(y,d.text.length));var N=n.scaleFactor(),g=n.getLineHeightFactor();d.contentHeight=d.getContentHeight(N,g),d.contentHeight>=t&&(d.contentHeight=t,v.styles.minCellHeight-=t),d.contentHeight>e.height&&(e.height=d.contentHeight),v.contentHeight=v.getContentHeight(N,g),v.contentHeight>o&&(o=v.contentHeight),a[h.index]=v}}var B=new Wh(e.raw,-1,e.section,a,!0);B.height=o;for(var j=0,M=r.columns;ju)return console.log("Will not be able to print row ".concat(t.index," correctly since it's minimum height is larger than page height")),!0;if(!d)return!1;var v=t.hasRowSpan(n.columns),y=t.getMaxCellHeight(n.columns)>u;return y?(v&&console.log("The content of row ".concat(t.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(v||n.settings.rowPageBreak==="avoid")}function wo(e,t,r,n,a,o,f){var u=Gh(e,t,n,o);if(r.canEntireRowFit(u,f))Cn(e,t,r,o,f);else if(Hc(e,r,u,t)){var h=zc(r,u,t,e);Cn(e,t,r,o,f),Na(e,t,a,o,f),wo(e,t,h,n,a,o,f)}else Na(e,t,a,o,f),wo(e,t,r,n,a,o,f)}function Cn(e,t,r,n,a){n.x=t.settings.margin.left;for(var o=0,f=a;o"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new $i(this),o=Hh(a,t,window,r,!1),f=o.head,u=o.body,h=((n=f[0])===null||n===void 0?void 0:n.map(function(d){return d.content}))||[];return{columns:h,rows:u,data:u}}}var xs;try{if(typeof window<"u"&&window){var oh=window,sh=oh.jsPDF||((xs=oh.jspdf)===null||xs===void 0?void 0:xs.jsPDF);sh&&Gc(sh)}}catch(e){console.error("Could not apply autoTable plugin",e)}export{Rt as E,xe as _,Gc as a}; //# sourceMappingURL=jspdf-FJgf4ijI.js.map