Stage 1 of the GIS Analytical Tools concept — client-side spatial analysis: - src/analysis/overlay.js: vector overlays (intersect / clip / difference / union-dissolve) on Turf.js, reprojecting to WGS84 and merging attributes (intersect keeps both layers', clip keeps only A's). - src/analysis/zonal.js: vector-in-vector zonal statistics — count / sum / mean / min / max / total area per zone, with centroid-in-zone (default) or any-overlap membership. - Bounding-box pre-filtering in both: only genuinely overlapping pairs reach the expensive geometry test. 43 zones x 25,004 parcels now completes in ~106 ms; previously it was refused as too large. - src/analysis-modal.js + markup: Analysis panel with "Apply to" scoping — whole layer, current map view, selected features, or the catch of a drawn Circle/Area. Reached from a new "Analyse" dock button. - MapView.addCOGLayer() for Cloud-Optimized GeoTIFF display (WebGLTile + GeoTIFF source, imported lazily); listVectorLayers(); getSelectedFeatures(). - Circle/Area analysis popup: one "Export" button (PDF folded into the export modal as a fourth format, field-rename table hidden for it) plus an "Analyse" button that opens the panel pre-scoped to the intersecting features. - vite.config.js: code-split turf, geotiff and pako so the eager bundle is unchanged (~283 kB). Giving pako its own chunk also fixes a circular chunk between jspdf and geotiff, which share it via fast-png. Drawing-tool fixes carried in the same working tree: - Delete/Backspace key deletes the selection via the EditBar's Delete interaction (same undoable block as the button). - Multi-select: shift-click toggles, Ctrl/Cmd-drag box-selects; helper layers (vertex overlay, GPS) excluded. - Undo: split/merge/divide wrapped in undo blocks so one press reverses the whole operation; vertex-overlay churn no longer pollutes the undo stack; sources are re-scanned and the stack cleared when edit mode is entered, so deletes on sub-grouped layers are undoable. NOTE: the undo behaviour is not yet confirmed on-device. - ol-ext TouchCursor gated to touch-only devices, so hybrid touchscreen laptops keep the normal cursor. Service worker v12 -> v13. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
173 lines
389 KiB
JavaScript
173 lines
389 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-FRV-O2Jm.js","assets/geotiff-BaoeLn6q.js","assets/openlayers-J9qS6Th1.js","assets/openlayers-BtPuoxOl.css","assets/pako-Xa-UToif.js"])))=>i.map(i=>d[i]);
|
||
import{I as yu,i as Il}from"./pako-Xa-UToif.js";import{_ as is}from"./geotiff-BaoeLn6q.js";function xe(e){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(e)}var Xr=Uint8Array,Or=Uint16Array,Es=Int32Array,Os=new Xr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bs=new Xr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wu=new Xr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),uh=function(e,t){for(var r=new Or(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var a=new Es(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)a[o]=o-r[n]<<5|n;return{b:r,r:a}},hh=uh(Os,2),jl=hh.b,As=hh.r;jl[28]=258,As[258]=28;var El=uh(Bs,0),xu=El.r,Ls=new Or(32768);for(var je=0;je<32768;++je){var Vn=(je&43690)>>1|(je&21845)<<1;Vn=(Vn&52428)>>2|(Vn&13107)<<2,Vn=(Vn&61680)>>4|(Vn&3855)<<4,Ls[je]=((Vn&65280)>>8|(Vn&255)<<8)>>1}var La=(function(e,t,r){for(var n=e.length,a=0,o=new Or(t);a<n;++a)e[a]&&++o[e[a]-1];var f=new Or(t);for(a=1;a<t;++a)f[a]=f[a-1]+o[a-1]<<1;var u;if(r){u=new Or(1<<t);var h=15-t;for(a=0;a<n;++a)if(e[a])for(var d=a<<4|e[a],v=t-e[a],y=f[e[a]-1]++<<v,N=y|(1<<v)-1;y<=N;++y)u[Ls[y]>>h]=d}else for(u=new Or(n),a=0;a<n;++a)e[a]&&(u[a]=Ls[f[e[a]-1]++]>>15-e[a]);return u}),mi=new Xr(288);for(var je=0;je<144;++je)mi[je]=8;for(var je=144;je<256;++je)mi[je]=9;for(var je=256;je<280;++je)mi[je]=7;for(var je=280;je<288;++je)mi[je]=8;var vo=new Xr(32);for(var je=0;je<32;++je)vo[je]=5;var Ol=La(mi,9,0),Bl=La(vo,5,0),lh=function(e){return(e+7)/8|0},Ml=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new Xr(e.subarray(t,r))},Pn=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},xa=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},as=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var a=r.length,o=r.slice();if(!a)return{t:ch,l:0};if(a==1){var f=new Xr(r[0].s+1);return f[r[0].s]=1,{t:f,l:1}}r.sort(function(gt,xt){return gt.f-xt.f}),r.push({s:-1,f:25001});var u=r[0],h=r[1],d=0,v=1,y=2;for(r[0]={s:-1,f:u.f+h.f,l:u,r:h};v!=a-1;)u=r[r[d].f<r[y].f?d++:y++],h=r[d!=v&&r[d].f<r[y].f?d++:y++],r[v++]={s:-1,f:u.f+h.f,l:u,r:h};for(var N=o[0].s,n=1;n<a;++n)o[n].s>N&&(N=o[n].s);var g=new Or(N+1),B=Ns(r[v-1],g,0);if(B>t){var n=0,j=0,M=B-t,C=1<<M;for(o.sort(function(xt,Pt){return g[Pt.s]-g[xt.s]||xt.f-Pt.f});n<a;++n){var Y=o[n].s;if(g[Y]>t)j+=C-(1<<B-g[Y]),g[Y]=t;else break}for(j>>=M;j>0;){var K=o[n].s;g[K]<t?j-=1<<t-g[K]++-1:++n}for(;n>=0&&j;--n){var tt=o[n].s;g[tt]==t&&(--g[tt],++j)}B=t}return{t:new Xr(g),l:B}},Ns=function(e,t,r){return e.s==-1?Math.max(Ns(e.l,t,r+1),Ns(e.r,t,r+1)):t[e.s]=r},Au=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Or(++t),n=0,a=e[0],o=1,f=function(h){r[n++]=h},u=1;u<=t;++u)if(e[u]==a&&u!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)f(32754);o>2&&(f(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(f(a),--o;o>6;o-=6)f(8304);o>2&&(f(o-3<<5|8208),o=0)}for(;o--;)f(a);o=1,a=e[u]}return{c:r.subarray(0,n),n:t}},Aa=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},fh=function(e,t,r){var n=r.length,a=lh(t+2);e[a]=n&255,e[a+1]=n>>8,e[a+2]=e[a]^255,e[a+3]=e[a+1]^255;for(var o=0;o<n;++o)e[a+o+4]=r[o];return(a+4+n)*8},Lu=function(e,t,r,n,a,o,f,u,h,d,v){Pn(t,v++,r),++a[256];for(var y=as(a,15),N=y.t,g=y.l,B=as(o,15),j=B.t,M=B.l,C=Au(N),Y=C.c,K=C.n,tt=Au(j),gt=tt.c,xt=tt.n,Pt=new Or(19),et=0;et<Y.length;++et)++Pt[Y[et]&31];for(var et=0;et<gt.length;++et)++Pt[gt[et]&31];for(var U=as(Pt,7),dt=U.t,_=U.l,E=19;E>4&&!dt[wu[E-1]];--E);var q=d+5<<3,T=Aa(a,mi)+Aa(o,vo)+f,rt=Aa(a,N)+Aa(o,j)+f+14+3*E+Aa(Pt,dt)+2*Pt[16]+3*Pt[17]+7*Pt[18];if(h>=0&&q<=T&&q<=rt)return fh(t,v,e.subarray(h,h+d));var at,ut,Q,lt;if(Pn(t,v,1+(rt<T)),v+=2,rt<T){at=La(N,g,0),ut=N,Q=La(j,M,0),lt=j;var At=La(dt,_,0);Pn(t,v,K-257),Pn(t,v+5,xt-1),Pn(t,v+10,E-4),v+=14;for(var et=0;et<E;++et)Pn(t,v+3*et,dt[wu[et]]);v+=3*E;for(var mt=[Y,gt],A=0;A<2;++A)for(var O=mt[A],et=0;et<O.length;++et){var D=O[et]&31;Pn(t,v,At[D]),v+=dt[D],D>15&&(Pn(t,v,O[et]>>5&127),v+=O[et]>>12)}}else at=Ol,ut=mi,Q=Bl,lt=vo;for(var et=0;et<u;++et){var z=n[et];if(z>255){var D=z>>18&31;xa(t,v,at[D+257]),v+=ut[D+257],D>7&&(Pn(t,v,z>>23&31),v+=Os[D]);var V=z&31;xa(t,v,Q[V]),v+=lt[V],V>3&&(xa(t,v,z>>5&8191),v+=Bs[V])}else xa(t,v,at[z]),v+=ut[z]}return xa(t,v,at[256]),v+ut[256]},Dl=new Es([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ch=new Xr(0),Rl=function(e,t,r,n,a,o){var f=o.z||e.length,u=new Xr(n+f+5*(1+Math.ceil(f/7e3))+a),h=u.subarray(n,u.length-a),d=o.l,v=(o.r||0)&7;if(t){v&&(h[0]=o.r>>3);for(var y=Dl[t-1],N=y>>13,g=y&8191,B=(1<<r)-1,j=o.p||new Or(32768),M=o.h||new Or(B+1),C=Math.ceil(r/3),Y=2*C,K=function(Tt){return(e[Tt]^e[Tt+1]<<C^e[Tt+2]<<Y)&B},tt=new Es(25e3),gt=new Or(288),xt=new Or(32),Pt=0,et=0,U=o.i||0,dt=0,_=o.w||0,E=0;U+2<f;++U){var q=K(U),T=U&32767,rt=M[q];if(j[T]=rt,M[q]=T,_<=U){var at=f-U;if((Pt>7e3||dt>24576)&&(at>423||!d)){v=Lu(e,h,0,tt,gt,xt,et,dt,E,U-E,v),dt=Pt=et=0,E=U;for(var ut=0;ut<286;++ut)gt[ut]=0;for(var ut=0;ut<30;++ut)xt[ut]=0}var Q=2,lt=0,At=g,mt=T-rt&32767;if(at>2&&q==K(U-mt))for(var A=Math.min(N,at)-1,O=Math.min(32767,U),D=Math.min(258,at);mt<=O&&--At&&T!=rt;){if(e[U+Q]==e[U+Q-mt]){for(var z=0;z<D&&e[U+z]==e[U+z-mt];++z);if(z>Q){if(Q=z,lt=mt,z>A)break;for(var V=Math.min(mt,z-2),X=0,ut=0;ut<V;++ut){var nt=U-mt+ut&32767,it=j[nt],ct=nt-it&32767;ct>X&&(X=ct,rt=nt)}}}T=rt,rt=j[T],mt+=T-rt&32767}if(lt){tt[dt++]=268435456|As[Q]<<18|xu[lt];var wt=As[Q]&31,_t=xu[lt]&31;et+=Os[wt]+Bs[_t],++gt[257+wt],++xt[_t],_=U+Q,++Pt}else tt[dt++]=e[U],++gt[e[U]]}}for(U=Math.max(U,_);U<f;++U)tt[dt++]=e[U],++gt[e[U]];v=Lu(e,h,d,tt,gt,xt,et,dt,E,U-E,v),d||(o.r=v&7|h[v/8|0]<<3,v-=7,o.h=M,o.p=j,o.i=U,o.w=_)}else{for(var U=o.w||0;U<f+d;U+=65535){var St=U+65535;St>=f&&(h[v/8|0]=d,St=f),v=fh(h,v+1,e.subarray(U,St))}o.i=f}return Ml(u,0,n+lh(v)+a)},dh=function(){var e=1,t=0;return{p:function(r){for(var n=e,a=t,o=r.length|0,f=0;f!=o;){for(var u=Math.min(f+2655,o);f<u;++f)a+=n+=r[f];n=(n&65535)+15*(n>>16),a=(a&65535)+15*(a>>16)}e=n,t=a},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},Tl=function(e,t,r,n,a){if(!a&&(a={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),f=new Xr(o.length+e.length);f.set(o),f.set(e,o.length),e=f,a.w=o.length}return Rl(e,t.level==null?6:t.level,t.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,a)},ph=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ql=function(e,t){var r=t.level,n=r==0?0:r<6?1:r==9?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var a=dh();a.p(t.dictionary),ph(e,2,a.d())}};function Ss(e,t){t||(t={});var r=dh();r.p(e);var n=Tl(e,t,t.dictionary?6:2,4);return ql(n,t),ph(n,n.length-4,r.d()),n}var Ul=typeof TextDecoder<"u"&&new TextDecoder,zl=0;try{Ul.decode(ch,{stream:!0}),zl=1}catch{}function Hl(e){if(Array.isArray(e))return e}function Wl(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,f,u=[],h=!0,d=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(h=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);h=!0);}catch(v){d=!0,a=v}finally{try{if(!h&&r.return!=null&&(f=r.return(),Object(f)!==f))return}finally{if(d)throw a}}return u}}function Nu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Vl(e,t){if(e){if(typeof e=="string")return Nu(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nu(e,t):void 0}}function Gl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Su(e,t){return Hl(e)||Wl(e,t)||Vl(e,t)||Gl()}function _u(e,t="utf8"){return new TextDecoder(t).decode(e)}const Yl=new TextEncoder;function Jl(e){return Yl.encode(e)}const Kl=1024*8,Xl=(()=>{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),os={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Ms{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=Kl,r={}){let n=!1;typeof t=="number"?t=new ArrayBuffer(t):(n=!0,this.lastWrittenByte=t.byteLength);const a=r.offset?r.offset>>>0:0,o=t.byteLength-a;let f=a;(ArrayBuffer.isView(t)||t instanceof Ms)&&(t.byteLength!==t.buffer.byteLength&&(f=t.byteOffset+a),t=t.buffer),n?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=f,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,f,o),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const n=(this.offset+t)*2,a=new Uint8Array(n);a.set(new Uint8Array(this.buffer)),this.buffer=a.buffer,this.length=n,this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,r){const n=os[r].BYTES_PER_ELEMENT*t,a=this.byteOffset+this.offset,o=this.buffer.slice(a,a+n);if(this.littleEndian===Xl&&r!=="uint8"&&r!=="int8"){const u=new Uint8Array(this.buffer.slice(a,a+n));u.reverse();const h=new os[r](u.buffer);return this.offset+=n,h.reverse(),h}const f=new os[r](o);return this.offset+=n,f}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let n=0;n<t;n++)r+=this.readChar();return r}readUtf8(t=1){return _u(this.readBytes(t))}decodeText(t=1,r="utf8"){return _u(this.readBytes(t),r)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++)this._data.setUint8(this.offset++,t[r]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));return this}writeUtf8(t){return this.writeBytes(Jl(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}const gh=[];for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t=t>>>1;gh[e]=t}const Pu=4294967295;function $l(e,t,r){let n=e;for(let a=0;a<r;a++)n=gh[(n^t[a])&255]^n>>>8;return n}function Zl(e,t){return($l(Pu,e,t)^Pu)>>>0}function ku(e,t,r){const n=e.readUint32(),a=Zl(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(a!==n)throw new Error(`CRC mismatch for chunk ${r}. Expected ${n}, found ${a}`)}function vh(e,t,r){for(let n=0;n<r;n++)t[n]=e[n]}function mh(e,t,r,n){let a=0;for(;a<n;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-n]&255}function bh(e,t,r,n){let a=0;if(r.length===0)for(;a<n;a++)t[a]=e[a];else for(;a<n;a++)t[a]=e[a]+r[a]&255}function yh(e,t,r,n,a){let o=0;if(r.length===0){for(;o<a;o++)t[o]=e[o];for(;o<n;o++)t[o]=e[o]+(t[o-a]>>1)&255}else{for(;o<a;o++)t[o]=e[o]+(r[o]>>1)&255;for(;o<n;o++)t[o]=e[o]+(t[o-a]+r[o]>>1)&255}}function wh(e,t,r,n,a){let o=0;if(r.length===0){for(;o<a;o++)t[o]=e[o];for(;o<n;o++)t[o]=e[o]+t[o-a]&255}else{for(;o<a;o++)t[o]=e[o]+r[o]&255;for(;o<n;o++)t[o]=e[o]+Ql(t[o-a],r[o],r[o-a])&255}}function Ql(e,t,r){const n=e+t-r,a=Math.abs(n-e),o=Math.abs(n-t),f=Math.abs(n-r);return a<=o&&a<=f?e:o<=f?t:r}function tf(e,t,r,n,a,o){switch(e){case 0:vh(t,r,a);break;case 1:mh(t,r,a,o);break;case 2:bh(t,r,n,a);break;case 3:yh(t,r,n,a,o);break;case 4:wh(t,r,n,a,o);break;default:throw new Error(`Unsupported filter: ${e}`)}}const ef=new Uint16Array([255]),rf=new Uint8Array(ef.buffer),nf=rf[0]===255;function af(e){const{data:t,width:r,height:n,channels:a,depth:o}=e,f=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],u=Math.ceil(o/8)*a,h=new Uint8Array(n*r*u);let d=0;for(let v=0;v<7;v++){const y=f[v],N=Math.ceil((r-y.x)/y.xStep),g=Math.ceil((n-y.y)/y.yStep);if(N<=0||g<=0)continue;const B=N*u,j=new Uint8Array(B);for(let M=0;M<g;M++){const C=t[d++],Y=t.subarray(d,d+B);d+=B;const K=new Uint8Array(B);tf(C,Y,K,j,B,u),j.set(K);for(let tt=0;tt<N;tt++){const gt=y.x+tt*y.xStep,xt=y.y+M*y.yStep;if(!(gt>=r||xt>=n))for(let Pt=0;Pt<u;Pt++)h[(xt*r+gt)*u+Pt]=K[tt*u+Pt]}}}if(o===16){const v=new Uint16Array(h.buffer);if(nf)for(let y=0;y<v.length;y++)v[y]=of(v[y]);return v}else return h}function of(e){return(e&255)<<8|e>>8&255}const sf=new Uint16Array([255]),uf=new Uint8Array(sf.buffer),hf=uf[0]===255,lf=new Uint8Array(0);function Cu(e){const{data:t,width:r,height:n,channels:a,depth:o}=e,f=Math.ceil(o/8)*a,u=Math.ceil(o/8*a*r),h=new Uint8Array(n*u);let d=lf,v=0,y,N;for(let g=0;g<n;g++){switch(y=t.subarray(v+1,v+1+u),N=h.subarray(g*u,(g+1)*u),t[v]){case 0:vh(y,N,u);break;case 1:mh(y,N,u,f);break;case 2:bh(y,N,d,u);break;case 3:yh(y,N,d,u,f);break;case 4:wh(y,N,d,u,f);break;default:throw new Error(`Unsupported filter: ${t[v]}`)}d=N,v+=u+1}if(o===16){const g=new Uint16Array(h.buffer);if(hf)for(let B=0;B<g.length;B++)g[B]=ff(g[B]);return g}else return h}function ff(e){return(e&255)<<8|e>>8&255}const ho=Uint8Array.of(137,80,78,71,13,10,26,10);function Fu(e){if(!cf(e.readBytes(ho.length)))throw new Error("wrong PNG signature")}function cf(e){if(e.length<ho.length)return!1;for(let t=0;t<ho.length;t++)if(e[t]!==ho[t])return!1;return!0}const df="tEXt",pf=0,xh=new TextDecoder("latin1");function gf(e){if(mf(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const vf=/^[\u0000-\u00FF]*$/;function mf(e){if(!vf.test(e))throw new Error("invalid latin1 text")}function bf(e,t,r){const n=Ah(t);e[n]=yf(t,r-n.length-1)}function Ah(e){for(e.mark();e.readByte()!==pf;);const t=e.offset;e.reset();const r=xh.decode(e.readBytes(t-e.offset-1));return e.skip(1),gf(r),r}function yf(e,t){return xh.decode(e.readBytes(t))}const Er={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},ss={UNKNOWN:-1,DEFLATE:0},Iu={UNKNOWN:-1,ADAPTIVE:0},us={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},ao={NONE:0,BACKGROUND:1,PREVIOUS:2},hs={SOURCE:0,OVER:1};class wf extends Ms{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,r={}){super(t);const{checkCrc:n=!1}=r;this._checkCrc=n,this._inflator=new yu,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=ss.UNKNOWN,this._filterMethod=Iu.UNKNOWN,this._interlaceMethod=us.UNKNOWN,this._colorType=Er.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Fu(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeChunk(t,r)}return this.decodeImage(),this._png}decodeApng(){for(Fu(this);!this._end;){const t=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(t,r)}return this.decodeApngImage(),this._apng}decodeChunk(t,r){const n=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case df:bf(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?ku(this,t+4,r):this.skip(4)}decodeApngChunk(t,r){const n=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,r),this.offset=n+t;break}if(this.offset-n!==t)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?ku(this,t+4,r):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=xf(this.readUint8());const r=this.readUint8();this._colorType=r;let n;switch(r){case Er.GREYSCALE:n=1;break;case Er.TRUECOLOUR:n=3;break;case Er.INDEXED_COLOUR:n=1;break;case Er.GREYSCALE_ALPHA:n=2;break;case Er.TRUECOLOUR_ALPHA:n=4;break;case Er.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==ss.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const r=t/3;this._hasPalette=!0;const n=[];this._palette=n;for(let a=0;a<r;a++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const r=t,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let r=t,n=this.offset+this.byteOffset;if(n+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,n,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case Er.GREYSCALE:case Er.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let r=0;r<t/2;r++)this._transparency[r]=this.readUint16();break}case Er.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let r=0;for(;r<t;r++){const n=this.readByte();this._palette[r].push(n)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case Er.UNKNOWN:case Er.GREYSCALE_ALPHA:case Er.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const r=Ah(this),n=this.readUint8();if(n!==ss.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${n}`);const a=this.readBytes(t-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:Il(a)}}decodepHYs(){const t=this.readUint32(),r=this.readUint32(),n=this.readByte();this._png.resolution={x:t,y:r,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const r={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(t);if(n){if(n.data=Cu({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)r.data=n.data;else{const a=this._apng.frames.at(t-1);this.disposeFrame(n,a,r),this.addFrameDataToCanvas(r,n)}this._apng.frames.push(r)}}return this._apng}disposeFrame(t,r,n){switch(t.disposeOp){case ao.NONE:break;case ao.BACKGROUND:for(let a=0;a<this._png.height;a++)for(let o=0;o<this._png.width;o++){const f=(a*t.width+o)*this._png.channels;for(let u=0;u<this._png.channels;u++)n.data[f+u]=0}break;case ao.PREVIOUS:n.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,r){const n=1<<this._png.depth,a=(o,f)=>{const u=((o+r.yOffset)*this._png.width+r.xOffset+f)*this._png.channels,h=(o*r.width+f)*this._png.channels;return{index:u,frameIndex:h}};switch(r.blendOp){case hs.SOURCE:for(let o=0;o<r.height;o++)for(let f=0;f<r.width;f++){const{index:u,frameIndex:h}=a(o,f);for(let d=0;d<this._png.channels;d++)t.data[u+d]=r.data[h+d]}break;case hs.OVER:for(let o=0;o<r.height;o++)for(let f=0;f<r.width;f++){const{index:u,frameIndex:h}=a(o,f);for(let d=0;d<this._png.channels;d++){const v=r.data[h+this._png.channels-1]/n,y=d%(this._png.channels-1)===0?1:r.data[h+d],N=Math.floor(v*y+(1-v)*t.data[u+d]);t.data[u+d]+=N}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==Iu.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===us.NO_INTERLACE)this._png.data=Cu({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===us.ADAM7)this._png.data=af({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,r=this._frames.at(-1);r?r.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:ao.NONE,blendOp:hs.SOURCE,data:t}),this._inflator=new yu,this._writingDataChunks=!1}}function xf(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var ju;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(ju||(ju={}));function Af(e,t){return new wf(e,t).decode()}var Kt=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function ls(){Kt.console&&typeof Kt.console.log=="function"&&Kt.console.log.apply(Kt.console,arguments)}var Se={log:ls,warn:function(e){Kt.console&&(typeof Kt.console.warn=="function"?Kt.console.warn.apply(Kt.console,arguments):ls.call(null,arguments))},error:function(e){Kt.console&&(typeof Kt.console.error=="function"?Kt.console.error.apply(Kt.console,arguments):ls(e))}};function fs(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){pi(n.response,t,r)},n.onerror=function(){Se.error("could not download file")},n.send()}function Eu(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function oo(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var pi=Kt.saveAs||((typeof window>"u"?"undefined":xe(window))!=="object"||window!==Kt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,r){var n=Kt.URL||Kt.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener",typeof e=="string"?(a.href=e,a.origin!==location.origin?Eu(a.href)?fs(e,t,r):oo(a,a.target="_blank"):oo(a)):(a.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(a.href)},4e4),setTimeout(function(){oo(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e=="string")if(Eu(e))fs(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){oo(n)})}else navigator.msSaveOrOpenBlob((function(a,o){return o===void 0?o={autoBom:!1}:xe(o)!=="object"&&(Se.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a})(e,r),t)}:function(e,t,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return fs(e,t,r);var a=e.type==="application/octet-stream",o=/constructor/i.test(Kt.HTMLElement)||Kt.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent);if((f||a&&o)&&(typeof FileReader>"u"?"undefined":xe(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var v=u.result;v=f?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=v:location=v,n=null},u.readAsDataURL(e)}else{var h=Kt.URL||Kt.webkitURL,d=h.createObjectURL(e);n?n.location=d:location.href=d,n=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});/**
|
||
* A class to parse color values
|
||
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
||
* @license Use it if you like it
|
||
*/function Lh(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],n=0;n<r.length;n++){var a=r[n].re,o=r[n].process,f=a.exec(e);f&&(t=o(f),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),h=this.g.toString(16),d=this.b.toString(16);return u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),d.length==1&&(d="0"+d),"#"+u+h+d}}var lo=Kt.atob.bind(Kt),Ou=Kt.btoa.bind(Kt);/**
|
||
* @license
|
||
* Joseph Myers does not specify a particular license for his work.
|
||
*
|
||
* Author: Joseph Myers
|
||
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
||
*
|
||
* Modified by: Owen Leong
|
||
*/function cs(e,t){var r=e[0],n=e[1],a=e[2],o=e[3];r=dr(r,n,a,o,t[0],7,-680876936),o=dr(o,r,n,a,t[1],12,-389564586),a=dr(a,o,r,n,t[2],17,606105819),n=dr(n,a,o,r,t[3],22,-1044525330),r=dr(r,n,a,o,t[4],7,-176418897),o=dr(o,r,n,a,t[5],12,1200080426),a=dr(a,o,r,n,t[6],17,-1473231341),n=dr(n,a,o,r,t[7],22,-45705983),r=dr(r,n,a,o,t[8],7,1770035416),o=dr(o,r,n,a,t[9],12,-1958414417),a=dr(a,o,r,n,t[10],17,-42063),n=dr(n,a,o,r,t[11],22,-1990404162),r=dr(r,n,a,o,t[12],7,1804603682),o=dr(o,r,n,a,t[13],12,-40341101),a=dr(a,o,r,n,t[14],17,-1502002290),r=pr(r,n=dr(n,a,o,r,t[15],22,1236535329),a,o,t[1],5,-165796510),o=pr(o,r,n,a,t[6],9,-1069501632),a=pr(a,o,r,n,t[11],14,643717713),n=pr(n,a,o,r,t[0],20,-373897302),r=pr(r,n,a,o,t[5],5,-701558691),o=pr(o,r,n,a,t[10],9,38016083),a=pr(a,o,r,n,t[15],14,-660478335),n=pr(n,a,o,r,t[4],20,-405537848),r=pr(r,n,a,o,t[9],5,568446438),o=pr(o,r,n,a,t[14],9,-1019803690),a=pr(a,o,r,n,t[3],14,-187363961),n=pr(n,a,o,r,t[8],20,1163531501),r=pr(r,n,a,o,t[13],5,-1444681467),o=pr(o,r,n,a,t[2],9,-51403784),a=pr(a,o,r,n,t[7],14,1735328473),r=gr(r,n=pr(n,a,o,r,t[12],20,-1926607734),a,o,t[5],4,-378558),o=gr(o,r,n,a,t[8],11,-2022574463),a=gr(a,o,r,n,t[11],16,1839030562),n=gr(n,a,o,r,t[14],23,-35309556),r=gr(r,n,a,o,t[1],4,-1530992060),o=gr(o,r,n,a,t[4],11,1272893353),a=gr(a,o,r,n,t[7],16,-155497632),n=gr(n,a,o,r,t[10],23,-1094730640),r=gr(r,n,a,o,t[13],4,681279174),o=gr(o,r,n,a,t[0],11,-358537222),a=gr(a,o,r,n,t[3],16,-722521979),n=gr(n,a,o,r,t[6],23,76029189),r=gr(r,n,a,o,t[9],4,-640364487),o=gr(o,r,n,a,t[12],11,-421815835),a=gr(a,o,r,n,t[15],16,530742520),r=vr(r,n=gr(n,a,o,r,t[2],23,-995338651),a,o,t[0],6,-198630844),o=vr(o,r,n,a,t[7],10,1126891415),a=vr(a,o,r,n,t[14],15,-1416354905),n=vr(n,a,o,r,t[5],21,-57434055),r=vr(r,n,a,o,t[12],6,1700485571),o=vr(o,r,n,a,t[3],10,-1894986606),a=vr(a,o,r,n,t[10],15,-1051523),n=vr(n,a,o,r,t[1],21,-2054922799),r=vr(r,n,a,o,t[8],6,1873313359),o=vr(o,r,n,a,t[15],10,-30611744),a=vr(a,o,r,n,t[6],15,-1560198380),n=vr(n,a,o,r,t[13],21,1309151649),r=vr(r,n,a,o,t[4],6,-145523070),o=vr(o,r,n,a,t[11],10,-1120210379),a=vr(a,o,r,n,t[2],15,718787259),n=vr(n,a,o,r,t[9],21,-343485551),e[0]=Yn(r,e[0]),e[1]=Yn(n,e[1]),e[2]=Yn(a,e[2]),e[3]=Yn(o,e[3])}function xo(e,t,r,n,a,o){return t=Yn(Yn(t,e),Yn(n,o)),Yn(t<<a|t>>>32-a,r)}function dr(e,t,r,n,a,o,f){return xo(t&r|~t&n,e,t,a,o,f)}function pr(e,t,r,n,a,o,f){return xo(t&n|r&~n,e,t,a,o,f)}function gr(e,t,r,n,a,o,f){return xo(t^r^n,e,t,a,o,f)}function vr(e,t,r,n,a,o,f){return xo(r^(t|~n),e,t,a,o,f)}function Nh(e){var t,r=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)cs(n,Lf(e.substring(t-64,t)));e=e.substring(t-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(cs(n,a),t=0;t<16;t++)a[t]=0;return a[14]=8*r,cs(n,a),n}function Lf(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}var Bu="0123456789abcdef".split("");function Nf(e){for(var t="",r=0;r<4;r++)t+=Bu[e>>8*r+4&15]+Bu[e>>8*r&15];return t}function Sf(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function _s(e){return Nh(e).map(Sf).join("")}var _f=(function(e){for(var t=0;t<e.length;t++)e[t]=Nf(e[t]);return e.join("")})(Nh("hello"))!="5d41402abc4b2a76b9719d911017c592";function Yn(e,t){if(_f){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}return e+t&4294967295}/**
|
||
* @license
|
||
* FPDF is released under a permissive license: there is no usage restriction.
|
||
* You may embed it freely in your application (commercial or not), with or
|
||
* without modifications.
|
||
*
|
||
* Reference: http://www.fpdf.org/en/script/script37.php
|
||
*/function Ps(e,t){var r,n,a,o;if(e!==r){for(var f=(a=e,o=1+(256/e.length|0),new Array(o+1).join(a)),u=[],h=0;h<256;h++)u[h]=h;var d=0;for(h=0;h<256;h++){var v=u[h];d=(d+v+f.charCodeAt(h))%256,u[h]=u[d],u[d]=v}r=e,n=u}else u=n;var y=t.length,N=0,g=0,B="";for(h=0;h<y;h++)g=(g+(v=u[N=(N+1)%256]))%256,u[N]=u[g],u[g]=v,f=u[(u[N]+u[g])%256],B+=String.fromCharCode(t.charCodeAt(h)^f);return B}/**
|
||
* @license
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
* Author: Owen Leong (@owenl131)
|
||
* Date: 15 Oct 2020
|
||
* References:
|
||
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
||
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
||
* http://www.fpdf.org/en/script/script37.php
|
||
*/var Mu={print:4,modify:8,copy:16,"annot-forms":32};function Wi(e,t,r,n){this.v=1,this.r=2;var a=192;e.forEach(function(u){if(Mu.perm!==void 0)throw new Error("Invalid permission: "+u);a+=Mu[u]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var o=(t+this.padding).substr(0,32),f=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,f),this.P=-(1+(255^a)),this.encryptionKey=_s(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Ps(this.encryptionKey,this.padding)}function Vi(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n<r;n++){var a=e.charCodeAt(n);t+=a<33||a===35||a===37||a===40||a===41||a===47||a===60||a===62||a===91||a===93||a===123||a===125||a>126?"#"+("0"+a.toString(16)).slice(-2):e[n]}return t}function Du(e){if(xe(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,n,a){if(a=a||!1,typeof r!="string"||typeof n!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var o=Math.random().toString(35);return t[r][o]=[n,!!a],o},this.unsubscribe=function(r){for(var n in t)if(t[n][r])return delete t[n][r],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),a=[];for(var o in t[r]){var f=t[r][o];try{f[0].apply(e,n)}catch(u){Kt.console&&Se.error("jsPDF PubSub Error",u.message,u)}f[1]&&a.push(o)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function mo(e){if(!(this instanceof mo))return new mo(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function Sh(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function gi(e,t,r,n,a){if(!(this instanceof gi))return new gi(e,t,r,n,a);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,Sh.call(this,n,a)}function Gi(e,t,r,n,a){if(!(this instanceof Gi))return new Gi(e,t,r,n,a);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,Sh.call(this,n,a)}function Rt(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],a=arguments[2],o=arguments[3],f=[],u=1,h=16,d="S",v=null;xe(e=e||{})==="object"&&(r=e.orientation,n=e.unit||n,a=e.format||a,o=e.compress||e.compressPdf||o,(v=e.encryption||null)!==null&&(v.userPassword=v.userPassword||"",v.ownerPassword=v.ownerPassword||"",v.userPermissions=v.userPermissions||[]),u=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(h=e.floatPrecision),d=e.defaultPathOperation||"S"),f=e.filters||(o===!0?["FlateEncode"]:f),n=n||"mm",r=(""+(r||"P")).toLowerCase();var y=e.putOnlyUsedFonts||!1,N={},g={internal:{},__private__:{}};g.__private__.PubSub=Du;var B="1.3",j=g.__private__.getPdfVersion=function(){return B};g.__private__.setPdfVersion=function(l){B=l};var M={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};g.__private__.getPageFormats=function(){return M};var C=g.__private__.getPageFormat=function(l){return M[l]};a=a||"a4";var Y="compat",K="advanced",tt=Y;function gt(){this.saveGraphicsState(),P(new Gt(re,0,0,-re,0,ei()*re).toString()+" cm"),this.setFontSize(this.getFontSize()/re),d="n",tt=K}function xt(){this.restoreGraphicsState(),d="S",tt=Y}var Pt=g.__private__.combineFontStyleAndFontWeight=function(l,m){if(l=="bold"&&m=="normal"||l=="bold"&&m==400||l=="normal"&&m=="italic"||l=="bold"&&m=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return m&&(l=m==400||m==="normal"?l==="italic"?"italic":"normal":m!=700&&m!=="bold"||l!=="normal"?(m==700?"bold":m)+""+l:"bold"),l};g.advancedAPI=function(l){var m=tt===Y;return m&>.call(this),typeof l!="function"||(l(this),m&&xt.call(this)),this},g.compatAPI=function(l){var m=tt===K;return m&&xt.call(this),typeof l!="function"||(l(this),m&>.call(this)),this},g.isAdvancedAPI=function(){return tt===K};var et,U=function(l){if(tt!==K)throw new Error(l+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},dt=g.roundToPrecision=g.__private__.roundToPrecision=function(l,m){var k=t||m;if(isNaN(l)||isNaN(k))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return l.toFixed(k).replace(/0+$/,"")};et=g.hpf=g.__private__.hpf=typeof h=="number"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return dt(l,h)}:h==="smart"?function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return dt(l,l>-1&&l<1?16:5)}:function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.hpf");return dt(l,16)};var _=g.f2=g.__private__.f2=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f2");return dt(l,2)},E=g.__private__.f3=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.f3");return dt(l,3)},q=g.scale=g.__private__.scale=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.scale");return tt===Y?l*re:tt===K?l:void 0},T=function(l){return q((function(m){return tt===Y?ei()-m:tt===K?m:void 0})(l))};g.__private__.setPrecision=g.setPrecision=function(l){typeof parseInt(l,10)=="number"&&(t=parseInt(l,10))};var rt,at="00000000000000000000000000000000",ut=g.__private__.getFileId=function(){return at},Q=g.__private__.setFileId=function(l){return at=l!==void 0&&/^[a-fA-F0-9]{32}$/.test(l)?l.toUpperCase():at.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),v!==null&&(ir=new Wi(v.userPermissions,v.userPassword,v.ownerPassword,at)),at};g.setFileId=function(l){return Q(l),this},g.getFileId=function(){return ut()};var lt=g.__private__.convertDateToPDFDate=function(l){var m=l.getTimezoneOffset(),k=m<0?"+":"-",R=Math.floor(Math.abs(m/60)),G=Math.abs(m%60),ot=[k,D(R),"'",D(G),"'"].join("");return["D:",l.getFullYear(),D(l.getMonth()+1),D(l.getDate()),D(l.getHours()),D(l.getMinutes()),D(l.getSeconds()),ot].join("")},At=g.__private__.convertPDFDateToDate=function(l){var m=parseInt(l.substr(2,4),10),k=parseInt(l.substr(6,2),10)-1,R=parseInt(l.substr(8,2),10),G=parseInt(l.substr(10,2),10),ot=parseInt(l.substr(12,2),10),pt=parseInt(l.substr(14,2),10);return new Date(m,k,R,G,ot,pt,0)},mt=g.__private__.setCreationDate=function(l){var m;if(l===void 0&&(l=new Date),l instanceof Date)m=lt(l);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(l))throw new Error("Invalid argument passed to jsPDF.setCreationDate");m=l}return rt=m},A=g.__private__.getCreationDate=function(l){var m=rt;return l==="jsDate"&&(m=At(rt)),m};g.setCreationDate=function(l){return mt(l),this},g.getCreationDate=function(l){return A(l)};var O,D=g.__private__.padd2=function(l){return("0"+parseInt(l)).slice(-2)},z=g.__private__.padd2Hex=function(l){return("00"+(l=l.toString())).substr(l.length)},V=0,X=[],nt=[],it=0,ct=[],wt=[],_t=!1,St=nt;g.__private__.setCustomOutputDestination=function(l){_t=!0,St=l};var Tt=function(l){_t||(St=l)};g.__private__.resetCustomOutputDestination=function(){_t=!1,St=nt};var P=g.__private__.out=function(l){return l=l.toString(),it+=l.length+1,St.push(l),St},Nt=g.__private__.write=function(l){return P(arguments.length===1?l.toString():Array.prototype.join.call(arguments," "))},ae=g.__private__.getArrayBuffer=function(l){for(var m=l.length,k=new ArrayBuffer(m),R=new Uint8Array(k);m--;)R[m]=l.charCodeAt(m);return k},Ht=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];g.__private__.getStandardFonts=function(){return Ht};var bt=e.fontSize||16;g.__private__.setFontSize=g.setFontSize=function(l){return bt=tt===K?l/re:l,this};var Wt,Ct=g.__private__.getFontSize=g.getFontSize=function(){return tt===Y?bt:bt*re},zt=e.R2L||!1;g.__private__.setR2L=g.setR2L=function(l){return zt=l,this},g.__private__.getR2L=g.getR2L=function(){return zt};var qt,me=g.__private__.setZoomMode=function(l){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(l))Wt=l;else if(isNaN(l)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(l)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+l+'" is not recognized.');Wt=l}else Wt=parseInt(l,10)};g.__private__.getZoomMode=function(){return Wt};var he,Zt=g.__private__.setPageMode=function(l){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(l)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+l+'" is not recognized.');qt=l};g.__private__.getPageMode=function(){return qt};var fe=g.__private__.setLayoutMode=function(l){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(l)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+l+'" is not recognized.');he=l};g.__private__.getLayoutMode=function(){return he},g.__private__.setDisplayMode=g.setDisplayMode=function(l,m,k){return me(l),fe(m),Zt(k),this};var le={title:"",subject:"",author:"",keywords:"",creator:""};g.__private__.getDocumentProperty=function(l){if(Object.keys(le).indexOf(l)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return le[l]},g.__private__.getDocumentProperties=function(){return le},g.__private__.setDocumentProperties=g.setProperties=g.setDocumentProperties=function(l){for(var m in le)le.hasOwnProperty(m)&&l[m]&&(le[m]=l[m]);return this},g.__private__.setDocumentProperty=function(l,m){if(Object.keys(le).indexOf(l)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return le[l]=m};var Bt,re,Dt,Ue,ge,oe={},se={},Ee=[],Ut={},_e={},Yt={},Qt={},Oe=null,ue=0,Vt=[],be=new Du(g),Kn=e.hotfixes||[],ur={},dn={},Qr=[],Gt=function l(m,k,R,G,ot,pt){if(!(this instanceof l))return new l(m,k,R,G,ot,pt);isNaN(m)&&(m=1),isNaN(k)&&(k=0),isNaN(R)&&(R=0),isNaN(G)&&(G=1),isNaN(ot)&&(ot=0),isNaN(pt)&&(pt=0),this._matrix=[m,k,R,G,ot,pt]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(l){this._matrix[0]=l}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(l){this._matrix[1]=l}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(l){this._matrix[2]=l}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(l){this._matrix[3]=l}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(l){this._matrix[4]=l}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(l){this._matrix[5]=l}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Gt.prototype.join=function(l){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(et).join(l)},Gt.prototype.multiply=function(l){var m=l.sx*this.sx+l.shy*this.shx,k=l.sx*this.shy+l.shy*this.sy,R=l.shx*this.sx+l.sy*this.shx,G=l.shx*this.shy+l.sy*this.sy,ot=l.tx*this.sx+l.ty*this.shx+this.tx,pt=l.tx*this.shy+l.ty*this.sy+this.ty;return new Gt(m,k,R,G,ot,pt)},Gt.prototype.decompose=function(){var l=this.sx,m=this.shy,k=this.shx,R=this.sy,G=this.tx,ot=this.ty,pt=Math.sqrt(l*l+m*m),jt=(l/=pt)*k+(m/=pt)*R;k-=l*jt,R-=m*jt;var It=Math.sqrt(k*k+R*R);return jt/=It,l*(R/=It)<m*(k/=It)&&(l=-l,m=-m,jt=-jt,pt=-pt),{scale:new Gt(pt,0,0,It,0,0),translate:new Gt(1,0,0,1,G,ot),rotate:new Gt(l,m,-m,l,0,0),skew:new Gt(1,0,jt,1,0,0)}},Gt.prototype.toString=function(l){return this.join(" ")},Gt.prototype.inversed=function(){var l=this.sx,m=this.shy,k=this.shx,R=this.sy,G=this.tx,ot=this.ty,pt=1/(l*R-m*k),jt=R*pt,It=-m*pt,Xt=-k*pt,te=l*pt;return new Gt(jt,It,Xt,te,-jt*G-Xt*ot,-It*G-te*ot)},Gt.prototype.applyToPoint=function(l){var m=l.x*this.sx+l.y*this.shx+this.tx,k=l.x*this.shy+l.y*this.sy+this.ty;return new ti(m,k)},Gt.prototype.applyToRectangle=function(l){var m=this.applyToPoint(l),k=this.applyToPoint(new ti(l.x+l.w,l.y+l.h));return new oa(m.x,m.y,k.x-m.x,k.y-m.y)},Gt.prototype.clone=function(){var l=this.sx,m=this.shy,k=this.shx,R=this.sy,G=this.tx,ot=this.ty;return new Gt(l,m,k,R,G,ot)},g.Matrix=Gt;var pn=g.matrixMult=function(l,m){return m.multiply(l)},gn=new Gt(1,0,0,1,0,0);g.unitMatrix=g.identityMatrix=gn;var Br=function(l,m){if(!_e[l]){var k=(m instanceof gi?"Sh":"P")+(Object.keys(Ut).length+1).toString(10);m.id=k,_e[l]=k,Ut[k]=m,be.publish("addPattern",m)}};g.ShadingPattern=gi,g.TilingPattern=Gi,g.addShadingPattern=function(l,m){return U("addShadingPattern()"),Br(l,m),this},g.beginTilingPattern=function(l){U("beginTilingPattern()"),sa(l.boundingBox[0],l.boundingBox[1],l.boundingBox[2]-l.boundingBox[0],l.boundingBox[3]-l.boundingBox[1],l.matrix)},g.endTilingPattern=function(l,m){U("endTilingPattern()"),m.stream=wt[O].join(`
|
||
`),Br(l,m),be.publish("endTilingPattern",m),Qr.pop().restore()};var Mr,De=g.__private__.newObject=function(){var l=er();return nr(l,!0),l},er=g.__private__.newObjectDeferred=function(){return V++,X[V]=function(){return it},V},nr=function(l,m){return m=typeof m=="boolean"&&m,X[l]=it,m&&P(l+" 0 obj"),l},Xn=g.__private__.newAdditionalObject=function(){var l={objId:er(),content:""};return ct.push(l),l},Fn=er(),zr=er(),tn=g.__private__.decodeColorString=function(l){var m=l.split(" ");if(m.length!==2||m[1]!=="g"&&m[1]!=="G")m.length!==5||m[4]!=="k"&&m[4]!=="K"||(m=[(1-m[0])*(1-m[3]),(1-m[1])*(1-m[3]),(1-m[2])*(1-m[3]),"r"]);else{var k=parseFloat(m[0]);m=[k,k,k,"r"]}for(var R="#",G=0;G<3;G++)R+=("0"+Math.floor(255*parseFloat(m[G])).toString(16)).slice(-2);return R},Hr=g.__private__.encodeColorString=function(l){var m;typeof l=="string"&&(l={ch1:l});var k=l.ch1,R=l.ch2,G=l.ch3,ot=l.ch4,pt=l.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof k=="string"&&k.charAt(0)!=="#"){var jt=new Lh(k);if(jt.ok)k=jt.toHex();else if(!/^\d*\.?\d*$/.test(k))throw new Error('Invalid color "'+k+'" passed to jsPDF.encodeColorString.')}if(typeof k=="string"&&/^#[0-9A-Fa-f]{3}$/.test(k)&&(k="#"+k[1]+k[1]+k[2]+k[2]+k[3]+k[3]),typeof k=="string"&&/^#[0-9A-Fa-f]{6}$/.test(k)){var It=parseInt(k.substr(1),16);k=It>>16&255,R=It>>8&255,G=255&It}if(R===void 0||ot===void 0&&k===R&&R===G)m=typeof k=="string"?k+" "+pt[0]:l.precision===2?_(k/255)+" "+pt[0]:E(k/255)+" "+pt[0];else if(ot===void 0||xe(ot)==="object"){if(ot&&!isNaN(ot.a)&&ot.a===0)return["1.","1.","1.",pt[1]].join(" ");m=typeof k=="string"?[k,R,G,pt[1]].join(" "):l.precision===2?[_(k/255),_(R/255),_(G/255),pt[1]].join(" "):[E(k/255),E(R/255),E(G/255),pt[1]].join(" ")}else m=typeof k=="string"?[k,R,G,ot,pt[2]].join(" "):l.precision===2?[_(k),_(R),_(G),_(ot),pt[2]].join(" "):[E(k),E(R),E(G),E(ot),pt[2]].join(" ");return m},Wr=g.__private__.getFilters=function(){return f},Dr=g.__private__.putStream=function(l){var m=(l=l||{}).data||"",k=l.filters||Wr(),R=l.alreadyAppliedFilters||[],G=l.addLength1||!1,ot=m.length,pt=l.objectId,jt=function(Fe){return Fe};if(v!==null&&pt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");v!==null&&(jt=ir.encryptor(pt,0));var It={};k===!0&&(k=["FlateEncode"]);var Xt=l.additionalKeyValues||[],te=(It=Rt.API.processDataByFilters!==void 0?Rt.API.processDataByFilters(m,k):{data:m,reverseChain:[]}).reverseChain+(Array.isArray(R)?R.join(" "):R.toString());if(It.data.length!==0&&(Xt.push({key:"Length",value:It.data.length}),G===!0&&Xt.push({key:"Length1",value:ot})),te.length!=0)if(te.split("/").length-1==1)Xt.push({key:"Filter",value:te});else{Xt.push({key:"Filter",value:"["+te+"]"});for(var de=0;de<Xt.length;de+=1)if(Xt[de].key==="DecodeParms"){for(var Ke=[],Le=0;Le<It.reverseChain.split("/").length-1;Le+=1)Ke.push("null");Ke.push(Xt[de].value),Xt[de].value="["+Ke.join(" ")+"]"}}P("<<");for(var Ae=0;Ae<Xt.length;Ae++)P("/"+Xt[Ae].key+" "+Xt[Ae].value);P(">>"),It.data.length!==0&&(P("stream"),P(jt(It.data)),P("endstream"))},$n=g.__private__.putPage=function(l){var m=l.number,k=l.data,R=l.objId,G=l.contentsObjId;nr(R,!0),P("<</Type /Page"),P("/Parent "+l.rootDictionaryObjId+" 0 R"),P("/Resources "+l.resourceDictionaryObjId+" 0 R"),P("/MediaBox ["+parseFloat(et(l.mediaBox.bottomLeftX))+" "+parseFloat(et(l.mediaBox.bottomLeftY))+" "+et(l.mediaBox.topRightX)+" "+et(l.mediaBox.topRightY)+"]"),l.cropBox!==null&&P("/CropBox ["+et(l.cropBox.bottomLeftX)+" "+et(l.cropBox.bottomLeftY)+" "+et(l.cropBox.topRightX)+" "+et(l.cropBox.topRightY)+"]"),l.bleedBox!==null&&P("/BleedBox ["+et(l.bleedBox.bottomLeftX)+" "+et(l.bleedBox.bottomLeftY)+" "+et(l.bleedBox.topRightX)+" "+et(l.bleedBox.topRightY)+"]"),l.trimBox!==null&&P("/TrimBox ["+et(l.trimBox.bottomLeftX)+" "+et(l.trimBox.bottomLeftY)+" "+et(l.trimBox.topRightX)+" "+et(l.trimBox.topRightY)+"]"),l.artBox!==null&&P("/ArtBox ["+et(l.artBox.bottomLeftX)+" "+et(l.artBox.bottomLeftY)+" "+et(l.artBox.topRightX)+" "+et(l.artBox.topRightY)+"]"),typeof l.userUnit=="number"&&l.userUnit!==1&&P("/UserUnit "+l.userUnit),be.publish("putPage",{objId:R,pageContext:Vt[m],pageNumber:m,page:k}),P("/Contents "+G+" 0 R"),P(">>"),P("endobj");var ot=k.join(`
|
||
`);return tt===K&&(ot+=`
|
||
Q`),nr(G,!0),Dr({data:ot,filters:Wr(),objectId:G}),P("endobj"),R},en=g.__private__.putPages=function(){var l,m,k=[];for(l=1;l<=ue;l++)Vt[l].objId=er(),Vt[l].contentsObjId=er();for(l=1;l<=ue;l++)k.push($n({number:l,data:wt[l],objId:Vt[l].objId,contentsObjId:Vt[l].contentsObjId,mediaBox:Vt[l].mediaBox,cropBox:Vt[l].cropBox,bleedBox:Vt[l].bleedBox,trimBox:Vt[l].trimBox,artBox:Vt[l].artBox,userUnit:Vt[l].userUnit,rootDictionaryObjId:Fn,resourceDictionaryObjId:zr}));nr(Fn,!0),P("<</Type /Pages");var R="/Kids [";for(m=0;m<ue;m++)R+=k[m]+" 0 R ";P(R+"]"),P("/Count "+ue),P(">>"),P("endobj"),be.publish("postPutPages")},Zn=function(l){be.publish("putFont",{font:l,out:P,newObject:De,putStream:Dr}),l.isAlreadyPutted!==!0&&(l.objectNumber=De(),P("<<"),P("/Type /Font"),P("/BaseFont /"+Vi(l.postScriptName)),P("/Subtype /Type1"),typeof l.encoding=="string"&&P("/Encoding /"+l.encoding),P("/FirstChar 32"),P("/LastChar 255"),P(">>"),P("endobj"))},wi=function(l){l.objectNumber=De();var m=[];m.push({key:"Type",value:"/XObject"}),m.push({key:"Subtype",value:"/Form"}),m.push({key:"BBox",value:"["+[et(l.x),et(l.y),et(l.x+l.width),et(l.y+l.height)].join(" ")+"]"}),m.push({key:"Matrix",value:"["+l.matrix.toString()+"]"});var k=l.pages[1].join(`
|
||
`);Dr({data:k,additionalKeyValues:m,objectId:l.objectNumber}),P("endobj")},xi=function(l,m){m||(m=21);var k=De(),R=(function(pt,jt){var It,Xt=[],te=1/(jt-1);for(It=0;It<1;It+=te)Xt.push(It);if(Xt.push(1),pt[0].offset!=0){var de={offset:0,color:pt[0].color};pt.unshift(de)}if(pt[pt.length-1].offset!=1){var Ke={offset:1,color:pt[pt.length-1].color};pt.push(Ke)}for(var Le="",Ae=0,Fe=0;Fe<Xt.length;Fe++){for(It=Xt[Fe];It>pt[Ae+1].offset;)Ae++;var Be=pt[Ae].offset,Me=(It-Be)/(pt[Ae+1].offset-Be),hr=pt[Ae].color,xn=pt[Ae+1].color;Le+=z(Math.round((1-Me)*hr[0]+Me*xn[0]).toString(16))+z(Math.round((1-Me)*hr[1]+Me*xn[1]).toString(16))+z(Math.round((1-Me)*hr[2]+Me*xn[2]).toString(16))}return Le.trim()})(l.colors,m),G=[];G.push({key:"FunctionType",value:"0"}),G.push({key:"Domain",value:"[0.0 1.0]"}),G.push({key:"Size",value:"["+m+"]"}),G.push({key:"BitsPerSample",value:"8"}),G.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),G.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Dr({data:R,additionalKeyValues:G,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:k}),P("endobj"),l.objectNumber=De(),P("<< /ShadingType "+l.type),P("/ColorSpace /DeviceRGB");var ot="/Coords ["+et(parseFloat(l.coords[0]))+" "+et(parseFloat(l.coords[1]))+" ";l.type===2?ot+=et(parseFloat(l.coords[2]))+" "+et(parseFloat(l.coords[3])):ot+=et(parseFloat(l.coords[2]))+" "+et(parseFloat(l.coords[3]))+" "+et(parseFloat(l.coords[4]))+" "+et(parseFloat(l.coords[5])),P(ot+="]"),l.matrix&&P("/Matrix ["+l.matrix.toString()+"]"),P("/Function "+k+" 0 R"),P("/Extend [true true]"),P(">>"),P("endobj")},Ai=function(l,m){var k=er(),R=De();m.push({resourcesOid:k,objectOid:R}),l.objectNumber=R;var G=[];G.push({key:"Type",value:"/Pattern"}),G.push({key:"PatternType",value:"1"}),G.push({key:"PaintType",value:"1"}),G.push({key:"TilingType",value:"1"}),G.push({key:"BBox",value:"["+l.boundingBox.map(et).join(" ")+"]"}),G.push({key:"XStep",value:et(l.xStep)}),G.push({key:"YStep",value:et(l.yStep)}),G.push({key:"Resources",value:k+" 0 R"}),l.matrix&&G.push({key:"Matrix",value:"["+l.matrix.toString()+"]"}),Dr({data:l.stream,additionalKeyValues:G,objectId:l.objectNumber}),P("endobj")},Lo=function(l){for(var m in l.objectNumber=De(),P("<<"),l)switch(m){case"opacity":P("/ca "+_(l[m]));break;case"stroke-opacity":P("/CA "+_(l[m]))}P(">>"),P("endobj")},Zi=function(l){nr(l.resourcesOid,!0),P("<<"),P("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var m in P("/Font <<"),oe)oe.hasOwnProperty(m)&&(y===!1||y===!0&&N.hasOwnProperty(m))&&P("/"+m+" "+oe[m].objectNumber+" 0 R");P(">>")})(),(function(){if(Object.keys(Ut).length>0){for(var m in P("/Shading <<"),Ut)Ut.hasOwnProperty(m)&&Ut[m]instanceof gi&&Ut[m].objectNumber>=0&&P("/"+m+" "+Ut[m].objectNumber+" 0 R");be.publish("putShadingPatternDict"),P(">>")}})(),(function(m){if(Object.keys(Ut).length>0){for(var k in P("/Pattern <<"),Ut)Ut.hasOwnProperty(k)&&Ut[k]instanceof g.TilingPattern&&Ut[k].objectNumber>=0&&Ut[k].objectNumber<m&&P("/"+k+" "+Ut[k].objectNumber+" 0 R");be.publish("putTilingPatternDict"),P(">>")}})(l.objectOid),(function(){if(Object.keys(Yt).length>0){var m;for(m in P("/ExtGState <<"),Yt)Yt.hasOwnProperty(m)&&Yt[m].objectNumber>=0&&P("/"+m+" "+Yt[m].objectNumber+" 0 R");be.publish("putGStateDict"),P(">>")}})(),(function(){for(var m in P("/XObject <<"),ur)ur.hasOwnProperty(m)&&ur[m].objectNumber>=0&&P("/"+m+" "+ur[m].objectNumber+" 0 R");be.publish("putXobjectDict"),P(">>")})(),P(">>"),P("endobj")},Sa=function(l){se[l.fontName]=se[l.fontName]||{},se[l.fontName][l.fontStyle]=l.id},_a=function(l,m,k,R,G){var ot={id:"F"+(Object.keys(oe).length+1).toString(10),postScriptName:l,fontName:m,fontStyle:k,encoding:R,isStandardFont:G||!1,metadata:{}};return be.publish("addFont",{font:ot,instance:this}),oe[ot.id]=ot,Sa(ot),ot.id},Rr=g.__private__.pdfEscape=g.pdfEscape=function(l,m){return(function(k,R){var G,ot,pt,jt,It,Xt,te,de,Ke;if(pt=(R=R||{}).sourceEncoding||"Unicode",It=R.outputEncoding,(R.autoencode||It)&&oe[Bt].metadata&&oe[Bt].metadata[pt]&&oe[Bt].metadata[pt].encoding&&(jt=oe[Bt].metadata[pt].encoding,!It&&oe[Bt].encoding&&(It=oe[Bt].encoding),!It&&jt.codePages&&(It=jt.codePages[0]),typeof It=="string"&&(It=jt[It]),It)){for(te=!1,Xt=[],G=0,ot=k.length;G<ot;G++)(de=It[k.charCodeAt(G)])?Xt.push(String.fromCharCode(de)):Xt.push(k[G]),Xt[G].charCodeAt(0)>>8&&(te=!0);k=Xt.join("")}for(G=k.length;te===void 0&&G!==0;)k.charCodeAt(G-1)>>8&&(te=!0),G--;if(!te)return k;for(Xt=R.noBOM?[]:[254,255],G=0,ot=k.length;G<ot;G++){if((Ke=(de=k.charCodeAt(G))>>8)>>8)throw new Error("Character at position "+G+" of string '"+k+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Xt.push(Ke),Xt.push(de-(Ke<<8))}return String.fromCharCode.apply(void 0,Xt)})(l,m).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qi=g.__private__.beginPage=function(l){wt[++ue]=[],Vt[ue]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(l[0]),topRightY:Number(l[1])}},ka(ue),Tt(wt[O])},Pa=function(l,m){var k,R,G;switch(r=m||r,typeof l=="string"&&(k=C(l.toLowerCase()),Array.isArray(k)&&(R=k[0],G=k[1])),Array.isArray(l)&&(R=l[0]*re,G=l[1]*re),isNaN(R)&&(R=a[0],G=a[1]),(R>14400||G>14400)&&(Se.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),R=Math.min(14400,R),G=Math.min(14400,G)),a=[R,G],r.substr(0,1)){case"l":G>R&&(a=[G,R]);break;case"p":R>G&&(a=[G,R])}Qi(a),Eo(Jt),P(ki),ia!==0&&P(ia+" J"),En!==0&&P(En+" j"),be.publish("addPage",{pageNumber:ue})},ta=function(l){l>0&&l<=ue&&(wt.splice(l,1),Vt.splice(l,1),ue--,O>ue&&(O=ue),this.setPage(O))},ka=function(l){l>0&&l<=ue&&(O=l)},Ca=g.__private__.getNumberOfPages=g.getNumberOfPages=function(){return wt.length-1},Fa=function(l,m,k){var R,G=void 0;return k=k||{},l=l!==void 0?l:oe[Bt].fontName,m=m!==void 0?m:oe[Bt].fontStyle,R=l.toLowerCase(),se[R]!==void 0&&se[R][m]!==void 0?G=se[R][m]:se[l]!==void 0&&se[l][m]!==void 0?G=se[l][m]:k.disableWarning===!1&&Se.warn("Unable to look up font label for font '"+l+"', '"+m+"'. Refer to getFontList() for available fonts."),G||k.noFallback||(G=se.times[m])==null&&(G=se.times.normal),G},rn=g.__private__.putInfo=function(){var l=De(),m=function(R){return R};for(var k in v!==null&&(m=ir.encryptor(l,0)),P("<<"),P("/Producer ("+Rr(m("jsPDF "+Rt.version))+")"),le)le.hasOwnProperty(k)&&le[k]&&P("/"+k.substr(0,1).toUpperCase()+k.substr(1)+" ("+Rr(m(le[k]))+")");P("/CreationDate ("+Rr(m(rt))+")"),P(">>"),P("endobj")},Li=g.__private__.putCatalog=function(l){var m=(l=l||{}).rootDictionaryObjId||Fn;switch(De(),P("<<"),P("/Type /Catalog"),P("/Pages "+m+" 0 R"),Wt||(Wt="fullwidth"),Wt){case"fullwidth":P("/OpenAction [3 0 R /FitH null]");break;case"fullheight":P("/OpenAction [3 0 R /FitV null]");break;case"fullpage":P("/OpenAction [3 0 R /Fit]");break;case"original":P("/OpenAction [3 0 R /XYZ null null 1]");break;default:var k=""+Wt;k.substr(k.length-1)==="%"&&(Wt=parseInt(Wt)/100),typeof Wt=="number"&&P("/OpenAction [3 0 R /XYZ null null "+_(Wt)+"]")}switch(he||(he="continuous"),he){case"continuous":P("/PageLayout /OneColumn");break;case"single":P("/PageLayout /SinglePage");break;case"two":case"twoleft":P("/PageLayout /TwoColumnLeft");break;case"tworight":P("/PageLayout /TwoColumnRight")}qt&&P("/PageMode /"+qt),be.publish("putCatalog"),P(">>"),P("endobj")},No=g.__private__.putTrailer=function(){P("trailer"),P("<<"),P("/Size "+(V+1)),P("/Root "+V+" 0 R"),P("/Info "+(V-1)+" 0 R"),v!==null&&P("/Encrypt "+ir.oid+" 0 R"),P("/ID [ <"+at+"> <"+at+"> ]"),P(">>")},Je=g.__private__.putHeader=function(){P("%PDF-"+B),P("%ºß¬à")},Ia=g.__private__.putXRef=function(){var l="0000000000";P("xref"),P("0 "+(V+1)),P("0000000000 65535 f ");for(var m=1;m<=V;m++)typeof X[m]=="function"?P((l+X[m]()).slice(-10)+" 00000 n "):X[m]!==void 0?P((l+X[m]).slice(-10)+" 00000 n "):P("0000000000 00000 n ")},nn=g.__private__.buildDocument=function(){var l;V=0,it=0,nt=[],X=[],ct=[],Fn=er(),zr=er(),Tt(nt),be.publish("buildDocument"),Je(),en(),(function(){be.publish("putAdditionalObjects");for(var k=0;k<ct.length;k++){var R=ct[k];nr(R.objId,!0),P(R.content),P("endobj")}be.publish("postPutAdditionalObjects")})(),l=[],(function(){for(var k in oe)oe.hasOwnProperty(k)&&(y===!1||y===!0&&N.hasOwnProperty(k))&&Zn(oe[k])})(),(function(){var k;for(k in Yt)Yt.hasOwnProperty(k)&&Lo(Yt[k])})(),(function(){for(var k in ur)ur.hasOwnProperty(k)&&wi(ur[k])})(),(function(k){var R;for(R in Ut)Ut.hasOwnProperty(R)&&(Ut[R]instanceof gi?xi(Ut[R]):Ut[R]instanceof Gi&&Ai(Ut[R],k))})(l),be.publish("putResources"),l.forEach(Zi),Zi({resourcesOid:zr,objectOid:Number.MAX_SAFE_INTEGER}),be.publish("postPutResources"),v!==null&&(ir.oid=De(),P("<<"),P("/Filter /Standard"),P("/V "+ir.v),P("/R "+ir.r),P("/U <"+ir.toHexString(ir.U)+">"),P("/O <"+ir.toHexString(ir.O)+">"),P("/P "+ir.P),P(">>"),P("endobj")),rn(),Li();var m=it;return Ia(),No(),P("startxref"),P(""+m),P("%%EOF"),Tt(wt[O]),nt.join(`
|
||
`)},Ni=g.__private__.getBlob=function(l){return new Blob([ae(l)],{type:"application/pdf"})},ea=function(l){for(;l.firstChild;)l.removeChild(l.firstChild)},_r=function(l){var m,k=l.document,R=k.documentElement,G=k.head,ot=k.body;return G||(G=k.createElement("head"),R.appendChild(G)),ot||(ot=k.createElement("body"),R.appendChild(ot)),ea(G),ea(ot),(m=k.createElement("style")).appendChild(k.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),G.appendChild(m),{document:k,body:ot}},Si=g.output=g.__private__.output=(Mr=function(l,m){switch(typeof(m=m||{})=="string"?m={filename:m}:m.filename=m.filename||"generated.pdf",l){case void 0:return nn();case"save":g.save(m.filename);break;case"arraybuffer":return ae(nn());case"blob":return Ni(nn());case"bloburi":case"bloburl":if(Kt.URL!==void 0&&typeof Kt.URL.createObjectURL=="function")return Kt.URL&&Kt.URL.createObjectURL(Ni(nn()))||void 0;Se.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var k="",R=nn();try{k=Ou(R)}catch{k=Ou(unescape(encodeURIComponent(R)))}return"data:application/pdf;filename="+encodeURIComponent(m.filename)+";base64,"+k;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var G="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ot=!m.pdfObjectUrl;ot||(G=m.pdfObjectUrl);var pt=Kt.open();if(pt!==null){var jt=_r(pt),It=jt.document.createElement("script"),Xt=this;It.src=G,ot&&(It.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",It.crossOrigin="anonymous"),It.onload=function(){pt.PDFObject.embed(Xt.output("dataurlstring"),m)},jt.body.appendChild(It)}return pt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Kt)==="[object Window]"){var te=m.pdfJsUrl||"examples/PDF.js/web/viewer.html",de=Kt.open();if(de!==null){var Ke=_r(de),Le=Ke.document.createElement("iframe"),Ae=te.indexOf("?")===-1?"?":"&";Xt=this,Le.id="pdfViewer",Le.width="500px",Le.height="400px",Le.src=te+Ae+"file=&downloadName="+encodeURIComponent(m.filename),Le.onload=function(){de.document.title=m.filename,Le.contentWindow.PDFViewerApplication.open(Xt.output("bloburl"))},Ke.body.appendChild(Le)}return de}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Kt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Fe=Kt.open();if(Fe!==null){var Be=_r(Fe),Me=Be.document.createElement("iframe");Me.src=this.output("datauristring",m),Be.body.appendChild(Me),Fe.document.title=m.filename}if(Fe||typeof safari>"u")return Fe;break;case"datauri":case"dataurl":return Kt.document.location.href=this.output("datauristring",m);default:return null}},Mr.foo=function(){try{return Mr.apply(this,arguments)}catch(k){var l=k.stack||"";~l.indexOf(" at ")&&(l=l.split(" at ")[1]);var m="Error in function "+l.split(`
|
||
`)[0].split("<")[0]+": "+k.message;if(!Kt.console)throw new Error(m);Kt.console.error(m,k),Kt.alert&&alert(m)}},Mr.foo.bar=Mr,Mr.foo),vn=function(l){return Array.isArray(Kn)===!0&&Kn.indexOf(l)>-1};switch(n){case"pt":re=1;break;case"mm":re=72/25.4;break;case"cm":re=72/2.54;break;case"in":re=72;break;case"px":re=vn("px_scaling")==1?.75:96/72;break;case"pc":case"em":re=12;break;case"ex":re=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);re=n}var ir=null;mt(),Q();var ja=g.__private__.getPageInfo=g.getPageInfo=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Vt[l].objId,pageNumber:l,pageContext:Vt[l]}},So=g.__private__.getPageInfoByObjId=function(l){if(isNaN(l)||l%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var m in Vt)if(Vt[m].objId===l)break;return ja(m)},_o=g.__private__.getCurrentPageInfo=g.getCurrentPageInfo=function(){return{objId:Vt[O].objId,pageNumber:O,pageContext:Vt[O]}};g.addPage=function(){return Pa.apply(this,arguments),this},g.setPage=function(){return ka.apply(this,arguments),Tt.call(this,wt[O]),this},g.insertPage=function(l){return this.addPage(),this.movePage(O,l),this},g.movePage=function(l,m){var k,R;if(l>m){k=wt[l],R=Vt[l];for(var G=l;G>m;G--)wt[G]=wt[G-1],Vt[G]=Vt[G-1];wt[m]=k,Vt[m]=R,this.setPage(m)}else if(l<m){k=wt[l],R=Vt[l];for(var ot=l;ot<m;ot++)wt[ot]=wt[ot+1],Vt[ot]=Vt[ot+1];wt[m]=k,Vt[m]=R,this.setPage(m)}return this},g.deletePage=function(){return ta.apply(this,arguments),this},g.__private__.text=g.text=function(l,m,k,R,G){var ot,pt,jt,It,Xt,te,de,Ke,Le,Ae=(R=R||{}).scope||this;if(typeof l=="number"&&typeof m=="number"&&(typeof k=="string"||Array.isArray(k))){var Fe=k;k=m,m=l,l=Fe}if(arguments[3]instanceof Gt==0?(jt=arguments[4],It=arguments[5],xe(de=arguments[3])==="object"&&de!==null||(typeof jt=="string"&&(It=jt,jt=null),typeof de=="string"&&(It=de,de=null),typeof de=="number"&&(jt=de,de=null),R={flags:de,angle:jt,align:It})):(U("The transform parameter of text() with a Matrix value"),Le=G),isNaN(m)||isNaN(k)||l==null)throw new Error("Invalid arguments passed to jsPDF.text");if(l.length===0)return Ae;var Be,Me="",hr=typeof R.lineHeightFactor=="number"?R.lineHeightFactor:Qn,xn=Ae.internal.scaleFactor;function ua(Pe){return Pe=Pe.split(" ").join(Array(R.TabLen||9).join(" ")),Rr(Pe,de)}function ri(Pe){for(var ke,ze=Pe.concat(),$e=[],Ln=ze.length;Ln--;)typeof(ke=ze.shift())=="string"?$e.push(ke):Array.isArray(Pe)&&(ke.length===1||ke[1]===void 0&&ke[2]===void 0)?$e.push(ke[0]):$e.push([ke[0],ke[1],ke[2]]);return $e}function ni(Pe,ke){var ze;if(typeof Pe=="string")ze=ke(Pe)[0];else if(Array.isArray(Pe)){for(var $e,Ln,pa=Pe.concat(),qi=[],za=pa.length;za--;)typeof($e=pa.shift())=="string"?qi.push(ke($e)[0]):Array.isArray($e)&&typeof $e[0]=="string"&&(Ln=ke($e[0],$e[1],$e[2]),qi.push([Ln[0],Ln[1],Ln[2]]));ze=qi}return ze}var On=!1,ii=!0;if(typeof l=="string")On=!0;else if(Array.isArray(l)){var ji=l.concat();pt=[];for(var Ei,lr=ji.length;lr--;)(typeof(Ei=ji.shift())!="string"||Array.isArray(Ei)&&typeof Ei[0]!="string")&&(ii=!1);On=ii}if(On===!1)throw new Error('Type of text must be string or Array. "'+l+'" is not recognized.');typeof l=="string"&&(l=l.match(/[\r?\n]/)?l.split(/\r\n|\r|\n/g):[l]);var ai=bt/Ae.internal.scaleFactor,oi=ai*(hr-1);switch(R.baseline){case"bottom":k-=oi;break;case"top":k+=ai-oi;break;case"hanging":k+=ai-2*oi;break;case"middle":k+=ai/2-oi}if((te=R.maxWidth||0)>0&&(typeof l=="string"?l=Ae.splitTextToSize(l,te):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(Pe,ke){return Pe.concat(Ae.splitTextToSize(ke,te))},[]))),ot={text:l,x:m,y:k,options:R,mutex:{pdfEscape:Rr,activeFontKey:Bt,fonts:oe,activeFontSize:bt}},be.publish("preProcessText",ot),l=ot.text,jt=(R=ot.options).angle,Le instanceof Gt==0&&jt&&typeof jt=="number"){jt*=Math.PI/180,R.rotationDirection===0&&(jt=-jt),tt===K&&(jt=-jt);var ha=Math.cos(jt),sn=Math.sin(jt);Le=new Gt(ha,sn,-sn,ha,0,0)}else jt&&jt instanceof Gt&&(Le=jt);tt!==K||Le||(Le=gn),(Xt=R.charSpace||Ci)!==void 0&&(Me+=et(q(Xt))+` Tc
|
||
`,this.setCharSpace(this.getCharSpace()||0)),(Ke=R.horizontalScale)!==void 0&&(Me+=et(100*Ke)+` Tz
|
||
`),R.lang;var mr=-1,qa=R.renderingMode!==void 0?R.renderingMode:R.stroke,Oi=Ae.internal.getCurrentPageInfo().pageContext;switch(qa){case 0:case!1:case"fill":mr=0;break;case 1:case!0:case"stroke":mr=1;break;case 2:case"fillThenStroke":mr=2;break;case 3:case"invisible":mr=3;break;case 4:case"fillAndAddForClipping":mr=4;break;case 5:case"strokeAndAddPathForClipping":mr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":mr=6;break;case 7:case"addToPathForClipping":mr=7}var Ua=Oi.usedRenderingMode!==void 0?Oi.usedRenderingMode:-1;mr!==-1?Me+=mr+` Tr
|
||
`:Ua!==-1&&(Me+=`0 Tr
|
||
`),mr!==-1&&(Oi.usedRenderingMode=mr),It=R.align||"left";var Tr,si=bt*hr,la=Ae.internal.pageSize.getWidth(),Bi=oe[Bt];Xt=R.charSpace||Ci,te=R.maxWidth||0,de=Object.assign({autoencode:!0,noBOM:!0},R.flags);var ui=[],fa=function(Pe){return Ae.getStringUnitWidth(Pe,{font:Bi,charSpace:Xt,fontSize:bt,doKerning:!1})*bt/xn};if(Object.prototype.toString.call(l)==="[object Array]"){var br;pt=ri(l),It!=="left"&&(Tr=pt.map(fa));var Ar,Mi=0;if(It==="right"){m-=Tr[0],l=[],lr=pt.length;for(var Bn=0;Bn<lr;Bn++)Bn===0?(Ar=mn(m),br=bn(k)):(Ar=q(Mi-Tr[Bn]),br=-si),l.push([pt[Bn],Ar,br]),Mi=Tr[Bn]}else if(It==="center"){m-=Tr[0]/2,l=[],lr=pt.length;for(var Mn=0;Mn<lr;Mn++)Mn===0?(Ar=mn(m),br=bn(k)):(Ar=q((Mi-Tr[Mn])/2),br=-si),l.push([pt[Mn],Ar,br]),Mi=Tr[Mn]}else if(It==="left"){l=[],lr=pt.length;for(var Di=0;Di<lr;Di++)l.push(pt[Di])}else if(It==="justify"&&Bi.encoding==="Identity-H"){l=[],lr=pt.length,te=te!==0?te:la;for(var hi=0,Xe=0;Xe<lr;Xe++)if(br=Xe===0?bn(k):-si,Ar=Xe===0?mn(m):hi,Xe<lr-1){var Uo=q((te-Tr[Xe])/(pt[Xe].split(" ").length-1)),un=pt[Xe].split(" ");l.push([un[0]+" ",Ar,br]),hi=0;for(var Vr=1;Vr<un.length;Vr++){var li=(fa(un[Vr-1]+" "+un[Vr])-fa(un[Vr]))*xn+Uo;Vr==un.length-1?l.push([un[Vr],li,0]):l.push([un[Vr]+" ",li,0]),hi-=li}}else l.push([pt[Xe],Ar,br]);l.push(["",hi,0])}else{if(It!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(l=[],lr=pt.length,te=te!==0?te:la,Xe=0;Xe<lr;Xe++){br=Xe===0?bn(k):-si,Ar=Xe===0?mn(m):0;var ca=pt[Xe].split(" ").length-1,da=ca>0?(te-Tr[Xe])/ca:0;Xe<lr-1?ui.push(et(q(da))):ui.push(0),l.push([pt[Xe],Ar,br])}}}(typeof R.R2L=="boolean"?R.R2L:zt)===!0&&(l=ni(l,function(Pe,ke,ze){return[Pe.split("").reverse().join(""),ke,ze]})),ot={text:l,x:m,y:k,options:R,mutex:{pdfEscape:Rr,activeFontKey:Bt,fonts:oe,activeFontSize:bt}},be.publish("postProcessText",ot),l=ot.text,Be=ot.mutex.isHex||!1;var Ri=oe[Bt].encoding;Ri!=="WinAnsiEncoding"&&Ri!=="StandardEncoding"||(l=ni(l,function(Pe,ke,ze){return[ua(Pe),ke,ze]})),pt=ri(l),l=[];for(var fi,ci,Dn,An=Array.isArray(pt[0])?1:0,Rn="",Ti=function(Pe,ke,ze){var $e="";return ze instanceof Gt?(ze=typeof R.angle=="number"?pn(ze,new Gt(1,0,0,1,Pe,ke)):pn(new Gt(1,0,0,1,Pe,ke),ze),tt===K&&(ze=pn(new Gt(1,0,0,-1,0,0),ze)),$e=ze.join(" ")+` Tm
|
||
`):$e=et(Pe)+" "+et(ke)+` Td
|
||
`,$e},fr=0;fr<pt.length;fr++){switch(Rn="",An){case 1:Dn=(Be?"<":"(")+pt[fr][0]+(Be?">":")"),fi=parseFloat(pt[fr][1]),ci=parseFloat(pt[fr][2]);break;case 0:Dn=(Be?"<":"(")+pt[fr]+(Be?">":")"),fi=mn(m),ci=bn(k)}ui!==void 0&&ui[fr]!==void 0&&(Rn=ui[fr]+` Tw
|
||
`),fr===0?l.push(Rn+Ti(fi,ci,Le)+Dn):An===0?l.push(Rn+Dn):An===1&&l.push(Rn+Ti(fi,ci,Le)+Dn)}l=An===0?l.join(` Tj
|
||
T* `):l.join(` Tj
|
||
`),l+=` Tj
|
||
`;var hn=`BT
|
||
/`;return hn+=Bt+" "+bt+` Tf
|
||
`,hn+=et(bt*hr)+` TL
|
||
`,hn+=on+`
|
||
`,hn+=Me,hn+=l,P(hn+="ET"),N[Bt]=!0,Ae};var Po=g.__private__.clip=g.clip=function(l){return P(l==="evenodd"?"W*":"W"),this};g.clipEvenOdd=function(){return Po("evenodd")},g.__private__.discardPath=g.discardPath=function(){return P("n"),this};var an=g.__private__.isValidStyle=function(l){var m=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(l)!==-1&&(m=!0),m};g.__private__.setDefaultPathOperation=g.setDefaultPathOperation=function(l){return an(l)&&(d=l),this};var Ea=g.__private__.getStyle=g.getStyle=function(l){var m=d;switch(l){case"D":case"S":m="S";break;case"F":m="f";break;case"FD":case"DF":m="B";break;case"f":case"f*":case"B":case"B*":m=l}return m},_i=g.close=function(){return P("h"),this};g.stroke=function(){return P("S"),this},g.fill=function(l){return Pi("f",l),this},g.fillEvenOdd=function(l){return Pi("f*",l),this},g.fillStroke=function(l){return Pi("B",l),this},g.fillStrokeEvenOdd=function(l){return Pi("B*",l),this};var Pi=function(l,m){xe(m)==="object"?Co(m,l):P(l)},ra=function(l){l===null||tt===K&&l===void 0||(l=Ea(l),P(l))};function ko(l,m,k,R,G){var ot=new Gi(m||this.boundingBox,k||this.xStep,R||this.yStep,this.gState,G||this.matrix);ot.stream=this.stream;var pt=l+"$$"+this.cloneIndex+++"$$";return Br(pt,ot),ot}var Co=function(l,m){var k=_e[l.key],R=Ut[k];if(R instanceof gi)P("q"),P(Fo(m)),R.gState&&g.setGState(R.gState),P(l.matrix.toString()+" cm"),P("/"+k+" sh"),P("Q");else if(R instanceof Gi){var G=new Gt(1,0,0,-1,0,ei());l.matrix&&(G=G.multiply(l.matrix||gn),k=ko.call(R,l.key,l.boundingBox,l.xStep,l.yStep,G).id),P("q"),P("/Pattern cs"),P("/"+k+" scn"),R.gState&&g.setGState(R.gState),P(m),P("Q")}},Fo=function(l){switch(l){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},In=g.moveTo=function(l,m){return P(et(q(l))+" "+et(T(m))+" m"),this},Oa=g.lineTo=function(l,m){return P(et(q(l))+" "+et(T(m))+" l"),this},jn=g.curveTo=function(l,m,k,R,G,ot){return P([et(q(l)),et(T(m)),et(q(k)),et(T(R)),et(q(G)),et(T(ot)),"c"].join(" ")),this};g.__private__.line=g.line=function(l,m,k,R,G){if(isNaN(l)||isNaN(m)||isNaN(k)||isNaN(R)||!an(G))throw new Error("Invalid arguments passed to jsPDF.line");return tt===Y?this.lines([[k-l,R-m]],l,m,[1,1],G||"S"):this.lines([[k-l,R-m]],l,m,[1,1]).stroke()},g.__private__.lines=g.lines=function(l,m,k,R,G,ot){var pt,jt,It,Xt,te,de,Ke,Le,Ae,Fe,Be,Me;if(typeof l=="number"&&(Me=k,k=m,m=l,l=Me),R=R||[1,1],ot=ot||!1,isNaN(m)||isNaN(k)||!Array.isArray(l)||!Array.isArray(R)||!an(G)||typeof ot!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(In(m,k),pt=R[0],jt=R[1],Xt=l.length,Fe=m,Be=k,It=0;It<Xt;It++)(te=l[It]).length===2?(Fe=te[0]*pt+Fe,Be=te[1]*jt+Be,Oa(Fe,Be)):(de=te[0]*pt+Fe,Ke=te[1]*jt+Be,Le=te[2]*pt+Fe,Ae=te[3]*jt+Be,Fe=te[4]*pt+Fe,Be=te[5]*jt+Be,jn(de,Ke,Le,Ae,Fe,Be));return ot&&_i(),ra(G),this},g.path=function(l){for(var m=0;m<l.length;m++){var k=l[m],R=k.c;switch(k.op){case"m":In(R[0],R[1]);break;case"l":Oa(R[0],R[1]);break;case"c":jn.apply(this,R);break;case"h":_i()}}return this},g.__private__.rect=g.rect=function(l,m,k,R,G){if(isNaN(l)||isNaN(m)||isNaN(k)||isNaN(R)||!an(G))throw new Error("Invalid arguments passed to jsPDF.rect");return tt===Y&&(R=-R),P([et(q(l)),et(T(m)),et(q(k)),et(q(R)),"re"].join(" ")),ra(G),this},g.__private__.triangle=g.triangle=function(l,m,k,R,G,ot,pt){if(isNaN(l)||isNaN(m)||isNaN(k)||isNaN(R)||isNaN(G)||isNaN(ot)||!an(pt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[k-l,R-m],[G-k,ot-R],[l-G,m-ot]],l,m,[1,1],pt,!0),this},g.__private__.roundedRect=g.roundedRect=function(l,m,k,R,G,ot,pt){if(isNaN(l)||isNaN(m)||isNaN(k)||isNaN(R)||isNaN(G)||isNaN(ot)||!an(pt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var jt=4/3*(Math.SQRT2-1);return G=Math.min(G,.5*k),ot=Math.min(ot,.5*R),this.lines([[k-2*G,0],[G*jt,0,G,ot-ot*jt,G,ot],[0,R-2*ot],[0,ot*jt,-G*jt,ot,-G,ot],[2*G-k,0],[-G*jt,0,-G,-ot*jt,-G,-ot],[0,2*ot-R],[0,-ot*jt,G*jt,-ot,G,-ot]],l+G,m,[1,1],pt,!0),this},g.__private__.ellipse=g.ellipse=function(l,m,k,R,G){if(isNaN(l)||isNaN(m)||isNaN(k)||isNaN(R)||!an(G))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ot=4/3*(Math.SQRT2-1)*k,pt=4/3*(Math.SQRT2-1)*R;return In(l+k,m),jn(l+k,m-pt,l+ot,m-R,l,m-R),jn(l-ot,m-R,l-k,m-pt,l-k,m),jn(l-k,m+pt,l-ot,m+R,l,m+R),jn(l+ot,m+R,l+k,m+pt,l+k,m),ra(G),this},g.__private__.circle=g.circle=function(l,m,k,R){if(isNaN(l)||isNaN(m)||isNaN(k)||!an(R))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(l,m,k,k,R)},g.setFont=function(l,m,k){return k&&(m=Pt(m,k)),Bt=Fa(l,m,{disableWarning:!1}),this};var Io=g.__private__.getFont=g.getFont=function(){return oe[Fa.apply(g,arguments)]};g.__private__.getFontList=g.getFontList=function(){var l,m,k={};for(l in se)if(se.hasOwnProperty(l))for(m in k[l]=[],se[l])se[l].hasOwnProperty(m)&&k[l].push(m);return k},g.addFont=function(l,m,k,R,G){var ot=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ot.indexOf(arguments[3])!==-1?G=arguments[3]:arguments[3]&&ot.indexOf(arguments[3])==-1&&(k=Pt(k,R)),_a.call(this,l,m,k,G=G||"Identity-H")};var Qn,Jt=e.lineWidth||.200025,jo=g.__private__.getLineWidth=g.getLineWidth=function(){return Jt},Eo=g.__private__.setLineWidth=g.setLineWidth=function(l){return Jt=l,P(et(q(l))+" w"),this};g.__private__.setLineDash=Rt.API.setLineDash=Rt.API.setLineDashPattern=function(l,m){if(l=l||[],m=m||0,isNaN(m)||!Array.isArray(l))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return l=l.map(function(k){return et(q(k))}).join(" "),m=et(q(m)),P("["+l+"] "+m+" d"),this};var Oo=g.__private__.getLineHeight=g.getLineHeight=function(){return bt*Qn};g.__private__.getLineHeight=g.getLineHeight=function(){return bt*Qn};var Bo=g.__private__.setLineHeightFactor=g.setLineHeightFactor=function(l){return typeof(l=l||1.15)=="number"&&(Qn=l),this},Mo=g.__private__.getLineHeightFactor=g.getLineHeightFactor=function(){return Qn};Bo(e.lineHeight);var mn=g.__private__.getHorizontalCoordinate=function(l){return q(l)},bn=g.__private__.getVerticalCoordinate=function(l){return tt===K?l:Vt[O].mediaBox.topRightY-Vt[O].mediaBox.bottomLeftY-q(l)},Do=g.__private__.getHorizontalCoordinateString=g.getHorizontalCoordinateString=function(l){return et(mn(l))},Ro=g.__private__.getVerticalCoordinateString=g.getVerticalCoordinateString=function(l){return et(bn(l))},ki=e.strokeColor||"0 G";g.__private__.getStrokeColor=g.getDrawColor=function(){return tn(ki)},g.__private__.setStrokeColor=g.setDrawColor=function(l,m,k,R){return ki=Hr({ch1:l,ch2:m,ch3:k,ch4:R,pdfColorType:"draw",precision:2}),P(ki),this};var na=e.fillColor||"0 g";g.__private__.getFillColor=g.getFillColor=function(){return tn(na)},g.__private__.setFillColor=g.setFillColor=function(l,m,k,R){return na=Hr({ch1:l,ch2:m,ch3:k,ch4:R,pdfColorType:"fill",precision:2}),P(na),this};var on=e.textColor||"0 g",To=g.__private__.getTextColor=g.getTextColor=function(){return tn(on)};g.__private__.setTextColor=g.setTextColor=function(l,m,k,R){return on=Hr({ch1:l,ch2:m,ch3:k,ch4:R,pdfColorType:"text",precision:3}),this};var Ci=e.charSpace,qo=g.__private__.getCharSpace=g.getCharSpace=function(){return parseFloat(Ci||0)};g.__private__.setCharSpace=g.setCharSpace=function(l){if(isNaN(l))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ci=l,this};var ia=0;g.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},g.__private__.setLineCap=g.setLineCap=function(l){var m=g.CapJoinStyles[l];if(m===void 0)throw new Error("Line cap style of '"+l+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ia=m,P(m+" J"),this};var En=0;g.__private__.setLineJoin=g.setLineJoin=function(l){var m=g.CapJoinStyles[l];if(m===void 0)throw new Error("Line join style of '"+l+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return En=m,P(m+" j"),this},g.__private__.setLineMiterLimit=g.__private__.setMiterLimit=g.setLineMiterLimit=g.setMiterLimit=function(l){if(l=l||0,isNaN(l))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return P(et(q(l))+" M"),this},g.GState=mo,g.setGState=function(l){(l=typeof l=="string"?Yt[Qt[l]]:aa(null,l)).equals(Oe)||(P("/"+l.id+" gs"),Oe=l)};var aa=function(l,m){if(!l||!Qt[l]){var k=!1;for(var R in Yt)if(Yt.hasOwnProperty(R)&&Yt[R].equals(m)){k=!0;break}if(k)m=Yt[R];else{var G="GS"+(Object.keys(Yt).length+1).toString(10);Yt[G]=m,m.id=G}return l&&(Qt[l]=m.id),be.publish("addGState",m),m}};g.addGState=function(l,m){return aa(l,m),this},g.saveGraphicsState=function(){return P("q"),Ee.push({key:Bt,size:bt,color:on}),this},g.restoreGraphicsState=function(){P("Q");var l=Ee.pop();return Bt=l.key,bt=l.size,on=l.color,Oe=null,this},g.setCurrentTransformationMatrix=function(l){return P(l.toString()+" cm"),this},g.comment=function(l){return P("#"+l),this};var ti=function(l,m){var k=l||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return k},set:function(ot){isNaN(ot)||(k=parseFloat(ot))}});var R=m||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return R},set:function(ot){isNaN(ot)||(R=parseFloat(ot))}});var G="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return G},set:function(ot){G=ot.toString()}}),this},oa=function(l,m,k,R){ti.call(this,l,m),this.type="rect";var G=k||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return G},set:function(pt){isNaN(pt)||(G=parseFloat(pt))}});var ot=R||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ot},set:function(pt){isNaN(pt)||(ot=parseFloat(pt))}}),this},Fi=function(){this.page=ue,this.currentPage=O,this.pages=wt.slice(0),this.pagesContext=Vt.slice(0),this.x=Dt,this.y=Ue,this.matrix=ge,this.width=Ba(O),this.height=wn(O),this.outputDestination=St,this.id="",this.objectNumber=-1};Fi.prototype.restore=function(){ue=this.page,O=this.currentPage,Vt=this.pagesContext,wt=this.pages,Dt=this.x,Ue=this.y,ge=this.matrix,yn(O,this.width),Ma(O,this.height),St=this.outputDestination};var sa=function(l,m,k,R,G){Qr.push(new Fi),ue=O=0,wt=[],Dt=l,Ue=m,ge=G,Qi([k,R])};for(var Ii in g.beginFormObject=function(l,m,k,R,G){return sa(l,m,k,R,G),this},g.endFormObject=function(l){return(function(m){if(dn[m])Qr.pop().restore();else{var k=new Fi,R="Xo"+(Object.keys(ur).length+1).toString(10);k.id=R,dn[m]=R,ur[R]=k,be.publish("addFormObject",k),Qr.pop().restore()}})(l),this},g.doFormObject=function(l,m){var k=ur[dn[l]];return P("q"),P(m.toString()+" cm"),P("/"+k.id+" Do"),P("Q"),this},g.getFormObject=function(l){var m=ur[dn[l]];return{x:m.x,y:m.y,width:m.width,height:m.height,matrix:m.matrix}},g.save=function(l,m){return l=l||"generated.pdf",(m=m||{}).returnPromise=m.returnPromise||!1,m.returnPromise===!1?(pi(Ni(nn()),l),typeof pi.unload=="function"&&Kt.setTimeout&&setTimeout(pi.unload,911),this):new Promise(function(k,R){try{var G=pi(Ni(nn()),l);typeof pi.unload=="function"&&Kt.setTimeout&&setTimeout(pi.unload,911),k(G)}catch(ot){R(ot.message)}})},Rt.API)Rt.API.hasOwnProperty(Ii)&&(Ii==="events"&&Rt.API.events.length?(function(l,m){var k,R,G;for(G=m.length-1;G!==-1;G--)k=m[G][0],R=m[G][1],l.subscribe.apply(l,[k].concat(typeof R=="function"?[R]:R))})(be,Rt.API.events):g[Ii]=Rt.API[Ii]);function Ba(l){return Vt[l].mediaBox.topRightX-Vt[l].mediaBox.bottomLeftX}function yn(l,m){Vt[l].mediaBox.topRightX=m+Vt[l].mediaBox.bottomLeftX}function wn(l){return Vt[l].mediaBox.topRightY-Vt[l].mediaBox.bottomLeftY}function Ma(l,m){Vt[l].mediaBox.topRightY=m+Vt[l].mediaBox.bottomLeftY}var Da=g.getPageWidth=function(l){return Ba(l=l||O)/re},Ra=g.setPageWidth=function(l,m){yn(l,m*re)},ei=g.getPageHeight=function(l){return wn(l=l||O)/re},Ta=g.setPageHeight=function(l,m){Ma(l,m*re)};return g.internal={pdfEscape:Rr,getStyle:Ea,getFont:Io,getFontSize:Ct,getCharSpace:qo,getTextColor:To,getLineHeight:Oo,getLineHeightFactor:Mo,getLineWidth:jo,write:Nt,getHorizontalCoordinate:mn,getVerticalCoordinate:bn,getCoordinateString:Do,getVerticalCoordinateString:Ro,collections:{},newObject:De,newAdditionalObject:Xn,newObjectDeferred:er,newObjectDeferredBegin:nr,getFilters:Wr,putStream:Dr,events:be,scaleFactor:re,pageSize:{getWidth:function(){return Da(O)},setWidth:function(l){Ra(O,l)},getHeight:function(){return ei(O)},setHeight:function(l){Ta(O,l)}},encryptionOptions:v,encryption:ir,getEncryptor:function(l){return v!==null?ir.encryptor(l,0):function(m){return m}},output:Si,getNumberOfPages:Ca,get pages(){return wt},out:P,f2:_,f3:E,getPageInfo:ja,getPageInfoByObjId:So,getCurrentPageInfo:_o,getPDFVersion:j,Point:ti,Rectangle:oa,Matrix:Gt,hasHotfix:vn},Object.defineProperty(g.internal.pageSize,"width",{get:function(){return Da(O)},set:function(l){Ra(O,l)},enumerable:!0,configurable:!0}),Object.defineProperty(g.internal.pageSize,"height",{get:function(){return ei(O)},set:function(l){Ta(O,l)},enumerable:!0,configurable:!0}),function(l){for(var m=0,k=Ht.length;m<k;m++){var R=_a.call(this,l[m][0],l[m][1],l[m][2],Ht[m][3],!0);y===!1&&(N[R]=!0);var G=l[m][0].split("-");Sa({id:R,fontName:G[0],fontStyle:G[1]||""})}be.publish("addFonts",{fonts:oe,dictionary:se})}.call(g,Ht),Bt="F1",Pa(a,r),be.publish("initialized"),g}Wi.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},Wi.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Wi.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},Wi.prototype.processOwnerPassword=function(e,t){return Ps(_s(t).substr(0,5),e)},Wi.prototype.encryptor=function(e,t){var r=_s(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(n){return Ps(r,n)}},mo.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||xe(e)!==xe(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return n===0},Rt.API={events:[]},Rt.version="4.2.1";var qe=Rt.API,Ds=1,yi=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},zi=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},bi=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var r=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(r.length===1?"0"+r:r)})},$t=function(e){return e.toFixed(2)},Gn=function(e){return e.toFixed(5)};qe.__acroform__={};var Sr=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},Ru=function(e){return e*Ds},ln=function(e){var t=new Ph,r=Ft.internal.getHeight(e)||0,n=Ft.internal.getWidth(e)||0;return t.BBox=[0,0,Number($t(n)),Number($t(r))],t},Pf=qe.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},kf=qe.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},Cf=qe.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},Ve=qe.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Cf(e,t-1)},Ge=qe.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Pf(e,t-1)},Ye=qe.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return kf(e,t-1)},Ff=qe.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,a=e[0],o=e[1],f=e[2],u=e[3],h={};return h.lowerLeft_X=r(a)||0,h.lowerLeft_Y=n(o+u)||0,h.upperRight_X=r(a+f)||0,h.upperRight_Y=n(o)||0,[Number($t(h.lowerLeft_X)),Number($t(h.lowerLeft_Y)),Number($t(h.upperRight_X)),Number($t(h.upperRight_Y))]},If=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,n=ks(e,r),a=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+a+" "+$t(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var o=ln(e);return o.scope=e.scope,o.stream=t.join(`
|
||
`),o}},ks=function(e,t){var r=e.fontSize===0?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},a=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");a=e.multiline?a.map(function(_){return _.split(`
|
||
`)}):a.map(function(_){return[_]});var o=r,f=Ft.internal.getHeight(e)||0;f=f<0?-f:f;var u=Ft.internal.getWidth(e)||0;u=u<0?-u:u;var h=function(_,E,q){if(_+1<a.length){var T=E+" "+a[_+1][0];return so(T,e,q).width<=u-4}return!1};o++;t:for(;o>0;){t="",o--;var d,v,y=so("3",e,o).height,N=e.multiline?f-o:(f-y)/2,g=N+=2,B=0,j=0,M=0;if(o<=0){t=`(...) Tj
|
||
`,t+="% Width of Text: "+so(t,e,o=12).width+", FieldWidth:"+u+`
|
||
`;break}for(var C="",Y=0,K=0;K<a.length;K++)if(a.hasOwnProperty(K)){var tt=!1;if(a[K].length!==1&&M!==a[K].length-1){if((y+2)*(Y+2)+2>f)continue t;C+=a[K][M],tt=!0,j=K,K--}else{C=(C+=a[K][M]+" ").substr(C.length-1)==" "?C.substr(0,C.length-1):C;var gt=parseInt(K),xt=h(gt,C,o),Pt=K>=a.length-1;if(xt&&!Pt){C+=" ",M=0;continue}if(xt||Pt){if(Pt)j=gt;else if(e.multiline&&(y+2)*(Y+2)+2>f)continue t}else{if(!e.multiline||(y+2)*(Y+2)+2>f)continue t;j=gt}}for(var et="",U=B;U<=j;U++){var dt=a[U];if(e.multiline){if(U===j){et+=dt[M]+" ",M=(M+1)%dt.length;continue}if(U===B){et+=dt[dt.length-1]+" ";continue}}et+=dt[0]+" "}switch(et=et.substr(et.length-1)==" "?et.substr(0,et.length-1):et,v=so(et,e,o).width,e.textAlign){case"right":d=u-v-2;break;case"center":d=(u-v)/2;break;default:d=2}t+=$t(d)+" "+$t(g)+` Td
|
||
`,t+="("+yi(et)+`) Tj
|
||
`,t+=-$t(d)+` 0 Td
|
||
`,g=-(o+2),v=0,B=tt?j:j+1,Y++,C=""}break}return n.text=t,n.fontSize=o,n},so=function(e,t,r){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),a=t.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:a}},jf={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Ef=function(e,t){var r={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(n){return n.type===r.type&&n.object===r.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},Of=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if($r.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(jf)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Ds=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new kh,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var a in n)if(n.hasOwnProperty(a)){var o=n[a];o.objId=void 0,o.hasAnnotation&&Ef(o,r)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(r){(function(n,a){var o=!n;for(var f in n||(a.internal.newObjectDeferredBegin(a.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),a.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||a.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(f)){var u=n[f],h=[],d=u.Rect;if(u.Rect&&(u.Rect=Ff(u.Rect,a)),a.internal.newObjectDeferredBegin(u.objId,!0),u.DA=Ft.createDefaultAppearanceStream(u),xe(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(h=u.getKeyValueListForStream()),u.Rect=d,u.hasAppearanceStream&&!u.appearanceStreamContent){var v=If(u);h.push({key:"AP",value:"<</N "+v+">>"}),a.internal.acroformPlugin.xForms.push(v)}if(u.appearanceStreamContent){var y="";for(var N in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(N)){var g=u.appearanceStreamContent[N];if(y+="/"+N+" ",y+="<<",Object.keys(g).length>=1||Array.isArray(g)){for(var f in g)if(g.hasOwnProperty(f)){var B=g[f];typeof B=="function"&&(B=B.call(a,u)),y+="/"+f+" "+B+" ",a.internal.acroformPlugin.xForms.indexOf(B)>=0||a.internal.acroformPlugin.xForms.push(B)}}else typeof(B=g)=="function"&&(B=B.call(a,u)),y+="/"+f+" "+B,a.internal.acroformPlugin.xForms.indexOf(B)>=0||a.internal.acroformPlugin.xForms.push(B);y+=">>"}h.push({key:"AP",value:`<<
|
||
`+y+">>"})}a.internal.putStream({additionalKeyValues:h,objectId:u.objId}),a.internal.out("endobj")}o&&(function(j,M){for(var C in j)if(j.hasOwnProperty(C)){var Y=C,K=j[C];M.internal.newObjectDeferredBegin(K.objId,!0),xe(K)==="object"&&typeof K.putStream=="function"&&K.putStream(),delete j[Y]}})(a.internal.acroformPlugin.xForms,a)})(r,e)}),e.internal.acroformPlugin.isInitialized=!0}},_h=qe.__acroform__.arrayToPdfArray=function(e,t,r){var n=function(f){return f};if(Array.isArray(e)){for(var a="[",o=0;o<e.length;o++)switch(o!==0&&(a+=" "),xe(e[o])){case"boolean":case"number":case"object":a+=e[o].toString();break;case"string":e[o].substr(0,1)==="/"?a+="/"+bi(e[o].substr(1)):(t!==void 0&&r&&(n=r.internal.getEncryptor(t)),a+="("+yi(n(e[o].toString()))+")")}return a+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ds=function(e,t,r){var n=function(a){return a};return t!==void 0&&r&&(n=r.internal.getEncryptor(t)),(e=e||"").toString(),"("+yi(n(e))+")"},fn=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};fn.prototype.toString=function(){return this.objId+" 0 R"},fn.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},fn.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(o){return o!="content"&&o!="appearanceStreamContent"&&o!="scope"&&o!="objId"&&o.substring(0,1)!="_"});for(var r in t)if(Object.getOwnPropertyDescriptor(this,t[r]).configurable===!1){var n=t[r],a=this[n];a&&(Array.isArray(a)?e.push({key:n,value:_h(a,this.objId,this.scope)}):a instanceof fn?(a.scope=this.scope,e.push({key:n,value:a.objId+" 0 R"})):typeof a!="function"&&e.push({key:n,value:a}))}return e};var Ph=function(){fn.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){e=r.trim()},get:function(){return e||null}})};Sr(Ph,fn);var kh=function(){fn.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var r=function(n){return n};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+yi(r(e))+")"}},set:function(r){e=r}})};Sr(kh,fn);var $r=function e(){fn.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(C){if(isNaN(C))throw new Error('Invalid value "'+C+'" for attribute F supplied.');t=C}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Ve(t,3)},set:function(C){C?this.F=Ge(t,3):this.F=Ye(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(C){if(isNaN(C))throw new Error('Invalid value "'+C+'" for attribute Ff supplied.');r=C}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(C){n=C!==void 0?C:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(C){n[0]=C}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(C){n[1]=C}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(C){n[2]=C}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(C){n[3]=C}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(C){switch(C){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=C;break;default:throw new Error('Invalid value "'+C+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof bo)return;o="FieldObject"+e.FieldNum++}var C=function(Y){return Y};return this.scope&&(C=this.scope.internal.getEncryptor(this.objId)),"("+yi(C(o))+")"},set:function(C){o=C.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(C){o=C}});var f="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return f},set:function(C){f=C}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(C){u=C}});var h=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return h},set:function(C){h=C}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Ds:d},set:function(C){d=C}});var v="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return v},set:function(C){v=C}});var y="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!y||this instanceof bo||this instanceof vi))return ds(y,this.objId,this.scope)},set:function(C){C=C.toString(),y=C}});var N=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(N)return this instanceof rr==0?ds(N,this.objId,this.scope):N},set:function(C){C=C.toString(),N=this instanceof rr==0?C.substr(0,1)==="("?zi(C.substr(1,C.length-2)):zi(C):C}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof rr==1?zi(N.substr(1,N.length-1)):N},set:function(C){C=C.toString(),N=this instanceof rr==1?"/"+bi(C):C}});var g=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(g)return g},set:function(C){this.V=C}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(g)return this instanceof rr==0?ds(g,this.objId,this.scope):g},set:function(C){C=C.toString(),g=this instanceof rr==0?C.substr(0,1)==="("?zi(C.substr(1,C.length-2)):zi(C):C}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof rr==1?zi(g.substr(1,g.length-1)):g},set:function(C){C=C.toString(),g=this instanceof rr==1?"/"+bi(C):C}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var B,j=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return j},set:function(C){C=!!C,j=C}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(B)return B},set:function(C){B=C}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,1)},set:function(C){C?this.Ff=Ge(this.Ff,1):this.Ff=Ye(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,2)},set:function(C){C?this.Ff=Ge(this.Ff,2):this.Ff=Ye(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,3)},set:function(C){C?this.Ff=Ge(this.Ff,3):this.Ff=Ye(this.Ff,3)}});var M=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(M!==null)return M},set:function(C){if([0,1,2].indexOf(C)===-1)throw new Error('Invalid value "'+C+'" for attribute Q supplied.');M=C}}),Object.defineProperty(this,"textAlign",{get:function(){var C;switch(M){case 0:default:C="left";break;case 1:C="center";break;case 2:C="right"}return C},configurable:!0,enumerable:!0,set:function(C){switch(C){case"right":case 2:M=2;break;case"center":case 1:M=1;break;default:M=0}}})};Sr($r,fn);var Yi=function(){$r.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){e=r}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return _h(t,this.objId,this.scope)},set:function(r){var n,a;a=[],typeof(n=r)=="string"&&(a=(function(o,f,u){u||(u=1);for(var h,d=[];h=f.exec(o);)d.push(h[u]);return d})(n,/\((.*?)\)/g)),t=a}}),this.getOptions=function(){return t},this.setOptions=function(r){t=r,this.sort&&t.sort()},this.addOption=function(r){r=(r=r||"").toString(),t.push(r),this.sort&&t.sort()},this.removeOption=function(r,n){for(n=n||!1,r=(r=r||"").toString();t.indexOf(r)!==-1&&(t.splice(t.indexOf(r),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,18)},set:function(r){r?this.Ff=Ge(this.Ff,18):this.Ff=Ye(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=Ge(this.Ff,19):this.Ff=Ye(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,20)},set:function(r){r?(this.Ff=Ge(this.Ff,20),t.sort()):this.Ff=Ye(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,22)},set:function(r){r?this.Ff=Ge(this.Ff,22):this.Ff=Ye(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,23)},set:function(r){r?this.Ff=Ge(this.Ff,23):this.Ff=Ye(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,27)},set:function(r){r?this.Ff=Ge(this.Ff,27):this.Ff=Ye(this.Ff,27)}}),this.hasAppearanceStream=!1};Sr(Yi,$r);var Ji=function(){Yi.call(this),this.fontName="helvetica",this.combo=!1};Sr(Ji,Yi);var Ki=function(){Ji.call(this),this.combo=!0};Sr(Ki,Ji);var fo=function(){Ki.call(this),this.edit=!0};Sr(fo,Ki);var rr=function(){$r.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,15)},set:function(r){r?this.Ff=Ge(this.Ff,15):this.Ff=Ye(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,16)},set:function(r){r?this.Ff=Ge(this.Ff,16):this.Ff=Ye(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,17)},set:function(r){r?this.Ff=Ge(this.Ff,17):this.Ff=Ye(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,26)},set:function(r){r?this.Ff=Ge(this.Ff,26):this.Ff=Ye(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(o){return o};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,a=[];for(n in a.push("<<"),t)a.push("/"+n+" ("+yi(r(t[n]))+")");return a.push(">>"),a.join(`
|
||
`)}},set:function(r){xe(r)==="object"&&(t=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(r){typeof r=="string"&&(t.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){var n=r==null?"":r.toString();n.substr(0,1)==="/"&&(n=n.substr(1)),e="/"+bi(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(r){e="/"+bi(r)}})};Sr(rr,$r);var co=function(){rr.call(this),this.pushButton=!0};Sr(co,rr);var Xi=function(){rr.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};Sr(Xi,rr);var bo=function(){var e,t;$r.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(a){e=a}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(a){t=a}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var a=function(u){return u};this.scope&&(a=this.scope.internal.getEncryptor(this.objId));var o,f=[];for(o in f.push("<<"),n)f.push("/"+o+" ("+yi(a(n[o]))+")");return f.push(">>"),f.join(`
|
||
`)},set:function(a){xe(a)==="object"&&(n=a)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(a){typeof a=="string"&&(n.CA=a)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),r="/"+bi(o)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(a){var o=a==null?"":a.toString();o.substr(0,1)==="/"&&(o=o.substr(1)),r="/"+bi(o)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ft.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Sr(bo,$r),Xi.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},Xi.prototype.createOption=function(e){var t=new bo;return t.Parent=this,t.optionName=e,this.Kids.push(t),Bf.call(this.scope,t),t};var po=function(){rr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ft.CheckBox.createAppearanceStream()};Sr(po,rr);var vi=function(){$r.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,13)},set:function(t){t?this.Ff=Ge(this.Ff,13):this.Ff=Ye(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,21)},set:function(t){t?this.Ff=Ge(this.Ff,21):this.Ff=Ye(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,23)},set:function(t){t?this.Ff=Ge(this.Ff,23):this.Ff=Ye(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,24)},set:function(t){t?this.Ff=Ge(this.Ff,24):this.Ff=Ye(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,25)},set:function(t){t?this.Ff=Ge(this.Ff,25):this.Ff=Ye(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,26)},set:function(t){t?this.Ff=Ge(this.Ff,26):this.Ff=Ye(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Sr(vi,$r);var go=function(){vi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Ve(this.Ff,14)},set:function(e){e?this.Ff=Ge(this.Ff,14):this.Ff=Ye(this.Ff,14)}}),this.password=!0};Sr(go,vi);var Ft={CheckBox:{createAppearanceStream:function(){return{N:{On:Ft.CheckBox.YesNormal},D:{On:Ft.CheckBox.YesPushDown,Off:Ft.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),o=ks(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+$t(o.fontSize)+" Tf "+a),r.push("BT"),r.push(o.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join(`
|
||
`),t},YesNormal:function(e){var t=ln(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),a=[],o=Ft.internal.getHeight(e),f=Ft.internal.getWidth(e),u=ks(e,e.caption);return a.push("1 g"),a.push("0 0 "+$t(f)+" "+$t(o)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+$t(f-1)+" "+$t(o-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+r+" "+$t(u.fontSize)+" Tf "+n),a.push(u.text),a.push("ET"),a.push("Q"),t.stream=a.join(`
|
||
`),t},OffPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
|
||
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Ft.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Ft.RadioButton.Circle.YesNormal,t.D[e]=Ft.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.getWidth(e)<=Ft.internal.getHeight(e)?Ft.internal.getWidth(e)/4:Ft.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Ft.internal.Bezier_C,o=Number((n*a).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
|
||
`),t},YesPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.getWidth(e)<=Ft.internal.getHeight(e)?Ft.internal.getWidth(e)/4:Ft.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),o=Number((a*Ft.internal.Bezier_C).toFixed(5)),f=Number((n*Ft.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),r.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),r.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),r.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+f+" "+f+" "+n+" 0 "+n+" c"),r.push("-"+f+" "+n+" -"+n+" "+f+" -"+n+" 0 c"),r.push("-"+n+" -"+f+" -"+f+" -"+n+" 0 -"+n+" c"),r.push(f+" -"+n+" "+n+" -"+f+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
|
||
`),t},OffPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.getWidth(e)<=Ft.internal.getHeight(e)?Ft.internal.getWidth(e)/4:Ft.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var a=Number((2*n).toFixed(5)),o=Number((a*Ft.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Gn(Ft.internal.getWidth(e)/2)+" "+Gn(Ft.internal.getHeight(e)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),r.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),r.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),r.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
|
||
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Ft.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Ft.RadioButton.Cross.YesNormal,t.D[e]=Ft.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=ln(e);t.scope=e.scope;var r=[],n=Ft.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+$t(Ft.internal.getWidth(e)-2)+" "+$t(Ft.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push($t(n.x1.x)+" "+$t(n.x1.y)+" m"),r.push($t(n.x2.x)+" "+$t(n.x2.y)+" l"),r.push($t(n.x4.x)+" "+$t(n.x4.y)+" m"),r.push($t(n.x3.x)+" "+$t(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
|
||
`),t},YesPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=Ft.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+$t(Ft.internal.getWidth(e)-2)+" "+$t(Ft.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push($t(r.x1.x)+" "+$t(r.x1.y)+" m"),n.push($t(r.x2.x)+" "+$t(r.x2.y)+" l"),n.push($t(r.x4.x)+" "+$t(r.x4.y)+" m"),n.push($t(r.x3.x)+" "+$t(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
|
||
`),t},OffPushDown:function(e){var t=ln(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+$t(Ft.internal.getWidth(e))+" "+$t(Ft.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
|
||
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};Ft.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Ft.internal.getWidth(e),r=Ft.internal.getHeight(e),n=Math.min(t,r);return{x1:{x:(t-n)/2,y:(r-n)/2+n},x2:{x:(t-n)/2+n,y:(r-n)/2},x3:{x:(t-n)/2,y:(r-n)/2},x4:{x:(t-n)/2+n,y:(r-n)/2+n}}}},Ft.internal.getWidth=function(e){var t=0;return xe(e)==="object"&&(t=Ru(e.Rect[2])),t},Ft.internal.getHeight=function(e){var t=0;return xe(e)==="object"&&(t=Ru(e.Rect[3])),t};var Bf=qe.addField=function(e){if(Of(this,e),!(e instanceof $r))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};qe.AcroFormChoiceField=Yi,qe.AcroFormListBox=Ji,qe.AcroFormComboBox=Ki,qe.AcroFormEditBox=fo,qe.AcroFormButton=rr,qe.AcroFormPushButton=co,qe.AcroFormRadioButton=Xi,qe.AcroFormCheckBox=po,qe.AcroFormTextField=vi,qe.AcroFormPasswordField=go,qe.AcroFormAppearance=Ft,qe.AcroForm={ChoiceField:Yi,ListBox:Ji,ComboBox:Ki,EditBox:fo,Button:rr,PushButton:co,RadioButton:Xi,CheckBox:po,TextField:vi,PasswordField:go,Appearance:Ft},Rt.AcroForm={ChoiceField:Yi,ListBox:Ji,ComboBox:Ki,EditBox:fo,Button:rr,PushButton:co,RadioButton:Xi,CheckBox:po,TextField:vi,PasswordField:go,Appearance:Ft};Rt.AcroForm;function Ch(e){return e.reduce(function(t,r,n){return t[r]=n,t},{})}(function(e){var t="addImage_";e.__addimage__={};var r="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=e.__addimage__.getImageFileTypeByImageData=function(_,E){var q,T,rt,at,ut,Q=r;if((E=E||r)==="RGBA"||_.data!==void 0&&_.data instanceof Uint8ClampedArray&&"height"in _&&"width"in _)return"RGBA";if(xt(_))for(ut in n)for(rt=n[ut],q=0;q<rt.length;q+=1){for(at=!0,T=0;T<rt[q].length;T+=1)if(rt[q][T]!==void 0&&rt[q][T]!==_[T]){at=!1;break}if(at===!0){Q=ut;break}}else for(ut in n)for(rt=n[ut],q=0;q<rt.length;q+=1){for(at=!0,T=0;T<rt[q].length;T+=1)if(rt[q][T]!==void 0&&rt[q][T]!==_.charCodeAt(T)){at=!1;break}if(at===!0){Q=ut;break}}return Q===r&&E!==r&&(Q=E),Q},o=function _(E){for(var q=this.internal.write,T=this.internal.putStream,rt=(0,this.internal.getFilters)();rt.indexOf("FlateEncode")!==-1;)rt.splice(rt.indexOf("FlateEncode"),1);E.objectId=this.internal.newObject();var at=[];if(at.push({key:"Type",value:"/XObject"}),at.push({key:"Subtype",value:"/Image"}),at.push({key:"Width",value:E.width}),at.push({key:"Height",value:E.height}),E.colorSpace===C.INDEXED?at.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(E.palette.length/3-1)+" "+("sMask"in E&&E.sMask!==void 0?E.objectId+2:E.objectId+1)+" 0 R]"}):(at.push({key:"ColorSpace",value:"/"+E.colorSpace}),E.colorSpace===C.DEVICE_CMYK&&at.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),at.push({key:"BitsPerComponent",value:E.bitsPerComponent}),"decodeParameters"in E&&E.decodeParameters!==void 0&&at.push({key:"DecodeParms",value:"<<"+E.decodeParameters+">>"}),"transparency"in E&&Array.isArray(E.transparency)&&E.transparency.length>0){for(var ut="",Q=0,lt=E.transparency.length;Q<lt;Q++)ut+=E.transparency[Q]+" "+E.transparency[Q]+" ";at.push({key:"Mask",value:"["+ut+"]"})}E.sMask!==void 0&&at.push({key:"SMask",value:E.objectId+1+" 0 R"});var At=E.filter!==void 0?["/"+E.filter]:void 0;if(T({data:E.data,additionalKeyValues:at,alreadyAppliedFilters:At,objectId:E.objectId}),q("endobj"),"sMask"in E&&E.sMask!==void 0){var mt,A=(mt=E.sMaskBitsPerComponent)!==null&&mt!==void 0?mt:E.bitsPerComponent,O={width:E.width,height:E.height,colorSpace:"DeviceGray",bitsPerComponent:A,data:E.sMask};"filter"in E&&(O.decodeParameters="/Predictor ".concat(E.predictor," /Colors 1 /BitsPerComponent ").concat(A," /Columns ").concat(E.width),O.filter=E.filter),_.call(this,O)}if(E.colorSpace===C.INDEXED){var D=this.internal.newObject();T({data:et(new Uint8Array(E.palette)),objectId:D}),q("endobj")}},f=function(){var _=this.internal.collections[t+"images"];for(var E in _)o.call(this,_[E])},u=function(){var _,E=this.internal.collections[t+"images"],q=this.internal.write;for(var T in E)q("/I"+(_=E[T]).index,_.objectId,"0","R")},h=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",f),this.internal.events.subscribe("putXobjectDict",u))},d=function(){var _=this.internal.collections[t+"images"];return h.call(this),_},v=function(){return Object.keys(this.internal.collections[t+"images"]).length},y=function(_){return typeof e["process"+_.toUpperCase()]=="function"},N=function(_){return xe(_)==="object"&&_.nodeType===1},g=function(_,E){if(_.nodeName==="IMG"&&_.hasAttribute("src")){var q=""+_.getAttribute("src");if(q.indexOf("data:image/")===0)return lo(unescape(q).split("base64,").pop());var T=e.loadFile(q,!0);if(T!==void 0)return T}if(_.nodeName==="CANVAS"){if(_.width===0||_.height===0)throw new Error("Given canvas must have data. Canvas width: "+_.width+", height: "+_.height);var rt;switch(E){case"PNG":rt="image/png";break;case"WEBP":rt="image/webp";break;default:rt="image/jpeg"}return lo(_.toDataURL(rt,1).split("base64,").pop())}},B=function(_){var E=this.internal.collections[t+"images"];if(E){for(var q in E)if(_===E[q].alias)return E[q]}},j=function(_,E,q){return _||E||(_=-96,E=-96),_<0&&(_=-1*q.width*72/_/this.internal.scaleFactor),E<0&&(E=-1*q.height*72/E/this.internal.scaleFactor),_===0&&(_=E*q.width/q.height),E===0&&(E=_*q.height/q.width),[_,E]},M=function(_,E,q,T,rt,at){var ut=j.call(this,q,T,rt),Q=this.internal.getCoordinateString,lt=this.internal.getVerticalCoordinateString,At=d.call(this);if(q=ut[0],T=ut[1],At[rt.index]=rt,at){at*=Math.PI/180;var mt=Math.cos(at),A=Math.sin(at),O=function(z){return z.toFixed(4)},D=[O(mt),O(A),O(-1*A),O(mt),0,0,"cm"]}this.internal.write("q"),at?(this.internal.write([1,"0","0",1,Q(_),lt(E+T),"cm"].join(" ")),this.internal.write(D.join(" ")),this.internal.write([Q(q),"0","0",Q(T),"0","0","cm"].join(" "))):this.internal.write([Q(q),"0","0",Q(T),Q(_),lt(E+T),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+rt.index+" Do"),this.internal.write("Q")},C=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var Y=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},K=e.__addimage__.sHashCode=function(_){var E,q,T=0;if(typeof _=="string")for(q=_.length,E=0;E<q;E++)T=(T<<5)-T+_.charCodeAt(E),T|=0;else if(xt(_))for(q=_.byteLength/2,E=0;E<q;E++)T=(T<<5)-T+_[E],T|=0;return T},tt=e.__addimage__.validateStringAsBase64=function(_){(_=_||"").toString().trim();var E=!0;return _.length===0&&(E=!1),_.length%4!=0&&(E=!1),/^[A-Za-z0-9+/]+$/.test(_.substr(0,_.length-2))===!1&&(E=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(_.substr(-2))===!1&&(E=!1),E},gt=e.__addimage__.extractImageFromDataUrl=function(_){if(_==null||!(_=_.trim()).startsWith("data:"))return null;var E=_.indexOf(",");return E<0?null:_.substring(0,E).trim().endsWith("base64")?_.substring(E+1):null};e.__addimage__.isArrayBuffer=function(_){return _ instanceof ArrayBuffer};var xt=e.__addimage__.isArrayBufferView=function(_){return _ instanceof Int8Array||_ instanceof Uint8Array||_ instanceof Uint8ClampedArray||_ instanceof Int16Array||_ instanceof Uint16Array||_ instanceof Int32Array||_ instanceof Uint32Array||_ instanceof Float32Array||_ instanceof Float64Array},Pt=e.__addimage__.binaryStringToUint8Array=function(_){for(var E=_.length,q=new Uint8Array(E),T=0;T<E;T++)q[T]=_.charCodeAt(T);return q},et=e.__addimage__.arrayBufferToBinaryString=function(_){for(var E="",q=xt(_)?_:new Uint8Array(_),T=0;T<q.length;T+=8192)E+=String.fromCharCode.apply(null,q.subarray(T,T+8192));return E};e.addImage=function(){var _,E,q,T,rt,at,ut,Q,lt;if(typeof arguments[1]=="number"?(E=r,q=arguments[1],T=arguments[2],rt=arguments[3],at=arguments[4],ut=arguments[5],Q=arguments[6],lt=arguments[7]):(E=arguments[1],q=arguments[2],T=arguments[3],rt=arguments[4],at=arguments[5],ut=arguments[6],Q=arguments[7],lt=arguments[8]),xe(_=arguments[0])==="object"&&!N(_)&&"imageData"in _){var At=_;_=At.imageData,E=At.format||E||r,q=At.x||q||0,T=At.y||T||0,rt=At.w||At.width||rt,at=At.h||At.height||at,ut=At.alias||ut,Q=At.compression||Q,lt=At.rotation||At.angle||lt}var mt=this.internal.getFilters();if(Q===void 0&&mt.indexOf("FlateEncode")!==-1&&(Q="SLOW"),isNaN(q)||isNaN(T))throw new Error("Invalid coordinates passed to jsPDF.addImage");h.call(this);var A=U.call(this,_,E,ut,Q);return M.call(this,q,T,rt,at,A,lt),this};var U=function(_,E,q,T){var rt,at,ut;if(typeof _=="string"&&a(_)===r){_=unescape(_);var Q=dt(_,!1);(Q!==""||(Q=e.loadFile(_,!0))!==void 0)&&(_=Q)}if(N(_)&&(_=g(_,E)),E=a(_,E),!y(E))throw new Error("addImage does not support files of type '"+E+"', please ensure that a plugin for '"+E+"' support is added.");if(((ut=q)==null||ut.length===0)&&(q=(function(lt){return typeof lt=="string"||xt(lt)?K(lt):xt(lt.data)?K(lt.data):null})(_)),(rt=B.call(this,q))||(_ instanceof Uint8Array||E==="RGBA"||(at=_,_=Pt(_)),rt=this["process"+E.toUpperCase()](_,v.call(this),q,(function(lt){return lt&&typeof lt=="string"&&(lt=lt.toUpperCase()),lt in e.image_compression?lt:Y.NONE})(T),at)),!rt)throw new Error("An unknown error occurred whilst processing the image.");return rt},dt=e.__addimage__.convertBase64ToBinaryString=function(_,E){E=typeof E!="boolean"||E;var q,T="";if(typeof _=="string"){var rt;q=(rt=gt(_))!==null&&rt!==void 0?rt:_;try{T=lo(q)}catch(at){if(E)throw tt(q)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+at.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return T};e.getImageProperties=function(_){var E,q,T="";if(N(_)&&(_=g(_)),typeof _=="string"&&a(_)===r&&((T=dt(_,!1))===""&&(T=e.loadFile(_)||""),_=T),q=a(_),!y(q))throw new Error("addImage does not support files of type '"+q+"', please ensure that a plugin for '"+q+"' support is added.");if(_ instanceof Uint8Array||(_=Pt(_)),!(E=this["process"+q.toUpperCase()](_)))throw new Error("An unknown error occurred whilst processing the image");return E.fileType=q,E}})(Rt.API),(function(e){var t=function(r){if(r!==void 0&&r!="")return!0};Rt.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(r){for(var n,a,o,f=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,h=this.internal.getPageInfoByObjId(r.objId),d=r.pageContext.annotations,v=!1,y=0;y<d.length&&!v;y++)switch((n=d[y]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(v=!0);break;case"reference":case"text":case"freetext":v=!0}if(v!=0){this.internal.write("/Annots [");for(var N=0;N<d.length;N++){n=d[N];var g=this.internal.pdfEscape,B=this.internal.getEncryptor(r.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var j=this.internal.newAdditionalObject(),M=this.internal.newAdditionalObject(),C=this.internal.getEncryptor(j.objId),Y=n.title||"Note";o="<</Type /Annot /Subtype /Text "+(a="/Rect ["+f(n.bounds.x)+" "+u(n.bounds.y+n.bounds.h)+" "+f(n.bounds.x+n.bounds.w)+" "+u(n.bounds.y)+"] ")+"/Contents ("+g(C(n.contents))+")",o+=" /Popup "+M.objId+" 0 R",o+=" /P "+h.objId+" 0 R",o+=" /T ("+g(C(Y))+") >>",j.content=o;var K=j.objId+" 0 R";o="<</Type /Annot /Subtype /Popup "+(a="/Rect ["+f(n.bounds.x+30)+" "+u(n.bounds.y+n.bounds.h)+" "+f(n.bounds.x+n.bounds.w+30)+" "+u(n.bounds.y)+"] ")+" /Parent "+K,n.open&&(o+=" /Open true"),o+=" >>",M.content=o,this.internal.write(j.objId,"0 R",M.objId,"0 R");break;case"freetext":a="/Rect ["+f(n.bounds.x)+" "+u(n.bounds.y)+" "+f(n.bounds.x+n.bounds.w)+" "+u(n.bounds.y+n.bounds.h)+"] ";var tt="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(n.color||"#000000");o="<</Type /Annot /Subtype /FreeText "+a+"/Contents ("+g(B(n.contents))+")",o+=" /DS("+g(B(tt))+")",o+=" /Border [0 0 0]",o+=" >>",this.internal.write(o);break;case"link":if(n.options.name){var gt=this.annotations._nameMap[n.options.name];n.options.pageNumber=gt.page,n.options.top=gt.y}else n.options.top||(n.options.top=0);if(a="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",o="",n.options.url)o="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /A <</S /URI /URI ("+g(B(n.options.url))+") >>";else if(n.options.pageNumber)switch(o="<</Type /Annot /Subtype /Link "+a+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":o+=" /Fit]";break;case"FitH":o+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,o+=" /FitV "+n.options.left+"]";break;default:var xt=u(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),o+=" /XYZ "+n.options.left+" "+xt+" "+n.options.zoom+"]"}o!=""&&(o+=" >>",this.internal.write(o))}}this.internal.write("]")}}]),e.createAnnotation=function(r){var n=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":n.pageContext.annotations.push(r)}},e.link=function(r,n,a,o,f){var u=this.internal.getCurrentPageInfo(),h=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;u.pageContext.annotations.push({finalBounds:{x:h(r),y:d(n),w:h(r+a),h:d(n+o)},options:f,type:"link"})},e.textWithLink=function(r,n,a,o){var f,u,h=this.getTextWidth(r),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(o.maxWidth!==void 0){u=o.maxWidth;var v=this.splitTextToSize(r,u).length;f=Math.ceil(d*v)}else u=h,f=d;return this.text(r,n,a,o),a+=.2*d,o.align==="center"&&(n-=h/2),o.align==="right"&&(n-=h),this.link(n,a-d,u,f,o),h},e.getTextWidth=function(r){var n=this.internal.getFontSize();return this.getStringUnitWidth(r)*n/this.internal.scaleFactor}})(Rt.API),(function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];e.__arabicParser__={};var o=e.__arabicParser__.isInArabicSubstitutionA=function(j){return t[j.charCodeAt(0)]!==void 0},f=e.__arabicParser__.isArabicLetter=function(j){return typeof j=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(j)},u=e.__arabicParser__.isArabicEndLetter=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length<=2},h=e.__arabicParser__.isArabicAlfLetter=function(j){return f(j)&&a.indexOf(j.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length>=1};var d=e.__arabicParser__.arabicLetterHasFinalForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length>=3};var v=e.__arabicParser__.arabicLetterHasMedialForm=function(j){return f(j)&&o(j)&&t[j.charCodeAt(0)].length==4},y=e.__arabicParser__.resolveLigatures=function(j){var M=0,C=r,Y="",K=0;for(M=0;M<j.length;M+=1)C[j.charCodeAt(M)]!==void 0?(K++,typeof(C=C[j.charCodeAt(M)])=="number"&&(Y+=String.fromCharCode(C),C=r,K=0),M===j.length-1&&(C=r,Y+=j.charAt(M-(K-1)),M-=K-1,K=0)):(C=r,Y+=j.charAt(M-K),M-=K,K=0);return Y};e.__arabicParser__.isArabicDiacritic=function(j){return j!==void 0&&n[j.charCodeAt(0)]!==void 0};var N=e.__arabicParser__.getCorrectForm=function(j,M,C){return f(j)?o(j)===!1?-1:!d(j)||!f(M)&&!f(C)||!f(C)&&u(M)||u(j)&&!f(M)||u(j)&&h(M)||u(j)&&u(M)?0:v(j)&&f(M)&&!u(M)&&f(C)&&d(C)?3:u(j)||!f(C)?1:2:-1},g=function(j){var M=0,C=0,Y=0,K="",tt="",gt="",xt=(j=j||"").split("\\s+"),Pt=[];for(M=0;M<xt.length;M+=1){for(Pt.push(""),C=0;C<xt[M].length;C+=1)K=xt[M][C],tt=xt[M][C-1],gt=xt[M][C+1],f(K)?(Y=N(K,tt,gt),Pt[M]+=Y!==-1?String.fromCharCode(t[K.charCodeAt(0)][Y]):K):Pt[M]+=K;Pt[M]=y(Pt[M])}return Pt.join(" ")},B=e.__arabicParser__.processArabic=e.processArabic=function(){var j,M=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,C=[];if(Array.isArray(M)){var Y=0;for(C=[],Y=0;Y<M.length;Y+=1)Array.isArray(M[Y])?C.push([g(M[Y][0]),M[Y][1],M[Y][2]]):C.push([g(M[Y])]);j=C}else j=g(M);return typeof arguments[0]=="string"?j:(arguments[0].text=j,arguments[0])};e.events.push(["preProcessText",B])})(Rt.API),Rt.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(e){var t=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(u){r=u}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(u){n=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var a=300;Object.defineProperty(this,"height",{get:function(){return a},set:function(u){a=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=a+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(u){o=u}});var f={};Object.defineProperty(this,"style",{get:function(){return f},set:function(u){f=u}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(r,n){var a;if((r=r||"2d")!=="2d")return null;for(a in n)this.pdf.context2d.hasOwnProperty(a)&&(this.pdf.context2d[a]=n[a]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Rt.API),(function(e){var t={left:0,top:0,bottom:0,right:0},r=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var h=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return h},set:function(j){h=j}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(j){d=j}});var v=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return v},set:function(j){v=j}});var y=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return y},set:function(j){y=j}});var N=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return N},set:function(j){N=j}});var g=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return g},set:function(j){g=j}});var B=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return B},set:function(j){B=j}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(h){return n.call(this),this.internal.__cell__.headerFunction=typeof h=="function"?h:void 0,this},e.getTextDimensions=function(h,d){n.call(this);var v=(d=d||{}).fontSize||this.getFontSize(),y=d.font||this.getFont(),N=d.scaleFactor||this.internal.scaleFactor,g=0,B=0,j=0,M=this;if(!Array.isArray(h)&&typeof h!="string"){if(typeof h!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");h=String(h)}var C=d.maxWidth;C>0?typeof h=="string"?h=this.splitTextToSize(h,C):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(K,tt){return K.concat(M.splitTextToSize(tt,C))},[])):h=Array.isArray(h)?h:[h];for(var Y=0;Y<h.length;Y++)g<(j=this.getStringUnitWidth(h[Y],{font:y})*v)&&(g=j);return g!==0&&(B=h.length),{w:g/=N,h:Math.max((B*v*this.getLineHeightFactor()-v*(this.getLineHeightFactor()-1))/N,0)}},e.cellAddPage=function(){n.call(this),this.addPage();var h=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new o(h.left,h.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var f=e.cell=function(){var h;h=arguments[0]instanceof o?arguments[0]:new o(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var d=this.internal.__cell__.lastCell,v=this.internal.__cell__.padding,y=this.internal.__cell__.margins||t,N=this.internal.__cell__.tableHeaderRow,g=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===h.lineNumber?(h.x=(d.x||0)+(d.width||0),h.y=d.y||0):d.y+d.height+h.height+y.bottom>this.getPageHeight()?(this.cellAddPage(),h.y=y.top,g&&N&&(this.printHeaderRow(h.lineNumber,!0),h.y+=N[0].height)):h.y=d.y+d.height||h.y),h.text[0]!==void 0&&(this.rect(h.x,h.y,h.width,h.height,r===!0?"FD":void 0),h.align==="right"?this.text(h.text,h.x+h.width-v,h.y+v,{align:"right",baseline:"top"}):h.align==="center"?this.text(h.text,h.x+h.width/2,h.y+v,{align:"center",baseline:"top",maxWidth:h.width-v-v}):this.text(h.text,h.x+v,h.y+v,{align:"left",baseline:"top",maxWidth:h.width-v-v})),this.internal.__cell__.lastCell=h,this};e.table=function(h,d,v,y,N){if(n.call(this),!v)throw new Error("No data for PDF table.");var g,B,j,M,C=[],Y=[],K=[],tt={},gt={},xt=[],Pt=[],et=(N=N||{}).autoSize||!1,U=N.printHeaders!==!1,dt=N.css&&N.css["font-size"]!==void 0?16*N.css["font-size"]:N.fontSize||12,_=N.margins||Object.assign({width:this.getPageWidth()},t),E=typeof N.padding=="number"?N.padding:3,q=N.headerBackgroundColor||"#c8c8c8",T=N.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=U,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=dt,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=q,this.internal.__cell__.headerTextColor=T,this.setFontSize(dt),y==null)Y=C=Object.keys(v[0]),K=C.map(function(){return"left"});else if(Array.isArray(y)&&xe(y[0])==="object")for(C=y.map(function(At){return At.name}),Y=y.map(function(At){return At.prompt||At.name||""}),K=y.map(function(At){return At.align||"left"}),g=0;g<y.length;g+=1)gt[y[g].name]=.7499990551181103*y[g].width;else Array.isArray(y)&&typeof y[0]=="string"&&(Y=C=y,K=C.map(function(){return"left"}));if(et||Array.isArray(y)&&typeof y[0]=="string")for(g=0;g<C.length;g+=1){for(tt[M=C[g]]=v.map(function(At){return At[M]}),this.setFont(void 0,"bold"),xt.push(this.getTextDimensions(Y[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),B=tt[M],this.setFont(void 0,"normal"),j=0;j<B.length;j+=1)xt.push(this.getTextDimensions(B[j],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);gt[M]=Math.max.apply(null,xt)+E+E,xt=[]}if(U){var rt={};for(g=0;g<C.length;g+=1)rt[C[g]]={},rt[C[g]].text=Y[g],rt[C[g]].align=K[g];var at=u.call(this,rt,gt);Pt=C.map(function(At){return new o(h,d,gt[At],at,rt[At].text,void 0,rt[At].align)}),this.setTableHeaderRow(Pt),this.printHeaderRow(1,!1)}var ut=y.reduce(function(At,mt){return At[mt.name]=mt.align,At},{});for(g=0;g<v.length;g+=1){"rowStart"in N&&N.rowStart instanceof Function&&N.rowStart({row:g,data:v[g]},this);var Q=u.call(this,v[g],gt);for(j=0;j<C.length;j+=1){var lt=v[g][C[j]];"cellStart"in N&&N.cellStart instanceof Function&&N.cellStart({row:g,col:j,data:lt},this),f.call(this,new o(h,d,gt[C[j]],Q,lt,g+2,ut[C[j]]))}}return this.internal.__cell__.table_x=h,this.internal.__cell__.table_y=d,this};var u=function(h,d){var v=this.internal.__cell__.padding,y=this.internal.__cell__.table_font_size,N=this.internal.scaleFactor;return Object.keys(h).map(function(g){var B=h[g];return this.splitTextToSize(B.hasOwnProperty("text")?B.text:B,d[g]-v-v)},this).map(function(g){return this.getLineHeightFactor()*g.length*y/N+v+v},this).reduce(function(g,B){return Math.max(g,B)},0)};e.setTableHeaderRow=function(h){n.call(this),this.internal.__cell__.tableHeaderRow=h},e.printHeaderRow=function(h,d){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var v;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var y=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(y[0],y[1],y[2],y[3],void 0,-1)}this.setFont(void 0,"bold");for(var N=[],g=0;g<this.internal.__cell__.tableHeaderRow.length;g+=1){v=this.internal.__cell__.tableHeaderRow[g].clone(),d&&(v.y=this.internal.__cell__.margins.top||0,N.push(v)),v.lineNumber=h;var B=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),f.call(this,v),this.setTextColor(B)}N.length>0&&this.setTableHeaderRow(N),this.setFont(void 0,"normal"),r=!1}})(Rt.API);var Fh={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Ih=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Cs=Ch(Ih),jh=[100,200,300,400,500,600,700,800,900],Mf=Ch(jh);function ps(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),r=(function(o){return Fh[o=o||"normal"]?o:"normal"})(e.style),n=(function(o){return o?typeof o=="number"?o>=100&&o<=900&&o%100==0?o:400:/^\d00$/.test(o)?parseInt(o):o==="bold"?700:400:400})(e.weight),a=(function(o){return typeof Cs[o=o||"normal"]=="number"?o:"normal"})(e.stretch);return{family:t,style:r,weight:n,stretch:a,src:e.src||[],ref:e.ref||{name:t,style:[a,r,n].join(" ")}}}function Tu(e,t,r,n){var a;for(a=r;a>=0&&a<t.length;a+=n)if(e[t[a]])return e[t[a]];for(a=r;a>=0&&a<t.length;a-=n)if(e[t[a]])return e[t[a]]}var Df={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},qu={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Uu(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function zu(e){return e.trimLeft()}function Rf(e,t){for(var r=0;r<e.length;){if(e.charAt(r)===t)return[e.substring(0,r),e.substring(r+1)];r+=1}return null}function Tf(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var Hi,uo,Hu,Wu,Vu,gs=["times"];function Gu(e,t,r,n,a){var o=4,f=Ju;switch(a){case Rt.API.image_compression.FAST:o=1,f=Yu;break;case Rt.API.image_compression.MEDIUM:o=6,f=Ku;break;case Rt.API.image_compression.SLOW:o=9,f=Xu}e=(function(h,d,v,y){for(var N,g=h.length/d,B=new Uint8Array(h.length+g),j=[qf,Yu,Ju,Ku,Xu],M=0;M<g;M+=1){var C=M*d,Y=h.subarray(C,C+d);if(y)B.set(y(Y,v,N),C+M);else{for(var K=j.length,tt=[],gt=0;gt<K;gt+=1)tt[gt]=j[gt](Y,v,N);var xt=zf(tt.concat());B.set(tt[xt],C+M)}N=Y}return B})(e,t,Math.ceil(r*n/8),f);var u=Ss(e,{level:o});return Rt.API.__addimage__.arrayBufferToBinaryString(u)}function qf(e){var t=Array.apply([],e);return t.unshift(0),t}function Yu(e,t){var r=e.length,n=[];n[0]=1;for(var a=0;a<r;a+=1){var o=e[a-t]||0;n[a+1]=e[a]-o+256&255}return n}function Ju(e,t,r){var n=e.length,a=[];a[0]=2;for(var o=0;o<n;o+=1){var f=r&&r[o]||0;a[o+1]=e[o]-f+256&255}return a}function Ku(e,t,r){var n=e.length,a=[];a[0]=3;for(var o=0;o<n;o+=1){var f=e[o-t]||0,u=r&&r[o]||0;a[o+1]=e[o]+256-(f+u>>>1)&255}return a}function Xu(e,t,r){var n=e.length,a=[];a[0]=4;for(var o=0;o<n;o+=1){var f=Uf(e[o-t]||0,r&&r[o]||0,r&&r[o-t]||0);a[o+1]=e[o]-f+256&255}return a}function Uf(e,t,r){if(e===t&&t===r)return e;var n=Math.abs(t-r),a=Math.abs(e-r),o=Math.abs(e+t-r-r);return n<=a&&n<=o?e:a<=o?t:r}function zf(e){var t=e.map(function(r){return r.reduce(function(n,a){return n+Math.abs(a)},0)});return t.indexOf(Math.min.apply(null,t))}function vs(e,t,r){var n=t*r,a=Math.floor(n/8),o=16-(n-8*a+r),f=(1<<r)-1;return Eh(e,a)>>o&f}function $u(e,t,r,n){var a=r*n,o=Math.floor(a/8),f=16-(a-8*o+n),u=(1<<n)-1,h=(t&u)<<f;(function(d,v,y){if(v+1<d.byteLength)d.setUint16(v,y,!1);else{var N=y>>8&255;d.setUint8(v,N)}})(e,o,Eh(e,o)&~(u<<f)&65535|h)}function Eh(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function Hf(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var r=e[t++]|e[t++]<<8,n=e[t++]|e[t++]<<8,a=e[t++],o=a>>7,f=1<<1+(7&a);e[t++],e[t++];var u=null,h=null;o&&(u=t,h=f,t+=3*f);var d=!0,v=[],y=0,N=null,g=0,B=null;for(this.width=r,this.height=n;d&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,B=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((_=e[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var j=e[t++];y=e[t++]|e[t++]<<8,N=e[t++],1&j||(N=null),g=j>>2&7,t++;break;case 254:for(;;){if(!((_=e[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var M=e[t++]|e[t++]<<8,C=e[t++]|e[t++]<<8,Y=e[t++]|e[t++]<<8,K=e[t++]|e[t++]<<8,tt=e[t++],gt=tt>>6&1,xt=1<<1+(7&tt),Pt=u,et=h,U=!1;tt>>7&&(U=!0,Pt=t,et=xt,t+=3*xt);var dt=t;for(t++;;){var _;if(!((_=e[t++])>=0))throw Error("Invalid block size");if(_===0)break;t+=_}v.push({x:M,y:C,width:Y,height:K,has_local_palette:U,palette_offset:Pt,palette_size:et,data_offset:dt,data_length:t-dt,transparent_index:N,interlaced:!!gt,delay:y,disposal:g});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return v.length},this.loopCount=function(){return B},this.frameInfo=function(E){if(E<0||E>=v.length)throw new Error("Frame index out of range.");return v[E]},this.decodeAndBlitFrameBGRA=function(E,q){var T=this.frameInfo(E),rt=T.width*T.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var at=new Uint8Array(rt);Zu(e,T.data_offset,at,rt);var ut=T.palette_offset,Q=T.transparent_index;Q===null&&(Q=256);var lt=T.width,At=r-lt,mt=lt,A=4*(T.y*r+T.x),O=4*((T.y+T.height)*r+T.x),D=A,z=4*At;T.interlaced===!0&&(z+=4*r*7);for(var V=8,X=0,nt=at.length;X<nt;++X){var it=at[X];if(mt===0&&(mt=lt,(D+=z)>=O&&(z=4*At+4*r*(V-1),D=A+(lt+At)*(V<<1),V>>=1)),it===Q)D+=4;else{var ct=e[ut+3*it],wt=e[ut+3*it+1],_t=e[ut+3*it+2];q[D++]=_t,q[D++]=wt,q[D++]=ct,q[D++]=255}--mt}},this.decodeAndBlitFrameRGBA=function(E,q){var T=this.frameInfo(E),rt=T.width*T.height;if(rt>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var at=new Uint8Array(rt);Zu(e,T.data_offset,at,rt);var ut=T.palette_offset,Q=T.transparent_index;Q===null&&(Q=256);var lt=T.width,At=r-lt,mt=lt,A=4*(T.y*r+T.x),O=4*((T.y+T.height)*r+T.x),D=A,z=4*At;T.interlaced===!0&&(z+=4*r*7);for(var V=8,X=0,nt=at.length;X<nt;++X){var it=at[X];if(mt===0&&(mt=lt,(D+=z)>=O&&(z=4*At+4*r*(V-1),D=A+(lt+At)*(V<<1),V>>=1)),it===Q)D+=4;else{var ct=e[ut+3*it],wt=e[ut+3*it+1],_t=e[ut+3*it+2];q[D++]=ct,q[D++]=wt,q[D++]=_t,q[D++]=255}--mt}}}function Zu(e,t,r,n){for(var a=e[t++],o=1<<a,f=o+1,u=f+1,h=a+1,d=(1<<h)-1,v=0,y=0,N=0,g=e[t++],B=new Int32Array(4096),j=null;;){for(;v<16&&g!==0;)y|=e[t++]<<v,v+=8,g===1?g=e[t++]:--g;if(v<h)break;var M=y&d;if(y>>=h,v-=h,M!==o){if(M===f)break;for(var C=M<u?M:j,Y=0,K=C;K>o;)K=B[K]>>8,++Y;var tt=K;if(N+Y+(C!==M?1:0)>n)return void Se.log("Warning, gif stream longer than expected.");r[N++]=tt;var gt=N+=Y;for(C!==M&&(r[N++]=tt),K=C;Y--;)K=B[K],r[--gt]=255&K,K>>=8;j!==null&&u<4096&&(B[u++]=j<<8|tt,u>=d+1&&h<12&&(++h,d=d<<1|1)),j=M}else u=f+1,d=(1<<(h=a+1))-1,j=null}return N!==n&&Se.log("Warning, gif stream shorter than expected."),r}/**
|
||
* @license
|
||
Copyright (c) 2008, Adobe Systems Incorporated
|
||
All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are
|
||
met:
|
||
|
||
* Redistributions of source code must retain the above copyright notice,
|
||
this list of conditions and the following disclaimer.
|
||
|
||
* Redistributions in binary form must reproduce the above copyright
|
||
notice, this list of conditions and the following disclaimer in the
|
||
documentation and/or other materials provided with the distribution.
|
||
|
||
* Neither the name of Adobe Systems Incorporated nor the names of its
|
||
contributors may be used to endorse or promote products derived from
|
||
this software without specific prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/function ms(e){var t,r,n,a,o,f=Math.floor,u=new Array(64),h=new Array(64),d=new Array(64),v=new Array(64),y=new Array(65535),N=new Array(65535),g=new Array(64),B=new Array(64),j=[],M=0,C=7,Y=new Array(64),K=new Array(64),tt=new Array(64),gt=new Array(256),xt=new Array(2048),Pt=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],et=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],dt=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],_=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],rt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function at(A,O){for(var D=0,z=0,V=new Array,X=1;X<=16;X++){for(var nt=1;nt<=A[X];nt++)V[O[z]]=[],V[O[z]][0]=D,V[O[z]][1]=X,z++,D++;D*=2}return V}function ut(A){for(var O=A[0],D=A[1]-1;D>=0;)O&1<<D&&(M|=1<<C),D--,--C<0&&(M==255?(Q(255),Q(0)):Q(M),C=7,M=0)}function Q(A){j.push(A)}function lt(A){Q(A>>8&255),Q(255&A)}function At(A,O,D,z,V){for(var X,nt=V[0],it=V[240],ct=(function(bt,Wt){var Ct,zt,qt,me,he,Zt,fe,le,Bt,re,Dt=0;for(Bt=0;Bt<8;++Bt){Ct=bt[Dt],zt=bt[Dt+1],qt=bt[Dt+2],me=bt[Dt+3],he=bt[Dt+4],Zt=bt[Dt+5],fe=bt[Dt+6];var Ue=Ct+(le=bt[Dt+7]),ge=Ct-le,oe=zt+fe,se=zt-fe,Ee=qt+Zt,Ut=qt-Zt,_e=me+he,Yt=me-he,Qt=Ue+_e,Oe=Ue-_e,ue=oe+Ee,Vt=oe-Ee;bt[Dt]=Qt+ue,bt[Dt+4]=Qt-ue;var be=.707106781*(Vt+Oe);bt[Dt+2]=Oe+be,bt[Dt+6]=Oe-be;var Kn=.382683433*((Qt=Yt+Ut)-(Vt=se+ge)),ur=.5411961*Qt+Kn,dn=1.306562965*Vt+Kn,Qr=.707106781*(ue=Ut+se),Gt=ge+Qr,pn=ge-Qr;bt[Dt+5]=pn+ur,bt[Dt+3]=pn-ur,bt[Dt+1]=Gt+dn,bt[Dt+7]=Gt-dn,Dt+=8}for(Dt=0,Bt=0;Bt<8;++Bt){Ct=bt[Dt],zt=bt[Dt+8],qt=bt[Dt+16],me=bt[Dt+24],he=bt[Dt+32],Zt=bt[Dt+40],fe=bt[Dt+48];var gn=Ct+(le=bt[Dt+56]),Br=Ct-le,Mr=zt+fe,De=zt-fe,er=qt+Zt,nr=qt-Zt,Xn=me+he,Fn=me-he,zr=gn+Xn,tn=gn-Xn,Hr=Mr+er,Wr=Mr-er;bt[Dt]=zr+Hr,bt[Dt+32]=zr-Hr;var Dr=.707106781*(Wr+tn);bt[Dt+16]=tn+Dr,bt[Dt+48]=tn-Dr;var $n=.382683433*((zr=Fn+nr)-(Wr=De+Br)),en=.5411961*zr+$n,Zn=1.306562965*Wr+$n,wi=.707106781*(Hr=nr+De),xi=Br+wi,Ai=Br-wi;bt[Dt+40]=Ai+en,bt[Dt+24]=Ai-en,bt[Dt+8]=xi+Zn,bt[Dt+56]=xi-Zn,Dt++}for(Bt=0;Bt<64;++Bt)re=bt[Bt]*Wt[Bt],g[Bt]=re>0?re+.5|0:re-.5|0;return g})(A,O),wt=0;wt<64;++wt)B[Pt[wt]]=ct[wt];var _t=B[0]-D;D=B[0],_t==0?ut(z[0]):(ut(z[N[X=32767+_t]]),ut(y[X]));for(var St=63;St>0&&B[St]==0;)St--;if(St==0)return ut(nt),D;for(var Tt,P=1;P<=St;){for(var Nt=P;B[P]==0&&P<=St;)++P;var ae=P-Nt;if(ae>=16){Tt=ae>>4;for(var Ht=1;Ht<=Tt;++Ht)ut(it);ae&=15}X=32767+B[P],ut(V[(ae<<4)+N[X]]),ut(y[X]),P++}return St!=63&&ut(nt),D}function mt(A){A=Math.min(Math.max(A,1),100),o!=A&&((function(O){for(var D=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],z=0;z<64;z++){var V=f((D[z]*O+50)/100);V=Math.min(Math.max(V,1),255),u[Pt[z]]=V}for(var X=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],nt=0;nt<64;nt++){var it=f((X[nt]*O+50)/100);it=Math.min(Math.max(it,1),255),h[Pt[nt]]=it}for(var ct=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],wt=0,_t=0;_t<8;_t++)for(var St=0;St<8;St++)d[wt]=1/(u[Pt[wt]]*ct[_t]*ct[St]*8),v[wt]=1/(h[Pt[wt]]*ct[_t]*ct[St]*8),wt++})(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),o=A)}this.encode=function(A,O){O&&mt(O),j=new Array,M=0,C=7,lt(65496),lt(65504),lt(16),Q(74),Q(70),Q(73),Q(70),Q(0),Q(1),Q(1),Q(0),lt(1),lt(1),Q(0),Q(0),(function(){lt(65499),lt(132),Q(0);for(var zt=0;zt<64;zt++)Q(u[zt]);Q(1);for(var qt=0;qt<64;qt++)Q(h[qt])})(),(function(zt,qt){lt(65472),lt(17),Q(8),lt(qt),lt(zt),Q(3),Q(1),Q(17),Q(0),Q(2),Q(17),Q(1),Q(3),Q(17),Q(1)})(A.width,A.height),(function(){lt(65476),lt(418),Q(0);for(var zt=0;zt<16;zt++)Q(et[zt+1]);for(var qt=0;qt<=11;qt++)Q(U[qt]);Q(16);for(var me=0;me<16;me++)Q(dt[me+1]);for(var he=0;he<=161;he++)Q(_[he]);Q(1);for(var Zt=0;Zt<16;Zt++)Q(E[Zt+1]);for(var fe=0;fe<=11;fe++)Q(q[fe]);Q(17);for(var le=0;le<16;le++)Q(T[le+1]);for(var Bt=0;Bt<=161;Bt++)Q(rt[Bt])})(),lt(65498),lt(12),Q(3),Q(1),Q(0),Q(2),Q(17),Q(3),Q(17),Q(0),Q(63),Q(0);var D=0,z=0,V=0;M=0,C=7,this.encode.displayName="_encode_";for(var X,nt,it,ct,wt,_t,St,Tt,P,Nt=A.data,ae=A.width,Ht=A.height,bt=4*ae,Wt=0;Wt<Ht;){for(X=0;X<bt;){for(wt=bt*Wt+X,St=-1,Tt=0,P=0;P<64;P++)_t=wt+(Tt=P>>3)*bt+(St=4*(7&P)),Wt+Tt>=Ht&&(_t-=bt*(Wt+1+Tt-Ht)),X+St>=bt&&(_t-=X+St-bt+4),nt=Nt[_t++],it=Nt[_t++],ct=Nt[_t++],Y[P]=(xt[nt]+xt[it+256|0]+xt[ct+512|0]>>16)-128,K[P]=(xt[nt+768|0]+xt[it+1024|0]+xt[ct+1280|0]>>16)-128,tt[P]=(xt[nt+1280|0]+xt[it+1536|0]+xt[ct+1792|0]>>16)-128;D=At(Y,d,D,t,n),z=At(K,v,z,r,a),V=At(tt,v,V,r,a),X+=32}Wt+=8}if(C>=0){var Ct=[];Ct[1]=C+1,Ct[0]=(1<<C+1)-1,ut(Ct)}return lt(65497),new Uint8Array(j)},e=e||50,(function(){for(var A=String.fromCharCode,O=0;O<256;O++)gt[O]=A(O)})(),t=at(et,U),r=at(E,q),n=at(dt,_),a=at(T,rt),(function(){for(var A=1,O=2,D=1;D<=15;D++){for(var z=A;z<O;z++)N[32767+z]=D,y[32767+z]=[],y[32767+z][1]=D,y[32767+z][0]=z;for(var V=-(O-1);V<=-A;V++)N[32767+V]=D,y[32767+V]=[],y[32767+V][1]=D,y[32767+V][0]=O-1+V;A<<=1,O<<=1}})(),(function(){for(var A=0;A<256;A++)xt[A]=19595*A,xt[A+256|0]=38470*A,xt[A+512|0]=7471*A+32768,xt[A+768|0]=-11059*A,xt[A+1024|0]=-21709*A,xt[A+1280|0]=32768*A+8421375,xt[A+1536|0]=-27439*A,xt[A+1792|0]=-5329*A})(),mt(e)}/**
|
||
* @license
|
||
* Copyright (c) 2017 Aras Abbasi
|
||
*
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
*/function Kr(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Qu(e){function t(U){if(!U)throw Error("assert :P")}function r(U,dt,_){for(var E=0;4>E;E++)if(U[dt+E]!=_.charCodeAt(E))return!0;return!1}function n(U,dt,_,E,q){for(var T=0;T<q;T++)U[dt+T]=_[E+T]}function a(U,dt,_,E){for(var q=0;q<E;q++)U[dt+q]=_}function o(U){return new Int32Array(U)}function f(U,dt){for(var _=[],E=0;E<U;E++)_.push(new dt);return _}function u(U,dt){var _=[];return(function E(q,T,rt){for(var at=rt[T],ut=0;ut<at&&(q.push(rt.length>T+1?[]:new dt),!(rt.length<T+1));ut++)E(q[ut],T+1,rt)})(_,0,U),_}var h=function(){var U=this;function dt(i,s){for(var c=1<<s-1>>>0;i&c;)c>>>=1;return c?(i&c-1)+c:i}function _(i,s,c,p,b){t(!(p%c));do i[s+(p-=c)]=b;while(0<p)}function E(i,s,c,p,b){if(t(2328>=b),512>=b)var w=o(512);else if((w=o(b))==null)return 0;return(function(x,L,S,F,H,Z){var I,W,J=L,st=1<<S,$=o(16),ht=o(16);for(t(H!=0),t(F!=null),t(x!=null),t(0<S),W=0;W<H;++W){if(15<F[W])return 0;++$[F[W]]}if($[0]==H)return 0;for(ht[1]=0,I=1;15>I;++I){if($[I]>1<<I)return 0;ht[I+1]=ht[I]+$[I]}for(W=0;W<H;++W)I=F[W],0<F[W]&&(Z[ht[I]++]=W);if(ht[15]==1)return(F=new q).g=0,F.value=Z[0],_(x,J,1,st,F),st;var ft,yt=-1,vt=st-1,Mt=0,kt=1,ne=1,Et=1<<S;for(W=0,I=1,H=2;I<=S;++I,H<<=1){if(kt+=ne<<=1,0>(ne-=$[I]))return 0;for(;0<$[I];--$[I])(F=new q).g=I,F.value=Z[W++],_(x,J+Mt,H,Et,F),Mt=dt(Mt,I)}for(I=S+1,H=2;15>=I;++I,H<<=1){if(kt+=ne<<=1,0>(ne-=$[I]))return 0;for(;0<$[I];--$[I]){if(F=new q,(Mt&vt)!=yt){for(J+=Et,ft=1<<(yt=I)-S;15>yt&&!(0>=(ft-=$[yt]));)++yt,ft<<=1;st+=Et=1<<(ft=yt-S),x[L+(yt=Mt&vt)].g=ft+S,x[L+yt].value=J-L-yt}F.g=I-S,F.value=Z[W++],_(x,J+(Mt>>S),H,Et,F),Mt=dt(Mt,I)}}return kt!=2*ht[15]-1?0:st})(i,s,c,p,b,w)}function q(){this.value=this.g=0}function T(){this.value=this.g=0}function rt(){this.G=f(5,q),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=f(Bi,T)}function at(i,s,c,p){t(i!=null),t(s!=null),t(2147483648>p),i.Ca=254,i.I=0,i.b=-8,i.Ka=0,i.oa=s,i.pa=c,i.Jd=s,i.Yc=c+p,i.Zc=4<=p?c+p-4+1:c,nt(i)}function ut(i,s){for(var c=0;0<s--;)c|=ct(i,128)<<s;return c}function Q(i,s){var c=ut(i,s);return it(i)?-c:c}function lt(i,s,c,p){var b,w=0;for(t(i!=null),t(s!=null),t(4294967288>p),i.Sb=p,i.Ra=0,i.u=0,i.h=0,4<p&&(p=4),b=0;b<p;++b)w+=s[c+b]<<8*b;i.Ra=w,i.bb=p,i.oa=s,i.pa=c}function At(i){for(;8<=i.u&&i.bb<i.Sb;)i.Ra>>>=8,i.Ra+=i.oa[i.pa+i.bb]<<br-8>>>0,++i.bb,i.u-=8;z(i)&&(i.h=1,i.u=0)}function mt(i,s){if(t(0<=s),!i.h&&s<=fa){var c=D(i)&ui[s];return i.u+=s,At(i),c}return i.h=1,i.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function O(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function D(i){return i.Ra>>>(i.u&br-1)>>>0}function z(i){return t(i.bb<=i.Sb),i.h||i.bb==i.Sb&&i.u>br}function V(i,s){i.u=s,i.h=z(i)}function X(i){i.u>=Ar&&(t(i.u>=Ar),At(i))}function nt(i){t(i!=null&&i.oa!=null),i.pa<i.Zc?(i.I=(i.oa[i.pa++]|i.I<<8)>>>0,i.b+=8):(t(i!=null&&i.oa!=null),i.pa<i.Yc?(i.b+=8,i.I=i.oa[i.pa++]|i.I<<8):i.Ka?i.b=0:(i.I<<=8,i.b+=8,i.Ka=1))}function it(i){return ut(i,1)}function ct(i,s){var c=i.Ca;0>i.b&&nt(i);var p=i.b,b=c*s>>>8,w=(i.I>>>p>b)+0;for(w?(c-=b,i.I-=b+1<<p>>>0):c=b+1,p=c,b=0;256<=p;)b+=8,p>>=8;return p=7^b+Mi[p],i.b-=p,i.Ca=(c<<p)-1,w}function wt(i,s,c){i[s+0]=c>>24&255,i[s+1]=c>>16&255,i[s+2]=c>>8&255,i[s+3]=255&c}function _t(i,s){return i[s+0]|i[s+1]<<8}function St(i,s){return _t(i,s)|i[s+2]<<16}function Tt(i,s){return _t(i,s)|_t(i,s+2)<<16}function P(i,s){var c=1<<s;return t(i!=null),t(0<s),i.X=o(c),i.X==null?0:(i.Mb=32-s,i.Xa=s,1)}function Nt(i,s){t(i!=null),t(s!=null),t(i.Xa==s.Xa),n(s.X,0,i.X,0,1<<s.Xa)}function ae(){this.X=[],this.Xa=this.Mb=0}function Ht(i,s,c,p){t(c!=null),t(p!=null);var b=c[0],w=p[0];return b==0&&(b=(i*w+s/2)/s),w==0&&(w=(s*b+i/2)/i),0>=b||0>=w?0:(c[0]=b,p[0]=w,1)}function bt(i,s){return i+(1<<s)-1>>>s}function Wt(i,s){return((4278255360&i)+(4278255360&s)>>>0&4278255360)+((16711935&i)+(16711935&s)>>>0&16711935)>>>0}function Ct(i,s){U[s]=function(c,p,b,w,x,L,S){var F;for(F=0;F<x;++F){var H=U[i](L[S+F-1],b,w+F);L[S+F]=Wt(c[p+F],H)}}}function zt(){this.ud=this.hd=this.jd=0}function qt(i,s){return((4278124286&(i^s))>>>1)+(i&s)>>>0}function me(i){return 0<=i&&256>i?i:0>i?0:255<i?255:void 0}function he(i,s){return me(i+(i-s+.5>>1))}function Zt(i,s,c){return Math.abs(s-c)-Math.abs(i-c)}function fe(i,s,c,p,b,w,x){for(p=w[x-1],c=0;c<b;++c)w[x+c]=p=Wt(i[s+c],p)}function le(i,s,c,p,b){var w;for(w=0;w<c;++w){var x=i[s+w],L=x>>8&255,S=16711935&(S=(S=16711935&x)+((L<<16)+L));p[b+w]=(4278255360&x)+S>>>0}}function Bt(i,s){s.jd=255&i,s.hd=i>>8&255,s.ud=i>>16&255}function re(i,s,c,p,b,w){var x;for(x=0;x<p;++x){var L=s[c+x],S=L>>>8,F=L,H=255&(H=(H=L>>>16)+((i.jd<<24>>24)*(S<<24>>24)>>>5));F=255&(F=(F+=(i.hd<<24>>24)*(S<<24>>24)>>>5)+((i.ud<<24>>24)*(H<<24>>24)>>>5)),b[w+x]=(4278255360&L)+(H<<16)+F}}function Dt(i,s,c,p,b){U[s]=function(w,x,L,S,F,H,Z,I,W){for(S=Z;S<I;++S)for(Z=0;Z<W;++Z)F[H++]=b(L[p(w[x++])])},U[i]=function(w,x,L,S,F,H,Z){var I=8>>w.b,W=w.Ea,J=w.K[0],st=w.w;if(8>I)for(w=(1<<w.b)-1,st=(1<<I)-1;x<L;++x){var $,ht=0;for($=0;$<W;++$)$&w||(ht=p(S[F++])),H[Z++]=b(J[ht&st]),ht>>=I}else U["VP8LMapColor"+c](S,F,J,st,H,Z,x,L,W)}}function Ue(i,s,c,p,b){for(c=s+c;s<c;){var w=i[s++];p[b++]=w>>16&255,p[b++]=w>>8&255,p[b++]=255&w}}function ge(i,s,c,p,b){for(c=s+c;s<c;){var w=i[s++];p[b++]=w>>16&255,p[b++]=w>>8&255,p[b++]=255&w,p[b++]=w>>24&255}}function oe(i,s,c,p,b){for(c=s+c;s<c;){var w=(x=i[s++])>>16&240|x>>12&15,x=240&x|x>>28&15;p[b++]=w,p[b++]=x}}function se(i,s,c,p,b){for(c=s+c;s<c;){var w=(x=i[s++])>>16&248|x>>13&7,x=x>>5&224|x>>3&31;p[b++]=w,p[b++]=x}}function Ee(i,s,c,p,b){for(c=s+c;s<c;){var w=i[s++];p[b++]=255&w,p[b++]=w>>8&255,p[b++]=w>>16&255}}function Ut(i,s,c,p,b,w){if(w==0)for(c=s+c;s<c;)wt(p,((w=i[s++])[0]>>24|w[1]>>8&65280|w[2]<<8&16711680|w[3]<<24)>>>0),b+=32;else n(p,b,i,s,c)}function _e(i,s){U[s][0]=U[i+"0"],U[s][1]=U[i+"1"],U[s][2]=U[i+"2"],U[s][3]=U[i+"3"],U[s][4]=U[i+"4"],U[s][5]=U[i+"5"],U[s][6]=U[i+"6"],U[s][7]=U[i+"7"],U[s][8]=U[i+"8"],U[s][9]=U[i+"9"],U[s][10]=U[i+"10"],U[s][11]=U[i+"11"],U[s][12]=U[i+"12"],U[s][13]=U[i+"13"],U[s][14]=U[i+"0"],U[s][15]=U[i+"0"]}function Yt(i){return i==Wo||i==Vo||i==Ja||i==Go}function Qt(){this.eb=[],this.size=this.A=this.fb=0}function Oe(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ue(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Qt,this.f.kb=new Oe,this.sd=null}function Vt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function be(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Kn(i){return alert("todo:WebPSamplerProcessPlane"),i.T}function ur(i,s){var c=i.T,p=s.ba.f.RGBA,b=p.eb,w=p.fb+i.ka*p.A,x=Ur[s.ba.S],L=i.y,S=i.O,F=i.f,H=i.N,Z=i.ea,I=i.W,W=s.cc,J=s.dc,st=s.Mc,$=s.Nc,ht=i.ka,ft=i.ka+i.T,yt=i.U,vt=yt+1>>1;for(ht==0?x(L,S,null,null,F,H,Z,I,F,H,Z,I,b,w,null,null,yt):(x(s.ec,s.fc,L,S,W,J,st,$,F,H,Z,I,b,w-p.A,b,w,yt),++c);ht+2<ft;ht+=2)W=F,J=H,st=Z,$=I,H+=i.Rc,I+=i.Rc,w+=2*p.A,x(L,(S+=2*i.fa)-i.fa,L,S,W,J,st,$,F,H,Z,I,b,w-p.A,b,w,yt);return S+=i.fa,i.j+ft<i.o?(n(s.ec,s.fc,L,S,yt),n(s.cc,s.dc,F,H,vt),n(s.Mc,s.Nc,Z,I,vt),c--):1&ft||x(L,S,null,null,F,H,Z,I,F,H,Z,I,b,w+p.A,null,null,yt),c}function dn(i,s,c){var p=i.F,b=[i.J];if(p!=null){var w=i.U,x=s.ba.S,L=x==Ya||x==Ja;s=s.ba.f.RGBA;var S=[0],F=i.ka;S[0]=i.T,i.Kb&&(F==0?--S[0]:(--F,b[0]-=i.width),i.j+i.ka+i.T==i.o&&(S[0]=i.o-i.j-F));var H=s.eb;F=s.fb+F*s.A,i=Hs(p,b[0],i.width,w,S,H,F+(L?0:3),s.A),t(c==S),i&&Yt(x)&&ga(H,F,L,w,S,s.A)}return 0}function Qr(i){var s=i.ma,c=s.ba.S,p=11>c,b=c==Va||c==Ga||c==Ya||c==Ho||c==12||Yt(c);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!Tr(s.Oa,i,b?11:12))return 0;if(b&&Yt(c)&&xn(),i.da)alert("todo:use_scaling");else{if(p){if(s.Ib=Kn,i.Kb){if(c=i.U+1>>1,s.memory=o(i.U+2*c),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+i.U,s.Mc=s.cc,s.Nc=s.dc+c,s.Ib=ur,xn()}}else alert("todo:EmitYUV");b&&(s.Jb=dn,p&&Me())}if(p&&!au){for(i=0;256>i;++i)cl[i]=89858*(i-128)+Xa>>Ka,gl[i]=-22014*(i-128)+Xa,pl[i]=-45773*(i-128),dl[i]=113618*(i-128)+Xa>>Ka;for(i=ma;i<Ko;++i)s=76283*(i-16)+Xa>>Ka,vl[i-ma]=rn(s,255),ml[i-ma]=rn(s+8>>4,15);au=1}return 1}function Gt(i){var s=i.ma,c=i.U,p=i.T;return t(!(1&i.ka)),0>=c||0>=p?0:(c=s.Ib(i,s),s.Jb!=null&&s.Jb(i,s,c),s.Dc+=c,1)}function pn(i){i.ma.memory=null}function gn(i,s,c,p){return mt(i,8)!=47?0:(s[0]=mt(i,14)+1,c[0]=mt(i,14)+1,p[0]=mt(i,1),mt(i,3)!=0?0:!i.h)}function Br(i,s){if(4>i)return i+1;var c=i-2>>1;return(2+(1&i)<<c)+mt(s,c)+1}function Mr(i,s){return 120<s?s-120:1<=(c=((c=Zh[s-1])>>4)*i+(8-(15&c)))?c:1;var c}function De(i,s,c){var p=D(c),b=i[s+=255&p].g-8;return 0<b&&(V(c,c.u+8),p=D(c),s+=i[s].value,s+=p&(1<<b)-1),V(c,c.u+i[s].g),i[s].value}function er(i,s,c){return c.g+=i.g,c.value+=i.value<<s>>>0,t(8>=c.g),i.g}function nr(i,s,c){var p=i.xc;return t((s=p==0?0:i.vc[i.md*(c>>p)+(s>>p)])<i.Wb),i.Ya[s]}function Xn(i,s,c,p){var b=i.ab,w=i.c*s,x=i.C;s=x+s;var L=c,S=p;for(p=i.Ta,c=i.Ua;0<b--;){var F=i.gc[b],H=x,Z=s,I=L,W=S,J=(S=p,L=c,F.Ea);switch(t(H<Z),t(Z<=F.nc),F.hc){case 2:Di(I,W,(Z-H)*J,S,L);break;case 0:var st=H,$=Z,ht=S,ft=L,yt=(Et=F).Ea;st==0&&(Bn(I,W,null,null,1,ht,ft),fe(I,W+1,0,0,yt-1,ht,ft+1),W+=yt,ft+=yt,++st);for(var vt=1<<Et.b,Mt=vt-1,kt=bt(yt,Et.b),ne=Et.K,Et=Et.w+(st>>Et.b)*kt;st<$;){var ce=ne,Ze=Et,ie=1;for(Mn(I,W,ht,ft-yt,1,ht,ft);ie<yt;){var Ot=(ie&~Mt)+vt;Ot>yt&&(Ot=yt),(0,Vr[ce[Ze++]>>8&15])(I,W+ +ie,ht,ft+ie-yt,Ot-ie,ht,ft+ie),ie=Ot}W+=yt,ft+=yt,++st&Mt||(Et+=kt)}Z!=F.nc&&n(S,L-J,S,L+(Z-H-1)*J,J);break;case 1:for(J=I,$=W,yt=(I=F.Ea)-(ft=I&~(ht=(W=1<<F.b)-1)),st=bt(I,F.b),vt=F.K,F=F.w+(H>>F.b)*st;H<Z;){for(Mt=vt,kt=F,ne=new zt,Et=$+ft,ce=$+I;$<Et;)Bt(Mt[kt++],ne),li(ne,J,$,W,S,L),$+=W,L+=W;$<ce&&(Bt(Mt[kt++],ne),li(ne,J,$,yt,S,L),$+=yt,L+=yt),++H&ht||(F+=st)}break;case 3:if(I==S&&W==L&&0<F.b){for($=S,I=J=L+(Z-H)*J-(ft=(Z-H)*bt(F.Ea,F.b)),W=S,ht=L,st=[],ft=(yt=ft)-1;0<=ft;--ft)st[ft]=W[ht+ft];for(ft=yt-1;0<=ft;--ft)$[I+ft]=st[ft];hi(F,H,Z,S,J,S,L)}else hi(F,H,Z,I,W,S,L)}L=p,S=c}S!=c&&n(p,c,L,S,w)}function Fn(i,s){var c=i.V,p=i.Ba+i.c*i.C,b=s-i.C;if(t(s<=i.l.o),t(16>=b),0<b){var w=i.l,x=i.Ta,L=i.Ua,S=w.width;if(Xn(i,b,c,p),b=L=[L],t((c=i.C)<(p=s)),t(w.v<w.va),p>w.o&&(p=w.o),c<w.j){var F=w.j-c;c=w.j,b[0]+=F*S}if(c>=p?c=0:(b[0]+=4*w.v,w.ka=c-w.j,w.U=w.va-w.v,w.T=p-c,c=1),c){if(L=L[0],11>(c=i.ca).S){var H=c.f.RGBA,Z=(p=c.S,b=w.U,w=w.T,F=H.eb,H.A),I=w;for(H=H.fb+i.Ma*H.A;0<I--;){var W=x,J=L,st=b,$=F,ht=H;switch(p){case Wa:ca(W,J,st,$,ht);break;case Va:da(W,J,st,$,ht);break;case Wo:da(W,J,st,$,ht),ga($,ht,0,st,1,0);break;case Xs:ci(W,J,st,$,ht);break;case Ga:Ut(W,J,st,$,ht,1);break;case Vo:Ut(W,J,st,$,ht,1),ga($,ht,0,st,1,0);break;case Ya:Ut(W,J,st,$,ht,0);break;case Ja:Ut(W,J,st,$,ht,0),ga($,ht,1,st,1,0);break;case Ho:Ri(W,J,st,$,ht);break;case Go:Ri(W,J,st,$,ht),zs($,ht,st,1,0);break;case $s:fi(W,J,st,$,ht);break;default:t(0)}L+=S,H+=Z}i.Ma+=w}else alert("todo:EmitRescaledRowsYUVA");t(i.Ma<=c.height)}}i.C=s,t(i.C<=i.i)}function zr(i){var s;if(0<i.ua)return 0;for(s=0;s<i.Wb;++s){var c=i.Ya[s].G,p=i.Ya[s].H;if(0<c[1][p[1]+0].g||0<c[2][p[2]+0].g||0<c[3][p[3]+0].g)return 0}return 1}function tn(i,s,c,p,b,w){if(i.Z!=0){var x=i.qd,L=i.rd;for(t(qn[i.Z]!=null);s<c;++s)qn[i.Z](x,L,p,b,p,b,w),x=p,L=b,b+=w;i.qd=x,i.rd=L}}function Hr(i,s){var c=i.l.ma,p=c.Z==0||c.Z==1?i.l.j:i.C;if(p=i.C<p?p:i.C,t(s<=i.l.o),s>p){var b=i.l.width,w=c.ca,x=c.tb+b*p,L=i.V,S=i.Ba+i.c*p,F=i.gc;t(i.ab==1),t(F[0].hc==3),Uo(F[0],p,s,L,S,w,x),tn(c,p,s,w,x,b)}i.C=i.Ma=s}function Wr(i,s,c,p,b,w,x){var L=i.$/p,S=i.$%p,F=i.m,H=i.s,Z=c+i.$,I=Z;b=c+p*b;var W=c+p*w,J=280+H.ua,st=i.Pb?L:16777216,$=0<H.ua?H.Wa:null,ht=H.wc,ft=Z<W?nr(H,S,L):null;t(i.C<w),t(W<=b);var yt=!1;t:for(;;){for(;yt||Z<W;){var vt=0;if(L>=st){var Mt=Z-c;t((st=i).Pb),st.wd=st.m,st.xd=Mt,0<st.s.ua&&Nt(st.s.Wa,st.s.vb),st=L+tl}if(S&ht||(ft=nr(H,S,L)),t(ft!=null),ft.Qb&&(s[Z]=ft.qb,yt=!0),!yt)if(X(F),ft.jc){vt=F,Mt=s;var kt=Z,ne=ft.pd[D(vt)&Bi-1];t(ft.jc),256>ne.g?(V(vt,vt.u+ne.g),Mt[kt]=ne.value,vt=0):(V(vt,vt.u+ne.g-256),t(256<=ne.value),vt=ne.value),vt==0&&(yt=!0)}else vt=De(ft.G[0],ft.H[0],F);if(F.h)break;if(yt||256>vt){if(!yt)if(ft.nd)s[Z]=(ft.qb|vt<<8)>>>0;else{if(X(F),yt=De(ft.G[1],ft.H[1],F),X(F),Mt=De(ft.G[2],ft.H[2],F),kt=De(ft.G[3],ft.H[3],F),F.h)break;s[Z]=(kt<<24|yt<<16|vt<<8|Mt)>>>0}if(yt=!1,++Z,++S>=p&&(S=0,++L,x!=null&&L<=w&&!(L%16)&&x(i,L),$!=null))for(;I<Z;)vt=s[I++],$.X[(506832829*vt&4294967295)>>>$.Mb]=vt}else if(280>vt){if(vt=Br(vt-256,F),Mt=De(ft.G[4],ft.H[4],F),X(F),Mt=Mr(p,Mt=Br(Mt,F)),F.h)break;if(Z-c<Mt||b-Z<vt)break t;for(kt=0;kt<vt;++kt)s[Z+kt]=s[Z+kt-Mt];for(Z+=vt,S+=vt;S>=p;)S-=p,++L,x!=null&&L<=w&&!(L%16)&&x(i,L);if(t(Z<=b),S&ht&&(ft=nr(H,S,L)),$!=null)for(;I<Z;)vt=s[I++],$.X[(506832829*vt&4294967295)>>>$.Mb]=vt}else{if(!(vt<J))break t;for(yt=vt-280,t($!=null);I<Z;)vt=s[I++],$.X[(506832829*vt&4294967295)>>>$.Mb]=vt;vt=Z,t(!(yt>>>(Mt=$).Xa)),s[vt]=Mt.X[yt],yt=!0}yt||t(F.h==z(F))}if(i.Pb&&F.h&&Z<b)t(i.m.h),i.a=5,i.m=i.wd,i.$=i.xd,0<i.s.ua&&Nt(i.s.vb,i.s.Wa);else{if(F.h)break t;x?.(i,L>w?w:L),i.a=0,i.$=Z-c}return 1}return i.a=3,0}function Dr(i){t(i!=null),i.vc=null,i.yc=null,i.Ya=null;var s=i.Wa;s!=null&&(s.X=null),i.vb=null,t(i!=null)}function $n(){var i=new jt;return i==null?null:(i.a=0,i.xb=tu,_e("Predictor","VP8LPredictors"),_e("Predictor","VP8LPredictors_C"),_e("PredictorAdd","VP8LPredictorsAdd"),_e("PredictorAdd","VP8LPredictorsAdd_C"),Di=le,li=re,ca=Ue,da=ge,Ri=oe,fi=se,ci=Ee,U.VP8LMapColor32b=Xe,U.VP8LMapColor8b=un,i)}function en(i,s,c,p,b){var w=1,x=[i],L=[s],S=p.m,F=p.s,H=null,Z=0;t:for(;;){if(c)for(;w&&mt(S,1);){var I=x,W=L,J=p,st=1,$=J.m,ht=J.gc[J.ab],ft=mt($,2);if(J.Oc&1<<ft)w=0;else{switch(J.Oc|=1<<ft,ht.hc=ft,ht.Ea=I[0],ht.nc=W[0],ht.K=[null],++J.ab,t(4>=J.ab),ft){case 0:case 1:ht.b=mt($,3)+2,st=en(bt(ht.Ea,ht.b),bt(ht.nc,ht.b),0,J,ht.K),ht.K=ht.K[0];break;case 3:var yt,vt=mt($,8)+1,Mt=16<vt?0:4<vt?1:2<vt?2:3;if(I[0]=bt(ht.Ea,Mt),ht.b=Mt,yt=st=en(vt,1,0,J,ht.K)){var kt,ne=vt,Et=ht,ce=1<<(8>>Et.b),Ze=o(ce);if(Ze==null)yt=0;else{var ie=Et.K[0],Ot=Et.w;for(Ze[0]=Et.K[0][0],kt=1;kt<1*ne;++kt)Ze[kt]=Wt(ie[Ot+kt],Ze[kt-1]);for(;kt<4*ce;++kt)Ze[kt]=0;Et.K[0]=null,Et.K[0]=Ze,yt=1}}st=yt;break;case 2:break;default:t(0)}w=st}}if(x=x[0],L=L[0],w&&mt(S,1)&&!(w=1<=(Z=mt(S,4))&&11>=Z)){p.a=3;break t}var Lt;if(Lt=w)e:{var He,ee,pe,Ie=p,ar=x,yr=L,Re=Z,cr=c,wr=Ie.m,Qe=Ie.s,ve=[null],ye=1,Te=0,we=Qh[Re];r:for(;;){if(cr&&mt(wr,1)){var or=mt(wr,3)+2,Yr=bt(ar,or),We=bt(yr,or),Lr=Yr*We;if(!en(Yr,We,0,Ie,ve))break r;for(ve=ve[0],Qe.xc=or,He=0;He<Lr;++He){var Ne=ve[He]>>8&65535;ve[He]=Ne,Ne>=ye&&(ye=Ne+1)}}if(wr.h)break r;for(ee=0;5>ee;++ee){var tr=Zs[ee];!ee&&0<Re&&(tr+=1<<Re),Te<tr&&(Te=tr)}var kr=f(ye*we,q),xr=ye,Cr=f(xr,rt);if(Cr==null)var Fr=null;else t(65536>=xr),Fr=Cr;var Nr=o(Te);if(Fr==null||Nr==null||kr==null){Ie.a=1;break r}var Ir=kr;for(He=pe=0;He<ye;++He){var Ce=Fr[He],jr=Ce.G,Jr=Ce.H,di=0,Sn=1,sr=0;for(ee=0;5>ee;++ee){tr=Zs[ee],jr[ee]=Ir,Jr[ee]=pe,!ee&&0<Re&&(tr+=1<<Re);i:{var Za,Xo=tr,Qa=Ie,ba=Nr,wl=Ir,xl=pe,$o=0,Un=Qa.m,Al=mt(Un,1);if(a(ba,0,0,Xo),Al){var Ll=mt(Un,1)+1,Nl=mt(Un,1),uu=mt(Un,Nl==0?1:8);ba[uu]=1,Ll==2&&(ba[uu=mt(Un,8)]=1);var to=1}else{var hu=o(19),lu=mt(Un,4)+4;if(19<lu){Qa.a=3;var eo=0;break i}for(Za=0;Za<lu;++Za)hu[$h[Za]]=mt(Un,3);var Zo=void 0,ya=void 0,fu=Qa,Sl=hu,ro=Xo,cu=ba,Qo=0,zn=fu.m,du=8,pu=f(128,q);n:for(;E(pu,0,7,Sl,19);){if(mt(zn,1)){var _l=2+2*mt(zn,3);if((Zo=2+mt(zn,_l))>ro)break n}else Zo=ro;for(ya=0;ya<ro&&Zo--;){X(zn);var gu=pu[0+(127&D(zn))];V(zn,zn.u+gu.g);var Ui=gu.value;if(16>Ui)cu[ya++]=Ui,Ui!=0&&(du=Ui);else{var Pl=Ui==16,vu=Ui-16,kl=Kh[vu],mu=mt(zn,Jh[vu])+kl;if(ya+mu>ro)break n;for(var Cl=Pl?du:0;0<mu--;)cu[ya++]=Cl}}Qo=1;break n}Qo||(fu.a=3),to=Qo}(to=to&&!Un.h)&&($o=E(wl,xl,8,ba,Xo)),to&&$o!=0?eo=$o:(Qa.a=3,eo=0)}if(eo==0)break r;if(Sn&&Xh[ee]==1&&(Sn=Ir[pe].g==0),di+=Ir[pe].g,pe+=eo,3>=ee){var wa,ts=Nr[0];for(wa=1;wa<tr;++wa)Nr[wa]>ts&&(ts=Nr[wa]);sr+=ts}}if(Ce.nd=Sn,Ce.Qb=0,Sn&&(Ce.qb=(jr[3][Jr[3]+0].value<<24|jr[1][Jr[1]+0].value<<16|jr[2][Jr[2]+0].value)>>>0,di==0&&256>jr[0][Jr[0]+0].value&&(Ce.Qb=1,Ce.qb+=jr[0][Jr[0]+0].value<<8)),Ce.jc=!Ce.Qb&&6>sr,Ce.jc){var no,_n=Ce;for(no=0;no<Bi;++no){var Hn=no,Wn=_n.pd[Hn],io=_n.G[0][_n.H[0]+Hn];256<=io.value?(Wn.g=io.g+256,Wn.value=io.value):(Wn.g=0,Wn.value=0,Hn>>=er(io,8,Wn),Hn>>=er(_n.G[1][_n.H[1]+Hn],16,Wn),Hn>>=er(_n.G[2][_n.H[2]+Hn],0,Wn),er(_n.G[3][_n.H[3]+Hn],24,Wn))}}}Qe.vc=ve,Qe.Wb=ye,Qe.Ya=Fr,Qe.yc=kr,Lt=1;break e}Lt=0}if(!(w=Lt)){p.a=3;break t}if(0<Z){if(F.ua=1<<Z,!P(F.Wa,Z)){p.a=1,w=0;break t}}else F.ua=0;var es=p,bu=x,Fl=L,rs=es.s,ns=rs.xc;if(es.c=bu,es.i=Fl,rs.md=bt(bu,ns),rs.wc=ns==0?-1:(1<<ns)-1,c){p.xb=sl;break t}if((H=o(x*L))==null){p.a=1,w=0;break t}w=(w=Wr(p,H,0,x,L,L,null))&&!S.h;break t}return w?(b!=null?b[0]=H:(t(H==null),t(c)),p.$=0,c||Dr(F)):Dr(F),w}function Zn(i,s){var c=i.c*i.i,p=c+s+16*s;return t(i.c<=s),i.V=o(p),i.V==null?(i.Ta=null,i.Ua=0,i.a=1,0):(i.Ta=i.V,i.Ua=i.Ba+c+s,1)}function wi(i,s){var c=i.C,p=s-c,b=i.V,w=i.Ba+i.c*c;for(t(s<=i.l.o);0<p;){var x=16<p?16:p,L=i.l.ma,S=i.l.width,F=S*x,H=L.ca,Z=L.tb+S*c,I=i.Ta,W=i.Ua;Xn(i,x,b,w),Ws(I,W,H,Z,F),tn(L,c,c+x,H,Z,S),p-=x,b+=x*i.c,c+=x}t(c==s),i.C=i.Ma=s}function xi(){this.ub=this.yd=this.td=this.Rb=0}function Ai(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Lo(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Zi(){this.Yb=(function(){var i=[];return(function s(c,p,b){for(var w=b[p],x=0;x<w&&(c.push(b.length>p+1?[]:0),!(b.length<p+1));x++)s(c[x],p+1,b)})(i,0,[3,11]),i})()}function Sa(){this.jb=o(3),this.Wc=u([4,8],Zi),this.Xc=u([4,17],Zi)}function _a(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function Rr(){this.ld=this.La=this.dd=this.tc=0}function Qi(){this.Na=this.la=0}function Pa(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function ta(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ka(){this.uc=this.M=this.Nb=0,this.wa=Array(new Rr),this.Y=0,this.ya=Array(new ta),this.aa=0,this.l=new Li}function Ca(){this.y=o(16),this.f=o(8),this.ea=o(8)}function Fa(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new xi,this.Kc=new Ai,this.ed=new _a,this.Qa=new Lo,this.Ic=this.$c=this.Aa=0,this.D=new ka,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=f(8,A),this.ia=0,this.pb=f(4,Pa),this.Pa=new Sa,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ca),this.Hd=0,this.rb=Array(new Qi),this.sb=0,this.wa=Array(new Rr),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new ta),this.L=this.aa=0,this.gd=u([4,2],Rr),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function rn(i,s){return 0>i?0:i>s?s:i}function Li(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function No(){var i=new Fa;return i!=null&&(i.a=0,i.sc="OK",i.cb=0,i.Xb=0,va||(va=Ni)),i}function Je(i,s,c){return i.a==0&&(i.a=s,i.sc=c,i.cb=0),0}function Ia(i,s,c){return 3<=c&&i[s+0]==157&&i[s+1]==1&&i[s+2]==42}function nn(i,s){if(i==null)return 0;if(i.a=0,i.sc="OK",s==null)return Je(i,2,"null VP8Io passed to VP8GetHeaders()");var c=s.data,p=s.w,b=s.ha;if(4>b)return Je(i,7,"Truncated header.");var w=c[p+0]|c[p+1]<<8|c[p+2]<<16,x=i.Od;if(x.Rb=!(1&w),x.td=w>>1&7,x.yd=w>>4&1,x.ub=w>>5,3<x.td)return Je(i,3,"Incorrect keyframe parameters.");if(!x.yd)return Je(i,4,"Frame not displayable.");p+=3,b-=3;var L=i.Kc;if(x.Rb){if(7>b)return Je(i,7,"cannot parse picture header");if(!Ia(c,p,b))return Je(i,3,"Bad code word");L.c=16383&(c[p+4]<<8|c[p+3]),L.Td=c[p+4]>>6,L.i=16383&(c[p+6]<<8|c[p+5]),L.Ud=c[p+6]>>6,p+=7,b-=7,i.za=L.c+15>>4,i.Ub=L.i+15>>4,s.width=L.c,s.height=L.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,a((w=i.Pa).jb,0,255,w.jb.length),t((w=i.Qa)!=null),w.Cb=0,w.Bb=0,w.Fb=1,a(w.Zb,0,0,w.Zb.length),a(w.Lb,0,0,w.Lb)}if(x.ub>b)return Je(i,7,"bad partition length");at(w=i.m,c,p,x.ub),p+=x.ub,b-=x.ub,x.Rb&&(L.Ld=it(w),L.Kd=it(w)),L=i.Qa;var S,F=i.Pa;if(t(w!=null),t(L!=null),L.Cb=it(w),L.Cb){if(L.Bb=it(w),it(w)){for(L.Fb=it(w),S=0;4>S;++S)L.Zb[S]=it(w)?Q(w,7):0;for(S=0;4>S;++S)L.Lb[S]=it(w)?Q(w,6):0}if(L.Bb)for(S=0;3>S;++S)F.jb[S]=it(w)?ut(w,8):255}else L.Bb=0;if(w.Ka)return Je(i,3,"cannot parse segment header");if((L=i.ed).zd=it(w),L.Tb=ut(w,6),L.wb=ut(w,3),L.Pc=it(w),L.Pc&&it(w)){for(F=0;4>F;++F)it(w)&&(L.vd[F]=Q(w,6));for(F=0;4>F;++F)it(w)&&(L.od[F]=Q(w,6))}if(i.L=L.Tb==0?0:L.zd?1:2,w.Ka)return Je(i,3,"cannot parse filter header");var H=b;if(b=S=p,p=S+H,L=H,i.Xb=(1<<ut(i.m,2))-1,H<3*(F=i.Xb))c=7;else{for(S+=3*F,L-=3*F,H=0;H<F;++H){var Z=c[b+0]|c[b+1]<<8|c[b+2]<<16;Z>L&&(Z=L),at(i.Jc[+H],c,S,Z),S+=Z,L-=Z,b+=3}at(i.Jc[+F],c,S,L),c=S<p?0:5}if(c!=0)return Je(i,c,"cannot parse partitions");for(c=ut(S=i.m,7),b=it(S)?Q(S,4):0,p=it(S)?Q(S,4):0,L=it(S)?Q(S,4):0,F=it(S)?Q(S,4):0,S=it(S)?Q(S,4):0,H=i.Qa,Z=0;4>Z;++Z){if(H.Cb){var I=H.Zb[Z];H.Fb||(I+=c)}else{if(0<Z){i.pb[Z]=i.pb[0];continue}I=c}var W=i.pb[Z];W.Sc[0]=Yo[rn(I+b,127)],W.Sc[1]=Jo[rn(I+0,127)],W.Eb[0]=2*Yo[rn(I+p,127)],W.Eb[1]=101581*Jo[rn(I+L,127)]>>16,8>W.Eb[1]&&(W.Eb[1]=8),W.Qc[0]=Yo[rn(I+F,117)],W.Qc[1]=Jo[rn(I+S,127)],W.lc=I+S}if(!x.Rb)return Je(i,4,"Not a key frame.");for(it(w),x=i.Pa,c=0;4>c;++c){for(b=0;8>b;++b)for(p=0;3>p;++p)for(L=0;11>L;++L)F=ct(w,al[c][b][p][L])?ut(w,8):nl[c][b][p][L],x.Wc[c][b].Yb[p][L]=F;for(b=0;17>b;++b)x.Xc[c][b]=x.Wc[c][ol[b]]}return i.kc=it(w),i.kc&&(i.Bd=ut(w,8)),i.cb=1}function Ni(i,s,c,p,b,w,x){var L=s[b].Yb[c];for(c=0;16>b;++b){if(!ct(i,L[c+0]))return b;for(;!ct(i,L[c+1]);)if(L=s[++b].Yb[0],c=0,b==16)return 16;var S=s[b+1].Yb;if(ct(i,L[c+2])){var F=i,H=0;if(ct(F,(I=L)[(Z=c)+3]))if(ct(F,I[Z+6])){for(L=0,Z=2*(H=ct(F,I[Z+8]))+(I=ct(F,I[Z+9+H])),H=0,I=el[Z];I[L];++L)H+=H+ct(F,I[L]);H+=3+(8<<Z)}else ct(F,I[Z+7])?(H=7+2*ct(F,165),H+=ct(F,145)):H=5+ct(F,159);else H=ct(F,I[Z+4])?3+ct(F,I[Z+5]):2;L=S[2]}else H=1,L=S[1];S=x+rl[b],0>(F=i).b&&nt(F);var Z,I=F.b,W=(Z=F.Ca>>1)-(F.I>>I)>>31;--F.b,F.Ca+=W,F.Ca|=1,F.I-=(Z+1&W)<<I,w[S]=((H^W)-W)*p[(0<b)+0]}return 16}function ea(i){var s=i.rb[i.sb-1];s.la=0,s.Na=0,a(i.zc,0,0,i.zc.length),i.ja=0}function _r(i,s,c,p,b){b=i[s+c+32*p]+(b>>3),i[s+c+32*p]=-256&b?0>b?0:255:b}function Si(i,s,c,p,b,w){_r(i,s,0,c,p+b),_r(i,s,1,c,p+w),_r(i,s,2,c,p-w),_r(i,s,3,c,p-b)}function vn(i){return(20091*i>>16)+i}function ir(i,s,c,p){var b,w=0,x=o(16);for(b=0;4>b;++b){var L=i[s+0]+i[s+8],S=i[s+0]-i[s+8],F=(35468*i[s+4]>>16)-vn(i[s+12]),H=vn(i[s+4])+(35468*i[s+12]>>16);x[w+0]=L+H,x[w+1]=S+F,x[w+2]=S-F,x[w+3]=L-H,w+=4,s++}for(b=w=0;4>b;++b)L=(i=x[w+0]+4)+x[w+8],S=i-x[w+8],F=(35468*x[w+4]>>16)-vn(x[w+12]),_r(c,p,0,0,L+(H=vn(x[w+4])+(35468*x[w+12]>>16))),_r(c,p,1,0,S+F),_r(c,p,2,0,S-F),_r(c,p,3,0,L-H),w++,p+=32}function ja(i,s,c,p){var b=i[s+0]+4,w=35468*i[s+4]>>16,x=vn(i[s+4]),L=35468*i[s+1]>>16;Si(c,p,0,b+x,i=vn(i[s+1]),L),Si(c,p,1,b+w,i,L),Si(c,p,2,b-w,i,L),Si(c,p,3,b-x,i,L)}function So(i,s,c,p,b){ir(i,s,c,p),b&&ir(i,s+16,c,p+4)}function _o(i,s,c,p){An(i,s+0,c,p,1),An(i,s+32,c,p+128,1)}function Po(i,s,c,p){var b;for(i=i[s+0]+4,b=0;4>b;++b)for(s=0;4>s;++s)_r(c,p,s,b,i)}function an(i,s,c,p){i[s+0]&&fr(i,s+0,c,p),i[s+16]&&fr(i,s+16,c,p+4),i[s+32]&&fr(i,s+32,c,p+128),i[s+48]&&fr(i,s+48,c,p+128+4)}function Ea(i,s,c,p){var b,w=o(16);for(b=0;4>b;++b){var x=i[s+0+b]+i[s+12+b],L=i[s+4+b]+i[s+8+b],S=i[s+4+b]-i[s+8+b],F=i[s+0+b]-i[s+12+b];w[0+b]=x+L,w[8+b]=x-L,w[4+b]=F+S,w[12+b]=F-S}for(b=0;4>b;++b)x=(i=w[0+4*b]+3)+w[3+4*b],L=w[1+4*b]+w[2+4*b],S=w[1+4*b]-w[2+4*b],F=i-w[3+4*b],c[p+0]=x+L>>3,c[p+16]=F+S>>3,c[p+32]=x-L>>3,c[p+48]=F-S>>3,p+=64}function _i(i,s,c){var p,b=s-32,w=Pr,x=255-i[b-1];for(p=0;p<c;++p){var L,S=w,F=x+i[s-1];for(L=0;L<c;++L)i[s+L]=S[F+i[b+L]];s+=32}}function Pi(i,s){_i(i,s,4)}function ra(i,s){_i(i,s,8)}function ko(i,s){_i(i,s,16)}function Co(i,s){var c;for(c=0;16>c;++c)n(i,s+32*c,i,s-32,16)}function Fo(i,s){var c;for(c=16;0<c;--c)a(i,s,i[s-1],16),s+=32}function In(i,s,c){var p;for(p=0;16>p;++p)a(s,c+32*p,i,16)}function Oa(i,s){var c,p=16;for(c=0;16>c;++c)p+=i[s-1+32*c]+i[s+c-32];In(p>>5,i,s)}function jn(i,s){var c,p=8;for(c=0;16>c;++c)p+=i[s-1+32*c];In(p>>4,i,s)}function Io(i,s){var c,p=8;for(c=0;16>c;++c)p+=i[s+c-32];In(p>>4,i,s)}function Qn(i,s){In(128,i,s)}function Jt(i,s,c){return i+2*s+c+2>>2}function jo(i,s){var c,p=s-32;for(p=new Uint8Array([Jt(i[p-1],i[p+0],i[p+1]),Jt(i[p+0],i[p+1],i[p+2]),Jt(i[p+1],i[p+2],i[p+3]),Jt(i[p+2],i[p+3],i[p+4])]),c=0;4>c;++c)n(i,s+32*c,p,0,p.length)}function Eo(i,s){var c=i[s-1],p=i[s-1+32],b=i[s-1+64],w=i[s-1+96];wt(i,s+0,16843009*Jt(i[s-1-32],c,p)),wt(i,s+32,16843009*Jt(c,p,b)),wt(i,s+64,16843009*Jt(p,b,w)),wt(i,s+96,16843009*Jt(b,w,w))}function Oo(i,s){var c,p=4;for(c=0;4>c;++c)p+=i[s+c-32]+i[s-1+32*c];for(p>>=3,c=0;4>c;++c)a(i,s+32*c,p,4)}function Bo(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1-32],x=i[s+0-32],L=i[s+1-32],S=i[s+2-32],F=i[s+3-32];i[s+0+96]=Jt(p,b,i[s-1+96]),i[s+1+96]=i[s+0+64]=Jt(c,p,b),i[s+2+96]=i[s+1+64]=i[s+0+32]=Jt(w,c,p),i[s+3+96]=i[s+2+64]=i[s+1+32]=i[s+0+0]=Jt(x,w,c),i[s+3+64]=i[s+2+32]=i[s+1+0]=Jt(L,x,w),i[s+3+32]=i[s+2+0]=Jt(S,L,x),i[s+3+0]=Jt(F,S,L)}function Mo(i,s){var c=i[s+1-32],p=i[s+2-32],b=i[s+3-32],w=i[s+4-32],x=i[s+5-32],L=i[s+6-32],S=i[s+7-32];i[s+0+0]=Jt(i[s+0-32],c,p),i[s+1+0]=i[s+0+32]=Jt(c,p,b),i[s+2+0]=i[s+1+32]=i[s+0+64]=Jt(p,b,w),i[s+3+0]=i[s+2+32]=i[s+1+64]=i[s+0+96]=Jt(b,w,x),i[s+3+32]=i[s+2+64]=i[s+1+96]=Jt(w,x,L),i[s+3+64]=i[s+2+96]=Jt(x,L,S),i[s+3+96]=Jt(L,S,S)}function mn(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1-32],x=i[s+0-32],L=i[s+1-32],S=i[s+2-32],F=i[s+3-32];i[s+0+0]=i[s+1+64]=w+x+1>>1,i[s+1+0]=i[s+2+64]=x+L+1>>1,i[s+2+0]=i[s+3+64]=L+S+1>>1,i[s+3+0]=S+F+1>>1,i[s+0+96]=Jt(b,p,c),i[s+0+64]=Jt(p,c,w),i[s+0+32]=i[s+1+96]=Jt(c,w,x),i[s+1+32]=i[s+2+96]=Jt(w,x,L),i[s+2+32]=i[s+3+96]=Jt(x,L,S),i[s+3+32]=Jt(L,S,F)}function bn(i,s){var c=i[s+0-32],p=i[s+1-32],b=i[s+2-32],w=i[s+3-32],x=i[s+4-32],L=i[s+5-32],S=i[s+6-32],F=i[s+7-32];i[s+0+0]=c+p+1>>1,i[s+1+0]=i[s+0+64]=p+b+1>>1,i[s+2+0]=i[s+1+64]=b+w+1>>1,i[s+3+0]=i[s+2+64]=w+x+1>>1,i[s+0+32]=Jt(c,p,b),i[s+1+32]=i[s+0+96]=Jt(p,b,w),i[s+2+32]=i[s+1+96]=Jt(b,w,x),i[s+3+32]=i[s+2+96]=Jt(w,x,L),i[s+3+64]=Jt(x,L,S),i[s+3+96]=Jt(L,S,F)}function Do(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1+96];i[s+0+0]=c+p+1>>1,i[s+2+0]=i[s+0+32]=p+b+1>>1,i[s+2+32]=i[s+0+64]=b+w+1>>1,i[s+1+0]=Jt(c,p,b),i[s+3+0]=i[s+1+32]=Jt(p,b,w),i[s+3+32]=i[s+1+64]=Jt(b,w,w),i[s+3+64]=i[s+2+64]=i[s+0+96]=i[s+1+96]=i[s+2+96]=i[s+3+96]=w}function Ro(i,s){var c=i[s-1+0],p=i[s-1+32],b=i[s-1+64],w=i[s-1+96],x=i[s-1-32],L=i[s+0-32],S=i[s+1-32],F=i[s+2-32];i[s+0+0]=i[s+2+32]=c+x+1>>1,i[s+0+32]=i[s+2+64]=p+c+1>>1,i[s+0+64]=i[s+2+96]=b+p+1>>1,i[s+0+96]=w+b+1>>1,i[s+3+0]=Jt(L,S,F),i[s+2+0]=Jt(x,L,S),i[s+1+0]=i[s+3+32]=Jt(c,x,L),i[s+1+32]=i[s+3+64]=Jt(p,c,x),i[s+1+64]=i[s+3+96]=Jt(b,p,c),i[s+1+96]=Jt(w,b,p)}function ki(i,s){var c;for(c=0;8>c;++c)n(i,s+32*c,i,s-32,8)}function na(i,s){var c;for(c=0;8>c;++c)a(i,s,i[s-1],8),s+=32}function on(i,s,c){var p;for(p=0;8>p;++p)a(s,c+32*p,i,8)}function To(i,s){var c,p=8;for(c=0;8>c;++c)p+=i[s+c-32]+i[s-1+32*c];on(p>>4,i,s)}function Ci(i,s){var c,p=4;for(c=0;8>c;++c)p+=i[s+c-32];on(p>>3,i,s)}function qo(i,s){var c,p=4;for(c=0;8>c;++c)p+=i[s-1+32*c];on(p>>3,i,s)}function ia(i,s){on(128,i,s)}function En(i,s,c){var p=i[s-c],b=i[s+0],w=3*(b-p)+zo[1020+i[s-2*c]-i[s+c]],x=Ha[112+(w+4>>3)];i[s-c]=Pr[255+p+Ha[112+(w+3>>3)]],i[s+0]=Pr[255+b-x]}function aa(i,s,c,p){var b=i[s+0],w=i[s+c];return qr[255+i[s-2*c]-i[s-c]]>p||qr[255+w-b]>p}function ti(i,s,c,p){return 4*qr[255+i[s-c]-i[s+0]]+qr[255+i[s-2*c]-i[s+c]]<=p}function oa(i,s,c,p,b){var w=i[s-3*c],x=i[s-2*c],L=i[s-c],S=i[s+0],F=i[s+c],H=i[s+2*c],Z=i[s+3*c];return 4*qr[255+L-S]+qr[255+x-F]>p?0:qr[255+i[s-4*c]-w]<=b&&qr[255+w-x]<=b&&qr[255+x-L]<=b&&qr[255+Z-H]<=b&&qr[255+H-F]<=b&&qr[255+F-S]<=b}function Fi(i,s,c,p){var b=2*p+1;for(p=0;16>p;++p)ti(i,s+p,c,b)&&En(i,s+p,c)}function sa(i,s,c,p){var b=2*p+1;for(p=0;16>p;++p)ti(i,s+p*c,1,b)&&En(i,s+p*c,1)}function Ii(i,s,c,p){var b;for(b=3;0<b;--b)Fi(i,s+=4*c,c,p)}function Ba(i,s,c,p){var b;for(b=3;0<b;--b)sa(i,s+=4,c,p)}function yn(i,s,c,p,b,w,x,L){for(w=2*w+1;0<b--;){if(oa(i,s,c,w,x))if(aa(i,s,c,L))En(i,s,c);else{var S=i,F=s,H=c,Z=S[F-2*H],I=S[F-H],W=S[F+0],J=S[F+H],st=S[F+2*H],$=27*(ft=zo[1020+3*(W-I)+zo[1020+Z-J]])+63>>7,ht=18*ft+63>>7,ft=9*ft+63>>7;S[F-3*H]=Pr[255+S[F-3*H]+ft],S[F-2*H]=Pr[255+Z+ht],S[F-H]=Pr[255+I+$],S[F+0]=Pr[255+W-$],S[F+H]=Pr[255+J-ht],S[F+2*H]=Pr[255+st-ft]}s+=p}}function wn(i,s,c,p,b,w,x,L){for(w=2*w+1;0<b--;){if(oa(i,s,c,w,x))if(aa(i,s,c,L))En(i,s,c);else{var S=i,F=s,H=c,Z=S[F-H],I=S[F+0],W=S[F+H],J=Ha[112+(4+(st=3*(I-Z))>>3)],st=Ha[112+(st+3>>3)],$=J+1>>1;S[F-2*H]=Pr[255+S[F-2*H]+$],S[F-H]=Pr[255+Z+st],S[F+0]=Pr[255+I-J],S[F+H]=Pr[255+W-$]}s+=p}}function Ma(i,s,c,p,b,w){yn(i,s,c,1,16,p,b,w)}function Da(i,s,c,p,b,w){yn(i,s,1,c,16,p,b,w)}function Ra(i,s,c,p,b,w){var x;for(x=3;0<x;--x)wn(i,s+=4*c,c,1,16,p,b,w)}function ei(i,s,c,p,b,w){var x;for(x=3;0<x;--x)wn(i,s+=4,1,c,16,p,b,w)}function Ta(i,s,c,p,b,w,x,L){yn(i,s,b,1,8,w,x,L),yn(c,p,b,1,8,w,x,L)}function l(i,s,c,p,b,w,x,L){yn(i,s,1,b,8,w,x,L),yn(c,p,1,b,8,w,x,L)}function m(i,s,c,p,b,w,x,L){wn(i,s+4*b,b,1,8,w,x,L),wn(c,p+4*b,b,1,8,w,x,L)}function k(i,s,c,p,b,w,x,L){wn(i,s+4,1,b,8,w,x,L),wn(c,p+4,1,b,8,w,x,L)}function R(){this.ba=new ue,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new be,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function G(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ot(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function pt(){this.ua=0,this.Wa=new ae,this.vb=new ae,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new rt,this.yc=new q}function jt(){this.xb=this.a=0,this.l=new Li,this.ca=new ue,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new O,this.Pb=0,this.wd=new O,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new pt,this.ab=0,this.gc=f(4,ot),this.Oc=0}function It(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Li,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Xt(i,s,c,p,b,w,x){for(i=i==null?0:i[s+0],s=0;s<x;++s)b[w+s]=i+c[p+s]&255,i=b[w+s]}function te(i,s,c,p,b,w,x){var L;if(i==null)Xt(null,null,c,p,b,w,x);else for(L=0;L<x;++L)b[w+L]=i[s+L]+c[p+L]&255}function de(i,s,c,p,b,w,x){if(i==null)Xt(null,null,c,p,b,w,x);else{var L,S=i[s+0],F=S,H=S;for(L=0;L<x;++L)F=H+(S=i[s+L])-F,H=c[p+L]+(-256&F?0>F?0:255:F)&255,F=S,b[w+L]=H}}function Ke(i,s,c,p){var b=s.width,w=s.o;if(t(i!=null&&s!=null),0>c||0>=p||c+p>w)return null;if(!i.Cc){if(i.ga==null){var x;if(i.ga=new It,(x=i.ga==null)||(x=s.width*s.o,t(i.Gb.length==0),i.Gb=o(x),i.Uc=0,i.Gb==null?x=0:(i.mb=i.Gb,i.nb=i.Uc,i.rc=null,x=1),x=!x),!x){x=i.ga;var L=i.Fa,S=i.P,F=i.qc,H=i.mb,Z=i.nb,I=S+1,W=F-1,J=x.l;if(t(L!=null&&H!=null&&s!=null),qn[0]=null,qn[1]=Xt,qn[2]=te,qn[3]=de,x.ca=H,x.tb=Z,x.c=s.width,x.i=s.height,t(0<x.c&&0<x.i),1>=F)s=0;else if(x.$a=3&L[S+0],x.Z=L[S+0]>>2&3,x.Lc=L[S+0]>>4&3,S=L[S+0]>>6&3,0>x.$a||1<x.$a||4<=x.Z||1<x.Lc||S)s=0;else if(J.put=Gt,J.ac=Qr,J.bc=pn,J.ma=x,J.width=s.width,J.height=s.height,J.Da=s.Da,J.v=s.v,J.va=s.va,J.j=s.j,J.o=s.o,x.$a)t:{t(x.$a==1),s=$n();e:for(;;){if(s==null){s=0;break t}if(t(x!=null),x.mc=s,s.c=x.c,s.i=x.i,s.l=x.l,s.l.ma=x,s.l.width=x.c,s.l.height=x.i,s.a=0,lt(s.m,L,I,W),!en(x.c,x.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&zr(s.s)?(x.ic=1,L=s.c*s.i,s.Ta=null,s.Ua=0,s.V=o(L),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(x.ic=0,s=Zn(s,x.c)),!s))break e;s=1;break t}x.mc=null,s=0}else s=W>=x.c*x.i;x=!s}if(x)return null;i.ga.Lc!=1?i.Ga=0:p=w-c}t(i.ga!=null),t(c+p<=w);t:{if(s=(L=i.ga).c,w=L.l.o,L.$a==0){if(I=i.rc,W=i.Vc,J=i.Fa,S=i.P+1+c*s,F=i.mb,H=i.nb+c*s,t(S<=i.P+i.qc),L.Z!=0)for(t(qn[L.Z]!=null),x=0;x<p;++x)qn[L.Z](I,W,J,S,F,H,s),I=F,W=H,H+=s,S+=s;else for(x=0;x<p;++x)n(F,H,J,S,s),I=F,W=H,H+=s,S+=s;i.rc=I,i.Vc=W}else{if(t(L.mc!=null),s=c+p,t((x=L.mc)!=null),t(s<=x.i),x.C>=s)s=1;else if(L.ic||Me(),L.ic){L=x.V,I=x.Ba,W=x.c;var st=x.i,$=(J=1,S=x.$/W,F=x.$%W,H=x.m,Z=x.s,x.$),ht=W*st,ft=W*s,yt=Z.wc,vt=$<ft?nr(Z,F,S):null;t($<=ht),t(s<=st),t(zr(Z));e:for(;;){for(;!H.h&&$<ft;){if(F&yt||(vt=nr(Z,F,S)),t(vt!=null),X(H),256>(st=De(vt.G[0],vt.H[0],H)))L[I+$]=st,++$,++F>=W&&(F=0,++S<=s&&!(S%16)&&Hr(x,S));else{if(!(280>st)){J=0;break e}st=Br(st-256,H);var Mt,kt=De(vt.G[4],vt.H[4],H);if(X(H),!($>=(kt=Mr(W,kt=Br(kt,H)))&&ht-$>=st)){J=0;break e}for(Mt=0;Mt<st;++Mt)L[I+$+Mt]=L[I+$+Mt-kt];for($+=st,F+=st;F>=W;)F-=W,++S<=s&&!(S%16)&&Hr(x,S);$<ft&&F&yt&&(vt=nr(Z,F,S))}t(H.h==z(H))}Hr(x,S>s?s:S);break e}!J||H.h&&$<ht?(J=0,x.a=H.h?5:3):x.$=$,s=J}else s=Wr(x,x.V,x.Ba,x.c,x.i,s,wi);if(!s){p=0;break t}}c+p>=w&&(i.Cc=1),p=1}if(!p)return null;if(i.Cc&&((p=i.ga)!=null&&(p.mc=null),i.ga=null,0<i.Ga))return alert("todo:WebPDequantizeLevels"),null}return i.nb+c*b}function Le(i,s,c,p,b,w){for(;0<b--;){var x,L=i,S=s+(c?1:0),F=i,H=s+(c?0:3);for(x=0;x<p;++x){var Z=F[H+4*x];Z!=255&&(Z*=32897,L[S+4*x+0]=L[S+4*x+0]*Z>>23,L[S+4*x+1]=L[S+4*x+1]*Z>>23,L[S+4*x+2]=L[S+4*x+2]*Z>>23)}s+=w}}function Ae(i,s,c,p,b){for(;0<p--;){var w;for(w=0;w<c;++w){var x=i[s+2*w+0],L=15&(F=i[s+2*w+1]),S=4369*L,F=(240&F|F>>4)*S>>16;i[s+2*w+0]=(240&x|x>>4)*S>>16&240|(15&x|x<<4)*S>>16>>4&15,i[s+2*w+1]=240&F|L}s+=b}}function Fe(i,s,c,p,b,w,x,L){var S,F,H=255;for(F=0;F<b;++F){for(S=0;S<p;++S){var Z=i[s+S];w[x+4*S]=Z,H&=Z}s+=c,x+=L}return H!=255}function Be(i,s,c,p,b){var w;for(w=0;w<b;++w)c[p+w]=i[s+w]>>8}function Me(){ga=Le,zs=Ae,Hs=Fe,Ws=Be}function hr(i,s,c){U[i]=function(p,b,w,x,L,S,F,H,Z,I,W,J,st,$,ht,ft,yt){var vt,Mt=yt-1>>1,kt=L[S+0]|F[H+0]<<16,ne=Z[I+0]|W[J+0]<<16;t(p!=null);var Et=3*kt+ne+131074>>2;for(s(p[b+0],255&Et,Et>>16,st,$),w!=null&&(Et=3*ne+kt+131074>>2,s(w[x+0],255&Et,Et>>16,ht,ft)),vt=1;vt<=Mt;++vt){var ce=L[S+vt]|F[H+vt]<<16,Ze=Z[I+vt]|W[J+vt]<<16,ie=kt+ce+ne+Ze+524296,Ot=ie+2*(ce+ne)>>3;Et=Ot+kt>>1,kt=(ie=ie+2*(kt+Ze)>>3)+ce>>1,s(p[b+2*vt-1],255&Et,Et>>16,st,$+(2*vt-1)*c),s(p[b+2*vt-0],255&kt,kt>>16,st,$+(2*vt-0)*c),w!=null&&(Et=ie+ne>>1,kt=Ot+Ze>>1,s(w[x+2*vt-1],255&Et,Et>>16,ht,ft+(2*vt-1)*c),s(w[x+2*vt+0],255&kt,kt>>16,ht,ft+(2*vt+0)*c)),kt=ce,ne=Ze}1&yt||(Et=3*kt+ne+131074>>2,s(p[b+yt-1],255&Et,Et>>16,st,$+(yt-1)*c),w!=null&&(Et=3*ne+kt+131074>>2,s(w[x+yt-1],255&Et,Et>>16,ht,ft+(yt-1)*c)))}}function xn(){Ur[Wa]=ul,Ur[Va]=eu,Ur[Xs]=hl,Ur[Ga]=ru,Ur[Ya]=nu,Ur[Ho]=iu,Ur[$s]=ll,Ur[Wo]=eu,Ur[Vo]=ru,Ur[Ja]=nu,Ur[Go]=iu}function ua(i){return i&-16384?0>i?0:255:i>>fl}function ri(i,s){return ua((19077*i>>8)+(26149*s>>8)-14234)}function ni(i,s,c){return ua((19077*i>>8)-(6419*s>>8)-(13320*c>>8)+8708)}function On(i,s){return ua((19077*i>>8)+(33050*s>>8)-17685)}function ii(i,s,c,p,b){p[b+0]=ri(i,c),p[b+1]=ni(i,s,c),p[b+2]=On(i,s)}function ji(i,s,c,p,b){p[b+0]=On(i,s),p[b+1]=ni(i,s,c),p[b+2]=ri(i,c)}function Ei(i,s,c,p,b){var w=ni(i,s,c);s=w<<3&224|On(i,s)>>3,p[b+0]=248&ri(i,c)|w>>5,p[b+1]=s}function lr(i,s,c,p,b){var w=240&On(i,s)|15;p[b+0]=240&ri(i,c)|ni(i,s,c)>>4,p[b+1]=w}function ai(i,s,c,p,b){p[b+0]=255,ii(i,s,c,p,b+1)}function oi(i,s,c,p,b){ji(i,s,c,p,b),p[b+3]=255}function ha(i,s,c,p,b){ii(i,s,c,p,b),p[b+3]=255}function sn(i,s,c){U[i]=function(p,b,w,x,L,S,F,H,Z){for(var I=H+(-2&Z)*c;H!=I;)s(p[b+0],w[x+0],L[S+0],F,H),s(p[b+1],w[x+0],L[S+0],F,H+c),b+=2,++x,++S,H+=2*c;1&Z&&s(p[b+0],w[x+0],L[S+0],F,H)}}function mr(i,s,c){return c==0?i==0?s==0?6:5:s==0?4:0:c}function qa(i,s,c,p,b){switch(i>>>30){case 3:An(s,c,p,b,0);break;case 2:Rn(s,c,p,b);break;case 1:fr(s,c,p,b)}}function Oi(i,s){var c,p,b=s.M,w=s.Nb,x=i.oc,L=i.pc+40,S=i.oc,F=i.pc+584,H=i.oc,Z=i.pc+600;for(c=0;16>c;++c)x[L+32*c-1]=129;for(c=0;8>c;++c)S[F+32*c-1]=129,H[Z+32*c-1]=129;for(0<b?x[L-1-32]=S[F-1-32]=H[Z-1-32]=129:(a(x,L-32-1,127,21),a(S,F-32-1,127,9),a(H,Z-32-1,127,9)),p=0;p<i.za;++p){var I=s.ya[s.aa+p];if(0<p){for(c=-1;16>c;++c)n(x,L+32*c-4,x,L+32*c+12,4);for(c=-1;8>c;++c)n(S,F+32*c-4,S,F+32*c+4,4),n(H,Z+32*c-4,H,Z+32*c+4,4)}var W=i.Gd,J=i.Hd+p,st=I.ad,$=I.Hc;if(0<b&&(n(x,L-32,W[J].y,0,16),n(S,F-32,W[J].f,0,8),n(H,Z-32,W[J].ea,0,8)),I.Za){var ht=x,ft=L-32+16;for(0<b&&(p>=i.za-1?a(ht,ft,W[J].y[15],4):n(ht,ft,W[J+1].y,0,4)),c=0;4>c;c++)ht[ft+128+c]=ht[ft+256+c]=ht[ft+384+c]=ht[ft+0+c];for(c=0;16>c;++c,$<<=2)ht=x,ft=L+ou[c],Gr[I.Ob[c]](ht,ft),qa($,st,16*+c,ht,ft)}else if(ht=mr(p,b,I.Ob[0]),Tn[ht](x,L),$!=0)for(c=0;16>c;++c,$<<=2)qa($,st,16*+c,x,L+ou[c]);for(c=I.Gc,ht=mr(p,b,I.Dd),Nn[ht](S,F),Nn[ht](H,Z),$=st,ht=S,ft=F,255&(I=0|c)&&(170&I?Ti($,256,ht,ft):hn($,256,ht,ft)),I=H,$=Z,255&(c>>=8)&&(170&c?Ti(st,320,I,$):hn(st,320,I,$)),b<i.Ub-1&&(n(W[J].y,0,x,L+480,16),n(W[J].f,0,S,F+224,8),n(W[J].ea,0,H,Z+224,8)),c=8*w*i.B,W=i.sa,J=i.ta+16*p+16*w*i.R,st=i.qa,I=i.ra+8*p+c,$=i.Ha,ht=i.Ia+8*p+c,c=0;16>c;++c)n(W,J+c*i.R,x,L+32*c,16);for(c=0;8>c;++c)n(st,I+c*i.B,S,F+32*c,8),n($,ht+c*i.B,H,Z+32*c,8)}}function Ua(i,s,c,p,b,w,x,L,S){var F=[0],H=[0],Z=0,I=S!=null?S.kd:0,W=S??new G;if(i==null||12>c)return 7;W.data=i,W.w=s,W.ha=c,s=[s],c=[c],W.gb=[W.gb];t:{var J=s,st=c,$=W.gb;if(t(i!=null),t(st!=null),t($!=null),$[0]=0,12<=st[0]&&!r(i,J[0],"RIFF")){if(r(i,J[0]+8,"WEBP")){$=3;break t}var ht=Tt(i,J[0]+4);if(12>ht||4294967286<ht){$=3;break t}if(I&&ht>st[0]-8){$=7;break t}$[0]=ht,J[0]+=12,st[0]-=12}$=0}if($!=0)return $;for(ht=0<W.gb[0],c=c[0];;){t:{var ft=i;st=s,$=c;var yt=F,vt=H,Mt=J=[0];if((Et=Z=[Z])[0]=0,8>$[0])$=7;else{if(!r(ft,st[0],"VP8X")){if(Tt(ft,st[0]+4)!=10){$=3;break t}if(18>$[0]){$=7;break t}var kt=Tt(ft,st[0]+8),ne=1+St(ft,st[0]+12);if(2147483648<=ne*(ft=1+St(ft,st[0]+15))){$=3;break t}Mt!=null&&(Mt[0]=kt),yt!=null&&(yt[0]=ne),vt!=null&&(vt[0]=ft),st[0]+=18,$[0]-=18,Et[0]=1}$=0}}if(Z=Z[0],J=J[0],$!=0)return $;if(st=!!(2&J),!ht&&Z)return 3;if(w!=null&&(w[0]=!!(16&J)),x!=null&&(x[0]=st),L!=null&&(L[0]=0),x=F[0],J=H[0],Z&&st&&S==null){$=0;break}if(4>c){$=7;break}if(ht&&Z||!ht&&!Z&&!r(i,s[0],"ALPH")){c=[c],W.na=[W.na],W.P=[W.P],W.Sa=[W.Sa];t:{kt=i,$=s,ht=c;var Et=W.gb;yt=W.na,vt=W.P,Mt=W.Sa,ne=22,t(kt!=null),t(ht!=null),ft=$[0];var ce=ht[0];for(t(yt!=null),t(Mt!=null),yt[0]=null,vt[0]=null,Mt[0]=0;;){if($[0]=ft,ht[0]=ce,8>ce){$=7;break t}var Ze=Tt(kt,ft+4);if(4294967286<Ze){$=3;break t}var ie=8+Ze+1&-2;if(ne+=ie,0<Et&&ne>Et){$=3;break t}if(!r(kt,ft,"VP8 ")||!r(kt,ft,"VP8L")){$=0;break t}if(ce[0]<ie){$=7;break t}r(kt,ft,"ALPH")||(yt[0]=kt,vt[0]=ft+8,Mt[0]=Ze),ft+=ie,ce-=ie}}if(c=c[0],W.na=W.na[0],W.P=W.P[0],W.Sa=W.Sa[0],$!=0)break}c=[c],W.Ja=[W.Ja],W.xa=[W.xa];t:if(Et=i,$=s,ht=c,yt=W.gb[0],vt=W.Ja,Mt=W.xa,kt=$[0],ft=!r(Et,kt,"VP8 "),ne=!r(Et,kt,"VP8L"),t(Et!=null),t(ht!=null),t(vt!=null),t(Mt!=null),8>ht[0])$=7;else{if(ft||ne){if(Et=Tt(Et,kt+4),12<=yt&&Et>yt-12){$=3;break t}if(I&&Et>ht[0]-8){$=7;break t}vt[0]=Et,$[0]+=8,ht[0]-=8,Mt[0]=ne}else Mt[0]=5<=ht[0]&&Et[kt+0]==47&&!(Et[kt+4]>>5),vt[0]=ht[0];$=0}if(c=c[0],W.Ja=W.Ja[0],W.xa=W.xa[0],s=s[0],$!=0)break;if(4294967286<W.Ja)return 3;if(L==null||st||(L[0]=W.xa?2:1),x=[x],J=[J],W.xa){if(5>c){$=7;break}L=x,I=J,st=w,i==null||5>c?i=0:5<=c&&i[s+0]==47&&!(i[s+4]>>5)?(ht=[0],Et=[0],yt=[0],lt(vt=new O,i,s,c),gn(vt,ht,Et,yt)?(L!=null&&(L[0]=ht[0]),I!=null&&(I[0]=Et[0]),st!=null&&(st[0]=yt[0]),i=1):i=0):i=0}else{if(10>c){$=7;break}L=J,i==null||10>c||!Ia(i,s+3,c-3)?i=0:(I=i[s+0]|i[s+1]<<8|i[s+2]<<16,st=16383&(i[s+7]<<8|i[s+6]),i=16383&(i[s+9]<<8|i[s+8]),1&I||3<(I>>1&7)||!(I>>4&1)||I>>5>=W.Ja||!st||!i?i=0:(x&&(x[0]=st),L&&(L[0]=i),i=1))}if(!i||(x=x[0],J=J[0],Z&&(F[0]!=x||H[0]!=J)))return 3;S!=null&&(S[0]=W,S.offset=s-S.w,t(4294967286>s-S.w),t(S.offset==S.ha-c));break}return $==0||$==7&&Z&&S==null?(w!=null&&(w[0]|=W.na!=null&&0<W.na.length),p!=null&&(p[0]=x),b!=null&&(b[0]=J),0):$}function Tr(i,s,c){var p=s.width,b=s.height,w=0,x=0,L=p,S=b;if(s.Da=i!=null&&0<i.Da,s.Da&&(L=i.cd,S=i.bd,w=i.v,x=i.j,11>c||(w&=-2,x&=-2),0>w||0>x||0>=L||0>=S||w+L>p||x+S>b))return 0;if(s.v=w,s.j=x,s.va=w+L,s.o=x+S,s.U=L,s.T=S,s.da=i!=null&&0<i.da,s.da){if(!Ht(L,S,c=[i.ib],w=[i.hb]))return 0;s.ib=c[0],s.hb=w[0]}return s.ob=i!=null&&i.ob,s.Kb=i==null||!i.Sd,s.da&&(s.ob=s.ib<3*p/4&&s.hb<3*b/4,s.Kb=0),1}function si(i){if(i==null)return 2;if(11>i.S){var s=i.f.RGBA;s.fb+=(i.height-1)*s.A,s.A=-s.A}else s=i.f.kb,i=i.height,s.O+=(i-1)*s.fa,s.fa=-s.fa,s.N+=(i-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(i-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(i-1)*s.lb,s.lb=-s.lb);return 0}function la(i,s,c,p){if(p==null||0>=i||0>=s)return 2;if(c!=null){if(c.Da){var b=c.cd,w=c.bd,x=-2&c.v,L=-2&c.j;if(0>x||0>L||0>=b||0>=w||x+b>i||L+w>s)return 2;i=b,s=w}if(c.da){if(!Ht(i,s,b=[c.ib],w=[c.hb]))return 2;i=b[0],s=w[0]}}p.width=i,p.height=s;t:{var S=p.width,F=p.height;if(i=p.S,0>=S||0>=F||!(i>=Wa&&13>i))i=2;else{if(0>=p.Rd&&p.sd==null){x=w=b=s=0;var H=(L=S*su[i])*F;if(11>i||(w=(F+1)/2*(s=(S+1)/2),i==12&&(x=(b=S)*F)),(F=o(H+2*w+x))==null){i=1;break t}p.sd=F,11>i?((S=p.f.RGBA).eb=F,S.fb=0,S.A=L,S.size=H):((S=p.f.kb).y=F,S.O=0,S.fa=L,S.Fd=H,S.f=F,S.N=0+H,S.Ab=s,S.Cd=w,S.ea=F,S.W=0+H+w,S.Db=s,S.Ed=w,i==12&&(S.F=F,S.J=0+H+2*w),S.Tc=x,S.lb=b)}if(s=1,b=p.S,w=p.width,x=p.height,b>=Wa&&13>b)if(11>b)i=p.f.RGBA,s&=(L=Math.abs(i.A))*(x-1)+w<=i.size,s&=L>=w*su[b],s&=i.eb!=null;else{i=p.f.kb,L=(w+1)/2,H=(x+1)/2,S=Math.abs(i.fa),F=Math.abs(i.Ab);var Z=Math.abs(i.Db),I=Math.abs(i.lb),W=I*(x-1)+w;s&=S*(x-1)+w<=i.Fd,s&=F*(H-1)+L<=i.Cd,s=(s&=Z*(H-1)+L<=i.Ed)&S>=w&F>=L&Z>=L,s&=i.y!=null,s&=i.f!=null,s&=i.ea!=null,b==12&&(s&=I>=w,s&=W<=i.Tc,s&=i.F!=null)}else s=0;i=s?0:2}}return i!=0||c!=null&&c.fd&&(i=si(p)),i}var Bi=64,ui=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],fa=24,br=32,Ar=8,Mi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Ct("Predictor0","PredictorAdd0"),U.Predictor0=function(){return 4278190080},U.Predictor1=function(i){return i},U.Predictor2=function(i,s,c){return s[c+0]},U.Predictor3=function(i,s,c){return s[c+1]},U.Predictor4=function(i,s,c){return s[c-1]},U.Predictor5=function(i,s,c){return qt(qt(i,s[c+1]),s[c+0])},U.Predictor6=function(i,s,c){return qt(i,s[c-1])},U.Predictor7=function(i,s,c){return qt(i,s[c+0])},U.Predictor8=function(i,s,c){return qt(s[c-1],s[c+0])},U.Predictor9=function(i,s,c){return qt(s[c+0],s[c+1])},U.Predictor10=function(i,s,c){return qt(qt(i,s[c-1]),qt(s[c+0],s[c+1]))},U.Predictor11=function(i,s,c){var p=s[c+0];return 0>=Zt(p>>24&255,i>>24&255,(s=s[c-1])>>24&255)+Zt(p>>16&255,i>>16&255,s>>16&255)+Zt(p>>8&255,i>>8&255,s>>8&255)+Zt(255&p,255&i,255&s)?p:i},U.Predictor12=function(i,s,c){var p=s[c+0];return(me((i>>24&255)+(p>>24&255)-((s=s[c-1])>>24&255))<<24|me((i>>16&255)+(p>>16&255)-(s>>16&255))<<16|me((i>>8&255)+(p>>8&255)-(s>>8&255))<<8|me((255&i)+(255&p)-(255&s)))>>>0},U.Predictor13=function(i,s,c){var p=s[c-1];return(he((i=qt(i,s[c+0]))>>24&255,p>>24&255)<<24|he(i>>16&255,p>>16&255)<<16|he(i>>8&255,p>>8&255)<<8|he(255&i,255&p))>>>0};var Bn=U.PredictorAdd0;U.PredictorAdd1=fe,Ct("Predictor2","PredictorAdd2"),Ct("Predictor3","PredictorAdd3"),Ct("Predictor4","PredictorAdd4"),Ct("Predictor5","PredictorAdd5"),Ct("Predictor6","PredictorAdd6"),Ct("Predictor7","PredictorAdd7"),Ct("Predictor8","PredictorAdd8"),Ct("Predictor9","PredictorAdd9"),Ct("Predictor10","PredictorAdd10"),Ct("Predictor11","PredictorAdd11"),Ct("Predictor12","PredictorAdd12"),Ct("Predictor13","PredictorAdd13");var Mn=U.PredictorAdd2;Dt("ColorIndexInverseTransform","MapARGB","32b",function(i){return i>>8&255},function(i){return i}),Dt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(i){return i},function(i){return i>>8&255});var Di,hi=U.ColorIndexInverseTransform,Xe=U.MapARGB,Uo=U.VP8LColorIndexInverseTransformAlpha,un=U.MapAlpha,Vr=U.VP8LPredictorsAdd=[];Vr.length=16,(U.VP8LPredictors=[]).length=16,(U.VP8LPredictorsAdd_C=[]).length=16,(U.VP8LPredictors_C=[]).length=16;var li,ca,da,Ri,fi,ci,Dn,An,Rn,Ti,fr,hn,Pe,ke,ze,$e,Ln,pa,qi,za,Rs,Ts,qs,Us,ga,zs,Hs,Ws,Vs=o(511),Gs=o(2041),Ys=o(225),Js=o(767),Ks=0,zo=Gs,Ha=Ys,Pr=Js,qr=Vs,Wa=0,Va=1,Xs=2,Ga=3,Ya=4,Ho=5,$s=6,Wo=7,Vo=8,Ja=9,Go=10,Jh=[2,3,7],Kh=[3,3,11],Zs=[280,256,256,256,40],Xh=[0,1,1,1,0],$h=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zh=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Qh=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],tl=8,Yo=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Jo=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],va=null,el=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],rl=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Qs=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],nl=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],il=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],al=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ol=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Tn=[],Gr=[],Nn=[],sl=1,tu=2,qn=[],Ur=[];hr("UpsampleRgbLinePair",ii,3),hr("UpsampleBgrLinePair",ji,3),hr("UpsampleRgbaLinePair",ha,4),hr("UpsampleBgraLinePair",oi,4),hr("UpsampleArgbLinePair",ai,4),hr("UpsampleRgba4444LinePair",lr,2),hr("UpsampleRgb565LinePair",Ei,2);var ul=U.UpsampleRgbLinePair,hl=U.UpsampleBgrLinePair,eu=U.UpsampleRgbaLinePair,ru=U.UpsampleBgraLinePair,nu=U.UpsampleArgbLinePair,iu=U.UpsampleRgba4444LinePair,ll=U.UpsampleRgb565LinePair,Ka=16,Xa=1<<Ka-1,ma=-227,Ko=482,fl=6,au=0,cl=o(256),dl=o(256),pl=o(256),gl=o(256),vl=o(Ko-ma),ml=o(Ko-ma);sn("YuvToRgbRow",ii,3),sn("YuvToBgrRow",ji,3),sn("YuvToRgbaRow",ha,4),sn("YuvToBgraRow",oi,4),sn("YuvToArgbRow",ai,4),sn("YuvToRgba4444Row",lr,2),sn("YuvToRgb565Row",Ei,2);var ou=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],$a=[0,2,8],bl=[8,7,6,4,4,2,2,2,1,1,1,1],yl=1;this.WebPDecodeRGBA=function(i,s,c,p,b){var w=Va,x=new R,L=new ue;x.ba=L,L.S=w,L.width=[L.width],L.height=[L.height];var S=L.width,F=L.height,H=new Vt;if(H==null||i==null)var Z=2;else t(H!=null),Z=Ua(i,s,c,H.width,H.height,H.Pd,H.Qd,H.format,null);if(Z!=0?S=0:(S!=null&&(S[0]=H.width[0]),F!=null&&(F[0]=H.height[0]),S=1),S){L.width=L.width[0],L.height=L.height[0],p!=null&&(p[0]=L.width),b!=null&&(b[0]=L.height);t:{if(p=new Li,(b=new G).data=i,b.w=s,b.ha=c,b.kd=1,s=[0],t(b!=null),((i=Ua(b.data,b.w,b.ha,null,null,null,s,null,b))==0||i==7)&&s[0]&&(i=4),(s=i)==0){if(t(x!=null),p.data=b.data,p.w=b.w+b.offset,p.ha=b.ha-b.offset,p.put=Gt,p.ac=Qr,p.bc=pn,p.ma=x,b.xa){if((i=$n())==null){x=1;break t}if((function(I,W){var J=[0],st=[0],$=[0];e:for(;;){if(I==null)return 0;if(W==null)return I.a=2,0;if(I.l=W,I.a=0,lt(I.m,W.data,W.w,W.ha),!gn(I.m,J,st,$)){I.a=3;break e}if(I.xb=tu,W.width=J[0],W.height=st[0],!en(J[0],st[0],1,I,null))break e;return 1}return t(I.a!=0),0})(i,p)){if(p=(s=la(p.width,p.height,x.Oa,x.ba))==0){e:{p=i;r:for(;;){if(p==null){p=0;break e}if(t(p.s.yc!=null),t(p.s.Ya!=null),t(0<p.s.Wb),t((c=p.l)!=null),t((b=c.ma)!=null),p.xb!=0){if(p.ca=b.ba,p.tb=b.tb,t(p.ca!=null),!Tr(b.Oa,c,Ga)){p.a=2;break r}if(!Zn(p,c.width)||c.da)break r;if((c.da||Yt(p.ca.S))&&Me(),11>p.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),p.ca.f.kb.F!=null&&Me()),p.Pb&&0<p.s.ua&&p.s.vb.X==null&&!P(p.s.vb,p.s.Wa.Xa)){p.a=1;break r}p.xb=0}if(!Wr(p,p.V,p.Ba,p.c,p.i,c.o,Fn))break r;b.Dc=p.Ma,p=1;break e}t(p.a!=0),p=0}p=!p}p&&(s=i.a)}else s=i.a}else{if((i=new No)==null){x=1;break t}if(i.Fa=b.na,i.P=b.P,i.qc=b.Sa,nn(i,p)){if((s=la(p.width,p.height,x.Oa,x.ba))==0){if(i.Aa=0,c=x.Oa,t((b=i)!=null),c!=null){if(0<(S=0>(S=c.Md)?0:100<S?255:255*S/100)){for(F=H=0;4>F;++F)12>(Z=b.pb[F]).lc&&(Z.ia=S*bl[0>Z.lc?0:Z.lc]>>3),H|=Z.ia;H&&(alert("todo:VP8InitRandom"),b.ia=1)}b.Ga=c.Id,100<b.Ga?b.Ga=100:0>b.Ga&&(b.Ga=0)}(function(I,W){if(I==null)return 0;if(W==null)return Je(I,2,"NULL VP8Io parameter in VP8Decode().");if(!I.cb&&!nn(I,W))return 0;if(t(I.cb),W.ac==null||W.ac(W)){W.ob&&(I.L=0);var J=$a[I.L];if(I.L==2?(I.yb=0,I.zb=0):(I.yb=W.v-J>>4,I.zb=W.j-J>>4,0>I.yb&&(I.yb=0),0>I.zb&&(I.zb=0)),I.Va=W.o+15+J>>4,I.Hb=W.va+15+J>>4,I.Hb>I.za&&(I.Hb=I.za),I.Va>I.Ub&&(I.Va=I.Ub),0<I.L){var st=I.ed;for(J=0;4>J;++J){var $;if(I.Qa.Cb){var ht=I.Qa.Lb[J];I.Qa.Fb||(ht+=st.Tb)}else ht=st.Tb;for($=0;1>=$;++$){var ft=I.gd[J][$],yt=ht;if(st.Pc&&(yt+=st.vd[0],$&&(yt+=st.od[0])),0<(yt=0>yt?0:63<yt?63:yt)){var vt=yt;0<st.wb&&(vt=4<st.wb?vt>>2:vt>>1)>9-st.wb&&(vt=9-st.wb),1>vt&&(vt=1),ft.dd=vt,ft.tc=2*yt+vt,ft.ld=40<=yt?2:15<=yt?1:0}else ft.tc=0;ft.La=$}}}J=0}else Je(I,6,"Frame setup failed"),J=I.a;if(J=J==0){if(J){I.$c=0,0<I.Aa||(I.Ic=yl);e:{J=I.Ic,st=4*(vt=I.za);var Mt=32*vt,kt=vt+1,ne=0<I.L?vt*(0<I.Aa?2:1):0,Et=(I.Aa==2?2:1)*vt;if((ft=st+832+($=3*(16*J+$a[I.L])/2*Mt)+(ht=I.Fa!=null&&0<I.Fa.length?I.Kc.c*I.Kc.i:0))!=ft)J=0;else{if(ft>I.Vb){if(I.Vb=0,I.Ec=o(ft),I.Fc=0,I.Ec==null){J=Je(I,1,"no memory during frame initialization.");break e}I.Vb=ft}ft=I.Ec,yt=I.Fc,I.Ac=ft,I.Bc=yt,yt+=st,I.Gd=f(Mt,Ca),I.Hd=0,I.rb=f(kt+1,Qi),I.sb=1,I.wa=ne?f(ne,Rr):null,I.Y=0,I.D.Nb=0,I.D.wa=I.wa,I.D.Y=I.Y,0<I.Aa&&(I.D.Y+=vt),t(!0),I.oc=ft,I.pc=yt,yt+=832,I.ya=f(Et,ta),I.aa=0,I.D.ya=I.ya,I.D.aa=I.aa,I.Aa==2&&(I.D.aa+=vt),I.R=16*vt,I.B=8*vt,vt=(Mt=$a[I.L])*I.R,Mt=Mt/2*I.B,I.sa=ft,I.ta=yt+vt,I.qa=I.sa,I.ra=I.ta+16*J*I.R+Mt,I.Ha=I.qa,I.Ia=I.ra+8*J*I.B+Mt,I.$c=0,yt+=$,I.mb=ht?ft:null,I.nb=ht?yt:null,t(yt+ht<=I.Fc+I.Vb),ea(I),a(I.Ac,I.Bc,0,st),J=1}}if(J){if(W.ka=0,W.y=I.sa,W.O=I.ta,W.f=I.qa,W.N=I.ra,W.ea=I.Ha,W.Vd=I.Ia,W.fa=I.R,W.Rc=I.B,W.F=null,W.J=0,!Ks){for(J=-255;255>=J;++J)Vs[255+J]=0>J?-J:J;for(J=-1020;1020>=J;++J)Gs[1020+J]=-128>J?-128:127<J?127:J;for(J=-112;112>=J;++J)Ys[112+J]=-16>J?-16:15<J?15:J;for(J=-255;510>=J;++J)Js[255+J]=0>J?0:255<J?255:J;Ks=1}Dn=Ea,An=So,Ti=_o,fr=Po,hn=an,Rn=ja,Pe=Ma,ke=Da,ze=Ta,$e=l,Ln=Ra,pa=ei,qi=m,za=k,Rs=Fi,Ts=sa,qs=Ii,Us=Ba,Gr[0]=Oo,Gr[1]=Pi,Gr[2]=jo,Gr[3]=Eo,Gr[4]=Bo,Gr[5]=mn,Gr[6]=Mo,Gr[7]=bn,Gr[8]=Ro,Gr[9]=Do,Tn[0]=Oa,Tn[1]=ko,Tn[2]=Co,Tn[3]=Fo,Tn[4]=jn,Tn[5]=Io,Tn[6]=Qn,Nn[0]=To,Nn[1]=ra,Nn[2]=ki,Nn[3]=na,Nn[4]=qo,Nn[5]=Ci,Nn[6]=ia,J=1}else J=0}J&&(J=(function(ce,Ze){for(ce.M=0;ce.M<ce.Va;++ce.M){var ie,Ot=ce.Jc[ce.M&ce.Xb],Lt=ce.m,He=ce;for(ie=0;ie<He.za;++ie){var ee=Lt,pe=He,Ie=pe.Ac,ar=pe.Bc+4*ie,yr=pe.zc,Re=pe.ya[pe.aa+ie];if(pe.Qa.Bb?Re.$b=ct(ee,pe.Pa.jb[0])?2+ct(ee,pe.Pa.jb[2]):ct(ee,pe.Pa.jb[1]):Re.$b=0,pe.kc&&(Re.Ad=ct(ee,pe.Bd)),Re.Za=!ct(ee,145)+0,Re.Za){var cr=Re.Ob,wr=0;for(pe=0;4>pe;++pe){var Qe,ve=yr[0+pe];for(Qe=0;4>Qe;++Qe){ve=il[Ie[ar+Qe]][ve];for(var ye=Qs[ct(ee,ve[0])];0<ye;)ye=Qs[2*ye+ct(ee,ve[ye])];ve=-ye,Ie[ar+Qe]=ve}n(cr,wr,Ie,ar,4),wr+=4,yr[0+pe]=ve}}else ve=ct(ee,156)?ct(ee,128)?1:3:ct(ee,163)?2:0,Re.Ob[0]=ve,a(Ie,ar,ve,4),a(yr,0,ve,4);Re.Dd=ct(ee,142)?ct(ee,114)?ct(ee,183)?1:3:2:0}if(He.m.Ka)return Je(ce,7,"Premature end-of-partition0 encountered.");for(;ce.ja<ce.za;++ce.ja){if(He=Ot,ee=(Lt=ce).rb[Lt.sb-1],Ie=Lt.rb[Lt.sb+Lt.ja],ie=Lt.ya[Lt.aa+Lt.ja],ar=Lt.kc?ie.Ad:0)ee.la=Ie.la=0,ie.Za||(ee.Na=Ie.Na=0),ie.Hc=0,ie.Gc=0,ie.ia=0;else{var Te,we;if(ee=Ie,Ie=He,ar=Lt.Pa.Xc,yr=Lt.ya[Lt.aa+Lt.ja],Re=Lt.pb[yr.$b],pe=yr.ad,cr=0,wr=Lt.rb[Lt.sb-1],ve=Qe=0,a(pe,cr,0,384),yr.Za)var or=0,Yr=ar[3];else{ye=o(16);var We=ee.Na+wr.Na;if(We=va(Ie,ar[1],We,Re.Eb,0,ye,0),ee.Na=wr.Na=(0<We)+0,1<We)Dn(ye,0,pe,cr);else{var Lr=ye[0]+3>>3;for(ye=0;256>ye;ye+=16)pe[cr+ye]=Lr}or=1,Yr=ar[0]}var Ne=15&ee.la,tr=15&wr.la;for(ye=0;4>ye;++ye){var kr=1&tr;for(Lr=we=0;4>Lr;++Lr)Ne=Ne>>1|(kr=(We=va(Ie,Yr,We=kr+(1&Ne),Re.Sc,or,pe,cr))>or)<<7,we=we<<2|(3<We?3:1<We?2:pe[cr+0]!=0),cr+=16;Ne>>=4,tr=tr>>1|kr<<7,Qe=(Qe<<8|we)>>>0}for(Yr=Ne,or=tr>>4,Te=0;4>Te;Te+=2){for(we=0,Ne=ee.la>>4+Te,tr=wr.la>>4+Te,ye=0;2>ye;++ye){for(kr=1&tr,Lr=0;2>Lr;++Lr)We=kr+(1&Ne),Ne=Ne>>1|(kr=0<(We=va(Ie,ar[2],We,Re.Qc,0,pe,cr)))<<3,we=we<<2|(3<We?3:1<We?2:pe[cr+0]!=0),cr+=16;Ne>>=2,tr=tr>>1|kr<<5}ve|=we<<4*Te,Yr|=Ne<<4<<Te,or|=(240&tr)<<Te}ee.la=Yr,wr.la=or,yr.Hc=Qe,yr.Gc=ve,yr.ia=43690&ve?0:Re.ia,ar=!(Qe|ve)}if(0<Lt.L&&(Lt.wa[Lt.Y+Lt.ja]=Lt.gd[ie.$b][ie.Za],Lt.wa[Lt.Y+Lt.ja].La|=!ar),He.Ka)return Je(ce,7,"Premature end-of-file encountered.")}if(ea(ce),Lt=Ze,He=1,ie=(Ot=ce).D,ee=0<Ot.L&&Ot.M>=Ot.zb&&Ot.M<=Ot.Va,Ot.Aa==0)e:{if(ie.M=Ot.M,ie.uc=ee,Oi(Ot,ie),He=1,ie=(we=Ot.D).Nb,ee=(ve=$a[Ot.L])*Ot.R,Ie=ve/2*Ot.B,ye=16*ie*Ot.R,Lr=8*ie*Ot.B,ar=Ot.sa,yr=Ot.ta-ee+ye,Re=Ot.qa,pe=Ot.ra-Ie+Lr,cr=Ot.Ha,wr=Ot.Ia-Ie+Lr,tr=(Ne=we.M)==0,Qe=Ne>=Ot.Va-1,Ot.Aa==2&&Oi(Ot,we),we.uc)for(kr=(We=Ot).D.M,t(We.D.uc),we=We.yb;we<We.Hb;++we){or=we,Yr=kr;var xr=(Cr=(sr=We).D).Nb;Te=sr.R;var Cr=Cr.wa[Cr.Y+or],Fr=sr.sa,Nr=sr.ta+16*xr*Te+16*or,Ir=Cr.dd,Ce=Cr.tc;if(Ce!=0)if(t(3<=Ce),sr.L==1)0<or&&Ts(Fr,Nr,Te,Ce+4),Cr.La&&Us(Fr,Nr,Te,Ce),0<Yr&&Rs(Fr,Nr,Te,Ce+4),Cr.La&&qs(Fr,Nr,Te,Ce);else{var jr=sr.B,Jr=sr.qa,di=sr.ra+8*xr*jr+8*or,Sn=sr.Ha,sr=sr.Ia+8*xr*jr+8*or;xr=Cr.ld,0<or&&(ke(Fr,Nr,Te,Ce+4,Ir,xr),$e(Jr,di,Sn,sr,jr,Ce+4,Ir,xr)),Cr.La&&(pa(Fr,Nr,Te,Ce,Ir,xr),za(Jr,di,Sn,sr,jr,Ce,Ir,xr)),0<Yr&&(Pe(Fr,Nr,Te,Ce+4,Ir,xr),ze(Jr,di,Sn,sr,jr,Ce+4,Ir,xr)),Cr.La&&(Ln(Fr,Nr,Te,Ce,Ir,xr),qi(Jr,di,Sn,sr,jr,Ce,Ir,xr))}}if(Ot.ia&&alert("todo:DitherRow"),Lt.put!=null){if(we=16*Ne,Ne=16*(Ne+1),tr?(Lt.y=Ot.sa,Lt.O=Ot.ta+ye,Lt.f=Ot.qa,Lt.N=Ot.ra+Lr,Lt.ea=Ot.Ha,Lt.W=Ot.Ia+Lr):(we-=ve,Lt.y=ar,Lt.O=yr,Lt.f=Re,Lt.N=pe,Lt.ea=cr,Lt.W=wr),Qe||(Ne-=ve),Ne>Lt.o&&(Ne=Lt.o),Lt.F=null,Lt.J=null,Ot.Fa!=null&&0<Ot.Fa.length&&we<Ne&&(Lt.J=Ke(Ot,Lt,we,Ne-we),Lt.F=Ot.mb,Lt.F==null&&Lt.F.length==0)){He=Je(Ot,3,"Could not decode alpha data.");break e}we<Lt.j&&(ve=Lt.j-we,we=Lt.j,t(!(1&ve)),Lt.O+=Ot.R*ve,Lt.N+=Ot.B*(ve>>1),Lt.W+=Ot.B*(ve>>1),Lt.F!=null&&(Lt.J+=Lt.width*ve)),we<Ne&&(Lt.O+=Lt.v,Lt.N+=Lt.v>>1,Lt.W+=Lt.v>>1,Lt.F!=null&&(Lt.J+=Lt.v),Lt.ka=we-Lt.j,Lt.U=Lt.va-Lt.v,Lt.T=Ne-we,He=Lt.put(Lt))}ie+1!=Ot.Ic||Qe||(n(Ot.sa,Ot.ta-ee,ar,yr+16*Ot.R,ee),n(Ot.qa,Ot.ra-Ie,Re,pe+8*Ot.B,Ie),n(Ot.Ha,Ot.Ia-Ie,cr,wr+8*Ot.B,Ie))}if(!He)return Je(ce,6,"Output aborted.")}return 1})(I,W)),W.bc!=null&&W.bc(W),J&=1}return J?(I.cb=0,J):0})(i,p)||(s=i.a)}}else s=i.a}s==0&&x.Oa!=null&&x.Oa.fd&&(s=si(x.ba))}x=s}w=x!=0?null:11>w?L.f.RGBA.eb:L.f.kb.y}else w=null;return w};var su=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(U,dt){for(var _="",E=0;E<4;E++)_+=String.fromCharCode(U[dt++]);return _}function v(U,dt){return U[dt+0]|U[dt+1]<<8}function y(U,dt){return(U[dt+0]|U[dt+1]<<8|U[dt+2]<<16)>>>0}function N(U,dt){return(U[dt+0]|U[dt+1]<<8|U[dt+2]<<16|U[dt+3]<<24)>>>0}new h;var g=[0],B=[0],j=[],M=new h,C=e,Y=(function(U,dt){var _={},E=0,q=!1,T=0,rt=0;if(_.frames=[],!(function(A,O){for(var D=0;D<4;D++)if(A[O+D]!="RIFF".charCodeAt(D))return!0;return!1})(U,dt)){for(N(U,dt+=4),dt+=8;dt<U.length;){var at=d(U,dt),ut=N(U,dt+=4);dt+=4;var Q=ut+(1&ut);switch(at){case"VP8 ":case"VP8L":_.frames[E]===void 0&&(_.frames[E]={}),(mt=_.frames[E]).src_off=q?rt:dt-8,mt.src_size=T+ut+8,E++,q&&(q=!1,T=0,rt=0);break;case"VP8X":(mt=_.header={}).feature_flags=U[dt];var lt=dt+4;mt.canvas_width=1+y(U,lt),lt+=3,mt.canvas_height=1+y(U,lt),lt+=3;break;case"ALPH":q=!0,T=Q+8,rt=dt-8;break;case"ANIM":(mt=_.header).bgcolor=N(U,dt),lt=dt+4,mt.loop_count=v(U,lt),lt+=2;break;case"ANMF":var At,mt;(mt=_.frames[E]={}).offset_x=2*y(U,dt),dt+=3,mt.offset_y=2*y(U,dt),dt+=3,mt.width=1+y(U,dt),dt+=3,mt.height=1+y(U,dt),dt+=3,mt.duration=y(U,dt),dt+=3,At=U[dt++],mt.dispose=1&At,mt.blend=At>>1&1}at!="ANMF"&&(dt+=Q)}return _}})(C,0);Y.response=C,Y.rgbaoutput=!0,Y.dataurl=!1;var K=Y.header?Y.header:null,tt=Y.frames?Y.frames:null;if(K){K.loop_counter=K.loop_count,g=[K.canvas_height],B=[K.canvas_width];for(var gt=0;gt<tt.length&&tt[gt].blend!=0;gt++);}var xt=tt[0],Pt=M.WebPDecodeRGBA(C,xt.src_off,xt.src_size,B,g);xt.rgba=Pt,xt.imgwidth=B[0],xt.imgheight=g[0];for(var et=0;et<B[0]*g[0]*4;et++)j[et]=Pt[et];return this.width=B,this.height=g,this.data=j,this}/** ====================================================================
|
||
* @license
|
||
* jsPDF XMP metadata plugin
|
||
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining
|
||
* a copy of this software and associated documentation files (the
|
||
* "Software"), to deal in the Software without restriction, including
|
||
* without limitation the rights to use, copy, modify, merge, publish,
|
||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||
* permit persons to whom the Software is furnished to do so, subject to
|
||
* the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be
|
||
* included in all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
* ====================================================================
|
||
*/function Wf(){var e,t=this.internal.__metadata__.metadata,r=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?r:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function Vf(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(e){var t,r,n,a,o,f,u,h,d,v=function(A){return A=A||{},this.isStrokeTransparent=A.isStrokeTransparent||!1,this.strokeOpacity=A.strokeOpacity||1,this.strokeStyle=A.strokeStyle||"#000000",this.fillStyle=A.fillStyle||"#000000",this.isFillTransparent=A.isFillTransparent||!1,this.fillOpacity=A.fillOpacity||1,this.font=A.font||"10px sans-serif",this.textBaseline=A.textBaseline||"alphabetic",this.textAlign=A.textAlign||"left",this.lineWidth=A.lineWidth||1,this.lineJoin=A.lineJoin||"miter",this.lineCap=A.lineCap||"butt",this.path=A.path||[],this.transform=A.transform!==void 0?A.transform.clone():new h,this.globalCompositeOperation=A.globalCompositeOperation||"normal",this.globalAlpha=A.globalAlpha||1,this.clip_path=A.clip_path||[],this.currentPoint=A.currentPoint||new f,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new f,this.lineDashOffset=A.lineDashOffset||0,this.lineDash=A.lineDash||[],this.margin=A.margin||[0,0,0,0],this.prevPageLastElemOffset=A.prevPageLastElemOffset||0,this.ignoreClearRect=typeof A.ignoreClearRect!="boolean"||A.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new y(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,f=this.internal.Point,u=this.internal.Rectangle,h=this.internal.Matrix,d=new v}]);var y=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var O=A;Object.defineProperty(this,"pdf",{get:function(){return O}});var D=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return D},set:function(P){D=!!P}});var z=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return z},set:function(P){z=!!P}});var V=0;Object.defineProperty(this,"posX",{get:function(){return V},set:function(P){isNaN(P)||(V=P)}});var X=0;Object.defineProperty(this,"posY",{get:function(){return X},set:function(P){isNaN(P)||(X=P)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(P){var Nt;typeof P=="number"?Nt=[P,P,P,P]:((Nt=new Array(4))[0]=P[0],Nt[1]=P.length>=2?P[1]:Nt[0],Nt[2]=P.length>=3?P[2]:Nt[0],Nt[3]=P.length>=4?P[3]:Nt[1]),d.margin=Nt}});var nt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return nt},set:function(P){nt=P}});var it=0;Object.defineProperty(this,"lastBreak",{get:function(){return it},set:function(P){it=P}});var ct=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ct},set:function(P){ct=P}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(P){P instanceof v&&(d=P)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(P){d.path=P}});var wt=[];Object.defineProperty(this,"ctxStack",{get:function(){return wt},set:function(P){wt=P}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(P){var Nt;Nt=N(P),this.ctx.fillStyle=Nt.style,this.ctx.isFillTransparent=Nt.a===0,this.ctx.fillOpacity=Nt.a,this.pdf.setFillColor(Nt.r,Nt.g,Nt.b,{a:Nt.a}),this.pdf.setTextColor(Nt.r,Nt.g,Nt.b,{a:Nt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(P){var Nt=N(P);this.ctx.strokeStyle=Nt.style,this.ctx.isStrokeTransparent=Nt.a===0,this.ctx.strokeOpacity=Nt.a,Nt.a===0?this.pdf.setDrawColor(255,255,255):(Nt.a,this.pdf.setDrawColor(Nt.r,Nt.g,Nt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(P){["butt","round","square"].indexOf(P)!==-1&&(this.ctx.lineCap=P,this.pdf.setLineCap(P))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(P){isNaN(P)||(this.ctx.lineWidth=P,this.pdf.setLineWidth(P))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(P){["bevel","round","miter"].indexOf(P)!==-1&&(this.ctx.lineJoin=P,this.pdf.setLineJoin(P))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(P){isNaN(P)||(this.ctx.miterLimit=P,this.pdf.setMiterLimit(P))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(P){this.ctx.textBaseline=P}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(P){["right","end","center","left","start"].indexOf(P)!==-1&&(this.ctx.textAlign=P)}});var _t=null,St=null,Tt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Tt},set:function(P){_t=null,St=null,Tt=P}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(P){var Nt;if(this.ctx.font=P,(Nt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(P))!==null){var ae=Nt[1];Nt[2];var Ht=Nt[3],bt=Nt[4];Nt[5];var Wt=Nt[6],Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(bt)[2];bt=Math.floor(Ct==="px"?parseFloat(bt)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(bt)*this.pdf.getFontSize():parseFloat(bt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(bt);var zt=(function(Dt){var Ue,ge,oe=[],se=Dt.trim();if(se==="")return gs;if(se in qu)return[qu[se]];for(;se!=="";){switch(ge=null,Ue=(se=zu(se)).charAt(0)){case'"':case"'":ge=Rf(se.substring(1),Ue);break;default:ge=Tf(se)}if(ge===null||(oe.push(ge[0]),(se=zu(ge[1]))!==""&&se.charAt(0)!==","))return gs;se=se.replace(/^,/,"")}return oe})(Wt);if(this.fontFaces){var qt=(function(Dt,Ue){var ge=Dt.getFontList(),oe=JSON.stringify(ge);if(_t===null||St!==oe){var se=(function(Ee){var Ut=[];return Object.keys(Ee).forEach(function(_e){Ee[_e].forEach(function(Yt){var Qt=null;switch(Yt){case"bold":Qt={family:_e,weight:"bold"};break;case"italic":Qt={family:_e,style:"italic"};break;case"bolditalic":Qt={family:_e,weight:"bold",style:"italic"};break;case"":case"normal":Qt={family:_e}}Qt!==null&&(Qt.ref={name:_e,style:Yt},Ut.push(Qt))})}),Ut})(ge);_t=(function(Ee){for(var Ut={},_e=0;_e<Ee.length;++_e){var Yt=ps(Ee[_e]),Qt=Yt.family,Oe=Yt.stretch,ue=Yt.style,Vt=Yt.weight;Ut[Qt]=Ut[Qt]||{},Ut[Qt][Oe]=Ut[Qt][Oe]||{},Ut[Qt][Oe][ue]=Ut[Qt][Oe][ue]||{},Ut[Qt][Oe][ue][Vt]=Yt}return Ut})(se.concat(Ue)),St=oe}return _t})(this.pdf,this.fontFaces),me=zt.map(function(Dt){return{family:Dt,stretch:"normal",weight:Ht,style:ae}}),he=(function(Dt,Ue,ge){for(var oe=(ge=ge||{}).defaultFontFamily||"times",se=Object.assign({},Df,ge.genericFontFamilies||{}),Ee=null,Ut=null,_e=0;_e<Ue.length;++_e)if(se[(Ee=ps(Ue[_e])).family]&&(Ee.family=se[Ee.family]),Dt.hasOwnProperty(Ee.family)){Ut=Dt[Ee.family];break}if(!(Ut=Ut||Dt[oe]))throw new Error("Could not find a font-family for the rule '"+Uu(Ee)+"' and default family '"+oe+"'.");if(Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];var Oe=Cs[Yt],ue=Oe<=Cs.normal?-1:1,Vt=Tu(Qt,Ih,Oe,ue);if(!Vt)throw new Error("Could not find a matching font-stretch value for "+Yt);return Vt})(Ee.stretch,Ut),Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];for(var Oe=Fh[Yt],ue=0;ue<Oe.length;++ue)if(Qt[Oe[ue]])return Qt[Oe[ue]];throw new Error("Could not find a matching font-style for "+Yt)})(Ee.style,Ut),!(Ut=(function(Yt,Qt){if(Qt[Yt])return Qt[Yt];if(Yt===400&&Qt[500])return Qt[500];if(Yt===500&&Qt[400])return Qt[400];var Oe=Mf[Yt],ue=Tu(Qt,jh,Oe,Yt<400?-1:1);if(!ue)throw new Error("Could not find a matching font-weight for value "+Yt);return ue})(Ee.weight,Ut)))throw new Error("Failed to resolve a font for the rule '"+Uu(Ee)+"'.");return Ut})(qt,me);this.pdf.setFont(he.ref.name,he.ref.style)}else{var Zt="";(Ht==="bold"||parseInt(Ht,10)>=700||ae==="bold")&&(Zt="bold"),ae==="italic"&&(Zt+="italic"),Zt.length===0&&(Zt="normal");for(var fe="",le={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Bt=0;Bt<zt.length;Bt++){if(this.pdf.internal.getFont(zt[Bt],Zt,{noFallback:!0,disableWarning:!0})!==void 0){fe=zt[Bt];break}if(Zt==="bolditalic"&&this.pdf.internal.getFont(zt[Bt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)fe=zt[Bt],Zt="bold";else if(this.pdf.internal.getFont(zt[Bt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){fe=zt[Bt],Zt="normal";break}}if(fe===""){for(var re=0;re<zt.length;re++)if(le[zt[re]]){fe=le[zt[re]];break}}fe=fe===""?"Times":fe,this.pdf.setFont(fe,Zt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(P){this.ctx.globalCompositeOperation=P}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(P){this.ctx.globalAlpha=P}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(P){this.ctx.lineDashOffset=P,mt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(P){this.ctx.lineDash=P,mt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(P){this.ctx.ignoreClearRect=!!P}})};y.prototype.setLineDash=function(A){this.lineDash=A},y.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},y.prototype.fill=function(){tt.call(this,"fill",!1)},y.prototype.stroke=function(){tt.call(this,"stroke",!1)},y.prototype.beginPath=function(){this.path=[{type:"begin"}]},y.prototype.moveTo=function(A,O){if(isNaN(A)||isNaN(O))throw Se.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var D=this.ctx.transform.applyToPoint(new f(A,O));this.path.push({type:"mt",x:D.x,y:D.y}),this.ctx.lastPoint=new f(A,O)},y.prototype.closePath=function(){var A=new f(0,0),O=0;for(O=this.path.length-1;O!==-1;O--)if(this.path[O].type==="begin"&&xe(this.path[O+1])==="object"&&typeof this.path[O+1].x=="number"){A=new f(this.path[O+1].x,this.path[O+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new f(A.x,A.y)},y.prototype.lineTo=function(A,O){if(isNaN(A)||isNaN(O))throw Se.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var D=this.ctx.transform.applyToPoint(new f(A,O));this.path.push({type:"lt",x:D.x,y:D.y}),this.ctx.lastPoint=new f(D.x,D.y)},y.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),tt.call(this,null,!0)},y.prototype.quadraticCurveTo=function(A,O,D,z){if(isNaN(D)||isNaN(z)||isNaN(A)||isNaN(O))throw Se.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var V=this.ctx.transform.applyToPoint(new f(D,z)),X=this.ctx.transform.applyToPoint(new f(A,O));this.path.push({type:"qct",x1:X.x,y1:X.y,x:V.x,y:V.y}),this.ctx.lastPoint=new f(V.x,V.y)},y.prototype.bezierCurveTo=function(A,O,D,z,V,X){if(isNaN(V)||isNaN(X)||isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var nt=this.ctx.transform.applyToPoint(new f(V,X)),it=this.ctx.transform.applyToPoint(new f(A,O)),ct=this.ctx.transform.applyToPoint(new f(D,z));this.path.push({type:"bct",x1:it.x,y1:it.y,x2:ct.x,y2:ct.y,x:nt.x,y:nt.y}),this.ctx.lastPoint=new f(nt.x,nt.y)},y.prototype.arc=function(A,O,D,z,V,X){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z)||isNaN(V))throw Se.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(X=!!X,!this.ctx.transform.isIdentity){var nt=this.ctx.transform.applyToPoint(new f(A,O));A=nt.x,O=nt.y;var it=this.ctx.transform.applyToPoint(new f(0,D)),ct=this.ctx.transform.applyToPoint(new f(0,0));D=Math.sqrt(Math.pow(it.x-ct.x,2)+Math.pow(it.y-ct.y,2))}Math.abs(V-z)>=2*Math.PI&&(z=0,V=2*Math.PI),this.path.push({type:"arc",x:A,y:O,radius:D,startAngle:z,endAngle:V,counterclockwise:X})},y.prototype.arcTo=function(A,O,D,z,V){throw new Error("arcTo not implemented.")},y.prototype.rect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,O),this.lineTo(A+D,O),this.lineTo(A+D,O+z),this.lineTo(A,O+z),this.lineTo(A,O),this.lineTo(A+D,O),this.lineTo(A,O)},y.prototype.fillRect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.call(this)){var V={};this.lineCap!=="butt"&&(V.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(V.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,O,D,z),this.fill(),V.hasOwnProperty("lineCap")&&(this.lineCap=V.lineCap),V.hasOwnProperty("lineJoin")&&(this.lineJoin=V.lineJoin)}},y.prototype.strokeRect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(A,O,D,z),this.stroke())},y.prototype.clearRect=function(A,O,D,z){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z))throw Se.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,O,D,z))},y.prototype.save=function(A){A=typeof A!="boolean"||A;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,D=0;D<this.pdf.internal.getNumberOfPages();D++)this.pdf.setPage(D+1),this.pdf.internal.out("q");if(this.pdf.setPage(O),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var z=new v(this.ctx);this.ctxStack.push(this.ctx),this.ctx=z}},y.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,D=0;D<this.pdf.internal.getNumberOfPages();D++)this.pdf.setPage(D+1),this.pdf.internal.out("Q");this.pdf.setPage(O),A&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},y.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var N=function(A){var O,D,z,V;if(A.isCanvasGradient===!0&&(A=A.getColor()),!A)return{r:0,g:0,b:0,a:0,style:A};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(A))O=0,D=0,z=0,V=0;else{var X=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(X!==null)O=parseInt(X[1]),D=parseInt(X[2]),z=parseInt(X[3]),V=1;else if((X=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)O=parseInt(X[1]),D=parseInt(X[2]),z=parseInt(X[3]),V=parseFloat(X[4]);else{if(V=1,typeof A=="string"&&A.charAt(0)!=="#"){var nt=new Lh(A);A=nt.ok?nt.toHex():"#000000"}A.length===4?(O=A.substring(1,2),O+=O,D=A.substring(2,3),D+=D,z=A.substring(3,4),z+=z):(O=A.substring(1,3),D=A.substring(3,5),z=A.substring(5,7)),O=parseInt(O,16),D=parseInt(D,16),z=parseInt(z,16)}}return{r:O,g:D,b:z,a:V,style:A}},g=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},B=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};y.prototype.fillText=function(A,O,D,z){if(isNaN(O)||isNaN(D)||typeof A!="string")throw Se.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(z=isNaN(z)?void 0:z,!g.call(this)){var V=Q(this.ctx.transform.rotation),X=this.ctx.transform.scaleX;E.call(this,{text:A,x:O,y:D,scale:X,angle:V,align:this.textAlign,maxWidth:z})}},y.prototype.strokeText=function(A,O,D,z){if(isNaN(O)||isNaN(D)||typeof A!="string")throw Se.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!B.call(this)){z=isNaN(z)?void 0:z;var V=Q(this.ctx.transform.rotation),X=this.ctx.transform.scaleX;E.call(this,{text:A,x:O,y:D,scale:X,renderingMode:"stroke",angle:V,align:this.textAlign,maxWidth:z})}},y.prototype.measureText=function(A){if(typeof A!="string")throw Se.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var O=this.pdf,D=this.pdf.internal.scaleFactor,z=O.internal.getFontSize(),V=O.getStringUnitWidth(A)*z/O.internal.scaleFactor;return new function(X){var nt=(X=X||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return nt}}),this}({width:V*=Math.round(96*D/72*1e4)/1e4})},y.prototype.scale=function(A,O){if(isNaN(A)||isNaN(O))throw Se.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var D=new h(A,0,0,O,0,0);this.ctx.transform=this.ctx.transform.multiply(D)},y.prototype.rotate=function(A){if(isNaN(A))throw Se.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var O=new h(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(O)},y.prototype.translate=function(A,O){if(isNaN(A)||isNaN(O))throw Se.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var D=new h(1,0,0,1,A,O);this.ctx.transform=this.ctx.transform.multiply(D)},y.prototype.transform=function(A,O,D,z,V,X){if(isNaN(A)||isNaN(O)||isNaN(D)||isNaN(z)||isNaN(V)||isNaN(X))throw Se.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var nt=new h(A,O,D,z,V,X);this.ctx.transform=this.ctx.transform.multiply(nt)},y.prototype.setTransform=function(A,O,D,z,V,X){A=isNaN(A)?1:A,O=isNaN(O)?0:O,D=isNaN(D)?0:D,z=isNaN(z)?1:z,V=isNaN(V)?0:V,X=isNaN(X)?0:X,this.ctx.transform=new h(A,O,D,z,V,X)};var j=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};y.prototype.drawImage=function(A,O,D,z,V,X,nt,it,ct){var wt=this.pdf.getImageProperties(A),_t=1,St=1,Tt=1,P=1;z!==void 0&&it!==void 0&&(Tt=it/z,P=ct/V,_t=wt.width/z*it/z,St=wt.height/V*ct/V),X===void 0&&(X=O,nt=D,O=0,D=0),z!==void 0&&it===void 0&&(it=z,ct=V),z===void 0&&it===void 0&&(it=wt.width,ct=wt.height);var Nt=this.ctx.transform.decompose(),ae=Q(Nt.rotate.shx),Ht=new h,bt=(Ht=(Ht=(Ht=Ht.multiply(Nt.translate)).multiply(Nt.skew)).multiply(Nt.scale)).applyToRectangle(new u(X-O*Tt,nt-D*P,z*_t,V*St));if(this.autoPaging){for(var Wt,Ct=M.call(this,bt),zt=[],qt=0;qt<Ct.length;qt+=1)zt.indexOf(Ct[qt])===-1&&zt.push(Ct[qt]);K(zt);for(var me=zt[0],he=zt[zt.length-1],Zt=me;Zt<he+1;Zt++){this.pdf.setPage(Zt);var fe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],le=Zt===1?this.posY+this.margin[0]:this.margin[0],Bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],re=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Dt=Zt===1?0:Bt+(Zt-2)*re;if(this.ctx.clip_path.length!==0){var Ue=this.path;Wt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(Wt,this.posX+this.margin[3],-Dt+le+this.ctx.prevPageLastElemOffset),gt.call(this,"fill",!0),this.path=Ue}var ge=JSON.parse(JSON.stringify(bt));ge=Y([ge],this.posX+this.margin[3],-Dt+le+this.ctx.prevPageLastElemOffset)[0];var oe=(Zt>me||Zt<he)&&j.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],fe,re,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",ge.x,ge.y,ge.w,ge.h,null,null,ae),oe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(A,"JPEG",bt.x,bt.y,bt.w,bt.h,null,null,ae)};var M=function(A,O,D){var z=[];O=O||this.pdf.internal.pageSize.width,D=D||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var V=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":z.push(Math.floor((A.y+V)/D)+1);break;case"arc":z.push(Math.floor((A.y+V-A.radius)/D)+1),z.push(Math.floor((A.y+V+A.radius)/D)+1);break;case"qct":var X=lt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);z.push(Math.floor((X.y+V)/D)+1),z.push(Math.floor((X.y+X.h+V)/D)+1);break;case"bct":var nt=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);z.push(Math.floor((nt.y+V)/D)+1),z.push(Math.floor((nt.y+nt.h+V)/D)+1);break;case"rect":z.push(Math.floor((A.y+V)/D)+1),z.push(Math.floor((A.y+A.h+V)/D)+1)}for(var it=0;it<z.length;it+=1)for(;this.pdf.internal.getNumberOfPages()<z[it];)C.call(this);return z},C=function(){var A=this.fillStyle,O=this.strokeStyle,D=this.font,z=this.lineCap,V=this.lineWidth,X=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=O,this.font=D,this.lineCap=z,this.lineWidth=V,this.lineJoin=X},Y=function(A,O,D){for(var z=0;z<A.length;z++)switch(A[z].type){case"bct":A[z].x2+=O,A[z].y2+=D;case"qct":A[z].x1+=O,A[z].y1+=D;default:A[z].x+=O,A[z].y+=D}return A},K=function(A){return A.sort(function(O,D){return O-D})},tt=function(A,O){var D=this.fillStyle,z=this.strokeStyle,V=this.lineCap,X=this.lineWidth,nt=Math.abs(X*this.ctx.transform.scaleX),it=this.lineJoin;if(this.autoPaging){for(var ct,wt,_t=JSON.parse(JSON.stringify(this.path)),St=JSON.parse(JSON.stringify(this.path)),Tt=[],P=0;P<St.length;P++)if(St[P].x!==void 0)for(var Nt=M.call(this,St[P]),ae=0;ae<Nt.length;ae+=1)Tt.indexOf(Nt[ae])===-1&&Tt.push(Nt[ae]);for(var Ht=0;Ht<Tt.length;Ht++)for(;this.pdf.internal.getNumberOfPages()<Tt[Ht];)C.call(this);K(Tt);for(var bt=Tt[0],Wt=Tt[Tt.length-1],Ct=bt;Ct<Wt+1;Ct++){this.pdf.setPage(Ct),this.fillStyle=D,this.strokeStyle=z,this.lineCap=V,this.lineWidth=nt,this.lineJoin=it;var zt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],qt=Ct===1?this.posY+this.margin[0]:this.margin[0],me=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],he=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Zt=Ct===1?0:me+(Ct-2)*he;if(this.ctx.clip_path.length!==0){var fe=this.path;ct=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(ct,this.posX+this.margin[3],-Zt+qt+this.ctx.prevPageLastElemOffset),gt.call(this,A,!0),this.path=fe}if(wt=JSON.parse(JSON.stringify(_t)),this.path=Y(wt,this.posX+this.margin[3],-Zt+qt+this.ctx.prevPageLastElemOffset),O===!1||Ct===0){var le=(Ct>bt||Ct<Wt)&&j.call(this);le&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],zt,he,null).clip().discardPath()),gt.call(this,A,O),le&&this.pdf.restoreGraphicsState()}this.lineWidth=X}this.path=_t}else this.lineWidth=nt,gt.call(this,A,O),this.lineWidth=X},gt=function(A,O){if((A!=="stroke"||O||!B.call(this))&&(A==="stroke"||O||!g.call(this))){for(var D,z,V=[],X=this.path,nt=0;nt<X.length;nt++){var it=X[nt];switch(it.type){case"begin":V.push({begin:!0});break;case"close":V.push({close:!0});break;case"mt":V.push({start:it,deltas:[],abs:[]});break;case"lt":var ct=V.length;if(X[nt-1]&&!isNaN(X[nt-1].x)&&(D=[it.x-X[nt-1].x,it.y-X[nt-1].y],ct>0)){for(;ct>=0;ct--)if(V[ct-1].close!==!0&&V[ct-1].begin!==!0){V[ct-1].deltas.push(D),V[ct-1].abs.push(it);break}}break;case"bct":D=[it.x1-X[nt-1].x,it.y1-X[nt-1].y,it.x2-X[nt-1].x,it.y2-X[nt-1].y,it.x-X[nt-1].x,it.y-X[nt-1].y],V[V.length-1].deltas.push(D);break;case"qct":var wt=X[nt-1].x+2/3*(it.x1-X[nt-1].x),_t=X[nt-1].y+2/3*(it.y1-X[nt-1].y),St=it.x+2/3*(it.x1-it.x),Tt=it.y+2/3*(it.y1-it.y),P=it.x,Nt=it.y;D=[wt-X[nt-1].x,_t-X[nt-1].y,St-X[nt-1].x,Tt-X[nt-1].y,P-X[nt-1].x,Nt-X[nt-1].y],V[V.length-1].deltas.push(D);break;case"arc":V.push({deltas:[],abs:[],arc:!0}),Array.isArray(V[V.length-1].abs)&&V[V.length-1].abs.push(it)}}z=O?null:A==="stroke"?"stroke":"fill";for(var ae=!1,Ht=0;Ht<V.length;Ht++)if(V[Ht].arc)for(var bt=V[Ht].abs,Wt=0;Wt<bt.length;Wt++){var Ct=bt[Wt];Ct.type==="arc"?et.call(this,Ct.x,Ct.y,Ct.radius,Ct.startAngle,Ct.endAngle,Ct.counterclockwise,void 0,O,!ae):q.call(this,Ct.x,Ct.y),ae=!0}else if(V[Ht].close===!0)this.pdf.internal.out("h"),ae=!1;else if(V[Ht].begin!==!0){var zt=V[Ht].start.x,qt=V[Ht].start.y;T.call(this,V[Ht].deltas,zt,qt),ae=!0}z&&U.call(this,z),O&&dt.call(this)}},xt=function(A){var O=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,D=O*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-D;case"top":return A+O-D;case"hanging":return A+O-2*D;case"middle":return A+O/2-D;default:return A}},Pt=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};y.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(O,D){this.colorStops.push([O,D])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},y.prototype.createPattern=function(){return this.createLinearGradient()},y.prototype.createRadialGradient=function(){return this.createLinearGradient()};var et=function(A,O,D,z,V,X,nt,it,ct){for(var wt=at.call(this,D,z,V,X),_t=0;_t<wt.length;_t++){var St=wt[_t];_t===0&&(ct?_.call(this,St.x1+A,St.y1+O):q.call(this,St.x1+A,St.y1+O)),rt.call(this,A,O,St.x2,St.y2,St.x3,St.y3,St.x4,St.y4)}it?dt.call(this):U.call(this,nt)},U=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},dt=function(){this.pdf.clip(),this.pdf.discardPath()},_=function(A,O){this.pdf.internal.out(r(A)+" "+n(O)+" m")},E=function(A){var O;switch(A.align){case"right":case"end":O="right";break;case"center":O="center";break;default:O="left"}var D,z,V,X=this.pdf.getTextDimensions(A.text),nt=xt.call(this,A.y),it=Pt.call(this,nt)-X.h,ct=this.ctx.transform.applyToPoint(new f(A.x,nt));if(this.autoPaging){var wt=this.ctx.transform.decompose(),_t=new h;_t=(_t=(_t=_t.multiply(wt.translate)).multiply(wt.skew)).multiply(wt.scale);for(var St=this.ctx.transform.applyToRectangle(new u(A.x,nt,X.w,X.h)),Tt=_t.applyToRectangle(new u(A.x,it,X.w,X.h)),P=M.call(this,Tt),Nt=[],ae=0;ae<P.length;ae+=1)Nt.indexOf(P[ae])===-1&&Nt.push(P[ae]);K(Nt);for(var Ht=Nt[0],bt=Nt[Nt.length-1],Wt=Ht;Wt<bt+1;Wt++){this.pdf.setPage(Wt);var Ct=Wt===1?this.posY+this.margin[0]:this.margin[0],zt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qt=this.pdf.internal.pageSize.height-this.margin[2],me=qt-this.margin[0],he=this.pdf.internal.pageSize.width-this.margin[1],Zt=he-this.margin[3],fe=Wt===1?0:zt+(Wt-2)*me;if(this.ctx.clip_path.length!==0){var le=this.path;D=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Y(D,this.posX+this.margin[3],-1*fe+Ct),gt.call(this,"fill",!0),this.path=le}var Bt=Y([JSON.parse(JSON.stringify(Tt))],this.posX+this.margin[3],-fe+Ct+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*A.scale),V=this.lineWidth,this.lineWidth=V*A.scale);var re=this.autoPaging!=="text";if(re||Bt.y+Bt.h<=qt){if(re||Bt.y>=Ct&&Bt.x<=he){var Dt=re?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||he-Bt.x)[0],Ue=Y([JSON.parse(JSON.stringify(St))],this.posX+this.margin[3],-fe+Ct+this.ctx.prevPageLastElemOffset)[0],ge=re&&(Wt>Ht||Wt<bt)&&j.call(this);ge&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Zt,me,null).clip().discardPath()),this.pdf.text(Dt,Ue.x,Ue.y,{angle:A.angle,align:O,renderingMode:A.renderingMode}),ge&&this.pdf.restoreGraphicsState()}}else Bt.y<qt&&(this.ctx.prevPageLastElemOffset+=qt-Bt.y);A.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=V)}}else A.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*A.scale),V=this.lineWidth,this.lineWidth=V*A.scale),this.pdf.text(A.text,ct.x+this.posX,ct.y+this.posY,{angle:A.angle,align:O,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=V)},q=function(A,O,D,z){D=D||0,z=z||0,this.pdf.internal.out(r(A+D)+" "+n(O+z)+" l")},T=function(A,O,D){return this.pdf.lines(A,O,D,null,null)},rt=function(A,O,D,z,V,X,nt,it){this.pdf.internal.out([t(a(D+A)),t(o(z+O)),t(a(V+A)),t(o(X+O)),t(a(nt+A)),t(o(it+O)),"c"].join(" "))},at=function(A,O,D,z){for(var V=2*Math.PI,X=Math.PI/2;O>D;)O-=V;var nt=Math.abs(D-O);nt<V&&z&&(nt=V-nt);for(var it=[],ct=z?-1:1,wt=O;nt>1e-5;){var _t=wt+ct*Math.min(nt,X);it.push(ut.call(this,A,wt,_t)),nt-=Math.abs(_t-wt),wt=_t}return it},ut=function(A,O,D){var z=(D-O)/2,V=A*Math.cos(z),X=A*Math.sin(z),nt=V,it=-X,ct=nt*nt+it*it,wt=ct+nt*V+it*X,_t=4/3*(Math.sqrt(2*ct*wt)-wt)/(nt*X-it*V),St=nt-_t*it,Tt=it+_t*nt,P=St,Nt=-Tt,ae=z+O,Ht=Math.cos(ae),bt=Math.sin(ae);return{x1:A*Math.cos(O),y1:A*Math.sin(O),x2:St*Ht-Tt*bt,y2:St*bt+Tt*Ht,x3:P*Ht-Nt*bt,y3:P*bt+Nt*Ht,x4:A*Math.cos(D),y4:A*Math.sin(D)}},Q=function(A){return 180*A/Math.PI},lt=function(A,O,D,z,V,X){var nt=A+.5*(D-A),it=O+.5*(z-O),ct=V+.5*(D-V),wt=X+.5*(z-X),_t=Math.min(A,V,nt,ct),St=Math.max(A,V,nt,ct),Tt=Math.min(O,X,it,wt),P=Math.max(O,X,it,wt);return new u(_t,Tt,St-_t,P-Tt)},At=function(A,O,D,z,V,X,nt,it){var ct,wt,_t,St,Tt,P,Nt,ae,Ht,bt,Wt,Ct,zt,qt,me=D-A,he=z-O,Zt=V-D,fe=X-z,le=nt-V,Bt=it-X;for(wt=0;wt<41;wt++)Ht=(Nt=(_t=A+(ct=wt/40)*me)+ct*((Tt=D+ct*Zt)-_t))+ct*(Tt+ct*(V+ct*le-Tt)-Nt),bt=(ae=(St=O+ct*he)+ct*((P=z+ct*fe)-St))+ct*(P+ct*(X+ct*Bt-P)-ae),wt==0?(Wt=Ht,Ct=bt,zt=Ht,qt=bt):(Wt=Math.min(Wt,Ht),Ct=Math.min(Ct,bt),zt=Math.max(zt,Ht),qt=Math.max(qt,bt));return new u(Math.round(Wt),Math.round(Ct),Math.round(zt-Wt),Math.round(qt-Ct))},mt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,O,D=(A=this.ctx.lineDash,O=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:O}));this.prevLineDash!==D&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=D)}}})(Rt.API),(function(e){var t=function(f){var u,h,d,v,y,N,g,B,j,M;for(h=[],d=0,v=(f+=u="\0\0\0\0".slice(f.length%4||4)).length;v>d;d+=4)(y=(f.charCodeAt(d)<<24)+(f.charCodeAt(d+1)<<16)+(f.charCodeAt(d+2)<<8)+f.charCodeAt(d+3))!==0?(N=(y=((y=((y=((y=(y-(M=y%85))/85)-(j=y%85))/85)-(B=y%85))/85)-(g=y%85))/85)%85,h.push(N+33,g+33,B+33,j+33,M+33)):h.push(122);return(function(C,Y){for(var K=Y;K>0;K--)C.pop()})(h,u.length),String.fromCharCode.apply(String,h)+"~>"},r=function(f){var u,h,d,v,y,N=String,g="length",B=255,j="charCodeAt",M="slice",C="replace";for(f[M](-2),f=f[M](0,-2)[C](/\s/g,"")[C]("z","!!!!!"),d=[],v=0,y=(f+=u="uuuuu"[M](f[g]%5||5))[g];y>v;v+=5)h=52200625*(f[j](v)-33)+614125*(f[j](v+1)-33)+7225*(f[j](v+2)-33)+85*(f[j](v+3)-33)+(f[j](v+4)-33),d.push(B&h>>24,B&h>>16,B&h>>8,B&h);return(function(Y,K){for(var tt=K;tt>0;tt--)Y.pop()})(d,u[g]),N.fromCharCode.apply(N,d)},n=function(f){return f.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(f){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((f=f.replace(/\s/g,"")).indexOf(">")!==-1&&(f=f.substr(0,f.indexOf(">"))),f.length%2&&(f+="0"),u.test(f)===!1)return"";for(var h="",d=0;d<f.length;d+=2)h+=String.fromCharCode("0x"+(f[d]+f[d+1]));return h},o=function(f){for(var u=new Uint8Array(f.length),h=f.length;h--;)u[h]=f.charCodeAt(h);return(u=Ss(u)).reduce(function(d,v){return d+String.fromCharCode(v)},"")};e.processDataByFilters=function(f,u){var h=0,d=f||"",v=[];for(typeof(u=u||[])=="string"&&(u=[u]),h=0;h<u.length;h+=1)switch(u[h]){case"ASCII85Decode":case"/ASCII85Decode":d=r(d),v.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=t(d),v.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=a(d),v.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=n(d),v.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=o(d),v.push("/FlateDecode");break;default:throw new Error('The filter: "'+u[h]+'" is not implemented')}return{data:d,reverseChain:v.reverse().join(" ")}}})(Rt.API),(function(e){e.loadFile=function(t,r,n){return(function(a,o,f){o=o!==!1,f=typeof f=="function"?f:function(){};var u=void 0;try{u=(function(h,d,v){var y=new XMLHttpRequest,N=0,g=function(B){var j=B.length,M=[],C=String.fromCharCode;for(N=0;N<j;N+=1)M.push(C(255&B.charCodeAt(N)));return M.join("")};if(y.open("GET",h,!d),y.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(y.onload=function(){y.status===200?v(g(this.responseText)):v(void 0)}),y.send(null),d&&y.status===200)return g(y.responseText)})(a,o,f)}catch{}return u})(t,r,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile})(Rt.API),(function(e){function t(){return(Kt.html2canvas?Promise.resolve(Kt.html2canvas):is(()=>import("./html2canvas.esm-B0tyYwQk.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function r(){return(Kt.DOMPurify?Promise.resolve(Kt.DOMPurify):is(()=>import("./purify.es-BgtpMKW3.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load dompurify: "+u))}).then(function(u){return u.default?u.default:u})}var n=function(u){var h=xe(u);return h==="undefined"?"undefined":h==="string"||u instanceof String?"string":h==="number"||u instanceof Number?"number":h==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":h==="object"?"object":"unknown"},a=function(u,h){var d=document.createElement(u);for(var v in h.className&&(d.className=h.className),h.innerHTML&&h.dompurify&&(d.innerHTML=h.dompurify.sanitize(h.innerHTML)),h.style)d.style[v]=h.style[v];return d},o=function u(h,d){for(var v=h.nodeType===3?document.createTextNode(h.nodeValue):h.cloneNode(!1),y=h.firstChild;y;y=y.nextSibling)d!==!0&&y.nodeType===1&&y.nodeName==="SCRIPT"||v.appendChild(u(y,d));return h.nodeType===1&&(h.nodeName==="CANVAS"?(v.width=h.width,v.height=h.height,v.getContext("2d").drawImage(h,0,0)):h.nodeName!=="TEXTAREA"&&h.nodeName!=="SELECT"||(v.value=h.value),v.addEventListener("load",function(){v.scrollTop=h.scrollTop,v.scrollLeft=h.scrollLeft},!0)),v},f=function u(h){var d=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),v=u.convert(Promise.resolve(),d);return(v=v.setProgress(1,u,1,[u])).set(h)};(f.prototype=Object.create(Promise.prototype)).constructor=f,f.convert=function(u,h){return u.__proto__=h||f.prototype,u},f.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},f.prototype.from=function(u,h){return this.then(function(){switch(h=h||(function(d){switch(n(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(u),h){case"string":return this.then(r).then(function(d){return this.set({src:a("div",{innerHTML:u,dompurify:d})})});case"element":return this.set({src:u});case"canvas":return this.set({canvas:u});case"img":return this.set({img:u});default:return this.error("Unknown source type.")}})},f.prototype.to=function(u){switch(u){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},f.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var u={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},h=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);h.tagName==="BODY"&&(u.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:u}),this.prop.container.appendChild(h),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},f.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,h(this.prop.container,d)}).then(function(h){(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},f.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var d=this.opt.jsPDF,v=this.opt.fontFaces,y=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,N=Object.assign({async:!0,allowTaint:!0,scale:y,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete N.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=v,v)for(var g=0;g<v.length;++g){var B=v[g],j=B.src.find(function(M){return M.format==="truetype"});j&&d.addFont(j.url,B.ref.name,B.ref.style)}return N.windowHeight=N.windowHeight||0,N.windowHeight=N.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):N.windowHeight,d.context2d.save(!0),h(this.prop.container,N)}).then(function(h){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},f.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var u=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=u})},f.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},f.prototype.output=function(u,h,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(u,h):this.outputPdf(u,h)},f.prototype.outputPdf=function(u,h){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(u,h)})},f.prototype.outputImg=function(u){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(u){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+u+'" is not supported.'}})},f.prototype.save=function(u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(u?{filename:u}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},f.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},f.prototype.set=function(u){if(n(u)!=="object")return this;var h=Object.keys(u||{}).map(function(d){if(d in f.template.prop)return function(){this.prop[d]=u[d]};switch(d){case"margin":return this.setMargin.bind(this,u.margin);case"jsPDF":return function(){return this.opt.jsPDF=u.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,u.pageSize);default:return function(){this.opt[d]=u[d]}}},this);return this.then(function(){return this.thenList(h)})},f.prototype.get=function(u,h){return this.then(function(){var d=u in f.template.prop?this.prop[u]:this.opt[u];return h?h(d):d})},f.prototype.setMargin=function(u){return this.then(function(){switch(n(u)){case"number":u=[u,u,u,u];case"array":if(u.length===2&&(u=[u[0],u[1],u[0],u[1]]),u.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=u}).then(this.setPageSize)},f.prototype.setPageSize=function(u){function h(d,v){return Math.floor(d*v/72*96)}return this.then(function(){(u=u||Rt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(u.inner={width:u.width-this.opt.margin[1]-this.opt.margin[3],height:u.height-this.opt.margin[0]-this.opt.margin[2]},u.inner.px={width:h(u.inner.width,u.k),height:h(u.inner.height,u.k)},u.inner.ratio=u.inner.height/u.inner.width),this.prop.pageSize=u})},f.prototype.setProgress=function(u,h,d,v){return u!=null&&(this.progress.val=u),h!=null&&(this.progress.state=h),d!=null&&(this.progress.n=d),v!=null&&(this.progress.stack=v),this.progress.ratio=this.progress.val/this.progress.state,this},f.prototype.updateProgress=function(u,h,d,v){return this.setProgress(u?this.progress.val+u:null,h||null,d?this.progress.n+d:null,v?this.progress.stack.concat(v):null)},f.prototype.then=function(u,h){var d=this;return this.thenCore(u,h,function(v,y){return d.updateProgress(null,null,1,[v]),Promise.prototype.then.call(this,function(N){return d.updateProgress(null,v),N}).then(v,y).then(function(N){return d.updateProgress(1),N})})},f.prototype.thenCore=function(u,h,d){d=d||Promise.prototype.then;var v=this;u&&(u=u.bind(v)),h&&(h=h.bind(v));var y=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?v:f.convert(Object.assign({},v),Promise.prototype),N=d.call(y,u,h);return f.convert(N,v.__proto__)},f.prototype.thenExternal=function(u,h){return Promise.prototype.then.call(this,u,h)},f.prototype.thenList=function(u){var h=this;return u.forEach(function(d){h=h.thenCore(d)}),h},f.prototype.catch=function(u){u&&(u=u.bind(this));var h=Promise.prototype.catch.call(this,u);return f.convert(h,this)},f.prototype.catchExternal=function(u){return Promise.prototype.catch.call(this,u)},f.prototype.error=function(u){return this.then(function(){throw new Error(u)})},f.prototype.using=f.prototype.set,f.prototype.saveAs=f.prototype.save,f.prototype.export=f.prototype.output,f.prototype.run=f.prototype.then,Rt.getPageSize=function(u,h,d){if(xe(u)==="object"){var v=u;u=v.orientation,h=v.unit||h,d=v.format||d}h=h||"mm",d=d||"a4",u=(""+(u||"P")).toLowerCase();var y,N=(""+d).toLowerCase(),g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(h){case"pt":y=1;break;case"mm":y=72/25.4;break;case"cm":y=72/2.54;break;case"in":y=72;break;case"px":y=.75;break;case"pc":case"em":y=12;break;case"ex":y=6;break;default:throw"Invalid unit: "+h}var B,j=0,M=0;if(g.hasOwnProperty(N))j=g[N][1]/y,M=g[N][0]/y;else try{j=d[1],M=d[0]}catch{throw new Error("Invalid format: "+d)}if(u==="p"||u==="portrait")u="p",M>j&&(B=M,M=j,j=B);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",j>M&&(B=M,M=j,j=B)}return{width:M,height:j,unit:h,k:y,orientation:u}},e.html=function(u,h){(h=h||{}).callback=h.callback||function(){},h.html2canvas=h.html2canvas||{},h.html2canvas.canvas=h.html2canvas.canvas||this.canvas,h.jsPDF=h.jsPDF||this,h.fontFaces=h.fontFaces?h.fontFaces.map(ps):null;var d=new f(h);return h.worker?d:d.from(u).doCallback()}})(Rt.API),Rt.API.addJS=function(e){var t,r,n=(function(a){for(var o="",f=0;f<a.length;f++){var u=a[f];if(u==="("||u===")"){for(var h=0,d=f-1;d>=0&&a[d]==="\\";d--)h++;o+=h%2==0?"\\"+u:u}else o+=u}return o})(e);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&r!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},(function(e){var t;e.events.push(["postPutResources",function(){var r=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var a=r.outline.render().split(/\r\n/),o=0;o<a.length;o++){var f=a[o],u=n.exec(f);if(u!=null){var h=u[1];r.internal.newObjectDeferredBegin(h,!1)}r.internal.write(f)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,v=[];for(o=0;o<d;o++){var y=r.internal.newObject();v.push(y);var N=r.internal.getPageInfo(o+1);r.internal.write("<< /D["+N.objId+" 0 R /XYZ null null null]>> endobj")}var g=r.internal.newObject();for(r.internal.write("<< /Names [ "),o=0;o<v.length;o++)r.internal.write("(page_"+(o+1)+")"+v[o]+" 0 R");r.internal.write(" ] >>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+g+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var r=this;r.outline.root.children.length>0&&(r.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&r.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(n,a,o){var f={title:a,options:o,children:[]};return n==null&&(n=this.root),n.children.push(f),f},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(n){n.id=r.internal.newObjectDeferred();for(var a=0;a<n.children.length;a++)this.genIds_r(n.children[a])},r.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},r.outline.renderItems=function(n){for(var a=this.ctx.pdf.internal.getVerticalCoordinateString,o=0;o<n.children.length;o++){var f=n.children[o];this.objStart(f),this.line("/Title "+this.makeString(f.title)),this.line("/Parent "+this.makeRef(n)),o>0&&this.line("/Prev "+this.makeRef(n.children[o-1])),o<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[o+1])),f.children.length>0&&(this.line("/First "+this.makeRef(f.children[0])),this.line("/Last "+this.makeRef(f.children[f.children.length-1])));var u=this.count=this.count_r({count:0},f);if(u>0&&this.line("/Count "+u),f.options&&f.options.pageNumber){var h=r.internal.getPageInfo(f.options.pageNumber);this.line("/Dest ["+h.objId+" 0 R /XYZ 0 "+a(0)+" 0]")}this.objEnd()}for(var d=0;d<n.children.length;d++)this.renderItems(n.children[d])},r.outline.line=function(n){this.ctx.val+=n+`\r
|
||
`},r.outline.makeRef=function(n){return n.id+" 0 R"},r.outline.makeString=function(n){return"("+r.internal.pdfEscape(n)+")"},r.outline.objStart=function(n){this.ctx.val+=`\r
|
||
`+n.id+` 0 obj\r
|
||
<<\r
|
||
`},r.outline.objEnd=function(){this.ctx.val+=`>> \r
|
||
endobj\r
|
||
`},r.outline.count_r=function(n,a){for(var o=0;o<a.children.length;o++)n.count++,this.count_r(n,a.children[o]);return n.count}}])})(Rt.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(r,n,a,o,f,u){var h,d=this.decode.DCT_DECODE,v=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=f||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,h=(function(y){for(var N,g=256*y.charCodeAt(4)+y.charCodeAt(5),B=y.length,j={width:0,height:0,numcomponents:1},M=4;M<B;M+=2){if(M+=g,t.indexOf(y.charCodeAt(M+1))!==-1){N=256*y.charCodeAt(M+5)+y.charCodeAt(M+6),j={width:256*y.charCodeAt(M+7)+y.charCodeAt(M+8),height:N,numcomponents:y.charCodeAt(M+9)};break}g=256*y.charCodeAt(M+2)+y.charCodeAt(M+3)}return j})(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r),h.numcomponents){case 1:u=this.color_spaces.DEVICE_GRAY;break;case 4:u=this.color_spaces.DEVICE_CMYK;break;case 3:u=this.color_spaces.DEVICE_RGB}v={data:r,width:h.width,height:h.height,colorSpace:u,bitsPerComponent:8,filter:d,index:n,alias:a}}return v}})(Rt.API),Rt.API.processPNG=function(e,t,r,n){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var a,o=Af(e,{checkCrc:!0}),f=o.width,u=o.height,h=o.channels,d=o.palette,v=o.depth;a=d&&h===1?(function(et){for(var U=et.width,dt=et.height,_=et.data,E=et.palette,q=et.depth,T=!1,rt=[],at=[],ut=void 0,Q=!1,lt=0,At=0;At<E.length;At++){var mt=Su(E[At],4),A=mt[0],O=mt[1],D=mt[2],z=mt[3];rt.push(A,O,D),z!=null&&(z===0?(lt++,at.length<1&&at.push(At)):z<255&&(Q=!0))}if(Q||lt>1){T=!0,at=void 0;var V=U*dt;ut=new Uint8Array(V);for(var X=new DataView(_.buffer),nt=0;nt<V;nt++){var it=vs(X,nt,q),ct=Su(E[it],4)[3];ut[nt]=ct}}else lt===0&&(at=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:T?8:void 0,colorBytes:_,alphaBytes:ut,needSMask:T,palette:rt,mask:at}})(o):h===2||h===4?(function(et){for(var U=et.data,dt=et.width,_=et.height,E=et.channels,q=et.depth,T=E===2?"DeviceGray":"DeviceRGB",rt=E-1,at=dt*_,ut=rt,Q=at*ut,lt=1*at,At=Math.ceil(Q*q/8),mt=Math.ceil(lt*q/8),A=new Uint8Array(At),O=new Uint8Array(mt),D=new DataView(U.buffer),z=new DataView(A.buffer),V=new DataView(O.buffer),X=!1,nt=0;nt<at;nt++){for(var it=nt*E,ct=0;ct<ut;ct++)$u(z,vs(D,it+ct,q),nt*ut+ct,q);var wt=vs(D,it+ut,q);wt<(1<<q)-1&&(X=!0),$u(V,wt,1*nt,q)}return{colorSpace:T,colorsPerPixel:rt,sMaskBitsPerComponent:X?q:void 0,colorBytes:A,alphaBytes:O,needSMask:X}})(o):(function(et){var U=et.data,dt=et.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:dt,colorsPerPixel:dt==="DeviceGray"?1:3,colorBytes:U instanceof Uint16Array?(function(_){for(var E=_.length,q=new Uint8Array(2*E),T=new DataView(q.buffer,q.byteOffset,q.byteLength),rt=0;rt<E;rt++)T.setUint16(2*rt,_[rt],!1);return q})(U):U,needSMask:!1}})(o);var y,N,g,B=a,j=B.colorSpace,M=B.colorsPerPixel,C=B.sMaskBitsPerComponent,Y=B.colorBytes,K=B.alphaBytes,tt=B.needSMask,gt=B.palette,xt=B.mask,Pt=null;return n!==Rt.API.image_compression.NONE&&typeof Ss=="function"?(Pt=(function(et){var U;switch(et){case Rt.API.image_compression.FAST:U=11;break;case Rt.API.image_compression.MEDIUM:U=13;break;case Rt.API.image_compression.SLOW:U=14;break;default:U=12}return U})(n),y=this.decode.FLATE_DECODE,N="/Predictor ".concat(Pt," /Colors ").concat(M," /BitsPerComponent ").concat(v," /Columns ").concat(f),e=Gu(Y,Math.ceil(f*M*v/8),M,v,n),tt&&(g=Gu(K,Math.ceil(f*C/8),1,C,n))):(y=void 0,N=void 0,e=Y,tt&&(g=K)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(g&&this.__addimage__.isArrayBuffer(g)||this.__addimage__.isArrayBufferView(g))&&(g=this.__addimage__.arrayBufferToBinaryString(g)),{alias:r,data:e,index:t,filter:y,decodeParameters:N,transparency:xt,palette:gt,sMask:g,predictor:Pt,width:f,height:u,bitsPerComponent:v,sMaskBitsPerComponent:C,colorSpace:j}}},(function(e){e.processGIF89A=function(t,r,n,a){var o=new Hf(t),f=o.width,u=o.height,h=[];o.decodeAndBlitFrameRGBA(0,h);var d={data:h,width:f,height:u},v=new ms(100).encode(d,100);return e.processJPEG.call(this,v,r,n,a)},e.processGIF87A=e.processGIF89A})(Rt.API),Kr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:a,green:n,blue:r,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Kr.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[e]()}catch(r){Se.log("bit decode error:"+r)}},Kr.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,a=0;a<t;a++)for(var o=this.datav.getUint8(this.pos++,!0),f=n*this.width*4+8*a*4,u=0;u<8&&8*a+u<this.width;u++){var h=this.palette[o>>7-u&1];this.data[f+4*u]=h.blue,this.data[f+4*u+1]=h.green,this.data[f+4*u+2]=h.red,this.data[f+4*u+3]=255}r!==0&&(this.pos+=4-r)}},Kr.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<e;a++){var o=this.datav.getUint8(this.pos++,!0),f=n*this.width*4+2*a*4,u=o>>4,h=15&o,d=this.palette[u];if(this.data[f]=d.blue,this.data[f+1]=d.green,this.data[f+2]=d.red,this.data[f+3]=255,2*a+1>=this.width)break;d=this.palette[h],this.data[f+4]=d.blue,this.data[f+4+1]=d.green,this.data[f+4+2]=d.red,this.data[f+4+3]=255}t!==0&&(this.pos+=4-t)}},Kr.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+4*n;if(a<this.palette.length){var f=this.palette[a];this.data[o]=f.red,this.data[o+1]=f.green,this.data[o+2]=f.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}e!==0&&(this.pos+=4-e)}},Kr.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var f=(o&t)/t*255|0,u=(o>>5&t)/t*255|0,h=(o>>10&t)/t*255|0,d=o>>15?255:0,v=n*this.width*4+4*a;this.data[v]=h,this.data[v+1]=u,this.data[v+2]=f,this.data[v+3]=d}this.pos+=e}},Kr.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var f=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(f&t)/t*255|0,h=(f>>5&r)/r*255|0,d=(f>>11)/t*255|0,v=a*this.width*4+4*o;this.data[v]=d,this.data[v+1]=h,this.data[v+2]=u,this.data[v+3]=255}this.pos+=e}},Kr.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),f=t*this.width*4+4*r;this.data[f]=o,this.data[f+1]=a,this.data[f+2]=n,this.data[f+3]=255}this.pos+=this.width%4}},Kr.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),u=t*this.width*4+4*r;this.data[u]=o,this.data[u+1]=a,this.data[u+2]=n,this.data[u+3]=f}},Kr.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,r,n,a){var o=new Kr(t,!1),f=o.width,u=o.height,h={data:o.getData(),width:f,height:u},d=new ms(100).encode(h,100);return e.processJPEG.call(this,d,r,n,a)}})(Rt.API),Qu.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,r,n,a){var o=new Qu(t),f=o.width,u=o.height,h={data:o.getData(),width:f,height:u},d=new ms(100).encode(h,100);return e.processJPEG.call(this,d,r,n,a)}})(Rt.API),Rt.API.processRGBA=function(e,t,r){for(var n=e.data,a=n.length,o=new Uint8Array(a/4*3),f=new Uint8Array(a/4),u=0,h=0,d=0;d<a;d+=4){var v=n[d],y=n[d+1],N=n[d+2],g=n[d+3];o[u++]=v,o[u++]=y,o[u++]=N,f[h++]=g}var B=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(f),data:B,index:t,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Rt.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Hi=Rt.API,uo=Hi.getCharWidthsArray=function(e,t){var r,n,a=(t=t||{}).font||this.internal.getFont(),o=t.fontSize||this.internal.getFontSize(),f=t.charSpace||this.internal.getCharSpace(),u=t.widths?t.widths:a.metadata.Unicode.widths,h=u.fof?u.fof:1,d=t.kerning?t.kerning:a.metadata.Unicode.kerning,v=d.fof?d.fof:1,y=t.doKerning!==!1,N=0,g=e.length,B=0,j=u[0]||h,M=[];for(r=0;r<g;r++)n=e.charCodeAt(r),typeof a.metadata.widthOfString=="function"?M.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(n))+f*(1e3/o)||0)/1e3):(N=y&&xe(d[n])==="object"&&!isNaN(parseInt(d[n][B],10))?d[n][B]/v:0,M.push((u[n]||j)/h+N)),B=n;return M},Hu=Hi.getStringUnitWidth=function(e,t){var r=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),a=t.charSpace||this.internal.getCharSpace();return Hi.processArabic&&(e=Hi.processArabic(e)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(e,r,a)/r:uo.apply(this,arguments).reduce(function(o,f){return o+f},0)},Wu=function(e,t,r,n){for(var a=[],o=0,f=e.length,u=0;o!==f&&u+t[o]<r;)u+=t[o],o++;a.push(e.slice(0,o));var h=o;for(u=0;o!==f;)u+t[o]>n&&(a.push(e.slice(h,o)),u=0,h=o),u+=t[o],o++;return h!==o&&a.push(e.slice(h,o)),a},Vu=function(e,t,r){r||(r={});var n,a,o,f,u,h,d,v=[],y=[v],N=r.textIndent||0,g=0,B=0,j=e.split(" "),M=uo.apply(this,[" ",r])[0];if(h=r.lineIndent===-1?j[0].length+2:r.lineIndent||0){var C=Array(h).join(" "),Y=[];j.map(function(tt){(tt=tt.split(/\s*\n/)).length>1?Y=Y.concat(tt.map(function(gt,xt){return(xt&>.length?`
|
||
`:"")+gt})):Y.push(tt[0])}),j=Y,h=Hu.apply(this,[C,r])}for(o=0,f=j.length;o<f;o++){var K=0;if(n=j[o],h&&n[0]==`
|
||
`&&(n=n.substr(1),K=1),N+g+(B=(a=uo.apply(this,[n,r])).reduce(function(tt,gt){return tt+gt},0))>t||K){if(B>t){for(u=Wu.apply(this,[n,a,t-(N+g),t]),v.push(u.shift()),v=[u.pop()];u.length;)y.push([u.shift()]);B=a.slice(n.length-(v[0]?v[0].length:0)).reduce(function(tt,gt){return tt+gt},0)}else v=[n];y.push(v),N=B+h,g=M}else v.push(n),N+=g+B,g=M}return d=h?function(tt,gt){return(gt?C:"")+tt.join(" ")}:function(tt){return tt.join(" ")},y.map(d)},Hi.splitTextToSize=function(e,t,r){var n,a=(r=r||{}).fontSize||this.internal.getFontSize(),o=function(v){if(v.widths&&v.kerning)return{widths:v.widths,kerning:v.kerning};var y=this.internal.getFont(v.fontName,v.fontStyle),N="Unicode";return y.metadata[N]?{widths:y.metadata[N].widths||{0:1},kerning:y.metadata[N].kerning||{}}:{font:y.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/a;o.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/a:0,o.lineIndent=r.lineIndent;var u,h,d=[];for(u=0,h=n.length;u<h;u++)d=d.concat(Vu.apply(this,[n[u],f,o]));return d},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",r="klmnopqrstuvwxyz",n={},a={},o=0;o<16;o++)n[r[o]]=t[o],a[t[o]]=r[o];var f=function(N){return"0x"+parseInt(N,10).toString(16)},u=e.__fontmetrics__.compress=function(N){var g,B,j,M,C=["{"];for(var Y in N){if(g=N[Y],isNaN(parseInt(Y,10))?B="'"+Y+"'":(Y=parseInt(Y,10),B=(B=f(Y).slice(2)).slice(0,-1)+a[B.slice(-1)]),typeof g=="number")g<0?(j=f(g).slice(3),M="-"):(j=f(g).slice(2),M=""),j=M+j.slice(0,-1)+a[j.slice(-1)];else{if(xe(g)!=="object")throw new Error("Don't know what to do with value type "+xe(g)+".");j=u(g)}C.push(B+j)}return C.push("}"),C.join("")},h=e.__fontmetrics__.uncompress=function(N){if(typeof N!="string")throw new Error("Invalid argument passed to uncompress.");for(var g,B,j,M,C={},Y=1,K=C,tt=[],gt="",xt="",Pt=N.length-1,et=1;et<Pt;et+=1)(M=N[et])=="'"?g?(j=g.join(""),g=void 0):g=[]:g?g.push(M):M=="{"?(tt.push([K,j]),K={},j=void 0):M=="}"?((B=tt.pop())[0][B[1]]=K,j=void 0,K=B[0]):M=="-"?Y=-1:j===void 0?n.hasOwnProperty(M)?(gt+=n[M],j=parseInt(gt,16)*Y,Y=1,gt=""):gt+=M:n.hasOwnProperty(M)?(xt+=n[M],K[j]=parseInt(xt,16)*Y,Y=1,j=void 0,xt=""):xt+=M;return C},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:h("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},v={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},y={Unicode:{"Courier-Oblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":h("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":h("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:h("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:h("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":h("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":h("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(N){var g=N.font,B=y.Unicode[g.postScriptName];B&&(g.metadata.Unicode={},g.metadata.Unicode.widths=B.widths,g.metadata.Unicode.kerning=B.kerning);var j=v.Unicode[g.postScriptName];j&&(g.metadata.Unicode.encoding=j,g.encoding=j.codePages[0])}])})(Rt.API),(function(e){var t=function(r){for(var n=r.length,a=new Uint8Array(n),o=0;o<n;o++)a[o]=r.charCodeAt(o);return a};e.API.events.push(["addFont",function(r){var n=void 0,a=r.font,o=r.instance;if(!a.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if(typeof(n=o.existsFileInVFS(a.postScriptName)===!1?o.loadFile(a.postScriptName):o.getFileFromVFS(a.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");(function(f,u){u=/^\x00\x01\x00\x00/.test(u)?t(u):t(lo(u)),f.metadata=e.API.TTFFont.open(u),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(a,n)}}])})(Rt),Rt.API.addSvgAsImage=function(e,t,r,n,a,o,f,u){if(isNaN(t)||isNaN(r))throw Se.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(a))throw Se.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=n,h.height=a;var d=h.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,h.width,h.height);var v={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},y=this;return(Kt.canvg?Promise.resolve(Kt.canvg):is(()=>import("./index.es-FRV-O2Jm.js"),__vite__mapDeps([0,1,2,3,4]))).catch(function(N){return Promise.reject(new Error("Could not load canvg: "+N))}).then(function(N){return N.default?N.default:N}).then(function(N){return N.fromString(d,e,v)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(N){return N.render(v)}).then(function(){y.addImage(h.toDataURL("image/jpeg",1),t,r,n,a,f,u)})},Rt.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var a=0;a<this.internal.pages[n].length;a++)this.internal.pages[n][a]=this.internal.pages[n][a].replace(t,r);return this},Rt.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var n,a,o,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(f),h=[],d=0,v=0,y=0;function N(B,j){var M,C=!1;for(M=0;M<B.length;M+=1)B[M]===j&&(C=!0);return C}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var g=u.length;for(y=0;y<g;y+=1)r[u[y]].value=r[u[y]].defaultValue,r[u[y]].explicitSet=!1}if(xe(e)==="object"){for(a in e)if(o=e[a],N(u,a)&&o!==void 0){if(r[a].type==="boolean"&&typeof o=="boolean")r[a].value=o;else if(r[a].type==="name"&&N(r[a].valueSet,o))r[a].value=o;else if(r[a].type==="integer"&&Number.isInteger(o))r[a].value=o;else if(r[a].type==="array"){for(d=0;d<o.length;d+=1)if(n=!0,o[d].length===1&&typeof o[d][0]=="number")h.push(String(o[d]-1));else if(o[d].length>1){for(v=0;v<o[d].length;v+=1)typeof o[d][v]!="number"&&(n=!1);n===!0&&h.push([o[d][0]-1,o[d][1]-1].join(" "))}r[a].value="["+h.join(" ")+"]"}else r[a].value=r[a].defaultValue;r[a].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var B,j=[];for(B in r)r[B].explicitSet===!0&&(r[B].type==="name"?j.push("/"+B+" /"+r[B].value):j.push("/"+B+" "+r[B].value));j.length!==0&&this.internal.write(`/ViewerPreferences
|
||
<<
|
||
`+j.join(`
|
||
`)+`
|
||
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},Rt.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",Vf),this.internal.events.subscribe("postPutResources",Wf)),this},(function(e){var t=e.API,r=t.pdfEscape16=function(o,f){for(var u,h=f.metadata.Unicode.widths,d=["","0","00","000","0000"],v=[""],y=0,N=o.length;y<N;++y){if(u=f.metadata.characterToGlyph(o.charCodeAt(y)),f.metadata.glyIdsUsed.push(u),f.metadata.toUnicode[u]=o.charCodeAt(y),h.indexOf(u)==-1&&(h.push(u),h.push([parseInt(f.metadata.widthOfGlyph(u),10)])),u=="0")return v.join("");u=u.toString(16),v.push(d[4-u.length],u)}return v.join("")},n=function(o){var f,u,h,d,v,y,N;for(v=`/CIDInit /ProcSet findresource begin
|
||
12 dict begin
|
||
begincmap
|
||
/CIDSystemInfo <<
|
||
/Registry (Adobe)
|
||
/Ordering (UCS)
|
||
/Supplement 0
|
||
>> def
|
||
/CMapName /Adobe-Identity-UCS def
|
||
/CMapType 2 def
|
||
1 begincodespacerange
|
||
<0000><ffff>
|
||
endcodespacerange`,h=[],y=0,N=(u=Object.keys(o).sort(function(g,B){return g-B})).length;y<N;y++)f=u[y],h.length>=100&&(v+=`
|
||
`+h.length+` beginbfchar
|
||
`+h.join(`
|
||
`)+`
|
||
endbfchar`,h=[]),o[f]!==void 0&&o[f]!==null&&typeof o[f].toString=="function"&&(d=("0000"+o[f].toString(16)).slice(-4),f=("0000"+(+f).toString(16)).slice(-4),h.push("<"+f+"><"+d+">"));return h.length&&(v+=`
|
||
`+h.length+` beginbfchar
|
||
`+h.join(`
|
||
`)+`
|
||
endbfchar
|
||
`),v+`endcmap
|
||
CMapName currentdict /CMap defineresource pop
|
||
end
|
||
end`};t.events.push(["putFont",function(o){(function(f){var u=f.font,h=f.out,d=f.newObject,v=f.putStream;if(u.metadata instanceof e.API.TTFFont&&u.encoding==="Identity-H"){for(var y=u.metadata.Unicode.widths,N=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),g="",B=0;B<N.length;B++)g+=String.fromCharCode(N[B]);var j=d();v({data:g,addLength1:!0,objectId:j}),h("endobj");var M=d();v({data:n(u.metadata.toUnicode),addLength1:!0,objectId:M}),h("endobj");var C=d();h("<<"),h("/Type /FontDescriptor"),h("/FontName /"+Vi(u.fontName)),h("/FontFile2 "+j+" 0 R"),h("/FontBBox "+e.API.PDFObject.convert(u.metadata.bbox)),h("/Flags "+u.metadata.flags),h("/StemV "+u.metadata.stemV),h("/ItalicAngle "+u.metadata.italicAngle),h("/Ascent "+u.metadata.ascender),h("/Descent "+u.metadata.decender),h("/CapHeight "+u.metadata.capHeight),h(">>"),h("endobj");var Y=d();h("<<"),h("/Type /Font"),h("/BaseFont /"+Vi(u.fontName)),h("/FontDescriptor "+C+" 0 R"),h("/W "+e.API.PDFObject.convert(y)),h("/CIDToGIDMap /Identity"),h("/DW 1000"),h("/Subtype /CIDFontType2"),h("/CIDSystemInfo"),h("<<"),h("/Supplement 0"),h("/Registry (Adobe)"),h("/Ordering ("+u.encoding+")"),h(">>"),h(">>"),h("endobj"),u.objectNumber=d(),h("<<"),h("/Type /Font"),h("/Subtype /Type0"),h("/ToUnicode "+M+" 0 R"),h("/BaseFont /"+Vi(u.fontName)),h("/Encoding /"+u.encoding),h("/DescendantFonts ["+Y+" 0 R]"),h(">>"),h("endobj"),u.isAlreadyPutted=!0}})(o)}]),t.events.push(["putFont",function(o){(function(f){var u=f.font,h=f.out,d=f.newObject,v=f.putStream;if(u.metadata instanceof e.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var y=u.metadata.rawData,N="",g=0;g<y.length;g++)N+=String.fromCharCode(y[g]);var B=d();v({data:N,addLength1:!0,objectId:B}),h("endobj");var j=d();v({data:n(u.metadata.toUnicode),addLength1:!0,objectId:j}),h("endobj");var M=d();h("<<"),h("/Descent "+u.metadata.decender),h("/CapHeight "+u.metadata.capHeight),h("/StemV "+u.metadata.stemV),h("/Type /FontDescriptor"),h("/FontFile2 "+B+" 0 R"),h("/Flags 96"),h("/FontBBox "+e.API.PDFObject.convert(u.metadata.bbox)),h("/FontName /"+Vi(u.fontName)),h("/ItalicAngle "+u.metadata.italicAngle),h("/Ascent "+u.metadata.ascender),h(">>"),h("endobj"),u.objectNumber=d();for(var C=0;C<u.metadata.hmtx.widths.length;C++)u.metadata.hmtx.widths[C]=parseInt(u.metadata.hmtx.widths[C]*(1e3/u.metadata.head.unitsPerEm));h("<</Subtype/TrueType/Type/Font/ToUnicode "+j+" 0 R/BaseFont/"+Vi(u.fontName)+"/FontDescriptor "+M+" 0 R/Encoding/"+u.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(u.metadata.hmtx.widths)+">>"),h("endobj"),u.isAlreadyPutted=!0}})(o)}]);var a=function(o){var f,u=o.text||"",h=o.x,d=o.y,v=o.options||{},y=o.mutex||{},N=y.pdfEscape,g=y.activeFontKey,B=y.fonts,j=g,M="",C=0,Y="",K=B[j].encoding;if(B[j].encoding!=="Identity-H")return{text:u,x:h,y:d,options:v,mutex:y};for(Y=u,j=g,Array.isArray(u)&&(Y=u[0]),C=0;C<Y.length;C+=1)B[j].metadata.hasOwnProperty("cmap")&&(f=B[j].metadata.cmap.unicode.codeMap[Y[C].charCodeAt(0)]),f||Y[C].charCodeAt(0)<256&&B[j].metadata.hasOwnProperty("Unicode")?M+=Y[C]:M+="";var tt="";return parseInt(j.slice(1))<14||K==="WinAnsiEncoding"?tt=N(M,j).split("").map(function(gt){return gt.charCodeAt(0).toString(16)}).join(""):K==="Identity-H"&&(tt=r(M,B[j])),y.isHex=!0,{text:tt,x:h,y:d,options:v,mutex:y}};t.events.push(["postProcessText",function(o){var f=o.text||"",u=[],h={text:f,x:o.x,y:o.y,options:o.options,mutex:o.mutex};if(Array.isArray(f)){var d=0;for(d=0;d<f.length;d+=1)Array.isArray(f[d])&&f[d].length===3?u.push([a(Object.assign({},h,{text:f[d][0]})).text,f[d][1],f[d][2]]):u.push(a(Object.assign({},h,{text:f[d]})).text);o.text=u}else o.text=a(Object.assign({},h,{text:f})).text}])})(Rt),(function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0},e.addFileToVFS=function(r,n){return t.call(this),this.internal.vFS[r]=n,this},e.getFileFromVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}})(Rt.API),(function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(n){var a,o,f,u,h,d,v,y=t,N=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],g=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],B={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},j={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},M=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],C=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),Y=!1,K=0;this.__bidiEngine__={};var tt=function(_){var E=_.charCodeAt(),q=E>>8,T=j[q];return T!==void 0?y[256*T+(255&E)]:q===252||q===253?"AL":C.test(q)?"L":q===8?"R":"N"},gt=function(_){for(var E,q=0;q<_.length;q++){if((E=tt(_.charAt(q)))==="L")return!1;if(E==="R")return!0}return!1},xt=function(_,E,q,T){var rt,at,ut,Q,lt=E[T];switch(lt){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":Y=!1;break;case"N":case"AN":break;case"EN":Y&&(lt="AN");break;case"AL":Y=!0,lt="R";break;case"WS":case"BN":lt="N";break;case"CS":T<1||T+1>=E.length||(rt=q[T-1])!=="EN"&&rt!=="AN"||(at=E[T+1])!=="EN"&&at!=="AN"?lt="N":Y&&(at="AN"),lt=at===rt?at:"N";break;case"ES":lt=(rt=T>0?q[T-1]:"B")==="EN"&&T+1<E.length&&E[T+1]==="EN"?"EN":"N";break;case"ET":if(T>0&&q[T-1]==="EN"){lt="EN";break}if(Y){lt="N";break}for(ut=T+1,Q=E.length;ut<Q&&E[ut]==="ET";)ut++;lt=ut<Q&&E[ut]==="EN"?"EN":"N";break;case"NSM":if(f&&!u){for(Q=E.length,ut=T+1;ut<Q&&E[ut]==="NSM";)ut++;if(ut<Q){var At=_[T],mt=At>=1425&&At<=2303||At===64286;if(rt=E[ut],mt&&(rt==="R"||rt==="AL")){lt="R";break}}}lt=T<1||(rt=E[T-1])==="B"?"N":q[T-1];break;case"B":Y=!1,a=!0,lt=K;break;case"S":o=!0,lt="N"}return lt},Pt=function(_,E,q){var T=_.split("");return q&&et(T,q,{hiLevel:K}),T.reverse(),E&&E.reverse(),T.join("")},et=function(_,E,q){var T,rt,at,ut,Q,lt=-1,At=_.length,mt=0,A=[],O=K?g:N,D=[];for(Y=!1,a=!1,o=!1,rt=0;rt<At;rt++)D[rt]=tt(_[rt]);for(at=0;at<At;at++){if(Q=mt,A[at]=xt(_,D,A,at),T=240&(mt=O[Q][B[A[at]]]),mt&=15,E[at]=ut=O[mt][5],T>0)if(T===16){for(rt=lt;rt<at;rt++)E[rt]=1;lt=-1}else lt=-1;if(O[mt][6])lt===-1&&(lt=at);else if(lt>-1){for(rt=lt;rt<at;rt++)E[rt]=ut;lt=-1}D[at]==="B"&&(E[at]=0),q.hiLevel|=ut}o&&(function(z,V,X){for(var nt=0;nt<X;nt++)if(z[nt]==="S"){V[nt]=K;for(var it=nt-1;it>=0&&z[it]==="WS";it--)V[it]=K}})(D,E,At)},U=function(_,E,q,T,rt){if(!(rt.hiLevel<_)){if(_===1&&K===1&&!a)return E.reverse(),void(q&&q.reverse());for(var at,ut,Q,lt,At=E.length,mt=0;mt<At;){if(T[mt]>=_){for(Q=mt+1;Q<At&&T[Q]>=_;)Q++;for(lt=mt,ut=Q-1;lt<ut;lt++,ut--)at=E[lt],E[lt]=E[ut],E[ut]=at,q&&(at=q[lt],q[lt]=q[ut],q[ut]=at);mt=Q}mt++}}},dt=function(_,E,q){var T=_.split(""),rt={hiLevel:K};return q||(q=[]),et(T,q,rt),(function(at,ut,Q){if(Q.hiLevel!==0&&v)for(var lt,At=0;At<at.length;At++)ut[At]===1&&(lt=M.indexOf(at[At]))>=0&&(at[At]=M[lt+1])})(T,q,rt),U(2,T,E,q,rt),U(1,T,E,q,rt),T.join("")};return this.__bidiEngine__.doBidiReorder=function(_,E,q){if((function(rt,at){if(at)for(var ut=0;ut<rt.length;ut++)at[ut]=ut;u===void 0&&(u=gt(rt)),d===void 0&&(d=gt(rt))})(_,E),f||!h||d)if(f&&h&&u^d)K=u?1:0,_=Pt(_,E,q);else if(!f&&h&&d)K=u?1:0,_=dt(_,E,q),_=Pt(_,E);else if(!f||u||h||d){if(f&&!h&&u^d)_=Pt(_,E),u?(K=0,_=dt(_,E,q)):(K=1,_=dt(_,E,q),_=Pt(_,E));else if(f&&u&&!h&&d)K=1,_=dt(_,E,q),_=Pt(_,E);else if(!f&&!h&&u^d){var T=v;u?(K=1,_=dt(_,E,q),K=0,v=!1,_=dt(_,E,q),v=T):(K=0,_=dt(_,E,q),_=Pt(_,E),K=1,v=!1,_=dt(_,E,q),v=T,_=Pt(_,E))}}else K=0,_=dt(_,E,q);else K=u?1:0,_=dt(_,E,q);return _},this.__bidiEngine__.setOptions=function(_){_&&(f=_.isInputVisual,h=_.isOutputVisual,u=_.isInputRtl,d=_.isOutputRtl,v=_.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(n){var a=n.text;n.x,n.y;var o=n.options||{};n.mutex,o.lang;var f=[];if(o.isInputVisual=typeof o.isInputVisual!="boolean"||o.isInputVisual,r.setOptions(o),Object.prototype.toString.call(a)==="[object Array]"){var u=0;for(f=[],u=0;u<a.length;u+=1)Object.prototype.toString.call(a[u])==="[object Array]"?f.push([r.doBidiReorder(a[u][0]),a[u][1],a[u][2]]):f.push([r.doBidiReorder(a[u])]);n.text=f}else n.text=r.doBidiReorder(a);r.setOptions({isInputVisual:!0})}])})(Rt),Rt.API.TTFFont=(function(){function e(t){var r;if(this.rawData=t,r=this.contents=new Jn(t),this.contents.pos=4,r.readString(4)==="ttcf")throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new oc(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new Gf(this.contents),this.head=new Jf(this),this.name=new Qf(this),this.cmap=new Oh(this),this.toUnicode={},this.hhea=new Kf(this),this.maxp=new tc(this),this.hmtx=new ec(this),this.post=new $f(this),this.os2=new Xf(this),this.loca=new ac(this),this.glyf=new rc(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var t,r,n,a,o;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var f,u,h,d;for(d=[],f=0,u=(h=this.bbox).length;f<u;f++)t=h[f],d.push(Math.round(t*this.scaleFactor));return d}.call(this),this.stemV=0,this.post.exists?(n=255&(a=this.post.italic_angle),32768&(r=a>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(o=this.familyClass)===1||o===2||o===3||o===4||o===5||o===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var r;return((r=this.cmap.unicode)!=null?r.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},e.prototype.widthOfString=function(t,r,n){var a,o,f,u;for(f=0,o=0,u=(t=""+t).length;0<=u?o<u:o>u;o=0<=u?++o:--o)a=t.charCodeAt(o),f+=this.widthOfGlyph(this.characterToGlyph(a))+n*(1e3/r)||0;return f*(r/1e3)},e.prototype.lineHeight=function(t,r){var n;return r==null&&(r=!1),n=r?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},e})();var Zr,Jn=(function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var r,n;for(n=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)n[r]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(t){var r,n,a;for(a=[],r=0,n=t.length;0<=n?r<n:r>n;r=0<=n?++r:--r)a.push(this.writeByte(t.charCodeAt(r)));return a},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,r,n,a,o,f,u,h;return t=this.readByte(),r=this.readByte(),n=this.readByte(),a=this.readByte(),o=this.readByte(),f=this.readByte(),u=this.readByte(),h=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^n)+4294967296*(255^a)+16777216*(255^o)+65536*(255^f)+256*(255^u)+(255^h)+1):72057594037927940*t+281474976710656*r+1099511627776*n+4294967296*a+16777216*o+65536*f+256*u+h},e.prototype.writeLongLong=function(t){var r,n;return r=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var r,n;for(r=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)r.push(this.readByte());return r},e.prototype.write=function(t){var r,n,a,o;for(o=[],n=0,a=t.length;n<a;n++)r=t[n],o.push(this.writeByte(r));return o},e})(),Gf=(function(){var e;function t(r){var n,a,o;for(this.scalarType=r.readInt(),this.tableCount=r.readShort(),this.searchRange=r.readShort(),this.entrySelector=r.readShort(),this.rangeShift=r.readShort(),this.tables={},a=0,o=this.tableCount;0<=o?a<o:a>o;a=0<=o?++a:--a)n={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[n.tag]=n}return t.prototype.encode=function(r){var n,a,o,f,u,h,d,v,y,N,g,B,j;for(j in g=Object.keys(r).length,h=Math.log(2),y=16*Math.floor(Math.log(g)/h),f=Math.floor(y/h),v=16*g-y,(a=new Jn).writeInt(this.scalarType),a.writeShort(g),a.writeShort(y),a.writeShort(f),a.writeShort(v),o=16*g,d=a.pos+o,u=null,B=[],r)for(N=r[j],a.writeString(j),a.writeInt(e(N)),a.writeInt(d),a.writeInt(N.length),B=B.concat(N),j==="head"&&(u=d),d+=N.length;d%4;)B.push(0),d++;return a.write(B),n=2981146554-e(a.data),a.pos=u+8,a.writeUInt32(n),a.data},e=function(r){var n,a,o,f;for(r=Bh.call(r);r.length%4;)r.push(0);for(o=new Jn(r),a=0,n=0,f=r.length;n<f;n=n+=4)a+=o.readUInt32();return 4294967295&a},t})(),Yf={}.hasOwnProperty,cn=function(e,t){for(var r in t)Yf.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};Zr=(function(){function e(t){var r;this.file=t,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e})();var Jf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var r;return(r=new Jn).writeInt(this.version),r.writeInt(this.revision),r.writeInt(this.checkSumAdjustment),r.writeInt(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.writeLongLong(this.created),r.writeLongLong(this.modified),r.writeShort(this.xMin),r.writeShort(this.yMin),r.writeShort(this.xMax),r.writeShort(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort(this.fontDirectionHint),r.writeShort(t),r.writeShort(this.glyphDataFormat),r.data},e})(),th=(function(){function e(t,r){var n,a,o,f,u,h,d,v,y,N,g,B,j,M,C,Y,K;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=r+t.readInt(),y=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(h=0;h<256;++h)this.codeMap[h]=t.readByte();break;case 4:for(g=t.readUInt16(),N=g/2,t.pos+=6,o=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?tt<N:tt>N;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),t.pos+=2,j=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?tt<N:tt>N;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),d=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?tt<N:tt>N;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),v=(function(){var tt,gt;for(gt=[],h=tt=0;0<=N?tt<N:tt>N;h=0<=N?++tt:--tt)gt.push(t.readUInt16());return gt})(),a=(this.length-t.pos+this.offset)/2,u=(function(){var tt,gt;for(gt=[],h=tt=0;0<=a?tt<a:tt>a;h=0<=a?++tt:--tt)gt.push(t.readUInt16());return gt})(),h=C=0,K=o.length;C<K;h=++C)for(M=o[h],n=Y=B=j[h];B<=M?Y<=M:Y>=M;n=B<=M?++Y:--Y)v[h]===0?f=n+d[h]:(f=u[v[h]/2+(n-B)-(N-h)]||0)!==0&&(f+=d[h]),this.codeMap[n]=65535&f}t.pos=y}return e.encode=function(t,r){var n,a,o,f,u,h,d,v,y,N,g,B,j,M,C,Y,K,tt,gt,xt,Pt,et,U,dt,_,E,q,T,rt,at,ut,Q,lt,At,mt,A,O,D,z,V,X,nt,it,ct,wt,_t;switch(T=new Jn,f=Object.keys(t).sort(function(St,Tt){return St-Tt}),r){case"macroman":for(j=0,M=(function(){var St=[];for(B=0;B<256;++B)St.push(0);return St})(),Y={0:0},o={},rt=0,lt=f.length;rt<lt;rt++)Y[it=t[a=f[rt]]]==null&&(Y[it]=++j),o[a]={old:t[a],new:Y[t[a]]},M[a]=Y[t[a]];return T.writeUInt16(1),T.writeUInt16(0),T.writeUInt32(12),T.writeUInt16(0),T.writeUInt16(262),T.writeUInt16(0),T.write(M),{charMap:o,subtable:T.data,maxGlyphID:j+1};case"unicode":for(E=[],y=[],K=0,Y={},n={},C=d=null,at=0,At=f.length;at<At;at++)Y[gt=t[a=f[at]]]==null&&(Y[gt]=++K),n[a]={old:gt,new:Y[gt]},u=Y[gt]-a,C!=null&&u===d||(C&&y.push(C),E.push(a),d=u),C=a;for(C&&y.push(C),y.push(65535),E.push(65535),dt=2*(U=E.length),et=2*Math.pow(Math.log(U)/Math.LN2,2),N=Math.log(et/2)/Math.LN2,Pt=2*U-et,h=[],xt=[],g=[],B=ut=0,mt=E.length;ut<mt;B=++ut){if(_=E[B],v=y[B],_===65535){h.push(0),xt.push(0);break}if(_-(q=n[_].new)>=32768)for(h.push(0),xt.push(2*(g.length+U-B)),a=Q=_;_<=v?Q<=v:Q>=v;a=_<=v?++Q:--Q)g.push(n[a].new);else h.push(q-_),xt.push(0)}for(T.writeUInt16(3),T.writeUInt16(1),T.writeUInt32(12),T.writeUInt16(4),T.writeUInt16(16+8*U+2*g.length),T.writeUInt16(0),T.writeUInt16(dt),T.writeUInt16(et),T.writeUInt16(N),T.writeUInt16(Pt),X=0,A=y.length;X<A;X++)a=y[X],T.writeUInt16(a);for(T.writeUInt16(0),nt=0,O=E.length;nt<O;nt++)a=E[nt],T.writeUInt16(a);for(ct=0,D=h.length;ct<D;ct++)u=h[ct],T.writeUInt16(u);for(wt=0,z=xt.length;wt<z;wt++)tt=xt[wt],T.writeUInt16(tt);for(_t=0,V=g.length;_t<V;_t++)j=g[_t],T.writeUInt16(j);return{charMap:n,subtable:T.data,maxGlyphID:K+1}}},e})(),Oh=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="cmap",e.prototype.parse=function(t){var r,n,a;for(t.pos=this.offset,this.version=t.readUInt16(),a=t.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=a?n<a:n>a;n=0<=a?++n:--n)r=new th(t,this.offset),this.tables.push(r),r.isUnicode&&this.unicode==null&&(this.unicode=r);return!0},e.encode=function(t,r){var n,a;return r==null&&(r="macroman"),n=th.encode(t,r),(a=new Jn).writeUInt16(0),a.writeUInt16(1),n.table=a.data.concat(n.subtable),n},e})(),Kf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e})(),Xf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var r,n;for(n=[],r=0;r<10;++r)n.push(t.readByte());return n})(),this.charRange=(function(){var r,n;for(n=[],r=0;r<4;++r)n.push(t.readInt());return n})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var r,n;for(n=[],r=0;r<2;r=++r)n.push(t.readInt());return n})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e})(),$f=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="post",e.prototype.parse=function(t){var r,n,a;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var o;for(n=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],a=[];t.pos<this.offset+this.length;)r=t.readByte(),a.push(this.names.push(t.readString(r)));return a;case 151552:return n=t.readUInt16(),this.offsets=t.read(n);case 262144:return this.map=function(){var f,u,h;for(h=[],o=f=0,u=this.file.maxp.numGlyphs;0<=u?f<u:f>u;o=0<=u?++f:--f)h.push(t.readUInt32());return h}.call(this)}},e})(),Zf=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},Qf=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="name",e.prototype.parse=function(t){var r,n,a,o,f,u,h,d,v,y,N;for(t.pos=this.offset,t.readShort(),r=t.readShort(),u=t.readShort(),n=[],o=0;0<=r?o<r:o>r;o=0<=r?++o:--o)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+u+t.readShort()});for(h={},o=v=0,y=n.length;v<y;o=++v)a=n[o],t.pos=a.offset,d=t.readString(a.length),f=new Zf(d,a),h[N=a.nameID]==null&&(h[N]=[]),h[a.nameID].push(f);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]},e})(),tc=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e})(),ec=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="hmtx",e.prototype.parse=function(t){var r,n,a,o,f,u,h;for(t.pos=this.offset,this.metrics=[],r=0,u=this.file.hhea.numberOfMetrics;0<=u?r<u:r>u;r=0<=u?++r:--r)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var d,v;for(v=[],r=d=0;0<=a?d<a:d>a;r=0<=a?++d:--d)v.push(t.readInt16());return v})(),this.widths=function(){var d,v,y,N;for(N=[],d=0,v=(y=this.metrics).length;d<v;d++)o=y[d],N.push(o.advance);return N}.call(this),n=this.widths[this.widths.length-1],h=[],r=f=0;0<=a?f<a:f>a;r=0<=a?++f:--f)h.push(this.widths.push(n));return h},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e})(),Bh=[].slice,rc=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var r,n,a,o,f,u,h,d,v,y;return t in this.cache?this.cache[t]:(o=this.file.loca,r=this.file.contents,n=o.indexOf(t),(a=o.lengthOf(t))===0?this.cache[t]=null:(r.pos=this.offset+n,f=(u=new Jn(r.read(a))).readShort(),d=u.readShort(),y=u.readShort(),h=u.readShort(),v=u.readShort(),this.cache[t]=f===-1?new ic(u,d,y,h,v):new nc(u,f,d,y,h,v),this.cache[t]))},e.prototype.encode=function(t,r,n){var a,o,f,u,h;for(f=[],o=[],u=0,h=r.length;u<h;u++)a=t[r[u]],o.push(f.length),a&&(f=f.concat(a.encode(n)));return o.push(f.length),{table:f,offsets:o}},e})(),nc=(function(){function e(t,r,n,a,o,f){this.raw=t,this.numberOfContours=r,this.xMin=n,this.yMin=a,this.xMax=o,this.yMax=f,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e})(),ic=(function(){function e(t,r,n,a,o){var f,u;for(this.raw=t,this.xMin=r,this.yMin=n,this.xMax=a,this.yMax=o,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],f=this.raw;u=f.readShort(),this.glyphOffsets.push(f.pos),this.glyphIDs.push(f.readUInt16()),32&u;)f.pos+=1&u?4:2,128&u?f.pos+=8:64&u?f.pos+=4:8&u&&(f.pos+=2)}return e.prototype.encode=function(){var t,r,n;for(r=new Jn(Bh.call(this.raw.data)),t=0,n=this.glyphIDs.length;t<n;++t)r.pos=this.glyphOffsets[t];return r.data},e})(),ac=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return cn(e,Zr),e.prototype.tag="loca",e.prototype.parse=function(t){var r,n;return t.pos=this.offset,r=this.file.head.indexToLocFormat,this.offsets=r===0?function(){var a,o;for(o=[],n=0,a=this.length;n<a;n+=2)o.push(2*t.readUInt16());return o}.call(this):function(){var a,o;for(o=[],n=0,a=this.length;n<a;n+=4)o.push(t.readUInt32());return o}.call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,r){for(var n=new Uint32Array(this.offsets.length),a=0,o=0,f=0;f<n.length;++f)if(n[f]=a,o<r.length&&r[o]==f){++o,n[f]=a;var u=this.offsets[f],h=this.offsets[f+1]-u;h>0&&(a+=h)}for(var d=new Array(4*n.length),v=0;v<n.length;++v)d[4*v+3]=255&n[v],d[4*v+2]=(65280&n[v])>>8,d[4*v+1]=(16711680&n[v])>>16,d[4*v]=(4278190080&n[v])>>24;return d},e})(),oc=(function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,r,n,a,o;for(r in a=this.font.cmap.tables[0].codeMap,t={},o=this.subset)n=o[r],t[r]=a[n];return t},e.prototype.glyphsFor=function(t){var r,n,a,o,f,u,h;for(a={},f=0,u=t.length;f<u;f++)a[o=t[f]]=this.font.glyf.glyphFor(o);for(o in r=[],a)(n=a[o])!=null&&n.compound&&r.push.apply(r,n.glyphIDs);if(r.length>0)for(o in h=this.glyphsFor(r))n=h[o],a[o]=n;return a},e.prototype.encode=function(t,r){var n,a,o,f,u,h,d,v,y,N,g,B,j,M,C;for(a in n=Oh.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(t),g={0:0},C=n.charMap)g[(h=C[a]).old]=h.new;for(B in N=n.maxGlyphID,f)B in g||(g[B]=N++);return v=(function(Y){var K,tt;for(K in tt={},Y)tt[Y[K]]=K;return tt})(g),y=Object.keys(v).sort(function(Y,K){return Y-K}),j=(function(){var Y,K,tt;for(tt=[],Y=0,K=y.length;Y<K;Y++)u=y[Y],tt.push(v[u]);return tt})(),o=this.font.glyf.encode(f,j,g),d=this.font.loca.encode(o.offsets,j),M={cmap:this.font.cmap.raw(),glyf:o.table,loca:d,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(M["OS/2"]=this.font.os2.raw()),this.font.directory.encode(M)},e})();Rt.API.PDFObject=(function(){var e;function t(){}return e=function(r,n){return(Array(n+1).join("0")+r).slice(-n)},t.convert=function(r){var n,a,o,f;if(Array.isArray(r))return"["+(function(){var u,h,d;for(d=[],u=0,h=r.length;u<h;u++)n=r[u],d.push(t.convert(n));return d})().join(" ")+"]";if(typeof r=="string")return"/"+r;if(r?.isString)return"("+r+")";if(r instanceof Date)return"(D:"+e(r.getUTCFullYear(),4)+e(r.getUTCMonth(),2)+e(r.getUTCDate(),2)+e(r.getUTCHours(),2)+e(r.getUTCMinutes(),2)+e(r.getUTCSeconds(),2)+"Z)";if({}.toString.call(r)==="[object Object]"){for(a in o=["<<"],r)f=r[a],o.push("/"+a+" "+t.convert(f));return o.push(">>"),o.join(`
|
||
`)}return""+r},t})();function Mh(e,t,r,n,a){n=n||{};var o=1.15,f=a.internal.scaleFactor,u=a.internal.getFontSize()/f,h=a.getLineHeightFactor?a.getLineHeightFactor():o,d=u*h,v=/\r\n|\r|\n/g,y="",N=1;if((n.valign==="middle"||n.valign==="bottom"||n.halign==="center"||n.halign==="right")&&(y=typeof e=="string"?e.split(v):e,N=y.length||1),r+=u*(2-o),n.valign==="middle"?r-=N/2*d:n.valign==="bottom"&&(r-=N*d),n.halign==="center"||n.halign==="right"){var g=u;if(n.halign==="center"&&(g*=.5),y&&N>=1){for(var B=0;B<y.length;B++)a.text(y[B],t-a.getStringUnitWidth(y[B])*g,r),r+=d;return a}t-=a.getStringUnitWidth(e)*g}return n.halign==="justify"?a.text(e,t,r,{maxWidth:n.maxWidth||100,align:"justify"}):a.text(e,t,r),a}var eh={},$i=(function(){function e(t){this.jsPDFDocument=t,this.userStyles={textColor:t.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:t.internal.getFontSize(),fontStyle:t.internal.getFont().fontStyle,font:t.internal.getFont().fontName,lineWidth:t.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:t.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return e.setDefaults=function(t,r){r===void 0&&(r=null),r?r.__autoTableDocumentDefaults=t:eh=t},e.unifyColor=function(t){return Array.isArray(t)?t:typeof t=="number"?[t,t,t]:typeof t=="string"?[t]:null},e.prototype.applyStyles=function(t,r){var n,a,o;r===void 0&&(r=!1),t.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(t.fontStyle);var f=this.jsPDFDocument.internal.getFont(),u=f.fontStyle,h=f.fontName;if(t.font&&(h=t.font),t.fontStyle){u=t.fontStyle;var d=this.getFontList()[h];d&&d.indexOf(u)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(d[0]),u=d[0])}if(this.jsPDFDocument.setFont(h,u),t.fontSize&&this.jsPDFDocument.setFontSize(t.fontSize),!r){var v=e.unifyColor(t.fillColor);v&&(n=this.jsPDFDocument).setFillColor.apply(n,v),v=e.unifyColor(t.textColor),v&&(a=this.jsPDFDocument).setTextColor.apply(a,v),v=e.unifyColor(t.lineColor),v&&(o=this.jsPDFDocument).setDrawColor.apply(o,v),typeof t.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(t.lineWidth)}},e.prototype.splitTextToSize=function(t,r,n){return this.jsPDFDocument.splitTextToSize(t,r,n)},e.prototype.rect=function(t,r,n,a,o){return this.jsPDFDocument.rect(t,r,n,a,o)},e.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},e.prototype.getTextWidth=function(t){return this.jsPDFDocument.getTextWidth(t)},e.prototype.getDocument=function(){return this.jsPDFDocument},e.prototype.setPage=function(t){this.jsPDFDocument.setPage(t)},e.prototype.addPage=function(){return this.jsPDFDocument.addPage()},e.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},e.prototype.getGlobalOptions=function(){return eh||{}},e.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},e.prototype.pageSize=function(){var t=this.jsPDFDocument.internal.pageSize;return t.width==null&&(t={width:t.getWidth(),height:t.getHeight()}),t},e.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},e.prototype.getLineHeightFactor=function(){var t=this.jsPDFDocument;return t.getLineHeightFactor?t.getLineHeightFactor():1.15},e.prototype.getLineHeight=function(t){return t/this.scaleFactor()*this.getLineHeightFactor()},e.prototype.pageNumber=function(){var t=this.jsPDFDocument.internal.getCurrentPageInfo();return t?t.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},e})(),Fs=function(e,t){return Fs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Fs(e,t)};function Dh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fs(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Rh=(function(e){Dh(t,e);function t(r){var n=e.call(this)||this;return n._element=r,n}return t})(Array);function sc(e){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/e,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}function uc(e){var t={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return t[e]}function yo(e,t,r){r.applyStyles(t,!0);var n=Array.isArray(e)?e:[e],a=n.map(function(o){return r.getTextWidth(o)}).reduce(function(o,f){return Math.max(o,f)},0);return a}function Th(e,t,r,n){var a=t.settings.tableLineWidth,o=t.settings.tableLineColor;e.applyStyles({lineWidth:a,lineColor:o});var f=qh(a,!1);f&&e.rect(r.x,r.y,t.getWidth(e.pageSize().width),n.y-r.y,f)}function qh(e,t){var r=e>0,n=t||t===0;return r&&n?"DF":r?"S":n?"F":null}function Ao(e,t){var r,n,a,o;if(e=e||t,Array.isArray(e)){if(e.length>=4)return{top:e[0],right:e[1],bottom:e[2],left:e[3]};if(e.length===3)return{top:e[0],right:e[1],bottom:e[2],left:e[1]};if(e.length===2)return{top:e[0],right:e[1],bottom:e[0],left:e[1]};e.length===1?e=e[0]:e=t}return typeof e=="object"?(typeof e.vertical=="number"&&(e.top=e.vertical,e.bottom=e.vertical),typeof e.horizontal=="number"&&(e.right=e.horizontal,e.left=e.horizontal),{left:(r=e.left)!==null&&r!==void 0?r:t,top:(n=e.top)!==null&&n!==void 0?n:t,right:(a=e.right)!==null&&a!==void 0?a:t,bottom:(o=e.bottom)!==null&&o!==void 0?o:t}):(typeof e!="number"&&(e=t),{top:e,right:e,bottom:e,left:e})}function Uh(e,t){var r=Ao(t.settings.margin,0);return e.pageSize().width-(r.left+r.right)}function hc(e,t,r,n,a){var o={},f=1.3333333333333333,u=bs(t,function(K){return a.getComputedStyle(K).backgroundColor});u!=null&&(o.fillColor=u);var h=bs(t,function(K){return a.getComputedStyle(K).color});h!=null&&(o.textColor=h);var d=fc(n,r);d&&(o.cellPadding=d);var v="borderTopColor",y=f*r,N=n.borderTopWidth;if(n.borderBottomWidth===N&&n.borderRightWidth===N&&n.borderLeftWidth===N){var g=(parseFloat(N)||0)/y;g&&(o.lineWidth=g)}else o.lineWidth={top:(parseFloat(n.borderTopWidth)||0)/y,right:(parseFloat(n.borderRightWidth)||0)/y,bottom:(parseFloat(n.borderBottomWidth)||0)/y,left:(parseFloat(n.borderLeftWidth)||0)/y},o.lineWidth.top||(o.lineWidth.right?v="borderRightColor":o.lineWidth.bottom?v="borderBottomColor":o.lineWidth.left&&(v="borderLeftColor"));var B=bs(t,function(K){return a.getComputedStyle(K)[v]});B!=null&&(o.lineColor=B);var j=["left","right","center","justify"];j.indexOf(n.textAlign)!==-1&&(o.halign=n.textAlign),j=["middle","bottom","top"],j.indexOf(n.verticalAlign)!==-1&&(o.valign=n.verticalAlign);var M=parseInt(n.fontSize||"");isNaN(M)||(o.fontSize=M/f);var C=lc(n);C&&(o.fontStyle=C);var Y=(n.fontFamily||"").toLowerCase();return e.indexOf(Y)!==-1&&(o.font=Y),o}function lc(e){var t="";return(e.fontWeight==="bold"||e.fontWeight==="bolder"||parseInt(e.fontWeight)>=700)&&(t="bold"),(e.fontStyle==="italic"||e.fontStyle==="oblique")&&(t+="italic"),t}function bs(e,t){var r=zh(e,t);if(!r)return null;var n=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!n||!Array.isArray(n))return null;var a=[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])],o=parseInt(n[4]);return o===0||isNaN(a[0])||isNaN(a[1])||isNaN(a[2])?null:a}function zh(e,t){var r=t(e);return r==="rgba(0, 0, 0, 0)"||r==="transparent"||r==="initial"||r==="inherit"?e.parentElement==null?null:zh(e.parentElement,t):r}function fc(e,t){var r=[e.paddingTop,e.paddingRight,e.paddingBottom,e.paddingLeft],n=96/(72/t),a=(parseInt(e.lineHeight)-parseInt(e.fontSize))/t/2,o=r.map(function(u){return parseInt(u||"0")/n}),f=Ao(o,0);return a>f.top&&(f.top=a),a>f.bottom&&(f.bottom=a),f}function Hh(e,t,r,n,a){var o,f;n===void 0&&(n=!1),a===void 0&&(a=!1);var u;typeof t=="string"?u=r.document.querySelector(t):u=t;var h=Object.keys(e.getFontList()),d=e.scaleFactor(),v=[],y=[],N=[];if(!u)return console.error("Html table could not be found with input: ",t),{head:v,body:y,foot:N};for(var g=0;g<u.rows.length;g++){var B=u.rows[g],j=(f=(o=B?.parentElement)===null||o===void 0?void 0:o.tagName)===null||f===void 0?void 0:f.toLowerCase(),M=cc(h,d,r,B,n,a);M&&(j==="thead"?v.push(M):j==="tfoot"?N.push(M):y.push(M))}return{head:v,body:y,foot:N}}function cc(e,t,r,n,a,o){for(var f=new Rh(n),u=0;u<n.cells.length;u++){var h=n.cells[u],d=r.getComputedStyle(h);if(a||d.display!=="none"){var v=void 0;o&&(v=hc(e,h,t,d,r)),f.push({rowSpan:h.rowSpan,colSpan:h.colSpan,styles:v,_element:h,content:dc(h)})}}var y=r.getComputedStyle(n);if(f.length>0&&(a||y.display!=="none"))return f}function dc(e){var t=e.cloneNode(!0);return t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(/ +/g," "),t.innerHTML=t.innerHTML.split(/<br.*?>/).map(function(r){return r.trim()}).join(`
|
||
`),t.innerText||t.textContent||""}function pc(e,t,r){for(var n=0,a=[e,t,r];n<a.length;n++){var o=a[n];o&&typeof o!="object"&&console.error("The options parameter should be of type object, is: "+typeof o),o.startY&&typeof o.startY!="number"&&(console.error("Invalid value for startY option",o.startY),delete o.startY)}}function kn(e,t,r,n,a){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),f=1;f<arguments.length;f++){var u=arguments[f];if(u!=null)for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(o[h]=u[h])}return o}function gc(e,t){var r=new $i(e),n=r.getDocumentOptions(),a=r.getGlobalOptions();pc(a,n,t);var o=kn({},a,n,t),f;typeof window<"u"&&(f=window);var u=vc(a,n,t),h=mc(a,n,t),d=bc(r,o),v=wc(r,o,f);return{id:t.tableId,content:v,hooks:h,styles:u,settings:d}}function vc(e,t,r){for(var n={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},a=function(h){if(h==="columnStyles"){var d=e[h],v=t[h],y=r[h];n.columnStyles=kn({},d,v,y)}else{var N=[e,t,r],g=N.map(function(B){return B[h]||{}});n[h]=kn({},g[0],g[1],g[2])}},o=0,f=Object.keys(n);o<f.length;o++){var u=f[o];a(u)}return n}function mc(e,t,r){for(var n=[e,t,r],a={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},o=0,f=n;o<f.length;o++){var u=f[o];u.didParseCell&&a.didParseCell.push(u.didParseCell),u.willDrawCell&&a.willDrawCell.push(u.willDrawCell),u.didDrawCell&&a.didDrawCell.push(u.didDrawCell),u.willDrawPage&&a.willDrawPage.push(u.willDrawPage),u.didDrawPage&&a.didDrawPage.push(u.didDrawPage)}return a}function bc(e,t){var r,n,a,o,f,u,h,d,v,y,N,g,B=Ao(t.margin,40/e.scaleFactor()),j=(r=yc(e,t.startY))!==null&&r!==void 0?r:B.top,M;t.showFoot===!0?M="everyPage":t.showFoot===!1?M="never":M=(n=t.showFoot)!==null&&n!==void 0?n:"everyPage";var C;t.showHead===!0?C="everyPage":t.showHead===!1?C="never":C=(a=t.showHead)!==null&&a!==void 0?a:"everyPage";var Y=(o=t.useCss)!==null&&o!==void 0?o:!1,K=t.theme||(Y?"plain":"striped"),tt=!!t.horizontalPageBreak,gt=(f=t.horizontalPageBreakRepeat)!==null&&f!==void 0?f:null;return{includeHiddenHtml:(u=t.includeHiddenHtml)!==null&&u!==void 0?u:!1,useCss:Y,theme:K,startY:j,margin:B,pageBreak:(h=t.pageBreak)!==null&&h!==void 0?h:"auto",rowPageBreak:(d=t.rowPageBreak)!==null&&d!==void 0?d:"auto",tableWidth:(v=t.tableWidth)!==null&&v!==void 0?v:"auto",showHead:C,showFoot:M,tableLineWidth:(y=t.tableLineWidth)!==null&&y!==void 0?y:0,tableLineColor:(N=t.tableLineColor)!==null&&N!==void 0?N:200,horizontalPageBreak:tt,horizontalPageBreakRepeat:gt,horizontalPageBreakBehaviour:(g=t.horizontalPageBreakBehaviour)!==null&&g!==void 0?g:"afterAllRows"}}function yc(e,t){var r=e.getLastAutoTable(),n=e.scaleFactor(),a=e.pageNumber(),o=!1;if(r&&r.startPageNumber){var f=r.startPageNumber+r.pageNumber-1;o=f===a}return typeof t=="number"?t:(t==null||t===!1)&&o&&r?.finalY!=null?r.finalY+20/n:null}function wc(e,t,r){var n=t.head||[],a=t.body||[],o=t.foot||[];if(t.html){var f=t.includeHiddenHtml;if(r){var u=Hh(e,t.html,r,f,t.useCss)||{};n=u.head||n,a=u.body||n,o=u.foot||n}else console.error("Cannot parse html in non browser environment")}var h=t.columns||xc(n,a,o);return{columns:h,head:n,body:a,foot:o}}function xc(e,t,r){var n=e[0]||t[0]||r[0]||[],a=[];return Object.keys(n).filter(function(o){return o!=="_element"}).forEach(function(o){var f=1,u;Array.isArray(n)?u=n[parseInt(o)]:u=n[o],typeof u=="object"&&!Array.isArray(u)&&(f=u?.colSpan||1);for(var h=0;h<f;h++){var d=void 0;Array.isArray(n)?d=a.length:d=o+(h>0?"_".concat(h):"");var v={dataKey:d};a.push(v)}}),a}var Is=(function(){function e(t,r,n){this.table=r,this.pageNumber=r.pageNumber,this.settings=r.settings,this.cursor=n,this.doc=t.getDocument()}return e})(),Ac=(function(e){Dh(t,e);function t(r,n,a,o,f,u){var h=e.call(this,r,n,u)||this;return h.cell=a,h.row=o,h.column=f,h.section=o.section,h}return t})(Is),Lc=(function(){function e(t,r){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=r.columns,this.head=r.head,this.body=r.body,this.foot=r.foot}return e.prototype.getHeadHeight=function(t){return this.head.reduce(function(r,n){return r+n.getMaxCellHeight(t)},0)},e.prototype.getFootHeight=function(t){return this.foot.reduce(function(r,n){return r+n.getMaxCellHeight(t)},0)},e.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},e.prototype.callCellHooks=function(t,r,n,a,o,f){for(var u=0,h=r;u<h.length;u++){var d=h[u],v=new Ac(t,this,n,a,o,f),y=d(v)===!1;if(n.text=Array.isArray(n.text)?n.text:[n.text],y)return!1}return!0},e.prototype.callEndPageHooks=function(t,r){t.applyStyles(t.userStyles);for(var n=0,a=this.hooks.didDrawPage;n<a.length;n++){var o=a[n];o(new Is(t,this,r))}},e.prototype.callWillDrawPageHooks=function(t,r){for(var n=0,a=this.hooks.willDrawPage;n<a.length;n++){var o=a[n];o(new Is(t,this,r))}},e.prototype.getWidth=function(t){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var r=this.columns.reduce(function(a,o){return a+o.wrappedWidth},0);return r}else{var n=this.settings.margin;return t-n.left-n.right}},e})(),Wh=(function(){function e(t,r,n,a,o){o===void 0&&(o=!1),this.height=0,this.raw=t,t instanceof Rh&&(this.raw=t._element,this.element=t._element),this.index=r,this.section=n,this.cells=a,this.spansMultiplePages=o}return e.prototype.getMaxCellHeight=function(t){var r=this;return t.reduce(function(n,a){var o;return Math.max(n,((o=r.cells[a.index])===null||o===void 0?void 0:o.height)||0)},0)},e.prototype.hasRowSpan=function(t){var r=this;return t.filter(function(n){var a=r.cells[n.index];return a?a.rowSpan>1:!1}).length>0},e.prototype.canEntireRowFit=function(t,r){return this.getMaxCellHeight(r)<=t},e.prototype.getMinimumRowHeight=function(t,r){var n=this;return t.reduce(function(a,o){var f=n.cells[o.index];if(!f)return 0;var u=r.getLineHeight(f.styles.fontSize),h=f.padding("vertical"),d=h+u;return d>a?d:a},0)},e})(),Vh=(function(){function e(t,r,n){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=r,this.section=n,this.raw=t;var o=t;t!=null&&typeof t=="object"&&!Array.isArray(t)?(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,o=(a=t.content)!==null&&a!==void 0?a:t,t._element&&(this.raw=t._element)):(this.rowSpan=1,this.colSpan=1);var f=o!=null?""+o:"",u=/\r\n|\r|\n/g;this.text=f.split(u)}return e.prototype.getTextPos=function(){var t;if(this.styles.valign==="top")t=this.y+this.padding("top");else if(this.styles.valign==="bottom")t=this.y+this.height-this.padding("bottom");else{var r=this.height-this.padding("vertical");t=this.y+r/2+this.padding("top")}var n;if(this.styles.halign==="right")n=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");n=this.x+a/2+this.padding("left")}else n=this.x+this.padding("left");return{x:n,y:t}},e.prototype.getContentHeight=function(t,r){r===void 0&&(r=1.15);var n=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/t*r,o=n*a+this.padding("vertical");return Math.max(o,this.styles.minCellHeight)},e.prototype.padding=function(t){var r=Ao(this.styles.cellPadding,0);return t==="vertical"?r.top+r.bottom:t==="horizontal"?r.left+r.right:r[t]},e})(),Nc=(function(){function e(t,r,n){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=r,this.index=n}return e.prototype.getMaxCustomCellWidth=function(t){for(var r=0,n=0,a=t.allRows();n<a.length;n++){var o=a[n],f=o.cells[this.index];f&&typeof f.styles.cellWidth=="number"&&(r=Math.max(r,f.styles.cellWidth))}return r},e})();function Sc(e,t){_c(e,t);var r=[],n=0;t.columns.forEach(function(o){var f=o.getMaxCustomCellWidth(t);f?o.width=f:(o.width=o.wrappedWidth,r.push(o)),n+=o.width});var a=t.getWidth(e.pageSize().width)-n;a&&(a=js(r,a,function(o){return Math.max(o.minReadableWidth,o.minWidth)})),a&&(a=js(r,a,function(o){return o.minWidth})),a=Math.abs(a),!t.settings.horizontalPageBreak&&a>.1/e.scaleFactor()&&(a=a<1?a:Math.round(a),console.log("Of the table content, ".concat(a," units width could not fit page"))),kc(t),Cc(t,e),Pc(t)}function _c(e,t){var r=e.scaleFactor(),n=t.settings.horizontalPageBreak,a=Uh(e,t);t.allRows().forEach(function(o){for(var f=0,u=t.columns;f<u.length;f++){var h=u[f],d=o.cells[h.index];if(d){var v=t.hooks.didParseCell;t.callCellHooks(e,v,d,o,h,null);var y=d.padding("horizontal");d.contentWidth=yo(d.text,d.styles,e)+y;var N=yo(d.text.join(" ").split(/[^\S\u00A0]+/),d.styles,e);if(d.minReadableWidth=N+d.padding("horizontal"),typeof d.styles.cellWidth=="number")d.minWidth=d.styles.cellWidth,d.wrappedWidth=d.styles.cellWidth;else if(d.styles.cellWidth==="wrap"||n===!0)d.contentWidth>a?(d.minWidth=a,d.wrappedWidth=a):(d.minWidth=d.contentWidth,d.wrappedWidth=d.contentWidth);else{var g=10/r;d.minWidth=d.styles.minCellWidth||g,d.wrappedWidth=d.contentWidth,d.minWidth>d.wrappedWidth&&(d.wrappedWidth=d.minWidth)}}}}),t.allRows().forEach(function(o){for(var f=0,u=t.columns;f<u.length;f++){var h=u[f],d=o.cells[h.index];if(d&&d.colSpan===1)h.wrappedWidth=Math.max(h.wrappedWidth,d.wrappedWidth),h.minWidth=Math.max(h.minWidth,d.minWidth),h.minReadableWidth=Math.max(h.minReadableWidth,d.minReadableWidth);else{var v=t.styles.columnStyles[h.dataKey]||t.styles.columnStyles[h.index]||{},y=v.cellWidth||v.minCellWidth;y&&typeof y=="number"&&(h.minWidth=y,h.wrappedWidth=y)}d&&(d.colSpan>1&&!h.minWidth&&(h.minWidth=d.minWidth),d.colSpan>1&&!h.wrappedWidth&&(h.wrappedWidth=d.minWidth))}})}function js(e,t,r){for(var n=t,a=e.reduce(function(g,B){return g+B.wrappedWidth},0),o=0;o<e.length;o++){var f=e[o],u=f.wrappedWidth/a,h=n*u,d=f.width+h,v=r(f),y=d<v?v:d;t-=y-f.width,f.width=y}if(t=Math.round(t*1e10)/1e10,t){var N=e.filter(function(g){return t<0?g.width>r(g):!0});N.length&&(t=js(N,t,r))}return t}function Pc(e){for(var t={},r=1,n=e.allRows(),a=0;a<n.length;a++)for(var o=n[a],f=0,u=e.columns;f<u.length;f++){var h=u[f],d=t[h.index];if(r>1)r--,delete o.cells[h.index];else if(d)d.cell.height+=o.height,r=d.cell.colSpan,delete o.cells[h.index],d.left--,d.left<=1&&delete t[h.index];else{var v=o.cells[h.index];if(!v)continue;if(v.height=o.height,v.rowSpan>1){var y=n.length-a,N=v.rowSpan>y?y:v.rowSpan;t[h.index]={cell:v,left:N,row:o}}}}}function kc(e){for(var t=e.allRows(),r=0;r<t.length;r++)for(var n=t[r],a=null,o=0,f=0,u=0;u<e.columns.length;u++){var h=e.columns[u];if(f-=1,f>1&&e.columns[u+1])o+=h.width,delete n.cells[h.index];else if(a){var d=a;delete n.cells[h.index],a=null,d.width=h.width+o}else{var d=n.cells[h.index];if(!d)continue;if(f=d.colSpan,o=0,d.colSpan>1){a=d,o+=h.width;continue}d.width=h.width+o}}}function Cc(e,t){for(var r={count:0,height:0},n=0,a=e.allRows();n<a.length;n++){for(var o=a[n],f=0,u=e.columns;f<u.length;f++){var h=u[f],d=o.cells[h.index];if(d){t.applyStyles(d.styles,!0);var v=d.width-d.padding("horizontal");if(d.styles.overflow==="linebreak")d.text=t.splitTextToSize(d.text,v+1/t.scaleFactor(),{fontSize:d.styles.fontSize});else if(d.styles.overflow==="ellipsize")d.text=rh(d.text,v,d.styles,t,"...");else if(d.styles.overflow==="hidden")d.text=rh(d.text,v,d.styles,t,"");else if(typeof d.styles.overflow=="function"){var y=d.styles.overflow(d.text,v);typeof y=="string"?d.text=[y]:d.text=y}d.contentHeight=d.getContentHeight(t.scaleFactor(),t.getLineHeightFactor());var N=d.contentHeight/d.rowSpan;d.rowSpan>1&&r.count*r.height<N*d.rowSpan?r={height:N,count:d.rowSpan}:r&&r.count>0&&r.height>N&&(N=r.height),N>o.height&&(o.height=N)}}r.count--}}function rh(e,t,r,n,a){return e.map(function(o){return Fc(o,t,r,n,a)})}function Fc(e,t,r,n,a){var o=1e4*n.scaleFactor();if(t=Math.ceil(t*o)/o,t>=yo(e,r,n))return e;for(;t<yo(e+a,r,n)&&!(e.length<=1);)e=e.substring(0,e.length-1);return e.trim()+a}function Ic(e,t){var r=new $i(e),n=jc(t,r.scaleFactor()),a=new Lc(t,n);return Sc(r,a),r.applyStyles(r.userStyles),a}function jc(e,t){var r=e.content,n=Oc(r.columns);if(r.head.length===0){var a=nh(n,"head");a&&r.head.push(a)}if(r.foot.length===0){var a=nh(n,"foot");a&&r.foot.push(a)}var o=e.settings.theme,f=e.styles;return{columns:n,head:ys("head",r.head,n,f,o,t),body:ys("body",r.body,n,f,o,t),foot:ys("foot",r.foot,n,f,o,t)}}function ys(e,t,r,n,a,o){var f={},u=t.map(function(h,d){for(var v=0,y={},N=0,g=0,B=0,j=r;B<j.length;B++){var M=j[B];if(f[M.index]==null||f[M.index].left===0)if(g===0){var C=void 0;Array.isArray(h)?C=h[M.index-N-v]:C=h[M.dataKey];var Y={};typeof C=="object"&&!Array.isArray(C)&&(Y=C?.styles||{});var K=Bc(e,M,d,a,n,o,Y),tt=new Vh(C,K,e);y[M.dataKey]=tt,y[M.index]=tt,g=tt.colSpan-1,f[M.index]={left:tt.rowSpan-1,times:g}}else g--,N++;else f[M.index].left--,g=f[M.index].times,v++}return new Wh(h,d,e,y)});return u}function nh(e,t){var r={};return e.forEach(function(n){if(n.raw!=null){var a=Ec(t,n.raw);a!=null&&(r[n.dataKey]=a)}}),Object.keys(r).length>0?r:null}function Ec(e,t){if(e==="head"){if(typeof t=="object")return t.header||null;if(typeof t=="string"||typeof t=="number")return t}else if(e==="foot"&&typeof t=="object")return t.footer;return null}function Oc(e){return e.map(function(t,r){var n,a;return typeof t=="object"?a=(n=t.dataKey)!==null&&n!==void 0?n:r:a=r,new Nc(a,t,r)})}function Bc(e,t,r,n,a,o,f){var u=uc(n),h;e==="head"?h=a.headStyles:e==="body"?h=a.bodyStyles:e==="foot"&&(h=a.footStyles);var d=kn({},u.table,u[e],a.styles,h),v=a.columnStyles[t.dataKey]||a.columnStyles[t.index]||{},y=e==="body"?v:{},N=e==="body"&&r%2===0?kn({},u.alternateRow,a.alternateRowStyles):{},g=sc(o),B=kn({},g,d,N,y);return kn(B,f)}function Mc(e,t,r){var n;r===void 0&&(r={});var a=Uh(e,t),o=new Map,f=[],u=[],h=[];Array.isArray(t.settings.horizontalPageBreakRepeat)?h=t.settings.horizontalPageBreakRepeat:(typeof t.settings.horizontalPageBreakRepeat=="string"||typeof t.settings.horizontalPageBreakRepeat=="number")&&(h=[t.settings.horizontalPageBreakRepeat]),h.forEach(function(N){var g=t.columns.find(function(B){return B.dataKey===N||B.index===N});g&&!o.has(g.index)&&(o.set(g.index,!0),f.push(g.index),u.push(t.columns[g.index]),a-=g.wrappedWidth)});for(var d=!0,v=(n=r?.start)!==null&&n!==void 0?n:0;v<t.columns.length;){if(o.has(v)){v++;continue}var y=t.columns[v].wrappedWidth;if(d||a>=y)d=!1,f.push(v),u.push(t.columns[v]),a-=y;else break;v++}return{colIndexes:f,columns:u,lastIndex:v-1}}function Dc(e,t){for(var r=[],n=0;n<t.columns.length;n++){var a=Mc(e,t,{start:n});a.columns.length&&(r.push(a),n=a.lastIndex)}return r}function Rc(e,t){var r=t.settings,n=r.startY,a=r.margin,o={x:a.left,y:n},f=t.getHeadHeight(t.columns)+t.getFootHeight(t.columns),u=n+a.bottom+f;if(r.pageBreak==="avoid"){var h=t.body,d=h.reduce(function(N,g){return N+g.height},0);u+=d}var v=new $i(e);(r.pageBreak==="always"||r.startY!=null&&u>v.pageSize().height)&&(Yh(v),o.y=a.top),t.callWillDrawPageHooks(v,o);var y=kn({},o);t.startPageNumber=v.pageNumber(),r.horizontalPageBreak?Tc(v,t,y,o):(v.applyStyles(v.userStyles),(r.showHead==="firstPage"||r.showHead==="everyPage")&&t.head.forEach(function(N){return Cn(v,t,N,o,t.columns)}),v.applyStyles(v.userStyles),t.body.forEach(function(N,g){var B=g===t.body.length-1;wo(v,t,N,B,y,o,t.columns)}),v.applyStyles(v.userStyles),(r.showFoot==="lastPage"||r.showFoot==="everyPage")&&t.foot.forEach(function(N){return Cn(v,t,N,o,t.columns)})),Th(v,t,y,o),t.callEndPageHooks(v,o),t.finalY=o.y,e.lastAutoTable=t,v.applyStyles(v.userStyles)}function Tc(e,t,r,n){var a=Dc(e,t),o=t.settings;if(o.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(d,v){e.applyStyles(e.userStyles),v>0?Na(e,t,r,n,d.columns,!0):ih(e,t,n,d.columns),qc(e,t,r,n,d.columns),ws(e,t,n,d.columns)});else for(var f=-1,u=a[0],h=function(){var d=f;if(u){e.applyStyles(e.userStyles);var v=u.columns;f>=0?Na(e,t,r,n,v,!0):ih(e,t,n,v),d=ah(e,t,f+1,n,v),ws(e,t,n,v)}var y=d-f;a.slice(1).forEach(function(N){e.applyStyles(e.userStyles),Na(e,t,r,n,N.columns,!0),ah(e,t,f+1,n,N.columns,y),ws(e,t,n,N.columns)}),f=d};f<t.body.length-1;)h()}function ih(e,t,r,n){var a=t.settings;e.applyStyles(e.userStyles),(a.showHead==="firstPage"||a.showHead==="everyPage")&&t.head.forEach(function(o){return Cn(e,t,o,r,n)})}function qc(e,t,r,n,a){e.applyStyles(e.userStyles),t.body.forEach(function(o,f){var u=f===t.body.length-1;wo(e,t,o,u,r,n,a)})}function ah(e,t,r,n,a,o){e.applyStyles(e.userStyles),o=o??t.body.length;var f=Math.min(r+o,t.body.length),u=-1;return t.body.slice(r,f).forEach(function(h,d){var v=r+d===t.body.length-1,y=Gh(e,t,v,n);h.canEntireRowFit(y,a)&&(Cn(e,t,h,n,a),u=r+d)}),u}function ws(e,t,r,n){var a=t.settings;e.applyStyles(e.userStyles),(a.showFoot==="lastPage"||a.showFoot==="everyPage")&&t.foot.forEach(function(o){return Cn(e,t,o,r,n)})}function Uc(e,t,r){var n=r.getLineHeight(e.styles.fontSize),a=e.padding("vertical"),o=Math.floor((t-a)/n);return Math.max(0,o)}function zc(e,t,r,n){var a={};e.spansMultiplePages=!0,e.height=0;for(var o=0,f=0,u=r.columns;f<u.length;f++){var h=u[f],d=e.cells[h.index];if(d){Array.isArray(d.text)||(d.text=[d.text]);var v=new Vh(d.raw,d.styles,d.section);v=kn(v,d),v.text=[];var y=Uc(d,t,n);d.text.length>y&&(v.text=d.text.splice(y,d.text.length));var N=n.scaleFactor(),g=n.getLineHeightFactor();d.contentHeight=d.getContentHeight(N,g),d.contentHeight>=t&&(d.contentHeight=t,v.styles.minCellHeight-=t),d.contentHeight>e.height&&(e.height=d.contentHeight),v.contentHeight=v.getContentHeight(N,g),v.contentHeight>o&&(o=v.contentHeight),a[h.index]=v}}var B=new Wh(e.raw,-1,e.section,a,!0);B.height=o;for(var j=0,M=r.columns;j<M.length;j++){var h=M[j],v=B.cells[h.index];v&&(v.height=B.height);var d=e.cells[h.index];d&&(d.height=e.height)}return B}function Hc(e,t,r,n){var a=e.pageSize().height,o=n.settings.margin,f=o.top+o.bottom,u=a-f;t.section==="body"&&(u-=n.getHeadHeight(n.columns)+n.getFootHeight(n.columns));var h=t.getMinimumRowHeight(n.columns,e),d=h<r;if(h>u)return console.log("Will not be able to print row ".concat(t.index," correctly since it's minimum height is larger than page height")),!0;if(!d)return!1;var v=t.hasRowSpan(n.columns),y=t.getMaxCellHeight(n.columns)>u;return y?(v&&console.log("The content of row ".concat(t.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(v||n.settings.rowPageBreak==="avoid")}function wo(e,t,r,n,a,o,f){var u=Gh(e,t,n,o);if(r.canEntireRowFit(u,f))Cn(e,t,r,o,f);else if(Hc(e,r,u,t)){var h=zc(r,u,t,e);Cn(e,t,r,o,f),Na(e,t,a,o,f),wo(e,t,h,n,a,o,f)}else Na(e,t,a,o,f),wo(e,t,r,n,a,o,f)}function Cn(e,t,r,n,a){n.x=t.settings.margin.left;for(var o=0,f=a;o<f.length;o++){var u=f[o],h=r.cells[u.index];if(!h){n.x+=u.width;continue}e.applyStyles(h.styles),h.x=n.x,h.y=n.y;var d=t.callCellHooks(e,t.hooks.willDrawCell,h,r,u,n);if(d===!1){n.x+=u.width;continue}Wc(e,h,n);var v=h.getTextPos();Mh(h.text,v.x,v.y,{halign:h.styles.halign,valign:h.styles.valign,maxWidth:Math.ceil(h.width-h.padding("left")-h.padding("right"))},e.getDocument()),t.callCellHooks(e,t.hooks.didDrawCell,h,r,u,n),n.x+=u.width}n.y+=r.height}function Wc(e,t,r){var n=t.styles;if(e.getDocument().setFillColor(e.getDocument().getFillColor()),typeof n.lineWidth=="number"){var a=qh(n.lineWidth,n.fillColor);a&&e.rect(t.x,r.y,t.width,t.height,a)}else typeof n.lineWidth=="object"&&(n.fillColor&&e.rect(t.x,r.y,t.width,t.height,"F"),Vc(e,t,r,n.lineWidth))}function Vc(e,t,r,n){var a,o,f,u;n.top&&(a=r.x,o=r.y,f=r.x+t.width,u=r.y,n.right&&(f+=.5*n.right),n.left&&(a-=.5*n.left),h(n.top,a,o,f,u)),n.bottom&&(a=r.x,o=r.y+t.height,f=r.x+t.width,u=r.y+t.height,n.right&&(f+=.5*n.right),n.left&&(a-=.5*n.left),h(n.bottom,a,o,f,u)),n.left&&(a=r.x,o=r.y,f=r.x,u=r.y+t.height,n.top&&(o-=.5*n.top),n.bottom&&(u+=.5*n.bottom),h(n.left,a,o,f,u)),n.right&&(a=r.x+t.width,o=r.y,f=r.x+t.width,u=r.y+t.height,n.top&&(o-=.5*n.top),n.bottom&&(u+=.5*n.bottom),h(n.right,a,o,f,u));function h(d,v,y,N,g){e.getDocument().setLineWidth(d),e.getDocument().line(v,y,N,g,"S")}}function Gh(e,t,r,n){var a=t.settings.margin.bottom,o=t.settings.showFoot;return(o==="everyPage"||o==="lastPage"&&r)&&(a+=t.getFootHeight(t.columns)),e.pageSize().height-n.y-a}function Na(e,t,r,n,a,o){a===void 0&&(a=[]),o===void 0&&(o=!1),e.applyStyles(e.userStyles),t.settings.showFoot==="everyPage"&&!o&&t.foot.forEach(function(u){return Cn(e,t,u,n,a)}),t.callEndPageHooks(e,n);var f=t.settings.margin;Th(e,t,r,n),Yh(e),t.pageNumber++,n.x=f.left,n.y=f.top,r.y=f.top,t.callWillDrawPageHooks(e,n),t.settings.showHead==="everyPage"&&(t.head.forEach(function(u){return Cn(e,t,u,n,a)}),e.applyStyles(e.userStyles))}function Yh(e){var t=e.pageNumber();e.setPage(t+1);var r=e.pageNumber();return r===t?(e.addPage(),!0):!1}function Gc(e){e.API.autoTable=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t[0],a=gc(this,n),o=Ic(this,a);return Rc(this,o),this},e.API.lastAutoTable=!1,e.API.autoTableText=function(t,r,n,a){Mh(t,r,n,a,this)},e.API.autoTableSetDefaults=function(t){return $i.setDefaults(t,this),this},e.autoTableSetDefaults=function(t,r){$i.setDefaults(t,r)},e.API.autoTableHtmlToJson=function(t,r){var n;if(r===void 0&&(r=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new $i(this),o=Hh(a,t,window,r,!1),f=o.head,u=o.body,h=((n=f[0])===null||n===void 0?void 0:n.map(function(d){return d.content}))||[];return{columns:h,rows:u,data:u}}}var xs;try{if(typeof window<"u"&&window){var oh=window,sh=oh.jsPDF||((xs=oh.jspdf)===null||xs===void 0?void 0:xs.jsPDF);sh&&Gc(sh)}}catch(e){console.error("Could not apply autoTable plugin",e)}export{Rt as E,xe as _,Gc as a};
|
||
//# sourceMappingURL=jspdf-FJgf4ijI.js.map
|