const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-UMgmYbRN.js","assets/index-DlZengFf.js","assets/index-BQ19ytI3.css"])))=>i.map(i=>d[i]); var Ah=Object.defineProperty;var Nh=(n,e,t)=>e in n?Ah(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var xe=(n,e,t)=>Nh(n,typeof e!="symbol"?e+"":e,t);import{_ as vo}from"./index-DlZengFf.js";function _e(n){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(n)}var tr=Uint8Array,Rn=Uint16Array,Xo=Int32Array,$o=new tr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Zo=new tr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ml=new tr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ju=function(n,e){for(var t=new Rn(31),i=0;i<31;++i)t[i]=e+=1<>1|(Oe&21845)<<1;Kr=(Kr&52428)>>2|(Kr&13107)<<2,Kr=(Kr&61680)>>4|(Kr&3855)<<4,qo[Oe]=((Kr&65280)>>8|(Kr&255)<<8)>>1}var Ca=function(n,e,t){for(var i=n.length,s=0,a=new Rn(e);s>h]=d}else for(l=new Rn(i),s=0;s>15-n[s]);return l},Si=new tr(288);for(var Oe=0;Oe<144;++Oe)Si[Oe]=8;for(var Oe=144;Oe<256;++Oe)Si[Oe]=9;for(var Oe=256;Oe<280;++Oe)Si[Oe]=7;for(var Oe=280;Oe<288;++Oe)Si[Oe]=8;var Cs=new tr(32);for(var Oe=0;Oe<32;++Oe)Cs[Oe]=5;var kh=Ca(Si,9,0),Ph=Ca(Cs,5,0),Xu=function(n){return(n+7)/8|0},Ih=function(n,e,t){return(t==null||t>n.length)&&(t=n.length),new tr(n.subarray(e,t))},Fr=function(n,e,t){t<<=e&7;var i=e/8|0;n[i]|=t,n[i+1]|=t>>8},Pa=function(n,e,t){t<<=e&7;var i=e/8|0;n[i]|=t,n[i+1]|=t>>8,n[i+2]|=t>>16},bo=function(n,e){for(var t=[],i=0;ik&&(k=a[i].s);var p=new Rn(k+1),j=Uo(t[m-1],p,0);if(j>e){var i=0,O=0,M=j-e,S=1<e)O+=S-(1<>=M;O>0;){var G=a[i].s;p[G]=0&&O;--i){var q=a[i].s;p[q]==e&&(--p[q],++O)}j=e}return{t:new tr(p),l:j}},Uo=function(n,e,t){return n.s==-1?Math.max(Uo(n.l,e,t+1),Uo(n.r,e,t+1)):e[n.s]=t},Tl=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new Rn(++e),i=0,s=n[0],a=1,c=function(h){t[i++]=h},l=1;l<=e;++l)if(n[l]==s&&l!=e)++a;else{if(!s&&a>2){for(;a>138;a-=138)c(32754);a>2&&(c(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(c(s),--a;a>6;a-=6)c(8304);a>2&&(c(a-3<<5|8208),a=0)}for(;a--;)c(s);a=1,s=n[l]}return{c:t.subarray(0,i),n:e}},Ia=function(n,e){for(var t=0,i=0;i>8,n[s+2]=n[s]^255,n[s+3]=n[s+1]^255;for(var a=0;a4&&!tt[Ml[E-1]];--E);var z=d+5<<3,U=Ia(s,Si)+Ia(a,Cs)+c,rt=Ia(s,k)+Ia(a,O)+c+14+3*E+Ia(dt,tt)+2*dt[16]+3*dt[17]+7*dt[18];if(h>=0&&z<=U&&z<=rt)return $u(e,m,n.subarray(h,h+d));var ot,ft,nt,ct;if(Fr(e,m,1+(rt15&&(Fr(e,m,B[X]>>5&127),m+=B[X]>>12)}}else ot=kh,ft=Si,nt=Ph,ct=Cs;for(var X=0;X255){var T=H>>18&31;Pa(e,m,ot[T+257]),m+=ft[T+257],T>7&&(Fr(e,m,H>>23&31),m+=$o[T]);var J=H&31;Pa(e,m,nt[J]),m+=ct[J],J>3&&(Pa(e,m,H>>5&8191),m+=Zo[J])}else Pa(e,m,ot[H]),m+=ft[H]}return Pa(e,m,ot[256]),m+ft[256]},Ch=new Xo([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Zu=new tr(0),Fh=function(n,e,t,i,s,a){var c=a.z||n.length,l=new tr(i+c+5*(1+Math.ceil(c/7e3))+s),h=l.subarray(i,l.length-s),d=a.l,m=(a.r||0)&7;if(e){m&&(h[0]=a.r>>3);for(var _=Ch[e-1],k=_>>13,p=_&8191,j=(1<7e3||tt>24576)&&(ot>423||!d)){m=Dl(n,h,0,q,it,vt,X,tt,E,R-E,m),tt=dt=X=0,E=R;for(var ft=0;ft<286;++ft)it[ft]=0;for(var ft=0;ft<30;++ft)vt[ft]=0}var nt=2,ct=0,At=p,wt=U-rt&32767;if(ot>2&&z==G(R-wt))for(var x=Math.min(k,ot)-1,B=Math.min(32767,R),T=Math.min(258,ot);wt<=B&&--At&&U!=rt;){if(n[R+nt]==n[R+nt-wt]){for(var H=0;Hnt){if(nt=H,ct=wt,H>x)break;for(var J=Math.min(wt,H-2),Z=0,ft=0;ftZ&&(Z=gt,rt=at)}}}U=rt,rt=O[U],wt+=U-rt&32767}if(ct){q[tt++]=268435456|Do[nt]<<18|Rl[ct];var _t=Do[nt]&31,kt=Rl[ct]&31;X+=$o[_t]+Zo[kt],++it[257+_t],++vt[kt],N=R+nt,++dt}else q[tt++]=n[R],++it[n[R]]}}for(R=Math.max(R,N);R=c&&(h[m/8|0]=d,St=c),m=$u(h,m+1,n.subarray(R,St))}a.i=c}return Ih(l,0,i+Xu(m)+s)},Qu=function(){var n=1,e=0;return{p:function(t){for(var i=n,s=e,a=t.length|0,c=0;c!=a;){for(var l=Math.min(c+2655,a);c>16),s=(s&65535)+15*(s>>16)}n=i,e=s},d:function(){return n%=65521,e%=65521,(n&255)<<24|(n&65280)<<8|(e&255)<<8|e>>8}}},Eh=function(n,e,t,i,s){if(!s&&(s={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),c=new tr(a.length+n.length);c.set(a),c.set(n,a.length),n=c,s.w=a.length}return Fh(n,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+e.mem,t,i,s)},tf=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},Oh=function(n,e){var t=e.level,i=t==0?0:t<6?1:t==9?3:2;if(n[0]=120,n[1]=i<<6|(e.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,e.dictionary){var s=Qu();s.p(e.dictionary),tf(n,2,s.d())}};function zo(n,e){e||(e={});var t=Qu();t.p(n);var i=Eh(n,e,e.dictionary?6:2,4);return Oh(i,e),tf(i,i.length-4,t.d()),i}var jh=typeof TextDecoder<"u"&&new TextDecoder,Bh=0;try{jh.decode(Zu,{stream:!0}),Bh=1}catch{}function Mh(n){if(Array.isArray(n))return n}function Rh(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i,s,a,c,l=[],h=!0,d=!1;try{if(a=(t=t.call(n)).next,e!==0)for(;!(h=(i=a.call(t)).done)&&(l.push(i.value),l.length!==e);h=!0);}catch(m){d=!0,s=m}finally{try{if(!h&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(d)throw s}}return l}}function ql(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t{const n=new Uint8Array(4),e=new Uint32Array(n.buffer);return!((e[0]=1)&n[0])})(),wo={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 Qo{constructor(e=zh,t={}){xe(this,"buffer");xe(this,"byteLength");xe(this,"byteOffset");xe(this,"length");xe(this,"offset");xe(this,"lastWrittenByte");xe(this,"littleEndian");xe(this,"_data");xe(this,"_mark");xe(this,"_marks");let i=!1;typeof e=="number"?e=new ArrayBuffer(e):(i=!0,this.lastWrittenByte=e.byteLength);const s=t.offset?t.offset>>>0:0,a=e.byteLength-s;let c=s;(ArrayBuffer.isView(e)||e instanceof Qo)&&(e.byteLength!==e.buffer.byteLength&&(c=e.byteOffset+s),e=e.buffer),i?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,a),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,s=new Uint8Array(i);s.set(new Uint8Array(this.buffer)),this.buffer=s.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=wo[t].BYTES_PER_ELEMENT*e,s=this.byteOffset+this.offset,a=this.buffer.slice(s,s+i);if(this.littleEndian===Hh&&t!=="uint8"&&t!=="int8"){const l=new Uint8Array(this.buffer.slice(s,s+i));l.reverse();const h=new wo[t](l.buffer);return this.offset+=i,h.reverse(),h}const c=new wo[t](a);return this.offset+=i,c}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;ithis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function ia(n){let e=n.length;for(;--e>=0;)n[e]=0}const Wh=3,Vh=258,ef=29,Gh=256,Yh=Gh+1+ef,nf=30,Jh=512,Kh=new Array((Yh+2)*2);ia(Kh);const Xh=new Array(nf*2);ia(Xh);const $h=new Array(Jh);ia($h);const Zh=new Array(Vh-Wh+1);ia(Zh);const Qh=new Array(ef);ia(Qh);const tc=new Array(nf);ia(tc);const ec=(n,e,t,i)=>{let s=n&65535|0,a=n>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do s=s+e[i++]|0,a=a+s|0;while(--c);s%=65521,a%=65521}return s|a<<16|0};var Ho=ec;const nc=()=>{let n,e=[];for(var t=0;t<256;t++){n=t;for(var i=0;i<8;i++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}return e},rc=new Uint32Array(nc()),ic=(n,e,t,i)=>{const s=rc,a=i+t;n^=-1;for(let c=i;c>>8^s[(n^e[c])&255];return n^-1};var dr=ic,Wo={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"},rf={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 ac=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var sc=function(n){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)ac(t,i)&&(n[i]=t[i])}}return n},oc=n=>{let e=0;for(let i=0,s=n.length;i=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;Ma[254]=Ma[254]=1;var lc=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let e,t,i,s,a,c=n.length,l=0;for(s=0;s>>6,e[a++]=128|t&63):t<65536?(e[a++]=224|t>>>12,e[a++]=128|t>>>6&63,e[a++]=128|t&63):(e[a++]=240|t>>>18,e[a++]=128|t>>>12&63,e[a++]=128|t>>>6&63,e[a++]=128|t&63);return e};const uc=(n,e)=>{if(e<65534&&n.subarray&&sf)return String.fromCharCode.apply(null,n.length===e?n:n.subarray(0,e));let t="";for(let i=0;i{const t=e||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,e));let i,s;const a=new Array(t*2);for(s=0,i=0;i4){a[s++]=65533,i+=l-1;continue}for(c&=l===2?31:l===3?15:7;l>1&&i1){a[s++]=65533;continue}c<65536?a[s++]=c:(c-=65536,a[s++]=55296|c>>10&1023,a[s++]=56320|c&1023)}return uc(a,s)},hc=(n,e)=>{e=e||n.length,e>n.length&&(e=n.length);let t=e-1;for(;t>=0&&(n[t]&192)===128;)t--;return t<0||t===0?e:t+Ma[n[t]]>e?t:e},Vo={string2buf:lc,buf2string:fc,utf8border:hc};function cc(){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 dc=cc;const ys=16209,pc=16191;var gc=function(e,t){let i,s,a,c,l,h,d,m,_,k,p,j,O,M,S,V,G,q,it,vt,dt,X,R,tt;const N=e.state;i=e.next_in,R=e.input,s=i+(e.avail_in-5),a=e.next_out,tt=e.output,c=a-(t-e.avail_out),l=a+(e.avail_out-257),h=N.dmax,d=N.wsize,m=N.whave,_=N.wnext,k=N.window,p=N.hold,j=N.bits,O=N.lencode,M=N.distcode,S=(1<>>24,p>>>=q,j-=q,q=G>>>16&255,q===0)tt[a++]=G&65535;else if(q&16){it=G&65535,q&=15,q&&(j>>=q,j-=q),j<15&&(p+=R[i++]<>>24,p>>>=q,j-=q,q=G>>>16&255,q&16){if(vt=G&65535,q&=15,jh){e.msg="invalid distance too far back",N.mode=ys;break t}if(p>>>=q,j-=q,q=a-c,vt>q){if(q=vt-q,q>m&&N.sane){e.msg="invalid distance too far back",N.mode=ys;break t}if(dt=0,X=k,_===0){if(dt+=d-q,q2;)tt[a++]=X[dt++],tt[a++]=X[dt++],tt[a++]=X[dt++],it-=3;it&&(tt[a++]=X[dt++],it>1&&(tt[a++]=X[dt++]))}else{dt=a-vt;do tt[a++]=tt[dt++],tt[a++]=tt[dt++],tt[a++]=tt[dt++],it-=3;while(it>2);it&&(tt[a++]=tt[dt++],it>1&&(tt[a++]=tt[dt++]))}}else if(q&64){e.msg="invalid distance code",N.mode=ys;break t}else{G=M[(G&65535)+(p&(1<>3,i-=it,j-=it<<3,p&=(1<{const h=l.bits;let d=0,m=0,_=0,k=0,p=0,j=0,O=0,M=0,S=0,V=0,G,q,it,vt,dt,X=null,R;const tt=new Uint16Array(Qi+1),N=new Uint16Array(Qi+1);let E=null,z,U,rt;for(d=0;d<=Qi;d++)tt[d]=0;for(m=0;m=1&&tt[k]===0;k--);if(p>k&&(p=k),k===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,l.bits=1,0;for(_=1;_0&&(n===Vl||k!==1))return-1;for(N[1]=0,d=1;dHl||n===Gl&&S>Wl)return 1;for(;;){z=d-O,c[m]+1=R?(U=E[c[m]-R],rt=X[c[m]-R]):(U=96,rt=0),G=1<>O)+q]=z<<24|U<<16|rt|0;while(q!==0);for(G=1<>=1;if(G!==0?(V&=G-1,V+=G):V=0,m++,--tt[d]===0){if(d===k)break;d=e[t+c[m]]}if(d>p&&(V&vt)!==it){for(O===0&&(O=p),dt+=_,j=d-O,M=1<Hl||n===Gl&&S>Wl)return 1;it=V&vt,s[it]=p<<24|j<<16|dt-a|0}}return V!==0&&(s[dt+V]=d-O<<24|64<<16|0),l.bits=p,0};var Fa=yc;const xc=0,of=1,lf=2,{Z_FINISH:Yl,Z_BLOCK:_c,Z_TREES:xs,Z_OK:ki,Z_STREAM_END:Ac,Z_NEED_DICT:Nc,Z_STREAM_ERROR:Vn,Z_DATA_ERROR:uf,Z_MEM_ERROR:ff,Z_BUF_ERROR:Lc,Z_DEFLATED:Jl}=rf,Os=16180,Kl=16181,Xl=16182,$l=16183,Zl=16184,Ql=16185,tu=16186,eu=16187,nu=16188,ru=16189,Fs=16190,Er=16191,xo=16192,iu=16193,_o=16194,au=16195,su=16196,ou=16197,lu=16198,_s=16199,As=16200,uu=16201,fu=16202,hu=16203,cu=16204,du=16205,Ao=16206,pu=16207,gu=16208,Me=16209,hf=16210,cf=16211,Sc=852,kc=592,Pc=15,Ic=Pc,mu=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function Cc(){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 Ii=n=>{if(!n)return 1;const e=n.state;return!e||e.strm!==n||e.modecf?1:0},df=n=>{if(Ii(n))return Vn;const e=n.state;return n.total_in=n.total_out=e.total=0,n.msg="",e.wrap&&(n.adler=e.wrap&1),e.mode=Os,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(Sc),e.distcode=e.distdyn=new Int32Array(kc),e.sane=1,e.back=-1,ki},pf=n=>{if(Ii(n))return Vn;const e=n.state;return e.wsize=0,e.whave=0,e.wnext=0,df(n)},gf=(n,e)=>{let t;if(Ii(n))return Vn;const i=n.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Vn:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,pf(n))},mf=(n,e)=>{if(!n)return Vn;const t=new Cc;n.state=t,t.strm=n,t.window=null,t.mode=Os;const i=gf(n,e);return i!==ki&&(n.state=null),i},Fc=n=>mf(n,Ic);let vu=!0,No,Lo;const Ec=n=>{if(vu){No=new Int32Array(512),Lo=new Int32Array(32);let e=0;for(;e<144;)n.lens[e++]=8;for(;e<256;)n.lens[e++]=9;for(;e<280;)n.lens[e++]=7;for(;e<288;)n.lens[e++]=8;for(Fa(of,n.lens,0,288,No,0,n.work,{bits:9}),e=0;e<32;)n.lens[e++]=5;Fa(lf,n.lens,0,32,Lo,0,n.work,{bits:5}),vu=!1}n.lencode=No,n.lenbits=9,n.distcode=Lo,n.distbits=5},vf=(n,e,t,i)=>{let s;const a=n.state;return a.window===null&&(a.wsize=1<=a.wsize?(a.window.set(e.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(s=a.wsize-a.wnext,s>i&&(s=i),a.window.set(e.subarray(t-i,t-i+s),a.wnext),i-=s,i?(a.window.set(e.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave{let t,i,s,a,c,l,h,d,m,_,k,p,j,O,M=0,S,V,G,q,it,vt,dt,X;const R=new Uint8Array(4);let tt,N;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ii(n)||!n.output||!n.input&&n.avail_in!==0)return Vn;t=n.state,t.mode===Er&&(t.mode=xo),c=n.next_out,s=n.output,h=n.avail_out,a=n.next_in,i=n.input,l=n.avail_in,d=t.hold,m=t.bits,_=l,k=h,X=ki;t:for(;;)switch(t.mode){case Os:if(t.wrap===0){t.mode=xo;break}for(;m<16;){if(l===0)break t;l--,d+=i[a++]<>>8&255,t.check=dr(t.check,R,2,0),d=0,m=0,t.mode=Kl;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){n.msg="incorrect header check",t.mode=Me;break}if((d&15)!==Jl){n.msg="unknown compression method",t.mode=Me;break}if(d>>>=4,m-=4,dt=(d&15)+8,t.wbits===0&&(t.wbits=dt),dt>15||dt>t.wbits){n.msg="invalid window size",t.mode=Me;break}t.dmax=1<>8&1),t.flags&512&&t.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,t.check=dr(t.check,R,2,0)),d=0,m=0,t.mode=Xl;case Xl:for(;m<32;){if(l===0)break t;l--,d+=i[a++]<>>8&255,R[2]=d>>>16&255,R[3]=d>>>24&255,t.check=dr(t.check,R,4,0)),d=0,m=0,t.mode=$l;case $l:for(;m<16;){if(l===0)break t;l--,d+=i[a++]<>8),t.flags&512&&t.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,t.check=dr(t.check,R,2,0)),d=0,m=0,t.mode=Zl;case Zl:if(t.flags&1024){for(;m<16;){if(l===0)break t;l--,d+=i[a++]<>>8&255,t.check=dr(t.check,R,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=Ql;case Ql:if(t.flags&1024&&(p=t.length,p>l&&(p=l),p&&(t.head&&(dt=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+p),dt)),t.flags&512&&t.wrap&4&&(t.check=dr(t.check,i,p,a)),l-=p,a+=p,t.length-=p),t.length))break t;t.length=0,t.mode=tu;case tu:if(t.flags&2048){if(l===0)break t;p=0;do dt=i[a+p++],t.head&&dt&&t.length<65536&&(t.head.name+=String.fromCharCode(dt));while(dt&&p>9&1,t.head.done=!0),n.adler=t.check=0,t.mode=Er;break;case ru:for(;m<32;){if(l===0)break t;l--,d+=i[a++]<>>=m&7,m-=m&7,t.mode=Ao;break}for(;m<3;){if(l===0)break t;l--,d+=i[a++]<>>=1,m-=1,d&3){case 0:t.mode=iu;break;case 1:if(Ec(t),t.mode=_s,e===xs){d>>>=2,m-=2;break t}break;case 2:t.mode=su;break;case 3:n.msg="invalid block type",t.mode=Me}d>>>=2,m-=2;break;case iu:for(d>>>=m&7,m-=m&7;m<32;){if(l===0)break t;l--,d+=i[a++]<>>16^65535)){n.msg="invalid stored block lengths",t.mode=Me;break}if(t.length=d&65535,d=0,m=0,t.mode=_o,e===xs)break t;case _o:t.mode=au;case au:if(p=t.length,p){if(p>l&&(p=l),p>h&&(p=h),p===0)break t;s.set(i.subarray(a,a+p),c),l-=p,a+=p,h-=p,c+=p,t.length-=p;break}t.mode=Er;break;case su:for(;m<14;){if(l===0)break t;l--,d+=i[a++]<>>=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){n.msg="too many length or distance symbols",t.mode=Me;break}t.have=0,t.mode=ou;case ou:for(;t.have>>=3,m-=3}for(;t.have<19;)t.lens[E[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,tt={bits:t.lenbits},X=Fa(xc,t.lens,0,19,t.lencode,0,t.work,tt),t.lenbits=tt.bits,X){n.msg="invalid code lengths set",t.mode=Me;break}t.have=0,t.mode=lu;case lu:for(;t.have>>24,V=M>>>16&255,G=M&65535,!(S<=m);){if(l===0)break t;l--,d+=i[a++]<>>=S,m-=S,t.lens[t.have++]=G;else{if(G===16){for(N=S+2;m>>=S,m-=S,t.have===0){n.msg="invalid bit length repeat",t.mode=Me;break}dt=t.lens[t.have-1],p=3+(d&3),d>>>=2,m-=2}else if(G===17){for(N=S+3;m>>=S,m-=S,dt=0,p=3+(d&7),d>>>=3,m-=3}else{for(N=S+7;m>>=S,m-=S,dt=0,p=11+(d&127),d>>>=7,m-=7}if(t.have+p>t.nlen+t.ndist){n.msg="invalid bit length repeat",t.mode=Me;break}for(;p--;)t.lens[t.have++]=dt}}if(t.mode===Me)break;if(t.lens[256]===0){n.msg="invalid code -- missing end-of-block",t.mode=Me;break}if(t.lenbits=9,tt={bits:t.lenbits},X=Fa(of,t.lens,0,t.nlen,t.lencode,0,t.work,tt),t.lenbits=tt.bits,X){n.msg="invalid literal/lengths set",t.mode=Me;break}if(t.distbits=6,t.distcode=t.distdyn,tt={bits:t.distbits},X=Fa(lf,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,tt),t.distbits=tt.bits,X){n.msg="invalid distances set",t.mode=Me;break}if(t.mode=_s,e===xs)break t;case _s:t.mode=As;case As:if(l>=6&&h>=258){n.next_out=c,n.avail_out=h,n.next_in=a,n.avail_in=l,t.hold=d,t.bits=m,gc(n,k),c=n.next_out,s=n.output,h=n.avail_out,a=n.next_in,i=n.input,l=n.avail_in,d=t.hold,m=t.bits,t.mode===Er&&(t.back=-1);break}for(t.back=0;M=t.lencode[d&(1<>>24,V=M>>>16&255,G=M&65535,!(S<=m);){if(l===0)break t;l--,d+=i[a++]<>q)],S=M>>>24,V=M>>>16&255,G=M&65535,!(q+S<=m);){if(l===0)break t;l--,d+=i[a++]<>>=q,m-=q,t.back+=q}if(d>>>=S,m-=S,t.back+=S,t.length=G,V===0){t.mode=du;break}if(V&32){t.back=-1,t.mode=Er;break}if(V&64){n.msg="invalid literal/length code",t.mode=Me;break}t.extra=V&15,t.mode=uu;case uu:if(t.extra){for(N=t.extra;m>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=fu;case fu:for(;M=t.distcode[d&(1<>>24,V=M>>>16&255,G=M&65535,!(S<=m);){if(l===0)break t;l--,d+=i[a++]<>q)],S=M>>>24,V=M>>>16&255,G=M&65535,!(q+S<=m);){if(l===0)break t;l--,d+=i[a++]<>>=q,m-=q,t.back+=q}if(d>>>=S,m-=S,t.back+=S,V&64){n.msg="invalid distance code",t.mode=Me;break}t.offset=G,t.extra=V&15,t.mode=hu;case hu:if(t.extra){for(N=t.extra;m>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){n.msg="invalid distance too far back",t.mode=Me;break}t.mode=cu;case cu:if(h===0)break t;if(p=k-h,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){n.msg="invalid distance too far back",t.mode=Me;break}p>t.wnext?(p-=t.wnext,j=t.wsize-p):j=t.wnext-p,p>t.length&&(p=t.length),O=t.window}else O=s,j=c-t.offset,p=t.length;p>h&&(p=h),h-=p,t.length-=p;do s[c++]=O[j++];while(--p);t.length===0&&(t.mode=As);break;case du:if(h===0)break t;s[c++]=t.length,h--,t.mode=As;break;case Ao:if(t.wrap){for(;m<32;){if(l===0)break t;l--,d|=i[a++]<{if(Ii(n))return Vn;let e=n.state;return e.window&&(e.window=null),n.state=null,ki},Bc=(n,e)=>{if(Ii(n))return Vn;const t=n.state;return t.wrap&2?(t.head=e,e.done=!1,ki):Vn},Mc=(n,e)=>{const t=e.length;let i,s,a;return Ii(n)||(i=n.state,i.wrap!==0&&i.mode!==Fs)?Vn:i.mode===Fs&&(s=1,s=Ho(s,e,t,0),s!==i.check)?uf:(a=vf(n,e,t,t),a?(i.mode=hf,ff):(i.havedict=1,ki))};var Rc=pf,Tc=gf,Dc=df,qc=Fc,Uc=mf,zc=Oc,Hc=jc,Wc=Bc,Vc=Mc,Gc="pako inflate (from Nodeca project)",Or={inflateReset:Rc,inflateReset2:Tc,inflateResetKeep:Dc,inflateInit:qc,inflateInit2:Uc,inflate:zc,inflateEnd:Hc,inflateGetHeader:Wc,inflateSetDictionary:Vc,inflateInfo:Gc};function Yc(){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 Jc=Yc;const bf=Object.prototype.toString,{Z_NO_FLUSH:Kc,Z_FINISH:Xc,Z_OK:Ra,Z_STREAM_END:So,Z_NEED_DICT:ko,Z_STREAM_ERROR:$c,Z_DATA_ERROR:bu,Z_MEM_ERROR:Zc}=rf;function Da(n){this.options=af.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});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&&!(n&&n.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new dc,this.strm.avail_out=0;let t=Or.inflateInit2(this.strm,e.windowBits);if(t!==Ra)throw new Error(Wo[t]);if(this.header=new Jc,Or.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Vo.string2buf(e.dictionary):bf.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=Or.inflateSetDictionary(this.strm,e.dictionary),t!==Ra)))throw new Error(Wo[t])}Da.prototype.push=function(n,e){const t=this.strm,i=this.options.chunkSize,s=this.options.dictionary;let a,c,l;if(this.ended)return!1;for(e===~~e?c=e:c=e===!0?Xc:Kc,bf.call(n)==="[object ArrayBuffer]"?t.input=new Uint8Array(n):t.input=n,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),a=Or.inflate(t,c),a===ko&&s&&(a=Or.inflateSetDictionary(t,s),a===Ra?a=Or.inflate(t,c):a===bu&&(a=ko));t.avail_in>0&&a===So&&t.state.wrap>0&&n[t.next_in]!==0;)Or.inflateReset(t),a=Or.inflate(t,c);switch(a){case $c:case bu:case ko:case Zc:return this.onEnd(a),this.ended=!0,!1}if(l=t.avail_out,t.next_out&&(t.avail_out===0||a===So))if(this.options.to==="string"){let h=Vo.utf8border(t.output,t.next_out),d=t.next_out-h,m=Vo.buf2string(t.output,h);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(h,h+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===Ra&&l===0)){if(a===So)return a=Or.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Da.prototype.onData=function(n){this.chunks.push(n)};Da.prototype.onEnd=function(n){n===Ra&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=af.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Qc(n,e){const t=new Da(e);if(t.push(n),t.err)throw t.msg||Wo[t.err];return t.result}var t1=Da,e1=Qc,n1={Inflate:t1,inflate:e1};const{Inflate:r1,inflate:i1}=n1;var wu=r1,a1=i1;const wf=[];for(let n=0;n<256;n++){let e=n;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;wf[n]=e}const yu=4294967295;function s1(n,e,t){let i=n;for(let s=0;s>>8;return i}function o1(n,e){return(s1(yu,n,e)^yu)>>>0}function xu(n,e,t){const i=n.readUint32(),s=o1(new Uint8Array(n.buffer,n.byteOffset+n.offset-e-4,e),e);if(s!==i)throw new Error(`CRC mismatch for chunk ${t}. Expected ${i}, found ${s}`)}function yf(n,e,t){for(let i=0;i>1)&255}else{for(;a>1)&255;for(;a>1)&255}}function Nf(n,e,t,i,s){let a=0;if(t.length===0){for(;a=t||vt>=i))for(let dt=0;dt>8&255}const g1=new Uint16Array([255]),m1=new Uint8Array(g1.buffer),v1=m1[0]===255,b1=new Uint8Array(0);function _u(n){const{data:e,width:t,height:i,channels:s,depth:a}=n,c=Math.ceil(a/8)*s,l=Math.ceil(a/8*s*t),h=new Uint8Array(i*l);let d=b1,m=0,_,k;for(let p=0;p>8&255}const Ps=Uint8Array.of(137,80,78,71,13,10,26,10);function Au(n){if(!y1(n.readBytes(Ps.length)))throw new Error("wrong PNG signature")}function y1(n){if(n.length79)throw new Error("keyword length must be between 1 and 79")}const N1=/^[\u0000-\u00FF]*$/;function L1(n){if(!N1.test(n))throw new Error("invalid latin1 text")}function S1(n,e,t){const i=Sf(e);n[i]=k1(e,t-i.length-1)}function Sf(n){for(n.mark();n.readByte()!==_1;);const e=n.offset;n.reset();const t=Lf.decode(n.readBytes(e-n.offset-1));return n.skip(1),A1(t),t}function k1(n,e){return Lf.decode(n.readBytes(e))}const Mn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Po={UNKNOWN:-1,DEFLATE:0},Nu={UNKNOWN:-1,ADAPTIVE:0},Io={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Ns={NONE:0,BACKGROUND:1,PREVIOUS:2},Co={SOURCE:0,OVER:1};class P1 extends Qo{constructor(t,i={}){super(t);xe(this,"_checkCrc");xe(this,"_inflator");xe(this,"_png");xe(this,"_apng");xe(this,"_end");xe(this,"_hasPalette");xe(this,"_palette");xe(this,"_hasTransparency");xe(this,"_transparency");xe(this,"_compressionMethod");xe(this,"_filterMethod");xe(this,"_interlaceMethod");xe(this,"_colorType");xe(this,"_isAnimated");xe(this,"_numberOfFrames");xe(this,"_numberOfPlays");xe(this,"_frames");xe(this,"_writingDataChunks");const{checkCrc:s=!1}=i;this._checkCrc=s,this._inflator=new wu,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=Po.UNKNOWN,this._filterMethod=Nu.UNKNOWN,this._interlaceMethod=Io.UNKNOWN,this._colorType=Mn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Au(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeChunk(t,i)}return this.decodeImage(),this._png}decodeApng(){for(Au(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(t,i)}return this.decodeApngImage(),this._apng}decodeChunk(t,i){const s=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 x1:S1(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-s!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?xu(this,t+4,i):this.skip(4)}decodeApngChunk(t,i){const s=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=s+t;break}if(this.offset-s!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?xu(this,t+4,i):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=I1(this.readUint8());const i=this.readUint8();this._colorType=i;let s;switch(i){case Mn.GREYSCALE:s=1;break;case Mn.TRUECOLOUR:s=3;break;case Mn.INDEXED_COLOUR:s=1;break;case Mn.GREYSCALE_ALPHA:s=2;break;case Mn.TRUECOLOUR_ALPHA:s=4;break;case Mn.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=s,this._compressionMethod=this.readUint8(),this._compressionMethod!==Po.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 s=[];this._palette=s;for(let a=0;athis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let i=0;ithis._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{const h=((c+i.yOffset)*this._png.width+i.xOffset+l)*this._png.channels,d=(c*i.width+l)*this._png.channels;return{index:h,frameIndex:d}};switch(i.blendOp){case Co.SOURCE:for(let c=0;c=200&&e.status<=299}function Ls(n){try{n.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),n.dispatchEvent(e)}}var yi=Kt.saveAs||((typeof window>"u"?"undefined":_e(window))!=="object"||window!==Kt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,e,t){var i=Kt.URL||Kt.webkitURL,s=document.createElement("a");e=e||n.name||"download",s.download=e,s.rel="noopener",typeof n=="string"?(s.href=n,s.origin!==location.origin?Su(s.href)?Eo(n,e,t):Ls(s,s.target="_blank"):Ls(s)):(s.href=i.createObjectURL(n),setTimeout(function(){i.revokeObjectURL(s.href)},4e4),setTimeout(function(){Ls(s)},0))}:"msSaveOrOpenBlob"in navigator?function(n,e,t){if(e=e||n.name||"download",typeof n=="string")if(Su(n))Eo(n,e,t);else{var i=document.createElement("a");i.href=n,i.target="_blank",setTimeout(function(){Ls(i)})}else navigator.msSaveOrOpenBlob(function(s,a){return a===void 0?a={autoBom:!1}:_e(a)!=="object"&&(Se.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}(n,t),e)}:function(n,e,t,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof n=="string")return Eo(n,e,t);var s=n.type==="application/octet-stream",a=/constructor/i.test(Kt.HTMLElement)||Kt.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&a)&&(typeof FileReader>"u"?"undefined":_e(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var m=l.result;m=c?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=m:location=m,i=null},l.readAsDataURL(n)}else{var h=Kt.URL||Kt.webkitURL,d=h.createObjectURL(n);i?i.location=d:location.href=d,i=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function kf(n){var e;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={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"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;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;i255?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),h=this.g.toString(16),d=this.b.toString(16);return l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),d.length==1&&(d="0"+d),"#"+l+h+d}}var Is=Kt.atob.bind(Kt),ku=Kt.btoa.bind(Kt);/** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */function Oo(n,e){var t=n[0],i=n[1],s=n[2],a=n[3];t=mn(t,i,s,a,e[0],7,-680876936),a=mn(a,t,i,s,e[1],12,-389564586),s=mn(s,a,t,i,e[2],17,606105819),i=mn(i,s,a,t,e[3],22,-1044525330),t=mn(t,i,s,a,e[4],7,-176418897),a=mn(a,t,i,s,e[5],12,1200080426),s=mn(s,a,t,i,e[6],17,-1473231341),i=mn(i,s,a,t,e[7],22,-45705983),t=mn(t,i,s,a,e[8],7,1770035416),a=mn(a,t,i,s,e[9],12,-1958414417),s=mn(s,a,t,i,e[10],17,-42063),i=mn(i,s,a,t,e[11],22,-1990404162),t=mn(t,i,s,a,e[12],7,1804603682),a=mn(a,t,i,s,e[13],12,-40341101),s=mn(s,a,t,i,e[14],17,-1502002290),t=vn(t,i=mn(i,s,a,t,e[15],22,1236535329),s,a,e[1],5,-165796510),a=vn(a,t,i,s,e[6],9,-1069501632),s=vn(s,a,t,i,e[11],14,643717713),i=vn(i,s,a,t,e[0],20,-373897302),t=vn(t,i,s,a,e[5],5,-701558691),a=vn(a,t,i,s,e[10],9,38016083),s=vn(s,a,t,i,e[15],14,-660478335),i=vn(i,s,a,t,e[4],20,-405537848),t=vn(t,i,s,a,e[9],5,568446438),a=vn(a,t,i,s,e[14],9,-1019803690),s=vn(s,a,t,i,e[3],14,-187363961),i=vn(i,s,a,t,e[8],20,1163531501),t=vn(t,i,s,a,e[13],5,-1444681467),a=vn(a,t,i,s,e[2],9,-51403784),s=vn(s,a,t,i,e[7],14,1735328473),t=bn(t,i=vn(i,s,a,t,e[12],20,-1926607734),s,a,e[5],4,-378558),a=bn(a,t,i,s,e[8],11,-2022574463),s=bn(s,a,t,i,e[11],16,1839030562),i=bn(i,s,a,t,e[14],23,-35309556),t=bn(t,i,s,a,e[1],4,-1530992060),a=bn(a,t,i,s,e[4],11,1272893353),s=bn(s,a,t,i,e[7],16,-155497632),i=bn(i,s,a,t,e[10],23,-1094730640),t=bn(t,i,s,a,e[13],4,681279174),a=bn(a,t,i,s,e[0],11,-358537222),s=bn(s,a,t,i,e[3],16,-722521979),i=bn(i,s,a,t,e[6],23,76029189),t=bn(t,i,s,a,e[9],4,-640364487),a=bn(a,t,i,s,e[12],11,-421815835),s=bn(s,a,t,i,e[15],16,530742520),t=wn(t,i=bn(i,s,a,t,e[2],23,-995338651),s,a,e[0],6,-198630844),a=wn(a,t,i,s,e[7],10,1126891415),s=wn(s,a,t,i,e[14],15,-1416354905),i=wn(i,s,a,t,e[5],21,-57434055),t=wn(t,i,s,a,e[12],6,1700485571),a=wn(a,t,i,s,e[3],10,-1894986606),s=wn(s,a,t,i,e[10],15,-1051523),i=wn(i,s,a,t,e[1],21,-2054922799),t=wn(t,i,s,a,e[8],6,1873313359),a=wn(a,t,i,s,e[15],10,-30611744),s=wn(s,a,t,i,e[6],15,-1560198380),i=wn(i,s,a,t,e[13],21,1309151649),t=wn(t,i,s,a,e[4],6,-145523070),a=wn(a,t,i,s,e[11],10,-1120210379),s=wn(s,a,t,i,e[2],15,718787259),i=wn(i,s,a,t,e[9],21,-343485551),n[0]=Zr(t,n[0]),n[1]=Zr(i,n[1]),n[2]=Zr(s,n[2]),n[3]=Zr(a,n[3])}function js(n,e,t,i,s,a){return e=Zr(Zr(e,n),Zr(i,a)),Zr(e<>>32-s,t)}function mn(n,e,t,i,s,a,c){return js(e&t|~e&i,n,e,s,a,c)}function vn(n,e,t,i,s,a,c){return js(e&i|t&~i,n,e,s,a,c)}function bn(n,e,t,i,s,a,c){return js(e^t^i,n,e,s,a,c)}function wn(n,e,t,i,s,a,c){return js(t^(e|~i),n,e,s,a,c)}function Pf(n){var e,t=n.length,i=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=n.length;e+=64)Oo(i,F1(n.substring(e-64,e)));n=n.substring(e-64);var s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=n.charCodeAt(e)<<(e%4<<3);if(s[e>>2]|=128<<(e%4<<3),e>55)for(Oo(i,s),e=0;e<16;e++)s[e]=0;return s[14]=8*t,Oo(i,s),i}function F1(n){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=n.charCodeAt(e)+(n.charCodeAt(e+1)<<8)+(n.charCodeAt(e+2)<<16)+(n.charCodeAt(e+3)<<24);return t}var Pu="0123456789abcdef".split("");function E1(n){for(var e="",t=0;t<4;t++)e+=Pu[n>>8*t+4&15]+Pu[n>>8*t&15];return e}function O1(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function Go(n){return Pf(n).map(O1).join("")}var j1=function(n){for(var e=0;e>16)+(e>>16)+(t>>16)<<16|65535&t}return n+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 Yo(n,e){var t,i,s,a;if(n!==t){for(var c=(s=n,a=1+(256/n.length|0),new Array(a+1).join(s)),l=[],h=0;h<256;h++)l[h]=h;var d=0;for(h=0;h<256;h++){var m=l[h];d=(d+m+c.charCodeAt(h))%256,l[h]=l[d],l[d]=m}t=n,i=l}else l=i;var _=e.length,k=0,p=0,j="";for(h=0;h<_;h++)p=(p+(m=l[k=(k+1)%256]))%256,l[k]=l[p],l[p]=m,c=l[(l[k]+l[p])%256],j+=String.fromCharCode(e.charCodeAt(h)^c);return j}/** * @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 Iu={print:4,modify:8,copy:16,"annot-forms":32};function na(n,e,t,i){this.v=1,this.r=2;var s=192;n.forEach(function(l){if(Iu.perm!==void 0)throw new Error("Invalid permission: "+l);s+=Iu[l]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var a=(e+this.padding).substr(0,32),c=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,c),this.P=-(1+(255^s)),this.encryptionKey=Go(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=Yo(this.encryptionKey,this.padding)}function ra(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var e="",t=n.length,i=0;i126?"#"+("0"+s.toString(16)).slice(-2):n[i]}return e}function Cu(n){if(_e(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,i,s){if(s=s||!1,typeof t!="string"||typeof i!="function"||typeof s!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[i,!!s],a},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),s=[];for(var a in e[t]){var c=e[t][a];try{c[0].apply(n,i)}catch(l){Kt.console&&Se.error("jsPDF PubSub Error",l.message,l)}c[1]&&s.push(a)}s.length&&s.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Ta(n){if(!(this instanceof Ta))return new Ta(n);var e="opacity,stroke-opacity".split(",");for(var t in n)n.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=n[t]);this.id="",this.objectNumber=-1}function If(n,e){this.gState=n,this.matrix=e,this.id="",this.objectNumber=-1}function $r(n,e,t,i,s){if(!(this instanceof $r))return new $r(n,e,t,i,s);this.type=n==="axial"?2:3,this.coords=e,this.colors=t,If.call(this,i,s)}function xi(n,e,t,i,s){if(!(this instanceof xi))return new xi(n,e,t,i,s);this.boundingBox=n,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,If.call(this,i,s)}function Mt(n){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],s=arguments[2],a=arguments[3],c=[],l=1,h=16,d="S",m=null;_e(n=n||{})==="object"&&(t=n.orientation,i=n.unit||i,s=n.format||s,a=n.compress||n.compressPdf||a,(m=n.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),l=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(e=n.precision),n.floatPrecision!==void 0&&(h=n.floatPrecision),d=n.defaultPathOperation||"S"),c=n.filters||(a===!0?["FlateEncode"]:c),i=i||"mm",t=(""+(t||"P")).toLowerCase();var _=n.putOnlyUsedFonts||!1,k={},p={internal:{},__private__:{}};p.__private__.PubSub=Cu;var j="1.3",O=p.__private__.getPdfVersion=function(){return j};p.__private__.setPdfVersion=function(u){j=u};var M={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return M};var S=p.__private__.getPageFormat=function(u){return M[u]};s=s||"a4";var V="compat",G="advanced",q=V;function it(){this.saveGraphicsState(),P(new Gt(ne,0,0,-ne,0,oi()*ne).toString()+" cm"),this.setFontSize(this.getFontSize()/ne),d="n",q=G}function vt(){this.restoreGraphicsState(),d="S",q=V}var dt=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=q===V;return v&&it.call(this),typeof u!="function"||(u(this),v&&vt.call(this)),this},p.compatAPI=function(u){var v=q===G;return v&&vt.call(this),typeof u!="function"||(u(this),v&&it.call(this)),this},p.isAdvancedAPI=function(){return q===G};var X,R=function(u){if(q!==G)throw new Error(u+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},tt=p.roundToPrecision=p.__private__.roundToPrecision=function(u,v){var I=e||v;if(isNaN(u)||isNaN(I))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return u.toFixed(I).replace(/0+$/,"")};X=p.hpf=p.__private__.hpf=typeof h=="number"?function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(u,h)}:h==="smart"?function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(u,u>-1&&u<1?16:5)}:function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(u,16)};var N=p.f2=p.__private__.f2=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.f2");return tt(u,2)},E=p.__private__.f3=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.f3");return tt(u,3)},z=p.scale=p.__private__.scale=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.scale");return q===V?u*ne:q===G?u:void 0},U=function(u){return z(function(v){return q===V?oi()-v:q===G?v:void 0}(u))};p.__private__.setPrecision=p.setPrecision=function(u){typeof parseInt(u,10)=="number"&&(e=parseInt(u,10))};var rt,ot="00000000000000000000000000000000",ft=p.__private__.getFileId=function(){return ot},nt=p.__private__.setFileId=function(u){return ot=u!==void 0&&/^[a-fA-F0-9]{32}$/.test(u)?u.toUpperCase():ot.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(on=new na(m.userPermissions,m.userPassword,m.ownerPassword,ot)),ot};p.setFileId=function(u){return nt(u),this},p.getFileId=function(){return ft()};var ct=p.__private__.convertDateToPDFDate=function(u){var v=u.getTimezoneOffset(),I=v<0?"+":"-",D=Math.floor(Math.abs(v/60)),K=Math.abs(v%60),lt=[I,T(D),"'",T(K),"'"].join("");return["D:",u.getFullYear(),T(u.getMonth()+1),T(u.getDate()),T(u.getHours()),T(u.getMinutes()),T(u.getSeconds()),lt].join("")},At=p.__private__.convertPDFDateToDate=function(u){var v=parseInt(u.substr(2,4),10),I=parseInt(u.substr(6,2),10)-1,D=parseInt(u.substr(8,2),10),K=parseInt(u.substr(10,2),10),lt=parseInt(u.substr(12,2),10),mt=parseInt(u.substr(14,2),10);return new Date(v,I,D,K,lt,mt,0)},wt=p.__private__.setCreationDate=function(u){var v;if(u===void 0&&(u=new Date),u instanceof Date)v=ct(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 rt=v},x=p.__private__.getCreationDate=function(u){var v=rt;return u==="jsDate"&&(v=At(rt)),v};p.setCreationDate=function(u){return wt(u),this},p.getCreationDate=function(u){return x(u)};var B,T=p.__private__.padd2=function(u){return("0"+parseInt(u)).slice(-2)},H=p.__private__.padd2Hex=function(u){return("00"+(u=u.toString())).substr(u.length)},J=0,Z=[],at=[],st=0,gt=[],_t=[],kt=!1,St=at;p.__private__.setCustomOutputDestination=function(u){kt=!0,St=u};var Dt=function(u){kt||(St=u)};p.__private__.resetCustomOutputDestination=function(){kt=!1,St=at};var P=p.__private__.out=function(u){return u=u.toString(),st+=u.length+1,St.push(u),St},Lt=p.__private__.write=function(u){return P(arguments.length===1?u.toString():Array.prototype.join.call(arguments," "))},ae=p.__private__.getArrayBuffer=function(u){for(var v=u.length,I=new ArrayBuffer(v),D=new Uint8Array(I);v--;)D[v]=u.charCodeAt(v);return I},Ht=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return Ht};var yt=n.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(u){return yt=q===G?u/ne:u,this};var Wt,Ct=p.__private__.getFontSize=p.getFontSize=function(){return q===V?yt:yt*ne},zt=n.R2L||!1;p.__private__.setR2L=p.setR2L=function(u){return zt=u,this},p.__private__.getR2L=p.getR2L=function(){return zt};var qt,ve=p.__private__.setZoomMode=function(u){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(u))Wt=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.');Wt=u}else Wt=parseInt(u,10)};p.__private__.getZoomMode=function(){return Wt};var ue,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.');qt=u};p.__private__.getPageMode=function(){return qt};var he=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.');ue=u};p.__private__.getLayoutMode=function(){return ue},p.__private__.setDisplayMode=p.setDisplayMode=function(u,v,I){return ve(u),he(v),Zt(I),this};var fe={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(u){if(Object.keys(fe).indexOf(u)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return fe[u]},p.__private__.getDocumentProperties=function(){return fe},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(u){for(var v in fe)fe.hasOwnProperty(v)&&u[v]&&(fe[v]=u[v]);return this},p.__private__.setDocumentProperty=function(u,v){if(Object.keys(fe).indexOf(u)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return fe[u]=v};var Bt,ne,Tt,He,ge,se={},oe={},je=[],Ut={},ke={},Yt={},Qt={},Be=null,le=0,Vt=[],be=new Cu(p),ei=n.hotfixes||[],hn={},vr={},rr=[],Gt=function u(v,I,D,K,lt,mt){if(!(this instanceof u))return new u(v,I,D,K,lt,mt);isNaN(v)&&(v=1),isNaN(I)&&(I=0),isNaN(D)&&(D=0),isNaN(K)&&(K=1),isNaN(lt)&&(lt=0),isNaN(mt)&&(mt=0),this._matrix=[v,I,D,K,lt,mt]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(u){this._matrix[0]=u}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(u){this._matrix[1]=u}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(u){this._matrix[2]=u}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(u){this._matrix[3]=u}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(u){this._matrix[4]=u}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(u){this._matrix[5]=u}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(u){this._matrix[0]=u}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(u){this._matrix[1]=u}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(u){this._matrix[2]=u}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(u){this._matrix[3]=u}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(u){this._matrix[4]=u}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(u){this._matrix[5]=u}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Gt.prototype.join=function(u){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(X).join(u)},Gt.prototype.multiply=function(u){var v=u.sx*this.sx+u.shy*this.shx,I=u.sx*this.shy+u.shy*this.sy,D=u.shx*this.sx+u.sy*this.shx,K=u.shx*this.shy+u.sy*this.sy,lt=u.tx*this.sx+u.ty*this.shx+this.tx,mt=u.tx*this.shy+u.ty*this.sy+this.ty;return new Gt(v,I,D,K,lt,mt)},Gt.prototype.decompose=function(){var u=this.sx,v=this.shy,I=this.shx,D=this.sy,K=this.tx,lt=this.ty,mt=Math.sqrt(u*u+v*v),Et=(u/=mt)*I+(v/=mt)*D;I-=u*Et,D-=v*Et;var Ft=Math.sqrt(I*I+D*D);return Et/=Ft,u*(D/=Ft)>16&255,D=Ft>>8&255,K=255&Ft}if(D===void 0||lt===void 0&&I===D&&D===K)v=typeof I=="string"?I+" "+mt[0]:u.precision===2?N(I/255)+" "+mt[0]:E(I/255)+" "+mt[0];else if(lt===void 0||_e(lt)==="object"){if(lt&&!isNaN(lt.a)&<.a===0)return["1.","1.","1.",mt[1]].join(" ");v=typeof I=="string"?[I,D,K,mt[1]].join(" "):u.precision===2?[N(I/255),N(D/255),N(K/255),mt[1]].join(" "):[E(I/255),E(D/255),E(K/255),mt[1]].join(" ")}else v=typeof I=="string"?[I,D,K,lt,mt[2]].join(" "):u.precision===2?[N(I),N(D),N(K),N(lt),mt[2]].join(" "):[E(I),E(D),E(K),E(lt),mt[2]].join(" ");return v},Jn=p.__private__.getFilters=function(){return c},qn=p.__private__.putStream=function(u){var v=(u=u||{}).data||"",I=u.filters||Jn(),D=u.alreadyAppliedFilters||[],K=u.addLength1||!1,lt=v.length,mt=u.objectId,Et=function(Fe){return Fe};if(m!==null&&mt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&(Et=on.encryptor(mt,0));var Ft={};I===!0&&(I=["FlateEncode"]);var Xt=u.additionalKeyValues||[],te=(Ft=Mt.API.processDataByFilters!==void 0?Mt.API.processDataByFilters(v,I):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(D)?D.join(" "):D.toString());if(Ft.data.length!==0&&(Xt.push({key:"Length",value:Ft.data.length}),K===!0&&Xt.push({key:"Length1",value:lt})),te.length!=0)if(te.split("/").length-1==1)Xt.push({key:"Filter",value:te});else{Xt.push({key:"Filter",value:"["+te+"]"});for(var de=0;de>"),Ft.data.length!==0&&(P("stream"),P(Et(Ft.data)),P("endstream"))},ri=p.__private__.putPage=function(u){var v=u.number,I=u.data,D=u.objId,K=u.contentsObjId;sn(D,!0),P("<>"),P("endobj");var lt=I.join(` `);return q===G&&(lt+=` Q`),sn(K,!0),qn({data:lt,filters:Jn(),objectId:K}),P("endobj"),D},ar=p.__private__.putPages=function(){var u,v,I=[];for(u=1;u<=le;u++)Vt[u].objId=an(),Vt[u].contentsObjId=an();for(u=1;u<=le;u++)I.push(ri({number:u,data:_t[u],objId:Vt[u].objId,contentsObjId:Vt[u].contentsObjId,mediaBox:Vt[u].mediaBox,cropBox:Vt[u].cropBox,bleedBox:Vt[u].bleedBox,trimBox:Vt[u].trimBox,artBox:Vt[u].artBox,userUnit:Vt[u].userUnit,rootDictionaryObjId:jr,resourceDictionaryObjId:Gn}));sn(jr,!0),P("<>"),P("endobj"),be.publish("postPutPages")},ii=function(u){be.publish("putFont",{font:u,out:P,newObject:De,putStream:qn}),u.isAlreadyPutted!==!0&&(u.objectNumber=De(),P("<<"),P("/Type /Font"),P("/BaseFont /"+ra(u.postScriptName)),P("/Subtype /Type1"),typeof u.encoding=="string"&&P("/Encoding /"+u.encoding),P("/FirstChar 32"),P("/LastChar 255"),P(">>"),P("endobj"))},Fi=function(u){u.objectNumber=De();var v=[];v.push({key:"Type",value:"/XObject"}),v.push({key:"Subtype",value:"/Form"}),v.push({key:"BBox",value:"["+[X(u.x),X(u.y),X(u.x+u.width),X(u.y+u.height)].join(" ")+"]"}),v.push({key:"Matrix",value:"["+u.matrix.toString()+"]"});var I=u.pages[1].join(` `);qn({data:I,additionalKeyValues:v,objectId:u.objectNumber}),P("endobj")},Ei=function(u,v){v||(v=21);var I=De(),D=function(mt,Et){var Ft,Xt=[],te=1/(Et-1);for(Ft=0;Ft<1;Ft+=te)Xt.push(Ft);if(Xt.push(1),mt[0].offset!=0){var de={offset:0,color:mt[0].color};mt.unshift(de)}if(mt[mt.length-1].offset!=1){var $e={offset:1,color:mt[mt.length-1].color};mt.push($e)}for(var Ne="",Ae=0,Fe=0;Femt[Ae+1].offset;)Ae++;var Re=mt[Ae].offset,Te=(Ft-Re)/(mt[Ae+1].offset-Re),cn=mt[Ae].color,Lr=mt[Ae+1].color;Ne+=H(Math.round((1-Te)*cn[0]+Te*Lr[0]).toString(16))+H(Math.round((1-Te)*cn[1]+Te*Lr[1]).toString(16))+H(Math.round((1-Te)*cn[2]+Te*Lr[2]).toString(16))}return Ne.trim()}(u.colors,v),K=[];K.push({key:"FunctionType",value:"0"}),K.push({key:"Domain",value:"[0.0 1.0]"}),K.push({key:"Size",value:"["+v+"]"}),K.push({key:"BitsPerSample",value:"8"}),K.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),K.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),qn({data:D,additionalKeyValues:K,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:I}),P("endobj"),u.objectNumber=De(),P("<< /ShadingType "+u.type),P("/ColorSpace /DeviceRGB");var lt="/Coords ["+X(parseFloat(u.coords[0]))+" "+X(parseFloat(u.coords[1]))+" ";u.type===2?lt+=X(parseFloat(u.coords[2]))+" "+X(parseFloat(u.coords[3])):lt+=X(parseFloat(u.coords[2]))+" "+X(parseFloat(u.coords[3]))+" "+X(parseFloat(u.coords[4]))+" "+X(parseFloat(u.coords[5])),P(lt+="]"),u.matrix&&P("/Matrix ["+u.matrix.toString()+"]"),P("/Function "+I+" 0 R"),P("/Extend [true true]"),P(">>"),P("endobj")},Oi=function(u,v){var I=an(),D=De();v.push({resourcesOid:I,objectOid:D}),u.objectNumber=D;var K=[];K.push({key:"Type",value:"/Pattern"}),K.push({key:"PatternType",value:"1"}),K.push({key:"PaintType",value:"1"}),K.push({key:"TilingType",value:"1"}),K.push({key:"BBox",value:"["+u.boundingBox.map(X).join(" ")+"]"}),K.push({key:"XStep",value:X(u.xStep)}),K.push({key:"YStep",value:X(u.yStep)}),K.push({key:"Resources",value:I+" 0 R"}),u.matrix&&K.push({key:"Matrix",value:"["+u.matrix.toString()+"]"}),qn({data:u.stream,additionalKeyValues:K,objectId:u.objectNumber}),P("endobj")},Bs=function(u){for(var v in u.objectNumber=De(),P("<<"),u)switch(v){case"opacity":P("/ca "+N(u[v]));break;case"stroke-opacity":P("/CA "+N(u[v]))}P(">>"),P("endobj")},aa=function(u){sn(u.resourcesOid,!0),P("<<"),P("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var v in P("/Font <<"),se)se.hasOwnProperty(v)&&(_===!1||_===!0&&k.hasOwnProperty(v))&&P("/"+v+" "+se[v].objectNumber+" 0 R");P(">>")}(),function(){if(Object.keys(Ut).length>0){for(var v in P("/Shading <<"),Ut)Ut.hasOwnProperty(v)&&Ut[v]instanceof $r&&Ut[v].objectNumber>=0&&P("/"+v+" "+Ut[v].objectNumber+" 0 R");be.publish("putShadingPatternDict"),P(">>")}}(),function(v){if(Object.keys(Ut).length>0){for(var I in P("/Pattern <<"),Ut)Ut.hasOwnProperty(I)&&Ut[I]instanceof p.TilingPattern&&Ut[I].objectNumber>=0&&Ut[I].objectNumber>")}}(u.objectOid),function(){if(Object.keys(Yt).length>0){var v;for(v in P("/ExtGState <<"),Yt)Yt.hasOwnProperty(v)&&Yt[v].objectNumber>=0&&P("/"+v+" "+Yt[v].objectNumber+" 0 R");be.publish("putGStateDict"),P(">>")}}(),function(){for(var v in P("/XObject <<"),hn)hn.hasOwnProperty(v)&&hn[v].objectNumber>=0&&P("/"+v+" "+hn[v].objectNumber+" 0 R");be.publish("putXobjectDict"),P(">>")}(),P(">>"),P("endobj")},qa=function(u){oe[u.fontName]=oe[u.fontName]||{},oe[u.fontName][u.fontStyle]=u.id},Ua=function(u,v,I,D,K){var lt={id:"F"+(Object.keys(se).length+1).toString(10),postScriptName:u,fontName:v,fontStyle:I,encoding:D,isStandardFont:K||!1,metadata:{}};return be.publish("addFont",{font:lt,instance:this}),se[lt.id]=lt,qa(lt),lt.id},Un=p.__private__.pdfEscape=p.pdfEscape=function(u,v){return function(I,D){var K,lt,mt,Et,Ft,Xt,te,de,$e;if(mt=(D=D||{}).sourceEncoding||"Unicode",Ft=D.outputEncoding,(D.autoencode||Ft)&&se[Bt].metadata&&se[Bt].metadata[mt]&&se[Bt].metadata[mt].encoding&&(Et=se[Bt].metadata[mt].encoding,!Ft&&se[Bt].encoding&&(Ft=se[Bt].encoding),!Ft&&Et.codePages&&(Ft=Et.codePages[0]),typeof Ft=="string"&&(Ft=Et[Ft]),Ft)){for(te=!1,Xt=[],K=0,lt=I.length;K>8&&(te=!0);I=Xt.join("")}for(K=I.length;te===void 0&&K!==0;)I.charCodeAt(K-1)>>8&&(te=!0),K--;if(!te)return I;for(Xt=D.noBOM?[]:[254,255],K=0,lt=I.length;K>8)>>8)throw new Error("Character at position "+K+" of string '"+I+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Xt.push($e),Xt.push(de-($e<<8))}return String.fromCharCode.apply(void 0,Xt)}(u,v).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},sa=p.__private__.beginPage=function(u){_t[++le]=[],Vt[le]={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])}},Ha(le),Dt(_t[B])},za=function(u,v){var I,D,K;switch(t=v||t,typeof u=="string"&&(I=S(u.toLowerCase()),Array.isArray(I)&&(D=I[0],K=I[1])),Array.isArray(u)&&(D=u[0]*ne,K=u[1]*ne),isNaN(D)&&(D=s[0],K=s[1]),(D>14400||K>14400)&&(Se.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),D=Math.min(14400,D),K=Math.min(14400,K)),s=[D,K],t.substr(0,1)){case"l":K>D&&(s=[K,D]);break;case"p":D>K&&(s=[K,D])}sa(s),Vs(Jt),P(Di),ha!==0&&P(ha+" J"),Rr!==0&&P(Rr+" j"),be.publish("addPage",{pageNumber:le})},oa=function(u){u>0&&u<=le&&(_t.splice(u,1),Vt.splice(u,1),le--,B>le&&(B=le),this.setPage(B))},Ha=function(u){u>0&&u<=le&&(B=u)},Wa=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return _t.length-1},Va=function(u,v,I){var D,K=void 0;return I=I||{},u=u!==void 0?u:se[Bt].fontName,v=v!==void 0?v:se[Bt].fontStyle,D=u.toLowerCase(),oe[D]!==void 0&&oe[D][v]!==void 0?K=oe[D][v]:oe[u]!==void 0&&oe[u][v]!==void 0?K=oe[u][v]:I.disableWarning===!1&&Se.warn("Unable to look up font label for font '"+u+"', '"+v+"'. Refer to getFontList() for available fonts."),K||I.noFallback||(K=oe.times[v])==null&&(K=oe.times.normal),K},sr=p.__private__.putInfo=function(){var u=De(),v=function(D){return D};for(var I in m!==null&&(v=on.encryptor(u,0)),P("<<"),P("/Producer ("+Un(v("jsPDF "+Mt.version))+")"),fe)fe.hasOwnProperty(I)&&fe[I]&&P("/"+I.substr(0,1).toUpperCase()+I.substr(1)+" ("+Un(v(fe[I]))+")");P("/CreationDate ("+Un(v(rt))+")"),P(">>"),P("endobj")},ji=p.__private__.putCatalog=function(u){var v=(u=u||{}).rootDictionaryObjId||jr;switch(De(),P("<<"),P("/Type /Catalog"),P("/Pages "+v+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":P("/OpenAction [3 0 R /FitH null]");break;case"fullheight":P("/OpenAction [3 0 R /FitV null]");break;case"fullpage":P("/OpenAction [3 0 R /Fit]");break;case"original":P("/OpenAction [3 0 R /XYZ null null 1]");break;default:var I=""+Wt;I.substr(I.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&P("/OpenAction [3 0 R /XYZ null null "+N(Wt)+"]")}switch(ue||(ue="continuous"),ue){case"continuous":P("/PageLayout /OneColumn");break;case"single":P("/PageLayout /SinglePage");break;case"two":case"twoleft":P("/PageLayout /TwoColumnLeft");break;case"tworight":P("/PageLayout /TwoColumnRight")}qt&&P("/PageMode /"+qt),be.publish("putCatalog"),P(">>"),P("endobj")},Ms=p.__private__.putTrailer=function(){P("trailer"),P("<<"),P("/Size "+(J+1)),P("/Root "+J+" 0 R"),P("/Info "+(J-1)+" 0 R"),m!==null&&P("/Encrypt "+on.oid+" 0 R"),P("/ID [ <"+ot+"> <"+ot+"> ]"),P(">>")},Xe=p.__private__.putHeader=function(){P("%PDF-"+j),P("%ºß¬à")},Ga=p.__private__.putXRef=function(){var u="0000000000";P("xref"),P("0 "+(J+1)),P("0000000000 65535 f ");for(var v=1;v<=J;v++)typeof Z[v]=="function"?P((u+Z[v]()).slice(-10)+" 00000 n "):Z[v]!==void 0?P((u+Z[v]).slice(-10)+" 00000 n "):P("0000000000 00000 n ")},or=p.__private__.buildDocument=function(){var u;J=0,st=0,at=[],Z=[],gt=[],jr=an(),Gn=an(),Dt(at),be.publish("buildDocument"),Xe(),ar(),function(){be.publish("putAdditionalObjects");for(var I=0;I"),P("/O <"+on.toHexString(on.O)+">"),P("/P "+on.P),P(">>"),P("endobj")),sr(),ji();var v=st;return Ga(),Ms(),P("startxref"),P(""+v),P("%%EOF"),Dt(_t[B]),at.join(` `)},Bi=p.__private__.getBlob=function(u){return new Blob([ae(u)],{type:"application/pdf"})},la=function(u){for(;u.firstChild;)u.removeChild(u.firstChild)},In=function(u){var v,I=u.document,D=I.documentElement,K=I.head,lt=I.body;return K||(K=I.createElement("head"),D.appendChild(K)),lt||(lt=I.createElement("body"),D.appendChild(lt)),la(K),la(lt),(v=I.createElement("style")).appendChild(I.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),K.appendChild(v),{document:I,body:lt}},Mi=p.output=p.__private__.output=(Dn=function(u,v){switch(typeof(v=v||{})=="string"?v={filename:v}:v.filename=v.filename||"generated.pdf",u){case void 0:return or();case"save":p.save(v.filename);break;case"arraybuffer":return ae(or());case"blob":return Bi(or());case"bloburi":case"bloburl":if(Kt.URL!==void 0&&typeof Kt.URL.createObjectURL=="function")return Kt.URL&&Kt.URL.createObjectURL(Bi(or()))||void 0;Se.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var I="",D=or();try{I=ku(D)}catch{I=ku(unescape(encodeURIComponent(D)))}return"data:application/pdf;filename="+encodeURIComponent(v.filename)+";base64,"+I;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var K="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",lt=!v.pdfObjectUrl;lt||(K=v.pdfObjectUrl);var mt=Kt.open();if(mt!==null){var Et=In(mt),Ft=Et.document.createElement("script"),Xt=this;Ft.src=K,lt&&(Ft.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Ft.crossOrigin="anonymous"),Ft.onload=function(){mt.PDFObject.embed(Xt.output("dataurlstring"),v)},Et.body.appendChild(Ft)}return mt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var te=v.pdfJsUrl||"examples/PDF.js/web/viewer.html",de=Kt.open();if(de!==null){var $e=In(de),Ne=$e.document.createElement("iframe"),Ae=te.indexOf("?")===-1?"?":"&";Xt=this,Ne.id="pdfViewer",Ne.width="500px",Ne.height="400px",Ne.src=te+Ae+"file=&downloadName="+encodeURIComponent(v.filename),Ne.onload=function(){de.document.title=v.filename,Ne.contentWindow.PDFViewerApplication.open(Xt.output("bloburl"))},$e.body.appendChild(Ne)}return de}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Kt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Fe=Kt.open();if(Fe!==null){var Re=In(Fe),Te=Re.document.createElement("iframe");Te.src=this.output("datauristring",v),Re.body.appendChild(Te),Fe.document.title=v.filename}if(Fe||typeof safari>"u")return Fe;break;case"datauri":case"dataurl":return Kt.document.location.href=this.output("datauristring",v);default:return null}},Dn.foo=function(){try{return Dn.apply(this,arguments)}catch(I){var u=I.stack||"";~u.indexOf(" at ")&&(u=u.split(" at ")[1]);var v="Error in function "+u.split(` `)[0].split("<")[0]+": "+I.message;if(!Kt.console)throw new Error(v);Kt.console.error(v,I),Kt.alert&&alert(v)}},Dn.foo.bar=Dn,Dn.foo),yr=function(u){return Array.isArray(ei)===!0&&ei.indexOf(u)>-1};switch(i){case"pt":ne=1;break;case"mm":ne=72/25.4;break;case"cm":ne=72/2.54;break;case"in":ne=72;break;case"px":ne=yr("px_scaling")==1?.75:96/72;break;case"pc":case"em":ne=12;break;case"ex":ne=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);ne=i}var on=null;wt(),nt();var Ya=p.__private__.getPageInfo=p.getPageInfo=function(u){if(isNaN(u)||u%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Vt[u].objId,pageNumber:u,pageContext:Vt[u]}},Rs=p.__private__.getPageInfoByObjId=function(u){if(isNaN(u)||u%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var v in Vt)if(Vt[v].objId===u)break;return Ya(v)},Ts=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Vt[B].objId,pageNumber:B,pageContext:Vt[B]}};p.addPage=function(){return za.apply(this,arguments),this},p.setPage=function(){return Ha.apply(this,arguments),Dt.call(this,_t[B]),this},p.insertPage=function(u){return this.addPage(),this.movePage(B,u),this},p.movePage=function(u,v){var I,D;if(u>v){I=_t[u],D=Vt[u];for(var K=u;K>v;K--)_t[K]=_t[K-1],Vt[K]=Vt[K-1];_t[v]=I,Vt[v]=D,this.setPage(v)}else if(u0&&(typeof u=="string"?u=Ae.splitTextToSize(u,te):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(Pe,Ie){return Pe.concat(Ae.splitTextToSize(Ie,te))},[]))),lt={text:u,x:v,y:I,options:D,mutex:{pdfEscape:Un,activeFontKey:Bt,fonts:se,activeFontSize:yt}},be.publish("preProcessText",lt),u=lt.text,Et=(D=lt.options).angle,Ne instanceof Gt==0&&Et&&typeof Et=="number"){Et*=Math.PI/180,D.rotationDirection===0&&(Et=-Et),q===G&&(Et=-Et);var ma=Math.cos(Et),fr=Math.sin(Et);Ne=new Gt(ma,fr,-fr,ma,0,0)}else Et&&Et instanceof Gt&&(Ne=Et);q!==G||Ne||(Ne=wr),(Xt=D.charSpace||qi)!==void 0&&(Te+=X(z(Xt))+` Tc `,this.setCharSpace(this.getCharSpace()||0)),($e=D.horizontalScale)!==void 0&&(Te+=X(100*$e)+` Tz `),D.lang;var yn=-1,es=D.renderingMode!==void 0?D.renderingMode:D.stroke,Vi=Ae.internal.getCurrentPageInfo().pageContext;switch(es){case 0:case!1:case"fill":yn=0;break;case 1:case!0:case"stroke":yn=1;break;case 2:case"fillThenStroke":yn=2;break;case 3:case"invisible":yn=3;break;case 4:case"fillAndAddForClipping":yn=4;break;case 5:case"strokeAndAddPathForClipping":yn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":yn=6;break;case 7:case"addToPathForClipping":yn=7}var ns=Vi.usedRenderingMode!==void 0?Vi.usedRenderingMode:-1;yn!==-1?Te+=yn+` Tr `:ns!==-1&&(Te+=`0 Tr `),yn!==-1&&(Vi.usedRenderingMode=yn),Ft=D.align||"left";var zn,di=yt*cn,va=Ae.internal.pageSize.getWidth(),Gi=se[Bt];Xt=D.charSpace||qi,te=D.maxWidth||0,de=Object.assign({autoencode:!0,noBOM:!0},D.flags);var pi=[],ba=function(Pe){return Ae.getStringUnitWidth(Pe,{font:Gi,charSpace:Xt,fontSize:yt,doKerning:!1})*yt/Lr};if(Object.prototype.toString.call(u)==="[object Array]"){var xn;mt=li(u),Ft!=="left"&&(zn=mt.map(ba));var Ln,Yi=0;if(Ft==="right"){v-=zn[0],u=[],dn=mt.length;for(var Dr=0;Dr0?(te-zn[Ze])/wa:0;Ze":")"),vi=parseFloat(mt[pn][1]),bi=parseFloat(mt[pn][2]);break;case 0:Ur=(Re?"<":"(")+mt[pn]+(Re?">":")"),vi=xr(v),bi=_r(I)}pi!==void 0&&pi[pn]!==void 0&&(zr=pi[pn]+` Tw `),pn===0?u.push(zr+Xi(vi,bi,Ne)+Ur):Sr===0?u.push(zr+Ur):Sr===1&&u.push(zr+Xi(vi,bi,Ne)+Ur)}u=Sr===0?u.join(` Tj T* `):u.join(` Tj `),u+=` Tj `;var cr=`BT /`;return cr+=Bt+" "+yt+` Tf `,cr+=X(yt*cn)+` TL `,cr+=ur+` `,cr+=Te,cr+=u,P(cr+="ET"),k[Bt]=!0,Ae};var Ds=p.__private__.clip=p.clip=function(u){return P(u==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Ds("evenodd")},p.__private__.discardPath=p.discardPath=function(){return P("n"),this};var lr=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 lr(u)&&(d=u),this};var Ja=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},Ri=p.close=function(){return P("h"),this};p.stroke=function(){return P("S"),this},p.fill=function(u){return Ti("f",u),this},p.fillEvenOdd=function(u){return Ti("f*",u),this},p.fillStroke=function(u){return Ti("B",u),this},p.fillStrokeEvenOdd=function(u){return Ti("B*",u),this};var Ti=function(u,v){_e(v)==="object"?Us(v,u):P(u)},ua=function(u){u===null||q===G&&u===void 0||(u=Ja(u),P(u))};function qs(u,v,I,D,K){var lt=new xi(v||this.boundingBox,I||this.xStep,D||this.yStep,this.gState,K||this.matrix);lt.stream=this.stream;var mt=u+"$$"+this.cloneIndex+++"$$";return Tn(mt,lt),lt}var Us=function(u,v){var I=ke[u.key],D=Ut[I];if(D instanceof $r)P("q"),P(zs(v)),D.gState&&p.setGState(D.gState),P(u.matrix.toString()+" cm"),P("/"+I+" sh"),P("Q");else if(D instanceof xi){var K=new Gt(1,0,0,-1,0,oi());u.matrix&&(K=K.multiply(u.matrix||wr),I=qs.call(D,u.key,u.boundingBox,u.xStep,u.yStep,K).id),P("q"),P("/Pattern cs"),P("/"+I+" scn"),D.gState&&p.setGState(D.gState),P(v),P("Q")}},zs=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"}},Br=p.moveTo=function(u,v){return P(X(z(u))+" "+X(U(v))+" m"),this},Ka=p.lineTo=function(u,v){return P(X(z(u))+" "+X(U(v))+" l"),this},Mr=p.curveTo=function(u,v,I,D,K,lt){return P([X(z(u)),X(U(v)),X(z(I)),X(U(D)),X(z(K)),X(U(lt)),"c"].join(" ")),this};p.__private__.line=p.line=function(u,v,I,D,K){if(isNaN(u)||isNaN(v)||isNaN(I)||isNaN(D)||!lr(K))throw new Error("Invalid arguments passed to jsPDF.line");return q===V?this.lines([[I-u,D-v]],u,v,[1,1],K||"S"):this.lines([[I-u,D-v]],u,v,[1,1]).stroke()},p.__private__.lines=p.lines=function(u,v,I,D,K,lt){var mt,Et,Ft,Xt,te,de,$e,Ne,Ae,Fe,Re,Te;if(typeof u=="number"&&(Te=I,I=v,v=u,u=Te),D=D||[1,1],lt=lt||!1,isNaN(v)||isNaN(I)||!Array.isArray(u)||!Array.isArray(D)||!lr(K)||typeof lt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Br(v,I),mt=D[0],Et=D[1],Xt=u.length,Fe=v,Re=I,Ft=0;Ft>8&255,n>>16&255,n>>24&255)},na.prototype.toHexString=function(n){return n.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},na.prototype.hexToBytes=function(n){for(var e=[],t=0;t>8&255,n>>16&255,255&e,e>>8&255)).substr(0,10);return function(i){return Yo(t,i)}},Ta.prototype.equals=function(n){var e,t="id,objectNumber,equals";if(!n||_e(n)!==_e(this))return!1;var i=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!n.hasOwnProperty(e)||this[e]!==n[e])return!1;i++}for(e in n)n.hasOwnProperty(e)&&t.indexOf(e)<0&&i--;return i===0},Mt.API={events:[]},Mt.version="4.2.1";var ze=Mt.API,tl=1,Ci=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ta=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Pi=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},$t=function(n){return n.toFixed(2)},Xr=function(n){return n.toFixed(5)};ze.__acroform__={};var Pn=function(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n},Fu=function(n){return n*tl},pr=function(n){var e=new Ff,t=It.internal.getHeight(n)||0,i=It.internal.getWidth(n)||0;return e.BBox=[0,0,Number($t(i)),Number($t(t))],e},B1=ze.__acroform__.setBit=function(n,e){if(n=n||0,e=e||0,isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<0;){e="",a--;var d,m,_=Ss("3",n,a).height,k=n.multiline?c-a:(c-_)/2,p=k+=2,j=0,O=0,M=0;if(a<=0){e=`(...) Tj `,e+="% Width of Text: "+Ss(e,n,a=12).width+", FieldWidth:"+l+` `;break}for(var S="",V=0,G=0;Gc)continue t;S+=s[G][M],q=!0,O=G,G--}else{S=(S+=s[G][M]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var it=parseInt(G),vt=h(it,S,a),dt=G>=s.length-1;if(vt&&!dt){S+=" ",M=0;continue}if(vt||dt){if(dt)O=it;else if(n.multiline&&(_+2)*(V+2)+2>c)continue t}else{if(!n.multiline||(_+2)*(V+2)+2>c)continue t;O=it}}for(var X="",R=j;R<=O;R++){var tt=s[R];if(n.multiline){if(R===O){X+=tt[M]+" ",M=(M+1)%tt.length;continue}if(R===j){X+=tt[tt.length-1]+" ";continue}}X+=tt[0]+" "}switch(X=X.substr(X.length-1)==" "?X.substr(0,X.length-1):X,m=Ss(X,n,a).width,n.textAlign){case"right":d=l-m-2;break;case"center":d=(l-m)/2;break;default:d=2}e+=$t(d)+" "+$t(p)+` Td `,e+="("+Ci(X)+`) Tj `,e+=-$t(d)+` 0 Td `,p=-(a+2),m=0,j=q?O:O+1,V++,S=""}break}return i.text=e,i.fontSize=a,i},Ss=function(n,e,t){var i=e.scope.internal.getFont(e.fontName,e.fontStyle),s=e.scope.getStringUnitWidth(n,{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:s}},q1={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},U1=function(n,e){var t={type:"reference",object:n};e.internal.getPageInfo(n.page).pageContext.annotations.find(function(i){return i.type===t.type&&i.object===t.object})===void 0&&e.internal.getPageInfo(n.page).pageContext.annotations.push(t)},z1=function(n,e){if(e.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(er.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(q1)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");tl=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new Ef,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.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})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];a.objId=void 0,a.hasAnnotation&&U1(a,t)}})(n)}),n.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")})(n)}),n.internal.events.subscribe("postPutPages",function(t){(function(i,s){var a=!i;for(var c in i||(s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||s.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(c)){var l=i[c],h=[],d=l.Rect;if(l.Rect&&(l.Rect=T1(l.Rect,s)),s.internal.newObjectDeferredBegin(l.objId,!0),l.DA=It.createDefaultAppearanceStream(l),_e(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(h=l.getKeyValueListForStream()),l.Rect=d,l.hasAppearanceStream&&!l.appearanceStreamContent){var m=D1(l);h.push({key:"AP",value:"<>"}),s.internal.acroformPlugin.xForms.push(m)}if(l.appearanceStreamContent){var _="";for(var k in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(k)){var p=l.appearanceStreamContent[k];if(_+="/"+k+" ",_+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var c in p)if(p.hasOwnProperty(c)){var j=p[c];typeof j=="function"&&(j=j.call(s,l)),_+="/"+c+" "+j+" ",s.internal.acroformPlugin.xForms.indexOf(j)>=0||s.internal.acroformPlugin.xForms.push(j)}}else typeof(j=p)=="function"&&(j=j.call(s,l)),_+="/"+c+" "+j,s.internal.acroformPlugin.xForms.indexOf(j)>=0||s.internal.acroformPlugin.xForms.push(j);_+=">>"}h.push({key:"AP",value:`<< `+_+">>"})}s.internal.putStream({additionalKeyValues:h,objectId:l.objId}),s.internal.out("endobj")}a&&function(O,M){for(var S in O)if(O.hasOwnProperty(S)){var V=S,G=O[S];M.internal.newObjectDeferredBegin(G.objId,!0),_e(G)==="object"&&typeof G.putStream=="function"&&G.putStream(),delete O[V]}}(s.internal.acroformPlugin.xForms,s)})(t,n)}),n.internal.acroformPlugin.isInitialized=!0}},Cf=ze.__acroform__.arrayToPdfArray=function(n,e,t){var i=function(c){return c};if(Array.isArray(n)){for(var s="[",a=0;a0?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(n){var t=function(i){return i};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Ci(t(n))+")"}},set:function(t){n=t}})};Pn(Ef,gr);var er=function n(){gr.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!!Ye(e,3)},set:function(S){S?this.F=Je(e,3):this.F=Ke(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 s="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return s},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":s=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof Es)return;a="FieldObject"+n.FieldNum++}var S=function(V){return V};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+Ci(S(a))+")"},set:function(S){a=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(S){a=S}});var c="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return c},set:function(S){c=S}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(S){l=S}});var h=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return h},set:function(S){h=S}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/tl: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 _="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!_||this instanceof Es||this instanceof Qr))return jo(_,this.objId,this.scope)},set:function(S){S=S.toString(),_=S}});var k=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(k)return this instanceof rn==0?jo(k,this.objId,this.scope):k},set:function(S){S=S.toString(),k=this instanceof rn==0?S.substr(0,1)==="("?ta(S.substr(1,S.length-2)):ta(S):S}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?ta(k.substr(1,k.length-1)):k},set:function(S){S=S.toString(),k=this instanceof rn==1?"/"+Pi(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 rn==0?jo(p,this.objId,this.scope):p},set:function(S){S=S.toString(),p=this instanceof rn==0?S.substr(0,1)==="("?ta(S.substr(1,S.length-2)):ta(S):S}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof rn==1?ta(p.substr(1,p.length-1)):p},set:function(S){S=S.toString(),p=this instanceof rn==1?"/"+Pi(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 j,O=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return O},set:function(S){S=!!S,O=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(j)return j},set:function(S){j=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,1)},set:function(S){S?this.Ff=Je(this.Ff,1):this.Ff=Ke(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,2)},set:function(S){S?this.Ff=Je(this.Ff,2):this.Ff=Ke(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,3)},set:function(S){S?this.Ff=Je(this.Ff,3):this.Ff=Ke(this.Ff,3)}});var M=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(M!==null)return M},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');M=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(M){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:M=2;break;case"center":case 1:M=1;break;default:M=0}}})};Pn(er,gr);var _i=function(){er.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){n=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Cf(e,this.objId,this.scope)},set:function(t){var i,s;s=[],typeof(i=t)=="string"&&(s=function(a,c,l){l||(l=1);for(var h,d=[];h=c.exec(a);)d.push(h[l]);return d}(i,/\((.*?)\)/g)),e=s}}),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!!Ye(this.Ff,18)},set:function(t){t?this.Ff=Je(this.Ff,18):this.Ff=Ke(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Je(this.Ff,19):this.Ff=Ke(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,20)},set:function(t){t?(this.Ff=Je(this.Ff,20),e.sort()):this.Ff=Ke(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,22)},set:function(t){t?this.Ff=Je(this.Ff,22):this.Ff=Ke(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,23)},set:function(t){t?this.Ff=Je(this.Ff,23):this.Ff=Ke(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,27)},set:function(t){t?this.Ff=Je(this.Ff,27):this.Ff=Ke(this.Ff,27)}}),this.hasAppearanceStream=!1};Pn(_i,er);var Ai=function(){_i.call(this),this.fontName="helvetica",this.combo=!1};Pn(Ai,_i);var Ni=function(){Ai.call(this),this.combo=!0};Pn(Ni,Ai);var Ea=function(){Ni.call(this),this.edit=!0};Pn(Ea,Ni);var rn=function(){er.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,15)},set:function(t){t?this.Ff=Je(this.Ff,15):this.Ff=Ke(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,16)},set:function(t){t?this.Ff=Je(this.Ff,16):this.Ff=Ke(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,17)},set:function(t){t?this.Ff=Je(this.Ff,17):this.Ff=Ke(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,26)},set:function(t){t?this.Ff=Je(this.Ff,26):this.Ff=Ke(this.Ff,26)}});var n,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(a){return a};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var i,s=[];for(i in s.push("<<"),e)s.push("/"+i+" ("+Ci(t(e[i]))+")");return s.push(">>"),s.join(` `)}},set:function(t){_e(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 n},set:function(t){var i=t==null?"":t.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),n="/"+Pi(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+Pi(t)}})};Pn(rn,er);var Oa=function(){rn.call(this),this.pushButton=!0};Pn(Oa,rn);var Li=function(){rn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e!==void 0?e:[]}})};Pn(Li,rn);var Es=function(){var n,e;er.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(s){n=s}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(s){e=s}});var t,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var s=function(l){return l};this.scope&&(s=this.scope.internal.getEncryptor(this.objId));var a,c=[];for(a in c.push("<<"),i)c.push("/"+a+" ("+Ci(s(i[a]))+")");return c.push(">>"),c.join(` `)},set:function(s){_e(s)==="object"&&(i=s)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(s){typeof s=="string"&&(i.CA=s)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(s){var a=s==null?"":s.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),t="/"+Pi(a)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(s){var a=s==null?"":s.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),t="/"+Pi(a)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=It.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Pn(Es,er),Li.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))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=n.createAppearanceStream(t.optionName),t.caption=n.getCA()}},Li.prototype.createOption=function(n){var e=new Es;return e.Parent=this,e.optionName=n,this.Kids.push(e),H1.call(this.scope,e),e};var ja=function(){rn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=It.CheckBox.createAppearanceStream()};Pn(ja,rn);var Qr=function(){er.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,13)},set:function(e){e?this.Ff=Je(this.Ff,13):this.Ff=Ke(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,21)},set:function(e){e?this.Ff=Je(this.Ff,21):this.Ff=Ke(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,23)},set:function(e){e?this.Ff=Je(this.Ff,23):this.Ff=Ke(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,24)},set:function(e){e?this.Ff=Je(this.Ff,24):this.Ff=Ke(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,25)},set:function(e){e?this.Ff=Je(this.Ff,25):this.Ff=Ke(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,26)},set:function(e){e?this.Ff=Je(this.Ff,26):this.Ff=Ke(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){Number.isInteger(e)&&(n=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Pn(Qr,er);var Ba=function(){Qr.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ye(this.Ff,14)},set:function(n){n?this.Ff=Je(this.Ff,14):this.Ff=Ke(this.Ff,14)}}),this.password=!0};Pn(Ba,Qr);var It={CheckBox:{createAppearanceStream:function(){return{N:{On:It.CheckBox.YesNormal},D:{On:It.CheckBox.YesPushDown,Off:It.CheckBox.OffPushDown}}},YesPushDown:function(n){var e=pr(n);e.scope=n.scope;var t=[],i=n.scope.internal.getFont(n.fontName,n.fontStyle).id,s=n.scope.__private__.encodeColorString(n.color),a=Jo(n,n.caption);return t.push("0.749023 g"),t.push("0 0 "+$t(It.internal.getWidth(n))+" "+$t(It.internal.getHeight(n))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+i+" "+$t(a.fontSize)+" Tf "+s),t.push("BT"),t.push(a.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(` `),e},YesNormal:function(n){var e=pr(n);e.scope=n.scope;var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,i=n.scope.__private__.encodeColorString(n.color),s=[],a=It.internal.getHeight(n),c=It.internal.getWidth(n),l=Jo(n,n.caption);return s.push("1 g"),s.push("0 0 "+$t(c)+" "+$t(a)+" re"),s.push("f"),s.push("q"),s.push("0 0 1 rg"),s.push("0 0 "+$t(c-1)+" "+$t(a-1)+" re"),s.push("W"),s.push("n"),s.push("0 g"),s.push("BT"),s.push("/"+t+" "+$t(l.fontSize)+" Tf "+i),s.push(l.text),s.push("ET"),s.push("Q"),e.stream=s.join(` `),e},OffPushDown:function(n){var e=pr(n);e.scope=n.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+$t(It.internal.getWidth(n))+" "+$t(It.internal.getHeight(n))+" re"),t.push("f"),e.stream=t.join(` `),e}},RadioButton:{Circle:{createAppearanceStream:function(n){var e={D:{Off:It.RadioButton.Circle.OffPushDown},N:{}};return e.N[n]=It.RadioButton.Circle.YesNormal,e.D[n]=It.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(n){var e=pr(n);e.scope=n.scope;var t=[],i=It.internal.getWidth(n)<=It.internal.getHeight(n)?It.internal.getWidth(n)/4:It.internal.getHeight(n)/4;i=Number((.9*i).toFixed(5));var s=It.internal.Bezier_C,a=Number((i*s).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Xr(It.internal.getWidth(n)/2)+" "+Xr(It.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(` `),e},YesPushDown:function(n){var e=pr(n);e.scope=n.scope;var t=[],i=It.internal.getWidth(n)<=It.internal.getHeight(n)?It.internal.getWidth(n)/4:It.internal.getHeight(n)/4;i=Number((.9*i).toFixed(5));var s=Number((2*i).toFixed(5)),a=Number((s*It.internal.Bezier_C).toFixed(5)),c=Number((i*It.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Xr(It.internal.getWidth(n)/2)+" "+Xr(It.internal.getHeight(n)/2)+" cm"),t.push(s+" 0 m"),t.push(s+" "+a+" "+a+" "+s+" 0 "+s+" c"),t.push("-"+a+" "+s+" -"+s+" "+a+" -"+s+" 0 c"),t.push("-"+s+" -"+a+" -"+a+" -"+s+" 0 -"+s+" c"),t.push(a+" -"+s+" "+s+" -"+a+" "+s+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Xr(It.internal.getWidth(n)/2)+" "+Xr(It.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+c+" "+c+" "+i+" 0 "+i+" c"),t.push("-"+c+" "+i+" -"+i+" "+c+" -"+i+" 0 c"),t.push("-"+i+" -"+c+" -"+c+" -"+i+" 0 -"+i+" c"),t.push(c+" -"+i+" "+i+" -"+c+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(` `),e},OffPushDown:function(n){var e=pr(n);e.scope=n.scope;var t=[],i=It.internal.getWidth(n)<=It.internal.getHeight(n)?It.internal.getWidth(n)/4:It.internal.getHeight(n)/4;i=Number((.9*i).toFixed(5));var s=Number((2*i).toFixed(5)),a=Number((s*It.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Xr(It.internal.getWidth(n)/2)+" "+Xr(It.internal.getHeight(n)/2)+" cm"),t.push(s+" 0 m"),t.push(s+" "+a+" "+a+" "+s+" 0 "+s+" c"),t.push("-"+a+" "+s+" -"+s+" "+a+" -"+s+" 0 c"),t.push("-"+s+" -"+a+" -"+a+" -"+s+" 0 -"+s+" c"),t.push(a+" -"+s+" "+s+" -"+a+" "+s+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(` `),e}},Cross:{createAppearanceStream:function(n){var e={D:{Off:It.RadioButton.Cross.OffPushDown},N:{}};return e.N[n]=It.RadioButton.Cross.YesNormal,e.D[n]=It.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(n){var e=pr(n);e.scope=n.scope;var t=[],i=It.internal.calculateCross(n);return t.push("q"),t.push("1 1 "+$t(It.internal.getWidth(n)-2)+" "+$t(It.internal.getHeight(n)-2)+" re"),t.push("W"),t.push("n"),t.push($t(i.x1.x)+" "+$t(i.x1.y)+" m"),t.push($t(i.x2.x)+" "+$t(i.x2.y)+" l"),t.push($t(i.x4.x)+" "+$t(i.x4.y)+" m"),t.push($t(i.x3.x)+" "+$t(i.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(` `),e},YesPushDown:function(n){var e=pr(n);e.scope=n.scope;var t=It.internal.calculateCross(n),i=[];return i.push("0.749023 g"),i.push("0 0 "+$t(It.internal.getWidth(n))+" "+$t(It.internal.getHeight(n))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+$t(It.internal.getWidth(n)-2)+" "+$t(It.internal.getHeight(n)-2)+" re"),i.push("W"),i.push("n"),i.push($t(t.x1.x)+" "+$t(t.x1.y)+" m"),i.push($t(t.x2.x)+" "+$t(t.x2.y)+" l"),i.push($t(t.x4.x)+" "+$t(t.x4.y)+" m"),i.push($t(t.x3.x)+" "+$t(t.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join(` `),e},OffPushDown:function(n){var e=pr(n);e.scope=n.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+$t(It.internal.getWidth(n))+" "+$t(It.internal.getHeight(n))+" re"),t.push("f"),e.stream=t.join(` `),e}}},createDefaultAppearanceStream:function(n){var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,t=n.scope.__private__.encodeColorString(n.color);return"/"+e+" "+n.fontSize+" Tf "+t}};It.internal={Bezier_C:.551915024494,calculateCross:function(n){var e=It.internal.getWidth(n),t=It.internal.getHeight(n),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}}}},It.internal.getWidth=function(n){var e=0;return _e(n)==="object"&&(e=Fu(n.Rect[2])),e},It.internal.getHeight=function(n){var e=0;return _e(n)==="object"&&(e=Fu(n.Rect[3])),e};var H1=ze.addField=function(n){if(z1(this,n),!(n instanceof er))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=n).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};ze.AcroFormChoiceField=_i,ze.AcroFormListBox=Ai,ze.AcroFormComboBox=Ni,ze.AcroFormEditBox=Ea,ze.AcroFormButton=rn,ze.AcroFormPushButton=Oa,ze.AcroFormRadioButton=Li,ze.AcroFormCheckBox=ja,ze.AcroFormTextField=Qr,ze.AcroFormPasswordField=Ba,ze.AcroFormAppearance=It,ze.AcroForm={ChoiceField:_i,ListBox:Ai,ComboBox:Ni,EditBox:Ea,Button:rn,PushButton:Oa,RadioButton:Li,CheckBox:ja,TextField:Qr,PasswordField:Ba,Appearance:It},Mt.AcroForm={ChoiceField:_i,ListBox:Ai,ComboBox:Ni,EditBox:Ea,Button:rn,PushButton:Oa,RadioButton:Li,CheckBox:ja,TextField:Qr,PasswordField:Ba,Appearance:It};var W1=Mt.AcroForm;function Of(n){return n.reduce(function(e,t,i){return e[t]=i,e},{})}(function(n){var e="addImage_";n.__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]]},s=n.__addimage__.getImageFileTypeByImageData=function(N,E){var z,U,rt,ot,ft,nt=t;if((E=E||t)==="RGBA"||N.data!==void 0&&N.data instanceof Uint8ClampedArray&&"height"in N&&"width"in N)return"RGBA";if(vt(N))for(ft in i)for(rt=i[ft],z=0;z>"}),"transparency"in E&&Array.isArray(E.transparency)&&E.transparency.length>0){for(var ft="",nt=0,ct=E.transparency.length;nt>",O.content=a;var G=O.objId+" 0 R";a="<>";else if(i.options.pageNumber)switch(a="<=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(O){return c(O)&&a(O)&&e[O.charCodeAt(0)].length>=1};var d=n.__arabicParser__.arabicLetterHasFinalForm=function(O){return c(O)&&a(O)&&e[O.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(O){return c(O)&&a(O)&&e[O.charCodeAt(0)].length>=3};var m=n.__arabicParser__.arabicLetterHasMedialForm=function(O){return c(O)&&a(O)&&e[O.charCodeAt(0)].length==4},_=n.__arabicParser__.resolveLigatures=function(O){var M=0,S=t,V="",G=0;for(M=0;M>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(n){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 s=300;Object.defineProperty(this,"height",{get:function(){return s},set:function(l){s=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=s+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(l){a=l}});var c={};Object.defineProperty(this,"style",{get:function(){return c},set:function(l){c=l}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,i){var s;if((t=t||"2d")!=="2d")return null;for(s in i)this.pdf.context2d.hasOwnProperty(s)&&(this.pdf.context2d[s]=i[s]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(Mt.API),function(n){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(),s.call(this))},s=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var h=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return h},set:function(O){h=O}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(O){d=O}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(O){m=O}});var _=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return _},set:function(O){_=O}});var k=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return k},set:function(O){k=O}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(O){p=O}});var j=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return j},set:function(O){j=O}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(h){return i.call(this),this.internal.__cell__.headerFunction=typeof h=="function"?h:void 0,this},n.getTextDimensions=function(h,d){i.call(this);var m=(d=d||{}).fontSize||this.getFontSize(),_=d.font||this.getFont(),k=d.scaleFactor||this.internal.scaleFactor,p=0,j=0,O=0,M=this;if(!Array.isArray(h)&&typeof h!="string"){if(typeof h!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");h=String(h)}var S=d.maxWidth;S>0?typeof h=="string"?h=this.splitTextToSize(h,S):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(G,q){return G.concat(M.splitTextToSize(q,S))},[])):h=Array.isArray(h)?h:[h];for(var V=0;Vthis.getPageHeight()?(this.cellAddPage(),h.y=_.top,p&&k&&(this.printHeaderRow(h.lineNumber,!0),h.y+=k[0].height)):h.y=d.y+d.height||h.y),h.text[0]!==void 0&&(this.rect(h.x,h.y,h.width,h.height,t===!0?"FD":void 0),h.align==="right"?this.text(h.text,h.x+h.width-m,h.y+m,{align:"right",baseline:"top"}):h.align==="center"?this.text(h.text,h.x+h.width/2,h.y+m,{align:"center",baseline:"top",maxWidth:h.width-m-m}):this.text(h.text,h.x+m,h.y+m,{align:"left",baseline:"top",maxWidth:h.width-m-m})),this.internal.__cell__.lastCell=h,this};n.table=function(h,d,m,_,k){if(i.call(this),!m)throw new Error("No data for PDF table.");var p,j,O,M,S=[],V=[],G=[],q={},it={},vt=[],dt=[],X=(k=k||{}).autoSize||!1,R=k.printHeaders!==!1,tt=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),E=typeof k.padding=="number"?k.padding:3,z=k.headerBackgroundColor||"#c8c8c8",U=k.headerTextColor||"#000";if(s.call(this),this.internal.__cell__.printHeaders=R,this.internal.__cell__.margins=N,this.internal.__cell__.table_font_size=tt,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=z,this.internal.__cell__.headerTextColor=U,this.setFontSize(tt),_==null)V=S=Object.keys(m[0]),G=S.map(function(){return"left"});else if(Array.isArray(_)&&_e(_[0])==="object")for(S=_.map(function(At){return At.name}),V=_.map(function(At){return At.prompt||At.name||""}),G=_.map(function(At){return At.align||"left"}),p=0;p<_.length;p+=1)it[_[p].name]=.7499990551181103*_[p].width;else Array.isArray(_)&&typeof _[0]=="string"&&(V=S=_,G=S.map(function(){return"left"}));if(X||Array.isArray(_)&&typeof _[0]=="string")for(p=0;p0&&this.setTableHeaderRow(k),this.setFont(void 0,"normal"),t=!1}}(Mt.API);var jf={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Bf=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Ko=Of(Bf),Mf=[100,200,300,400,500,600,700,800,900],V1=Of(Mf);function Bo(n){var e=n.family.replace(/"|'/g,"").toLowerCase(),t=function(a){return jf[a=a||"normal"]?a:"normal"}(n.style),i=function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400}(n.weight),s=function(a){return typeof Ko[a=a||"normal"]=="number"?a:"normal"}(n.stretch);return{family:e,style:t,weight:i,stretch:s,src:n.src||[],ref:n.ref||{name:e,style:[s,t,i].join(" ")}}}function Eu(n,e,t,i){var s;for(s=t;s>=0&&s=0&&s>>1)&255}return s}function Hu(n,e,t){var i=n.length,s=[];s[0]=4;for(var a=0;a>a&c}function Wu(n,e,t,i){var s=t*i,a=Math.floor(s/8),c=16-(s-8*a+i),l=(1<>8&255;d.setUint8(m,k)}})(n,a,Rf(n,a)&~(l<>7,c=1<<1+(7&s);n[e++],n[e++];var l=null,h=null;a&&(l=e,h=c,e+=3*c);var d=!0,m=[],_=0,k=null,p=0,j=null;for(this.width=t,this.height=i;d&&e=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;case 249:if(n[e++]!==4||n[e+4]!==0)throw new Error("Invalid graphics extension block.");var O=n[e++];_=n[e++]|n[e++]<<8,k=n[e++],1&O||(k=null),p=O>>2&7,e++;break;case 254:for(;;){if(!((N=n[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}break;default:throw new Error("Unknown graphic control label: 0x"+n[e-1].toString(16))}break;case 44:var M=n[e++]|n[e++]<<8,S=n[e++]|n[e++]<<8,V=n[e++]|n[e++]<<8,G=n[e++]|n[e++]<<8,q=n[e++],it=q>>6&1,vt=1<<1+(7&q),dt=l,X=h,R=!1;q>>7&&(R=!0,dt=e,X=vt,e+=3*vt);var tt=e;for(e++;;){var N;if(!((N=n[e++])>=0))throw Error("Invalid block size");if(N===0)break;e+=N}m.push({x:M,y:S,width:V,height:G,has_local_palette:R,palette_offset:dt,palette_size:X,data_offset:tt,data_length:e-tt,transparent_index:k,interlaced:!!it,delay:_,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+n[e-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return j},this.frameInfo=function(E){if(E<0||E>=m.length)throw new Error("Frame index out of range.");return m[E]},this.decodeAndBlitFrameBGRA=function(E,z){var U=this.frameInfo(E),rt=U.width*U.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ot=new Uint8Array(rt);Vu(n,U.data_offset,ot,rt);var ft=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ct=U.width,At=t-ct,wt=ct,x=4*(U.y*t+U.x),B=4*((U.y+U.height)*t+U.x),T=x,H=4*At;U.interlaced===!0&&(H+=4*t*7);for(var J=8,Z=0,at=ot.length;Z=B&&(H=4*At+4*t*(J-1),T=x+(ct+At)*(J<<1),J>>=1)),st===nt)T+=4;else{var gt=n[ft+3*st],_t=n[ft+3*st+1],kt=n[ft+3*st+2];z[T++]=kt,z[T++]=_t,z[T++]=gt,z[T++]=255}--wt}},this.decodeAndBlitFrameRGBA=function(E,z){var U=this.frameInfo(E),rt=U.width*U.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ot=new Uint8Array(rt);Vu(n,U.data_offset,ot,rt);var ft=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var ct=U.width,At=t-ct,wt=ct,x=4*(U.y*t+U.x),B=4*((U.y+U.height)*t+U.x),T=x,H=4*At;U.interlaced===!0&&(H+=4*t*7);for(var J=8,Z=0,at=ot.length;Z=B&&(H=4*At+4*t*(J-1),T=x+(ct+At)*(J<<1),J>>=1)),st===nt)T+=4;else{var gt=n[ft+3*st],_t=n[ft+3*st+1],kt=n[ft+3*st+2];z[T++]=gt,z[T++]=_t,z[T++]=kt,z[T++]=255}--wt}}}function Vu(n,e,t,i){for(var s=n[e++],a=1<>=h,m-=h,M!==a){if(M===c)break;for(var S=Ma;)G=j[G]>>8,++V;var q=G;if(k+V+(S!==M?1:0)>i)return void Se.log("Warning, gif stream longer than expected.");t[k++]=q;var it=k+=V;for(S!==M&&(t[k++]=q),G=S;V--;)G=j[G],t[--it]=255&G,G>>=8;O!==null&&l<4096&&(j[l++]=O<<8|q,l>=d+1&&h<12&&(++h,d=d<<1|1)),O=M}else l=c+1,d=(1<<(h=s+1))-1,O=null}return k!==i&&Se.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 To(n){var e,t,i,s,a,c=Math.floor,l=new Array(64),h=new Array(64),d=new Array(64),m=new Array(64),_=new Array(65535),k=new Array(65535),p=new Array(64),j=new Array(64),O=[],M=0,S=7,V=new Array(64),G=new Array(64),q=new Array(64),it=new Array(256),vt=new Array(2048),dt=[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],X=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],tt=[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],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[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],rt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ot(x,B){for(var T=0,H=0,J=new Array,Z=1;Z<=16;Z++){for(var at=1;at<=x[Z];at++)J[B[H]]=[],J[B[H]][0]=T,J[B[H]][1]=Z,H++,T++;T*=2}return J}function ft(x){for(var B=x[0],T=x[1]-1;T>=0;)B&1<>8&255),nt(255&x)}function At(x,B,T,H,J){for(var Z,at=J[0],st=J[240],gt=function(yt,Wt){var Ct,zt,qt,ve,ue,Zt,he,fe,Bt,ne,Tt=0;for(Bt=0;Bt<8;++Bt){Ct=yt[Tt],zt=yt[Tt+1],qt=yt[Tt+2],ve=yt[Tt+3],ue=yt[Tt+4],Zt=yt[Tt+5],he=yt[Tt+6];var He=Ct+(fe=yt[Tt+7]),ge=Ct-fe,se=zt+he,oe=zt-he,je=qt+Zt,Ut=qt-Zt,ke=ve+ue,Yt=ve-ue,Qt=He+ke,Be=He-ke,le=se+je,Vt=se-je;yt[Tt]=Qt+le,yt[Tt+4]=Qt-le;var be=.707106781*(Vt+Be);yt[Tt+2]=Be+be,yt[Tt+6]=Be-be;var ei=.382683433*((Qt=Yt+Ut)-(Vt=oe+ge)),hn=.5411961*Qt+ei,vr=1.306562965*Vt+ei,rr=.707106781*(le=Ut+oe),Gt=ge+rr,br=ge-rr;yt[Tt+5]=br+hn,yt[Tt+3]=br-hn,yt[Tt+1]=Gt+vr,yt[Tt+7]=Gt-vr,Tt+=8}for(Tt=0,Bt=0;Bt<8;++Bt){Ct=yt[Tt],zt=yt[Tt+8],qt=yt[Tt+16],ve=yt[Tt+24],ue=yt[Tt+32],Zt=yt[Tt+40],he=yt[Tt+48];var wr=Ct+(fe=yt[Tt+56]),Tn=Ct-fe,Dn=zt+he,De=zt-he,an=qt+Zt,sn=qt-Zt,ni=ve+ue,jr=ve-ue,Gn=wr+ni,ir=wr-ni,Yn=Dn+an,Jn=Dn-an;yt[Tt]=Gn+Yn,yt[Tt+32]=Gn-Yn;var qn=.707106781*(Jn+ir);yt[Tt+16]=ir+qn,yt[Tt+48]=ir-qn;var ri=.382683433*((Gn=jr+sn)-(Jn=De+Tn)),ar=.5411961*Gn+ri,ii=1.306562965*Jn+ri,Fi=.707106781*(Yn=sn+De),Ei=Tn+Fi,Oi=Tn-Fi;yt[Tt+40]=Oi+ar,yt[Tt+24]=Oi-ar,yt[Tt+8]=Ei+ii,yt[Tt+56]=Ei-ii,Tt++}for(Bt=0;Bt<64;++Bt)ne=yt[Bt]*Wt[Bt],p[Bt]=ne>0?ne+.5|0:ne-.5|0;return p}(x,B),_t=0;_t<64;++_t)j[dt[_t]]=gt[_t];var kt=j[0]-T;T=j[0],kt==0?ft(H[0]):(ft(H[k[Z=32767+kt]]),ft(_[Z]));for(var St=63;St>0&&j[St]==0;)St--;if(St==0)return ft(at),T;for(var Dt,P=1;P<=St;){for(var Lt=P;j[P]==0&&P<=St;)++P;var ae=P-Lt;if(ae>=16){Dt=ae>>4;for(var Ht=1;Ht<=Dt;++Ht)ft(st);ae&=15}Z=32767+j[P],ft(J[(ae<<4)+k[Z]]),ft(_[Z]),P++}return St!=63&&ft(at),T}function wt(x){x=Math.min(Math.max(x,1),100),a!=x&&(function(B){for(var T=[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],H=0;H<64;H++){var J=c((T[H]*B+50)/100);J=Math.min(Math.max(J,1),255),l[dt[H]]=J}for(var Z=[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],at=0;at<64;at++){var st=c((Z[at]*B+50)/100);st=Math.min(Math.max(st,1),255),h[dt[at]]=st}for(var gt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],_t=0,kt=0;kt<8;kt++)for(var St=0;St<8;St++)d[_t]=1/(l[dt[_t]]*gt[kt]*gt[St]*8),m[_t]=1/(h[dt[_t]]*gt[kt]*gt[St]*8),_t++}(x<50?Math.floor(5e3/x):Math.floor(200-2*x)),a=x)}this.encode=function(x,B){B&&wt(B),O=new Array,M=0,S=7,ct(65496),ct(65504),ct(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),ct(1),ct(1),nt(0),nt(0),function(){ct(65499),ct(132),nt(0);for(var zt=0;zt<64;zt++)nt(l[zt]);nt(1);for(var qt=0;qt<64;qt++)nt(h[qt])}(),function(zt,qt){ct(65472),ct(17),nt(8),ct(qt),ct(zt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)}(x.width,x.height),function(){ct(65476),ct(418),nt(0);for(var zt=0;zt<16;zt++)nt(X[zt+1]);for(var qt=0;qt<=11;qt++)nt(R[qt]);nt(16);for(var ve=0;ve<16;ve++)nt(tt[ve+1]);for(var ue=0;ue<=161;ue++)nt(N[ue]);nt(1);for(var Zt=0;Zt<16;Zt++)nt(E[Zt+1]);for(var he=0;he<=11;he++)nt(z[he]);nt(17);for(var fe=0;fe<16;fe++)nt(U[fe+1]);for(var Bt=0;Bt<=161;Bt++)nt(rt[Bt])}(),ct(65498),ct(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var T=0,H=0,J=0;M=0,S=7,this.encode.displayName="_encode_";for(var Z,at,st,gt,_t,kt,St,Dt,P,Lt=x.data,ae=x.width,Ht=x.height,yt=4*ae,Wt=0;Wt>3)*yt+(St=4*(7&P)),Wt+Dt>=Ht&&(kt-=yt*(Wt+1+Dt-Ht)),Z+St>=yt&&(kt-=Z+St-yt+4),at=Lt[kt++],st=Lt[kt++],gt=Lt[kt++],V[P]=(vt[at]+vt[st+256|0]+vt[gt+512|0]>>16)-128,G[P]=(vt[at+768|0]+vt[st+1024|0]+vt[gt+1280|0]>>16)-128,q[P]=(vt[at+1280|0]+vt[st+1536|0]+vt[gt+1792|0]>>16)-128;T=At(V,d,T,e,i),H=At(G,m,H,t,s),J=At(q,m,J,t,s),Z+=32}Wt+=8}if(S>=0){var Ct=[];Ct[1]=S+1,Ct[0]=(1<E;E++)if(R[tt+E]!=N.charCodeAt(E))return!0;return!1}function i(R,tt,N,E,z){for(var U=0;UU+1?[]:new tt),!(rt.length>>0;r&f;)f>>>=1;return f?(r&f-1)+f:r}function N(r,o,f,g,b){e(!(g%f));do r[o+(g-=f)]=b;while(0=b),512>=b)var w=a(512);else if((w=a(b))==null)return 0;return function(y,A,L,C,W,et){var F,Y,$=A,ut=1<F;++F){if(Q[F]>1<(re-=Q[F]))return 0;for(;0=F;++F,W<<=1){if(Pt+=re<<=1,0>(re-=Q[F]))return 0;for(;0xt&&!(0>=(pt-=Q[xt]));)++xt,pt<<=1;ut+=Ot=1<<(pt=xt-L),y[A+(xt=Rt&bt)].g=pt+L,y[A+xt].value=$-A-xt}C.g=F-L,C.value=et[Y++],N(y,$+(Rt>>L),W,Ot,C),Rt=tt(Rt,F)}}return Pt!=2*ht[15]-1?0:ut}(r,o,f,g,b,w)}function z(){this.value=this.g=0}function U(){this.value=this.g=0}function rt(){this.G=c(5,z),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=c(Gi,U)}function ot(r,o,f,g){e(r!=null),e(o!=null),e(2147483648>g),r.Ca=254,r.I=0,r.b=-8,r.Ka=0,r.oa=o,r.pa=f,r.Jd=o,r.Yc=f+g,r.Zc=4<=g?f+g-4+1:f,at(r)}function ft(r,o){for(var f=0;0g),r.Sb=g,r.Ra=0,r.u=0,r.h=0,4>>=8,r.Ra+=r.oa[r.pa+r.bb]<>>0,++r.bb,r.u-=8;H(r)&&(r.h=1,r.u=0)}function wt(r,o){if(e(0<=o),!r.h&&o<=ba){var f=T(r)&pi[o];return r.u+=o,At(r),f}return r.h=1,r.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 B(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function T(r){return r.Ra>>>(r.u&xn-1)>>>0}function H(r){return e(r.bb<=r.Sb),r.h||r.bb==r.Sb&&r.u>xn}function J(r,o){r.u=o,r.h=H(r)}function Z(r){r.u>=Ln&&(e(r.u>=Ln),At(r))}function at(r){e(r!=null&&r.oa!=null),r.pa>>0,r.b+=8):(e(r!=null&&r.oa!=null),r.par.b&&at(r);var g=r.b,b=f*o>>>8,w=(r.I>>>g>b)+0;for(w?(f-=b,r.I-=b+1<>>0):f=b+1,g=f,b=0;256<=g;)b+=8,g>>=8;return g=7^b+Yi[g],r.b-=g,r.Ca=(f<>24&255,r[o+1]=f>>16&255,r[o+2]=f>>8&255,r[o+3]=255&f}function kt(r,o){return r[o+0]|r[o+1]<<8}function St(r,o){return kt(r,o)|r[o+2]<<16}function Dt(r,o){return kt(r,o)|kt(r,o+2)<<16}function P(r,o){var f=1<=b||0>=w?0:(f[0]=b,g[0]=w,1)}function yt(r,o){return r+(1<>>o}function Wt(r,o){return((4278255360&r)+(4278255360&o)>>>0&4278255360)+((16711935&r)+(16711935&o)>>>0&16711935)>>>0}function Ct(r,o){R[o]=function(f,g,b,w,y,A,L){var C;for(C=0;C>>1)+(r&o)>>>0}function ve(r){return 0<=r&&256>r?r:0>r?0:255>1))}function Zt(r,o,f){return Math.abs(o-f)-Math.abs(r-f)}function he(r,o,f,g,b,w,y){for(g=w[y-1],f=0;f>8&255,L=16711935&(L=(L=16711935&y)+((A<<16)+A));g[b+w]=(4278255360&y)+L>>>0}}function Bt(r,o){o.jd=255&r,o.hd=r>>8&255,o.ud=r>>16&255}function ne(r,o,f,g,b,w){var y;for(y=0;y>>8,C=A,W=255&(W=(W=A>>>16)+((r.jd<<24>>24)*(L<<24>>24)>>>5));C=255&(C=(C+=(r.hd<<24>>24)*(L<<24>>24)>>>5)+((r.ud<<24>>24)*(W<<24>>24)>>>5)),b[w+y]=(4278255360&A)+(W<<16)+C}}function Tt(r,o,f,g,b){R[o]=function(w,y,A,L,C,W,et,F,Y){for(L=et;L>w.b,Y=w.Ea,$=w.K[0],ut=w.w;if(8>F)for(w=(1<>=F}else R["VP8LMapColor"+f](L,C,$,ut,W,et,y,A,Y)}}function He(r,o,f,g,b){for(f=o+f;o>16&255,g[b++]=w>>8&255,g[b++]=255&w}}function ge(r,o,f,g,b){for(f=o+f;o>16&255,g[b++]=w>>8&255,g[b++]=255&w,g[b++]=w>>24&255}}function se(r,o,f,g,b){for(f=o+f;o>16&240|y>>12&15,y=240&y|y>>28&15;g[b++]=w,g[b++]=y}}function oe(r,o,f,g,b){for(f=o+f;o>16&248|y>>13&7,y=y>>5&224|y>>3&31;g[b++]=w,g[b++]=y}}function je(r,o,f,g,b){for(f=o+f;o>8&255,g[b++]=w>>16&255}}function Ut(r,o,f,g,b,w){if(w==0)for(f=o+f;o>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else i(g,b,r,o,f)}function ke(r,o){R[o][0]=R[r+"0"],R[o][1]=R[r+"1"],R[o][2]=R[r+"2"],R[o][3]=R[r+"3"],R[o][4]=R[r+"4"],R[o][5]=R[r+"5"],R[o][6]=R[r+"6"],R[o][7]=R[r+"7"],R[o][8]=R[r+"8"],R[o][9]=R[r+"9"],R[o][10]=R[r+"10"],R[o][11]=R[r+"11"],R[o][12]=R[r+"12"],R[o][13]=R[r+"13"],R[o][14]=R[r+"0"],R[o][15]=R[r+"0"]}function Yt(r){return r==no||r==ro||r==us||r==io}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Be(){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 le(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Be,this.sd=null}function Vt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ei(r){return alert("todo:WebPSamplerProcessPlane"),r.T}function hn(r,o){var f=r.T,g=o.ba.f.RGBA,b=g.eb,w=g.fb+r.ka*g.A,y=Wn[o.ba.S],A=r.y,L=r.O,C=r.f,W=r.N,et=r.ea,F=r.W,Y=o.cc,$=o.dc,ut=o.Mc,Q=o.Nc,ht=r.ka,pt=r.ka+r.T,xt=r.U,bt=xt+1>>1;for(ht==0?y(A,L,null,null,C,W,et,F,C,W,et,F,b,w,null,null,xt):(y(o.ec,o.fc,A,L,Y,$,ut,Q,C,W,et,F,b,w-g.A,b,w,xt),++f);ht+2f,b=f==ss||f==os||f==ls||f==eo||f==12||Yt(f);if(o.memory=null,o.Ib=null,o.Jb=null,o.Nd=null,!zn(o.Oa,r,b?11:12))return 0;if(b&&Yt(f)&&Lr(),r.da)alert("todo:use_scaling");else{if(g){if(o.Ib=ei,r.Kb){if(f=r.U+1>>1,o.memory=a(r.U+2*f),o.memory==null)return 0;o.ec=o.memory,o.fc=0,o.cc=o.ec,o.dc=o.fc+r.U,o.Mc=o.cc,o.Nc=o.dc+f,o.Ib=hn,Lr()}}else alert("todo:EmitYUV");b&&(o.Jb=vr,g&&Te())}if(g&&!_l){for(r=0;256>r;++r)ih[r]=89858*(r-128)+hs>>fs,oh[r]=-22014*(r-128)+hs,sh[r]=-45773*(r-128),ah[r]=113618*(r-128)+hs>>fs;for(r=Na;r>fs,lh[r-Na]=sr(o,255),uh[r-Na]=sr(o+8>>4,15);_l=1}return 1}function Gt(r){var o=r.ma,f=r.U,g=r.T;return e(!(1&r.ka)),0>=f||0>=g?0:(f=o.Ib(r,o),o.Jb!=null&&o.Jb(r,o,f),o.Dc+=f,1)}function br(r){r.ma.memory=null}function wr(r,o,f,g){return wt(r,8)!=47?0:(o[0]=wt(r,14)+1,f[0]=wt(r,14)+1,g[0]=wt(r,1),wt(r,3)!=0?0:!r.h)}function Tn(r,o){if(4>r)return r+1;var f=r-2>>1;return(2+(1&r)<>4)*r+(8-(15&f)))?f:1;var f}function De(r,o,f){var g=T(f),b=r[o+=255&g].g-8;return 0>>0,e(8>=f.g),r.g}function sn(r,o,f){var g=r.xc;return e((o=g==0?0:r.vc[r.md*(f>>g)+(o>>g)])>Ot.b)*Pt;utxt&&(jt=xt),(0,Kn[ce[tn++]>>8&15])(F,Y+ +ie,ht,pt+ie-xt,jt-ie,ht,pt+ie),ie=jt}Y+=xt,pt+=xt,++ut&Rt||(Ot+=Pt)}et!=C.nc&&i(L,A-$,L,A+(et-W-1)*$,$);break;case 1:for($=F,Q=Y,xt=(F=C.Ea)-(pt=F&~(ht=(Y=1<>C.b)*ut;W=b),0w.o&&(g=w.o),f=g?f=0:(b[0]+=4*w.v,w.ka=f-w.j,w.U=w.va-w.v,w.T=g-f,f=1),f){if(A=A[0],11>(f=r.ca).S){var W=f.f.RGBA,et=(g=f.S,b=w.U,w=w.T,C=W.eb,W.A),F=w;for(W=W.fb+r.Ma*W.A;0g){var b=r.l.width,w=f.ca,y=f.tb+b*g,A=r.V,L=r.Ba+r.c*g,C=r.gc;e(r.ab==1),e(C[0].hc==3),Qs(C[0],g,o,A,L,w,y),ir(f,g,o,w,y,b)}r.C=r.Ma=o}function Jn(r,o,f,g,b,w,y){var A=r.$/g,L=r.$%g,C=r.m,W=r.s,et=f+r.$,F=et;b=f+g*b;var Y=f+g*w,$=280+W.ua,ut=r.Pb?A:16777216,Q=0=ut){var Rt=et-f;e((ut=r).Pb),ut.wd=ut.m,ut.xd=Rt,0re.g?(J(bt,bt.u+re.g),Rt[Pt]=re.value,bt=0):(J(bt,bt.u+re.g-256),e(256<=re.value),bt=re.value),bt==0&&(xt=!0)}else bt=De(pt.G[0],pt.H[0],C);if(C.h)break;if(xt||256>bt){if(!xt)if(pt.nd)o[et]=(pt.qb|bt<<8)>>>0;else{if(Z(C),xt=De(pt.G[1],pt.H[1],C),Z(C),Rt=De(pt.G[2],pt.H[2],C),Pt=De(pt.G[3],pt.H[3],C),C.h)break;o[et]=(Pt<<24|xt<<16|bt<<8|Rt)>>>0}if(xt=!1,++et,++L>=g&&(L=0,++A,y!=null&&A<=w&&!(A%16)&&y(r,A),Q!=null))for(;F>>Q.Mb]=bt}else if(280>bt){if(bt=Tn(bt-256,C),Rt=De(pt.G[4],pt.H[4],C),Z(C),Rt=Dn(g,Rt=Tn(Rt,C)),C.h)break;if(et-f=g;)L-=g,++A,y!=null&&A<=w&&!(A%16)&&y(r,A);if(e(et<=b),L&ht&&(pt=sn(W,L,A)),Q!=null)for(;F>>Q.Mb]=bt}else{if(!(bt<$))break t;for(xt=bt-280,e(Q!=null);F>>Q.Mb]=bt;bt=et,e(!(xt>>>(Rt=Q).Xa)),o[bt]=Rt.X[xt],xt=!0}xt||e(C.h==H(C))}if(r.Pb&&C.h&&etw?w:A),r.a=0,r.$=et-f}return 1}return r.a=3,0}function qn(r){e(r!=null),r.vc=null,r.yc=null,r.Ya=null;var o=r.Wa;o!=null&&(o.X=null),r.vb=null,e(r!=null)}function ri(){var r=new Et;return r==null?null:(r.a=0,r.xb=vl,ke("Predictor","VP8LPredictors"),ke("Predictor","VP8LPredictors_C"),ke("PredictorAdd","VP8LPredictorsAdd"),ke("PredictorAdd","VP8LPredictorsAdd_C"),Ji=fe,mi=ne,wa=He,ya=ge,Ki=se,vi=oe,bi=je,R.VP8LMapColor32b=Ze,R.VP8LMapColor8b=hr,r)}function ar(r,o,f,g,b){var w=1,y=[r],A=[o],L=g.m,C=g.s,W=null,et=0;t:for(;;){if(f)for(;w&&wt(L,1);){var F=y,Y=A,$=g,ut=1,Q=$.m,ht=$.gc[$.ab],pt=wt(Q,2);if($.Oc&1<=$.ab),pt){case 0:case 1:ht.b=wt(Q,3)+2,ut=ar(yt(ht.Ea,ht.b),yt(ht.nc,ht.b),0,$,ht.K),ht.K=ht.K[0];break;case 3:var xt,bt=wt(Q,8)+1,Rt=16>Ot.b),tn=a(ce);if(tn==null)xt=0;else{var ie=Ot.K[0],jt=Ot.w;for(tn[0]=Ot.K[0][0],Pt=1;Pt<1*re;++Pt)tn[Pt]=Wt(ie[jt+Pt],tn[Pt-1]);for(;Pt<4*ce;++Pt)tn[Pt]=0;Ot.K[0]=null,Ot.K[0]=tn,xt=1}}ut=xt;break;case 2:break;default:e(0)}w=ut}}if(y=y[0],A=A[0],w&&wt(L,1)&&!(w=1<=(et=wt(L,4))&&11>=et)){g.a=3;break t}var Nt;if(Nt=w)e:{var Ve,ee,pe,Ee=g,ln=y,_n=A,qe=et,gn=f,An=Ee.m,en=Ee.s,me=[null],we=1,Ue=0,ye=Vf[qe];n:for(;;){if(gn&&wt(An,1)){var un=wt(An,3)+2,$n=yt(ln,un),Ge=yt(_n,un),Sn=$n*Ge;if(!ar($n,Ge,0,Ee,me))break n;for(me=me[0],en.xc=un,Ve=0;Ve>8&65535;me[Ve]=Le,Le>=we&&(we=Le+1)}}if(An.h)break n;for(ee=0;5>ee;++ee){var nn=gl[ee];!ee&&0=Nn),On=En;var kn=a(Ue);if(On==null||kn==null||Fn==null){Ee.a=1;break n}var jn=Fn;for(Ve=pe=0;Veee;++ee){nn=gl[ee],Bn[ee]=jn,Zn[ee]=pe,!ee&&0vs)break r}else fo=vs;for(Sa=0;SaZi)Il[Sa++]=Zi,Zi!=0&&(Cl=Zi);else{var wh=Zi==16,Ol=Zi-16,yh=Uf[Ol],jl=wt(Gr,qf[Ol])+yh;if(Sa+jl>vs)break r;for(var xh=wh?Cl:0;0=ee){var ka,co=kn[0];for(ka=1;kaco&&(co=kn[ka]);fn+=co}}if(Ce.nd=Ir,Ce.Qb=0,Ir&&(Ce.qb=(Bn[3][Zn[3]+0].value<<24|Bn[1][Zn[1]+0].value<<16|Bn[2][Zn[2]+0].value)>>>0,wi==0&&256>Bn[0][Zn[0]+0].value&&(Ce.Qb=1,Ce.qb+=Bn[0][Zn[0]+0].value<<8)),Ce.jc=!Ce.Qb&&6>fn,Ce.jc){var bs,Cr=Ce;for(bs=0;bs>=an(ws,8,Jr),Yr>>=an(Cr.G[1][Cr.H[1]+Yr],16,Jr),Yr>>=an(Cr.G[2][Cr.H[2]+Yr],0,Jr),an(Cr.G[3][Cr.H[3]+Yr],24,Jr))}}}en.vc=me,en.Wb=we,en.Ya=On,en.yc=Fn,Nt=1;break e}Nt=0}if(!(w=Nt)){g.a=3;break t}if(0g+1?[]:0),!(b.lengthr?0:r>o?o:r}function ji(){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 Ms(){var r=new Va;return r!=null&&(r.a=0,r.sc="OK",r.cb=0,r.Xb=0,Aa||(Aa=Bi)),r}function Xe(r,o,f){return r.a==0&&(r.a=o,r.sc=f,r.cb=0),0}function Ga(r,o,f){return 3<=f&&r[o+0]==157&&r[o+1]==1&&r[o+2]==42}function or(r,o){if(r==null)return 0;if(r.a=0,r.sc="OK",o==null)return Xe(r,2,"null VP8Io passed to VP8GetHeaders()");var f=o.data,g=o.w,b=o.ha;if(4>b)return Xe(r,7,"Truncated header.");var w=f[g+0]|f[g+1]<<8|f[g+2]<<16,y=r.Od;if(y.Rb=!(1&w),y.td=w>>1&7,y.yd=w>>4&1,y.ub=w>>5,3b)return Xe(r,7,"cannot parse picture header");if(!Ga(f,g,b))return Xe(r,3,"Bad code word");A.c=16383&(f[g+4]<<8|f[g+3]),A.Td=f[g+4]>>6,A.i=16383&(f[g+6]<<8|f[g+5]),A.Ud=f[g+6]>>6,g+=7,b-=7,r.za=A.c+15>>4,r.Ub=A.i+15>>4,o.width=A.c,o.height=A.i,o.Da=0,o.j=0,o.v=0,o.va=o.width,o.o=o.height,o.da=0,o.ib=o.width,o.hb=o.height,o.U=o.width,o.T=o.height,s((w=r.Pa).jb,0,255,w.jb.length),e((w=r.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,s(w.Zb,0,0,w.Zb.length),s(w.Lb,0,0,w.Lb)}if(y.ub>b)return Xe(r,7,"bad partition length");ot(w=r.m,f,g,y.ub),g+=y.ub,b-=y.ub,y.Rb&&(A.Ld=st(w),A.Kd=st(w)),A=r.Qa;var L,C=r.Pa;if(e(w!=null),e(A!=null),A.Cb=st(w),A.Cb){if(A.Bb=st(w),st(w)){for(A.Fb=st(w),L=0;4>L;++L)A.Zb[L]=st(w)?nt(w,7):0;for(L=0;4>L;++L)A.Lb[L]=st(w)?nt(w,6):0}if(A.Bb)for(L=0;3>L;++L)C.jb[L]=st(w)?ft(w,8):255}else A.Bb=0;if(w.Ka)return Xe(r,3,"cannot parse segment header");if((A=r.ed).zd=st(w),A.Tb=ft(w,6),A.wb=ft(w,3),A.Pc=st(w),A.Pc&&st(w)){for(C=0;4>C;++C)st(w)&&(A.vd[C]=nt(w,6));for(C=0;4>C;++C)st(w)&&(A.od[C]=nt(w,6))}if(r.L=A.Tb==0?0:A.zd?1:2,w.Ka)return Xe(r,3,"cannot parse filter header");var W=b;if(b=L=g,g=L+W,A=W,r.Xb=(1<A&&(et=A),ot(r.Jc[+W],f,L,et),L+=et,A-=et,b+=3}ot(r.Jc[+C],f,L,A),f=Let;++et){if(W.Cb){var F=W.Zb[et];W.Fb||(F+=f)}else{if(0>16,8>Y.Eb[1]&&(Y.Eb[1]=8),Y.Qc[0]=ao[sr(F+C,117)],Y.Qc[1]=so[sr(F+L,127)],Y.lc=F+L}if(!y.Rb)return Xe(r,4,"Not a key frame.");for(st(w),y=r.Pa,f=0;4>f;++f){for(b=0;8>b;++b)for(g=0;3>g;++g)for(A=0;11>A;++A)C=gt(w,$f[f][b][g][A])?ft(w,8):Kf[f][b][g][A],y.Wc[f][b].Yb[g][A]=C;for(b=0;17>b;++b)y.Xc[f][b]=y.Wc[f][Zf[b]]}return r.kc=st(w),r.kc&&(r.Bd=ft(w,8)),r.cb=1}function Bi(r,o,f,g,b,w,y){var A=o[b].Yb[f];for(f=0;16>b;++b){if(!gt(r,A[f+0]))return b;for(;!gt(r,A[f+1]);)if(A=o[++b].Yb[0],f=0,b==16)return 16;var L=o[b+1].Yb;if(gt(r,A[f+2])){var C=r,W=0;if(gt(C,(F=A)[(et=f)+3]))if(gt(C,F[et+6])){for(A=0,et=2*(W=gt(C,F[et+8]))+(F=gt(C,F[et+9+W])),W=0,F=Yf[et];F[A];++A)W+=W+gt(C,F[A]);W+=3+(8<(C=r).b&&at(C);var et,F=C.b,Y=(et=C.Ca>>1)-(C.I>>F)>>31;--C.b,C.Ca+=Y,C.Ca|=1,C.I-=(et+1&Y)<>3),r[o+f+32*g]=-256&b?0>b?0:255:b}function Mi(r,o,f,g,b,w){In(r,o,0,f,g+b),In(r,o,1,f,g+w),In(r,o,2,f,g-w),In(r,o,3,f,g-b)}function yr(r){return(20091*r>>16)+r}function on(r,o,f,g){var b,w=0,y=a(16);for(b=0;4>b;++b){var A=r[o+0]+r[o+8],L=r[o+0]-r[o+8],C=(35468*r[o+4]>>16)-yr(r[o+12]),W=yr(r[o+4])+(35468*r[o+12]>>16);y[w+0]=A+W,y[w+1]=L+C,y[w+2]=L-C,y[w+3]=A-W,w+=4,o++}for(b=w=0;4>b;++b)A=(r=y[w+0]+4)+y[w+8],L=r-y[w+8],C=(35468*y[w+4]>>16)-yr(y[w+12]),In(f,g,0,0,A+(W=yr(y[w+4])+(35468*y[w+12]>>16))),In(f,g,1,0,L+C),In(f,g,2,0,L-C),In(f,g,3,0,A-W),w++,g+=32}function Ya(r,o,f,g){var b=r[o+0]+4,w=35468*r[o+4]>>16,y=yr(r[o+4]),A=35468*r[o+1]>>16;Mi(f,g,0,b+y,r=yr(r[o+1]),A),Mi(f,g,1,b+w,r,A),Mi(f,g,2,b-w,r,A),Mi(f,g,3,b-y,r,A)}function Rs(r,o,f,g,b){on(r,o,f,g),b&&on(r,o+16,f,g+4)}function Ts(r,o,f,g){Sr(r,o+0,f,g,1),Sr(r,o+32,f,g+128,1)}function Ds(r,o,f,g){var b;for(r=r[o+0]+4,b=0;4>b;++b)for(o=0;4>o;++o)In(f,g,o,b,r)}function lr(r,o,f,g){r[o+0]&&pn(r,o+0,f,g),r[o+16]&&pn(r,o+16,f,g+4),r[o+32]&&pn(r,o+32,f,g+128),r[o+48]&&pn(r,o+48,f,g+128+4)}function Ja(r,o,f,g){var b,w=a(16);for(b=0;4>b;++b){var y=r[o+0+b]+r[o+12+b],A=r[o+4+b]+r[o+8+b],L=r[o+4+b]-r[o+8+b],C=r[o+0+b]-r[o+12+b];w[0+b]=y+A,w[8+b]=y-A,w[4+b]=C+L,w[12+b]=C-L}for(b=0;4>b;++b)y=(r=w[0+4*b]+3)+w[3+4*b],A=w[1+4*b]+w[2+4*b],L=w[1+4*b]-w[2+4*b],C=r-w[3+4*b],f[g+0]=y+A>>3,f[g+16]=C+L>>3,f[g+32]=y-A>>3,f[g+48]=C-L>>3,g+=64}function Ri(r,o,f){var g,b=o-32,w=Cn,y=255-r[b-1];for(g=0;gf;++f)i(r,o+32*f,r,o-32,16)}function zs(r,o){var f;for(f=16;0g;++g)s(o,f+32*g,r,16)}function Ka(r,o){var f,g=16;for(f=0;16>f;++f)g+=r[o-1+32*f]+r[o+f-32];Br(g>>5,r,o)}function Mr(r,o){var f,g=8;for(f=0;16>f;++f)g+=r[o-1+32*f];Br(g>>4,r,o)}function Hs(r,o){var f,g=8;for(f=0;16>f;++f)g+=r[o+f-32];Br(g>>4,r,o)}function ai(r,o){Br(128,r,o)}function Jt(r,o,f){return r+2*o+f+2>>2}function Ws(r,o){var f,g=o-32;for(g=new Uint8Array([Jt(r[g-1],r[g+0],r[g+1]),Jt(r[g+0],r[g+1],r[g+2]),Jt(r[g+1],r[g+2],r[g+3]),Jt(r[g+2],r[g+3],r[g+4])]),f=0;4>f;++f)i(r,o+32*f,g,0,g.length)}function Vs(r,o){var f=r[o-1],g=r[o-1+32],b=r[o-1+64],w=r[o-1+96];_t(r,o+0,16843009*Jt(r[o-1-32],f,g)),_t(r,o+32,16843009*Jt(f,g,b)),_t(r,o+64,16843009*Jt(g,b,w)),_t(r,o+96,16843009*Jt(b,w,w))}function Gs(r,o){var f,g=4;for(f=0;4>f;++f)g+=r[o+f-32]+r[o-1+32*f];for(g>>=3,f=0;4>f;++f)s(r,o+32*f,g,4)}function Ys(r,o){var f=r[o-1+0],g=r[o-1+32],b=r[o-1+64],w=r[o-1-32],y=r[o+0-32],A=r[o+1-32],L=r[o+2-32],C=r[o+3-32];r[o+0+96]=Jt(g,b,r[o-1+96]),r[o+1+96]=r[o+0+64]=Jt(f,g,b),r[o+2+96]=r[o+1+64]=r[o+0+32]=Jt(w,f,g),r[o+3+96]=r[o+2+64]=r[o+1+32]=r[o+0+0]=Jt(y,w,f),r[o+3+64]=r[o+2+32]=r[o+1+0]=Jt(A,y,w),r[o+3+32]=r[o+2+0]=Jt(L,A,y),r[o+3+0]=Jt(C,L,A)}function Js(r,o){var f=r[o+1-32],g=r[o+2-32],b=r[o+3-32],w=r[o+4-32],y=r[o+5-32],A=r[o+6-32],L=r[o+7-32];r[o+0+0]=Jt(r[o+0-32],f,g),r[o+1+0]=r[o+0+32]=Jt(f,g,b),r[o+2+0]=r[o+1+32]=r[o+0+64]=Jt(g,b,w),r[o+3+0]=r[o+2+32]=r[o+1+64]=r[o+0+96]=Jt(b,w,y),r[o+3+32]=r[o+2+64]=r[o+1+96]=Jt(w,y,A),r[o+3+64]=r[o+2+96]=Jt(y,A,L),r[o+3+96]=Jt(A,L,L)}function xr(r,o){var f=r[o-1+0],g=r[o-1+32],b=r[o-1+64],w=r[o-1-32],y=r[o+0-32],A=r[o+1-32],L=r[o+2-32],C=r[o+3-32];r[o+0+0]=r[o+1+64]=w+y+1>>1,r[o+1+0]=r[o+2+64]=y+A+1>>1,r[o+2+0]=r[o+3+64]=A+L+1>>1,r[o+3+0]=L+C+1>>1,r[o+0+96]=Jt(b,g,f),r[o+0+64]=Jt(g,f,w),r[o+0+32]=r[o+1+96]=Jt(f,w,y),r[o+1+32]=r[o+2+96]=Jt(w,y,A),r[o+2+32]=r[o+3+96]=Jt(y,A,L),r[o+3+32]=Jt(A,L,C)}function _r(r,o){var f=r[o+0-32],g=r[o+1-32],b=r[o+2-32],w=r[o+3-32],y=r[o+4-32],A=r[o+5-32],L=r[o+6-32],C=r[o+7-32];r[o+0+0]=f+g+1>>1,r[o+1+0]=r[o+0+64]=g+b+1>>1,r[o+2+0]=r[o+1+64]=b+w+1>>1,r[o+3+0]=r[o+2+64]=w+y+1>>1,r[o+0+32]=Jt(f,g,b),r[o+1+32]=r[o+0+96]=Jt(g,b,w),r[o+2+32]=r[o+1+96]=Jt(b,w,y),r[o+3+32]=r[o+2+96]=Jt(w,y,A),r[o+3+64]=Jt(y,A,L),r[o+3+96]=Jt(A,L,C)}function Ks(r,o){var f=r[o-1+0],g=r[o-1+32],b=r[o-1+64],w=r[o-1+96];r[o+0+0]=f+g+1>>1,r[o+2+0]=r[o+0+32]=g+b+1>>1,r[o+2+32]=r[o+0+64]=b+w+1>>1,r[o+1+0]=Jt(f,g,b),r[o+3+0]=r[o+1+32]=Jt(g,b,w),r[o+3+32]=r[o+1+64]=Jt(b,w,w),r[o+3+64]=r[o+2+64]=r[o+0+96]=r[o+1+96]=r[o+2+96]=r[o+3+96]=w}function Xs(r,o){var f=r[o-1+0],g=r[o-1+32],b=r[o-1+64],w=r[o-1+96],y=r[o-1-32],A=r[o+0-32],L=r[o+1-32],C=r[o+2-32];r[o+0+0]=r[o+2+32]=f+y+1>>1,r[o+0+32]=r[o+2+64]=g+f+1>>1,r[o+0+64]=r[o+2+96]=b+g+1>>1,r[o+0+96]=w+b+1>>1,r[o+3+0]=Jt(A,L,C),r[o+2+0]=Jt(y,A,L),r[o+1+0]=r[o+3+32]=Jt(f,y,A),r[o+1+32]=r[o+3+64]=Jt(g,f,y),r[o+1+64]=r[o+3+96]=Jt(b,g,f),r[o+1+96]=Jt(w,b,g)}function Di(r,o){var f;for(f=0;8>f;++f)i(r,o+32*f,r,o-32,8)}function fa(r,o){var f;for(f=0;8>f;++f)s(r,o,r[o-1],8),o+=32}function ur(r,o,f){var g;for(g=0;8>g;++g)s(o,f+32*g,r,8)}function $s(r,o){var f,g=8;for(f=0;8>f;++f)g+=r[o+f-32]+r[o-1+32*f];ur(g>>4,r,o)}function qi(r,o){var f,g=4;for(f=0;8>f;++f)g+=r[o+f-32];ur(g>>3,r,o)}function Zs(r,o){var f,g=4;for(f=0;8>f;++f)g+=r[o-1+32*f];ur(g>>3,r,o)}function ha(r,o){ur(128,r,o)}function Rr(r,o,f){var g=r[o-f],b=r[o+0],w=3*(b-g)+to[1020+r[o-2*f]-r[o+f]],y=is[112+(w+4>>3)];r[o-f]=Cn[255+g+is[112+(w+3>>3)]],r[o+0]=Cn[255+b-y]}function ca(r,o,f,g){var b=r[o+0],w=r[o+f];return Hn[255+r[o-2*f]-r[o-f]]>g||Hn[255+w-b]>g}function si(r,o,f,g){return 4*Hn[255+r[o-f]-r[o+0]]+Hn[255+r[o-2*f]-r[o+f]]<=g}function da(r,o,f,g,b){var w=r[o-3*f],y=r[o-2*f],A=r[o-f],L=r[o+0],C=r[o+f],W=r[o+2*f],et=r[o+3*f];return 4*Hn[255+A-L]+Hn[255+y-C]>g?0:Hn[255+r[o-4*f]-w]<=b&&Hn[255+w-y]<=b&&Hn[255+y-A]<=b&&Hn[255+et-W]<=b&&Hn[255+W-C]<=b&&Hn[255+C-L]<=b}function Ui(r,o,f,g){var b=2*g+1;for(g=0;16>g;++g)si(r,o+g,f,b)&&Rr(r,o+g,f)}function pa(r,o,f,g){var b=2*g+1;for(g=0;16>g;++g)si(r,o+g*f,1,b)&&Rr(r,o+g*f,1)}function zi(r,o,f,g){var b;for(b=3;0>7,ht=18*pt+63>>7,pt=9*pt+63>>7;L[C-3*W]=Cn[255+L[C-3*W]+pt],L[C-2*W]=Cn[255+et+ht],L[C-W]=Cn[255+F+Q],L[C+0]=Cn[255+Y-Q],L[C+W]=Cn[255+$-ht],L[C+2*W]=Cn[255+ut-pt]}o+=g}}function Nr(r,o,f,g,b,w,y,A){for(w=2*w+1;0>3)],ut=is[112+(ut+3>>3)],Q=$+1>>1;L[C-2*W]=Cn[255+L[C-2*W]+Q],L[C-W]=Cn[255+et+ut],L[C+0]=Cn[255+F-$],L[C+W]=Cn[255+Y-Q]}o+=g}}function $a(r,o,f,g,b,w){Ar(r,o,f,1,16,g,b,w)}function Za(r,o,f,g,b,w){Ar(r,o,1,f,16,g,b,w)}function Qa(r,o,f,g,b,w){var y;for(y=3;0C?0:255:C)&255,C=L,b[w+A]=W}}function $e(r,o,f,g){var b=o.width,w=o.o;if(e(r!=null&&o!=null),0>f||0>=g||f+g>w)return null;if(!r.Cc){if(r.ga==null){var y;if(r.ga=new Ft,(y=r.ga==null)||(y=o.width*o.o,e(r.Gb.length==0),r.Gb=a(y),r.Uc=0,r.Gb==null?y=0:(r.mb=r.Gb,r.nb=r.Uc,r.rc=null,y=1),y=!y),!y){y=r.ga;var A=r.Fa,L=r.P,C=r.qc,W=r.mb,et=r.nb,F=L+1,Y=C-1,$=y.l;if(e(A!=null&&W!=null&&o!=null),Wr[0]=null,Wr[1]=Xt,Wr[2]=te,Wr[3]=de,y.ca=W,y.tb=et,y.c=o.width,y.i=o.height,e(0=C)o=0;else if(y.$a=3&A[L+0],y.Z=A[L+0]>>2&3,y.Lc=A[L+0]>>4&3,L=A[L+0]>>6&3,0>y.$a||1=y.c*y.i;y=!o}if(y)return null;r.ga.Lc!=1?r.Ga=0:g=w-f}e(r.ga!=null),e(f+g<=w);t:{if(o=(A=r.ga).c,w=A.l.o,A.$a==0){if(F=r.rc,Y=r.Vc,$=r.Fa,L=r.P+1+f*o,C=r.mb,W=r.nb+f*o,e(L<=r.P+r.qc),A.Z!=0)for(e(Wr[A.Z]!=null),y=0;y=o)o=1;else if(A.ic||Te(),A.ic){A=y.V,F=y.Ba,Y=y.c;var ut=y.i,Q=($=1,L=y.$/Y,C=y.$%Y,W=y.m,et=y.s,y.$),ht=Y*ut,pt=Y*o,xt=et.wc,bt=Q(ut=De(bt.G[0],bt.H[0],W)))A[F+Q]=ut,++Q,++C>=Y&&(C=0,++L<=o&&!(L%16)&&Yn(y,L));else{if(!(280>ut)){$=0;break e}ut=Tn(ut-256,W);var Rt,Pt=De(bt.G[4],bt.H[4],W);if(Z(W),!(Q>=(Pt=Dn(Y,Pt=Tn(Pt,W)))&&ht-Q>=ut)){$=0;break e}for(Rt=0;Rt=Y;)C-=Y,++L<=o&&!(L%16)&&Yn(y,L);Qo?o:L);break e}!$||W.h&&Q=w&&(r.Cc=1),g=1}if(!g)return null;if(r.Cc&&((g=r.ga)!=null&&(g.mc=null),r.ga=null,0>23,A[L+4*y+1]=A[L+4*y+1]*et>>23,A[L+4*y+2]=A[L+4*y+2]*et>>23)}o+=w}}function Ae(r,o,f,g,b){for(;0>4)*L>>16;r[o+2*w+0]=(240&y|y>>4)*L>>16&240|(15&y|y<<4)*L>>16>>4&15,r[o+2*w+1]=240&C|A}o+=b}}function Fe(r,o,f,g,b,w,y,A){var L,C,W=255;for(C=0;C>8}function Te(){_a=Ne,al=Ae,sl=Fe,ol=Re}function cn(r,o,f){R[r]=function(g,b,w,y,A,L,C,W,et,F,Y,$,ut,Q,ht,pt,xt){var bt,Rt=xt-1>>1,Pt=A[L+0]|C[W+0]<<16,re=et[F+0]|Y[$+0]<<16;e(g!=null);var Ot=3*Pt+re+131074>>2;for(o(g[b+0],255&Ot,Ot>>16,ut,Q),w!=null&&(Ot=3*re+Pt+131074>>2,o(w[y+0],255&Ot,Ot>>16,ht,pt)),bt=1;bt<=Rt;++bt){var ce=A[L+bt]|C[W+bt]<<16,tn=et[F+bt]|Y[$+bt]<<16,ie=Pt+ce+re+tn+524296,jt=ie+2*(ce+re)>>3;Ot=jt+Pt>>1,Pt=(ie=ie+2*(Pt+tn)>>3)+ce>>1,o(g[b+2*bt-1],255&Ot,Ot>>16,ut,Q+(2*bt-1)*f),o(g[b+2*bt-0],255&Pt,Pt>>16,ut,Q+(2*bt-0)*f),w!=null&&(Ot=ie+re>>1,Pt=jt+tn>>1,o(w[y+2*bt-1],255&Ot,Ot>>16,ht,pt+(2*bt-1)*f),o(w[y+2*bt+0],255&Pt,Pt>>16,ht,pt+(2*bt+0)*f)),Pt=ce,re=tn}1&xt||(Ot=3*Pt+re+131074>>2,o(g[b+xt-1],255&Ot,Ot>>16,ut,Q+(xt-1)*f),w!=null&&(Ot=3*re+Pt+131074>>2,o(w[y+xt-1],255&Ot,Ot>>16,ht,pt+(xt-1)*f)))}}function Lr(){Wn[as]=th,Wn[ss]=bl,Wn[dl]=eh,Wn[os]=wl,Wn[ls]=yl,Wn[eo]=xl,Wn[pl]=nh,Wn[no]=bl,Wn[ro]=wl,Wn[us]=yl,Wn[io]=xl}function ga(r){return r&-16384?0>r?0:255:r>>rh}function li(r,o){return ga((19077*r>>8)+(26149*o>>8)-14234)}function ui(r,o,f){return ga((19077*r>>8)-(6419*o>>8)-(13320*f>>8)+8708)}function Tr(r,o){return ga((19077*r>>8)+(33050*o>>8)-17685)}function fi(r,o,f,g,b){g[b+0]=li(r,f),g[b+1]=ui(r,o,f),g[b+2]=Tr(r,o)}function Hi(r,o,f,g,b){g[b+0]=Tr(r,o),g[b+1]=ui(r,o,f),g[b+2]=li(r,f)}function Wi(r,o,f,g,b){var w=ui(r,o,f);o=w<<3&224|Tr(r,o)>>3,g[b+0]=248&li(r,f)|w>>5,g[b+1]=o}function dn(r,o,f,g,b){var w=240&Tr(r,o)|15;g[b+0]=240&li(r,f)|ui(r,o,f)>>4,g[b+1]=w}function hi(r,o,f,g,b){g[b+0]=255,fi(r,o,f,g,b+1)}function ci(r,o,f,g,b){Hi(r,o,f,g,b),g[b+3]=255}function ma(r,o,f,g,b){fi(r,o,f,g,b),g[b+3]=255}function fr(r,o,f){R[r]=function(g,b,w,y,A,L,C,W,et){for(var F=W+(-2&et)*f;W!=F;)o(g[b+0],w[y+0],A[L+0],C,W),o(g[b+1],w[y+0],A[L+0],C,W+f),b+=2,++y,++L,W+=2*f;1&et&&o(g[b+0],w[y+0],A[L+0],C,W)}}function yn(r,o,f){return f==0?r==0?o==0?6:5:o==0?4:0:f}function es(r,o,f,g,b){switch(r>>>30){case 3:Sr(o,f,g,b,0);break;case 2:zr(o,f,g,b);break;case 1:pn(o,f,g,b)}}function Vi(r,o){var f,g,b=o.M,w=o.Nb,y=r.oc,A=r.pc+40,L=r.oc,C=r.pc+584,W=r.oc,et=r.pc+600;for(f=0;16>f;++f)y[A+32*f-1]=129;for(f=0;8>f;++f)L[C+32*f-1]=129,W[et+32*f-1]=129;for(0f;++f)i(y,A+32*f-4,y,A+32*f+12,4);for(f=-1;8>f;++f)i(L,C+32*f-4,L,C+32*f+4,4),i(W,et+32*f-4,W,et+32*f+4,4)}var Y=r.Gd,$=r.Hd+g,ut=F.ad,Q=F.Hc;if(0=r.za-1?s(ht,pt,Y[$].y[15],4):i(ht,pt,Y[$+1].y,0,4)),f=0;4>f;f++)ht[pt+128+f]=ht[pt+256+f]=ht[pt+384+f]=ht[pt+0+f];for(f=0;16>f;++f,Q<<=2)ht=y,pt=A+Al[f],Xn[F.Ob[f]](ht,pt),es(Q,ut,16*+f,ht,pt)}else if(ht=yn(g,b,F.Ob[0]),Hr[ht](y,A),Q!=0)for(f=0;16>f;++f,Q<<=2)es(Q,ut,16*+f,y,A+Al[f]);for(f=F.Gc,ht=yn(g,b,F.Dd),Pr[ht](L,C),Pr[ht](W,et),Q=ut,ht=L,pt=C,255&(F=0|f)&&(170&F?Xi(Q,256,ht,pt):cr(Q,256,ht,pt)),F=W,Q=et,255&(f>>=8)&&(170&f?Xi(ut,320,F,Q):cr(ut,320,F,Q)),bf;++f)i(Y,$+f*r.R,y,A+32*f,16);for(f=0;8>f;++f)i(ut,F+f*r.B,L,C+32*f,8),i(Q,ht+f*r.B,W,et+32*f,8)}}function ns(r,o,f,g,b,w,y,A,L){var C=[0],W=[0],et=0,F=L!=null?L.kd:0,Y=L??new K;if(r==null||12>f)return 7;Y.data=r,Y.w=o,Y.ha=f,o=[o],f=[f],Y.gb=[Y.gb];t:{var $=o,ut=f,Q=Y.gb;if(e(r!=null),e(ut!=null),e(Q!=null),Q[0]=0,12<=ut[0]&&!t(r,$[0],"RIFF")){if(t(r,$[0]+8,"WEBP")){Q=3;break t}var ht=Dt(r,$[0]+4);if(12>ht||4294967286ut[0]-8){Q=7;break t}Q[0]=ht,$[0]+=12,ut[0]-=12}Q=0}if(Q!=0)return Q;for(ht=0Q[0])Q=7;else{if(!t(pt,ut[0],"VP8X")){if(Dt(pt,ut[0]+4)!=10){Q=3;break t}if(18>Q[0]){Q=7;break t}var Pt=Dt(pt,ut[0]+8),re=1+St(pt,ut[0]+12);if(2147483648<=re*(pt=1+St(pt,ut[0]+15))){Q=3;break t}Rt!=null&&(Rt[0]=Pt),xt!=null&&(xt[0]=re),bt!=null&&(bt[0]=pt),ut[0]+=18,Q[0]-=18,Ot[0]=1}Q=0}}if(et=et[0],$=$[0],Q!=0)return Q;if(ut=!!(2&$),!ht&&et)return 3;if(w!=null&&(w[0]=!!(16&$)),y!=null&&(y[0]=ut),A!=null&&(A[0]=0),y=C[0],$=W[0],et&&ut&&L==null){Q=0;break}if(4>f){Q=7;break}if(ht&&et||!ht&&!et&&!t(r,o[0],"ALPH")){f=[f],Y.na=[Y.na],Y.P=[Y.P],Y.Sa=[Y.Sa];t:{Pt=r,Q=o,ht=f;var Ot=Y.gb;xt=Y.na,bt=Y.P,Rt=Y.Sa,re=22,e(Pt!=null),e(ht!=null),pt=Q[0];var ce=ht[0];for(e(xt!=null),e(Rt!=null),xt[0]=null,bt[0]=null,Rt[0]=0;;){if(Q[0]=pt,ht[0]=ce,8>ce){Q=7;break t}var tn=Dt(Pt,pt+4);if(4294967286Ot){Q=3;break t}if(!t(Pt,pt,"VP8 ")||!t(Pt,pt,"VP8L")){Q=0;break t}if(ce[0]ht[0])Q=7;else{if(pt||re){if(Ot=Dt(Ot,Pt+4),12<=xt&&Ot>xt-12){Q=3;break t}if(F&&Ot>ht[0]-8){Q=7;break t}bt[0]=Ot,Q[0]+=8,ht[0]-=8,Rt[0]=re}else Rt[0]=5<=ht[0]&&Ot[Pt+0]==47&&!(Ot[Pt+4]>>5),bt[0]=ht[0];Q=0}if(f=f[0],Y.Ja=Y.Ja[0],Y.xa=Y.xa[0],o=o[0],Q!=0)break;if(4294967286f){Q=7;break}A=y,F=$,ut=w,r==null||5>f?r=0:5<=f&&r[o+0]==47&&!(r[o+4]>>5)?(ht=[0],Ot=[0],xt=[0],ct(bt=new B,r,o,f),wr(bt,ht,Ot,xt)?(A!=null&&(A[0]=ht[0]),F!=null&&(F[0]=Ot[0]),ut!=null&&(ut[0]=xt[0]),r=1):r=0):r=0}else{if(10>f){Q=7;break}A=$,r==null||10>f||!Ga(r,o+3,f-3)?r=0:(F=r[o+0]|r[o+1]<<8|r[o+2]<<16,ut=16383&(r[o+7]<<8|r[o+6]),r=16383&(r[o+9]<<8|r[o+8]),1&F||3<(F>>1&7)||!(F>>4&1)||F>>5>=Y.Ja||!ut||!r?r=0:(y&&(y[0]=ut),A&&(A[0]=r),r=1))}if(!r||(y=y[0],$=$[0],et&&(C[0]!=y||W[0]!=$)))return 3;L!=null&&(L[0]=Y,L.offset=o-L.w,e(4294967286>o-L.w),e(L.offset==L.ha-f));break}return Q==0||Q==7&&et&&L==null?(w!=null&&(w[0]|=Y.na!=null&&0f||(w&=-2,y&=-2),0>w||0>y||0>=A||0>=L||w+A>g||y+L>b))return 0;if(o.v=w,o.j=y,o.va=w+A,o.o=y+L,o.U=A,o.T=L,o.da=r!=null&&0r.S){var o=r.f.RGBA;o.fb+=(r.height-1)*o.A,o.A=-o.A}else o=r.f.kb,r=r.height,o.O+=(r-1)*o.fa,o.fa=-o.fa,o.N+=(r-1>>1)*o.Ab,o.Ab=-o.Ab,o.W+=(r-1>>1)*o.Db,o.Db=-o.Db,o.F!=null&&(o.J+=(r-1)*o.lb,o.lb=-o.lb);return 0}function va(r,o,f,g){if(g==null||0>=r||0>=o)return 2;if(f!=null){if(f.Da){var b=f.cd,w=f.bd,y=-2&f.v,A=-2&f.j;if(0>y||0>A||0>=b||0>=w||y+b>r||A+w>o)return 2;r=b,o=w}if(f.da){if(!Ht(r,o,b=[f.ib],w=[f.hb]))return 2;r=b[0],o=w[0]}}g.width=r,g.height=o;t:{var L=g.width,C=g.height;if(r=g.S,0>=L||0>=C||!(r>=as&&13>r))r=2;else{if(0>=g.Rd&&g.sd==null){y=w=b=o=0;var W=(A=L*Nl[r])*C;if(11>r||(w=(C+1)/2*(o=(L+1)/2),r==12&&(y=(b=L)*C)),(C=a(W+2*w+y))==null){r=1;break t}g.sd=C,11>r?((L=g.f.RGBA).eb=C,L.fb=0,L.A=A,L.size=W):((L=g.f.kb).y=C,L.O=0,L.fa=A,L.Fd=W,L.f=C,L.N=0+W,L.Ab=o,L.Cd=w,L.ea=C,L.W=0+W+w,L.Db=o,L.Ed=w,r==12&&(L.F=C,L.J=0+W+2*w),L.Tc=y,L.lb=b)}if(o=1,b=g.S,w=g.width,y=g.height,b>=as&&13>b)if(11>b)r=g.f.RGBA,o&=(A=Math.abs(r.A))*(y-1)+w<=r.size,o&=A>=w*Nl[b],o&=r.eb!=null;else{r=g.f.kb,A=(w+1)/2,W=(y+1)/2,L=Math.abs(r.fa),C=Math.abs(r.Ab);var et=Math.abs(r.Db),F=Math.abs(r.lb),Y=F*(y-1)+w;o&=L*(y-1)+w<=r.Fd,o&=C*(W-1)+A<=r.Cd,o=(o&=et*(W-1)+A<=r.Ed)&L>=w&C>=A&et>=A,o&=r.y!=null,o&=r.f!=null,o&=r.ea!=null,b==12&&(o&=F>=w,o&=Y<=r.Tc,o&=r.F!=null)}else o=0;r=o?0:2}}return r!=0||f!=null&&f.fd&&(r=di(g)),r}var Gi=64,pi=[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],ba=24,xn=32,Ln=8,Yi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Ct("Predictor0","PredictorAdd0"),R.Predictor0=function(){return 4278190080},R.Predictor1=function(r){return r},R.Predictor2=function(r,o,f){return o[f+0]},R.Predictor3=function(r,o,f){return o[f+1]},R.Predictor4=function(r,o,f){return o[f-1]},R.Predictor5=function(r,o,f){return qt(qt(r,o[f+1]),o[f+0])},R.Predictor6=function(r,o,f){return qt(r,o[f-1])},R.Predictor7=function(r,o,f){return qt(r,o[f+0])},R.Predictor8=function(r,o,f){return qt(o[f-1],o[f+0])},R.Predictor9=function(r,o,f){return qt(o[f+0],o[f+1])},R.Predictor10=function(r,o,f){return qt(qt(r,o[f-1]),qt(o[f+0],o[f+1]))},R.Predictor11=function(r,o,f){var g=o[f+0];return 0>=Zt(g>>24&255,r>>24&255,(o=o[f-1])>>24&255)+Zt(g>>16&255,r>>16&255,o>>16&255)+Zt(g>>8&255,r>>8&255,o>>8&255)+Zt(255&g,255&r,255&o)?g:r},R.Predictor12=function(r,o,f){var g=o[f+0];return(ve((r>>24&255)+(g>>24&255)-((o=o[f-1])>>24&255))<<24|ve((r>>16&255)+(g>>16&255)-(o>>16&255))<<16|ve((r>>8&255)+(g>>8&255)-(o>>8&255))<<8|ve((255&r)+(255&g)-(255&o)))>>>0},R.Predictor13=function(r,o,f){var g=o[f-1];return(ue((r=qt(r,o[f+0]))>>24&255,g>>24&255)<<24|ue(r>>16&255,g>>16&255)<<16|ue(r>>8&255,g>>8&255)<<8|ue(255&r,255&g))>>>0};var Dr=R.PredictorAdd0;R.PredictorAdd1=he,Ct("Predictor2","PredictorAdd2"),Ct("Predictor3","PredictorAdd3"),Ct("Predictor4","PredictorAdd4"),Ct("Predictor5","PredictorAdd5"),Ct("Predictor6","PredictorAdd6"),Ct("Predictor7","PredictorAdd7"),Ct("Predictor8","PredictorAdd8"),Ct("Predictor9","PredictorAdd9"),Ct("Predictor10","PredictorAdd10"),Ct("Predictor11","PredictorAdd11"),Ct("Predictor12","PredictorAdd12"),Ct("Predictor13","PredictorAdd13");var qr=R.PredictorAdd2;Tt("ColorIndexInverseTransform","MapARGB","32b",function(r){return r>>8&255},function(r){return r}),Tt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(r){return r},function(r){return r>>8&255});var Ji,gi=R.ColorIndexInverseTransform,Ze=R.MapARGB,Qs=R.VP8LColorIndexInverseTransformAlpha,hr=R.MapAlpha,Kn=R.VP8LPredictorsAdd=[];Kn.length=16,(R.VP8LPredictors=[]).length=16,(R.VP8LPredictorsAdd_C=[]).length=16,(R.VP8LPredictors_C=[]).length=16;var mi,wa,ya,Ki,vi,bi,Ur,Sr,zr,Xi,pn,cr,Pe,Ie,We,Qe,kr,xa,$i,rs,el,nl,rl,il,_a,al,sl,ol,ll=a(511),ul=a(2041),fl=a(225),hl=a(767),cl=0,to=ul,is=fl,Cn=hl,Hn=ll,as=0,ss=1,dl=2,os=3,ls=4,eo=5,pl=6,no=7,ro=8,us=9,io=10,qf=[2,3,7],Uf=[3,3,11],gl=[280,256,256,256,40],zf=[0,1,1,1,0],Hf=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Wf=[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],Vf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Gf=8,ao=[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],so=[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],Aa=null,Yf=[[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]],Jf=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ml=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Kf=[[[[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]]]],Xf=[[[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]]],$f=[[[[255,255,255,255,255,255,255,255,255,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]]]],Zf=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Hr=[],Xn=[],Pr=[],Qf=1,vl=2,Wr=[],Wn=[];cn("UpsampleRgbLinePair",fi,3),cn("UpsampleBgrLinePair",Hi,3),cn("UpsampleRgbaLinePair",ma,4),cn("UpsampleBgraLinePair",ci,4),cn("UpsampleArgbLinePair",hi,4),cn("UpsampleRgba4444LinePair",dn,2),cn("UpsampleRgb565LinePair",Wi,2);var th=R.UpsampleRgbLinePair,eh=R.UpsampleBgrLinePair,bl=R.UpsampleRgbaLinePair,wl=R.UpsampleBgraLinePair,yl=R.UpsampleArgbLinePair,xl=R.UpsampleRgba4444LinePair,nh=R.UpsampleRgb565LinePair,fs=16,hs=1<g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&Te()),g.Pb&&0(L=f.Md)?0:100C;++C)12>(et=b.pb[C]).lc&&(et.ia=L*fh[0>et.lc?0:et.lc]>>3),W|=et.ia;W&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=f.Id,100b.Ga&&(b.Ga=0)}(function(F,Y){if(F==null)return 0;if(Y==null)return Xe(F,2,"NULL VP8Io parameter in VP8Decode().");if(!F.cb&&!or(F,Y))return 0;if(e(F.cb),Y.ac==null||Y.ac(Y)){Y.ob&&(F.L=0);var $=cs[F.L];if(F.L==2?(F.yb=0,F.zb=0):(F.yb=Y.v-$>>4,F.zb=Y.j-$>>4,0>F.yb&&(F.yb=0),0>F.zb&&(F.zb=0)),F.Va=Y.o+15+$>>4,F.Hb=Y.va+15+$>>4,F.Hb>F.za&&(F.Hb=F.za),F.Va>F.Ub&&(F.Va=F.Ub),0$;++$){var Q;if(F.Qa.Cb){var ht=F.Qa.Lb[$];F.Qa.Fb||(ht+=ut.Tb)}else ht=ut.Tb;for(Q=0;1>=Q;++Q){var pt=F.gd[$][Q],xt=ht;if(ut.Pc&&(xt+=ut.vd[0],Q&&(xt+=ut.od[0])),0<(xt=0>xt?0:63>2:bt>>1)>9-ut.wb&&(bt=9-ut.wb),1>bt&&(bt=1),pt.dd=bt,pt.tc=2*xt+bt,pt.ld=40<=xt?2:15<=xt?1:0}else pt.tc=0;pt.La=Q}}}$=0}else Xe(F,6,"Frame setup failed"),$=F.a;if($=$==0){if($){F.$c=0,0F.Vb){if(F.Vb=0,F.Ec=a(pt),F.Fc=0,F.Ec==null){$=Xe(F,1,"no memory during frame initialization.");break e}F.Vb=pt}pt=F.Ec,xt=F.Fc,F.Ac=pt,F.Bc=xt,xt+=ut,F.Gd=c(Rt,Wa),F.Hd=0,F.rb=c(Pt+1,sa),F.sb=1,F.wa=re?c(re,Un):null,F.Y=0,F.D.Nb=0,F.D.wa=F.wa,F.D.Y=F.Y,0=$;++$)ll[255+$]=0>$?-$:$;for($=-1020;1020>=$;++$)ul[1020+$]=-128>$?-128:127<$?127:$;for($=-112;112>=$;++$)fl[112+$]=-16>$?-16:15<$?15:$;for($=-255;510>=$;++$)hl[255+$]=0>$?0:255<$?255:$;cl=1}Ur=Ja,Sr=Rs,Xi=Ts,pn=Ds,cr=lr,zr=Ya,Pe=$a,Ie=Za,We=ts,Qe=u,kr=Qa,xa=oi,$i=v,rs=I,el=Ui,nl=pa,rl=zi,il=Xa,Xn[0]=Gs,Xn[1]=Ti,Xn[2]=Ws,Xn[3]=Vs,Xn[4]=Ys,Xn[5]=xr,Xn[6]=Js,Xn[7]=_r,Xn[8]=Xs,Xn[9]=Ks,Hr[0]=Ka,Hr[1]=qs,Hr[2]=Us,Hr[3]=zs,Hr[4]=Mr,Hr[5]=Hs,Hr[6]=ai,Pr[0]=$s,Pr[1]=ua,Pr[2]=Di,Pr[3]=fa,Pr[4]=Zs,Pr[5]=qi,Pr[6]=ha,$=1}else $=0}$&&($=function(ce,tn){for(ce.M=0;ce.Mpe;++pe){var en,me=_n[0+pe];for(en=0;4>en;++en){me=Xf[Ee[ln+en]][me];for(var we=ml[gt(ee,me[0])];0>3;for(we=0;256>we;we+=16)pe[gn+we]=Sn}un=1,$n=ln[0]}var Le=15&ee.la,nn=15&An.la;for(we=0;4>we;++we){var Fn=1&nn;for(Sn=ye=0;4>Sn;++Sn)Le=Le>>1|(Fn=(Ge=Aa(Ee,$n,Ge=Fn+(1&Le),qe.Sc,un,pe,gn))>un)<<7,ye=ye<<2|(3>=4,nn=nn>>1|Fn<<7,en=(en<<8|ye)>>>0}for($n=Le,un=nn>>4,Ue=0;4>Ue;Ue+=2){for(ye=0,Le=ee.la>>4+Ue,nn=An.la>>4+Ue,we=0;2>we;++we){for(Fn=1&nn,Sn=0;2>Sn;++Sn)Ge=Fn+(1&Le),Le=Le>>1|(Fn=0<(Ge=Aa(Ee,ln[2],Ge,qe.Qc,0,pe,gn)))<<3,ye=ye<<2|(3>=2,nn=nn>>1|Fn<<5}me|=ye<<4*Ue,$n|=Le<<4<=jt.zb&&jt.M<=jt.Va,jt.Aa==0)e:{if(ie.M=jt.M,ie.uc=ee,Vi(jt,ie),Ve=1,ie=(ye=jt.D).Nb,ee=(me=cs[jt.L])*jt.R,Ee=me/2*jt.B,we=16*ie*jt.R,Sn=8*ie*jt.B,ln=jt.sa,_n=jt.ta-ee+we,qe=jt.qa,pe=jt.ra-Ee+Sn,gn=jt.Ha,An=jt.Ia-Ee+Sn,nn=(Le=ye.M)==0,en=Le>=jt.Va-1,jt.Aa==2&&Vi(jt,ye),ye.uc)for(Fn=(Ge=jt).D.M,e(Ge.D.uc),ye=Ge.yb;yeNt.o&&(Le=Nt.o),Nt.F=null,Nt.J=null,jt.Fa!=null&&0>1),Nt.W+=jt.B*(me>>1),Nt.F!=null&&(Nt.J+=Nt.width*me)),ye>1,Nt.W+=Nt.v>>1,Nt.F!=null&&(Nt.J+=Nt.v),Nt.ka=ye-Nt.j,Nt.U=Nt.va-Nt.v,Nt.T=Le-ye,Ve=Nt.put(Nt))}ie+1!=jt.Ic||en||(i(jt.sa,jt.ta-ee,ln,_n+16*jt.R,ee),i(jt.qa,jt.ra-Ee,qe,pe+8*jt.B,Ee),i(jt.Ha,jt.Ia-Ee,gn,An+8*jt.B,Ee))}if(!Ve)return Xe(ce,6,"Output aborted.")}return 1}(F,Y)),Y.bc!=null&&Y.bc(Y),$&=1}return $?(F.cb=0,$):0})(r,g)||(o=r.a)}}else o=r.a}o==0&&y.Oa!=null&&y.Oa.fd&&(o=di(y.ba))}y=o}w=y!=0?null:11>w?A.f.RGBA.eb:A.f.kb.y}else w=null;return w};var Nl=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(R,tt){for(var N="",E=0;E<4;E++)N+=String.fromCharCode(R[tt++]);return N}function m(R,tt){return R[tt+0]|R[tt+1]<<8}function _(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16)>>>0}function k(R,tt){return(R[tt+0]|R[tt+1]<<8|R[tt+2]<<16|R[tt+3]<<24)>>>0}new h;var p=[0],j=[0],O=[],M=new h,S=n,V=function(R,tt){var N={},E=0,z=!1,U=0,rt=0;if(N.frames=[],!function(x,B){for(var T=0;T<4;T++)if(x[B+T]!="RIFF".charCodeAt(T))return!0;return!1}(R,tt)){for(k(R,tt+=4),tt+=8;tt>1&1}ot!="ANMF"&&(tt+=nt)}return N}}(S,0);V.response=S,V.rgbaoutput=!0,V.dataurl=!1;var G=V.header?V.header:null,q=V.frames?V.frames:null;if(G){G.loop_counter=G.loop_count,p=[G.canvas_height],j=[G.canvas_width];for(var it=0;it'+t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")+"",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function t2(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var e,t,i,s,a,c,l,h,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 h,this.globalCompositeOperation=x.globalCompositeOperation||"normal",this.globalAlpha=x.globalAlpha||1,this.clip_path=x.clip_path||[],this.currentPoint=x.currentPoint||new c,this.miterLimit=x.miterLimit||10,this.lastPoint=x.lastPoint||new c,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};n.events.push(["initialized",function(){this.context2d=new _(this),e=this.internal.f2,t=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,s=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,c=this.internal.Point,l=this.internal.Rectangle,h=this.internal.Matrix,d=new m}]);var _=function(x){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var B=x;Object.defineProperty(this,"pdf",{get:function(){return B}});var T=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return T},set:function(P){T=!!P}});var H=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return H},set:function(P){H=!!P}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(P){isNaN(P)||(J=P)}});var Z=0;Object.defineProperty(this,"posY",{get:function(){return Z},set:function(P){isNaN(P)||(Z=P)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(P){var Lt;typeof P=="number"?Lt=[P,P,P,P]:((Lt=new Array(4))[0]=P[0],Lt[1]=P.length>=2?P[1]:Lt[0],Lt[2]=P.length>=3?P[2]:Lt[0],Lt[3]=P.length>=4?P[3]:Lt[1]),d.margin=Lt}});var at=!1;Object.defineProperty(this,"autoPaging",{get:function(){return at},set:function(P){at=P}});var st=0;Object.defineProperty(this,"lastBreak",{get:function(){return st},set:function(P){st=P}});var gt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return gt},set:function(P){gt=P}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(P){P instanceof m&&(d=P)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(P){d.path=P}});var _t=[];Object.defineProperty(this,"ctxStack",{get:function(){return _t},set:function(P){_t=P}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(P){var Lt;Lt=k(P),this.ctx.fillStyle=Lt.style,this.ctx.isFillTransparent=Lt.a===0,this.ctx.fillOpacity=Lt.a,this.pdf.setFillColor(Lt.r,Lt.g,Lt.b,{a:Lt.a}),this.pdf.setTextColor(Lt.r,Lt.g,Lt.b,{a:Lt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(P){var Lt=k(P);this.ctx.strokeStyle=Lt.style,this.ctx.isStrokeTransparent=Lt.a===0,this.ctx.strokeOpacity=Lt.a,Lt.a===0?this.pdf.setDrawColor(255,255,255):(Lt.a,this.pdf.setDrawColor(Lt.r,Lt.g,Lt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(P){["butt","round","square"].indexOf(P)!==-1&&(this.ctx.lineCap=P,this.pdf.setLineCap(P))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(P){isNaN(P)||(this.ctx.lineWidth=P,this.pdf.setLineWidth(P))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(P){["bevel","round","miter"].indexOf(P)!==-1&&(this.ctx.lineJoin=P,this.pdf.setLineJoin(P))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(P){isNaN(P)||(this.ctx.miterLimit=P,this.pdf.setMiterLimit(P))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(P){this.ctx.textBaseline=P}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(P){["right","end","center","left","start"].indexOf(P)!==-1&&(this.ctx.textAlign=P)}});var kt=null,St=null,Dt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Dt},set:function(P){kt=null,St=null,Dt=P}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(P){var Lt;if(this.ctx.font=P,(Lt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(P))!==null){var ae=Lt[1];Lt[2];var Ht=Lt[3],yt=Lt[4];Lt[5];var Wt=Lt[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(yt)[2];yt=Math.floor(Ct==="px"?parseFloat(yt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(yt)*this.pdf.getFontSize():parseFloat(yt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(yt);var zt=function(Tt){var He,ge,se=[],oe=Tt.trim();if(oe==="")return Mo;if(oe in Ou)return[Ou[oe]];for(;oe!=="";){switch(ge=null,He=(oe=Bu(oe)).charAt(0)){case'"':case"'":ge=Y1(oe.substring(1),He);break;default:ge=J1(oe)}if(ge===null||(se.push(ge[0]),(oe=Bu(ge[1]))!==""&&oe.charAt(0)!==","))return Mo;oe=oe.replace(/^,/,"")}return se}(Wt);if(this.fontFaces){var qt=function(Tt,He){var ge=Tt.getFontList(),se=JSON.stringify(ge);if(kt===null||St!==se){var oe=function(je){var Ut=[];return Object.keys(je).forEach(function(ke){je[ke].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:ke,weight:"bold"};break;case"italic":Qt={family:ke,style:"italic"};break;case"bolditalic":Qt={family:ke,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:ke}}Qt!==null&&(Qt.ref={name:ke,style:Yt},Ut.push(Qt))})}),Ut}(ge);kt=function(je){for(var Ut={},ke=0;ke=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var he="",fe={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Bt=0;Bt=2*Math.PI&&(H=0,J=2*Math.PI),this.path.push({type:"arc",x,y:B,radius:T,startAngle:H,endAngle:J,counterclockwise:Z})},_.prototype.arcTo=function(x,B,T,H,J){throw new Error("arcTo not implemented.")},_.prototype.rect=function(x,B,T,H){if(isNaN(x)||isNaN(B)||isNaN(T)||isNaN(H))throw Se.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(x,B),this.lineTo(x+T,B),this.lineTo(x+T,B+H),this.lineTo(x,B+H),this.lineTo(x,B),this.lineTo(x+T,B),this.lineTo(x,B)},_.prototype.fillRect=function(x,B,T,H){if(isNaN(x)||isNaN(B)||isNaN(T)||isNaN(H))throw Se.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(x,B,T,H),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},_.prototype.strokeRect=function(x,B,T,H){if(isNaN(x)||isNaN(B)||isNaN(T)||isNaN(H))throw Se.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");j.call(this)||(this.beginPath(),this.rect(x,B,T,H),this.stroke())},_.prototype.clearRect=function(x,B,T,H){if(isNaN(x)||isNaN(B)||isNaN(T)||isNaN(H))throw Se.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(x,B,T,H))},_.prototype.save=function(x){x=typeof x!="boolean"||x;for(var B=this.pdf.internal.getCurrentPageInfo().pageNumber,T=0;T0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};_.prototype.drawImage=function(x,B,T,H,J,Z,at,st,gt){var _t=this.pdf.getImageProperties(x),kt=1,St=1,Dt=1,P=1;H!==void 0&&st!==void 0&&(Dt=st/H,P=gt/J,kt=_t.width/H*st/H,St=_t.height/J*gt/J),Z===void 0&&(Z=B,at=T,B=0,T=0),H!==void 0&&st===void 0&&(st=H,gt=J),H===void 0&&st===void 0&&(st=_t.width,gt=_t.height);var Lt=this.ctx.transform.decompose(),ae=nt(Lt.rotate.shx),Ht=new h,yt=(Ht=(Ht=(Ht=Ht.multiply(Lt.translate)).multiply(Lt.skew)).multiply(Lt.scale)).applyToRectangle(new l(Z-B*Dt,at-T*P,H*kt,J*St));if(this.autoPaging){for(var Wt,Ct=M.call(this,yt),zt=[],qt=0;qtve||Ztyt||Ct0)){for(;gt>=0;gt--)if(J[gt-1].close!==!0&&J[gt-1].begin!==!0){J[gt-1].deltas.push(T),J[gt-1].abs.push(st);break}}break;case"bct":T=[st.x1-Z[at-1].x,st.y1-Z[at-1].y,st.x2-Z[at-1].x,st.y2-Z[at-1].y,st.x-Z[at-1].x,st.y-Z[at-1].y],J[J.length-1].deltas.push(T);break;case"qct":var _t=Z[at-1].x+2/3*(st.x1-Z[at-1].x),kt=Z[at-1].y+2/3*(st.y1-Z[at-1].y),St=st.x+2/3*(st.x1-st.x),Dt=st.y+2/3*(st.y1-st.y),P=st.x,Lt=st.y;T=[_t-Z[at-1].x,kt-Z[at-1].y,St-Z[at-1].x,Dt-Z[at-1].y,P-Z[at-1].x,Lt-Z[at-1].y],J[J.length-1].deltas.push(T);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(st)}}H=B?null:x==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*x.scale),J=this.lineWidth,this.lineWidth=J*x.scale);var ne=this.autoPaging!=="text";if(ne||Bt.y+Bt.h<=qt){if(ne||Bt.y>=Ct&&Bt.x<=ue){var Tt=ne?x.text:this.pdf.splitTextToSize(x.text,x.maxWidth||ue-Bt.x)[0],He=V([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-he+Ct+this.ctx.prevPageLastElemOffset)[0],ge=ne&&(Wt>Ht||Wt=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)}}else x.scale>=.01&&(H=this.pdf.internal.getFontSize(),this.pdf.setFontSize(H*x.scale),J=this.lineWidth,this.lineWidth=J*x.scale),this.pdf.text(x.text,gt.x+this.posX,gt.y+this.posY,{angle:x.angle,align:B,renderingMode:x.renderingMode,maxWidth:x.maxWidth}),x.scale>=.01&&(this.pdf.setFontSize(H),this.lineWidth=J)},z=function(x,B,T,H){T=T||0,H=H||0,this.pdf.internal.out(t(x+T)+" "+i(B+H)+" l")},U=function(x,B,T){return this.pdf.lines(x,B,T,null,null)},rt=function(x,B,T,H,J,Z,at,st){this.pdf.internal.out([e(s(T+x)),e(a(H+B)),e(s(J+x)),e(a(Z+B)),e(s(at+x)),e(a(st+B)),"c"].join(" "))},ot=function(x,B,T,H){for(var J=2*Math.PI,Z=Math.PI/2;B>T;)B-=J;var at=Math.abs(T-B);at1e-5;){var kt=_t+gt*Math.min(at,Z);st.push(ft.call(this,x,_t,kt)),at-=Math.abs(kt-_t),_t=kt}return st},ft=function(x,B,T){var H=(T-B)/2,J=x*Math.cos(H),Z=x*Math.sin(H),at=J,st=-Z,gt=at*at+st*st,_t=gt+at*J+st*Z,kt=4/3*(Math.sqrt(2*gt*_t)-_t)/(at*Z-st*J),St=at-kt*st,Dt=st+kt*at,P=St,Lt=-Dt,ae=H+B,Ht=Math.cos(ae),yt=Math.sin(ae);return{x1:x*Math.cos(B),y1:x*Math.sin(B),x2:St*Ht-Dt*yt,y2:St*yt+Dt*Ht,x3:P*Ht-Lt*yt,y3:P*yt+Lt*Ht,x4:x*Math.cos(T),y4:x*Math.sin(T)}},nt=function(x){return 180*x/Math.PI},ct=function(x,B,T,H,J,Z){var at=x+.5*(T-x),st=B+.5*(H-B),gt=J+.5*(T-J),_t=Z+.5*(H-Z),kt=Math.min(x,J,at,gt),St=Math.max(x,J,at,gt),Dt=Math.min(B,Z,st,_t),P=Math.max(B,Z,st,_t);return new l(kt,Dt,St-kt,P-Dt)},At=function(x,B,T,H,J,Z,at,st){var gt,_t,kt,St,Dt,P,Lt,ae,Ht,yt,Wt,Ct,zt,qt,ve=T-x,ue=H-B,Zt=J-T,he=Z-H,fe=at-J,Bt=st-Z;for(_t=0;_t<41;_t++)Ht=(Lt=(kt=x+(gt=_t/40)*ve)+gt*((Dt=T+gt*Zt)-kt))+gt*(Dt+gt*(J+gt*fe-Dt)-Lt),yt=(ae=(St=B+gt*ue)+gt*((P=H+gt*he)-St))+gt*(P+gt*(Z+gt*Bt-P)-ae),_t==0?(Wt=Ht,Ct=yt,zt=Ht,qt=yt):(Wt=Math.min(Wt,Ht),Ct=Math.min(Ct,yt),zt=Math.max(zt,Ht),qt=Math.max(qt,yt));return new l(Math.round(Wt),Math.round(Ct),Math.round(zt-Wt),Math.round(qt-Ct))},wt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var x,B,T=(x=this.ctx.lineDash,B=this.ctx.lineDashOffset,JSON.stringify({lineDash:x,lineDashOffset:B}));this.prevLineDash!==T&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=T)}}})(Mt.API),function(n){var e=function(c){var l,h,d,m,_,k,p,j,O,M;for(h=[],d=0,m=(c+=l="\0\0\0\0".slice(c.length%4||4)).length;m>d;d+=4)(_=(c.charCodeAt(d)<<24)+(c.charCodeAt(d+1)<<16)+(c.charCodeAt(d+2)<<8)+c.charCodeAt(d+3))!==0?(k=(_=((_=((_=((_=(_-(M=_%85))/85)-(O=_%85))/85)-(j=_%85))/85)-(p=_%85))/85)%85,h.push(k+33,p+33,j+33,O+33,M+33)):h.push(122);return function(S,V){for(var G=V;G>0;G--)S.pop()}(h,l.length),String.fromCharCode.apply(String,h)+"~>"},t=function(c){var l,h,d,m,_,k=String,p="length",j=255,O="charCodeAt",M="slice",S="replace";for(c[M](-2),c=c[M](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),d=[],m=0,_=(c+=l="uuuuu"[M](c[p]%5||5))[p];_>m;m+=5)h=52200625*(c[O](m)-33)+614125*(c[O](m+1)-33)+7225*(c[O](m+2)-33)+85*(c[O](m+3)-33)+(c[O](m+4)-33),d.push(j&h>>24,j&h>>16,j&h>>8,j&h);return function(V,G){for(var q=G;q>0;q--)V.pop()}(d,l[p]),k.fromCharCode.apply(k,d)},i=function(c){return c.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},s=function(c){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((c=c.replace(/\s/g,"")).indexOf(">")!==-1&&(c=c.substr(0,c.indexOf(">"))),c.length%2&&(c+="0"),l.test(c)===!1)return"";for(var h="",d=0;dimport("./html2canvas.esm-CBrSDip1.js"),[])).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(Kt.DOMPurify?Promise.resolve(Kt.DOMPurify):vo(()=>import("./purify.es-BgtpMKW3.js"),[])).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 h=_e(l);return h==="undefined"?"undefined":h==="string"||l instanceof String?"string":h==="number"||l instanceof Number?"number":h==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":h==="object"?"object":"unknown"},s=function(l,h){var d=document.createElement(l);for(var m in h.className&&(d.className=h.className),h.innerHTML&&h.dompurify&&(d.innerHTML=h.dompurify.sanitize(h.innerHTML)),h.style)d.style[m]=h.style[m];return d},a=function l(h,d){for(var m=h.nodeType===3?document.createTextNode(h.nodeValue):h.cloneNode(!1),_=h.firstChild;_;_=_.nextSibling)d!==!0&&_.nodeType===1&&_.nodeName==="SCRIPT"||m.appendChild(l(_,d));return h.nodeType===1&&(h.nodeName==="CANVAS"?(m.width=h.width,m.height=h.height,m.getContext("2d").drawImage(h,0,0)):h.nodeName!=="TEXTAREA"&&h.nodeName!=="SELECT"||(m.value=h.value),m.addEventListener("load",function(){m.scrollTop=h.scrollTop,m.scrollLeft=h.scrollLeft},!0)),m},c=function l(h){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(h)};(c.prototype=Object.create(Promise.prototype)).constructor=c,c.convert=function(l,h){return l.__proto__=h||c.prototype,l},c.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"}},c.prototype.from=function(l,h){return this.then(function(){switch(h=h||function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(l),h){case"string":return this.then(t).then(function(d){return this.set({src:s("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.")}})},c.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.")}},c.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},h=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);h.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=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(h),this.prop.container.firstChild.appendChild(s("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"})},c.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(h){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,h(this.prop.container,d)}).then(function(h){(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},c.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(h){var d=this.opt.jsPDF,m=this.opt.fontFaces,_=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:_,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;pO&&(j=M,M=O,O=j);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",O>M&&(j=M,M=O,O=j)}return{width:M,height:O,unit:h,k:_,orientation:l}},n.html=function(l,h){(h=h||{}).callback=h.callback||function(){},h.html2canvas=h.html2canvas||{},h.html2canvas.canvas=h.html2canvas.canvas||this.canvas,h.jsPDF=h.jsPDF||this,h.fontFaces=h.fontFaces?h.fontFaces.map(Bo):null;var d=new c(h);return h.worker?d:d.from(l).doCallback()}}(Mt.API),Mt.API.addJS=function(n){var e,t,i=function(s){for(var a="",c=0;c=0&&s[d]==="\\";d--)h++;a+=h%2==0?"\\"+l:l}else a+=l}return a}(n);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+i+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){e!==void 0&&t!==void 0&&this.internal.out("/Names <>")}),this},function(n){var e;n.events.push(["postPutResources",function(){var t=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var s=t.outline.render().split(/\r\n/),a=0;a> endobj")}var p=t.internal.newObject();for(t.internal.write("<< /Names [ "),a=0;a>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+p+" 0 R"),t.internal.write(">>","endobj")}}]),n.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"))}]),n.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(i,s,a){var c={title:s,options:a,children:[]};return i==null&&(i=this.root),i.children.push(c),c},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 s=0;s0&&(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 s=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a0&&this.line("/Prev "+this.makeRef(i.children[a-1])),a0&&(this.line("/First "+this.makeRef(c.children[0])),this.line("/Last "+this.makeRef(c.children[c.children.length-1])));var l=this.count=this.count_r({count:0},c);if(l>0&&this.line("/Count "+l),c.options&&c.options.pageNumber){var h=t.internal.getPageInfo(c.options.pageNumber);this.line("/Dest ["+h.objId+" 0 R /XYZ 0 "+s(0)+" 0]")}this.objEnd()}for(var d=0;d> \r endobj\r `},t.outline.count_r=function(i,s){for(var a=0;a1){U=!0,ot=void 0;var J=R*tt;ft=new Uint8Array(J);for(var Z=new DataView(N.buffer),at=0;at536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[n]()}catch(t){Se.log("bit decode error:"+t)}},Qn.prototype.bit1=function(){var n,e=Math.ceil(this.width/8),t=e%4;for(n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,s=0;s>7-l&1];this.data[c+4*l]=h.blue,this.data[c+4*l+1]=h.green,this.data[c+4*l+2]=h.red,this.data[c+4*l+3]=255}t!==0&&(this.pos+=4-t)}},Qn.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),e=n%4,t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,s=0;s>4,h=15&a,d=this.palette[l];if(this.data[c]=d.blue,this.data[c+1]=d.green,this.data[c+2]=d.red,this.data[c+3]=255,2*s+1>=this.width)break;d=this.palette[h],this.data[c+4]=d.blue,this.data[c+4+1]=d.green,this.data[c+4+2]=d.red,this.data[c+4+3]=255}e!==0&&(this.pos+=4-e)}},Qn.prototype.bit8=function(){for(var n=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,i=0;i=0;t--){for(var i=this.bottom_up?t:this.height-1-t,s=0;s>5&e)/e*255|0,h=(a>>10&e)/e*255|0,d=a>>15?255:0,m=i*this.width*4+4*s;this.data[m]=h,this.data[m+1]=l,this.data[m+2]=c,this.data[m+3]=d}this.pos+=n}},Qn.prototype.bit16=function(){for(var n=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var s=this.bottom_up?i:this.height-1-i,a=0;a>5&t)/t*255|0,d=(c>>11)/e*255|0,m=s*this.width*4+4*a;this.data[m]=d,this.data[m+1]=h,this.data[m+2]=l,this.data[m+3]=255}this.pos+=n}},Qn.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var e=this.bottom_up?n:this.height-1-n,t=0;t=0;n--)for(var e=this.bottom_up?n:this.height-1-n,t=0;ti&&(s.push(n.slice(h,a)),l=0,h=a),l+=e[a],a++;return h!==a&&s.push(n.slice(h,a)),s},Tu=function(n,e,t){t||(t={});var i,s,a,c,l,h,d,m=[],_=[m],k=t.textIndent||0,p=0,j=0,O=n.split(" "),M=ks.apply(this,[" ",t])[0];if(h=t.lineIndent===-1?O[0].length+2:t.lineIndent||0){var S=Array(h).join(" "),V=[];O.map(function(q){(q=q.split(/\s*\n/)).length>1?V=V.concat(q.map(function(it,vt){return(vt&&it.length?` `:"")+it})):V.push(q[0])}),O=V,h=Mu.apply(this,[S,t])}for(a=0,c=O.length;ae||G){if(j>e){for(l=Ru.apply(this,[i,s,e-(k+p),e]),m.push(l.shift()),m=[l.pop()];l.length;)_.push([l.shift()]);j=s.slice(i.length-(m[0]?m[0].length:0)).reduce(function(q,it){return q+it},0)}else m=[i];_.push(m),k=j+h,p=M}else m.push(i),k+=p+j,p=M}return d=h?function(q,it){return(it?S:"")+q.join(" ")}:function(q){return q.join(" ")},_.map(d)},ea.splitTextToSize=function(n,e,t){var i,s=(t=t||{}).fontSize||this.internal.getFontSize(),a=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var _=this.internal.getFont(m.fontName,m.fontStyle),k="Unicode";return _.metadata[k]?{widths:_.metadata[k].widths||{0:1},kerning:_.metadata[k].kerning||{}}:{font:_.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);i=Array.isArray(n)?n:String(n).split(/\r?\n/);var c=1*this.internal.scaleFactor*e/s;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/s:0,a.lineIndent=t.lineIndent;var l,h,d=[];for(l=0,h=i.length;limport("./index.es-UMgmYbRN.js"),__vite__mapDeps([0,1,2]))).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,n,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(k){return k.render(m)}).then(function(){_.addImage(h.toDataURL("image/jpeg",1),e,t,i,s,c,l)})},Mt.API.putTotalPages=function(n){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(n,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var s=0;s1){for(m=0;m>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},Mt.API.addMetadata=function(n,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",t2),this.internal.events.subscribe("postPutResources",Q1)),this},function(n){var e=n.API,t=e.pdfEscape16=function(a,c){for(var l,h=c.metadata.Unicode.widths,d=["","0","00","000","0000"],m=[""],_=0,k=a.length;_> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange`,h=[],_=0,k=(l=Object.keys(a).sort(function(p,j){return p-j})).length;_=100&&(m+=` `+h.length+` beginbfchar `+h.join(` `)+` endbfchar`,h=[]),a[c]!==void 0&&a[c]!==null&&typeof a[c].toString=="function"&&(d=("0000"+a[c].toString(16)).slice(-4),c=("0000"+(+c).toString(16)).slice(-4),h.push("<"+c+"><"+d+">"));return h.length&&(m+=` `+h.length+` beginbfchar `+h.join(` `)+` endbfchar `),m+`endcmap CMapName currentdict /CMap defineresource pop end end`};e.events.push(["putFont",function(a){(function(c){var l=c.font,h=c.out,d=c.newObject,m=c.putStream;if(l.metadata instanceof n.API.TTFFont&&l.encoding==="Identity-H"){for(var _=l.metadata.Unicode.widths,k=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),p="",j=0;j>"),h("endobj");var V=d();h("<<"),h("/Type /Font"),h("/BaseFont /"+ra(l.fontName)),h("/FontDescriptor "+S+" 0 R"),h("/W "+n.API.PDFObject.convert(_)),h("/CIDToGIDMap /Identity"),h("/DW 1000"),h("/Subtype /CIDFontType2"),h("/CIDSystemInfo"),h("<<"),h("/Supplement 0"),h("/Registry (Adobe)"),h("/Ordering ("+l.encoding+")"),h(">>"),h(">>"),h("endobj"),l.objectNumber=d(),h("<<"),h("/Type /Font"),h("/Subtype /Type0"),h("/ToUnicode "+M+" 0 R"),h("/BaseFont /"+ra(l.fontName)),h("/Encoding /"+l.encoding),h("/DescendantFonts ["+V+" 0 R]"),h(">>"),h("endobj"),l.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(c){var l=c.font,h=c.out,d=c.newObject,m=c.putStream;if(l.metadata instanceof n.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var _=l.metadata.rawData,k="",p=0;p<_.length;p++)k+=String.fromCharCode(_[p]);var j=d();m({data:k,addLength1:!0,objectId:j}),h("endobj");var O=d();m({data:i(l.metadata.toUnicode),addLength1:!0,objectId:O}),h("endobj");var M=d();h("<<"),h("/Descent "+l.metadata.decender),h("/CapHeight "+l.metadata.capHeight),h("/StemV "+l.metadata.stemV),h("/Type /FontDescriptor"),h("/FontFile2 "+j+" 0 R"),h("/Flags 96"),h("/FontBBox "+n.API.PDFObject.convert(l.metadata.bbox)),h("/FontName /"+ra(l.fontName)),h("/ItalicAngle "+l.metadata.italicAngle),h("/Ascent "+l.metadata.ascender),h(">>"),h("endobj"),l.objectNumber=d();for(var S=0;S>"),h("endobj"),l.isAlreadyPutted=!0}})(a)}]);var s=function(a){var c,l=a.text||"",h=a.x,d=a.y,m=a.options||{},_=a.mutex||{},k=_.pdfEscape,p=_.activeFontKey,j=_.fonts,O=p,M="",S=0,V="",G=j[O].encoding;if(j[O].encoding!=="Identity-H")return{text:l,x:h,y:d,options:m,mutex:_};for(V=l,O=p,Array.isArray(l)&&(V=l[0]),S=0;S","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],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)$/),V=!1,G=0;this.__bidiEngine__={};var q=function(N){var E=N.charCodeAt(),z=E>>8,U=O[z];return U!==void 0?_[256*U+(255&E)]:z===252||z===253?"AL":S.test(z)?"L":z===8?"R":"N"},it=function(N){for(var E,z=0;z=E.length||(rt=z[U-1])!=="EN"&&rt!=="AN"||(ot=E[U+1])!=="EN"&&ot!=="AN"?ct="N":V&&(ot="AN"),ct=ot===rt?ot:"N";break;case"ES":ct=(rt=U>0?z[U-1]:"B")==="EN"&&U+10&&z[U-1]==="EN"){ct="EN";break}if(V){ct="N";break}for(ft=U+1,nt=E.length;ft=1425&&At<=2303||At===64286;if(rt=E[ft],wt&&(rt==="R"||rt==="AL")){ct="R";break}}}ct=U<1||(rt=E[U-1])==="B"?"N":z[U-1];break;case"B":V=!1,s=!0,ct=G;break;case"S":a=!0,ct="N"}return ct},dt=function(N,E,z){var U=N.split("");return z&&X(U,z,{hiLevel:G}),U.reverse(),E&&E.reverse(),U.join("")},X=function(N,E,z){var U,rt,ot,ft,nt,ct=-1,At=N.length,wt=0,x=[],B=G?p:k,T=[];for(V=!1,s=!1,a=!1,rt=0;rt0)if(U===16){for(rt=ct;rt-1){for(rt=ct;rt=0&&H[st]==="WS";st--)J[st]=G}}(T,E,At)},R=function(N,E,z,U,rt){if(!(rt.hiLevel=N){for(nt=wt+1;nt=N;)nt++;for(ct=wt,ft=nt-1;ct=0&&(ot[At]=M[ct+1])}(U,z,rt),R(2,U,E,z,rt),R(1,U,E,z,rt),U.join("")};return this.__bidiEngine__.doBidiReorder=function(N,E,z){if(function(rt,ot){if(ot)for(var ft=0;ft>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=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===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")},n.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},n.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},n.prototype.widthOfString=function(e,t,i){var s,a,c,l;for(c=0,a=0,l=(e=""+e).length;0<=l?al;a=0<=l?++a:--a)s=e.charCodeAt(a),c+=this.widthOfGlyph(this.characterToGlyph(s))+i*(1e3/t)||0;return c*(t/1e3)},n.prototype.lineHeight=function(e,t){var i;return t==null&&(t=!1),i=t?this.lineGap:0,(this.ascender+i-this.decender)/1e3*e},n}();var nr,ti=function(){function n(e){this.data=e??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(e){return this.data[this.pos++]=e},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},n.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},n.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},n.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},n.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},n.prototype.readString=function(e){var t,i;for(i=[],t=0;0<=e?te;t=0<=e?++t:--t)i[t]=String.fromCharCode(this.readByte());return i.join("")},n.prototype.writeString=function(e){var t,i,s;for(s=[],t=0,i=e.length;0<=i?ti;t=0<=i?++t:--t)s.push(this.writeByte(e.charCodeAt(t)));return s},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(e){return this.writeInt16(e)},n.prototype.readLongLong=function(){var e,t,i,s,a,c,l,h;return e=this.readByte(),t=this.readByte(),i=this.readByte(),s=this.readByte(),a=this.readByte(),c=this.readByte(),l=this.readByte(),h=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^i)+4294967296*(255^s)+16777216*(255^a)+65536*(255^c)+256*(255^l)+(255^h)+1):72057594037927940*e+281474976710656*t+1099511627776*i+4294967296*s+16777216*a+65536*c+256*l+h},n.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)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(e){return this.writeInt32(e)},n.prototype.read=function(e){var t,i;for(t=[],i=0;0<=e?ie;i=0<=e?++i:--i)t.push(this.readByte());return t},n.prototype.write=function(e){var t,i,s,a;for(a=[],i=0,s=e.length;ia;s=0<=a?++s:--s)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,s,a,c,l,h,d,m,_,k,p,j,O;for(O in p=Object.keys(t).length,h=Math.log(2),_=16*Math.floor(Math.log(p)/h),c=Math.floor(_/h),m=16*p-_,(s=new ti).writeInt(this.scalarType),s.writeShort(p),s.writeShort(_),s.writeShort(c),s.writeShort(m),a=16*p,d=s.pos+a,l=null,j=[],t)for(k=t[O],s.writeString(O),s.writeInt(n(k)),s.writeInt(d),s.writeInt(k.length),j=j.concat(k),O==="head"&&(l=d),d+=k.length;d%4;)j.push(0),d++;return s.write(j),i=2981146554-n(s.data),s.pos=l+8,s.writeUInt32(i),s.data},n=function(t){var i,s,a,c;for(t=Df.call(t);t.length%4;)t.push(0);for(a=new ti(t),s=0,i=0,c=t.length;ik;h=0<=k?++q:--q)it.push(e.readUInt16());return it}(),e.pos+=2,O=function(){var q,it;for(it=[],h=q=0;0<=k?qk;h=0<=k?++q:--q)it.push(e.readUInt16());return it}(),d=function(){var q,it;for(it=[],h=q=0;0<=k?qk;h=0<=k?++q:--q)it.push(e.readUInt16());return it}(),m=function(){var q,it;for(it=[],h=q=0;0<=k?qk;h=0<=k?++q:--q)it.push(e.readUInt16());return it}(),s=(this.length-e.pos+this.offset)/2,l=function(){var q,it;for(it=[],h=q=0;0<=s?qs;h=0<=s?++q:--q)it.push(e.readUInt16());return it}(),h=S=0,G=a.length;S=M;i=j<=M?++V:--V)m[h]===0?c=i+d[h]:(c=l[m[h]/2+(i-j)-(k-h)]||0)!==0&&(c+=d[h]),this.codeMap[i]=65535&c}e.pos=_}return n.encode=function(e,t){var i,s,a,c,l,h,d,m,_,k,p,j,O,M,S,V,G,q,it,vt,dt,X,R,tt,N,E,z,U,rt,ot,ft,nt,ct,At,wt,x,B,T,H,J,Z,at,st,gt,_t,kt;switch(U=new ti,c=Object.keys(e).sort(function(St,Dt){return St-Dt}),t){case"macroman":for(O=0,M=function(){var St=[];for(j=0;j<256;++j)St.push(0);return St}(),V={0:0},a={},rt=0,ct=c.length;rt=32768)for(h.push(0),vt.push(2*(p.length+R-j)),s=nt=N;N<=m?nt<=m:nt>=m;s=N<=m?++nt:--nt)p.push(i[s].new);else h.push(z-N),vt.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*R+2*p.length),U.writeUInt16(0),U.writeUInt16(tt),U.writeUInt16(X),U.writeUInt16(k),U.writeUInt16(dt),Z=0,x=_.length;Zs;i=0<=s?++i:--i)t=new Yu(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},n.encode=function(e,t){var i,s;return t==null&&(t="macroman"),i=Yu.encode(e,t),(s=new ti).writeUInt16(0),s.writeUInt16(1),i.table=s.data.concat(i.subtable),i},n}(),i2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="hhea",n.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()},n}(),a2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="OS/2",n.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()},n}(),s2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="post",n.prototype.parse=function(e){var t,i,s;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 a;for(i=e.readUInt16(),this.glyphNameIndex=[],a=0;0<=i?ai;a=0<=i?++a:--a)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],s=[];e.posl;a=0<=l?++c:--c)h.push(e.readUInt32());return h}).call(this)}},n}(),o2=function(n,e){this.raw=n,this.length=n.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},l2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="name",n.prototype.parse=function(e){var t,i,s,a,c,l,h,d,m,_,k;for(e.pos=this.offset,e.readShort(),t=e.readShort(),l=e.readShort(),i=[],a=0;0<=t?at;a=0<=t?++a:--a)i.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+l+e.readShort()});for(h={},a=m=0,_=i.length;m<_;a=++m)s=i[a],e.pos=s.offset,d=e.readString(s.length),c=new o2(d,s),h[k=s.nameID]==null&&(h[k]=[]),h[s.nameID].push(c);this.strings=h,this.copyright=h[0],this.fontFamily=h[1],this.fontSubfamily=h[2],this.uniqueSubfamily=h[3],this.fontName=h[4],this.version=h[5];try{this.postscriptName=h[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=h[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=h[7],this.manufacturer=h[8],this.designer=h[9],this.description=h[10],this.vendorUrl=h[11],this.designerUrl=h[12],this.license=h[13],this.licenseUrl=h[14],this.preferredFamily=h[15],this.preferredSubfamily=h[17],this.compatibleFull=h[18],this.sampleText=h[19]},n}(),u2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="maxp",n.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()},n}(),f2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="hmtx",n.prototype.parse=function(e){var t,i,s,a,c,l,h;for(e.pos=this.offset,this.metrics=[],t=0,l=this.file.hhea.numberOfMetrics;0<=l?tl;t=0<=l?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(s=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var d,m;for(m=[],t=d=0;0<=s?ds;t=0<=s?++d:--d)m.push(e.readInt16());return m}(),this.widths=(function(){var d,m,_,k;for(k=[],d=0,m=(_=this.metrics).length;ds;t=0<=s?++c:--c)h.push(this.widths.push(i));return h},n.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]}},n}(),Df=[].slice,h2=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return mr(n,nr),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(e){var t,i,s,a,c,l,h,d,m,_;return e in this.cache?this.cache[e]:(a=this.file.loca,t=this.file.contents,i=a.indexOf(e),(s=a.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+i,c=(l=new ti(t.read(s))).readShort(),d=l.readShort(),_=l.readShort(),h=l.readShort(),m=l.readShort(),this.cache[e]=c===-1?new d2(l,d,_,h,m):new c2(l,c,d,_,h,m),this.cache[e]))},n.prototype.encode=function(e,t,i){var s,a,c,l,h;for(c=[],a=[],l=0,h=t.length;l0&&(s+=h)}for(var d=new Array(4*i.length),m=0;m>8,d[4*m+1]=(16711680&i[m])>>16,d[4*m]=(4278190080&i[m])>>24;return d},n}(),g2=function(){function n(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var e,t,i,s,a;for(t in s=this.font.cmap.tables[0].codeMap,e={},a=this.subset)i=a[t],e[t]=s[i];return e},n.prototype.glyphsFor=function(e){var t,i,s,a,c,l,h;for(s={},c=0,l=e.length;c0)for(a in h=this.glyphsFor(t))i=h[a],s[a]=i;return s},n.prototype.encode=function(e,t){var i,s,a,c,l,h,d,m,_,k,p,j,O,M,S;for(s in i=Tf.encode(this.generateCmap(),"unicode"),c=this.glyphsFor(e),p={0:0},S=i.charMap)p[(h=S[s]).old]=h.new;for(j in k=i.maxGlyphID,c)j in p||(p[j]=k++);return m=function(V){var G,q;for(G in q={},V)q[V[G]]=G;return q}(p),_=Object.keys(m).sort(function(V,G){return V-G}),O=function(){var V,G,q;for(q=[],V=0,G=_.length;V>"),a.join(` `)}return""+t},e}();const b2=Object.freeze(Object.defineProperty({__proto__:null,AcroForm:W1,AcroFormAppearance:It,AcroFormButton:rn,AcroFormCheckBox:ja,AcroFormChoiceField:_i,AcroFormComboBox:Ni,AcroFormEditBox:Ea,AcroFormListBox:Ai,AcroFormPasswordField:Ba,AcroFormPushButton:Oa,AcroFormRadioButton:Li,AcroFormTextField:Qr,GState:Ta,ShadingPattern:$r,TilingPattern:xi,default:Mt,jsPDF:Mt},Symbol.toStringTag,{value:"Module"}));export{_e as _,b2 as j};