UNPKG

@watergis/maplibre-gl-export

Version:
80 lines 767 kB
(function(_e,Cr){typeof exports=="object"&&typeof module<"u"?Cr(exports,require("maplibre-gl")):typeof define=="function"&&define.amd?define(["exports","maplibre-gl"],Cr):(_e=typeof globalThis<"u"?globalThis:_e||self,Cr(_e.MaplibreExportControl={},_e.maplibregl))})(this,function(_e,Cr){"use strict";var Wx=Object.defineProperty;var zx=(_e,Cr,xi)=>Cr in _e?Wx(_e,Cr,{enumerable:!0,configurable:!0,writable:!0,value:xi}):_e[Cr]=xi;var ye=(_e,Cr,xi)=>zx(_e,typeof Cr!="symbol"?Cr+"":Cr,xi);class xi{constructor(A){ye(this,"map");ye(this,"width");ye(this,"height");ye(this,"svgCanvas");ye(this,"xLine");ye(this,"yLine");ye(this,"color","#535353");this.map=A,this.mapResize=this.mapResize.bind(this)}create(){this.updateValues(),this.map!==void 0?(this.map.on("resize",this.mapResize),this.createCanvas(this.map.getCanvasContainer())):console.error("map object is null")}updateValues(){var A,e;this.width=(A=this.map)==null?void 0:A.getCanvas().clientWidth,this.height=(e=this.map)==null?void 0:e.getCanvas().clientHeight}mapResize(){this.updateValues(),this.updateCanvas()}updateCanvas(){if(this.svgCanvas!==void 0&&this.yLine!==void 0&&this.xLine!==void 0&&this.width!==void 0&&this.height!==void 0){this.svgCanvas.setAttribute("width",`${this.width}px`),this.svgCanvas.setAttribute("height",`${this.height}px`);const A=this.width/2,e=this.height/2;this.yLine.setAttribute("x1",`${A}px`),this.yLine.setAttribute("y1","0px"),this.yLine.setAttribute("x2",`${A}px`),this.yLine.setAttribute("y2",`${this.height}px`),this.xLine.setAttribute("x1","0px"),this.xLine.setAttribute("y1",`${e}px`),this.xLine.setAttribute("x2",`${this.width}px`),this.xLine.setAttribute("y2",`${e}px`)}else console.error("element value is null")}createCanvas(A){if(this.width!==void 0&&this.height!==void 0){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.style.position="relative",e.setAttribute("width",`${this.width}px`),e.setAttribute("height",`${this.height}px`);const t=this.width/2,n=this.height/2;this.yLine=e.appendChild(this.createLine(t,0,t,this.height,this.color,"2px")),this.xLine=e.appendChild(this.createLine(0,n,this.width,n,this.color,"2px")),A==null||A.appendChild(e),this.svgCanvas=e}}createLine(A,e,t,n,i,a){const s=document.createElementNS("http://www.w3.org/2000/svg","line");return s.setAttribute("x1",A),s.setAttribute("y1",e),s.setAttribute("x2",t),s.setAttribute("y2",n),s.setAttribute("stroke-dasharray","5,5"),s.setAttribute("stroke",i),s.setAttribute("stroke-width",a),s}destroy(){this.xLine!==void 0&&(this.xLine.remove(),this.xLine=void 0),this.yLine!==void 0&&(this.yLine.remove(),this.yLine=void 0),this.svgCanvas!==void 0&&(this.svgCanvas.remove(),this.svgCanvas=void 0),this.map!==void 0&&(this.map.off("resize",this.mapResize),this.map=void 0)}}const Kl={72:72,96:96,200:200,300:300,400:400},xn={JPEG:"jpg",PNG:"png",PDF:"pdf",SVG:"svg"},es={Landscape:"landscape",Portrait:"portrait"},Ii={LETTER:[279,216],A2:[594,420],A3:[420,297],A4:[297,210],A5:[210,148],A6:[148,105],B2:[707,500],B3:[500,353],B4:[353,250],B5:[250,176],B6:[176,125]},Si={in:"in",mm:"mm"};class Fp{constructor(A){ye(this,"map");ye(this,"width");ye(this,"height");ye(this,"unit");ye(this,"svgCanvas");ye(this,"svgPath");var a,s,o;if(this.map=A,this.map===void 0)return;this.mapResize=this.mapResize.bind(this),this.map.on("resize",this.mapResize);const e=(a=this.map)==null?void 0:a.getCanvas().clientWidth,t=(s=this.map)==null?void 0:s.getCanvas().clientHeight,n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.setAttribute("width",`${e}px`),n.setAttribute("height",`${t}px`);const i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("style","fill:#888888;stroke-width:0"),i.setAttribute("fill-opacity","0.5"),n.append(i),(o=this.map)==null||o.getCanvasContainer().appendChild(n),this.svgCanvas=n,this.svgPath=i}mapResize(){this.generateCutOut()}updateArea(A,e){this.width=A,this.height=e,this.unit=Si.mm,this.generateCutOut()}generateCutOut(){var l,c;if(this.map===void 0||this.svgCanvas===void 0||this.svgPath===void 0)return;const A=this.toPixels(this.width),e=this.toPixels(this.height),t=(l=this.map)==null?void 0:l.getCanvas().clientWidth,n=(c=this.map)==null?void 0:c.getCanvas().clientHeight,i=t/2-A/2,a=i+A,s=n/2-e/2,o=s+e;this.svgCanvas.setAttribute("width",`${t}px`),this.svgCanvas.setAttribute("height",`${n}px`),this.svgPath.setAttribute("d",`M 0 0 L ${t} 0 L ${t} ${n} L 0 ${n} M ${i} ${s} L ${i} ${o} L ${a} ${o} L ${a} ${s}`)}destroy(){this.svgCanvas!==void 0&&(this.svgCanvas.remove(),this.svgCanvas=void 0),this.map!==void 0&&(this.map=void 0)}toPixels(A,e=96){return this.unit===Si.mm&&(e/=25.4),e*A}}const Qp={PageSize:"Page Size",PageOrientation:"Page Orientation",Format:"Format",DPI:"DPI",Generate:"Generate",LanguageName:"English",LanguageCode:"en"},Up=[Qp,{PageSize:"Taille de page",PageOrientation:"Orientation de la page",Format:"Format",DPI:"DPI",Generate:"Générer",LanguageName:"Français",LanguageCode:"fr"},{PageSize:"Sivukoko",PageOrientation:"Sivun suunta",Format:"Muoto",DPI:"DPI",Generate:"Generoi",LanguageName:"Suomalainen",LanguageCode:"fi"},{PageSize:"Papierformat",PageOrientation:"Papierausrichtung",Format:"Dateiformat",DPI:"Druckauflösung",Generate:"Erstellen",LanguageName:"Deutsch",LanguageCode:"de"},{PageSize:"Sidstorlek",PageOrientation:"Sidorientering",Format:"Format",DPI:"DPI",Generate:"Generera",LanguageName:"Svenska",LanguageCode:"sv"},{PageSize:"Tamaño de página",PageOrientation:"Orientación de página",Format:"Formato",DPI:"DPI",Generate:"Generar",LanguageName:"Española",LanguageCode:"es"},{PageSize:"Mida",PageOrientation:"Orientació",Format:"Format",DPI:"DPI",Generate:"Genera",LanguageName:"Catalan",LanguageCode:"ca"},{PageSize:"Kích thước trang",PageOrientation:"Loại trang",Format:"Định dạng",DPI:"Mật độ điểm ảnh (DPI)",Generate:"Tạo",LanguageName:"Tiếng Việt",LanguageCode:"vi"},{PageSize:"Розмір сторінки",PageOrientation:"Орієнтація сторінки",Format:"Формат",DPI:"DPI",Generate:"Згенерувати",LanguageName:"українська",LanguageCode:"uk"},{PageSize:"页面大小",PageOrientation:"页面方向",Format:"格式",DPI:"像素",Generate:"导出",LanguageName:"简体字",LanguageCode:"zhHans"},{PageSize:"頁面大小",PageOrientation:"頁面方向",Format:"格式",DPI:"像素",Generate:"導出",LanguageName:"繁体字",LanguageCode:"zhHant"},{PageSize:"ページサイズ",PageOrientation:"ページ方向",Format:"フォーマット",DPI:"DPI(解像度)",Generate:"出力",LanguageName:"日本語",LanguageCode:"ja"},{PageSize:"Tamanho da página",PageOrientation:"Orientação da página",Format:"Formato",DPI:"DPI",Generate:"Gerar",LanguageName:"Português",LanguageCode:"pt"}],uy=["en","fr","fi","de","sv","es","ca","vi","uk","zhHans","zhHant","ja","pt"],Ep=r=>Up.find(A=>A.LanguageCode===r)??Qp;function be(r){"@babel/helpers - typeof";return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},be(r)}var Kt=Uint8Array,br=Uint16Array,Vl=Int32Array,bo=new Kt([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]),Fo=new Kt([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]),jl=new Kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xp=function(r,A){for(var e=new br(31),t=0;t<31;++t)e[t]=A+=1<<r[t-1];for(var n=new Vl(e[30]),t=1;t<30;++t)for(var i=e[t];i<e[t+1];++i)n[i]=i-e[t]<<5|t;return{b:e,r:n}},Ip=xp(bo,2),Sp=Ip.b,ql=Ip.r;Sp[28]=258,ql[258]=28;for(var Lp=xp(Fo,0),ly=Lp.b,Np=Lp.r,Gl=new br(32768),je=0;je<32768;++je){var Xn=(je&43690)>>1|(je&21845)<<1;Xn=(Xn&52428)>>2|(Xn&13107)<<2,Xn=(Xn&61680)>>4|(Xn&3855)<<4,Gl[je]=((Xn&65280)>>8|(Xn&255)<<8)>>1}for(var hn=function(r,A,e){for(var t=r.length,n=0,i=new br(A);n<t;++n)r[n]&&++i[r[n]-1];var a=new br(A);for(n=1;n<A;++n)a[n]=a[n-1]+i[n-1]<<1;var s;if(e){s=new br(1<<A);var o=15-A;for(n=0;n<t;++n)if(r[n])for(var l=n<<4|r[n],c=A-r[n],g=a[r[n]-1]++<<c,d=g|(1<<c)-1;g<=d;++g)s[Gl[g]>>o]=l}else for(s=new br(t),n=0;n<t;++n)r[n]&&(s[n]=Gl[a[r[n]-1]++]>>15-r[n]);return s},Yn=new Kt(288),je=0;je<144;++je)Yn[je]=8;for(var je=144;je<256;++je)Yn[je]=9;for(var je=256;je<280;++je)Yn[je]=7;for(var je=280;je<288;++je)Yn[je]=8;for(var ts=new Kt(32),je=0;je<32;++je)ts[je]=5;var cy=hn(Yn,9,0),fy=hn(Yn,9,1),hy=hn(ts,5,0),gy=hn(ts,5,1),Wl=function(r){for(var A=r[0],e=1;e<r.length;++e)r[e]>A&&(A=r[e]);return A},Wr=function(r,A,e){var t=A/8|0;return(r[t]|r[t+1]<<8)>>(A&7)&e},zl=function(r,A){var e=A/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(A&7)},Xl=function(r){return(r+7)/8|0},Tp=function(r,A,e){return(e==null||e>r.length)&&(e=r.length),new Kt(r.subarray(A,e))},dy=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],zr=function(r,A,e){var t=new Error(A||dy[r]);if(t.code=r,Error.captureStackTrace&&Error.captureStackTrace(t,zr),!e)throw t;return t},py=function(r,A,e,t){var n=r.length,i=0;if(!n||A.f&&!A.l)return e||new Kt(0);var a=!e,s=a||A.i!=2,o=A.i;a&&(e=new Kt(n*3));var l=function(CA){var LA=e.length;if(CA>LA){var NA=new Kt(Math.max(LA*2,CA));NA.set(e),e=NA}},c=A.f||0,g=A.p||0,d=A.b||0,h=A.l,w=A.d,B=A.m,b=A.n,y=n*8;do{if(!h){c=Wr(r,g,1);var C=Wr(r,g+1,3);if(g+=3,C)if(C==1)h=fy,w=gy,B=9,b=5;else if(C==2){var q=Wr(r,g,31)+257,R=Wr(r,g+10,15)+4,H=q+Wr(r,g+5,31)+1;g+=14;for(var W=new Kt(H),J=new Kt(19),E=0;E<R;++E)J[jl[E]]=Wr(r,g+E*3,7);g+=R*3;for(var L=Wl(J),M=(1<<L)-1,_=hn(J,L,1),E=0;E<H;){var Y=_[Wr(r,g,M)];g+=Y&15;var x=Y>>4;if(x<16)W[E++]=x;else{var nA=0,Z=0;for(x==16?(Z=3+Wr(r,g,3),g+=2,nA=W[E-1]):x==17?(Z=3+Wr(r,g,7),g+=3):x==18&&(Z=11+Wr(r,g,127),g+=7);Z--;)W[E++]=nA}}var z=W.subarray(0,q),tA=W.subarray(q);B=Wl(z),b=Wl(tA),h=hn(z,B,1),w=hn(tA,b,1)}else zr(1);else{var x=Xl(g)+4,T=r[x-4]|r[x-3]<<8,K=x+T;if(K>n){o&&zr(0);break}s&&l(d+T),e.set(r.subarray(x,K),d),A.b=d+=T,A.p=g=K*8,A.f=c;continue}if(g>y){o&&zr(0);break}}s&&l(d+131072);for(var aA=(1<<B)-1,gA=(1<<b)-1,U=g;;U=g){var nA=h[zl(r,g)&aA],P=nA>>4;if(g+=nA&15,g>y){o&&zr(0);break}if(nA||zr(2),P<256)e[d++]=P;else if(P==256){U=g,h=null;break}else{var k=P-254;if(P>264){var E=P-257,j=bo[E];k=Wr(r,g,(1<<j)-1)+Sp[E],g+=j}var $=w[zl(r,g)&gA],oA=$>>4;$||zr(3),g+=$&15;var tA=ly[oA];if(oA>3){var j=Fo[oA];tA+=zl(r,g)&(1<<j)-1,g+=j}if(g>y){o&&zr(0);break}s&&l(d+131072);var hA=d+k;if(d<tA){var lA=i-tA,EA=Math.min(tA,hA);for(lA+d<0&&zr(3);d<EA;++d)e[d]=t[lA+d]}for(;d<hA;++d)e[d]=e[d-tA]}}A.l=h,A.p=U,A.b=d,A.f=c,h&&(c=1,A.m=B,A.d=w,A.n=b)}while(!c);return d!=e.length&&a?Tp(e,0,d):e.subarray(0,d)},In=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8},rs=function(r,A,e){e<<=A&7;var t=A/8|0;r[t]|=e,r[t+1]|=e>>8,r[t+2]|=e>>16},Yl=function(r,A){for(var e=[],t=0;t<r.length;++t)r[t]&&e.push({s:t,f:r[t]});var n=e.length,i=e.slice();if(!n)return{t:Hp,l:0};if(n==1){var a=new Kt(e[0].s+1);return a[e[0].s]=1,{t:a,l:1}}e.sort(function(K,q){return K.f-q.f}),e.push({s:-1,f:25001});var s=e[0],o=e[1],l=0,c=1,g=2;for(e[0]={s:-1,f:s.f+o.f,l:s,r:o};c!=n-1;)s=e[e[l].f<e[g].f?l++:g++],o=e[l!=c&&e[l].f<e[g].f?l++:g++],e[c++]={s:-1,f:s.f+o.f,l:s,r:o};for(var d=i[0].s,t=1;t<n;++t)i[t].s>d&&(d=i[t].s);var h=new br(d+1),w=Jl(e[c-1],h,0);if(w>A){var t=0,B=0,b=w-A,y=1<<b;for(i.sort(function(q,R){return h[R.s]-h[q.s]||q.f-R.f});t<n;++t){var C=i[t].s;if(h[C]>A)B+=y-(1<<w-h[C]),h[C]=A;else break}for(B>>=b;B>0;){var x=i[t].s;h[x]<A?B-=1<<A-h[x]++-1:++t}for(;t>=0&&B;--t){var T=i[t].s;h[T]==A&&(--h[T],++B)}w=A}return{t:new Kt(h),l:w}},Jl=function(r,A,e){return r.s==-1?Math.max(Jl(r.l,A,e+1),Jl(r.r,A,e+1)):A[r.s]=e},Op=function(r){for(var A=r.length;A&&!r[--A];);for(var e=new br(++A),t=0,n=r[0],i=1,a=function(o){e[t++]=o},s=1;s<=A;++s)if(r[s]==n&&s!=A)++i;else{if(!n&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(n),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(n);i=1,n=r[s]}return{c:e.subarray(0,t),n:A}},ns=function(r,A){for(var e=0,t=0;t<A.length;++t)e+=r[t]*A[t];return e},Pp=function(r,A,e){var t=e.length,n=Xl(A+2);r[n]=t&255,r[n+1]=t>>8,r[n+2]=r[n]^255,r[n+3]=r[n+1]^255;for(var i=0;i<t;++i)r[n+i+4]=e[i];return(n+4+t)*8},_p=function(r,A,e,t,n,i,a,s,o,l,c){In(A,c++,e),++n[256];for(var g=Yl(n,15),d=g.t,h=g.l,w=Yl(i,15),B=w.t,b=w.l,y=Op(d),C=y.c,x=y.n,T=Op(B),K=T.c,q=T.n,R=new br(19),H=0;H<C.length;++H)++R[C[H]&31];for(var H=0;H<K.length;++H)++R[K[H]&31];for(var W=Yl(R,7),J=W.t,E=W.l,L=19;L>4&&!J[jl[L-1]];--L);var M=l+5<<3,_=ns(n,Yn)+ns(i,ts)+a,Y=ns(n,d)+ns(i,B)+a+14+3*L+ns(R,J)+2*R[16]+3*R[17]+7*R[18];if(o>=0&&M<=_&&M<=Y)return Pp(A,c,r.subarray(o,o+l));var nA,Z,z,tA;if(In(A,c,1+(Y<_)),c+=2,Y<_){nA=hn(d,h,0),Z=d,z=hn(B,b,0),tA=B;var aA=hn(J,E,0);In(A,c,x-257),In(A,c+5,q-1),In(A,c+10,L-4),c+=14;for(var H=0;H<L;++H)In(A,c+3*H,J[jl[H]]);c+=3*L;for(var gA=[C,K],U=0;U<2;++U)for(var P=gA[U],H=0;H<P.length;++H){var k=P[H]&31;In(A,c,aA[k]),c+=J[k],k>15&&(In(A,c,P[H]>>5&127),c+=P[H]>>12)}}else nA=cy,Z=Yn,z=hy,tA=ts;for(var H=0;H<s;++H){var j=t[H];if(j>255){var k=j>>18&31;rs(A,c,nA[k+257]),c+=Z[k+257],k>7&&(In(A,c,j>>23&31),c+=bo[k]);var $=j&31;rs(A,c,z[$]),c+=tA[$],$>3&&(rs(A,c,j>>5&8191),c+=Fo[$])}else rs(A,c,nA[j]),c+=Z[j]}return rs(A,c,nA[256]),c+Z[256]},vy=new Vl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Hp=new Kt(0),By=function(r,A,e,t,n,i){var a=i.z||r.length,s=new Kt(t+a+5*(1+Math.ceil(a/7e3))+n),o=s.subarray(t,s.length-n),l=i.l,c=(i.r||0)&7;if(A){c&&(o[0]=i.r>>3);for(var g=vy[A-1],d=g>>13,h=g&8191,w=(1<<e)-1,B=i.p||new br(32768),b=i.h||new br(w+1),y=Math.ceil(e/3),C=2*y,x=function(kA){return(r[kA]^r[kA+1]<<y^r[kA+2]<<C)&w},T=new Vl(25e3),K=new br(288),q=new br(32),R=0,H=0,W=i.i||0,J=0,E=i.w||0,L=0;W+2<a;++W){var M=x(W),_=W&32767,Y=b[M];if(B[_]=Y,b[M]=_,E<=W){var nA=a-W;if((R>7e3||J>24576)&&(nA>423||!l)){c=_p(r,o,0,T,K,q,H,J,L,W-L,c),J=R=H=0,L=W;for(var Z=0;Z<286;++Z)K[Z]=0;for(var Z=0;Z<30;++Z)q[Z]=0}var z=2,tA=0,aA=h,gA=_-Y&32767;if(nA>2&&M==x(W-gA))for(var U=Math.min(d,nA)-1,P=Math.min(32767,W),k=Math.min(258,nA);gA<=P&&--aA&&_!=Y;){if(r[W+z]==r[W+z-gA]){for(var j=0;j<k&&r[W+j]==r[W+j-gA];++j);if(j>z){if(z=j,tA=gA,j>U)break;for(var $=Math.min(gA,j-2),oA=0,Z=0;Z<$;++Z){var hA=W-gA+Z&32767,lA=B[hA],EA=hA-lA&32767;EA>oA&&(oA=EA,Y=hA)}}}_=Y,Y=B[_],gA+=_-Y&32767}if(tA){T[J++]=268435456|ql[z]<<18|Np[tA];var CA=ql[z]&31,LA=Np[tA]&31;H+=bo[CA]+Fo[LA],++K[257+CA],++q[LA],E=W+z,++R}else T[J++]=r[W],++K[r[W]]}}for(W=Math.max(W,E);W<a;++W)T[J++]=r[W],++K[r[W]];c=_p(r,o,l,T,K,q,H,J,L,W-L,c),l||(i.r=c&7|o[c/8|0]<<3,c-=7,i.h=b,i.p=B,i.i=W,i.w=E)}else{for(var W=i.w||0;W<a+l;W+=65535){var NA=W+65535;NA>=a&&(o[c/8|0]=l,NA=a),c=Pp(o,c+1,r.subarray(W,NA))}i.i=a}return Tp(s,0,t+Xl(c)+n)},Rp=function(){var r=1,A=0;return{p:function(e){for(var t=r,n=A,i=e.length|0,a=0;a!=i;){for(var s=Math.min(a+2655,i);a<s;++a)n+=t+=e[a];t=(t&65535)+15*(t>>16),n=(n&65535)+15*(n>>16)}r=t,A=n},d:function(){return r%=65521,A%=65521,(r&255)<<24|(r&65280)<<8|(A&255)<<8|A>>8}}},wy=function(r,A,e,t,n){if(!n&&(n={l:1},A.dictionary)){var i=A.dictionary.subarray(-32768),a=new Kt(i.length+r.length);a.set(i),a.set(r,i.length),r=a,n.w=i.length}return By(r,A.level==null?6:A.level,A.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+A.mem,e,t,n)},Dp=function(r,A,e){for(;e;++A)r[A]=e,e>>>=8},my=function(r,A){var e=A.level,t=e==0?0:e<6?1:e==9?3:2;if(r[0]=120,r[1]=t<<6|(A.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,A.dictionary){var n=Rp();n.p(A.dictionary),Dp(r,2,n.d())}},yy=function(r,A){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&zr(6,"invalid zlib data"),(r[1]>>5&1)==1&&zr(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function Zl(r,A){A||(A={});var e=Rp();e.p(r);var t=wy(r,A,A.dictionary?6:2,4);return my(t,A),Dp(t,t.length-4,e.d()),t}function Cy(r,A){return py(r.subarray(yy(r),-4),{i:2},A,A)}var by=typeof TextDecoder<"u"&&new TextDecoder,Fy=0;try{by.decode(Hp,{stream:!0}),Fy=1}catch{}/** @license * * jsPDF - PDF Document creation from JavaScript * Version 3.0.0 Built on 2025-02-19T09:26:58.791Z * CommitID 00000000 * * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF * 2015-2021 yWorks GmbH, http://www.yworks.com * 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX * 2016-2018 Aras Abbasi <aras.abbasi@gmail.com> * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, https://github.com/willowsystems * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * 2014 Steven Spungin, https://github.com/Flamenco * 2014 Kenneth Glassey, https://github.com/Gavvers * * 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. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, Flamenco */var ne=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function $l(){ne.console&&typeof ne.console.log=="function"&&ne.console.log.apply(ne.console,arguments)}var He={log:$l,warn:function(r){ne.console&&(typeof ne.console.warn=="function"?ne.console.warn.apply(ne.console,arguments):$l.call(null,arguments))},error:function(r){ne.console&&(typeof ne.console.error=="function"?ne.console.error.apply(ne.console,arguments):$l(r))}};function Ac(r,A,e){var t=new XMLHttpRequest;t.open("GET",r),t.responseType="blob",t.onload=function(){Li(t.response,A,e)},t.onerror=function(){He.error("could not download file")},t.send()}function Mp(r){var A=new XMLHttpRequest;A.open("HEAD",r,!1);try{A.send()}catch{}return A.status>=200&&A.status<=299}function Qo(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(A)}}var is,ec,Li=ne.saveAs||((typeof window>"u"?"undefined":be(window))!=="object"||window!==ne?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,A,e){var t=ne.URL||ne.webkitURL,n=document.createElement("a");A=A||r.name||"download",n.download=A,n.rel="noopener",typeof r=="string"?(n.href=r,n.origin!==location.origin?Mp(n.href)?Ac(r,A,e):Qo(n,n.target="_blank"):Qo(n)):(n.href=t.createObjectURL(r),setTimeout(function(){t.revokeObjectURL(n.href)},4e4),setTimeout(function(){Qo(n)},0))}:"msSaveOrOpenBlob"in navigator?function(r,A,e){if(A=A||r.name||"download",typeof r=="string")if(Mp(r))Ac(r,A,e);else{var t=document.createElement("a");t.href=r,t.target="_blank",setTimeout(function(){Qo(t)})}else navigator.msSaveOrOpenBlob(function(n,i){return i===void 0?i={autoBom:!1}:be(i)!=="object"&&(He.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n}(r,e),A)}:function(r,A,e,t){if((t=t||open("","_blank"))&&(t.document.title=t.document.body.innerText="downloading..."),typeof r=="string")return Ac(r,A,e);var n=r.type==="application/octet-stream",i=/constructor/i.test(ne.HTMLElement)||ne.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||n&&i)&&(typeof FileReader>"u"?"undefined":be(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var c=s.result;c=a?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),t?t.location.href=c:location=c,t=null},s.readAsDataURL(r)}else{var o=ne.URL||ne.webkitURL,l=o.createObjectURL(r);t?t.location=l:location.href=l,t=null,setTimeout(function(){o.revokeObjectURL(l)},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 kp(r){var A;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],t=0;t<e.length;t++){var n=e[t].re,i=e[t].process,a=n.exec(r);a&&(A=i(a),this.r=A[0],this.g=A[1],this.b=A[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 s=this.r.toString(16),o=this.g.toString(16),l=this.b.toString(16);return s.length==1&&(s="0"+s),o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),"#"+s+o+l}}/** * @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 tc(r,A){var e=r[0],t=r[1],n=r[2],i=r[3];e=Vt(e,t,n,i,A[0],7,-680876936),i=Vt(i,e,t,n,A[1],12,-389564586),n=Vt(n,i,e,t,A[2],17,606105819),t=Vt(t,n,i,e,A[3],22,-1044525330),e=Vt(e,t,n,i,A[4],7,-176418897),i=Vt(i,e,t,n,A[5],12,1200080426),n=Vt(n,i,e,t,A[6],17,-1473231341),t=Vt(t,n,i,e,A[7],22,-45705983),e=Vt(e,t,n,i,A[8],7,1770035416),i=Vt(i,e,t,n,A[9],12,-1958414417),n=Vt(n,i,e,t,A[10],17,-42063),t=Vt(t,n,i,e,A[11],22,-1990404162),e=Vt(e,t,n,i,A[12],7,1804603682),i=Vt(i,e,t,n,A[13],12,-40341101),n=Vt(n,i,e,t,A[14],17,-1502002290),e=jt(e,t=Vt(t,n,i,e,A[15],22,1236535329),n,i,A[1],5,-165796510),i=jt(i,e,t,n,A[6],9,-1069501632),n=jt(n,i,e,t,A[11],14,643717713),t=jt(t,n,i,e,A[0],20,-373897302),e=jt(e,t,n,i,A[5],5,-701558691),i=jt(i,e,t,n,A[10],9,38016083),n=jt(n,i,e,t,A[15],14,-660478335),t=jt(t,n,i,e,A[4],20,-405537848),e=jt(e,t,n,i,A[9],5,568446438),i=jt(i,e,t,n,A[14],9,-1019803690),n=jt(n,i,e,t,A[3],14,-187363961),t=jt(t,n,i,e,A[8],20,1163531501),e=jt(e,t,n,i,A[13],5,-1444681467),i=jt(i,e,t,n,A[2],9,-51403784),n=jt(n,i,e,t,A[7],14,1735328473),e=qt(e,t=jt(t,n,i,e,A[12],20,-1926607734),n,i,A[5],4,-378558),i=qt(i,e,t,n,A[8],11,-2022574463),n=qt(n,i,e,t,A[11],16,1839030562),t=qt(t,n,i,e,A[14],23,-35309556),e=qt(e,t,n,i,A[1],4,-1530992060),i=qt(i,e,t,n,A[4],11,1272893353),n=qt(n,i,e,t,A[7],16,-155497632),t=qt(t,n,i,e,A[10],23,-1094730640),e=qt(e,t,n,i,A[13],4,681279174),i=qt(i,e,t,n,A[0],11,-358537222),n=qt(n,i,e,t,A[3],16,-722521979),t=qt(t,n,i,e,A[6],23,76029189),e=qt(e,t,n,i,A[9],4,-640364487),i=qt(i,e,t,n,A[12],11,-421815835),n=qt(n,i,e,t,A[15],16,530742520),e=Gt(e,t=qt(t,n,i,e,A[2],23,-995338651),n,i,A[0],6,-198630844),i=Gt(i,e,t,n,A[7],10,1126891415),n=Gt(n,i,e,t,A[14],15,-1416354905),t=Gt(t,n,i,e,A[5],21,-57434055),e=Gt(e,t,n,i,A[12],6,1700485571),i=Gt(i,e,t,n,A[3],10,-1894986606),n=Gt(n,i,e,t,A[10],15,-1051523),t=Gt(t,n,i,e,A[1],21,-2054922799),e=Gt(e,t,n,i,A[8],6,1873313359),i=Gt(i,e,t,n,A[15],10,-30611744),n=Gt(n,i,e,t,A[6],15,-1560198380),t=Gt(t,n,i,e,A[13],21,1309151649),e=Gt(e,t,n,i,A[4],6,-145523070),i=Gt(i,e,t,n,A[11],10,-1120210379),n=Gt(n,i,e,t,A[2],15,718787259),t=Gt(t,n,i,e,A[9],21,-343485551),r[0]=Jn(e,r[0]),r[1]=Jn(t,r[1]),r[2]=Jn(n,r[2]),r[3]=Jn(i,r[3])}function Uo(r,A,e,t,n,i){return A=Jn(Jn(A,r),Jn(t,i)),Jn(A<<n|A>>>32-n,e)}function Vt(r,A,e,t,n,i,a){return Uo(A&e|~A&t,r,A,n,i,a)}function jt(r,A,e,t,n,i,a){return Uo(A&t|e&~t,r,A,n,i,a)}function qt(r,A,e,t,n,i,a){return Uo(A^e^t,r,A,n,i,a)}function Gt(r,A,e,t,n,i,a){return Uo(e^(A|~t),r,A,n,i,a)}function Kp(r){var A,e=r.length,t=[1732584193,-271733879,-1732584194,271733878];for(A=64;A<=r.length;A+=64)tc(t,Qy(r.substring(A-64,A)));r=r.substring(A-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(A=0;A<r.length;A++)n[A>>2]|=r.charCodeAt(A)<<(A%4<<3);if(n[A>>2]|=128<<(A%4<<3),A>55)for(tc(t,n),A=0;A<16;A++)n[A]=0;return n[14]=8*e,tc(t,n),t}function Qy(r){var A,e=[];for(A=0;A<64;A+=4)e[A>>2]=r.charCodeAt(A)+(r.charCodeAt(A+1)<<8)+(r.charCodeAt(A+2)<<16)+(r.charCodeAt(A+3)<<24);return e}is=ne.atob.bind(ne),ec=ne.btoa.bind(ne);var Vp="0123456789abcdef".split("");function Uy(r){for(var A="",e=0;e<4;e++)A+=Vp[r>>8*e+4&15]+Vp[r>>8*e&15];return A}function Ey(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function rc(r){return Kp(r).map(Ey).join("")}var xy=function(r){for(var A=0;A<r.length;A++)r[A]=Uy(r[A]);return r.join("")}(Kp("hello"))!="5d41402abc4b2a76b9719d911017c592";function Jn(r,A){if(xy){var e=(65535&r)+(65535&A);return(r>>16)+(A>>16)+(e>>16)<<16|65535&e}return r+A&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 nc(r,A){var e,t,n,i;if(r!==e){for(var a=(n=r,i=1+(256/r.length>>0),new Array(i+1).join(n)),s=[],o=0;o<256;o++)s[o]=o;var l=0;for(o=0;o<256;o++){var c=s[o];l=(l+c+a.charCodeAt(o))%256,s[o]=s[l],s[l]=c}e=r,t=s}else s=t;var g=A.length,d=0,h=0,w="";for(o=0;o<g;o++)h=(h+(c=s[d=(d+1)%256]))%256,s[d]=s[h],s[h]=c,a=s[(s[d]+s[h])%256],w+=String.fromCharCode(A.charCodeAt(o)^a);return w}/** * @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 jp={print:4,modify:8,copy:16,"annot-forms":32};function sa(r,A,e,t){this.v=1,this.r=2;var n=192;r.forEach(function(s){if(jp.perm!==void 0)throw new Error("Invalid permission: "+s);n+=jp[s]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var i=(A+this.padding).substr(0,32),a=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,a),this.P=-(1+(255^n)),this.encryptionKey=rc(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(t)).substr(0,5),this.U=nc(this.encryptionKey,this.padding)}function oa(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var A="",e=r.length,t=0;t<e;t++){var n=r.charCodeAt(t);n<33||n===35||n===37||n===40||n===41||n===47||n===60||n===62||n===91||n===93||n===123||n===125||n>126?A+="#"+("0"+n.toString(16)).slice(-2):A+=r[t]}return A}function qp(r){if(be(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var A={};this.subscribe=function(e,t,n){if(n=n||!1,typeof e!="string"||typeof t!="function"||typeof n!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");A.hasOwnProperty(e)||(A[e]={});var i=Math.random().toString(35);return A[e][i]=[t,!!n],i},this.unsubscribe=function(e){for(var t in A)if(A[t][e])return delete A[t][e],Object.keys(A[t]).length===0&&delete A[t],!0;return!1},this.publish=function(e){if(A.hasOwnProperty(e)){var t=Array.prototype.slice.call(arguments,1),n=[];for(var i in A[e]){var a=A[e][i];try{a[0].apply(r,t)}catch(s){ne.console&&He.error("jsPDF PubSub Error",s.message,s)}a[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return A}}function Eo(r){if(!(this instanceof Eo))return new Eo(r);var A="opacity,stroke-opacity".split(",");for(var e in r)r.hasOwnProperty(e)&&A.indexOf(e)>=0&&(this[e]=r[e]);this.id="",this.objectNumber=-1}function Gp(r,A){this.gState=r,this.matrix=A,this.id="",this.objectNumber=-1}function Ni(r,A,e,t,n){if(!(this instanceof Ni))return new Ni(r,A,e,t,n);this.type=r==="axial"?2:3,this.coords=A,this.colors=e,Gp.call(this,t,n)}function ua(r,A,e,t,n){if(!(this instanceof ua))return new ua(r,A,e,t,n);this.boundingBox=r,this.xStep=A,this.yStep=e,this.stream="",this.cloneIndex=0,Gp.call(this,t,n)}function re(r){var A,e=typeof arguments[0]=="string"?arguments[0]:"p",t=arguments[1],n=arguments[2],i=arguments[3],a=[],s=1,o=16,l="S",c=null;be(r=r||{})==="object"&&(e=r.orientation,t=r.unit||t,n=r.format||n,i=r.compress||r.compressPdf||i,(c=r.encryption||null)!==null&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),s=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(A=r.precision),r.floatPrecision!==void 0&&(o=r.floatPrecision),l=r.defaultPathOperation||"S"),a=r.filters||(i===!0?["FlateEncode"]:a),t=t||"mm",e=(""+(e||"P")).toLowerCase();var g=r.putOnlyUsedFonts||!1,d={},h={internal:{},__private__:{}};h.__private__.PubSub=qp;var w="1.3",B=h.__private__.getPdfVersion=function(){return w};h.__private__.setPdfVersion=function(p){w=p};var b={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]};h.__private__.getPageFormats=function(){return b};var y=h.__private__.getPageFormat=function(p){return b[p]};n=n||"a4";var C={COMPAT:"compat",ADVANCED:"advanced"},x=C.COMPAT;function T(){this.saveGraphicsState(),G(new ee(PA,0,0,-PA,0,pi()*PA).toString()+" cm"),this.setFontSize(this.getFontSize()/PA),l="n",x=C.ADVANCED}function K(){this.restoreGraphicsState(),l="S",x=C.COMPAT}var q=h.__private__.combineFontStyleAndFontWeight=function(p,Q){if(p=="bold"&&Q=="normal"||p=="bold"&&Q==400||p=="normal"&&Q=="italic"||p=="bold"&&Q=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return Q&&(p=Q==400||Q==="normal"?p==="italic"?"italic":"normal":Q!=700&&Q!=="bold"||p!=="normal"?(Q==700?"bold":Q)+""+p:"bold"),p};h.advancedAPI=function(p){var Q=x===C.COMPAT;return Q&&T.call(this),typeof p!="function"||(p(this),Q&&K.call(this)),this},h.compatAPI=function(p){var Q=x===C.ADVANCED;return Q&&K.call(this),typeof p!="function"||(p(this),Q&&T.call(this)),this},h.isAdvancedAPI=function(){return x===C.ADVANCED};var R,H=function(p){if(x!==C.ADVANCED)throw new Error(p+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},W=h.roundToPrecision=h.__private__.roundToPrecision=function(p,Q){var V=A||Q;if(isNaN(p)||isNaN(V))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return p.toFixed(V).replace(/0+$/,"")};R=h.hpf=h.__private__.hpf=typeof o=="number"?function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.hpf");return W(p,o)}:o==="smart"?function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.hpf");return W(p,p>-1&&p<1?16:5)}:function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.hpf");return W(p,16)};var J=h.f2=h.__private__.f2=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.f2");return W(p,2)},E=h.__private__.f3=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.f3");return W(p,3)},L=h.scale=h.__private__.scale=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.scale");return x===C.COMPAT?p*PA:x===C.ADVANCED?p:void 0},M=function(p){return x===C.COMPAT?pi()-p:x===C.ADVANCED?p:void 0},_=function(p){return L(M(p))};h.__private__.setPrecision=h.setPrecision=function(p){typeof parseInt(p,10)=="number"&&(A=parseInt(p,10))};var Y,nA="00000000000000000000000000000000",Z=h.__private__.getFileId=function(){return nA},z=h.__private__.setFileId=function(p){return nA=p!==void 0&&/^[a-fA-F0-9]{32}$/.test(p)?p.toUpperCase():nA.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),c!==null&&(Jt=new sa(c.userPermissions,c.userPassword,c.ownerPassword,nA)),nA};h.setFileId=function(p){return z(p),this},h.getFileId=function(){return Z()};var tA=h.__private__.convertDateToPDFDate=function(p){var Q=p.getTimezoneOffset(),V=Q<0?"+":"-",X=Math.floor(Math.abs(Q/60)),uA=Math.abs(Q%60),BA=[V,k(X),"'",k(uA),"'"].join("");return["D:",p.getFullYear(),k(p.getMonth()+1),k(p.getDate()),k(p.getHours()),k(p.getMinutes()),k(p.getSeconds()),BA].join("")},aA=h.__private__.convertPDFDateToDate=function(p){var Q=parseInt(p.substr(2,4),10),V=parseInt(p.substr(6,2),10)-1,X=parseInt(p.substr(8,2),10),uA=parseInt(p.substr(10,2),10),BA=parseInt(p.substr(12,2),10),xA=parseInt(p.substr(14,2),10);return new Date(Q,V,X,uA,BA,xA,0)},gA=h.__private__.setCreationDate=function(p){var Q;if(p===void 0&&(p=new Date),p instanceof Date)Q=tA(p);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(p))throw new Error("Invalid argument passed to jsPDF.setCreationDate");Q=p}return Y=Q},U=h.__private__.getCreationDate=function(p){var Q=Y;return p==="jsDate"&&(Q=aA(Y)),Q};h.setCreationDate=function(p){return gA(p),this},h.getCreationDate=function(p){return U(p)};var P,k=h.__private__.padd2=function(p){return("0"+parseInt(p)).slice(-2)},j=h.__private__.padd2Hex=function(p){return("00"+(p=p.toString())).substr(p.length)},$=0,oA=[],hA=[],lA=0,EA=[],CA=[],LA=!1,NA=hA,kA=function(){$=0,lA=0,hA=[],oA=[],EA=[],Rr=Xe(),lt=Xe()};h.__private__.setCustomOutputDestination=function(p){LA=!0,NA=p};var dA=function(p){LA||(NA=p)};h.__private__.resetCustomOutputDestination=function(){LA=!1,NA=hA};var G=h.__private__.out=function(p){return p=p.toString(),lA+=p.length+1,NA.push(p),NA},ZA=h.__private__.write=function(p){return G(arguments.length===1?p.toString():Array.prototype.join.call(arguments," "))},KA=h.__private__.getArrayBuffer=function(p){for(var Q=p.length,V=new ArrayBuffer(Q),X=new Uint8Array(V);Q--;)X[Q]=p.charCodeAt(Q);return V},QA=[["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]];h.__private__.getStandardFonts=function(){return QA};var IA=r.fontSize||16;h.__private__.setFontSize=h.setFontSize=function(p){return IA=x===C.ADVANCED?p/PA:p,this};var TA,OA=h.__private__.getFontSize=h.getFontSize=function(){return x===C.COMPAT?IA:IA*PA},pA=r.R2L||!1;h.__private__.setR2L=h.setR2L=function(p){return pA=p,this},h.__private__.getR2L=h.getR2L=function(){return pA};var bA,_A=h.__private__.setZoomMode=function(p){var Q=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(p))TA=p;else if(isNaN(p)){if(Q.indexOf(p)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+p+'" is not recognized.');TA=p}else TA=parseInt(p,10)};h.__private__.getZoomMode=function(){return TA};var HA,WA=h.__private__.setPageMode=function(p){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(p)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+p+'" is not recognized.');bA=p};h.__private__.getPageMode=function(){return bA};var he=h.__private__.setLayoutMode=function(p){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(p)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+p+'" is not recognized.');HA=p};h.__private__.getLayoutMode=function(){return HA},h.__private__.setDisplayMode=h.setDisplayMode=function(p,Q,V){return _A(p),he(Q),WA(V),this};var YA={title:"",subject:"",author:"",keywords:"",creator:""};h.__private__.getDocumentProperty=function(p){if(Object.keys(YA).indexOf(p)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return YA[p]},h.__private__.getDocumentProperties=function(){return YA},h.__private__.setDocumentProperties=h.setProperties=h.setDocumentProperties=function(p){for(var Q in YA)YA.hasOwnProperty(Q)&&p[Q]&&(YA[Q]=p[Q]);return this},h.__private__.setDocumentProperty=function(p,Q){if(Object.keys(YA).indexOf(p)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return YA[p]=Q};var Ae,PA,Le,ce,ke,de={},Fe={},It=[],Be={},Ht={},Qe={},Rt={},Se=null,We=0,ae=[],ie=new qp(h),fr=r.hotfixes||[],bt={},Qr={},hr=[],ee=function p(Q,V,X,uA,BA,xA){if(!(this instanceof p))return new p(Q,V,X,uA,BA,xA);isNaN(Q)&&(Q=1),isNaN(V)&&(V=0),isNaN(X)&&(X=0),isNaN(uA)&&(uA=1),isNaN(BA)&&(BA=0),isNaN(xA)&&(xA=0),this._matrix=[Q,V,X,uA,BA,xA]};Object.defineProperty(ee.prototype,"sx",{get:function(){return this._matrix[0]},set:function(p){this._matrix[0]=p}}),Object.defineProperty(ee.prototype,"shy",{get:function(){return this._matrix[1]},set:function(p){this._matrix[1]=p}}),Object.defineProperty(ee.prototype,"shx",{get:function(){return this._matrix[2]},set:function(p){this._matrix[2]=p}}),Object.defineProperty(ee.prototype,"sy",{get:function(){return this._matrix[3]},set:function(p){this._matrix[3]=p}}),Object.defineProperty(ee.prototype,"tx",{get:function(){return this._matrix[4]},set:function(p){this._matrix[4]=p}}),Object.defineProperty(ee.prototype,"ty",{get:function(){return this._matrix[5]},set:function(p){this._matrix[5]=p}}),Object.defineProperty(ee.prototype,"a",{get:function(){return this._matrix[0]},set:function(p){this._matrix[0]=p}}),Object.defineProperty(ee.prototype,"b",{get:function(){return this._matrix[1]},set:function(p){this._matrix[1]=p}}),Object.defineProperty(ee.prototype,"c",{get:function(){return this._matrix[2]},set:function(p){this._matrix[2]=p}}),Object.defineProperty(ee.prototype,"d",{get:function(){return this._matrix[3]},set:function(p){this._matrix[3]=p}}),Object.defineProperty(ee.prototype,"e",{get:function(){return this._matrix[4]},set:function(p){this._matrix[4]=p}}),Object.defineProperty(ee.prototype,"f",{get:function(){return this._matrix[5]},set:function(p){this._matrix[5]=p}}),Object.defineProperty(ee.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(ee.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(ee.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(ee.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),ee.prototype.join=function(p){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(R).join(p)},ee.prototype.multiply=function(p){var Q=p.sx*this.sx+p.shy*this.shx,V=p.sx*this.shy+p.shy*this.sy,X=p.shx*this.sx+p.sy*this.shx,uA=p.shx*this.shy+p.sy*this.sy,BA=p.tx*this.sx+p.ty*this.shx+this.tx,xA=p.tx*this.shy+p.ty*this.sy+this.ty;return new ee(Q,V,X,uA,BA,xA)},ee.prototype.decompose=function(){var p=this.sx,Q=this.shy,V=this.shx,X=this.sy,uA=this.tx,BA=this.ty,xA=Math.sqrt(p*p+Q*Q),VA=(p/=xA)*V+(Q/=xA)*X;V-=p*VA,X-=Q*VA;var $A=Math.sqrt(V*V+X*X);return VA/=$A,p*(X/=$A)<Q*(V/=$A)&&(p=-p,Q=-Q,VA=-VA,xA=-xA),{scale:new ee(xA,0,0,$A,0,0),translate:new ee(1,0,0,1,uA,BA),rotate:new ee(p,Q,-Q,p,0,0),skew:new ee(1,0,VA,1,0,0)}},ee.prototype.toString=function(p){return this.join(" ")},ee.prototype.inversed=function(){var p=this.sx,Q=this.shy,V=this.shx,X=this.sy,uA=this.tx,BA=this.ty,xA=1/(p*X-Q*V),VA=X*xA,$A=-Q*xA,fe=-V*xA,ue=p*xA;return new ee(VA,$A,fe,ue,-VA*uA-fe*BA,-$A*uA-ue*BA)},ee.prototype.applyToPoint=function(p){var Q=p.x*this.sx+p.y*this.shx+this.tx,V=p.x*this.shy+p.y*this.sy+this.ty;return new Da(Q,V)},ee.prototype.applyToRectangle=function(p){var Q=this.applyToPoint(p),V=this.applyToPoint(new Da(p.x+p.w,p.y+p.h));return new to(Q.x,Q.y,V.x-Q.x,V.y-Q.y)},ee.prototype.clone=function(){var p=this.sx,Q=this.shy,V=this.shx,X=this.sy,uA=this.tx,BA=this.ty;return new ee(p,Q,V,X,uA,BA)},h.Matrix=ee;var gr=h.matrixMult=function(p,Q){return Q.multiply(p)},Hr=new ee(1,0,0,1,0,0);h.unitMatrix=h.identityMatrix=Hr;var qe=function(p,Q){if(!Ht[p]){var V=(Q instanceof Ni?"Sh":"P")+(Object.keys(Be).length+1).toString(10);Q.id=V,Ht[p]=V,Be[V]=Q,ie.publish("addPattern",Q)}};h.ShadingPattern=Ni,h.TilingPattern=ua,h.addShadingPattern=function(p,Q){return H("addShadingPattern()"),qe(p,Q),this},h.beginTilingPattern=function(p){H("beginTilingPattern()"),pl(p.boundingBox[0],p.boundingBox[1],p.boundingBox[2]-p.boundingBox[0],p.boundingBox[3]-p.boundingBox[1],p.matrix)},h.endTilingPattern=function(p,Q){H("endTilingPattern()"),Q.stream=CA[P].join(` `),qe(p,Q),ie.publish("endTilingPattern",Q),hr.pop().restore()};var ze=h.__private__.newObject=function(){var p=Xe();return Yt(p,!0),p},Xe=h.__private__.newObjectDeferred=function(){return $++,oA[$]=function(){return lA},$},Yt=function(p,Q){return Q=typeof Q=="boolean"&&Q,oA[p]=lA,Q&&G(p+" 0 obj"),p},Cn=h.__private__.newAdditionalObject=function(){var p={objId:Xe(),content:""};return EA.push(p),p},Rr=Xe(),lt=Xe(),dr=h.__private__.decodeColorString=function(p){var Q=p.split(" ");if(Q.length!==2||Q[1]!=="g"&&Q[1]!=="G")Q.length===5&&(Q[4]==="k"||Q[4]==="K")&&(Q=[(1-Q[0])*(1-Q[3]),(1-Q[1])*(1-Q[3]),(1-Q[2])*(1-Q[3]),"r"]);else{var V=parseFloat(Q[0]);Q=[V,V,V,"r"]}for(var X="#",uA=0;uA<3;uA++)X+=("0"+Math.floor(255*parseFloat(Q[uA])).toString(16)).slice(-2);return X},pr=h.__private__.encodeColorString=function(p){var Q;typeof p=="string"&&(p={ch1:p});var V=p.ch1,X=p.ch2,uA=p.ch3,BA=p.ch4,xA=p.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof V=="string"&&V.charAt(0)!=="#"){var VA=new kp(V);if(VA.ok)V=VA.toHex();else if(!/^\d*\.?\d*$/.test(V))throw new Error('Invalid color "'+V+'" passed to jsPDF.encodeColorString.')}if(typeof V=="string"&&/^#[0-9A-Fa-f]{3}$/.test(V)&&(V="#"+V[1]+V[1]+V[2]+V[2]+V[3]+V[3]),typeof V=="string"&&/^#[0-9A-Fa-f]{6}$/.test(V)){var $A=parseInt(V.substr(1),16);V=$A>>16&255,X=$A>>8&255,uA=255&$A}if(X===void 0||BA===void 0&&V===X&&X===uA)if(typeof V=="string")Q=V+" "+xA[0];else switch(p.precision){case 2:Q=J(V/255)+" "+xA[0];break;case 3:default:Q=E(V/255)+" "+xA[0]}else if(BA===void 0||be(BA)==="object"){if(BA&&!isNaN(BA.a)&&BA.a===0)return Q=["1.","1.","1.",xA[1]].join(" ");if(typeof V=="string")Q=[V,X,uA,xA[1]].join(" ");else switch(p.precision){case 2:Q=[J(V/255),J(X/255),J(uA/255),xA[1]].join(" ");break;default:case 3:Q=[E(V/255),E(X/255),E(uA/255),xA[1]].join(" ")}}else if(typeof V=="string")Q=[V,X,uA,BA,xA[2]].join(" ");else switch(p.precision){case 2:Q=[J(V),J(X),J(uA),J(BA),xA[2]].join(" ");break;case 3:default:Q=[E(V),E(X),E(uA),E(BA),xA[2]].join(" ")}return Q},Ur=h.__private__.getFilters=function(){return a},ir=h.__private__.putStream=function(p){var Q=(p=p||{}).data||"",V=p.filters||Ur(),X=p.alreadyAppliedFilters||[],uA=p.addLength1||!1,BA=Q.length,xA=p.objectId,VA=function(Zt){return Zt};if(c!==null&&xA===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");c!==null&&(VA=Jt.encryptor(xA,0));var $A={};V===!0&&(V=["FlateEncode"]);var fe=p.additionalKeyValues||[],ue=($A=re.API.processDataByFilters!==void 0?re.API.processDataByFilters(Q,V):{data:Q,reverseChain:[]}).reverseChain+(Array.isArray(X)?X.join(" "):X.toString());if($A.data.length!==0&&(fe.push({key:"Length",value:$A.data.length}),uA===!0&&fe.push({key:"Length1",value:BA})),ue.length!=0)if(ue.split("/").length-1==1)fe.push({key:"Filter",value:ue});else{fe.push({key:"Filter",value:"["+ue+"]"});for(var me=0;me<fe.length;me+=1)if(fe[me].key==="DecodeParms"){for(var Ye=[],At=0;At<$A.reverseChain.split("/").length-1;At+=1)Ye.push("null");Ye.push(fe[me].value),fe[me].value="["+Ye.join(" ")+"]"}}G("<<");for(var wt=0;wt<fe.length;wt++)G("/"+fe[wt].key+" "+fe[wt].value);G(">>"),$A.data.length!==0&&(G("stream"),G(VA($A.data)),G("endstream"))},Dr=h.__private__.putPage=function(p){var Q=p.number,V=p.data,X=p.objId,uA=p.contentsObjId;Yt(X,!0),G("<</Type /Page"),G("/Parent "+p.rootDictionaryObjId+" 0 R"),G("/Resources "+p.resourceDictionaryObjId+" 0 R"),G("/MediaBox ["+parseFloat(R(p.mediaBox.bottomLeftX))+" "+parseFloat(R(p.mediaBox.bottomLeftY))+" "+R(p.mediaBox.topRightX)+" "+R(p.mediaBox.topRightY)+"]"),p.cropBox!==null&&G("/CropBox ["+R(p.cropBox.bottomLeftX)+" "+R(p.cropBox.bottomLeftY)+" "+R(p.cropBox.topRightX)+" "+R(p.cropBox.topRightY)+"]"),p.bleedBox!==null&&G("/BleedBox ["+R(p.bleedBox.bottomLeftX)+" "+R(p.bleedBox.bottomLeftY)+" "+R(p.bleedBox.topRightX)+" "+R(p.bleedBox.topRightY)+"]"),p.trimBox!==null&&G("/TrimBox ["+R(p.trimBox.bottomLeftX)+" "+R(p