topola-viewer/assets/jspdf.es.min-wFlU3HYW.js
github-actions-bot c3a3428ff1 Updates
2025-11-04 10:29:16 +00:00

147 lines
372 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.es-Bh7lSQjr.js","./index-CVXqMn9t.js","./index-Dw7ALnar.css"])))=>i.map(i=>d[i]);
var Kh=Object.defineProperty;var Xh=(r,e,t)=>e in r?Kh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var we=(r,e,t)=>Xh(r,typeof e!="symbol"?e+"":e,t);import{_ as Se,z as yo,a as Zs}from"./index-CVXqMn9t.js";function Zh(r){if(Array.isArray(r))return r}function Qh(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,o,s,f,l=[],c=!0,d=!1;try{if(s=(t=t.call(r)).next,e!==0)for(;!(c=(i=s.call(t)).done)&&(l.push(i.value),l.length!==e);c=!0);}catch(m){d=!0,o=m}finally{try{if(!c&&t.return!=null&&(f=t.return(),Object(f)!==f))return}finally{if(d)throw o}}return l}}function wl(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=Array(e);t<e;t++)i[t]=r[t];return i}function tc(r,e){if(r){if(typeof r=="string")return wl(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?wl(r,e):void 0}}function ec(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yl(r,e){return Zh(r)||Qh(r,e)||tc(r,e)||ec()}function xl(r,e="utf8"){return new TextDecoder(e).decode(r)}const rc=new TextEncoder;function nc(r){return rc.encode(r)}const ic=1024*8,ac=(()=>{const r=new Uint8Array(4),e=new Uint32Array(r.buffer);return!((e[0]=1)&r[0])})(),Qs={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 Po{constructor(e=ic,t={}){we(this,"buffer");we(this,"byteLength");we(this,"byteOffset");we(this,"length");we(this,"offset");we(this,"lastWrittenByte");we(this,"littleEndian");we(this,"_data");we(this,"_mark");we(this,"_marks");let i=!1;typeof e=="number"?e=new ArrayBuffer(e):(i=!0,this.lastWrittenByte=e.byteLength);const o=t.offset?t.offset>>>0:0,s=e.byteLength-o;let f=o;(ArrayBuffer.isView(e)||e instanceof Po)&&(e.byteLength!==e.buffer.byteLength&&(f=e.byteOffset+o),e=e.buffer),i?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,s),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,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 e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const i=(this.offset+e)*2,o=new Uint8Array(i);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=i,this.byteLength=i,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(e=1){return this.readArray(e,"uint8")}readArray(e,t){const i=Qs[t].BYTES_PER_ELEMENT*e,o=this.byteOffset+this.offset,s=this.buffer.slice(o,o+i);if(this.littleEndian===ac&&t!=="uint8"&&t!=="int8"){const l=new Uint8Array(this.buffer.slice(o,o+i));l.reverse();const c=new Qs[t](l.buffer);return this.offset+=i,c.reverse(),c}const f=new Qs[t](s);return this.offset+=i,f}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let i=0;i<e;i++)t+=this.readChar();return t}readUtf8(e=1){return xl(this.readBytes(e))}decodeText(e=1,t="utf8"){return xl(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(nc(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Wi(r){let e=r.length;for(;--e>=0;)r[e]=0}const sc=3,oc=258,Iu=29,lc=256,uc=lc+1+Iu,Cu=30,hc=512,cc=new Array((uc+2)*2);Wi(cc);const fc=new Array(Cu*2);Wi(fc);const dc=new Array(hc);Wi(dc);const pc=new Array(oc-sc+1);Wi(pc);const gc=new Array(Iu);Wi(gc);const mc=new Array(Cu);Wi(mc);const bc=(r,e,t,i)=>{let o=r&65535|0,s=r>>>16&65535|0,f=0;for(;t!==0;){f=t>2e3?2e3:t,t-=f;do o=o+e[i++]|0,s=s+o|0;while(--f);o%=65521,s%=65521}return o|s<<16|0};var xo=bc;const vc=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var i=0;i<8;i++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},wc=new Uint32Array(vc()),yc=(r,e,t,i)=>{const o=wc,s=i+t;r^=-1;for(let f=i;f<s;f++)r=r>>>8^o[(r^e[f])&255];return r^-1};var cn=yc,_o={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Fu={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const xc=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var _c=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)xc(t,i)&&(r[i]=t[i])}}return r},Ac=r=>{let e=0;for(let i=0,o=r.length;i<o;i++)e+=r[i].length;const t=new Uint8Array(e);for(let i=0,o=0,s=r.length;i<s;i++){let f=r[i];t.set(f,o),o+=f.length}return t},Eu={assign:_c,flattenChunks:Ac};let Ou=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ou=!1}const ya=new Uint8Array(256);for(let r=0;r<256;r++)ya[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;ya[254]=ya[254]=1;var Nc=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,i,o,s,f=r.length,l=0;for(o=0;o<f;o++)t=r.charCodeAt(o),(t&64512)===55296&&o+1<f&&(i=r.charCodeAt(o+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),o++)),l+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(l),s=0,o=0;s<l;o++)t=r.charCodeAt(o),(t&64512)===55296&&o+1<f&&(i=r.charCodeAt(o+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),o++)),t<128?e[s++]=t:t<2048?(e[s++]=192|t>>>6,e[s++]=128|t&63):t<65536?(e[s++]=224|t>>>12,e[s++]=128|t>>>6&63,e[s++]=128|t&63):(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63,e[s++]=128|t>>>6&63,e[s++]=128|t&63);return e};const Lc=(r,e)=>{if(e<65534&&r.subarray&&Ou)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let i=0;i<e;i++)t+=String.fromCharCode(r[i]);return t};var Sc=(r,e)=>{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let i,o;const s=new Array(t*2);for(o=0,i=0;i<t;){let f=r[i++];if(f<128){s[o++]=f;continue}let l=ya[f];if(l>4){s[o++]=65533,i+=l-1;continue}for(f&=l===2?31:l===3?15:7;l>1&&i<t;)f=f<<6|r[i++]&63,l--;if(l>1){s[o++]=65533;continue}f<65536?s[o++]=f:(f-=65536,s[o++]=55296|f>>10&1023,s[o++]=56320|f&1023)}return Lc(s,o)},kc=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+ya[r[t]]>e?t:e},Ao={string2buf:Nc,buf2string:Sc,utf8border:kc};function Pc(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Ic=Pc;const Za=16209,Cc=16191;var Fc=function(e,t){let i,o,s,f,l,c,d,m,A,k,p,B,E,R,S,Y,V,D,ut,yt,ft,tt,z,et;const N=e.state;i=e.next_in,z=e.input,o=i+(e.avail_in-5),s=e.next_out,et=e.output,f=s-(t-e.avail_out),l=s+(e.avail_out-257),c=N.dmax,d=N.wsize,m=N.whave,A=N.wnext,k=N.window,p=N.hold,B=N.bits,E=N.lencode,R=N.distcode,S=(1<<N.lenbits)-1,Y=(1<<N.distbits)-1;t:do{B<15&&(p+=z[i++]<<B,B+=8,p+=z[i++]<<B,B+=8),V=E[p&S];e:for(;;){if(D=V>>>24,p>>>=D,B-=D,D=V>>>16&255,D===0)et[s++]=V&65535;else if(D&16){ut=V&65535,D&=15,D&&(B<D&&(p+=z[i++]<<B,B+=8),ut+=p&(1<<D)-1,p>>>=D,B-=D),B<15&&(p+=z[i++]<<B,B+=8,p+=z[i++]<<B,B+=8),V=R[p&Y];r:for(;;){if(D=V>>>24,p>>>=D,B-=D,D=V>>>16&255,D&16){if(yt=V&65535,D&=15,B<D&&(p+=z[i++]<<B,B+=8,B<D&&(p+=z[i++]<<B,B+=8)),yt+=p&(1<<D)-1,yt>c){e.msg="invalid distance too far back",N.mode=Za;break t}if(p>>>=D,B-=D,D=s-f,yt>D){if(D=yt-D,D>m&&N.sane){e.msg="invalid distance too far back",N.mode=Za;break t}if(ft=0,tt=k,A===0){if(ft+=d-D,D<ut){ut-=D;do et[s++]=k[ft++];while(--D);ft=s-yt,tt=et}}else if(A<D){if(ft+=d+A-D,D-=A,D<ut){ut-=D;do et[s++]=k[ft++];while(--D);if(ft=0,A<ut){D=A,ut-=D;do et[s++]=k[ft++];while(--D);ft=s-yt,tt=et}}}else if(ft+=A-D,D<ut){ut-=D;do et[s++]=k[ft++];while(--D);ft=s-yt,tt=et}for(;ut>2;)et[s++]=tt[ft++],et[s++]=tt[ft++],et[s++]=tt[ft++],ut-=3;ut&&(et[s++]=tt[ft++],ut>1&&(et[s++]=tt[ft++]))}else{ft=s-yt;do et[s++]=et[ft++],et[s++]=et[ft++],et[s++]=et[ft++],ut-=3;while(ut>2);ut&&(et[s++]=et[ft++],ut>1&&(et[s++]=et[ft++]))}}else if((D&64)===0){V=R[(V&65535)+(p&(1<<D)-1)];continue r}else{e.msg="invalid distance code",N.mode=Za;break t}break}}else if((D&64)===0){V=E[(V&65535)+(p&(1<<D)-1)];continue e}else if(D&32){N.mode=Cc;break t}else{e.msg="invalid literal/length code",N.mode=Za;break t}break}}while(i<o&&s<l);ut=B>>3,i-=ut,B-=ut<<3,p&=(1<<B)-1,e.next_in=i,e.next_out=s,e.avail_in=i<o?5+(o-i):5-(i-o),e.avail_out=s<l?257+(l-s):257-(s-l),N.hold=p,N.bits=B};const ji=15,_l=852,Al=592,Nl=0,to=1,Ll=2,Ec=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Oc=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),jc=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Bc=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Rc=(r,e,t,i,o,s,f,l)=>{const c=l.bits;let d=0,m=0,A=0,k=0,p=0,B=0,E=0,R=0,S=0,Y=0,V,D,ut,yt,ft,tt=null,z;const et=new Uint16Array(ji+1),N=new Uint16Array(ji+1);let F=null,H,U,it;for(d=0;d<=ji;d++)et[d]=0;for(m=0;m<i;m++)et[e[t+m]]++;for(p=c,k=ji;k>=1&&et[k]===0;k--);if(p>k&&(p=k),k===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,l.bits=1,0;for(A=1;A<k&&et[A]===0;A++);for(p<A&&(p=A),R=1,d=1;d<=ji;d++)if(R<<=1,R-=et[d],R<0)return-1;if(R>0&&(r===Nl||k!==1))return-1;for(N[1]=0,d=1;d<ji;d++)N[d+1]=N[d]+et[d];for(m=0;m<i;m++)e[t+m]!==0&&(f[N[e[t+m]]++]=m);if(r===Nl?(tt=F=f,z=20):r===to?(tt=Ec,F=Oc,z=257):(tt=jc,F=Bc,z=0),Y=0,m=0,d=A,ft=s,B=p,E=0,ut=-1,S=1<<p,yt=S-1,r===to&&S>_l||r===Ll&&S>Al)return 1;for(;;){H=d-E,f[m]+1<z?(U=0,it=f[m]):f[m]>=z?(U=F[f[m]-z],it=tt[f[m]-z]):(U=96,it=0),V=1<<d-E,D=1<<B,A=D;do D-=V,o[ft+(Y>>E)+D]=H<<24|U<<16|it|0;while(D!==0);for(V=1<<d-1;Y&V;)V>>=1;if(V!==0?(Y&=V-1,Y+=V):Y=0,m++,--et[d]===0){if(d===k)break;d=e[t+f[m]]}if(d>p&&(Y&yt)!==ut){for(E===0&&(E=p),ft+=A,B=d-E,R=1<<B;B+E<k&&(R-=et[B+E],!(R<=0));)B++,R<<=1;if(S+=1<<B,r===to&&S>_l||r===Ll&&S>Al)return 1;ut=Y&yt,o[ut]=p<<24|B<<16|ft-s|0}}return Y!==0&&(o[ft+Y]=d-E<<24|64<<16|0),l.bits=p,0};var wa=Rc;const Mc=0,ju=1,Bu=2,{Z_FINISH:Sl,Z_BLOCK:Tc,Z_TREES:Qa,Z_OK:pi,Z_STREAM_END:Dc,Z_NEED_DICT:qc,Z_STREAM_ERROR:zr,Z_DATA_ERROR:Ru,Z_MEM_ERROR:Mu,Z_BUF_ERROR:Uc,Z_DEFLATED:kl}=Fu,ms=16180,Pl=16181,Il=16182,Cl=16183,Fl=16184,El=16185,Ol=16186,jl=16187,Bl=16188,Rl=16189,ds=16190,In=16191,eo=16192,Ml=16193,ro=16194,Tl=16195,Dl=16196,ql=16197,Ul=16198,ts=16199,es=16200,zl=16201,Hl=16202,Wl=16203,Vl=16204,Gl=16205,no=16206,Yl=16207,Jl=16208,Ee=16209,Tu=16210,Du=16211,zc=852,Hc=592,Wc=15,Vc=Wc,$l=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function Gc(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const gi=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.mode<ms||e.mode>Du?1:0},qu=r=>{if(gi(r))return zr;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=ms,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(zc),e.distcode=e.distdyn=new Int32Array(Hc),e.sane=1,e.back=-1,pi},Uu=r=>{if(gi(r))return zr;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,qu(r)},zu=(r,e)=>{let t;if(gi(r))return zr;const i=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?zr:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,Uu(r))},Hu=(r,e)=>{if(!r)return zr;const t=new Gc;r.state=t,t.strm=r,t.window=null,t.mode=ms;const i=zu(r,e);return i!==pi&&(r.state=null),i},Yc=r=>Hu(r,Vc);let Kl=!0,io,ao;const Jc=r=>{if(Kl){io=new Int32Array(512),ao=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(wa(ju,r.lens,0,288,io,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;wa(Bu,r.lens,0,32,ao,0,r.work,{bits:5}),Kl=!1}r.lencode=io,r.lenbits=9,r.distcode=ao,r.distbits=5},Wu=(r,e,t,i)=>{let o;const s=r.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(t-s.wsize,t),0),s.wnext=0,s.whave=s.wsize):(o=s.wsize-s.wnext,o>i&&(o=i),s.window.set(e.subarray(t-i,t-i+o),s.wnext),i-=o,i?(s.window.set(e.subarray(t-i,t),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0},$c=(r,e)=>{let t,i,o,s,f,l,c,d,m,A,k,p,B,E,R=0,S,Y,V,D,ut,yt,ft,tt;const z=new Uint8Array(4);let et,N;const F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(gi(r)||!r.output||!r.input&&r.avail_in!==0)return zr;t=r.state,t.mode===In&&(t.mode=eo),f=r.next_out,o=r.output,c=r.avail_out,s=r.next_in,i=r.input,l=r.avail_in,d=t.hold,m=t.bits,A=l,k=c,tt=pi;t:for(;;)switch(t.mode){case ms:if(t.wrap===0){t.mode=eo;break}for(;m<16;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,z[0]=d&255,z[1]=d>>>8&255,t.check=cn(t.check,z,2,0),d=0,m=0,t.mode=Pl;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){r.msg="incorrect header check",t.mode=Ee;break}if((d&15)!==kl){r.msg="unknown compression method",t.mode=Ee;break}if(d>>>=4,m-=4,ft=(d&15)+8,t.wbits===0&&(t.wbits=ft),ft>15||ft>t.wbits){r.msg="invalid window size",t.mode=Ee;break}t.dmax=1<<t.wbits,t.flags=0,r.adler=t.check=1,t.mode=d&512?Rl:In,d=0,m=0;break;case Pl:for(;m<16;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==kl){r.msg="unknown compression method",t.mode=Ee;break}if(t.flags&57344){r.msg="unknown header flags set",t.mode=Ee;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=cn(t.check,z,2,0)),d=0,m=0,t.mode=Il;case Il:for(;m<32;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,z[2]=d>>>16&255,z[3]=d>>>24&255,t.check=cn(t.check,z,4,0)),d=0,m=0,t.mode=Cl;case Cl:for(;m<16;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=cn(t.check,z,2,0)),d=0,m=0,t.mode=Fl;case Fl:if(t.flags&1024){for(;m<16;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&(z[0]=d&255,z[1]=d>>>8&255,t.check=cn(t.check,z,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=El;case El:if(t.flags&1024&&(p=t.length,p>l&&(p=l),p&&(t.head&&(ft=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(s,s+p),ft)),t.flags&512&&t.wrap&4&&(t.check=cn(t.check,i,p,s)),l-=p,s+=p,t.length-=p),t.length))break t;t.length=0,t.mode=Ol;case Ol:if(t.flags&2048){if(l===0)break t;p=0;do ft=i[s+p++],t.head&&ft&&t.length<65536&&(t.head.name+=String.fromCharCode(ft));while(ft&&p<l);if(t.flags&512&&t.wrap&4&&(t.check=cn(t.check,i,p,s)),l-=p,s+=p,ft)break t}else t.head&&(t.head.name=null);t.length=0,t.mode=jl;case jl:if(t.flags&4096){if(l===0)break t;p=0;do ft=i[s+p++],t.head&&ft&&t.length<65536&&(t.head.comment+=String.fromCharCode(ft));while(ft&&p<l);if(t.flags&512&&t.wrap&4&&(t.check=cn(t.check,i,p,s)),l-=p,s+=p,ft)break t}else t.head&&(t.head.comment=null);t.mode=Bl;case Bl:if(t.flags&512){for(;m<16;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(t.wrap&4&&d!==(t.check&65535)){r.msg="header crc mismatch",t.mode=Ee;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=In;break;case Rl:for(;m<32;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}r.adler=t.check=$l(d),d=0,m=0,t.mode=ds;case ds:if(t.havedict===0)return r.next_out=f,r.avail_out=c,r.next_in=s,r.avail_in=l,t.hold=d,t.bits=m,qc;r.adler=t.check=1,t.mode=In;case In:if(e===Tc||e===Qa)break t;case eo:if(t.last){d>>>=m&7,m-=m&7,t.mode=no;break}for(;m<3;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=Ml;break;case 1:if(Jc(t),t.mode=ts,e===Qa){d>>>=2,m-=2;break t}break;case 2:t.mode=Dl;break;case 3:r.msg="invalid block type",t.mode=Ee}d>>>=2,m-=2;break;case Ml:for(d>>>=m&7,m-=m&7;m<32;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){r.msg="invalid stored block lengths",t.mode=Ee;break}if(t.length=d&65535,d=0,m=0,t.mode=ro,e===Qa)break t;case ro:t.mode=Tl;case Tl:if(p=t.length,p){if(p>l&&(p=l),p>c&&(p=c),p===0)break t;o.set(i.subarray(s,s+p),f),l-=p,s+=p,c-=p,f+=p,t.length-=p;break}t.mode=In;break;case Dl:for(;m<14;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=Ee;break}t.have=0,t.mode=ql;case ql:for(;t.have<t.ncode;){for(;m<3;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}t.lens[F[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[F[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,et={bits:t.lenbits},tt=wa(Mc,t.lens,0,19,t.lencode,0,t.work,et),t.lenbits=et.bits,tt){r.msg="invalid code lengths set",t.mode=Ee;break}t.have=0,t.mode=Ul;case Ul:for(;t.have<t.nlen+t.ndist;){for(;R=t.lencode[d&(1<<t.lenbits)-1],S=R>>>24,Y=R>>>16&255,V=R&65535,!(S<=m);){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(V<16)d>>>=S,m-=S,t.lens[t.have++]=V;else{if(V===16){for(N=S+2;m<N;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(d>>>=S,m-=S,t.have===0){r.msg="invalid bit length repeat",t.mode=Ee;break}ft=t.lens[t.have-1],p=3+(d&3),d>>>=2,m-=2}else if(V===17){for(N=S+3;m<N;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}d>>>=S,m-=S,ft=0,p=3+(d&7),d>>>=3,m-=3}else{for(N=S+7;m<N;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}d>>>=S,m-=S,ft=0,p=11+(d&127),d>>>=7,m-=7}if(t.have+p>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=Ee;break}for(;p--;)t.lens[t.have++]=ft}}if(t.mode===Ee)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=Ee;break}if(t.lenbits=9,et={bits:t.lenbits},tt=wa(ju,t.lens,0,t.nlen,t.lencode,0,t.work,et),t.lenbits=et.bits,tt){r.msg="invalid literal/lengths set",t.mode=Ee;break}if(t.distbits=6,t.distcode=t.distdyn,et={bits:t.distbits},tt=wa(Bu,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,et),t.distbits=et.bits,tt){r.msg="invalid distances set",t.mode=Ee;break}if(t.mode=ts,e===Qa)break t;case ts:t.mode=es;case es:if(l>=6&&c>=258){r.next_out=f,r.avail_out=c,r.next_in=s,r.avail_in=l,t.hold=d,t.bits=m,Fc(r,k),f=r.next_out,o=r.output,c=r.avail_out,s=r.next_in,i=r.input,l=r.avail_in,d=t.hold,m=t.bits,t.mode===In&&(t.back=-1);break}for(t.back=0;R=t.lencode[d&(1<<t.lenbits)-1],S=R>>>24,Y=R>>>16&255,V=R&65535,!(S<=m);){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(Y&&(Y&240)===0){for(D=S,ut=Y,yt=V;R=t.lencode[yt+((d&(1<<D+ut)-1)>>D)],S=R>>>24,Y=R>>>16&255,V=R&65535,!(D+S<=m);){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}d>>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,t.length=V,Y===0){t.mode=Gl;break}if(Y&32){t.back=-1,t.mode=In;break}if(Y&64){r.msg="invalid literal/length code",t.mode=Ee;break}t.extra=Y&15,t.mode=zl;case zl:if(t.extra){for(N=t.extra;m<N;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Hl;case Hl:for(;R=t.distcode[d&(1<<t.distbits)-1],S=R>>>24,Y=R>>>16&255,V=R&65535,!(S<=m);){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if((Y&240)===0){for(D=S,ut=Y,yt=V;R=t.distcode[yt+((d&(1<<D+ut)-1)>>D)],S=R>>>24,Y=R>>>16&255,V=R&65535,!(D+S<=m);){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}d>>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,Y&64){r.msg="invalid distance code",t.mode=Ee;break}t.offset=V,t.extra=Y&15,t.mode=Wl;case Wl:if(t.extra){for(N=t.extra;m<N;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=Ee;break}t.mode=Vl;case Vl:if(c===0)break t;if(p=k-c,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=Ee;break}p>t.wnext?(p-=t.wnext,B=t.wsize-p):B=t.wnext-p,p>t.length&&(p=t.length),E=t.window}else E=o,B=f-t.offset,p=t.length;p>c&&(p=c),c-=p,t.length-=p;do o[f++]=E[B++];while(--p);t.length===0&&(t.mode=es);break;case Gl:if(c===0)break t;o[f++]=t.length,c--,t.mode=es;break;case no:if(t.wrap){for(;m<32;){if(l===0)break t;l--,d|=i[s++]<<m,m+=8}if(k-=c,r.total_out+=k,t.total+=k,t.wrap&4&&k&&(r.adler=t.check=t.flags?cn(t.check,o,k,f-k):xo(t.check,o,k,f-k)),k=c,t.wrap&4&&(t.flags?d:$l(d))!==t.check){r.msg="incorrect data check",t.mode=Ee;break}d=0,m=0}t.mode=Yl;case Yl:if(t.wrap&&t.flags){for(;m<32;){if(l===0)break t;l--,d+=i[s++]<<m,m+=8}if(t.wrap&4&&d!==(t.total&4294967295)){r.msg="incorrect length check",t.mode=Ee;break}d=0,m=0}t.mode=Jl;case Jl:tt=Dc;break t;case Ee:tt=Ru;break t;case Tu:return Mu;case Du:default:return zr}return r.next_out=f,r.avail_out=c,r.next_in=s,r.avail_in=l,t.hold=d,t.bits=m,(t.wsize||k!==r.avail_out&&t.mode<Ee&&(t.mode<no||e!==Sl))&&Wu(r,r.output,r.next_out,k-r.avail_out),A-=r.avail_in,k-=r.avail_out,r.total_in+=A,r.total_out+=k,t.total+=k,t.wrap&4&&k&&(r.adler=t.check=t.flags?cn(t.check,o,k,r.next_out-k):xo(t.check,o,k,r.next_out-k)),r.data_type=t.bits+(t.last?64:0)+(t.mode===In?128:0)+(t.mode===ts||t.mode===ro?256:0),(A===0&&k===0||e===Sl)&&tt===pi&&(tt=Uc),tt},Kc=r=>{if(gi(r))return zr;let e=r.state;return e.window&&(e.window=null),r.state=null,pi},Xc=(r,e)=>{if(gi(r))return zr;const t=r.state;return(t.wrap&2)===0?zr:(t.head=e,e.done=!1,pi)},Zc=(r,e)=>{const t=e.length;let i,o,s;return gi(r)||(i=r.state,i.wrap!==0&&i.mode!==ds)?zr:i.mode===ds&&(o=1,o=xo(o,e,t,0),o!==i.check)?Ru:(s=Wu(r,e,t,t),s?(i.mode=Tu,Mu):(i.havedict=1,pi))};var Qc=Uu,tf=zu,ef=qu,rf=Yc,nf=Hu,af=$c,sf=Kc,of=Xc,lf=Zc,uf="pako inflate (from Nodeca project)",Cn={inflateReset:Qc,inflateReset2:tf,inflateResetKeep:ef,inflateInit:rf,inflateInit2:nf,inflate:af,inflateEnd:sf,inflateGetHeader:of,inflateSetDictionary:lf,inflateInfo:uf};function hf(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var cf=hf;const Vu=Object.prototype.toString,{Z_NO_FLUSH:ff,Z_FINISH:df,Z_OK:xa,Z_STREAM_END:so,Z_NEED_DICT:oo,Z_STREAM_ERROR:pf,Z_DATA_ERROR:Xl,Z_MEM_ERROR:gf}=Fu;function _a(r){this.options=Eu.assign({chunkSize:1024*64,windowBits:15,to:""},r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ic,this.strm.avail_out=0;let t=Cn.inflateInit2(this.strm,e.windowBits);if(t!==xa)throw new Error(_o[t]);if(this.header=new cf,Cn.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Ao.string2buf(e.dictionary):Vu.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=Cn.inflateSetDictionary(this.strm,e.dictionary),t!==xa)))throw new Error(_o[t])}_a.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize,o=this.options.dictionary;let s,f,l;if(this.ended)return!1;for(e===~~e?f=e:f=e===!0?df:ff,Vu.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),s=Cn.inflate(t,f),s===oo&&o&&(s=Cn.inflateSetDictionary(t,o),s===xa?s=Cn.inflate(t,f):s===Xl&&(s=oo));t.avail_in>0&&s===so&&t.state.wrap>0&&r[t.next_in]!==0;)Cn.inflateReset(t),s=Cn.inflate(t,f);switch(s){case pf:case Xl:case oo:case gf:return this.onEnd(s),this.ended=!0,!1}if(l=t.avail_out,t.next_out&&(t.avail_out===0||s===so))if(this.options.to==="string"){let c=Ao.utf8border(t.output,t.next_out),d=t.next_out-c,m=Ao.buf2string(t.output,c);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(c,c+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(s===xa&&l===0)){if(s===so)return s=Cn.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};_a.prototype.onData=function(r){this.chunks.push(r)};_a.prototype.onEnd=function(r){r===xa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Eu.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function mf(r,e){const t=new _a(e);if(t.push(r),t.err)throw t.msg||_o[t.err];return t.result}var bf=_a,vf=mf,wf={Inflate:bf,inflate:vf};const{Inflate:yf,inflate:xf}=wf;var Zl=yf,_f=xf;const Gu=[];for(let r=0;r<256;r++){let e=r;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Gu[r]=e}const Ql=4294967295;function Af(r,e,t){let i=r;for(let o=0;o<t;o++)i=Gu[(i^e[o])&255]^i>>>8;return i}function Nf(r,e){return(Af(Ql,r,e)^Ql)>>>0}function tu(r,e,t){const i=r.readUint32(),o=Nf(new Uint8Array(r.buffer,r.byteOffset+r.offset-e-4,e),e);if(o!==i)throw new Error(`CRC mismatch for chunk ${t}. Expected ${i}, found ${o}`)}function Yu(r,e,t){for(let i=0;i<t;i++)e[i]=r[i]}function Ju(r,e,t,i){let o=0;for(;o<i;o++)e[o]=r[o];for(;o<t;o++)e[o]=r[o]+e[o-i]&255}function $u(r,e,t,i){let o=0;if(t.length===0)for(;o<i;o++)e[o]=r[o];else for(;o<i;o++)e[o]=r[o]+t[o]&255}function Ku(r,e,t,i,o){let s=0;if(t.length===0){for(;s<o;s++)e[s]=r[s];for(;s<i;s++)e[s]=r[s]+(e[s-o]>>1)&255}else{for(;s<o;s++)e[s]=r[s]+(t[s]>>1)&255;for(;s<i;s++)e[s]=r[s]+(e[s-o]+t[s]>>1)&255}}function Xu(r,e,t,i,o){let s=0;if(t.length===0){for(;s<o;s++)e[s]=r[s];for(;s<i;s++)e[s]=r[s]+e[s-o]&255}else{for(;s<o;s++)e[s]=r[s]+t[s]&255;for(;s<i;s++)e[s]=r[s]+Lf(e[s-o],t[s],t[s-o])&255}}function Lf(r,e,t){const i=r+e-t,o=Math.abs(i-r),s=Math.abs(i-e),f=Math.abs(i-t);return o<=s&&o<=f?r:s<=f?e:t}function Sf(r,e,t,i,o,s){switch(r){case 0:Yu(e,t,o);break;case 1:Ju(e,t,o,s);break;case 2:$u(e,t,i,o);break;case 3:Ku(e,t,i,o,s);break;case 4:Xu(e,t,i,o,s);break;default:throw new Error(`Unsupported filter: ${r}`)}}const kf=new Uint16Array([255]),Pf=new Uint8Array(kf.buffer),If=Pf[0]===255;function Cf(r){const{data:e,width:t,height:i,channels:o,depth:s}=r,f=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],l=Math.ceil(s/8)*o,c=new Uint8Array(i*t*l);let d=0;for(let m=0;m<7;m++){const A=f[m],k=Math.ceil((t-A.x)/A.xStep),p=Math.ceil((i-A.y)/A.yStep);if(k<=0||p<=0)continue;const B=k*l,E=new Uint8Array(B);for(let R=0;R<p;R++){const S=e[d++],Y=e.subarray(d,d+B);d+=B;const V=new Uint8Array(B);Sf(S,Y,V,E,B,l),E.set(V);for(let D=0;D<k;D++){const ut=A.x+D*A.xStep,yt=A.y+R*A.yStep;if(!(ut>=t||yt>=i))for(let ft=0;ft<l;ft++)c[(yt*t+ut)*l+ft]=V[D*l+ft]}}}if(s===16){const m=new Uint16Array(c.buffer);if(If)for(let A=0;A<m.length;A++)m[A]=Ff(m[A]);return m}else return c}function Ff(r){return(r&255)<<8|r>>8&255}const Ef=new Uint16Array([255]),Of=new Uint8Array(Ef.buffer),jf=Of[0]===255,Bf=new Uint8Array(0);function eu(r){const{data:e,width:t,height:i,channels:o,depth:s}=r,f=Math.ceil(s/8)*o,l=Math.ceil(s/8*o*t),c=new Uint8Array(i*l);let d=Bf,m=0,A,k;for(let p=0;p<i;p++){switch(A=e.subarray(m+1,m+1+l),k=c.subarray(p*l,(p+1)*l),e[m]){case 0:Yu(A,k,l);break;case 1:Ju(A,k,l,f);break;case 2:$u(A,k,d,l);break;case 3:Ku(A,k,d,l,f);break;case 4:Xu(A,k,d,l,f);break;default:throw new Error(`Unsupported filter: ${e[m]}`)}d=k,m+=l+1}if(s===16){const p=new Uint16Array(c.buffer);if(jf)for(let B=0;B<p.length;B++)p[B]=Rf(p[B]);return p}else return c}function Rf(r){return(r&255)<<8|r>>8&255}const os=Uint8Array.of(137,80,78,71,13,10,26,10);function ru(r){if(!Mf(r.readBytes(os.length)))throw new Error("wrong PNG signature")}function Mf(r){if(r.length<os.length)return!1;for(let e=0;e<os.length;e++)if(r[e]!==os[e])return!1;return!0}const Tf="tEXt",Df=0,Zu=new TextDecoder("latin1");function qf(r){if(zf(r),r.length===0||r.length>79)throw new Error("keyword length must be between 1 and 79")}const Uf=/^[\u0000-\u00FF]*$/;function zf(r){if(!Uf.test(r))throw new Error("invalid latin1 text")}function Hf(r,e,t){const i=Qu(e);r[i]=Wf(e,t-i.length-1)}function Qu(r){for(r.mark();r.readByte()!==Df;);const e=r.offset;r.reset();const t=Zu.decode(r.readBytes(e-r.offset-1));return r.skip(1),qf(t),t}function Wf(r,e){return Zu.decode(r.readBytes(e))}const jr={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},lo={UNKNOWN:-1,DEFLATE:0},nu={UNKNOWN:-1,ADAPTIVE:0},uo={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},rs={NONE:0,BACKGROUND:1,PREVIOUS:2},ho={SOURCE:0,OVER:1};class Vf extends Po{constructor(t,i={}){super(t);we(this,"_checkCrc");we(this,"_inflator");we(this,"_png");we(this,"_apng");we(this,"_end");we(this,"_hasPalette");we(this,"_palette");we(this,"_hasTransparency");we(this,"_transparency");we(this,"_compressionMethod");we(this,"_filterMethod");we(this,"_interlaceMethod");we(this,"_colorType");we(this,"_isAnimated");we(this,"_numberOfFrames");we(this,"_numberOfPlays");we(this,"_frames");we(this,"_writingDataChunks");const{checkCrc:o=!1}=i;this._checkCrc=o,this._inflator=new Zl,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=lo.UNKNOWN,this._filterMethod=nu.UNKNOWN,this._interlaceMethod=uo.UNKNOWN,this._colorType=jr.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(ru(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeChunk(t,i)}return this.decodeImage(),this._png}decodeApng(){for(ru(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(t,i)}return this.decodeApngImage(),this._apng}decodeChunk(t,i){const o=this.offset;switch(i){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 Tf:Hf(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-o!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?tu(this,t+4,i):this.skip(4)}decodeApngChunk(t,i){const o=this.offset;switch(i!=="fdAT"&&i!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),i){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,i),this.offset=o+t;break}if(this.offset-o!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?tu(this,t+4,i):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=Gf(this.readUint8());const i=this.readUint8();this._colorType=i;let o;switch(i){case jr.GREYSCALE:o=1;break;case jr.TRUECOLOUR:o=3;break;case jr.INDEXED_COLOUR:o=1;break;case jr.GREYSCALE_ALPHA:o=2;break;case jr.TRUECOLOUR_ALPHA:o=4;break;case jr.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=o,this._compressionMethod=this.readUint8(),this._compressionMethod!==lo.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 i=t/3;this._hasPalette=!0;const o=[];this._palette=o;for(let s=0;s<i;s++)o.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const i=t,o=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,o,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let i=t,o=this.offset+this.byteOffset;if(o+=4,i-=4,this._inflator.push(new Uint8Array(this.buffer,o,i)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case jr.GREYSCALE:case jr.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._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 i=0;i<t/2;i++)this._transparency[i]=this.readUint16();break}case jr.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let i=0;for(;i<t;i++){const o=this.readByte();this._palette[i].push(o)}for(;i<this._palette.length;i++)this._palette[i].push(255);break}case jr.UNKNOWN:case jr.GREYSCALE_ALPHA:case jr.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const i=Qu(this),o=this.readUint8();if(o!==lo.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${o}`);const s=this.readBytes(t-i.length-2);this._png.iccEmbeddedProfile={name:i,profile:_f(s)}}decodepHYs(){const t=this.readUint32(),i=this.readUint32(),o=this.readByte();this._png.resolution={x:t,y:i,unit:o}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const i={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},o=this._frames.at(t);if(o){if(o.data=eu({data:o.data,width:o.width,height:o.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||o.xOffset===0&&o.yOffset===0&&o.width===this._png.width&&o.height===this._png.height)i.data=o.data;else{const s=this._apng.frames.at(t-1);this.disposeFrame(o,s,i),this.addFrameDataToCanvas(i,o)}this._apng.frames.push(i)}}return this._apng}disposeFrame(t,i,o){switch(t.disposeOp){case rs.NONE:break;case rs.BACKGROUND:for(let s=0;s<this._png.height;s++)for(let f=0;f<this._png.width;f++){const l=(s*t.width+f)*this._png.channels;for(let c=0;c<this._png.channels;c++)o.data[l+c]=0}break;case rs.PREVIOUS:o.data.set(i.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,i){const o=1<<this._png.depth,s=(f,l)=>{const c=((f+i.yOffset)*this._png.width+i.xOffset+l)*this._png.channels,d=(f*i.width+l)*this._png.channels;return{index:c,frameIndex:d}};switch(i.blendOp){case ho.SOURCE:for(let f=0;f<i.height;f++)for(let l=0;l<i.width;l++){const{index:c,frameIndex:d}=s(f,l);for(let m=0;m<this._png.channels;m++)t.data[c+m]=i.data[d+m]}break;case ho.OVER:for(let f=0;f<i.height;f++)for(let l=0;l<i.width;l++){const{index:c,frameIndex:d}=s(f,l);for(let m=0;m<this._png.channels;m++){const A=i.data[d+this._png.channels-1]/o,k=m%(this._png.channels-1)===0?1:i.data[d+m],p=Math.floor(A*k+(1-A)*t.data[c+m]);t.data[c+m]+=p}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var i;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?((i=this._frames)==null?void 0:i.at(0)).data:this._inflator.result;if(this._filterMethod!==nu.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===uo.NO_INTERLACE)this._png.data=eu({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===uo.ADAM7)this._png.data=Cf({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,i=this._frames.at(-1);i?i.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:rs.NONE,blendOp:ho.SOURCE,data:t}),this._inflator=new Zl,this._writingDataChunks=!1}}function Gf(r){if(r!==1&&r!==2&&r!==4&&r!==8&&r!==16)throw new Error(`invalid bit depth: ${r}`);return r}var iu;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.METRE=1]="METRE"})(iu||(iu={}));function Yf(r,e){return new Vf(r,e).decode()}var Yt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function co(){Yt.console&&typeof Yt.console.log=="function"&&Yt.console.log.apply(Yt.console,arguments)}var Le={log:co,warn:function(r){Yt.console&&(typeof Yt.console.warn=="function"?Yt.console.warn.apply(Yt.console,arguments):co.call(null,arguments))},error:function(r){Yt.console&&(typeof Yt.console.error=="function"?Yt.console.error.apply(Yt.console,arguments):co(r))}};function fo(r,e,t){var i=new XMLHttpRequest;i.open("GET",r),i.responseType="blob",i.onload=function(){ci(i.response,e,t)},i.onerror=function(){Le.error("could not download file")},i.send()}function au(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function ns(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var ci=Yt.saveAs||((typeof window>"u"?"undefined":Se(window))!=="object"||window!==Yt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var i=Yt.URL||Yt.webkitURL,o=document.createElement("a");e=e||r.name||"download",o.download=e,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?au(o.href)?fo(r,e,t):ns(o,o.target="_blank"):ns(o)):(o.href=i.createObjectURL(r),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){ns(o)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(au(r))fo(r,e,t);else{var i=document.createElement("a");i.href=r,i.target="_blank",setTimeout(function(){ns(i)})}else navigator.msSaveOrOpenBlob(function(o,s){return s===void 0?s={autoBom:!1}:Se(s)!=="object"&&(Le.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}(r,t),e)}:function(r,e,t,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof r=="string")return fo(r,e,t);var o=r.type==="application/octet-stream",s=/constructor/i.test(Yt.HTMLElement)||Yt.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||o&&s)&&(typeof FileReader>"u"?"undefined":Se(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var m=l.result;m=f?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=m:location=m,i=null},l.readAsDataURL(r)}else{var c=Yt.URL||Yt.webkitURL,d=c.createObjectURL(r);i?i.location=d:location.href=d,i=null,setTimeout(function(){c.revokeObjectURL(d)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function th(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={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"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],i=0;i<t.length;i++){var o=t[i].re,s=t[i].process,f=o.exec(r);f&&(e=s(f),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?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 l=this.r.toString(16),c=this.g.toString(16),d=this.b.toString(16);return l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),d.length==1&&(d="0"+d),"#"+l+c+d}}var ls=Yt.atob.bind(Yt),su=Yt.btoa.bind(Yt);/**
* @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 po(r,e){var t=r[0],i=r[1],o=r[2],s=r[3];t=dr(t,i,o,s,e[0],7,-680876936),s=dr(s,t,i,o,e[1],12,-389564586),o=dr(o,s,t,i,e[2],17,606105819),i=dr(i,o,s,t,e[3],22,-1044525330),t=dr(t,i,o,s,e[4],7,-176418897),s=dr(s,t,i,o,e[5],12,1200080426),o=dr(o,s,t,i,e[6],17,-1473231341),i=dr(i,o,s,t,e[7],22,-45705983),t=dr(t,i,o,s,e[8],7,1770035416),s=dr(s,t,i,o,e[9],12,-1958414417),o=dr(o,s,t,i,e[10],17,-42063),i=dr(i,o,s,t,e[11],22,-1990404162),t=dr(t,i,o,s,e[12],7,1804603682),s=dr(s,t,i,o,e[13],12,-40341101),o=dr(o,s,t,i,e[14],17,-1502002290),t=pr(t,i=dr(i,o,s,t,e[15],22,1236535329),o,s,e[1],5,-165796510),s=pr(s,t,i,o,e[6],9,-1069501632),o=pr(o,s,t,i,e[11],14,643717713),i=pr(i,o,s,t,e[0],20,-373897302),t=pr(t,i,o,s,e[5],5,-701558691),s=pr(s,t,i,o,e[10],9,38016083),o=pr(o,s,t,i,e[15],14,-660478335),i=pr(i,o,s,t,e[4],20,-405537848),t=pr(t,i,o,s,e[9],5,568446438),s=pr(s,t,i,o,e[14],9,-1019803690),o=pr(o,s,t,i,e[3],14,-187363961),i=pr(i,o,s,t,e[8],20,1163531501),t=pr(t,i,o,s,e[13],5,-1444681467),s=pr(s,t,i,o,e[2],9,-51403784),o=pr(o,s,t,i,e[7],14,1735328473),t=gr(t,i=pr(i,o,s,t,e[12],20,-1926607734),o,s,e[5],4,-378558),s=gr(s,t,i,o,e[8],11,-2022574463),o=gr(o,s,t,i,e[11],16,1839030562),i=gr(i,o,s,t,e[14],23,-35309556),t=gr(t,i,o,s,e[1],4,-1530992060),s=gr(s,t,i,o,e[4],11,1272893353),o=gr(o,s,t,i,e[7],16,-155497632),i=gr(i,o,s,t,e[10],23,-1094730640),t=gr(t,i,o,s,e[13],4,681279174),s=gr(s,t,i,o,e[0],11,-358537222),o=gr(o,s,t,i,e[3],16,-722521979),i=gr(i,o,s,t,e[6],23,76029189),t=gr(t,i,o,s,e[9],4,-640364487),s=gr(s,t,i,o,e[12],11,-421815835),o=gr(o,s,t,i,e[15],16,530742520),t=mr(t,i=gr(i,o,s,t,e[2],23,-995338651),o,s,e[0],6,-198630844),s=mr(s,t,i,o,e[7],10,1126891415),o=mr(o,s,t,i,e[14],15,-1416354905),i=mr(i,o,s,t,e[5],21,-57434055),t=mr(t,i,o,s,e[12],6,1700485571),s=mr(s,t,i,o,e[3],10,-1894986606),o=mr(o,s,t,i,e[10],15,-1051523),i=mr(i,o,s,t,e[1],21,-2054922799),t=mr(t,i,o,s,e[8],6,1873313359),s=mr(s,t,i,o,e[15],10,-30611744),o=mr(o,s,t,i,e[6],15,-1560198380),i=mr(i,o,s,t,e[13],21,1309151649),t=mr(t,i,o,s,e[4],6,-145523070),s=mr(s,t,i,o,e[11],10,-1120210379),o=mr(o,s,t,i,e[2],15,718787259),i=mr(i,o,s,t,e[9],21,-343485551),r[0]=Gn(t,r[0]),r[1]=Gn(i,r[1]),r[2]=Gn(o,r[2]),r[3]=Gn(s,r[3])}function bs(r,e,t,i,o,s){return e=Gn(Gn(e,r),Gn(i,s)),Gn(e<<o|e>>>32-o,t)}function dr(r,e,t,i,o,s,f){return bs(e&t|~e&i,r,e,o,s,f)}function pr(r,e,t,i,o,s,f){return bs(e&i|t&~i,r,e,o,s,f)}function gr(r,e,t,i,o,s,f){return bs(e^t^i,r,e,o,s,f)}function mr(r,e,t,i,o,s,f){return bs(t^(e|~i),r,e,o,s,f)}function eh(r){var e,t=r.length,i=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)po(i,Jf(r.substring(e-64,e)));r=r.substring(e-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(po(i,o),e=0;e<16;e++)o[e]=0;return o[14]=8*t,po(i,o),i}function Jf(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}var ou="0123456789abcdef".split("");function $f(r){for(var e="",t=0;t<4;t++)e+=ou[r>>8*t+4&15]+ou[r>>8*t&15];return e}function Kf(r){return String.fromCharCode(255&r,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function No(r){return eh(r).map(Kf).join("")}var Xf=function(r){for(var e=0;e<r.length;e++)r[e]=$f(r[e]);return r.join("")}(eh("hello"))!="5d41402abc4b2a76b9719d911017c592";function Gn(r,e){if(Xf){var t=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(t>>16)<<16|65535&t}return r+e&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 Lo(r,e){var t,i,o,s;if(r!==t){for(var f=(o=r,s=1+(256/r.length|0),new Array(s+1).join(o)),l=[],c=0;c<256;c++)l[c]=c;var d=0;for(c=0;c<256;c++){var m=l[c];d=(d+m+f.charCodeAt(c))%256,l[c]=l[d],l[d]=m}t=r,i=l}else l=i;var A=e.length,k=0,p=0,B="";for(c=0;c<A;c++)p=(p+(m=l[k=(k+1)%256]))%256,l[k]=l[p],l[p]=m,f=l[(l[k]+l[p])%256],B+=String.fromCharCode(e.charCodeAt(c)^f);return B}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var lu={print:4,modify:8,copy:16,"annot-forms":32};function Mi(r,e,t,i){this.v=1,this.r=2;var o=192;r.forEach(function(l){if(lu.perm!==void 0)throw new Error("Invalid permission: "+l);o+=lu[l]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var s=(e+this.padding).substr(0,32),f=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,f),this.P=-(1+(255^o)),this.encryptionKey=No(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=Lo(this.encryptionKey,this.padding)}function Ti(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,i=0;i<t;i++){var o=r.charCodeAt(i);e+=o<33||o===35||o===37||o===40||o===41||o===47||o===60||o===62||o===91||o===93||o===123||o===125||o>126?"#"+("0"+o.toString(16)).slice(-2):r[i]}return e}function uu(r){if(Se(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,i,o){if(o=o||!1,typeof t!="string"||typeof i!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var s=Math.random().toString(35);return e[t][s]=[i,!!o],s},this.unsubscribe=function(t){for(var i in e)if(e[i][t])return delete e[i][t],Object.keys(e[i]).length===0&&delete e[i],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var i=Array.prototype.slice.call(arguments,1),o=[];for(var s in e[t]){var f=e[t][s];try{f[0].apply(r,i)}catch(l){Yt.console&&Le.error("jsPDF PubSub Error",l.message,l)}f[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function ps(r){if(!(this instanceof ps))return new ps(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function rh(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function fi(r,e,t,i,o){if(!(this instanceof fi))return new fi(r,e,t,i,o);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,rh.call(this,i,o)}function Di(r,e,t,i,o){if(!(this instanceof Di))return new Di(r,e,t,i,o);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,rh.call(this,i,o)}function Mt(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],o=arguments[2],s=arguments[3],f=[],l=1,c=16,d="S",m=null;Se(r=r||{})==="object"&&(t=r.orientation,i=r.unit||i,o=r.format||o,s=r.compress||r.compressPdf||s,(m=r.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),l=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(c=r.floatPrecision),d=r.defaultPathOperation||"S"),f=r.filters||(s===!0?["FlateEncode"]:f),i=i||"mm",t=(""+(t||"P")).toLowerCase();var A=r.putOnlyUsedFonts||!1,k={},p={internal:{},__private__:{}};p.__private__.PubSub=uu;var B="1.3",E=p.__private__.getPdfVersion=function(){return B};p.__private__.setPdfVersion=function(u){B=u};var R={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]};p.__private__.getPageFormats=function(){return R};var S=p.__private__.getPageFormat=function(u){return R[u]};o=o||"a4";var Y="compat",V="advanced",D=Y;function ut(){this.saveGraphicsState(),O(new Wt(Vt,0,0,-Vt,0,Sr()*Vt).toString()+" cm"),this.setFontSize(this.getFontSize()/Vt),d="n",D=V}function yt(){this.restoreGraphicsState(),d="S",D=Y}var ft=p.__private__.combineFontStyleAndFontWeight=function(u,v){if(u=="bold"&&v=="normal"||u=="bold"&&v==400||u=="normal"&&v=="italic"||u=="bold"&&v=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return v&&(u=v==400||v==="normal"?u==="italic"?"italic":"normal":v!=700&&v!=="bold"||u!=="normal"?(v==700?"bold":v)+""+u:"bold"),u};p.advancedAPI=function(u){var v=D===Y;return v&&ut.call(this),typeof u!="function"||(u(this),v&&yt.call(this)),this},p.compatAPI=function(u){var v=D===V;return v&&yt.call(this),typeof u!="function"||(u(this),v&&ut.call(this)),this},p.isAdvancedAPI=function(){return D===V};var tt,z=function(u){if(D!==V)throw new Error(u+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},et=p.roundToPrecision=p.__private__.roundToPrecision=function(u,v){var C=e||v;if(isNaN(u)||isNaN(C))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return u.toFixed(C).replace(/0+$/,"")};tt=p.hpf=p.__private__.hpf=typeof c=="number"?function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return et(u,c)}:c==="smart"?function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return et(u,u>-1&&u<1?16:5)}:function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return et(u,16)};var N=p.f2=p.__private__.f2=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.f2");return et(u,2)},F=p.__private__.f3=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.f3");return et(u,3)},H=p.scale=p.__private__.scale=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.scale");return D===Y?u*Vt:D===V?u:void 0},U=function(u){return H(function(v){return D===Y?Sr()-v:D===V?v:void 0}(u))};p.__private__.setPrecision=p.setPrecision=function(u){typeof parseInt(u,10)=="number"&&(e=parseInt(u,10))};var it,dt="00000000000000000000000000000000",vt=p.__private__.getFileId=function(){return dt},rt=p.__private__.setFileId=function(u){return dt=u!==void 0&&/^[a-fA-F0-9]{32}$/.test(u)?u.toUpperCase():dt.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(De=new Mi(m.userPermissions,m.userPassword,m.ownerPassword,dt)),dt};p.setFileId=function(u){return rt(u),this},p.getFileId=function(){return vt()};var pt=p.__private__.convertDateToPDFDate=function(u){var v=u.getTimezoneOffset(),C=v<0?"+":"-",T=Math.floor(Math.abs(v/60)),J=Math.abs(v%60),ht=[C,M(T),"'",M(J),"'"].join("");return["D:",u.getFullYear(),M(u.getMonth()+1),M(u.getDate()),M(u.getHours()),M(u.getMinutes()),M(u.getSeconds()),ht].join("")},Nt=p.__private__.convertPDFDateToDate=function(u){var v=parseInt(u.substr(2,4),10),C=parseInt(u.substr(6,2),10)-1,T=parseInt(u.substr(8,2),10),J=parseInt(u.substr(10,2),10),ht=parseInt(u.substr(12,2),10),bt=parseInt(u.substr(14,2),10);return new Date(v,C,T,J,ht,bt,0)},_t=p.__private__.setCreationDate=function(u){var v;if(u===void 0&&(u=new Date),u instanceof Date)v=pt(u);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(u))throw new Error("Invalid argument passed to jsPDF.setCreationDate");v=u}return it=v},x=p.__private__.getCreationDate=function(u){var v=it;return u==="jsDate"&&(v=Nt(it)),v};p.setCreationDate=function(u){return _t(u),this},p.getCreationDate=function(u){return x(u)};var j,M=p.__private__.padd2=function(u){return("0"+parseInt(u)).slice(-2)},G=p.__private__.padd2Hex=function(u){return("00"+(u=u.toString())).substr(u.length)},$=0,Q=[],lt=[],nt=0,gt=[],At=[],kt=!1,Pt=lt;p.__private__.setCustomOutputDestination=function(u){kt=!0,Pt=u};var st=function(u){kt||(Pt=u)};p.__private__.resetCustomOutputDestination=function(){kt=!1,Pt=lt};var O=p.__private__.out=function(u){return u=u.toString(),nt+=u.length+1,Pt.push(u),Pt},le=p.__private__.write=function(u){return O(arguments.length===1?u.toString():Array.prototype.join.call(arguments," "))},re=p.__private__.getArrayBuffer=function(u){for(var v=u.length,C=new ArrayBuffer(v),T=new Uint8Array(C);v--;)T[v]=u.charCodeAt(v);return C},zt=[["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]];p.__private__.getStandardFonts=function(){return zt};var xt=r.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(u){return xt=D===V?u/Vt:u,this};var Tt,St=p.__private__.getFontSize=p.getFontSize=function(){return D===Y?xt:xt*Vt},ne=r.R2L||!1;p.__private__.setR2L=p.setR2L=function(u){return ne=u,this},p.__private__.getR2L=p.getR2L=function(){return ne};var Ut,de=p.__private__.setZoomMode=function(u){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(u))Tt=u;else if(isNaN(u)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(u)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+u+'" is not recognized.');Tt=u}else Tt=parseInt(u,10)};p.__private__.getZoomMode=function(){return Tt};var Xt,Zt=p.__private__.setPageMode=function(u){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(u)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+u+'" is not recognized.');Ut=u};p.__private__.getPageMode=function(){return Ut};var ye=p.__private__.setLayoutMode=function(u){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(u)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+u+'" is not recognized.');Xt=u};p.__private__.getLayoutMode=function(){return Xt},p.__private__.setDisplayMode=p.setDisplayMode=function(u,v,C){return de(u),ye(v),Zt(C),this};var ie={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(u){if(Object.keys(ie).indexOf(u)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ie[u]},p.__private__.getDocumentProperties=function(){return ie},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(u){for(var v in ie)ie.hasOwnProperty(v)&&u[v]&&(ie[v]=u[v]);return this},p.__private__.setDocumentProperty=function(u,v){if(Object.keys(ie).indexOf(u)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ie[u]=v};var Dt,Vt,qt,ke,pe,Bt={},Qt={},_e=[],Ht={},ue={},te={},Te={},Xe=null,Ae=0,Jt=[],me=new uu(p),Jn=r.hotfixes||[],cr={},gn={},tn=[],Wt=function u(v,C,T,J,ht,bt){if(!(this instanceof u))return new u(v,C,T,J,ht,bt);isNaN(v)&&(v=1),isNaN(C)&&(C=0),isNaN(T)&&(T=0),isNaN(J)&&(J=1),isNaN(ht)&&(ht=0),isNaN(bt)&&(bt=0),this._matrix=[v,C,T,J,ht,bt]};Object.defineProperty(Wt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(u){this._matrix[0]=u}}),Object.defineProperty(Wt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(u){this._matrix[1]=u}}),Object.defineProperty(Wt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(u){this._matrix[2]=u}}),Object.defineProperty(Wt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(u){this._matrix[3]=u}}),Object.defineProperty(Wt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(u){this._matrix[4]=u}}),Object.defineProperty(Wt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(u){this._matrix[5]=u}}),Object.defineProperty(Wt.prototype,"a",{get:function(){return this._matrix[0]},set:function(u){this._matrix[0]=u}}),Object.defineProperty(Wt.prototype,"b",{get:function(){return this._matrix[1]},set:function(u){this._matrix[1]=u}}),Object.defineProperty(Wt.prototype,"c",{get:function(){return this._matrix[2]},set:function(u){this._matrix[2]=u}}),Object.defineProperty(Wt.prototype,"d",{get:function(){return this._matrix[3]},set:function(u){this._matrix[3]=u}}),Object.defineProperty(Wt.prototype,"e",{get:function(){return this._matrix[4]},set:function(u){this._matrix[4]=u}}),Object.defineProperty(Wt.prototype,"f",{get:function(){return this._matrix[5]},set:function(u){this._matrix[5]=u}}),Object.defineProperty(Wt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Wt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Wt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Wt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Wt.prototype.join=function(u){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(tt).join(u)},Wt.prototype.multiply=function(u){var v=u.sx*this.sx+u.shy*this.shx,C=u.sx*this.shy+u.shy*this.sy,T=u.shx*this.sx+u.sy*this.shx,J=u.shx*this.shy+u.sy*this.sy,ht=u.tx*this.sx+u.ty*this.shx+this.tx,bt=u.tx*this.shy+u.ty*this.sy+this.ty;return new Wt(v,C,T,J,ht,bt)},Wt.prototype.decompose=function(){var u=this.sx,v=this.shy,C=this.shx,T=this.sy,J=this.tx,ht=this.ty,bt=Math.sqrt(u*u+v*v),Ft=(u/=bt)*C+(v/=bt)*T;C-=u*Ft,T-=v*Ft;var jt=Math.sqrt(C*C+T*T);return Ft/=jt,u*(T/=jt)<v*(C/=jt)&&(u=-u,v=-v,Ft=-Ft,bt=-bt),{scale:new Wt(bt,0,0,jt,0,0),translate:new Wt(1,0,0,1,J,ht),rotate:new Wt(u,v,-v,u,0,0),skew:new Wt(1,0,Ft,1,0,0)}},Wt.prototype.toString=function(u){return this.join(" ")},Wt.prototype.inversed=function(){var u=this.sx,v=this.shy,C=this.shx,T=this.sy,J=this.tx,ht=this.ty,bt=1/(u*T-v*C),Ft=T*bt,jt=-v*bt,Gt=-C*bt,ae=u*bt;return new Wt(Ft,jt,Gt,ae,-Ft*J-Gt*ht,-jt*J-ae*ht)},Wt.prototype.applyToPoint=function(u){var v=u.x*this.sx+u.y*this.shx+this.tx,C=u.x*this.shy+u.y*this.sy+this.ty;return new ii(v,C)},Wt.prototype.applyToRectangle=function(u){var v=this.applyToPoint(u),C=this.applyToPoint(new ii(u.x+u.w,u.y+u.h));return new ea(v.x,v.y,C.x-v.x,C.y-v.y)},Wt.prototype.clone=function(){var u=this.sx,v=this.shy,C=this.shx,T=this.sy,J=this.tx,ht=this.ty;return new Wt(u,v,C,T,J,ht)},p.Matrix=Wt;var mn=p.matrixMult=function(u,v){return v.multiply(u)},bn=new Wt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=bn;var Br=function(u,v){if(!ue[u]){var C=(v instanceof fi?"Sh":"P")+(Object.keys(Ht).length+1).toString(10);v.id=C,ue[u]=C,Ht[C]=v,me.publish("addPattern",v)}};p.ShadingPattern=fi,p.TilingPattern=Di,p.addShadingPattern=function(u,v){return z("addShadingPattern()"),Br(u,v),this},p.beginTilingPattern=function(u){z("beginTilingPattern()"),ra(u.boundingBox[0],u.boundingBox[1],u.boundingBox[2]-u.boundingBox[0],u.boundingBox[3]-u.boundingBox[1],u.matrix)},p.endTilingPattern=function(u,v){z("endTilingPattern()"),v.stream=At[j].join(`
`),Br(u,v),me.publish("endTilingPattern",v),tn.pop().restore()};var Rr,je=p.__private__.newObject=function(){var u=nr();return sr(u,!0),u},nr=p.__private__.newObjectDeferred=function(){return $++,Q[$]=function(){return nt},$},sr=function(u,v){return v=typeof v=="boolean"&&v,Q[u]=nt,v&&O(u+" 0 obj"),u},$n=p.__private__.newAdditionalObject=function(){var u={objId:nr(),content:""};return gt.push(u),u},Fn=nr(),Hr=nr(),en=p.__private__.decodeColorString=function(u){var v=u.split(" ");if(v.length!==2||v[1]!=="g"&&v[1]!=="G")v.length!==5||v[4]!=="k"&&v[4]!=="K"||(v=[(1-v[0])*(1-v[3]),(1-v[1])*(1-v[3]),(1-v[2])*(1-v[3]),"r"]);else{var C=parseFloat(v[0]);v=[C,C,C,"r"]}for(var T="#",J=0;J<3;J++)T+=("0"+Math.floor(255*parseFloat(v[J])).toString(16)).slice(-2);return T},Wr=p.__private__.encodeColorString=function(u){var v;typeof u=="string"&&(u={ch1:u});var C=u.ch1,T=u.ch2,J=u.ch3,ht=u.ch4,bt=u.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof C=="string"&&C.charAt(0)!=="#"){var Ft=new th(C);if(Ft.ok)C=Ft.toHex();else if(!/^\d*\.?\d*$/.test(C))throw new Error('Invalid color "'+C+'" passed to jsPDF.encodeColorString.')}if(typeof C=="string"&&/^#[0-9A-Fa-f]{3}$/.test(C)&&(C="#"+C[1]+C[1]+C[2]+C[2]+C[3]+C[3]),typeof C=="string"&&/^#[0-9A-Fa-f]{6}$/.test(C)){var jt=parseInt(C.substr(1),16);C=jt>>16&255,T=jt>>8&255,J=255&jt}if(T===void 0||ht===void 0&&C===T&&T===J)v=typeof C=="string"?C+" "+bt[0]:u.precision===2?N(C/255)+" "+bt[0]:F(C/255)+" "+bt[0];else if(ht===void 0||Se(ht)==="object"){if(ht&&!isNaN(ht.a)&&ht.a===0)return["1.","1.","1.",bt[1]].join(" ");v=typeof C=="string"?[C,T,J,bt[1]].join(" "):u.precision===2?[N(C/255),N(T/255),N(J/255),bt[1]].join(" "):[F(C/255),F(T/255),F(J/255),bt[1]].join(" ")}else v=typeof C=="string"?[C,T,J,ht,bt[2]].join(" "):u.precision===2?[N(C),N(T),N(J),N(ht),bt[2]].join(" "):[F(C),F(T),F(J),F(ht),bt[2]].join(" ");return v},Vr=p.__private__.getFilters=function(){return f},Mr=p.__private__.putStream=function(u){var v=(u=u||{}).data||"",C=u.filters||Vr(),T=u.alreadyAppliedFilters||[],J=u.addLength1||!1,ht=v.length,bt=u.objectId,Ft=function(Ze){return Ze};if(m!==null&&bt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(Ft=De.encryptor(bt,0));var jt={};C===!0&&(C=["FlateEncode"]);var Gt=u.additionalKeyValues||[],ae=(jt=Mt.API.processDataByFilters!==void 0?Mt.API.processDataByFilters(v,C):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(T)?T.join(" "):T.toString());if(jt.data.length!==0&&(Gt.push({key:"Length",value:jt.data.length}),J===!0&&Gt.push({key:"Length1",value:ht})),ae.length!=0)if(ae.split("/").length-1==1)Gt.push({key:"Filter",value:ae});else{Gt.push({key:"Filter",value:"["+ae+"]"});for(var ge=0;ge<Gt.length;ge+=1)if(Gt[ge].key==="DecodeParms"){for(var Oe=[],$e=0;$e<jt.reverseChain.split("/").length-1;$e+=1)Oe.push("null");Oe.push(Gt[ge].value),Gt[ge].value="["+Oe.join(" ")+"]"}}O("<<");for(var xe=0;xe<Gt.length;xe++)O("/"+Gt[xe].key+" "+Gt[xe].value);O(">>"),jt.data.length!==0&&(O("stream"),O(Ft(jt.data)),O("endstream"))},Kn=p.__private__.putPage=function(u){var v=u.number,C=u.data,T=u.objId,J=u.contentsObjId;sr(T,!0),O("<</Type /Page"),O("/Parent "+u.rootDictionaryObjId+" 0 R"),O("/Resources "+u.resourceDictionaryObjId+" 0 R"),O("/MediaBox ["+parseFloat(tt(u.mediaBox.bottomLeftX))+" "+parseFloat(tt(u.mediaBox.bottomLeftY))+" "+tt(u.mediaBox.topRightX)+" "+tt(u.mediaBox.topRightY)+"]"),u.cropBox!==null&&O("/CropBox ["+tt(u.cropBox.bottomLeftX)+" "+tt(u.cropBox.bottomLeftY)+" "+tt(u.cropBox.topRightX)+" "+tt(u.cropBox.topRightY)+"]"),u.bleedBox!==null&&O("/BleedBox ["+tt(u.bleedBox.bottomLeftX)+" "+tt(u.bleedBox.bottomLeftY)+" "+tt(u.bleedBox.topRightX)+" "+tt(u.bleedBox.topRightY)+"]"),u.trimBox!==null&&O("/TrimBox ["+tt(u.trimBox.bottomLeftX)+" "+tt(u.trimBox.bottomLeftY)+" "+tt(u.trimBox.topRightX)+" "+tt(u.trimBox.topRightY)+"]"),u.artBox!==null&&O("/ArtBox ["+tt(u.artBox.bottomLeftX)+" "+tt(u.artBox.bottomLeftY)+" "+tt(u.artBox.topRightX)+" "+tt(u.artBox.topRightY)+"]"),typeof u.userUnit=="number"&&u.userUnit!==1&&O("/UserUnit "+u.userUnit),me.publish("putPage",{objId:T,pageContext:Jt[v],pageNumber:v,page:C}),O("/Contents "+J+" 0 R"),O(">>"),O("endobj");var ht=C.join(`
`);return D===V&&(ht+=`
Q`),sr(J,!0),Mr({data:ht,filters:Vr(),objectId:J}),O("endobj"),T},rn=p.__private__.putPages=function(){var u,v,C=[];for(u=1;u<=Ae;u++)Jt[u].objId=nr(),Jt[u].contentsObjId=nr();for(u=1;u<=Ae;u++)C.push(Kn({number:u,data:At[u],objId:Jt[u].objId,contentsObjId:Jt[u].contentsObjId,mediaBox:Jt[u].mediaBox,cropBox:Jt[u].cropBox,bleedBox:Jt[u].bleedBox,trimBox:Jt[u].trimBox,artBox:Jt[u].artBox,userUnit:Jt[u].userUnit,rootDictionaryObjId:Fn,resourceDictionaryObjId:Hr}));sr(Fn,!0),O("<</Type /Pages");var T="/Kids [";for(v=0;v<Ae;v++)T+=C[v]+" 0 R ";O(T+"]"),O("/Count "+Ae),O(">>"),O("endobj"),me.publish("postPutPages")},Xn=function(u){me.publish("putFont",{font:u,out:O,newObject:je,putStream:Mr}),u.isAlreadyPutted!==!0&&(u.objectNumber=je(),O("<<"),O("/Type /Font"),O("/BaseFont /"+Ti(u.postScriptName)),O("/Subtype /Type1"),typeof u.encoding=="string"&&O("/Encoding /"+u.encoding),O("/FirstChar 32"),O("/LastChar 255"),O(">>"),O("endobj"))},bi=function(u){u.objectNumber=je();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[tt(u.x),tt(u.y),tt(u.x+u.width),tt(u.y+u.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+u.matrix.toString()+"]"});var C=u.pages[1].join(`
`);Mr({data:C,additionalKeyValues:v,objectId:u.objectNumber}),O("endobj")},vi=function(u,v){v||(v=21);var C=je(),T=function(bt,Ft){var jt,Gt=[],ae=1/(Ft-1);for(jt=0;jt<1;jt+=ae)Gt.push(jt);if(Gt.push(1),bt[0].offset!=0){var ge={offset:0,color:bt[0].color};bt.unshift(ge)}if(bt[bt.length-1].offset!=1){var Oe={offset:1,color:bt[bt.length-1].color};bt.push(Oe)}for(var $e="",xe=0,Ze=0;Ze<Gt.length;Ze++){for(jt=Gt[Ze];jt>bt[xe+1].offset;)xe++;var Ke=bt[xe].offset,or=(jt-Ke)/(bt[xe+1].offset-Ke),xn=bt[xe].color,jn=bt[xe+1].color;$e+=G(Math.round((1-or)*xn[0]+or*jn[0]).toString(16))+G(Math.round((1-or)*xn[1]+or*jn[1]).toString(16))+G(Math.round((1-or)*xn[2]+or*jn[2]).toString(16))}return $e.trim()}(u.colors,v),J=[];J.push({key:"FunctionType",value:"0"}),J.push({key:"Domain",value:"[0.0 1.0]"}),J.push({key:"Size",value:"["+v+"]"}),J.push({key:"BitsPerSample",value:"8"}),J.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),J.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Mr({data:T,additionalKeyValues:J,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:C}),O("endobj"),u.objectNumber=je(),O("<< /ShadingType "+u.type),O("/ColorSpace /DeviceRGB");var ht="/Coords ["+tt(parseFloat(u.coords[0]))+" "+tt(parseFloat(u.coords[1]))+" ";u.type===2?ht+=tt(parseFloat(u.coords[2]))+" "+tt(parseFloat(u.coords[3])):ht+=tt(parseFloat(u.coords[2]))+" "+tt(parseFloat(u.coords[3]))+" "+tt(parseFloat(u.coords[4]))+" "+tt(parseFloat(u.coords[5])),O(ht+="]"),u.matrix&&O("/Matrix ["+u.matrix.toString()+"]"),O("/Function "+C+" 0 R"),O("/Extend [true true]"),O(">>"),O("endobj")},wi=function(u,v){var C=nr(),T=je();v.push({resourcesOid:C,objectOid:T}),u.objectNumber=T;var J=[];J.push({key:"Type",value:"/Pattern"}),J.push({key:"PatternType",value:"1"}),J.push({key:"PaintType",value:"1"}),J.push({key:"TilingType",value:"1"}),J.push({key:"BBox",value:"["+u.boundingBox.map(tt).join(" ")+"]"}),J.push({key:"XStep",value:tt(u.xStep)}),J.push({key:"YStep",value:tt(u.yStep)}),J.push({key:"Resources",value:C+" 0 R"}),u.matrix&&J.push({key:"Matrix",value:"["+u.matrix.toString()+"]"}),Mr({data:u.stream,additionalKeyValues:J,objectId:u.objectNumber}),O("endobj")},vs=function(u){for(var v in u.objectNumber=je(),O("<<"),u)switch(v){case"opacity":O("/ca "+N(u[v]));break;case"stroke-opacity":O("/CA "+N(u[v]))}O(">>"),O("endobj")},Vi=function(u){sr(u.resourcesOid,!0),O("<<"),O("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var v in O("/Font <<"),Bt)Bt.hasOwnProperty(v)&&(A===!1||A===!0&&k.hasOwnProperty(v))&&O("/"+v+" "+Bt[v].objectNumber+" 0 R");O(">>")}(),function(){if(Object.keys(Ht).length>0){for(var v in O("/Shading <<"),Ht)Ht.hasOwnProperty(v)&&Ht[v]instanceof fi&&Ht[v].objectNumber>=0&&O("/"+v+" "+Ht[v].objectNumber+" 0 R");me.publish("putShadingPatternDict"),O(">>")}}(),function(v){if(Object.keys(Ht).length>0){for(var C in O("/Pattern <<"),Ht)Ht.hasOwnProperty(C)&&Ht[C]instanceof p.TilingPattern&&Ht[C].objectNumber>=0&&Ht[C].objectNumber<v&&O("/"+C+" "+Ht[C].objectNumber+" 0 R");me.publish("putTilingPatternDict"),O(">>")}}(u.objectOid),function(){if(Object.keys(te).length>0){var v;for(v in O("/ExtGState <<"),te)te.hasOwnProperty(v)&&te[v].objectNumber>=0&&O("/"+v+" "+te[v].objectNumber+" 0 R");me.publish("putGStateDict"),O(">>")}}(),function(){for(var v in O("/XObject <<"),cr)cr.hasOwnProperty(v)&&cr[v].objectNumber>=0&&O("/"+v+" "+cr[v].objectNumber+" 0 R");me.publish("putXobjectDict"),O(">>")}(),O(">>"),O("endobj")},Aa=function(u){Qt[u.fontName]=Qt[u.fontName]||{},Qt[u.fontName][u.fontStyle]=u.id},Na=function(u,v,C,T,J){var ht={id:"F"+(Object.keys(Bt).length+1).toString(10),postScriptName:u,fontName:v,fontStyle:C,encoding:T,isStandardFont:J||!1,metadata:{}};return me.publish("addFont",{font:ht,instance:this}),Bt[ht.id]=ht,Aa(ht),ht.id},Tr=p.__private__.pdfEscape=p.pdfEscape=function(u,v){return function(C,T){var J,ht,bt,Ft,jt,Gt,ae,ge,Oe;if(bt=(T=T||{}).sourceEncoding||"Unicode",jt=T.outputEncoding,(T.autoencode||jt)&&Bt[Dt].metadata&&Bt[Dt].metadata[bt]&&Bt[Dt].metadata[bt].encoding&&(Ft=Bt[Dt].metadata[bt].encoding,!jt&&Bt[Dt].encoding&&(jt=Bt[Dt].encoding),!jt&&Ft.codePages&&(jt=Ft.codePages[0]),typeof jt=="string"&&(jt=Ft[jt]),jt)){for(ae=!1,Gt=[],J=0,ht=C.length;J<ht;J++)(ge=jt[C.charCodeAt(J)])?Gt.push(String.fromCharCode(ge)):Gt.push(C[J]),Gt[J].charCodeAt(0)>>8&&(ae=!0);C=Gt.join("")}for(J=C.length;ae===void 0&&J!==0;)C.charCodeAt(J-1)>>8&&(ae=!0),J--;if(!ae)return C;for(Gt=T.noBOM?[]:[254,255],J=0,ht=C.length;J<ht;J++){if((Oe=(ge=C.charCodeAt(J))>>8)>>8)throw new Error("Character at position "+J+" of string '"+C+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Gt.push(Oe),Gt.push(ge-(Oe<<8))}return String.fromCharCode.apply(void 0,Gt)}(u,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Gi=p.__private__.beginPage=function(u){At[++Ae]=[],Jt[Ae]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(u[0]),topRightY:Number(u[1])}},Sa(Ae),st(At[j])},La=function(u,v){var C,T,J;switch(t=v||t,typeof u=="string"&&(C=S(u.toLowerCase()),Array.isArray(C)&&(T=C[0],J=C[1])),Array.isArray(u)&&(T=u[0]*Vt,J=u[1]*Vt),isNaN(T)&&(T=o[0],J=o[1]),(T>14400||J>14400)&&(Le.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),T=Math.min(14400,T),J=Math.min(14400,J)),o=[T,J],t.substr(0,1)){case"l":J>T&&(o=[J,T]);break;case"p":T>J&&(o=[J,T])}Gi(o),ks(Xi),O(xi),Qi!==0&&O(Qi+" J"),ta!==0&&O(ta+" j"),me.publish("addPage",{pageNumber:Ae})},Yi=function(u){u>0&&u<=Ae&&(At.splice(u,1),Jt.splice(u,1),Ae--,j>Ae&&(j=Ae),this.setPage(j))},Sa=function(u){u>0&&u<=Ae&&(j=u)},ka=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return At.length-1},Pa=function(u,v,C){var T,J=void 0;return C=C||{},u=u!==void 0?u:Bt[Dt].fontName,v=v!==void 0?v:Bt[Dt].fontStyle,T=u.toLowerCase(),Qt[T]!==void 0&&Qt[T][v]!==void 0?J=Qt[T][v]:Qt[u]!==void 0&&Qt[u][v]!==void 0?J=Qt[u][v]:C.disableWarning===!1&&Le.warn("Unable to look up font label for font '"+u+"', '"+v+"'. Refer to getFontList() for available fonts."),J||C.noFallback||(J=Qt.times[v])==null&&(J=Qt.times.normal),J},yi=p.__private__.putInfo=function(){var u=je(),v=function(T){return T};for(var C in m!==null&&(v=De.encryptor(u,0)),O("<<"),O("/Producer ("+Tr(v("jsPDF "+Mt.version))+")"),ie)ie.hasOwnProperty(C)&&ie[C]&&O("/"+C.substr(0,1).toUpperCase()+C.substr(1)+" ("+Tr(v(ie[C]))+")");O("/CreationDate ("+Tr(v(it))+")"),O(">>"),O("endobj")},ws=p.__private__.putCatalog=function(u){var v=(u=u||{}).rootDictionaryObjId||Fn;switch(je(),O("<<"),O("/Type /Catalog"),O("/Pages "+v+" 0 R"),Tt||(Tt="fullwidth"),Tt){case"fullwidth":O("/OpenAction [3 0 R /FitH null]");break;case"fullheight":O("/OpenAction [3 0 R /FitV null]");break;case"fullpage":O("/OpenAction [3 0 R /Fit]");break;case"original":O("/OpenAction [3 0 R /XYZ null null 1]");break;default:var C=""+Tt;C.substr(C.length-1)==="%"&&(Tt=parseInt(Tt)/100),typeof Tt=="number"&&O("/OpenAction [3 0 R /XYZ null null "+N(Tt)+"]")}switch(Xt||(Xt="continuous"),Xt){case"continuous":O("/PageLayout /OneColumn");break;case"single":O("/PageLayout /SinglePage");break;case"two":case"twoleft":O("/PageLayout /TwoColumnLeft");break;case"tworight":O("/PageLayout /TwoColumnRight")}Ut&&O("/PageMode /"+Ut),me.publish("putCatalog"),O(">>"),O("endobj")},Je=p.__private__.putTrailer=function(){O("trailer"),O("<<"),O("/Size "+($+1)),O("/Root "+$+" 0 R"),O("/Info "+($-1)+" 0 R"),m!==null&&O("/Encrypt "+De.oid+" 0 R"),O("/ID [ <"+dt+"> <"+dt+"> ]"),O(">>")},Ia=p.__private__.putHeader=function(){O("%PDF-"+B),O("%ºß¬à")},Ca=p.__private__.putXRef=function(){var u="0000000000";O("xref"),O("0 "+($+1)),O("0000000000 65535 f ");for(var v=1;v<=$;v++)typeof Q[v]=="function"?O((u+Q[v]()).slice(-10)+" 00000 n "):Q[v]!==void 0?O((u+Q[v]).slice(-10)+" 00000 n "):O("0000000000 00000 n ")},vn=p.__private__.buildDocument=function(){var u;$=0,nt=0,lt=[],Q=[],gt=[],Fn=nr(),Hr=nr(),st(lt),me.publish("buildDocument"),Ia(),rn(),function(){me.publish("putAdditionalObjects");for(var C=0;C<gt.length;C++){var T=gt[C];sr(T.objId,!0),O(T.content),O("endobj")}me.publish("postPutAdditionalObjects")}(),u=[],function(){for(var C in Bt)Bt.hasOwnProperty(C)&&(A===!1||A===!0&&k.hasOwnProperty(C))&&Xn(Bt[C])}(),function(){var C;for(C in te)te.hasOwnProperty(C)&&vs(te[C])}(),function(){for(var C in cr)cr.hasOwnProperty(C)&&bi(cr[C])}(),function(C){var T;for(T in Ht)Ht.hasOwnProperty(T)&&(Ht[T]instanceof fi?vi(Ht[T]):Ht[T]instanceof Di&&wi(Ht[T],C))}(u),me.publish("putResources"),u.forEach(Vi),Vi({resourcesOid:Hr,objectOid:Number.MAX_SAFE_INTEGER}),me.publish("postPutResources"),m!==null&&(De.oid=je(),O("<<"),O("/Filter /Standard"),O("/V "+De.v),O("/R "+De.r),O("/U <"+De.toHexString(De.U)+">"),O("/O <"+De.toHexString(De.O)+">"),O("/P "+De.P),O(">>"),O("endobj")),yi(),ws();var v=nt;return Ca(),Je(),O("startxref"),O(""+v),O("%%EOF"),st(At[j]),lt.join(`
`)},Zn=p.__private__.getBlob=function(u){return new Blob([re(u)],{type:"application/pdf"})},Gr=p.output=p.__private__.output=(Rr=function(u,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",u){case void 0:return vn();case"save":p.save(v.filename);break;case"arraybuffer":return re(vn());case"blob":return Zn(vn());case"bloburi":case"bloburl":if(Yt.URL!==void 0&&typeof Yt.URL.createObjectURL=="function")return Yt.URL&&Yt.URL.createObjectURL(Zn(vn()))||void 0;Le.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var C="",T=vn();try{C=su(T)}catch{C=su(unescape(encodeURIComponent(T)))}return"data:application/pdf;filename="+v.filename+";base64,"+C;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Yt)==="[object Window]"){var J="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ht=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';v.pdfObjectUrl&&(J=v.pdfObjectUrl,ht="");var bt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+J+'"'+ht+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(v)+");<\/script></body></html>",Ft=Yt.open();return Ft!==null&&Ft.document.write(bt),Ft}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Yt)==="[object Window]"){var jt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(v.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+v.filename+'" width="500px" height="400px" /></body></html>',Gt=Yt.open();if(Gt!==null){Gt.document.write(jt);var ae=this;Gt.document.documentElement.querySelector("#pdfViewer").onload=function(){Gt.document.title=v.filename,Gt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(ae.output("bloburl"))}}return Gt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Yt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var ge='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",v)+'"></iframe></body></html>',Oe=Yt.open();if(Oe!==null&&(Oe.document.write(ge),Oe.document.title=v.filename),Oe||typeof safari>"u")return Oe;break;case"datauri":case"dataurl":return Yt.document.location.href=this.output("datauristring",v);default:return null}},Rr.foo=function(){try{return Rr.apply(this,arguments)}catch(C){var u=C.stack||"";~u.indexOf(" at ")&&(u=u.split(" at ")[1]);var v="Error in function "+u.split(`
`)[0].split("<")[0]+": "+C.message;if(!Yt.console)throw new Error(v);Yt.console.error(v,C),Yt.alert&&alert(v)}},Rr.foo.bar=Rr,Rr.foo),Qn=function(u){return Array.isArray(Jn)===!0&&Jn.indexOf(u)>-1};switch(i){case"pt":Vt=1;break;case"mm":Vt=72/25.4;break;case"cm":Vt=72/2.54;break;case"in":Vt=72;break;case"px":Vt=Qn("px_scaling")==1?.75:96/72;break;case"pc":case"em":Vt=12;break;case"ex":Vt=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);Vt=i}var De=null;_t(),rt();var Ji=p.__private__.getPageInfo=p.getPageInfo=function(u){if(isNaN(u)||u%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Jt[u].objId,pageNumber:u,pageContext:Jt[u]}},ys=p.__private__.getPageInfoByObjId=function(u){if(isNaN(u)||u%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in Jt)if(Jt[v].objId===u)break;return Ji(v)},xs=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Jt[j].objId,pageNumber:j,pageContext:Jt[j]}};p.addPage=function(){return La.apply(this,arguments),this},p.setPage=function(){return Sa.apply(this,arguments),st.call(this,At[j]),this},p.insertPage=function(u){return this.addPage(),this.movePage(j,u),this},p.movePage=function(u,v){var C,T;if(u>v){C=At[u],T=Jt[u];for(var J=u;J>v;J--)At[J]=At[J-1],Jt[J]=Jt[J-1];At[v]=C,Jt[v]=T,this.setPage(v)}else if(u<v){C=At[u],T=Jt[u];for(var ht=u;ht<v;ht++)At[ht]=At[ht+1],Jt[ht]=Jt[ht+1];At[v]=C,Jt[v]=T,this.setPage(v)}return this},p.deletePage=function(){return Yi.apply(this,arguments),this},p.__private__.text=p.text=function(u,v,C,T,J){var ht,bt,Ft,jt,Gt,ae,ge,Oe,$e,xe=(T=T||{}).scope||this;if(typeof u=="number"&&typeof v=="number"&&(typeof C=="string"||Array.isArray(C))){var Ze=C;C=v,v=u,u=Ze}if(arguments[3]instanceof Wt==0?(Ft=arguments[4],jt=arguments[5],Se(ge=arguments[3])==="object"&&ge!==null||(typeof Ft=="string"&&(jt=Ft,Ft=null),typeof ge=="string"&&(jt=ge,ge=null),typeof ge=="number"&&(Ft=ge,ge=null),T={flags:ge,angle:Ft,align:jt})):(z("The transform parameter of text() with a Matrix value"),$e=J),isNaN(v)||isNaN(C)||u==null)throw new Error("Invalid arguments passed to jsPDF.text");if(u.length===0)return xe;var Ke,or="",xn=typeof T.lineHeightFactor=="number"?T.lineHeightFactor:ei,jn=xe.internal.scaleFactor;function js(Pe){return Pe=Pe.split(" ").join(Array(T.TabLen||9).join(" ")),Tr(Pe,ge)}function Oa(Pe){for(var Ie,Ue=Pe.concat(),ze=[],Ln=Ue.length;Ln--;)typeof(Ie=Ue.shift())=="string"?ze.push(Ie):Array.isArray(Pe)&&(Ie.length===1||Ie[1]===void 0&&Ie[2]===void 0)?ze.push(Ie[0]):ze.push([Ie[0],Ie[1],Ie[2]]);return ze}function si(Pe,Ie){var Ue;if(typeof Pe=="string")Ue=Ie(Pe)[0];else if(Array.isArray(Pe)){for(var ze,Ln,Ei=Pe.concat(),hn=[],fa=Ei.length;fa--;)typeof(ze=Ei.shift())=="string"?hn.push(Ie(ze)[0]):Array.isArray(ze)&&typeof ze[0]=="string"&&(Ln=Ie(ze[0],ze[1],ze[2]),hn.push([Ln[0],Ln[1],Ln[2]]));Ue=hn}return Ue}var Yr=!1,aa=!0;if(typeof u=="string")Yr=!0;else if(Array.isArray(u)){var Li=u.concat();bt=[];for(var Bn,ir=Li.length;ir--;)(typeof(Bn=Li.shift())!="string"||Array.isArray(Bn)&&typeof Bn[0]!="string")&&(aa=!1);Yr=aa}if(Yr===!1)throw new Error('Type of text must be string or Array. "'+u+'" is not recognized.');typeof u=="string"&&(u=u.match(/[\r?\n]/)?u.split(/\r\n|\r|\n/g):[u]);var _n=xt/xe.internal.scaleFactor,An=_n*(xn-1);switch(T.baseline){case"bottom":C-=An;break;case"top":C+=_n-An;break;case"hanging":C+=_n-2*An;break;case"middle":C+=_n/2-An}if((ae=T.maxWidth||0)>0&&(typeof u=="string"?u=xe.splitTextToSize(u,ae):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(Pe,Ie){return Pe.concat(xe.splitTextToSize(Ie,ae))},[]))),ht={text:u,x:v,y:C,options:T,mutex:{pdfEscape:Tr,activeFontKey:Dt,fonts:Bt,activeFontSize:xt}},me.publish("preProcessText",ht),u=ht.text,Ft=(T=ht.options).angle,$e instanceof Wt==0&&Ft&&typeof Ft=="number"){Ft*=Math.PI/180,T.rotationDirection===0&&(Ft=-Ft),D===V&&(Ft=-Ft);var Si=Math.cos(Ft),sa=Math.sin(Ft);$e=new Wt(Si,sa,-sa,Si,0,0)}else Ft&&Ft instanceof Wt&&($e=Ft);D!==V||$e||($e=bn),(Gt=T.charSpace||Ai)!==void 0&&(or+=tt(H(Gt))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Oe=T.horizontalScale)!==void 0&&(or+=tt(100*Oe)+` Tz
`),T.lang;var br=-1,ja=T.renderingMode!==void 0?T.renderingMode:T.stroke,ki=xe.internal.getCurrentPageInfo().pageContext;switch(ja){case 0:case!1:case"fill":br=0;break;case 1:case!0:case"stroke":br=1;break;case 2:case"fillThenStroke":br=2;break;case 3:case"invisible":br=3;break;case 4:case"fillAndAddForClipping":br=4;break;case 5:case"strokeAndAddPathForClipping":br=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":br=6;break;case 7:case"addToPathForClipping":br=7}var Ba=ki.usedRenderingMode!==void 0?ki.usedRenderingMode:-1;br!==-1?or+=br+` Tr
`:Ba!==-1&&(or+=`0 Tr
`),br!==-1&&(ki.usedRenderingMode=br),jt=T.align||"left";var Qe,Dr=xt*xn,oa=xe.internal.pageSize.getWidth(),la=Bt[Dt];Gt=T.charSpace||Ai,ae=T.maxWidth||0,ge=Object.assign({autoencode:!0,noBOM:!0},T.flags);var Rn=[],Pi=function(Pe){return xe.getStringUnitWidth(Pe,{font:la,charSpace:Gt,fontSize:xt,doKerning:!1})*xt/jn};if(Object.prototype.toString.call(u)==="[object Array]"){var xr;bt=Oa(u),jt!=="left"&&(Qe=bt.map(Pi));var _r,oi=0;if(jt==="right"){v-=Qe[0],u=[],ir=bt.length;for(var sn=0;sn<ir;sn++)sn===0?(_r=wn(v),xr=yn(C)):(_r=H(oi-Qe[sn]),xr=-Dr),u.push([bt[sn],_r,xr]),oi=Qe[sn]}else if(jt==="center"){v-=Qe[0]/2,u=[],ir=bt.length;for(var Mn=0;Mn<ir;Mn++)Mn===0?(_r=wn(v),xr=yn(C)):(_r=H((oi-Qe[Mn])/2),xr=-Dr),u.push([bt[Mn],_r,xr]),oi=Qe[Mn]}else if(jt==="left"){u=[],ir=bt.length;for(var ua=0;ua<ir;ua++)u.push(bt[ua])}else if(jt==="justify"&&la.encoding==="Identity-H"){u=[],ir=bt.length,ae=ae!==0?ae:oa;for(var Tn=0,qe=0;qe<ir;qe++)if(xr=qe===0?yn(C):-Dr,_r=qe===0?wn(v):Tn,qe<ir-1){var Bs=H((ae-Qe[qe])/(bt[qe].split(" ").length-1)),on=bt[qe].split(" ");u.push([on[0]+" ",_r,xr]),Tn=0;for(var ln=1;ln<on.length;ln++){var Ii=(Pi(on[ln-1]+" "+on[ln])-Pi(on[ln]))*jn+Bs;ln==on.length-1?u.push([on[ln],Ii,0]):u.push([on[ln]+" ",Ii,0]),Tn-=Ii}}else u.push([bt[qe],_r,xr]);u.push(["",Tn,0])}else{if(jt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(u=[],ir=bt.length,ae=ae!==0?ae:oa,qe=0;qe<ir;qe++)xr=qe===0?yn(C):-Dr,_r=qe===0?wn(v):0,qe<ir-1?Rn.push(tt(H((ae-Qe[qe])/(bt[qe].split(" ").length-1)))):Rn.push(0),u.push([bt[qe],_r,xr])}}(typeof T.R2L=="boolean"?T.R2L:ne)===!0&&(u=si(u,function(Pe,Ie,Ue){return[Pe.split("").reverse().join(""),Ie,Ue]})),ht={text:u,x:v,y:C,options:T,mutex:{pdfEscape:Tr,activeFontKey:Dt,fonts:Bt,activeFontSize:xt}},me.publish("postProcessText",ht),u=ht.text,Ke=ht.mutex.isHex||!1;var ha=Bt[Dt].encoding;ha!=="WinAnsiEncoding"&&ha!=="StandardEncoding"||(u=si(u,function(Pe,Ie,Ue){return[js(Pe),Ie,Ue]})),bt=Oa(u),u=[];for(var Ci,Fi,li,ui=Array.isArray(bt[0])?1:0,Nn="",ca=function(Pe,Ie,Ue){var ze="";return Ue instanceof Wt?(Ue=typeof T.angle=="number"?mn(Ue,new Wt(1,0,0,1,Pe,Ie)):mn(new Wt(1,0,0,1,Pe,Ie),Ue),D===V&&(Ue=mn(new Wt(1,0,0,-1,0,0),Ue)),ze=Ue.join(" ")+` Tm
`):ze=tt(Pe)+" "+tt(Ie)+` Td
`,ze},kr=0;kr<bt.length;kr++){switch(Nn="",ui){case 1:li=(Ke?"<":"(")+bt[kr][0]+(Ke?">":")"),Ci=parseFloat(bt[kr][1]),Fi=parseFloat(bt[kr][2]);break;case 0:li=(Ke?"<":"(")+bt[kr]+(Ke?">":")"),Ci=wn(v),Fi=yn(C)}Rn!==void 0&&Rn[kr]!==void 0&&(Nn=Rn[kr]+` Tw
`),kr===0?u.push(Nn+ca(Ci,Fi,$e)+li):ui===0?u.push(Nn+li):ui===1&&u.push(Nn+ca(Ci,Fi,$e)+li)}u=ui===0?u.join(` Tj
T* `):u.join(` Tj
`),u+=` Tj
`;var un=`BT
/`;return un+=Dt+" "+xt+` Tf
`,un+=tt(xt*xn)+` TL
`,un+=ri+`
`,un+=or,un+=u,O(un+="ET"),k[Dt]=!0,xe};var _s=p.__private__.clip=p.clip=function(u){return O(u==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return _s("evenodd")},p.__private__.discardPath=p.discardPath=function(){return O("n"),this};var nn=p.__private__.isValidStyle=function(u){var v=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(u)!==-1&&(v=!0),v};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(u){return nn(u)&&(d=u),this};var Fa=p.__private__.getStyle=p.getStyle=function(u){var v=d;switch(u){case"D":case"S":v="S";break;case"F":v="f";break;case"FD":case"DF":v="B";break;case"f":case"f*":case"B":case"B*":v=u}return v},Ea=p.close=function(){return O("h"),this};p.stroke=function(){return O("S"),this},p.fill=function(u){return En("f",u),this},p.fillEvenOdd=function(u){return En("f*",u),this},p.fillStroke=function(u){return En("B",u),this},p.fillStrokeEvenOdd=function(u){return En("B*",u),this};var En=function(u,v){Se(v)==="object"?Ns(v,u):O(u)},$i=function(u){u===null||D===V&&u===void 0||(u=Fa(u),O(u))};function As(u,v,C,T,J){var ht=new Di(v||this.boundingBox,C||this.xStep,T||this.yStep,this.gState,J||this.matrix);ht.stream=this.stream;var bt=u+"$$"+this.cloneIndex+++"$$";return Br(bt,ht),ht}var Ns=function(u,v){var C=ue[u.key],T=Ht[C];if(T instanceof fi)O("q"),O(Ls(v)),T.gState&&p.setGState(T.gState),O(u.matrix.toString()+" cm"),O("/"+C+" sh"),O("Q");else if(T instanceof Di){var J=new Wt(1,0,0,-1,0,Sr());u.matrix&&(J=J.multiply(u.matrix||bn),C=As.call(T,u.key,u.boundingBox,u.xStep,u.yStep,J).id),O("q"),O("/Pattern cs"),O("/"+C+" scn"),T.gState&&p.setGState(T.gState),O(v),O("Q")}},Ls=function(u){switch(u){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"}},Ki=p.moveTo=function(u,v){return O(tt(H(u))+" "+tt(U(v))+" m"),this},ti=p.lineTo=function(u,v){return O(tt(H(u))+" "+tt(U(v))+" l"),this},On=p.curveTo=function(u,v,C,T,J,ht){return O([tt(H(u)),tt(U(v)),tt(H(C)),tt(U(T)),tt(H(J)),tt(U(ht)),"c"].join(" ")),this};p.__private__.line=p.line=function(u,v,C,T,J){if(isNaN(u)||isNaN(v)||isNaN(C)||isNaN(T)||!nn(J))throw new Error("Invalid arguments passed to jsPDF.line");return D===Y?this.lines([[C-u,T-v]],u,v,[1,1],J||"S"):this.lines([[C-u,T-v]],u,v,[1,1]).stroke()},p.__private__.lines=p.lines=function(u,v,C,T,J,ht){var bt,Ft,jt,Gt,ae,ge,Oe,$e,xe,Ze,Ke,or;if(typeof u=="number"&&(or=C,C=v,v=u,u=or),T=T||[1,1],ht=ht||!1,isNaN(v)||isNaN(C)||!Array.isArray(u)||!Array.isArray(T)||!nn(J)||typeof ht!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ki(v,C),bt=T[0],Ft=T[1],Gt=u.length,Ze=v,Ke=C,jt=0;jt<Gt;jt++)(ae=u[jt]).length===2?(Ze=ae[0]*bt+Ze,Ke=ae[1]*Ft+Ke,ti(Ze,Ke)):(ge=ae[0]*bt+Ze,Oe=ae[1]*Ft+Ke,$e=ae[2]*bt+Ze,xe=ae[3]*Ft+Ke,Ze=ae[4]*bt+Ze,Ke=ae[5]*Ft+Ke,On(ge,Oe,$e,xe,Ze,Ke));return ht&&Ea(),$i(J),this},p.path=function(u){for(var v=0;v<u.length;v++){var C=u[v],T=C.c;switch(C.op){case"m":Ki(T[0],T[1]);break;case"l":ti(T[0],T[1]);break;case"c":On.apply(this,T);break;case"h":Ea()}}return this},p.__private__.rect=p.rect=function(u,v,C,T,J){if(isNaN(u)||isNaN(v)||isNaN(C)||isNaN(T)||!nn(J))throw new Error("Invalid arguments passed to jsPDF.rect");return D===Y&&(T=-T),O([tt(H(u)),tt(U(v)),tt(H(C)),tt(H(T)),"re"].join(" ")),$i(J),this},p.__private__.triangle=p.triangle=function(u,v,C,T,J,ht,bt){if(isNaN(u)||isNaN(v)||isNaN(C)||isNaN(T)||isNaN(J)||isNaN(ht)||!nn(bt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[C-u,T-v],[J-C,ht-T],[u-J,v-ht]],u,v,[1,1],bt,!0),this},p.__private__.roundedRect=p.roundedRect=function(u,v,C,T,J,ht,bt){if(isNaN(u)||isNaN(v)||isNaN(C)||isNaN(T)||isNaN(J)||isNaN(ht)||!nn(bt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ft=4/3*(Math.SQRT2-1);return J=Math.min(J,.5*C),ht=Math.min(ht,.5*T),this.lines([[C-2*J,0],[J*Ft,0,J,ht-ht*Ft,J,ht],[0,T-2*ht],[0,ht*Ft,-J*Ft,ht,-J,ht],[2*J-C,0],[-J*Ft,0,-J,-ht*Ft,-J,-ht],[0,2*ht-T],[0,-ht*Ft,J*Ft,-ht,J,-ht]],u+J,v,[1,1],bt,!0),this},p.__private__.ellipse=p.ellipse=function(u,v,C,T,J){if(isNaN(u)||isNaN(v)||isNaN(C)||isNaN(T)||!nn(J))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ht=4/3*(Math.SQRT2-1)*C,bt=4/3*(Math.SQRT2-1)*T;return Ki(u+C,v),On(u+C,v-bt,u+ht,v-T,u,v-T),On(u-ht,v-T,u-C,v-bt,u-C,v),On(u-C,v+bt,u-ht,v+T,u,v+T),On(u+ht,v+T,u+C,v+bt,u+C,v),$i(J),this},p.__private__.circle=p.circle=function(u,v,C,T){if(isNaN(u)||isNaN(v)||isNaN(C)||!nn(T))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(u,v,C,C,T)},p.setFont=function(u,v,C){return C&&(v=ft(v,C)),Dt=Pa(u,v,{disableWarning:!1}),this};var Ss=p.__private__.getFont=p.getFont=function(){return Bt[Pa.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var u,v,C={};for(u in Qt)if(Qt.hasOwnProperty(u))for(v in C[u]=[],Qt[u])Qt[u].hasOwnProperty(v)&&C[u].push(v);return C},p.addFont=function(u,v,C,T,J){var ht=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ht.indexOf(arguments[3])!==-1?J=arguments[3]:arguments[3]&&ht.indexOf(arguments[3])==-1&&(C=ft(C,T)),Na.call(this,u,v,C,J=J||"Identity-H")};var ei,Xi=r.lineWidth||.200025,$t=p.__private__.getLineWidth=p.getLineWidth=function(){return Xi},ks=p.__private__.setLineWidth=p.setLineWidth=function(u){return Xi=u,O(tt(H(u))+" w"),this};p.__private__.setLineDash=Mt.API.setLineDash=Mt.API.setLineDashPattern=function(u,v){if(u=u||[],v=v||0,isNaN(v)||!Array.isArray(u))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return u=u.map(function(C){return tt(H(C))}).join(" "),v=tt(H(v)),O("["+u+"] "+v+" d"),this};var Ps=p.__private__.getLineHeight=p.getLineHeight=function(){return xt*ei};p.__private__.getLineHeight=p.getLineHeight=function(){return xt*ei};var Is=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(u){return typeof(u=u||1.15)=="number"&&(ei=u),this},Cs=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return ei};Is(r.lineHeight);var wn=p.__private__.getHorizontalCoordinate=function(u){return H(u)},yn=p.__private__.getVerticalCoordinate=function(u){return D===V?u:Jt[j].mediaBox.topRightY-Jt[j].mediaBox.bottomLeftY-H(u)},Fs=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(u){return tt(wn(u))},Es=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(u){return tt(yn(u))},xi=r.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return en(xi)},p.__private__.setStrokeColor=p.setDrawColor=function(u,v,C,T){return xi=Wr({ch1:u,ch2:v,ch3:C,ch4:T,pdfColorType:"draw",precision:2}),O(xi),this};var Zi=r.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return en(Zi)},p.__private__.setFillColor=p.setFillColor=function(u,v,C,T){return Zi=Wr({ch1:u,ch2:v,ch3:C,ch4:T,pdfColorType:"fill",precision:2}),O(Zi),this};var ri=r.textColor||"0 g",_i=p.__private__.getTextColor=p.getTextColor=function(){return en(ri)};p.__private__.setTextColor=p.setTextColor=function(u,v,C,T){return ri=Wr({ch1:u,ch2:v,ch3:C,ch4:T,pdfColorType:"text",precision:3}),this};var Ai=r.charSpace,Os=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(Ai||0)};p.__private__.setCharSpace=p.setCharSpace=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ai=u,this};var Qi=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(u){var v=p.CapJoinStyles[u];if(v===void 0)throw new Error("Line cap style of '"+u+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qi=v,O(v+" J"),this};var ta=0;p.__private__.setLineJoin=p.setLineJoin=function(u){var v=p.CapJoinStyles[u];if(v===void 0)throw new Error("Line join style of '"+u+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ta=v,O(v+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(u){if(u=u||0,isNaN(u))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return O(tt(H(u))+" M"),this},p.GState=ps,p.setGState=function(u){(u=typeof u=="string"?te[Te[u]]:ni(null,u)).equals(Xe)||(O("/"+u.id+" gs"),Xe=u)};var ni=function(u,v){if(!u||!Te[u]){var C=!1;for(var T in te)if(te.hasOwnProperty(T)&&te[T].equals(v)){C=!0;break}if(C)v=te[T];else{var J="GS"+(Object.keys(te).length+1).toString(10);te[J]=v,v.id=J}return u&&(Te[u]=v.id),me.publish("addGState",v),v}};p.addGState=function(u,v){return ni(u,v),this},p.saveGraphicsState=function(){return O("q"),_e.push({key:Dt,size:xt,color:ri}),this},p.restoreGraphicsState=function(){O("Q");var u=_e.pop();return Dt=u.key,xt=u.size,ri=u.color,Xe=null,this},p.setCurrentTransformationMatrix=function(u){return O(u.toString()+" cm"),this},p.comment=function(u){return O("#"+u),this};var ii=function(u,v){var C=u||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return C},set:function(ht){isNaN(ht)||(C=parseFloat(ht))}});var T=v||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return T},set:function(ht){isNaN(ht)||(T=parseFloat(ht))}});var J="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return J},set:function(ht){J=ht.toString()}}),this},ea=function(u,v,C,T){ii.call(this,u,v),this.type="rect";var J=C||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return J},set:function(bt){isNaN(bt)||(J=parseFloat(bt))}});var ht=T||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ht},set:function(bt){isNaN(bt)||(ht=parseFloat(bt))}}),this},Ni=function(){this.page=Ae,this.currentPage=j,this.pages=At.slice(0),this.pagesContext=Jt.slice(0),this.x=qt,this.y=ke,this.matrix=pe,this.width=na(j),this.height=Sr(j),this.outputDestination=Pt,this.id="",this.objectNumber=-1};Ni.prototype.restore=function(){Ae=this.page,j=this.currentPage,Jt=this.pagesContext,At=this.pages,qt=this.x,ke=this.y,pe=this.matrix,ia(j,this.width),an(j,this.height),Pt=this.outputDestination};var ra=function(u,v,C,T,J){tn.push(new Ni),Ae=j=0,At=[],qt=u,ke=v,pe=J,Gi([C,T])};for(var ai in p.beginFormObject=function(u,v,C,T,J){return ra(u,v,C,T,J),this},p.endFormObject=function(u){return function(v){if(gn[v])tn.pop().restore();else{var C=new Ni,T="Xo"+(Object.keys(cr).length+1).toString(10);C.id=T,gn[v]=T,cr[T]=C,me.publish("addFormObject",C),tn.pop().restore()}}(u),this},p.doFormObject=function(u,v){var C=cr[gn[u]];return O("q"),O(v.toString()+" cm"),O("/"+C.id+" Do"),O("Q"),this},p.getFormObject=function(u){var v=cr[gn[u]];return{x:v.x,y:v.y,width:v.width,height:v.height,matrix:v.matrix}},p.save=function(u,v){return u=u||"generated.pdf",(v=v||{}).returnPromise=v.returnPromise||!1,v.returnPromise===!1?(ci(Zn(vn()),u),typeof ci.unload=="function"&&Yt.setTimeout&&setTimeout(ci.unload,911),this):new Promise(function(C,T){try{var J=ci(Zn(vn()),u);typeof ci.unload=="function"&&Yt.setTimeout&&setTimeout(ci.unload,911),C(J)}catch(ht){T(ht.message)}})},Mt.API)Mt.API.hasOwnProperty(ai)&&(ai==="events"&&Mt.API.events.length?function(u,v){var C,T,J;for(J=v.length-1;J!==-1;J--)C=v[J][0],T=v[J][1],u.subscribe.apply(u,[C].concat(typeof T=="function"?[T]:T))}(me,Mt.API.events):p[ai]=Mt.API[ai]);var na=p.getPageWidth=function(u){return(Jt[u=u||j].mediaBox.topRightX-Jt[u].mediaBox.bottomLeftX)/Vt},ia=p.setPageWidth=function(u,v){Jt[u].mediaBox.topRightX=v*Vt+Jt[u].mediaBox.bottomLeftX},Sr=p.getPageHeight=function(u){return(Jt[u=u||j].mediaBox.topRightY-Jt[u].mediaBox.bottomLeftY)/Vt},an=p.setPageHeight=function(u,v){Jt[u].mediaBox.topRightY=v*Vt+Jt[u].mediaBox.bottomLeftY};return p.internal={pdfEscape:Tr,getStyle:Fa,getFont:Ss,getFontSize:St,getCharSpace:Os,getTextColor:_i,getLineHeight:Ps,getLineHeightFactor:Cs,getLineWidth:$t,write:le,getHorizontalCoordinate:wn,getVerticalCoordinate:yn,getCoordinateString:Fs,getVerticalCoordinateString:Es,collections:{},newObject:je,newAdditionalObject:$n,newObjectDeferred:nr,newObjectDeferredBegin:sr,getFilters:Vr,putStream:Mr,events:me,scaleFactor:Vt,pageSize:{getWidth:function(){return na(j)},setWidth:function(u){ia(j,u)},getHeight:function(){return Sr(j)},setHeight:function(u){an(j,u)}},encryptionOptions:m,encryption:De,getEncryptor:function(u){return m!==null?De.encryptor(u,0):function(v){return v}},output:Gr,getNumberOfPages:ka,pages:At,out:O,f2:N,f3:F,getPageInfo:Ji,getPageInfoByObjId:ys,getCurrentPageInfo:xs,getPDFVersion:E,Point:ii,Rectangle:ea,Matrix:Wt,hasHotfix:Qn},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return na(j)},set:function(u){ia(j,u)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return Sr(j)},set:function(u){an(j,u)},enumerable:!0,configurable:!0}),(function(u){for(var v=0,C=zt.length;v<C;v++){var T=Na.call(this,u[v][0],u[v][1],u[v][2],zt[v][3],!0);A===!1&&(k[T]=!0);var J=u[v][0].split("-");Aa({id:T,fontName:J[0],fontStyle:J[1]||""})}me.publish("addFonts",{fonts:Bt,dictionary:Qt})}).call(p,zt),Dt="F1",La(o,t),me.publish("initialized"),p}Mi.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},Mi.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Mi.prototype.hexToBytes=function(r){for(var e=[],t=0;t<r.length;t+=2)e.push(String.fromCharCode(parseInt(r.substr(t,2),16)));return e.join("")},Mi.prototype.processOwnerPassword=function(r,e){return Lo(No(e).substr(0,5),r)},Mi.prototype.encryptor=function(r,e){var t=No(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(i){return Lo(t,i)}},ps.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||Se(r)!==Se(this))return!1;var i=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e)||this[e]!==r[e])return!1;i++}for(e in r)r.hasOwnProperty(e)&&t.indexOf(e)<0&&i--;return i===0},Mt.API={events:[]},Mt.version="3.0.2";var Me=Mt.API,Io=1,mi=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Bi=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Kt=function(r){return r.toFixed(2)},Vn=function(r){return r.toFixed(5)};Me.__acroform__={};var Lr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},hu=function(r){return r*Io},fn=function(r){var e=new ih,t=Ct.internal.getHeight(r)||0,i=Ct.internal.getWidth(r)||0;return e.BBox=[0,0,Number(Kt(i)),Number(Kt(t))],e},Zf=Me.__acroform__.setBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<e},Qf=Me.__acroform__.clearBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<e)},t1=Me.__acroform__.getBit=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<e?1:0},Ve=Me.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return t1(r,e-1)},Ge=Me.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Zf(r,e-1)},Ye=Me.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Qf(r,e-1)},e1=Me.__acroform__.calculateCoordinates=function(r,e){var t=e.internal.getHorizontalCoordinate,i=e.internal.getVerticalCoordinate,o=r[0],s=r[1],f=r[2],l=r[3],c={};return c.lowerLeft_X=t(o)||0,c.lowerLeft_Y=i(s+l)||0,c.upperRight_X=t(o+f)||0,c.upperRight_Y=i(s)||0,[Number(Kt(c.lowerLeft_X)),Number(Kt(c.lowerLeft_Y)),Number(Kt(c.upperRight_X)),Number(Kt(c.upperRight_Y))]},r1=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,i=So(r,t),o=r.scope.internal.getFont(r.fontName,r.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(r.scope.__private__.encodeColorString(r.color)),e.push("/"+o+" "+Kt(i.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC");var s=fn(r);return s.scope=r.scope,s.stream=e.join(`
`),s}},So=function(r,e){var t=r.fontSize===0?r.maxFontSize:r.fontSize,i={text:"",fontSize:""},o=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");o=r.multiline?o.map(function(N){return N.split(`
`)}):o.map(function(N){return[N]});var s=t,f=Ct.internal.getHeight(r)||0;f=f<0?-f:f;var l=Ct.internal.getWidth(r)||0;l=l<0?-l:l;var c=function(N,F,H){if(N+1<o.length){var U=F+" "+o[N+1][0];return is(U,r,H).width<=l-4}return!1};s++;t:for(;s>0;){e="",s--;var d,m,A=is("3",r,s).height,k=r.multiline?f-s:(f-A)/2,p=k+=2,B=0,E=0,R=0;if(s<=0){e=`(...) Tj
`,e+="% Width of Text: "+is(e,r,s=12).width+", FieldWidth:"+l+`
`;break}for(var S="",Y=0,V=0;V<o.length;V++)if(o.hasOwnProperty(V)){var D=!1;if(o[V].length!==1&&R!==o[V].length-1){if((A+2)*(Y+2)+2>f)continue t;S+=o[V][R],D=!0,E=V,V--}else{S=(S+=o[V][R]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var ut=parseInt(V),yt=c(ut,S,s),ft=V>=o.length-1;if(yt&&!ft){S+=" ",R=0;continue}if(yt||ft){if(ft)E=ut;else if(r.multiline&&(A+2)*(Y+2)+2>f)continue t}else{if(!r.multiline||(A+2)*(Y+2)+2>f)continue t;E=ut}}for(var tt="",z=B;z<=E;z++){var et=o[z];if(r.multiline){if(z===E){tt+=et[R]+" ",R=(R+1)%et.length;continue}if(z===B){tt+=et[et.length-1]+" ";continue}}tt+=et[0]+" "}switch(tt=tt.substr(tt.length-1)==" "?tt.substr(0,tt.length-1):tt,m=is(tt,r,s).width,r.textAlign){case"right":d=l-m-2;break;case"center":d=(l-m)/2;break;default:d=2}e+=Kt(d)+" "+Kt(p)+` Td
`,e+="("+mi(tt)+`) Tj
`,e+=-Kt(d)+` 0 Td
`,p=-(s+2),m=0,B=D?E:E+1,Y++,S=""}break}return i.text=e,i.fontSize=s,i},is=function(r,e,t){var i=e.scope.internal.getFont(e.fontName,e.fontStyle),o=e.scope.getStringUnitWidth(r,{font:i,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:o}},n1={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},i1=function(r,e){var t={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(i){return i.type===t.type&&i.object===t.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(t)},a1=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Zr.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(n1)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Io=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new ah,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s.objId=void 0,s.hasAnnotation&&i1(s,t)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(t){(function(i,o){var s=!i;for(var f in i||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(f)){var l=i[f],c=[],d=l.Rect;if(l.Rect&&(l.Rect=e1(l.Rect,o)),o.internal.newObjectDeferredBegin(l.objId,!0),l.DA=Ct.createDefaultAppearanceStream(l),Se(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(c=l.getKeyValueListForStream()),l.Rect=d,l.hasAppearanceStream&&!l.appearanceStreamContent){var m=r1(l);c.push({key:"AP",value:"<</N "+m+">>"}),o.internal.acroformPlugin.xForms.push(m)}if(l.appearanceStreamContent){var A="";for(var k in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(k)){var p=l.appearanceStreamContent[k];if(A+="/"+k+" ",A+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var f in p)if(p.hasOwnProperty(f)){var B=p[f];typeof B=="function"&&(B=B.call(o,l)),A+="/"+f+" "+B+" ",o.internal.acroformPlugin.xForms.indexOf(B)>=0||o.internal.acroformPlugin.xForms.push(B)}}else typeof(B=p)=="function"&&(B=B.call(o,l)),A+="/"+f+" "+B,o.internal.acroformPlugin.xForms.indexOf(B)>=0||o.internal.acroformPlugin.xForms.push(B);A+=">>"}c.push({key:"AP",value:`<<
`+A+">>"})}o.internal.putStream({additionalKeyValues:c,objectId:l.objId}),o.internal.out("endobj")}s&&function(E,R){for(var S in E)if(E.hasOwnProperty(S)){var Y=S,V=E[S];R.internal.newObjectDeferredBegin(V.objId,!0),Se(V)==="object"&&typeof V.putStream=="function"&&V.putStream(),delete E[Y]}}(o.internal.acroformPlugin.xForms,o)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},nh=Me.__acroform__.arrayToPdfArray=function(r,e,t){var i=function(f){return f};if(Array.isArray(r)){for(var o="[",s=0;s<r.length;s++)switch(s!==0&&(o+=" "),Se(r[s])){case"boolean":case"number":case"object":o+=r[s].toString();break;case"string":r[s].substr(0,1)!=="/"?(e!==void 0&&t&&(i=t.internal.getEncryptor(e)),o+="("+mi(i(r[s].toString()))+")"):o+=r[s].toString()}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},go=function(r,e,t){var i=function(o){return o};return e!==void 0&&t&&(i=t.internal.getEncryptor(e)),(r=r||"").toString(),"("+mi(i(r))+")"},dn=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};dn.prototype.toString=function(){return this.objId+" 0 R"},dn.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},dn.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var i=e[t],o=this[i];o&&(Array.isArray(o)?r.push({key:i,value:nh(o,this.objId,this.scope)}):o instanceof dn?(o.scope=this.scope,r.push({key:i,value:o.objId+" 0 R"})):typeof o!="function"&&r.push({key:i,value:o}))}return r};var ih=function(){dn.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){r=t.trim()},get:function(){return r||null}})};Lr(ih,dn);var ah=function(){dn.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var t=function(i){return i};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+mi(t(r))+")"}},set:function(t){r=t}})};Lr(ah,dn);var Zr=function r(){dn.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');e=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ve(e,3)},set:function(S){S?this.F=Ge(e,3):this.F=Ye(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');t=S}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(S){i=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(S){i[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(S){i[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(S){i[2]=S}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(S){i[3]=S}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof gs)return;s="FieldObject"+r.FieldNum++}var S=function(Y){return Y};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+mi(S(s))+")"},set:function(S){s=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(S){s=S}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(S){f=S}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(S){l=S}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(S){c=S}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Io:d},set:function(S){d=S}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(S){m=S}});var A="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!A||this instanceof gs||this instanceof di))return go(A,this.objId,this.scope)},set:function(S){S=S.toString(),A=S}});var k=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(k)return this instanceof ar==0?go(k,this.objId,this.scope):k},set:function(S){S=S.toString(),k=this instanceof ar==0?S.substr(0,1)==="("?Bi(S.substr(1,S.length-2)):Bi(S):S}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ar==1?Bi(k.substr(1,k.length-1)):k},set:function(S){S=S.toString(),k=this instanceof ar==1?"/"+S:S}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(S){this.V=S}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof ar==0?go(p,this.objId,this.scope):p},set:function(S){S=S.toString(),p=this instanceof ar==0?S.substr(0,1)==="("?Bi(S.substr(1,S.length-2)):Bi(S):S}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ar==1?Bi(p.substr(1,p.length-1)):p},set:function(S){S=S.toString(),p=this instanceof ar==1?"/"+S:S}}),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,E=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return E},set:function(S){S=!!S,E=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(B)return B},set:function(S){B=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,1)},set:function(S){S?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(S){S?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(S){S?this.Ff=Ge(this.Ff,3):this.Ff=Ye(this.Ff,3)}});var R=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(R!==null)return R},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');R=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(R){case 0:default:S="left";break;case 1:S="center";break;case 2:S="right"}return S},configurable:!0,enumerable:!0,set:function(S){switch(S){case"right":case 2:R=2;break;case"center":case 1:R=1;break;default:R=0}}})};Lr(Zr,dn);var qi=function(){Zr.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){r=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return nh(e,this.objId,this.scope)},set:function(t){var i,o;o=[],typeof(i=t)=="string"&&(o=function(s,f,l){l||(l=1);for(var c,d=[];c=f.exec(s);)d.push(c[l]);return d}(i,/\((.*?)\)/g)),e=o}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,i){for(i=i||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,18)},set:function(t){t?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(t){this.combo===!0&&(t?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(t){t?(this.Ff=Ge(this.Ff,20),e.sort()):this.Ff=Ye(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,22)},set:function(t){t?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(t){t?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(t){t?this.Ff=Ge(this.Ff,27):this.Ff=Ye(this.Ff,27)}}),this.hasAppearanceStream=!1};Lr(qi,Zr);var Ui=function(){qi.call(this),this.fontName="helvetica",this.combo=!1};Lr(Ui,qi);var zi=function(){Ui.call(this),this.combo=!0};Lr(zi,Ui);var us=function(){zi.call(this),this.edit=!0};Lr(us,zi);var ar=function(){Zr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,15)},set:function(t){t?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(t){t?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(t){t?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(t){t?this.Ff=Ge(this.Ff,26):this.Ff=Ye(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(s){return s};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var i,o=[];for(i in o.push("<<"),e)o.push("/"+i+" ("+mi(t(e[i]))+")");return o.push(">>"),o.join(`
`)}},set:function(t){Se(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}})};Lr(ar,Zr);var hs=function(){ar.call(this),this.pushButton=!0};Lr(hs,ar);var Hi=function(){ar.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};Lr(Hi,ar);var gs=function(){var r,e;Zr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(o){r=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(o){e=o}});var t,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(l){return l};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var s,f=[];for(s in f.push("<<"),i)f.push("/"+s+" ("+mi(o(i[s]))+")");return f.push(">>"),f.join(`
`)},set:function(o){Se(o)==="object"&&(i=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(o){typeof o=="string"&&(i.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(o){t=o}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(o){t="/"+o}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ct.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Lr(gs,Zr),Hi.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=r.createAppearanceStream(t.optionName),t.caption=r.getCA()}},Hi.prototype.createOption=function(r){var e=new gs;return e.Parent=this,e.optionName=r,this.Kids.push(e),s1.call(this.scope,e),e};var cs=function(){ar.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ct.CheckBox.createAppearanceStream()};Lr(cs,ar);var di=function(){Zr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,13)},set:function(e){e?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(e){e?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(e){e?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(e){e?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(e){e?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(e){e?this.Ff=Ge(this.Ff,26):this.Ff=Ye(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Lr(di,Zr);var fs=function(){di.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,14)},set:function(r){r?this.Ff=Ge(this.Ff,14):this.Ff=Ye(this.Ff,14)}}),this.password=!0};Lr(fs,di);var Ct={CheckBox:{createAppearanceStream:function(){return{N:{On:Ct.CheckBox.YesNormal},D:{On:Ct.CheckBox.YesPushDown,Off:Ct.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=fn(r);e.scope=r.scope;var t=[],i=r.scope.internal.getFont(r.fontName,r.fontStyle).id,o=r.scope.__private__.encodeColorString(r.color),s=So(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+Kt(Ct.internal.getWidth(r))+" "+Kt(Ct.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+i+" "+Kt(s.fontSize)+" Tf "+o),t.push("BT"),t.push(s.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
`),e},YesNormal:function(r){var e=fn(r);e.scope=r.scope;var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,i=r.scope.__private__.encodeColorString(r.color),o=[],s=Ct.internal.getHeight(r),f=Ct.internal.getWidth(r),l=So(r,r.caption);return o.push("1 g"),o.push("0 0 "+Kt(f)+" "+Kt(s)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+Kt(f-1)+" "+Kt(s-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+t+" "+Kt(l.fontSize)+" Tf "+i),o.push(l.text),o.push("ET"),o.push("Q"),e.stream=o.join(`
`),e},OffPushDown:function(r){var e=fn(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Kt(Ct.internal.getWidth(r))+" "+Kt(Ct.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:Ct.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=Ct.RadioButton.Circle.YesNormal,e.D[r]=Ct.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=fn(r);e.scope=r.scope;var t=[],i=Ct.internal.getWidth(r)<=Ct.internal.getHeight(r)?Ct.internal.getWidth(r)/4:Ct.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Ct.internal.Bezier_C,s=Number((i*o).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Vn(Ct.internal.getWidth(r)/2)+" "+Vn(Ct.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),t.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),t.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),t.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(r){var e=fn(r);e.scope=r.scope;var t=[],i=Ct.internal.getWidth(r)<=Ct.internal.getHeight(r)?Ct.internal.getWidth(r)/4:Ct.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),s=Number((o*Ct.internal.Bezier_C).toFixed(5)),f=Number((i*Ct.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Vn(Ct.internal.getWidth(r)/2)+" "+Vn(Ct.internal.getHeight(r)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+s+" "+s+" "+o+" 0 "+o+" c"),t.push("-"+s+" "+o+" -"+o+" "+s+" -"+o+" 0 c"),t.push("-"+o+" -"+s+" -"+s+" -"+o+" 0 -"+o+" c"),t.push(s+" -"+o+" "+o+" -"+s+" "+o+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Vn(Ct.internal.getWidth(r)/2)+" "+Vn(Ct.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+f+" "+f+" "+i+" 0 "+i+" c"),t.push("-"+f+" "+i+" -"+i+" "+f+" -"+i+" 0 c"),t.push("-"+i+" -"+f+" -"+f+" -"+i+" 0 -"+i+" c"),t.push(f+" -"+i+" "+i+" -"+f+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e},OffPushDown:function(r){var e=fn(r);e.scope=r.scope;var t=[],i=Ct.internal.getWidth(r)<=Ct.internal.getHeight(r)?Ct.internal.getWidth(r)/4:Ct.internal.getHeight(r)/4;i=Number((.9*i).toFixed(5));var o=Number((2*i).toFixed(5)),s=Number((o*Ct.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Vn(Ct.internal.getWidth(r)/2)+" "+Vn(Ct.internal.getHeight(r)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+s+" "+s+" "+o+" 0 "+o+" c"),t.push("-"+s+" "+o+" -"+o+" "+s+" -"+o+" 0 c"),t.push("-"+o+" -"+s+" -"+s+" -"+o+" 0 -"+o+" c"),t.push(s+" -"+o+" "+o+" -"+s+" "+o+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:Ct.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=Ct.RadioButton.Cross.YesNormal,e.D[r]=Ct.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=fn(r);e.scope=r.scope;var t=[],i=Ct.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+Kt(Ct.internal.getWidth(r)-2)+" "+Kt(Ct.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(Kt(i.x1.x)+" "+Kt(i.x1.y)+" m"),t.push(Kt(i.x2.x)+" "+Kt(i.x2.y)+" l"),t.push(Kt(i.x4.x)+" "+Kt(i.x4.y)+" m"),t.push(Kt(i.x3.x)+" "+Kt(i.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(r){var e=fn(r);e.scope=r.scope;var t=Ct.internal.calculateCross(r),i=[];return i.push("0.749023 g"),i.push("0 0 "+Kt(Ct.internal.getWidth(r))+" "+Kt(Ct.internal.getHeight(r))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Kt(Ct.internal.getWidth(r)-2)+" "+Kt(Ct.internal.getHeight(r)-2)+" re"),i.push("W"),i.push("n"),i.push(Kt(t.x1.x)+" "+Kt(t.x1.y)+" m"),i.push(Kt(t.x2.x)+" "+Kt(t.x2.y)+" l"),i.push(Kt(t.x4.x)+" "+Kt(t.x4.y)+" m"),i.push(Kt(t.x3.x)+" "+Kt(t.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join(`
`),e},OffPushDown:function(r){var e=fn(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+Kt(Ct.internal.getWidth(r))+" "+Kt(Ct.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,t=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+t}};Ct.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=Ct.internal.getWidth(r),t=Ct.internal.getHeight(r),i=Math.min(e,t);return{x1:{x:(e-i)/2,y:(t-i)/2+i},x2:{x:(e-i)/2+i,y:(t-i)/2},x3:{x:(e-i)/2,y:(t-i)/2},x4:{x:(e-i)/2+i,y:(t-i)/2+i}}}},Ct.internal.getWidth=function(r){var e=0;return Se(r)==="object"&&(e=hu(r.Rect[2])),e},Ct.internal.getHeight=function(r){var e=0;return Se(r)==="object"&&(e=hu(r.Rect[3])),e};var s1=Me.addField=function(r){if(a1(this,r),!(r instanceof Zr))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Me.AcroFormChoiceField=qi,Me.AcroFormListBox=Ui,Me.AcroFormComboBox=zi,Me.AcroFormEditBox=us,Me.AcroFormButton=ar,Me.AcroFormPushButton=hs,Me.AcroFormRadioButton=Hi,Me.AcroFormCheckBox=cs,Me.AcroFormTextField=di,Me.AcroFormPasswordField=fs,Me.AcroFormAppearance=Ct,Me.AcroForm={ChoiceField:qi,ListBox:Ui,ComboBox:zi,EditBox:us,Button:ar,PushButton:hs,RadioButton:Hi,CheckBox:cs,TextField:di,PasswordField:fs,Appearance:Ct},Mt.AcroForm={ChoiceField:qi,ListBox:Ui,ComboBox:zi,EditBox:us,Button:ar,PushButton:hs,RadioButton:Hi,CheckBox:cs,TextField:di,PasswordField:fs,Appearance:Ct};Mt.AcroForm;function sh(r){return r.reduce(function(e,t,i){return e[t]=i,e},{})}(function(r){var e="addImage_";r.__addimage__={};var t="UNKNOWN",i={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]]},o=r.__addimage__.getImageFileTypeByImageData=function(N,F){var H,U,it,dt,vt,rt=t;if((F=F||t)==="RGBA"||N.data!==void 0&&N.data instanceof Uint8ClampedArray&&"height"in N&&"width"in N)return"RGBA";if(yt(N))for(vt in i)for(it=i[vt],H=0;H<it.length;H+=1){for(dt=!0,U=0;U<it[H].length;U+=1)if(it[H][U]!==void 0&&it[H][U]!==N[U]){dt=!1;break}if(dt===!0){rt=vt;break}}else for(vt in i)for(it=i[vt],H=0;H<it.length;H+=1){for(dt=!0,U=0;U<it[H].length;U+=1)if(it[H][U]!==void 0&&it[H][U]!==N.charCodeAt(U)){dt=!1;break}if(dt===!0){rt=vt;break}}return rt===t&&F!==t&&(rt=F),rt},s=function N(F){for(var H=this.internal.write,U=this.internal.putStream,it=(0,this.internal.getFilters)();it.indexOf("FlateEncode")!==-1;)it.splice(it.indexOf("FlateEncode"),1);F.objectId=this.internal.newObject();var dt=[];if(dt.push({key:"Type",value:"/XObject"}),dt.push({key:"Subtype",value:"/Image"}),dt.push({key:"Width",value:F.width}),dt.push({key:"Height",value:F.height}),F.colorSpace===S.INDEXED?dt.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(F.palette.length/3-1)+" "+("sMask"in F&&F.sMask!==void 0?F.objectId+2:F.objectId+1)+" 0 R]"}):(dt.push({key:"ColorSpace",value:"/"+F.colorSpace}),F.colorSpace===S.DEVICE_CMYK&&dt.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),dt.push({key:"BitsPerComponent",value:F.bitsPerComponent}),"decodeParameters"in F&&F.decodeParameters!==void 0&&dt.push({key:"DecodeParms",value:"<<"+F.decodeParameters+">>"}),"transparency"in F&&Array.isArray(F.transparency)){for(var vt="",rt=0,pt=F.transparency.length;rt<pt;rt++)vt+=F.transparency[rt]+" "+F.transparency[rt]+" ";dt.push({key:"Mask",value:"["+vt+"]"})}F.sMask!==void 0&&dt.push({key:"SMask",value:F.objectId+1+" 0 R"});var Nt=F.filter!==void 0?["/"+F.filter]:void 0;if(U({data:F.data,additionalKeyValues:dt,alreadyAppliedFilters:Nt,objectId:F.objectId}),H("endobj"),"sMask"in F&&F.sMask!==void 0){var _t=(F.predictor!=null?"/Predictor "+F.predictor:"")+" /Colors 1 /BitsPerComponent 8 /Columns "+F.width,x={width:F.width,height:F.height,colorSpace:"DeviceGray",bitsPerComponent:F.bitsPerComponent,decodeParameters:_t,data:F.sMask};"filter"in F&&(x.filter=F.filter),N.call(this,x)}if(F.colorSpace===S.INDEXED){var j=this.internal.newObject();U({data:tt(new Uint8Array(F.palette)),objectId:j}),H("endobj")}},f=function(){var N=this.internal.collections[e+"images"];for(var F in N)s.call(this,N[F])},l=function(){var N,F=this.internal.collections[e+"images"],H=this.internal.write;for(var U in F)H("/I"+(N=F[U]).index,N.objectId,"0","R")},c=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",f),this.internal.events.subscribe("putXobjectDict",l))},d=function(){var N=this.internal.collections[e+"images"];return c.call(this),N},m=function(){return Object.keys(this.internal.collections[e+"images"]).length},A=function(N){return typeof r["process"+N.toUpperCase()]=="function"},k=function(N){return Se(N)==="object"&&N.nodeType===1},p=function(N,F){if(N.nodeName==="IMG"&&N.hasAttribute("src")){var H=""+N.getAttribute("src");if(H.indexOf("data:image/")===0)return ls(unescape(H).split("base64,").pop());var U=r.loadFile(H,!0);if(U!==void 0)return U}if(N.nodeName==="CANVAS"){if(N.width===0||N.height===0)throw new Error("Given canvas must have data. Canvas width: "+N.width+", height: "+N.height);var it;switch(F){case"PNG":it="image/png";break;case"WEBP":it="image/webp";break;default:it="image/jpeg"}return ls(N.toDataURL(it,1).split("base64,").pop())}},B=function(N){var F=this.internal.collections[e+"images"];if(F){for(var H in F)if(N===F[H].alias)return F[H]}},E=function(N,F,H){return N||F||(N=-96,F=-96),N<0&&(N=-1*H.width*72/N/this.internal.scaleFactor),F<0&&(F=-1*H.height*72/F/this.internal.scaleFactor),N===0&&(N=F*H.width/H.height),F===0&&(F=N*H.height/H.width),[N,F]},R=function(N,F,H,U,it,dt){var vt=E.call(this,H,U,it),rt=this.internal.getCoordinateString,pt=this.internal.getVerticalCoordinateString,Nt=d.call(this);if(H=vt[0],U=vt[1],Nt[it.index]=it,dt){dt*=Math.PI/180;var _t=Math.cos(dt),x=Math.sin(dt),j=function(G){return G.toFixed(4)},M=[j(_t),j(x),j(-1*x),j(_t),0,0,"cm"]}this.internal.write("q"),dt?(this.internal.write([1,"0","0",1,rt(N),pt(F+U),"cm"].join(" ")),this.internal.write(M.join(" ")),this.internal.write([rt(H),"0","0",rt(U),"0","0","cm"].join(" "))):this.internal.write([rt(H),"0","0",rt(U),rt(N),pt(F+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+it.index+" Do"),this.internal.write("Q")},S=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var Y=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},V=r.__addimage__.sHashCode=function(N){var F,H,U=0;if(typeof N=="string")for(H=N.length,F=0;F<H;F++)U=(U<<5)-U+N.charCodeAt(F),U|=0;else if(yt(N))for(H=N.byteLength/2,F=0;F<H;F++)U=(U<<5)-U+N[F],U|=0;return U},D=r.__addimage__.validateStringAsBase64=function(N){(N=N||"").toString().trim();var F=!0;return N.length===0&&(F=!1),N.length%4!=0&&(F=!1),/^[A-Za-z0-9+/]+$/.test(N.substr(0,N.length-2))===!1&&(F=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(N.substr(-2))===!1&&(F=!1),F},ut=r.__addimage__.extractImageFromDataUrl=function(N){if(N==null||!(N=N.trim()).startsWith("data:"))return null;var F=N.indexOf(",");return F<0?null:N.substring(0,F).trim().endsWith("base64")?N.substring(F+1):null};r.__addimage__.isArrayBuffer=function(N){return N instanceof ArrayBuffer};var yt=r.__addimage__.isArrayBufferView=function(N){return N instanceof Int8Array||N instanceof Uint8Array||N instanceof Uint8ClampedArray||N instanceof Int16Array||N instanceof Uint16Array||N instanceof Int32Array||N instanceof Uint32Array||N instanceof Float32Array||N instanceof Float64Array},ft=r.__addimage__.binaryStringToUint8Array=function(N){for(var F=N.length,H=new Uint8Array(F),U=0;U<F;U++)H[U]=N.charCodeAt(U);return H},tt=r.__addimage__.arrayBufferToBinaryString=function(N){for(var F="",H=yt(N)?N:new Uint8Array(N),U=0;U<H.length;U+=8192)F+=String.fromCharCode.apply(null,H.subarray(U,U+8192));return F};r.addImage=function(){var N,F,H,U,it,dt,vt,rt,pt;if(typeof arguments[1]=="number"?(F=t,H=arguments[1],U=arguments[2],it=arguments[3],dt=arguments[4],vt=arguments[5],rt=arguments[6],pt=arguments[7]):(F=arguments[1],H=arguments[2],U=arguments[3],it=arguments[4],dt=arguments[5],vt=arguments[6],rt=arguments[7],pt=arguments[8]),Se(N=arguments[0])==="object"&&!k(N)&&"imageData"in N){var Nt=N;N=Nt.imageData,F=Nt.format||F||t,H=Nt.x||H||0,U=Nt.y||U||0,it=Nt.w||Nt.width||it,dt=Nt.h||Nt.height||dt,vt=Nt.alias||vt,rt=Nt.compression||rt,pt=Nt.rotation||Nt.angle||pt}var _t=this.internal.getFilters();if(rt===void 0&&_t.indexOf("FlateEncode")!==-1&&(rt="SLOW"),isNaN(H)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var x=z.call(this,N,F,vt,rt);return R.call(this,H,U,it,dt,x,pt),this};var z=function(N,F,H,U){var it,dt,vt;if(typeof N=="string"&&o(N)===t){N=unescape(N);var rt=et(N,!1);(rt!==""||(rt=r.loadFile(N,!0))!==void 0)&&(N=rt)}if(k(N)&&(N=p(N,F)),F=o(N,F),!A(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(((vt=H)==null||vt.length===0)&&(H=function(pt){return typeof pt=="string"||yt(pt)?V(pt):yt(pt.data)?V(pt.data):null}(N)),(it=B.call(this,H))||(N instanceof Uint8Array||F==="RGBA"||(dt=N,N=ft(N)),it=this["process"+F.toUpperCase()](N,m.call(this),H,function(pt){return pt&&typeof pt=="string"&&(pt=pt.toUpperCase()),pt in r.image_compression?pt:Y.NONE}(U),dt)),!it)throw new Error("An unknown error occurred whilst processing the image.");return it},et=r.__addimage__.convertBase64ToBinaryString=function(N,F){F=typeof F!="boolean"||F;var H,U="";if(typeof N=="string"){var it;H=(it=ut(N))!==null&&it!==void 0?it:N;try{U=ls(H)}catch(dt){if(F)throw D(H)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+dt.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};r.getImageProperties=function(N){var F,H,U="";if(k(N)&&(N=p(N)),typeof N=="string"&&o(N)===t&&((U=et(N,!1))===""&&(U=r.loadFile(N)||""),N=U),H=o(N),!A(H))throw new Error("addImage does not support files of type '"+H+"', please ensure that a plugin for '"+H+"' support is added.");if(N instanceof Uint8Array||(N=ft(N)),!(F=this["process"+H.toUpperCase()](N)))throw new Error("An unknown error occurred whilst processing the image");return F.fileType=H,F}})(Mt.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Mt.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(t){for(var i,o,s,f=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,c=this.internal.getPageInfoByObjId(t.objId),d=t.pageContext.annotations,m=!1,A=0;A<d.length&&!m;A++)switch((i=d[A]).type){case"link":(e(i.options.url)||e(i.options.pageNumber))&&(m=!0);break;case"reference":case"text":case"freetext":m=!0}if(m!=0){this.internal.write("/Annots [");for(var k=0;k<d.length;k++){i=d[k];var p=this.internal.pdfEscape,B=this.internal.getEncryptor(t.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var E=this.internal.newAdditionalObject(),R=this.internal.newAdditionalObject(),S=this.internal.getEncryptor(E.objId),Y=i.title||"Note";s="<</Type /Annot /Subtype /Text "+(o="/Rect ["+f(i.bounds.x)+" "+l(i.bounds.y+i.bounds.h)+" "+f(i.bounds.x+i.bounds.w)+" "+l(i.bounds.y)+"] ")+"/Contents ("+p(S(i.contents))+")",s+=" /Popup "+R.objId+" 0 R",s+=" /P "+c.objId+" 0 R",s+=" /T ("+p(S(Y))+") >>",E.content=s;var V=E.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+f(i.bounds.x+30)+" "+l(i.bounds.y+i.bounds.h)+" "+f(i.bounds.x+i.bounds.w+30)+" "+l(i.bounds.y)+"] ")+" /Parent "+V,i.open&&(s+=" /Open true"),s+=" >>",R.content=s,this.internal.write(E.objId,"0 R",R.objId,"0 R");break;case"freetext":o="/Rect ["+f(i.bounds.x)+" "+l(i.bounds.y)+" "+f(i.bounds.x+i.bounds.w)+" "+l(i.bounds.y+i.bounds.h)+"] ";var D=i.color||"#000000";s="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+p(B(i.contents))+")",s+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+D+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(i.options.name){var ut=this.annotations._nameMap[i.options.name];i.options.pageNumber=ut.page,i.options.top=ut.y}else i.options.top||(i.options.top=0);if(o="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",s="",i.options.url)s="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+p(B(i.options.url))+") >>";else if(i.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,s+=" /FitV "+i.options.left+"]";break;default:var yt=l(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),s+=" /XYZ "+i.options.left+" "+yt+" "+i.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),r.createAnnotation=function(t){var i=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":i.pageContext.annotations.push(t)}},r.link=function(t,i,o,s,f){var l=this.internal.getCurrentPageInfo(),c=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:c(t),y:d(i),w:c(t+o),h:d(i+s)},options:f,type:"link"})},r.textWithLink=function(t,i,o,s){var f,l,c=this.getTextWidth(t),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){l=s.maxWidth;var m=this.splitTextToSize(t,l).length;f=Math.ceil(d*m)}else l=c,f=d;return this.text(t,i,o,s),o+=.2*d,s.align==="center"&&(i-=c/2),s.align==="right"&&(i-=c),this.link(i,o-d,l,f,s),c},r.getTextWidth=function(t){var i=this.internal.getFontSize();return this.getStringUnitWidth(t)*i/this.internal.scaleFactor}}(Mt.API),function(r){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},i={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];r.__arabicParser__={};var s=r.__arabicParser__.isInArabicSubstitutionA=function(E){return e[E.charCodeAt(0)]!==void 0},f=r.__arabicParser__.isArabicLetter=function(E){return typeof E=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(E)},l=r.__arabicParser__.isArabicEndLetter=function(E){return f(E)&&s(E)&&e[E.charCodeAt(0)].length<=2},c=r.__arabicParser__.isArabicAlfLetter=function(E){return f(E)&&o.indexOf(E.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(E){return f(E)&&s(E)&&e[E.charCodeAt(0)].length>=1};var d=r.__arabicParser__.arabicLetterHasFinalForm=function(E){return f(E)&&s(E)&&e[E.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(E){return f(E)&&s(E)&&e[E.charCodeAt(0)].length>=3};var m=r.__arabicParser__.arabicLetterHasMedialForm=function(E){return f(E)&&s(E)&&e[E.charCodeAt(0)].length==4},A=r.__arabicParser__.resolveLigatures=function(E){var R=0,S=t,Y="",V=0;for(R=0;R<E.length;R+=1)S[E.charCodeAt(R)]!==void 0?(V++,typeof(S=S[E.charCodeAt(R)])=="number"&&(Y+=String.fromCharCode(S),S=t,V=0),R===E.length-1&&(S=t,Y+=E.charAt(R-(V-1)),R-=V-1,V=0)):(S=t,Y+=E.charAt(R-V),R-=V,V=0);return Y};r.__arabicParser__.isArabicDiacritic=function(E){return E!==void 0&&i[E.charCodeAt(0)]!==void 0};var k=r.__arabicParser__.getCorrectForm=function(E,R,S){return f(E)?s(E)===!1?-1:!d(E)||!f(R)&&!f(S)||!f(S)&&l(R)||l(E)&&!f(R)||l(E)&&c(R)||l(E)&&l(R)?0:m(E)&&f(R)&&!l(R)&&f(S)&&d(S)?3:l(E)||!f(S)?1:2:-1},p=function(E){var R=0,S=0,Y=0,V="",D="",ut="",yt=(E=E||"").split("\\s+"),ft=[];for(R=0;R<yt.length;R+=1){for(ft.push(""),S=0;S<yt[R].length;S+=1)V=yt[R][S],D=yt[R][S-1],ut=yt[R][S+1],f(V)?(Y=k(V,D,ut),ft[R]+=Y!==-1?String.fromCharCode(e[V.charCodeAt(0)][Y]):V):ft[R]+=V;ft[R]=A(ft[R])}return ft.join(" ")},B=r.__arabicParser__.processArabic=r.processArabic=function(){var E,R=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,S=[];if(Array.isArray(R)){var Y=0;for(S=[],Y=0;Y<R.length;Y+=1)Array.isArray(R[Y])?S.push([p(R[Y][0]),R[Y][1],R[Y][2]]):S.push([p(R[Y])]);E=S}else E=p(R);return typeof arguments[0]=="string"?E:(arguments[0].text=E,arguments[0])};r.events.push(["preProcessText",B])}(Mt.API),Mt.API.autoPrint=function(r){var e;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(r){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(l){t=l}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(l){i=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(l){o=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(l){s=l}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(l){f=l}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,i){var o;if((t=t||"2d")!=="2d")return null;for(o in i)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=i[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(Mt.API),function(r){var e={left:0,top:0,bottom:0,right:0},t=!1,i=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({},e),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(E){c=E}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(E){d=E}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(E){m=E}});var A=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return A},set:function(E){A=E}});var k=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return k},set:function(E){k=E}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(E){p=E}});var B=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return B},set:function(E){B=E}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(c){return i.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},r.getTextDimensions=function(c,d){i.call(this);var m=(d=d||{}).fontSize||this.getFontSize(),A=d.font||this.getFont(),k=d.scaleFactor||this.internal.scaleFactor,p=0,B=0,E=0,R=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var S=d.maxWidth;S>0?typeof c=="string"?c=this.splitTextToSize(c,S):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(V,D){return V.concat(R.splitTextToSize(D,S))},[])):c=Array.isArray(c)?c:[c];for(var Y=0;Y<c.length;Y++)p<(E=this.getStringUnitWidth(c[Y],{font:A})*m)&&(p=E);return p!==0&&(B=c.length),{w:p/=k,h:Math.max((B*m*this.getLineHeightFactor()-m*(this.getLineHeightFactor()-1))/k,0)}},r.cellAddPage=function(){i.call(this),this.addPage();var c=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new s(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var f=r.cell=function(){var c;c=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),i.call(this);var d=this.internal.__cell__.lastCell,m=this.internal.__cell__.padding,A=this.internal.__cell__.margins||e,k=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===c.lineNumber?(c.x=(d.x||0)+(d.width||0),c.y=d.y||0):d.y+d.height+c.height+A.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=A.top,p&&k&&(this.printHeaderRow(c.lineNumber,!0),c.y+=k[0].height)):c.y=d.y+d.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-m,c.y+m,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+m,{align:"center",baseline:"top",maxWidth:c.width-m-m}):this.text(c.text,c.x+m,c.y+m,{align:"left",baseline:"top",maxWidth:c.width-m-m})),this.internal.__cell__.lastCell=c,this};r.table=function(c,d,m,A,k){if(i.call(this),!m)throw new Error("No data for PDF table.");var p,B,E,R,S=[],Y=[],V=[],D={},ut={},yt=[],ft=[],tt=(k=k||{}).autoSize||!1,z=k.printHeaders!==!1,et=k.css&&k.css["font-size"]!==void 0?16*k.css["font-size"]:k.fontSize||12,N=k.margins||Object.assign({width:this.getPageWidth()},e),F=typeof k.padding=="number"?k.padding:3,H=k.headerBackgroundColor||"#c8c8c8",U=k.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=z,this.internal.__cell__.margins=N,this.internal.__cell__.table_font_size=et,this.internal.__cell__.padding=F,this.internal.__cell__.headerBackgroundColor=H,this.internal.__cell__.headerTextColor=U,this.setFontSize(et),A==null)Y=S=Object.keys(m[0]),V=S.map(function(){return"left"});else if(Array.isArray(A)&&Se(A[0])==="object")for(S=A.map(function(Nt){return Nt.name}),Y=A.map(function(Nt){return Nt.prompt||Nt.name||""}),V=A.map(function(Nt){return Nt.align||"left"}),p=0;p<A.length;p+=1)ut[A[p].name]=.7499990551181103*A[p].width;else Array.isArray(A)&&typeof A[0]=="string"&&(Y=S=A,V=S.map(function(){return"left"}));if(tt||Array.isArray(A)&&typeof A[0]=="string")for(p=0;p<S.length;p+=1){for(D[R=S[p]]=m.map(function(Nt){return Nt[R]}),this.setFont(void 0,"bold"),yt.push(this.getTextDimensions(Y[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),B=D[R],this.setFont(void 0,"normal"),E=0;E<B.length;E+=1)yt.push(this.getTextDimensions(B[E],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);ut[R]=Math.max.apply(null,yt)+F+F,yt=[]}if(z){var it={};for(p=0;p<S.length;p+=1)it[S[p]]={},it[S[p]].text=Y[p],it[S[p]].align=V[p];var dt=l.call(this,it,ut);ft=S.map(function(Nt){return new s(c,d,ut[Nt],dt,it[Nt].text,void 0,it[Nt].align)}),this.setTableHeaderRow(ft),this.printHeaderRow(1,!1)}var vt=A.reduce(function(Nt,_t){return Nt[_t.name]=_t.align,Nt},{});for(p=0;p<m.length;p+=1){"rowStart"in k&&k.rowStart instanceof Function&&k.rowStart({row:p,data:m[p]},this);var rt=l.call(this,m[p],ut);for(E=0;E<S.length;E+=1){var pt=m[p][S[E]];"cellStart"in k&&k.cellStart instanceof Function&&k.cellStart({row:p,col:E,data:pt},this),f.call(this,new s(c,d,ut[S[E]],rt,pt,p+2,vt[S[E]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=d,this};var l=function(c,d){var m=this.internal.__cell__.padding,A=this.internal.__cell__.table_font_size,k=this.internal.scaleFactor;return Object.keys(c).map(function(p){var B=c[p];return this.splitTextToSize(B.hasOwnProperty("text")?B.text:B,d[p]-m-m)},this).map(function(p){return this.getLineHeightFactor()*p.length*A/k+m+m},this).reduce(function(p,B){return Math.max(p,B)},0)};r.setTableHeaderRow=function(c){i.call(this),this.internal.__cell__.tableHeaderRow=c},r.printHeaderRow=function(c,d){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var m;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var A=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(A[0],A[1],A[2],A[3],void 0,-1)}this.setFont(void 0,"bold");for(var k=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){m=this.internal.__cell__.tableHeaderRow[p].clone(),d&&(m.y=this.internal.__cell__.margins.top||0,k.push(m)),m.lineNumber=c;var B=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),f.call(this,m),this.setTextColor(B)}k.length>0&&this.setTableHeaderRow(k),this.setFont(void 0,"normal"),t=!1}}(Mt.API);var oh={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},lh=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],ko=sh(lh),uh=[100,200,300,400,500,600,700,800,900],o1=sh(uh);function mo(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(s){return oh[s=s||"normal"]?s:"normal"}(r.style),i=function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400}(r.weight),o=function(s){return typeof ko[s=s||"normal"]=="number"?s:"normal"}(r.stretch);return{family:e,style:t,weight:i,stretch:o,src:r.src||[],ref:r.ref||{name:e,style:[o,t,i].join(" ")}}}function cu(r,e,t,i){var o;for(o=t;o>=0&&o<e.length;o+=i)if(r[e[o]])return r[e[o]];for(o=t;o>=0&&o<e.length;o-=i)if(r[e[o]])return r[e[o]]}var l1={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},fu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function du(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function pu(r){return r.trimLeft()}function u1(r,e){for(var t=0;t<r.length;){if(r.charAt(t)===e)return[r.substring(0,t),r.substring(t+1)];t+=1}return null}function h1(r){var e=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],r.substring(e[0].length)]}var as,gu,mu,Ri,ss,bu,vu,wu,bo=["times"];function yu(r,e,t,i){var o=4,s=_u;switch(i){case Mt.API.image_compression.FAST:o=1,s=xu;break;case Mt.API.image_compression.MEDIUM:o=6,s=Au;break;case Mt.API.image_compression.SLOW:o=9,s=Nu}r=function(l,c,d,m){for(var A,k=l.length/c,p=new Uint8Array(l.length+k),B=[c1,xu,_u,Au,Nu],E=0;E<k;E+=1){var R=E*c,S=l.subarray(R,R+c);if(m)p.set(m(S,d,A),R+E);else{for(var Y=B.length,V=[],D=0;D<Y;D+=1)V[D]=B[D](S,d,A);var ut=d1(V.concat());p.set(V[ut],R+E)}A=S}return p}(r,e,t,s);var f=yo(r,{level:o});return Mt.API.__addimage__.arrayBufferToBinaryString(f)}function c1(r){var e=Array.apply([],r);return e.unshift(0),e}function xu(r,e){var t=r.length,i=[];i[0]=1;for(var o=0;o<t;o+=1){var s=r[o-e]||0;i[o+1]=r[o]-s+256&255}return i}function _u(r,e,t){var i=r.length,o=[];o[0]=2;for(var s=0;s<i;s+=1){var f=t&&t[s]||0;o[s+1]=r[s]-f+256&255}return o}function Au(r,e,t){var i=r.length,o=[];o[0]=3;for(var s=0;s<i;s+=1){var f=r[s-e]||0,l=t&&t[s]||0;o[s+1]=r[s]+256-(f+l>>>1)&255}return o}function Nu(r,e,t){var i=r.length,o=[];o[0]=4;for(var s=0;s<i;s+=1){var f=f1(r[s-e]||0,t&&t[s]||0,t&&t[s-e]||0);o[s+1]=r[s]-f+256&255}return o}function f1(r,e,t){if(r===e&&e===t)return r;var i=Math.abs(e-t),o=Math.abs(r-t),s=Math.abs(r+e-t-t);return i<=o&&i<=s?r:o<=s?e:t}function d1(r){var e=r.map(function(t){return t.reduce(function(i,o){return i+Math.abs(o)},0)});return e.indexOf(Math.min.apply(null,e))}function vo(r,e,t){var i=e*t,o=Math.floor(i/8),s=16-(i-8*o+t),f=(1<<t)-1;return hh(r,o)>>s&f}function Lu(r,e,t,i){var o=t*i,s=Math.floor(o/8),f=16-(o-8*s+i),l=(1<<i)-1,c=(e&l)<<f;(function(d,m,A){if(m+1<d.byteLength)d.setUint16(m,A,!1);else{var k=A>>8&255;d.setUint8(m,k)}})(r,s,hh(r,s)&~(l<<f)&65535|c)}function hh(r,e){return e+1<r.byteLength?r.getUint16(e,!1):r.getUint8(e)<<8}function p1(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=r[e++]|r[e++]<<8,i=r[e++]|r[e++]<<8,o=r[e++],s=o>>7,f=1<<1+(7&o);r[e++],r[e++];var l=null,c=null;s&&(l=e,c=f,e+=3*f);var d=!0,m=[],A=0,k=null,p=0,B=null;for(this.width=t,this.height=i;d&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,B=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((N=r[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var E=r[e++];A=r[e++]|r[e++]<<8,k=r[e++],1&E||(k=null),p=E>>2&7,e++;break;case 254:for(;;){if(!((N=r[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var R=r[e++]|r[e++]<<8,S=r[e++]|r[e++]<<8,Y=r[e++]|r[e++]<<8,V=r[e++]|r[e++]<<8,D=r[e++],ut=D>>6&1,yt=1<<1+(7&D),ft=l,tt=c,z=!1;D>>7&&(z=!0,ft=e,tt=yt,e+=3*yt);var et=e;for(e++;;){var N;if(!((N=r[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}m.push({x:R,y:S,width:Y,height:V,has_local_palette:z,palette_offset:ft,palette_size:tt,data_offset:et,data_length:e-et,transparent_index:k,interlaced:!!ut,delay:A,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return B},this.frameInfo=function(F){if(F<0||F>=m.length)throw new Error("Frame index out of range.");return m[F]},this.decodeAndBlitFrameBGRA=function(F,H){var U=this.frameInfo(F),it=U.width*U.height,dt=new Uint8Array(it);Su(r,U.data_offset,dt,it);var vt=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var pt=U.width,Nt=t-pt,_t=pt,x=4*(U.y*t+U.x),j=4*((U.y+U.height)*t+U.x),M=x,G=4*Nt;U.interlaced===!0&&(G+=4*t*7);for(var $=8,Q=0,lt=dt.length;Q<lt;++Q){var nt=dt[Q];if(_t===0&&(_t=pt,(M+=G)>=j&&(G=4*Nt+4*t*($-1),M=x+(pt+Nt)*($<<1),$>>=1)),nt===rt)M+=4;else{var gt=r[vt+3*nt],At=r[vt+3*nt+1],kt=r[vt+3*nt+2];H[M++]=kt,H[M++]=At,H[M++]=gt,H[M++]=255}--_t}},this.decodeAndBlitFrameRGBA=function(F,H){var U=this.frameInfo(F),it=U.width*U.height,dt=new Uint8Array(it);Su(r,U.data_offset,dt,it);var vt=U.palette_offset,rt=U.transparent_index;rt===null&&(rt=256);var pt=U.width,Nt=t-pt,_t=pt,x=4*(U.y*t+U.x),j=4*((U.y+U.height)*t+U.x),M=x,G=4*Nt;U.interlaced===!0&&(G+=4*t*7);for(var $=8,Q=0,lt=dt.length;Q<lt;++Q){var nt=dt[Q];if(_t===0&&(_t=pt,(M+=G)>=j&&(G=4*Nt+4*t*($-1),M=x+(pt+Nt)*($<<1),$>>=1)),nt===rt)M+=4;else{var gt=r[vt+3*nt],At=r[vt+3*nt+1],kt=r[vt+3*nt+2];H[M++]=gt,H[M++]=At,H[M++]=kt,H[M++]=255}--_t}}}function Su(r,e,t,i){for(var o=r[e++],s=1<<o,f=s+1,l=f+1,c=o+1,d=(1<<c)-1,m=0,A=0,k=0,p=r[e++],B=new Int32Array(4096),E=null;;){for(;m<16&&p!==0;)A|=r[e++]<<m,m+=8,p===1?p=r[e++]:--p;if(m<c)break;var R=A&d;if(A>>=c,m-=c,R!==s){if(R===f)break;for(var S=R<l?R:E,Y=0,V=S;V>s;)V=B[V]>>8,++Y;var D=V;if(k+Y+(S!==R?1:0)>i)return void Le.log("Warning, gif stream longer than expected.");t[k++]=D;var ut=k+=Y;for(S!==R&&(t[k++]=D),V=S;Y--;)V=B[V],t[--ut]=255&V,V>>=8;E!==null&&l<4096&&(B[l++]=E<<8|D,l>=d+1&&c<12&&(++c,d=d<<1|1)),E=R}else l=f+1,d=(1<<(c=o+1))-1,E=null}return k!==i&&Le.log("Warning, gif stream shorter than expected."),t}/**
* @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 wo(r){var e,t,i,o,s,f=Math.floor,l=new Array(64),c=new Array(64),d=new Array(64),m=new Array(64),A=new Array(65535),k=new Array(65535),p=new Array(64),B=new Array(64),E=[],R=0,S=7,Y=new Array(64),V=new Array(64),D=new Array(64),ut=new Array(256),yt=new Array(2048),ft=[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],tt=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],et=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[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],F=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],it=[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 dt(x,j){for(var M=0,G=0,$=new Array,Q=1;Q<=16;Q++){for(var lt=1;lt<=x[Q];lt++)$[j[G]]=[],$[j[G]][0]=M,$[j[G]][1]=Q,G++,M++;M*=2}return $}function vt(x){for(var j=x[0],M=x[1]-1;M>=0;)j&1<<M&&(R|=1<<S),M--,--S<0&&(R==255?(rt(255),rt(0)):rt(R),S=7,R=0)}function rt(x){E.push(x)}function pt(x){rt(x>>8&255),rt(255&x)}function Nt(x,j,M,G,$){for(var Q,lt=$[0],nt=$[240],gt=function(xt,Tt){var St,ne,Ut,de,Xt,Zt,ye,ie,Dt,Vt,qt=0;for(Dt=0;Dt<8;++Dt){St=xt[qt],ne=xt[qt+1],Ut=xt[qt+2],de=xt[qt+3],Xt=xt[qt+4],Zt=xt[qt+5],ye=xt[qt+6];var ke=St+(ie=xt[qt+7]),pe=St-ie,Bt=ne+ye,Qt=ne-ye,_e=Ut+Zt,Ht=Ut-Zt,ue=de+Xt,te=de-Xt,Te=ke+ue,Xe=ke-ue,Ae=Bt+_e,Jt=Bt-_e;xt[qt]=Te+Ae,xt[qt+4]=Te-Ae;var me=.707106781*(Jt+Xe);xt[qt+2]=Xe+me,xt[qt+6]=Xe-me;var Jn=.382683433*((Te=te+Ht)-(Jt=Qt+pe)),cr=.5411961*Te+Jn,gn=1.306562965*Jt+Jn,tn=.707106781*(Ae=Ht+Qt),Wt=pe+tn,mn=pe-tn;xt[qt+5]=mn+cr,xt[qt+3]=mn-cr,xt[qt+1]=Wt+gn,xt[qt+7]=Wt-gn,qt+=8}for(qt=0,Dt=0;Dt<8;++Dt){St=xt[qt],ne=xt[qt+8],Ut=xt[qt+16],de=xt[qt+24],Xt=xt[qt+32],Zt=xt[qt+40],ye=xt[qt+48];var bn=St+(ie=xt[qt+56]),Br=St-ie,Rr=ne+ye,je=ne-ye,nr=Ut+Zt,sr=Ut-Zt,$n=de+Xt,Fn=de-Xt,Hr=bn+$n,en=bn-$n,Wr=Rr+nr,Vr=Rr-nr;xt[qt]=Hr+Wr,xt[qt+32]=Hr-Wr;var Mr=.707106781*(Vr+en);xt[qt+16]=en+Mr,xt[qt+48]=en-Mr;var Kn=.382683433*((Hr=Fn+sr)-(Vr=je+Br)),rn=.5411961*Hr+Kn,Xn=1.306562965*Vr+Kn,bi=.707106781*(Wr=sr+je),vi=Br+bi,wi=Br-bi;xt[qt+40]=wi+rn,xt[qt+24]=wi-rn,xt[qt+8]=vi+Xn,xt[qt+56]=vi-Xn,qt++}for(Dt=0;Dt<64;++Dt)Vt=xt[Dt]*Tt[Dt],p[Dt]=Vt>0?Vt+.5|0:Vt-.5|0;return p}(x,j),At=0;At<64;++At)B[ft[At]]=gt[At];var kt=B[0]-M;M=B[0],kt==0?vt(G[0]):(vt(G[k[Q=32767+kt]]),vt(A[Q]));for(var Pt=63;Pt>0&&B[Pt]==0;)Pt--;if(Pt==0)return vt(lt),M;for(var st,O=1;O<=Pt;){for(var le=O;B[O]==0&&O<=Pt;)++O;var re=O-le;if(re>=16){st=re>>4;for(var zt=1;zt<=st;++zt)vt(nt);re&=15}Q=32767+B[O],vt($[(re<<4)+k[Q]]),vt(A[Q]),O++}return Pt!=63&&vt(lt),M}function _t(x){x=Math.min(Math.max(x,1),100),s!=x&&(function(j){for(var M=[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],G=0;G<64;G++){var $=f((M[G]*j+50)/100);$=Math.min(Math.max($,1),255),l[ft[G]]=$}for(var Q=[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],lt=0;lt<64;lt++){var nt=f((Q[lt]*j+50)/100);nt=Math.min(Math.max(nt,1),255),c[ft[lt]]=nt}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],At=0,kt=0;kt<8;kt++)for(var Pt=0;Pt<8;Pt++)d[At]=1/(l[ft[At]]*gt[kt]*gt[Pt]*8),m[At]=1/(c[ft[At]]*gt[kt]*gt[Pt]*8),At++}(x<50?Math.floor(5e3/x):Math.floor(200-2*x)),s=x)}this.encode=function(x,j){j&&_t(j),E=new Array,R=0,S=7,pt(65496),pt(65504),pt(16),rt(74),rt(70),rt(73),rt(70),rt(0),rt(1),rt(1),rt(0),pt(1),pt(1),rt(0),rt(0),function(){pt(65499),pt(132),rt(0);for(var ne=0;ne<64;ne++)rt(l[ne]);rt(1);for(var Ut=0;Ut<64;Ut++)rt(c[Ut])}(),function(ne,Ut){pt(65472),pt(17),rt(8),pt(Ut),pt(ne),rt(3),rt(1),rt(17),rt(0),rt(2),rt(17),rt(1),rt(3),rt(17),rt(1)}(x.width,x.height),function(){pt(65476),pt(418),rt(0);for(var ne=0;ne<16;ne++)rt(tt[ne+1]);for(var Ut=0;Ut<=11;Ut++)rt(z[Ut]);rt(16);for(var de=0;de<16;de++)rt(et[de+1]);for(var Xt=0;Xt<=161;Xt++)rt(N[Xt]);rt(1);for(var Zt=0;Zt<16;Zt++)rt(F[Zt+1]);for(var ye=0;ye<=11;ye++)rt(H[ye]);rt(17);for(var ie=0;ie<16;ie++)rt(U[ie+1]);for(var Dt=0;Dt<=161;Dt++)rt(it[Dt])}(),pt(65498),pt(12),rt(3),rt(1),rt(0),rt(2),rt(17),rt(3),rt(17),rt(0),rt(63),rt(0);var M=0,G=0,$=0;R=0,S=7,this.encode.displayName="_encode_";for(var Q,lt,nt,gt,At,kt,Pt,st,O,le=x.data,re=x.width,zt=x.height,xt=4*re,Tt=0;Tt<zt;){for(Q=0;Q<xt;){for(At=xt*Tt+Q,Pt=-1,st=0,O=0;O<64;O++)kt=At+(st=O>>3)*xt+(Pt=4*(7&O)),Tt+st>=zt&&(kt-=xt*(Tt+1+st-zt)),Q+Pt>=xt&&(kt-=Q+Pt-xt+4),lt=le[kt++],nt=le[kt++],gt=le[kt++],Y[O]=(yt[lt]+yt[nt+256|0]+yt[gt+512|0]>>16)-128,V[O]=(yt[lt+768|0]+yt[nt+1024|0]+yt[gt+1280|0]>>16)-128,D[O]=(yt[lt+1280|0]+yt[nt+1536|0]+yt[gt+1792|0]>>16)-128;M=Nt(Y,d,M,e,i),G=Nt(V,m,G,t,o),$=Nt(D,m,$,t,o),Q+=32}Tt+=8}if(S>=0){var St=[];St[1]=S+1,St[0]=(1<<S+1)-1,vt(St)}return pt(65497),new Uint8Array(E)},r=r||50,function(){for(var x=String.fromCharCode,j=0;j<256;j++)ut[j]=x(j)}(),e=dt(tt,z),t=dt(F,H),i=dt(et,N),o=dt(U,it),function(){for(var x=1,j=2,M=1;M<=15;M++){for(var G=x;G<j;G++)k[32767+G]=M,A[32767+G]=[],A[32767+G][1]=M,A[32767+G][0]=G;for(var $=-(j-1);$<=-x;$++)k[32767+$]=M,A[32767+$]=[],A[32767+$][1]=M,A[32767+$][0]=j-1+$;x<<=1,j<<=1}}(),function(){for(var x=0;x<256;x++)yt[x]=19595*x,yt[x+256|0]=38470*x,yt[x+512|0]=7471*x+32768,yt[x+768|0]=-11059*x,yt[x+1024|0]=-21709*x,yt[x+1280|0]=32768*x+8421375,yt[x+1536|0]=-27439*x,yt[x+1792|0]=-5329*x}(),_t(r)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function Xr(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ku(r){function e(z){if(!z)throw Error("assert :P")}function t(z,et,N){for(var F=0;4>F;F++)if(z[et+F]!=N.charCodeAt(F))return!0;return!1}function i(z,et,N,F,H){for(var U=0;U<H;U++)z[et+U]=N[F+U]}function o(z,et,N,F){for(var H=0;H<F;H++)z[et+H]=N}function s(z){return new Int32Array(z)}function f(z,et){for(var N=[],F=0;F<z;F++)N.push(new et);return N}function l(z,et){var N=[];return function F(H,U,it){for(var dt=it[U],vt=0;vt<dt&&(H.push(it.length>U+1?[]:new et),!(it.length<U+1));vt++)F(H[vt],U+1,it)}(N,0,z),N}var c=function(){var z=this;function et(n,a){for(var h=1<<a-1>>>0;n&h;)h>>>=1;return h?(n&h-1)+h:n}function N(n,a,h,g,b){e(!(g%h));do n[a+(g-=h)]=b;while(0<g)}function F(n,a,h,g,b){if(e(2328>=b),512>=b)var w=s(512);else if((w=s(b))==null)return 0;return function(y,_,L,P,q,Z){var I,W,K=_,at=1<<L,X=s(16),ot=s(16);for(e(q!=0),e(P!=null),e(y!=null),e(0<L),W=0;W<q;++W){if(15<P[W])return 0;++X[P[W]]}if(X[0]==q)return 0;for(ot[1]=0,I=1;15>I;++I){if(X[I]>1<<I)return 0;ot[I+1]=ot[I]+X[I]}for(W=0;W<q;++W)I=P[W],0<P[W]&&(Z[ot[I]++]=W);if(ot[15]==1)return(P=new H).g=0,P.value=Z[0],N(y,K,1,at,P),at;var ct,wt=-1,mt=at-1,Rt=0,It=1,se=1,Et=1<<L;for(W=0,I=1,q=2;I<=L;++I,q<<=1){if(It+=se<<=1,0>(se-=X[I]))return 0;for(;0<X[I];--X[I])(P=new H).g=I,P.value=Z[W++],N(y,K+Rt,q,Et,P),Rt=et(Rt,I)}for(I=L+1,q=2;15>=I;++I,q<<=1){if(It+=se<<=1,0>(se-=X[I]))return 0;for(;0<X[I];--X[I]){if(P=new H,(Rt&mt)!=wt){for(K+=Et,ct=1<<(wt=I)-L;15>wt&&!(0>=(ct-=X[wt]));)++wt,ct<<=1;at+=Et=1<<(ct=wt-L),y[_+(wt=Rt&mt)].g=ct+L,y[_+wt].value=K-_-wt}P.g=I-L,P.value=Z[W++],N(y,K+(Rt>>L),q,Et,P),Rt=et(Rt,I)}}return It!=2*ot[15]-1?0:at}(n,a,h,g,b,w)}function H(){this.value=this.g=0}function U(){this.value=this.g=0}function it(){this.G=f(5,H),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(sn,U)}function dt(n,a,h,g){e(n!=null),e(a!=null),e(2147483648>g),n.Ca=254,n.I=0,n.b=-8,n.Ka=0,n.oa=a,n.pa=h,n.Jd=a,n.Yc=h+g,n.Zc=4<=g?h+g-4+1:h,lt(n)}function vt(n,a){for(var h=0;0<a--;)h|=gt(n,128)<<a;return h}function rt(n,a){var h=vt(n,a);return nt(n)?-h:h}function pt(n,a,h,g){var b,w=0;for(e(n!=null),e(a!=null),e(4294967288>g),n.Sb=g,n.Ra=0,n.u=0,n.h=0,4<g&&(g=4),b=0;b<g;++b)w+=a[h+b]<<8*b;n.Ra=w,n.bb=g,n.oa=a,n.pa=h}function Nt(n){for(;8<=n.u&&n.bb<n.Sb;)n.Ra>>>=8,n.Ra+=n.oa[n.pa+n.bb]<<Tn-8>>>0,++n.bb,n.u-=8;G(n)&&(n.h=1,n.u=0)}function _t(n,a){if(e(0<=a),!n.h&&a<=ua){var h=M(n)&Mn[a];return n.u+=a,Nt(n),h}return n.h=1,n.u=0}function x(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function j(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function M(n){return n.Ra>>>(n.u&Tn-1)>>>0}function G(n){return e(n.bb<=n.Sb),n.h||n.bb==n.Sb&&n.u>Tn}function $(n,a){n.u=a,n.h=G(n)}function Q(n){n.u>=qe&&(e(n.u>=qe),Nt(n))}function lt(n){e(n!=null&&n.oa!=null),n.pa<n.Zc?(n.I=(n.oa[n.pa++]|n.I<<8)>>>0,n.b+=8):(e(n!=null&&n.oa!=null),n.pa<n.Yc?(n.b+=8,n.I=n.oa[n.pa++]|n.I<<8):n.Ka?n.b=0:(n.I<<=8,n.b+=8,n.Ka=1))}function nt(n){return vt(n,1)}function gt(n,a){var h=n.Ca;0>n.b&&lt(n);var g=n.b,b=h*a>>>8,w=(n.I>>>g>b)+0;for(w?(h-=b,n.I-=b+1<<g>>>0):h=b+1,g=h,b=0;256<=g;)b+=8,g>>=8;return g=7^b+Bs[g],n.b-=g,n.Ca=(h<<g)-1,w}function At(n,a,h){n[a+0]=h>>24&255,n[a+1]=h>>16&255,n[a+2]=h>>8&255,n[a+3]=255&h}function kt(n,a){return n[a+0]|n[a+1]<<8}function Pt(n,a){return kt(n,a)|n[a+2]<<16}function st(n,a){return kt(n,a)|kt(n,a+2)<<16}function O(n,a){var h=1<<a;return e(n!=null),e(0<a),n.X=s(h),n.X==null?0:(n.Mb=32-a,n.Xa=a,1)}function le(n,a){e(n!=null),e(a!=null),e(n.Xa==a.Xa),i(a.X,0,n.X,0,1<<a.Xa)}function re(){this.X=[],this.Xa=this.Mb=0}function zt(n,a,h,g){e(h!=null),e(g!=null);var b=h[0],w=g[0];return b==0&&(b=(n*w+a/2)/a),w==0&&(w=(a*b+n/2)/n),0>=b||0>=w?0:(h[0]=b,g[0]=w,1)}function xt(n,a){return n+(1<<a)-1>>>a}function Tt(n,a){return((4278255360&n)+(4278255360&a)>>>0&4278255360)+((16711935&n)+(16711935&a)>>>0&16711935)>>>0}function St(n,a){z[a]=function(h,g,b,w,y,_,L){var P;for(P=0;P<y;++P){var q=z[n](_[L+P-1],b,w+P);_[L+P]=Tt(h[g+P],q)}}}function ne(){this.ud=this.hd=this.jd=0}function Ut(n,a){return((4278124286&(n^a))>>>1)+(n&a)>>>0}function de(n){return 0<=n&&256>n?n:0>n?0:255<n?255:void 0}function Xt(n,a){return de(n+(n-a+.5>>1))}function Zt(n,a,h){return Math.abs(a-h)-Math.abs(n-h)}function ye(n,a,h,g,b,w,y){for(g=w[y-1],h=0;h<b;++h)w[y+h]=g=Tt(n[a+h],g)}function ie(n,a,h,g,b){var w;for(w=0;w<h;++w){var y=n[a+w],_=y>>8&255,L=16711935&(L=(L=16711935&y)+((_<<16)+_));g[b+w]=(4278255360&y)+L>>>0}}function Dt(n,a){a.jd=255&n,a.hd=n>>8&255,a.ud=n>>16&255}function Vt(n,a,h,g,b,w){var y;for(y=0;y<g;++y){var _=a[h+y],L=_>>>8,P=_,q=255&(q=(q=_>>>16)+((n.jd<<24>>24)*(L<<24>>24)>>>5));P=255&(P=(P+=(n.hd<<24>>24)*(L<<24>>24)>>>5)+((n.ud<<24>>24)*(q<<24>>24)>>>5)),b[w+y]=(4278255360&_)+(q<<16)+P}}function qt(n,a,h,g,b){z[a]=function(w,y,_,L,P,q,Z,I,W){for(L=Z;L<I;++L)for(Z=0;Z<W;++Z)P[q++]=b(_[g(w[y++])])},z[n]=function(w,y,_,L,P,q,Z){var I=8>>w.b,W=w.Ea,K=w.K[0],at=w.w;if(8>I)for(w=(1<<w.b)-1,at=(1<<I)-1;y<_;++y){var X,ot=0;for(X=0;X<W;++X)X&w||(ot=g(L[P++])),q[Z++]=b(K[ot&at]),ot>>=I}else z["VP8LMapColor"+h](L,P,K,at,q,Z,y,_,W)}}function ke(n,a,h,g,b){for(h=a+h;a<h;){var w=n[a++];g[b++]=w>>16&255,g[b++]=w>>8&255,g[b++]=255&w}}function pe(n,a,h,g,b){for(h=a+h;a<h;){var w=n[a++];g[b++]=w>>16&255,g[b++]=w>>8&255,g[b++]=255&w,g[b++]=w>>24&255}}function Bt(n,a,h,g,b){for(h=a+h;a<h;){var w=(y=n[a++])>>16&240|y>>12&15,y=240&y|y>>28&15;g[b++]=w,g[b++]=y}}function Qt(n,a,h,g,b){for(h=a+h;a<h;){var w=(y=n[a++])>>16&248|y>>13&7,y=y>>5&224|y>>3&31;g[b++]=w,g[b++]=y}}function _e(n,a,h,g,b){for(h=a+h;a<h;){var w=n[a++];g[b++]=255&w,g[b++]=w>>8&255,g[b++]=w>>16&255}}function Ht(n,a,h,g,b,w){if(w==0)for(h=a+h;a<h;)At(g,((w=n[a++])[0]>>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else i(g,b,n,a,h)}function ue(n,a){z[a][0]=z[n+"0"],z[a][1]=z[n+"1"],z[a][2]=z[n+"2"],z[a][3]=z[n+"3"],z[a][4]=z[n+"4"],z[a][5]=z[n+"5"],z[a][6]=z[n+"6"],z[a][7]=z[n+"7"],z[a][8]=z[n+"8"],z[a][9]=z[n+"9"],z[a][10]=z[n+"10"],z[a][11]=z[n+"11"],z[a][12]=z[n+"12"],z[a][13]=z[n+"13"],z[a][14]=z[n+"0"],z[a][15]=z[n+"0"]}function te(n){return n==Ts||n==Ds||n==Ua||n==qs}function Te(){this.eb=[],this.size=this.A=this.fb=0}function Xe(){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 Ae(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Te,this.f.kb=new Xe,this.sd=null}function Jt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function me(){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 Jn(n){return alert("todo:WebPSamplerProcessPlane"),n.T}function cr(n,a){var h=n.T,g=a.ba.f.RGBA,b=g.eb,w=g.fb+n.ka*g.A,y=Ur[a.ba.S],_=n.y,L=n.O,P=n.f,q=n.N,Z=n.ea,I=n.W,W=a.cc,K=a.dc,at=a.Mc,X=a.Nc,ot=n.ka,ct=n.ka+n.T,wt=n.U,mt=wt+1>>1;for(ot==0?y(_,L,null,null,P,q,Z,I,P,q,Z,I,b,w,null,null,wt):(y(a.ec,a.fc,_,L,W,K,at,X,P,q,Z,I,b,w-g.A,b,w,wt),++h);ot+2<ct;ot+=2)W=P,K=q,at=Z,X=I,q+=n.Rc,I+=n.Rc,w+=2*g.A,y(_,(L+=2*n.fa)-n.fa,_,L,W,K,at,X,P,q,Z,I,b,w-g.A,b,w,wt);return L+=n.fa,n.j+ct<n.o?(i(a.ec,a.fc,_,L,wt),i(a.cc,a.dc,P,q,mt),i(a.Mc,a.Nc,Z,I,mt),h--):1&ct||y(_,L,null,null,P,q,Z,I,P,q,Z,I,b,w+g.A,null,null,wt),h}function gn(n,a,h){var g=n.F,b=[n.J];if(g!=null){var w=n.U,y=a.ba.S,_=y==qa||y==Ua;a=a.ba.f.RGBA;var L=[0],P=n.ka;L[0]=n.T,n.Kb&&(P==0?--L[0]:(--P,b[0]-=n.width),n.j+n.ka+n.T==n.o&&(L[0]=n.o-n.j-P));var q=a.eb;P=a.fb+P*a.A,n=Ho(g,b[0],n.width,w,L,q,P+(_?0:3),a.A),e(h==L),n&&te(y)&&da(q,P,_,w,L,a.A)}return 0}function tn(n){var a=n.ma,h=a.ba.S,g=11>h,b=h==Ta||h==Da||h==qa||h==Ms||h==12||te(h);if(a.memory=null,a.Ib=null,a.Jb=null,a.Nd=null,!xr(a.Oa,n,b?11:12))return 0;if(b&&te(h)&&aa(),n.da)alert("todo:use_scaling");else{if(g){if(a.Ib=Jn,n.Kb){if(h=n.U+1>>1,a.memory=s(n.U+2*h),a.memory==null)return 0;a.ec=a.memory,a.fc=0,a.cc=a.ec,a.dc=a.fc+n.U,a.Mc=a.cc,a.Nc=a.dc+h,a.Ib=cr,aa()}}else alert("todo:EmitYUV");b&&(a.Jb=gn,g&&si())}if(g&&!al){for(n=0;256>n;++n)Fh[n]=89858*(n-128)+Ha>>za,jh[n]=-22014*(n-128)+Ha,Oh[n]=-45773*(n-128),Eh[n]=113618*(n-128)+Ha>>za;for(n=ga;n<Hs;++n)a=76283*(n-16)+Ha>>za,Bh[n-ga]=Qe(a,255),Rh[n-ga]=Qe(a+8>>4,15);al=1}return 1}function Wt(n){var a=n.ma,h=n.U,g=n.T;return e(!(1&n.ka)),0>=h||0>=g?0:(h=a.Ib(n,a),a.Jb!=null&&a.Jb(n,a,h),a.Dc+=h,1)}function mn(n){n.ma.memory=null}function bn(n,a,h,g){return _t(n,8)!=47?0:(a[0]=_t(n,14)+1,h[0]=_t(n,14)+1,g[0]=_t(n,1),_t(n,3)!=0?0:!n.h)}function Br(n,a){if(4>n)return n+1;var h=n-2>>1;return(2+(1&n)<<h)+_t(a,h)+1}function Rr(n,a){return 120<a?a-120:1<=(h=((h=bh[a-1])>>4)*n+(8-(15&h)))?h:1;var h}function je(n,a,h){var g=M(h),b=n[a+=255&g].g-8;return 0<b&&($(h,h.u+8),g=M(h),a+=n[a].value,a+=g&(1<<b)-1),$(h,h.u+n[a].g),n[a].value}function nr(n,a,h){return h.g+=n.g,h.value+=n.value<<a>>>0,e(8>=h.g),n.g}function sr(n,a,h){var g=n.xc;return e((a=g==0?0:n.vc[n.md*(h>>g)+(a>>g)])<n.Wb),n.Ya[a]}function $n(n,a,h,g){var b=n.ab,w=n.c*a,y=n.C;a=y+a;var _=h,L=g;for(g=n.Ta,h=n.Ua;0<b--;){var P=n.gc[b],q=y,Z=a,I=_,W=L,K=(L=g,_=h,P.Ea);switch(e(q<Z),e(Z<=P.nc),P.hc){case 2:Ii(I,W,(Z-q)*K,L,_);break;case 0:var at=q,X=Z,ot=L,ct=_,wt=(Et=P).Ea;at==0&&(on(I,W,null,null,1,ot,ct),ye(I,W+1,0,0,wt-1,ot,ct+1),W+=wt,ct+=wt,++at);for(var mt=1<<Et.b,Rt=mt-1,It=xt(wt,Et.b),se=Et.K,Et=Et.w+(at>>Et.b)*It;at<X;){var he=se,tr=Et,oe=1;for(ln(I,W,ot,ct-wt,1,ot,ct);oe<wt;){var Ot=(oe&~Rt)+mt;Ot>wt&&(Ot=wt),(0,ui[he[tr++]>>8&15])(I,W+ +oe,ot,ct+oe-wt,Ot-oe,ot,ct+oe),oe=Ot}W+=wt,ct+=wt,++at&Rt||(Et+=It)}Z!=P.nc&&i(L,_-K,L,_+(Z-q-1)*K,K);break;case 1:for(K=I,X=W,wt=(I=P.Ea)-(ct=I&~(ot=(W=1<<P.b)-1)),at=xt(I,P.b),mt=P.K,P=P.w+(q>>P.b)*at;q<Z;){for(Rt=mt,It=P,se=new ne,Et=X+ct,he=X+I;X<Et;)Dt(Rt[It++],se),Nn(se,K,X,W,L,_),X+=W,_+=W;X<he&&(Dt(Rt[It++],se),Nn(se,K,X,wt,L,_),X+=wt,_+=wt),++q&ot||(P+=at)}break;case 3:if(I==L&&W==_&&0<P.b){for(X=L,I=K=_+(Z-q)*K-(ct=(Z-q)*xt(P.Ea,P.b)),W=L,ot=_,at=[],ct=(wt=ct)-1;0<=ct;--ct)at[ct]=W[ot+ct];for(ct=wt-1;0<=ct;--ct)X[I+ct]=at[ct];ha(P,q,Z,L,K,L,_)}else ha(P,q,Z,I,W,L,_)}_=g,L=h}L!=h&&i(g,h,_,L,w)}function Fn(n,a){var h=n.V,g=n.Ba+n.c*n.C,b=a-n.C;if(e(a<=n.l.o),e(16>=b),0<b){var w=n.l,y=n.Ta,_=n.Ua,L=w.width;if($n(n,b,h,g),b=_=[_],e((h=n.C)<(g=a)),e(w.v<w.va),g>w.o&&(g=w.o),h<w.j){var P=w.j-h;h=w.j,b[0]+=P*L}if(h>=g?h=0:(b[0]+=4*w.v,w.ka=h-w.j,w.U=w.va-w.v,w.T=g-h,h=1),h){if(_=_[0],11>(h=n.ca).S){var q=h.f.RGBA,Z=(g=h.S,b=w.U,w=w.T,P=q.eb,q.A),I=w;for(q=q.fb+n.Ma*q.A;0<I--;){var W=y,K=_,at=b,X=P,ot=q;switch(g){case Ma:ca(W,K,at,X,ot);break;case Ta:kr(W,K,at,X,ot);break;case Ts:kr(W,K,at,X,ot),da(X,ot,0,at,1,0);break;case Ko:Ie(W,K,at,X,ot);break;case Da:Ht(W,K,at,X,ot,1);break;case Ds:Ht(W,K,at,X,ot,1),da(X,ot,0,at,1,0);break;case qa:Ht(W,K,at,X,ot,0);break;case Ua:Ht(W,K,at,X,ot,0),da(X,ot,1,at,1,0);break;case Ms:un(W,K,at,X,ot);break;case qs:un(W,K,at,X,ot),zo(X,ot,at,1,0);break;case Xo:Pe(W,K,at,X,ot);break;default:e(0)}_+=L,q+=Z}n.Ma+=w}else alert("todo:EmitRescaledRowsYUVA");e(n.Ma<=h.height)}}n.C=a,e(n.C<=n.i)}function Hr(n){var a;if(0<n.ua)return 0;for(a=0;a<n.Wb;++a){var h=n.Ya[a].G,g=n.Ya[a].H;if(0<h[1][g[1]+0].g||0<h[2][g[2]+0].g||0<h[3][g[3]+0].g)return 0}return 1}function en(n,a,h,g,b,w){if(n.Z!=0){var y=n.qd,_=n.rd;for(e(qn[n.Z]!=null);a<h;++a)qn[n.Z](y,_,g,b,g,b,w),y=g,_=b,b+=w;n.qd=y,n.rd=_}}function Wr(n,a){var h=n.l.ma,g=h.Z==0||h.Z==1?n.l.j:n.C;if(g=n.C<g?g:n.C,e(a<=n.l.o),a>g){var b=n.l.width,w=h.ca,y=h.tb+b*g,_=n.V,L=n.Ba+n.c*g,P=n.gc;e(n.ab==1),e(P[0].hc==3),Fi(P[0],g,a,_,L,w,y),en(h,g,a,w,y,b)}n.C=n.Ma=a}function Vr(n,a,h,g,b,w,y){var _=n.$/g,L=n.$%g,P=n.m,q=n.s,Z=h+n.$,I=Z;b=h+g*b;var W=h+g*w,K=280+q.ua,at=n.Pb?_:16777216,X=0<q.ua?q.Wa:null,ot=q.wc,ct=Z<W?sr(q,L,_):null;e(n.C<w),e(W<=b);var wt=!1;t:for(;;){for(;wt||Z<W;){var mt=0;if(_>=at){var Rt=Z-h;e((at=n).Pb),at.wd=at.m,at.xd=Rt,0<at.s.ua&&le(at.s.Wa,at.s.vb),at=_+wh}if(L&ot||(ct=sr(q,L,_)),e(ct!=null),ct.Qb&&(a[Z]=ct.qb,wt=!0),!wt)if(Q(P),ct.jc){mt=P,Rt=a;var It=Z,se=ct.pd[M(mt)&sn-1];e(ct.jc),256>se.g?($(mt,mt.u+se.g),Rt[It]=se.value,mt=0):($(mt,mt.u+se.g-256),e(256<=se.value),mt=se.value),mt==0&&(wt=!0)}else mt=je(ct.G[0],ct.H[0],P);if(P.h)break;if(wt||256>mt){if(!wt)if(ct.nd)a[Z]=(ct.qb|mt<<8)>>>0;else{if(Q(P),wt=je(ct.G[1],ct.H[1],P),Q(P),Rt=je(ct.G[2],ct.H[2],P),It=je(ct.G[3],ct.H[3],P),P.h)break;a[Z]=(It<<24|wt<<16|mt<<8|Rt)>>>0}if(wt=!1,++Z,++L>=g&&(L=0,++_,y!=null&&_<=w&&!(_%16)&&y(n,_),X!=null))for(;I<Z;)mt=a[I++],X.X[(506832829*mt&4294967295)>>>X.Mb]=mt}else if(280>mt){if(mt=Br(mt-256,P),Rt=je(ct.G[4],ct.H[4],P),Q(P),Rt=Rr(g,Rt=Br(Rt,P)),P.h)break;if(Z-h<Rt||b-Z<mt)break t;for(It=0;It<mt;++It)a[Z+It]=a[Z+It-Rt];for(Z+=mt,L+=mt;L>=g;)L-=g,++_,y!=null&&_<=w&&!(_%16)&&y(n,_);if(e(Z<=b),L&ot&&(ct=sr(q,L,_)),X!=null)for(;I<Z;)mt=a[I++],X.X[(506832829*mt&4294967295)>>>X.Mb]=mt}else{if(!(mt<K))break t;for(wt=mt-280,e(X!=null);I<Z;)mt=a[I++],X.X[(506832829*mt&4294967295)>>>X.Mb]=mt;mt=Z,e(!(wt>>>(Rt=X).Xa)),a[mt]=Rt.X[wt],wt=!0}wt||e(P.h==G(P))}if(n.Pb&&P.h&&Z<b)e(n.m.h),n.a=5,n.m=n.wd,n.$=n.xd,0<n.s.ua&&le(n.s.vb,n.s.Wa);else{if(P.h)break t;y!=null&&y(n,_>w?w:_),n.a=0,n.$=Z-h}return 1}return n.a=3,0}function Mr(n){e(n!=null),n.vc=null,n.yc=null,n.Ya=null;var a=n.Wa;a!=null&&(a.X=null),n.vb=null,e(n!=null)}function Kn(){var n=new Oe;return n==null?null:(n.a=0,n.xb=tl,ue("Predictor","VP8LPredictors"),ue("Predictor","VP8LPredictors_C"),ue("PredictorAdd","VP8LPredictorsAdd"),ue("PredictorAdd","VP8LPredictorsAdd_C"),Ii=ie,Nn=Vt,ca=ke,kr=pe,un=Bt,Pe=Qt,Ie=_e,z.VP8LMapColor32b=Ci,z.VP8LMapColor8b=li,n)}function rn(n,a,h,g,b){var w=1,y=[n],_=[a],L=g.m,P=g.s,q=null,Z=0;t:for(;;){if(h)for(;w&&_t(L,1);){var I=y,W=_,K=g,at=1,X=K.m,ot=K.gc[K.ab],ct=_t(X,2);if(K.Oc&1<<ct)w=0;else{switch(K.Oc|=1<<ct,ot.hc=ct,ot.Ea=I[0],ot.nc=W[0],ot.K=[null],++K.ab,e(4>=K.ab),ct){case 0:case 1:ot.b=_t(X,3)+2,at=rn(xt(ot.Ea,ot.b),xt(ot.nc,ot.b),0,K,ot.K),ot.K=ot.K[0];break;case 3:var wt,mt=_t(X,8)+1,Rt=16<mt?0:4<mt?1:2<mt?2:3;if(I[0]=xt(ot.Ea,Rt),ot.b=Rt,wt=at=rn(mt,1,0,K,ot.K)){var It,se=mt,Et=ot,he=1<<(8>>Et.b),tr=s(he);if(tr==null)wt=0;else{var oe=Et.K[0],Ot=Et.w;for(tr[0]=Et.K[0][0],It=1;It<1*se;++It)tr[It]=Tt(oe[Ot+It],tr[It-1]);for(;It<4*he;++It)tr[It]=0;Et.K[0]=null,Et.K[0]=tr,wt=1}}at=wt;break;case 2:break;default:e(0)}w=at}}if(y=y[0],_=_[0],w&&_t(L,1)&&!(w=1<=(Z=_t(L,4))&&11>=Z)){g.a=3;break t}var Lt;if(Lt=w)e:{var He,ee,ce,Fe=g,lr=y,vr=_,Be=Z,fr=h,wr=Fe.m,er=Fe.s,fe=[null],be=1,Re=0,ve=vh[Be];r:for(;;){if(fr&&_t(wr,1)){var ur=_t(wr,3)+2,$r=xt(lr,ur),We=xt(vr,ur),Ar=$r*We;if(!rn($r,We,0,Fe,fe))break r;for(fe=fe[0],er.xc=ur,He=0;He<Ar;++He){var Ne=fe[He]>>8&65535;fe[He]=Ne,Ne>=be&&(be=Ne+1)}}if(wr.h)break r;for(ee=0;5>ee;++ee){var rr=Zo[ee];!ee&&0<Be&&(rr+=1<<Be),Re<rr&&(Re=rr)}var Ir=f(be*ve,H),yr=be,Cr=f(yr,it);if(Cr==null)var Fr=null;else e(65536>=yr),Fr=Cr;var Nr=s(Re);if(Fr==null||Nr==null||Ir==null){Fe.a=1;break r}var Er=Ir;for(He=ce=0;He<be;++He){var Ce=Fr[He],Or=Ce.G,Kr=Ce.H,hi=0,kn=1,hr=0;for(ee=0;5>ee;++ee){rr=Zo[ee],Or[ee]=Er,Kr[ee]=ce,!ee&&0<Be&&(rr+=1<<Be);i:{var Va,Ws=rr,Ga=Fe,ma=Nr,Dh=Er,qh=ce,Vs=0,Un=Ga.m,Uh=_t(Un,1);if(o(ma,0,0,Ws),Uh){var zh=_t(Un,1)+1,Hh=_t(Un,1),ll=_t(Un,Hh==0?1:8);ma[ll]=1,zh==2&&(ma[ll=_t(Un,8)]=1);var Ya=1}else{var ul=s(19),hl=_t(Un,4)+4;if(19<hl){Ga.a=3;var Ja=0;break i}for(Va=0;Va<hl;++Va)ul[mh[Va]]=_t(Un,3);var Gs=void 0,ba=void 0,cl=Ga,Wh=ul,$a=Ws,fl=ma,Ys=0,zn=cl.m,dl=8,pl=f(128,H);n:for(;F(pl,0,7,Wh,19);){if(_t(zn,1)){var Vh=2+2*_t(zn,3);if((Gs=2+_t(zn,Vh))>$a)break n}else Gs=$a;for(ba=0;ba<$a&&Gs--;){Q(zn);var gl=pl[0+(127&M(zn))];$(zn,zn.u+gl.g);var Oi=gl.value;if(16>Oi)fl[ba++]=Oi,Oi!=0&&(dl=Oi);else{var Gh=Oi==16,ml=Oi-16,Yh=ph[ml],bl=_t(zn,dh[ml])+Yh;if(ba+bl>$a)break n;for(var Jh=Gh?dl:0;0<bl--;)fl[ba++]=Jh}}Ys=1;break n}Ys||(cl.a=3),Ya=Ys}(Ya=Ya&&!Un.h)&&(Vs=F(Dh,qh,8,ma,Ws)),Ya&&Vs!=0?Ja=Vs:(Ga.a=3,Ja=0)}if(Ja==0)break r;if(kn&&gh[ee]==1&&(kn=Er[ce].g==0),hi+=Er[ce].g,ce+=Ja,3>=ee){var va,Js=Nr[0];for(va=1;va<rr;++va)Nr[va]>Js&&(Js=Nr[va]);hr+=Js}}if(Ce.nd=kn,Ce.Qb=0,kn&&(Ce.qb=(Or[3][Kr[3]+0].value<<24|Or[1][Kr[1]+0].value<<16|Or[2][Kr[2]+0].value)>>>0,hi==0&&256>Or[0][Kr[0]+0].value&&(Ce.Qb=1,Ce.qb+=Or[0][Kr[0]+0].value<<8)),Ce.jc=!Ce.Qb&&6>hr,Ce.jc){var Ka,Pn=Ce;for(Ka=0;Ka<sn;++Ka){var Hn=Ka,Wn=Pn.pd[Hn],Xa=Pn.G[0][Pn.H[0]+Hn];256<=Xa.value?(Wn.g=Xa.g+256,Wn.value=Xa.value):(Wn.g=0,Wn.value=0,Hn>>=nr(Xa,8,Wn),Hn>>=nr(Pn.G[1][Pn.H[1]+Hn],16,Wn),Hn>>=nr(Pn.G[2][Pn.H[2]+Hn],0,Wn),nr(Pn.G[3][Pn.H[3]+Hn],24,Wn))}}}er.vc=fe,er.Wb=be,er.Ya=Fr,er.yc=Ir,Lt=1;break e}Lt=0}if(!(w=Lt)){g.a=3;break t}if(0<Z){if(P.ua=1<<Z,!O(P.Wa,Z)){g.a=1,w=0;break t}}else P.ua=0;var $s=g,vl=y,$h=_,Ks=$s.s,Xs=Ks.xc;if($s.c=vl,$s.i=$h,Ks.md=xt(vl,Xs),Ks.wc=Xs==0?-1:(1<<Xs)-1,h){g.xb=Sh;break t}if((q=s(y*_))==null){g.a=1,w=0;break t}w=(w=Vr(g,q,0,y,_,_,null))&&!L.h;break t}return w?(b!=null?b[0]=q:(e(q==null),e(h)),g.$=0,h||Mr(P)):Mr(P),w}function Xn(n,a){var h=n.c*n.i,g=h+a+16*a;return e(n.c<=a),n.V=s(g),n.V==null?(n.Ta=null,n.Ua=0,n.a=1,0):(n.Ta=n.V,n.Ua=n.Ba+h+a,1)}function bi(n,a){var h=n.C,g=a-h,b=n.V,w=n.Ba+n.c*h;for(e(a<=n.l.o);0<g;){var y=16<g?16:g,_=n.l.ma,L=n.l.width,P=L*y,q=_.ca,Z=_.tb+L*h,I=n.Ta,W=n.Ua;$n(n,y,b,w),Wo(I,W,q,Z,P),en(_,h,h+y,q,Z,L),g-=y,b+=y*n.c,h+=y}e(h==a),n.C=n.Ma=a}function vi(){this.ub=this.yd=this.td=this.Rb=0}function wi(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function vs(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Vi(){this.Yb=function(){var n=[];return function a(h,g,b){for(var w=b[g],y=0;y<w&&(h.push(b.length>g+1?[]:0),!(b.length<g+1));y++)a(h[y],g+1,b)}(n,0,[3,11]),n}()}function Aa(){this.jb=s(3),this.Wc=l([4,8],Vi),this.Xc=l([4,17],Vi)}function Na(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Tr(){this.ld=this.La=this.dd=this.tc=0}function Gi(){this.Na=this.la=0}function La(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Yi(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Sa(){this.uc=this.M=this.Nb=0,this.wa=Array(new Tr),this.Y=0,this.ya=Array(new Yi),this.aa=0,this.l=new yi}function ka(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Pa(){this.cb=this.a=0,this.sc="",this.m=new x,this.Od=new vi,this.Kc=new wi,this.ed=new Na,this.Qa=new vs,this.Ic=this.$c=this.Aa=0,this.D=new Sa,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=f(8,x),this.ia=0,this.pb=f(4,La),this.Pa=new Aa,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ka),this.Hd=0,this.rb=Array(new Gi),this.sb=0,this.wa=Array(new Tr),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Yi),this.L=this.aa=0,this.gd=l([4,2],Tr),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function yi(){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 ws(){var n=new Pa;return n!=null&&(n.a=0,n.sc="OK",n.cb=0,n.Xb=0,pa||(pa=vn)),n}function Je(n,a,h){return n.a==0&&(n.a=a,n.sc=h,n.cb=0),0}function Ia(n,a,h){return 3<=h&&n[a+0]==157&&n[a+1]==1&&n[a+2]==42}function Ca(n,a){if(n==null)return 0;if(n.a=0,n.sc="OK",a==null)return Je(n,2,"null VP8Io passed to VP8GetHeaders()");var h=a.data,g=a.w,b=a.ha;if(4>b)return Je(n,7,"Truncated header.");var w=h[g+0]|h[g+1]<<8|h[g+2]<<16,y=n.Od;if(y.Rb=!(1&w),y.td=w>>1&7,y.yd=w>>4&1,y.ub=w>>5,3<y.td)return Je(n,3,"Incorrect keyframe parameters.");if(!y.yd)return Je(n,4,"Frame not displayable.");g+=3,b-=3;var _=n.Kc;if(y.Rb){if(7>b)return Je(n,7,"cannot parse picture header");if(!Ia(h,g,b))return Je(n,3,"Bad code word");_.c=16383&(h[g+4]<<8|h[g+3]),_.Td=h[g+4]>>6,_.i=16383&(h[g+6]<<8|h[g+5]),_.Ud=h[g+6]>>6,g+=7,b-=7,n.za=_.c+15>>4,n.Ub=_.i+15>>4,a.width=_.c,a.height=_.i,a.Da=0,a.j=0,a.v=0,a.va=a.width,a.o=a.height,a.da=0,a.ib=a.width,a.hb=a.height,a.U=a.width,a.T=a.height,o((w=n.Pa).jb,0,255,w.jb.length),e((w=n.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,o(w.Zb,0,0,w.Zb.length),o(w.Lb,0,0,w.Lb)}if(y.ub>b)return Je(n,7,"bad partition length");dt(w=n.m,h,g,y.ub),g+=y.ub,b-=y.ub,y.Rb&&(_.Ld=nt(w),_.Kd=nt(w)),_=n.Qa;var L,P=n.Pa;if(e(w!=null),e(_!=null),_.Cb=nt(w),_.Cb){if(_.Bb=nt(w),nt(w)){for(_.Fb=nt(w),L=0;4>L;++L)_.Zb[L]=nt(w)?rt(w,7):0;for(L=0;4>L;++L)_.Lb[L]=nt(w)?rt(w,6):0}if(_.Bb)for(L=0;3>L;++L)P.jb[L]=nt(w)?vt(w,8):255}else _.Bb=0;if(w.Ka)return Je(n,3,"cannot parse segment header");if((_=n.ed).zd=nt(w),_.Tb=vt(w,6),_.wb=vt(w,3),_.Pc=nt(w),_.Pc&&nt(w)){for(P=0;4>P;++P)nt(w)&&(_.vd[P]=rt(w,6));for(P=0;4>P;++P)nt(w)&&(_.od[P]=rt(w,6))}if(n.L=_.Tb==0?0:_.zd?1:2,w.Ka)return Je(n,3,"cannot parse filter header");var q=b;if(b=L=g,g=L+q,_=q,n.Xb=(1<<vt(n.m,2))-1,q<3*(P=n.Xb))h=7;else{for(L+=3*P,_-=3*P,q=0;q<P;++q){var Z=h[b+0]|h[b+1]<<8|h[b+2]<<16;Z>_&&(Z=_),dt(n.Jc[+q],h,L,Z),L+=Z,_-=Z,b+=3}dt(n.Jc[+P],h,L,_),h=L<g?0:5}if(h!=0)return Je(n,h,"cannot parse partitions");for(h=vt(L=n.m,7),b=nt(L)?rt(L,4):0,g=nt(L)?rt(L,4):0,_=nt(L)?rt(L,4):0,P=nt(L)?rt(L,4):0,L=nt(L)?rt(L,4):0,q=n.Qa,Z=0;4>Z;++Z){if(q.Cb){var I=q.Zb[Z];q.Fb||(I+=h)}else{if(0<Z){n.pb[Z]=n.pb[0];continue}I=h}var W=n.pb[Z];W.Sc[0]=Us[Qe(I+b,127)],W.Sc[1]=zs[Qe(I+0,127)],W.Eb[0]=2*Us[Qe(I+g,127)],W.Eb[1]=101581*zs[Qe(I+_,127)]>>16,8>W.Eb[1]&&(W.Eb[1]=8),W.Qc[0]=Us[Qe(I+P,117)],W.Qc[1]=zs[Qe(I+L,127)],W.lc=I+L}if(!y.Rb)return Je(n,4,"Not a key frame.");for(nt(w),y=n.Pa,h=0;4>h;++h){for(b=0;8>b;++b)for(g=0;3>g;++g)for(_=0;11>_;++_)P=gt(w,Nh[h][b][g][_])?vt(w,8):_h[h][b][g][_],y.Wc[h][b].Yb[g][_]=P;for(b=0;17>b;++b)y.Xc[h][b]=y.Wc[h][Lh[b]]}return n.kc=nt(w),n.kc&&(n.Bd=vt(w,8)),n.cb=1}function vn(n,a,h,g,b,w,y){var _=a[b].Yb[h];for(h=0;16>b;++b){if(!gt(n,_[h+0]))return b;for(;!gt(n,_[h+1]);)if(_=a[++b].Yb[0],h=0,b==16)return 16;var L=a[b+1].Yb;if(gt(n,_[h+2])){var P=n,q=0;if(gt(P,(I=_)[(Z=h)+3]))if(gt(P,I[Z+6])){for(_=0,Z=2*(q=gt(P,I[Z+8]))+(I=gt(P,I[Z+9+q])),q=0,I=yh[Z];I[_];++_)q+=q+gt(P,I[_]);q+=3+(8<<Z)}else gt(P,I[Z+7])?(q=7+2*gt(P,165),q+=gt(P,145)):q=5+gt(P,159);else q=gt(P,I[Z+4])?3+gt(P,I[Z+5]):2;_=L[2]}else q=1,_=L[1];L=y+xh[b],0>(P=n).b&&lt(P);var Z,I=P.b,W=(Z=P.Ca>>1)-(P.I>>I)>>31;--P.b,P.Ca+=W,P.Ca|=1,P.I-=(Z+1&W)<<I,w[L]=((q^W)-W)*g[(0<b)+0]}return 16}function Zn(n){var a=n.rb[n.sb-1];a.la=0,a.Na=0,o(n.zc,0,0,n.zc.length),n.ja=0}function Gr(n,a,h,g,b){b=n[a+h+32*g]+(b>>3),n[a+h+32*g]=-256&b?0>b?0:255:b}function Qn(n,a,h,g,b,w){Gr(n,a,0,h,g+b),Gr(n,a,1,h,g+w),Gr(n,a,2,h,g-w),Gr(n,a,3,h,g-b)}function De(n){return(20091*n>>16)+n}function Ji(n,a,h,g){var b,w=0,y=s(16);for(b=0;4>b;++b){var _=n[a+0]+n[a+8],L=n[a+0]-n[a+8],P=(35468*n[a+4]>>16)-De(n[a+12]),q=De(n[a+4])+(35468*n[a+12]>>16);y[w+0]=_+q,y[w+1]=L+P,y[w+2]=L-P,y[w+3]=_-q,w+=4,a++}for(b=w=0;4>b;++b)_=(n=y[w+0]+4)+y[w+8],L=n-y[w+8],P=(35468*y[w+4]>>16)-De(y[w+12]),Gr(h,g,0,0,_+(q=De(y[w+4])+(35468*y[w+12]>>16))),Gr(h,g,1,0,L+P),Gr(h,g,2,0,L-P),Gr(h,g,3,0,_-q),w++,g+=32}function ys(n,a,h,g){var b=n[a+0]+4,w=35468*n[a+4]>>16,y=De(n[a+4]),_=35468*n[a+1]>>16;Qn(h,g,0,b+y,n=De(n[a+1]),_),Qn(h,g,1,b+w,n,_),Qn(h,g,2,b-w,n,_),Qn(h,g,3,b-y,n,_)}function xs(n,a,h,g,b){Ji(n,a,h,g),b&&Ji(n,a+16,h,g+4)}function _s(n,a,h,g){ze(n,a+0,h,g,1),ze(n,a+32,h,g+128,1)}function nn(n,a,h,g){var b;for(n=n[a+0]+4,b=0;4>b;++b)for(a=0;4>a;++a)Gr(h,g,a,b,n)}function Fa(n,a,h,g){n[a+0]&&hn(n,a+0,h,g),n[a+16]&&hn(n,a+16,h,g+4),n[a+32]&&hn(n,a+32,h,g+128),n[a+48]&&hn(n,a+48,h,g+128+4)}function Ea(n,a,h,g){var b,w=s(16);for(b=0;4>b;++b){var y=n[a+0+b]+n[a+12+b],_=n[a+4+b]+n[a+8+b],L=n[a+4+b]-n[a+8+b],P=n[a+0+b]-n[a+12+b];w[0+b]=y+_,w[8+b]=y-_,w[4+b]=P+L,w[12+b]=P-L}for(b=0;4>b;++b)y=(n=w[0+4*b]+3)+w[3+4*b],_=w[1+4*b]+w[2+4*b],L=w[1+4*b]-w[2+4*b],P=n-w[3+4*b],h[g+0]=y+_>>3,h[g+16]=P+L>>3,h[g+32]=y-_>>3,h[g+48]=P-L>>3,g+=64}function En(n,a,h){var g,b=a-32,w=Pr,y=255-n[b-1];for(g=0;g<h;++g){var _,L=w,P=y+n[a-1];for(_=0;_<h;++_)n[a+_]=L[P+n[b+_]];a+=32}}function $i(n,a){En(n,a,4)}function As(n,a){En(n,a,8)}function Ns(n,a){En(n,a,16)}function Ls(n,a){var h;for(h=0;16>h;++h)i(n,a+32*h,n,a-32,16)}function Ki(n,a){var h;for(h=16;0<h;--h)o(n,a,n[a-1],16),a+=32}function ti(n,a,h){var g;for(g=0;16>g;++g)o(a,h+32*g,n,16)}function On(n,a){var h,g=16;for(h=0;16>h;++h)g+=n[a-1+32*h]+n[a+h-32];ti(g>>5,n,a)}function Ss(n,a){var h,g=8;for(h=0;16>h;++h)g+=n[a-1+32*h];ti(g>>4,n,a)}function ei(n,a){var h,g=8;for(h=0;16>h;++h)g+=n[a+h-32];ti(g>>4,n,a)}function Xi(n,a){ti(128,n,a)}function $t(n,a,h){return n+2*a+h+2>>2}function ks(n,a){var h,g=a-32;for(g=new Uint8Array([$t(n[g-1],n[g+0],n[g+1]),$t(n[g+0],n[g+1],n[g+2]),$t(n[g+1],n[g+2],n[g+3]),$t(n[g+2],n[g+3],n[g+4])]),h=0;4>h;++h)i(n,a+32*h,g,0,g.length)}function Ps(n,a){var h=n[a-1],g=n[a-1+32],b=n[a-1+64],w=n[a-1+96];At(n,a+0,16843009*$t(n[a-1-32],h,g)),At(n,a+32,16843009*$t(h,g,b)),At(n,a+64,16843009*$t(g,b,w)),At(n,a+96,16843009*$t(b,w,w))}function Is(n,a){var h,g=4;for(h=0;4>h;++h)g+=n[a+h-32]+n[a-1+32*h];for(g>>=3,h=0;4>h;++h)o(n,a+32*h,g,4)}function Cs(n,a){var h=n[a-1+0],g=n[a-1+32],b=n[a-1+64],w=n[a-1-32],y=n[a+0-32],_=n[a+1-32],L=n[a+2-32],P=n[a+3-32];n[a+0+96]=$t(g,b,n[a-1+96]),n[a+1+96]=n[a+0+64]=$t(h,g,b),n[a+2+96]=n[a+1+64]=n[a+0+32]=$t(w,h,g),n[a+3+96]=n[a+2+64]=n[a+1+32]=n[a+0+0]=$t(y,w,h),n[a+3+64]=n[a+2+32]=n[a+1+0]=$t(_,y,w),n[a+3+32]=n[a+2+0]=$t(L,_,y),n[a+3+0]=$t(P,L,_)}function wn(n,a){var h=n[a+1-32],g=n[a+2-32],b=n[a+3-32],w=n[a+4-32],y=n[a+5-32],_=n[a+6-32],L=n[a+7-32];n[a+0+0]=$t(n[a+0-32],h,g),n[a+1+0]=n[a+0+32]=$t(h,g,b),n[a+2+0]=n[a+1+32]=n[a+0+64]=$t(g,b,w),n[a+3+0]=n[a+2+32]=n[a+1+64]=n[a+0+96]=$t(b,w,y),n[a+3+32]=n[a+2+64]=n[a+1+96]=$t(w,y,_),n[a+3+64]=n[a+2+96]=$t(y,_,L),n[a+3+96]=$t(_,L,L)}function yn(n,a){var h=n[a-1+0],g=n[a-1+32],b=n[a-1+64],w=n[a-1-32],y=n[a+0-32],_=n[a+1-32],L=n[a+2-32],P=n[a+3-32];n[a+0+0]=n[a+1+64]=w+y+1>>1,n[a+1+0]=n[a+2+64]=y+_+1>>1,n[a+2+0]=n[a+3+64]=_+L+1>>1,n[a+3+0]=L+P+1>>1,n[a+0+96]=$t(b,g,h),n[a+0+64]=$t(g,h,w),n[a+0+32]=n[a+1+96]=$t(h,w,y),n[a+1+32]=n[a+2+96]=$t(w,y,_),n[a+2+32]=n[a+3+96]=$t(y,_,L),n[a+3+32]=$t(_,L,P)}function Fs(n,a){var h=n[a+0-32],g=n[a+1-32],b=n[a+2-32],w=n[a+3-32],y=n[a+4-32],_=n[a+5-32],L=n[a+6-32],P=n[a+7-32];n[a+0+0]=h+g+1>>1,n[a+1+0]=n[a+0+64]=g+b+1>>1,n[a+2+0]=n[a+1+64]=b+w+1>>1,n[a+3+0]=n[a+2+64]=w+y+1>>1,n[a+0+32]=$t(h,g,b),n[a+1+32]=n[a+0+96]=$t(g,b,w),n[a+2+32]=n[a+1+96]=$t(b,w,y),n[a+3+32]=n[a+2+96]=$t(w,y,_),n[a+3+64]=$t(y,_,L),n[a+3+96]=$t(_,L,P)}function Es(n,a){var h=n[a-1+0],g=n[a-1+32],b=n[a-1+64],w=n[a-1+96];n[a+0+0]=h+g+1>>1,n[a+2+0]=n[a+0+32]=g+b+1>>1,n[a+2+32]=n[a+0+64]=b+w+1>>1,n[a+1+0]=$t(h,g,b),n[a+3+0]=n[a+1+32]=$t(g,b,w),n[a+3+32]=n[a+1+64]=$t(b,w,w),n[a+3+64]=n[a+2+64]=n[a+0+96]=n[a+1+96]=n[a+2+96]=n[a+3+96]=w}function xi(n,a){var h=n[a-1+0],g=n[a-1+32],b=n[a-1+64],w=n[a-1+96],y=n[a-1-32],_=n[a+0-32],L=n[a+1-32],P=n[a+2-32];n[a+0+0]=n[a+2+32]=h+y+1>>1,n[a+0+32]=n[a+2+64]=g+h+1>>1,n[a+0+64]=n[a+2+96]=b+g+1>>1,n[a+0+96]=w+b+1>>1,n[a+3+0]=$t(_,L,P),n[a+2+0]=$t(y,_,L),n[a+1+0]=n[a+3+32]=$t(h,y,_),n[a+1+32]=n[a+3+64]=$t(g,h,y),n[a+1+64]=n[a+3+96]=$t(b,g,h),n[a+1+96]=$t(w,b,g)}function Zi(n,a){var h;for(h=0;8>h;++h)i(n,a+32*h,n,a-32,8)}function ri(n,a){var h;for(h=0;8>h;++h)o(n,a,n[a-1],8),a+=32}function _i(n,a,h){var g;for(g=0;8>g;++g)o(a,h+32*g,n,8)}function Ai(n,a){var h,g=8;for(h=0;8>h;++h)g+=n[a+h-32]+n[a-1+32*h];_i(g>>4,n,a)}function Os(n,a){var h,g=4;for(h=0;8>h;++h)g+=n[a+h-32];_i(g>>3,n,a)}function Qi(n,a){var h,g=4;for(h=0;8>h;++h)g+=n[a-1+32*h];_i(g>>3,n,a)}function ta(n,a){_i(128,n,a)}function ni(n,a,h){var g=n[a-h],b=n[a+0],w=3*(b-g)+Rs[1020+n[a-2*h]-n[a+h]],y=Ra[112+(w+4>>3)];n[a-h]=Pr[255+g+Ra[112+(w+3>>3)]],n[a+0]=Pr[255+b-y]}function ii(n,a,h,g){var b=n[a+0],w=n[a+h];return qr[255+n[a-2*h]-n[a-h]]>g||qr[255+w-b]>g}function ea(n,a,h,g){return 4*qr[255+n[a-h]-n[a+0]]+qr[255+n[a-2*h]-n[a+h]]<=g}function Ni(n,a,h,g,b){var w=n[a-3*h],y=n[a-2*h],_=n[a-h],L=n[a+0],P=n[a+h],q=n[a+2*h],Z=n[a+3*h];return 4*qr[255+_-L]+qr[255+y-P]>g?0:qr[255+n[a-4*h]-w]<=b&&qr[255+w-y]<=b&&qr[255+y-_]<=b&&qr[255+Z-q]<=b&&qr[255+q-P]<=b&&qr[255+P-L]<=b}function ra(n,a,h,g){var b=2*g+1;for(g=0;16>g;++g)ea(n,a+g,h,b)&&ni(n,a+g,h)}function ai(n,a,h,g){var b=2*g+1;for(g=0;16>g;++g)ea(n,a+g*h,1,b)&&ni(n,a+g*h,1)}function na(n,a,h,g){var b;for(b=3;0<b;--b)ra(n,a+=4*h,h,g)}function ia(n,a,h,g){var b;for(b=3;0<b;--b)ai(n,a+=4,h,g)}function Sr(n,a,h,g,b,w,y,_){for(w=2*w+1;0<b--;){if(Ni(n,a,h,w,y))if(ii(n,a,h,_))ni(n,a,h);else{var L=n,P=a,q=h,Z=L[P-2*q],I=L[P-q],W=L[P+0],K=L[P+q],at=L[P+2*q],X=27*(ct=Rs[1020+3*(W-I)+Rs[1020+Z-K]])+63>>7,ot=18*ct+63>>7,ct=9*ct+63>>7;L[P-3*q]=Pr[255+L[P-3*q]+ct],L[P-2*q]=Pr[255+Z+ot],L[P-q]=Pr[255+I+X],L[P+0]=Pr[255+W-X],L[P+q]=Pr[255+K-ot],L[P+2*q]=Pr[255+at-ct]}a+=g}}function an(n,a,h,g,b,w,y,_){for(w=2*w+1;0<b--;){if(Ni(n,a,h,w,y))if(ii(n,a,h,_))ni(n,a,h);else{var L=n,P=a,q=h,Z=L[P-q],I=L[P+0],W=L[P+q],K=Ra[112+(4+(at=3*(I-Z))>>3)],at=Ra[112+(at+3>>3)],X=K+1>>1;L[P-2*q]=Pr[255+L[P-2*q]+X],L[P-q]=Pr[255+Z+at],L[P+0]=Pr[255+I-K],L[P+q]=Pr[255+W-X]}a+=g}}function u(n,a,h,g,b,w){Sr(n,a,h,1,16,g,b,w)}function v(n,a,h,g,b,w){Sr(n,a,1,h,16,g,b,w)}function C(n,a,h,g,b,w){var y;for(y=3;0<y;--y)an(n,a+=4*h,h,1,16,g,b,w)}function T(n,a,h,g,b,w){var y;for(y=3;0<y;--y)an(n,a+=4,1,h,16,g,b,w)}function J(n,a,h,g,b,w,y,_){Sr(n,a,b,1,8,w,y,_),Sr(h,g,b,1,8,w,y,_)}function ht(n,a,h,g,b,w,y,_){Sr(n,a,1,b,8,w,y,_),Sr(h,g,1,b,8,w,y,_)}function bt(n,a,h,g,b,w,y,_){an(n,a+4*b,b,1,8,w,y,_),an(h,g+4*b,b,1,8,w,y,_)}function Ft(n,a,h,g,b,w,y,_){an(n,a+4,1,b,8,w,y,_),an(h,g+4,1,b,8,w,y,_)}function jt(){this.ba=new Ae,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new me,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Gt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ae(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ge(){this.ua=0,this.Wa=new re,this.vb=new re,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new it,this.yc=new H}function Oe(){this.xb=this.a=0,this.l=new yi,this.ca=new Ae,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new j,this.Pb=0,this.wd=new j,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ge,this.ab=0,this.gc=f(4,ae),this.Oc=0}function $e(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new yi,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function xe(n,a,h,g,b,w,y){for(n=n==null?0:n[a+0],a=0;a<y;++a)b[w+a]=n+h[g+a]&255,n=b[w+a]}function Ze(n,a,h,g,b,w,y){var _;if(n==null)xe(null,null,h,g,b,w,y);else for(_=0;_<y;++_)b[w+_]=n[a+_]+h[g+_]&255}function Ke(n,a,h,g,b,w,y){if(n==null)xe(null,null,h,g,b,w,y);else{var _,L=n[a+0],P=L,q=L;for(_=0;_<y;++_)P=q+(L=n[a+_])-P,q=h[g+_]+(-256&P?0>P?0:255:P)&255,P=L,b[w+_]=q}}function or(n,a,h,g){var b=a.width,w=a.o;if(e(n!=null&&a!=null),0>h||0>=g||h+g>w)return null;if(!n.Cc){if(n.ga==null){var y;if(n.ga=new $e,(y=n.ga==null)||(y=a.width*a.o,e(n.Gb.length==0),n.Gb=s(y),n.Uc=0,n.Gb==null?y=0:(n.mb=n.Gb,n.nb=n.Uc,n.rc=null,y=1),y=!y),!y){y=n.ga;var _=n.Fa,L=n.P,P=n.qc,q=n.mb,Z=n.nb,I=L+1,W=P-1,K=y.l;if(e(_!=null&&q!=null&&a!=null),qn[0]=null,qn[1]=xe,qn[2]=Ze,qn[3]=Ke,y.ca=q,y.tb=Z,y.c=a.width,y.i=a.height,e(0<y.c&&0<y.i),1>=P)a=0;else if(y.$a=3&_[L+0],y.Z=_[L+0]>>2&3,y.Lc=_[L+0]>>4&3,L=_[L+0]>>6&3,0>y.$a||1<y.$a||4<=y.Z||1<y.Lc||L)a=0;else if(K.put=Wt,K.ac=tn,K.bc=mn,K.ma=y,K.width=a.width,K.height=a.height,K.Da=a.Da,K.v=a.v,K.va=a.va,K.j=a.j,K.o=a.o,y.$a)t:{e(y.$a==1),a=Kn();e:for(;;){if(a==null){a=0;break t}if(e(y!=null),y.mc=a,a.c=y.c,a.i=y.i,a.l=y.l,a.l.ma=y,a.l.width=y.c,a.l.height=y.i,a.a=0,pt(a.m,_,I,W),!rn(y.c,y.i,1,a,null)||(a.ab==1&&a.gc[0].hc==3&&Hr(a.s)?(y.ic=1,_=a.c*a.i,a.Ta=null,a.Ua=0,a.V=s(_),a.Ba=0,a.V==null?(a.a=1,a=0):a=1):(y.ic=0,a=Xn(a,y.c)),!a))break e;a=1;break t}y.mc=null,a=0}else a=W>=y.c*y.i;y=!a}if(y)return null;n.ga.Lc!=1?n.Ga=0:g=w-h}e(n.ga!=null),e(h+g<=w);t:{if(a=(_=n.ga).c,w=_.l.o,_.$a==0){if(I=n.rc,W=n.Vc,K=n.Fa,L=n.P+1+h*a,P=n.mb,q=n.nb+h*a,e(L<=n.P+n.qc),_.Z!=0)for(e(qn[_.Z]!=null),y=0;y<g;++y)qn[_.Z](I,W,K,L,P,q,a),I=P,W=q,q+=a,L+=a;else for(y=0;y<g;++y)i(P,q,K,L,a),I=P,W=q,q+=a,L+=a;n.rc=I,n.Vc=W}else{if(e(_.mc!=null),a=h+g,e((y=_.mc)!=null),e(a<=y.i),y.C>=a)a=1;else if(_.ic||si(),_.ic){_=y.V,I=y.Ba,W=y.c;var at=y.i,X=(K=1,L=y.$/W,P=y.$%W,q=y.m,Z=y.s,y.$),ot=W*at,ct=W*a,wt=Z.wc,mt=X<ct?sr(Z,P,L):null;e(X<=ot),e(a<=at),e(Hr(Z));e:for(;;){for(;!q.h&&X<ct;){if(P&wt||(mt=sr(Z,P,L)),e(mt!=null),Q(q),256>(at=je(mt.G[0],mt.H[0],q)))_[I+X]=at,++X,++P>=W&&(P=0,++L<=a&&!(L%16)&&Wr(y,L));else{if(!(280>at)){K=0;break e}at=Br(at-256,q);var Rt,It=je(mt.G[4],mt.H[4],q);if(Q(q),!(X>=(It=Rr(W,It=Br(It,q)))&&ot-X>=at)){K=0;break e}for(Rt=0;Rt<at;++Rt)_[I+X+Rt]=_[I+X+Rt-It];for(X+=at,P+=at;P>=W;)P-=W,++L<=a&&!(L%16)&&Wr(y,L);X<ct&&P&wt&&(mt=sr(Z,P,L))}e(q.h==G(q))}Wr(y,L>a?a:L);break e}!K||q.h&&X<ot?(K=0,y.a=q.h?5:3):y.$=X,a=K}else a=Vr(y,y.V,y.Ba,y.c,y.i,a,bi);if(!a){g=0;break t}}h+g>=w&&(n.Cc=1),g=1}if(!g)return null;if(n.Cc&&((g=n.ga)!=null&&(g.mc=null),n.ga=null,0<n.Ga))return alert("todo:WebPDequantizeLevels"),null}return n.nb+h*b}function xn(n,a,h,g,b,w){for(;0<b--;){var y,_=n,L=a+(h?1:0),P=n,q=a+(h?0:3);for(y=0;y<g;++y){var Z=P[q+4*y];Z!=255&&(Z*=32897,_[L+4*y+0]=_[L+4*y+0]*Z>>23,_[L+4*y+1]=_[L+4*y+1]*Z>>23,_[L+4*y+2]=_[L+4*y+2]*Z>>23)}a+=w}}function jn(n,a,h,g,b){for(;0<g--;){var w;for(w=0;w<h;++w){var y=n[a+2*w+0],_=15&(P=n[a+2*w+1]),L=4369*_,P=(240&P|P>>4)*L>>16;n[a+2*w+0]=(240&y|y>>4)*L>>16&240|(15&y|y<<4)*L>>16>>4&15,n[a+2*w+1]=240&P|_}a+=b}}function js(n,a,h,g,b,w,y,_){var L,P,q=255;for(P=0;P<b;++P){for(L=0;L<g;++L){var Z=n[a+L];w[y+4*L]=Z,q&=Z}a+=h,y+=_}return q!=255}function Oa(n,a,h,g,b){var w;for(w=0;w<b;++w)h[g+w]=n[a+w]>>8}function si(){da=xn,zo=jn,Ho=js,Wo=Oa}function Yr(n,a,h){z[n]=function(g,b,w,y,_,L,P,q,Z,I,W,K,at,X,ot,ct,wt){var mt,Rt=wt-1>>1,It=_[L+0]|P[q+0]<<16,se=Z[I+0]|W[K+0]<<16;e(g!=null);var Et=3*It+se+131074>>2;for(a(g[b+0],255&Et,Et>>16,at,X),w!=null&&(Et=3*se+It+131074>>2,a(w[y+0],255&Et,Et>>16,ot,ct)),mt=1;mt<=Rt;++mt){var he=_[L+mt]|P[q+mt]<<16,tr=Z[I+mt]|W[K+mt]<<16,oe=It+he+se+tr+524296,Ot=oe+2*(he+se)>>3;Et=Ot+It>>1,It=(oe=oe+2*(It+tr)>>3)+he>>1,a(g[b+2*mt-1],255&Et,Et>>16,at,X+(2*mt-1)*h),a(g[b+2*mt-0],255&It,It>>16,at,X+(2*mt-0)*h),w!=null&&(Et=oe+se>>1,It=Ot+tr>>1,a(w[y+2*mt-1],255&Et,Et>>16,ot,ct+(2*mt-1)*h),a(w[y+2*mt+0],255&It,It>>16,ot,ct+(2*mt+0)*h)),It=he,se=tr}1&wt||(Et=3*It+se+131074>>2,a(g[b+wt-1],255&Et,Et>>16,at,X+(wt-1)*h),w!=null&&(Et=3*se+It+131074>>2,a(w[y+wt-1],255&Et,Et>>16,ot,ct+(wt-1)*h)))}}function aa(){Ur[Ma]=kh,Ur[Ta]=el,Ur[Ko]=Ph,Ur[Da]=rl,Ur[qa]=nl,Ur[Ms]=il,Ur[Xo]=Ih,Ur[Ts]=el,Ur[Ds]=rl,Ur[Ua]=nl,Ur[qs]=il}function Li(n){return n&-16384?0>n?0:255:n>>Ch}function Bn(n,a){return Li((19077*n>>8)+(26149*a>>8)-14234)}function ir(n,a,h){return Li((19077*n>>8)-(6419*a>>8)-(13320*h>>8)+8708)}function _n(n,a){return Li((19077*n>>8)+(33050*a>>8)-17685)}function An(n,a,h,g,b){g[b+0]=Bn(n,h),g[b+1]=ir(n,a,h),g[b+2]=_n(n,a)}function Si(n,a,h,g,b){g[b+0]=_n(n,a),g[b+1]=ir(n,a,h),g[b+2]=Bn(n,h)}function sa(n,a,h,g,b){var w=ir(n,a,h);a=w<<3&224|_n(n,a)>>3,g[b+0]=248&Bn(n,h)|w>>5,g[b+1]=a}function br(n,a,h,g,b){var w=240&_n(n,a)|15;g[b+0]=240&Bn(n,h)|ir(n,a,h)>>4,g[b+1]=w}function ja(n,a,h,g,b){g[b+0]=255,An(n,a,h,g,b+1)}function ki(n,a,h,g,b){Si(n,a,h,g,b),g[b+3]=255}function Ba(n,a,h,g,b){An(n,a,h,g,b),g[b+3]=255}function Qe(n,a){return 0>n?0:n>a?a:n}function Dr(n,a,h){z[n]=function(g,b,w,y,_,L,P,q,Z){for(var I=q+(-2&Z)*h;q!=I;)a(g[b+0],w[y+0],_[L+0],P,q),a(g[b+1],w[y+0],_[L+0],P,q+h),b+=2,++y,++L,q+=2*h;1&Z&&a(g[b+0],w[y+0],_[L+0],P,q)}}function oa(n,a,h){return h==0?n==0?a==0?6:5:a==0?4:0:h}function la(n,a,h,g,b){switch(n>>>30){case 3:ze(a,h,g,b,0);break;case 2:Ln(a,h,g,b);break;case 1:hn(a,h,g,b)}}function Rn(n,a){var h,g,b=a.M,w=a.Nb,y=n.oc,_=n.pc+40,L=n.oc,P=n.pc+584,q=n.oc,Z=n.pc+600;for(h=0;16>h;++h)y[_+32*h-1]=129;for(h=0;8>h;++h)L[P+32*h-1]=129,q[Z+32*h-1]=129;for(0<b?y[_-1-32]=L[P-1-32]=q[Z-1-32]=129:(o(y,_-32-1,127,21),o(L,P-32-1,127,9),o(q,Z-32-1,127,9)),g=0;g<n.za;++g){var I=a.ya[a.aa+g];if(0<g){for(h=-1;16>h;++h)i(y,_+32*h-4,y,_+32*h+12,4);for(h=-1;8>h;++h)i(L,P+32*h-4,L,P+32*h+4,4),i(q,Z+32*h-4,q,Z+32*h+4,4)}var W=n.Gd,K=n.Hd+g,at=I.ad,X=I.Hc;if(0<b&&(i(y,_-32,W[K].y,0,16),i(L,P-32,W[K].f,0,8),i(q,Z-32,W[K].ea,0,8)),I.Za){var ot=y,ct=_-32+16;for(0<b&&(g>=n.za-1?o(ot,ct,W[K].y[15],4):i(ot,ct,W[K+1].y,0,4)),h=0;4>h;h++)ot[ct+128+h]=ot[ct+256+h]=ot[ct+384+h]=ot[ct+0+h];for(h=0;16>h;++h,X<<=2)ot=y,ct=_+sl[h],Jr[I.Ob[h]](ot,ct),la(X,at,16*+h,ot,ct)}else if(ot=oa(g,b,I.Ob[0]),Dn[ot](y,_),X!=0)for(h=0;16>h;++h,X<<=2)la(X,at,16*+h,y,_+sl[h]);for(h=I.Gc,ot=oa(g,b,I.Dd),Sn[ot](L,P),Sn[ot](q,Z),X=at,ot=L,ct=P,255&(I=0|h)&&(170&I?Ei(X,256,ot,ct):fa(X,256,ot,ct)),I=q,X=Z,255&(h>>=8)&&(170&h?Ei(at,320,I,X):fa(at,320,I,X)),b<n.Ub-1&&(i(W[K].y,0,y,_+480,16),i(W[K].f,0,L,P+224,8),i(W[K].ea,0,q,Z+224,8)),h=8*w*n.B,W=n.sa,K=n.ta+16*g+16*w*n.R,at=n.qa,I=n.ra+8*g+h,X=n.Ha,ot=n.Ia+8*g+h,h=0;16>h;++h)i(W,K+h*n.R,y,_+32*h,16);for(h=0;8>h;++h)i(at,I+h*n.B,L,P+32*h,8),i(X,ot+h*n.B,q,Z+32*h,8)}}function Pi(n,a,h,g,b,w,y,_,L){var P=[0],q=[0],Z=0,I=L!=null?L.kd:0,W=L??new Gt;if(n==null||12>h)return 7;W.data=n,W.w=a,W.ha=h,a=[a],h=[h],W.gb=[W.gb];t:{var K=a,at=h,X=W.gb;if(e(n!=null),e(at!=null),e(X!=null),X[0]=0,12<=at[0]&&!t(n,K[0],"RIFF")){if(t(n,K[0]+8,"WEBP")){X=3;break t}var ot=st(n,K[0]+4);if(12>ot||4294967286<ot){X=3;break t}if(I&&ot>at[0]-8){X=7;break t}X[0]=ot,K[0]+=12,at[0]-=12}X=0}if(X!=0)return X;for(ot=0<W.gb[0],h=h[0];;){t:{var ct=n;at=a,X=h;var wt=P,mt=q,Rt=K=[0];if((Et=Z=[Z])[0]=0,8>X[0])X=7;else{if(!t(ct,at[0],"VP8X")){if(st(ct,at[0]+4)!=10){X=3;break t}if(18>X[0]){X=7;break t}var It=st(ct,at[0]+8),se=1+Pt(ct,at[0]+12);if(2147483648<=se*(ct=1+Pt(ct,at[0]+15))){X=3;break t}Rt!=null&&(Rt[0]=It),wt!=null&&(wt[0]=se),mt!=null&&(mt[0]=ct),at[0]+=18,X[0]-=18,Et[0]=1}X=0}}if(Z=Z[0],K=K[0],X!=0)return X;if(at=!!(2&K),!ot&&Z)return 3;if(w!=null&&(w[0]=!!(16&K)),y!=null&&(y[0]=at),_!=null&&(_[0]=0),y=P[0],K=q[0],Z&&at&&L==null){X=0;break}if(4>h){X=7;break}if(ot&&Z||!ot&&!Z&&!t(n,a[0],"ALPH")){h=[h],W.na=[W.na],W.P=[W.P],W.Sa=[W.Sa];t:{It=n,X=a,ot=h;var Et=W.gb;wt=W.na,mt=W.P,Rt=W.Sa,se=22,e(It!=null),e(ot!=null),ct=X[0];var he=ot[0];for(e(wt!=null),e(Rt!=null),wt[0]=null,mt[0]=null,Rt[0]=0;;){if(X[0]=ct,ot[0]=he,8>he){X=7;break t}var tr=st(It,ct+4);if(4294967286<tr){X=3;break t}var oe=8+tr+1&-2;if(se+=oe,0<Et&&se>Et){X=3;break t}if(!t(It,ct,"VP8 ")||!t(It,ct,"VP8L")){X=0;break t}if(he[0]<oe){X=7;break t}t(It,ct,"ALPH")||(wt[0]=It,mt[0]=ct+8,Rt[0]=tr),ct+=oe,he-=oe}}if(h=h[0],W.na=W.na[0],W.P=W.P[0],W.Sa=W.Sa[0],X!=0)break}h=[h],W.Ja=[W.Ja],W.xa=[W.xa];t:if(Et=n,X=a,ot=h,wt=W.gb[0],mt=W.Ja,Rt=W.xa,It=X[0],ct=!t(Et,It,"VP8 "),se=!t(Et,It,"VP8L"),e(Et!=null),e(ot!=null),e(mt!=null),e(Rt!=null),8>ot[0])X=7;else{if(ct||se){if(Et=st(Et,It+4),12<=wt&&Et>wt-12){X=3;break t}if(I&&Et>ot[0]-8){X=7;break t}mt[0]=Et,X[0]+=8,ot[0]-=8,Rt[0]=se}else Rt[0]=5<=ot[0]&&Et[It+0]==47&&!(Et[It+4]>>5),mt[0]=ot[0];X=0}if(h=h[0],W.Ja=W.Ja[0],W.xa=W.xa[0],a=a[0],X!=0)break;if(4294967286<W.Ja)return 3;if(_==null||at||(_[0]=W.xa?2:1),y=[y],K=[K],W.xa){if(5>h){X=7;break}_=y,I=K,at=w,n==null||5>h?n=0:5<=h&&n[a+0]==47&&!(n[a+4]>>5)?(ot=[0],Et=[0],wt=[0],pt(mt=new j,n,a,h),bn(mt,ot,Et,wt)?(_!=null&&(_[0]=ot[0]),I!=null&&(I[0]=Et[0]),at!=null&&(at[0]=wt[0]),n=1):n=0):n=0}else{if(10>h){X=7;break}_=K,n==null||10>h||!Ia(n,a+3,h-3)?n=0:(I=n[a+0]|n[a+1]<<8|n[a+2]<<16,at=16383&(n[a+7]<<8|n[a+6]),n=16383&(n[a+9]<<8|n[a+8]),1&I||3<(I>>1&7)||!(I>>4&1)||I>>5>=W.Ja||!at||!n?n=0:(y&&(y[0]=at),_&&(_[0]=n),n=1))}if(!n||(y=y[0],K=K[0],Z&&(P[0]!=y||q[0]!=K)))return 3;L!=null&&(L[0]=W,L.offset=a-L.w,e(4294967286>a-L.w),e(L.offset==L.ha-h));break}return X==0||X==7&&Z&&L==null?(w!=null&&(w[0]|=W.na!=null&&0<W.na.length),g!=null&&(g[0]=y),b!=null&&(b[0]=K),0):X}function xr(n,a,h){var g=a.width,b=a.height,w=0,y=0,_=g,L=b;if(a.Da=n!=null&&0<n.Da,a.Da&&(_=n.cd,L=n.bd,w=n.v,y=n.j,11>h||(w&=-2,y&=-2),0>w||0>y||0>=_||0>=L||w+_>g||y+L>b))return 0;if(a.v=w,a.j=y,a.va=w+_,a.o=y+L,a.U=_,a.T=L,a.da=n!=null&&0<n.da,a.da){if(!zt(_,L,h=[n.ib],w=[n.hb]))return 0;a.ib=h[0],a.hb=w[0]}return a.ob=n!=null&&n.ob,a.Kb=n==null||!n.Sd,a.da&&(a.ob=a.ib<3*g/4&&a.hb<3*b/4,a.Kb=0),1}function _r(n){if(n==null)return 2;if(11>n.S){var a=n.f.RGBA;a.fb+=(n.height-1)*a.A,a.A=-a.A}else a=n.f.kb,n=n.height,a.O+=(n-1)*a.fa,a.fa=-a.fa,a.N+=(n-1>>1)*a.Ab,a.Ab=-a.Ab,a.W+=(n-1>>1)*a.Db,a.Db=-a.Db,a.F!=null&&(a.J+=(n-1)*a.lb,a.lb=-a.lb);return 0}function oi(n,a,h,g){if(g==null||0>=n||0>=a)return 2;if(h!=null){if(h.Da){var b=h.cd,w=h.bd,y=-2&h.v,_=-2&h.j;if(0>y||0>_||0>=b||0>=w||y+b>n||_+w>a)return 2;n=b,a=w}if(h.da){if(!zt(n,a,b=[h.ib],w=[h.hb]))return 2;n=b[0],a=w[0]}}g.width=n,g.height=a;t:{var L=g.width,P=g.height;if(n=g.S,0>=L||0>=P||!(n>=Ma&&13>n))n=2;else{if(0>=g.Rd&&g.sd==null){y=w=b=a=0;var q=(_=L*ol[n])*P;if(11>n||(w=(P+1)/2*(a=(L+1)/2),n==12&&(y=(b=L)*P)),(P=s(q+2*w+y))==null){n=1;break t}g.sd=P,11>n?((L=g.f.RGBA).eb=P,L.fb=0,L.A=_,L.size=q):((L=g.f.kb).y=P,L.O=0,L.fa=_,L.Fd=q,L.f=P,L.N=0+q,L.Ab=a,L.Cd=w,L.ea=P,L.W=0+q+w,L.Db=a,L.Ed=w,n==12&&(L.F=P,L.J=0+q+2*w),L.Tc=y,L.lb=b)}if(a=1,b=g.S,w=g.width,y=g.height,b>=Ma&&13>b)if(11>b)n=g.f.RGBA,a&=(_=Math.abs(n.A))*(y-1)+w<=n.size,a&=_>=w*ol[b],a&=n.eb!=null;else{n=g.f.kb,_=(w+1)/2,q=(y+1)/2,L=Math.abs(n.fa),P=Math.abs(n.Ab);var Z=Math.abs(n.Db),I=Math.abs(n.lb),W=I*(y-1)+w;a&=L*(y-1)+w<=n.Fd,a&=P*(q-1)+_<=n.Cd,a=(a&=Z*(q-1)+_<=n.Ed)&L>=w&P>=_&Z>=_,a&=n.y!=null,a&=n.f!=null,a&=n.ea!=null,b==12&&(a&=I>=w,a&=W<=n.Tc,a&=n.F!=null)}else a=0;n=a?0:2}}return n!=0||h!=null&&h.fd&&(n=_r(g)),n}var sn=64,Mn=[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],ua=24,Tn=32,qe=8,Bs=[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];St("Predictor0","PredictorAdd0"),z.Predictor0=function(){return 4278190080},z.Predictor1=function(n){return n},z.Predictor2=function(n,a,h){return a[h+0]},z.Predictor3=function(n,a,h){return a[h+1]},z.Predictor4=function(n,a,h){return a[h-1]},z.Predictor5=function(n,a,h){return Ut(Ut(n,a[h+1]),a[h+0])},z.Predictor6=function(n,a,h){return Ut(n,a[h-1])},z.Predictor7=function(n,a,h){return Ut(n,a[h+0])},z.Predictor8=function(n,a,h){return Ut(a[h-1],a[h+0])},z.Predictor9=function(n,a,h){return Ut(a[h+0],a[h+1])},z.Predictor10=function(n,a,h){return Ut(Ut(n,a[h-1]),Ut(a[h+0],a[h+1]))},z.Predictor11=function(n,a,h){var g=a[h+0];return 0>=Zt(g>>24&255,n>>24&255,(a=a[h-1])>>24&255)+Zt(g>>16&255,n>>16&255,a>>16&255)+Zt(g>>8&255,n>>8&255,a>>8&255)+Zt(255&g,255&n,255&a)?g:n},z.Predictor12=function(n,a,h){var g=a[h+0];return(de((n>>24&255)+(g>>24&255)-((a=a[h-1])>>24&255))<<24|de((n>>16&255)+(g>>16&255)-(a>>16&255))<<16|de((n>>8&255)+(g>>8&255)-(a>>8&255))<<8|de((255&n)+(255&g)-(255&a)))>>>0},z.Predictor13=function(n,a,h){var g=a[h-1];return(Xt((n=Ut(n,a[h+0]))>>24&255,g>>24&255)<<24|Xt(n>>16&255,g>>16&255)<<16|Xt(n>>8&255,g>>8&255)<<8|Xt(255&n,255&g))>>>0};var on=z.PredictorAdd0;z.PredictorAdd1=ye,St("Predictor2","PredictorAdd2"),St("Predictor3","PredictorAdd3"),St("Predictor4","PredictorAdd4"),St("Predictor5","PredictorAdd5"),St("Predictor6","PredictorAdd6"),St("Predictor7","PredictorAdd7"),St("Predictor8","PredictorAdd8"),St("Predictor9","PredictorAdd9"),St("Predictor10","PredictorAdd10"),St("Predictor11","PredictorAdd11"),St("Predictor12","PredictorAdd12"),St("Predictor13","PredictorAdd13");var ln=z.PredictorAdd2;qt("ColorIndexInverseTransform","MapARGB","32b",function(n){return n>>8&255},function(n){return n}),qt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(n){return n},function(n){return n>>8&255});var Ii,ha=z.ColorIndexInverseTransform,Ci=z.MapARGB,Fi=z.VP8LColorIndexInverseTransformAlpha,li=z.MapAlpha,ui=z.VP8LPredictorsAdd=[];ui.length=16,(z.VP8LPredictors=[]).length=16,(z.VP8LPredictorsAdd_C=[]).length=16,(z.VP8LPredictors_C=[]).length=16;var Nn,ca,kr,un,Pe,Ie,Ue,ze,Ln,Ei,hn,fa,Co,Fo,Eo,Oo,jo,Bo,Ro,Mo,To,Do,qo,Uo,da,zo,Ho,Wo,Vo=s(511),Go=s(2041),Yo=s(225),Jo=s(767),$o=0,Rs=Go,Ra=Yo,Pr=Jo,qr=Vo,Ma=0,Ta=1,Ko=2,Da=3,qa=4,Ms=5,Xo=6,Ts=7,Ds=8,Ua=9,qs=10,dh=[2,3,7],ph=[3,3,11],Zo=[280,256,256,256,40],gh=[0,1,1,1,0],mh=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],bh=[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],vh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],wh=8,Us=[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],zs=[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],pa=null,yh=[[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]],xh=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Qo=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],_h=[[[[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]]]],Ah=[[[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]]],Nh=[[[[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]]]],Lh=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Dn=[],Jr=[],Sn=[],Sh=1,tl=2,qn=[],Ur=[];Yr("UpsampleRgbLinePair",An,3),Yr("UpsampleBgrLinePair",Si,3),Yr("UpsampleRgbaLinePair",Ba,4),Yr("UpsampleBgraLinePair",ki,4),Yr("UpsampleArgbLinePair",ja,4),Yr("UpsampleRgba4444LinePair",br,2),Yr("UpsampleRgb565LinePair",sa,2);var kh=z.UpsampleRgbLinePair,Ph=z.UpsampleBgrLinePair,el=z.UpsampleRgbaLinePair,rl=z.UpsampleBgraLinePair,nl=z.UpsampleArgbLinePair,il=z.UpsampleRgba4444LinePair,Ih=z.UpsampleRgb565LinePair,za=16,Ha=1<<za-1,ga=-227,Hs=482,Ch=6,al=0,Fh=s(256),Eh=s(256),Oh=s(256),jh=s(256),Bh=s(Hs-ga),Rh=s(Hs-ga);Dr("YuvToRgbRow",An,3),Dr("YuvToBgrRow",Si,3),Dr("YuvToRgbaRow",Ba,4),Dr("YuvToBgraRow",ki,4),Dr("YuvToArgbRow",ja,4),Dr("YuvToRgba4444Row",br,2),Dr("YuvToRgb565Row",sa,2);var sl=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Wa=[0,2,8],Mh=[8,7,6,4,4,2,2,2,1,1,1,1],Th=1;this.WebPDecodeRGBA=function(n,a,h,g,b){var w=Ta,y=new jt,_=new Ae;y.ba=_,_.S=w,_.width=[_.width],_.height=[_.height];var L=_.width,P=_.height,q=new Jt;if(q==null||n==null)var Z=2;else e(q!=null),Z=Pi(n,a,h,q.width,q.height,q.Pd,q.Qd,q.format,null);if(Z!=0?L=0:(L!=null&&(L[0]=q.width[0]),P!=null&&(P[0]=q.height[0]),L=1),L){_.width=_.width[0],_.height=_.height[0],g!=null&&(g[0]=_.width),b!=null&&(b[0]=_.height);t:{if(g=new yi,(b=new Gt).data=n,b.w=a,b.ha=h,b.kd=1,a=[0],e(b!=null),((n=Pi(b.data,b.w,b.ha,null,null,null,a,null,b))==0||n==7)&&a[0]&&(n=4),(a=n)==0){if(e(y!=null),g.data=b.data,g.w=b.w+b.offset,g.ha=b.ha-b.offset,g.put=Wt,g.ac=tn,g.bc=mn,g.ma=y,b.xa){if((n=Kn())==null){y=1;break t}if(function(I,W){var K=[0],at=[0],X=[0];e:for(;;){if(I==null)return 0;if(W==null)return I.a=2,0;if(I.l=W,I.a=0,pt(I.m,W.data,W.w,W.ha),!bn(I.m,K,at,X)){I.a=3;break e}if(I.xb=tl,W.width=K[0],W.height=at[0],!rn(K[0],at[0],1,I,null))break e;return 1}return e(I.a!=0),0}(n,g)){if(g=(a=oi(g.width,g.height,y.Oa,y.ba))==0){e:{g=n;r:for(;;){if(g==null){g=0;break e}if(e(g.s.yc!=null),e(g.s.Ya!=null),e(0<g.s.Wb),e((h=g.l)!=null),e((b=h.ma)!=null),g.xb!=0){if(g.ca=b.ba,g.tb=b.tb,e(g.ca!=null),!xr(b.Oa,h,Da)){g.a=2;break r}if(!Xn(g,h.width)||h.da)break r;if((h.da||te(g.ca.S))&&si(),11>g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&si()),g.Pb&&0<g.s.ua&&g.s.vb.X==null&&!O(g.s.vb,g.s.Wa.Xa)){g.a=1;break r}g.xb=0}if(!Vr(g,g.V,g.Ba,g.c,g.i,h.o,Fn))break r;b.Dc=g.Ma,g=1;break e}e(g.a!=0),g=0}g=!g}g&&(a=n.a)}else a=n.a}else{if((n=new ws)==null){y=1;break t}if(n.Fa=b.na,n.P=b.P,n.qc=b.Sa,Ca(n,g)){if((a=oi(g.width,g.height,y.Oa,y.ba))==0){if(n.Aa=0,h=y.Oa,e((b=n)!=null),h!=null){if(0<(L=0>(L=h.Md)?0:100<L?255:255*L/100)){for(P=q=0;4>P;++P)12>(Z=b.pb[P]).lc&&(Z.ia=L*Mh[0>Z.lc?0:Z.lc]>>3),q|=Z.ia;q&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=h.Id,100<b.Ga?b.Ga=100:0>b.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&&!Ca(I,W))return 0;if(e(I.cb),W.ac==null||W.ac(W)){W.ob&&(I.L=0);var K=Wa[I.L];if(I.L==2?(I.yb=0,I.zb=0):(I.yb=W.v-K>>4,I.zb=W.j-K>>4,0>I.yb&&(I.yb=0),0>I.zb&&(I.zb=0)),I.Va=W.o+15+K>>4,I.Hb=W.va+15+K>>4,I.Hb>I.za&&(I.Hb=I.za),I.Va>I.Ub&&(I.Va=I.Ub),0<I.L){var at=I.ed;for(K=0;4>K;++K){var X;if(I.Qa.Cb){var ot=I.Qa.Lb[K];I.Qa.Fb||(ot+=at.Tb)}else ot=at.Tb;for(X=0;1>=X;++X){var ct=I.gd[K][X],wt=ot;if(at.Pc&&(wt+=at.vd[0],X&&(wt+=at.od[0])),0<(wt=0>wt?0:63<wt?63:wt)){var mt=wt;0<at.wb&&(mt=4<at.wb?mt>>2:mt>>1)>9-at.wb&&(mt=9-at.wb),1>mt&&(mt=1),ct.dd=mt,ct.tc=2*wt+mt,ct.ld=40<=wt?2:15<=wt?1:0}else ct.tc=0;ct.La=X}}}K=0}else Je(I,6,"Frame setup failed"),K=I.a;if(K=K==0){if(K){I.$c=0,0<I.Aa||(I.Ic=Th);e:{K=I.Ic,at=4*(mt=I.za);var Rt=32*mt,It=mt+1,se=0<I.L?mt*(0<I.Aa?2:1):0,Et=(I.Aa==2?2:1)*mt;if((ct=at+832+(X=3*(16*K+Wa[I.L])/2*Rt)+(ot=I.Fa!=null&&0<I.Fa.length?I.Kc.c*I.Kc.i:0))!=ct)K=0;else{if(ct>I.Vb){if(I.Vb=0,I.Ec=s(ct),I.Fc=0,I.Ec==null){K=Je(I,1,"no memory during frame initialization.");break e}I.Vb=ct}ct=I.Ec,wt=I.Fc,I.Ac=ct,I.Bc=wt,wt+=at,I.Gd=f(Rt,ka),I.Hd=0,I.rb=f(It+1,Gi),I.sb=1,I.wa=se?f(se,Tr):null,I.Y=0,I.D.Nb=0,I.D.wa=I.wa,I.D.Y=I.Y,0<I.Aa&&(I.D.Y+=mt),e(!0),I.oc=ct,I.pc=wt,wt+=832,I.ya=f(Et,Yi),I.aa=0,I.D.ya=I.ya,I.D.aa=I.aa,I.Aa==2&&(I.D.aa+=mt),I.R=16*mt,I.B=8*mt,mt=(Rt=Wa[I.L])*I.R,Rt=Rt/2*I.B,I.sa=ct,I.ta=wt+mt,I.qa=I.sa,I.ra=I.ta+16*K*I.R+Rt,I.Ha=I.qa,I.Ia=I.ra+8*K*I.B+Rt,I.$c=0,wt+=X,I.mb=ot?ct:null,I.nb=ot?wt:null,e(wt+ot<=I.Fc+I.Vb),Zn(I),o(I.Ac,I.Bc,0,at),K=1}}if(K){if(W.ka=0,W.y=I.sa,W.O=I.ta,W.f=I.qa,W.N=I.ra,W.ea=I.Ha,W.Vd=I.Ia,W.fa=I.R,W.Rc=I.B,W.F=null,W.J=0,!$o){for(K=-255;255>=K;++K)Vo[255+K]=0>K?-K:K;for(K=-1020;1020>=K;++K)Go[1020+K]=-128>K?-128:127<K?127:K;for(K=-112;112>=K;++K)Yo[112+K]=-16>K?-16:15<K?15:K;for(K=-255;510>=K;++K)Jo[255+K]=0>K?0:255<K?255:K;$o=1}Ue=Ea,ze=xs,Ei=_s,hn=nn,fa=Fa,Ln=ys,Co=u,Fo=v,Eo=J,Oo=ht,jo=C,Bo=T,Ro=bt,Mo=Ft,To=ra,Do=ai,qo=na,Uo=ia,Jr[0]=Is,Jr[1]=$i,Jr[2]=ks,Jr[3]=Ps,Jr[4]=Cs,Jr[5]=yn,Jr[6]=wn,Jr[7]=Fs,Jr[8]=xi,Jr[9]=Es,Dn[0]=On,Dn[1]=Ns,Dn[2]=Ls,Dn[3]=Ki,Dn[4]=Ss,Dn[5]=ei,Dn[6]=Xi,Sn[0]=Ai,Sn[1]=As,Sn[2]=Zi,Sn[3]=ri,Sn[4]=Qi,Sn[5]=Os,Sn[6]=ta,K=1}else K=0}K&&(K=function(he,tr){for(he.M=0;he.M<he.Va;++he.M){var oe,Ot=he.Jc[he.M&he.Xb],Lt=he.m,He=he;for(oe=0;oe<He.za;++oe){var ee=Lt,ce=He,Fe=ce.Ac,lr=ce.Bc+4*oe,vr=ce.zc,Be=ce.ya[ce.aa+oe];if(ce.Qa.Bb?Be.$b=gt(ee,ce.Pa.jb[0])?2+gt(ee,ce.Pa.jb[2]):gt(ee,ce.Pa.jb[1]):Be.$b=0,ce.kc&&(Be.Ad=gt(ee,ce.Bd)),Be.Za=!gt(ee,145)+0,Be.Za){var fr=Be.Ob,wr=0;for(ce=0;4>ce;++ce){var er,fe=vr[0+ce];for(er=0;4>er;++er){fe=Ah[Fe[lr+er]][fe];for(var be=Qo[gt(ee,fe[0])];0<be;)be=Qo[2*be+gt(ee,fe[be])];fe=-be,Fe[lr+er]=fe}i(fr,wr,Fe,lr,4),wr+=4,vr[0+ce]=fe}}else fe=gt(ee,156)?gt(ee,128)?1:3:gt(ee,163)?2:0,Be.Ob[0]=fe,o(Fe,lr,fe,4),o(vr,0,fe,4);Be.Dd=gt(ee,142)?gt(ee,114)?gt(ee,183)?1:3:2:0}if(He.m.Ka)return Je(he,7,"Premature end-of-partition0 encountered.");for(;he.ja<he.za;++he.ja){if(He=Ot,ee=(Lt=he).rb[Lt.sb-1],Fe=Lt.rb[Lt.sb+Lt.ja],oe=Lt.ya[Lt.aa+Lt.ja],lr=Lt.kc?oe.Ad:0)ee.la=Fe.la=0,oe.Za||(ee.Na=Fe.Na=0),oe.Hc=0,oe.Gc=0,oe.ia=0;else{var Re,ve;if(ee=Fe,Fe=He,lr=Lt.Pa.Xc,vr=Lt.ya[Lt.aa+Lt.ja],Be=Lt.pb[vr.$b],ce=vr.ad,fr=0,wr=Lt.rb[Lt.sb-1],fe=er=0,o(ce,fr,0,384),vr.Za)var ur=0,$r=lr[3];else{be=s(16);var We=ee.Na+wr.Na;if(We=pa(Fe,lr[1],We,Be.Eb,0,be,0),ee.Na=wr.Na=(0<We)+0,1<We)Ue(be,0,ce,fr);else{var Ar=be[0]+3>>3;for(be=0;256>be;be+=16)ce[fr+be]=Ar}ur=1,$r=lr[0]}var Ne=15&ee.la,rr=15&wr.la;for(be=0;4>be;++be){var Ir=1&rr;for(Ar=ve=0;4>Ar;++Ar)Ne=Ne>>1|(Ir=(We=pa(Fe,$r,We=Ir+(1&Ne),Be.Sc,ur,ce,fr))>ur)<<7,ve=ve<<2|(3<We?3:1<We?2:ce[fr+0]!=0),fr+=16;Ne>>=4,rr=rr>>1|Ir<<7,er=(er<<8|ve)>>>0}for($r=Ne,ur=rr>>4,Re=0;4>Re;Re+=2){for(ve=0,Ne=ee.la>>4+Re,rr=wr.la>>4+Re,be=0;2>be;++be){for(Ir=1&rr,Ar=0;2>Ar;++Ar)We=Ir+(1&Ne),Ne=Ne>>1|(Ir=0<(We=pa(Fe,lr[2],We,Be.Qc,0,ce,fr)))<<3,ve=ve<<2|(3<We?3:1<We?2:ce[fr+0]!=0),fr+=16;Ne>>=2,rr=rr>>1|Ir<<5}fe|=ve<<4*Re,$r|=Ne<<4<<Re,ur|=(240&rr)<<Re}ee.la=$r,wr.la=ur,vr.Hc=er,vr.Gc=fe,vr.ia=43690&fe?0:Be.ia,lr=!(er|fe)}if(0<Lt.L&&(Lt.wa[Lt.Y+Lt.ja]=Lt.gd[oe.$b][oe.Za],Lt.wa[Lt.Y+Lt.ja].La|=!lr),He.Ka)return Je(he,7,"Premature end-of-file encountered.")}if(Zn(he),Lt=tr,He=1,oe=(Ot=he).D,ee=0<Ot.L&&Ot.M>=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(oe.M=Ot.M,oe.uc=ee,Rn(Ot,oe),He=1,oe=(ve=Ot.D).Nb,ee=(fe=Wa[Ot.L])*Ot.R,Fe=fe/2*Ot.B,be=16*oe*Ot.R,Ar=8*oe*Ot.B,lr=Ot.sa,vr=Ot.ta-ee+be,Be=Ot.qa,ce=Ot.ra-Fe+Ar,fr=Ot.Ha,wr=Ot.Ia-Fe+Ar,rr=(Ne=ve.M)==0,er=Ne>=Ot.Va-1,Ot.Aa==2&&Rn(Ot,ve),ve.uc)for(Ir=(We=Ot).D.M,e(We.D.uc),ve=We.yb;ve<We.Hb;++ve){ur=ve,$r=Ir;var yr=(Cr=(hr=We).D).Nb;Re=hr.R;var Cr=Cr.wa[Cr.Y+ur],Fr=hr.sa,Nr=hr.ta+16*yr*Re+16*ur,Er=Cr.dd,Ce=Cr.tc;if(Ce!=0)if(e(3<=Ce),hr.L==1)0<ur&&Do(Fr,Nr,Re,Ce+4),Cr.La&&Uo(Fr,Nr,Re,Ce),0<$r&&To(Fr,Nr,Re,Ce+4),Cr.La&&qo(Fr,Nr,Re,Ce);else{var Or=hr.B,Kr=hr.qa,hi=hr.ra+8*yr*Or+8*ur,kn=hr.Ha,hr=hr.Ia+8*yr*Or+8*ur;yr=Cr.ld,0<ur&&(Fo(Fr,Nr,Re,Ce+4,Er,yr),Oo(Kr,hi,kn,hr,Or,Ce+4,Er,yr)),Cr.La&&(Bo(Fr,Nr,Re,Ce,Er,yr),Mo(Kr,hi,kn,hr,Or,Ce,Er,yr)),0<$r&&(Co(Fr,Nr,Re,Ce+4,Er,yr),Eo(Kr,hi,kn,hr,Or,Ce+4,Er,yr)),Cr.La&&(jo(Fr,Nr,Re,Ce,Er,yr),Ro(Kr,hi,kn,hr,Or,Ce,Er,yr))}}if(Ot.ia&&alert("todo:DitherRow"),Lt.put!=null){if(ve=16*Ne,Ne=16*(Ne+1),rr?(Lt.y=Ot.sa,Lt.O=Ot.ta+be,Lt.f=Ot.qa,Lt.N=Ot.ra+Ar,Lt.ea=Ot.Ha,Lt.W=Ot.Ia+Ar):(ve-=fe,Lt.y=lr,Lt.O=vr,Lt.f=Be,Lt.N=ce,Lt.ea=fr,Lt.W=wr),er||(Ne-=fe),Ne>Lt.o&&(Ne=Lt.o),Lt.F=null,Lt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&ve<Ne&&(Lt.J=or(Ot,Lt,ve,Ne-ve),Lt.F=Ot.mb,Lt.F==null&&Lt.F.length==0)){He=Je(Ot,3,"Could not decode alpha data.");break e}ve<Lt.j&&(fe=Lt.j-ve,ve=Lt.j,e(!(1&fe)),Lt.O+=Ot.R*fe,Lt.N+=Ot.B*(fe>>1),Lt.W+=Ot.B*(fe>>1),Lt.F!=null&&(Lt.J+=Lt.width*fe)),ve<Ne&&(Lt.O+=Lt.v,Lt.N+=Lt.v>>1,Lt.W+=Lt.v>>1,Lt.F!=null&&(Lt.J+=Lt.v),Lt.ka=ve-Lt.j,Lt.U=Lt.va-Lt.v,Lt.T=Ne-ve,He=Lt.put(Lt))}oe+1!=Ot.Ic||er||(i(Ot.sa,Ot.ta-ee,lr,vr+16*Ot.R,ee),i(Ot.qa,Ot.ra-Fe,Be,ce+8*Ot.B,Fe),i(Ot.Ha,Ot.Ia-Fe,fr,wr+8*Ot.B,Fe))}if(!He)return Je(he,6,"Output aborted.")}return 1}(I,W)),W.bc!=null&&W.bc(W),K&=1}return K?(I.cb=0,K):0})(n,g)||(a=n.a)}}else a=n.a}a==0&&y.Oa!=null&&y.Oa.fd&&(a=_r(y.ba))}y=a}w=y!=0?null:11>w?_.f.RGBA.eb:_.f.kb.y}else w=null;return w};var ol=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(z,et){for(var N="",F=0;F<4;F++)N+=String.fromCharCode(z[et++]);return N}function m(z,et){return z[et+0]|z[et+1]<<8}function A(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16)>>>0}function k(z,et){return(z[et+0]|z[et+1]<<8|z[et+2]<<16|z[et+3]<<24)>>>0}new c;var p=[0],B=[0],E=[],R=new c,S=r,Y=function(z,et){var N={},F=0,H=!1,U=0,it=0;if(N.frames=[],!function(x,j){for(var M=0;M<4;M++)if(x[j+M]!="RIFF".charCodeAt(M))return!0;return!1}(z,et)){for(k(z,et+=4),et+=8;et<z.length;){var dt=d(z,et),vt=k(z,et+=4);et+=4;var rt=vt+(1&vt);switch(dt){case"VP8 ":case"VP8L":N.frames[F]===void 0&&(N.frames[F]={}),(_t=N.frames[F]).src_off=H?it:et-8,_t.src_size=U+vt+8,F++,H&&(H=!1,U=0,it=0);break;case"VP8X":(_t=N.header={}).feature_flags=z[et];var pt=et+4;_t.canvas_width=1+A(z,pt),pt+=3,_t.canvas_height=1+A(z,pt),pt+=3;break;case"ALPH":H=!0,U=rt+8,it=et-8;break;case"ANIM":(_t=N.header).bgcolor=k(z,et),pt=et+4,_t.loop_count=m(z,pt),pt+=2;break;case"ANMF":var Nt,_t;(_t=N.frames[F]={}).offset_x=2*A(z,et),et+=3,_t.offset_y=2*A(z,et),et+=3,_t.width=1+A(z,et),et+=3,_t.height=1+A(z,et),et+=3,_t.duration=A(z,et),et+=3,Nt=z[et++],_t.dispose=1&Nt,_t.blend=Nt>>1&1}dt!="ANMF"&&(et+=rt)}return N}}(S,0);Y.response=S,Y.rgbaoutput=!0,Y.dataurl=!1;var V=Y.header?Y.header:null,D=Y.frames?Y.frames:null;if(V){V.loop_counter=V.loop_count,p=[V.canvas_height],B=[V.canvas_width];for(var ut=0;ut<D.length&&D[ut].blend!=0;ut++);}var yt=D[0],ft=R.WebPDecodeRGBA(S,yt.src_off,yt.src_size,B,p);yt.rgba=ft,yt.imgwidth=B[0],yt.imgheight=p[0];for(var tt=0;tt<B[0]*p[0]*4;tt++)E[tt]=ft[tt];return this.width=B,this.height=p,this.data=E,this}(function(r){var e,t,i,o,s,f,l,c,d,m=function(x){return x=x||{},this.isStrokeTransparent=x.isStrokeTransparent||!1,this.strokeOpacity=x.strokeOpacity||1,this.strokeStyle=x.strokeStyle||"#000000",this.fillStyle=x.fillStyle||"#000000",this.isFillTransparent=x.isFillTransparent||!1,this.fillOpacity=x.fillOpacity||1,this.font=x.font||"10px sans-serif",this.textBaseline=x.textBaseline||"alphabetic",this.textAlign=x.textAlign||"left",this.lineWidth=x.lineWidth||1,this.lineJoin=x.lineJoin||"miter",this.lineCap=x.lineCap||"butt",this.path=x.path||[],this.transform=x.transform!==void 0?x.transform.clone():new c,this.globalCompositeOperation=x.globalCompositeOperation||"normal",this.globalAlpha=x.globalAlpha||1,this.clip_path=x.clip_path||[],this.currentPoint=x.currentPoint||new f,this.miterLimit=x.miterLimit||10,this.lastPoint=x.lastPoint||new f,this.lineDashOffset=x.lineDashOffset||0,this.lineDash=x.lineDash||[],this.margin=x.margin||[0,0,0,0],this.prevPageLastElemOffset=x.prevPageLastElemOffset||0,this.ignoreClearRect=typeof x.ignoreClearRect!="boolean"||x.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new A(this),e=this.internal.f2,t=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,f=this.internal.Point,l=this.internal.Rectangle,c=this.internal.Matrix,d=new m}]);var A=function(x){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var j=x;Object.defineProperty(this,"pdf",{get:function(){return j}});var M=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return M},set:function(st){M=!!st}});var G=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return G},set:function(st){G=!!st}});var $=0;Object.defineProperty(this,"posX",{get:function(){return $},set:function(st){isNaN(st)||($=st)}});var Q=0;Object.defineProperty(this,"posY",{get:function(){return Q},set:function(st){isNaN(st)||(Q=st)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(st){var O;typeof st=="number"?O=[st,st,st,st]:((O=new Array(4))[0]=st[0],O[1]=st.length>=2?st[1]:O[0],O[2]=st.length>=3?st[2]:O[0],O[3]=st.length>=4?st[3]:O[1]),d.margin=O}});var lt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return lt},set:function(st){lt=st}});var nt=0;Object.defineProperty(this,"lastBreak",{get:function(){return nt},set:function(st){nt=st}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(st){gt=st}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(st){st instanceof m&&(d=st)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(st){d.path=st}});var At=[];Object.defineProperty(this,"ctxStack",{get:function(){return At},set:function(st){At=st}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(st){var O;O=k(st),this.ctx.fillStyle=O.style,this.ctx.isFillTransparent=O.a===0,this.ctx.fillOpacity=O.a,this.pdf.setFillColor(O.r,O.g,O.b,{a:O.a}),this.pdf.setTextColor(O.r,O.g,O.b,{a:O.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(st){var O=k(st);this.ctx.strokeStyle=O.style,this.ctx.isStrokeTransparent=O.a===0,this.ctx.strokeOpacity=O.a,O.a===0?this.pdf.setDrawColor(255,255,255):(O.a,this.pdf.setDrawColor(O.r,O.g,O.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(st){["butt","round","square"].indexOf(st)!==-1&&(this.ctx.lineCap=st,this.pdf.setLineCap(st))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(st){isNaN(st)||(this.ctx.lineWidth=st,this.pdf.setLineWidth(st))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(st){["bevel","round","miter"].indexOf(st)!==-1&&(this.ctx.lineJoin=st,this.pdf.setLineJoin(st))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(st){isNaN(st)||(this.ctx.miterLimit=st,this.pdf.setMiterLimit(st))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(st){this.ctx.textBaseline=st}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(st){["right","end","center","left","start"].indexOf(st)!==-1&&(this.ctx.textAlign=st)}});var kt=null,Pt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Pt},set:function(st){kt=null,Pt=st}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(st){var O;if(this.ctx.font=st,(O=/^\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-z]+?)\s*$/i.exec(st))!==null){var le=O[1];O[2];var re=O[3],zt=O[4];O[5];var xt=O[6],Tt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(zt)[2];zt=Math.floor(Tt==="px"?parseFloat(zt)*this.pdf.internal.scaleFactor:Tt==="em"?parseFloat(zt)*this.pdf.getFontSize():parseFloat(zt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(zt);var St=function(Vt){var qt,ke,pe=[],Bt=Vt.trim();if(Bt==="")return bo;if(Bt in fu)return[fu[Bt]];for(;Bt!=="";){switch(ke=null,qt=(Bt=pu(Bt)).charAt(0)){case'"':case"'":ke=u1(Bt.substring(1),qt);break;default:ke=h1(Bt)}if(ke===null||(pe.push(ke[0]),(Bt=pu(ke[1]))!==""&&Bt.charAt(0)!==","))return bo;Bt=Bt.replace(/^,/,"")}return pe}(xt);if(this.fontFaces){var ne=function(Vt,qt){if(kt===null){var ke=function(pe){var Bt=[];return Object.keys(pe).forEach(function(Qt){pe[Qt].forEach(function(_e){var Ht=null;switch(_e){case"bold":Ht={family:Qt,weight:"bold"};break;case"italic":Ht={family:Qt,style:"italic"};break;case"bolditalic":Ht={family:Qt,weight:"bold",style:"italic"};break;case"":case"normal":Ht={family:Qt}}Ht!==null&&(Ht.ref={name:Qt,style:_e},Bt.push(Ht))})}),Bt}(Vt.getFontList());kt=function(pe){for(var Bt={},Qt=0;Qt<pe.length;++Qt){var _e=mo(pe[Qt]),Ht=_e.family,ue=_e.stretch,te=_e.style,Te=_e.weight;Bt[Ht]=Bt[Ht]||{},Bt[Ht][ue]=Bt[Ht][ue]||{},Bt[Ht][ue][te]=Bt[Ht][ue][te]||{},Bt[Ht][ue][te][Te]=_e}return Bt}(ke.concat(qt))}return kt}(this.pdf,this.fontFaces),Ut=St.map(function(Vt){return{family:Vt,stretch:"normal",weight:re,style:le}}),de=function(Vt,qt,ke){for(var pe=(ke=ke||{}).defaultFontFamily||"times",Bt=Object.assign({},l1,ke.genericFontFamilies||{}),Qt=null,_e=null,Ht=0;Ht<qt.length;++Ht)if(Bt[(Qt=mo(qt[Ht])).family]&&(Qt.family=Bt[Qt.family]),Vt.hasOwnProperty(Qt.family)){_e=Vt[Qt.family];break}if(!(_e=_e||Vt[pe]))throw new Error("Could not find a font-family for the rule '"+du(Qt)+"' and default family '"+pe+"'.");if(_e=function(ue,te){if(te[ue])return te[ue];var Te=ko[ue],Xe=Te<=ko.normal?-1:1,Ae=cu(te,lh,Te,Xe);if(!Ae)throw new Error("Could not find a matching font-stretch value for "+ue);return Ae}(Qt.stretch,_e),_e=function(ue,te){if(te[ue])return te[ue];for(var Te=oh[ue],Xe=0;Xe<Te.length;++Xe)if(te[Te[Xe]])return te[Te[Xe]];throw new Error("Could not find a matching font-style for "+ue)}(Qt.style,_e),!(_e=function(ue,te){if(te[ue])return te[ue];if(ue===400&&te[500])return te[500];if(ue===500&&te[400])return te[400];var Te=o1[ue],Xe=cu(te,uh,Te,ue<400?-1:1);if(!Xe)throw new Error("Could not find a matching font-weight for value "+ue);return Xe}(Qt.weight,_e)))throw new Error("Failed to resolve a font for the rule '"+du(Qt)+"'.");return _e}(ne,Ut);this.pdf.setFont(de.ref.name,de.ref.style)}else{var Xt="";(re==="bold"||parseInt(re,10)>=700||le==="bold")&&(Xt="bold"),le==="italic"&&(Xt+="italic"),Xt.length===0&&(Xt="normal");for(var Zt="",ye={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"},ie=0;ie<St.length;ie++){if(this.pdf.internal.getFont(St[ie],Xt,{noFallback:!0,disableWarning:!0})!==void 0){Zt=St[ie];break}if(Xt==="bolditalic"&&this.pdf.internal.getFont(St[ie],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Zt=St[ie],Xt="bold";else if(this.pdf.internal.getFont(St[ie],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Zt=St[ie],Xt="normal";break}}if(Zt===""){for(var Dt=0;Dt<St.length;Dt++)if(ye[St[Dt]]){Zt=ye[St[Dt]];break}}Zt=Zt===""?"Times":Zt,this.pdf.setFont(Zt,Xt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(st){this.ctx.globalCompositeOperation=st}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(st){this.ctx.globalAlpha=st}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(st){this.ctx.lineDashOffset=st,_t.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(st){this.ctx.lineDash=st,_t.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(st){this.ctx.ignoreClearRect=!!st}})};A.prototype.setLineDash=function(x){this.lineDash=x},A.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},A.prototype.fill=function(){D.call(this,"fill",!1)},A.prototype.stroke=function(){D.call(this,"stroke",!1)},A.prototype.beginPath=function(){this.path=[{type:"begin"}]},A.prototype.moveTo=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var M=this.ctx.transform.applyToPoint(new f(x,j));this.path.push({type:"mt",x:M.x,y:M.y}),this.ctx.lastPoint=new f(x,j)},A.prototype.closePath=function(){var x=new f(0,0),j=0;for(j=this.path.length-1;j!==-1;j--)if(this.path[j].type==="begin"&&Se(this.path[j+1])==="object"&&typeof this.path[j+1].x=="number"){x=new f(this.path[j+1].x,this.path[j+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new f(x.x,x.y)},A.prototype.lineTo=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var M=this.ctx.transform.applyToPoint(new f(x,j));this.path.push({type:"lt",x:M.x,y:M.y}),this.ctx.lastPoint=new f(M.x,M.y)},A.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),D.call(this,null,!0)},A.prototype.quadraticCurveTo=function(x,j,M,G){if(isNaN(M)||isNaN(G)||isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var $=this.ctx.transform.applyToPoint(new f(M,G)),Q=this.ctx.transform.applyToPoint(new f(x,j));this.path.push({type:"qct",x1:Q.x,y1:Q.y,x:$.x,y:$.y}),this.ctx.lastPoint=new f($.x,$.y)},A.prototype.bezierCurveTo=function(x,j,M,G,$,Q){if(isNaN($)||isNaN(Q)||isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G))throw Le.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var lt=this.ctx.transform.applyToPoint(new f($,Q)),nt=this.ctx.transform.applyToPoint(new f(x,j)),gt=this.ctx.transform.applyToPoint(new f(M,G));this.path.push({type:"bct",x1:nt.x,y1:nt.y,x2:gt.x,y2:gt.y,x:lt.x,y:lt.y}),this.ctx.lastPoint=new f(lt.x,lt.y)},A.prototype.arc=function(x,j,M,G,$,Q){if(isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G)||isNaN($))throw Le.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Q=!!Q,!this.ctx.transform.isIdentity){var lt=this.ctx.transform.applyToPoint(new f(x,j));x=lt.x,j=lt.y;var nt=this.ctx.transform.applyToPoint(new f(0,M)),gt=this.ctx.transform.applyToPoint(new f(0,0));M=Math.sqrt(Math.pow(nt.x-gt.x,2)+Math.pow(nt.y-gt.y,2))}Math.abs($-G)>=2*Math.PI&&(G=0,$=2*Math.PI),this.path.push({type:"arc",x,y:j,radius:M,startAngle:G,endAngle:$,counterclockwise:Q})},A.prototype.arcTo=function(x,j,M,G,$){throw new Error("arcTo not implemented.")},A.prototype.rect=function(x,j,M,G){if(isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G))throw Le.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(x,j),this.lineTo(x+M,j),this.lineTo(x+M,j+G),this.lineTo(x,j+G),this.lineTo(x,j),this.lineTo(x+M,j),this.lineTo(x,j)},A.prototype.fillRect=function(x,j,M,G){if(isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G))throw Le.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var $={};this.lineCap!=="butt"&&($.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&($.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(x,j,M,G),this.fill(),$.hasOwnProperty("lineCap")&&(this.lineCap=$.lineCap),$.hasOwnProperty("lineJoin")&&(this.lineJoin=$.lineJoin)}},A.prototype.strokeRect=function(x,j,M,G){if(isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G))throw Le.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(x,j,M,G),this.stroke())},A.prototype.clearRect=function(x,j,M,G){if(isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G))throw Le.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(x,j,M,G))},A.prototype.save=function(x){x=typeof x!="boolean"||x;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,M=0;M<this.pdf.internal.getNumberOfPages();M++)this.pdf.setPage(M+1),this.pdf.internal.out("q");if(this.pdf.setPage(j),x){this.ctx.fontSize=this.pdf.internal.getFontSize();var G=new m(this.ctx);this.ctxStack.push(this.ctx),this.ctx=G}},A.prototype.restore=function(x){x=typeof x!="boolean"||x;for(var j=this.pdf.internal.getCurrentPageInfo().pageNumber,M=0;M<this.pdf.internal.getNumberOfPages();M++)this.pdf.setPage(M+1),this.pdf.internal.out("Q");this.pdf.setPage(j),x&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},A.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var k=function(x){var j,M,G,$;if(x.isCanvasGradient===!0&&(x=x.getColor()),!x)return{r:0,g:0,b:0,a:0,style:x};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(x))j=0,M=0,G=0,$=0;else{var Q=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(x);if(Q!==null)j=parseInt(Q[1]),M=parseInt(Q[2]),G=parseInt(Q[3]),$=1;else if((Q=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(x))!==null)j=parseInt(Q[1]),M=parseInt(Q[2]),G=parseInt(Q[3]),$=parseFloat(Q[4]);else{if($=1,typeof x=="string"&&x.charAt(0)!=="#"){var lt=new th(x);x=lt.ok?lt.toHex():"#000000"}x.length===4?(j=x.substring(1,2),j+=j,M=x.substring(2,3),M+=M,G=x.substring(3,4),G+=G):(j=x.substring(1,3),M=x.substring(3,5),G=x.substring(5,7)),j=parseInt(j,16),M=parseInt(M,16),G=parseInt(G,16)}}return{r:j,g:M,b:G,a:$,style:x}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},B=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};A.prototype.fillText=function(x,j,M,G){if(isNaN(j)||isNaN(M)||typeof x!="string")throw Le.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(G=isNaN(G)?void 0:G,!p.call(this)){var $=rt(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;F.call(this,{text:x,x:j,y:M,scale:Q,angle:$,align:this.textAlign,maxWidth:G})}},A.prototype.strokeText=function(x,j,M,G){if(isNaN(j)||isNaN(M)||typeof x!="string")throw Le.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!B.call(this)){G=isNaN(G)?void 0:G;var $=rt(this.ctx.transform.rotation),Q=this.ctx.transform.scaleX;F.call(this,{text:x,x:j,y:M,scale:Q,renderingMode:"stroke",angle:$,align:this.textAlign,maxWidth:G})}},A.prototype.measureText=function(x){if(typeof x!="string")throw Le.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var j=this.pdf,M=this.pdf.internal.scaleFactor,G=j.internal.getFontSize(),$=j.getStringUnitWidth(x)*G/j.internal.scaleFactor;return new function(Q){var lt=(Q=Q||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return lt}}),this}({width:$*=Math.round(96*M/72*1e4)/1e4})},A.prototype.scale=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var M=new c(x,0,0,j,0,0);this.ctx.transform=this.ctx.transform.multiply(M)},A.prototype.rotate=function(x){if(isNaN(x))throw Le.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var j=new c(Math.cos(x),Math.sin(x),-Math.sin(x),Math.cos(x),0,0);this.ctx.transform=this.ctx.transform.multiply(j)},A.prototype.translate=function(x,j){if(isNaN(x)||isNaN(j))throw Le.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var M=new c(1,0,0,1,x,j);this.ctx.transform=this.ctx.transform.multiply(M)},A.prototype.transform=function(x,j,M,G,$,Q){if(isNaN(x)||isNaN(j)||isNaN(M)||isNaN(G)||isNaN($)||isNaN(Q))throw Le.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var lt=new c(x,j,M,G,$,Q);this.ctx.transform=this.ctx.transform.multiply(lt)},A.prototype.setTransform=function(x,j,M,G,$,Q){x=isNaN(x)?1:x,j=isNaN(j)?0:j,M=isNaN(M)?0:M,G=isNaN(G)?1:G,$=isNaN($)?0:$,Q=isNaN(Q)?0:Q,this.ctx.transform=new c(x,j,M,G,$,Q)};var E=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};A.prototype.drawImage=function(x,j,M,G,$,Q,lt,nt,gt){var At=this.pdf.getImageProperties(x),kt=1,Pt=1,st=1,O=1;G!==void 0&&nt!==void 0&&(st=nt/G,O=gt/$,kt=At.width/G*nt/G,Pt=At.height/$*gt/$),Q===void 0&&(Q=j,lt=M,j=0,M=0),G!==void 0&&nt===void 0&&(nt=G,gt=$),G===void 0&&nt===void 0&&(nt=At.width,gt=At.height);for(var le,re=this.ctx.transform.decompose(),zt=rt(re.rotate.shx),xt=new c,Tt=(xt=(xt=(xt=xt.multiply(re.translate)).multiply(re.skew)).multiply(re.scale)).applyToRectangle(new l(Q-j*st,lt-M*O,G*kt,$*Pt)),St=R.call(this,Tt),ne=[],Ut=0;Ut<St.length;Ut+=1)ne.indexOf(St[Ut])===-1&&ne.push(St[Ut]);if(V(ne),this.autoPaging)for(var de=ne[0],Xt=ne[ne.length-1],Zt=de;Zt<Xt+1;Zt++){this.pdf.setPage(Zt);var ye=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ie=Zt===1?this.posY+this.margin[0]:this.margin[0],Dt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Vt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],qt=Zt===1?0:Dt+(Zt-2)*Vt;if(this.ctx.clip_path.length!==0){var ke=this.path;le=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(le,this.posX+this.margin[3],-qt+ie+this.ctx.prevPageLastElemOffset),ut.call(this,"fill",!0),this.path=ke}var pe=JSON.parse(JSON.stringify(Tt));pe=Y([pe],this.posX+this.margin[3],-qt+ie+this.ctx.prevPageLastElemOffset)[0];var Bt=(Zt>de||Zt<Xt)&&E.call(this);Bt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ye,Vt,null).clip().discardPath()),this.pdf.addImage(x,"JPEG",pe.x,pe.y,pe.w,pe.h,null,null,zt),Bt&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(x,"JPEG",Tt.x,Tt.y,Tt.w,Tt.h,null,null,zt)};var R=function(x,j,M){var G=[];j=j||this.pdf.internal.pageSize.width,M=M||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var $=this.posY+this.ctx.prevPageLastElemOffset;switch(x.type){default:case"mt":case"lt":G.push(Math.floor((x.y+$)/M)+1);break;case"arc":G.push(Math.floor((x.y+$-x.radius)/M)+1),G.push(Math.floor((x.y+$+x.radius)/M)+1);break;case"qct":var Q=pt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,x.x1,x.y1,x.x,x.y);G.push(Math.floor((Q.y+$)/M)+1),G.push(Math.floor((Q.y+Q.h+$)/M)+1);break;case"bct":var lt=Nt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,x.x1,x.y1,x.x2,x.y2,x.x,x.y);G.push(Math.floor((lt.y+$)/M)+1),G.push(Math.floor((lt.y+lt.h+$)/M)+1);break;case"rect":G.push(Math.floor((x.y+$)/M)+1),G.push(Math.floor((x.y+x.h+$)/M)+1)}for(var nt=0;nt<G.length;nt+=1)for(;this.pdf.internal.getNumberOfPages()<G[nt];)S.call(this);return G},S=function(){var x=this.fillStyle,j=this.strokeStyle,M=this.font,G=this.lineCap,$=this.lineWidth,Q=this.lineJoin;this.pdf.addPage(),this.fillStyle=x,this.strokeStyle=j,this.font=M,this.lineCap=G,this.lineWidth=$,this.lineJoin=Q},Y=function(x,j,M){for(var G=0;G<x.length;G++)switch(x[G].type){case"bct":x[G].x2+=j,x[G].y2+=M;case"qct":x[G].x1+=j,x[G].y1+=M;default:x[G].x+=j,x[G].y+=M}return x},V=function(x){return x.sort(function(j,M){return j-M})},D=function(x,j){for(var M,G,$=this.fillStyle,Q=this.strokeStyle,lt=this.lineCap,nt=this.lineWidth,gt=Math.abs(nt*this.ctx.transform.scaleX),At=this.lineJoin,kt=JSON.parse(JSON.stringify(this.path)),Pt=JSON.parse(JSON.stringify(this.path)),st=[],O=0;O<Pt.length;O++)if(Pt[O].x!==void 0)for(var le=R.call(this,Pt[O]),re=0;re<le.length;re+=1)st.indexOf(le[re])===-1&&st.push(le[re]);for(var zt=0;zt<st.length;zt++)for(;this.pdf.internal.getNumberOfPages()<st[zt];)S.call(this);if(V(st),this.autoPaging)for(var xt=st[0],Tt=st[st.length-1],St=xt;St<Tt+1;St++){this.pdf.setPage(St),this.fillStyle=$,this.strokeStyle=Q,this.lineCap=lt,this.lineWidth=gt,this.lineJoin=At;var ne=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ut=St===1?this.posY+this.margin[0]:this.margin[0],de=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Xt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Zt=St===1?0:de+(St-2)*Xt;if(this.ctx.clip_path.length!==0){var ye=this.path;M=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(M,this.posX+this.margin[3],-Zt+Ut+this.ctx.prevPageLastElemOffset),ut.call(this,x,!0),this.path=ye}if(G=JSON.parse(JSON.stringify(kt)),this.path=Y(G,this.posX+this.margin[3],-Zt+Ut+this.ctx.prevPageLastElemOffset),j===!1||St===0){var ie=(St>xt||St<Tt)&&E.call(this);ie&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ne,Xt,null).clip().discardPath()),ut.call(this,x,j),ie&&this.pdf.restoreGraphicsState()}this.lineWidth=nt}else this.lineWidth=gt,ut.call(this,x,j),this.lineWidth=nt;this.path=kt},ut=function(x,j){if((x!=="stroke"||j||!B.call(this))&&(x==="stroke"||j||!p.call(this))){for(var M,G,$=[],Q=this.path,lt=0;lt<Q.length;lt++){var nt=Q[lt];switch(nt.type){case"begin":$.push({begin:!0});break;case"close":$.push({close:!0});break;case"mt":$.push({start:nt,deltas:[],abs:[]});break;case"lt":var gt=$.length;if(Q[lt-1]&&!isNaN(Q[lt-1].x)&&(M=[nt.x-Q[lt-1].x,nt.y-Q[lt-1].y],gt>0)){for(;gt>=0;gt--)if($[gt-1].close!==!0&&$[gt-1].begin!==!0){$[gt-1].deltas.push(M),$[gt-1].abs.push(nt);break}}break;case"bct":M=[nt.x1-Q[lt-1].x,nt.y1-Q[lt-1].y,nt.x2-Q[lt-1].x,nt.y2-Q[lt-1].y,nt.x-Q[lt-1].x,nt.y-Q[lt-1].y],$[$.length-1].deltas.push(M);break;case"qct":var At=Q[lt-1].x+2/3*(nt.x1-Q[lt-1].x),kt=Q[lt-1].y+2/3*(nt.y1-Q[lt-1].y),Pt=nt.x+2/3*(nt.x1-nt.x),st=nt.y+2/3*(nt.y1-nt.y),O=nt.x,le=nt.y;M=[At-Q[lt-1].x,kt-Q[lt-1].y,Pt-Q[lt-1].x,st-Q[lt-1].y,O-Q[lt-1].x,le-Q[lt-1].y],$[$.length-1].deltas.push(M);break;case"arc":$.push({deltas:[],abs:[],arc:!0}),Array.isArray($[$.length-1].abs)&&$[$.length-1].abs.push(nt)}}G=j?null:x==="stroke"?"stroke":"fill";for(var re=!1,zt=0;zt<$.length;zt++)if($[zt].arc)for(var xt=$[zt].abs,Tt=0;Tt<xt.length;Tt++){var St=xt[Tt];St.type==="arc"?tt.call(this,St.x,St.y,St.radius,St.startAngle,St.endAngle,St.counterclockwise,void 0,j,!re):H.call(this,St.x,St.y),re=!0}else if($[zt].close===!0)this.pdf.internal.out("h"),re=!1;else if($[zt].begin!==!0){var ne=$[zt].start.x,Ut=$[zt].start.y;U.call(this,$[zt].deltas,ne,Ut),re=!0}G&&z.call(this,G),j&&et.call(this)}},yt=function(x){var j=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,M=j*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return x-M;case"top":return x+j-M;case"hanging":return x+j-2*M;case"middle":return x+j/2-M;default:return x}},ft=function(x){return x+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};A.prototype.createLinearGradient=function(){var x=function(){};return x.colorStops=[],x.addColorStop=function(j,M){this.colorStops.push([j,M])},x.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},x.isCanvasGradient=!0,x},A.prototype.createPattern=function(){return this.createLinearGradient()},A.prototype.createRadialGradient=function(){return this.createLinearGradient()};var tt=function(x,j,M,G,$,Q,lt,nt,gt){for(var At=dt.call(this,M,G,$,Q),kt=0;kt<At.length;kt++){var Pt=At[kt];kt===0&&(gt?N.call(this,Pt.x1+x,Pt.y1+j):H.call(this,Pt.x1+x,Pt.y1+j)),it.call(this,x,j,Pt.x2,Pt.y2,Pt.x3,Pt.y3,Pt.x4,Pt.y4)}nt?et.call(this):z.call(this,lt)},z=function(x){switch(x){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},et=function(){this.pdf.clip(),this.pdf.discardPath()},N=function(x,j){this.pdf.internal.out(t(x)+" "+i(j)+" m")},F=function(x){var j;switch(x.align){case"right":case"end":j="right";break;case"center":j="center";break;default:j="left"}var M=this.pdf.getTextDimensions(x.text),G=yt.call(this,x.y),$=ft.call(this,G)-M.h,Q=this.ctx.transform.applyToPoint(new f(x.x,G)),lt=this.ctx.transform.decompose(),nt=new c;nt=(nt=(nt=nt.multiply(lt.translate)).multiply(lt.skew)).multiply(lt.scale);for(var gt,At,kt,Pt=this.ctx.transform.applyToRectangle(new l(x.x,G,M.w,M.h)),st=nt.applyToRectangle(new l(x.x,$,M.w,M.h)),O=R.call(this,st),le=[],re=0;re<O.length;re+=1)le.indexOf(O[re])===-1&&le.push(O[re]);if(V(le),this.autoPaging)for(var zt=le[0],xt=le[le.length-1],Tt=zt;Tt<xt+1;Tt++){this.pdf.setPage(Tt);var St=Tt===1?this.posY+this.margin[0]:this.margin[0],ne=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ut=this.pdf.internal.pageSize.height-this.margin[2],de=Ut-this.margin[0],Xt=this.pdf.internal.pageSize.width-this.margin[1],Zt=Xt-this.margin[3],ye=Tt===1?0:ne+(Tt-2)*de;if(this.ctx.clip_path.length!==0){var ie=this.path;gt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(gt,this.posX+this.margin[3],-1*ye+St),ut.call(this,"fill",!0),this.path=ie}var Dt=Y([JSON.parse(JSON.stringify(st))],this.posX+this.margin[3],-ye+St+this.ctx.prevPageLastElemOffset)[0];x.scale>=.01&&(At=this.pdf.internal.getFontSize(),this.pdf.setFontSize(At*x.scale),kt=this.lineWidth,this.lineWidth=kt*x.scale);var Vt=this.autoPaging!=="text";if(Vt||Dt.y+Dt.h<=Ut){if(Vt||Dt.y>=St&&Dt.x<=Xt){var qt=Vt?x.text:this.pdf.splitTextToSize(x.text,x.maxWidth||Xt-Dt.x)[0],ke=Y([JSON.parse(JSON.stringify(Pt))],this.posX+this.margin[3],-ye+St+this.ctx.prevPageLastElemOffset)[0],pe=Vt&&(Tt>zt||Tt<xt)&&E.call(this);pe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Zt,de,null).clip().discardPath()),this.pdf.text(qt,ke.x,ke.y,{angle:x.angle,align:j,renderingMode:x.renderingMode}),pe&&this.pdf.restoreGraphicsState()}}else Dt.y<Ut&&(this.ctx.prevPageLastElemOffset+=Ut-Dt.y);x.scale>=.01&&(this.pdf.setFontSize(At),this.lineWidth=kt)}else x.scale>=.01&&(At=this.pdf.internal.getFontSize(),this.pdf.setFontSize(At*x.scale),kt=this.lineWidth,this.lineWidth=kt*x.scale),this.pdf.text(x.text,Q.x+this.posX,Q.y+this.posY,{angle:x.angle,align:j,renderingMode:x.renderingMode,maxWidth:x.maxWidth}),x.scale>=.01&&(this.pdf.setFontSize(At),this.lineWidth=kt)},H=function(x,j,M,G){M=M||0,G=G||0,this.pdf.internal.out(t(x+M)+" "+i(j+G)+" l")},U=function(x,j,M){return this.pdf.lines(x,j,M,null,null)},it=function(x,j,M,G,$,Q,lt,nt){this.pdf.internal.out([e(o(M+x)),e(s(G+j)),e(o($+x)),e(s(Q+j)),e(o(lt+x)),e(s(nt+j)),"c"].join(" "))},dt=function(x,j,M,G){for(var $=2*Math.PI,Q=Math.PI/2;j>M;)j-=$;var lt=Math.abs(M-j);lt<$&&G&&(lt=$-lt);for(var nt=[],gt=G?-1:1,At=j;lt>1e-5;){var kt=At+gt*Math.min(lt,Q);nt.push(vt.call(this,x,At,kt)),lt-=Math.abs(kt-At),At=kt}return nt},vt=function(x,j,M){var G=(M-j)/2,$=x*Math.cos(G),Q=x*Math.sin(G),lt=$,nt=-Q,gt=lt*lt+nt*nt,At=gt+lt*$+nt*Q,kt=4/3*(Math.sqrt(2*gt*At)-At)/(lt*Q-nt*$),Pt=lt-kt*nt,st=nt+kt*lt,O=Pt,le=-st,re=G+j,zt=Math.cos(re),xt=Math.sin(re);return{x1:x*Math.cos(j),y1:x*Math.sin(j),x2:Pt*zt-st*xt,y2:Pt*xt+st*zt,x3:O*zt-le*xt,y3:O*xt+le*zt,x4:x*Math.cos(M),y4:x*Math.sin(M)}},rt=function(x){return 180*x/Math.PI},pt=function(x,j,M,G,$,Q){var lt=x+.5*(M-x),nt=j+.5*(G-j),gt=$+.5*(M-$),At=Q+.5*(G-Q),kt=Math.min(x,$,lt,gt),Pt=Math.max(x,$,lt,gt),st=Math.min(j,Q,nt,At),O=Math.max(j,Q,nt,At);return new l(kt,st,Pt-kt,O-st)},Nt=function(x,j,M,G,$,Q,lt,nt){var gt,At,kt,Pt,st,O,le,re,zt,xt,Tt,St,ne,Ut,de=M-x,Xt=G-j,Zt=$-M,ye=Q-G,ie=lt-$,Dt=nt-Q;for(At=0;At<41;At++)zt=(le=(kt=x+(gt=At/40)*de)+gt*((st=M+gt*Zt)-kt))+gt*(st+gt*($+gt*ie-st)-le),xt=(re=(Pt=j+gt*Xt)+gt*((O=G+gt*ye)-Pt))+gt*(O+gt*(Q+gt*Dt-O)-re),At==0?(Tt=zt,St=xt,ne=zt,Ut=xt):(Tt=Math.min(Tt,zt),St=Math.min(St,xt),ne=Math.max(ne,zt),Ut=Math.max(Ut,xt));return new l(Math.round(Tt),Math.round(St),Math.round(ne-Tt),Math.round(Ut-St))},_t=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var x,j,M=(x=this.ctx.lineDash,j=this.ctx.lineDashOffset,JSON.stringify({lineDash:x,lineDashOffset:j}));this.prevLineDash!==M&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=M)}}})(Mt.API),function(r){var e=function(f){var l,c,d,m,A,k,p,B,E,R;for(c=[],d=0,m=(f+=l="\0\0\0\0".slice(f.length%4||4)).length;m>d;d+=4)(A=(f.charCodeAt(d)<<24)+(f.charCodeAt(d+1)<<16)+(f.charCodeAt(d+2)<<8)+f.charCodeAt(d+3))!==0?(k=(A=((A=((A=((A=(A-(R=A%85))/85)-(E=A%85))/85)-(B=A%85))/85)-(p=A%85))/85)%85,c.push(k+33,p+33,B+33,E+33,R+33)):c.push(122);return function(S,Y){for(var V=Y;V>0;V--)S.pop()}(c,l.length),String.fromCharCode.apply(String,c)+"~>"},t=function(f){var l,c,d,m,A,k=String,p="length",B=255,E="charCodeAt",R="slice",S="replace";for(f[R](-2),f=f[R](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),d=[],m=0,A=(f+=l="uuuuu"[R](f[p]%5||5))[p];A>m;m+=5)c=52200625*(f[E](m)-33)+614125*(f[E](m+1)-33)+7225*(f[E](m+2)-33)+85*(f[E](m+3)-33)+(f[E](m+4)-33),d.push(B&c>>24,B&c>>16,B&c>>8,B&c);return function(Y,V){for(var D=V;D>0;D--)Y.pop()}(d,l[p]),k.fromCharCode.apply(k,d)},i=function(f){return f.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(f){var l=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"),l.test(f)===!1)return"";for(var c="",d=0;d<f.length;d+=2)c+=String.fromCharCode("0x"+(f[d]+f[d+1]));return c},s=function(f){for(var l=new Uint8Array(f.length),c=f.length;c--;)l[c]=f.charCodeAt(c);return(l=yo(l)).reduce(function(d,m){return d+String.fromCharCode(m)},"")};r.processDataByFilters=function(f,l){var c=0,d=f||"",m=[];for(typeof(l=l||[])=="string"&&(l=[l]),c=0;c<l.length;c+=1)switch(l[c]){case"ASCII85Decode":case"/ASCII85Decode":d=t(d),m.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=e(d),m.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=o(d),m.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=i(d),m.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=s(d),m.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[c]+'" is not implemented')}return{data:d,reverseChain:m.reverse().join(" ")}}}(Mt.API),function(r){r.loadFile=function(e,t,i){return function(o,s,f){s=s!==!1,f=typeof f=="function"?f:function(){};var l=void 0;try{l=function(c,d,m){var A=new XMLHttpRequest,k=0,p=function(B){var E=B.length,R=[],S=String.fromCharCode;for(k=0;k<E;k+=1)R.push(S(255&B.charCodeAt(k)));return R.join("")};if(A.open("GET",c,!d),A.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(A.onload=function(){A.status===200?m(p(this.responseText)):m(void 0)}),A.send(null),d&&A.status===200)return p(A.responseText)}(o,s,f)}catch{}return l}(e,t,i)},r.loadImageFile=r.loadFile}(Mt.API),function(r){function e(){return(Yt.html2canvas?Promise.resolve(Yt.html2canvas):Zs(()=>import("./html2canvas.esm-CBrSDip1.js"),[],import.meta.url)).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function t(){return(Yt.DOMPurify?Promise.resolve(Yt.DOMPurify):Zs(()=>import("./purify.es-Ci5xwkH_.js"),[],import.meta.url)).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var i=function(l){var c=Se(l);return c==="undefined"?"undefined":c==="string"||l instanceof String?"string":c==="number"||l instanceof Number?"number":c==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":c==="object"?"object":"unknown"},o=function(l,c){var d=document.createElement(l);for(var m in c.className&&(d.className=c.className),c.innerHTML&&c.dompurify&&(d.innerHTML=c.dompurify.sanitize(c.innerHTML)),c.style)d.style[m]=c.style[m];return d},s=function l(c,d){for(var m=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),A=c.firstChild;A;A=A.nextSibling)d!==!0&&A.nodeType===1&&A.nodeName==="SCRIPT"||m.appendChild(l(A,d));return c.nodeType===1&&(c.nodeName==="CANVAS"?(m.width=c.width,m.height=c.height,m.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(m.value=c.value),m.addEventListener("load",function(){m.scrollTop=c.scrollTop,m.scrollLeft=c.scrollLeft},!0)),m},f=function l(c){var d=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),m=l.convert(Promise.resolve(),d);return(m=m.setProgress(1,l,1,[l])).set(c)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(l,c){return l.__proto__=c||f.prototype,l},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(l,c){return this.then(function(){switch(c=c||function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(l),c){case"string":return this.then(t).then(function(d){return this.set({src:o("div",{innerHTML:l,dompurify:d})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},f.prototype.to=function(l){switch(l){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 l={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},c=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);c.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(c),this.prop.container.firstChild.appendChild(o("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 l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(c){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,c(this.prop.container,d)}).then(function(c){(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(c){var d=this.opt.jsPDF,m=this.opt.fontFaces,A=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,k=Object.assign({async:!0,allowTaint:!0,scale:A,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 k.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=m,m)for(var p=0;p<m.length;++p){var B=m[p],E=B.src.find(function(R){return R.format==="truetype"});E&&d.addFont(E.url,B.ref.name,B.ref.style)}return k.windowHeight=k.windowHeight||0,k.windowHeight=k.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):k.windowHeight,d.context2d.save(!0),c(this.prop.container,k)}).then(function(c){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},f.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},f.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},f.prototype.output=function(l,c,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(l,c):this.outputPdf(l,c)},f.prototype.outputPdf=function(l,c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,c)})},f.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+l+'" is not supported.'}})},f.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},f.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},f.prototype.set=function(l){if(i(l)!=="object")return this;var c=Object.keys(l||{}).map(function(d){if(d in f.template.prop)return function(){this.prop[d]=l[d]};switch(d){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[d]=l[d]}}},this);return this.then(function(){return this.thenList(c)})},f.prototype.get=function(l,c){return this.then(function(){var d=l in f.template.prop?this.prop[l]:this.opt[l];return c?c(d):d})},f.prototype.setMargin=function(l){return this.then(function(){switch(i(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},f.prototype.setPageSize=function(l){function c(d,m){return Math.floor(d*m/72*96)}return this.then(function(){(l=l||Mt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:c(l.inner.width,l.k),height:c(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},f.prototype.setProgress=function(l,c,d,m){return l!=null&&(this.progress.val=l),c!=null&&(this.progress.state=c),d!=null&&(this.progress.n=d),m!=null&&(this.progress.stack=m),this.progress.ratio=this.progress.val/this.progress.state,this},f.prototype.updateProgress=function(l,c,d,m){return this.setProgress(l?this.progress.val+l:null,c||null,d?this.progress.n+d:null,m?this.progress.stack.concat(m):null)},f.prototype.then=function(l,c){var d=this;return this.thenCore(l,c,function(m,A){return d.updateProgress(null,null,1,[m]),Promise.prototype.then.call(this,function(k){return d.updateProgress(null,m),k}).then(m,A).then(function(k){return d.updateProgress(1),k})})},f.prototype.thenCore=function(l,c,d){d=d||Promise.prototype.then;var m=this;l&&(l=l.bind(m)),c&&(c=c.bind(m));var A=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?m:f.convert(Object.assign({},m),Promise.prototype),k=d.call(A,l,c);return f.convert(k,m.__proto__)},f.prototype.thenExternal=function(l,c){return Promise.prototype.then.call(this,l,c)},f.prototype.thenList=function(l){var c=this;return l.forEach(function(d){c=c.thenCore(d)}),c},f.prototype.catch=function(l){l&&(l=l.bind(this));var c=Promise.prototype.catch.call(this,l);return f.convert(c,this)},f.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},f.prototype.error=function(l){return this.then(function(){throw new Error(l)})},f.prototype.using=f.prototype.set,f.prototype.saveAs=f.prototype.save,f.prototype.export=f.prototype.output,f.prototype.run=f.prototype.then,Mt.getPageSize=function(l,c,d){if(Se(l)==="object"){var m=l;l=m.orientation,c=m.unit||c,d=m.format||d}c=c||"mm",d=d||"a4",l=(""+(l||"P")).toLowerCase();var A,k=(""+d).toLowerCase(),p={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]};switch(c){case"pt":A=1;break;case"mm":A=72/25.4;break;case"cm":A=72/2.54;break;case"in":A=72;break;case"px":A=.75;break;case"pc":case"em":A=12;break;case"ex":A=6;break;default:throw"Invalid unit: "+c}var B,E=0,R=0;if(p.hasOwnProperty(k))E=p[k][1]/A,R=p[k][0]/A;else try{E=d[1],R=d[0]}catch{throw new Error("Invalid format: "+d)}if(l==="p"||l==="portrait")l="p",R>E&&(B=R,R=E,E=B);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",E>R&&(B=R,R=E,E=B)}return{width:R,height:E,unit:c,k:A,orientation:l}},r.html=function(l,c){(c=c||{}).callback=c.callback||function(){},c.html2canvas=c.html2canvas||{},c.html2canvas.canvas=c.html2canvas.canvas||this.canvas,c.jsPDF=c.jsPDF||this,c.fontFaces=c.fontFaces?c.fontFaces.map(mo):null;var d=new f(c);return c.worker?d:d.from(l).doCallback()}}(Mt.API),Mt.API.addJS=function(r){return mu=r,this.internal.events.subscribe("postPutResources",function(){as=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(as+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),gu=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+mu+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){as!==void 0&&gu!==void 0&&this.internal.out("/Names <</JavaScript "+as+" 0 R>>")}),this},function(r){var e;r.events.push(["postPutResources",function(){var t=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=t.outline.render().split(/\r\n/),s=0;s<o.length;s++){var f=o[s],l=i.exec(f);if(l!=null){var c=l[1];t.internal.newObjectDeferredBegin(c,!1)}t.internal.write(f)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,m=[];for(s=0;s<d;s++){var A=t.internal.newObject();m.push(A);var k=t.internal.getPageInfo(s+1);t.internal.write("<< /D["+k.objId+" 0 R /XYZ null null null]>> endobj")}var p=t.internal.newObject();for(t.internal.write("<< /Names [ "),s=0;s<m.length;s++)t.internal.write("(page_"+(s+1)+")"+m[s]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+p+" 0 R"),t.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),r.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(i,o,s){var f={title:o,options:s,children:[]};return i==null&&(i=this.root),i.children.push(f),f},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(i){i.id=t.internal.newObjectDeferred();for(var o=0;o<i.children.length;o++)this.genIds_r(i.children[o])},t.outline.renderRoot=function(i){this.objStart(i),this.line("/Type /Outlines"),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},t.outline.renderItems=function(i){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<i.children.length;s++){var f=i.children[s];this.objStart(f),this.line("/Title "+this.makeString(f.title)),this.line("/Parent "+this.makeRef(i)),s>0&&this.line("/Prev "+this.makeRef(i.children[s-1])),s<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[s+1])),f.children.length>0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var l=this.count=this.count_r({count:0},f);if(l>0&&this.line("/Count "+l),f.options&&f.options.pageNumber){var c=t.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var d=0;d<i.children.length;d++)this.renderItems(i.children[d])},t.outline.line=function(i){this.ctx.val+=i+`\r
`},t.outline.makeRef=function(i){return i.id+" 0 R"},t.outline.makeString=function(i){return"("+t.internal.pdfEscape(i)+")"},t.outline.objStart=function(i){this.ctx.val+=`\r
`+i.id+` 0 obj\r
<<\r
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},t.outline.count_r=function(i,o){for(var s=0;s<o.children.length;s++)i.count++,this.count_r(i,o.children[s]);return i.count}}])}(Mt.API),function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(t,i,o,s,f,l){var c,d=this.decode.DCT_DECODE,m=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=f||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,c=function(A){for(var k,p=256*A.charCodeAt(4)+A.charCodeAt(5),B=A.length,E={width:0,height:0,numcomponents:1},R=4;R<B;R+=2){if(R+=p,e.indexOf(A.charCodeAt(R+1))!==-1){k=256*A.charCodeAt(R+5)+A.charCodeAt(R+6),E={width:256*A.charCodeAt(R+7)+A.charCodeAt(R+8),height:k,numcomponents:A.charCodeAt(R+9)};break}p=256*A.charCodeAt(R+2)+A.charCodeAt(R+3)}return E}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),c.numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}m={data:t,width:c.width,height:c.height,colorSpace:l,bitsPerComponent:8,filter:d,index:i,alias:o}}return m}}(Mt.API),Mt.API.processPNG=function(r,e,t,i){if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){var o,s=Yf(r,{checkCrc:!0}),f=s.width,l=s.height,c=s.channels,d=s.palette,m=s.depth;o=d&&c===1?function(ft){for(var tt=ft.width,z=ft.height,et=ft.data,N=ft.palette,F=ft.depth,H=!1,U=[],it=[],dt=void 0,vt=!1,rt=0,pt=0;pt<N.length;pt++){var Nt=yl(N[pt],4),_t=Nt[0],x=Nt[1],j=Nt[2],M=Nt[3];U.push(_t,x,j),M!=null&&(M===0?(rt++,it.length<1&&it.push(pt)):M<255&&(vt=!0))}if(vt||rt>1){H=!0,it=void 0;var G=tt*z;dt=new Uint8Array(G);for(var $=new DataView(et.buffer),Q=0;Q<G;Q++){var lt=vo($,Q,F),nt=yl(N[lt],4)[3];dt[Q]=nt}}return{colorSpace:"Indexed",colorsPerPixel:1,colorBytes:et,alphaBytes:dt,needSMask:H,palette:U,mask:it}}(s):c===2||c===4?function(ft){for(var tt=ft.data,z=ft.width,et=ft.height,N=ft.channels,F=ft.depth,H=N===2?"DeviceGray":"DeviceRGB",U=N-1,it=z*et,dt=U,vt=it*dt,rt=1*it,pt=Math.ceil(vt*F/8),Nt=Math.ceil(rt*F/8),_t=new Uint8Array(pt),x=new Uint8Array(Nt),j=new DataView(tt.buffer),M=new DataView(_t.buffer),G=new DataView(x.buffer),$=!1,Q=0;Q<it;Q++){for(var lt=Q*N,nt=0;nt<dt;nt++)Lu(M,vo(j,lt+nt,F),Q*dt+nt,F);var gt=vo(j,lt+dt,F);gt<(1<<F)-1&&($=!0),Lu(G,gt,1*Q,F)}return{colorSpace:H,colorsPerPixel:U,colorBytes:_t,alphaBytes:x,needSMask:$}}(s):function(ft){var tt=ft.data,z=ft.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:z,colorsPerPixel:z==="DeviceGray"?1:3,colorBytes:tt instanceof Uint8Array?tt:new Uint8Array(tt.buffer),needSMask:!1}}(s);var A,k,p,B=o,E=B.colorSpace,R=B.colorsPerPixel,S=B.colorBytes,Y=B.alphaBytes,V=B.needSMask,D=B.palette,ut=B.mask,yt=null;return i!==Mt.API.image_compression.NONE&&typeof yo=="function"?(yt=function(ft){var tt;switch(ft){case Mt.API.image_compression.FAST:tt=11;break;case Mt.API.image_compression.MEDIUM:tt=13;break;case Mt.API.image_compression.SLOW:tt=14;break;default:tt=12}return tt}(i),A=this.decode.FLATE_DECODE,k="/Predictor ".concat(yt," "),r=yu(S,f*R,R,i),V&&(p=yu(Y,f,1,i))):(A=void 0,k="",r=S,V&&(p=Y)),k+="/Colors ".concat(R," /BitsPerComponent ").concat(m," /Columns ").concat(f),(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:t,data:r,index:e,filter:A,decodeParameters:k,transparency:ut,palette:D,sMask:p,predictor:yt,width:f,height:l,bitsPerComponent:m,colorSpace:E}}},function(r){r.processGIF89A=function(e,t,i,o){var s=new p1(e),f=s.width,l=s.height,c=[];s.decodeAndBlitFrameRGBA(0,c);var d={data:c,width:f,height:l},m=new wo(100).encode(d,100);return r.processJPEG.call(this,m,t,i,o)},r.processGIF87A=r.processGIF89A}(Mt.API),Xr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var e=0;e<r;e++){var t=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:o,green:i,blue:t,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Xr.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[r]()}catch(t){Le.log("bit decode error:"+t)}},Xr.prototype.bit1=function(){var r,e=Math.ceil(this.width/8),t=e%4;for(r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o<e;o++)for(var s=this.datav.getUint8(this.pos++,!0),f=i*this.width*4+8*o*4,l=0;l<8&&8*o+l<this.width;l++){var c=this.palette[s>>7-l&1];this.data[f+4*l]=c.blue,this.data[f+4*l+1]=c.green,this.data[f+4*l+2]=c.red,this.data[f+4*l+3]=255}t!==0&&(this.pos+=4-t)}},Xr.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o<r;o++){var s=this.datav.getUint8(this.pos++,!0),f=i*this.width*4+2*o*4,l=s>>4,c=15&s,d=this.palette[l];if(this.data[f]=d.blue,this.data[f+1]=d.green,this.data[f+2]=d.red,this.data[f+3]=255,2*o+1>=this.width)break;d=this.palette[c],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}e!==0&&(this.pos+=4-e)}},Xr.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,i=0;i<this.width;i++){var o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*i;if(o<this.palette.length){var f=this.palette[o];this.data[s]=f.red,this.data[s+1]=f.green,this.data[s+2]=f.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}r!==0&&(this.pos+=4-r)}},Xr.prototype.bit15=function(){for(var r=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,o=0;o<this.width;o++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var f=(s&e)/e*255|0,l=(s>>5&e)/e*255|0,c=(s>>10&e)/e*255|0,d=s>>15?255:0,m=i*this.width*4+4*o;this.data[m]=c,this.data[m+1]=l,this.data[m+2]=f,this.data[m+3]=d}this.pos+=r}},Xr.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var o=this.bottom_up?i:this.height-1-i,s=0;s<this.width;s++){var f=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(f&e)/e*255|0,c=(f>>5&t)/t*255|0,d=(f>>11)/e*255|0,m=o*this.width*4+4*s;this.data[m]=d,this.data[m+1]=c,this.data[m+2]=l,this.data[m+3]=255}this.pos+=r}},Xr.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),f=e*this.width*4+4*t;this.data[f]=s,this.data[f+1]=o,this.data[f+2]=i,this.data[f+3]=255}this.pos+=this.width%4}},Xr.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),l=e*this.width*4+4*t;this.data[l]=s,this.data[l+1]=o,this.data[l+2]=i,this.data[l+3]=f}},Xr.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,i,o){var s=new Xr(e,!1),f=s.width,l=s.height,c={data:s.getData(),width:f,height:l},d=new wo(100).encode(c,100);return r.processJPEG.call(this,d,t,i,o)}}(Mt.API),ku.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,i,o){var s=new ku(e),f=s.width,l=s.height,c={data:s.getData(),width:f,height:l},d=new wo(100).encode(c,100);return r.processJPEG.call(this,d,t,i,o)}}(Mt.API),Mt.API.processRGBA=function(r,e,t){for(var i=r.data,o=i.length,s=new Uint8Array(o/4*3),f=new Uint8Array(o/4),l=0,c=0,d=0;d<o;d+=4){var m=i[d],A=i[d+1],k=i[d+2],p=i[d+3];s[l++]=m,s[l++]=A,s[l++]=k,f[c++]=p}var B=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(f),data:B,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Mt.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ri=Mt.API,ss=Ri.getCharWidthsArray=function(r,e){var t,i,o=(e=e||{}).font||this.internal.getFont(),s=e.fontSize||this.internal.getFontSize(),f=e.charSpace||this.internal.getCharSpace(),l=e.widths?e.widths:o.metadata.Unicode.widths,c=l.fof?l.fof:1,d=e.kerning?e.kerning:o.metadata.Unicode.kerning,m=d.fof?d.fof:1,A=e.doKerning!==!1,k=0,p=r.length,B=0,E=l[0]||c,R=[];for(t=0;t<p;t++)i=r.charCodeAt(t),typeof o.metadata.widthOfString=="function"?R.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(i))+f*(1e3/s)||0)/1e3):(k=A&&Se(d[i])==="object"&&!isNaN(parseInt(d[i][B],10))?d[i][B]/m:0,R.push((l[i]||E)/c+k)),B=i;return R},bu=Ri.getStringUnitWidth=function(r,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),i=e.font||this.internal.getFont(),o=e.charSpace||this.internal.getCharSpace();return Ri.processArabic&&(r=Ri.processArabic(r)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(r,t,o)/t:ss.apply(this,arguments).reduce(function(s,f){return s+f},0)},vu=function(r,e,t,i){for(var o=[],s=0,f=r.length,l=0;s!==f&&l+e[s]<t;)l+=e[s],s++;o.push(r.slice(0,s));var c=s;for(l=0;s!==f;)l+e[s]>i&&(o.push(r.slice(c,s)),l=0,c=s),l+=e[s],s++;return c!==s&&o.push(r.slice(c,s)),o},wu=function(r,e,t){t||(t={});var i,o,s,f,l,c,d,m=[],A=[m],k=t.textIndent||0,p=0,B=0,E=r.split(" "),R=ss.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?E[0].length+2:t.lineIndent||0){var S=Array(c).join(" "),Y=[];E.map(function(D){(D=D.split(/\s*\n/)).length>1?Y=Y.concat(D.map(function(ut,yt){return(yt&&ut.length?`
`:"")+ut})):Y.push(D[0])}),E=Y,c=bu.apply(this,[S,t])}for(s=0,f=E.length;s<f;s++){var V=0;if(i=E[s],c&&i[0]==`
`&&(i=i.substr(1),V=1),k+p+(B=(o=ss.apply(this,[i,t])).reduce(function(D,ut){return D+ut},0))>e||V){if(B>e){for(l=vu.apply(this,[i,o,e-(k+p),e]),m.push(l.shift()),m=[l.pop()];l.length;)A.push([l.shift()]);B=o.slice(i.length-(m[0]?m[0].length:0)).reduce(function(D,ut){return D+ut},0)}else m=[i];A.push(m),k=B+c,p=R}else m.push(i),k+=p+B,p=R}return d=c?function(D,ut){return(ut?S:"")+D.join(" ")}:function(D){return D.join(" ")},A.map(d)},Ri.splitTextToSize=function(r,e,t){var i,o=(t=t||{}).fontSize||this.internal.getFontSize(),s=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var A=this.internal.getFont(m.fontName,m.fontStyle),k="Unicode";return A.metadata[k]?{widths:A.metadata[k].widths||{0:1},kerning:A.metadata[k].kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);i=Array.isArray(r)?r:String(r).split(/\r?\n/);var f=1*this.internal.scaleFactor*e/o;s.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/o:0,s.lineIndent=t.lineIndent;var l,c,d=[];for(l=0,c=i.length;l<c;l++)d=d.concat(wu.apply(this,[i[l],f,s]));return d},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="0123456789abcdef",t="klmnopqrstuvwxyz",i={},o={},s=0;s<16;s++)i[t[s]]=e[s],o[e[s]]=t[s];var f=function(k){return"0x"+parseInt(k,10).toString(16)},l=r.__fontmetrics__.compress=function(k){var p,B,E,R,S=["{"];for(var Y in k){if(p=k[Y],isNaN(parseInt(Y,10))?B="'"+Y+"'":(Y=parseInt(Y,10),B=(B=f(Y).slice(2)).slice(0,-1)+o[B.slice(-1)]),typeof p=="number")p<0?(E=f(p).slice(3),R="-"):(E=f(p).slice(2),R=""),E=R+E.slice(0,-1)+o[E.slice(-1)];else{if(Se(p)!=="object")throw new Error("Don't know what to do with value type "+Se(p)+".");E=l(p)}S.push(B+E)}return S.push("}"),S.join("")},c=r.__fontmetrics__.uncompress=function(k){if(typeof k!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,B,E,R,S={},Y=1,V=S,D=[],ut="",yt="",ft=k.length-1,tt=1;tt<ft;tt+=1)(R=k[tt])=="'"?p?(E=p.join(""),p=void 0):p=[]:p?p.push(R):R=="{"?(D.push([V,E]),V={},E=void 0):R=="}"?((B=D.pop())[0][B[1]]=V,E=void 0,V=B[0]):R=="-"?Y=-1:E===void 0?i.hasOwnProperty(R)?(ut+=i[R],E=parseInt(ut,16)*Y,Y=1,ut=""):ut+=R:i.hasOwnProperty(R)?(yt+=i[R],V[E]=parseInt(yt,16)*Y,Y=1,E=void 0,yt=""):yt+=R;return S},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},m={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},A={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":c("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(k){var p=k.font,B=A.Unicode[p.postScriptName];B&&(p.metadata.Unicode={},p.metadata.Unicode.widths=B.widths,p.metadata.Unicode.kerning=B.kerning);var E=m.Unicode[p.postScriptName];E&&(p.metadata.Unicode.encoding=E,p.encoding=E.codePages[0])}])}(Mt.API),function(r){var e=function(t){for(var i=t.length,o=new Uint8Array(i),s=0;s<i;s++)o[s]=t.charCodeAt(s);return o};r.API.events.push(["addFont",function(t){var i=void 0,o=t.font,s=t.instance;if(!o.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(i=s.existsFileInVFS(o.postScriptName)===!1?s.loadFile(o.postScriptName):s.getFileFromVFS(o.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");(function(f,l){l=/^\x00\x01\x00\x00/.test(l)?e(l):e(ls(l)),f.metadata=r.API.TTFFont.open(l),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(o,i)}}])}(Mt),Mt.API.addSvgAsImage=function(r,e,t,i,o,s,f,l){if(isNaN(e)||isNaN(t))throw Le.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw Le.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=i,c.height=o;var d=c.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,c.width,c.height);var m={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return(Yt.canvg?Promise.resolve(Yt.canvg):Zs(()=>import("./index.es-Bh7lSQjr.js"),__vite__mapDeps([0,1,2]),import.meta.url)).catch(function(k){return Promise.reject(new Error("Could not load canvg: "+k))}).then(function(k){return k.default?k.default:k}).then(function(k){return k.fromString(d,r,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(k){return k.render(m)}).then(function(){A.addImage(c.toDataURL("image/jpeg",1),e,t,i,o,f,l)})},Mt.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o<this.internal.pages[i].length;o++)this.internal.pages[i][o]=this.internal.pages[i][o].replace(e,t);return this},Mt.API.viewerPreferences=function(r,e){var t;r=r||{},e=e||!1;var i,o,s,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(f),c=[],d=0,m=0,A=0;function k(B,E){var R,S=!1;for(R=0;R<B.length;R+=1)B[R]===E&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,r==="reset"||e===!0){var p=l.length;for(A=0;A<p;A+=1)t[l[A]].value=t[l[A]].defaultValue,t[l[A]].explicitSet=!1}if(Se(r)==="object"){for(o in r)if(s=r[o],k(l,o)&&s!==void 0){if(t[o].type==="boolean"&&typeof s=="boolean")t[o].value=s;else if(t[o].type==="name"&&k(t[o].valueSet,s))t[o].value=s;else if(t[o].type==="integer"&&Number.isInteger(s))t[o].value=s;else if(t[o].type==="array"){for(d=0;d<s.length;d+=1)if(i=!0,s[d].length===1&&typeof s[d][0]=="number")c.push(String(s[d]-1));else if(s[d].length>1){for(m=0;m<s[d].length;m+=1)typeof s[d][m]!="number"&&(i=!1);i===!0&&c.push([s[d][0]-1,s[d][1]-1].join(" "))}t[o].value="["+c.join(" ")+"]"}else t[o].value=t[o].defaultValue;t[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var B,E=[];for(B in t)t[B].explicitSet===!0&&(t[B].type==="name"?E.push("/"+B+" /"+t[B].value):E.push("/"+B+" "+t[B].value));E.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+E.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},function(r){var e=function(){var i='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',o=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),s=unescape(encodeURIComponent(i)),f=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),l=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),c=unescape(encodeURIComponent("</x:xmpmeta>")),d=s.length+f.length+l.length+o.length+c.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+d+" >>"),this.internal.write("stream"),this.internal.write(o+s+f+l+c),this.internal.write("endstream"),this.internal.write("endobj")},t=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(i,o){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:i,namespaceuri:o||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",t),this.internal.events.subscribe("postPutResources",e)),this}}(Mt.API),function(r){var e=r.API,t=e.pdfEscape16=function(s,f){for(var l,c=f.metadata.Unicode.widths,d=["","0","00","000","0000"],m=[""],A=0,k=s.length;A<k;++A){if(l=f.metadata.characterToGlyph(s.charCodeAt(A)),f.metadata.glyIdsUsed.push(l),f.metadata.toUnicode[l]=s.charCodeAt(A),c.indexOf(l)==-1&&(c.push(l),c.push([parseInt(f.metadata.widthOfGlyph(l),10)])),l=="0")return m.join("");l=l.toString(16),m.push(d[4-l.length],l)}return m.join("")},i=function(s){var f,l,c,d,m,A,k;for(m=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,c=[],A=0,k=(l=Object.keys(s).sort(function(p,B){return p-B})).length;A<k;A++)f=l[A],c.length>=100&&(m+=`
`+c.length+` beginbfchar
`+c.join(`
`)+`
endbfchar`,c=[]),s[f]!==void 0&&s[f]!==null&&typeof s[f].toString=="function"&&(d=("0000"+s[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),c.push("<"+f+"><"+d+">"));return c.length&&(m+=`
`+c.length+` beginbfchar
`+c.join(`
`)+`
endbfchar
`),m+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};e.events.push(["putFont",function(s){(function(f){var l=f.font,c=f.out,d=f.newObject,m=f.putStream;if(l.metadata instanceof r.API.TTFFont&&l.encoding==="Identity-H"){for(var A=l.metadata.Unicode.widths,k=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),p="",B=0;B<k.length;B++)p+=String.fromCharCode(k[B]);var E=d();m({data:p,addLength1:!0,objectId:E}),c("endobj");var R=d();m({data:i(l.metadata.toUnicode),addLength1:!0,objectId:R}),c("endobj");var S=d();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+Ti(l.fontName)),c("/FontFile2 "+E+" 0 R"),c("/FontBBox "+r.API.PDFObject.convert(l.metadata.bbox)),c("/Flags "+l.metadata.flags),c("/StemV "+l.metadata.stemV),c("/ItalicAngle "+l.metadata.italicAngle),c("/Ascent "+l.metadata.ascender),c("/Descent "+l.metadata.decender),c("/CapHeight "+l.metadata.capHeight),c(">>"),c("endobj");var Y=d();c("<<"),c("/Type /Font"),c("/BaseFont /"+Ti(l.fontName)),c("/FontDescriptor "+S+" 0 R"),c("/W "+r.API.PDFObject.convert(A)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+l.encoding+")"),c(">>"),c(">>"),c("endobj"),l.objectNumber=d(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+R+" 0 R"),c("/BaseFont /"+Ti(l.fontName)),c("/Encoding /"+l.encoding),c("/DescendantFonts ["+Y+" 0 R]"),c(">>"),c("endobj"),l.isAlreadyPutted=!0}})(s)}]),e.events.push(["putFont",function(s){(function(f){var l=f.font,c=f.out,d=f.newObject,m=f.putStream;if(l.metadata instanceof r.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var A=l.metadata.rawData,k="",p=0;p<A.length;p++)k+=String.fromCharCode(A[p]);var B=d();m({data:k,addLength1:!0,objectId:B}),c("endobj");var E=d();m({data:i(l.metadata.toUnicode),addLength1:!0,objectId:E}),c("endobj");var R=d();c("<<"),c("/Descent "+l.metadata.decender),c("/CapHeight "+l.metadata.capHeight),c("/StemV "+l.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+B+" 0 R"),c("/Flags 96"),c("/FontBBox "+r.API.PDFObject.convert(l.metadata.bbox)),c("/FontName /"+Ti(l.fontName)),c("/ItalicAngle "+l.metadata.italicAngle),c("/Ascent "+l.metadata.ascender),c(">>"),c("endobj"),l.objectNumber=d();for(var S=0;S<l.metadata.hmtx.widths.length;S++)l.metadata.hmtx.widths[S]=parseInt(l.metadata.hmtx.widths[S]*(1e3/l.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+E+" 0 R/BaseFont/"+Ti(l.fontName)+"/FontDescriptor "+R+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),c("endobj"),l.isAlreadyPutted=!0}})(s)}]);var o=function(s){var f,l=s.text||"",c=s.x,d=s.y,m=s.options||{},A=s.mutex||{},k=A.pdfEscape,p=A.activeFontKey,B=A.fonts,E=p,R="",S=0,Y="",V=B[E].encoding;if(B[E].encoding!=="Identity-H")return{text:l,x:c,y:d,options:m,mutex:A};for(Y=l,E=p,Array.isArray(l)&&(Y=l[0]),S=0;S<Y.length;S+=1)B[E].metadata.hasOwnProperty("cmap")&&(f=B[E].metadata.cmap.unicode.codeMap[Y[S].charCodeAt(0)]),f||Y[S].charCodeAt(0)<256&&B[E].metadata.hasOwnProperty("Unicode")?R+=Y[S]:R+="";var D="";return parseInt(E.slice(1))<14||V==="WinAnsiEncoding"?D=k(R,E).split("").map(function(ut){return ut.charCodeAt(0).toString(16)}).join(""):V==="Identity-H"&&(D=t(R,B[E])),A.isHex=!0,{text:D,x:c,y:d,options:m,mutex:A}};e.events.push(["postProcessText",function(s){var f=s.text||"",l=[],c={text:f,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(f)){var d=0;for(d=0;d<f.length;d+=1)Array.isArray(f[d])&&f[d].length===3?l.push([o(Object.assign({},c,{text:f[d][0]})).text,f[d][1],f[d][2]]):l.push(o(Object.assign({},c,{text:f[d]})).text);s.text=l}else s.text=o(Object.assign({},c,{text:f})).text}])}(Mt),function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},r.addFileToVFS=function(t,i){return e.call(this),this.internal.vFS[t]=i,this},r.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(Mt.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(i){var o,s,f,l,c,d,m,A=e,k=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],B={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},E={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},R=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=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,V=0;this.__bidiEngine__={};var D=function(N){var F=N.charCodeAt(),H=F>>8,U=E[H];return U!==void 0?A[256*U+(255&F)]:H===252||H===253?"AL":S.test(H)?"L":H===8?"R":"N"},ut=function(N){for(var F,H=0;H<N.length;H++){if((F=D(N.charAt(H)))==="L")return!1;if(F==="R")return!0}return!1},yt=function(N,F,H,U){var it,dt,vt,rt,pt=F[U];switch(pt){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&&(pt="AN");break;case"AL":Y=!0,pt="R";break;case"WS":case"BN":pt="N";break;case"CS":U<1||U+1>=F.length||(it=H[U-1])!=="EN"&&it!=="AN"||(dt=F[U+1])!=="EN"&&dt!=="AN"?pt="N":Y&&(dt="AN"),pt=dt===it?dt:"N";break;case"ES":pt=(it=U>0?H[U-1]:"B")==="EN"&&U+1<F.length&&F[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&H[U-1]==="EN"){pt="EN";break}if(Y){pt="N";break}for(vt=U+1,rt=F.length;vt<rt&&F[vt]==="ET";)vt++;pt=vt<rt&&F[vt]==="EN"?"EN":"N";break;case"NSM":if(f&&!l){for(rt=F.length,vt=U+1;vt<rt&&F[vt]==="NSM";)vt++;if(vt<rt){var Nt=N[U],_t=Nt>=1425&&Nt<=2303||Nt===64286;if(it=F[vt],_t&&(it==="R"||it==="AL")){pt="R";break}}}pt=U<1||(it=F[U-1])==="B"?"N":H[U-1];break;case"B":Y=!1,o=!0,pt=V;break;case"S":s=!0,pt="N"}return pt},ft=function(N,F,H){var U=N.split("");return H&&tt(U,H,{hiLevel:V}),U.reverse(),F&&F.reverse(),U.join("")},tt=function(N,F,H){var U,it,dt,vt,rt,pt=-1,Nt=N.length,_t=0,x=[],j=V?p:k,M=[];for(Y=!1,o=!1,s=!1,it=0;it<Nt;it++)M[it]=D(N[it]);for(dt=0;dt<Nt;dt++){if(rt=_t,x[dt]=yt(N,M,x,dt),U=240&(_t=j[rt][B[x[dt]]]),_t&=15,F[dt]=vt=j[_t][5],U>0)if(U===16){for(it=pt;it<dt;it++)F[it]=1;pt=-1}else pt=-1;if(j[_t][6])pt===-1&&(pt=dt);else if(pt>-1){for(it=pt;it<dt;it++)F[it]=vt;pt=-1}M[dt]==="B"&&(F[dt]=0),H.hiLevel|=vt}s&&function(G,$,Q){for(var lt=0;lt<Q;lt++)if(G[lt]==="S"){$[lt]=V;for(var nt=lt-1;nt>=0&&G[nt]==="WS";nt--)$[nt]=V}}(M,F,Nt)},z=function(N,F,H,U,it){if(!(it.hiLevel<N)){if(N===1&&V===1&&!o)return F.reverse(),void(H&&H.reverse());for(var dt,vt,rt,pt,Nt=F.length,_t=0;_t<Nt;){if(U[_t]>=N){for(rt=_t+1;rt<Nt&&U[rt]>=N;)rt++;for(pt=_t,vt=rt-1;pt<vt;pt++,vt--)dt=F[pt],F[pt]=F[vt],F[vt]=dt,H&&(dt=H[pt],H[pt]=H[vt],H[vt]=dt);_t=rt}_t++}}},et=function(N,F,H){var U=N.split(""),it={hiLevel:V};return H||(H=[]),tt(U,H,it),function(dt,vt,rt){if(rt.hiLevel!==0&&m)for(var pt,Nt=0;Nt<dt.length;Nt++)vt[Nt]===1&&(pt=R.indexOf(dt[Nt]))>=0&&(dt[Nt]=R[pt+1])}(U,H,it),z(2,U,F,H,it),z(1,U,F,H,it),U.join("")};return this.__bidiEngine__.doBidiReorder=function(N,F,H){if(function(it,dt){if(dt)for(var vt=0;vt<it.length;vt++)dt[vt]=vt;l===void 0&&(l=ut(it)),d===void 0&&(d=ut(it))}(N,F),f||!c||d)if(f&&c&&l^d)V=l?1:0,N=ft(N,F,H);else if(!f&&c&&d)V=l?1:0,N=et(N,F,H),N=ft(N,F);else if(!f||l||c||d){if(f&&!c&&l^d)N=ft(N,F),l?(V=0,N=et(N,F,H)):(V=1,N=et(N,F,H),N=ft(N,F));else if(f&&l&&!c&&d)V=1,N=et(N,F,H),N=ft(N,F);else if(!f&&!c&&l^d){var U=m;l?(V=1,N=et(N,F,H),V=0,m=!1,N=et(N,F,H),m=U):(V=0,N=et(N,F,H),N=ft(N,F),V=1,m=!1,N=et(N,F,H),m=U,N=ft(N,F))}}else V=0,N=et(N,F,H);else V=l?1:0,N=et(N,F,H);return N},this.__bidiEngine__.setOptions=function(N){N&&(f=N.isInputVisual,c=N.isOutputVisual,l=N.isInputRtl,d=N.isOutputRtl,m=N.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(i){var o=i.text;i.x,i.y;var s=i.options||{};i.mutex,s.lang;var f=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,t.setOptions(s),Object.prototype.toString.call(o)==="[object Array]"){var l=0;for(f=[],l=0;l<o.length;l+=1)Object.prototype.toString.call(o[l])==="[object Array]"?f.push([t.doBidiReorder(o[l][0]),o[l][1],o[l][2]]):f.push([t.doBidiReorder(o[l])]);i.text=f}else i.text=t.doBidiReorder(o);t.setOptions({isInputVisual:!0})}])}(Mt),Mt.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new Yn(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new I1(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new g1(this.contents),this.head=new b1(this),this.name=new _1(this),this.cmap=new ch(this),this.toUnicode={},this.hhea=new v1(this),this.maxp=new A1(this),this.hmtx=new N1(this),this.post=new y1(this),this.os2=new w1(this),this.loca=new P1(this),this.glyf=new L1(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var e,t,i,o,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var f,l,c,d;for(d=[],f=0,l=(c=this.bbox).length;f<l;f++)e=c[f],d.push(Math.round(e*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(i=255&(o=this.post.italic_angle),32768&(t=o>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+i)):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=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===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")},r.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},r.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},r.prototype.widthOfString=function(e,t,i){var o,s,f,l;for(f=0,s=0,l=(e=""+e).length;0<=l?s<l:s>l;s=0<=l?++s:--s)o=e.charCodeAt(s),f+=this.widthOfGlyph(this.characterToGlyph(o))+i*(1e3/t)||0;return f*(t/1e3)},r.prototype.lineHeight=function(e,t){var i;return t==null&&(t=!1),i=t?this.lineGap:0,(this.ascender+i-this.decender)/1e3*e},r}();var Qr,Yn=function(){function r(e){this.data=e??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(e){return this.data[this.pos++]=e},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},r.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},r.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},r.prototype.readString=function(e){var t,i;for(i=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)i[t]=String.fromCharCode(this.readByte());return i.join("")},r.prototype.writeString=function(e){var t,i,o;for(o=[],t=0,i=e.length;0<=i?t<i:t>i;t=0<=i?++t:--t)o.push(this.writeByte(e.charCodeAt(t)));return o},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(e){return this.writeInt16(e)},r.prototype.readLongLong=function(){var e,t,i,o,s,f,l,c;return e=this.readByte(),t=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),f=this.readByte(),l=this.readByte(),c=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^i)+4294967296*(255^o)+16777216*(255^s)+65536*(255^f)+256*(255^l)+(255^c)+1):72057594037927940*e+281474976710656*t+1099511627776*i+4294967296*o+16777216*s+65536*f+256*l+c},r.prototype.writeLongLong=function(e){var t,i;return t=Math.floor(e/4294967296),i=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(e){return this.writeInt32(e)},r.prototype.read=function(e){var t,i;for(t=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)t.push(this.readByte());return t},r.prototype.write=function(e){var t,i,o,s;for(s=[],i=0,o=e.length;i<o;i++)t=e[i],s.push(this.writeByte(t));return s},r}(),g1=function(){var r;function e(t){var i,o,s;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},o=0,s=this.tableCount;0<=s?o<s:o>s;o=0<=s?++o:--o)i={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[i.tag]=i}return e.prototype.encode=function(t){var i,o,s,f,l,c,d,m,A,k,p,B,E;for(E in p=Object.keys(t).length,c=Math.log(2),A=16*Math.floor(Math.log(p)/c),f=Math.floor(A/c),m=16*p-A,(o=new Yn).writeInt(this.scalarType),o.writeShort(p),o.writeShort(A),o.writeShort(f),o.writeShort(m),s=16*p,d=o.pos+s,l=null,B=[],t)for(k=t[E],o.writeString(E),o.writeInt(r(k)),o.writeInt(d),o.writeInt(k.length),B=B.concat(k),E==="head"&&(l=d),d+=k.length;d%4;)B.push(0),d++;return o.write(B),i=2981146554-r(o.data),o.pos=l+8,o.writeUInt32(i),o.data},r=function(t){var i,o,s,f;for(t=fh.call(t);t.length%4;)t.push(0);for(s=new Yn(t),o=0,i=0,f=t.length;i<f;i=i+=4)o+=s.readUInt32();return 4294967295&o},e}(),m1={}.hasOwnProperty,pn=function(r,e){for(var t in e)m1.call(e,t)&&(r[t]=e[t]);function i(){this.constructor=r}return i.prototype=e.prototype,r.prototype=new i,r.__super__=e.prototype,r};Qr=function(){function r(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r}();var b1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="head",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},r.prototype.encode=function(e){var t;return(t=new Yn).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},r}(),Pu=function(){function r(e,t){var i,o,s,f,l,c,d,m,A,k,p,B,E,R,S,Y,V;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),A=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(c=0;c<256;++c)this.codeMap[c]=e.readByte();break;case 4:for(p=e.readUInt16(),k=p/2,e.pos+=6,s=function(){var D,ut;for(ut=[],c=D=0;0<=k?D<k:D>k;c=0<=k?++D:--D)ut.push(e.readUInt16());return ut}(),e.pos+=2,E=function(){var D,ut;for(ut=[],c=D=0;0<=k?D<k:D>k;c=0<=k?++D:--D)ut.push(e.readUInt16());return ut}(),d=function(){var D,ut;for(ut=[],c=D=0;0<=k?D<k:D>k;c=0<=k?++D:--D)ut.push(e.readUInt16());return ut}(),m=function(){var D,ut;for(ut=[],c=D=0;0<=k?D<k:D>k;c=0<=k?++D:--D)ut.push(e.readUInt16());return ut}(),o=(this.length-e.pos+this.offset)/2,l=function(){var D,ut;for(ut=[],c=D=0;0<=o?D<o:D>o;c=0<=o?++D:--D)ut.push(e.readUInt16());return ut}(),c=S=0,V=s.length;S<V;c=++S)for(R=s[c],i=Y=B=E[c];B<=R?Y<=R:Y>=R;i=B<=R?++Y:--Y)m[c]===0?f=i+d[c]:(f=l[m[c]/2+(i-B)-(k-c)]||0)!==0&&(f+=d[c]),this.codeMap[i]=65535&f}e.pos=A}return r.encode=function(e,t){var i,o,s,f,l,c,d,m,A,k,p,B,E,R,S,Y,V,D,ut,yt,ft,tt,z,et,N,F,H,U,it,dt,vt,rt,pt,Nt,_t,x,j,M,G,$,Q,lt,nt,gt,At,kt;switch(U=new Yn,f=Object.keys(e).sort(function(Pt,st){return Pt-st}),t){case"macroman":for(E=0,R=function(){var Pt=[];for(B=0;B<256;++B)Pt.push(0);return Pt}(),Y={0:0},s={},it=0,pt=f.length;it<pt;it++)Y[nt=e[o=f[it]]]==null&&(Y[nt]=++E),s[o]={old:e[o],new:Y[e[o]]},R[o]=Y[e[o]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(R),{charMap:s,subtable:U.data,maxGlyphID:E+1};case"unicode":for(F=[],A=[],V=0,Y={},i={},S=d=null,dt=0,Nt=f.length;dt<Nt;dt++)Y[ut=e[o=f[dt]]]==null&&(Y[ut]=++V),i[o]={old:ut,new:Y[ut]},l=Y[ut]-o,S!=null&&l===d||(S&&A.push(S),F.push(o),d=l),S=o;for(S&&A.push(S),A.push(65535),F.push(65535),et=2*(z=F.length),tt=2*Math.pow(Math.log(z)/Math.LN2,2),k=Math.log(tt/2)/Math.LN2,ft=2*z-tt,c=[],yt=[],p=[],B=vt=0,_t=F.length;vt<_t;B=++vt){if(N=F[B],m=A[B],N===65535){c.push(0),yt.push(0);break}if(N-(H=i[N].new)>=32768)for(c.push(0),yt.push(2*(p.length+z-B)),o=rt=N;N<=m?rt<=m:rt>=m;o=N<=m?++rt:--rt)p.push(i[o].new);else c.push(H-N),yt.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*z+2*p.length),U.writeUInt16(0),U.writeUInt16(et),U.writeUInt16(tt),U.writeUInt16(k),U.writeUInt16(ft),Q=0,x=A.length;Q<x;Q++)o=A[Q],U.writeUInt16(o);for(U.writeUInt16(0),lt=0,j=F.length;lt<j;lt++)o=F[lt],U.writeUInt16(o);for(gt=0,M=c.length;gt<M;gt++)l=c[gt],U.writeUInt16(l);for(At=0,G=yt.length;At<G;At++)D=yt[At],U.writeUInt16(D);for(kt=0,$=p.length;kt<$;kt++)E=p[kt],U.writeUInt16(E);return{charMap:i,subtable:U.data,maxGlyphID:V+1}}},r}(),ch=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="cmap",r.prototype.parse=function(e){var t,i,o;for(e.pos=this.offset,this.version=e.readUInt16(),o=e.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=o?i<o:i>o;i=0<=o?++i:--i)t=new Pu(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},r.encode=function(e,t){var i,o;return t==null&&(t="macroman"),i=Pu.encode(e,t),(o=new Yn).writeUInt16(0),o.writeUInt16(1),i.table=o.data.concat(i.subtable),i},r}(),v1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="hhea",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},r}(),w1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="OS/2",r.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,i;for(i=[],t=0;t<10;++t)i.push(e.readByte());return i}(),this.charRange=function(){var t,i;for(i=[],t=0;t<4;++t)i.push(e.readInt());return i}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,i;for(i=[],t=0;t<2;t=++t)i.push(e.readInt());return i}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},r}(),y1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="post",r.prototype.parse=function(e){var t,i,o;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(i=e.readUInt16(),this.glyphNameIndex=[],s=0;0<=i?s<i:s>i;s=0<=i?++s:--s)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],o=[];e.pos<this.offset+this.length;)t=e.readByte(),o.push(this.names.push(e.readString(t)));return o;case 151552:return i=e.readUInt16(),this.offsets=e.read(i);case 262144:return this.map=(function(){var f,l,c;for(c=[],s=f=0,l=this.file.maxp.numGlyphs;0<=l?f<l:f>l;s=0<=l?++f:--f)c.push(e.readUInt32());return c}).call(this)}},r}(),x1=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},_1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="name",r.prototype.parse=function(e){var t,i,o,s,f,l,c,d,m,A,k;for(e.pos=this.offset,e.readShort(),t=e.readShort(),l=e.readShort(),i=[],s=0;0<=t?s<t:s>t;s=0<=t?++s:--s)i.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+l+e.readShort()});for(c={},s=m=0,A=i.length;m<A;s=++m)o=i[s],e.pos=o.offset,d=e.readString(o.length),f=new x1(d,o),c[k=o.nameID]==null&&(c[k]=[]),c[o.nameID].push(f);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfamily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},r}(),A1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="maxp",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},r}(),N1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="hmtx",r.prototype.parse=function(e){var t,i,o,s,f,l,c;for(e.pos=this.offset,this.metrics=[],t=0,l=this.file.hhea.numberOfMetrics;0<=l?t<l:t>l;t=0<=l?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var d,m;for(m=[],t=d=0;0<=o?d<o:d>o;t=0<=o?++d:--d)m.push(e.readInt16());return m}(),this.widths=(function(){var d,m,A,k;for(k=[],d=0,m=(A=this.metrics).length;d<m;d++)s=A[d],k.push(s.advance);return k}).call(this),i=this.widths[this.widths.length-1],c=[],t=f=0;0<=o?f<o:f>o;t=0<=o?++f:--f)c.push(this.widths.push(i));return c},r.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},r}(),fh=[].slice,L1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(e){var t,i,o,s,f,l,c,d,m,A;return e in this.cache?this.cache[e]:(s=this.file.loca,t=this.file.contents,i=s.indexOf(e),(o=s.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+i,f=(l=new Yn(t.read(o))).readShort(),d=l.readShort(),A=l.readShort(),c=l.readShort(),m=l.readShort(),this.cache[e]=f===-1?new k1(l,d,A,c,m):new S1(l,f,d,A,c,m),this.cache[e]))},r.prototype.encode=function(e,t,i){var o,s,f,l,c;for(f=[],s=[],l=0,c=t.length;l<c;l++)o=e[t[l]],s.push(f.length),o&&(f=f.concat(o.encode(i)));return s.push(f.length),{table:f,offsets:s}},r}(),S1=function(){function r(e,t,i,o,s,f){this.raw=e,this.numberOfContours=t,this.xMin=i,this.yMin=o,this.xMax=s,this.yMax=f,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r}(),k1=function(){function r(e,t,i,o,s){var f,l;for(this.raw=e,this.xMin=t,this.yMin=i,this.xMax=o,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],f=this.raw;l=f.readShort(),this.glyphOffsets.push(f.pos),this.glyphIDs.push(f.readUInt16()),32&l;)f.pos+=1&l?4:2,128&l?f.pos+=8:64&l?f.pos+=4:8&l&&(f.pos+=2)}return r.prototype.encode=function(){var e,t,i;for(t=new Yn(fh.call(this.raw.data)),e=0,i=this.glyphIDs.length;e<i;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),P1=function(){function r(){return r.__super__.constructor.apply(this,arguments)}return pn(r,Qr),r.prototype.tag="loca",r.prototype.parse=function(e){var t,i;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?(function(){var o,s;for(s=[],i=0,o=this.length;i<o;i+=2)s.push(2*e.readUInt16());return s}).call(this):(function(){var o,s;for(s=[],i=0,o=this.length;i<o;i+=4)s.push(e.readUInt32());return s}).call(this)},r.prototype.indexOf=function(e){return this.offsets[e]},r.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},r.prototype.encode=function(e,t){for(var i=new Uint32Array(this.offsets.length),o=0,s=0,f=0;f<i.length;++f)if(i[f]=o,s<t.length&&t[s]==f){++s,i[f]=o;var l=this.offsets[f],c=this.offsets[f+1]-l;c>0&&(o+=c)}for(var d=new Array(4*i.length),m=0;m<i.length;++m)d[4*m+3]=255&i[m],d[4*m+2]=(65280&i[m])>>8,d[4*m+1]=(16711680&i[m])>>16,d[4*m]=(4278190080&i[m])>>24;return d},r}(),I1=function(){function r(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var e,t,i,o,s;for(t in o=this.font.cmap.tables[0].codeMap,e={},s=this.subset)i=s[t],e[t]=o[i];return e},r.prototype.glyphsFor=function(e){var t,i,o,s,f,l,c;for(o={},f=0,l=e.length;f<l;f++)o[s=e[f]]=this.font.glyf.glyphFor(s);for(s in t=[],o)(i=o[s])!=null&&i.compound&&t.push.apply(t,i.glyphIDs);if(t.length>0)for(s in c=this.glyphsFor(t))i=c[s],o[s]=i;return o},r.prototype.encode=function(e,t){var i,o,s,f,l,c,d,m,A,k,p,B,E,R,S;for(o in i=ch.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(e),p={0:0},S=i.charMap)p[(c=S[o]).old]=c.new;for(B in k=i.maxGlyphID,f)B in p||(p[B]=k++);return m=function(Y){var V,D;for(V in D={},Y)D[Y[V]]=V;return D}(p),A=Object.keys(m).sort(function(Y,V){return Y-V}),E=function(){var Y,V,D;for(D=[],Y=0,V=A.length;Y<V;Y++)l=A[Y],D.push(m[l]);return D}(),s=this.font.glyf.encode(f,E,p),d=this.font.loca.encode(s.offsets,E),R={cmap:this.font.cmap.raw(),glyf:s.table,loca:d,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(R["OS/2"]=this.font.os2.raw()),this.font.directory.encode(R)},r}();Mt.API.PDFObject=function(){var r;function e(){}return r=function(t,i){return(Array(i+1).join("0")+t).slice(-i)},e.convert=function(t){var i,o,s,f;if(Array.isArray(t))return"["+function(){var l,c,d;for(d=[],l=0,c=t.length;l<c;l++)i=t[l],d.push(e.convert(i));return d}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+r(t.getUTCFullYear(),4)+r(t.getUTCMonth(),2)+r(t.getUTCDate(),2)+r(t.getUTCHours(),2)+r(t.getUTCMinutes(),2)+r(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(o in s=["<<"],t)f=t[o],s.push("/"+o+" "+e.convert(f));return s.push(">>"),s.join(`
`)}return""+t},e}();export{Ct as AcroFormAppearance,ar as AcroFormButton,cs as AcroFormCheckBox,qi as AcroFormChoiceField,zi as AcroFormComboBox,us as AcroFormEditBox,Ui as AcroFormListBox,fs as AcroFormPasswordField,hs as AcroFormPushButton,Hi as AcroFormRadioButton,di as AcroFormTextField,ps as GState,fi as ShadingPattern,Di as TilingPattern,Mt as default,Mt as jsPDF};