@mlightcad/cad-pdf-plugin 1.5.5 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +11 -4
- package/dist/cad-pdf-plugin-register.js +16 -0
- package/dist/cad-pdf-plugin-register.umd.cjs +1 -0
- package/dist/cad-pdf-plugin.js +42180 -0
- package/dist/cad-pdf-plugin.umd.cjs +312 -0
- package/lib/createPdfPlugin.d.ts +8 -0
- package/lib/createPdfPlugin.d.ts.map +1 -0
- package/lib/createPdfPlugin.js +50 -0
- package/lib/createPdfPlugin.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/{registerLazyPdfPlugin.d.ts → register.d.ts} +3 -8
- package/lib/register.d.ts.map +1 -0
- package/lib/{registerLazyPdfPlugin.js → register.js} +15 -21
- package/lib/register.js.map +1 -0
- package/package.json +24 -11
- package/dist/AcApPdfPlugin-CXWCd8bg.js +0 -34
- package/dist/html2canvas.esm-d2sM-0Wm.js +0 -4870
- package/dist/index-DNe5YnrC.js +0 -30983
- package/dist/index.es-DxTvd7sT.js +0 -5645
- package/dist/index.js +0 -11
- package/dist/index.umd.cjs +0 -312
- package/dist/purify.es-CxNDhYDZ.js +0 -663
- package/lib/registerLazyPdfPlugin.d.ts.map +0 -1
- package/lib/registerLazyPdfPlugin.js.map +0 -1
package/dist/index.umd.cjs
DELETED
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
(function(_e,Ye){typeof exports=="object"&&typeof module<"u"?Ye(exports,require("@mlightcad/cad-simple-viewer"),require("@mlightcad/cad-svg-plugin"),require("@mlightcad/data-model")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/cad-simple-viewer","@mlightcad/cad-svg-plugin","@mlightcad/data-model"],Ye):(_e=typeof globalThis<"u"?globalThis:_e||self,Ye(_e["cad-pdf-plugin"]={},_e.cadSimpleViewer,_e.cadSvgPlugin,_e.dataModel))})(this,function(_e,Ye,ci,Zs){"use strict";var Pat=Object.defineProperty;var lD=_e=>{throw TypeError(_e)};var Mat=(_e,Ye,ci)=>Ye in _e?Pat(_e,Ye,{enumerable:!0,configurable:!0,writable:!0,value:ci}):_e[Ye]=ci;var ct=(_e,Ye,ci)=>Mat(_e,typeof Ye!="symbol"?Ye+"":Ye,ci),F4=(_e,Ye,ci)=>Ye.has(_e)||lD("Cannot "+ci);var c=(_e,Ye,ci)=>(F4(_e,Ye,"read from private field"),ci?ci.call(_e):Ye.get(_e)),T=(_e,Ye,ci)=>Ye.has(_e)?lD("Cannot add the same private member more than once"):Ye instanceof WeakSet?Ye.add(_e):Ye.set(_e,ci),C=(_e,Ye,ci,Zs)=>(F4(_e,Ye,"write to private field"),Zs?Zs.call(_e,ci):Ye.set(_e,ci),ci),I=(_e,Ye,ci)=>(F4(_e,Ye,"access private method"),ci);var Yi=(_e,Ye,ci,Zs)=>({set _(P0){C(_e,Ye,P0,ci)},get _(){return c(_e,Ye,Zs)}});var yl,zB,T4,Yc,gv,Jc,Zc,zA,XA,pv,th,Pg,Mg,mv,Xb,cD,In,hD,uD,_0,bw,vv,Ru,Bl,Cl,fD,dD,_4,Hu,Ku,kg,Vu,qb,Og,wv,Zn,Dg,XB,Li,eh,yv,Ai,Yb,gD,Rg,lA,Hg,pi,ai,Kg,Vg,ys,Gg,qA,dn,rh,ih,nh,sh,wo,YA,Gu,bv,Bv,jg,Cv,yo,Ah,$g,ah,bo,Zb,xl,Wg,xv,oh,ju,zg,lh,Ev,$i,gr,El,ch,hh,Sv,Xg,Fv,uh,Bo,Sl,Tv,_v,JA,Dt,qB,I4,pD,mD,vD,Bw,wD,yD,bD,U4,BD,CD,xD,ED,Ps,Cc,SD,FD,L4,TD,Cw,Q4,gn,Co,Ia,Yg,xo,cA,Jg,Eo,Ks,Fl,$u,So,fh,Ua,xw,YB,Un,ZA,Wu,Dr,Iv,dh,ta,gh,ph,zu,Uv,N4,Zg,Xu,Lv,Qv,Nv,Pv,Mv,Tl,qu,_l,Yu,Il,mh,_D,ID,UD,Ju,La,ei,pr,Ul,tp,vh,kv,Ln,Zu,Ll,ea,wh,Ov,tf,hA,Dv,ef,Ql,Fo,ep,rp,ra,rf,Rv,tB,pe,P4,Hv,M4,JB,LD,QD,k4,ZB,O4,ND,PD,MD,D4,kD,R4,OD,DD,RD,H4,Ew,nf,sf,Nl,Qn,eB,HD,Kv,ip,yh,Pl,ur,$r,Af,af,of,ts,Vv,K4,Vs,Gs,lf,Qa,np,bh,Bh,xr,Er,mi,Na,sp,Ap,cf,hf,uf,ff,df,Gv,ap,Sr,$v,rB,op,lp,tC,gf,cp,To,pf,Sw,Pa,iB,Qi,mr,eo,eC,rC,Fw,V4,hp,Ml,nB,up,ia,KD,VD,GD,iC,sB,Wv,mf,fp,kl,Ol,rs,vf,wf,jt,fs,Tw,I0,nC,U0,jD,G4,L0,_w,Iw,j4,Uw,AB,Dl,yf,dp,aB,$D,Ma,$4,W4,z4,zv,Xv,lB,WD,qv,Yv,_o,gp,zD,XD,Jv,Io,qD,YD,JD,ZD,Zv,Rl,tR,eR,X4,t1,e1,pp,r1,i1,n1,s1,mp,Ch,Fr,vp,wp,A1,q4,Ni,ka,Nn,bf,Uo,is,Lw,Qw,sC,na,FO,xh,Bs,a1,o1,yp,Bf,Hl,l1,c1,Cf,h1,bp,Eh,Bp,u1,Cp,xf,f1,d1,xp,Ef,g1,Ep,Sp,Kl,rR,iR,Y4,uA,AC,J4,nR,sR,cB,Fp,Sf,Vl,Ff,Tf,Nw,Sh,Oa,Gl,_f,uB,If,Uf,Cs,aC,AR,aR,Pw,Tp,oC,fA,Lf,jl,Da,Qf,_p,$l,Ra,Mw,lC,Fh,Nf,dA,Mf,Ip,tn,p1,Up,Wl,m1,Th,Ha,v1,Tr,Z4,tT,eT,Td,oR,au,gA,Lp,kf,zl,w1,Df,Qp,sa,y1,rT,pA,_d,lR,cR,b1,iT,mA,_h,fB,dB,Np,Pp,wi,Lo,Ih,Rf,Mp,kp,Qo,vA,Xl,ql,yi,Yl,Uh,B1,Jl,Op,Hf,Lh,pn,Qh,De,cC,nT,sT,AT,hC,aT,hR,uR,fR,dR,uC,fC,oT,C1,x1,E1,S1,F1,Kf,T1,lT,_1,I1,cT,Vf,Gf,Dp,Nh,U1,jf,wA,L1,Zl,dC,hT,yA,Q1,$f,bA,Wi,gR,pR,mR,gC,tc,pC,mC,vR,uT,wR,BA,Ka,Rp,Hp,No,We,Wf,zf,N1,P1,Kp,Vp,Ph,M1,gB,pB,en,kw,yR,bR,BR,CR,xR,ER,Gp,Xf,rc,k1,CA,O1,Pi,mB,SR,D1,R1,H1,Mh,Va,xs,FR,vC,TR,_R,fT,K1,jp,$p,V1,ic,qf,G1,$s,j1,$1,Yf,xA,EA,Mn,Wp,zp,ns,Xp,Aa,W1,Re,dT,wC,IR,UR,LR,gT,Id,aa,Q0,QR,yC,bC,NR,PR,MR,kR,OR,Jf,Es,qp,mn,Zf,td,rr,pT,mT,vT,Ow,DR,BC,Dw,N0,Po,vn,wn,ed,Yp,Ss,kn,oa,rd,id,nd,Jp,CC,Fs,z1,X1,SA,Mo,ko,Zp,t0,sd,On,xc,RR,HR,KR,vB,VR,Ad,fr,wT,Ga,GR,jR,yT,xC,$R,WR,zR,bT,BT,XR,kh,Oo,Oh,ad,ri,yn,Dh,nc,Rh,r0,sc,od,Do,TA,i0,ir,Rw,Hw,EC,SC,FC,CT,TC,qR,ld,n0,Hh,Kh,Ac,Ws,Vh,s0,A0,ja,ac,bn,oc,Gh,a0,te,jh,Qr,xT,YR,qo,ET,ST,_C,Wa,Ts,cd,q1,wB,JR,Ro,FT,ZR,TT,o0,Y1,J1,l0,Ho,Ko,Z1,yB,t6;var P0=typeof document<"u"?document.currentScript:null;function Ar(n){"@babel/helpers - typeof";return Ar=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},Ar(n)}var da=Uint8Array,tA=Uint16Array,IC=Int32Array,UC=new da([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]),LC=new da([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]),_T=new da([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),IT=function(n,t){for(var e=new tA(31),r=0;r<31;++r)e[r]=t+=1<<n[r-1];for(var i=new IC(e[30]),r=1;r<30;++r)for(var s=e[r];s<e[r+1];++s)i[s]=s-e[r]<<5|r;return{b:e,r:i}},UT=IT(UC,2),e6=UT.b,QC=UT.r;e6[28]=258,QC[258]=28;for(var r6=IT(LC,0),LT=r6.r,NC=new tA(32768),Vr=0;Vr<32768;++Vr){var Ec=(Vr&43690)>>1|(Vr&21845)<<1;Ec=(Ec&52428)>>2|(Ec&13107)<<2,Ec=(Ec&61680)>>4|(Ec&3855)<<4,NC[Vr]=((Ec&65280)>>8|(Ec&255)<<8)>>1}for(var M0=function(n,t,e){for(var r=n.length,i=0,s=new tA(t);i<r;++i)n[i]&&++s[n[i]-1];var A=new tA(t);for(i=1;i<t;++i)A[i]=A[i-1]+s[i-1]<<1;var a;if(e){a=new tA(1<<t);var o=15-t;for(i=0;i<r;++i)if(n[i])for(var l=i<<4|n[i],h=t-n[i],u=A[n[i]-1]++<<h,d=u|(1<<h)-1;u<=d;++u)a[NC[u]>>o]=l}else for(a=new tA(r),i=0;i<r;++i)n[i]&&(a[i]=NC[A[n[i]-1]++]>>15-n[i]);return a},ou=new da(288),Vr=0;Vr<144;++Vr)ou[Vr]=8;for(var Vr=144;Vr<256;++Vr)ou[Vr]=9;for(var Vr=256;Vr<280;++Vr)ou[Vr]=7;for(var Vr=280;Vr<288;++Vr)ou[Vr]=8;for(var Kw=new da(32),Vr=0;Vr<32;++Vr)Kw[Vr]=5;var i6=M0(ou,9,0),n6=M0(Kw,5,0),QT=function(n){return(n+7)/8|0},s6=function(n,t,e){return(e==null||e>n.length)&&(e=n.length),new da(n.subarray(t,e))},Yo=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8},k0=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8,n[r+2]|=e>>16},PC=function(n,t){for(var e=[],r=0;r<n.length;++r)n[r]&&e.push({s:r,f:n[r]});var i=e.length,s=e.slice();if(!i)return{t:kT,l:0};if(i==1){var A=new da(e[0].s+1);return A[e[0].s]=1,{t:A,l:1}}e.sort(function(_,L){return _.f-L.f}),e.push({s:-1,f:25001});var a=e[0],o=e[1],l=0,h=1,u=2;for(e[0]={s:-1,f:a.f+o.f,l:a,r:o};h!=i-1;)a=e[e[l].f<e[u].f?l++:u++],o=e[l!=h&&e[l].f<e[u].f?l++:u++],e[h++]={s:-1,f:a.f+o.f,l:a,r:o};for(var d=s[0].s,r=1;r<i;++r)s[r].s>d&&(d=s[r].s);var f=new tA(d+1),p=MC(e[h-1],f,0);if(p>t){var r=0,m=0,y=p-t,w=1<<y;for(s.sort(function(L,k){return f[k.s]-f[L.s]||L.f-k.f});r<i;++r){var B=s[r].s;if(f[B]>t)m+=w-(1<<p-f[B]),f[B]=t;else break}for(m>>=y;m>0;){var E=s[r].s;f[E]<t?m-=1<<t-f[E]++-1:++r}for(;r>=0&&m;--r){var S=s[r].s;f[S]==t&&(--f[S],++m)}p=t}return{t:new da(f),l:p}},MC=function(n,t,e){return n.s==-1?Math.max(MC(n.l,t,e+1),MC(n.r,t,e+1)):t[n.s]=e},NT=function(n){for(var t=n.length;t&&!n[--t];);for(var e=new tA(++t),r=0,i=n[0],s=1,A=function(o){e[r++]=o},a=1;a<=t;++a)if(n[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)A(32754);s>2&&(A(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(A(i),--s;s>6;s-=6)A(8304);s>2&&(A(s-3<<5|8208),s=0)}for(;s--;)A(i);s=1,i=n[a]}return{c:e.subarray(0,r),n:t}},O0=function(n,t){for(var e=0,r=0;r<t.length;++r)e+=n[r]*t[r];return e},PT=function(n,t,e){var r=e.length,i=QT(t+2);n[i]=r&255,n[i+1]=r>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var s=0;s<r;++s)n[i+s+4]=e[s];return(i+4+r)*8},MT=function(n,t,e,r,i,s,A,a,o,l,h){Yo(t,h++,e),++i[256];for(var u=PC(i,15),d=u.t,f=u.l,p=PC(s,15),m=p.t,y=p.l,w=NT(d),B=w.c,E=w.n,S=NT(m),_=S.c,L=S.n,k=new tA(19),H=0;H<B.length;++H)++k[B[H]&31];for(var H=0;H<_.length;++H)++k[_[H]&31];for(var Q=PC(k,7),W=Q.t,U=Q.l,D=19;D>4&&!W[_T[D-1]];--D);var j=l+5<<3,V=O0(i,ou)+O0(s,Kw)+A,st=O0(i,d)+O0(s,m)+A+14+3*D+O0(k,W)+2*k[16]+3*k[17]+7*k[18];if(o>=0&&j<=V&&j<=st)return PT(t,h,n.subarray(o,o+l));var rt,it,At,ut;if(Yo(t,h,1+(st<V)),h+=2,st<V){rt=M0(d,f,0),it=d,At=M0(m,y,0),ut=m;var vt=M0(W,U,0);Yo(t,h,E-257),Yo(t,h+5,L-1),Yo(t,h+10,D-4),h+=14;for(var H=0;H<D;++H)Yo(t,h+3*H,W[_T[H]]);h+=3*D;for(var mt=[B,_],M=0;M<2;++M)for(var $=mt[M],H=0;H<$.length;++H){var q=$[H]&31;Yo(t,h,vt[q]),h+=W[q],q>15&&(Yo(t,h,$[H]>>5&127),h+=$[H]>>12)}}else rt=i6,it=ou,At=n6,ut=Kw;for(var H=0;H<a;++H){var tt=r[H];if(tt>255){var q=tt>>18&31;k0(t,h,rt[q+257]),h+=it[q+257],q>7&&(Yo(t,h,tt>>23&31),h+=UC[q]);var et=tt&31;k0(t,h,At[et]),h+=ut[et],et>3&&(k0(t,h,tt>>5&8191),h+=LC[et])}else k0(t,h,rt[tt]),h+=it[tt]}return k0(t,h,rt[256]),h+it[256]},A6=new IC([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),kT=new da(0),a6=function(n,t,e,r,i,s){var A=s.z||n.length,a=new da(r+A+5*(1+Math.ceil(A/7e3))+i),o=a.subarray(r,a.length-i),l=s.l,h=(s.r||0)&7;if(t){h&&(o[0]=s.r>>3);for(var u=A6[t-1],d=u>>13,f=u&8191,p=(1<<e)-1,m=s.p||new tA(32768),y=s.h||new tA(p+1),w=Math.ceil(e/3),B=2*w,E=function($t){return(n[$t]^n[$t+1]<<w^n[$t+2]<<B)&p},S=new IC(25e3),_=new tA(288),L=new tA(32),k=0,H=0,Q=s.i||0,W=0,U=s.w||0,D=0;Q+2<A;++Q){var j=E(Q),V=Q&32767,st=y[j];if(m[V]=st,y[j]=V,U<=Q){var rt=A-Q;if((k>7e3||W>24576)&&(rt>423||!l)){h=MT(n,o,0,S,_,L,H,W,D,Q-D,h),W=k=H=0,D=Q;for(var it=0;it<286;++it)_[it]=0;for(var it=0;it<30;++it)L[it]=0}var At=2,ut=0,vt=f,mt=V-st&32767;if(rt>2&&j==E(Q-mt))for(var M=Math.min(d,rt)-1,$=Math.min(32767,Q),q=Math.min(258,rt);mt<=$&&--vt&&V!=st;){if(n[Q+At]==n[Q+At-mt]){for(var tt=0;tt<q&&n[Q+tt]==n[Q+tt-mt];++tt);if(tt>At){if(At=tt,ut=mt,tt>M)break;for(var et=Math.min(mt,tt-2),ot=0,it=0;it<et;++it){var dt=Q-mt+it&32767,wt=m[dt],yt=dt-wt&32767;yt>ot&&(ot=yt,st=dt)}}}V=st,st=m[V],mt+=V-st&32767}if(ut){S[W++]=268435456|QC[At]<<18|LT[ut];var St=QC[At]&31,Mt=LT[ut]&31;H+=UC[St]+LC[Mt],++_[257+St],++L[Mt],U=Q+At,++k}else S[W++]=n[Q],++_[n[Q]]}}for(Q=Math.max(Q,U);Q<A;++Q)S[W++]=n[Q],++_[n[Q]];h=MT(n,o,l,S,_,L,H,W,D,Q-D,h),l||(s.r=h&7|o[h/8|0]<<3,h-=7,s.h=y,s.p=m,s.i=Q,s.w=U)}else{for(var Q=s.w||0;Q<A+l;Q+=65535){var Pt=Q+65535;Pt>=A&&(o[h/8|0]=l,Pt=A),h=PT(o,h+1,n.subarray(Q,Pt))}s.i=A}return s6(a,0,r+QT(h)+i)},OT=function(){var n=1,t=0;return{p:function(e){for(var r=n,i=t,s=e.length|0,A=0;A!=s;){for(var a=Math.min(A+2655,s);A<a;++A)i+=r+=e[A];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}n=r,t=i},d:function(){return n%=65521,t%=65521,(n&255)<<24|(n&65280)<<8|(t&255)<<8|t>>8}}},o6=function(n,t,e,r,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),A=new da(s.length+n.length);A.set(s),A.set(n,s.length),n=A,i.w=s.length}return a6(n,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+t.mem,e,r,i)},DT=function(n,t,e){for(;e;++t)n[t]=e,e>>>=8},l6=function(n,t){var e=t.level,r=e==0?0:e<6?1:e==9?3:2;if(n[0]=120,n[1]=r<<6|(t.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,t.dictionary){var i=OT();i.p(t.dictionary),DT(n,2,i.d())}};function kC(n,t){t||(t={});var e=OT();e.p(n);var r=o6(n,t,t.dictionary?6:2,4);return l6(r,t),DT(r,r.length-4,e.d()),r}var c6=typeof TextDecoder<"u"&&new TextDecoder,h6=0;try{c6.decode(kT,{stream:!0}),h6=1}catch{}function u6(n){if(Array.isArray(n))return n}function f6(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,i,s,A,a=[],o=!0,l=!1;try{if(s=(e=e.call(n)).next,t!==0)for(;!(o=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(h){l=!0,i=h}finally{try{if(!o&&e.return!=null&&(A=e.return(),Object(A)!==A))return}finally{if(l)throw i}}return a}}function RT(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function d6(n,t){if(n){if(typeof n=="string")return RT(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?RT(n,t):void 0}}function g6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HT(n,t){return u6(n)||f6(n,t)||d6(n,t)||g6()}function KT(n,t="utf8"){return new TextDecoder(t).decode(n)}const p6=new TextEncoder;function m6(n){return p6.encode(n)}const v6=1024*8,w6=(()=>{const n=new Uint8Array(4),t=new Uint32Array(n.buffer);return!((t[0]=1)&n[0])})(),OC={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 DC{constructor(t=v6,e={}){ct(this,"buffer");ct(this,"byteLength");ct(this,"byteOffset");ct(this,"length");ct(this,"offset");ct(this,"lastWrittenByte");ct(this,"littleEndian");ct(this,"_data");ct(this,"_mark");ct(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const i=e.offset?e.offset>>>0:0,s=t.byteLength-i;let A=i;(ArrayBuffer.isView(t)||t instanceof DC)&&(t.byteLength!==t.buffer.byteLength&&(A=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=A,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,A,s),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 r=(this.offset+t)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,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,e){const r=OC[e].BYTES_PER_ELEMENT*t,i=this.byteOffset+this.offset,s=this.buffer.slice(i,i+r);if(this.littleEndian===w6&&e!=="uint8"&&e!=="int8"){const a=new Uint8Array(this.buffer.slice(i,i+r));a.reverse();const o=new OC[e](a.buffer);return this.offset+=r,o.reverse(),o}const A=new OC[e](s);return this.offset+=r,A}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 e="";for(let r=0;r<t;r++)e+=this.readChar();return e}readUtf8(t=1){return KT(this.readBytes(t))}decodeText(t=1,e="utf8"){return KT(this.readBytes(t),e)}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 e=0;e<t.length;e++)this._data.setUint8(this.offset++,t[e]);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 e=0;e<t.length;e++)this.writeUint8(t.charCodeAt(e));return this}writeUtf8(t){return this.writeBytes(m6(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)}}function Ud(n){let t=n.length;for(;--t>=0;)n[t]=0}const y6=3,b6=258,VT=29,B6=256+1+VT,GT=30,C6=512,x6=new Array((B6+2)*2);Ud(x6);const E6=new Array(GT*2);Ud(E6);const S6=new Array(C6);Ud(S6);const F6=new Array(b6-y6+1);Ud(F6);const T6=new Array(VT);Ud(T6);const _6=new Array(GT);Ud(_6);var RC=(n,t,e,r)=>{let i=n&65535|0,s=n>>>16&65535|0,A=0;for(;e!==0;){A=e>2e3?2e3:e,e-=A;do i=i+t[r++]|0,s=s+i|0;while(--A);i%=65521,s%=65521}return i|s<<16|0};const I6=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},U6=new Uint32Array(I6());var ro=(n,t,e,r)=>{const i=U6,s=r+e;n^=-1;for(let A=r;A<s;A++)n=n>>>8^i[(n^t[A])&255];return n^-1},HC={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},jT={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const L6=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var Q6=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)L6(e,r)&&(n[r]=e[r])}}return n},N6=n=>{let t=0;for(let r=0,i=n.length;r<i;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,i=0,s=n.length;r<s;r++){let A=n[r];e.set(A,i),i+=A.length}return e},$T={assign:Q6,flattenChunks:N6};let WT=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{WT=!1}const D0=new Uint8Array(256);for(let n=0;n<256;n++)D0[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;D0[254]=D0[254]=1;var P6=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,i,s,A=n.length,a=0;for(i=0;i<A;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<A&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),a+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(a),s=0,i=0;s<a;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<A&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const M6=(n,t)=>{if(t<65534&&n.subarray&&WT)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var k6=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,i;const s=new Array(e*2);for(i=0,r=0;r<e;){let A=n[r++];if(A<128){s[i++]=A;continue}let a=D0[A];if(a>4){s[i++]=65533,r+=a-1;continue}for(A&=a===2?31:a===3?15:7;a>1&&r<e;)A=A<<6|n[r++]&63,a--;if(a>1){s[i++]=65533;continue}A<65536?s[i++]=A:(A-=65536,s[i++]=55296|A>>10&1023,s[i++]=56320|A&1023)}return M6(s,i)},O6=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+D0[n[e]]>t?e:t},KC={string2buf:P6,buf2string:k6,utf8border:O6};function D6(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var R6=D6;const Vw=16209,H6=16191;var K6=function(t,e){let r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,_,L,k,H,Q,W;const U=t.state;r=t.next_in,Q=t.input,i=r+(t.avail_in-5),s=t.next_out,W=t.output,A=s-(e-t.avail_out),a=s+(t.avail_out-257),o=U.dmax,l=U.wsize,h=U.whave,u=U.wnext,d=U.window,f=U.hold,p=U.bits,m=U.lencode,y=U.distcode,w=(1<<U.lenbits)-1,B=(1<<U.distbits)-1;t:do{p<15&&(f+=Q[r++]<<p,p+=8,f+=Q[r++]<<p,p+=8),E=m[f&w];e:for(;;){if(S=E>>>24,f>>>=S,p-=S,S=E>>>16&255,S===0)W[s++]=E&65535;else if(S&16){_=E&65535,S&=15,S&&(p<S&&(f+=Q[r++]<<p,p+=8),_+=f&(1<<S)-1,f>>>=S,p-=S),p<15&&(f+=Q[r++]<<p,p+=8,f+=Q[r++]<<p,p+=8),E=y[f&B];r:for(;;){if(S=E>>>24,f>>>=S,p-=S,S=E>>>16&255,S&16){if(L=E&65535,S&=15,p<S&&(f+=Q[r++]<<p,p+=8,p<S&&(f+=Q[r++]<<p,p+=8)),L+=f&(1<<S)-1,L>o){t.msg="invalid distance too far back",U.mode=Vw;break t}if(f>>>=S,p-=S,S=s-A,L>S){if(S=L-S,S>h&&U.sane){t.msg="invalid distance too far back",U.mode=Vw;break t}if(k=0,H=d,u===0){if(k+=l-S,S<_){_-=S;do W[s++]=d[k++];while(--S);k=s-L,H=W}}else if(u<S){if(k+=l+u-S,S-=u,S<_){_-=S;do W[s++]=d[k++];while(--S);if(k=0,u<_){S=u,_-=S;do W[s++]=d[k++];while(--S);k=s-L,H=W}}}else if(k+=u-S,S<_){_-=S;do W[s++]=d[k++];while(--S);k=s-L,H=W}for(;_>2;)W[s++]=H[k++],W[s++]=H[k++],W[s++]=H[k++],_-=3;_&&(W[s++]=H[k++],_>1&&(W[s++]=H[k++]))}else{k=s-L;do W[s++]=W[k++],W[s++]=W[k++],W[s++]=W[k++],_-=3;while(_>2);_&&(W[s++]=W[k++],_>1&&(W[s++]=W[k++]))}}else if(S&64){t.msg="invalid distance code",U.mode=Vw;break t}else{E=y[(E&65535)+(f&(1<<S)-1)];continue r}break}}else if(S&64)if(S&32){U.mode=H6;break t}else{t.msg="invalid literal/length code",U.mode=Vw;break t}else{E=m[(E&65535)+(f&(1<<S)-1)];continue e}break}}while(r<i&&s<a);_=p>>3,r-=_,p-=_<<3,f&=(1<<p)-1,t.next_in=r,t.next_out=s,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=s<a?257+(a-s):257-(s-a),U.hold=f,U.bits=p};const Ld=15,zT=852,XT=592,qT=0,VC=1,YT=2,V6=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),G6=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),j6=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),$6=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var R0=(n,t,e,r,i,s,A,a)=>{const o=a.bits;let l=0,h=0,u=0,d=0,f=0,p=0,m=0,y=0,w=0,B=0,E,S,_,L,k,H=null,Q;const W=new Uint16Array(Ld+1),U=new Uint16Array(Ld+1);let D=null,j,V,st;for(l=0;l<=Ld;l++)W[l]=0;for(h=0;h<r;h++)W[t[e+h]]++;for(f=o,d=Ld;d>=1&&W[d]===0;d--);if(f>d&&(f=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,a.bits=1,0;for(u=1;u<d&&W[u]===0;u++);for(f<u&&(f=u),y=1,l=1;l<=Ld;l++)if(y<<=1,y-=W[l],y<0)return-1;if(y>0&&(n===qT||d!==1))return-1;for(U[1]=0,l=1;l<Ld;l++)U[l+1]=U[l]+W[l];for(h=0;h<r;h++)t[e+h]!==0&&(A[U[t[e+h]]++]=h);if(n===qT?(H=D=A,Q=20):n===VC?(H=V6,D=G6,Q=257):(H=j6,D=$6,Q=0),B=0,h=0,l=u,k=s,p=f,m=0,_=-1,w=1<<f,L=w-1,n===VC&&w>zT||n===YT&&w>XT)return 1;for(;;){j=l-m,A[h]+1<Q?(V=0,st=A[h]):A[h]>=Q?(V=D[A[h]-Q],st=H[A[h]-Q]):(V=96,st=0),E=1<<l-m,S=1<<p,u=S;do S-=E,i[k+(B>>m)+S]=j<<24|V<<16|st|0;while(S!==0);for(E=1<<l-1;B&E;)E>>=1;if(E!==0?(B&=E-1,B+=E):B=0,h++,--W[l]===0){if(l===d)break;l=t[e+A[h]]}if(l>f&&(B&L)!==_){for(m===0&&(m=f),k+=u,p=l-m,y=1<<p;p+m<d&&(y-=W[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,n===VC&&w>zT||n===YT&&w>XT)return 1;_=B&L,i[_]=f<<24|p<<16|k-s|0}}return B!==0&&(i[k+B]=l-m<<24|64<<16|0),a.bits=f,0};const W6=0,JT=1,ZT=2,{Z_FINISH:t_,Z_BLOCK:z6,Z_TREES:Gw,Z_OK:lu,Z_STREAM_END:X6,Z_NEED_DICT:q6,Z_STREAM_ERROR:OA,Z_DATA_ERROR:e_,Z_MEM_ERROR:r_,Z_BUF_ERROR:Y6,Z_DEFLATED:i_}=jT,jw=16180,n_=16181,s_=16182,A_=16183,a_=16184,o_=16185,l_=16186,c_=16187,h_=16188,u_=16189,$w=16190,Jo=16191,GC=16192,f_=16193,jC=16194,d_=16195,g_=16196,p_=16197,m_=16198,Ww=16199,zw=16200,v_=16201,w_=16202,y_=16203,b_=16204,B_=16205,$C=16206,C_=16207,x_=16208,Yr=16209,E_=16210,S_=16211,J6=852,Z6=592,tH=15,F_=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function eH(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const cu=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<jw||t.mode>S_?1:0},T_=n=>{if(cu(n))return OA;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=jw,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(J6),t.distcode=t.distdyn=new Int32Array(Z6),t.sane=1,t.back=-1,lu},__=n=>{if(cu(n))return OA;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,T_(n)},I_=(n,t)=>{let e;if(cu(n))return OA;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?OA:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,__(n))},U_=(n,t)=>{if(!n)return OA;const e=new eH;n.state=e,e.strm=n,e.window=null,e.mode=jw;const r=I_(n,t);return r!==lu&&(n.state=null),r},rH=n=>U_(n,tH);let L_=!0,WC,zC;const iH=n=>{if(L_){WC=new Int32Array(512),zC=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(R0(JT,n.lens,0,288,WC,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;R0(ZT,n.lens,0,32,zC,0,n.work,{bits:5}),L_=!1}n.lencode=WC,n.lenbits=9,n.distcode=zC,n.distbits=5},Q_=(n,t,e,r)=>{let i;const s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(e-r,e-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(e-r,e),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},nH=(n,t)=>{let e,r,i,s,A,a,o,l,h,u,d,f,p,m,y=0,w,B,E,S,_,L,k,H;const Q=new Uint8Array(4);let W,U;const D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(cu(n)||!n.output||!n.input&&n.avail_in!==0)return OA;e=n.state,e.mode===Jo&&(e.mode=GC),A=n.next_out,i=n.output,o=n.avail_out,s=n.next_in,r=n.input,a=n.avail_in,l=e.hold,h=e.bits,u=a,d=o,H=lu;t:for(;;)switch(e.mode){case jw:if(e.wrap===0){e.mode=GC;break}for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&2&&l===35615){e.wbits===0&&(e.wbits=15),e.check=0,Q[0]=l&255,Q[1]=l>>>8&255,e.check=ro(e.check,Q,2,0),l=0,h=0,e.mode=n_;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((l&255)<<8)+(l>>8))%31){n.msg="incorrect header check",e.mode=Yr;break}if((l&15)!==i_){n.msg="unknown compression method",e.mode=Yr;break}if(l>>>=4,h-=4,k=(l&15)+8,e.wbits===0&&(e.wbits=k),k>15||k>e.wbits){n.msg="invalid window size",e.mode=Yr;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=l&512?u_:Jo,l=0,h=0;break;case n_:for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.flags=l,(e.flags&255)!==i_){n.msg="unknown compression method",e.mode=Yr;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Yr;break}e.head&&(e.head.text=l>>8&1),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=ro(e.check,Q,2,0)),l=0,h=0,e.mode=s_;case s_:for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.head&&(e.head.time=l),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,Q[2]=l>>>16&255,Q[3]=l>>>24&255,e.check=ro(e.check,Q,4,0)),l=0,h=0,e.mode=A_;case A_:for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.head&&(e.head.xflags=l&255,e.head.os=l>>8),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=ro(e.check,Q,2,0)),l=0,h=0,e.mode=a_;case a_:if(e.flags&1024){for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.length=l,e.head&&(e.head.extra_len=l),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=ro(e.check,Q,2,0)),l=0,h=0}else e.head&&(e.head.extra=null);e.mode=o_;case o_:if(e.flags&1024&&(f=e.length,f>a&&(f=a),f&&(e.head&&(k=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(s,s+f),k)),e.flags&512&&e.wrap&4&&(e.check=ro(e.check,r,f,s)),a-=f,s+=f,e.length-=f),e.length))break t;e.length=0,e.mode=l_;case l_:if(e.flags&2048){if(a===0)break t;f=0;do k=r[s+f++],e.head&&k&&e.length<65536&&(e.head.name+=String.fromCharCode(k));while(k&&f<a);if(e.flags&512&&e.wrap&4&&(e.check=ro(e.check,r,f,s)),a-=f,s+=f,k)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=c_;case c_:if(e.flags&4096){if(a===0)break t;f=0;do k=r[s+f++],e.head&&k&&e.length<65536&&(e.head.comment+=String.fromCharCode(k));while(k&&f<a);if(e.flags&512&&e.wrap&4&&(e.check=ro(e.check,r,f,s)),a-=f,s+=f,k)break t}else e.head&&(e.head.comment=null);e.mode=h_;case h_:if(e.flags&512){for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&4&&l!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Yr;break}l=0,h=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=Jo;break;case u_:for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}n.adler=e.check=F_(l),l=0,h=0,e.mode=$w;case $w:if(e.havedict===0)return n.next_out=A,n.avail_out=o,n.next_in=s,n.avail_in=a,e.hold=l,e.bits=h,q6;n.adler=e.check=1,e.mode=Jo;case Jo:if(t===z6||t===Gw)break t;case GC:if(e.last){l>>>=h&7,h-=h&7,e.mode=$C;break}for(;h<3;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}switch(e.last=l&1,l>>>=1,h-=1,l&3){case 0:e.mode=f_;break;case 1:if(iH(e),e.mode=Ww,t===Gw){l>>>=2,h-=2;break t}break;case 2:e.mode=g_;break;case 3:n.msg="invalid block type",e.mode=Yr}l>>>=2,h-=2;break;case f_:for(l>>>=h&7,h-=h&7;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if((l&65535)!==(l>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Yr;break}if(e.length=l&65535,l=0,h=0,e.mode=jC,t===Gw)break t;case jC:e.mode=d_;case d_:if(f=e.length,f){if(f>a&&(f=a),f>o&&(f=o),f===0)break t;i.set(r.subarray(s,s+f),A),a-=f,s+=f,o-=f,A+=f,e.length-=f;break}e.mode=Jo;break;case g_:for(;h<14;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.nlen=(l&31)+257,l>>>=5,h-=5,e.ndist=(l&31)+1,l>>>=5,h-=5,e.ncode=(l&15)+4,l>>>=4,h-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Yr;break}e.have=0,e.mode=p_;case p_:for(;e.have<e.ncode;){for(;h<3;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.lens[D[e.have++]]=l&7,l>>>=3,h-=3}for(;e.have<19;)e.lens[D[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,W={bits:e.lenbits},H=R0(W6,e.lens,0,19,e.lencode,0,e.work,W),e.lenbits=W.bits,H){n.msg="invalid code lengths set",e.mode=Yr;break}e.have=0,e.mode=m_;case m_:for(;e.have<e.nlen+e.ndist;){for(;y=e.lencode[l&(1<<e.lenbits)-1],w=y>>>24,B=y>>>16&255,E=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(E<16)l>>>=w,h-=w,e.lens[e.have++]=E;else{if(E===16){for(U=w+2;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(l>>>=w,h-=w,e.have===0){n.msg="invalid bit length repeat",e.mode=Yr;break}k=e.lens[e.have-1],f=3+(l&3),l>>>=2,h-=2}else if(E===17){for(U=w+3;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=w,h-=w,k=0,f=3+(l&7),l>>>=3,h-=3}else{for(U=w+7;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=w,h-=w,k=0,f=11+(l&127),l>>>=7,h-=7}if(e.have+f>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Yr;break}for(;f--;)e.lens[e.have++]=k}}if(e.mode===Yr)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Yr;break}if(e.lenbits=9,W={bits:e.lenbits},H=R0(JT,e.lens,0,e.nlen,e.lencode,0,e.work,W),e.lenbits=W.bits,H){n.msg="invalid literal/lengths set",e.mode=Yr;break}if(e.distbits=6,e.distcode=e.distdyn,W={bits:e.distbits},H=R0(ZT,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,W),e.distbits=W.bits,H){n.msg="invalid distances set",e.mode=Yr;break}if(e.mode=Ww,t===Gw)break t;case Ww:e.mode=zw;case zw:if(a>=6&&o>=258){n.next_out=A,n.avail_out=o,n.next_in=s,n.avail_in=a,e.hold=l,e.bits=h,K6(n,d),A=n.next_out,i=n.output,o=n.avail_out,s=n.next_in,r=n.input,a=n.avail_in,l=e.hold,h=e.bits,e.mode===Jo&&(e.back=-1);break}for(e.back=0;y=e.lencode[l&(1<<e.lenbits)-1],w=y>>>24,B=y>>>16&255,E=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(B&&!(B&240)){for(S=w,_=B,L=E;y=e.lencode[L+((l&(1<<S+_)-1)>>S)],w=y>>>24,B=y>>>16&255,E=y&65535,!(S+w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=S,h-=S,e.back+=S}if(l>>>=w,h-=w,e.back+=w,e.length=E,B===0){e.mode=B_;break}if(B&32){e.back=-1,e.mode=Jo;break}if(B&64){n.msg="invalid literal/length code",e.mode=Yr;break}e.extra=B&15,e.mode=v_;case v_:if(e.extra){for(U=e.extra;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.length+=l&(1<<e.extra)-1,l>>>=e.extra,h-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=w_;case w_:for(;y=e.distcode[l&(1<<e.distbits)-1],w=y>>>24,B=y>>>16&255,E=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(!(B&240)){for(S=w,_=B,L=E;y=e.distcode[L+((l&(1<<S+_)-1)>>S)],w=y>>>24,B=y>>>16&255,E=y&65535,!(S+w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=S,h-=S,e.back+=S}if(l>>>=w,h-=w,e.back+=w,B&64){n.msg="invalid distance code",e.mode=Yr;break}e.offset=E,e.extra=B&15,e.mode=y_;case y_:if(e.extra){for(U=e.extra;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.offset+=l&(1<<e.extra)-1,l>>>=e.extra,h-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Yr;break}e.mode=b_;case b_:if(o===0)break t;if(f=d-o,e.offset>f){if(f=e.offset-f,f>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Yr;break}f>e.wnext?(f-=e.wnext,p=e.wsize-f):p=e.wnext-f,f>e.length&&(f=e.length),m=e.window}else m=i,p=A-e.offset,f=e.length;f>o&&(f=o),o-=f,e.length-=f;do i[A++]=m[p++];while(--f);e.length===0&&(e.mode=zw);break;case B_:if(o===0)break t;i[A++]=e.length,o--,e.mode=zw;break;case $C:if(e.wrap){for(;h<32;){if(a===0)break t;a--,l|=r[s++]<<h,h+=8}if(d-=o,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?ro(e.check,i,d,A-d):RC(e.check,i,d,A-d)),d=o,e.wrap&4&&(e.flags?l:F_(l))!==e.check){n.msg="incorrect data check",e.mode=Yr;break}l=0,h=0}e.mode=C_;case C_:if(e.wrap&&e.flags){for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&4&&l!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Yr;break}l=0,h=0}e.mode=x_;case x_:H=X6;break t;case Yr:H=e_;break t;case E_:return r_;case S_:default:return OA}return n.next_out=A,n.avail_out=o,n.next_in=s,n.avail_in=a,e.hold=l,e.bits=h,(e.wsize||d!==n.avail_out&&e.mode<Yr&&(e.mode<$C||t!==t_))&&Q_(n,n.output,n.next_out,d-n.avail_out),u-=n.avail_in,d-=n.avail_out,n.total_in+=u,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?ro(e.check,i,d,n.next_out-d):RC(e.check,i,d,n.next_out-d)),n.data_type=e.bits+(e.last?64:0)+(e.mode===Jo?128:0)+(e.mode===Ww||e.mode===jC?256:0),(u===0&&d===0||t===t_)&&H===lu&&(H=Y6),H},sH=n=>{if(cu(n))return OA;let t=n.state;return t.window&&(t.window=null),n.state=null,lu},AH=(n,t)=>{if(cu(n))return OA;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,lu):OA},aH=(n,t)=>{const e=t.length;let r,i,s;return cu(n)||(r=n.state,r.wrap!==0&&r.mode!==$w)?OA:r.mode===$w&&(i=1,i=RC(i,t,e,0),i!==r.check)?e_:(s=Q_(n,t,e,e),s?(r.mode=E_,r_):(r.havedict=1,lu))};var oH=__,lH=I_,cH=T_,hH=rH,uH=U_,fH=nH,dH=sH,gH=AH,pH=aH,mH="pako inflate (from Nodeca project)",Zo={inflateReset:oH,inflateReset2:lH,inflateResetKeep:cH,inflateInit:hH,inflateInit2:uH,inflate:fH,inflateEnd:dH,inflateGetHeader:gH,inflateSetDictionary:pH,inflateInfo:mH};function vH(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var wH=vH;const N_=Object.prototype.toString,{Z_NO_FLUSH:yH,Z_FINISH:bH,Z_OK:H0,Z_STREAM_END:XC,Z_NEED_DICT:qC,Z_STREAM_ERROR:BH,Z_DATA_ERROR:P_,Z_MEM_ERROR:CH}=jT;function K0(n){this.options=$T.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new R6,this.strm.avail_out=0;let e=Zo.inflateInit2(this.strm,t.windowBits);if(e!==H0)throw new Error(HC[e]);if(this.header=new wH,Zo.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=KC.string2buf(t.dictionary):N_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=Zo.inflateSetDictionary(this.strm,t.dictionary),e!==H0)))throw new Error(HC[e])}K0.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,A,a;if(this.ended)return!1;for(t===~~t?A=t:A=t===!0?bH:yH,N_.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),s=Zo.inflate(e,A),s===qC&&i&&(s=Zo.inflateSetDictionary(e,i),s===H0?s=Zo.inflate(e,A):s===P_&&(s=qC));e.avail_in>0&&s===XC&&e.state.wrap>0&&n[e.next_in]!==0;)Zo.inflateReset(e),s=Zo.inflate(e,A);switch(s){case BH:case P_:case qC:case CH:return this.onEnd(s),this.ended=!0,!1}if(a=e.avail_out,e.next_out&&(e.avail_out===0||s===XC))if(this.options.to==="string"){let o=KC.utf8border(e.output,e.next_out),l=e.next_out-o,h=KC.buf2string(e.output,o);e.next_out=l,e.avail_out=r-l,l&&e.output.set(e.output.subarray(o,o+l),0),this.onData(h)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===H0&&a===0)){if(s===XC)return s=Zo.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0},K0.prototype.onData=function(n){this.chunks.push(n)},K0.prototype.onEnd=function(n){n===H0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=$T.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function xH(n,t){const e=new K0(t);if(e.push(n),e.err)throw e.msg||HC[e.err];return e.result}var EH=K0,SH=xH,FH={Inflate:EH,inflate:SH};const{Inflate:TH,inflate:_H}=FH;var M_=TH,IH=_H;const k_=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t=t>>>1;k_[n]=t}const O_=4294967295;function UH(n,t,e){let r=n;for(let i=0;i<e;i++)r=k_[(r^t[i])&255]^r>>>8;return r}function LH(n,t){return(UH(O_,n,t)^O_)>>>0}function D_(n,t,e){const r=n.readUint32(),i=LH(new Uint8Array(n.buffer,n.byteOffset+n.offset-t-4,t),t);if(i!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${i}`)}function R_(n,t,e){for(let r=0;r<e;r++)t[r]=n[r]}function H_(n,t,e,r){let i=0;for(;i<r;i++)t[i]=n[i];for(;i<e;i++)t[i]=n[i]+t[i-r]&255}function K_(n,t,e,r){let i=0;if(e.length===0)for(;i<r;i++)t[i]=n[i];else for(;i<r;i++)t[i]=n[i]+e[i]&255}function V_(n,t,e,r,i){let s=0;if(e.length===0){for(;s<i;s++)t[s]=n[s];for(;s<r;s++)t[s]=n[s]+(t[s-i]>>1)&255}else{for(;s<i;s++)t[s]=n[s]+(e[s]>>1)&255;for(;s<r;s++)t[s]=n[s]+(t[s-i]+e[s]>>1)&255}}function G_(n,t,e,r,i){let s=0;if(e.length===0){for(;s<i;s++)t[s]=n[s];for(;s<r;s++)t[s]=n[s]+t[s-i]&255}else{for(;s<i;s++)t[s]=n[s]+e[s]&255;for(;s<r;s++)t[s]=n[s]+QH(t[s-i],e[s],e[s-i])&255}}function QH(n,t,e){const r=n+t-e,i=Math.abs(r-n),s=Math.abs(r-t),A=Math.abs(r-e);return i<=s&&i<=A?n:s<=A?t:e}function NH(n,t,e,r,i,s){switch(n){case 0:R_(t,e,i);break;case 1:H_(t,e,i,s);break;case 2:K_(t,e,r,i);break;case 3:V_(t,e,r,i,s);break;case 4:G_(t,e,r,i,s);break;default:throw new Error(`Unsupported filter: ${n}`)}}const PH=new Uint16Array([255]),MH=new Uint8Array(PH.buffer)[0]===255;function kH(n){const{data:t,width:e,height:r,channels:i,depth:s}=n,A=[{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}],a=Math.ceil(s/8)*i,o=new Uint8Array(r*e*a);let l=0;for(let h=0;h<7;h++){const u=A[h],d=Math.ceil((e-u.x)/u.xStep),f=Math.ceil((r-u.y)/u.yStep);if(d<=0||f<=0)continue;const p=d*a,m=new Uint8Array(p);for(let y=0;y<f;y++){const w=t[l++],B=t.subarray(l,l+p);l+=p;const E=new Uint8Array(p);NH(w,B,E,m,p,a),m.set(E);for(let S=0;S<d;S++){const _=u.x+S*u.xStep,L=u.y+y*u.yStep;if(!(_>=e||L>=r))for(let k=0;k<a;k++)o[(L*e+_)*a+k]=E[S*a+k]}}}if(s===16){const h=new Uint16Array(o.buffer);if(MH)for(let u=0;u<h.length;u++)h[u]=OH(h[u]);return h}else return o}function OH(n){return(n&255)<<8|n>>8&255}const DH=new Uint16Array([255]),RH=new Uint8Array(DH.buffer)[0]===255,HH=new Uint8Array(0);function j_(n){const{data:t,width:e,height:r,channels:i,depth:s}=n,A=Math.ceil(s/8)*i,a=Math.ceil(s/8*i*e),o=new Uint8Array(r*a);let l=HH,h=0,u,d;for(let f=0;f<r;f++){switch(u=t.subarray(h+1,h+1+a),d=o.subarray(f*a,(f+1)*a),t[h]){case 0:R_(u,d,a);break;case 1:H_(u,d,a,A);break;case 2:K_(u,d,l,a);break;case 3:V_(u,d,l,a,A);break;case 4:G_(u,d,l,a,A);break;default:throw new Error(`Unsupported filter: ${t[h]}`)}l=d,h+=a+1}if(s===16){const f=new Uint16Array(o.buffer);if(RH)for(let p=0;p<f.length;p++)f[p]=KH(f[p]);return f}else return o}function KH(n){return(n&255)<<8|n>>8&255}const Xw=Uint8Array.of(137,80,78,71,13,10,26,10);function $_(n){if(!VH(n.readBytes(Xw.length)))throw new Error("wrong PNG signature")}function VH(n){if(n.length<Xw.length)return!1;for(let t=0;t<Xw.length;t++)if(n[t]!==Xw[t])return!1;return!0}const GH="tEXt",jH=0,W_=new TextDecoder("latin1");function $H(n){if(zH(n),n.length===0||n.length>79)throw new Error("keyword length must be between 1 and 79")}const WH=/^[\u0000-\u00FF]*$/;function zH(n){if(!WH.test(n))throw new Error("invalid latin1 text")}function XH(n,t,e){const r=z_(t);n[r]=qH(t,e-r.length-1)}function z_(n){for(n.mark();n.readByte()!==jH;);const t=n.offset;n.reset();const e=W_.decode(n.readBytes(t-n.offset-1));return n.skip(1),$H(e),e}function qH(n,t){return W_.decode(n.readBytes(t))}const eA={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},YC={UNKNOWN:-1,DEFLATE:0},X_={UNKNOWN:-1,ADAPTIVE:0},JC={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},qw={NONE:0,BACKGROUND:1,PREVIOUS:2},ZC={SOURCE:0,OVER:1};class YH extends DC{constructor(e,r={}){super(e);ct(this,"_checkCrc");ct(this,"_inflator");ct(this,"_png");ct(this,"_apng");ct(this,"_end");ct(this,"_hasPalette");ct(this,"_palette");ct(this,"_hasTransparency");ct(this,"_transparency");ct(this,"_compressionMethod");ct(this,"_filterMethod");ct(this,"_interlaceMethod");ct(this,"_colorType");ct(this,"_isAnimated");ct(this,"_numberOfFrames");ct(this,"_numberOfPlays");ct(this,"_frames");ct(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new M_,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=YC.UNKNOWN,this._filterMethod=X_.UNKNOWN,this._interlaceMethod=JC.UNKNOWN,this._colorType=eA.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for($_(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeChunk(e,r)}return this.decodeImage(),this._png}decodeApng(){for($_(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(e,r)}return this.decodeApngImage(),this._apng}decodeChunk(e,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case GH:XH(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-i!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?D_(this,e+4,r):this.skip(4)}decodeApngChunk(e,r){const i=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(e);break;default:this.decodeChunk(e,r),this.offset=i+e;break}if(this.offset-i!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?D_(this,e+4,r):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=JH(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case eA.GREYSCALE:i=1;break;case eA.TRUECOLOUR:i=3;break;case eA.INDEXED_COLOUR:i=1;break;case eA.GREYSCALE_ALPHA:i=2;break;case eA.TRUECOLOUR_ALPHA:i=4;break;case eA.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==YC.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 e={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(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const r=e/3;this._hasPalette=!0;const i=[];this._palette=i;for(let s=0;s<r;s++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const r=e,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let r=e,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case eA.GREYSCALE:case eA.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let r=0;r<e/2;r++)this._transparency[r]=this.readUint16();break}case eA.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let r=0;for(;r<e;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case eA.UNKNOWN:case eA.GREYSCALE_ALPHA:case eA.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const r=z_(this),i=this.readUint8();if(i!==YC.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const s=this.readBytes(e-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:IH(s)}}decodepHYs(){const e=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:e,y:r,unit:i}}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 e=0;e<this._numberOfFrames;e++){const r={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].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)},i=this._frames.at(e);if(i){if(i.data=j_({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const s=this._apng.frames.at(e-1);this.disposeFrame(i,s,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(e,r,i){switch(e.disposeOp){case qw.NONE:break;case qw.BACKGROUND:for(let s=0;s<this._png.height;s++)for(let A=0;A<this._png.width;A++){const a=(s*e.width+A)*this._png.channels;for(let o=0;o<this._png.channels;o++)i.data[a+o]=0}break;case qw.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,r){const i=1<<this._png.depth,s=(A,a)=>{const o=((A+r.yOffset)*this._png.width+r.xOffset+a)*this._png.channels,l=(A*r.width+a)*this._png.channels;return{index:o,frameIndex:l}};switch(r.blendOp){case ZC.SOURCE:for(let A=0;A<r.height;A++)for(let a=0;a<r.width;a++){const{index:o,frameIndex:l}=s(A,a);for(let h=0;h<this._png.channels;h++)e.data[o+h]=r.data[l+h]}break;case ZC.OVER:for(let A=0;A<r.height;A++)for(let a=0;a<r.width;a++){const{index:o,frameIndex:l}=s(A,a);for(let h=0;h<this._png.channels;h++){const u=r.data[l+this._png.channels-1]/i,d=h%(this._png.channels-1)===0?1:r.data[l+h],f=Math.floor(u*d+(1-u)*e.data[o+h]);e.data[o+h]+=f}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==X_.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===JC.NO_INTERLACE)this._png.data=j_({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===JC.ADAM7)this._png.data=kH({data:e,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 e=this._inflator.result,r=this._frames.at(-1);r?r.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:qw.NONE,blendOp:ZC.SOURCE,data:e}),this._inflator=new M_,this._writingDataChunks=!1}}function JH(n){if(n!==1&&n!==2&&n!==4&&n!==8&&n!==16)throw new Error(`invalid bit depth: ${n}`);return n}var q_;(function(n){n[n.UNKNOWN=0]="UNKNOWN",n[n.METRE=1]="METRE"})(q_||(q_={}));function ZH(n,t){return new YH(n,t).decode()}/** @license
|
|
3
|
-
*
|
|
4
|
-
* jsPDF - PDF Document creation from JavaScript
|
|
5
|
-
* Version 4.2.1 Built on 2026-03-17T11:11:27.057Z
|
|
6
|
-
* CommitID 00000000
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) 2010-2025 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
|
9
|
-
* 2015-2025 yWorks GmbH, http://www.yworks.com
|
|
10
|
-
* 2015-2025 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
|
|
11
|
-
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
|
|
12
|
-
* 2010 Aaron Spike, https://github.com/acspike
|
|
13
|
-
* 2012 Willow Systems Corporation, https://github.com/willowsystems
|
|
14
|
-
* 2012 Pablo Hess, https://github.com/pablohess
|
|
15
|
-
* 2012 Florian Jenett, https://github.com/fjenett
|
|
16
|
-
* 2013 Warren Weckesser, https://github.com/warrenweckesser
|
|
17
|
-
* 2013 Youssef Beddad, https://github.com/lifof
|
|
18
|
-
* 2013 Lee Driscoll, https://github.com/lsdriscoll
|
|
19
|
-
* 2013 Stefan Slonevskiy, https://github.com/stefslon
|
|
20
|
-
* 2013 Jeremy Morel, https://github.com/jmorel
|
|
21
|
-
* 2013 Christoph Hartmann, https://github.com/chris-rock
|
|
22
|
-
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
|
23
|
-
* 2014 James Makes, https://github.com/dollaruw
|
|
24
|
-
* 2014 Diego Casorran, https://github.com/diegocr
|
|
25
|
-
* 2014 Steven Spungin, https://github.com/Flamenco
|
|
26
|
-
* 2014 Kenneth Glassey, https://github.com/Gavvers
|
|
27
|
-
*
|
|
28
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
29
|
-
* a copy of this software and associated documentation files (the
|
|
30
|
-
* "Software"), to deal in the Software without restriction, including
|
|
31
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
32
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
33
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
34
|
-
* the following conditions:
|
|
35
|
-
*
|
|
36
|
-
* The above copyright notice and this permission notice shall be
|
|
37
|
-
* included in all copies or substantial portions of the Software.
|
|
38
|
-
*
|
|
39
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
40
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
41
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
42
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
43
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
44
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
45
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
46
|
-
*
|
|
47
|
-
* Contributor(s):
|
|
48
|
-
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
|
|
49
|
-
* kim3er, mfo, alnorth, Flamenco
|
|
50
|
-
*/var ye=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function t5(){ye.console&&typeof ye.console.log=="function"&&ye.console.log.apply(ye.console,arguments)}var Ir={log:t5,warn:function(n){ye.console&&(typeof ye.console.warn=="function"?ye.console.warn.apply(ye.console,arguments):t5.call(null,arguments))},error:function(n){ye.console&&(typeof ye.console.error=="function"?ye.console.error.apply(ye.console,arguments):t5(n))}};function e5(n,t,e){var r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){hu(r.response,t,e)},r.onerror=function(){Ir.error("could not download file")},r.send()}function Y_(n){var t=new XMLHttpRequest;t.open("HEAD",n,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Yw(n){try{n.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),n.dispatchEvent(t)}}var hu=ye.saveAs||((typeof window>"u"?"undefined":Ar(window))!=="object"||window!==ye?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,t,e){var r=ye.URL||ye.webkitURL,i=document.createElement("a");t=t||n.name||"download",i.download=t,i.rel="noopener",typeof n=="string"?(i.href=n,i.origin!==location.origin?Y_(i.href)?e5(n,t,e):Yw(i,i.target="_blank"):Yw(i)):(i.href=r.createObjectURL(n),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){Yw(i)},0))}:"msSaveOrOpenBlob"in navigator?function(n,t,e){if(t=t||n.name||"download",typeof n=="string")if(Y_(n))e5(n,t,e);else{var r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){Yw(r)})}else navigator.msSaveOrOpenBlob(function(i,s){return s===void 0?s={autoBom:!1}:Ar(s)!=="object"&&(Ir.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(n,e),t)}:function(n,t,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return e5(n,t,e);var i=n.type==="application/octet-stream",s=/constructor/i.test(ye.HTMLElement)||ye.safari,A=/CriOS\/[\d]+/.test(navigator.userAgent);if((A||i&&s)&&(typeof FileReader>"u"?"undefined":Ar(FileReader))==="object"){var a=new FileReader;a.onloadend=function(){var h=a.result;h=A?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=h:location=h,r=null},a.readAsDataURL(n)}else{var o=ye.URL||ye.webkitURL,l=o.createObjectURL(n);r?r.location=l:location.href=l,r=null,setTimeout(function(){o.revokeObjectURL(l)},4e4)}});/**
|
|
51
|
-
* A class to parse color values
|
|
52
|
-
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
53
|
-
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
54
|
-
* @license Use it if you like it
|
|
55
|
-
*/function J_(n){var t;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var 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(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],r=0;r<e.length;r++){var i=e[r].re,s=e[r].process,A=i.exec(n);A&&(t=s(A),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 a=this.r.toString(16),o=this.g.toString(16),l=this.b.toString(16);return a.length==1&&(a="0"+a),o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),"#"+a+o+l}}var Jw=ye.atob.bind(ye),Z_=ye.btoa.bind(ye);/**
|
|
56
|
-
* @license
|
|
57
|
-
* Joseph Myers does not specify a particular license for his work.
|
|
58
|
-
*
|
|
59
|
-
* Author: Joseph Myers
|
|
60
|
-
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
61
|
-
*
|
|
62
|
-
* Modified by: Owen Leong
|
|
63
|
-
*/function r5(n,t){var e=n[0],r=n[1],i=n[2],s=n[3];e=Gn(e,r,i,s,t[0],7,-680876936),s=Gn(s,e,r,i,t[1],12,-389564586),i=Gn(i,s,e,r,t[2],17,606105819),r=Gn(r,i,s,e,t[3],22,-1044525330),e=Gn(e,r,i,s,t[4],7,-176418897),s=Gn(s,e,r,i,t[5],12,1200080426),i=Gn(i,s,e,r,t[6],17,-1473231341),r=Gn(r,i,s,e,t[7],22,-45705983),e=Gn(e,r,i,s,t[8],7,1770035416),s=Gn(s,e,r,i,t[9],12,-1958414417),i=Gn(i,s,e,r,t[10],17,-42063),r=Gn(r,i,s,e,t[11],22,-1990404162),e=Gn(e,r,i,s,t[12],7,1804603682),s=Gn(s,e,r,i,t[13],12,-40341101),i=Gn(i,s,e,r,t[14],17,-1502002290),e=jn(e,r=Gn(r,i,s,e,t[15],22,1236535329),i,s,t[1],5,-165796510),s=jn(s,e,r,i,t[6],9,-1069501632),i=jn(i,s,e,r,t[11],14,643717713),r=jn(r,i,s,e,t[0],20,-373897302),e=jn(e,r,i,s,t[5],5,-701558691),s=jn(s,e,r,i,t[10],9,38016083),i=jn(i,s,e,r,t[15],14,-660478335),r=jn(r,i,s,e,t[4],20,-405537848),e=jn(e,r,i,s,t[9],5,568446438),s=jn(s,e,r,i,t[14],9,-1019803690),i=jn(i,s,e,r,t[3],14,-187363961),r=jn(r,i,s,e,t[8],20,1163531501),e=jn(e,r,i,s,t[13],5,-1444681467),s=jn(s,e,r,i,t[2],9,-51403784),i=jn(i,s,e,r,t[7],14,1735328473),e=$n(e,r=jn(r,i,s,e,t[12],20,-1926607734),i,s,t[5],4,-378558),s=$n(s,e,r,i,t[8],11,-2022574463),i=$n(i,s,e,r,t[11],16,1839030562),r=$n(r,i,s,e,t[14],23,-35309556),e=$n(e,r,i,s,t[1],4,-1530992060),s=$n(s,e,r,i,t[4],11,1272893353),i=$n(i,s,e,r,t[7],16,-155497632),r=$n(r,i,s,e,t[10],23,-1094730640),e=$n(e,r,i,s,t[13],4,681279174),s=$n(s,e,r,i,t[0],11,-358537222),i=$n(i,s,e,r,t[3],16,-722521979),r=$n(r,i,s,e,t[6],23,76029189),e=$n(e,r,i,s,t[9],4,-640364487),s=$n(s,e,r,i,t[12],11,-421815835),i=$n(i,s,e,r,t[15],16,530742520),e=Wn(e,r=$n(r,i,s,e,t[2],23,-995338651),i,s,t[0],6,-198630844),s=Wn(s,e,r,i,t[7],10,1126891415),i=Wn(i,s,e,r,t[14],15,-1416354905),r=Wn(r,i,s,e,t[5],21,-57434055),e=Wn(e,r,i,s,t[12],6,1700485571),s=Wn(s,e,r,i,t[3],10,-1894986606),i=Wn(i,s,e,r,t[10],15,-1051523),r=Wn(r,i,s,e,t[1],21,-2054922799),e=Wn(e,r,i,s,t[8],6,1873313359),s=Wn(s,e,r,i,t[15],10,-30611744),i=Wn(i,s,e,r,t[6],15,-1560198380),r=Wn(r,i,s,e,t[13],21,1309151649),e=Wn(e,r,i,s,t[4],6,-145523070),s=Wn(s,e,r,i,t[11],10,-1120210379),i=Wn(i,s,e,r,t[2],15,718787259),r=Wn(r,i,s,e,t[9],21,-343485551),n[0]=Sc(e,n[0]),n[1]=Sc(r,n[1]),n[2]=Sc(i,n[2]),n[3]=Sc(s,n[3])}function Zw(n,t,e,r,i,s){return t=Sc(Sc(t,n),Sc(r,s)),Sc(t<<i|t>>>32-i,e)}function Gn(n,t,e,r,i,s,A){return Zw(t&e|~t&r,n,t,i,s,A)}function jn(n,t,e,r,i,s,A){return Zw(t&r|e&~r,n,t,i,s,A)}function $n(n,t,e,r,i,s,A){return Zw(t^e^r,n,t,i,s,A)}function Wn(n,t,e,r,i,s,A){return Zw(e^(t|~r),n,t,i,s,A)}function tI(n){var t,e=n.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=n.length;t+=64)r5(r,t8(n.substring(t-64,t)));n=n.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<n.length;t++)i[t>>2]|=n.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(r5(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*e,r5(r,i),r}function t8(n){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=n.charCodeAt(t)+(n.charCodeAt(t+1)<<8)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+3)<<24);return e}var eI="0123456789abcdef".split("");function e8(n){for(var t="",e=0;e<4;e++)t+=eI[n>>8*e+4&15]+eI[n>>8*e&15];return t}function r8(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function i5(n){return tI(n).map(r8).join("")}var i8=function(n){for(var t=0;t<n.length;t++)n[t]=e8(n[t]);return n.join("")}(tI("hello"))!="5d41402abc4b2a76b9719d911017c592";function Sc(n,t){if(i8){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}return n+t&4294967295}/**
|
|
64
|
-
* @license
|
|
65
|
-
* FPDF is released under a permissive license: there is no usage restriction.
|
|
66
|
-
* You may embed it freely in your application (commercial or not), with or
|
|
67
|
-
* without modifications.
|
|
68
|
-
*
|
|
69
|
-
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
70
|
-
*/function n5(n,t){var e,r,i,s;if(n!==e){for(var A=(i=n,s=1+(256/n.length|0),new Array(s+1).join(i)),a=[],o=0;o<256;o++)a[o]=o;var l=0;for(o=0;o<256;o++){var h=a[o];l=(l+h+A.charCodeAt(o))%256,a[o]=a[l],a[l]=h}e=n,r=a}else a=r;var u=t.length,d=0,f=0,p="";for(o=0;o<u;o++)f=(f+(h=a[d=(d+1)%256]))%256,a[d]=a[f],a[f]=h,A=a[(a[d]+a[f])%256],p+=String.fromCharCode(t.charCodeAt(o)^A);return p}/**
|
|
71
|
-
* @license
|
|
72
|
-
* Licensed under the MIT License.
|
|
73
|
-
* http://opensource.org/licenses/mit-license
|
|
74
|
-
* Author: Owen Leong (@owenl131)
|
|
75
|
-
* Date: 15 Oct 2020
|
|
76
|
-
* References:
|
|
77
|
-
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
78
|
-
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
79
|
-
* http://www.fpdf.org/en/script/script37.php
|
|
80
|
-
*/var rI={print:4,modify:8,copy:16,"annot-forms":32};function Qd(n,t,e,r){this.v=1,this.r=2;var i=192;n.forEach(function(a){if(rI.perm!==void 0)throw new Error("Invalid permission: "+a);i+=rI[a]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(t+this.padding).substr(0,32),A=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,A),this.P=-(1+(255^i)),this.encryptionKey=i5(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=n5(this.encryptionKey,this.padding)}function Nd(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var t="",e=n.length,r=0;r<e;r++){var i=n.charCodeAt(r);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):n[r]}return t}function iI(n){if(Ar(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,i){if(i=i||!1,typeof e!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var s=Math.random().toString(35);return t[e][s]=[r,!!i],s},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var s in t[e]){var A=t[e][s];try{A[0].apply(n,r)}catch(a){ye.console&&Ir.error("jsPDF PubSub Error",a.message,a)}A[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function uu(n){if(!(this instanceof uu))return new uu(n);var t="opacity,stroke-opacity".split(",");for(var e in n)n.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=n[e]);this.id="",this.objectNumber=-1}function nI(n,t){this.gState=n,this.matrix=t,this.id="",this.objectNumber=-1}function Fc(n,t,e,r,i){if(!(this instanceof Fc))return new Fc(n,t,e,r,i);this.type=n==="axial"?2:3,this.coords=t,this.colors=e,nI.call(this,r,i)}function fu(n,t,e,r,i){if(!(this instanceof fu))return new fu(n,t,e,r,i);this.boundingBox=n,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,nI.call(this,r,i)}function le(n){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],s=arguments[3],A=[],a=1,o=16,l="S",h=null;Ar(n=n||{})==="object"&&(e=n.orientation,r=n.unit||r,i=n.format||i,s=n.compress||n.compressPdf||s,(h=n.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),a=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(t=n.precision),n.floatPrecision!==void 0&&(o=n.floatPrecision),l=n.defaultPathOperation||"S"),A=n.filters||(s===!0?["FlateEncode"]:A),r=r||"mm",e=(""+(e||"P")).toLowerCase();var u=n.putOnlyUsedFonts||!1,d={},f={internal:{},__private__:{}};f.__private__.PubSub=iI;var p="1.3",m=f.__private__.getPdfVersion=function(){return p};f.__private__.setPdfVersion=function(b){p=b};var y={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]};f.__private__.getPageFormats=function(){return y};var w=f.__private__.getPageFormat=function(b){return y[b]};i=i||"a4";var B="compat",E="advanced",S=B;function _(){this.saveGraphicsState(),z(new Kt(ce,0,0,-ce,0,gd()*ce).toString()+" cm"),this.setFontSize(this.getFontSize()/ce),l="n",S=E}function L(){this.restoreGraphicsState(),l="S",S=B}var k=f.__private__.combineFontStyleAndFontWeight=function(b,N){if(b=="bold"&&N=="normal"||b=="bold"&&N==400||b=="normal"&&N=="italic"||b=="bold"&&N=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return N&&(b=N==400||N==="normal"?b==="italic"?"italic":"normal":N!=700&&N!=="bold"||b!=="normal"?(N==700?"bold":N)+""+b:"bold"),b};f.advancedAPI=function(b){var N=S===B;return N&&_.call(this),typeof b!="function"||(b(this),N&&L.call(this)),this},f.compatAPI=function(b){var N=S===E;return N&&L.call(this),typeof b!="function"||(b(this),N&&_.call(this)),this},f.isAdvancedAPI=function(){return S===E};var H,Q=function(b){if(S!==E)throw new Error(b+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},W=f.roundToPrecision=f.__private__.roundToPrecision=function(b,N){var X=t||N;if(isNaN(b)||isNaN(X))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return b.toFixed(X).replace(/0+$/,"")};H=f.hpf=f.__private__.hpf=typeof o=="number"?function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return W(b,o)}:o==="smart"?function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return W(b,b>-1&&b<1?16:5)}:function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return W(b,16)};var U=f.f2=f.__private__.f2=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.f2");return W(b,2)},D=f.__private__.f3=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.f3");return W(b,3)},j=f.scale=f.__private__.scale=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.scale");return S===B?b*ce:S===E?b:void 0},V=function(b){return j(function(N){return S===B?gd()-N:S===E?N:void 0}(b))};f.__private__.setPrecision=f.setPrecision=function(b){typeof parseInt(b,10)=="number"&&(t=parseInt(b,10))};var st,rt="00000000000000000000000000000000",it=f.__private__.getFileId=function(){return rt},At=f.__private__.setFileId=function(b){return rt=b!==void 0&&/^[a-fA-F0-9]{32}$/.test(b)?b.toUpperCase():rt.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),h!==null&&(Rn=new Qd(h.userPermissions,h.userPassword,h.ownerPassword,rt)),rt};f.setFileId=function(b){return At(b),this},f.getFileId=function(){return it()};var ut=f.__private__.convertDateToPDFDate=function(b){var N=b.getTimezoneOffset(),X=N<0?"+":"-",nt=Math.floor(Math.abs(N/60)),ht=Math.abs(N%60),bt=[X,q(nt),"'",q(ht),"'"].join("");return["D:",b.getFullYear(),q(b.getMonth()+1),q(b.getDate()),q(b.getHours()),q(b.getMinutes()),q(b.getSeconds()),bt].join("")},vt=f.__private__.convertPDFDateToDate=function(b){var N=parseInt(b.substr(2,4),10),X=parseInt(b.substr(6,2),10)-1,nt=parseInt(b.substr(8,2),10),ht=parseInt(b.substr(10,2),10),bt=parseInt(b.substr(12,2),10),Ft=parseInt(b.substr(14,2),10);return new Date(N,X,nt,ht,bt,Ft,0)},mt=f.__private__.setCreationDate=function(b){var N;if(b===void 0&&(b=new Date),b instanceof Date)N=ut(b);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(b))throw new Error("Invalid argument passed to jsPDF.setCreationDate");N=b}return st=N},M=f.__private__.getCreationDate=function(b){var N=st;return b==="jsDate"&&(N=vt(st)),N};f.setCreationDate=function(b){return mt(b),this},f.getCreationDate=function(b){return M(b)};var $,q=f.__private__.padd2=function(b){return("0"+parseInt(b)).slice(-2)},tt=f.__private__.padd2Hex=function(b){return("00"+(b=b.toString())).substr(b.length)},et=0,ot=[],dt=[],wt=0,yt=[],St=[],Mt=!1,Pt=dt;f.__private__.setCustomOutputDestination=function(b){Mt=!0,Pt=b};var $t=function(b){Mt||(Pt=b)};f.__private__.resetCustomOutputDestination=function(){Mt=!1,Pt=dt};var z=f.__private__.out=function(b){return b=b.toString(),wt+=b.length+1,Pt.push(b),Pt},Nt=f.__private__.write=function(b){return z(arguments.length===1?b.toString():Array.prototype.join.call(arguments," "))},ve=f.__private__.getArrayBuffer=function(b){for(var N=b.length,X=new ArrayBuffer(N),nt=new Uint8Array(X);N--;)nt[N]=b.charCodeAt(N);return X},re=[["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]];f.__private__.getStandardFonts=function(){return re};var Tt=n.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(b){return Tt=S===E?b/ce:b,this};var ie,kt=f.__private__.getFontSize=f.getFontSize=function(){return S===B?Tt:Tt*ce},qt=n.R2L||!1;f.__private__.setR2L=f.setR2L=function(b){return qt=b,this},f.__private__.getR2L=f.getR2L=function(){return qt};var zt,we=f.__private__.setZoomMode=function(b){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(b))ie=b;else if(isNaN(b)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(b)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+b+'" is not recognized.');ie=b}else ie=parseInt(b,10)};f.__private__.getZoomMode=function(){return ie};var Ne,me=f.__private__.setPageMode=function(b){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(b)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+b+'" is not recognized.');zt=b};f.__private__.getPageMode=function(){return zt};var Pe=f.__private__.setLayoutMode=function(b){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(b)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+b+'" is not recognized.');Ne=b};f.__private__.getLayoutMode=function(){return Ne},f.__private__.setDisplayMode=f.setDisplayMode=function(b,N,X){return we(b),Pe(N),me(X),this};var Ce={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(b){if(Object.keys(Ce).indexOf(b)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Ce[b]},f.__private__.getDocumentProperties=function(){return Ce},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(b){for(var N in Ce)Ce.hasOwnProperty(N)&&b[N]&&(Ce[N]=b[N]);return this},f.__private__.setDocumentProperty=function(b,N){if(Object.keys(Ce).indexOf(b)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Ce[b]=N};var Vt,ce,Xt,vr,je,xe={},Ee={},nr=[],ne={},He={},Ae={},ge={},ar=null,fe=0,de=[],Ze=new iI(f),lc=n.hotfixes||[],bi={},za={},la=[],Kt=function b(N,X,nt,ht,bt,Ft){if(!(this instanceof b))return new b(N,X,nt,ht,bt,Ft);isNaN(N)&&(N=1),isNaN(X)&&(X=0),isNaN(nt)&&(nt=0),isNaN(ht)&&(ht=1),isNaN(bt)&&(bt=0),isNaN(Ft)&&(Ft=0),this._matrix=[N,X,nt,ht,bt,Ft]};Object.defineProperty(Kt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(b){this._matrix[0]=b}}),Object.defineProperty(Kt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(b){this._matrix[1]=b}}),Object.defineProperty(Kt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(b){this._matrix[2]=b}}),Object.defineProperty(Kt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(b){this._matrix[3]=b}}),Object.defineProperty(Kt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(b){this._matrix[4]=b}}),Object.defineProperty(Kt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(b){this._matrix[5]=b}}),Object.defineProperty(Kt.prototype,"a",{get:function(){return this._matrix[0]},set:function(b){this._matrix[0]=b}}),Object.defineProperty(Kt.prototype,"b",{get:function(){return this._matrix[1]},set:function(b){this._matrix[1]=b}}),Object.defineProperty(Kt.prototype,"c",{get:function(){return this._matrix[2]},set:function(b){this._matrix[2]=b}}),Object.defineProperty(Kt.prototype,"d",{get:function(){return this._matrix[3]},set:function(b){this._matrix[3]=b}}),Object.defineProperty(Kt.prototype,"e",{get:function(){return this._matrix[4]},set:function(b){this._matrix[4]=b}}),Object.defineProperty(Kt.prototype,"f",{get:function(){return this._matrix[5]},set:function(b){this._matrix[5]=b}}),Object.defineProperty(Kt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Kt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Kt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Kt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Kt.prototype.join=function(b){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(H).join(b)},Kt.prototype.multiply=function(b){var N=b.sx*this.sx+b.shy*this.shx,X=b.sx*this.shy+b.shy*this.sy,nt=b.shx*this.sx+b.sy*this.shx,ht=b.shx*this.shy+b.sy*this.sy,bt=b.tx*this.sx+b.ty*this.shx+this.tx,Ft=b.tx*this.shy+b.ty*this.sy+this.ty;return new Kt(N,X,nt,ht,bt,Ft)},Kt.prototype.decompose=function(){var b=this.sx,N=this.shy,X=this.shx,nt=this.sy,ht=this.tx,bt=this.ty,Ft=Math.sqrt(b*b+N*N),se=(b/=Ft)*X+(N/=Ft)*nt;X-=b*se,nt-=N*se;var ee=Math.sqrt(X*X+nt*nt);return se/=ee,b*(nt/=ee)<N*(X/=ee)&&(b=-b,N=-N,se=-se,Ft=-Ft),{scale:new Kt(Ft,0,0,ee,0,0),translate:new Kt(1,0,0,1,ht,bt),rotate:new Kt(b,N,-N,b,0,0),skew:new Kt(1,0,se,1,0,0)}},Kt.prototype.toString=function(b){return this.join(" ")},Kt.prototype.inversed=function(){var b=this.sx,N=this.shy,X=this.shx,nt=this.sy,ht=this.tx,bt=this.ty,Ft=1/(b*nt-N*X),se=nt*Ft,ee=-N*Ft,Fe=-X*Ft,Me=b*Ft;return new Kt(se,ee,Fe,Me,-se*ht-Fe*bt,-ee*ht-Me*bt)},Kt.prototype.applyToPoint=function(b){var N=b.x*this.sx+b.y*this.shx+this.tx,X=b.x*this.shy+b.y*this.sy+this.ty;return new dd(N,X)},Kt.prototype.applyToRectangle=function(b){var N=this.applyToPoint(b),X=this.applyToPoint(new dd(b.x+b.w,b.y+b.h));return new Aw(N.x,N.y,X.x-N.x,X.y-N.y)},Kt.prototype.clone=function(){var b=this.sx,N=this.shy,X=this.shx,nt=this.sy,ht=this.tx,bt=this.ty;return new Kt(b,N,X,nt,ht,bt)},f.Matrix=Kt;var ss=f.matrixMult=function(b,N){return N.multiply(b)},Xa=new Kt(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Xa;var _s=function(b,N){if(!He[b]){var X=(N instanceof Fc?"Sh":"P")+(Object.keys(ne).length+1).toString(10);N.id=X,He[b]=X,ne[X]=N,Ze.publish("addPattern",N)}};f.ShadingPattern=Fc,f.TilingPattern=fu,f.addShadingPattern=function(b,N){return Q("addShadingPattern()"),_s(b,N),this},f.beginTilingPattern=function(b){Q("beginTilingPattern()"),aw(b.boundingBox[0],b.boundingBox[1],b.boundingBox[2]-b.boundingBox[0],b.boundingBox[3]-b.boundingBox[1],b.matrix)},f.endTilingPattern=function(b,N){Q("endTilingPattern()"),N.stream=St[$].join(`
|
|
81
|
-
`),_s(b,N),Ze.publish("endTilingPattern",N),la.pop().restore()};var As,zr=f.__private__.newObject=function(){var b=Mi();return nn(b,!0),b},Mi=f.__private__.newObjectDeferred=function(){return et++,ot[et]=function(){return wt},et},nn=function(b,N){return N=typeof N=="boolean"&&N,ot[b]=wt,N&&z(b+" 0 obj"),b},sn=f.__private__.newAdditionalObject=function(){var b={objId:Mi(),content:""};return yt.push(b),b},as=Mi(),zs=Mi(),_A=f.__private__.decodeColorString=function(b){var N=b.split(" ");if(N.length!==2||N[1]!=="g"&&N[1]!=="G")N.length!==5||N[4]!=="k"&&N[4]!=="K"||(N=[(1-N[0])*(1-N[3]),(1-N[1])*(1-N[3]),(1-N[2])*(1-N[3]),"r"]);else{var X=parseFloat(N[0]);N=[X,X,X,"r"]}for(var nt="#",ht=0;ht<3;ht++)nt+=("0"+Math.floor(255*parseFloat(N[ht])).toString(16)).slice(-2);return nt},Xs=f.__private__.encodeColorString=function(b){var N;typeof b=="string"&&(b={ch1:b});var X=b.ch1,nt=b.ch2,ht=b.ch3,bt=b.ch4,Ft=b.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof X=="string"&&X.charAt(0)!=="#"){var se=new J_(X);if(se.ok)X=se.toHex();else if(!/^\d*\.?\d*$/.test(X))throw new Error('Invalid color "'+X+'" passed to jsPDF.encodeColorString.')}if(typeof X=="string"&&/^#[0-9A-Fa-f]{3}$/.test(X)&&(X="#"+X[1]+X[1]+X[2]+X[2]+X[3]+X[3]),typeof X=="string"&&/^#[0-9A-Fa-f]{6}$/.test(X)){var ee=parseInt(X.substr(1),16);X=ee>>16&255,nt=ee>>8&255,ht=255&ee}if(nt===void 0||bt===void 0&&X===nt&&nt===ht)N=typeof X=="string"?X+" "+Ft[0]:b.precision===2?U(X/255)+" "+Ft[0]:D(X/255)+" "+Ft[0];else if(bt===void 0||Ar(bt)==="object"){if(bt&&!isNaN(bt.a)&&bt.a===0)return["1.","1.","1.",Ft[1]].join(" ");N=typeof X=="string"?[X,nt,ht,Ft[1]].join(" "):b.precision===2?[U(X/255),U(nt/255),U(ht/255),Ft[1]].join(" "):[D(X/255),D(nt/255),D(ht/255),Ft[1]].join(" ")}else N=typeof X=="string"?[X,nt,ht,bt,Ft[2]].join(" "):b.precision===2?[U(X),U(nt),U(ht),U(bt),Ft[2]].join(" "):[D(X),D(nt),D(ht),D(bt),Ft[2]].join(" ");return N},os=f.__private__.getFilters=function(){return A},Bn=f.__private__.putStream=function(b){var N=(b=b||{}).data||"",X=b.filters||os(),nt=b.alreadyAppliedFilters||[],ht=b.addLength1||!1,bt=N.length,Ft=b.objectId,se=function(Xr){return Xr};if(h!==null&&Ft===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(se=Rn.encryptor(Ft,0));var ee={};X===!0&&(X=["FlateEncode"]);var Fe=b.additionalKeyValues||[],Me=(ee=le.API.processDataByFilters!==void 0?le.API.processDataByFilters(N,X):{data:N,reverseChain:[]}).reverseChain+(Array.isArray(nt)?nt.join(" "):nt.toString());if(ee.data.length!==0&&(Fe.push({key:"Length",value:ee.data.length}),ht===!0&&Fe.push({key:"Length1",value:bt})),Me.length!=0)if(Me.split("/").length-1==1)Fe.push({key:"Filter",value:Me});else{Fe.push({key:"Filter",value:"["+Me+"]"});for(var tr=0;tr<Fe.length;tr+=1)if(Fe[tr].key==="DecodeParms"){for(var Xi=[],Nr=0;Nr<ee.reverseChain.split("/").length-1;Nr+=1)Xi.push("null");Xi.push(Fe[tr].value),Fe[tr].value="["+Xi.join(" ")+"]"}}z("<<");for(var _r=0;_r<Fe.length;_r++)z("/"+Fe[_r].key+" "+Fe[_r].value);z(">>"),ee.data.length!==0&&(z("stream"),z(se(ee.data)),z("endstream"))},ca=f.__private__.putPage=function(b){var N=b.number,X=b.data,nt=b.objId,ht=b.contentsObjId;nn(nt,!0),z("<</Type /Page"),z("/Parent "+b.rootDictionaryObjId+" 0 R"),z("/Resources "+b.resourceDictionaryObjId+" 0 R"),z("/MediaBox ["+parseFloat(H(b.mediaBox.bottomLeftX))+" "+parseFloat(H(b.mediaBox.bottomLeftY))+" "+H(b.mediaBox.topRightX)+" "+H(b.mediaBox.topRightY)+"]"),b.cropBox!==null&&z("/CropBox ["+H(b.cropBox.bottomLeftX)+" "+H(b.cropBox.bottomLeftY)+" "+H(b.cropBox.topRightX)+" "+H(b.cropBox.topRightY)+"]"),b.bleedBox!==null&&z("/BleedBox ["+H(b.bleedBox.bottomLeftX)+" "+H(b.bleedBox.bottomLeftY)+" "+H(b.bleedBox.topRightX)+" "+H(b.bleedBox.topRightY)+"]"),b.trimBox!==null&&z("/TrimBox ["+H(b.trimBox.bottomLeftX)+" "+H(b.trimBox.bottomLeftY)+" "+H(b.trimBox.topRightX)+" "+H(b.trimBox.topRightY)+"]"),b.artBox!==null&&z("/ArtBox ["+H(b.artBox.bottomLeftX)+" "+H(b.artBox.bottomLeftY)+" "+H(b.artBox.topRightX)+" "+H(b.artBox.topRightY)+"]"),typeof b.userUnit=="number"&&b.userUnit!==1&&z("/UserUnit "+b.userUnit),Ze.publish("putPage",{objId:nt,pageContext:de[N],pageNumber:N,page:X}),z("/Contents "+ht+" 0 R"),z(">>"),z("endobj");var bt=X.join(`
|
|
82
|
-
`);return S===E&&(bt+=`
|
|
83
|
-
Q`),nn(ht,!0),Bn({data:bt,filters:os(),objectId:ht}),z("endobj"),nt},zi=f.__private__.putPages=function(){var b,N,X=[];for(b=1;b<=fe;b++)de[b].objId=Mi(),de[b].contentsObjId=Mi();for(b=1;b<=fe;b++)X.push(ca({number:b,data:St[b],objId:de[b].objId,contentsObjId:de[b].contentsObjId,mediaBox:de[b].mediaBox,cropBox:de[b].cropBox,bleedBox:de[b].bleedBox,trimBox:de[b].trimBox,artBox:de[b].artBox,userUnit:de[b].userUnit,rootDictionaryObjId:as,resourceDictionaryObjId:zs}));nn(as,!0),z("<</Type /Pages");var nt="/Kids [";for(N=0;N<fe;N++)nt+=X[N]+" 0 R ";z(nt+"]"),z("/Count "+fe),z(">>"),z("endobj"),Ze.publish("postPutPages")},Vo=function(b){Ze.publish("putFont",{font:b,out:z,newObject:zr,putStream:Bn}),b.isAlreadyPutted!==!0&&(b.objectNumber=zr(),z("<<"),z("/Type /Font"),z("/BaseFont /"+Nd(b.postScriptName)),z("/Subtype /Type1"),typeof b.encoding=="string"&&z("/Encoding /"+b.encoding),z("/FirstChar 32"),z("/LastChar 255"),z(">>"),z("endobj"))},cc=function(b){b.objectNumber=zr();var N=[];N.push({key:"Type",value:"/XObject"}),N.push({key:"Subtype",value:"/Form"}),N.push({key:"BBox",value:"["+[H(b.x),H(b.y),H(b.x+b.width),H(b.y+b.height)].join(" ")+"]"}),N.push({key:"Matrix",value:"["+b.matrix.toString()+"]"});var X=b.pages[1].join(`
|
|
84
|
-
`);Bn({data:X,additionalKeyValues:N,objectId:b.objectNumber}),z("endobj")},$h=function(b,N){N||(N=21);var X=zr(),nt=function(Ft,se){var ee,Fe=[],Me=1/(se-1);for(ee=0;ee<1;ee+=Me)Fe.push(ee);if(Fe.push(1),Ft[0].offset!=0){var tr={offset:0,color:Ft[0].color};Ft.unshift(tr)}if(Ft[Ft.length-1].offset!=1){var Xi={offset:1,color:Ft[Ft.length-1].color};Ft.push(Xi)}for(var Nr="",_r=0,Xr=0;Xr<Fe.length;Xr++){for(ee=Fe[Xr];ee>Ft[_r+1].offset;)_r++;var oi=Ft[_r].offset,li=(ee-oi)/(Ft[_r+1].offset-oi),ls=Ft[_r].color,mc=Ft[_r+1].color;Nr+=tt(Math.round((1-li)*ls[0]+li*mc[0]).toString(16))+tt(Math.round((1-li)*ls[1]+li*mc[1]).toString(16))+tt(Math.round((1-li)*ls[2]+li*mc[2]).toString(16))}return Nr.trim()}(b.colors,N),ht=[];ht.push({key:"FunctionType",value:"0"}),ht.push({key:"Domain",value:"[0.0 1.0]"}),ht.push({key:"Size",value:"["+N+"]"}),ht.push({key:"BitsPerSample",value:"8"}),ht.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ht.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Bn({data:nt,additionalKeyValues:ht,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:X}),z("endobj"),b.objectNumber=zr(),z("<< /ShadingType "+b.type),z("/ColorSpace /DeviceRGB");var bt="/Coords ["+H(parseFloat(b.coords[0]))+" "+H(parseFloat(b.coords[1]))+" ";b.type===2?bt+=H(parseFloat(b.coords[2]))+" "+H(parseFloat(b.coords[3])):bt+=H(parseFloat(b.coords[2]))+" "+H(parseFloat(b.coords[3]))+" "+H(parseFloat(b.coords[4]))+" "+H(parseFloat(b.coords[5])),z(bt+="]"),b.matrix&&z("/Matrix ["+b.matrix.toString()+"]"),z("/Function "+X+" 0 R"),z("/Extend [true true]"),z(">>"),z("endobj")},hc=function(b,N){var X=Mi(),nt=zr();N.push({resourcesOid:X,objectOid:nt}),b.objectNumber=nt;var ht=[];ht.push({key:"Type",value:"/Pattern"}),ht.push({key:"PatternType",value:"1"}),ht.push({key:"PaintType",value:"1"}),ht.push({key:"TilingType",value:"1"}),ht.push({key:"BBox",value:"["+b.boundingBox.map(H).join(" ")+"]"}),ht.push({key:"XStep",value:H(b.xStep)}),ht.push({key:"YStep",value:H(b.yStep)}),ht.push({key:"Resources",value:X+" 0 R"}),b.matrix&&ht.push({key:"Matrix",value:"["+b.matrix.toString()+"]"}),Bn({data:b.stream,additionalKeyValues:ht,objectId:b.objectNumber}),z("endobj")},c0=function(b){for(var N in b.objectNumber=zr(),z("<<"),b)switch(N){case"opacity":z("/ca "+U(b[N]));break;case"stroke-opacity":z("/CA "+U(b[N]))}z(">>"),z("endobj")},Go=function(b){nn(b.resourcesOid,!0),z("<<"),z("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var N in z("/Font <<"),xe)xe.hasOwnProperty(N)&&(u===!1||u===!0&&d.hasOwnProperty(N))&&z("/"+N+" "+xe[N].objectNumber+" 0 R");z(">>")}(),function(){if(Object.keys(ne).length>0){for(var N in z("/Shading <<"),ne)ne.hasOwnProperty(N)&&ne[N]instanceof Fc&&ne[N].objectNumber>=0&&z("/"+N+" "+ne[N].objectNumber+" 0 R");Ze.publish("putShadingPatternDict"),z(">>")}}(),function(N){if(Object.keys(ne).length>0){for(var X in z("/Pattern <<"),ne)ne.hasOwnProperty(X)&&ne[X]instanceof f.TilingPattern&&ne[X].objectNumber>=0&&ne[X].objectNumber<N&&z("/"+X+" "+ne[X].objectNumber+" 0 R");Ze.publish("putTilingPatternDict"),z(">>")}}(b.objectOid),function(){if(Object.keys(Ae).length>0){var N;for(N in z("/ExtGState <<"),Ae)Ae.hasOwnProperty(N)&&Ae[N].objectNumber>=0&&z("/"+N+" "+Ae[N].objectNumber+" 0 R");Ze.publish("putGStateDict"),z(">>")}}(),function(){for(var N in z("/XObject <<"),bi)bi.hasOwnProperty(N)&&bi[N].objectNumber>=0&&z("/"+N+" "+bi[N].objectNumber+" 0 R");Ze.publish("putXobjectDict"),z(">>")}(),z(">>"),z("endobj")},qa=function(b){Ee[b.fontName]=Ee[b.fontName]||{},Ee[b.fontName][b.fontStyle]=b.id},Zt=function(b,N,X,nt,ht){var bt={id:"F"+(Object.keys(xe).length+1).toString(10),postScriptName:b,fontName:N,fontStyle:X,encoding:nt,isStandardFont:ht||!1,metadata:{}};return Ze.publish("addFont",{font:bt,instance:this}),xe[bt.id]=bt,qa(bt),bt.id},Z=f.__private__.pdfEscape=f.pdfEscape=function(b,N){return function(X,nt){var ht,bt,Ft,se,ee,Fe,Me,tr,Xi;if(Ft=(nt=nt||{}).sourceEncoding||"Unicode",ee=nt.outputEncoding,(nt.autoencode||ee)&&xe[Vt].metadata&&xe[Vt].metadata[Ft]&&xe[Vt].metadata[Ft].encoding&&(se=xe[Vt].metadata[Ft].encoding,!ee&&xe[Vt].encoding&&(ee=xe[Vt].encoding),!ee&&se.codePages&&(ee=se.codePages[0]),typeof ee=="string"&&(ee=se[ee]),ee)){for(Me=!1,Fe=[],ht=0,bt=X.length;ht<bt;ht++)(tr=ee[X.charCodeAt(ht)])?Fe.push(String.fromCharCode(tr)):Fe.push(X[ht]),Fe[ht].charCodeAt(0)>>8&&(Me=!0);X=Fe.join("")}for(ht=X.length;Me===void 0&&ht!==0;)X.charCodeAt(ht-1)>>8&&(Me=!0),ht--;if(!Me)return X;for(Fe=nt.noBOM?[]:[254,255],ht=0,bt=X.length;ht<bt;ht++){if((Xi=(tr=X.charCodeAt(ht))>>8)>>8)throw new Error("Character at position "+ht+" of string '"+X+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Fe.push(Xi),Fe.push(tr-(Xi<<8))}return String.fromCharCode.apply(void 0,Fe)}(b,N).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},xt=f.__private__.beginPage=function(b){St[++fe]=[],de[fe]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(b[0]),topRightY:Number(b[1])}},Ke(fe),$t(St[$])},Rt=function(b,N){var X,nt,ht;switch(e=N||e,typeof b=="string"&&(X=w(b.toLowerCase()),Array.isArray(X)&&(nt=X[0],ht=X[1])),Array.isArray(b)&&(nt=b[0]*ce,ht=b[1]*ce),isNaN(nt)&&(nt=i[0],ht=i[1]),(nt>14400||ht>14400)&&(Ir.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),nt=Math.min(14400,nt),ht=Math.min(14400,ht)),i=[nt,ht],e.substr(0,1)){case"l":ht>nt&&(i=[ht,nt]);break;case"p":nt>ht&&(i=[ht,nt])}xt(i),r4(be),z(g0),nw!==0&&z(nw+" J"),Xh!==0&&z(Xh+" j"),Ze.publish("addPage",{pageNumber:fe})},qe=function(b){b>0&&b<=fe&&(St.splice(b,1),de.splice(b,1),fe--,$>fe&&($=fe),this.setPage($))},Ke=function(b){b>0&&b<=fe&&($=b)},dr=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return St.length-1},Dn=function(b,N,X){var nt,ht=void 0;return X=X||{},b=b!==void 0?b:xe[Vt].fontName,N=N!==void 0?N:xe[Vt].fontStyle,nt=b.toLowerCase(),Ee[nt]!==void 0&&Ee[nt][N]!==void 0?ht=Ee[nt][N]:Ee[b]!==void 0&&Ee[b][N]!==void 0?ht=Ee[b][N]:X.disableWarning===!1&&Ir.warn("Unable to look up font label for font '"+b+"', '"+N+"'. Refer to getFontList() for available fonts."),ht||X.noFallback||(ht=Ee.times[N])==null&&(ht=Ee.times.normal),ht},ki=f.__private__.putInfo=function(){var b=zr(),N=function(nt){return nt};for(var X in h!==null&&(N=Rn.encryptor(b,0)),z("<<"),z("/Producer ("+Z(N("jsPDF "+le.version))+")"),Ce)Ce.hasOwnProperty(X)&&Ce[X]&&z("/"+X.substr(0,1).toUpperCase()+X.substr(1)+" ("+Z(N(Ce[X]))+")");z("/CreationDate ("+Z(N(st))+")"),z(">>"),z("endobj")},Cn=f.__private__.putCatalog=function(b){var N=(b=b||{}).rootDictionaryObjId||as;switch(zr(),z("<<"),z("/Type /Catalog"),z("/Pages "+N+" 0 R"),ie||(ie="fullwidth"),ie){case"fullwidth":z("/OpenAction [3 0 R /FitH null]");break;case"fullheight":z("/OpenAction [3 0 R /FitV null]");break;case"fullpage":z("/OpenAction [3 0 R /Fit]");break;case"original":z("/OpenAction [3 0 R /XYZ null null 1]");break;default:var X=""+ie;X.substr(X.length-1)==="%"&&(ie=parseInt(ie)/100),typeof ie=="number"&&z("/OpenAction [3 0 R /XYZ null null "+U(ie)+"]")}switch(Ne||(Ne="continuous"),Ne){case"continuous":z("/PageLayout /OneColumn");break;case"single":z("/PageLayout /SinglePage");break;case"two":case"twoleft":z("/PageLayout /TwoColumnLeft");break;case"tworight":z("/PageLayout /TwoColumnRight")}zt&&z("/PageMode /"+zt),Ze.publish("putCatalog"),z(">>"),z("endobj")},hd=f.__private__.putTrailer=function(){z("trailer"),z("<<"),z("/Size "+(et+1)),z("/Root "+et+" 0 R"),z("/Info "+(et-1)+" 0 R"),h!==null&&z("/Encrypt "+Rn.oid+" 0 R"),z("/ID [ <"+rt+"> <"+rt+"> ]"),z(">>")},$e=f.__private__.putHeader=function(){z("%PDF-"+p),z("%ºß¬à")},ud=f.__private__.putXRef=function(){var b="0000000000";z("xref"),z("0 "+(et+1)),z("0000000000 65535 f ");for(var N=1;N<=et;N++)typeof ot[N]=="function"?z((b+ot[N]()).slice(-10)+" 00000 n "):ot[N]!==void 0?z((b+ot[N]).slice(-10)+" 00000 n "):z("0000000000 00000 n ")},IA=f.__private__.buildDocument=function(){var b;et=0,wt=0,dt=[],ot=[],yt=[],as=Mi(),zs=Mi(),$t(dt),Ze.publish("buildDocument"),$e(),zi(),function(){Ze.publish("putAdditionalObjects");for(var X=0;X<yt.length;X++){var nt=yt[X];nn(nt.objId,!0),z(nt.content),z("endobj")}Ze.publish("postPutAdditionalObjects")}(),b=[],function(){for(var X in xe)xe.hasOwnProperty(X)&&(u===!1||u===!0&&d.hasOwnProperty(X))&&Vo(xe[X])}(),function(){var X;for(X in Ae)Ae.hasOwnProperty(X)&&c0(Ae[X])}(),function(){for(var X in bi)bi.hasOwnProperty(X)&&cc(bi[X])}(),function(X){var nt;for(nt in ne)ne.hasOwnProperty(nt)&&(ne[nt]instanceof Fc?$h(ne[nt]):ne[nt]instanceof fu&&hc(ne[nt],X))}(b),Ze.publish("putResources"),b.forEach(Go),Go({resourcesOid:zs,objectOid:Number.MAX_SAFE_INTEGER}),Ze.publish("postPutResources"),h!==null&&(Rn.oid=zr(),z("<<"),z("/Filter /Standard"),z("/V "+Rn.v),z("/R "+Rn.r),z("/U <"+Rn.toHexString(Rn.U)+">"),z("/O <"+Rn.toHexString(Rn.O)+">"),z("/P "+Rn.P),z(">>"),z("endobj")),ki(),Cn();var N=wt;return ud(),hd(),z("startxref"),z(""+N),z("%%EOF"),$t(St[$]),dt.join(`
|
|
85
|
-
`)},h0=f.__private__.getBlob=function(b){return new Blob([ve(b)],{type:"application/pdf"})},ew=function(b){for(;b.firstChild;)b.removeChild(b.firstChild)},UA=function(b){var N,X=b.document,nt=X.documentElement,ht=X.head,bt=X.body;return ht||(ht=X.createElement("head"),nt.appendChild(ht)),bt||(bt=X.createElement("body"),nt.appendChild(bt)),ew(ht),ew(bt),(N=X.createElement("style")).appendChild(X.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),ht.appendChild(N),{document:X,body:bt}},u0=f.output=f.__private__.output=(As=function(b,N){switch(typeof(N=N||{})=="string"?N={filename:N}:N.filename=N.filename||"generated.pdf",b){case void 0:return IA();case"save":f.save(N.filename);break;case"arraybuffer":return ve(IA());case"blob":return h0(IA());case"bloburi":case"bloburl":if(ye.URL!==void 0&&typeof ye.URL.createObjectURL=="function")return ye.URL&&ye.URL.createObjectURL(h0(IA()))||void 0;Ir.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var X="",nt=IA();try{X=Z_(nt)}catch{X=Z_(unescape(encodeURIComponent(nt)))}return"data:application/pdf;filename="+encodeURIComponent(N.filename)+";base64,"+X;case"pdfobjectnewwindow":if(Object.prototype.toString.call(ye)==="[object Window]"){var ht="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",bt=!N.pdfObjectUrl;bt||(ht=N.pdfObjectUrl);var Ft=ye.open();if(Ft!==null){var se=UA(Ft),ee=se.document.createElement("script"),Fe=this;ee.src=ht,bt&&(ee.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",ee.crossOrigin="anonymous"),ee.onload=function(){Ft.PDFObject.embed(Fe.output("dataurlstring"),N)},se.body.appendChild(ee)}return Ft}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(ye)==="[object Window]"){var Me=N.pdfJsUrl||"examples/PDF.js/web/viewer.html",tr=ye.open();if(tr!==null){var Xi=UA(tr),Nr=Xi.document.createElement("iframe"),_r=Me.indexOf("?")===-1?"?":"&";Fe=this,Nr.id="pdfViewer",Nr.width="500px",Nr.height="400px",Nr.src=Me+_r+"file=&downloadName="+encodeURIComponent(N.filename),Nr.onload=function(){tr.document.title=N.filename,Nr.contentWindow.PDFViewerApplication.open(Fe.output("bloburl"))},Xi.body.appendChild(Nr)}return tr}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(ye)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Xr=ye.open();if(Xr!==null){var oi=UA(Xr),li=oi.document.createElement("iframe");li.src=this.output("datauristring",N),oi.body.appendChild(li),Xr.document.title=N.filename}if(Xr||typeof safari>"u")return Xr;break;case"datauri":case"dataurl":return ye.document.location.href=this.output("datauristring",N);default:return null}},As.foo=function(){try{return As.apply(this,arguments)}catch(X){var b=X.stack||"";~b.indexOf(" at ")&&(b=b.split(" at ")[1]);var N="Error in function "+b.split(`
|
|
86
|
-
`)[0].split("<")[0]+": "+X.message;if(!ye.console)throw new Error(N);ye.console.error(N,X),ye.alert&&alert(N)}},As.foo.bar=As,As.foo),uc=function(b){return Array.isArray(lc)===!0&&lc.indexOf(b)>-1};switch(r){case"pt":ce=1;break;case"mm":ce=72/25.4;break;case"cm":ce=72/2.54;break;case"in":ce=72;break;case"px":ce=uc("px_scaling")==1?.75:96/72;break;case"pc":case"em":ce=12;break;case"ex":ce=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ce=r}var Rn=null;mt(),At();var bB=f.__private__.getPageInfo=f.getPageInfo=function(b){if(isNaN(b)||b%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:de[b].objId,pageNumber:b,pageContext:de[b]}},zF=f.__private__.getPageInfoByObjId=function(b){if(isNaN(b)||b%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var N in de)if(de[N].objId===b)break;return bB(N)},XF=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:de[$].objId,pageNumber:$,pageContext:de[$]}};f.addPage=function(){return Rt.apply(this,arguments),this},f.setPage=function(){return Ke.apply(this,arguments),$t.call(this,St[$]),this},f.insertPage=function(b){return this.addPage(),this.movePage($,b),this},f.movePage=function(b,N){var X,nt;if(b>N){X=St[b],nt=de[b];for(var ht=b;ht>N;ht--)St[ht]=St[ht-1],de[ht]=de[ht-1];St[N]=X,de[N]=nt,this.setPage(N)}else if(b<N){X=St[b],nt=de[b];for(var bt=b;bt<N;bt++)St[bt]=St[bt+1],de[bt]=de[bt+1];St[N]=X,de[N]=nt,this.setPage(N)}return this},f.deletePage=function(){return qe.apply(this,arguments),this},f.__private__.text=f.text=function(b,N,X,nt,ht){var bt,Ft,se,ee,Fe,Me,tr,Xi,Nr,_r=(nt=nt||{}).scope||this;if(typeof b=="number"&&typeof N=="number"&&(typeof X=="string"||Array.isArray(X))){var Xr=X;X=N,N=b,b=Xr}if(arguments[3]instanceof Kt==0?(se=arguments[4],ee=arguments[5],Ar(tr=arguments[3])==="object"&&tr!==null||(typeof se=="string"&&(ee=se,se=null),typeof tr=="string"&&(ee=tr,tr=null),typeof tr=="number"&&(se=tr,tr=null),nt={flags:tr,angle:se,align:ee})):(Q("The transform parameter of text() with a Matrix value"),Nr=ht),isNaN(N)||isNaN(X)||b==null)throw new Error("Invalid arguments passed to jsPDF.text");if(b.length===0)return _r;var oi,li="",ls=typeof nt.lineHeightFactor=="number"?nt.lineHeightFactor:fd,mc=_r.internal.scaleFactor;function ow(Rr){return Rr=Rr.split(" ").join(Array(nt.TabLen||9).join(" ")),Z(Rr,tr)}function pd(Rr){for(var Hr,Oi=Rr.concat(),An=[],wc=Oi.length;wc--;)typeof(Hr=Oi.shift())=="string"?An.push(Hr):Array.isArray(Rr)&&(Hr.length===1||Hr[1]===void 0&&Hr[2]===void 0)?An.push(Hr[0]):An.push([Hr[0],Hr[1],Hr[2]]);return An}function md(Rr,Hr){var Oi;if(typeof Rr=="string")Oi=Hr(Rr)[0];else if(Array.isArray(Rr)){for(var An,wc,dw=Rr.concat(),F0=[],UB=dw.length;UB--;)typeof(An=dw.shift())=="string"?F0.push(Hr(An)[0]):Array.isArray(An)&&typeof An[0]=="string"&&(wc=Hr(An[0],An[1],An[2]),F0.push([wc[0],wc[1],wc[2]]));Oi=F0}return Oi}var qh=!1,vd=!0;if(typeof b=="string")qh=!0;else if(Array.isArray(b)){var w0=b.concat();Ft=[];for(var y0,cs=w0.length;cs--;)(typeof(y0=w0.shift())!="string"||Array.isArray(y0)&&typeof y0[0]!="string")&&(vd=!1);qh=vd}if(qh===!1)throw new Error('Type of text must be string or Array. "'+b+'" is not recognized.');typeof b=="string"&&(b=b.match(/[\r?\n]/)?b.split(/\r\n|\r|\n/g):[b]);var wd=Tt/_r.internal.scaleFactor,yd=wd*(ls-1);switch(nt.baseline){case"bottom":X-=yd;break;case"top":X+=wd-yd;break;case"hanging":X+=wd-2*yd;break;case"middle":X+=wd/2-yd}if((Me=nt.maxWidth||0)>0&&(typeof b=="string"?b=_r.splitTextToSize(b,Me):Object.prototype.toString.call(b)==="[object Array]"&&(b=b.reduce(function(Rr,Hr){return Rr.concat(_r.splitTextToSize(Hr,Me))},[]))),bt={text:b,x:N,y:X,options:nt,mutex:{pdfEscape:Z,activeFontKey:Vt,fonts:xe,activeFontSize:Tt}},Ze.publish("preProcessText",bt),b=bt.text,se=(nt=bt.options).angle,Nr instanceof Kt==0&&se&&typeof se=="number"){se*=Math.PI/180,nt.rotationDirection===0&&(se=-se),S===E&&(se=-se);var lw=Math.cos(se),Wo=Math.sin(se);Nr=new Kt(lw,Wo,-Wo,lw,0,0)}else se&&se instanceof Kt&&(Nr=se);S!==E||Nr||(Nr=Xa),(Fe=nt.charSpace||p0)!==void 0&&(li+=H(j(Fe))+` Tc
|
|
87
|
-
`,this.setCharSpace(this.getCharSpace()||0)),(Xi=nt.horizontalScale)!==void 0&&(li+=H(100*Xi)+` Tz
|
|
88
|
-
`),nt.lang;var Is=-1,_B=nt.renderingMode!==void 0?nt.renderingMode:nt.stroke,b0=_r.internal.getCurrentPageInfo().pageContext;switch(_B){case 0:case!1:case"fill":Is=0;break;case 1:case!0:case"stroke":Is=1;break;case 2:case"fillThenStroke":Is=2;break;case 3:case"invisible":Is=3;break;case 4:case"fillAndAddForClipping":Is=4;break;case 5:case"strokeAndAddPathForClipping":Is=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Is=6;break;case 7:case"addToPathForClipping":Is=7}var IB=b0.usedRenderingMode!==void 0?b0.usedRenderingMode:-1;Is!==-1?li+=Is+` Tr
|
|
89
|
-
`:IB!==-1&&(li+=`0 Tr
|
|
90
|
-
`),Is!==-1&&(b0.usedRenderingMode=Is),ee=nt.align||"left";var ha,bd=Tt*ls,cw=_r.internal.pageSize.getWidth(),B0=xe[Vt];Fe=nt.charSpace||p0,Me=nt.maxWidth||0,tr=Object.assign({autoencode:!0,noBOM:!0},nt.flags);var Bd=[],hw=function(Rr){return _r.getStringUnitWidth(Rr,{font:B0,charSpace:Fe,fontSize:Tt,doKerning:!1})*Tt/mc};if(Object.prototype.toString.call(b)==="[object Array]"){var Us;Ft=pd(b),ee!=="left"&&(ha=Ft.map(hw));var qs,C0=0;if(ee==="right"){N-=ha[0],b=[],cs=Ft.length;for(var Yh=0;Yh<cs;Yh++)Yh===0?(qs=fc(N),Us=dc(X)):(qs=j(C0-ha[Yh]),Us=-bd),b.push([Ft[Yh],qs,Us]),C0=ha[Yh]}else if(ee==="center"){N-=ha[0]/2,b=[],cs=Ft.length;for(var Jh=0;Jh<cs;Jh++)Jh===0?(qs=fc(N),Us=dc(X)):(qs=j((C0-ha[Jh])/2),Us=-bd),b.push([Ft[Jh],qs,Us]),C0=ha[Jh]}else if(ee==="left"){b=[],cs=Ft.length;for(var x0=0;x0<cs;x0++)b.push(Ft[x0])}else if(ee==="justify"&&B0.encoding==="Identity-H"){b=[],cs=Ft.length,Me=Me!==0?Me:cw;for(var Cd=0,qi=0;qi<cs;qi++)if(Us=qi===0?dc(X):-bd,qs=qi===0?fc(N):Cd,qi<cs-1){var c4=j((Me-ha[qi])/(Ft[qi].split(" ").length-1)),zo=Ft[qi].split(" ");b.push([zo[0]+" ",qs,Us]),Cd=0;for(var Ya=1;Ya<zo.length;Ya++){var xd=(hw(zo[Ya-1]+" "+zo[Ya])-hw(zo[Ya]))*mc+c4;Ya==zo.length-1?b.push([zo[Ya],xd,0]):b.push([zo[Ya]+" ",xd,0]),Cd-=xd}}else b.push([Ft[qi],qs,Us]);b.push(["",Cd,0])}else{if(ee!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(b=[],cs=Ft.length,Me=Me!==0?Me:cw,qi=0;qi<cs;qi++){Us=qi===0?dc(X):-bd,qs=qi===0?fc(N):0;var uw=Ft[qi].split(" ").length-1,fw=uw>0?(Me-ha[qi])/uw:0;qi<cs-1?Bd.push(H(j(fw))):Bd.push(0),b.push([Ft[qi],qs,Us])}}}(typeof nt.R2L=="boolean"?nt.R2L:qt)===!0&&(b=md(b,function(Rr,Hr,Oi){return[Rr.split("").reverse().join(""),Hr,Oi]})),bt={text:b,x:N,y:X,options:nt,mutex:{pdfEscape:Z,activeFontKey:Vt,fonts:xe,activeFontSize:Tt}},Ze.publish("postProcessText",bt),b=bt.text,oi=bt.mutex.isHex||!1;var E0=xe[Vt].encoding;E0!=="WinAnsiEncoding"&&E0!=="StandardEncoding"||(b=md(b,function(Rr,Hr,Oi){return[ow(Rr),Hr,Oi]})),Ft=pd(b),b=[];for(var Ed,Sd,Zh,vc=Array.isArray(Ft[0])?1:0,tu="",S0=function(Rr,Hr,Oi){var An="";return Oi instanceof Kt?(Oi=typeof nt.angle=="number"?ss(Oi,new Kt(1,0,0,1,Rr,Hr)):ss(new Kt(1,0,0,1,Rr,Hr),Oi),S===E&&(Oi=ss(new Kt(1,0,0,-1,0,0),Oi)),An=Oi.join(" ")+` Tm
|
|
91
|
-
`):An=H(Rr)+" "+H(Hr)+` Td
|
|
92
|
-
`,An},hs=0;hs<Ft.length;hs++){switch(tu="",vc){case 1:Zh=(oi?"<":"(")+Ft[hs][0]+(oi?">":")"),Ed=parseFloat(Ft[hs][1]),Sd=parseFloat(Ft[hs][2]);break;case 0:Zh=(oi?"<":"(")+Ft[hs]+(oi?">":")"),Ed=fc(N),Sd=dc(X)}Bd!==void 0&&Bd[hs]!==void 0&&(tu=Bd[hs]+` Tw
|
|
93
|
-
`),hs===0?b.push(tu+S0(Ed,Sd,Nr)+Zh):vc===0?b.push(tu+Zh):vc===1&&b.push(tu+S0(Ed,Sd,Nr)+Zh)}b=vc===0?b.join(` Tj
|
|
94
|
-
T* `):b.join(` Tj
|
|
95
|
-
`),b+=` Tj
|
|
96
|
-
`;var Xo=`BT
|
|
97
|
-
/`;return Xo+=Vt+" "+Tt+` Tf
|
|
98
|
-
`,Xo+=H(Tt*ls)+` TL
|
|
99
|
-
`,Xo+=$o+`
|
|
100
|
-
`,Xo+=li,Xo+=b,z(Xo+="ET"),d[Vt]=!0,_r};var qF=f.__private__.clip=f.clip=function(b){return z(b==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return qF("evenodd")},f.__private__.discardPath=f.discardPath=function(){return z("n"),this};var jo=f.__private__.isValidStyle=function(b){var N=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(b)!==-1&&(N=!0),N};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(b){return jo(b)&&(l=b),this};var BB=f.__private__.getStyle=f.getStyle=function(b){var N=l;switch(b){case"D":case"S":N="S";break;case"F":N="f";break;case"FD":case"DF":N="B";break;case"f":case"f*":case"B":case"B*":N=b}return N},f0=f.close=function(){return z("h"),this};f.stroke=function(){return z("S"),this},f.fill=function(b){return d0("f",b),this},f.fillEvenOdd=function(b){return d0("f*",b),this},f.fillStroke=function(b){return d0("B",b),this},f.fillStrokeEvenOdd=function(b){return d0("B*",b),this};var d0=function(b,N){Ar(N)==="object"?JF(N,b):z(b)},rw=function(b){b===null||S===E&&b===void 0||(b=BB(b),z(b))};function YF(b,N,X,nt,ht){var bt=new fu(N||this.boundingBox,X||this.xStep,nt||this.yStep,this.gState,ht||this.matrix);bt.stream=this.stream;var Ft=b+"$$"+this.cloneIndex+++"$$";return _s(Ft,bt),bt}var JF=function(b,N){var X=He[b.key],nt=ne[X];if(nt instanceof Fc)z("q"),z(ZF(N)),nt.gState&&f.setGState(nt.gState),z(b.matrix.toString()+" cm"),z("/"+X+" sh"),z("Q");else if(nt instanceof fu){var ht=new Kt(1,0,0,-1,0,gd());b.matrix&&(ht=ht.multiply(b.matrix||Xa),X=YF.call(nt,b.key,b.boundingBox,b.xStep,b.yStep,ht).id),z("q"),z("/Pattern cs"),z("/"+X+" scn"),nt.gState&&f.setGState(nt.gState),z(N),z("Q")}},ZF=function(b){switch(b){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"}},Wh=f.moveTo=function(b,N){return z(H(j(b))+" "+H(V(N))+" m"),this},CB=f.lineTo=function(b,N){return z(H(j(b))+" "+H(V(N))+" l"),this},zh=f.curveTo=function(b,N,X,nt,ht,bt){return z([H(j(b)),H(V(N)),H(j(X)),H(V(nt)),H(j(ht)),H(V(bt)),"c"].join(" ")),this};f.__private__.line=f.line=function(b,N,X,nt,ht){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||!jo(ht))throw new Error("Invalid arguments passed to jsPDF.line");return S===B?this.lines([[X-b,nt-N]],b,N,[1,1],ht||"S"):this.lines([[X-b,nt-N]],b,N,[1,1]).stroke()},f.__private__.lines=f.lines=function(b,N,X,nt,ht,bt){var Ft,se,ee,Fe,Me,tr,Xi,Nr,_r,Xr,oi,li;if(typeof b=="number"&&(li=X,X=N,N=b,b=li),nt=nt||[1,1],bt=bt||!1,isNaN(N)||isNaN(X)||!Array.isArray(b)||!Array.isArray(nt)||!jo(ht)||typeof bt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Wh(N,X),Ft=nt[0],se=nt[1],Fe=b.length,Xr=N,oi=X,ee=0;ee<Fe;ee++)(Me=b[ee]).length===2?(Xr=Me[0]*Ft+Xr,oi=Me[1]*se+oi,CB(Xr,oi)):(tr=Me[0]*Ft+Xr,Xi=Me[1]*se+oi,Nr=Me[2]*Ft+Xr,_r=Me[3]*se+oi,Xr=Me[4]*Ft+Xr,oi=Me[5]*se+oi,zh(tr,Xi,Nr,_r,Xr,oi));return bt&&f0(),rw(ht),this},f.path=function(b){for(var N=0;N<b.length;N++){var X=b[N],nt=X.c;switch(X.op){case"m":Wh(nt[0],nt[1]);break;case"l":CB(nt[0],nt[1]);break;case"c":zh.apply(this,nt);break;case"h":f0()}}return this},f.__private__.rect=f.rect=function(b,N,X,nt,ht){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||!jo(ht))throw new Error("Invalid arguments passed to jsPDF.rect");return S===B&&(nt=-nt),z([H(j(b)),H(V(N)),H(j(X)),H(j(nt)),"re"].join(" ")),rw(ht),this},f.__private__.triangle=f.triangle=function(b,N,X,nt,ht,bt,Ft){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||isNaN(ht)||isNaN(bt)||!jo(Ft))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[X-b,nt-N],[ht-X,bt-nt],[b-ht,N-bt]],b,N,[1,1],Ft,!0),this},f.__private__.roundedRect=f.roundedRect=function(b,N,X,nt,ht,bt,Ft){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||isNaN(ht)||isNaN(bt)||!jo(Ft))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var se=4/3*(Math.SQRT2-1);return ht=Math.min(ht,.5*X),bt=Math.min(bt,.5*nt),this.lines([[X-2*ht,0],[ht*se,0,ht,bt-bt*se,ht,bt],[0,nt-2*bt],[0,bt*se,-ht*se,bt,-ht,bt],[2*ht-X,0],[-ht*se,0,-ht,-bt*se,-ht,-bt],[0,2*bt-nt],[0,-bt*se,ht*se,-bt,ht,-bt]],b+ht,N,[1,1],Ft,!0),this},f.__private__.ellipse=f.ellipse=function(b,N,X,nt,ht){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||!jo(ht))throw new Error("Invalid arguments passed to jsPDF.ellipse");var bt=4/3*(Math.SQRT2-1)*X,Ft=4/3*(Math.SQRT2-1)*nt;return Wh(b+X,N),zh(b+X,N-Ft,b+bt,N-nt,b,N-nt),zh(b-bt,N-nt,b-X,N-Ft,b-X,N),zh(b-X,N+Ft,b-bt,N+nt,b,N+nt),zh(b+bt,N+nt,b+X,N+Ft,b+X,N),rw(ht),this},f.__private__.circle=f.circle=function(b,N,X,nt){if(isNaN(b)||isNaN(N)||isNaN(X)||!jo(nt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(b,N,X,X,nt)},f.setFont=function(b,N,X){return X&&(N=k(N,X)),Vt=Dn(b,N,{disableWarning:!1}),this};var t4=f.__private__.getFont=f.getFont=function(){return xe[Dn.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var b,N,X={};for(b in Ee)if(Ee.hasOwnProperty(b))for(N in X[b]=[],Ee[b])Ee[b].hasOwnProperty(N)&&X[b].push(N);return X},f.addFont=function(b,N,X,nt,ht){var bt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&bt.indexOf(arguments[3])!==-1?ht=arguments[3]:arguments[3]&&bt.indexOf(arguments[3])==-1&&(X=k(X,nt)),Zt.call(this,b,N,X,ht=ht||"Identity-H")};var fd,be=n.lineWidth||.200025,e4=f.__private__.getLineWidth=f.getLineWidth=function(){return be},r4=f.__private__.setLineWidth=f.setLineWidth=function(b){return be=b,z(H(j(b))+" w"),this};f.__private__.setLineDash=le.API.setLineDash=le.API.setLineDashPattern=function(b,N){if(b=b||[],N=N||0,isNaN(N)||!Array.isArray(b))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return b=b.map(function(X){return H(j(X))}).join(" "),N=H(j(N)),z("["+b+"] "+N+" d"),this};var i4=f.__private__.getLineHeight=f.getLineHeight=function(){return Tt*fd};f.__private__.getLineHeight=f.getLineHeight=function(){return Tt*fd};var n4=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(b){return typeof(b=b||1.15)=="number"&&(fd=b),this},s4=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return fd};n4(n.lineHeight);var fc=f.__private__.getHorizontalCoordinate=function(b){return j(b)},dc=f.__private__.getVerticalCoordinate=function(b){return S===E?b:de[$].mediaBox.topRightY-de[$].mediaBox.bottomLeftY-j(b)},A4=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(b){return H(fc(b))},a4=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(b){return H(dc(b))},g0=n.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return _A(g0)},f.__private__.setStrokeColor=f.setDrawColor=function(b,N,X,nt){return g0=Xs({ch1:b,ch2:N,ch3:X,ch4:nt,pdfColorType:"draw",precision:2}),z(g0),this};var iw=n.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return _A(iw)},f.__private__.setFillColor=f.setFillColor=function(b,N,X,nt){return iw=Xs({ch1:b,ch2:N,ch3:X,ch4:nt,pdfColorType:"fill",precision:2}),z(iw),this};var $o=n.textColor||"0 g",o4=f.__private__.getTextColor=f.getTextColor=function(){return _A($o)};f.__private__.setTextColor=f.setTextColor=function(b,N,X,nt){return $o=Xs({ch1:b,ch2:N,ch3:X,ch4:nt,pdfColorType:"text",precision:3}),this};var p0=n.charSpace,l4=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(p0||0)};f.__private__.setCharSpace=f.setCharSpace=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return p0=b,this};var nw=0;f.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},f.__private__.setLineCap=f.setLineCap=function(b){var N=f.CapJoinStyles[b];if(N===void 0)throw new Error("Line cap style of '"+b+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return nw=N,z(N+" J"),this};var Xh=0;f.__private__.setLineJoin=f.setLineJoin=function(b){var N=f.CapJoinStyles[b];if(N===void 0)throw new Error("Line join style of '"+b+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Xh=N,z(N+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(b){if(b=b||0,isNaN(b))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return z(H(j(b))+" M"),this},f.GState=uu,f.setGState=function(b){(b=typeof b=="string"?Ae[ge[b]]:sw(null,b)).equals(ar)||(z("/"+b.id+" gs"),ar=b)};var sw=function(b,N){if(!b||!ge[b]){var X=!1;for(var nt in Ae)if(Ae.hasOwnProperty(nt)&&Ae[nt].equals(N)){X=!0;break}if(X)N=Ae[nt];else{var ht="GS"+(Object.keys(Ae).length+1).toString(10);Ae[ht]=N,N.id=ht}return b&&(ge[b]=N.id),Ze.publish("addGState",N),N}};f.addGState=function(b,N){return sw(b,N),this},f.saveGraphicsState=function(){return z("q"),nr.push({key:Vt,size:Tt,color:$o}),this},f.restoreGraphicsState=function(){z("Q");var b=nr.pop();return Vt=b.key,Tt=b.size,$o=b.color,ar=null,this},f.setCurrentTransformationMatrix=function(b){return z(b.toString()+" cm"),this},f.comment=function(b){return z("#"+b),this};var dd=function(b,N){var X=b||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return X},set:function(bt){isNaN(bt)||(X=parseFloat(bt))}});var nt=N||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return nt},set:function(bt){isNaN(bt)||(nt=parseFloat(bt))}});var ht="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return ht},set:function(bt){ht=bt.toString()}}),this},Aw=function(b,N,X,nt){dd.call(this,b,N),this.type="rect";var ht=X||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return ht},set:function(Ft){isNaN(Ft)||(ht=parseFloat(Ft))}});var bt=nt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return bt},set:function(Ft){isNaN(Ft)||(bt=parseFloat(Ft))}}),this},m0=function(){this.page=fe,this.currentPage=$,this.pages=St.slice(0),this.pagesContext=de.slice(0),this.x=Xt,this.y=vr,this.matrix=je,this.width=xB($),this.height=pc($),this.outputDestination=Pt,this.id="",this.objectNumber=-1};m0.prototype.restore=function(){fe=this.page,$=this.currentPage,de=this.pagesContext,St=this.pages,Xt=this.x,vr=this.y,je=this.matrix,gc($,this.width),EB($,this.height),Pt=this.outputDestination};var aw=function(b,N,X,nt,ht){la.push(new m0),fe=$=0,St=[],Xt=b,vr=N,je=ht,xt([X,nt])};for(var v0 in f.beginFormObject=function(b,N,X,nt,ht){return aw(b,N,X,nt,ht),this},f.endFormObject=function(b){return function(N){if(za[N])la.pop().restore();else{var X=new m0,nt="Xo"+(Object.keys(bi).length+1).toString(10);X.id=nt,za[N]=nt,bi[nt]=X,Ze.publish("addFormObject",X),la.pop().restore()}}(b),this},f.doFormObject=function(b,N){var X=bi[za[b]];return z("q"),z(N.toString()+" cm"),z("/"+X.id+" Do"),z("Q"),this},f.getFormObject=function(b){var N=bi[za[b]];return{x:N.x,y:N.y,width:N.width,height:N.height,matrix:N.matrix}},f.save=function(b,N){return b=b||"generated.pdf",(N=N||{}).returnPromise=N.returnPromise||!1,N.returnPromise===!1?(hu(h0(IA()),b),typeof hu.unload=="function"&&ye.setTimeout&&setTimeout(hu.unload,911),this):new Promise(function(X,nt){try{var ht=hu(h0(IA()),b);typeof hu.unload=="function"&&ye.setTimeout&&setTimeout(hu.unload,911),X(ht)}catch(bt){nt(bt.message)}})},le.API)le.API.hasOwnProperty(v0)&&(v0==="events"&&le.API.events.length?function(b,N){var X,nt,ht;for(ht=N.length-1;ht!==-1;ht--)X=N[ht][0],nt=N[ht][1],b.subscribe.apply(b,[X].concat(typeof nt=="function"?[nt]:nt))}(Ze,le.API.events):f[v0]=le.API[v0]);function xB(b){return de[b].mediaBox.topRightX-de[b].mediaBox.bottomLeftX}function gc(b,N){de[b].mediaBox.topRightX=N+de[b].mediaBox.bottomLeftX}function pc(b){return de[b].mediaBox.topRightY-de[b].mediaBox.bottomLeftY}function EB(b,N){de[b].mediaBox.topRightY=N+de[b].mediaBox.bottomLeftY}var SB=f.getPageWidth=function(b){return xB(b=b||$)/ce},FB=f.setPageWidth=function(b,N){gc(b,N*ce)},gd=f.getPageHeight=function(b){return pc(b=b||$)/ce},TB=f.setPageHeight=function(b,N){EB(b,N*ce)};return f.internal={pdfEscape:Z,getStyle:BB,getFont:t4,getFontSize:kt,getCharSpace:l4,getTextColor:o4,getLineHeight:i4,getLineHeightFactor:s4,getLineWidth:e4,write:Nt,getHorizontalCoordinate:fc,getVerticalCoordinate:dc,getCoordinateString:A4,getVerticalCoordinateString:a4,collections:{},newObject:zr,newAdditionalObject:sn,newObjectDeferred:Mi,newObjectDeferredBegin:nn,getFilters:os,putStream:Bn,events:Ze,scaleFactor:ce,pageSize:{getWidth:function(){return SB($)},setWidth:function(b){FB($,b)},getHeight:function(){return gd($)},setHeight:function(b){TB($,b)}},encryptionOptions:h,encryption:Rn,getEncryptor:function(b){return h!==null?Rn.encryptor(b,0):function(N){return N}},output:u0,getNumberOfPages:dr,get pages(){return St},out:z,f2:U,f3:D,getPageInfo:bB,getPageInfoByObjId:zF,getCurrentPageInfo:XF,getPDFVersion:m,Point:dd,Rectangle:Aw,Matrix:Kt,hasHotfix:uc},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return SB($)},set:function(b){FB($,b)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return gd($)},set:function(b){TB($,b)},enumerable:!0,configurable:!0}),(function(b){for(var N=0,X=re.length;N<X;N++){var nt=Zt.call(this,b[N][0],b[N][1],b[N][2],re[N][3],!0);u===!1&&(d[nt]=!0);var ht=b[N][0].split("-");qa({id:nt,fontName:ht[0],fontStyle:ht[1]||""})}Ze.publish("addFonts",{fonts:xe,dictionary:Ee})}).call(f,re),Vt="F1",Rt(i,e),Ze.publish("initialized"),f}Qd.prototype.lsbFirstWord=function(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)},Qd.prototype.toHexString=function(n){return n.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Qd.prototype.hexToBytes=function(n){for(var t=[],e=0;e<n.length;e+=2)t.push(String.fromCharCode(parseInt(n.substr(e,2),16)));return t.join("")},Qd.prototype.processOwnerPassword=function(n,t){return n5(i5(t).substr(0,5),n)},Qd.prototype.encryptor=function(n,t){var e=i5(this.encryptionKey+String.fromCharCode(255&n,n>>8&255,n>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return n5(e,r)}},uu.prototype.equals=function(n){var t,e="id,objectNumber,equals";if(!n||Ar(n)!==Ar(this))return!1;var r=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!n.hasOwnProperty(t)||this[t]!==n[t])return!1;r++}for(t in n)n.hasOwnProperty(t)&&e.indexOf(t)<0&&r--;return r===0},le.API={events:[]},le.version="4.2.1";var hi=le.API,s5=1,du=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Pd=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},gu=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},Te=function(n){return n.toFixed(2)},Tc=function(n){return n.toFixed(5)};hi.__acroform__={};var Ms=function(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n},sI=function(n){return n*s5},io=function(n){var t=new aI,e=Jt.internal.getHeight(n)||0,r=Jt.internal.getWidth(n)||0;return t.BBox=[0,0,Number(Te(r)),Number(Te(e))],t},n8=hi.__acroform__.setBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<<t},s8=hi.__acroform__.clearBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return n&~(1<<t)},A8=hi.__acroform__.getBit=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return n&1<<t?1:0},xi=hi.__acroform__.getBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return A8(n,t-1)},Ei=hi.__acroform__.setBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return n8(n,t-1)},Si=hi.__acroform__.clearBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return s8(n,t-1)},a8=hi.__acroform__.calculateCoordinates=function(n,t){var e=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=n[0],s=n[1],A=n[2],a=n[3],o={};return o.lowerLeft_X=e(i)||0,o.lowerLeft_Y=r(s+a)||0,o.upperRight_X=e(i+A)||0,o.upperRight_Y=r(s)||0,[Number(Te(o.lowerLeft_X)),Number(Te(o.lowerLeft_Y)),Number(Te(o.upperRight_X)),Number(Te(o.upperRight_Y))]},o8=function(n){if(n.appearanceStreamContent)return n.appearanceStreamContent;if(n.V||n.DV){var t=[],e=n._V||n.DV,r=A5(n,e),i=n.scope.internal.getFont(n.fontName,n.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(n.scope.__private__.encodeColorString(n.color)),t.push("/"+i+" "+Te(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var s=io(n);return s.scope=n.scope,s.stream=t.join(`
|
|
101
|
-
`),s}},A5=function(n,t){var e=n.fontSize===0?n.maxFontSize:n.fontSize,r={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=n.multiline?i.map(function(U){return U.split(`
|
|
102
|
-
`)}):i.map(function(U){return[U]});var s=e,A=Jt.internal.getHeight(n)||0;A=A<0?-A:A;var a=Jt.internal.getWidth(n)||0;a=a<0?-a:a;var o=function(U,D,j){if(U+1<i.length){var V=D+" "+i[U+1][0];return t2(V,n,j).width<=a-4}return!1};s++;t:for(;s>0;){t="",s--;var l,h,u=t2("3",n,s).height,d=n.multiline?A-s:(A-u)/2,f=d+=2,p=0,m=0,y=0;if(s<=0){t=`(...) Tj
|
|
103
|
-
`,t+="% Width of Text: "+t2(t,n,s=12).width+", FieldWidth:"+a+`
|
|
104
|
-
`;break}for(var w="",B=0,E=0;E<i.length;E++)if(i.hasOwnProperty(E)){var S=!1;if(i[E].length!==1&&y!==i[E].length-1){if((u+2)*(B+2)+2>A)continue t;w+=i[E][y],S=!0,m=E,E--}else{w=(w+=i[E][y]+" ").substr(w.length-1)==" "?w.substr(0,w.length-1):w;var _=parseInt(E),L=o(_,w,s),k=E>=i.length-1;if(L&&!k){w+=" ",y=0;continue}if(L||k){if(k)m=_;else if(n.multiline&&(u+2)*(B+2)+2>A)continue t}else{if(!n.multiline||(u+2)*(B+2)+2>A)continue t;m=_}}for(var H="",Q=p;Q<=m;Q++){var W=i[Q];if(n.multiline){if(Q===m){H+=W[y]+" ",y=(y+1)%W.length;continue}if(Q===p){H+=W[W.length-1]+" ";continue}}H+=W[0]+" "}switch(H=H.substr(H.length-1)==" "?H.substr(0,H.length-1):H,h=t2(H,n,s).width,n.textAlign){case"right":l=a-h-2;break;case"center":l=(a-h)/2;break;default:l=2}t+=Te(l)+" "+Te(f)+` Td
|
|
105
|
-
`,t+="("+du(H)+`) Tj
|
|
106
|
-
`,t+=-Te(l)+` 0 Td
|
|
107
|
-
`,f=-(s+2),h=0,p=S?m:m+1,B++,w=""}break}return r.text=t,r.fontSize=s,r},t2=function(n,t,e){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(n,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:i}},l8={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},c8=function(n,t){var e={type:"reference",object:n};t.internal.getPageInfo(n.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&t.internal.getPageInfo(n.page).pageContext.annotations.push(e)},h8=function(n,t){if(t.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(ga.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(l8)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");s5=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new oI,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];s.objId=void 0,s.hasAnnotation&&c8(s,e)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(e){(function(r,i){var s=!r;for(var A in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(A)){var a=r[A],o=[],l=a.Rect;if(a.Rect&&(a.Rect=a8(a.Rect,i)),i.internal.newObjectDeferredBegin(a.objId,!0),a.DA=Jt.createDefaultAppearanceStream(a),Ar(a)==="object"&&typeof a.getKeyValueListForStream=="function"&&(o=a.getKeyValueListForStream()),a.Rect=l,a.hasAppearanceStream&&!a.appearanceStreamContent){var h=o8(a);o.push({key:"AP",value:"<</N "+h+">>"}),i.internal.acroformPlugin.xForms.push(h)}if(a.appearanceStreamContent){var u="";for(var d in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(d)){var f=a.appearanceStreamContent[d];if(u+="/"+d+" ",u+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var A in f)if(f.hasOwnProperty(A)){var p=f[A];typeof p=="function"&&(p=p.call(i,a)),u+="/"+A+" "+p+" ",i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p)}}else typeof(p=f)=="function"&&(p=p.call(i,a)),u+="/"+A+" "+p,i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p);u+=">>"}o.push({key:"AP",value:`<<
|
|
108
|
-
`+u+">>"})}i.internal.putStream({additionalKeyValues:o,objectId:a.objId}),i.internal.out("endobj")}s&&function(m,y){for(var w in m)if(m.hasOwnProperty(w)){var B=w,E=m[w];y.internal.newObjectDeferredBegin(E.objId,!0),Ar(E)==="object"&&typeof E.putStream=="function"&&E.putStream(),delete m[B]}}(i.internal.acroformPlugin.xForms,i)})(e,n)}),n.internal.acroformPlugin.isInitialized=!0}},AI=hi.__acroform__.arrayToPdfArray=function(n,t,e){var r=function(A){return A};if(Array.isArray(n)){for(var i="[",s=0;s<n.length;s++)switch(s!==0&&(i+=" "),Ar(n[s])){case"boolean":case"number":case"object":i+=n[s].toString();break;case"string":n[s].substr(0,1)==="/"?i+="/"+gu(n[s].substr(1)):(t!==void 0&&e&&(r=e.internal.getEncryptor(t)),i+="("+du(r(n[s].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},a5=function(n,t,e){var r=function(i){return i};return t!==void 0&&e&&(r=e.internal.getEncryptor(t)),(n=n||"").toString(),"("+du(r(n))+")"},no=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(n){this._objId=n}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};no.prototype.toString=function(){return this.objId+" 0 R"},no.prototype.putStream=function(){var n=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:n,objectId:this.objId}),this.scope.internal.out("endobj")},no.prototype.getKeyValueListForStream=function(){var n=[],t=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var e in t)if(Object.getOwnPropertyDescriptor(this,t[e]).configurable===!1){var r=t[e],i=this[r];i&&(Array.isArray(i)?n.push({key:r,value:AI(i,this.objId,this.scope)}):i instanceof no?(i.scope=this.scope,n.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&n.push({key:r,value:i}))}return n};var aI=function(){no.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 n,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){n=e.trim()},get:function(){return n||null}})};Ms(aI,no);var oI=function(){no.call(this);var n,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(n){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+du(e(n))+")"}},set:function(e){n=e}})};Ms(oI,no);var ga=function n(){no.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute F supplied.');t=w}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!xi(t,3)},set:function(w){w?this.F=Ei(t,3):this.F=Si(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute Ff supplied.');e=w}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(w){r=w!==void 0?w:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(w){r[0]=w}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(w){r[1]=w}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(w){r[2]=w}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(w){r[3]=w}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(w){switch(w){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=w;break;default:throw new Error('Invalid value "'+w+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof i2)return;s="FieldObject"+n.FieldNum++}var w=function(B){return B};return this.scope&&(w=this.scope.internal.getEncryptor(this.objId)),"("+du(w(s))+")"},set:function(w){s=w.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(w){s=w}});var A="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return A},set:function(w){A=w}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(w){a=w}});var o=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return o},set:function(w){o=w}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/s5:l},set:function(w){l=w}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(w){h=w}});var u="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!u||this instanceof i2||this instanceof pu))return a5(u,this.objId,this.scope)},set:function(w){w=w.toString(),u=w}});var d=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof cn==0?a5(d,this.objId,this.scope):d},set:function(w){w=w.toString(),d=this instanceof cn==0?w.substr(0,1)==="("?Pd(w.substr(1,w.length-2)):Pd(w):w}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof cn==1?Pd(d.substr(1,d.length-1)):d},set:function(w){w=w.toString(),d=this instanceof cn==1?"/"+gu(w):w}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(w){this.V=w}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof cn==0?a5(f,this.objId,this.scope):f},set:function(w){w=w.toString(),f=this instanceof cn==0?w.substr(0,1)==="("?Pd(w.substr(1,w.length-2)):Pd(w):w}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof cn==1?Pd(f.substr(1,f.length-1)):f},set:function(w){w=w.toString(),f=this instanceof cn==1?"/"+gu(w):w}}),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 p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(w){w=!!w,m=w}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(w){p=w}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,1)},set:function(w){w?this.Ff=Ei(this.Ff,1):this.Ff=Si(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,2)},set:function(w){w?this.Ff=Ei(this.Ff,2):this.Ff=Si(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,3)},set:function(w){w?this.Ff=Ei(this.Ff,3):this.Ff=Si(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(w){if([0,1,2].indexOf(w)===-1)throw new Error('Invalid value "'+w+'" for attribute Q supplied.');y=w}}),Object.defineProperty(this,"textAlign",{get:function(){var w;switch(y){case 0:default:w="left";break;case 1:w="center";break;case 2:w="right"}return w},configurable:!0,enumerable:!0,set:function(w){switch(w){case"right":case 2:y=2;break;case"center":case 1:y=1;break;default:y=0}}})};Ms(ga,no);var Md=function(){ga.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){n=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return AI(t,this.objId,this.scope)},set:function(e){var r,i;i=[],typeof(r=e)=="string"&&(i=function(s,A,a){a||(a=1);for(var o,l=[];o=A.exec(s);)l.push(o[a]);return l}(r,/\((.*?)\)/g)),t=i}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,18)},set:function(e){e?this.Ff=Ei(this.Ff,18):this.Ff=Si(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=Ei(this.Ff,19):this.Ff=Si(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,20)},set:function(e){e?(this.Ff=Ei(this.Ff,20),t.sort()):this.Ff=Si(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,22)},set:function(e){e?this.Ff=Ei(this.Ff,22):this.Ff=Si(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,23)},set:function(e){e?this.Ff=Ei(this.Ff,23):this.Ff=Si(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,27)},set:function(e){e?this.Ff=Ei(this.Ff,27):this.Ff=Si(this.Ff,27)}}),this.hasAppearanceStream=!1};Ms(Md,ga);var kd=function(){Md.call(this),this.fontName="helvetica",this.combo=!1};Ms(kd,Md);var Od=function(){kd.call(this),this.combo=!0};Ms(Od,kd);var e2=function(){Od.call(this),this.edit=!0};Ms(e2,Od);var cn=function(){ga.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,15)},set:function(e){e?this.Ff=Ei(this.Ff,15):this.Ff=Si(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,16)},set:function(e){e?this.Ff=Ei(this.Ff,16):this.Ff=Si(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,17)},set:function(e){e?this.Ff=Ei(this.Ff,17):this.Ff=Si(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,26)},set:function(e){e?this.Ff=Ei(this.Ff,26):this.Ff=Si(this.Ff,26)}});var n,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(s){return s};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,i=[];for(r in i.push("<<"),t)i.push("/"+r+" ("+du(e(t[r]))+")");return i.push(">>"),i.join(`
|
|
109
|
-
`)}},set:function(e){Ar(e)==="object"&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){typeof e=="string"&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),n="/"+gu(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+gu(e)}})};Ms(cn,ga);var r2=function(){cn.call(this),this.pushButton=!0};Ms(r2,cn);var Dd=function(){cn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t!==void 0?t:[]}})};Ms(Dd,cn);var i2=function(){var n,t;ga.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){n=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(a){return a};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var s,A=[];for(s in A.push("<<"),r)A.push("/"+s+" ("+du(i(r[s]))+")");return A.push(">>"),A.join(`
|
|
110
|
-
`)},set:function(i){Ar(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){var s=i==null?"":i.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+gu(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(i){var s=i==null?"":i.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+gu(s)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Jt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ms(i2,ga),Dd.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=n.createAppearanceStream(e.optionName),e.caption=n.getCA()}},Dd.prototype.createOption=function(n){var t=new i2;return t.Parent=this,t.optionName=n,this.Kids.push(t),u8.call(this.scope,t),t};var n2=function(){cn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Jt.CheckBox.createAppearanceStream()};Ms(n2,cn);var pu=function(){ga.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,13)},set:function(t){t?this.Ff=Ei(this.Ff,13):this.Ff=Si(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,21)},set:function(t){t?this.Ff=Ei(this.Ff,21):this.Ff=Si(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,23)},set:function(t){t?this.Ff=Ei(this.Ff,23):this.Ff=Si(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,24)},set:function(t){t?this.Ff=Ei(this.Ff,24):this.Ff=Si(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,25)},set:function(t){t?this.Ff=Ei(this.Ff,25):this.Ff=Si(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,26)},set:function(t){t?this.Ff=Ei(this.Ff,26):this.Ff=Si(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){Number.isInteger(t)&&(n=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Ms(pu,ga);var s2=function(){pu.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!xi(this.Ff,14)},set:function(n){n?this.Ff=Ei(this.Ff,14):this.Ff=Si(this.Ff,14)}}),this.password=!0};Ms(s2,pu);var Jt={CheckBox:{createAppearanceStream:function(){return{N:{On:Jt.CheckBox.YesNormal},D:{On:Jt.CheckBox.YesPushDown,Off:Jt.CheckBox.OffPushDown}}},YesPushDown:function(n){var t=io(n);t.scope=n.scope;var e=[],r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,i=n.scope.__private__.encodeColorString(n.color),s=A5(n,n.caption);return e.push("0.749023 g"),e.push("0 0 "+Te(Jt.internal.getWidth(n))+" "+Te(Jt.internal.getHeight(n))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+Te(s.fontSize)+" Tf "+i),e.push("BT"),e.push(s.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(`
|
|
111
|
-
`),t},YesNormal:function(n){var t=io(n);t.scope=n.scope;var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,r=n.scope.__private__.encodeColorString(n.color),i=[],s=Jt.internal.getHeight(n),A=Jt.internal.getWidth(n),a=A5(n,n.caption);return i.push("1 g"),i.push("0 0 "+Te(A)+" "+Te(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Te(A-1)+" "+Te(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+e+" "+Te(a.fontSize)+" Tf "+r),i.push(a.text),i.push("ET"),i.push("Q"),t.stream=i.join(`
|
|
112
|
-
`),t},OffPushDown:function(n){var t=io(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Te(Jt.internal.getWidth(n))+" "+Te(Jt.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(`
|
|
113
|
-
`),t}},RadioButton:{Circle:{createAppearanceStream:function(n){var t={D:{Off:Jt.RadioButton.Circle.OffPushDown},N:{}};return t.N[n]=Jt.RadioButton.Circle.YesNormal,t.D[n]=Jt.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(n){var t=io(n);t.scope=n.scope;var e=[],r=Jt.internal.getWidth(n)<=Jt.internal.getHeight(n)?Jt.internal.getWidth(n)/4:Jt.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Jt.internal.Bezier_C,s=Number((r*i).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+Tc(Jt.internal.getWidth(n)/2)+" "+Tc(Jt.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+s+" "+s+" "+r+" 0 "+r+" c"),e.push("-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c"),e.push("-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c"),e.push(s+" -"+r+" "+r+" -"+s+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
114
|
-
`),t},YesPushDown:function(n){var t=io(n);t.scope=n.scope;var e=[],r=Jt.internal.getWidth(n)<=Jt.internal.getHeight(n)?Jt.internal.getWidth(n)/4:Jt.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*Jt.internal.Bezier_C).toFixed(5)),A=Number((r*Jt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Tc(Jt.internal.getWidth(n)/2)+" "+Tc(Jt.internal.getHeight(n)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),e.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),e.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),e.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+Tc(Jt.internal.getWidth(n)/2)+" "+Tc(Jt.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+A+" "+A+" "+r+" 0 "+r+" c"),e.push("-"+A+" "+r+" -"+r+" "+A+" -"+r+" 0 c"),e.push("-"+r+" -"+A+" -"+A+" -"+r+" 0 -"+r+" c"),e.push(A+" -"+r+" "+r+" -"+A+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
115
|
-
`),t},OffPushDown:function(n){var t=io(n);t.scope=n.scope;var e=[],r=Jt.internal.getWidth(n)<=Jt.internal.getHeight(n)?Jt.internal.getWidth(n)/4:Jt.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*Jt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Tc(Jt.internal.getWidth(n)/2)+" "+Tc(Jt.internal.getHeight(n)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),e.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),e.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),e.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
116
|
-
`),t}},Cross:{createAppearanceStream:function(n){var t={D:{Off:Jt.RadioButton.Cross.OffPushDown},N:{}};return t.N[n]=Jt.RadioButton.Cross.YesNormal,t.D[n]=Jt.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(n){var t=io(n);t.scope=n.scope;var e=[],r=Jt.internal.calculateCross(n);return e.push("q"),e.push("1 1 "+Te(Jt.internal.getWidth(n)-2)+" "+Te(Jt.internal.getHeight(n)-2)+" re"),e.push("W"),e.push("n"),e.push(Te(r.x1.x)+" "+Te(r.x1.y)+" m"),e.push(Te(r.x2.x)+" "+Te(r.x2.y)+" l"),e.push(Te(r.x4.x)+" "+Te(r.x4.y)+" m"),e.push(Te(r.x3.x)+" "+Te(r.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(`
|
|
117
|
-
`),t},YesPushDown:function(n){var t=io(n);t.scope=n.scope;var e=Jt.internal.calculateCross(n),r=[];return r.push("0.749023 g"),r.push("0 0 "+Te(Jt.internal.getWidth(n))+" "+Te(Jt.internal.getHeight(n))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Te(Jt.internal.getWidth(n)-2)+" "+Te(Jt.internal.getHeight(n)-2)+" re"),r.push("W"),r.push("n"),r.push(Te(e.x1.x)+" "+Te(e.x1.y)+" m"),r.push(Te(e.x2.x)+" "+Te(e.x2.y)+" l"),r.push(Te(e.x4.x)+" "+Te(e.x4.y)+" m"),r.push(Te(e.x3.x)+" "+Te(e.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
|
|
118
|
-
`),t},OffPushDown:function(n){var t=io(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Te(Jt.internal.getWidth(n))+" "+Te(Jt.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(`
|
|
119
|
-
`),t}}},createDefaultAppearanceStream:function(n){var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,e=n.scope.__private__.encodeColorString(n.color);return"/"+t+" "+n.fontSize+" Tf "+e}};Jt.internal={Bezier_C:.551915024494,calculateCross:function(n){var t=Jt.internal.getWidth(n),e=Jt.internal.getHeight(n),r=Math.min(t,e);return{x1:{x:(t-r)/2,y:(e-r)/2+r},x2:{x:(t-r)/2+r,y:(e-r)/2},x3:{x:(t-r)/2,y:(e-r)/2},x4:{x:(t-r)/2+r,y:(e-r)/2+r}}}},Jt.internal.getWidth=function(n){var t=0;return Ar(n)==="object"&&(t=sI(n.Rect[2])),t},Jt.internal.getHeight=function(n){var t=0;return Ar(n)==="object"&&(t=sI(n.Rect[3])),t};var u8=hi.addField=function(n){if(h8(this,n),!(n instanceof ga))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=n).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};hi.AcroFormChoiceField=Md,hi.AcroFormListBox=kd,hi.AcroFormComboBox=Od,hi.AcroFormEditBox=e2,hi.AcroFormButton=cn,hi.AcroFormPushButton=r2,hi.AcroFormRadioButton=Dd,hi.AcroFormCheckBox=n2,hi.AcroFormTextField=pu,hi.AcroFormPasswordField=s2,hi.AcroFormAppearance=Jt,hi.AcroForm={ChoiceField:Md,ListBox:kd,ComboBox:Od,EditBox:e2,Button:cn,PushButton:r2,RadioButton:Dd,CheckBox:n2,TextField:pu,PasswordField:s2,Appearance:Jt},le.AcroForm={ChoiceField:Md,ListBox:kd,ComboBox:Od,EditBox:e2,Button:cn,PushButton:r2,RadioButton:Dd,CheckBox:n2,TextField:pu,PasswordField:s2,Appearance:Jt},le.AcroForm;function lI(n){return n.reduce(function(t,e,r){return t[e]=r,t},{})}(function(n){var t="addImage_";n.__addimage__={};var e="UNKNOWN",r={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]]},i=n.__addimage__.getImageFileTypeByImageData=function(U,D){var j,V,st,rt,it,At=e;if((D=D||e)==="RGBA"||U.data!==void 0&&U.data instanceof Uint8ClampedArray&&"height"in U&&"width"in U)return"RGBA";if(L(U))for(it in r)for(st=r[it],j=0;j<st.length;j+=1){for(rt=!0,V=0;V<st[j].length;V+=1)if(st[j][V]!==void 0&&st[j][V]!==U[V]){rt=!1;break}if(rt===!0){At=it;break}}else for(it in r)for(st=r[it],j=0;j<st.length;j+=1){for(rt=!0,V=0;V<st[j].length;V+=1)if(st[j][V]!==void 0&&st[j][V]!==U.charCodeAt(V)){rt=!1;break}if(rt===!0){At=it;break}}return At===e&&D!==e&&(At=D),At},s=function U(D){for(var j=this.internal.write,V=this.internal.putStream,st=(0,this.internal.getFilters)();st.indexOf("FlateEncode")!==-1;)st.splice(st.indexOf("FlateEncode"),1);D.objectId=this.internal.newObject();var rt=[];if(rt.push({key:"Type",value:"/XObject"}),rt.push({key:"Subtype",value:"/Image"}),rt.push({key:"Width",value:D.width}),rt.push({key:"Height",value:D.height}),D.colorSpace===w.INDEXED?rt.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(D.palette.length/3-1)+" "+("sMask"in D&&D.sMask!==void 0?D.objectId+2:D.objectId+1)+" 0 R]"}):(rt.push({key:"ColorSpace",value:"/"+D.colorSpace}),D.colorSpace===w.DEVICE_CMYK&&rt.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),rt.push({key:"BitsPerComponent",value:D.bitsPerComponent}),"decodeParameters"in D&&D.decodeParameters!==void 0&&rt.push({key:"DecodeParms",value:"<<"+D.decodeParameters+">>"}),"transparency"in D&&Array.isArray(D.transparency)&&D.transparency.length>0){for(var it="",At=0,ut=D.transparency.length;At<ut;At++)it+=D.transparency[At]+" "+D.transparency[At]+" ";rt.push({key:"Mask",value:"["+it+"]"})}D.sMask!==void 0&&rt.push({key:"SMask",value:D.objectId+1+" 0 R"});var vt=D.filter!==void 0?["/"+D.filter]:void 0;if(V({data:D.data,additionalKeyValues:rt,alreadyAppliedFilters:vt,objectId:D.objectId}),j("endobj"),"sMask"in D&&D.sMask!==void 0){var mt,M=(mt=D.sMaskBitsPerComponent)!==null&&mt!==void 0?mt:D.bitsPerComponent,$={width:D.width,height:D.height,colorSpace:"DeviceGray",bitsPerComponent:M,data:D.sMask};"filter"in D&&($.decodeParameters="/Predictor ".concat(D.predictor," /Colors 1 /BitsPerComponent ").concat(M," /Columns ").concat(D.width),$.filter=D.filter),U.call(this,$)}if(D.colorSpace===w.INDEXED){var q=this.internal.newObject();V({data:H(new Uint8Array(D.palette)),objectId:q}),j("endobj")}},A=function(){var U=this.internal.collections[t+"images"];for(var D in U)s.call(this,U[D])},a=function(){var U,D=this.internal.collections[t+"images"],j=this.internal.write;for(var V in D)j("/I"+(U=D[V]).index,U.objectId,"0","R")},o=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",A),this.internal.events.subscribe("putXobjectDict",a))},l=function(){var U=this.internal.collections[t+"images"];return o.call(this),U},h=function(){return Object.keys(this.internal.collections[t+"images"]).length},u=function(U){return typeof n["process"+U.toUpperCase()]=="function"},d=function(U){return Ar(U)==="object"&&U.nodeType===1},f=function(U,D){if(U.nodeName==="IMG"&&U.hasAttribute("src")){var j=""+U.getAttribute("src");if(j.indexOf("data:image/")===0)return Jw(unescape(j).split("base64,").pop());var V=n.loadFile(j,!0);if(V!==void 0)return V}if(U.nodeName==="CANVAS"){if(U.width===0||U.height===0)throw new Error("Given canvas must have data. Canvas width: "+U.width+", height: "+U.height);var st;switch(D){case"PNG":st="image/png";break;case"WEBP":st="image/webp";break;default:st="image/jpeg"}return Jw(U.toDataURL(st,1).split("base64,").pop())}},p=function(U){var D=this.internal.collections[t+"images"];if(D){for(var j in D)if(U===D[j].alias)return D[j]}},m=function(U,D,j){return U||D||(U=-96,D=-96),U<0&&(U=-1*j.width*72/U/this.internal.scaleFactor),D<0&&(D=-1*j.height*72/D/this.internal.scaleFactor),U===0&&(U=D*j.width/j.height),D===0&&(D=U*j.height/j.width),[U,D]},y=function(U,D,j,V,st,rt){var it=m.call(this,j,V,st),At=this.internal.getCoordinateString,ut=this.internal.getVerticalCoordinateString,vt=l.call(this);if(j=it[0],V=it[1],vt[st.index]=st,rt){rt*=Math.PI/180;var mt=Math.cos(rt),M=Math.sin(rt),$=function(tt){return tt.toFixed(4)},q=[$(mt),$(M),$(-1*M),$(mt),0,0,"cm"]}this.internal.write("q"),rt?(this.internal.write([1,"0","0",1,At(U),ut(D+V),"cm"].join(" ")),this.internal.write(q.join(" ")),this.internal.write([At(j),"0","0",At(V),"0","0","cm"].join(" "))):this.internal.write([At(j),"0","0",At(V),At(U),ut(D+V),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+st.index+" Do"),this.internal.write("Q")},w=n.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"};n.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 B=n.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},E=n.__addimage__.sHashCode=function(U){var D,j,V=0;if(typeof U=="string")for(j=U.length,D=0;D<j;D++)V=(V<<5)-V+U.charCodeAt(D),V|=0;else if(L(U))for(j=U.byteLength/2,D=0;D<j;D++)V=(V<<5)-V+U[D],V|=0;return V},S=n.__addimage__.validateStringAsBase64=function(U){(U=U||"").toString().trim();var D=!0;return U.length===0&&(D=!1),U.length%4!=0&&(D=!1),/^[A-Za-z0-9+/]+$/.test(U.substr(0,U.length-2))===!1&&(D=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(U.substr(-2))===!1&&(D=!1),D},_=n.__addimage__.extractImageFromDataUrl=function(U){if(U==null||!(U=U.trim()).startsWith("data:"))return null;var D=U.indexOf(",");return D<0?null:U.substring(0,D).trim().endsWith("base64")?U.substring(D+1):null};n.__addimage__.isArrayBuffer=function(U){return U instanceof ArrayBuffer};var L=n.__addimage__.isArrayBufferView=function(U){return U instanceof Int8Array||U instanceof Uint8Array||U instanceof Uint8ClampedArray||U instanceof Int16Array||U instanceof Uint16Array||U instanceof Int32Array||U instanceof Uint32Array||U instanceof Float32Array||U instanceof Float64Array},k=n.__addimage__.binaryStringToUint8Array=function(U){for(var D=U.length,j=new Uint8Array(D),V=0;V<D;V++)j[V]=U.charCodeAt(V);return j},H=n.__addimage__.arrayBufferToBinaryString=function(U){for(var D="",j=L(U)?U:new Uint8Array(U),V=0;V<j.length;V+=8192)D+=String.fromCharCode.apply(null,j.subarray(V,V+8192));return D};n.addImage=function(){var U,D,j,V,st,rt,it,At,ut;if(typeof arguments[1]=="number"?(D=e,j=arguments[1],V=arguments[2],st=arguments[3],rt=arguments[4],it=arguments[5],At=arguments[6],ut=arguments[7]):(D=arguments[1],j=arguments[2],V=arguments[3],st=arguments[4],rt=arguments[5],it=arguments[6],At=arguments[7],ut=arguments[8]),Ar(U=arguments[0])==="object"&&!d(U)&&"imageData"in U){var vt=U;U=vt.imageData,D=vt.format||D||e,j=vt.x||j||0,V=vt.y||V||0,st=vt.w||vt.width||st,rt=vt.h||vt.height||rt,it=vt.alias||it,At=vt.compression||At,ut=vt.rotation||vt.angle||ut}var mt=this.internal.getFilters();if(At===void 0&&mt.indexOf("FlateEncode")!==-1&&(At="SLOW"),isNaN(j)||isNaN(V))throw new Error("Invalid coordinates passed to jsPDF.addImage");o.call(this);var M=Q.call(this,U,D,it,At);return y.call(this,j,V,st,rt,M,ut),this};var Q=function(U,D,j,V){var st,rt,it;if(typeof U=="string"&&i(U)===e){U=unescape(U);var At=W(U,!1);(At!==""||(At=n.loadFile(U,!0))!==void 0)&&(U=At)}if(d(U)&&(U=f(U,D)),D=i(U,D),!u(D))throw new Error("addImage does not support files of type '"+D+"', please ensure that a plugin for '"+D+"' support is added.");if(((it=j)==null||it.length===0)&&(j=function(ut){return typeof ut=="string"||L(ut)?E(ut):L(ut.data)?E(ut.data):null}(U)),(st=p.call(this,j))||(U instanceof Uint8Array||D==="RGBA"||(rt=U,U=k(U)),st=this["process"+D.toUpperCase()](U,h.call(this),j,function(ut){return ut&&typeof ut=="string"&&(ut=ut.toUpperCase()),ut in n.image_compression?ut:B.NONE}(V),rt)),!st)throw new Error("An unknown error occurred whilst processing the image.");return st},W=n.__addimage__.convertBase64ToBinaryString=function(U,D){D=typeof D!="boolean"||D;var j,V="";if(typeof U=="string"){var st;j=(st=_(U))!==null&&st!==void 0?st:U;try{V=Jw(j)}catch(rt){if(D)throw S(j)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+rt.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return V};n.getImageProperties=function(U){var D,j,V="";if(d(U)&&(U=f(U)),typeof U=="string"&&i(U)===e&&((V=W(U,!1))===""&&(V=n.loadFile(U)||""),U=V),j=i(U),!u(j))throw new Error("addImage does not support files of type '"+j+"', please ensure that a plugin for '"+j+"' support is added.");if(U instanceof Uint8Array||(U=k(U)),!(D=this["process"+j.toUpperCase()](U)))throw new Error("An unknown error occurred whilst processing the image");return D.fileType=j,D}})(le.API),function(n){var t=function(e){if(e!==void 0&&e!="")return!0};le.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),n.events.push(["putPage",function(e){for(var r,i,s,A=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,h=!1,u=0;u<l.length&&!h;u++)switch((r=l[u]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var d=0;d<l.length;d++){r=l[d];var f=this.internal.pdfEscape,p=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var m=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),w=this.internal.getEncryptor(m.objId),B=r.title||"Note";s="<</Type /Annot /Subtype /Text "+(i="/Rect ["+A(r.bounds.x)+" "+a(r.bounds.y+r.bounds.h)+" "+A(r.bounds.x+r.bounds.w)+" "+a(r.bounds.y)+"] ")+"/Contents ("+f(w(r.contents))+")",s+=" /Popup "+y.objId+" 0 R",s+=" /P "+o.objId+" 0 R",s+=" /T ("+f(w(B))+") >>",m.content=s;var E=m.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+A(r.bounds.x+30)+" "+a(r.bounds.y+r.bounds.h)+" "+A(r.bounds.x+r.bounds.w+30)+" "+a(r.bounds.y)+"] ")+" /Parent "+E,r.open&&(s+=" /Open true"),s+=" >>",y.content=s,this.internal.write(m.objId,"0 R",y.objId,"0 R");break;case"freetext":i="/Rect ["+A(r.bounds.x)+" "+a(r.bounds.y)+" "+A(r.bounds.x+r.bounds.w)+" "+a(r.bounds.y+r.bounds.h)+"] ";var S="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");s="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+f(p(r.contents))+")",s+=" /DS("+f(p(S))+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(r.options.name){var _=this.annotations._nameMap[r.options.name];r.options.pageNumber=_.page,r.options.top=_.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",s="",r.options.url)s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+f(p(r.options.url))+") >>";else if(r.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,s+=" /FitV "+r.options.left+"]";break;default:var L=a(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),s+=" /XYZ "+r.options.left+" "+L+" "+r.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),n.createAnnotation=function(e){var r=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":r.pageContext.annotations.push(e)}},n.link=function(e,r,i,s,A){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:l(r),w:o(e+i),h:l(r+s)},options:A,type:"link"})},n.textWithLink=function(e,r,i,s){var A,a,o=this.getTextWidth(e),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){a=s.maxWidth;var h=this.splitTextToSize(e,a).length;A=Math.ceil(l*h)}else a=o,A=l;return this.text(e,r,i,s),i+=.2*l,s.align==="center"&&(r-=o/2),s.align==="right"&&(r-=o),this.link(r,i-l,a,A,s),o},n.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}}(le.API),function(n){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]},e={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}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];n.__arabicParser__={};var s=n.__arabicParser__.isInArabicSubstitutionA=function(m){return t[m.charCodeAt(0)]!==void 0},A=n.__arabicParser__.isArabicLetter=function(m){return typeof m=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(m)},a=n.__arabicParser__.isArabicEndLetter=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length<=2},o=n.__arabicParser__.isArabicAlfLetter=function(m){return A(m)&&i.indexOf(m.charCodeAt(0))>=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=1};var l=n.__arabicParser__.arabicLetterHasFinalForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=3};var h=n.__arabicParser__.arabicLetterHasMedialForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length==4},u=n.__arabicParser__.resolveLigatures=function(m){var y=0,w=e,B="",E=0;for(y=0;y<m.length;y+=1)w[m.charCodeAt(y)]!==void 0?(E++,typeof(w=w[m.charCodeAt(y)])=="number"&&(B+=String.fromCharCode(w),w=e,E=0),y===m.length-1&&(w=e,B+=m.charAt(y-(E-1)),y-=E-1,E=0)):(w=e,B+=m.charAt(y-E),y-=E,E=0);return B};n.__arabicParser__.isArabicDiacritic=function(m){return m!==void 0&&r[m.charCodeAt(0)]!==void 0};var d=n.__arabicParser__.getCorrectForm=function(m,y,w){return A(m)?s(m)===!1?-1:!l(m)||!A(y)&&!A(w)||!A(w)&&a(y)||a(m)&&!A(y)||a(m)&&o(y)||a(m)&&a(y)?0:h(m)&&A(y)&&!a(y)&&A(w)&&l(w)?3:a(m)||!A(w)?1:2:-1},f=function(m){var y=0,w=0,B=0,E="",S="",_="",L=(m=m||"").split("\\s+"),k=[];for(y=0;y<L.length;y+=1){for(k.push(""),w=0;w<L[y].length;w+=1)E=L[y][w],S=L[y][w-1],_=L[y][w+1],A(E)?(B=d(E,S,_),k[y]+=B!==-1?String.fromCharCode(t[E.charCodeAt(0)][B]):E):k[y]+=E;k[y]=u(k[y])}return k.join(" ")},p=n.__arabicParser__.processArabic=n.processArabic=function(){var m,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,w=[];if(Array.isArray(y)){var B=0;for(w=[],B=0;B<y.length;B+=1)Array.isArray(y[B])?w.push([f(y[B][0]),y[B][1],y[B][2]]):w.push([f(y[B])]);m=w}else m=f(y);return typeof arguments[0]=="string"?m:(arguments[0].text=m,arguments[0])};n.events.push(["preProcessText",p])}(le.API),le.API.autoPrint=function(n){var t;return(n=n||{}).variant=n.variant||"non-conform",n.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(n){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(a){e=a}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(a){r=isNaN(a)||Number.isInteger(a)===!1||a<0?150:a,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(a){i=isNaN(a)||Number.isInteger(a)===!1||a<0?300:a,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(a){s=a}});var A={};Object.defineProperty(this,"style",{get:function(){return A},set:function(a){A=a}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,r){var i;if((e=e||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(le.API),function(n){var t={left:0,top:0,bottom:0,right:0},e=!1,r=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(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(m){o=m}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(m){l=m}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(m){h=m}});var u=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return u},set:function(m){u=m}});var d=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return d},set:function(m){d=m}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(m){f=m}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(m){p=m}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(o){return r.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},n.getTextDimensions=function(o,l){r.call(this);var h=(l=l||{}).fontSize||this.getFontSize(),u=l.font||this.getFont(),d=l.scaleFactor||this.internal.scaleFactor,f=0,p=0,m=0,y=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var w=l.maxWidth;w>0?typeof o=="string"?o=this.splitTextToSize(o,w):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(E,S){return E.concat(y.splitTextToSize(S,w))},[])):o=Array.isArray(o)?o:[o];for(var B=0;B<o.length;B++)f<(m=this.getStringUnitWidth(o[B],{font:u})*h)&&(f=m);return f!==0&&(p=o.length),{w:f/=d,h:Math.max((p*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/d,0)}},n.cellAddPage=function(){r.call(this),this.addPage();var o=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var A=n.cell=function(){var o;o=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var l=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,u=this.internal.__cell__.margins||t,d=this.internal.__cell__.tableHeaderRow,f=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===o.lineNumber?(o.x=(l.x||0)+(l.width||0),o.y=l.y||0):l.y+l.height+o.height+u.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=u.top,f&&d&&(this.printHeaderRow(o.lineNumber,!0),o.y+=d[0].height)):o.y=l.y+l.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,e===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-h,o.y+h,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+h,{align:"center",baseline:"top",maxWidth:o.width-h-h}):this.text(o.text,o.x+h,o.y+h,{align:"left",baseline:"top",maxWidth:o.width-h-h})),this.internal.__cell__.lastCell=o,this};n.table=function(o,l,h,u,d){if(r.call(this),!h)throw new Error("No data for PDF table.");var f,p,m,y,w=[],B=[],E=[],S={},_={},L=[],k=[],H=(d=d||{}).autoSize||!1,Q=d.printHeaders!==!1,W=d.css&&d.css["font-size"]!==void 0?16*d.css["font-size"]:d.fontSize||12,U=d.margins||Object.assign({width:this.getPageWidth()},t),D=typeof d.padding=="number"?d.padding:3,j=d.headerBackgroundColor||"#c8c8c8",V=d.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=Q,this.internal.__cell__.margins=U,this.internal.__cell__.table_font_size=W,this.internal.__cell__.padding=D,this.internal.__cell__.headerBackgroundColor=j,this.internal.__cell__.headerTextColor=V,this.setFontSize(W),u==null)B=w=Object.keys(h[0]),E=w.map(function(){return"left"});else if(Array.isArray(u)&&Ar(u[0])==="object")for(w=u.map(function(vt){return vt.name}),B=u.map(function(vt){return vt.prompt||vt.name||""}),E=u.map(function(vt){return vt.align||"left"}),f=0;f<u.length;f+=1)_[u[f].name]=.7499990551181103*u[f].width;else Array.isArray(u)&&typeof u[0]=="string"&&(B=w=u,E=w.map(function(){return"left"}));if(H||Array.isArray(u)&&typeof u[0]=="string")for(f=0;f<w.length;f+=1){for(S[y=w[f]]=h.map(function(vt){return vt[y]}),this.setFont(void 0,"bold"),L.push(this.getTextDimensions(B[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=S[y],this.setFont(void 0,"normal"),m=0;m<p.length;m+=1)L.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);_[y]=Math.max.apply(null,L)+D+D,L=[]}if(Q){var st={};for(f=0;f<w.length;f+=1)st[w[f]]={},st[w[f]].text=B[f],st[w[f]].align=E[f];var rt=a.call(this,st,_);k=w.map(function(vt){return new s(o,l,_[vt],rt,st[vt].text,void 0,st[vt].align)}),this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}var it=u.reduce(function(vt,mt){return vt[mt.name]=mt.align,vt},{});for(f=0;f<h.length;f+=1){"rowStart"in d&&d.rowStart instanceof Function&&d.rowStart({row:f,data:h[f]},this);var At=a.call(this,h[f],_);for(m=0;m<w.length;m+=1){var ut=h[f][w[m]];"cellStart"in d&&d.cellStart instanceof Function&&d.cellStart({row:f,col:m,data:ut},this),A.call(this,new s(o,l,_[w[m]],At,ut,f+2,it[w[m]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=l,this};var a=function(o,l){var h=this.internal.__cell__.padding,u=this.internal.__cell__.table_font_size,d=this.internal.scaleFactor;return Object.keys(o).map(function(f){var p=o[f];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,l[f]-h-h)},this).map(function(f){return this.getLineHeightFactor()*f.length*u/d+h+h},this).reduce(function(f,p){return Math.max(f,p)},0)};n.setTableHeaderRow=function(o){r.call(this),this.internal.__cell__.tableHeaderRow=o},n.printHeaderRow=function(o,l){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var u=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(u[0],u[1],u[2],u[3],void 0,-1)}this.setFont(void 0,"bold");for(var d=[],f=0;f<this.internal.__cell__.tableHeaderRow.length;f+=1){h=this.internal.__cell__.tableHeaderRow[f].clone(),l&&(h.y=this.internal.__cell__.margins.top||0,d.push(h)),h.lineNumber=o;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),A.call(this,h),this.setTextColor(p)}d.length>0&&this.setTableHeaderRow(d),this.setFont(void 0,"normal"),e=!1}}(le.API);var cI={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},hI=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],o5=lI(hI),uI=[100,200,300,400,500,600,700,800,900],f8=lI(uI);function l5(n){var t=n.family.replace(/"|'/g,"").toLowerCase(),e=function(s){return cI[s=s||"normal"]?s:"normal"}(n.style),r=function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400}(n.weight),i=function(s){return typeof o5[s=s||"normal"]=="number"?s:"normal"}(n.stretch);return{family:t,style:e,weight:r,stretch:i,src:n.src||[],ref:n.ref||{name:t,style:[i,e,r].join(" ")}}}function fI(n,t,e,r){var i;for(i=e;i>=0&&i<t.length;i+=r)if(n[t[i]])return n[t[i]];for(i=e;i>=0&&i<t.length;i-=r)if(n[t[i]])return n[t[i]]}var d8={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},dI={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function gI(n){return[n.stretch,n.style,n.weight,n.family].join(" ")}function pI(n){return n.trimLeft()}function g8(n,t){for(var e=0;e<n.length;){if(n.charAt(e)===t)return[n.substring(0,e),n.substring(e+1)];e+=1}return null}function p8(n){var t=n.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],n.substring(t[0].length)]}var Rd,A2,mI,vI,wI,c5=["times"];function yI(n,t,e,r,i){var s=4,A=BI;switch(i){case le.API.image_compression.FAST:s=1,A=bI;break;case le.API.image_compression.MEDIUM:s=6,A=CI;break;case le.API.image_compression.SLOW:s=9,A=xI}n=function(o,l,h,u){for(var d,f=o.length/l,p=new Uint8Array(o.length+f),m=[m8,bI,BI,CI,xI],y=0;y<f;y+=1){var w=y*l,B=o.subarray(w,w+l);if(u)p.set(u(B,h,d),w+y);else{for(var E=m.length,S=[],_=0;_<E;_+=1)S[_]=m[_](B,h,d);var L=w8(S.concat());p.set(S[L],w+y)}d=B}return p}(n,t,Math.ceil(e*r/8),A);var a=kC(n,{level:s});return le.API.__addimage__.arrayBufferToBinaryString(a)}function m8(n){var t=Array.apply([],n);return t.unshift(0),t}function bI(n,t){var e=n.length,r=[];r[0]=1;for(var i=0;i<e;i+=1){var s=n[i-t]||0;r[i+1]=n[i]-s+256&255}return r}function BI(n,t,e){var r=n.length,i=[];i[0]=2;for(var s=0;s<r;s+=1){var A=e&&e[s]||0;i[s+1]=n[s]-A+256&255}return i}function CI(n,t,e){var r=n.length,i=[];i[0]=3;for(var s=0;s<r;s+=1){var A=n[s-t]||0,a=e&&e[s]||0;i[s+1]=n[s]+256-(A+a>>>1)&255}return i}function xI(n,t,e){var r=n.length,i=[];i[0]=4;for(var s=0;s<r;s+=1){var A=v8(n[s-t]||0,e&&e[s]||0,e&&e[s-t]||0);i[s+1]=n[s]-A+256&255}return i}function v8(n,t,e){if(n===t&&t===e)return n;var r=Math.abs(t-e),i=Math.abs(n-e),s=Math.abs(n+t-e-e);return r<=i&&r<=s?n:i<=s?t:e}function w8(n){var t=n.map(function(e){return e.reduce(function(r,i){return r+Math.abs(i)},0)});return t.indexOf(Math.min.apply(null,t))}function h5(n,t,e){var r=t*e,i=Math.floor(r/8),s=16-(r-8*i+e),A=(1<<e)-1;return SI(n,i)>>s&A}function EI(n,t,e,r){var i=e*r,s=Math.floor(i/8),A=16-(i-8*s+r),a=(1<<r)-1,o=(t&a)<<A;(function(l,h,u){if(h+1<l.byteLength)l.setUint16(h,u,!1);else{var d=u>>8&255;l.setUint8(h,d)}})(n,s,SI(n,s)&~(a<<A)&65535|o)}function SI(n,t){return t+1<n.byteLength?n.getUint16(t,!1):n.getUint8(t)<<8}function y8(n){var t=0;if(n[t++]!==71||n[t++]!==73||n[t++]!==70||n[t++]!==56||(n[t++]+1&253)!=56||n[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=n[t++]|n[t++]<<8,r=n[t++]|n[t++]<<8,i=n[t++],s=i>>7,A=1<<1+(7&i);n[t++],n[t++];var a=null,o=null;s&&(a=t,o=A,t+=3*A);var l=!0,h=[],u=0,d=null,f=0,p=null;for(this.width=e,this.height=r;l&&t<n.length;)switch(n[t++]){case 33:switch(n[t++]){case 255:if(n[t]!==11||n[t+1]==78&&n[t+2]==69&&n[t+3]==84&&n[t+4]==83&&n[t+5]==67&&n[t+6]==65&&n[t+7]==80&&n[t+8]==69&&n[t+9]==50&&n[t+10]==46&&n[t+11]==48&&n[t+12]==3&&n[t+13]==1&&n[t+16]==0)t+=14,p=n[t++]|n[t++]<<8,t++;else for(t+=12;;){if(!((U=n[t++])>=0))throw Error("Invalid block size");if(U===0)break;t+=U}break;case 249:if(n[t++]!==4||n[t+4]!==0)throw new Error("Invalid graphics extension block.");var m=n[t++];u=n[t++]|n[t++]<<8,d=n[t++],1&m||(d=null),f=m>>2&7,t++;break;case 254:for(;;){if(!((U=n[t++])>=0))throw Error("Invalid block size");if(U===0)break;t+=U}break;default:throw new Error("Unknown graphic control label: 0x"+n[t-1].toString(16))}break;case 44:var y=n[t++]|n[t++]<<8,w=n[t++]|n[t++]<<8,B=n[t++]|n[t++]<<8,E=n[t++]|n[t++]<<8,S=n[t++],_=S>>6&1,L=1<<1+(7&S),k=a,H=o,Q=!1;S>>7&&(Q=!0,k=t,H=L,t+=3*L);var W=t;for(t++;;){var U;if(!((U=n[t++])>=0))throw Error("Invalid block size");if(U===0)break;t+=U}h.push({x:y,y:w,width:B,height:E,has_local_palette:Q,palette_offset:k,palette_size:H,data_offset:W,data_length:t-W,transparent_index:d,interlaced:!!_,delay:u,disposal:f});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+n[t-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return p},this.frameInfo=function(D){if(D<0||D>=h.length)throw new Error("Frame index out of range.");return h[D]},this.decodeAndBlitFrameBGRA=function(D,j){var V=this.frameInfo(D),st=V.width*V.height;if(st>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var rt=new Uint8Array(st);FI(n,V.data_offset,rt,st);var it=V.palette_offset,At=V.transparent_index;At===null&&(At=256);var ut=V.width,vt=e-ut,mt=ut,M=4*(V.y*e+V.x),$=4*((V.y+V.height)*e+V.x),q=M,tt=4*vt;V.interlaced===!0&&(tt+=4*e*7);for(var et=8,ot=0,dt=rt.length;ot<dt;++ot){var wt=rt[ot];if(mt===0&&(mt=ut,(q+=tt)>=$&&(tt=4*vt+4*e*(et-1),q=M+(ut+vt)*(et<<1),et>>=1)),wt===At)q+=4;else{var yt=n[it+3*wt],St=n[it+3*wt+1],Mt=n[it+3*wt+2];j[q++]=Mt,j[q++]=St,j[q++]=yt,j[q++]=255}--mt}},this.decodeAndBlitFrameRGBA=function(D,j){var V=this.frameInfo(D),st=V.width*V.height;if(st>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var rt=new Uint8Array(st);FI(n,V.data_offset,rt,st);var it=V.palette_offset,At=V.transparent_index;At===null&&(At=256);var ut=V.width,vt=e-ut,mt=ut,M=4*(V.y*e+V.x),$=4*((V.y+V.height)*e+V.x),q=M,tt=4*vt;V.interlaced===!0&&(tt+=4*e*7);for(var et=8,ot=0,dt=rt.length;ot<dt;++ot){var wt=rt[ot];if(mt===0&&(mt=ut,(q+=tt)>=$&&(tt=4*vt+4*e*(et-1),q=M+(ut+vt)*(et<<1),et>>=1)),wt===At)q+=4;else{var yt=n[it+3*wt],St=n[it+3*wt+1],Mt=n[it+3*wt+2];j[q++]=yt,j[q++]=St,j[q++]=Mt,j[q++]=255}--mt}}}function FI(n,t,e,r){for(var i=n[t++],s=1<<i,A=s+1,a=A+1,o=i+1,l=(1<<o)-1,h=0,u=0,d=0,f=n[t++],p=new Int32Array(4096),m=null;;){for(;h<16&&f!==0;)u|=n[t++]<<h,h+=8,f===1?f=n[t++]:--f;if(h<o)break;var y=u&l;if(u>>=o,h-=o,y!==s){if(y===A)break;for(var w=y<a?y:m,B=0,E=w;E>s;)E=p[E]>>8,++B;var S=E;if(d+B+(w!==y?1:0)>r)return void Ir.log("Warning, gif stream longer than expected.");e[d++]=S;var _=d+=B;for(w!==y&&(e[d++]=S),E=w;B--;)E=p[E],e[--_]=255&E,E>>=8;m!==null&&a<4096&&(p[a++]=m<<8|S,a>=l+1&&o<12&&(++o,l=l<<1|1)),m=y}else a=A+1,l=(1<<(o=i+1))-1,m=null}return d!==r&&Ir.log("Warning, gif stream shorter than expected."),e}/**
|
|
120
|
-
* @license
|
|
121
|
-
Copyright (c) 2008, Adobe Systems Incorporated
|
|
122
|
-
All rights reserved.
|
|
123
|
-
|
|
124
|
-
Redistribution and use in source and binary forms, with or without
|
|
125
|
-
modification, are permitted provided that the following conditions are
|
|
126
|
-
met:
|
|
127
|
-
|
|
128
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
129
|
-
this list of conditions and the following disclaimer.
|
|
130
|
-
|
|
131
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
132
|
-
notice, this list of conditions and the following disclaimer in the
|
|
133
|
-
documentation and/or other materials provided with the distribution.
|
|
134
|
-
|
|
135
|
-
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
136
|
-
contributors may be used to endorse or promote products derived from
|
|
137
|
-
this software without specific prior written permission.
|
|
138
|
-
|
|
139
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
140
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
141
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
142
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
143
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
144
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
145
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
146
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
147
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
148
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
149
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
150
|
-
*/function u5(n){var t,e,r,i,s,A=Math.floor,a=new Array(64),o=new Array(64),l=new Array(64),h=new Array(64),u=new Array(65535),d=new Array(65535),f=new Array(64),p=new Array(64),m=[],y=0,w=7,B=new Array(64),E=new Array(64),S=new Array(64),_=new Array(256),L=new Array(2048),k=[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],H=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Q=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],U=[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],D=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],st=[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 rt(M,$){for(var q=0,tt=0,et=new Array,ot=1;ot<=16;ot++){for(var dt=1;dt<=M[ot];dt++)et[$[tt]]=[],et[$[tt]][0]=q,et[$[tt]][1]=ot,tt++,q++;q*=2}return et}function it(M){for(var $=M[0],q=M[1]-1;q>=0;)$&1<<q&&(y|=1<<w),q--,--w<0&&(y==255?(At(255),At(0)):At(y),w=7,y=0)}function At(M){m.push(M)}function ut(M){At(M>>8&255),At(255&M)}function vt(M,$,q,tt,et){for(var ot,dt=et[0],wt=et[240],yt=function(Tt,ie){var kt,qt,zt,we,Ne,me,Pe,Ce,Vt,ce,Xt=0;for(Vt=0;Vt<8;++Vt){kt=Tt[Xt],qt=Tt[Xt+1],zt=Tt[Xt+2],we=Tt[Xt+3],Ne=Tt[Xt+4],me=Tt[Xt+5],Pe=Tt[Xt+6];var vr=kt+(Ce=Tt[Xt+7]),je=kt-Ce,xe=qt+Pe,Ee=qt-Pe,nr=zt+me,ne=zt-me,He=we+Ne,Ae=we-Ne,ge=vr+He,ar=vr-He,fe=xe+nr,de=xe-nr;Tt[Xt]=ge+fe,Tt[Xt+4]=ge-fe;var Ze=.707106781*(de+ar);Tt[Xt+2]=ar+Ze,Tt[Xt+6]=ar-Ze;var lc=.382683433*((ge=Ae+ne)-(de=Ee+je)),bi=.5411961*ge+lc,za=1.306562965*de+lc,la=.707106781*(fe=ne+Ee),Kt=je+la,ss=je-la;Tt[Xt+5]=ss+bi,Tt[Xt+3]=ss-bi,Tt[Xt+1]=Kt+za,Tt[Xt+7]=Kt-za,Xt+=8}for(Xt=0,Vt=0;Vt<8;++Vt){kt=Tt[Xt],qt=Tt[Xt+8],zt=Tt[Xt+16],we=Tt[Xt+24],Ne=Tt[Xt+32],me=Tt[Xt+40],Pe=Tt[Xt+48];var Xa=kt+(Ce=Tt[Xt+56]),_s=kt-Ce,As=qt+Pe,zr=qt-Pe,Mi=zt+me,nn=zt-me,sn=we+Ne,as=we-Ne,zs=Xa+sn,_A=Xa-sn,Xs=As+Mi,os=As-Mi;Tt[Xt]=zs+Xs,Tt[Xt+32]=zs-Xs;var Bn=.707106781*(os+_A);Tt[Xt+16]=_A+Bn,Tt[Xt+48]=_A-Bn;var ca=.382683433*((zs=as+nn)-(os=zr+_s)),zi=.5411961*zs+ca,Vo=1.306562965*os+ca,cc=.707106781*(Xs=nn+zr),$h=_s+cc,hc=_s-cc;Tt[Xt+40]=hc+zi,Tt[Xt+24]=hc-zi,Tt[Xt+8]=$h+Vo,Tt[Xt+56]=$h-Vo,Xt++}for(Vt=0;Vt<64;++Vt)ce=Tt[Vt]*ie[Vt],f[Vt]=ce>0?ce+.5|0:ce-.5|0;return f}(M,$),St=0;St<64;++St)p[k[St]]=yt[St];var Mt=p[0]-q;q=p[0],Mt==0?it(tt[0]):(it(tt[d[ot=32767+Mt]]),it(u[ot]));for(var Pt=63;Pt>0&&p[Pt]==0;)Pt--;if(Pt==0)return it(dt),q;for(var $t,z=1;z<=Pt;){for(var Nt=z;p[z]==0&&z<=Pt;)++z;var ve=z-Nt;if(ve>=16){$t=ve>>4;for(var re=1;re<=$t;++re)it(wt);ve&=15}ot=32767+p[z],it(et[(ve<<4)+d[ot]]),it(u[ot]),z++}return Pt!=63&&it(dt),q}function mt(M){M=Math.min(Math.max(M,1),100),s!=M&&(function($){for(var q=[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],tt=0;tt<64;tt++){var et=A((q[tt]*$+50)/100);et=Math.min(Math.max(et,1),255),a[k[tt]]=et}for(var ot=[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],dt=0;dt<64;dt++){var wt=A((ot[dt]*$+50)/100);wt=Math.min(Math.max(wt,1),255),o[k[dt]]=wt}for(var yt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],St=0,Mt=0;Mt<8;Mt++)for(var Pt=0;Pt<8;Pt++)l[St]=1/(a[k[St]]*yt[Mt]*yt[Pt]*8),h[St]=1/(o[k[St]]*yt[Mt]*yt[Pt]*8),St++}(M<50?Math.floor(5e3/M):Math.floor(200-2*M)),s=M)}this.encode=function(M,$){$&&mt($),m=new Array,y=0,w=7,ut(65496),ut(65504),ut(16),At(74),At(70),At(73),At(70),At(0),At(1),At(1),At(0),ut(1),ut(1),At(0),At(0),function(){ut(65499),ut(132),At(0);for(var qt=0;qt<64;qt++)At(a[qt]);At(1);for(var zt=0;zt<64;zt++)At(o[zt])}(),function(qt,zt){ut(65472),ut(17),At(8),ut(zt),ut(qt),At(3),At(1),At(17),At(0),At(2),At(17),At(1),At(3),At(17),At(1)}(M.width,M.height),function(){ut(65476),ut(418),At(0);for(var qt=0;qt<16;qt++)At(H[qt+1]);for(var zt=0;zt<=11;zt++)At(Q[zt]);At(16);for(var we=0;we<16;we++)At(W[we+1]);for(var Ne=0;Ne<=161;Ne++)At(U[Ne]);At(1);for(var me=0;me<16;me++)At(D[me+1]);for(var Pe=0;Pe<=11;Pe++)At(j[Pe]);At(17);for(var Ce=0;Ce<16;Ce++)At(V[Ce+1]);for(var Vt=0;Vt<=161;Vt++)At(st[Vt])}(),ut(65498),ut(12),At(3),At(1),At(0),At(2),At(17),At(3),At(17),At(0),At(63),At(0);var q=0,tt=0,et=0;y=0,w=7,this.encode.displayName="_encode_";for(var ot,dt,wt,yt,St,Mt,Pt,$t,z,Nt=M.data,ve=M.width,re=M.height,Tt=4*ve,ie=0;ie<re;){for(ot=0;ot<Tt;){for(St=Tt*ie+ot,Pt=-1,$t=0,z=0;z<64;z++)Mt=St+($t=z>>3)*Tt+(Pt=4*(7&z)),ie+$t>=re&&(Mt-=Tt*(ie+1+$t-re)),ot+Pt>=Tt&&(Mt-=ot+Pt-Tt+4),dt=Nt[Mt++],wt=Nt[Mt++],yt=Nt[Mt++],B[z]=(L[dt]+L[wt+256|0]+L[yt+512|0]>>16)-128,E[z]=(L[dt+768|0]+L[wt+1024|0]+L[yt+1280|0]>>16)-128,S[z]=(L[dt+1280|0]+L[wt+1536|0]+L[yt+1792|0]>>16)-128;q=vt(B,l,q,t,r),tt=vt(E,h,tt,e,i),et=vt(S,h,et,e,i),ot+=32}ie+=8}if(w>=0){var kt=[];kt[1]=w+1,kt[0]=(1<<w+1)-1,it(kt)}return ut(65497),new Uint8Array(m)},n=n||50,function(){for(var M=String.fromCharCode,$=0;$<256;$++)_[$]=M($)}(),t=rt(H,Q),e=rt(D,j),r=rt(W,U),i=rt(V,st),function(){for(var M=1,$=2,q=1;q<=15;q++){for(var tt=M;tt<$;tt++)d[32767+tt]=q,u[32767+tt]=[],u[32767+tt][1]=q,u[32767+tt][0]=tt;for(var et=-($-1);et<=-M;et++)d[32767+et]=q,u[32767+et]=[],u[32767+et][1]=q,u[32767+et][0]=$-1+et;M<<=1,$<<=1}}(),function(){for(var M=0;M<256;M++)L[M]=19595*M,L[M+256|0]=38470*M,L[M+512|0]=7471*M+32768,L[M+768|0]=-11059*M,L[M+1024|0]=-21709*M,L[M+1280|0]=32768*M+8421375,L[M+1536|0]=-27439*M,L[M+1792|0]=-5329*M}(),mt(n)}/**
|
|
151
|
-
* @license
|
|
152
|
-
* Copyright (c) 2017 Aras Abbasi
|
|
153
|
-
*
|
|
154
|
-
* Licensed under the MIT License.
|
|
155
|
-
* http://opensource.org/licenses/mit-license
|
|
156
|
-
*/function pa(n,t){if(this.pos=0,this.buffer=n,this.datav=new DataView(n.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 TI(n){function t(Q){if(!Q)throw Error("assert :P")}function e(Q,W,U){for(var D=0;4>D;D++)if(Q[W+D]!=U.charCodeAt(D))return!0;return!1}function r(Q,W,U,D,j){for(var V=0;V<j;V++)Q[W+V]=U[D+V]}function i(Q,W,U,D){for(var j=0;j<D;j++)Q[W+j]=U}function s(Q){return new Int32Array(Q)}function A(Q,W){for(var U=[],D=0;D<Q;D++)U.push(new W);return U}function a(Q,W){var U=[];return function D(j,V,st){for(var rt=st[V],it=0;it<rt&&(j.push(st.length>V+1?[]:new W),!(st.length<V+1));it++)D(j[it],V+1,st)}(U,0,Q),U}var o=function(){var Q=this;function W(g,v){for(var x=1<<v-1>>>0;g&x;)x>>>=1;return x?(g&x-1)+x:g}function U(g,v,x,F,P){t(!(F%x));do g[v+(F-=x)]=P;while(0<F)}function D(g,v,x,F,P){if(t(2328>=P),512>=P)var O=s(512);else if((O=s(P))==null)return 0;return function(R,K,G,Y,at,pt){var J,lt,ft=K,Bt=1<<G,gt=s(16),Ct=s(16);for(t(at!=0),t(Y!=null),t(R!=null),t(0<G),lt=0;lt<at;++lt){if(15<Y[lt])return 0;++gt[Y[lt]]}if(gt[0]==at)return 0;for(Ct[1]=0,J=1;15>J;++J){if(gt[J]>1<<J)return 0;Ct[J+1]=Ct[J]+gt[J]}for(lt=0;lt<at;++lt)J=Y[lt],0<Y[lt]&&(pt[Ct[J]++]=lt);if(Ct[15]==1)return(Y=new j).g=0,Y.value=pt[0],U(R,ft,1,Bt,Y),Bt;var Et,Ut=-1,_t=Bt-1,he=0,Yt=1,Ve=1,ae=1<<G;for(lt=0,J=1,at=2;J<=G;++J,at<<=1){if(Yt+=Ve<<=1,0>(Ve-=gt[J]))return 0;for(;0<gt[J];--gt[J])(Y=new j).g=J,Y.value=pt[lt++],U(R,ft+he,at,ae,Y),he=W(he,J)}for(J=G+1,at=2;15>=J;++J,at<<=1){if(Yt+=Ve<<=1,0>(Ve-=gt[J]))return 0;for(;0<gt[J];--gt[J]){if(Y=new j,(he&_t)!=Ut){for(ft+=ae,Et=1<<(Ut=J)-G;15>Ut&&!(0>=(Et-=gt[Ut]));)++Ut,Et<<=1;Bt+=ae=1<<(Et=Ut-G),R[K+(Ut=he&_t)].g=Et+G,R[K+Ut].value=ft-K-Ut}Y.g=J-G,Y.value=pt[lt++],U(R,ft+(he>>G),at,ae,Y),he=W(he,J)}}return Yt!=2*Ct[15]-1?0:Bt}(g,v,x,F,P,O)}function j(){this.value=this.g=0}function V(){this.value=this.g=0}function st(){this.G=A(5,j),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=A(B0,V)}function rt(g,v,x,F){t(g!=null),t(v!=null),t(2147483648>F),g.Ca=254,g.I=0,g.b=-8,g.Ka=0,g.oa=v,g.pa=x,g.Jd=v,g.Yc=x+F,g.Zc=4<=F?x+F-4+1:x,dt(g)}function it(g,v){for(var x=0;0<v--;)x|=yt(g,128)<<v;return x}function At(g,v){var x=it(g,v);return wt(g)?-x:x}function ut(g,v,x,F){var P,O=0;for(t(g!=null),t(v!=null),t(4294967288>F),g.Sb=F,g.Ra=0,g.u=0,g.h=0,4<F&&(F=4),P=0;P<F;++P)O+=v[x+P]<<8*P;g.Ra=O,g.bb=F,g.oa=v,g.pa=x}function vt(g){for(;8<=g.u&&g.bb<g.Sb;)g.Ra>>>=8,g.Ra+=g.oa[g.pa+g.bb]<<Us-8>>>0,++g.bb,g.u-=8;tt(g)&&(g.h=1,g.u=0)}function mt(g,v){if(t(0<=v),!g.h&&v<=hw){var x=q(g)&Bd[v];return g.u+=v,vt(g),x}return g.h=1,g.u=0}function M(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function $(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function q(g){return g.Ra>>>(g.u&Us-1)>>>0}function tt(g){return t(g.bb<=g.Sb),g.h||g.bb==g.Sb&&g.u>Us}function et(g,v){g.u=v,g.h=tt(g)}function ot(g){g.u>=qs&&(t(g.u>=qs),vt(g))}function dt(g){t(g!=null&&g.oa!=null),g.pa<g.Zc?(g.I=(g.oa[g.pa++]|g.I<<8)>>>0,g.b+=8):(t(g!=null&&g.oa!=null),g.pa<g.Yc?(g.b+=8,g.I=g.oa[g.pa++]|g.I<<8):g.Ka?g.b=0:(g.I<<=8,g.b+=8,g.Ka=1))}function wt(g){return it(g,1)}function yt(g,v){var x=g.Ca;0>g.b&&dt(g);var F=g.b,P=x*v>>>8,O=(g.I>>>F>P)+0;for(O?(x-=P,g.I-=P+1<<F>>>0):x=P+1,F=x,P=0;256<=F;)P+=8,F>>=8;return F=7^P+C0[F],g.b-=F,g.Ca=(x<<F)-1,O}function St(g,v,x){g[v+0]=x>>24&255,g[v+1]=x>>16&255,g[v+2]=x>>8&255,g[v+3]=255&x}function Mt(g,v){return g[v+0]|g[v+1]<<8}function Pt(g,v){return Mt(g,v)|g[v+2]<<16}function $t(g,v){return Mt(g,v)|Mt(g,v+2)<<16}function z(g,v){var x=1<<v;return t(g!=null),t(0<v),g.X=s(x),g.X==null?0:(g.Mb=32-v,g.Xa=v,1)}function Nt(g,v){t(g!=null),t(v!=null),t(g.Xa==v.Xa),r(v.X,0,g.X,0,1<<v.Xa)}function ve(){this.X=[],this.Xa=this.Mb=0}function re(g,v,x,F){t(x!=null),t(F!=null);var P=x[0],O=F[0];return P==0&&(P=(g*O+v/2)/v),O==0&&(O=(v*P+g/2)/g),0>=P||0>=O?0:(x[0]=P,F[0]=O,1)}function Tt(g,v){return g+(1<<v)-1>>>v}function ie(g,v){return((4278255360&g)+(4278255360&v)>>>0&4278255360)+((16711935&g)+(16711935&v)>>>0&16711935)>>>0}function kt(g,v){Q[v]=function(x,F,P,O,R,K,G){var Y;for(Y=0;Y<R;++Y){var at=Q[g](K[G+Y-1],P,O+Y);K[G+Y]=ie(x[F+Y],at)}}}function qt(){this.ud=this.hd=this.jd=0}function zt(g,v){return((4278124286&(g^v))>>>1)+(g&v)>>>0}function we(g){return 0<=g&&256>g?g:0>g?0:255<g?255:void 0}function Ne(g,v){return we(g+(g-v+.5>>1))}function me(g,v,x){return Math.abs(v-x)-Math.abs(g-x)}function Pe(g,v,x,F,P,O,R){for(F=O[R-1],x=0;x<P;++x)O[R+x]=F=ie(g[v+x],F)}function Ce(g,v,x,F,P){var O;for(O=0;O<x;++O){var R=g[v+O],K=R>>8&255,G=16711935&(G=(G=16711935&R)+((K<<16)+K));F[P+O]=(4278255360&R)+G>>>0}}function Vt(g,v){v.jd=255&g,v.hd=g>>8&255,v.ud=g>>16&255}function ce(g,v,x,F,P,O){var R;for(R=0;R<F;++R){var K=v[x+R],G=K>>>8,Y=K,at=255&(at=(at=K>>>16)+((g.jd<<24>>24)*(G<<24>>24)>>>5));Y=255&(Y=(Y+=(g.hd<<24>>24)*(G<<24>>24)>>>5)+((g.ud<<24>>24)*(at<<24>>24)>>>5)),P[O+R]=(4278255360&K)+(at<<16)+Y}}function Xt(g,v,x,F,P){Q[v]=function(O,R,K,G,Y,at,pt,J,lt){for(G=pt;G<J;++G)for(pt=0;pt<lt;++pt)Y[at++]=P(K[F(O[R++])])},Q[g]=function(O,R,K,G,Y,at,pt){var J=8>>O.b,lt=O.Ea,ft=O.K[0],Bt=O.w;if(8>J)for(O=(1<<O.b)-1,Bt=(1<<J)-1;R<K;++R){var gt,Ct=0;for(gt=0;gt<lt;++gt)gt&O||(Ct=F(G[Y++])),at[pt++]=P(ft[Ct&Bt]),Ct>>=J}else Q["VP8LMapColor"+x](G,Y,ft,Bt,at,pt,R,K,lt)}}function vr(g,v,x,F,P){for(x=v+x;v<x;){var O=g[v++];F[P++]=O>>16&255,F[P++]=O>>8&255,F[P++]=255&O}}function je(g,v,x,F,P){for(x=v+x;v<x;){var O=g[v++];F[P++]=O>>16&255,F[P++]=O>>8&255,F[P++]=255&O,F[P++]=O>>24&255}}function xe(g,v,x,F,P){for(x=v+x;v<x;){var O=(R=g[v++])>>16&240|R>>12&15,R=240&R|R>>28&15;F[P++]=O,F[P++]=R}}function Ee(g,v,x,F,P){for(x=v+x;v<x;){var O=(R=g[v++])>>16&248|R>>13&7,R=R>>5&224|R>>3&31;F[P++]=O,F[P++]=R}}function nr(g,v,x,F,P){for(x=v+x;v<x;){var O=g[v++];F[P++]=255&O,F[P++]=O>>8&255,F[P++]=O>>16&255}}function ne(g,v,x,F,P,O){if(O==0)for(x=v+x;v<x;)St(F,((O=g[v++])[0]>>24|O[1]>>8&65280|O[2]<<8&16711680|O[3]<<24)>>>0),P+=32;else r(F,P,g,v,x)}function He(g,v){Q[v][0]=Q[g+"0"],Q[v][1]=Q[g+"1"],Q[v][2]=Q[g+"2"],Q[v][3]=Q[g+"3"],Q[v][4]=Q[g+"4"],Q[v][5]=Q[g+"5"],Q[v][6]=Q[g+"6"],Q[v][7]=Q[g+"7"],Q[v][8]=Q[g+"8"],Q[v][9]=Q[g+"9"],Q[v][10]=Q[g+"10"],Q[v][11]=Q[g+"11"],Q[v][12]=Q[g+"12"],Q[v][13]=Q[g+"13"],Q[v][14]=Q[g+"0"],Q[v][15]=Q[g+"0"]}function Ae(g){return g==f4||g==d4||g==kB||g==g4}function ge(){this.eb=[],this.size=this.A=this.fb=0}function ar(){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 fe(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ge,this.f.kb=new ar,this.sd=null}function de(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ze(){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 lc(g){return alert("todo:WebPSamplerProcessPlane"),g.T}function bi(g,v){var x=g.T,F=v.ba.f.RGBA,P=F.eb,O=F.fb+g.ka*F.A,R=fa[v.ba.S],K=g.y,G=g.O,Y=g.f,at=g.N,pt=g.ea,J=g.W,lt=v.cc,ft=v.dc,Bt=v.Mc,gt=v.Nc,Ct=g.ka,Et=g.ka+g.T,Ut=g.U,_t=Ut+1>>1;for(Ct==0?R(K,G,null,null,Y,at,pt,J,Y,at,pt,J,P,O,null,null,Ut):(R(v.ec,v.fc,K,G,lt,ft,Bt,gt,Y,at,pt,J,P,O-F.A,P,O,Ut),++x);Ct+2<Et;Ct+=2)lt=Y,ft=at,Bt=pt,gt=J,at+=g.Rc,J+=g.Rc,O+=2*F.A,R(K,(G+=2*g.fa)-g.fa,K,G,lt,ft,Bt,gt,Y,at,pt,J,P,O-F.A,P,O,Ut);return G+=g.fa,g.j+Et<g.o?(r(v.ec,v.fc,K,G,Ut),r(v.cc,v.dc,Y,at,_t),r(v.Mc,v.Nc,pt,J,_t),x--):1&Et||R(K,G,null,null,Y,at,pt,J,Y,at,pt,J,P,O+F.A,null,null,Ut),x}function za(g,v,x){var F=g.F,P=[g.J];if(F!=null){var O=g.U,R=v.ba.S,K=R==MB||R==kB;v=v.ba.f.RGBA;var G=[0],Y=g.ka;G[0]=g.T,g.Kb&&(Y==0?--G[0]:(--Y,P[0]-=g.width),g.j+g.ka+g.T==g.o&&(G[0]=g.o-g.j-Y));var at=v.eb;Y=v.fb+Y*v.A,g=QO(F,P[0],g.width,O,G,at,Y+(K?0:3),v.A),t(x==G),g&&Ae(R)&&gw(at,Y,K,O,G,v.A)}return 0}function la(g){var v=g.ma,x=v.ba.S,F=11>x,P=x==NB||x==PB||x==MB||x==u4||x==12||Ae(x);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!ha(v.Oa,g,P?11:12))return 0;if(P&&Ae(x)&&mc(),g.da)alert("todo:use_scaling");else{if(F){if(v.Ib=lc,g.Kb){if(x=g.U+1>>1,v.memory=s(g.U+2*x),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+g.U,v.Mc=v.cc,v.Nc=v.dc+x,v.Ib=bi,mc()}}else alert("todo:EmitYUV");P&&(v.Jb=za,F&&li())}if(F&&!XO){for(g=0;256>g;++g)pat[g]=89858*(g-128)+DB>>OB,wat[g]=-22014*(g-128)+DB,vat[g]=-45773*(g-128),mat[g]=113618*(g-128)+DB>>OB;for(g=mw;g<v4;++g)v=76283*(g-16)+DB>>OB,yat[g-mw]=ki(v,255),bat[g-mw]=ki(v+8>>4,15);XO=1}return 1}function Kt(g){var v=g.ma,x=g.U,F=g.T;return t(!(1&g.ka)),0>=x||0>=F?0:(x=v.Ib(g,v),v.Jb!=null&&v.Jb(g,v,x),v.Dc+=x,1)}function ss(g){g.ma.memory=null}function Xa(g,v,x,F){return mt(g,8)!=47?0:(v[0]=mt(g,14)+1,x[0]=mt(g,14)+1,F[0]=mt(g,1),mt(g,3)!=0?0:!g.h)}function _s(g,v){if(4>g)return g+1;var x=g-2>>1;return(2+(1&g)<<x)+mt(v,x)+1}function As(g,v){return 120<v?v-120:1<=(x=((x=rat[v-1])>>4)*g+(8-(15&x)))?x:1;var x}function zr(g,v,x){var F=q(x),P=g[v+=255&F].g-8;return 0<P&&(et(x,x.u+8),F=q(x),v+=g[v].value,v+=F&(1<<P)-1),et(x,x.u+g[v].g),g[v].value}function Mi(g,v,x){return x.g+=g.g,x.value+=g.value<<v>>>0,t(8>=x.g),g.g}function nn(g,v,x){var F=g.xc;return t((v=F==0?0:g.vc[g.md*(x>>F)+(v>>F)])<g.Wb),g.Ya[v]}function sn(g,v,x,F){var P=g.ab,O=g.c*v,R=g.C;v=R+v;var K=x,G=F;for(F=g.Ta,x=g.Ua;0<P--;){var Y=g.gc[P],at=R,pt=v,J=K,lt=G,ft=(G=F,K=x,Y.Ea);switch(t(at<pt),t(pt<=Y.nc),Y.hc){case 2:x0(J,lt,(pt-at)*ft,G,K);break;case 0:var Bt=at,gt=pt,Ct=G,Et=K,Ut=(ae=Y).Ea;Bt==0&&(Yh(J,lt,null,null,1,Ct,Et),Pe(J,lt+1,0,0,Ut-1,Ct,Et+1),lt+=Ut,Et+=Ut,++Bt);for(var _t=1<<ae.b,he=_t-1,Yt=Tt(Ut,ae.b),Ve=ae.K,ae=ae.w+(Bt>>ae.b)*Yt;Bt<gt;){var Je=Ve,an=ae,Ge=1;for(Jh(J,lt,Ct,Et-Ut,1,Ct,Et);Ge<Ut;){var oe=(Ge&~he)+_t;oe>Ut&&(oe=Ut),(0,Ya[Je[an++]>>8&15])(J,lt+ +Ge,Ct,Et+Ge-Ut,oe-Ge,Ct,Et+Ge),Ge=oe}lt+=Ut,Et+=Ut,++Bt&he||(ae+=Yt)}pt!=Y.nc&&r(G,K-ft,G,K+(pt-at-1)*ft,ft);break;case 1:for(ft=J,gt=lt,Ut=(J=Y.Ea)-(Et=J&~(Ct=(lt=1<<Y.b)-1)),Bt=Tt(J,Y.b),_t=Y.K,Y=Y.w+(at>>Y.b)*Bt;at<pt;){for(he=_t,Yt=Y,Ve=new qt,ae=gt+Et,Je=gt+J;gt<ae;)Vt(he[Yt++],Ve),xd(Ve,ft,gt,lt,G,K),gt+=lt,K+=lt;gt<Je&&(Vt(he[Yt++],Ve),xd(Ve,ft,gt,Ut,G,K),gt+=Ut,K+=Ut),++at&Ct||(Y+=Bt)}break;case 3:if(J==G&<==K&&0<Y.b){for(gt=G,J=ft=K+(pt-at)*ft-(Et=(pt-at)*Tt(Y.Ea,Y.b)),lt=G,Ct=K,Bt=[],Et=(Ut=Et)-1;0<=Et;--Et)Bt[Et]=lt[Ct+Et];for(Et=Ut-1;0<=Et;--Et)gt[J+Et]=Bt[Et];Cd(Y,at,pt,G,ft,G,K)}else Cd(Y,at,pt,J,lt,G,K)}K=F,G=x}G!=x&&r(F,x,K,G,O)}function as(g,v){var x=g.V,F=g.Ba+g.c*g.C,P=v-g.C;if(t(v<=g.l.o),t(16>=P),0<P){var O=g.l,R=g.Ta,K=g.Ua,G=O.width;if(sn(g,P,x,F),P=K=[K],t((x=g.C)<(F=v)),t(O.v<O.va),F>O.o&&(F=O.o),x<O.j){var Y=O.j-x;x=O.j,P[0]+=Y*G}if(x>=F?x=0:(P[0]+=4*O.v,O.ka=x-O.j,O.U=O.va-O.v,O.T=F-x,x=1),x){if(K=K[0],11>(x=g.ca).S){var at=x.f.RGBA,pt=(F=x.S,P=O.U,O=O.T,Y=at.eb,at.A),J=O;for(at=at.fb+g.Ma*at.A;0<J--;){var lt=R,ft=K,Bt=P,gt=Y,Ct=at;switch(F){case QB:uw(lt,ft,Bt,gt,Ct);break;case NB:fw(lt,ft,Bt,gt,Ct);break;case f4:fw(lt,ft,Bt,gt,Ct),gw(gt,Ct,0,Bt,1,0);break;case RO:Sd(lt,ft,Bt,gt,Ct);break;case PB:ne(lt,ft,Bt,gt,Ct,1);break;case d4:ne(lt,ft,Bt,gt,Ct,1),gw(gt,Ct,0,Bt,1,0);break;case MB:ne(lt,ft,Bt,gt,Ct,0);break;case kB:ne(lt,ft,Bt,gt,Ct,0),gw(gt,Ct,1,Bt,1,0);break;case u4:E0(lt,ft,Bt,gt,Ct);break;case g4:E0(lt,ft,Bt,gt,Ct),LO(gt,Ct,Bt,1,0);break;case HO:Ed(lt,ft,Bt,gt,Ct);break;default:t(0)}K+=G,at+=pt}g.Ma+=O}else alert("todo:EmitRescaledRowsYUVA");t(g.Ma<=x.height)}}g.C=v,t(g.C<=g.i)}function zs(g){var v;if(0<g.ua)return 0;for(v=0;v<g.Wb;++v){var x=g.Ya[v].G,F=g.Ya[v].H;if(0<x[1][F[1]+0].g||0<x[2][F[2]+0].g||0<x[3][F[3]+0].g)return 0}return 1}function _A(g,v,x,F,P,O){if(g.Z!=0){var R=g.qd,K=g.rd;for(t(ru[g.Z]!=null);v<x;++v)ru[g.Z](R,K,F,P,F,P,O),R=F,K=P,P+=O;g.qd=R,g.rd=K}}function Xs(g,v){var x=g.l.ma,F=x.Z==0||x.Z==1?g.l.j:g.C;if(F=g.C<F?F:g.C,t(v<=g.l.o),v>F){var P=g.l.width,O=x.ca,R=x.tb+P*F,K=g.V,G=g.Ba+g.c*F,Y=g.gc;t(g.ab==1),t(Y[0].hc==3),c4(Y[0],F,v,K,G,O,R),_A(x,F,v,O,R,P)}g.C=g.Ma=v}function os(g,v,x,F,P,O,R){var K=g.$/F,G=g.$%F,Y=g.m,at=g.s,pt=x+g.$,J=pt;P=x+F*P;var lt=x+F*O,ft=280+at.ua,Bt=g.Pb?K:16777216,gt=0<at.ua?at.Wa:null,Ct=at.wc,Et=pt<lt?nn(at,G,K):null;t(g.C<O),t(lt<=P);var Ut=!1;t:for(;;){for(;Ut||pt<lt;){var _t=0;if(K>=Bt){var he=pt-x;t((Bt=g).Pb),Bt.wd=Bt.m,Bt.xd=he,0<Bt.s.ua&&Nt(Bt.s.Wa,Bt.s.vb),Bt=K+nat}if(G&Ct||(Et=nn(at,G,K)),t(Et!=null),Et.Qb&&(v[pt]=Et.qb,Ut=!0),!Ut)if(ot(Y),Et.jc){_t=Y,he=v;var Yt=pt,Ve=Et.pd[q(_t)&B0-1];t(Et.jc),256>Ve.g?(et(_t,_t.u+Ve.g),he[Yt]=Ve.value,_t=0):(et(_t,_t.u+Ve.g-256),t(256<=Ve.value),_t=Ve.value),_t==0&&(Ut=!0)}else _t=zr(Et.G[0],Et.H[0],Y);if(Y.h)break;if(Ut||256>_t){if(!Ut)if(Et.nd)v[pt]=(Et.qb|_t<<8)>>>0;else{if(ot(Y),Ut=zr(Et.G[1],Et.H[1],Y),ot(Y),he=zr(Et.G[2],Et.H[2],Y),Yt=zr(Et.G[3],Et.H[3],Y),Y.h)break;v[pt]=(Yt<<24|Ut<<16|_t<<8|he)>>>0}if(Ut=!1,++pt,++G>=F&&(G=0,++K,R!=null&&K<=O&&!(K%16)&&R(g,K),gt!=null))for(;J<pt;)_t=v[J++],gt.X[(506832829*_t&4294967295)>>>gt.Mb]=_t}else if(280>_t){if(_t=_s(_t-256,Y),he=zr(Et.G[4],Et.H[4],Y),ot(Y),he=As(F,he=_s(he,Y)),Y.h)break;if(pt-x<he||P-pt<_t)break t;for(Yt=0;Yt<_t;++Yt)v[pt+Yt]=v[pt+Yt-he];for(pt+=_t,G+=_t;G>=F;)G-=F,++K,R!=null&&K<=O&&!(K%16)&&R(g,K);if(t(pt<=P),G&Ct&&(Et=nn(at,G,K)),gt!=null)for(;J<pt;)_t=v[J++],gt.X[(506832829*_t&4294967295)>>>gt.Mb]=_t}else{if(!(_t<ft))break t;for(Ut=_t-280,t(gt!=null);J<pt;)_t=v[J++],gt.X[(506832829*_t&4294967295)>>>gt.Mb]=_t;_t=pt,t(!(Ut>>>(he=gt).Xa)),v[_t]=he.X[Ut],Ut=!0}Ut||t(Y.h==tt(Y))}if(g.Pb&&Y.h&&pt<P)t(g.m.h),g.a=5,g.m=g.wd,g.$=g.xd,0<g.s.ua&&Nt(g.s.vb,g.s.Wa);else{if(Y.h)break t;R!=null&&R(g,K>O?O:K),g.a=0,g.$=pt-x}return 1}return g.a=3,0}function Bn(g){t(g!=null),g.vc=null,g.yc=null,g.Ya=null;var v=g.Wa;v!=null&&(v.X=null),g.vb=null,t(g!=null)}function ca(){var g=new se;return g==null?null:(g.a=0,g.xb=GO,He("Predictor","VP8LPredictors"),He("Predictor","VP8LPredictors_C"),He("PredictorAdd","VP8LPredictorsAdd"),He("PredictorAdd","VP8LPredictorsAdd_C"),x0=Ce,xd=ce,uw=vr,fw=je,E0=xe,Ed=Ee,Sd=nr,Q.VP8LMapColor32b=qi,Q.VP8LMapColor8b=zo,g)}function zi(g,v,x,F,P){var O=1,R=[g],K=[v],G=F.m,Y=F.s,at=null,pt=0;t:for(;;){if(x)for(;O&&mt(G,1);){var J=R,lt=K,ft=F,Bt=1,gt=ft.m,Ct=ft.gc[ft.ab],Et=mt(gt,2);if(ft.Oc&1<<Et)O=0;else{switch(ft.Oc|=1<<Et,Ct.hc=Et,Ct.Ea=J[0],Ct.nc=lt[0],Ct.K=[null],++ft.ab,t(4>=ft.ab),Et){case 0:case 1:Ct.b=mt(gt,3)+2,Bt=zi(Tt(Ct.Ea,Ct.b),Tt(Ct.nc,Ct.b),0,ft,Ct.K),Ct.K=Ct.K[0];break;case 3:var Ut,_t=mt(gt,8)+1,he=16<_t?0:4<_t?1:2<_t?2:3;if(J[0]=Tt(Ct.Ea,he),Ct.b=he,Ut=Bt=zi(_t,1,0,ft,Ct.K)){var Yt,Ve=_t,ae=Ct,Je=1<<(8>>ae.b),an=s(Je);if(an==null)Ut=0;else{var Ge=ae.K[0],oe=ae.w;for(an[0]=ae.K[0][0],Yt=1;Yt<1*Ve;++Yt)an[Yt]=ie(Ge[oe+Yt],an[Yt-1]);for(;Yt<4*Je;++Yt)an[Yt]=0;ae.K[0]=null,ae.K[0]=an,Ut=1}}Bt=Ut;break;case 2:break;default:t(0)}O=Bt}}if(R=R[0],K=K[0],O&&mt(G,1)&&!(O=1<=(pt=mt(G,4))&&11>=pt)){F.a=3;break t}var Ot;if(Ot=O)e:{var Di,ke,er,qr=F,Hn=R,Ls=K,Bi=pt,us=x,Qs=qr.m,on=qr.s,sr=[null],wr=1,Ci=0,yr=iat[Bi];r:for(;;){if(us&&mt(Qs,1)){var Kn=mt(Qs,3)+2,Za=Tt(Hn,Kn),Ri=Tt(Ls,Kn),Ys=Za*Ri;if(!zi(Za,Ri,0,qr,sr))break r;for(sr=sr[0],on.xc=Kn,Di=0;Di<Ys;++Di){var Pr=sr[Di]>>8&65535;sr[Di]=Pr,Pr>=wr&&(wr=Pr+1)}}if(Qs.h)break r;for(ke=0;5>ke;++ke){var ln=KO[ke];!ke&&0<Bi&&(ln+=1<<Bi),Ci<ln&&(Ci=ln)}var QA=A(wr*yr,j),Ns=wr,NA=A(Ns,st);if(NA==null)var PA=null;else t(65536>=Ns),PA=NA;var Js=s(Ci);if(PA==null||Js==null||QA==null){qr.a=1;break r}var MA=QA;for(Di=er=0;Di<wr;++Di){var Kr=PA[Di],kA=Kr.G,to=Kr.H,Fd=0,bc=1,Vn=0;for(ke=0;5>ke;++ke){ln=KO[ke],kA[ke]=MA,to[ke]=er,!ke&&0<Bi&&(ln+=1<<Bi);n:{var HB,w4=ln,KB=qr,vw=Js,xat=MA,Eat=er,y4=0,iu=KB.m,Sat=mt(iu,1);if(i(vw,0,0,w4),Sat){var Fat=mt(iu,1)+1,Tat=mt(iu,1),JO=mt(iu,Tat==0?1:8);vw[JO]=1,Fat==2&&(vw[JO=mt(iu,8)]=1);var VB=1}else{var ZO=s(19),tD=mt(iu,4)+4;if(19<tD){KB.a=3;var GB=0;break n}for(HB=0;HB<tD;++HB)ZO[eat[HB]]=mt(iu,3);var b4=void 0,ww=void 0,eD=KB,_at=ZO,jB=w4,rD=vw,B4=0,nu=eD.m,iD=8,nD=A(128,j);i:for(;D(nD,0,7,_at,19);){if(mt(nu,1)){var Iat=2+2*mt(nu,3);if((b4=2+mt(nu,Iat))>jB)break i}else b4=jB;for(ww=0;ww<jB&&b4--;){ot(nu);var sD=nD[0+(127&q(nu))];et(nu,nu.u+sD.g);var T0=sD.value;if(16>T0)rD[ww++]=T0,T0!=0&&(iD=T0);else{var Uat=T0==16,AD=T0-16,Lat=ZAt[AD],aD=mt(nu,JAt[AD])+Lat;if(ww+aD>jB)break i;for(var Qat=Uat?iD:0;0<aD--;)rD[ww++]=Qat}}B4=1;break i}B4||(eD.a=3),VB=B4}(VB=VB&&!iu.h)&&(y4=D(xat,Eat,8,vw,w4)),VB&&y4!=0?GB=y4:(KB.a=3,GB=0)}if(GB==0)break r;if(bc&&tat[ke]==1&&(bc=MA[er].g==0),Fd+=MA[er].g,er+=GB,3>=ke){var yw,C4=Js[0];for(yw=1;yw<ln;++yw)Js[yw]>C4&&(C4=Js[yw]);Vn+=C4}}if(Kr.nd=bc,Kr.Qb=0,bc&&(Kr.qb=(kA[3][to[3]+0].value<<24|kA[1][to[1]+0].value<<16|kA[2][to[2]+0].value)>>>0,Fd==0&&256>kA[0][to[0]+0].value&&(Kr.Qb=1,Kr.qb+=kA[0][to[0]+0].value<<8)),Kr.jc=!Kr.Qb&&6>Vn,Kr.jc){var $B,Bc=Kr;for($B=0;$B<B0;++$B){var su=$B,Au=Bc.pd[su],WB=Bc.G[0][Bc.H[0]+su];256<=WB.value?(Au.g=WB.g+256,Au.value=WB.value):(Au.g=0,Au.value=0,su>>=Mi(WB,8,Au),su>>=Mi(Bc.G[1][Bc.H[1]+su],16,Au),su>>=Mi(Bc.G[2][Bc.H[2]+su],0,Au),Mi(Bc.G[3][Bc.H[3]+su],24,Au))}}}on.vc=sr,on.Wb=wr,on.Ya=PA,on.yc=QA,Ot=1;break e}Ot=0}if(!(O=Ot)){F.a=3;break t}if(0<pt){if(Y.ua=1<<pt,!z(Y.Wa,pt)){F.a=1,O=0;break t}}else Y.ua=0;var x4=F,oD=R,Nat=K,E4=x4.s,S4=E4.xc;if(x4.c=oD,x4.i=Nat,E4.md=Tt(oD,S4),E4.wc=S4==0?-1:(1<<S4)-1,x){F.xb=hat;break t}if((at=s(R*K))==null){F.a=1,O=0;break t}O=(O=os(F,at,0,R,K,K,null))&&!G.h;break t}return O?(P!=null?P[0]=at:(t(at==null),t(x)),F.$=0,x||Bn(Y)):Bn(Y),O}function Vo(g,v){var x=g.c*g.i,F=x+v+16*v;return t(g.c<=v),g.V=s(F),g.V==null?(g.Ta=null,g.Ua=0,g.a=1,0):(g.Ta=g.V,g.Ua=g.Ba+x+v,1)}function cc(g,v){var x=g.C,F=v-x,P=g.V,O=g.Ba+g.c*x;for(t(v<=g.l.o);0<F;){var R=16<F?16:F,K=g.l.ma,G=g.l.width,Y=G*R,at=K.ca,pt=K.tb+G*x,J=g.Ta,lt=g.Ua;sn(g,R,P,O),NO(J,lt,at,pt,Y),_A(K,x,x+R,at,pt,G),F-=R,P+=R*g.c,x+=R}t(x==v),g.C=g.Ma=v}function $h(){this.ub=this.yd=this.td=this.Rb=0}function hc(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function c0(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Go(){this.Yb=function(){var g=[];return function v(x,F,P){for(var O=P[F],R=0;R<O&&(x.push(P.length>F+1?[]:0),!(P.length<F+1));R++)v(x[R],F+1,P)}(g,0,[3,11]),g}()}function qa(){this.jb=s(3),this.Wc=a([4,8],Go),this.Xc=a([4,17],Go)}function Zt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Z(){this.ld=this.La=this.dd=this.tc=0}function xt(){this.Na=this.la=0}function Rt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qe(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ke(){this.uc=this.M=this.Nb=0,this.wa=Array(new Z),this.Y=0,this.ya=Array(new qe),this.aa=0,this.l=new Cn}function dr(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Dn(){this.cb=this.a=0,this.sc="",this.m=new M,this.Od=new $h,this.Kc=new hc,this.ed=new Zt,this.Qa=new c0,this.Ic=this.$c=this.Aa=0,this.D=new Ke,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=A(8,M),this.ia=0,this.pb=A(4,Rt),this.Pa=new qa,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new dr),this.Hd=0,this.rb=Array(new xt),this.sb=0,this.wa=Array(new Z),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 qe),this.L=this.aa=0,this.gd=a([4,2],Z),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 ki(g,v){return 0>g?0:g>v?v:g}function Cn(){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 hd(){var g=new Dn;return g!=null&&(g.a=0,g.sc="OK",g.cb=0,g.Xb=0,pw||(pw=h0)),g}function $e(g,v,x){return g.a==0&&(g.a=v,g.sc=x,g.cb=0),0}function ud(g,v,x){return 3<=x&&g[v+0]==157&&g[v+1]==1&&g[v+2]==42}function IA(g,v){if(g==null)return 0;if(g.a=0,g.sc="OK",v==null)return $e(g,2,"null VP8Io passed to VP8GetHeaders()");var x=v.data,F=v.w,P=v.ha;if(4>P)return $e(g,7,"Truncated header.");var O=x[F+0]|x[F+1]<<8|x[F+2]<<16,R=g.Od;if(R.Rb=!(1&O),R.td=O>>1&7,R.yd=O>>4&1,R.ub=O>>5,3<R.td)return $e(g,3,"Incorrect keyframe parameters.");if(!R.yd)return $e(g,4,"Frame not displayable.");F+=3,P-=3;var K=g.Kc;if(R.Rb){if(7>P)return $e(g,7,"cannot parse picture header");if(!ud(x,F,P))return $e(g,3,"Bad code word");K.c=16383&(x[F+4]<<8|x[F+3]),K.Td=x[F+4]>>6,K.i=16383&(x[F+6]<<8|x[F+5]),K.Ud=x[F+6]>>6,F+=7,P-=7,g.za=K.c+15>>4,g.Ub=K.i+15>>4,v.width=K.c,v.height=K.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,i((O=g.Pa).jb,0,255,O.jb.length),t((O=g.Qa)!=null),O.Cb=0,O.Bb=0,O.Fb=1,i(O.Zb,0,0,O.Zb.length),i(O.Lb,0,0,O.Lb)}if(R.ub>P)return $e(g,7,"bad partition length");rt(O=g.m,x,F,R.ub),F+=R.ub,P-=R.ub,R.Rb&&(K.Ld=wt(O),K.Kd=wt(O)),K=g.Qa;var G,Y=g.Pa;if(t(O!=null),t(K!=null),K.Cb=wt(O),K.Cb){if(K.Bb=wt(O),wt(O)){for(K.Fb=wt(O),G=0;4>G;++G)K.Zb[G]=wt(O)?At(O,7):0;for(G=0;4>G;++G)K.Lb[G]=wt(O)?At(O,6):0}if(K.Bb)for(G=0;3>G;++G)Y.jb[G]=wt(O)?it(O,8):255}else K.Bb=0;if(O.Ka)return $e(g,3,"cannot parse segment header");if((K=g.ed).zd=wt(O),K.Tb=it(O,6),K.wb=it(O,3),K.Pc=wt(O),K.Pc&&wt(O)){for(Y=0;4>Y;++Y)wt(O)&&(K.vd[Y]=At(O,6));for(Y=0;4>Y;++Y)wt(O)&&(K.od[Y]=At(O,6))}if(g.L=K.Tb==0?0:K.zd?1:2,O.Ka)return $e(g,3,"cannot parse filter header");var at=P;if(P=G=F,F=G+at,K=at,g.Xb=(1<<it(g.m,2))-1,at<3*(Y=g.Xb))x=7;else{for(G+=3*Y,K-=3*Y,at=0;at<Y;++at){var pt=x[P+0]|x[P+1]<<8|x[P+2]<<16;pt>K&&(pt=K),rt(g.Jc[+at],x,G,pt),G+=pt,K-=pt,P+=3}rt(g.Jc[+Y],x,G,K),x=G<F?0:5}if(x!=0)return $e(g,x,"cannot parse partitions");for(x=it(G=g.m,7),P=wt(G)?At(G,4):0,F=wt(G)?At(G,4):0,K=wt(G)?At(G,4):0,Y=wt(G)?At(G,4):0,G=wt(G)?At(G,4):0,at=g.Qa,pt=0;4>pt;++pt){if(at.Cb){var J=at.Zb[pt];at.Fb||(J+=x)}else{if(0<pt){g.pb[pt]=g.pb[0];continue}J=x}var lt=g.pb[pt];lt.Sc[0]=p4[ki(J+P,127)],lt.Sc[1]=m4[ki(J+0,127)],lt.Eb[0]=2*p4[ki(J+F,127)],lt.Eb[1]=101581*m4[ki(J+K,127)]>>16,8>lt.Eb[1]&&(lt.Eb[1]=8),lt.Qc[0]=p4[ki(J+Y,117)],lt.Qc[1]=m4[ki(J+G,127)],lt.lc=J+G}if(!R.Rb)return $e(g,4,"Not a key frame.");for(wt(O),R=g.Pa,x=0;4>x;++x){for(P=0;8>P;++P)for(F=0;3>F;++F)for(K=0;11>K;++K)Y=yt(O,lat[x][P][F][K])?it(O,8):aat[x][P][F][K],R.Wc[x][P].Yb[F][K]=Y;for(P=0;17>P;++P)R.Xc[x][P]=R.Wc[x][cat[P]]}return g.kc=wt(O),g.kc&&(g.Bd=it(O,8)),g.cb=1}function h0(g,v,x,F,P,O,R){var K=v[P].Yb[x];for(x=0;16>P;++P){if(!yt(g,K[x+0]))return P;for(;!yt(g,K[x+1]);)if(K=v[++P].Yb[0],x=0,P==16)return 16;var G=v[P+1].Yb;if(yt(g,K[x+2])){var Y=g,at=0;if(yt(Y,(J=K)[(pt=x)+3]))if(yt(Y,J[pt+6])){for(K=0,pt=2*(at=yt(Y,J[pt+8]))+(J=yt(Y,J[pt+9+at])),at=0,J=sat[pt];J[K];++K)at+=at+yt(Y,J[K]);at+=3+(8<<pt)}else yt(Y,J[pt+7])?(at=7+2*yt(Y,165),at+=yt(Y,145)):at=5+yt(Y,159);else at=yt(Y,J[pt+4])?3+yt(Y,J[pt+5]):2;K=G[2]}else at=1,K=G[1];G=R+Aat[P],0>(Y=g).b&&dt(Y);var pt,J=Y.b,lt=(pt=Y.Ca>>1)-(Y.I>>J)>>31;--Y.b,Y.Ca+=lt,Y.Ca|=1,Y.I-=(pt+1<)<<J,O[G]=((at^lt)-lt)*F[(0<P)+0]}return 16}function ew(g){var v=g.rb[g.sb-1];v.la=0,v.Na=0,i(g.zc,0,0,g.zc.length),g.ja=0}function UA(g,v,x,F,P){P=g[v+x+32*F]+(P>>3),g[v+x+32*F]=-256&P?0>P?0:255:P}function u0(g,v,x,F,P,O){UA(g,v,0,x,F+P),UA(g,v,1,x,F+O),UA(g,v,2,x,F-O),UA(g,v,3,x,F-P)}function uc(g){return(20091*g>>16)+g}function Rn(g,v,x,F){var P,O=0,R=s(16);for(P=0;4>P;++P){var K=g[v+0]+g[v+8],G=g[v+0]-g[v+8],Y=(35468*g[v+4]>>16)-uc(g[v+12]),at=uc(g[v+4])+(35468*g[v+12]>>16);R[O+0]=K+at,R[O+1]=G+Y,R[O+2]=G-Y,R[O+3]=K-at,O+=4,v++}for(P=O=0;4>P;++P)K=(g=R[O+0]+4)+R[O+8],G=g-R[O+8],Y=(35468*R[O+4]>>16)-uc(R[O+12]),UA(x,F,0,0,K+(at=uc(R[O+4])+(35468*R[O+12]>>16))),UA(x,F,1,0,G+Y),UA(x,F,2,0,G-Y),UA(x,F,3,0,K-at),O++,F+=32}function bB(g,v,x,F){var P=g[v+0]+4,O=35468*g[v+4]>>16,R=uc(g[v+4]),K=35468*g[v+1]>>16;u0(x,F,0,P+R,g=uc(g[v+1]),K),u0(x,F,1,P+O,g,K),u0(x,F,2,P-O,g,K),u0(x,F,3,P-R,g,K)}function zF(g,v,x,F,P){Rn(g,v,x,F),P&&Rn(g,v+16,x,F+4)}function XF(g,v,x,F){vc(g,v+0,x,F,1),vc(g,v+32,x,F+128,1)}function qF(g,v,x,F){var P;for(g=g[v+0]+4,P=0;4>P;++P)for(v=0;4>v;++v)UA(x,F,v,P,g)}function jo(g,v,x,F){g[v+0]&&hs(g,v+0,x,F),g[v+16]&&hs(g,v+16,x,F+4),g[v+32]&&hs(g,v+32,x,F+128),g[v+48]&&hs(g,v+48,x,F+128+4)}function BB(g,v,x,F){var P,O=s(16);for(P=0;4>P;++P){var R=g[v+0+P]+g[v+12+P],K=g[v+4+P]+g[v+8+P],G=g[v+4+P]-g[v+8+P],Y=g[v+0+P]-g[v+12+P];O[0+P]=R+K,O[8+P]=R-K,O[4+P]=Y+G,O[12+P]=Y-G}for(P=0;4>P;++P)R=(g=O[0+4*P]+3)+O[3+4*P],K=O[1+4*P]+O[2+4*P],G=O[1+4*P]-O[2+4*P],Y=g-O[3+4*P],x[F+0]=R+K>>3,x[F+16]=Y+G>>3,x[F+32]=R-K>>3,x[F+48]=Y-G>>3,F+=64}function f0(g,v,x){var F,P=v-32,O=LA,R=255-g[P-1];for(F=0;F<x;++F){var K,G=O,Y=R+g[v-1];for(K=0;K<x;++K)g[v+K]=G[Y+g[P+K]];v+=32}}function d0(g,v){f0(g,v,4)}function rw(g,v){f0(g,v,8)}function YF(g,v){f0(g,v,16)}function JF(g,v){var x;for(x=0;16>x;++x)r(g,v+32*x,g,v-32,16)}function ZF(g,v){var x;for(x=16;0<x;--x)i(g,v,g[v-1],16),v+=32}function Wh(g,v,x){var F;for(F=0;16>F;++F)i(v,x+32*F,g,16)}function CB(g,v){var x,F=16;for(x=0;16>x;++x)F+=g[v-1+32*x]+g[v+x-32];Wh(F>>5,g,v)}function zh(g,v){var x,F=8;for(x=0;16>x;++x)F+=g[v-1+32*x];Wh(F>>4,g,v)}function t4(g,v){var x,F=8;for(x=0;16>x;++x)F+=g[v+x-32];Wh(F>>4,g,v)}function fd(g,v){Wh(128,g,v)}function be(g,v,x){return g+2*v+x+2>>2}function e4(g,v){var x,F=v-32;for(F=new Uint8Array([be(g[F-1],g[F+0],g[F+1]),be(g[F+0],g[F+1],g[F+2]),be(g[F+1],g[F+2],g[F+3]),be(g[F+2],g[F+3],g[F+4])]),x=0;4>x;++x)r(g,v+32*x,F,0,F.length)}function r4(g,v){var x=g[v-1],F=g[v-1+32],P=g[v-1+64],O=g[v-1+96];St(g,v+0,16843009*be(g[v-1-32],x,F)),St(g,v+32,16843009*be(x,F,P)),St(g,v+64,16843009*be(F,P,O)),St(g,v+96,16843009*be(P,O,O))}function i4(g,v){var x,F=4;for(x=0;4>x;++x)F+=g[v+x-32]+g[v-1+32*x];for(F>>=3,x=0;4>x;++x)i(g,v+32*x,F,4)}function n4(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1-32],R=g[v+0-32],K=g[v+1-32],G=g[v+2-32],Y=g[v+3-32];g[v+0+96]=be(F,P,g[v-1+96]),g[v+1+96]=g[v+0+64]=be(x,F,P),g[v+2+96]=g[v+1+64]=g[v+0+32]=be(O,x,F),g[v+3+96]=g[v+2+64]=g[v+1+32]=g[v+0+0]=be(R,O,x),g[v+3+64]=g[v+2+32]=g[v+1+0]=be(K,R,O),g[v+3+32]=g[v+2+0]=be(G,K,R),g[v+3+0]=be(Y,G,K)}function s4(g,v){var x=g[v+1-32],F=g[v+2-32],P=g[v+3-32],O=g[v+4-32],R=g[v+5-32],K=g[v+6-32],G=g[v+7-32];g[v+0+0]=be(g[v+0-32],x,F),g[v+1+0]=g[v+0+32]=be(x,F,P),g[v+2+0]=g[v+1+32]=g[v+0+64]=be(F,P,O),g[v+3+0]=g[v+2+32]=g[v+1+64]=g[v+0+96]=be(P,O,R),g[v+3+32]=g[v+2+64]=g[v+1+96]=be(O,R,K),g[v+3+64]=g[v+2+96]=be(R,K,G),g[v+3+96]=be(K,G,G)}function fc(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1-32],R=g[v+0-32],K=g[v+1-32],G=g[v+2-32],Y=g[v+3-32];g[v+0+0]=g[v+1+64]=O+R+1>>1,g[v+1+0]=g[v+2+64]=R+K+1>>1,g[v+2+0]=g[v+3+64]=K+G+1>>1,g[v+3+0]=G+Y+1>>1,g[v+0+96]=be(P,F,x),g[v+0+64]=be(F,x,O),g[v+0+32]=g[v+1+96]=be(x,O,R),g[v+1+32]=g[v+2+96]=be(O,R,K),g[v+2+32]=g[v+3+96]=be(R,K,G),g[v+3+32]=be(K,G,Y)}function dc(g,v){var x=g[v+0-32],F=g[v+1-32],P=g[v+2-32],O=g[v+3-32],R=g[v+4-32],K=g[v+5-32],G=g[v+6-32],Y=g[v+7-32];g[v+0+0]=x+F+1>>1,g[v+1+0]=g[v+0+64]=F+P+1>>1,g[v+2+0]=g[v+1+64]=P+O+1>>1,g[v+3+0]=g[v+2+64]=O+R+1>>1,g[v+0+32]=be(x,F,P),g[v+1+32]=g[v+0+96]=be(F,P,O),g[v+2+32]=g[v+1+96]=be(P,O,R),g[v+3+32]=g[v+2+96]=be(O,R,K),g[v+3+64]=be(R,K,G),g[v+3+96]=be(K,G,Y)}function A4(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1+96];g[v+0+0]=x+F+1>>1,g[v+2+0]=g[v+0+32]=F+P+1>>1,g[v+2+32]=g[v+0+64]=P+O+1>>1,g[v+1+0]=be(x,F,P),g[v+3+0]=g[v+1+32]=be(F,P,O),g[v+3+32]=g[v+1+64]=be(P,O,O),g[v+3+64]=g[v+2+64]=g[v+0+96]=g[v+1+96]=g[v+2+96]=g[v+3+96]=O}function a4(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1+96],R=g[v-1-32],K=g[v+0-32],G=g[v+1-32],Y=g[v+2-32];g[v+0+0]=g[v+2+32]=x+R+1>>1,g[v+0+32]=g[v+2+64]=F+x+1>>1,g[v+0+64]=g[v+2+96]=P+F+1>>1,g[v+0+96]=O+P+1>>1,g[v+3+0]=be(K,G,Y),g[v+2+0]=be(R,K,G),g[v+1+0]=g[v+3+32]=be(x,R,K),g[v+1+32]=g[v+3+64]=be(F,x,R),g[v+1+64]=g[v+3+96]=be(P,F,x),g[v+1+96]=be(O,P,F)}function g0(g,v){var x;for(x=0;8>x;++x)r(g,v+32*x,g,v-32,8)}function iw(g,v){var x;for(x=0;8>x;++x)i(g,v,g[v-1],8),v+=32}function $o(g,v,x){var F;for(F=0;8>F;++F)i(v,x+32*F,g,8)}function o4(g,v){var x,F=8;for(x=0;8>x;++x)F+=g[v+x-32]+g[v-1+32*x];$o(F>>4,g,v)}function p0(g,v){var x,F=4;for(x=0;8>x;++x)F+=g[v+x-32];$o(F>>3,g,v)}function l4(g,v){var x,F=4;for(x=0;8>x;++x)F+=g[v-1+32*x];$o(F>>3,g,v)}function nw(g,v){$o(128,g,v)}function Xh(g,v,x){var F=g[v-x],P=g[v+0],O=3*(P-F)+h4[1020+g[v-2*x]-g[v+x]],R=LB[112+(O+4>>3)];g[v-x]=LA[255+F+LB[112+(O+3>>3)]],g[v+0]=LA[255+P-R]}function sw(g,v,x,F){var P=g[v+0],O=g[v+x];return ua[255+g[v-2*x]-g[v-x]]>F||ua[255+O-P]>F}function dd(g,v,x,F){return 4*ua[255+g[v-x]-g[v+0]]+ua[255+g[v-2*x]-g[v+x]]<=F}function Aw(g,v,x,F,P){var O=g[v-3*x],R=g[v-2*x],K=g[v-x],G=g[v+0],Y=g[v+x],at=g[v+2*x],pt=g[v+3*x];return 4*ua[255+K-G]+ua[255+R-Y]>F?0:ua[255+g[v-4*x]-O]<=P&&ua[255+O-R]<=P&&ua[255+R-K]<=P&&ua[255+pt-at]<=P&&ua[255+at-Y]<=P&&ua[255+Y-G]<=P}function m0(g,v,x,F){var P=2*F+1;for(F=0;16>F;++F)dd(g,v+F,x,P)&&Xh(g,v+F,x)}function aw(g,v,x,F){var P=2*F+1;for(F=0;16>F;++F)dd(g,v+F*x,1,P)&&Xh(g,v+F*x,1)}function v0(g,v,x,F){var P;for(P=3;0<P;--P)m0(g,v+=4*x,x,F)}function xB(g,v,x,F){var P;for(P=3;0<P;--P)aw(g,v+=4,x,F)}function gc(g,v,x,F,P,O,R,K){for(O=2*O+1;0<P--;){if(Aw(g,v,x,O,R))if(sw(g,v,x,K))Xh(g,v,x);else{var G=g,Y=v,at=x,pt=G[Y-2*at],J=G[Y-at],lt=G[Y+0],ft=G[Y+at],Bt=G[Y+2*at],gt=27*(Et=h4[1020+3*(lt-J)+h4[1020+pt-ft]])+63>>7,Ct=18*Et+63>>7,Et=9*Et+63>>7;G[Y-3*at]=LA[255+G[Y-3*at]+Et],G[Y-2*at]=LA[255+pt+Ct],G[Y-at]=LA[255+J+gt],G[Y+0]=LA[255+lt-gt],G[Y+at]=LA[255+ft-Ct],G[Y+2*at]=LA[255+Bt-Et]}v+=F}}function pc(g,v,x,F,P,O,R,K){for(O=2*O+1;0<P--;){if(Aw(g,v,x,O,R))if(sw(g,v,x,K))Xh(g,v,x);else{var G=g,Y=v,at=x,pt=G[Y-at],J=G[Y+0],lt=G[Y+at],ft=LB[112+(4+(Bt=3*(J-pt))>>3)],Bt=LB[112+(Bt+3>>3)],gt=ft+1>>1;G[Y-2*at]=LA[255+G[Y-2*at]+gt],G[Y-at]=LA[255+pt+Bt],G[Y+0]=LA[255+J-ft],G[Y+at]=LA[255+lt-gt]}v+=F}}function EB(g,v,x,F,P,O){gc(g,v,x,1,16,F,P,O)}function SB(g,v,x,F,P,O){gc(g,v,1,x,16,F,P,O)}function FB(g,v,x,F,P,O){var R;for(R=3;0<R;--R)pc(g,v+=4*x,x,1,16,F,P,O)}function gd(g,v,x,F,P,O){var R;for(R=3;0<R;--R)pc(g,v+=4,1,x,16,F,P,O)}function TB(g,v,x,F,P,O,R,K){gc(g,v,P,1,8,O,R,K),gc(x,F,P,1,8,O,R,K)}function b(g,v,x,F,P,O,R,K){gc(g,v,1,P,8,O,R,K),gc(x,F,1,P,8,O,R,K)}function N(g,v,x,F,P,O,R,K){pc(g,v+4*P,P,1,8,O,R,K),pc(x,F+4*P,P,1,8,O,R,K)}function X(g,v,x,F,P,O,R,K){pc(g,v+4,1,P,8,O,R,K),pc(x,F+4,1,P,8,O,R,K)}function nt(){this.ba=new fe,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ze,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ht(){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 bt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ft(){this.ua=0,this.Wa=new ve,this.vb=new ve,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new st,this.yc=new j}function se(){this.xb=this.a=0,this.l=new Cn,this.ca=new fe,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new $,this.Pb=0,this.wd=new $,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ft,this.ab=0,this.gc=A(4,bt),this.Oc=0}function ee(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Cn,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Fe(g,v,x,F,P,O,R){for(g=g==null?0:g[v+0],v=0;v<R;++v)P[O+v]=g+x[F+v]&255,g=P[O+v]}function Me(g,v,x,F,P,O,R){var K;if(g==null)Fe(null,null,x,F,P,O,R);else for(K=0;K<R;++K)P[O+K]=g[v+K]+x[F+K]&255}function tr(g,v,x,F,P,O,R){if(g==null)Fe(null,null,x,F,P,O,R);else{var K,G=g[v+0],Y=G,at=G;for(K=0;K<R;++K)Y=at+(G=g[v+K])-Y,at=x[F+K]+(-256&Y?0>Y?0:255:Y)&255,Y=G,P[O+K]=at}}function Xi(g,v,x,F){var P=v.width,O=v.o;if(t(g!=null&&v!=null),0>x||0>=F||x+F>O)return null;if(!g.Cc){if(g.ga==null){var R;if(g.ga=new ee,(R=g.ga==null)||(R=v.width*v.o,t(g.Gb.length==0),g.Gb=s(R),g.Uc=0,g.Gb==null?R=0:(g.mb=g.Gb,g.nb=g.Uc,g.rc=null,R=1),R=!R),!R){R=g.ga;var K=g.Fa,G=g.P,Y=g.qc,at=g.mb,pt=g.nb,J=G+1,lt=Y-1,ft=R.l;if(t(K!=null&&at!=null&&v!=null),ru[0]=null,ru[1]=Fe,ru[2]=Me,ru[3]=tr,R.ca=at,R.tb=pt,R.c=v.width,R.i=v.height,t(0<R.c&&0<R.i),1>=Y)v=0;else if(R.$a=3&K[G+0],R.Z=K[G+0]>>2&3,R.Lc=K[G+0]>>4&3,G=K[G+0]>>6&3,0>R.$a||1<R.$a||4<=R.Z||1<R.Lc||G)v=0;else if(ft.put=Kt,ft.ac=la,ft.bc=ss,ft.ma=R,ft.width=v.width,ft.height=v.height,ft.Da=v.Da,ft.v=v.v,ft.va=v.va,ft.j=v.j,ft.o=v.o,R.$a)t:{t(R.$a==1),v=ca();e:for(;;){if(v==null){v=0;break t}if(t(R!=null),R.mc=v,v.c=R.c,v.i=R.i,v.l=R.l,v.l.ma=R,v.l.width=R.c,v.l.height=R.i,v.a=0,ut(v.m,K,J,lt),!zi(R.c,R.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&zs(v.s)?(R.ic=1,K=v.c*v.i,v.Ta=null,v.Ua=0,v.V=s(K),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(R.ic=0,v=Vo(v,R.c)),!v))break e;v=1;break t}R.mc=null,v=0}else v=lt>=R.c*R.i;R=!v}if(R)return null;g.ga.Lc!=1?g.Ga=0:F=O-x}t(g.ga!=null),t(x+F<=O);t:{if(v=(K=g.ga).c,O=K.l.o,K.$a==0){if(J=g.rc,lt=g.Vc,ft=g.Fa,G=g.P+1+x*v,Y=g.mb,at=g.nb+x*v,t(G<=g.P+g.qc),K.Z!=0)for(t(ru[K.Z]!=null),R=0;R<F;++R)ru[K.Z](J,lt,ft,G,Y,at,v),J=Y,lt=at,at+=v,G+=v;else for(R=0;R<F;++R)r(Y,at,ft,G,v),J=Y,lt=at,at+=v,G+=v;g.rc=J,g.Vc=lt}else{if(t(K.mc!=null),v=x+F,t((R=K.mc)!=null),t(v<=R.i),R.C>=v)v=1;else if(K.ic||li(),K.ic){K=R.V,J=R.Ba,lt=R.c;var Bt=R.i,gt=(ft=1,G=R.$/lt,Y=R.$%lt,at=R.m,pt=R.s,R.$),Ct=lt*Bt,Et=lt*v,Ut=pt.wc,_t=gt<Et?nn(pt,Y,G):null;t(gt<=Ct),t(v<=Bt),t(zs(pt));e:for(;;){for(;!at.h&><Et;){if(Y&Ut||(_t=nn(pt,Y,G)),t(_t!=null),ot(at),256>(Bt=zr(_t.G[0],_t.H[0],at)))K[J+gt]=Bt,++gt,++Y>=lt&&(Y=0,++G<=v&&!(G%16)&&Xs(R,G));else{if(!(280>Bt)){ft=0;break e}Bt=_s(Bt-256,at);var he,Yt=zr(_t.G[4],_t.H[4],at);if(ot(at),!(gt>=(Yt=As(lt,Yt=_s(Yt,at)))&&Ct-gt>=Bt)){ft=0;break e}for(he=0;he<Bt;++he)K[J+gt+he]=K[J+gt+he-Yt];for(gt+=Bt,Y+=Bt;Y>=lt;)Y-=lt,++G<=v&&!(G%16)&&Xs(R,G);gt<Et&&Y&Ut&&(_t=nn(pt,Y,G))}t(at.h==tt(at))}Xs(R,G>v?v:G);break e}!ft||at.h&><Ct?(ft=0,R.a=at.h?5:3):R.$=gt,v=ft}else v=os(R,R.V,R.Ba,R.c,R.i,v,cc);if(!v){F=0;break t}}x+F>=O&&(g.Cc=1),F=1}if(!F)return null;if(g.Cc&&((F=g.ga)!=null&&(F.mc=null),g.ga=null,0<g.Ga))return alert("todo:WebPDequantizeLevels"),null}return g.nb+x*P}function Nr(g,v,x,F,P,O){for(;0<P--;){var R,K=g,G=v+(x?1:0),Y=g,at=v+(x?0:3);for(R=0;R<F;++R){var pt=Y[at+4*R];pt!=255&&(pt*=32897,K[G+4*R+0]=K[G+4*R+0]*pt>>23,K[G+4*R+1]=K[G+4*R+1]*pt>>23,K[G+4*R+2]=K[G+4*R+2]*pt>>23)}v+=O}}function _r(g,v,x,F,P){for(;0<F--;){var O;for(O=0;O<x;++O){var R=g[v+2*O+0],K=15&(Y=g[v+2*O+1]),G=4369*K,Y=(240&Y|Y>>4)*G>>16;g[v+2*O+0]=(240&R|R>>4)*G>>16&240|(15&R|R<<4)*G>>16>>4&15,g[v+2*O+1]=240&Y|K}v+=P}}function Xr(g,v,x,F,P,O,R,K){var G,Y,at=255;for(Y=0;Y<P;++Y){for(G=0;G<F;++G){var pt=g[v+G];O[R+4*G]=pt,at&=pt}v+=x,R+=K}return at!=255}function oi(g,v,x,F,P){var O;for(O=0;O<P;++O)x[F+O]=g[v+O]>>8}function li(){gw=Nr,LO=_r,QO=Xr,NO=oi}function ls(g,v,x){Q[g]=function(F,P,O,R,K,G,Y,at,pt,J,lt,ft,Bt,gt,Ct,Et,Ut){var _t,he=Ut-1>>1,Yt=K[G+0]|Y[at+0]<<16,Ve=pt[J+0]|lt[ft+0]<<16;t(F!=null);var ae=3*Yt+Ve+131074>>2;for(v(F[P+0],255&ae,ae>>16,Bt,gt),O!=null&&(ae=3*Ve+Yt+131074>>2,v(O[R+0],255&ae,ae>>16,Ct,Et)),_t=1;_t<=he;++_t){var Je=K[G+_t]|Y[at+_t]<<16,an=pt[J+_t]|lt[ft+_t]<<16,Ge=Yt+Je+Ve+an+524296,oe=Ge+2*(Je+Ve)>>3;ae=oe+Yt>>1,Yt=(Ge=Ge+2*(Yt+an)>>3)+Je>>1,v(F[P+2*_t-1],255&ae,ae>>16,Bt,gt+(2*_t-1)*x),v(F[P+2*_t-0],255&Yt,Yt>>16,Bt,gt+(2*_t-0)*x),O!=null&&(ae=Ge+Ve>>1,Yt=oe+an>>1,v(O[R+2*_t-1],255&ae,ae>>16,Ct,Et+(2*_t-1)*x),v(O[R+2*_t+0],255&Yt,Yt>>16,Ct,Et+(2*_t+0)*x)),Yt=Je,Ve=an}1&Ut||(ae=3*Yt+Ve+131074>>2,v(F[P+Ut-1],255&ae,ae>>16,Bt,gt+(Ut-1)*x),O!=null&&(ae=3*Ve+Yt+131074>>2,v(O[R+Ut-1],255&ae,ae>>16,Ct,Et+(Ut-1)*x)))}}function mc(){fa[QB]=uat,fa[NB]=jO,fa[RO]=fat,fa[PB]=$O,fa[MB]=WO,fa[u4]=zO,fa[HO]=dat,fa[f4]=jO,fa[d4]=$O,fa[kB]=WO,fa[g4]=zO}function ow(g){return g&-16384?0>g?0:255:g>>gat}function pd(g,v){return ow((19077*g>>8)+(26149*v>>8)-14234)}function md(g,v,x){return ow((19077*g>>8)-(6419*v>>8)-(13320*x>>8)+8708)}function qh(g,v){return ow((19077*g>>8)+(33050*v>>8)-17685)}function vd(g,v,x,F,P){F[P+0]=pd(g,x),F[P+1]=md(g,v,x),F[P+2]=qh(g,v)}function w0(g,v,x,F,P){F[P+0]=qh(g,v),F[P+1]=md(g,v,x),F[P+2]=pd(g,x)}function y0(g,v,x,F,P){var O=md(g,v,x);v=O<<3&224|qh(g,v)>>3,F[P+0]=248&pd(g,x)|O>>5,F[P+1]=v}function cs(g,v,x,F,P){var O=240&qh(g,v)|15;F[P+0]=240&pd(g,x)|md(g,v,x)>>4,F[P+1]=O}function wd(g,v,x,F,P){F[P+0]=255,vd(g,v,x,F,P+1)}function yd(g,v,x,F,P){w0(g,v,x,F,P),F[P+3]=255}function lw(g,v,x,F,P){vd(g,v,x,F,P),F[P+3]=255}function Wo(g,v,x){Q[g]=function(F,P,O,R,K,G,Y,at,pt){for(var J=at+(-2&pt)*x;at!=J;)v(F[P+0],O[R+0],K[G+0],Y,at),v(F[P+1],O[R+0],K[G+0],Y,at+x),P+=2,++R,++G,at+=2*x;1&pt&&v(F[P+0],O[R+0],K[G+0],Y,at)}}function Is(g,v,x){return x==0?g==0?v==0?6:5:v==0?4:0:x}function _B(g,v,x,F,P){switch(g>>>30){case 3:vc(v,x,F,P,0);break;case 2:tu(v,x,F,P);break;case 1:hs(v,x,F,P)}}function b0(g,v){var x,F,P=v.M,O=v.Nb,R=g.oc,K=g.pc+40,G=g.oc,Y=g.pc+584,at=g.oc,pt=g.pc+600;for(x=0;16>x;++x)R[K+32*x-1]=129;for(x=0;8>x;++x)G[Y+32*x-1]=129,at[pt+32*x-1]=129;for(0<P?R[K-1-32]=G[Y-1-32]=at[pt-1-32]=129:(i(R,K-32-1,127,21),i(G,Y-32-1,127,9),i(at,pt-32-1,127,9)),F=0;F<g.za;++F){var J=v.ya[v.aa+F];if(0<F){for(x=-1;16>x;++x)r(R,K+32*x-4,R,K+32*x+12,4);for(x=-1;8>x;++x)r(G,Y+32*x-4,G,Y+32*x+4,4),r(at,pt+32*x-4,at,pt+32*x+4,4)}var lt=g.Gd,ft=g.Hd+F,Bt=J.ad,gt=J.Hc;if(0<P&&(r(R,K-32,lt[ft].y,0,16),r(G,Y-32,lt[ft].f,0,8),r(at,pt-32,lt[ft].ea,0,8)),J.Za){var Ct=R,Et=K-32+16;for(0<P&&(F>=g.za-1?i(Ct,Et,lt[ft].y[15],4):r(Ct,Et,lt[ft+1].y,0,4)),x=0;4>x;x++)Ct[Et+128+x]=Ct[Et+256+x]=Ct[Et+384+x]=Ct[Et+0+x];for(x=0;16>x;++x,gt<<=2)Ct=R,Et=K+qO[x],Ja[J.Ob[x]](Ct,Et),_B(gt,Bt,16*+x,Ct,Et)}else if(Ct=Is(F,P,J.Ob[0]),eu[Ct](R,K),gt!=0)for(x=0;16>x;++x,gt<<=2)_B(gt,Bt,16*+x,R,K+qO[x]);for(x=J.Gc,Ct=Is(F,P,J.Dd),yc[Ct](G,Y),yc[Ct](at,pt),gt=Bt,Ct=G,Et=Y,255&(J=0|x)&&(170&J?S0(gt,256,Ct,Et):Xo(gt,256,Ct,Et)),J=at,gt=pt,255&(x>>=8)&&(170&x?S0(Bt,320,J,gt):Xo(Bt,320,J,gt)),P<g.Ub-1&&(r(lt[ft].y,0,R,K+480,16),r(lt[ft].f,0,G,Y+224,8),r(lt[ft].ea,0,at,pt+224,8)),x=8*O*g.B,lt=g.sa,ft=g.ta+16*F+16*O*g.R,Bt=g.qa,J=g.ra+8*F+x,gt=g.Ha,Ct=g.Ia+8*F+x,x=0;16>x;++x)r(lt,ft+x*g.R,R,K+32*x,16);for(x=0;8>x;++x)r(Bt,J+x*g.B,G,Y+32*x,8),r(gt,Ct+x*g.B,at,pt+32*x,8)}}function IB(g,v,x,F,P,O,R,K,G){var Y=[0],at=[0],pt=0,J=G!=null?G.kd:0,lt=G??new ht;if(g==null||12>x)return 7;lt.data=g,lt.w=v,lt.ha=x,v=[v],x=[x],lt.gb=[lt.gb];t:{var ft=v,Bt=x,gt=lt.gb;if(t(g!=null),t(Bt!=null),t(gt!=null),gt[0]=0,12<=Bt[0]&&!e(g,ft[0],"RIFF")){if(e(g,ft[0]+8,"WEBP")){gt=3;break t}var Ct=$t(g,ft[0]+4);if(12>Ct||4294967286<Ct){gt=3;break t}if(J&&Ct>Bt[0]-8){gt=7;break t}gt[0]=Ct,ft[0]+=12,Bt[0]-=12}gt=0}if(gt!=0)return gt;for(Ct=0<lt.gb[0],x=x[0];;){t:{var Et=g;Bt=v,gt=x;var Ut=Y,_t=at,he=ft=[0];if((ae=pt=[pt])[0]=0,8>gt[0])gt=7;else{if(!e(Et,Bt[0],"VP8X")){if($t(Et,Bt[0]+4)!=10){gt=3;break t}if(18>gt[0]){gt=7;break t}var Yt=$t(Et,Bt[0]+8),Ve=1+Pt(Et,Bt[0]+12);if(2147483648<=Ve*(Et=1+Pt(Et,Bt[0]+15))){gt=3;break t}he!=null&&(he[0]=Yt),Ut!=null&&(Ut[0]=Ve),_t!=null&&(_t[0]=Et),Bt[0]+=18,gt[0]-=18,ae[0]=1}gt=0}}if(pt=pt[0],ft=ft[0],gt!=0)return gt;if(Bt=!!(2&ft),!Ct&&pt)return 3;if(O!=null&&(O[0]=!!(16&ft)),R!=null&&(R[0]=Bt),K!=null&&(K[0]=0),R=Y[0],ft=at[0],pt&&Bt&&G==null){gt=0;break}if(4>x){gt=7;break}if(Ct&&pt||!Ct&&!pt&&!e(g,v[0],"ALPH")){x=[x],lt.na=[lt.na],lt.P=[lt.P],lt.Sa=[lt.Sa];t:{Yt=g,gt=v,Ct=x;var ae=lt.gb;Ut=lt.na,_t=lt.P,he=lt.Sa,Ve=22,t(Yt!=null),t(Ct!=null),Et=gt[0];var Je=Ct[0];for(t(Ut!=null),t(he!=null),Ut[0]=null,_t[0]=null,he[0]=0;;){if(gt[0]=Et,Ct[0]=Je,8>Je){gt=7;break t}var an=$t(Yt,Et+4);if(4294967286<an){gt=3;break t}var Ge=8+an+1&-2;if(Ve+=Ge,0<ae&&Ve>ae){gt=3;break t}if(!e(Yt,Et,"VP8 ")||!e(Yt,Et,"VP8L")){gt=0;break t}if(Je[0]<Ge){gt=7;break t}e(Yt,Et,"ALPH")||(Ut[0]=Yt,_t[0]=Et+8,he[0]=an),Et+=Ge,Je-=Ge}}if(x=x[0],lt.na=lt.na[0],lt.P=lt.P[0],lt.Sa=lt.Sa[0],gt!=0)break}x=[x],lt.Ja=[lt.Ja],lt.xa=[lt.xa];t:if(ae=g,gt=v,Ct=x,Ut=lt.gb[0],_t=lt.Ja,he=lt.xa,Yt=gt[0],Et=!e(ae,Yt,"VP8 "),Ve=!e(ae,Yt,"VP8L"),t(ae!=null),t(Ct!=null),t(_t!=null),t(he!=null),8>Ct[0])gt=7;else{if(Et||Ve){if(ae=$t(ae,Yt+4),12<=Ut&&ae>Ut-12){gt=3;break t}if(J&&ae>Ct[0]-8){gt=7;break t}_t[0]=ae,gt[0]+=8,Ct[0]-=8,he[0]=Ve}else he[0]=5<=Ct[0]&&ae[Yt+0]==47&&!(ae[Yt+4]>>5),_t[0]=Ct[0];gt=0}if(x=x[0],lt.Ja=lt.Ja[0],lt.xa=lt.xa[0],v=v[0],gt!=0)break;if(4294967286<lt.Ja)return 3;if(K==null||Bt||(K[0]=lt.xa?2:1),R=[R],ft=[ft],lt.xa){if(5>x){gt=7;break}K=R,J=ft,Bt=O,g==null||5>x?g=0:5<=x&&g[v+0]==47&&!(g[v+4]>>5)?(Ct=[0],ae=[0],Ut=[0],ut(_t=new $,g,v,x),Xa(_t,Ct,ae,Ut)?(K!=null&&(K[0]=Ct[0]),J!=null&&(J[0]=ae[0]),Bt!=null&&(Bt[0]=Ut[0]),g=1):g=0):g=0}else{if(10>x){gt=7;break}K=ft,g==null||10>x||!ud(g,v+3,x-3)?g=0:(J=g[v+0]|g[v+1]<<8|g[v+2]<<16,Bt=16383&(g[v+7]<<8|g[v+6]),g=16383&(g[v+9]<<8|g[v+8]),1&J||3<(J>>1&7)||!(J>>4&1)||J>>5>=lt.Ja||!Bt||!g?g=0:(R&&(R[0]=Bt),K&&(K[0]=g),g=1))}if(!g||(R=R[0],ft=ft[0],pt&&(Y[0]!=R||at[0]!=ft)))return 3;G!=null&&(G[0]=lt,G.offset=v-G.w,t(4294967286>v-G.w),t(G.offset==G.ha-x));break}return gt==0||gt==7&&pt&&G==null?(O!=null&&(O[0]|=lt.na!=null&&0<lt.na.length),F!=null&&(F[0]=R),P!=null&&(P[0]=ft),0):gt}function ha(g,v,x){var F=v.width,P=v.height,O=0,R=0,K=F,G=P;if(v.Da=g!=null&&0<g.Da,v.Da&&(K=g.cd,G=g.bd,O=g.v,R=g.j,11>x||(O&=-2,R&=-2),0>O||0>R||0>=K||0>=G||O+K>F||R+G>P))return 0;if(v.v=O,v.j=R,v.va=O+K,v.o=R+G,v.U=K,v.T=G,v.da=g!=null&&0<g.da,v.da){if(!re(K,G,x=[g.ib],O=[g.hb]))return 0;v.ib=x[0],v.hb=O[0]}return v.ob=g!=null&&g.ob,v.Kb=g==null||!g.Sd,v.da&&(v.ob=v.ib<3*F/4&&v.hb<3*P/4,v.Kb=0),1}function bd(g){if(g==null)return 2;if(11>g.S){var v=g.f.RGBA;v.fb+=(g.height-1)*v.A,v.A=-v.A}else v=g.f.kb,g=g.height,v.O+=(g-1)*v.fa,v.fa=-v.fa,v.N+=(g-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(g-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(g-1)*v.lb,v.lb=-v.lb);return 0}function cw(g,v,x,F){if(F==null||0>=g||0>=v)return 2;if(x!=null){if(x.Da){var P=x.cd,O=x.bd,R=-2&x.v,K=-2&x.j;if(0>R||0>K||0>=P||0>=O||R+P>g||K+O>v)return 2;g=P,v=O}if(x.da){if(!re(g,v,P=[x.ib],O=[x.hb]))return 2;g=P[0],v=O[0]}}F.width=g,F.height=v;t:{var G=F.width,Y=F.height;if(g=F.S,0>=G||0>=Y||!(g>=QB&&13>g))g=2;else{if(0>=F.Rd&&F.sd==null){R=O=P=v=0;var at=(K=G*YO[g])*Y;if(11>g||(O=(Y+1)/2*(v=(G+1)/2),g==12&&(R=(P=G)*Y)),(Y=s(at+2*O+R))==null){g=1;break t}F.sd=Y,11>g?((G=F.f.RGBA).eb=Y,G.fb=0,G.A=K,G.size=at):((G=F.f.kb).y=Y,G.O=0,G.fa=K,G.Fd=at,G.f=Y,G.N=0+at,G.Ab=v,G.Cd=O,G.ea=Y,G.W=0+at+O,G.Db=v,G.Ed=O,g==12&&(G.F=Y,G.J=0+at+2*O),G.Tc=R,G.lb=P)}if(v=1,P=F.S,O=F.width,R=F.height,P>=QB&&13>P)if(11>P)g=F.f.RGBA,v&=(K=Math.abs(g.A))*(R-1)+O<=g.size,v&=K>=O*YO[P],v&=g.eb!=null;else{g=F.f.kb,K=(O+1)/2,at=(R+1)/2,G=Math.abs(g.fa),Y=Math.abs(g.Ab);var pt=Math.abs(g.Db),J=Math.abs(g.lb),lt=J*(R-1)+O;v&=G*(R-1)+O<=g.Fd,v&=Y*(at-1)+K<=g.Cd,v=(v&=pt*(at-1)+K<=g.Ed)&G>=O&Y>=K&pt>=K,v&=g.y!=null,v&=g.f!=null,v&=g.ea!=null,P==12&&(v&=J>=O,v&=lt<=g.Tc,v&=g.F!=null)}else v=0;g=v?0:2}}return g!=0||x!=null&&x.fd&&(g=bd(F)),g}var B0=64,Bd=[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],hw=24,Us=32,qs=8,C0=[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];kt("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(g){return g},Q.Predictor2=function(g,v,x){return v[x+0]},Q.Predictor3=function(g,v,x){return v[x+1]},Q.Predictor4=function(g,v,x){return v[x-1]},Q.Predictor5=function(g,v,x){return zt(zt(g,v[x+1]),v[x+0])},Q.Predictor6=function(g,v,x){return zt(g,v[x-1])},Q.Predictor7=function(g,v,x){return zt(g,v[x+0])},Q.Predictor8=function(g,v,x){return zt(v[x-1],v[x+0])},Q.Predictor9=function(g,v,x){return zt(v[x+0],v[x+1])},Q.Predictor10=function(g,v,x){return zt(zt(g,v[x-1]),zt(v[x+0],v[x+1]))},Q.Predictor11=function(g,v,x){var F=v[x+0];return 0>=me(F>>24&255,g>>24&255,(v=v[x-1])>>24&255)+me(F>>16&255,g>>16&255,v>>16&255)+me(F>>8&255,g>>8&255,v>>8&255)+me(255&F,255&g,255&v)?F:g},Q.Predictor12=function(g,v,x){var F=v[x+0];return(we((g>>24&255)+(F>>24&255)-((v=v[x-1])>>24&255))<<24|we((g>>16&255)+(F>>16&255)-(v>>16&255))<<16|we((g>>8&255)+(F>>8&255)-(v>>8&255))<<8|we((255&g)+(255&F)-(255&v)))>>>0},Q.Predictor13=function(g,v,x){var F=v[x-1];return(Ne((g=zt(g,v[x+0]))>>24&255,F>>24&255)<<24|Ne(g>>16&255,F>>16&255)<<16|Ne(g>>8&255,F>>8&255)<<8|Ne(255&g,255&F))>>>0};var Yh=Q.PredictorAdd0;Q.PredictorAdd1=Pe,kt("Predictor2","PredictorAdd2"),kt("Predictor3","PredictorAdd3"),kt("Predictor4","PredictorAdd4"),kt("Predictor5","PredictorAdd5"),kt("Predictor6","PredictorAdd6"),kt("Predictor7","PredictorAdd7"),kt("Predictor8","PredictorAdd8"),kt("Predictor9","PredictorAdd9"),kt("Predictor10","PredictorAdd10"),kt("Predictor11","PredictorAdd11"),kt("Predictor12","PredictorAdd12"),kt("Predictor13","PredictorAdd13");var Jh=Q.PredictorAdd2;Xt("ColorIndexInverseTransform","MapARGB","32b",function(g){return g>>8&255},function(g){return g}),Xt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(g){return g},function(g){return g>>8&255});var x0,Cd=Q.ColorIndexInverseTransform,qi=Q.MapARGB,c4=Q.VP8LColorIndexInverseTransformAlpha,zo=Q.MapAlpha,Ya=Q.VP8LPredictorsAdd=[];Ya.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var xd,uw,fw,E0,Ed,Sd,Zh,vc,tu,S0,hs,Xo,Rr,Hr,Oi,An,wc,dw,F0,UB,TO,_O,IO,UO,gw,LO,QO,NO,PO=s(511),MO=s(2041),kO=s(225),OO=s(767),DO=0,h4=MO,LB=kO,LA=OO,ua=PO,QB=0,NB=1,RO=2,PB=3,MB=4,u4=5,HO=6,f4=7,d4=8,kB=9,g4=10,JAt=[2,3,7],ZAt=[3,3,11],KO=[280,256,256,256,40],tat=[0,1,1,1,0],eat=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],rat=[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],iat=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],nat=8,p4=[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],m4=[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],pw=null,sat=[[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]],Aat=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],VO=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],aat=[[[[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]]]],oat=[[[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]]],lat=[[[[255,255,255,255,255,255,255,255,255,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]]]],cat=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],eu=[],Ja=[],yc=[],hat=1,GO=2,ru=[],fa=[];ls("UpsampleRgbLinePair",vd,3),ls("UpsampleBgrLinePair",w0,3),ls("UpsampleRgbaLinePair",lw,4),ls("UpsampleBgraLinePair",yd,4),ls("UpsampleArgbLinePair",wd,4),ls("UpsampleRgba4444LinePair",cs,2),ls("UpsampleRgb565LinePair",y0,2);var uat=Q.UpsampleRgbLinePair,fat=Q.UpsampleBgrLinePair,jO=Q.UpsampleRgbaLinePair,$O=Q.UpsampleBgraLinePair,WO=Q.UpsampleArgbLinePair,zO=Q.UpsampleRgba4444LinePair,dat=Q.UpsampleRgb565LinePair,OB=16,DB=1<<OB-1,mw=-227,v4=482,gat=6,XO=0,pat=s(256),mat=s(256),vat=s(256),wat=s(256),yat=s(v4-mw),bat=s(v4-mw);Wo("YuvToRgbRow",vd,3),Wo("YuvToBgrRow",w0,3),Wo("YuvToRgbaRow",lw,4),Wo("YuvToBgraRow",yd,4),Wo("YuvToArgbRow",wd,4),Wo("YuvToRgba4444Row",cs,2),Wo("YuvToRgb565Row",y0,2);var qO=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],RB=[0,2,8],Bat=[8,7,6,4,4,2,2,2,1,1,1,1],Cat=1;this.WebPDecodeRGBA=function(g,v,x,F,P){var O=NB,R=new nt,K=new fe;R.ba=K,K.S=O,K.width=[K.width],K.height=[K.height];var G=K.width,Y=K.height,at=new de;if(at==null||g==null)var pt=2;else t(at!=null),pt=IB(g,v,x,at.width,at.height,at.Pd,at.Qd,at.format,null);if(pt!=0?G=0:(G!=null&&(G[0]=at.width[0]),Y!=null&&(Y[0]=at.height[0]),G=1),G){K.width=K.width[0],K.height=K.height[0],F!=null&&(F[0]=K.width),P!=null&&(P[0]=K.height);t:{if(F=new Cn,(P=new ht).data=g,P.w=v,P.ha=x,P.kd=1,v=[0],t(P!=null),((g=IB(P.data,P.w,P.ha,null,null,null,v,null,P))==0||g==7)&&v[0]&&(g=4),(v=g)==0){if(t(R!=null),F.data=P.data,F.w=P.w+P.offset,F.ha=P.ha-P.offset,F.put=Kt,F.ac=la,F.bc=ss,F.ma=R,P.xa){if((g=ca())==null){R=1;break t}if(function(J,lt){var ft=[0],Bt=[0],gt=[0];e:for(;;){if(J==null)return 0;if(lt==null)return J.a=2,0;if(J.l=lt,J.a=0,ut(J.m,lt.data,lt.w,lt.ha),!Xa(J.m,ft,Bt,gt)){J.a=3;break e}if(J.xb=GO,lt.width=ft[0],lt.height=Bt[0],!zi(ft[0],Bt[0],1,J,null))break e;return 1}return t(J.a!=0),0}(g,F)){if(F=(v=cw(F.width,F.height,R.Oa,R.ba))==0){e:{F=g;r:for(;;){if(F==null){F=0;break e}if(t(F.s.yc!=null),t(F.s.Ya!=null),t(0<F.s.Wb),t((x=F.l)!=null),t((P=x.ma)!=null),F.xb!=0){if(F.ca=P.ba,F.tb=P.tb,t(F.ca!=null),!ha(P.Oa,x,PB)){F.a=2;break r}if(!Vo(F,x.width)||x.da)break r;if((x.da||Ae(F.ca.S))&&li(),11>F.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),F.ca.f.kb.F!=null&&li()),F.Pb&&0<F.s.ua&&F.s.vb.X==null&&!z(F.s.vb,F.s.Wa.Xa)){F.a=1;break r}F.xb=0}if(!os(F,F.V,F.Ba,F.c,F.i,x.o,as))break r;P.Dc=F.Ma,F=1;break e}t(F.a!=0),F=0}F=!F}F&&(v=g.a)}else v=g.a}else{if((g=new hd)==null){R=1;break t}if(g.Fa=P.na,g.P=P.P,g.qc=P.Sa,IA(g,F)){if((v=cw(F.width,F.height,R.Oa,R.ba))==0){if(g.Aa=0,x=R.Oa,t((P=g)!=null),x!=null){if(0<(G=0>(G=x.Md)?0:100<G?255:255*G/100)){for(Y=at=0;4>Y;++Y)12>(pt=P.pb[Y]).lc&&(pt.ia=G*Bat[0>pt.lc?0:pt.lc]>>3),at|=pt.ia;at&&(alert("todo:VP8InitRandom"),P.ia=1)}P.Ga=x.Id,100<P.Ga?P.Ga=100:0>P.Ga&&(P.Ga=0)}(function(J,lt){if(J==null)return 0;if(lt==null)return $e(J,2,"NULL VP8Io parameter in VP8Decode().");if(!J.cb&&!IA(J,lt))return 0;if(t(J.cb),lt.ac==null||lt.ac(lt)){lt.ob&&(J.L=0);var ft=RB[J.L];if(J.L==2?(J.yb=0,J.zb=0):(J.yb=lt.v-ft>>4,J.zb=lt.j-ft>>4,0>J.yb&&(J.yb=0),0>J.zb&&(J.zb=0)),J.Va=lt.o+15+ft>>4,J.Hb=lt.va+15+ft>>4,J.Hb>J.za&&(J.Hb=J.za),J.Va>J.Ub&&(J.Va=J.Ub),0<J.L){var Bt=J.ed;for(ft=0;4>ft;++ft){var gt;if(J.Qa.Cb){var Ct=J.Qa.Lb[ft];J.Qa.Fb||(Ct+=Bt.Tb)}else Ct=Bt.Tb;for(gt=0;1>=gt;++gt){var Et=J.gd[ft][gt],Ut=Ct;if(Bt.Pc&&(Ut+=Bt.vd[0],gt&&(Ut+=Bt.od[0])),0<(Ut=0>Ut?0:63<Ut?63:Ut)){var _t=Ut;0<Bt.wb&&(_t=4<Bt.wb?_t>>2:_t>>1)>9-Bt.wb&&(_t=9-Bt.wb),1>_t&&(_t=1),Et.dd=_t,Et.tc=2*Ut+_t,Et.ld=40<=Ut?2:15<=Ut?1:0}else Et.tc=0;Et.La=gt}}}ft=0}else $e(J,6,"Frame setup failed"),ft=J.a;if(ft=ft==0){if(ft){J.$c=0,0<J.Aa||(J.Ic=Cat);e:{ft=J.Ic,Bt=4*(_t=J.za);var he=32*_t,Yt=_t+1,Ve=0<J.L?_t*(0<J.Aa?2:1):0,ae=(J.Aa==2?2:1)*_t;if((Et=Bt+832+(gt=3*(16*ft+RB[J.L])/2*he)+(Ct=J.Fa!=null&&0<J.Fa.length?J.Kc.c*J.Kc.i:0))!=Et)ft=0;else{if(Et>J.Vb){if(J.Vb=0,J.Ec=s(Et),J.Fc=0,J.Ec==null){ft=$e(J,1,"no memory during frame initialization.");break e}J.Vb=Et}Et=J.Ec,Ut=J.Fc,J.Ac=Et,J.Bc=Ut,Ut+=Bt,J.Gd=A(he,dr),J.Hd=0,J.rb=A(Yt+1,xt),J.sb=1,J.wa=Ve?A(Ve,Z):null,J.Y=0,J.D.Nb=0,J.D.wa=J.wa,J.D.Y=J.Y,0<J.Aa&&(J.D.Y+=_t),t(!0),J.oc=Et,J.pc=Ut,Ut+=832,J.ya=A(ae,qe),J.aa=0,J.D.ya=J.ya,J.D.aa=J.aa,J.Aa==2&&(J.D.aa+=_t),J.R=16*_t,J.B=8*_t,_t=(he=RB[J.L])*J.R,he=he/2*J.B,J.sa=Et,J.ta=Ut+_t,J.qa=J.sa,J.ra=J.ta+16*ft*J.R+he,J.Ha=J.qa,J.Ia=J.ra+8*ft*J.B+he,J.$c=0,Ut+=gt,J.mb=Ct?Et:null,J.nb=Ct?Ut:null,t(Ut+Ct<=J.Fc+J.Vb),ew(J),i(J.Ac,J.Bc,0,Bt),ft=1}}if(ft){if(lt.ka=0,lt.y=J.sa,lt.O=J.ta,lt.f=J.qa,lt.N=J.ra,lt.ea=J.Ha,lt.Vd=J.Ia,lt.fa=J.R,lt.Rc=J.B,lt.F=null,lt.J=0,!DO){for(ft=-255;255>=ft;++ft)PO[255+ft]=0>ft?-ft:ft;for(ft=-1020;1020>=ft;++ft)MO[1020+ft]=-128>ft?-128:127<ft?127:ft;for(ft=-112;112>=ft;++ft)kO[112+ft]=-16>ft?-16:15<ft?15:ft;for(ft=-255;510>=ft;++ft)OO[255+ft]=0>ft?0:255<ft?255:ft;DO=1}Zh=BB,vc=zF,S0=XF,hs=qF,Xo=jo,tu=bB,Rr=EB,Hr=SB,Oi=TB,An=b,wc=FB,dw=gd,F0=N,UB=X,TO=m0,_O=aw,IO=v0,UO=xB,Ja[0]=i4,Ja[1]=d0,Ja[2]=e4,Ja[3]=r4,Ja[4]=n4,Ja[5]=fc,Ja[6]=s4,Ja[7]=dc,Ja[8]=a4,Ja[9]=A4,eu[0]=CB,eu[1]=YF,eu[2]=JF,eu[3]=ZF,eu[4]=zh,eu[5]=t4,eu[6]=fd,yc[0]=o4,yc[1]=rw,yc[2]=g0,yc[3]=iw,yc[4]=l4,yc[5]=p0,yc[6]=nw,ft=1}else ft=0}ft&&(ft=function(Je,an){for(Je.M=0;Je.M<Je.Va;++Je.M){var Ge,oe=Je.Jc[Je.M&Je.Xb],Ot=Je.m,Di=Je;for(Ge=0;Ge<Di.za;++Ge){var ke=Ot,er=Di,qr=er.Ac,Hn=er.Bc+4*Ge,Ls=er.zc,Bi=er.ya[er.aa+Ge];if(er.Qa.Bb?Bi.$b=yt(ke,er.Pa.jb[0])?2+yt(ke,er.Pa.jb[2]):yt(ke,er.Pa.jb[1]):Bi.$b=0,er.kc&&(Bi.Ad=yt(ke,er.Bd)),Bi.Za=!yt(ke,145)+0,Bi.Za){var us=Bi.Ob,Qs=0;for(er=0;4>er;++er){var on,sr=Ls[0+er];for(on=0;4>on;++on){sr=oat[qr[Hn+on]][sr];for(var wr=VO[yt(ke,sr[0])];0<wr;)wr=VO[2*wr+yt(ke,sr[wr])];sr=-wr,qr[Hn+on]=sr}r(us,Qs,qr,Hn,4),Qs+=4,Ls[0+er]=sr}}else sr=yt(ke,156)?yt(ke,128)?1:3:yt(ke,163)?2:0,Bi.Ob[0]=sr,i(qr,Hn,sr,4),i(Ls,0,sr,4);Bi.Dd=yt(ke,142)?yt(ke,114)?yt(ke,183)?1:3:2:0}if(Di.m.Ka)return $e(Je,7,"Premature end-of-partition0 encountered.");for(;Je.ja<Je.za;++Je.ja){if(Di=oe,ke=(Ot=Je).rb[Ot.sb-1],qr=Ot.rb[Ot.sb+Ot.ja],Ge=Ot.ya[Ot.aa+Ot.ja],Hn=Ot.kc?Ge.Ad:0)ke.la=qr.la=0,Ge.Za||(ke.Na=qr.Na=0),Ge.Hc=0,Ge.Gc=0,Ge.ia=0;else{var Ci,yr;if(ke=qr,qr=Di,Hn=Ot.Pa.Xc,Ls=Ot.ya[Ot.aa+Ot.ja],Bi=Ot.pb[Ls.$b],er=Ls.ad,us=0,Qs=Ot.rb[Ot.sb-1],sr=on=0,i(er,us,0,384),Ls.Za)var Kn=0,Za=Hn[3];else{wr=s(16);var Ri=ke.Na+Qs.Na;if(Ri=pw(qr,Hn[1],Ri,Bi.Eb,0,wr,0),ke.Na=Qs.Na=(0<Ri)+0,1<Ri)Zh(wr,0,er,us);else{var Ys=wr[0]+3>>3;for(wr=0;256>wr;wr+=16)er[us+wr]=Ys}Kn=1,Za=Hn[0]}var Pr=15&ke.la,ln=15&Qs.la;for(wr=0;4>wr;++wr){var QA=1&ln;for(Ys=yr=0;4>Ys;++Ys)Pr=Pr>>1|(QA=(Ri=pw(qr,Za,Ri=QA+(1&Pr),Bi.Sc,Kn,er,us))>Kn)<<7,yr=yr<<2|(3<Ri?3:1<Ri?2:er[us+0]!=0),us+=16;Pr>>=4,ln=ln>>1|QA<<7,on=(on<<8|yr)>>>0}for(Za=Pr,Kn=ln>>4,Ci=0;4>Ci;Ci+=2){for(yr=0,Pr=ke.la>>4+Ci,ln=Qs.la>>4+Ci,wr=0;2>wr;++wr){for(QA=1&ln,Ys=0;2>Ys;++Ys)Ri=QA+(1&Pr),Pr=Pr>>1|(QA=0<(Ri=pw(qr,Hn[2],Ri,Bi.Qc,0,er,us)))<<3,yr=yr<<2|(3<Ri?3:1<Ri?2:er[us+0]!=0),us+=16;Pr>>=2,ln=ln>>1|QA<<5}sr|=yr<<4*Ci,Za|=Pr<<4<<Ci,Kn|=(240&ln)<<Ci}ke.la=Za,Qs.la=Kn,Ls.Hc=on,Ls.Gc=sr,Ls.ia=43690&sr?0:Bi.ia,Hn=!(on|sr)}if(0<Ot.L&&(Ot.wa[Ot.Y+Ot.ja]=Ot.gd[Ge.$b][Ge.Za],Ot.wa[Ot.Y+Ot.ja].La|=!Hn),Di.Ka)return $e(Je,7,"Premature end-of-file encountered.")}if(ew(Je),Ot=an,Di=1,Ge=(oe=Je).D,ke=0<oe.L&&oe.M>=oe.zb&&oe.M<=oe.Va,oe.Aa==0)e:{if(Ge.M=oe.M,Ge.uc=ke,b0(oe,Ge),Di=1,Ge=(yr=oe.D).Nb,ke=(sr=RB[oe.L])*oe.R,qr=sr/2*oe.B,wr=16*Ge*oe.R,Ys=8*Ge*oe.B,Hn=oe.sa,Ls=oe.ta-ke+wr,Bi=oe.qa,er=oe.ra-qr+Ys,us=oe.Ha,Qs=oe.Ia-qr+Ys,ln=(Pr=yr.M)==0,on=Pr>=oe.Va-1,oe.Aa==2&&b0(oe,yr),yr.uc)for(QA=(Ri=oe).D.M,t(Ri.D.uc),yr=Ri.yb;yr<Ri.Hb;++yr){Kn=yr,Za=QA;var Ns=(NA=(Vn=Ri).D).Nb;Ci=Vn.R;var NA=NA.wa[NA.Y+Kn],PA=Vn.sa,Js=Vn.ta+16*Ns*Ci+16*Kn,MA=NA.dd,Kr=NA.tc;if(Kr!=0)if(t(3<=Kr),Vn.L==1)0<Kn&&_O(PA,Js,Ci,Kr+4),NA.La&&UO(PA,Js,Ci,Kr),0<Za&&TO(PA,Js,Ci,Kr+4),NA.La&&IO(PA,Js,Ci,Kr);else{var kA=Vn.B,to=Vn.qa,Fd=Vn.ra+8*Ns*kA+8*Kn,bc=Vn.Ha,Vn=Vn.Ia+8*Ns*kA+8*Kn;Ns=NA.ld,0<Kn&&(Hr(PA,Js,Ci,Kr+4,MA,Ns),An(to,Fd,bc,Vn,kA,Kr+4,MA,Ns)),NA.La&&(dw(PA,Js,Ci,Kr,MA,Ns),UB(to,Fd,bc,Vn,kA,Kr,MA,Ns)),0<Za&&(Rr(PA,Js,Ci,Kr+4,MA,Ns),Oi(to,Fd,bc,Vn,kA,Kr+4,MA,Ns)),NA.La&&(wc(PA,Js,Ci,Kr,MA,Ns),F0(to,Fd,bc,Vn,kA,Kr,MA,Ns))}}if(oe.ia&&alert("todo:DitherRow"),Ot.put!=null){if(yr=16*Pr,Pr=16*(Pr+1),ln?(Ot.y=oe.sa,Ot.O=oe.ta+wr,Ot.f=oe.qa,Ot.N=oe.ra+Ys,Ot.ea=oe.Ha,Ot.W=oe.Ia+Ys):(yr-=sr,Ot.y=Hn,Ot.O=Ls,Ot.f=Bi,Ot.N=er,Ot.ea=us,Ot.W=Qs),on||(Pr-=sr),Pr>Ot.o&&(Pr=Ot.o),Ot.F=null,Ot.J=null,oe.Fa!=null&&0<oe.Fa.length&&yr<Pr&&(Ot.J=Xi(oe,Ot,yr,Pr-yr),Ot.F=oe.mb,Ot.F==null&&Ot.F.length==0)){Di=$e(oe,3,"Could not decode alpha data.");break e}yr<Ot.j&&(sr=Ot.j-yr,yr=Ot.j,t(!(1&sr)),Ot.O+=oe.R*sr,Ot.N+=oe.B*(sr>>1),Ot.W+=oe.B*(sr>>1),Ot.F!=null&&(Ot.J+=Ot.width*sr)),yr<Pr&&(Ot.O+=Ot.v,Ot.N+=Ot.v>>1,Ot.W+=Ot.v>>1,Ot.F!=null&&(Ot.J+=Ot.v),Ot.ka=yr-Ot.j,Ot.U=Ot.va-Ot.v,Ot.T=Pr-yr,Di=Ot.put(Ot))}Ge+1!=oe.Ic||on||(r(oe.sa,oe.ta-ke,Hn,Ls+16*oe.R,ke),r(oe.qa,oe.ra-qr,Bi,er+8*oe.B,qr),r(oe.Ha,oe.Ia-qr,us,Qs+8*oe.B,qr))}if(!Di)return $e(Je,6,"Output aborted.")}return 1}(J,lt)),lt.bc!=null&<.bc(lt),ft&=1}return ft?(J.cb=0,ft):0})(g,F)||(v=g.a)}}else v=g.a}v==0&&R.Oa!=null&&R.Oa.fd&&(v=bd(R.ba))}R=v}O=R!=0?null:11>O?K.f.RGBA.eb:K.f.kb.y}else O=null;return O};var YO=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(Q,W){for(var U="",D=0;D<4;D++)U+=String.fromCharCode(Q[W++]);return U}function h(Q,W){return Q[W+0]|Q[W+1]<<8}function u(Q,W){return(Q[W+0]|Q[W+1]<<8|Q[W+2]<<16)>>>0}function d(Q,W){return(Q[W+0]|Q[W+1]<<8|Q[W+2]<<16|Q[W+3]<<24)>>>0}new o;var f=[0],p=[0],m=[],y=new o,w=n,B=function(Q,W){var U={},D=0,j=!1,V=0,st=0;if(U.frames=[],!function(M,$){for(var q=0;q<4;q++)if(M[$+q]!="RIFF".charCodeAt(q))return!0;return!1}(Q,W)){for(d(Q,W+=4),W+=8;W<Q.length;){var rt=l(Q,W),it=d(Q,W+=4);W+=4;var At=it+(1&it);switch(rt){case"VP8 ":case"VP8L":U.frames[D]===void 0&&(U.frames[D]={}),(mt=U.frames[D]).src_off=j?st:W-8,mt.src_size=V+it+8,D++,j&&(j=!1,V=0,st=0);break;case"VP8X":(mt=U.header={}).feature_flags=Q[W];var ut=W+4;mt.canvas_width=1+u(Q,ut),ut+=3,mt.canvas_height=1+u(Q,ut),ut+=3;break;case"ALPH":j=!0,V=At+8,st=W-8;break;case"ANIM":(mt=U.header).bgcolor=d(Q,W),ut=W+4,mt.loop_count=h(Q,ut),ut+=2;break;case"ANMF":var vt,mt;(mt=U.frames[D]={}).offset_x=2*u(Q,W),W+=3,mt.offset_y=2*u(Q,W),W+=3,mt.width=1+u(Q,W),W+=3,mt.height=1+u(Q,W),W+=3,mt.duration=u(Q,W),W+=3,vt=Q[W++],mt.dispose=1&vt,mt.blend=vt>>1&1}rt!="ANMF"&&(W+=At)}return U}}(w,0);B.response=w,B.rgbaoutput=!0,B.dataurl=!1;var E=B.header?B.header:null,S=B.frames?B.frames:null;if(E){E.loop_counter=E.loop_count,f=[E.canvas_height],p=[E.canvas_width];for(var _=0;_<S.length&&S[_].blend!=0;_++);}var L=S[0],k=y.WebPDecodeRGBA(w,L.src_off,L.src_size,p,f);L.rgba=k,L.imgwidth=p[0],L.imgheight=f[0];for(var H=0;H<p[0]*f[0]*4;H++)m[H]=k[H];return this.width=p,this.height=f,this.data=m,this}/** ====================================================================
|
|
157
|
-
* @license
|
|
158
|
-
* jsPDF XMP metadata plugin
|
|
159
|
-
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|
160
|
-
*
|
|
161
|
-
* Permission is hereby granted, free of charge, to any person obtaining
|
|
162
|
-
* a copy of this software and associated documentation files (the
|
|
163
|
-
* "Software"), to deal in the Software without restriction, including
|
|
164
|
-
* without limitation the rights to use, copy, modify, merge, publish,
|
|
165
|
-
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
166
|
-
* permit persons to whom the Software is furnished to do so, subject to
|
|
167
|
-
* the following conditions:
|
|
168
|
-
*
|
|
169
|
-
* The above copyright notice and this permission notice shall be
|
|
170
|
-
* included in all copies or substantial portions of the Software.
|
|
171
|
-
*
|
|
172
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
173
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
174
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
175
|
-
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
176
|
-
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
177
|
-
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
178
|
-
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
179
|
-
* ====================================================================
|
|
180
|
-
*/function b8(){var n,t=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(t));n=this.internal.__metadata__.rawXml?e:'<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>'+e.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 "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function B8(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var t,e,r,i,s,A,a,o,l,h=function(M){return M=M||{},this.isStrokeTransparent=M.isStrokeTransparent||!1,this.strokeOpacity=M.strokeOpacity||1,this.strokeStyle=M.strokeStyle||"#000000",this.fillStyle=M.fillStyle||"#000000",this.isFillTransparent=M.isFillTransparent||!1,this.fillOpacity=M.fillOpacity||1,this.font=M.font||"10px sans-serif",this.textBaseline=M.textBaseline||"alphabetic",this.textAlign=M.textAlign||"left",this.lineWidth=M.lineWidth||1,this.lineJoin=M.lineJoin||"miter",this.lineCap=M.lineCap||"butt",this.path=M.path||[],this.transform=M.transform!==void 0?M.transform.clone():new o,this.globalCompositeOperation=M.globalCompositeOperation||"normal",this.globalAlpha=M.globalAlpha||1,this.clip_path=M.clip_path||[],this.currentPoint=M.currentPoint||new A,this.miterLimit=M.miterLimit||10,this.lastPoint=M.lastPoint||new A,this.lineDashOffset=M.lineDashOffset||0,this.lineDash=M.lineDash||[],this.margin=M.margin||[0,0,0,0],this.prevPageLastElemOffset=M.prevPageLastElemOffset||0,this.ignoreClearRect=typeof M.ignoreClearRect!="boolean"||M.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new u(this),t=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,A=this.internal.Point,a=this.internal.Rectangle,o=this.internal.Matrix,l=new h}]);var u=function(M){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var $=M;Object.defineProperty(this,"pdf",{get:function(){return $}});var q=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return q},set:function(z){q=!!z}});var tt=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return tt},set:function(z){tt=!!z}});var et=0;Object.defineProperty(this,"posX",{get:function(){return et},set:function(z){isNaN(z)||(et=z)}});var ot=0;Object.defineProperty(this,"posY",{get:function(){return ot},set:function(z){isNaN(z)||(ot=z)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(z){var Nt;typeof z=="number"?Nt=[z,z,z,z]:((Nt=new Array(4))[0]=z[0],Nt[1]=z.length>=2?z[1]:Nt[0],Nt[2]=z.length>=3?z[2]:Nt[0],Nt[3]=z.length>=4?z[3]:Nt[1]),l.margin=Nt}});var dt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return dt},set:function(z){dt=z}});var wt=0;Object.defineProperty(this,"lastBreak",{get:function(){return wt},set:function(z){wt=z}});var yt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return yt},set:function(z){yt=z}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(z){z instanceof h&&(l=z)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(z){l.path=z}});var St=[];Object.defineProperty(this,"ctxStack",{get:function(){return St},set:function(z){St=z}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(z){var Nt;Nt=d(z),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(z){var Nt=d(z);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(z){["butt","round","square"].indexOf(z)!==-1&&(this.ctx.lineCap=z,this.pdf.setLineCap(z))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(z){isNaN(z)||(this.ctx.lineWidth=z,this.pdf.setLineWidth(z))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(z){["bevel","round","miter"].indexOf(z)!==-1&&(this.ctx.lineJoin=z,this.pdf.setLineJoin(z))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(z){isNaN(z)||(this.ctx.miterLimit=z,this.pdf.setMiterLimit(z))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(z){this.ctx.textBaseline=z}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(z){["right","end","center","left","start"].indexOf(z)!==-1&&(this.ctx.textAlign=z)}});var Mt=null,Pt=null,$t=null;Object.defineProperty(this,"fontFaces",{get:function(){return $t},set:function(z){Mt=null,Pt=null,$t=z}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(z){var Nt;if(this.ctx.font=z,(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(z))!==null){var ve=Nt[1];Nt[2];var re=Nt[3],Tt=Nt[4];Nt[5];var ie=Nt[6],kt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Tt)[2];Tt=Math.floor(kt==="px"?parseFloat(Tt)*this.pdf.internal.scaleFactor:kt==="em"?parseFloat(Tt)*this.pdf.getFontSize():parseFloat(Tt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Tt);var qt=function(Xt){var vr,je,xe=[],Ee=Xt.trim();if(Ee==="")return c5;if(Ee in dI)return[dI[Ee]];for(;Ee!=="";){switch(je=null,vr=(Ee=pI(Ee)).charAt(0)){case'"':case"'":je=g8(Ee.substring(1),vr);break;default:je=p8(Ee)}if(je===null||(xe.push(je[0]),(Ee=pI(je[1]))!==""&&Ee.charAt(0)!==","))return c5;Ee=Ee.replace(/^,/,"")}return xe}(ie);if(this.fontFaces){var zt=function(Xt,vr){var je=Xt.getFontList(),xe=JSON.stringify(je);if(Mt===null||Pt!==xe){var Ee=function(nr){var ne=[];return Object.keys(nr).forEach(function(He){nr[He].forEach(function(Ae){var ge=null;switch(Ae){case"bold":ge={family:He,weight:"bold"};break;case"italic":ge={family:He,style:"italic"};break;case"bolditalic":ge={family:He,weight:"bold",style:"italic"};break;case"":case"normal":ge={family:He}}ge!==null&&(ge.ref={name:He,style:Ae},ne.push(ge))})}),ne}(je);Mt=function(nr){for(var ne={},He=0;He<nr.length;++He){var Ae=l5(nr[He]),ge=Ae.family,ar=Ae.stretch,fe=Ae.style,de=Ae.weight;ne[ge]=ne[ge]||{},ne[ge][ar]=ne[ge][ar]||{},ne[ge][ar][fe]=ne[ge][ar][fe]||{},ne[ge][ar][fe][de]=Ae}return ne}(Ee.concat(vr)),Pt=xe}return Mt}(this.pdf,this.fontFaces),we=qt.map(function(Xt){return{family:Xt,stretch:"normal",weight:re,style:ve}}),Ne=function(Xt,vr,je){for(var xe=(je=je||{}).defaultFontFamily||"times",Ee=Object.assign({},d8,je.genericFontFamilies||{}),nr=null,ne=null,He=0;He<vr.length;++He)if(Ee[(nr=l5(vr[He])).family]&&(nr.family=Ee[nr.family]),Xt.hasOwnProperty(nr.family)){ne=Xt[nr.family];break}if(!(ne=ne||Xt[xe]))throw new Error("Could not find a font-family for the rule '"+gI(nr)+"' and default family '"+xe+"'.");if(ne=function(Ae,ge){if(ge[Ae])return ge[Ae];var ar=o5[Ae],fe=ar<=o5.normal?-1:1,de=fI(ge,hI,ar,fe);if(!de)throw new Error("Could not find a matching font-stretch value for "+Ae);return de}(nr.stretch,ne),ne=function(Ae,ge){if(ge[Ae])return ge[Ae];for(var ar=cI[Ae],fe=0;fe<ar.length;++fe)if(ge[ar[fe]])return ge[ar[fe]];throw new Error("Could not find a matching font-style for "+Ae)}(nr.style,ne),!(ne=function(Ae,ge){if(ge[Ae])return ge[Ae];if(Ae===400&&ge[500])return ge[500];if(Ae===500&&ge[400])return ge[400];var ar=f8[Ae],fe=fI(ge,uI,ar,Ae<400?-1:1);if(!fe)throw new Error("Could not find a matching font-weight for value "+Ae);return fe}(nr.weight,ne)))throw new Error("Failed to resolve a font for the rule '"+gI(nr)+"'.");return ne}(zt,we);this.pdf.setFont(Ne.ref.name,Ne.ref.style)}else{var me="";(re==="bold"||parseInt(re,10)>=700||ve==="bold")&&(me="bold"),ve==="italic"&&(me+="italic"),me.length===0&&(me="normal");for(var Pe="",Ce={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"},Vt=0;Vt<qt.length;Vt++){if(this.pdf.internal.getFont(qt[Vt],me,{noFallback:!0,disableWarning:!0})!==void 0){Pe=qt[Vt];break}if(me==="bolditalic"&&this.pdf.internal.getFont(qt[Vt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Pe=qt[Vt],me="bold";else if(this.pdf.internal.getFont(qt[Vt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Pe=qt[Vt],me="normal";break}}if(Pe===""){for(var ce=0;ce<qt.length;ce++)if(Ce[qt[ce]]){Pe=Ce[qt[ce]];break}}Pe=Pe===""?"Times":Pe,this.pdf.setFont(Pe,me)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(z){this.ctx.globalCompositeOperation=z}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(z){this.ctx.globalAlpha=z}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(z){this.ctx.lineDashOffset=z,mt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(z){this.ctx.lineDash=z,mt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(z){this.ctx.ignoreClearRect=!!z}})};u.prototype.setLineDash=function(M){this.lineDash=M},u.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},u.prototype.fill=function(){S.call(this,"fill",!1)},u.prototype.stroke=function(){S.call(this,"stroke",!1)},u.prototype.beginPath=function(){this.path=[{type:"begin"}]},u.prototype.moveTo=function(M,$){if(isNaN(M)||isNaN($))throw Ir.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var q=this.ctx.transform.applyToPoint(new A(M,$));this.path.push({type:"mt",x:q.x,y:q.y}),this.ctx.lastPoint=new A(M,$)},u.prototype.closePath=function(){var M=new A(0,0),$=0;for($=this.path.length-1;$!==-1;$--)if(this.path[$].type==="begin"&&Ar(this.path[$+1])==="object"&&typeof this.path[$+1].x=="number"){M=new A(this.path[$+1].x,this.path[$+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new A(M.x,M.y)},u.prototype.lineTo=function(M,$){if(isNaN(M)||isNaN($))throw Ir.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var q=this.ctx.transform.applyToPoint(new A(M,$));this.path.push({type:"lt",x:q.x,y:q.y}),this.ctx.lastPoint=new A(q.x,q.y)},u.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),S.call(this,null,!0)},u.prototype.quadraticCurveTo=function(M,$,q,tt){if(isNaN(q)||isNaN(tt)||isNaN(M)||isNaN($))throw Ir.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var et=this.ctx.transform.applyToPoint(new A(q,tt)),ot=this.ctx.transform.applyToPoint(new A(M,$));this.path.push({type:"qct",x1:ot.x,y1:ot.y,x:et.x,y:et.y}),this.ctx.lastPoint=new A(et.x,et.y)},u.prototype.bezierCurveTo=function(M,$,q,tt,et,ot){if(isNaN(et)||isNaN(ot)||isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw Ir.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var dt=this.ctx.transform.applyToPoint(new A(et,ot)),wt=this.ctx.transform.applyToPoint(new A(M,$)),yt=this.ctx.transform.applyToPoint(new A(q,tt));this.path.push({type:"bct",x1:wt.x,y1:wt.y,x2:yt.x,y2:yt.y,x:dt.x,y:dt.y}),this.ctx.lastPoint=new A(dt.x,dt.y)},u.prototype.arc=function(M,$,q,tt,et,ot){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt)||isNaN(et))throw Ir.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ot=!!ot,!this.ctx.transform.isIdentity){var dt=this.ctx.transform.applyToPoint(new A(M,$));M=dt.x,$=dt.y;var wt=this.ctx.transform.applyToPoint(new A(0,q)),yt=this.ctx.transform.applyToPoint(new A(0,0));q=Math.sqrt(Math.pow(wt.x-yt.x,2)+Math.pow(wt.y-yt.y,2))}Math.abs(et-tt)>=2*Math.PI&&(tt=0,et=2*Math.PI),this.path.push({type:"arc",x:M,y:$,radius:q,startAngle:tt,endAngle:et,counterclockwise:ot})},u.prototype.arcTo=function(M,$,q,tt,et){throw new Error("arcTo not implemented.")},u.prototype.rect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw Ir.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(M,$),this.lineTo(M+q,$),this.lineTo(M+q,$+tt),this.lineTo(M,$+tt),this.lineTo(M,$),this.lineTo(M+q,$),this.lineTo(M,$)},u.prototype.fillRect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw Ir.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var et={};this.lineCap!=="butt"&&(et.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(et.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(M,$,q,tt),this.fill(),et.hasOwnProperty("lineCap")&&(this.lineCap=et.lineCap),et.hasOwnProperty("lineJoin")&&(this.lineJoin=et.lineJoin)}},u.prototype.strokeRect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw Ir.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(M,$,q,tt),this.stroke())},u.prototype.clearRect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw Ir.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(M,$,q,tt))},u.prototype.save=function(M){M=typeof M!="boolean"||M;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,q=0;q<this.pdf.internal.getNumberOfPages();q++)this.pdf.setPage(q+1),this.pdf.internal.out("q");if(this.pdf.setPage($),M){this.ctx.fontSize=this.pdf.internal.getFontSize();var tt=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=tt}},u.prototype.restore=function(M){M=typeof M!="boolean"||M;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,q=0;q<this.pdf.internal.getNumberOfPages();q++)this.pdf.setPage(q+1),this.pdf.internal.out("Q");this.pdf.setPage($),M&&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)},u.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(M){var $,q,tt,et;if(M.isCanvasGradient===!0&&(M=M.getColor()),!M)return{r:0,g:0,b:0,a:0,style:M};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(M))$=0,q=0,tt=0,et=0;else{var ot=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(M);if(ot!==null)$=parseInt(ot[1]),q=parseInt(ot[2]),tt=parseInt(ot[3]),et=1;else if((ot=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(M))!==null)$=parseInt(ot[1]),q=parseInt(ot[2]),tt=parseInt(ot[3]),et=parseFloat(ot[4]);else{if(et=1,typeof M=="string"&&M.charAt(0)!=="#"){var dt=new J_(M);M=dt.ok?dt.toHex():"#000000"}M.length===4?($=M.substring(1,2),$+=$,q=M.substring(2,3),q+=q,tt=M.substring(3,4),tt+=tt):($=M.substring(1,3),q=M.substring(3,5),tt=M.substring(5,7)),$=parseInt($,16),q=parseInt(q,16),tt=parseInt(tt,16)}}return{r:$,g:q,b:tt,a:et,style:M}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};u.prototype.fillText=function(M,$,q,tt){if(isNaN($)||isNaN(q)||typeof M!="string")throw Ir.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(tt=isNaN(tt)?void 0:tt,!f.call(this)){var et=At(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;D.call(this,{text:M,x:$,y:q,scale:ot,angle:et,align:this.textAlign,maxWidth:tt})}},u.prototype.strokeText=function(M,$,q,tt){if(isNaN($)||isNaN(q)||typeof M!="string")throw Ir.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){tt=isNaN(tt)?void 0:tt;var et=At(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;D.call(this,{text:M,x:$,y:q,scale:ot,renderingMode:"stroke",angle:et,align:this.textAlign,maxWidth:tt})}},u.prototype.measureText=function(M){if(typeof M!="string")throw Ir.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var $=this.pdf,q=this.pdf.internal.scaleFactor,tt=$.internal.getFontSize(),et=$.getStringUnitWidth(M)*tt/$.internal.scaleFactor;return new function(ot){var dt=(ot=ot||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return dt}}),this}({width:et*=Math.round(96*q/72*1e4)/1e4})},u.prototype.scale=function(M,$){if(isNaN(M)||isNaN($))throw Ir.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var q=new o(M,0,0,$,0,0);this.ctx.transform=this.ctx.transform.multiply(q)},u.prototype.rotate=function(M){if(isNaN(M))throw Ir.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var $=new o(Math.cos(M),Math.sin(M),-Math.sin(M),Math.cos(M),0,0);this.ctx.transform=this.ctx.transform.multiply($)},u.prototype.translate=function(M,$){if(isNaN(M)||isNaN($))throw Ir.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var q=new o(1,0,0,1,M,$);this.ctx.transform=this.ctx.transform.multiply(q)},u.prototype.transform=function(M,$,q,tt,et,ot){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt)||isNaN(et)||isNaN(ot))throw Ir.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var dt=new o(M,$,q,tt,et,ot);this.ctx.transform=this.ctx.transform.multiply(dt)},u.prototype.setTransform=function(M,$,q,tt,et,ot){M=isNaN(M)?1:M,$=isNaN($)?0:$,q=isNaN(q)?0:q,tt=isNaN(tt)?1:tt,et=isNaN(et)?0:et,ot=isNaN(ot)?0:ot,this.ctx.transform=new o(M,$,q,tt,et,ot)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};u.prototype.drawImage=function(M,$,q,tt,et,ot,dt,wt,yt){var St=this.pdf.getImageProperties(M),Mt=1,Pt=1,$t=1,z=1;tt!==void 0&&wt!==void 0&&($t=wt/tt,z=yt/et,Mt=St.width/tt*wt/tt,Pt=St.height/et*yt/et),ot===void 0&&(ot=$,dt=q,$=0,q=0),tt!==void 0&&wt===void 0&&(wt=tt,yt=et),tt===void 0&&wt===void 0&&(wt=St.width,yt=St.height);var Nt=this.ctx.transform.decompose(),ve=At(Nt.rotate.shx),re=new o,Tt=(re=(re=(re=re.multiply(Nt.translate)).multiply(Nt.skew)).multiply(Nt.scale)).applyToRectangle(new a(ot-$*$t,dt-q*z,tt*Mt,et*Pt));if(this.autoPaging){for(var ie,kt=y.call(this,Tt),qt=[],zt=0;zt<kt.length;zt+=1)qt.indexOf(kt[zt])===-1&&qt.push(kt[zt]);E(qt);for(var we=qt[0],Ne=qt[qt.length-1],me=we;me<Ne+1;me++){this.pdf.setPage(me);var Pe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ce=me===1?this.posY+this.margin[0]:this.margin[0],Vt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ce=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Xt=me===1?0:Vt+(me-2)*ce;if(this.ctx.clip_path.length!==0){var vr=this.path;ie=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(ie,this.posX+this.margin[3],-Xt+Ce+this.ctx.prevPageLastElemOffset),_.call(this,"fill",!0),this.path=vr}var je=JSON.parse(JSON.stringify(Tt));je=B([je],this.posX+this.margin[3],-Xt+Ce+this.ctx.prevPageLastElemOffset)[0];var xe=(me>we||me<Ne)&&m.call(this);xe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Pe,ce,null).clip().discardPath()),this.pdf.addImage(M,"JPEG",je.x,je.y,je.w,je.h,null,null,ve),xe&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(M,"JPEG",Tt.x,Tt.y,Tt.w,Tt.h,null,null,ve)};var y=function(M,$,q){var tt=[];$=$||this.pdf.internal.pageSize.width,q=q||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var et=this.posY+this.ctx.prevPageLastElemOffset;switch(M.type){default:case"mt":case"lt":tt.push(Math.floor((M.y+et)/q)+1);break;case"arc":tt.push(Math.floor((M.y+et-M.radius)/q)+1),tt.push(Math.floor((M.y+et+M.radius)/q)+1);break;case"qct":var ot=ut(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x,M.y);tt.push(Math.floor((ot.y+et)/q)+1),tt.push(Math.floor((ot.y+ot.h+et)/q)+1);break;case"bct":var dt=vt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x2,M.y2,M.x,M.y);tt.push(Math.floor((dt.y+et)/q)+1),tt.push(Math.floor((dt.y+dt.h+et)/q)+1);break;case"rect":tt.push(Math.floor((M.y+et)/q)+1),tt.push(Math.floor((M.y+M.h+et)/q)+1)}for(var wt=0;wt<tt.length;wt+=1)for(;this.pdf.internal.getNumberOfPages()<tt[wt];)w.call(this);return tt},w=function(){var M=this.fillStyle,$=this.strokeStyle,q=this.font,tt=this.lineCap,et=this.lineWidth,ot=this.lineJoin;this.pdf.addPage(),this.fillStyle=M,this.strokeStyle=$,this.font=q,this.lineCap=tt,this.lineWidth=et,this.lineJoin=ot},B=function(M,$,q){for(var tt=0;tt<M.length;tt++)switch(M[tt].type){case"bct":M[tt].x2+=$,M[tt].y2+=q;case"qct":M[tt].x1+=$,M[tt].y1+=q;default:M[tt].x+=$,M[tt].y+=q}return M},E=function(M){return M.sort(function($,q){return $-q})},S=function(M,$){var q=this.fillStyle,tt=this.strokeStyle,et=this.lineCap,ot=this.lineWidth,dt=Math.abs(ot*this.ctx.transform.scaleX),wt=this.lineJoin;if(this.autoPaging){for(var yt,St,Mt=JSON.parse(JSON.stringify(this.path)),Pt=JSON.parse(JSON.stringify(this.path)),$t=[],z=0;z<Pt.length;z++)if(Pt[z].x!==void 0)for(var Nt=y.call(this,Pt[z]),ve=0;ve<Nt.length;ve+=1)$t.indexOf(Nt[ve])===-1&&$t.push(Nt[ve]);for(var re=0;re<$t.length;re++)for(;this.pdf.internal.getNumberOfPages()<$t[re];)w.call(this);E($t);for(var Tt=$t[0],ie=$t[$t.length-1],kt=Tt;kt<ie+1;kt++){this.pdf.setPage(kt),this.fillStyle=q,this.strokeStyle=tt,this.lineCap=et,this.lineWidth=dt,this.lineJoin=wt;var qt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],zt=kt===1?this.posY+this.margin[0]:this.margin[0],we=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ne=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],me=kt===1?0:we+(kt-2)*Ne;if(this.ctx.clip_path.length!==0){var Pe=this.path;yt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(yt,this.posX+this.margin[3],-me+zt+this.ctx.prevPageLastElemOffset),_.call(this,M,!0),this.path=Pe}if(St=JSON.parse(JSON.stringify(Mt)),this.path=B(St,this.posX+this.margin[3],-me+zt+this.ctx.prevPageLastElemOffset),$===!1||kt===0){var Ce=(kt>Tt||kt<ie)&&m.call(this);Ce&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qt,Ne,null).clip().discardPath()),_.call(this,M,$),Ce&&this.pdf.restoreGraphicsState()}this.lineWidth=ot}this.path=Mt}else this.lineWidth=dt,_.call(this,M,$),this.lineWidth=ot},_=function(M,$){if((M!=="stroke"||$||!p.call(this))&&(M==="stroke"||$||!f.call(this))){for(var q,tt,et=[],ot=this.path,dt=0;dt<ot.length;dt++){var wt=ot[dt];switch(wt.type){case"begin":et.push({begin:!0});break;case"close":et.push({close:!0});break;case"mt":et.push({start:wt,deltas:[],abs:[]});break;case"lt":var yt=et.length;if(ot[dt-1]&&!isNaN(ot[dt-1].x)&&(q=[wt.x-ot[dt-1].x,wt.y-ot[dt-1].y],yt>0)){for(;yt>=0;yt--)if(et[yt-1].close!==!0&&et[yt-1].begin!==!0){et[yt-1].deltas.push(q),et[yt-1].abs.push(wt);break}}break;case"bct":q=[wt.x1-ot[dt-1].x,wt.y1-ot[dt-1].y,wt.x2-ot[dt-1].x,wt.y2-ot[dt-1].y,wt.x-ot[dt-1].x,wt.y-ot[dt-1].y],et[et.length-1].deltas.push(q);break;case"qct":var St=ot[dt-1].x+2/3*(wt.x1-ot[dt-1].x),Mt=ot[dt-1].y+2/3*(wt.y1-ot[dt-1].y),Pt=wt.x+2/3*(wt.x1-wt.x),$t=wt.y+2/3*(wt.y1-wt.y),z=wt.x,Nt=wt.y;q=[St-ot[dt-1].x,Mt-ot[dt-1].y,Pt-ot[dt-1].x,$t-ot[dt-1].y,z-ot[dt-1].x,Nt-ot[dt-1].y],et[et.length-1].deltas.push(q);break;case"arc":et.push({deltas:[],abs:[],arc:!0}),Array.isArray(et[et.length-1].abs)&&et[et.length-1].abs.push(wt)}}tt=$?null:M==="stroke"?"stroke":"fill";for(var ve=!1,re=0;re<et.length;re++)if(et[re].arc)for(var Tt=et[re].abs,ie=0;ie<Tt.length;ie++){var kt=Tt[ie];kt.type==="arc"?H.call(this,kt.x,kt.y,kt.radius,kt.startAngle,kt.endAngle,kt.counterclockwise,void 0,$,!ve):j.call(this,kt.x,kt.y),ve=!0}else if(et[re].close===!0)this.pdf.internal.out("h"),ve=!1;else if(et[re].begin!==!0){var qt=et[re].start.x,zt=et[re].start.y;V.call(this,et[re].deltas,qt,zt),ve=!0}tt&&Q.call(this,tt),$&&W.call(this)}},L=function(M){var $=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,q=$*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return M-q;case"top":return M+$-q;case"hanging":return M+$-2*q;case"middle":return M+$/2-q;default:return M}},k=function(M){return M+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};u.prototype.createLinearGradient=function(){var M=function(){};return M.colorStops=[],M.addColorStop=function($,q){this.colorStops.push([$,q])},M.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},M.isCanvasGradient=!0,M},u.prototype.createPattern=function(){return this.createLinearGradient()},u.prototype.createRadialGradient=function(){return this.createLinearGradient()};var H=function(M,$,q,tt,et,ot,dt,wt,yt){for(var St=rt.call(this,q,tt,et,ot),Mt=0;Mt<St.length;Mt++){var Pt=St[Mt];Mt===0&&(yt?U.call(this,Pt.x1+M,Pt.y1+$):j.call(this,Pt.x1+M,Pt.y1+$)),st.call(this,M,$,Pt.x2,Pt.y2,Pt.x3,Pt.y3,Pt.x4,Pt.y4)}wt?W.call(this):Q.call(this,dt)},Q=function(M){switch(M){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},W=function(){this.pdf.clip(),this.pdf.discardPath()},U=function(M,$){this.pdf.internal.out(e(M)+" "+r($)+" m")},D=function(M){var $;switch(M.align){case"right":case"end":$="right";break;case"center":$="center";break;default:$="left"}var q,tt,et,ot=this.pdf.getTextDimensions(M.text),dt=L.call(this,M.y),wt=k.call(this,dt)-ot.h,yt=this.ctx.transform.applyToPoint(new A(M.x,dt));if(this.autoPaging){var St=this.ctx.transform.decompose(),Mt=new o;Mt=(Mt=(Mt=Mt.multiply(St.translate)).multiply(St.skew)).multiply(St.scale);for(var Pt=this.ctx.transform.applyToRectangle(new a(M.x,dt,ot.w,ot.h)),$t=Mt.applyToRectangle(new a(M.x,wt,ot.w,ot.h)),z=y.call(this,$t),Nt=[],ve=0;ve<z.length;ve+=1)Nt.indexOf(z[ve])===-1&&Nt.push(z[ve]);E(Nt);for(var re=Nt[0],Tt=Nt[Nt.length-1],ie=re;ie<Tt+1;ie++){this.pdf.setPage(ie);var kt=ie===1?this.posY+this.margin[0]:this.margin[0],qt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],zt=this.pdf.internal.pageSize.height-this.margin[2],we=zt-this.margin[0],Ne=this.pdf.internal.pageSize.width-this.margin[1],me=Ne-this.margin[3],Pe=ie===1?0:qt+(ie-2)*we;if(this.ctx.clip_path.length!==0){var Ce=this.path;q=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(q,this.posX+this.margin[3],-1*Pe+kt),_.call(this,"fill",!0),this.path=Ce}var Vt=B([JSON.parse(JSON.stringify($t))],this.posX+this.margin[3],-Pe+kt+this.ctx.prevPageLastElemOffset)[0];M.scale>=.01&&(tt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(tt*M.scale),et=this.lineWidth,this.lineWidth=et*M.scale);var ce=this.autoPaging!=="text";if(ce||Vt.y+Vt.h<=zt){if(ce||Vt.y>=kt&&Vt.x<=Ne){var Xt=ce?M.text:this.pdf.splitTextToSize(M.text,M.maxWidth||Ne-Vt.x)[0],vr=B([JSON.parse(JSON.stringify(Pt))],this.posX+this.margin[3],-Pe+kt+this.ctx.prevPageLastElemOffset)[0],je=ce&&(ie>re||ie<Tt)&&m.call(this);je&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],me,we,null).clip().discardPath()),this.pdf.text(Xt,vr.x,vr.y,{angle:M.angle,align:$,renderingMode:M.renderingMode}),je&&this.pdf.restoreGraphicsState()}}else Vt.y<zt&&(this.ctx.prevPageLastElemOffset+=zt-Vt.y);M.scale>=.01&&(this.pdf.setFontSize(tt),this.lineWidth=et)}}else M.scale>=.01&&(tt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(tt*M.scale),et=this.lineWidth,this.lineWidth=et*M.scale),this.pdf.text(M.text,yt.x+this.posX,yt.y+this.posY,{angle:M.angle,align:$,renderingMode:M.renderingMode,maxWidth:M.maxWidth}),M.scale>=.01&&(this.pdf.setFontSize(tt),this.lineWidth=et)},j=function(M,$,q,tt){q=q||0,tt=tt||0,this.pdf.internal.out(e(M+q)+" "+r($+tt)+" l")},V=function(M,$,q){return this.pdf.lines(M,$,q,null,null)},st=function(M,$,q,tt,et,ot,dt,wt){this.pdf.internal.out([t(i(q+M)),t(s(tt+$)),t(i(et+M)),t(s(ot+$)),t(i(dt+M)),t(s(wt+$)),"c"].join(" "))},rt=function(M,$,q,tt){for(var et=2*Math.PI,ot=Math.PI/2;$>q;)$-=et;var dt=Math.abs(q-$);dt<et&&tt&&(dt=et-dt);for(var wt=[],yt=tt?-1:1,St=$;dt>1e-5;){var Mt=St+yt*Math.min(dt,ot);wt.push(it.call(this,M,St,Mt)),dt-=Math.abs(Mt-St),St=Mt}return wt},it=function(M,$,q){var tt=(q-$)/2,et=M*Math.cos(tt),ot=M*Math.sin(tt),dt=et,wt=-ot,yt=dt*dt+wt*wt,St=yt+dt*et+wt*ot,Mt=4/3*(Math.sqrt(2*yt*St)-St)/(dt*ot-wt*et),Pt=dt-Mt*wt,$t=wt+Mt*dt,z=Pt,Nt=-$t,ve=tt+$,re=Math.cos(ve),Tt=Math.sin(ve);return{x1:M*Math.cos($),y1:M*Math.sin($),x2:Pt*re-$t*Tt,y2:Pt*Tt+$t*re,x3:z*re-Nt*Tt,y3:z*Tt+Nt*re,x4:M*Math.cos(q),y4:M*Math.sin(q)}},At=function(M){return 180*M/Math.PI},ut=function(M,$,q,tt,et,ot){var dt=M+.5*(q-M),wt=$+.5*(tt-$),yt=et+.5*(q-et),St=ot+.5*(tt-ot),Mt=Math.min(M,et,dt,yt),Pt=Math.max(M,et,dt,yt),$t=Math.min($,ot,wt,St),z=Math.max($,ot,wt,St);return new a(Mt,$t,Pt-Mt,z-$t)},vt=function(M,$,q,tt,et,ot,dt,wt){var yt,St,Mt,Pt,$t,z,Nt,ve,re,Tt,ie,kt,qt,zt,we=q-M,Ne=tt-$,me=et-q,Pe=ot-tt,Ce=dt-et,Vt=wt-ot;for(St=0;St<41;St++)re=(Nt=(Mt=M+(yt=St/40)*we)+yt*(($t=q+yt*me)-Mt))+yt*($t+yt*(et+yt*Ce-$t)-Nt),Tt=(ve=(Pt=$+yt*Ne)+yt*((z=tt+yt*Pe)-Pt))+yt*(z+yt*(ot+yt*Vt-z)-ve),St==0?(ie=re,kt=Tt,qt=re,zt=Tt):(ie=Math.min(ie,re),kt=Math.min(kt,Tt),qt=Math.max(qt,re),zt=Math.max(zt,Tt));return new a(Math.round(ie),Math.round(kt),Math.round(qt-ie),Math.round(zt-kt))},mt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var M,$,q=(M=this.ctx.lineDash,$=this.ctx.lineDashOffset,JSON.stringify({lineDash:M,lineDashOffset:$}));this.prevLineDash!==q&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=q)}}})(le.API),function(n){var t=function(A){var a,o,l,h,u,d,f,p,m,y;for(o=[],l=0,h=(A+=a="\0\0\0\0".slice(A.length%4||4)).length;h>l;l+=4)(u=(A.charCodeAt(l)<<24)+(A.charCodeAt(l+1)<<16)+(A.charCodeAt(l+2)<<8)+A.charCodeAt(l+3))!==0?(d=(u=((u=((u=((u=(u-(y=u%85))/85)-(m=u%85))/85)-(p=u%85))/85)-(f=u%85))/85)%85,o.push(d+33,f+33,p+33,m+33,y+33)):o.push(122);return function(w,B){for(var E=B;E>0;E--)w.pop()}(o,a.length),String.fromCharCode.apply(String,o)+"~>"},e=function(A){var a,o,l,h,u,d=String,f="length",p=255,m="charCodeAt",y="slice",w="replace";for(A[y](-2),A=A[y](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),l=[],h=0,u=(A+=a="uuuuu"[y](A[f]%5||5))[f];u>h;h+=5)o=52200625*(A[m](h)-33)+614125*(A[m](h+1)-33)+7225*(A[m](h+2)-33)+85*(A[m](h+3)-33)+(A[m](h+4)-33),l.push(p&o>>24,p&o>>16,p&o>>8,p&o);return function(B,E){for(var S=E;S>0;S--)B.pop()}(l,a[f]),d.fromCharCode.apply(d,l)},r=function(A){return A.split("").map(function(a){return("0"+a.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(A){var a=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((A=A.replace(/\s/g,"")).indexOf(">")!==-1&&(A=A.substr(0,A.indexOf(">"))),A.length%2&&(A+="0"),a.test(A)===!1)return"";for(var o="",l=0;l<A.length;l+=2)o+=String.fromCharCode("0x"+(A[l]+A[l+1]));return o},s=function(A){for(var a=new Uint8Array(A.length),o=A.length;o--;)a[o]=A.charCodeAt(o);return(a=kC(a)).reduce(function(l,h){return l+String.fromCharCode(h)},"")};n.processDataByFilters=function(A,a){var o=0,l=A||"",h=[];for(typeof(a=a||[])=="string"&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":l=e(l),h.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=t(l),h.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=i(l),h.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=r(l),h.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=s(l),h.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:l,reverseChain:h.reverse().join(" ")}}}(le.API),function(n){n.loadFile=function(t,e,r){return function(i,s,A){s=s!==!1,A=typeof A=="function"?A:function(){};var a=void 0;try{a=function(o,l,h){var u=new XMLHttpRequest,d=0,f=function(p){var m=p.length,y=[],w=String.fromCharCode;for(d=0;d<m;d+=1)y.push(w(255&p.charCodeAt(d)));return y.join("")};if(u.open("GET",o,!l),u.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(u.onload=function(){u.status===200?h(f(this.responseText)):h(void 0)}),u.send(null),l&&u.status===200)return f(u.responseText)}(i,s,A)}catch{}return a}(t,e,r)},n.allowFsRead=void 0,n.loadImageFile=n.loadFile}(le.API),function(n){function t(){return(ye.html2canvas?Promise.resolve(ye.html2canvas):Promise.resolve().then(()=>uz)).catch(function(a){return Promise.reject(new Error("Could not load html2canvas: "+a))}).then(function(a){return a.default?a.default:a})}function e(){return(ye.DOMPurify?Promise.resolve(ye.DOMPurify):Promise.resolve().then(()=>Gz)).catch(function(a){return Promise.reject(new Error("Could not load dompurify: "+a))}).then(function(a){return a.default?a.default:a})}var r=function(a){var o=Ar(a);return o==="undefined"?"undefined":o==="string"||a instanceof String?"string":o==="number"||a instanceof Number?"number":o==="function"||a instanceof Function?"function":a&&a.constructor===Array?"array":a&&a.nodeType===1?"element":o==="object"?"object":"unknown"},i=function(a,o){var l=document.createElement(a);for(var h in o.className&&(l.className=o.className),o.innerHTML&&o.dompurify&&(l.innerHTML=o.dompurify.sanitize(o.innerHTML)),o.style)l.style[h]=o.style[h];return l},s=function a(o,l){for(var h=o.nodeType===3?document.createTextNode(o.nodeValue):o.cloneNode(!1),u=o.firstChild;u;u=u.nextSibling)l!==!0&&u.nodeType===1&&u.nodeName==="SCRIPT"||h.appendChild(a(u,l));return o.nodeType===1&&(o.nodeName==="CANVAS"?(h.width=o.width,h.height=o.height,h.getContext("2d").drawImage(o,0,0)):o.nodeName!=="TEXTAREA"&&o.nodeName!=="SELECT"||(h.value=o.value),h.addEventListener("load",function(){h.scrollTop=o.scrollTop,h.scrollLeft=o.scrollLeft},!0)),h},A=function a(o){var l=Object.assign(a.convert(Promise.resolve()),JSON.parse(JSON.stringify(a.template))),h=a.convert(Promise.resolve(),l);return(h=h.setProgress(1,a,1,[a])).set(o)};(A.prototype=Object.create(Promise.prototype)).constructor=A,A.convert=function(a,o){return a.__proto__=o||A.prototype,a},A.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"}},A.prototype.from=function(a,o){return this.then(function(){switch(o=o||function(l){switch(r(l)){case"string":return"string";case"element":return l.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(a),o){case"string":return this.then(e).then(function(l){return this.set({src:i("div",{innerHTML:a,dompurify:l})})});case"element":return this.set({src:a});case"canvas":return this.set({canvas:a});case"img":return this.set({img:a});default:return this.error("Unknown source type.")}})},A.prototype.to=function(a){switch(a){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.")}},A.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 a={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},o=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);o.tagName==="BODY"&&(a.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:a}),this.prop.container.appendChild(o),this.prop.container.firstChild.appendChild(i("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"})},A.prototype.toCanvas=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(o){var l=Object.assign({},this.opt.html2canvas);return delete l.onrendered,o(this.prop.container,l)}).then(function(o){(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},A.prototype.toContext2d=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(o){var l=this.opt.jsPDF,h=this.opt.fontFaces,u=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,d=Object.assign({async:!0,allowTaint:!0,scale:u,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 d.onrendered,l.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,l.context2d.posX=this.opt.x,l.context2d.posY=this.opt.y,l.context2d.margin=this.opt.margin,l.context2d.fontFaces=h,h)for(var f=0;f<h.length;++f){var p=h[f],m=p.src.find(function(y){return y.format==="truetype"});m&&l.addFont(m.url,p.ref.name,p.ref.style)}return d.windowHeight=d.windowHeight||0,d.windowHeight=d.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):d.windowHeight,l.context2d.save(!0),o(this.prop.container,d)}).then(function(o){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},A.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var a=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=a})},A.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},A.prototype.output=function(a,o,l){return(l=l||"pdf").toLowerCase()==="img"||l.toLowerCase()==="image"?this.outputImg(a,o):this.outputPdf(a,o)},A.prototype.outputPdf=function(a,o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(a,o)})},A.prototype.outputImg=function(a){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(a){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 "'+a+'" is not supported.'}})},A.prototype.save=function(a){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(a?{filename:a}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},A.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},A.prototype.set=function(a){if(r(a)!=="object")return this;var o=Object.keys(a||{}).map(function(l){if(l in A.template.prop)return function(){this.prop[l]=a[l]};switch(l){case"margin":return this.setMargin.bind(this,a.margin);case"jsPDF":return function(){return this.opt.jsPDF=a.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,a.pageSize);default:return function(){this.opt[l]=a[l]}}},this);return this.then(function(){return this.thenList(o)})},A.prototype.get=function(a,o){return this.then(function(){var l=a in A.template.prop?this.prop[a]:this.opt[a];return o?o(l):l})},A.prototype.setMargin=function(a){return this.then(function(){switch(r(a)){case"number":a=[a,a,a,a];case"array":if(a.length===2&&(a=[a[0],a[1],a[0],a[1]]),a.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=a}).then(this.setPageSize)},A.prototype.setPageSize=function(a){function o(l,h){return Math.floor(l*h/72*96)}return this.then(function(){(a=a||le.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(a.inner={width:a.width-this.opt.margin[1]-this.opt.margin[3],height:a.height-this.opt.margin[0]-this.opt.margin[2]},a.inner.px={width:o(a.inner.width,a.k),height:o(a.inner.height,a.k)},a.inner.ratio=a.inner.height/a.inner.width),this.prop.pageSize=a})},A.prototype.setProgress=function(a,o,l,h){return a!=null&&(this.progress.val=a),o!=null&&(this.progress.state=o),l!=null&&(this.progress.n=l),h!=null&&(this.progress.stack=h),this.progress.ratio=this.progress.val/this.progress.state,this},A.prototype.updateProgress=function(a,o,l,h){return this.setProgress(a?this.progress.val+a:null,o||null,l?this.progress.n+l:null,h?this.progress.stack.concat(h):null)},A.prototype.then=function(a,o){var l=this;return this.thenCore(a,o,function(h,u){return l.updateProgress(null,null,1,[h]),Promise.prototype.then.call(this,function(d){return l.updateProgress(null,h),d}).then(h,u).then(function(d){return l.updateProgress(1),d})})},A.prototype.thenCore=function(a,o,l){l=l||Promise.prototype.then;var h=this;a&&(a=a.bind(h)),o&&(o=o.bind(h));var u=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?h:A.convert(Object.assign({},h),Promise.prototype),d=l.call(u,a,o);return A.convert(d,h.__proto__)},A.prototype.thenExternal=function(a,o){return Promise.prototype.then.call(this,a,o)},A.prototype.thenList=function(a){var o=this;return a.forEach(function(l){o=o.thenCore(l)}),o},A.prototype.catch=function(a){a&&(a=a.bind(this));var o=Promise.prototype.catch.call(this,a);return A.convert(o,this)},A.prototype.catchExternal=function(a){return Promise.prototype.catch.call(this,a)},A.prototype.error=function(a){return this.then(function(){throw new Error(a)})},A.prototype.using=A.prototype.set,A.prototype.saveAs=A.prototype.save,A.prototype.export=A.prototype.output,A.prototype.run=A.prototype.then,le.getPageSize=function(a,o,l){if(Ar(a)==="object"){var h=a;a=h.orientation,o=h.unit||o,l=h.format||l}o=o||"mm",l=l||"a4",a=(""+(a||"P")).toLowerCase();var u,d=(""+l).toLowerCase(),f={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(o){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+o}var p,m=0,y=0;if(f.hasOwnProperty(d))m=f[d][1]/u,y=f[d][0]/u;else try{m=l[1],y=l[0]}catch{throw new Error("Invalid format: "+l)}if(a==="p"||a==="portrait")a="p",y>m&&(p=y,y=m,m=p);else{if(a!=="l"&&a!=="landscape")throw"Invalid orientation: "+a;a="l",m>y&&(p=y,y=m,m=p)}return{width:y,height:m,unit:o,k:u,orientation:a}},n.html=function(a,o){(o=o||{}).callback=o.callback||function(){},o.html2canvas=o.html2canvas||{},o.html2canvas.canvas=o.html2canvas.canvas||this.canvas,o.jsPDF=o.jsPDF||this,o.fontFaces=o.fontFaces?o.fontFaces.map(l5):null;var l=new A(o);return o.worker?l:l.from(a).doCallback()}}(le.API),le.API.addJS=function(n){var t,e,r=function(i){for(var s="",A=0;A<i.length;A++){var a=i[A];if(a==="("||a===")"){for(var o=0,l=A-1;l>=0&&i[l]==="\\";l--)o++;s+=o%2==0?"\\"+a:a}else s+=a}return s}(n);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"),e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&e!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},function(n){var t;n.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=e.outline.render().split(/\r\n/),s=0;s<i.length;s++){var A=i[s],a=r.exec(A);if(a!=null){var o=a[1];e.internal.newObjectDeferredBegin(o,!1)}e.internal.write(A)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,h=[];for(s=0;s<l;s++){var u=e.internal.newObject();h.push(u);var d=e.internal.getPageInfo(s+1);e.internal.write("<< /D["+d.objId+" 0 R /XYZ null null null]>> endobj")}var f=e.internal.newObject();for(e.internal.write("<< /Names [ "),s=0;s<h.length;s++)e.internal.write("(page_"+(s+1)+")"+h[s]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+f+" 0 R"),e.internal.write(">>","endobj")}}]),n.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),n.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,i,s){var A={title:i,options:s,children:[]};return r==null&&(r=this.root),r.children.push(A),A},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(r){r.id=e.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},e.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<r.children.length;s++){var A=r.children[s];this.objStart(A),this.line("/Title "+this.makeString(A.title)),this.line("/Parent "+this.makeRef(r)),s>0&&this.line("/Prev "+this.makeRef(r.children[s-1])),s<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[s+1])),A.children.length>0&&(this.line("/First "+this.makeRef(A.children[0])),this.line("/Last "+this.makeRef(A.children[A.children.length-1])));var a=this.count=this.count_r({count:0},A);if(a>0&&this.line("/Count "+a),A.options&&A.options.pageNumber){var o=e.internal.getPageInfo(A.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var l=0;l<r.children.length;l++)this.renderItems(r.children[l])},e.outline.line=function(r){this.ctx.val+=r+`\r
|
|
181
|
-
`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r
|
|
182
|
-
`+r.id+` 0 obj\r
|
|
183
|
-
<<\r
|
|
184
|
-
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
185
|
-
endobj\r
|
|
186
|
-
`},e.outline.count_r=function(r,i){for(var s=0;s<i.children.length;s++)r.count++,this.count_r(r,i.children[s]);return r.count}}])}(le.API),function(n){var t=[192,193,194,195,196,197,198,199];n.processJPEG=function(e,r,i,s,A,a){var o,l=this.decode.DCT_DECODE,h=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=A||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,o=function(u){for(var d,f=256*u.charCodeAt(4)+u.charCodeAt(5),p=u.length,m={width:0,height:0,numcomponents:1},y=4;y<p;y+=2){if(y+=f,t.indexOf(u.charCodeAt(y+1))!==-1){d=256*u.charCodeAt(y+5)+u.charCodeAt(y+6),m={width:256*u.charCodeAt(y+7)+u.charCodeAt(y+8),height:d,numcomponents:u.charCodeAt(y+9)};break}f=256*u.charCodeAt(y+2)+u.charCodeAt(y+3)}return m}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),o.numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}h={data:e,width:o.width,height:o.height,colorSpace:a,bitsPerComponent:8,filter:l,index:r,alias:i}}return h}}(le.API),le.API.processPNG=function(n,t,e,r){if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){var i,s=ZH(n,{checkCrc:!0}),A=s.width,a=s.height,o=s.channels,l=s.palette,h=s.depth;i=l&&o===1?function(H){for(var Q=H.width,W=H.height,U=H.data,D=H.palette,j=H.depth,V=!1,st=[],rt=[],it=void 0,At=!1,ut=0,vt=0;vt<D.length;vt++){var mt=HT(D[vt],4),M=mt[0],$=mt[1],q=mt[2],tt=mt[3];st.push(M,$,q),tt!=null&&(tt===0?(ut++,rt.length<1&&rt.push(vt)):tt<255&&(At=!0))}if(At||ut>1){V=!0,rt=void 0;var et=Q*W;it=new Uint8Array(et);for(var ot=new DataView(U.buffer),dt=0;dt<et;dt++){var wt=h5(ot,dt,j),yt=HT(D[wt],4)[3];it[dt]=yt}}else ut===0&&(rt=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:V?8:void 0,colorBytes:U,alphaBytes:it,needSMask:V,palette:st,mask:rt}}(s):o===2||o===4?function(H){for(var Q=H.data,W=H.width,U=H.height,D=H.channels,j=H.depth,V=D===2?"DeviceGray":"DeviceRGB",st=D-1,rt=W*U,it=st,At=rt*it,ut=1*rt,vt=Math.ceil(At*j/8),mt=Math.ceil(ut*j/8),M=new Uint8Array(vt),$=new Uint8Array(mt),q=new DataView(Q.buffer),tt=new DataView(M.buffer),et=new DataView($.buffer),ot=!1,dt=0;dt<rt;dt++){for(var wt=dt*D,yt=0;yt<it;yt++)EI(tt,h5(q,wt+yt,j),dt*it+yt,j);var St=h5(q,wt+it,j);St<(1<<j)-1&&(ot=!0),EI(et,St,1*dt,j)}return{colorSpace:V,colorsPerPixel:st,sMaskBitsPerComponent:ot?j:void 0,colorBytes:M,alphaBytes:$,needSMask:ot}}(s):function(H){var Q=H.data,W=H.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:W,colorsPerPixel:W==="DeviceGray"?1:3,colorBytes:Q instanceof Uint16Array?function(U){for(var D=U.length,j=new Uint8Array(2*D),V=new DataView(j.buffer,j.byteOffset,j.byteLength),st=0;st<D;st++)V.setUint16(2*st,U[st],!1);return j}(Q):Q,needSMask:!1}}(s);var u,d,f,p=i,m=p.colorSpace,y=p.colorsPerPixel,w=p.sMaskBitsPerComponent,B=p.colorBytes,E=p.alphaBytes,S=p.needSMask,_=p.palette,L=p.mask,k=null;return r!==le.API.image_compression.NONE&&typeof kC=="function"?(k=function(H){var Q;switch(H){case le.API.image_compression.FAST:Q=11;break;case le.API.image_compression.MEDIUM:Q=13;break;case le.API.image_compression.SLOW:Q=14;break;default:Q=12}return Q}(r),u=this.decode.FLATE_DECODE,d="/Predictor ".concat(k," /Colors ").concat(y," /BitsPerComponent ").concat(h," /Columns ").concat(A),n=yI(B,Math.ceil(A*y*h/8),y,h,r),S&&(f=yI(E,Math.ceil(A*w/8),1,w,r))):(u=void 0,d=void 0,n=B,S&&(f=E)),(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:e,data:n,index:t,filter:u,decodeParameters:d,transparency:L,palette:_,sMask:f,predictor:k,width:A,height:a,bitsPerComponent:h,sMaskBitsPerComponent:w,colorSpace:m}}},function(n){n.processGIF89A=function(t,e,r,i){var s=new y8(t),A=s.width,a=s.height,o=[];s.decodeAndBlitFrameRGBA(0,o);var l={data:o,width:A,height:a},h=new u5(100).encode(l,100);return n.processJPEG.call(this,h,e,r,i)},n.processGIF87A=n.processGIF89A}(le.API),pa.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 n=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(n);for(var t=0;t<n;t++){var e=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:e,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},pa.prototype.parseBGR=function(){this.pos=this.offset;var n="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[n]()}catch(e){Ir.log("bit decode error:"+e)}},pa.prototype.bit1=function(){var n,t=Math.ceil(this.width/8),e=t%4;for(n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<t;i++)for(var s=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+8*i*4,a=0;a<8&&8*i+a<this.width;a++){var o=this.palette[s>>7-a&1];this.data[A+4*a]=o.blue,this.data[A+4*a+1]=o.green,this.data[A+4*a+2]=o.red,this.data[A+4*a+3]=255}e!==0&&(this.pos+=4-e)}},pa.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),t=n%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<n;i++){var s=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+2*i*4,a=s>>4,o=15&s,l=this.palette[a];if(this.data[A]=l.blue,this.data[A+1]=l.green,this.data[A+2]=l.red,this.data[A+3]=255,2*i+1>=this.width)break;l=this.palette[o],this.data[A+4]=l.blue,this.data[A+4+1]=l.green,this.data[A+4+2]=l.red,this.data[A+4+3]=255}t!==0&&(this.pos+=4-t)}},pa.prototype.bit8=function(){for(var n=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;if(i<this.palette.length){var A=this.palette[i];this.data[s]=A.red,this.data[s+1]=A.green,this.data[s+2]=A.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}n!==0&&(this.pos+=4-n)}},pa.prototype.bit15=function(){for(var n=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var A=(s&t)/t*255|0,a=(s>>5&t)/t*255|0,o=(s>>10&t)/t*255|0,l=s>>15?255:0,h=r*this.width*4+4*i;this.data[h]=o,this.data[h+1]=a,this.data[h+2]=A,this.data[h+3]=l}this.pos+=n}},pa.prototype.bit16=function(){for(var n=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var A=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(A&t)/t*255|0,o=(A>>5&e)/e*255|0,l=(A>>11)/t*255|0,h=i*this.width*4+4*s;this.data[h]=l,this.data[h+1]=o,this.data[h+2]=a,this.data[h+3]=255}this.pos+=n}},pa.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),A=t*this.width*4+4*e;this.data[A]=s,this.data[A+1]=i,this.data[A+2]=r,this.data[A+3]=255}this.pos+=this.width%4}},pa.prototype.bit32=function(){for(var n=this.height-1;n>=0;n--)for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*e;this.data[a]=s,this.data[a+1]=i,this.data[a+2]=r,this.data[a+3]=A}},pa.prototype.getData=function(){return this.data},function(n){n.processBMP=function(t,e,r,i){var s=new pa(t,!1),A=s.width,a=s.height,o={data:s.getData(),width:A,height:a},l=new u5(100).encode(o,100);return n.processJPEG.call(this,l,e,r,i)}}(le.API),TI.prototype.getData=function(){return this.data},function(n){n.processWEBP=function(t,e,r,i){var s=new TI(t),A=s.width,a=s.height,o={data:s.getData(),width:A,height:a},l=new u5(100).encode(o,100);return n.processJPEG.call(this,l,e,r,i)}}(le.API),le.API.processRGBA=function(n,t,e){for(var r=n.data,i=r.length,s=new Uint8Array(i/4*3),A=new Uint8Array(i/4),a=0,o=0,l=0;l<i;l+=4){var h=r[l],u=r[l+1],d=r[l+2],f=r[l+3];s[a++]=h,s[a++]=u,s[a++]=d,A[o++]=f}var p=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(A),data:p,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:n.width,height:n.height}},le.API.setLanguage=function(n){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"}[n]!==void 0&&(this.internal.languageSettings.languageCode=n,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},Rd=le.API,A2=Rd.getCharWidthsArray=function(n,t){var e,r,i=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),A=t.charSpace||this.internal.getCharSpace(),a=t.widths?t.widths:i.metadata.Unicode.widths,o=a.fof?a.fof:1,l=t.kerning?t.kerning:i.metadata.Unicode.kerning,h=l.fof?l.fof:1,u=t.doKerning!==!1,d=0,f=n.length,p=0,m=a[0]||o,y=[];for(e=0;e<f;e++)r=n.charCodeAt(e),typeof i.metadata.widthOfString=="function"?y.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+A*(1e3/s)||0)/1e3):(d=u&&Ar(l[r])==="object"&&!isNaN(parseInt(l[r][p],10))?l[r][p]/h:0,y.push((a[r]||m)/o+d)),p=r;return y},mI=Rd.getStringUnitWidth=function(n,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return Rd.processArabic&&(n=Rd.processArabic(n)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(n,e,i)/e:A2.apply(this,arguments).reduce(function(s,A){return s+A},0)},vI=function(n,t,e,r){for(var i=[],s=0,A=n.length,a=0;s!==A&&a+t[s]<e;)a+=t[s],s++;i.push(n.slice(0,s));var o=s;for(a=0;s!==A;)a+t[s]>r&&(i.push(n.slice(o,s)),a=0,o=s),a+=t[s],s++;return o!==s&&i.push(n.slice(o,s)),i},wI=function(n,t,e){e||(e={});var r,i,s,A,a,o,l,h=[],u=[h],d=e.textIndent||0,f=0,p=0,m=n.split(" "),y=A2.apply(this,[" ",e])[0];if(o=e.lineIndent===-1?m[0].length+2:e.lineIndent||0){var w=Array(o).join(" "),B=[];m.map(function(S){(S=S.split(/\s*\n/)).length>1?B=B.concat(S.map(function(_,L){return(L&&_.length?`
|
|
187
|
-
`:"")+_})):B.push(S[0])}),m=B,o=mI.apply(this,[w,e])}for(s=0,A=m.length;s<A;s++){var E=0;if(r=m[s],o&&r[0]==`
|
|
188
|
-
`&&(r=r.substr(1),E=1),d+f+(p=(i=A2.apply(this,[r,e])).reduce(function(S,_){return S+_},0))>t||E){if(p>t){for(a=vI.apply(this,[r,i,t-(d+f),t]),h.push(a.shift()),h=[a.pop()];a.length;)u.push([a.shift()]);p=i.slice(r.length-(h[0]?h[0].length:0)).reduce(function(S,_){return S+_},0)}else h=[r];u.push(h),d=p+o,f=y}else h.push(r),d+=f+p,f=y}return l=o?function(S,_){return(_?w:"")+S.join(" ")}:function(S){return S.join(" ")},u.map(l)},Rd.splitTextToSize=function(n,t,e){var r,i=(e=e||{}).fontSize||this.internal.getFontSize(),s=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var u=this.internal.getFont(h.fontName,h.fontStyle),d="Unicode";return u.metadata[d]?{widths:u.metadata[d].widths||{0:1},kerning:u.metadata[d].kerning||{}}:{font:u.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);r=Array.isArray(n)?n:String(n).split(/\r?\n/);var A=1*this.internal.scaleFactor*t/i;s.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/i:0,s.lineIndent=e.lineIndent;var a,o,l=[];for(a=0,o=r.length;a<o;a++)l=l.concat(wI.apply(this,[r[a],A,s]));return l},function(n){n.__fontmetrics__=n.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",r={},i={},s=0;s<16;s++)r[e[s]]=t[s],i[t[s]]=e[s];var A=function(d){return"0x"+parseInt(d,10).toString(16)},a=n.__fontmetrics__.compress=function(d){var f,p,m,y,w=["{"];for(var B in d){if(f=d[B],isNaN(parseInt(B,10))?p="'"+B+"'":(B=parseInt(B,10),p=(p=A(B).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof f=="number")f<0?(m=A(f).slice(3),y="-"):(m=A(f).slice(2),y=""),m=y+m.slice(0,-1)+i[m.slice(-1)];else{if(Ar(f)!=="object")throw new Error("Don't know what to do with value type "+Ar(f)+".");m=a(f)}w.push(p+m)}return w.push("}"),w.join("")},o=n.__fontmetrics__.uncompress=function(d){if(typeof d!="string")throw new Error("Invalid argument passed to uncompress.");for(var f,p,m,y,w={},B=1,E=w,S=[],_="",L="",k=d.length-1,H=1;H<k;H+=1)(y=d[H])=="'"?f?(m=f.join(""),f=void 0):f=[]:f?f.push(y):y=="{"?(S.push([E,m]),E={},m=void 0):y=="}"?((p=S.pop())[0][p[1]]=E,m=void 0,E=p[0]):y=="-"?B=-1:m===void 0?r.hasOwnProperty(y)?(_+=r[y],m=parseInt(_,16)*B,B=1,_=""):_+=y:r.hasOwnProperty(y)?(L+=r[y],E[m]=parseInt(L,16)*B,B=1,m=void 0,L=""):L+=y;return w},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:o("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":o("{'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":o("{'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:o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":o("{'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:o("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:o("{'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":o("{'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:o("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":o("{'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":o("{'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":o("{'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}}}")}};n.events.push(["addFont",function(d){var f=d.font,p=u.Unicode[f.postScriptName];p&&(f.metadata.Unicode={},f.metadata.Unicode.widths=p.widths,f.metadata.Unicode.kerning=p.kerning);var m=h.Unicode[f.postScriptName];m&&(f.metadata.Unicode.encoding=m,f.encoding=m.codePages[0])}])}(le.API),function(n){var t=function(e){for(var r=e.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=e.charCodeAt(s);return i};n.API.events.push(["addFont",function(e){var r=void 0,i=e.font,s=e.instance;if(!i.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=s.existsFileInVFS(i.postScriptName)===!1?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(A,a){a=/^\x00\x01\x00\x00/.test(a)?t(a):t(Jw(a)),A.metadata=n.API.TTFFont.open(a),A.metadata.Unicode=A.metadata.Unicode||{encoding:{},kerning:{},widths:[]},A.metadata.glyIdsUsed=[0]})(i,r)}}])}(le),le.API.addSvgAsImage=function(n,t,e,r,i,s,A,a){if(isNaN(t)||isNaN(e))throw Ir.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw Ir.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var o=document.createElement("canvas");o.width=r,o.height=i;var l=o.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,o.width,o.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},u=this;return(ye.canvg?Promise.resolve(ye.canvg):Promise.resolve().then(()=>XAt)).catch(function(d){return Promise.reject(new Error("Could not load canvg: "+d))}).then(function(d){return d.default?d.default:d}).then(function(d){return d.fromString(l,n,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(d){return d.render(h)}).then(function(){u.addImage(o.toDataURL("image/jpeg",1),t,e,r,i,A,a)})},le.API.putTotalPages=function(n){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(n,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,e);return this},le.API.viewerPreferences=function(n,t){var e;n=n||{},t=t||!1;var r,i,s,A={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}},a=Object.keys(A),o=[],l=0,h=0,u=0;function d(p,m){var y,w=!1;for(y=0;y<p.length;y+=1)p[y]===m&&(w=!0);return w}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(A)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,n==="reset"||t===!0){var f=a.length;for(u=0;u<f;u+=1)e[a[u]].value=e[a[u]].defaultValue,e[a[u]].explicitSet=!1}if(Ar(n)==="object"){for(i in n)if(s=n[i],d(a,i)&&s!==void 0){if(e[i].type==="boolean"&&typeof s=="boolean")e[i].value=s;else if(e[i].type==="name"&&d(e[i].valueSet,s))e[i].value=s;else if(e[i].type==="integer"&&Number.isInteger(s))e[i].value=s;else if(e[i].type==="array"){for(l=0;l<s.length;l+=1)if(r=!0,s[l].length===1&&typeof s[l][0]=="number")o.push(String(s[l]-1));else if(s[l].length>1){for(h=0;h<s[l].length;h+=1)typeof s[l][h]!="number"&&(r=!1);r===!0&&o.push([s[l][0]-1,s[l][1]-1].join(" "))}e[i].value="["+o.join(" ")+"]"}else e[i].value=e[i].defaultValue;e[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,m=[];for(p in e)e[p].explicitSet===!0&&(e[p].type==="name"?m.push("/"+p+" /"+e[p].value):m.push("/"+p+" "+e[p].value));m.length!==0&&this.internal.write(`/ViewerPreferences
|
|
189
|
-
<<
|
|
190
|
-
`+m.join(`
|
|
191
|
-
`)+`
|
|
192
|
-
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},le.API.addMetadata=function(n,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",B8),this.internal.events.subscribe("postPutResources",b8)),this},function(n){var t=n.API,e=t.pdfEscape16=function(s,A){for(var a,o=A.metadata.Unicode.widths,l=["","0","00","000","0000"],h=[""],u=0,d=s.length;u<d;++u){if(a=A.metadata.characterToGlyph(s.charCodeAt(u)),A.metadata.glyIdsUsed.push(a),A.metadata.toUnicode[a]=s.charCodeAt(u),o.indexOf(a)==-1&&(o.push(a),o.push([parseInt(A.metadata.widthOfGlyph(a),10)])),a=="0")return h.join("");a=a.toString(16),h.push(l[4-a.length],a)}return h.join("")},r=function(s){var A,a,o,l,h,u,d;for(h=`/CIDInit /ProcSet findresource begin
|
|
193
|
-
12 dict begin
|
|
194
|
-
begincmap
|
|
195
|
-
/CIDSystemInfo <<
|
|
196
|
-
/Registry (Adobe)
|
|
197
|
-
/Ordering (UCS)
|
|
198
|
-
/Supplement 0
|
|
199
|
-
>> def
|
|
200
|
-
/CMapName /Adobe-Identity-UCS def
|
|
201
|
-
/CMapType 2 def
|
|
202
|
-
1 begincodespacerange
|
|
203
|
-
<0000><ffff>
|
|
204
|
-
endcodespacerange`,o=[],u=0,d=(a=Object.keys(s).sort(function(f,p){return f-p})).length;u<d;u++)A=a[u],o.length>=100&&(h+=`
|
|
205
|
-
`+o.length+` beginbfchar
|
|
206
|
-
`+o.join(`
|
|
207
|
-
`)+`
|
|
208
|
-
endbfchar`,o=[]),s[A]!==void 0&&s[A]!==null&&typeof s[A].toString=="function"&&(l=("0000"+s[A].toString(16)).slice(-4),A=("0000"+(+A).toString(16)).slice(-4),o.push("<"+A+"><"+l+">"));return o.length&&(h+=`
|
|
209
|
-
`+o.length+` beginbfchar
|
|
210
|
-
`+o.join(`
|
|
211
|
-
`)+`
|
|
212
|
-
endbfchar
|
|
213
|
-
`),h+`endcmap
|
|
214
|
-
CMapName currentdict /CMap defineresource pop
|
|
215
|
-
end
|
|
216
|
-
end`};t.events.push(["putFont",function(s){(function(A){var a=A.font,o=A.out,l=A.newObject,h=A.putStream;if(a.metadata instanceof n.API.TTFFont&&a.encoding==="Identity-H"){for(var u=a.metadata.Unicode.widths,d=a.metadata.subset.encode(a.metadata.glyIdsUsed,1),f="",p=0;p<d.length;p++)f+=String.fromCharCode(d[p]);var m=l();h({data:f,addLength1:!0,objectId:m}),o("endobj");var y=l();h({data:r(a.metadata.toUnicode),addLength1:!0,objectId:y}),o("endobj");var w=l();o("<<"),o("/Type /FontDescriptor"),o("/FontName /"+Nd(a.fontName)),o("/FontFile2 "+m+" 0 R"),o("/FontBBox "+n.API.PDFObject.convert(a.metadata.bbox)),o("/Flags "+a.metadata.flags),o("/StemV "+a.metadata.stemV),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o(">>"),o("endobj");var B=l();o("<<"),o("/Type /Font"),o("/BaseFont /"+Nd(a.fontName)),o("/FontDescriptor "+w+" 0 R"),o("/W "+n.API.PDFObject.convert(u)),o("/CIDToGIDMap /Identity"),o("/DW 1000"),o("/Subtype /CIDFontType2"),o("/CIDSystemInfo"),o("<<"),o("/Supplement 0"),o("/Registry (Adobe)"),o("/Ordering ("+a.encoding+")"),o(">>"),o(">>"),o("endobj"),a.objectNumber=l(),o("<<"),o("/Type /Font"),o("/Subtype /Type0"),o("/ToUnicode "+y+" 0 R"),o("/BaseFont /"+Nd(a.fontName)),o("/Encoding /"+a.encoding),o("/DescendantFonts ["+B+" 0 R]"),o(">>"),o("endobj"),a.isAlreadyPutted=!0}})(s)}]),t.events.push(["putFont",function(s){(function(A){var a=A.font,o=A.out,l=A.newObject,h=A.putStream;if(a.metadata instanceof n.API.TTFFont&&a.encoding==="WinAnsiEncoding"){for(var u=a.metadata.rawData,d="",f=0;f<u.length;f++)d+=String.fromCharCode(u[f]);var p=l();h({data:d,addLength1:!0,objectId:p}),o("endobj");var m=l();h({data:r(a.metadata.toUnicode),addLength1:!0,objectId:m}),o("endobj");var y=l();o("<<"),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o("/StemV "+a.metadata.stemV),o("/Type /FontDescriptor"),o("/FontFile2 "+p+" 0 R"),o("/Flags 96"),o("/FontBBox "+n.API.PDFObject.convert(a.metadata.bbox)),o("/FontName /"+Nd(a.fontName)),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o(">>"),o("endobj"),a.objectNumber=l();for(var w=0;w<a.metadata.hmtx.widths.length;w++)a.metadata.hmtx.widths[w]=parseInt(a.metadata.hmtx.widths[w]*(1e3/a.metadata.head.unitsPerEm));o("<</Subtype/TrueType/Type/Font/ToUnicode "+m+" 0 R/BaseFont/"+Nd(a.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+a.encoding+" /FirstChar 29 /LastChar 255 /Widths "+n.API.PDFObject.convert(a.metadata.hmtx.widths)+">>"),o("endobj"),a.isAlreadyPutted=!0}})(s)}]);var i=function(s){var A,a=s.text||"",o=s.x,l=s.y,h=s.options||{},u=s.mutex||{},d=u.pdfEscape,f=u.activeFontKey,p=u.fonts,m=f,y="",w=0,B="",E=p[m].encoding;if(p[m].encoding!=="Identity-H")return{text:a,x:o,y:l,options:h,mutex:u};for(B=a,m=f,Array.isArray(a)&&(B=a[0]),w=0;w<B.length;w+=1)p[m].metadata.hasOwnProperty("cmap")&&(A=p[m].metadata.cmap.unicode.codeMap[B[w].charCodeAt(0)]),A||B[w].charCodeAt(0)<256&&p[m].metadata.hasOwnProperty("Unicode")?y+=B[w]:y+="";var S="";return parseInt(m.slice(1))<14||E==="WinAnsiEncoding"?S=d(y,m).split("").map(function(_){return _.charCodeAt(0).toString(16)}).join(""):E==="Identity-H"&&(S=e(y,p[m])),u.isHex=!0,{text:S,x:o,y:l,options:h,mutex:u}};t.events.push(["postProcessText",function(s){var A=s.text||"",a=[],o={text:A,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(A)){var l=0;for(l=0;l<A.length;l+=1)Array.isArray(A[l])&&A[l].length===3?a.push([i(Object.assign({},o,{text:A[l][0]})).text,A[l][1],A[l][2]]):a.push(i(Object.assign({},o,{text:A[l]})).text);s.text=a}else s.text=i(Object.assign({},o,{text:A})).text}])}(le),function(n){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};n.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},n.addFileToVFS=function(e,r){return t.call(this),this.internal.vFS[e]=r,this},n.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}}(le.API),function(n){n.__bidiEngine__=n.prototype.__bidiEngine__=function(r){var i,s,A,a,o,l,h,u=t,d=[[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]],f=[[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]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],w=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)$/),B=!1,E=0;this.__bidiEngine__={};var S=function(U){var D=U.charCodeAt(),j=D>>8,V=m[j];return V!==void 0?u[256*V+(255&D)]:j===252||j===253?"AL":w.test(j)?"L":j===8?"R":"N"},_=function(U){for(var D,j=0;j<U.length;j++){if((D=S(U.charAt(j)))==="L")return!1;if(D==="R")return!0}return!1},L=function(U,D,j,V){var st,rt,it,At,ut=D[V];switch(ut){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":B=!1;break;case"N":case"AN":break;case"EN":B&&(ut="AN");break;case"AL":B=!0,ut="R";break;case"WS":case"BN":ut="N";break;case"CS":V<1||V+1>=D.length||(st=j[V-1])!=="EN"&&st!=="AN"||(rt=D[V+1])!=="EN"&&rt!=="AN"?ut="N":B&&(rt="AN"),ut=rt===st?rt:"N";break;case"ES":ut=(st=V>0?j[V-1]:"B")==="EN"&&V+1<D.length&&D[V+1]==="EN"?"EN":"N";break;case"ET":if(V>0&&j[V-1]==="EN"){ut="EN";break}if(B){ut="N";break}for(it=V+1,At=D.length;it<At&&D[it]==="ET";)it++;ut=it<At&&D[it]==="EN"?"EN":"N";break;case"NSM":if(A&&!a){for(At=D.length,it=V+1;it<At&&D[it]==="NSM";)it++;if(it<At){var vt=U[V],mt=vt>=1425&&vt<=2303||vt===64286;if(st=D[it],mt&&(st==="R"||st==="AL")){ut="R";break}}}ut=V<1||(st=D[V-1])==="B"?"N":j[V-1];break;case"B":B=!1,i=!0,ut=E;break;case"S":s=!0,ut="N"}return ut},k=function(U,D,j){var V=U.split("");return j&&H(V,j,{hiLevel:E}),V.reverse(),D&&D.reverse(),V.join("")},H=function(U,D,j){var V,st,rt,it,At,ut=-1,vt=U.length,mt=0,M=[],$=E?f:d,q=[];for(B=!1,i=!1,s=!1,st=0;st<vt;st++)q[st]=S(U[st]);for(rt=0;rt<vt;rt++){if(At=mt,M[rt]=L(U,q,M,rt),V=240&(mt=$[At][p[M[rt]]]),mt&=15,D[rt]=it=$[mt][5],V>0)if(V===16){for(st=ut;st<rt;st++)D[st]=1;ut=-1}else ut=-1;if($[mt][6])ut===-1&&(ut=rt);else if(ut>-1){for(st=ut;st<rt;st++)D[st]=it;ut=-1}q[rt]==="B"&&(D[rt]=0),j.hiLevel|=it}s&&function(tt,et,ot){for(var dt=0;dt<ot;dt++)if(tt[dt]==="S"){et[dt]=E;for(var wt=dt-1;wt>=0&&tt[wt]==="WS";wt--)et[wt]=E}}(q,D,vt)},Q=function(U,D,j,V,st){if(!(st.hiLevel<U)){if(U===1&&E===1&&!i)return D.reverse(),void(j&&j.reverse());for(var rt,it,At,ut,vt=D.length,mt=0;mt<vt;){if(V[mt]>=U){for(At=mt+1;At<vt&&V[At]>=U;)At++;for(ut=mt,it=At-1;ut<it;ut++,it--)rt=D[ut],D[ut]=D[it],D[it]=rt,j&&(rt=j[ut],j[ut]=j[it],j[it]=rt);mt=At}mt++}}},W=function(U,D,j){var V=U.split(""),st={hiLevel:E};return j||(j=[]),H(V,j,st),function(rt,it,At){if(At.hiLevel!==0&&h)for(var ut,vt=0;vt<rt.length;vt++)it[vt]===1&&(ut=y.indexOf(rt[vt]))>=0&&(rt[vt]=y[ut+1])}(V,j,st),Q(2,V,D,j,st),Q(1,V,D,j,st),V.join("")};return this.__bidiEngine__.doBidiReorder=function(U,D,j){if(function(st,rt){if(rt)for(var it=0;it<st.length;it++)rt[it]=it;a===void 0&&(a=_(st)),l===void 0&&(l=_(st))}(U,D),A||!o||l)if(A&&o&&a^l)E=a?1:0,U=k(U,D,j);else if(!A&&o&&l)E=a?1:0,U=W(U,D,j),U=k(U,D);else if(!A||a||o||l){if(A&&!o&&a^l)U=k(U,D),a?(E=0,U=W(U,D,j)):(E=1,U=W(U,D,j),U=k(U,D));else if(A&&a&&!o&&l)E=1,U=W(U,D,j),U=k(U,D);else if(!A&&!o&&a^l){var V=h;a?(E=1,U=W(U,D,j),E=0,h=!1,U=W(U,D,j),h=V):(E=0,U=W(U,D,j),U=k(U,D),E=1,h=!1,U=W(U,D,j),h=V,U=k(U,D))}}else E=0,U=W(U,D,j);else E=a?1:0,U=W(U,D,j);return U},this.__bidiEngine__.setOptions=function(U){U&&(A=U.isInputVisual,o=U.isOutputVisual,a=U.isInputRtl,l=U.isOutputRtl,h=U.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),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"],e=new n.__bidiEngine__({isInputVisual:!0});n.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var s=r.options||{};r.mutex,s.lang;var A=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,e.setOptions(s),Object.prototype.toString.call(i)==="[object Array]"){var a=0;for(A=[],a=0;a<i.length;a+=1)Object.prototype.toString.call(i[a])==="[object Array]"?A.push([e.doBidiReorder(i[a][0]),i[a][1],i[a][2]]):A.push([e.doBidiReorder(i[a])]);r.text=A}else r.text=e.doBidiReorder(i);e.setOptions({isInputVisual:!0})}])}(le),le.API.TTFFont=function(){function n(t){var e;if(this.rawData=t,e=this.contents=new _c(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new k8(this),this.registerTTF()}return n.open=function(t){return new n(t)},n.prototype.parse=function(){return this.directory=new C8(this.contents),this.head=new E8(this),this.name=new I8(this),this.cmap=new II(this),this.toUnicode={},this.hhea=new S8(this),this.maxp=new U8(this),this.hmtx=new L8(this),this.post=new T8(this),this.os2=new F8(this),this.loca=new M8(this),this.glyf=new Q8(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]},n.prototype.registerTTF=function(){var t,e,r,i,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var A,a,o,l;for(l=[],A=0,a=(o=this.bbox).length;A<a;A++)t=o[A],l.push(Math.round(t*this.scaleFactor));return l}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(e=i>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},n.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},n.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},n.prototype.widthOfString=function(t,e,r){var i,s,A,a;for(A=0,s=0,a=(t=""+t).length;0<=a?s<a:s>a;s=0<=a?++s:--s)i=t.charCodeAt(s),A+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/e)||0;return A*(e/1e3)},n.prototype.lineHeight=function(t,e){var r;return e==null&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},n}();var ma,_c=function(){function n(t){this.data=t??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(t){return this.data[this.pos++]=t},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},n.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},n.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},n.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(t){var e,r,i;for(i=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)i.push(this.writeByte(t.charCodeAt(e)));return i},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(t){return this.writeInt16(t)},n.prototype.readLongLong=function(){var t,e,r,i,s,A,a,o;return t=this.readByte(),e=this.readByte(),r=this.readByte(),i=this.readByte(),s=this.readByte(),A=this.readByte(),a=this.readByte(),o=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^s)+65536*(255^A)+256*(255^a)+(255^o)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*i+16777216*s+65536*A+256*a+o},n.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(t){return this.writeInt32(t)},n.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},n.prototype.write=function(t){var e,r,i,s;for(s=[],r=0,i=t.length;r<i;r++)e=t[r],s.push(this.writeByte(e));return s},n}(),C8=function(){var n;function t(e){var r,i,s;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},i=0,s=this.tableCount;0<=s?i<s:i>s;i=0<=s?++i:--i)r={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(e){var r,i,s,A,a,o,l,h,u,d,f,p,m;for(m in f=Object.keys(e).length,o=Math.log(2),u=16*Math.floor(Math.log(f)/o),A=Math.floor(u/o),h=16*f-u,(i=new _c).writeInt(this.scalarType),i.writeShort(f),i.writeShort(u),i.writeShort(A),i.writeShort(h),s=16*f,l=i.pos+s,a=null,p=[],e)for(d=e[m],i.writeString(m),i.writeInt(n(d)),i.writeInt(l),i.writeInt(d.length),p=p.concat(d),m==="head"&&(a=l),l+=d.length;l%4;)p.push(0),l++;return i.write(p),r=2981146554-n(i.data),i.pos=a+8,i.writeUInt32(r),i.data},n=function(e){var r,i,s,A;for(e=UI.call(e);e.length%4;)e.push(0);for(s=new _c(e),i=0,r=0,A=e.length;r<A;r=r+=4)i+=s.readUInt32();return 4294967295&i},t}(),x8={}.hasOwnProperty,so=function(n,t){for(var e in t)x8.call(t,e)&&(n[e]=t[e]);function r(){this.constructor=n}return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};ma=function(){function n(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return n.prototype.parse=function(){},n.prototype.encode=function(){},n.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},n}();var E8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="head",n.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()},n.prototype.encode=function(t){var e;return(e=new _c).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},n}(),_I=function(){function n(t,e){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),u=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(o=0;o<256;++o)this.codeMap[o]=t.readByte();break;case 4:for(f=t.readUInt16(),d=f/2,t.pos+=6,s=function(){var S,_;for(_=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)_.push(t.readUInt16());return _}(),t.pos+=2,m=function(){var S,_;for(_=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)_.push(t.readUInt16());return _}(),l=function(){var S,_;for(_=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)_.push(t.readUInt16());return _}(),h=function(){var S,_;for(_=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)_.push(t.readUInt16());return _}(),i=(this.length-t.pos+this.offset)/2,a=function(){var S,_;for(_=[],o=S=0;0<=i?S<i:S>i;o=0<=i?++S:--S)_.push(t.readUInt16());return _}(),o=w=0,E=s.length;w<E;o=++w)for(y=s[o],r=B=p=m[o];p<=y?B<=y:B>=y;r=p<=y?++B:--B)h[o]===0?A=r+l[o]:(A=a[h[o]/2+(r-p)-(d-o)]||0)!==0&&(A+=l[o]),this.codeMap[r]=65535&A}t.pos=u}return n.encode=function(t,e){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,_,L,k,H,Q,W,U,D,j,V,st,rt,it,At,ut,vt,mt,M,$,q,tt,et,ot,dt,wt,yt,St,Mt;switch(V=new _c,A=Object.keys(t).sort(function(Pt,$t){return Pt-$t}),e){case"macroman":for(m=0,y=function(){var Pt=[];for(p=0;p<256;++p)Pt.push(0);return Pt}(),B={0:0},s={},st=0,ut=A.length;st<ut;st++)B[wt=t[i=A[st]]]==null&&(B[wt]=++m),s[i]={old:t[i],new:B[t[i]]},y[i]=B[t[i]];return V.writeUInt16(1),V.writeUInt16(0),V.writeUInt32(12),V.writeUInt16(0),V.writeUInt16(262),V.writeUInt16(0),V.write(y),{charMap:s,subtable:V.data,maxGlyphID:m+1};case"unicode":for(D=[],u=[],E=0,B={},r={},w=l=null,rt=0,vt=A.length;rt<vt;rt++)B[_=t[i=A[rt]]]==null&&(B[_]=++E),r[i]={old:_,new:B[_]},a=B[_]-i,w!=null&&a===l||(w&&u.push(w),D.push(i),l=a),w=i;for(w&&u.push(w),u.push(65535),D.push(65535),W=2*(Q=D.length),H=2*Math.pow(Math.log(Q)/Math.LN2,2),d=Math.log(H/2)/Math.LN2,k=2*Q-H,o=[],L=[],f=[],p=it=0,mt=D.length;it<mt;p=++it){if(U=D[p],h=u[p],U===65535){o.push(0),L.push(0);break}if(U-(j=r[U].new)>=32768)for(o.push(0),L.push(2*(f.length+Q-p)),i=At=U;U<=h?At<=h:At>=h;i=U<=h?++At:--At)f.push(r[i].new);else o.push(j-U),L.push(0)}for(V.writeUInt16(3),V.writeUInt16(1),V.writeUInt32(12),V.writeUInt16(4),V.writeUInt16(16+8*Q+2*f.length),V.writeUInt16(0),V.writeUInt16(W),V.writeUInt16(H),V.writeUInt16(d),V.writeUInt16(k),ot=0,M=u.length;ot<M;ot++)i=u[ot],V.writeUInt16(i);for(V.writeUInt16(0),dt=0,$=D.length;dt<$;dt++)i=D[dt],V.writeUInt16(i);for(yt=0,q=o.length;yt<q;yt++)a=o[yt],V.writeUInt16(a);for(St=0,tt=L.length;St<tt;St++)S=L[St],V.writeUInt16(S);for(Mt=0,et=f.length;Mt<et;Mt++)m=f[Mt],V.writeUInt16(m);return{charMap:r,subtable:V.data,maxGlyphID:E+1}}},n}(),II=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="cmap",n.prototype.parse=function(t){var e,r,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)e=new _I(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},n.encode=function(t,e){var r,i;return e==null&&(e="macroman"),r=_I.encode(t,e),(i=new _c).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},n}(),S8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="hhea",n.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()},n}(),F8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="OS/2",n.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 e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),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 e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},n}(),T8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="post",n.prototype.parse=function(t){var e,r,i;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 s;for(r=t.readUInt16(),this.glyphNameIndex=[],s=0;0<=r?s<r:s>r;s=0<=r?++s:--s)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)e=t.readByte(),i.push(this.names.push(t.readString(e)));return i;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var A,a,o;for(o=[],s=A=0,a=this.file.maxp.numGlyphs;0<=a?A<a:A>a;s=0<=a?++A:--A)o.push(t.readUInt32());return o}).call(this)}},n}(),_8=function(n,t){this.raw=n,this.length=n.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},I8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="name",n.prototype.parse=function(t){var e,r,i,s,A,a,o,l,h,u,d;for(t.pos=this.offset,t.readShort(),e=t.readShort(),a=t.readShort(),r=[],s=0;0<=e?s<e:s>e;s=0<=e?++s:--s)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+a+t.readShort()});for(o={},s=h=0,u=r.length;h<u;s=++h)i=r[s],t.pos=i.offset,l=t.readString(i.length),A=new _8(l,i),o[d=i.nameID]==null&&(o[d]=[]),o[i.nameID].push(A);this.strings=o,this.copyright=o[0],this.fontFamily=o[1],this.fontSubfamily=o[2],this.uniqueSubfamily=o[3],this.fontName=o[4],this.version=o[5];try{this.postscriptName=o[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=o[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=o[7],this.manufacturer=o[8],this.designer=o[9],this.description=o[10],this.vendorUrl=o[11],this.designerUrl=o[12],this.license=o[13],this.licenseUrl=o[14],this.preferredFamily=o[15],this.preferredSubfamily=o[17],this.compatibleFull=o[18],this.sampleText=o[19]},n}(),U8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="maxp",n.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()},n}(),L8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="hmtx",n.prototype.parse=function(t){var e,r,i,s,A,a,o;for(t.pos=this.offset,this.metrics=[],e=0,a=this.file.hhea.numberOfMetrics;0<=a?e<a:e>a;e=0<=a?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var l,h;for(h=[],e=l=0;0<=i?l<i:l>i;e=0<=i?++l:--l)h.push(t.readInt16());return h}(),this.widths=(function(){var l,h,u,d;for(d=[],l=0,h=(u=this.metrics).length;l<h;l++)s=u[l],d.push(s.advance);return d}).call(this),r=this.widths[this.widths.length-1],o=[],e=A=0;0<=i?A<i:A>i;e=0<=i?++A:--A)o.push(this.widths.push(r));return o},n.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]}},n}(),UI=[].slice,Q8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(t){var e,r,i,s,A,a,o,l,h,u;return t in this.cache?this.cache[t]:(s=this.file.loca,e=this.file.contents,r=s.indexOf(t),(i=s.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+r,A=(a=new _c(e.read(i))).readShort(),l=a.readShort(),u=a.readShort(),o=a.readShort(),h=a.readShort(),this.cache[t]=A===-1?new P8(a,l,u,o,h):new N8(a,A,l,u,o,h),this.cache[t]))},n.prototype.encode=function(t,e,r){var i,s,A,a,o;for(A=[],s=[],a=0,o=e.length;a<o;a++)i=t[e[a]],s.push(A.length),i&&(A=A.concat(i.encode(r)));return s.push(A.length),{table:A,offsets:s}},n}(),N8=function(){function n(t,e,r,i,s,A){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=i,this.xMax=s,this.yMax=A,this.compound=!1}return n.prototype.encode=function(){return this.raw.data},n}(),P8=function(){function n(t,e,r,i,s){var A,a;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=i,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],A=this.raw;a=A.readShort(),this.glyphOffsets.push(A.pos),this.glyphIDs.push(A.readUInt16()),32&a;)A.pos+=1&a?4:2,128&a?A.pos+=8:64&a?A.pos+=4:8&a&&(A.pos+=2)}return n.prototype.encode=function(){var t,e,r;for(e=new _c(UI.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},n}(),M8=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return so(n,ma),n.prototype.tag="loca",n.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=2)s.push(2*t.readUInt16());return s}).call(this):(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=4)s.push(t.readUInt32());return s}).call(this)},n.prototype.indexOf=function(t){return this.offsets[t]},n.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},n.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),i=0,s=0,A=0;A<r.length;++A)if(r[A]=i,s<e.length&&e[s]==A){++s,r[A]=i;var a=this.offsets[A],o=this.offsets[A+1]-a;o>0&&(i+=o)}for(var l=new Array(4*r.length),h=0;h<r.length;++h)l[4*h+3]=255&r[h],l[4*h+2]=(65280&r[h])>>8,l[4*h+1]=(16711680&r[h])>>16,l[4*h]=(4278190080&r[h])>>24;return l},n}(),k8=function(){function n(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var t,e,r,i,s;for(e in i=this.font.cmap.tables[0].codeMap,t={},s=this.subset)r=s[e],t[e]=i[r];return t},n.prototype.glyphsFor=function(t){var e,r,i,s,A,a,o;for(i={},A=0,a=t.length;A<a;A++)i[s=t[A]]=this.font.glyf.glyphFor(s);for(s in e=[],i)(r=i[s])!=null&&r.compound&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(s in o=this.glyphsFor(e))r=o[s],i[s]=r;return i},n.prototype.encode=function(t,e){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w;for(i in r=II.encode(this.generateCmap(),"unicode"),A=this.glyphsFor(t),f={0:0},w=r.charMap)f[(o=w[i]).old]=o.new;for(p in d=r.maxGlyphID,A)p in f||(f[p]=d++);return h=function(B){var E,S;for(E in S={},B)S[B[E]]=E;return S}(f),u=Object.keys(h).sort(function(B,E){return B-E}),m=function(){var B,E,S;for(S=[],B=0,E=u.length;B<E;B++)a=u[B],S.push(h[a]);return S}(),s=this.font.glyf.encode(A,m,f),l=this.font.loca.encode(s.offsets,m),y={cmap:this.font.cmap.raw(),glyf:s.table,loca:l,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(e)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},n}();le.API.PDFObject=function(){var n;function t(){}return n=function(e,r){return(Array(r+1).join("0")+e).slice(-r)},t.convert=function(e){var r,i,s,A;if(Array.isArray(e))return"["+function(){var a,o,l;for(l=[],a=0,o=e.length;a<o;a++)r=e[a],l.push(t.convert(r));return l}().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+n(e.getUTCFullYear(),4)+n(e.getUTCMonth(),2)+n(e.getUTCDate(),2)+n(e.getUTCHours(),2)+n(e.getUTCMinutes(),2)+n(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(i in s=["<<"],e)A=e[i],s.push("/"+i+" "+t.convert(A));return s.push(">>"),s.join(`
|
|
217
|
-
`)}return""+e},t}();var Hd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function V0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}/*! https://mths.be/cssesc v3.0.0 by @mathias */var O8={},D8=O8.hasOwnProperty,R8=function(t,e){if(!t)return e;var r={};for(var i in e)r[i]=D8.call(t,i)?t[i]:e[i];return r},H8=/[ -,\.\/:-@\[-\^`\{-~]/,K8=/[ -,\.\/:-@\[\]\^`\{-~]/,V8=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,f5=function n(t,e){e=R8(e,n.options),e.quotes!="single"&&e.quotes!="double"&&(e.quotes="single");for(var r=e.quotes=="double"?'"':"'",i=e.isIdentifier,s=t.charAt(0),A="",a=0,o=t.length;a<o;){var l=t.charAt(a++),h=l.charCodeAt(),u=void 0;if(h<32||h>126){if(h>=55296&&h<=56319&&a<o){var d=t.charCodeAt(a++);(d&64512)==56320?h=((h&1023)<<10)+(d&1023)+65536:a--}u="\\"+h.toString(16).toUpperCase()+" "}else e.escapeEverything?H8.test(l)?u="\\"+l:u="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?u="\\"+h.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&K8.test(l)?u="\\"+l:u=l;A+=u}return i&&(/^-[-\d]/.test(A)?A="\\-"+A.slice(1):/\d/.test(s)&&(A="\\3"+s+" "+A.slice(1))),A=A.replace(V8,function(f,p,m){return p&&p.length%2?f:(p||"")+m}),!i&&e.wrap?r+A+r:A};f5.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},f5.version="3.0.0";var G8=f5;const LI=V0(G8);var G0=0,d5=1,QI=2,a2=3,NI=4,PI=5,MI=6,g5=/[a-z0-9_-]/i,o2=/[\s\t]/,j8=function(n){for(var t=!0,e=G0,r="",i=0,s,A,a=[];;){if(A=n[i],e===G0){if(!A&&t)break;if(!A&&!t)throw new Error("Parse error");if(A==='"'||A==="'")s=A,e=d5,t=!1;else if(!o2.test(A))if(g5.test(A))e=a2,t=!1,i--;else throw new Error("Parse error")}else if(e===d5)if(A)A==="\\"?e=QI:A===s?(a.push(r),r="",e=NI):r+=A;else throw new Error("Parse Error");else if(e===QI)if(A===s||A==="\\")r+=A,e=d5;else throw new Error("Parse error");else if(e===a2)if(A)g5.test(A)?r+=A:A===","?(a.push(r),r="",e=G0):o2.test(A)?e=PI:A==="\\"&&(e=MI);else{a.push(r);break}else if(e===MI){if(/[0-9a-f]/i.test(A))throw new Error("Parse error");r+=A,e=a2}else if(e===PI)if(A){if(g5.test(A))r+=" "+A,e=a2;else if(A===",")a.push(r),r="",e=G0;else if(!o2.test(A))throw new Error("Parse error")}else{a.push(r);break}else if(e===NI)if(A){if(A===",")e=G0;else if(!o2.test(A))throw new Error("Parse error")}else break;i++}return a},$8=/[^a-z0-9_-]/i,W8=function(n,t){var e=t&&t.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Quote must be `'` or `\"`");for(var r=new RegExp(e,"g"),i=[],s=0;s<n.length;++s){var A=n[s];$8.test(A)&&(A=A.replace(/\\/g,"\\\\").replace(r,"\\"+e),A=e+A+e),i.push(A)}return i.join(", ")},z8={parse:j8,stringify:W8};const X8=V0(z8);var l2={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},q8=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function Y8(n){return n===10||n===13||n===8232||n===8233||n===32||n===9||n===11||n===12||n===160||n>=5760&&q8.indexOf(n)>=0}function J8(n){switch(n|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function Z8(n){return(n|32)===97}function Kd(n){return n>=48&&n<=57}function t7(n){return n>=48&&n<=57||n===43||n===45||n===46}function e7(n){this.index=0,this.path=n,this.max=n.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function c2(n){for(;n.index<n.max&&Y8(n.path.charCodeAt(n.index));)n.index++}function r7(n){var t=n.path.charCodeAt(n.index);if(t===48){n.param=0,n.index++;return}if(t===49){n.param=1,n.index++;return}n.err="SvgPath: arc flag can be 0 or 1 only (at pos "+n.index+")"}function i7(n){var t=n.index,e=t,r=n.max,i=!1,s=!1,A=!1,a=!1,o;if(e>=r){n.err="SvgPath: missed param (at pos "+e+")";return}if(o=n.path.charCodeAt(e),(o===43||o===45)&&(e++,o=e<r?n.path.charCodeAt(e):0),!Kd(o)&&o!==46){n.err="SvgPath: param should start with 0..9 or `.` (at pos "+e+")";return}if(o!==46){if(i=o===48,e++,o=e<r?n.path.charCodeAt(e):0,i&&e<r&&o&&Kd(o)){n.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;e<r&&Kd(n.path.charCodeAt(e));)e++,s=!0;o=e<r?n.path.charCodeAt(e):0}if(o===46){for(a=!0,e++;Kd(n.path.charCodeAt(e));)e++,A=!0;o=e<r?n.path.charCodeAt(e):0}if(o===101||o===69){if(a&&!s&&!A){n.err="SvgPath: invalid float exponent (at pos "+e+")";return}if(e++,o=e<r?n.path.charCodeAt(e):0,(o===43||o===45)&&e++,e<r&&Kd(n.path.charCodeAt(e)))for(;e<r&&Kd(n.path.charCodeAt(e));)e++;else{n.err="SvgPath: invalid float exponent (at pos "+e+")";return}}n.index=e,n.param=parseFloat(n.path.slice(t,e))+0}function p5(n){var t,e;t=n.path[n.segmentStart],e=t.toLowerCase();var r=n.data;if(e==="m"&&r.length>2&&(n.result.push([t,r[0],r[1]]),r=r.slice(2),e="l",t=t==="m"?"l":"L"),e==="r")n.result.push([t].concat(r));else for(;r.length>=l2[e]&&(n.result.push([t].concat(r.splice(0,l2[e]))),!!l2[e]););}function n7(n){var t=n.max,e,r,i,s,A;if(n.segmentStart=n.index,e=n.path.charCodeAt(n.index),r=Z8(e),!J8(e)){n.err="SvgPath: bad command "+n.path[n.index]+" (at pos "+n.index+")";return}if(s=l2[n.path[n.index].toLowerCase()],n.index++,c2(n),n.data=[],!s){p5(n);return}for(i=!1;;){for(A=s;A>0;A--){if(r&&(A===3||A===4)?r7(n):i7(n),n.err.length){p5(n);return}n.data.push(n.param),c2(n),i=!1,n.index<t&&n.path.charCodeAt(n.index)===44&&(n.index++,c2(n),i=!0)}if(!i&&(n.index>=n.max||!t7(n.path.charCodeAt(n.index))))break}p5(n)}var s7=function(t){var e=new e7(t),r=e.max;for(c2(e);e.index<r&&!e.err.length;)n7(e);return e.result.length&&("mM".indexOf(e.result[0][0])<0?(e.err="SvgPath: string should start with `M` or `m`",e.result=[]):e.result[0][0]="M"),{err:e.err,segments:e.result}};function A7(n,t){return[n[0]*t[0]+n[2]*t[1],n[1]*t[0]+n[3]*t[1],n[0]*t[2]+n[2]*t[3],n[1]*t[2]+n[3]*t[3],n[0]*t[4]+n[2]*t[5]+n[4],n[1]*t[4]+n[3]*t[5]+n[5]]}function va(){if(!(this instanceof va))return new va;this.queue=[],this.cache=null}va.prototype.matrix=function(n){return n[0]===1&&n[1]===0&&n[2]===0&&n[3]===1&&n[4]===0&&n[5]===0?this:(this.cache=null,this.queue.push(n),this)},va.prototype.translate=function(n,t){return(n!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,n,t])),this},va.prototype.scale=function(n,t){return(n!==1||t!==1)&&(this.cache=null,this.queue.push([n,0,0,t,0,0])),this},va.prototype.rotate=function(n,t,e){var r,i,s;return n!==0&&(this.translate(t,e),r=n*Math.PI/180,i=Math.cos(r),s=Math.sin(r),this.queue.push([i,s,-s,i,0,0]),this.cache=null,this.translate(-t,-e)),this},va.prototype.skewX=function(n){return n!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(n*Math.PI/180),1,0,0])),this},va.prototype.skewY=function(n){return n!==0&&(this.cache=null,this.queue.push([1,Math.tan(n*Math.PI/180),0,1,0,0])),this},va.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var n=1;n<this.queue.length;n++)this.cache=A7(this.cache,this.queue[n]);return this.cache},va.prototype.calc=function(n,t,e){var r;return this.queue.length?(this.cache||(this.cache=this.toArray()),r=this.cache,[n*r[0]+t*r[2]+(e?0:r[4]),n*r[1]+t*r[3]+(e?0:r[5])]):[n,t]};var kI=va,a7=kI,o7={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},l7=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,c7=/[\s,]+/,h7=function(t){var e=new a7,r,i;return t.split(l7).forEach(function(s){if(s.length){if(typeof o7[s]<"u"){r=s;return}switch(i=s.split(c7).map(function(A){return+A||0}),r){case"matrix":i.length===6&&e.matrix(i);return;case"scale":i.length===1?e.scale(i[0],i[0]):i.length===2&&e.scale(i[0],i[1]);return;case"rotate":i.length===1?e.rotate(i[0],0,0):i.length===3&&e.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?e.translate(i[0],0):i.length===2&&e.translate(i[0],i[1]);return;case"skewX":i.length===1&&e.skewX(i[0]);return;case"skewY":i.length===1&&e.skewY(i[0]);return}}}),e},j0=Math.PI*2;function OI(n,t,e,r){var i=n*r-t*e<0?-1:1,s=n*e+t*r;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function u7(n,t,e,r,i,s,A,a,o,l){var h=l*(n-e)/2+o*(t-r)/2,u=-o*(n-e)/2+l*(t-r)/2,d=A*A,f=a*a,p=h*h,m=u*u,y=d*f-d*m-f*p;y<0&&(y=0),y/=d*m+f*p,y=Math.sqrt(y)*(i===s?-1:1);var w=y*A/a*u,B=y*-a/A*h,E=l*w-o*B+(n+e)/2,S=o*w+l*B+(t+r)/2,_=(h-w)/A,L=(u-B)/a,k=(-h-w)/A,H=(-u-B)/a,Q=OI(1,0,_,L),W=OI(_,L,k,H);return s===0&&W>0&&(W-=j0),s===1&&W<0&&(W+=j0),[E,S,Q,W]}function f7(n,t){var e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),i=Math.sin(n),s=Math.cos(n+t),A=Math.sin(n+t);return[r,i,r-i*e,i+r*e,s+A*e,A-s*e,s,A]}var d7=function(t,e,r,i,s,A,a,o,l){var h=Math.sin(l*j0/360),u=Math.cos(l*j0/360),d=u*(t-r)/2+h*(e-i)/2,f=-h*(t-r)/2+u*(e-i)/2;if(d===0&&f===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);var p=d*d/(a*a)+f*f/(o*o);p>1&&(a*=Math.sqrt(p),o*=Math.sqrt(p));var m=u7(t,e,r,i,s,A,a,o,h,u),y=[],w=m[2],B=m[3],E=Math.max(Math.ceil(Math.abs(B)/(j0/4)),1);B/=E;for(var S=0;S<E;S++)y.push(f7(w,B)),w+=B;return y.map(function(_){for(var L=0;L<_.length;L+=2){var k=_[L+0],H=_[L+1];k*=a,H*=o;var Q=u*k-h*H,W=h*k+u*H;_[L+0]=Q+m[0],_[L+1]=W+m[1]}return _})},$0=1e-10,DI=Math.PI/180;function W0(n,t,e){if(!(this instanceof W0))return new W0(n,t,e);this.rx=n,this.ry=t,this.ax=e}W0.prototype.transform=function(n){var t=Math.cos(this.ax*DI),e=Math.sin(this.ax*DI),r=[this.rx*(n[0]*t+n[2]*e),this.rx*(n[1]*t+n[3]*e),this.ry*(-n[0]*e+n[2]*t),this.ry*(-n[1]*e+n[3]*t)],i=r[0]*r[0]+r[2]*r[2],s=r[1]*r[1]+r[3]*r[3],A=((r[0]-r[3])*(r[0]-r[3])+(r[2]+r[1])*(r[2]+r[1]))*((r[0]+r[3])*(r[0]+r[3])+(r[2]-r[1])*(r[2]-r[1])),a=(i+s)/2;if(A<$0*a)return this.rx=this.ry=Math.sqrt(a),this.ax=0,this;var o=r[0]*r[1]+r[2]*r[3];A=Math.sqrt(A);var l=a+A/2,h=a-A/2;return this.ax=Math.abs(o)<$0&&Math.abs(l-s)<$0?90:Math.atan(Math.abs(o)>Math.abs(l-s)?(l-i)/o:o/(l-s))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(l),this.ry=Math.sqrt(h)):(this.ax+=90,this.rx=Math.sqrt(h),this.ry=Math.sqrt(l)),this},W0.prototype.isDegenerate=function(){return this.rx<$0*this.ry||this.ry<$0*this.rx};var g7=W0,p7=s7,m7=h7,Ic=kI,v7=d7,w7=g7;function ii(n){if(!(this instanceof ii))return new ii(n);var t=p7(n);this.segments=t.segments,this.err=t.err,this.__stack=[]}ii.from=function(n){if(typeof n=="string")return new ii(n);if(n instanceof ii){var t=new ii("");return t.err=n.err,t.segments=n.segments.map(function(e){return e.slice()}),t.__stack=n.__stack.map(function(e){return Ic().matrix(e.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+n)},ii.prototype.__matrix=function(n){var t=this,e;n.queue.length&&this.iterate(function(r,i,s,A){var a,o,l,h;switch(r[0]){case"v":a=n.calc(0,r[1],!0),o=a[0]===0?["v",a[1]]:["l",a[0],a[1]];break;case"V":a=n.calc(s,r[1],!1),o=a[0]===n.calc(s,A,!1)[0]?["V",a[1]]:["L",a[0],a[1]];break;case"h":a=n.calc(r[1],0,!0),o=a[1]===0?["h",a[0]]:["l",a[0],a[1]];break;case"H":a=n.calc(r[1],A,!1),o=a[1]===n.calc(s,A,!1)[1]?["H",a[0]]:["L",a[0],a[1]];break;case"a":case"A":var u=n.toArray(),d=w7(r[1],r[2],r[3]).transform(u);if(u[0]*u[3]-u[1]*u[2]<0&&(r[5]=r[5]?"0":"1"),a=n.calc(r[6],r[7],r[0]==="a"),r[0]==="A"&&r[6]===s&&r[7]===A||r[0]==="a"&&r[6]===0&&r[7]===0){o=[r[0]==="a"?"l":"L",a[0],a[1]];break}d.isDegenerate()?o=[r[0]==="a"?"l":"L",a[0],a[1]]:o=[r[0],d.rx,d.ry,d.ax,r[4],r[5],a[0],a[1]];break;case"m":h=i>0,a=n.calc(r[1],r[2],h),o=["m",a[0],a[1]];break;default:for(l=r[0],o=[l],h=l.toLowerCase()===l,e=1;e<r.length;e+=2)a=n.calc(r[e],r[e+1],h),o.push(a[0],a[1])}t.segments[i]=o},!0)},ii.prototype.__evaluateStack=function(){var n,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(n=Ic(),t=this.__stack.length;--t>=0;)n.matrix(this.__stack[t].toArray());this.__matrix(n),this.__stack=[]}},ii.prototype.toString=function(){var n="",t="",e=!1;this.__evaluateStack();for(var r=0,i=this.segments.length;r<i;r++){var s=this.segments[r],A=s[0];A!==t||A==="m"||A==="M"?(A==="m"&&t==="z"&&(n+=" "),n+=A,e=!1):e=!0;for(var a=1;a<s.length;a++){var o=s[a];a===1?e&&o>=0&&(n+=" "):o>=0&&(n+=" "),n+=o}t=A}return n},ii.prototype.translate=function(n,t){return this.__stack.push(Ic().translate(n,t||0)),this},ii.prototype.scale=function(n,t){return this.__stack.push(Ic().scale(n,!t&&t!==0?n:t)),this},ii.prototype.rotate=function(n,t,e){return this.__stack.push(Ic().rotate(n,t||0,e||0)),this},ii.prototype.skewX=function(n){return this.__stack.push(Ic().skewX(n)),this},ii.prototype.skewY=function(n){return this.__stack.push(Ic().skewY(n)),this},ii.prototype.matrix=function(n){return this.__stack.push(Ic().matrix(n)),this},ii.prototype.transform=function(n){return n.trim()?(this.__stack.push(m7(n)),this):this},ii.prototype.round=function(n){var t=0,e=0,r=0,i=0,s;return n=n||0,this.__evaluateStack(),this.segments.forEach(function(A){var a=A[0].toLowerCase()===A[0];switch(A[0]){case"H":case"h":a&&(A[1]+=r),r=A[1]-A[1].toFixed(n),A[1]=+A[1].toFixed(n);return;case"V":case"v":a&&(A[1]+=i),i=A[1]-A[1].toFixed(n),A[1]=+A[1].toFixed(n);return;case"Z":case"z":r=t,i=e;return;case"M":case"m":a&&(A[1]+=r,A[2]+=i),r=A[1]-A[1].toFixed(n),i=A[2]-A[2].toFixed(n),t=r,e=i,A[1]=+A[1].toFixed(n),A[2]=+A[2].toFixed(n);return;case"A":case"a":a&&(A[6]+=r,A[7]+=i),r=A[6]-A[6].toFixed(n),i=A[7]-A[7].toFixed(n),A[1]=+A[1].toFixed(n),A[2]=+A[2].toFixed(n),A[3]=+A[3].toFixed(n+2),A[6]=+A[6].toFixed(n),A[7]=+A[7].toFixed(n);return;default:s=A.length,a&&(A[s-2]+=r,A[s-1]+=i),r=A[s-2]-A[s-2].toFixed(n),i=A[s-1]-A[s-1].toFixed(n),A.forEach(function(o,l){l&&(A[l]=+A[l].toFixed(n))});return}}),this},ii.prototype.iterate=function(n,t){var e=this.segments,r={},i=!1,s=0,A=0,a=0,o=0,l,h,u;if(t||this.__evaluateStack(),e.forEach(function(d,f){var p=n(d,f,s,A);Array.isArray(p)&&(r[f]=p,i=!0);var m=d[0]===d[0].toLowerCase();switch(d[0]){case"m":case"M":s=d[1]+(m?s:0),A=d[2]+(m?A:0),a=s,o=A;return;case"h":case"H":s=d[1]+(m?s:0);return;case"v":case"V":A=d[1]+(m?A:0);return;case"z":case"Z":s=a,A=o;return;default:s=d[d.length-2]+(m?s:0),A=d[d.length-1]+(m?A:0)}}),!i)return this;for(u=[],l=0;l<e.length;l++)if(typeof r[l]<"u")for(h=0;h<r[l].length;h++)u.push(r[l][h]);else u.push(e[l]);return this.segments=u,this},ii.prototype.abs=function(){return this.iterate(function(n,t,e,r){var i=n[0],s=i.toUpperCase(),A;if(i!==s)switch(n[0]=s,i){case"v":n[1]+=r;return;case"a":n[6]+=e,n[7]+=r;return;default:for(A=1;A<n.length;A++)n[A]+=A%2?e:r}},!0),this},ii.prototype.rel=function(){return this.iterate(function(n,t,e,r){var i=n[0],s=i.toLowerCase(),A;if(i!==s&&!(t===0&&i==="M"))switch(n[0]=s,i){case"V":n[1]-=r;return;case"A":n[6]-=e,n[7]-=r;return;default:for(A=1;A<n.length;A++)n[A]-=A%2?e:r}},!0),this},ii.prototype.unarc=function(){return this.iterate(function(n,t,e,r){var i,s,A,a=[],o=n[0];return o!=="A"&&o!=="a"?null:(o==="a"?(s=e+n[6],A=r+n[7]):(s=n[6],A=n[7]),i=v7(e,r,s,A,n[4],n[5],n[1],n[2],n[3]),i.length===0?[[n[0]==="a"?"l":"L",n[6],n[7]]]:(i.forEach(function(l){a.push(["C",l[2],l[3],l[4],l[5],l[6],l[7]])}),a))}),this},ii.prototype.unshort=function(){var n=this.segments,t,e,r,i,s;return this.iterate(function(A,a,o,l){var h=A[0],u=h.toUpperCase(),d;a&&(u==="T"?(d=h==="t",r=n[a-1],r[0]==="Q"?(t=r[1]-o,e=r[2]-l):r[0]==="q"?(t=r[1]-r[3],e=r[2]-r[4]):(t=0,e=0),i=-t,s=-e,d||(i+=o,s+=l),n[a]=[d?"q":"Q",i,s,A[1],A[2]]):u==="S"&&(d=h==="s",r=n[a-1],r[0]==="C"?(t=r[3]-o,e=r[4]-l):r[0]==="c"?(t=r[3]-r[5],e=r[4]-r[6]):(t=0,e=0),i=-t,s=-e,d||(i+=o,s+=l),n[a]=[d?"c":"C",i,s,A[1],A[2],A[3],A[4]]))}),this};var y7=ii,b7=y7;const B7=V0(b7);var RI=function(n){var t=n,e,r={a:0,b:0,c:0},i=[],s=/(\[[^\]]+\])/g,A=/(#[^\#\s\+>~\.\[:\)]+)/g,a=/(\.[^\s\+>~\.\[:\)]+)/g,o=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,h=/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,u=/([^\s\+>~\.\[:]+)/g;return e=function(d,f){var p,m,y,w,B,E;if(d.test(t))for(p=t.match(d),m=0,y=p.length;m<y;m+=1)r[f]+=1,w=p[m],B=t.indexOf(w),E=w.length,i.push({selector:n.substr(B,E),type:f,index:B,length:E}),t=t.replace(w,Array(E+1).join(" "))},function(){var d=function(y){var w,B,E,S;if(y.test(t))for(w=t.match(y),B=0,E=w.length;B<E;B+=1)S=w[B],t=t.replace(S,Array(S.length+1).join("A"))},f=/\\[0-9A-Fa-f]{6}\s?/g,p=/\\[0-9A-Fa-f]{1,5}\s/g,m=/\\./g;d(f),d(p),d(m)}(),function(){var d=/{[^]*/gm,f,p,m,y;if(d.test(t))for(f=t.match(d),p=0,m=f.length;p<m;p+=1)y=f[p],t=t.replace(y,Array(y.length+1).join(" "))}(),e(s,"b"),e(A,"a"),e(a,"b"),e(o,"c"),e(l,"b"),e(h,"b"),t=t.replace(/[\*\s\+>~]/g," "),t=t.replace(/[#\.]/g," "),t=t.replace(/:not/g," "),t=t.replace(/:local/g," "),t=t.replace(/:global/g," "),t=t.replace(/[\(\)]/g," "),e(u,"c"),i.sort(function(d,f){return d.index-f.index}),{selector:n,specificity:"0,"+r.a.toString()+","+r.b.toString()+","+r.c.toString(),specificityArray:[0,r.a,r.b,r.c],parts:i}},C7=function(n,t){var e,r,i;if(typeof n=="string"){if(n.indexOf(",")!==-1)throw"Invalid CSS selector";e=RI(n).specificityArray}else if(Array.isArray(n)){if(n.filter(function(s){return typeof s=="number"}).length!==4)throw"Invalid specificity array";e=n}else throw"Invalid CSS selector or specificity array";if(typeof t=="string"){if(t.indexOf(",")!==-1)throw"Invalid CSS selector";r=RI(t).specificityArray}else if(Array.isArray(t)){if(t.filter(function(s){return typeof s=="number"}).length!==4)throw"Invalid specificity array";r=t}else throw"Invalid CSS selector or specificity array";for(i=0;i<4;i+=1){if(e[i]<r[i])return-1;if(e[i]>r[i])return 1}return 0},m5=function(n,t){return m5=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},m5(n,t)};function br(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}m5(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var h2=function(){return h2=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},h2.apply(this,arguments)};function Ur(n,t,e,r){return new(e||(e=Promise))(function(i,s){function A(l){try{o(r.next(l))}catch(h){s(h)}}function a(l){try{o(r.throw(l))}catch(h){s(h)}}function o(l){var h;l.done?i(l.value):(h=l.value,h instanceof e?h:new e(function(u){u(h)})).then(A,a)}o((r=r.apply(n,t||[])).next())})}function Lr(n,t){var e,r,i,s,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(l){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;A;)try{if(e=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return A.label++,{value:h[1],done:!1};case 5:A.label++,r=h[1],h=[0];continue;case 7:h=A.ops.pop(),A.trys.pop();continue;default:if(i=A.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){A=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){A.label=h[1];break}if(h[0]===6&&A.label<i[1]){A.label=i[1],i=h;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(h);break}i[2]&&A.ops.pop(),A.trys.pop();continue}h=t.call(n,A)}catch(u){h=[6,u],r=0}finally{e=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([o,l])}}}var wa=function(){function n(t){if(this.a=void 0,this.r=0,this.g=0,this.b=0,this.simpleColors={},this.colorDefs=[],this.ok=!1,t){for(var e in t.charAt(0)=="#"&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase(),this.simpleColors={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",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"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",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"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",slategrey:"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"},this.simpleColors)t==e&&(t=this.simpleColors[e]);this.colorDefs=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^rgb\(([0-9.]+)%,\s*([0-9.]+)%,\s*([0-9.]+)%\)$/,example:["rgb(50.5%, 25.75%, 75.5%)","rgb(100%,0%,0%)"],process:function(o){return[Math.round(2.55*parseFloat(o[1])),Math.round(2.55*parseFloat(o[2])),Math.round(2.55*parseFloat(o[3]))]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}];for(var r=0;r<this.colorDefs.length;r++){var i=this.colorDefs[r].re,s=this.colorDefs[r].process,A=i.exec(t);if(A){var a=s(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}}return n.prototype.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},n.prototype.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+(this.a||"1")+")"},n.prototype.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return t.length==1&&(t="0"+t),e.length==1&&(e="0"+e),r.length==1&&(r="0"+r),"#"+t+e+r},n.prototype.getHelpXML=function(){for(var t=[],e=0;e<this.colorDefs.length;e++)for(var r=this.colorDefs[e].example,i=0;i<r.length;i++)t[t.length]=r[i];for(var s in this.simpleColors)t[t.length]=s;var A=document.createElement("ul");for(A.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var a=document.createElement("li"),o=new n(t[e]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex(),l.appendChild(document.createTextNode("test"));var h=document.createTextNode(" "+t[e]+" -> "+o.toRGB()+" -> "+o.toHex());a.appendChild(l),a.appendChild(h),A.appendChild(a)}catch{}return A},n}(),xn=function(){function n(t){this.color=t}return n.prototype.getFillData=function(t,e){return Ur(this,void 0,void 0,function(){return Lr(this,function(r){return[2,void 0]})})},n}(),Vd=function(){function n(){this.xmlSpace="",this.whiteSpace="",this.fill=null,this.fillOpacity=1,this.fontFamily="",this.fontSize=16,this.fontStyle="",this.fontWeight="",this.opacity=1,this.stroke=null,this.strokeDasharray=null,this.strokeDashoffset=0,this.strokeLinecap="",this.strokeLinejoin="",this.strokeMiterlimit=4,this.strokeOpacity=1,this.strokeWidth=1,this.alignmentBaseline="",this.textAnchor="",this.visibility="",this.color=null,this.contextFill=null,this.contextStroke=null,this.fillRule=null}return n.prototype.clone=function(){var t=new n;return t.xmlSpace=this.xmlSpace,t.whiteSpace=this.whiteSpace,t.fill=this.fill,t.fillOpacity=this.fillOpacity,t.fontFamily=this.fontFamily,t.fontSize=this.fontSize,t.fontStyle=this.fontStyle,t.fontWeight=this.fontWeight,t.opacity=this.opacity,t.stroke=this.stroke,t.strokeDasharray=this.strokeDasharray,t.strokeDashoffset=this.strokeDashoffset,t.strokeLinecap=this.strokeLinecap,t.strokeLinejoin=this.strokeLinejoin,t.strokeMiterlimit=this.strokeMiterlimit,t.strokeOpacity=this.strokeOpacity,t.strokeWidth=this.strokeWidth,t.textAnchor=this.textAnchor,t.alignmentBaseline=this.alignmentBaseline,t.visibility=this.visibility,t.color=this.color,t.fillRule=this.fillRule,t.contextFill=this.contextFill,t.contextStroke=this.contextStroke,t},n.default=function(){var t=new n;return t.xmlSpace="default",t.whiteSpace="normal",t.fill=new xn(new wa("rgb(0, 0, 0)")),t.fillOpacity=1,t.fontFamily="times",t.fontSize=16,t.fontStyle="normal",t.fontWeight="normal",t.opacity=1,t.stroke=null,t.strokeDasharray=null,t.strokeDashoffset=0,t.strokeLinecap="butt",t.strokeLinejoin="miter",t.strokeMiterlimit=4,t.strokeOpacity=1,t.strokeWidth=1,t.alignmentBaseline="baseline",t.textAnchor="start",t.visibility="visible",t.color=new wa("rgb(0, 0, 0)"),t.fillRule="nonzero",t.contextFill=null,t.contextStroke=null,t},n.getContextColors=function(t,e){e===void 0&&(e=!1);var r={};return t.attributeState.contextFill&&(r.contextFill=t.attributeState.contextFill),t.attributeState.contextStroke&&(r.contextStroke=t.attributeState.contextStroke),e&&t.attributeState.color&&(r.color=t.attributeState.color),r},n}(),Uc=function(){function n(t,e){var r,i,s;this.pdf=t,this.svg2pdfParameters=e.svg2pdfParameters,this.attributeState=e.attributeState?e.attributeState.clone():Vd.default(),this.viewport=e.viewport,this.refsHandler=e.refsHandler,this.styleSheets=e.styleSheets,this.textMeasure=e.textMeasure,this.transform=(r=e.transform)!==null&&r!==void 0?r:this.pdf.unitMatrix,this.withinClipPath=(i=e.withinClipPath)!==null&&i!==void 0&&i,this.withinUse=(s=e.withinUse)!==null&&s!==void 0&&s}return n.prototype.clone=function(t){var e,r,i,s;return t===void 0&&(t={}),new n(this.pdf,{svg2pdfParameters:this.svg2pdfParameters,attributeState:t.attributeState?t.attributeState.clone():this.attributeState.clone(),viewport:(e=t.viewport)!==null&&e!==void 0?e:this.viewport,refsHandler:this.refsHandler,styleSheets:this.styleSheets,textMeasure:this.textMeasure,transform:(r=t.transform)!==null&&r!==void 0?r:this.transform,withinClipPath:(i=t.withinClipPath)!==null&&i!==void 0?i:this.withinClipPath,withinUse:(s=t.withinUse)!==null&&s!==void 0?s:this.withinUse})},n}(),HI=function(){function n(t){this.renderedElements={},this.idMap=t,this.idPrefix=String(n.instanceCounter++)}return n.prototype.getRendered=function(t,e,r){return Ur(this,void 0,void 0,function(){var i,s;return Lr(this,function(A){switch(A.label){case 0:return i=this.generateKey(t,e),this.renderedElements.hasOwnProperty(i)?[2,this.renderedElements[t]]:(s=this.get(t),this.renderedElements[i]=s,[4,r(s)]);case 1:return A.sent(),[2,s]}})})},n.prototype.get=function(t){return this.idMap[LI(t,{isIdentifier:!0})]},n.prototype.generateKey=function(t,e){var r="";return e&&(r=["color","contextFill","contextStroke"].map(function(i){var s,A;return(A=(s=e[i])===null||s===void 0?void 0:s.toRGBA())!==null&&A!==void 0?A:""}).join("|")),this.idPrefix+"|"+t+"|"+r},n.instanceCounter=0,n}();function KI(n,t){return Math.atan2(t[1]-n[1],t[0]-n[0])}var VI=2/3;function GI(n,t){return[VI*(t[0]-n[0])+n[0],VI*(t[1]-n[1])+n[1]]}function z0(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]);return[n[0]/t,n[1]/t]}function Gd(n,t){return z0([t[0]-n[0],t[1]-n[1]])}function u2(n,t){return[n[0]+t[0],n[1]+t[1]]}function v5(n,t){var e=n[0],r=n[1];return[t.a*e+t.c*r+t.e,t.b*e+t.d*r+t.f]}var jd=function(){function n(){this.segments=[]}return n.prototype.moveTo=function(t,e){return this.segments.push(new hn(t,e)),this},n.prototype.lineTo=function(t,e){return this.segments.push(new Lc(t,e)),this},n.prototype.curveTo=function(t,e,r,i,s,A){return this.segments.push(new Ao(t,e,r,i,s,A)),this},n.prototype.close=function(){return this.segments.push(new w5),this},n.prototype.transform=function(t){this.segments.forEach(function(e){if(e instanceof hn||e instanceof Lc||e instanceof Ao){var r=v5([e.x,e.y],t);e.x=r[0],e.y=r[1]}if(e instanceof Ao){var i=v5([e.x1,e.y1],t),s=v5([e.x2,e.y2],t);e.x1=i[0],e.y1=i[1],e.x2=s[0],e.y2=s[1]}})},n.prototype.draw=function(t){var e=t.pdf;this.segments.forEach(function(r){r instanceof hn?e.moveTo(r.x,r.y):r instanceof Lc?e.lineTo(r.x,r.y):r instanceof Ao?e.curveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y):e.close()})},n}(),hn=function(n,t){this.x=n,this.y=t},Lc=function(n,t){this.x=n,this.y=t},Ao=function(n,t,e,r,i,s){this.x1=n,this.y1=t,this.x2=e,this.y2=r,this.x=i,this.y=s},w5=function(){};function Qc(n,t){return t.split(",").indexOf((n.nodeName||n.tagName).toLowerCase())>=0}function Lt(n,t,e,r){var i;r===void 0&&(r=e);var s=(i=n.style)===null||i===void 0?void 0:i.getPropertyValue(r);if(s)return s;var A=t.getPropertyValue(n,r);return A||n.hasAttribute(e)&&n.getAttribute(e)||void 0}function tl(n,t,e){if(Lt(n.element,e.styleSheets,"display")==="none")return!1;var r=t,i=Lt(n.element,e.styleSheets,"visibility");return i&&(r=i!=="hidden"),r}function Nc(n,t,e){var r=tl(n,t,e);return n.element.childNodes.length!==0&&(n.children.forEach(function(i){i.isVisible(r,e)&&(r=!0)}),r)}var x7=function(){function n(){this.markers=[]}return n.prototype.addMarker=function(t){this.markers.push(t)},n.prototype.draw=function(t){return Ur(this,void 0,void 0,function(){var e,r,i,s,A,a,o,l;return Lr(this,function(h){switch(h.label){case 0:e=0,h.label=1;case 1:return e<this.markers.length?(r=this.markers[e],i=void 0,s=r.angle,A=r.anchor,a=Math.cos(s),o=Math.sin(s),i=t.pdf.Matrix(a,o,-o,a,A[0],A[1]),i=t.pdf.matrixMult(t.pdf.Matrix(t.attributeState.strokeWidth,0,0,t.attributeState.strokeWidth,0,0),i),i=t.pdf.matrixMult(i,t.transform),t.pdf.saveGraphicsState(),l=Vd.getContextColors(t),[4,t.refsHandler.getRendered(r.id,l,function(u){return u.apply(t)})]):[3,4];case 2:h.sent(),t.pdf.doFormObject(t.refsHandler.generateKey(r.id,l),i),t.pdf.restoreGraphicsState(),h.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},n}(),Pc=function(n,t,e,r){r===void 0&&(r=!1),this.id=n,this.anchor=t,this.angle=e,this.isStartMarker=r},y5=/url\(["']?#([^"']+)["']?\)/,E7={bottom:"bottom","text-bottom":"bottom",top:"top","text-top":"top",hanging:"hanging",middle:"middle",central:"middle",center:"middle",mathematical:"middle",ideographic:"ideographic",alphabetic:"alphabetic",baseline:"alphabetic"},jI="http://www.w3.org/2000/svg";function el(n,t){var e;return(e=n&&n.toString().match(/^([\-0-9.]+)em$/))?parseFloat(e[1])*t:(e=n&&n.toString().match(/^([\-0-9.]+)(px|)$/))?parseFloat(e[1]):0}function $I(n){return E7[n]||"alphabetic"}function DA(n){for(var t,e=[],r=/[+-]?(?:(?:\d+\.?\d*)|(?:\d*\.?\d+))(?:[eE][+-]?\d+)?/g;t=r.exec(n);)e.push(parseFloat(t[0]));return e}function $d(n,t){if(n==="transparent"){var e=new wa("rgb(0,0,0)");return e.a=0,e}if(t&&n.toLowerCase()==="currentcolor")return t.color||new wa("rgb(0,0,0)");if(t&&n.toLowerCase()==="context-stroke")return t.contextStroke||new wa("rgb(0,0,0)");if(t&&n.toLowerCase()==="context-fill")return t.contextFill||new wa("rgb(0,0,0)");var r=/\s*rgba\(((?:[^,\)]*,){3}[^,\)]*)\)\s*/.exec(n);if(r){var i=DA(r[1]),s=new wa("rgb("+i.slice(0,3).join(",")+")");return s.a=i[3],s}return new wa(n)}var rl={"sans-serif":"helvetica",verdana:"helvetica",arial:"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",serif:"times",cursive:"times",fantasy:"times"},b5,S7=(b5=le.version.split("."),parseFloat(b5[0])===2&&parseFloat(b5[1])===3);function WI(n,t){return S7?t==400?n=="italic"?"italic":"normal":t==700&&n!=="italic"?"bold":n+""+t:t==400||t==="normal"?n==="italic"?"italic":"normal":t!=700&&t!=="bold"||n!=="normal"?(t==700?"bold":t)+""+n:"bold"}function B5(n,t){if(Lt(t.element,n.styleSheets,"display")==="none")return[0,0,0,0];var e=[];return t.children.forEach(function(r){var i=r.getBoundingBox(n);if(i[0]!==0||i[1]!==0||i[2]!==0||i[3]!==0){var s=r.computeNodeTransform(n);i[0]=i[0]*s.sx+s.tx,i[1]=i[1]*s.sy+s.ty,i[2]=i[2]*s.sx,i[3]=i[3]*s.sy,e=e.length===0?i:[Math.min(e[0],i[0]),Math.min(e[1],i[1]),Math.max(e[0]+e[2],i[0]+i[2])-Math.min(e[0],i[0]),Math.max(e[1]+e[3],i[1]+i[3])-Math.min(e[1],i[1])]}}),e.length===0?[0,0,0,0]:e}function X0(n,t){var e=parseFloat,r=e(n.getAttribute("x1"))||e(Lt(n,t.styleSheets,"x"))||e(Lt(n,t.styleSheets,"cx"))-e(Lt(n,t.styleSheets,"r"))||0,i=e(n.getAttribute("x2"))||r+e(Lt(n,t.styleSheets,"width"))||e(Lt(n,t.styleSheets,"cx"))+e(Lt(n,t.styleSheets,"r"))||0,s=e(n.getAttribute("y1"))||e(Lt(n,t.styleSheets,"y"))||e(Lt(n,t.styleSheets,"cy"))-e(Lt(n,t.styleSheets,"r"))||0,A=e(n.getAttribute("y2"))||s+e(Lt(n,t.styleSheets,"height"))||e(Lt(n,t.styleSheets,"cy"))+e(Lt(n,t.styleSheets,"r"))||0;return[Math.min(r,i),Math.min(s,A),Math.max(r,i)-Math.min(r,i),Math.max(s,A)-Math.min(s,A)]}function q0(n,t,e,r,i,s,A,a){a===void 0&&(a=!1);var o,l,h=t[0],u=t[1],d=t[2],f=t[3],p=i/d,m=s/f,y=n.getAttribute("preserveAspectRatio");if(y){var w=y.split(" ");w[0]==="defer"&&(w=w.slice(1)),o=w[0],l=w[1]||"meet"}else o="xMidYMid",l="meet";if(o!=="none"&&(l==="meet"?p=m=Math.min(p,m):l==="slice"&&(p=m=Math.max(p,m))),a)return A.pdf.Matrix(p,0,0,m,0,0);var B=e-h*p,E=r-u*m;o.indexOf("xMid")>=0?B+=(i-d*p)/2:o.indexOf("xMax")>=0&&(B+=i-d*p),o.indexOf("YMid")>=0?E+=(s-f*m)/2:o.indexOf("YMax")>=0&&(E+=s-f*m);var S=A.pdf.Matrix(1,0,0,1,B,E),_=A.pdf.Matrix(p,0,0,m,0,0);return A.pdf.matrixMult(_,S)}function f2(n,t){if(!n||n==="none")return t.pdf.unitMatrix;for(var e,r,i=/^[\s,]*matrix\(([^)]+)\)\s*/,s=/^[\s,]*translate\(([^)]+)\)\s*/,A=/^[\s,]*rotate\(([^)]+)\)\s*/,a=/^[\s,]*scale\(([^)]+)\)\s*/,o=/^[\s,]*skewX\(([^)]+)\)\s*/,l=/^[\s,]*skewY\(([^)]+)\)\s*/,h=t.pdf.unitMatrix;n.length>0&&n.length!==r;){r=n.length;var u=i.exec(n);if(u&&(e=DA(u[1]),h=t.pdf.matrixMult(t.pdf.Matrix(e[0],e[1],e[2],e[3],e[4],e[5]),h),n=n.substr(u[0].length)),u=A.exec(n)){e=DA(u[1]);var d=Math.PI*e[0]/180;if(h=t.pdf.matrixMult(t.pdf.Matrix(Math.cos(d),Math.sin(d),-Math.sin(d),Math.cos(d),0,0),h),e[1]||e[2]){var f=t.pdf.Matrix(1,0,0,1,e[1],e[2]),p=t.pdf.Matrix(1,0,0,1,-e[1],-e[2]);h=t.pdf.matrixMult(p,t.pdf.matrixMult(h,f))}n=n.substr(u[0].length)}(u=s.exec(n))&&(e=DA(u[1]),h=t.pdf.matrixMult(t.pdf.Matrix(1,0,0,1,e[0],e[1]||0),h),n=n.substr(u[0].length)),(u=a.exec(n))&&((e=DA(u[1]))[1]||(e[1]=e[0]),h=t.pdf.matrixMult(t.pdf.Matrix(e[0],0,0,e[1],0,0),h),n=n.substr(u[0].length)),(u=o.exec(n))&&(e=parseFloat(u[1]),e*=Math.PI/180,h=t.pdf.matrixMult(t.pdf.Matrix(1,0,Math.tan(e),1,0,0),h),n=n.substr(u[0].length)),(u=l.exec(n))&&(e=parseFloat(u[1]),e*=Math.PI/180,h=t.pdf.matrixMult(t.pdf.Matrix(1,Math.tan(e),0,1,0,0),h),n=n.substr(u[0].length))}return h}var C5=function(){function n(t,e){this.element=t,this.children=e,this.parent=null}return n.prototype.setParent=function(t){this.parent=t},n.prototype.getParent=function(){return this.parent},n.prototype.getBoundingBox=function(t){return Lt(this.element,t.styleSheets,"display")==="none"?[0,0,0,0]:this.getBoundingBoxCore(t)},n.prototype.computeNodeTransform=function(t){var e=this.computeNodeTransformCore(t),r=Lt(this.element,t.styleSheets,"transform");return r?t.pdf.matrixMult(e,f2(r,t)):e},n}(),Y0=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.render=function(e){return Promise.resolve()},t.prototype.getBoundingBoxCore=function(e){return[]},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(C5),zI=function(n){function t(e,r,i){var s=n.call(this,r,i)||this;return s.pdfGradientType=e,s.contextColor=void 0,s}return br(t,n),t.prototype.apply=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a,o;return Lr(this,function(l){return(r=this.element.getAttribute("id"))?(i=this.getStops(e.styleSheets),s=0,A=!1,i.forEach(function(h){var u=h.opacity;u&&u!==1&&(s+=u,A=!0)}),A&&(a=new uu({opacity:s/i.length})),o=new Fc(this.pdfGradientType,this.getCoordinates(),i,a),e.pdf.addShadingPattern(r,o),[2]):[2]})})},t.prototype.getStops=function(e){var r=this;if(this.stops)return this.stops;if(this.contextColor===void 0){this.contextColor=null;for(var i=this;i;){var s=Lt(i.element,e,"color");if(s){this.contextColor=$d(s,null);break}i=i.getParent()}}var A=[];return this.children.forEach(function(a){if(a.element.tagName.toLowerCase()==="stop"){var o=Lt(a.element,e,"color"),l=$d(Lt(a.element,e,"stop-color")||"",o?{color:$d(o,null)}:{color:r.contextColor}),h=parseFloat(Lt(a.element,e,"stop-opacity")||"1");A.push({offset:t.parseGradientOffset(a.element.getAttribute("offset")||"0"),color:[l.r,l.g,l.b],opacity:h})}}),this.stops=A},t.prototype.getBoundingBoxCore=function(e){return X0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t.parseGradientOffset=function(e){var r=parseFloat(e);return!isNaN(r)&&e.indexOf("%")>=0?r/100:r},t}(Y0),XI=function(n){function t(e,r){return n.call(this,"axial",e,r)||this}return br(t,n),t.prototype.getCoordinates=function(){return[parseFloat(this.element.getAttribute("x1")||"0"),parseFloat(this.element.getAttribute("y1")||"0"),parseFloat(this.element.getAttribute("x2")||"1"),parseFloat(this.element.getAttribute("y2")||"0")]},t}(zI),qI=function(n){function t(e,r){return n.call(this,"radial",e,r)||this}return br(t,n),t.prototype.getCoordinates=function(){var e=this.element.getAttribute("cx"),r=this.element.getAttribute("cy"),i=this.element.getAttribute("fx"),s=this.element.getAttribute("fy");return[parseFloat(i||e||"0.5"),parseFloat(s||r||"0.5"),0,parseFloat(e||"0.5"),parseFloat(r||"0.5"),parseFloat(this.element.getAttribute("r")||"0.5")]},t}(zI),F7=function(){function n(t,e){this.key=t,this.gradient=e}return n.prototype.getFillData=function(t,e){return Ur(this,void 0,void 0,function(){var r,i,s;return Lr(this,function(A){switch(A.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,function(a){return a.apply(new Uc(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))})];case 1:return A.sent(),this.gradient.element.hasAttribute("gradientUnits")&&this.gradient.element.getAttribute("gradientUnits").toLowerCase()!=="objectboundingbox"?r=e.pdf.unitMatrix:(i=t.getBoundingBox(e),r=e.pdf.Matrix(i[2],0,0,i[3],i[0],i[1])),s=f2(Lt(this.gradient.element,e.styleSheets,"gradientTransform","transform"),e),[2,{key:this.key,matrix:e.pdf.matrixMult(s,r)}]}})})},n}(),YI=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.apply=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a;return Lr(this,function(o){switch(o.label){case 0:if(!(r=this.element.getAttribute("id")))return[2];i=this.getBoundingBox(e),s=new fu([i[0],i[1],i[0]+i[2],i[1]+i[3]],i[2],i[3]),e.pdf.beginTilingPattern(s),A=0,a=this.children,o.label=1;case 1:return A<a.length?[4,a[A].render(new Uc(e.pdf,{attributeState:e.attributeState,refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return A++,[3,1];case 4:return e.pdf.endTilingPattern(r,s),[2]}})})},t.prototype.getBoundingBoxCore=function(e){return X0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t}(Y0),T7=function(){function n(t,e){this.key=t,this.pattern=e}return n.prototype.getFillData=function(t,e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p;return Lr(this,function(m){switch(m.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,function(y){return y.apply(new Uc(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))})];case 1:return m.sent(),r={key:this.key,boundingBox:void 0,xStep:0,yStep:0,matrix:void 0},s=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternUnits")&&this.pattern.element.getAttribute("patternUnits").toLowerCase()!=="objectboundingbox"||(i=t.getBoundingBox(e),s=e.pdf.Matrix(1,0,0,1,i[0],i[1]),a=this.pattern.getBoundingBox(e),o=a[0]*i[0]||0,l=a[1]*i[1]||0,h=a[2]*i[2]||0,u=a[3]*i[3]||0,r.boundingBox=[o,l,o+h,l+u],r.xStep=h,r.yStep=u),A=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternContentUnits")&&this.pattern.element.getAttribute("patternContentUnits").toLowerCase()==="objectboundingbox"&&(i||(i=t.getBoundingBox(e)),A=e.pdf.Matrix(i[2],0,0,i[3],0,0),a=r.boundingBox||this.pattern.getBoundingBox(e),o=a[0]/i[0]||0,l=a[1]/i[1]||0,h=a[2]/i[2]||0,u=a[3]/i[3]||0,r.boundingBox=[o,l,o+h,l+u],r.xStep=h,r.yStep=u),d=e.pdf.unitMatrix,(f=Lt(this.pattern.element,e.styleSheets,"patternTransform","transform"))&&(d=f2(f,e)),p=A,p=e.pdf.matrixMult(p,s),p=e.pdf.matrixMult(p,d),p=e.pdf.matrixMult(p,e.transform),r.matrix=p,[2,r]}})})},n}();function _7(n,t){var e=y5.exec(n);if(e){var r=e[1],i=t.refsHandler.get(r);return i&&(i instanceof XI||i instanceof qI)?function(A,a,o){var l=a.getStops(o.styleSheets);if(l.length===0)return null;if(l.length===1){var h=l[0].color,u=new wa;return u.ok=!0,u.r=h[0],u.g=h[1],u.b=h[2],u.a=l[0].opacity,new xn(u)}return new F7(A,a)}(r,i,t):i&&i instanceof YI?new T7(r,i):new xn(new wa("rgb(0, 0, 0)"))}var s=$d(n,t.attributeState);return s.ok?new xn(s):null}function x5(n,t,e){var r=e||t.element,i=Lt(r,n.styleSheets,"color");if(i){var s=$d(i,n.attributeState);s.ok?n.attributeState.color=s:n.attributeState.color=new wa("rgb(0,0,0)")}var A=Lt(r,n.styleSheets,"visibility");A&&(n.attributeState.visibility=A);var a=Lt(r,n.styleSheets,"fill");a&&(n.attributeState.fill=_7(a,n));var o=Lt(r,n.styleSheets,"fill-opacity");o&&(n.attributeState.fillOpacity=parseFloat(o));var l=Lt(r,n.styleSheets,"stroke-opacity");l&&(n.attributeState.strokeOpacity=parseFloat(l));var h=Lt(r,n.styleSheets,"opacity");h&&(n.attributeState.opacity=parseFloat(h));var u=Lt(r,n.styleSheets,"stroke-width");u!==void 0&&u!==""&&(n.attributeState.strokeWidth=Math.abs(parseFloat(u)));var d=Lt(r,n.styleSheets,"stroke");if(d)if(d==="none")n.attributeState.stroke=null;else{var f=$d(d,n.attributeState);f.ok&&(n.attributeState.stroke=new xn(f))}d&&n.attributeState.stroke instanceof xn&&(n.attributeState.contextStroke=n.attributeState.stroke.color),a&&n.attributeState.fill instanceof xn&&(n.attributeState.contextFill=n.attributeState.fill.color);var p=Lt(r,n.styleSheets,"stroke-linecap");p&&(n.attributeState.strokeLinecap=p);var m=Lt(r,n.styleSheets,"stroke-linejoin");m&&(n.attributeState.strokeLinejoin=m);var y=Lt(r,n.styleSheets,"stroke-dasharray");if(y){var w=parseInt(Lt(r,n.styleSheets,"stroke-dashoffset")||"0");n.attributeState.strokeDasharray=DA(y),n.attributeState.strokeDashoffset=w}var B=Lt(r,n.styleSheets,"stroke-miterlimit");B!==void 0&&B!==""&&(n.attributeState.strokeMiterlimit=parseFloat(B));var E=r.getAttribute("xml:space");E&&(n.attributeState.xmlSpace=E);var S=Lt(r,n.styleSheets,"white-space");S&&(n.attributeState.whiteSpace=S);var _=Lt(r,n.styleSheets,"font-weight");_&&(n.attributeState.fontWeight=_);var L=Lt(r,n.styleSheets,"font-style");L&&(n.attributeState.fontStyle=L);var k=Lt(r,n.styleSheets,"font-family");if(k){var H=X8.parse(k);n.attributeState.fontFamily=function(st,rt,it){var At=WI(st.fontStyle,st.fontWeight),ut=it.pdf.getFontList(),vt="";return rt.some(function(mt){var M=ut[mt];return M&&M.indexOf(At)>=0?(vt=mt,!0):(mt=mt.toLowerCase(),!!rl.hasOwnProperty(mt)&&(vt=mt,!0))})||(vt="times"),vt}(n.attributeState,H,n)}var Q=Lt(r,n.styleSheets,"font-size");if(Q){var W=n.pdf.getFontSize();n.attributeState.fontSize=el(Q,W)}var U=Lt(r,n.styleSheets,"vertical-align")||Lt(r,n.styleSheets,"alignment-baseline");if(U){var D=U.match(/(baseline|text-bottom|alphabetic|ideographic|middle|central|mathematical|text-top|bottom|center|top|hanging)/);D&&(n.attributeState.alignmentBaseline=D[0])}var j=Lt(r,n.styleSheets,"text-anchor");j&&(n.attributeState.textAnchor=j);var V=Lt(r,n.styleSheets,"fill-rule");V&&(n.attributeState.fillRule=V)}function E5(n,t,e){var r=1,i=1;r*=n.attributeState.fillOpacity,r*=n.attributeState.opacity,n.attributeState.fill instanceof xn&&n.attributeState.fill.color.a!==void 0&&(r*=n.attributeState.fill.color.a),i*=n.attributeState.strokeOpacity,i*=n.attributeState.opacity,n.attributeState.stroke instanceof xn&&n.attributeState.stroke.color.a!==void 0&&(i*=n.attributeState.stroke.color.a);var s,A,a=r<1,o=i<1;if(Qc(e,"use")?(a=!0,o=!0,r*=n.attributeState.fill?1:0,i*=n.attributeState.stroke?1:0):n.withinUse&&(n.attributeState.fill!==t.attributeState.fill?(a=!0,r*=n.attributeState.fill?1:0):a&&!n.attributeState.fill&&(r=0),n.attributeState.stroke!==t.attributeState.stroke?(o=!0,i*=n.attributeState.stroke?1:0):o&&!n.attributeState.stroke&&(i=0)),a||o){var l={};a&&(l.opacity=r),o&&(l["stroke-opacity"]=i),n.pdf.setGState(new uu(l))}if(n.attributeState.fill&&n.attributeState.fill!==t.attributeState.fill&&n.attributeState.fill instanceof xn&&n.attributeState.fill.color.ok&&!Qc(e,"text")&&n.pdf.setFillColor(n.attributeState.fill.color.r,n.attributeState.fill.color.g,n.attributeState.fill.color.b),n.attributeState.strokeWidth!==t.attributeState.strokeWidth&&n.pdf.setLineWidth(n.attributeState.strokeWidth),n.attributeState.stroke!==t.attributeState.stroke&&n.attributeState.stroke instanceof xn&&n.pdf.setDrawColor(n.attributeState.stroke.color.r,n.attributeState.stroke.color.g,n.attributeState.stroke.color.b),n.attributeState.strokeLinecap!==t.attributeState.strokeLinecap&&n.pdf.setLineCap(n.attributeState.strokeLinecap),n.attributeState.strokeLinejoin!==t.attributeState.strokeLinejoin&&n.pdf.setLineJoin(n.attributeState.strokeLinejoin),n.attributeState.strokeDasharray===t.attributeState.strokeDasharray&&n.attributeState.strokeDashoffset===t.attributeState.strokeDashoffset||!n.attributeState.strokeDasharray||n.pdf.setLineDashPattern(n.attributeState.strokeDasharray,n.attributeState.strokeDashoffset),n.attributeState.strokeMiterlimit!==t.attributeState.strokeMiterlimit&&n.pdf.setLineMiterLimit(n.attributeState.strokeMiterlimit),n.attributeState.fontFamily!==t.attributeState.fontFamily&&(s=rl.hasOwnProperty(n.attributeState.fontFamily)?rl[n.attributeState.fontFamily]:n.attributeState.fontFamily),n.attributeState.fill&&n.attributeState.fill!==t.attributeState.fill&&n.attributeState.fill instanceof xn&&n.attributeState.fill.color.ok){var h=n.attributeState.fill.color;n.pdf.setTextColor(h.r,h.g,h.b)}n.attributeState.fontWeight===t.attributeState.fontWeight&&n.attributeState.fontStyle===t.attributeState.fontStyle||(A=WI(n.attributeState.fontStyle,n.attributeState.fontWeight)),s===void 0&&A===void 0||(s===void 0&&(s=rl.hasOwnProperty(n.attributeState.fontFamily)?rl[n.attributeState.fontFamily]:n.attributeState.fontFamily),n.pdf.setFont(s,A)),n.attributeState.fontSize!==t.attributeState.fontSize&&n.pdf.setFontSize(n.attributeState.fontSize*n.pdf.internal.scaleFactor)}function JI(n,t,e){var r=y5.exec(n);if(r){var i=r[1];return e.refsHandler.get(i)||void 0}}function ZI(n,t,e){return Ur(this,void 0,void 0,function(){var r,i;return Lr(this,function(s){switch(s.label){case 0:return r=e.clone(),t.element.hasAttribute("clipPathUnits")&&t.element.getAttribute("clipPathUnits").toLowerCase()==="objectboundingbox"&&(i=n.getBoundingBox(e),r.transform=e.pdf.matrixMult(e.pdf.Matrix(i[2],0,0,i[3],i[0],i[1]),e.transform)),[4,t.apply(r)];case 1:return s.sent(),[2]}})})}var tU=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.render=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A;return Lr(this,function(a){switch(a.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?((r=e.clone()).transform=r.pdf.matrixMult(this.computeNodeTransform(r),e.transform),x5(r,this),i=Lt(this.element,r.styleSheets,"clip-path"),(s=i&&i!=="none")?(A=JI(i,0,r))?A.isVisible(!0,r)?(r.pdf.saveGraphicsState(),[4,ZI(this,A,r)]):[3,2]:[3,4]:[3,5]):[2];case 1:return a.sent(),[3,3];case 2:return[2];case 3:return[3,5];case 4:s=!1,a.label=5;case 5:return r.withinClipPath||r.pdf.saveGraphicsState(),E5(r,e,this.element),[4,this.renderCore(r)];case 6:return a.sent(),r.withinClipPath||r.pdf.restoreGraphicsState(),s&&r.pdf.restoreGraphicsState(),[2]}})})},t}(C5),d2=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t}(tU),J0=function(n){function t(e,r,i){var s=n.call(this,r,i)||this;return s.cachedPath=null,s.hasMarkers=e,s}return br(t,n),t.prototype.renderCore=function(e){return Ur(this,void 0,void 0,function(){var r;return Lr(this,function(i){switch(i.label){case 0:return(r=this.getCachedPath(e))===null||r.segments.length===0?[2]:(e.withinClipPath?r.transform(e.transform):e.pdf.setCurrentTransformationMatrix(e.transform),r.draw(e),[4,this.fillOrStroke(e)]);case 1:return i.sent(),this.hasMarkers?[4,this.drawMarkers(e,r)]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})},t.prototype.getCachedPath=function(e){return this.cachedPath||(this.cachedPath=this.getPath(e))},t.prototype.drawMarkers=function(e,r){return Ur(this,void 0,void 0,function(){return Lr(this,function(i){switch(i.label){case 0:return[4,this.getMarkers(r,e).draw(e.clone({transform:e.pdf.unitMatrix}))];case 1:return i.sent(),[2]}})})},t.prototype.fillOrStroke=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a;return Lr(this,function(o){switch(o.label){case 0:return e.withinClipPath?[2]:(r=e.attributeState.fill,i=e.attributeState.stroke&&e.attributeState.strokeWidth!==0,r?[4,r.getFillData(this,e)]:[3,2]);case 1:return A=o.sent(),[3,3];case 2:A=void 0,o.label=3;case 3:return s=A,a=e.attributeState.fillRule==="evenodd",r&&i||e.withinUse?a?e.pdf.fillStrokeEvenOdd(s):e.pdf.fillStroke(s):r?a?e.pdf.fillEvenOdd(s):e.pdf.fill(s):i?e.pdf.stroke():e.pdf.discardPath(),[2]}})})},t.prototype.getBoundingBoxCore=function(e){var r=this.getCachedPath(e);if(!r||!r.segments.length)return[0,0,0,0];for(var i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=0,l=0,h=0;h<r.segments.length;h++){var u=r.segments[h];(u instanceof hn||u instanceof Lc||u instanceof Ao)&&(o=u.x,l=u.y),u instanceof Ao?(i=Math.min(i,o,u.x1,u.x2,u.x),A=Math.max(A,o,u.x1,u.x2,u.x),s=Math.min(s,l,u.y1,u.y2,u.y),a=Math.max(a,l,u.y1,u.y2,u.y)):(i=Math.min(i,o),A=Math.max(A,o),s=Math.min(s,l),a=Math.max(a,l))}return[i,s,A-i,a-s]},t.prototype.getMarkers=function(e,r){var i=Lt(this.element,r.styleSheets,"marker-start"),s=Lt(this.element,r.styleSheets,"marker-mid"),A=Lt(this.element,r.styleSheets,"marker-end"),a=new x7;if(i||s||A){A&&(A=S5(A)),i&&(i=S5(i)),s&&(s=S5(s));for(var o=e.segments,l=[1,0],h=void 0,u=!1,d=[1,0],f=!1,p=function(y){var w=o[y],B=i&&(y===1||!(o[y]instanceof hn)&&o[y-1]instanceof hn);B&&o.forEach(function(H,Q){if(!f&&H instanceof w5&&Q>y){var W=o[Q-1];f=(W instanceof hn||W instanceof Lc||W instanceof Ao)&&W}});var E=A&&(y===o.length-1||!(o[y]instanceof hn)&&o[y+1]instanceof hn),S=s&&y>0&&!(y===1&&o[y-1]instanceof hn),_=o[y-1]||null;if(_ instanceof hn||_ instanceof Lc||_ instanceof Ao)if(w instanceof Ao)B&&a.addMarker(new Pc(i,[_.x,_.y],KI(f?[f.x,f.y]:[_.x,_.y],[w.x1,w.y1]),!0)),E&&a.addMarker(new Pc(A,[w.x,w.y],KI([w.x2,w.y2],[w.x,w.y]))),S&&(h=Gd([_.x,_.y],[w.x1,w.y1]),h=_ instanceof hn?h:z0(u2(l,h)),a.addMarker(new Pc(s,[_.x,_.y],Math.atan2(h[1],h[0])))),l=Gd([w.x2,w.y2],[w.x,w.y]);else if(w instanceof hn||w instanceof Lc){if(h=Gd([_.x,_.y],[w.x,w.y]),B){var L=f?Gd([f.x,f.y],[w.x,w.y]):h;a.addMarker(new Pc(i,[_.x,_.y],Math.atan2(L[1],L[0]),!0))}E&&a.addMarker(new Pc(A,[w.x,w.y],Math.atan2(h[1],h[0]))),S&&(L=w instanceof hn?l:_ instanceof hn?h:z0(u2(l,h)),a.addMarker(new Pc(s,[_.x,_.y],Math.atan2(L[1],L[0])))),l=h}else w instanceof w5&&(h=Gd([_.x,_.y],[u.x,u.y]),S&&(L=_ instanceof hn?h:z0(u2(l,h)),a.addMarker(new Pc(s,[_.x,_.y],Math.atan2(L[1],L[0])))),E&&(L=z0(u2(h,d)),a.addMarker(new Pc(A,[u.x,u.y],Math.atan2(L[1],L[0])))),l=h);else{u=w instanceof hn&&w;var k=o[y+1];(k instanceof hn||k instanceof Lc||k instanceof Ao)&&(d=Gd([u.x,u.y],[k.x,k.y]))}},m=0;m<o.length;m++)p(m)}return a.markers.forEach(function(y){var w=r.refsHandler.get(y.id);if(w){var B=Lt(w.element,r.styleSheets,"orient");B!=null&&(y.isStartMarker&&B==="auto-start-reverse"&&(y.angle+=Math.PI),isNaN(Number(B))||(y.angle=parseFloat(B)/180*Math.PI))}}),a},t}(d2);function S5(n){var t=y5.exec(n);return t&&t[1]||void 0}var I7=function(n){function t(e,r){return n.call(this,!0,e,r)||this}return br(t,n),t.prototype.getPath=function(e){if(e.withinClipPath||e.attributeState.stroke===null)return null;var r=parseFloat(this.element.getAttribute("x1")||"0"),i=parseFloat(this.element.getAttribute("y1")||"0"),s=parseFloat(this.element.getAttribute("x2")||"0"),A=parseFloat(this.element.getAttribute("y2")||"0");return r||s||i||A?new jd().moveTo(r,i).lineTo(s,A):null},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t.prototype.fillOrStroke=function(e){return Ur(this,void 0,void 0,function(){return Lr(this,function(r){switch(r.label){case 0:return e.attributeState.fill=null,[4,n.prototype.fillOrStroke.call(this,e)];case 1:return r.sent(),[2]}})})},t}(J0),eU=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.apply=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a;return Lr(this,function(o){switch(o.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?((r=e.clone()).transform=r.pdf.unitMatrix,x5(r,this),i=Lt(this.element,r.styleSheets,"clip-path"),i&&i!=="none"&&(s=JI(i,0,r))?s.isVisible(!0,r)?[4,ZI(this,s,r)]:[3,2]:[3,3]):[2];case 1:return o.sent(),[3,3];case 2:return[2];case 3:E5(r,e,this.element),A=0,a=this.children,o.label=4;case 4:return A<a.length?[4,a[A].render(r)]:[3,7];case 5:o.sent(),o.label=6;case 6:return A++,[3,4];case 7:return[2]}})})},t.prototype.getBoundingBoxCore=function(e){return B5(e,this)},t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t.prototype.computeNodeTransformCore=function(e){var r=parseFloat(Lt(this.element,e.styleSheets,"x")||"0"),i=parseFloat(Lt(this.element,e.styleSheets,"y")||"0"),s=this.element.getAttribute("viewBox");if(s){var A=DA(s),a=parseFloat(Lt(this.element,e.styleSheets,"width")||Lt(this.element.ownerSVGElement,e.styleSheets,"width")||s[2]),o=parseFloat(Lt(this.element,e.styleSheets,"height")||Lt(this.element.ownerSVGElement,e.styleSheets,"height")||s[3]);return q0(this.element,A,r,i,a,o,e)}return e.pdf.Matrix(1,0,0,1,r,i)},t}(Y0),g2=function(n,t){this.width=n,this.height=t},U7=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.renderCore=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p,m;return Lr(this,function(y){switch(y.label){case 0:return r=parseFloat,(i=this.element.getAttribute("href")||this.element.getAttribute("xlink:href"))?(s=i.substring(1),A=e.refsHandler.get(s),a=Qc(A.element,"symbol,svg")&&A.element.hasAttribute("viewBox"),o=r(Lt(this.element,e.styleSheets,"x")||"0"),l=r(Lt(this.element,e.styleSheets,"y")||"0"),h=void 0,u=void 0,a?(h=r(Lt(this.element,e.styleSheets,"width")||Lt(A.element,e.styleSheets,"width")||"0"),u=r(Lt(this.element,e.styleSheets,"height")||Lt(A.element,e.styleSheets,"height")||"0"),o+=r(Lt(A.element,e.styleSheets,"x")||"0"),l+=r(Lt(A.element,e.styleSheets,"y")||"0"),f=DA(A.element.getAttribute("viewBox")),d=q0(A.element,f,o,l,h,u,e)):d=e.pdf.Matrix(1,0,0,1,o,l),p=Vd.getContextColors(e,!0),m=new Uc(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,withinUse:!0,viewport:a?new g2(h,u):e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure,attributeState:Object.assign(Vd.default(),p)}),[4,e.refsHandler.getRendered(s,p,function(w){return t.renderReferencedNode(w,s,m)})]):[2];case 1:return y.sent(),e.pdf.saveGraphicsState(),e.pdf.setCurrentTransformationMatrix(e.transform),a&&Lt(A.element,e.styleSheets,"overflow")!=="visible"&&(e.pdf.rect(o,l,h,u),e.pdf.clip().discardPath()),e.pdf.doFormObject(e.refsHandler.generateKey(s,p),d),e.pdf.restoreGraphicsState(),[2]}})})},t.renderReferencedNode=function(e,r,i){return Ur(this,void 0,void 0,function(){var s;return Lr(this,function(A){switch(A.label){case 0:return s=[(s=e.getBoundingBox(i))[0]-.5*s[2],s[1]-.5*s[3],2*s[2],2*s[3]],i.pdf.beginFormObject(s[0],s[1],s[2],s[3],i.pdf.unitMatrix),e instanceof eU?[4,e.apply(i)]:[3,2];case 1:return A.sent(),[3,4];case 2:return[4,e.render(i)];case 3:A.sent(),A.label=4;case 4:return i.pdf.endFormObject(i.refsHandler.generateKey(r,i.attributeState)),[2]}})})},t.prototype.getBoundingBoxCore=function(e){return X0(this.element,e)},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(d2),L7=function(n){function t(e,r){return n.call(this,!1,e,r)||this}return br(t,n),t.prototype.getPath=function(e){var r=parseFloat(Lt(this.element,e.styleSheets,"width")||"0"),i=parseFloat(Lt(this.element,e.styleSheets,"height")||"0");if(!isFinite(r)||r<=0||!isFinite(i)||i<=0)return null;var s=Lt(this.element,e.styleSheets,"rx"),A=Lt(this.element,e.styleSheets,"ry"),a=Math.min(parseFloat(s||A||"0"),.5*r),o=Math.min(parseFloat(A||s||"0"),.5*i),l=parseFloat(Lt(this.element,e.styleSheets,"x")||"0"),h=parseFloat(Lt(this.element,e.styleSheets,"y")||"0"),u=4/3*(Math.SQRT2-1);return a===0&&o===0?new jd().moveTo(l,h).lineTo(l+r,h).lineTo(l+r,h+i).lineTo(l,h+i).close():new jd().moveTo(l+=a,h).lineTo(l+=r-2*a,h).curveTo(l+a*u,h,l+a,h+(o-o*u),l+=a,h+=o).lineTo(l,h+=i-2*o).curveTo(l,h+o*u,l-a*u,h+o,l-=a,h+=o).lineTo(l+=2*a-r,h).curveTo(l-a*u,h,l-a,h-o*u,l-=a,h-=o).lineTo(l,h+=2*o-i).curveTo(l,h-o*u,l+a*u,h-o,l+=a,h-=o).close()},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t}(J0),rU=function(n){function t(e,r){return n.call(this,!1,e,r)||this}return br(t,n),t.prototype.getPath=function(e){var r=this.getRx(e),i=this.getRy(e);if(!isFinite(r)||i<=0||!isFinite(i)||i<=0)return null;var s=parseFloat(Lt(this.element,e.styleSheets,"cx")||"0"),A=parseFloat(Lt(this.element,e.styleSheets,"cy")||"0"),a=4/3*(Math.SQRT2-1)*r,o=4/3*(Math.SQRT2-1)*i;return new jd().moveTo(s+r,A).curveTo(s+r,A-o,s+a,A-i,s,A-i).curveTo(s-a,A-i,s-r,A-o,s-r,A).curveTo(s-r,A+o,s-a,A+i,s,A+i).curveTo(s+a,A+i,s+r,A+o,s+r,A)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t}(J0),Q7=function(n){function t(e,r){return n.call(this,e,r)||this}return br(t,n),t.prototype.getRx=function(e){return parseFloat(Lt(this.element,e.styleSheets,"rx")||"0")},t.prototype.getRy=function(e){return parseFloat(Lt(this.element,e.styleSheets,"ry")||"0")},t}(rU);function iU(n){var t="invisible",e=n.stroke&&n.strokeWidth!==0,r=n.fill;return r&&e?t="fillThenStroke":r?t="fill":e&&(t="stroke"),t}function nU(n){return n.replace(/[\n\r]/g,"")}function sU(n){return n.replace(/[\t]/g," ")}function AU(n){return n.replace(/ +/g," ")}function aU(n,t,e){switch(Lt(n,e.styleSheets,"text-transform")){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();default:return t}}var F5=function(){function n(t,e,r,i){this.textNode=t,this.texts=[],this.textNodes=[],this.contexts=[],this.textAnchor=e,this.originX=r,this.originY=i,this.textMeasures=[]}return n.prototype.setX=function(t){this.originX=t},n.prototype.setY=function(t){this.originY=t},n.prototype.add=function(t,e,r){this.texts.push(e),this.textNodes.push(t),this.contexts.push(r)},n.prototype.rightTrimText=function(){for(var t=this.texts.length-1;t>=0;t--)if(this.contexts[t].attributeState.xmlSpace==="preserve"||this.contexts[t].attributeState.whiteSpace==="pre"||(this.texts[t]=this.texts[t].replace(/\s+$/,"")),this.texts[t].match(/[^\s]/))return!1;return!0},n.prototype.measureText=function(t){for(var e=0;e<this.texts.length;e++)this.textMeasures.push({width:t.textMeasure.measureTextWidth(this.texts[e],this.contexts[e].attributeState),length:this.texts[e].length})},n.prototype.put=function(t,e){var r,i,s,A,a=[],o=[],l=[],h=this.originX,u=this.originY,d=h,f=h;for(r=0;r<this.textNodes.length;r++){i=this.textNodes[r],s=this.contexts[r],A=this.textMeasures[r]||{width:t.textMeasure.measureTextWidth(this.texts[r],this.contexts[r].attributeState),length:this.texts[r].length};var p=h,m=u;if(i.nodeName!=="#text"&&!a.includes(i)){a.push(i);var y=n.resolveRelativePositionAttribute(i,"dx");y!==null&&(p+=el(y,s.attributeState.fontSize));var w=n.resolveRelativePositionAttribute(i,"dy");w!==null&&(m+=el(w,s.attributeState.fontSize))}o[r]=p,l[r]=m,h=p+A.width+A.length*e,u=m,d=Math.min(d,p),f=Math.max(f,h)}var B=0;switch(this.textAnchor){case"start":B=0;break;case"middle":B=(f-d)/2;break;case"end":B=f-d}for(r=0;r<this.textNodes.length;r++)if(i=this.textNodes[r],s=this.contexts[r],i.nodeName==="#text"||s.attributeState.visibility!=="hidden"){t.pdf.saveGraphicsState(),E5(s,t,i);var E=s.attributeState.alignmentBaseline,S=iU(s.attributeState);t.pdf.text(this.texts[r],o[r]-B,l[r],{baseline:$I(E),angle:t.transform,renderingMode:S==="fill"?void 0:S,charSpace:e===0?void 0:e}),t.pdf.restoreGraphicsState()}return[h,u]},n.resolveRelativePositionAttribute=function(t,e){for(var r,i=t;i&&Qc(i,"tspan");){if(i.hasAttribute(e))return i.getAttribute(e);if(((r=t.parentElement)===null||r===void 0?void 0:r.firstChild)!==t)break;i=i.parentElement}return null},n}(),N7=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.boundingBox=[],e}return br(t,n),t.prototype.processTSpans=function(e,r,i,s,A,a){for(var o=i.pdf.getFontSize(),l=i.attributeState.xmlSpace==="preserve"||i.attributeState.whiteSpace==="pre",h=!0,u=!1,d=0;d<r.childNodes.length;d++){var f=r.childNodes[d];if(f.textContent){var p=f.textContent;if(f.nodeName==="#text"){var m=nU(p);m=sU(m),l||(m=AU(m),h&&m.match(/^\s/)&&(u=!0),m.match(/[^\s]/)&&(h=!1),a.prevText.match(/\s$/)&&(m=m.replace(/^\s+/,"")));var y=aU(r,m,i);A.add(r,y,i),a.prevText=p,a.prevContext=i}else if(!Qc(f,"title")){if(Qc(f,"tspan")){var w=f,B=w.getAttribute("x");if(B!==null){var E=el(B,o);A=new F5(this,Lt(w,i.styleSheets,"text-anchor")||i.attributeState.textAnchor,E,0),s.push({type:"y",chunk:A})}var S=w.getAttribute("y");if(S!==null){var _=el(S,o);A=new F5(this,Lt(w,i.styleSheets,"text-anchor")||i.attributeState.textAnchor,0,_),s.push({type:"x",chunk:A})}var L=i.clone();x5(L,e,w),this.processTSpans(e,w,L,s,A,a)}}}}return u},t.prototype.renderCore=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,_,L,k,H,Q;return Lr(this,function(W){if(e.pdf.saveGraphicsState(),r=0,i=0,s=1,A=e.pdf.getFontSize(),a=el(this.element.getAttribute("x"),A),o=el(this.element.getAttribute("y"),A),l=el(this.element.getAttribute("dx"),A),h=el(this.element.getAttribute("dy"),A),u=parseFloat(this.element.getAttribute("textLength")||"0"),d=e.attributeState.visibility,this.element.childElementCount===0)f=this.element.textContent||"",p=function(U,D){return U=sU(U=nU(U)),D.xmlSpace==="preserve"||D.whiteSpace==="pre"||(U=AU(U=U.trim())),U}(f,e.attributeState),m=aU(this.element,p,e),r=e.textMeasure.getTextOffset(m,e.attributeState),u>0&&(y=e.textMeasure.measureTextWidth(m,e.attributeState),!(e.attributeState.xmlSpace==="preserve"||e.attributeState.whiteSpace==="pre")&&f.match(/^\s/)&&(s=0),i=(u-y)/(m.length-s)||0),d==="visible"&&(w=e.attributeState.alignmentBaseline,B=iU(e.attributeState),e.pdf.text(m,a+l-r,o+h,{baseline:$I(w),angle:e.transform,renderingMode:B==="fill"?void 0:B,charSpace:i===0?void 0:i}),this.boundingBox=[a+l-r,o+h+.1*A,e.textMeasure.measureTextWidth(m,e.attributeState),A]);else{for(E=[],S=new F5(this,e.attributeState.textAnchor,a+l,o+h),E.push({type:"",chunk:S}),_=this.processTSpans(this,this.element,e,E,S,{prevText:" ",prevContext:e}),s=_?0:1,L=!0,k=E.length-1;k>=0;k--)L&&(L=E[k].chunk.rightTrimText());u>0&&(H=0,Q=0,E.forEach(function(U){var D=U.chunk;D.measureText(e),D.textMeasures.forEach(function(j){var V=j.width,st=j.length;H+=V,Q+=st})}),i=(u-H)/(Q-s)),E.reduce(function(U,D){var j=D.type,V=D.chunk;return j==="x"?V.setX(U[0]):j==="y"&&V.setY(U[1]),V.put(e,i)},[0,0])}return e.pdf.restoreGraphicsState(),[2]})})},t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t.prototype.getBoundingBoxCore=function(e){return this.boundingBox.length>0?this.boundingBox:X0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(d2),P7=function(n){function t(e,r){return n.call(this,!0,e,r)||this}return br(t,n),t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t.prototype.getPath=function(e){var r,i,s=new B7(Lt(this.element,e.styleSheets,"d")||"").unshort().unarc().abs(),A=new jd;return s.iterate(function(a){switch(a[0]){case"M":A.moveTo(a[1],a[2]);break;case"L":A.lineTo(a[1],a[2]);break;case"H":A.lineTo(a[1],i);break;case"V":A.lineTo(r,a[1]);break;case"C":A.curveTo(a[1],a[2],a[3],a[4],a[5],a[6]);break;case"Q":var o=GI([r,i],[a[1],a[2]]),l=GI([a[3],a[4]],[a[1],a[2]]);A.curveTo(o[0],o[1],l[0],l[1],a[3],a[4]);break;case"Z":A.close()}switch(a[0]){case"M":case"L":r=a[1],i=a[2];break;case"H":r=a[1];break;case"V":i=a[1];break;case"C":r=a[5],i=a[6];break;case"Q":r=a[3],i=a[4]}}),A},t}(J0),M7=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,((?:.|\s)*)$/i,k7=function(n){function t(e,r){var i=n.call(this,e,r)||this;return i.imageLoadingPromise=null,i.imageUrl=i.element.getAttribute("xlink:href")||i.element.getAttribute("href"),i.imageUrl&&(i.imageLoadingPromise=t.fetchImageData(i.imageUrl)),i}return br(t,n),t.prototype.renderCore=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S;return Lr(this,function(_){switch(_.label){case 0:return this.imageLoadingPromise?(e.pdf.setCurrentTransformationMatrix(e.transform),r=parseFloat(Lt(this.element,e.styleSheets,"width")||"0"),i=parseFloat(Lt(this.element,e.styleSheets,"height")||"0"),s=parseFloat(Lt(this.element,e.styleSheets,"x")||"0"),A=parseFloat(Lt(this.element,e.styleSheets,"y")||"0"),!isFinite(r)||r<=0||!isFinite(i)||i<=0?[2]:[4,this.imageLoadingPromise]):[2];case 1:return a=_.sent(),o=a.data,(l=a.format).indexOf("svg")!==0?[3,3]:(h=new DOMParser,u=h.parseFromString(o,"image/svg+xml").firstElementChild,(!(d=this.element.getAttribute("preserveAspectRatio"))||d.indexOf("defer")<0||!u.getAttribute("preserveAspectRatio"))&&u.setAttribute("preserveAspectRatio",d||""),u.setAttribute("x",String(s)),u.setAttribute("y",String(A)),u.setAttribute("width",String(r)),u.setAttribute("height",String(i)),[4,T5(u,f={}).render(new Uc(e.pdf,{refsHandler:new HI(f),styleSheets:e.styleSheets,viewport:new g2(r,i),svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]);case 2:return _.sent(),[2];case 3:p="data:image/".concat(l,";base64,").concat(btoa(o)),_.label=4;case 4:return _.trys.push([4,6,,7]),[4,t.getImageDimensions(p)];case 5:return m=_.sent(),y=m[0],w=m[1],B=[0,0,y,w],E=q0(this.element,B,s,A,r,i,e),e.pdf.setCurrentTransformationMatrix(E),e.pdf.addImage(p,"",0,0,y,w),[3,7];case 6:return S=_.sent(),typeof console=="object"&&console.warn&&console.warn("Could not load image ".concat(this.imageUrl,`.
|
|
218
|
-
`).concat(S)),[3,7];case 7:return[2]}})})},t.prototype.getBoundingBoxCore=function(e){return X0(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t.fetchImageData=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a;return Lr(this,function(o){switch(o.label){case 0:if(!(s=e.match(M7)))return[3,1];if(A=s[2],(a=A.split("/"))[0]!=="image")throw new Error("Unsupported image URL: ".concat(e));return i=a[1],r=s[5],s[4]==="base64"?(r=r.replace(/\s/g,""),r=atob(r)):r=decodeURIComponent(r),[3,3];case 1:return[4,t.fetchImage(e)];case 2:r=o.sent(),i=e.substring(e.lastIndexOf(".")+1),o.label=3;case 3:return[2,{data:r,format:i}]}})})},t.fetchImage=function(e){return new Promise(function(r,i){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(){if(s.status!==200)throw new Error("Error ".concat(s.status,": Failed to load image '").concat(e,"'"));for(var A=new Uint8Array(s.response),a="",o=0;o<A.length;o++)a+=String.fromCharCode(A[o]);r(a)},s.onerror=i,s.onabort=i,s.send(null)})},t.getMimeType=function(e){switch(e=e.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";default:return"image/".concat(e)}},t.getImageDimensions=function(e){return new Promise(function(r,i){var s=new Image;s.onload=function(){r([s.width,s.height])},s.onerror=i,s.src=e})},t}(d2),oU=function(n){function t(e,r,i){var s=n.call(this,!0,r,i)||this;return s.closed=e,s}return br(t,n),t.prototype.getPath=function(e){if(!this.element.hasAttribute("points")||this.element.getAttribute("points")==="")return null;var r=t.parsePointsString(this.element.getAttribute("points")),i=new jd;if(r.length<1)return i;i.moveTo(r[0][0],r[0][1]);for(var s=1;s<r.length;s++)i.lineTo(r[s][0],r[s][1]);return this.closed&&i.close(),i},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.parsePointsString=function(e){for(var r=DA(e),i=[],s=0;s<r.length-1;s+=2){var A=r[s],a=r[s+1];i.push([A,a])}return i},t}(J0),O7=function(n){function t(e,r){return n.call(this,!0,e,r)||this}return br(t,n),t}(oU),D7=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.render=function(e){return Promise.resolve()},t.prototype.getBoundingBoxCore=function(e){return[0,0,0,0]},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return tl(this,e,r)},t}(C5),R7=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.apply=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a,o;return Lr(this,function(l){switch(l.label){case 0:r=this.computeNodeTransform(e),i=this.getBoundingBox(e),e.pdf.beginFormObject(i[0],i[1],i[2],i[3],r),s=Vd.getContextColors(e),function(h){var u=h.attributeState,d=h.pdf,f=1,p=1;f*=u.fillOpacity,f*=u.opacity,u.fill instanceof xn&&u.fill.color.a!==void 0&&(f*=u.fill.color.a),p*=u.strokeOpacity,p*=u.opacity,u.stroke instanceof xn&&u.stroke.color.a!==void 0&&(p*=u.stroke.color.a);var m,y={};if(y.opacity=f,y["stroke-opacity"]=p,d.setGState(new uu(y)),u.fill&&u.fill instanceof xn&&u.fill.color.ok?d.setFillColor(u.fill.color.r,u.fill.color.g,u.fill.color.b):d.setFillColor(0,0,0),d.setLineWidth(u.strokeWidth),u.stroke instanceof xn?d.setDrawColor(u.stroke.color.r,u.stroke.color.g,u.stroke.color.b):d.setDrawColor(0,0,0),d.setLineCap(u.strokeLinecap),d.setLineJoin(u.strokeLinejoin),u.strokeDasharray?d.setLineDashPattern(u.strokeDasharray,u.strokeDashoffset):d.setLineDashPattern([],0),d.setLineMiterLimit(u.strokeMiterlimit),m=rl.hasOwnProperty(u.fontFamily)?rl[u.fontFamily]:u.fontFamily,u.fill&&u.fill instanceof xn&&u.fill.color.ok){var w=u.fill.color;d.setTextColor(w.r,w.g,w.b)}else d.setTextColor(0,0,0);var B="";u.fontWeight==="bold"&&(B="bold"),u.fontStyle==="italic"&&(B+="italic"),B===""&&(B="normal"),m!==void 0||B!==void 0?(m===void 0&&(m=rl.hasOwnProperty(u.fontFamily)?rl[u.fontFamily]:u.fontFamily),d.setFont(m,B)):d.setFont("helvetica",B),d.setFontSize(u.fontSize*d.internal.scaleFactor)}(A=new Uc(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure,attributeState:Object.assign(Vd.default(),s)})),a=0,o=this.children,l.label=1;case 1:return a<o.length?[4,o[a].render(A)]:[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return e.pdf.endFormObject(A.refsHandler.generateKey(this.element.getAttribute("id"),s)),[2]}})})},t.prototype.getBoundingBoxCore=function(e){var r,i=this.element.getAttribute("viewBox");return i&&(r=DA(i)),[r&&r[0]||0,r&&r[1]||0,r&&r[2]||parseFloat(this.element.getAttribute("markerWidth")||"3"),r&&r[3]||parseFloat(this.element.getAttribute("markerHeight")||"3")]},t.prototype.computeNodeTransformCore=function(e){var r,i=parseFloat(this.element.getAttribute("refX")||"0"),s=parseFloat(this.element.getAttribute("refY")||"0"),A=this.element.getAttribute("viewBox");if(A){var a=DA(A);r=q0(this.element,a,0,0,parseFloat(this.element.getAttribute("markerWidth")||"3"),parseFloat(this.element.getAttribute("markerHeight")||"3"),e,!0),r=e.pdf.matrixMult(e.pdf.Matrix(1,0,0,1,-i,-s),r)}else r=e.pdf.Matrix(1,0,0,1,-i,-s);return r},t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t}(Y0),H7=function(n){function t(e,r){return n.call(this,e,r)||this}return br(t,n),t.prototype.getR=function(e){var r;return(r=this.r)!==null&&r!==void 0?r:this.r=parseFloat(Lt(this.element,e.styleSheets,"r")||"0")},t.prototype.getRx=function(e){return this.getR(e)},t.prototype.getRy=function(e){return this.getR(e)},t}(rU),K7=function(n){function t(e,r){return n.call(this,!1,e,r)||this}return br(t,n),t}(oU),lU=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.renderCore=function(e){return Ur(this,void 0,void 0,function(){var r,i;return Lr(this,function(s){switch(s.label){case 0:r=0,i=this.children,s.label=1;case 1:return r<i.length?[4,i[r].render(e)]:[3,4];case 2:s.sent(),s.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},t.prototype.getBoundingBoxCore=function(e){return B5(e,this)},t}(tU),V7=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t.prototype.render=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a;return Lr(this,function(o){switch(o.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?(r=this.getX(e),i=this.getY(e),s=this.getWidth(e),A=this.getHeight(e),e.pdf.saveGraphicsState(),a=e.transform,this.element.hasAttribute("transform")&&(a=e.pdf.matrixMult(f2(this.element.getAttribute("transform"),e),a)),e.pdf.setCurrentTransformationMatrix(a),e.withinUse||Lt(this.element,e.styleSheets,"overflow")==="visible"||e.pdf.rect(r,i,s,A).clip().discardPath(),[4,n.prototype.render.call(this,e.clone({transform:e.pdf.unitMatrix,viewport:e.withinUse?e.viewport:new g2(s,A)}))]):[2];case 1:return o.sent(),e.pdf.restoreGraphicsState(),[2]}})})},t.prototype.computeNodeTransform=function(e){return this.computeNodeTransformCore(e)},t.prototype.computeNodeTransformCore=function(e){if(e.withinUse)return e.pdf.unitMatrix;var r,i=this.getX(e),s=this.getY(e),A=this.getViewBox();if(A){var a=this.getWidth(e),o=this.getHeight(e);r=q0(this.element,A,i,s,a,o,e)}else r=e.pdf.Matrix(1,0,0,1,i,s);return r},t.prototype.getWidth=function(e){if(this.width!==void 0)return this.width;var r,i,s=e.svg2pdfParameters;if(this.isOutermostSvg(e))if(s.width!=null)r=s.width;else if(i=Lt(this.element,e.styleSheets,"width"))r=parseFloat(i);else{var A=this.getViewBox();if(A&&(s.height!=null||Lt(this.element,e.styleSheets,"height"))){var a=A[2]/A[3];r=this.getHeight(e)*a}else r=Math.min(300,e.viewport.width,2*e.viewport.height)}else r=(i=Lt(this.element,e.styleSheets,"width"))?parseFloat(i):e.viewport.width;return this.width=r},t.prototype.getHeight=function(e){if(this.height!==void 0)return this.height;var r,i,s=e.svg2pdfParameters;if(this.isOutermostSvg(e))if(s.height!=null)r=s.height;else if(i=Lt(this.element,e.styleSheets,"height"))r=parseFloat(i);else{var A=this.getViewBox();if(A){var a=A[2]/A[3];r=this.getWidth(e)/a}else r=Math.min(150,e.viewport.width/2,e.viewport.height)}else r=(i=Lt(this.element,e.styleSheets,"height"))?parseFloat(i):e.viewport.height;return this.height=r},t.prototype.getX=function(e){if(this.x!==void 0)return this.x;if(this.isOutermostSvg(e))return this.x=0;var r=Lt(this.element,e.styleSheets,"x");return this.x=r?parseFloat(r):0},t.prototype.getY=function(e){if(this.y!==void 0)return this.y;if(this.isOutermostSvg(e))return this.y=0;var r=Lt(this.element,e.styleSheets,"y");return this.y=r?parseFloat(r):0},t.prototype.getViewBox=function(){if(this.viewBox!==void 0)return this.viewBox;var e=this.element.getAttribute("viewBox");return this.viewBox=e?DA(e):void 0},t.prototype.isOutermostSvg=function(e){return e.svg2pdfParameters.element===this.element},t}(lU),cU=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(lU),G7=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.renderCore=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A;return Lr(this,function(a){switch(a.label){case 0:return[4,n.prototype.renderCore.call(this,e)];case 1:return a.sent(),(r=Lt(this.element,e.styleSheets,"href"))&&(i=this.getBoundingBox(e),s=e.pdf.internal.scaleFactor,A=e.pdf.internal.pageSize.getHeight(),e.pdf.link(s*(i[0]*e.transform.sx+e.transform.tx),A-s*(i[1]*e.transform.sy+e.transform.ty),s*i[2],s*i[3],{url:r})),[2]}})})},t}(cU),j7=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return br(t,n),t.prototype.apply=function(e){return Ur(this,void 0,void 0,function(){var r,i,s,A,a;return Lr(this,function(o){switch(o.label){case 0:if(!this.isVisible(!0,e))return[2];r=e.pdf.matrixMult(this.computeNodeTransform(e),e.transform),e.pdf.setCurrentTransformationMatrix(r),i=0,s=this.children,o.label=1;case 1:return i<s.length?[4,s[i].render(new Uc(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,withinClipPath:!0,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return i++,[3,1];case 4:return A=this.children.length>0&&!!Lt(this.children[0].element,e.styleSheets,"clip-rule"),a=A?this.getClipRuleAttr(this.children[0].element,e.styleSheets):this.getClipRuleAttr(this.element,e.styleSheets),e.pdf.clip(a).discardPath(),e.pdf.setCurrentTransformationMatrix(r.inversed()),[2]}})})},t.prototype.getBoundingBoxCore=function(e){return B5(e,this)},t.prototype.isVisible=function(e,r){return Nc(this,e,r)},t.prototype.getClipRuleAttr=function(e,r){return Lt(e,r,"clip-rule")==="evenodd"?"evenodd":void 0},t}(Y0);function T5(n,t){var e,r=[];switch(function(s,A){for(var a=[],o=0;o<s.childNodes.length;o++){var l=s.childNodes[o];l.nodeName.charAt(0)!=="#"&&a.push(l)}for(o=0;o<a.length;o++)A(o,a[o])}(n,function(s,A){return r.push(T5(A,t))}),n.tagName.toLowerCase()){case"a":e=new G7(n,r);break;case"g":e=new cU(n,r);break;case"circle":e=new H7(n,r);break;case"clippath":e=new j7(n,r);break;case"ellipse":e=new Q7(n,r);break;case"lineargradient":e=new XI(n,r);break;case"image":e=new k7(n,r);break;case"line":e=new I7(n,r);break;case"marker":e=new R7(n,r);break;case"path":e=new P7(n,r);break;case"pattern":e=new YI(n,r);break;case"polygon":e=new O7(n,r);break;case"polyline":e=new K7(n,r);break;case"radialgradient":e=new qI(n,r);break;case"rect":e=new L7(n,r);break;case"svg":e=new V7(n,r);break;case"symbol":e=new eU(n,r);break;case"text":e=new N7(n,r);break;case"use":e=new U7(n,r);break;default:e=new D7(n,r)}if(t!=null&&e.element.hasAttribute("id")){var i=LI(e.element.id,{isIdentifier:!0});t[i]=t[i]||e}return e.children.forEach(function(s){return s.setParent(e)}),e}var $7=function(){function n(t,e){this.rootSvg=t,this.loadExternalSheets=e,this.styleSheets=[]}return n.prototype.load=function(){return Ur(this,void 0,void 0,function(){var t;return Lr(this,function(e){switch(e.label){case 0:return[4,this.collectStyleSheetTexts()];case 1:return t=e.sent(),this.parseCssSheets(t),[2]}})})},n.prototype.collectStyleSheetTexts=function(){return Ur(this,void 0,void 0,function(){var t,e,r,i,s;return Lr(this,function(A){switch(A.label){case 0:if(t=[],this.loadExternalSheets&&this.rootSvg.ownerDocument)for(i=0;i<this.rootSvg.ownerDocument.childNodes.length;i++)(e=this.rootSvg.ownerDocument.childNodes[i]).nodeName==="xml-stylesheet"&&typeof e.data=="string"&&t.push(n.loadSheet(e.data.match(/href=["'].*?["']/)[0].split("=")[1].slice(1,-1)));for(r=this.rootSvg.querySelectorAll("style,link"),i=0;i<r.length;i++)Qc(s=r[i],"style")?t.push(s.textContent):this.loadExternalSheets&&Qc(s,"link")&&s.getAttribute("rel")==="stylesheet"&&s.hasAttribute("href")&&t.push(n.loadSheet(s.getAttribute("href")));return[4,Promise.all(t)];case 1:return[2,A.sent().filter(function(a){return a!==null})]}})})},n.prototype.parseCssSheets=function(t){for(var e=document.implementation.createHTMLDocument(""),r=0,i=t;r<i.length;r++){var s=i[r],A=e.createElement("style");A.textContent=s,e.body.appendChild(A);var a=A.sheet;if(a instanceof CSSStyleSheet){for(var o=a.cssRules.length-1;o>=0;o--){var l=a.cssRules[o];if(l instanceof CSSStyleRule){var h=l;if(h.selectorText.indexOf(",")>=0){a.deleteRule(o);for(var u=h.cssText.substring(h.selectorText.length),d=n.splitSelectorAtCommas(h.selectorText),f=0;f<d.length;f++)a.insertRule(d[f]+u,o+f)}}else a.deleteRule(o)}this.styleSheets.push(a)}}},n.splitSelectorAtCommas=function(t){for(var e,r=/,|["']/g,i=/[^\\]["]/g,s=/[^\\][']/g,A=[],a="initial",o=-1,l=i,h=0;h<t.length;)switch(a){case"initial":r.lastIndex=h,(e=r.exec(t))?(e[0]===","?(A.push(t.substring(o+1,r.lastIndex-1).trim()),o=r.lastIndex-1):(a="withinQuotes",l=e[0]==='"'?i:s),h=r.lastIndex):(A.push(t.substring(o+1).trim()),h=t.length);break;case"withinQuotes":l.lastIndex=h,(e=l.exec(t))&&(h=l.lastIndex,a="initial")}return A},n.loadSheet=function(t){return new Promise(function(e,r){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="text",i.onload=function(){i.status!==200&&r(new Error("Error ".concat(i.status,": Failed to load '").concat(t,"'"))),e(i.responseText)},i.onerror=r,i.onabort=r,i.send(null)}).catch(function(){return null})},n.prototype.getPropertyValue=function(t,e){for(var r=[],i=0,s=this.styleSheets;i<s.length;i++)for(var A=s[i],a=0;a<A.cssRules.length;a++){var o=A.cssRules[a];o.style.getPropertyValue(e)&&t.matches(o.selectorText)&&r.push(o)}if(r.length!==0)return r.reduce(function(l,h){return d=h,((f=(u=l).style.getPropertyPriority(e))!==d.style.getPropertyPriority(e)?f==="important"?1:-1:C7(u.selectorText,d.selectorText))===1?l:h;var u,d,f}).style.getPropertyValue(e)||void 0},n}(),W7=function(){function n(){this.measureMethods={}}return n.prototype.getTextOffset=function(t,e){var r=e.textAnchor;if(r==="start")return 0;var i=this.measureTextWidth(t,e),s=0;switch(r){case"end":s=i;break;case"middle":s=i/2}return s},n.prototype.measureTextWidth=function(t,e){if(t.length===0)return 0;var r=e.fontFamily;return this.getMeasureFunction(r).call(this,t,e.fontFamily,e.fontSize+"px",e.fontStyle,e.fontWeight)},n.prototype.getMeasurementTextNode=function(){if(!this.textMeasuringTextElement){this.textMeasuringTextElement=document.createElementNS(jI,"text");var t=document.createElementNS(jI,"svg");t.appendChild(this.textMeasuringTextElement),t.style.setProperty("position","absolute"),t.style.setProperty("visibility","hidden"),document.body.appendChild(t)}return this.textMeasuringTextElement},n.prototype.canvasTextMeasure=function(t,e,r,i,s){var A=document.createElement("canvas").getContext("2d");return A!=null?(A.font=[i,s,r,e].join(" "),A.measureText(t).width):0},n.prototype.svgTextMeasure=function(t,e,r,i,s,A){A===void 0&&(A=this.getMeasurementTextNode());var a=A;return a.setAttribute("font-family",e),a.setAttribute("font-size",r),a.setAttribute("font-style",i),a.setAttribute("font-weight",s),a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.textContent=t,a.getBBox().width},n.prototype.getMeasureFunction=function(t){var e=this.measureMethods[t];if(!e){var r="16px",i="normal",s="normal",A=this.canvasTextMeasure(n.testString,t,r,i,s),a=this.svgTextMeasure(n.testString,t,r,i,s);e=Math.abs(A-a)<n.epsilon?this.canvasTextMeasure:this.svgTextMeasure,this.measureMethods[t]=e}return e},n.prototype.cleanupTextMeasuring=function(){if(this.textMeasuringTextElement){var t=this.textMeasuringTextElement.parentNode;t&&document.body.removeChild(t),this.textMeasuringTextElement=void 0}},n.testString=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!"$%&/()=?'\\+*-_.:,;^}][{#~|<>`,n.epsilon=.1,n}();function hU(n,t){return Ur(this,arguments,void 0,function(e,r,i){var s,A,a,o,l,h,u,d,f,p,m,y,w,B;return i===void 0&&(i={}),Lr(this,function(E){switch(E.label){case 0:return s=(y=i.x)!==null&&y!==void 0?y:0,A=(w=i.y)!==null&&w!==void 0?w:0,a=(B=i.loadExternalStyleSheets)!==null&&B!==void 0&&B,l=new HI(o={}),[4,(h=new $7(e,a)).load()];case 1:return E.sent(),u=new g2(r.internal.pageSize.getWidth(),r.internal.pageSize.getHeight()),d=h2(h2({},i),{element:e}),f=new W7,p=new Uc(r,{refsHandler:l,styleSheets:h,viewport:u,svg2pdfParameters:d,textMeasure:f}),r.advancedAPI(),r.saveGraphicsState(),r.setCurrentTransformationMatrix(r.Matrix(1,0,0,1,s,A)),r.setLineWidth(p.attributeState.strokeWidth),m=p.attributeState.fill.color,r.setFillColor(m.r,m.g,m.b),r.setFont(p.attributeState.fontFamily),r.setFontSize(p.attributeState.fontSize*r.internal.scaleFactor),[4,T5(e,o).render(p)];case 2:return E.sent(),r.restoreGraphicsState(),r.compatAPI(),p.textMeasure.cleanupTextMeasuring(),[2,r]}})})}le.API.svg=function(n,t){return t===void 0&&(t={}),hU(n,this,t)};class uU{async convert(t){const e=await this.buildSvg(t),r=Ye.resolveExportDownloadName(t.doc.fileName||t.doc.docTitle,"pdf");await this.downloadAsPdf(e,r)}async buildSvg(t){ci.AcSvgRenderer.prepareExport();const e=t.doc.database.tables.blockTable.modelSpace.newIterator(),r=new ci.AcSvgRenderer;this.configureRenderer(r,t);for(const i of e)i.worldDraw(r);return r.exportAsync()}configureRenderer(t,e){const r=e.doc.database;t.ltscale=r.ltscale,t.celtscale=r.celtscale,t.showLineWeight=!!r.lwdisplay,t.setFontMapping(Ye.AcApSettingManager.instance.fontMapping);const i=e.view,s=(i==null?void 0:i.backgroundColor)??16777215;t.currentBackgroundColor=s,t.changeForeground(s===0?16777215:0)}async downloadAsPdf(t,e){var u;const s=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,A=(u=s.getAttribute("viewBox"))==null?void 0:u.split(" ").map(Number),a=A&&A.length===4?Math.abs(A[2]):297,o=A&&A.length===4?Math.abs(A[3]):210,l=a>=o?"landscape":"portrait",h=new le({orientation:l,unit:"mm",format:[a,o]});await hU(s,h,{x:0,y:0,width:a,height:o}),h.save(e)}}class fU extends Ye.AcEdCommand{async execute(t){await new uU().convert(t)}}const rA=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),il=[1/0,1/0,-1/0,-1/0],mu=new Float32Array(il),_5=[.001,0,0,.001,0,0],I5=1.35,iA={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},nl={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Z0="pdfjs_internal_editor_",Be={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},Ie={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,INK_COLOR_AND_OPACITY:24,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},dU={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ji={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},tm={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Fi={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},Wd={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},em={ERRORS:0,WARNINGS:1,INFOS:5},ao={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},rm={moveTo:0,lineTo:1,curveTo:2,quadraticCurveTo:3,closePath:4},gU={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let p2=em.WARNINGS;function z7(n){Number.isInteger(n)&&(p2=n)}function X7(){return p2}function m2(n){p2>=em.INFOS&&console.info(`Info: ${n}`)}function Ue(n){p2>=em.WARNINGS&&console.warn(`Warning: ${n}`)}function lr(n){throw new Error(n)}function ni(n,t){n||lr(t)}function q7(n){switch(n==null?void 0:n.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function U5(n,t=null,e=null){if(!n)return null;if(e&&typeof n=="string"){if(e.addDefaultProtocol&&n.startsWith("www.")){const i=n.match(/\./g);(i==null?void 0:i.length)>=2&&(n=`http://${n}`)}if(e.tryConvertEncoding)try{n=tK(n)}catch{}}const r=t?URL.parse(n,t):URL.parse(n);return q7(r)?r:null}function L5(n,t,e=!1){const r=URL.parse(n);return r?(r.hash=t,r.href):e&&U5(n,"http://example.com")?n.split("#",1)[0]+`${t?`#${t}`:""}`:""}function Q5(n){return n.substring(n.lastIndexOf("/")+1)}function Se(n,t,e,r=!1){return Object.defineProperty(n,t,{value:e,enumerable:!r,configurable:!0,writable:!1}),e}const vu=function(){function t(e,r){this.message=e,this.name=r}return t.prototype=new Error,t.constructor=t,t}();class pU extends vu{constructor(t,e){super(t,"PasswordException"),this.code=e}}class N5 extends vu{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class v2 extends vu{constructor(t){super(t,"InvalidPDFException")}}class im extends vu{constructor(t,e,r){super(t,"ResponseException"),this.status=e,this.missing=r}}class Y7 extends vu{constructor(t){super(t,"FormatError")}}class sl extends vu{constructor(t){super(t,"AbortException")}}function J7(n){(typeof n!="object"||(n==null?void 0:n.length)===void 0)&&lr("Invalid argument for bytesToString");const t=n.length,e=8192;if(t<e)return String.fromCharCode.apply(null,n);const r=[];for(let i=0;i<t;i+=e){const s=Math.min(i+e,t),A=n.subarray(i,s);r.push(String.fromCharCode.apply(null,A))}return r.join("")}function w2(n){typeof n!="string"&&lr("Invalid argument for stringToBytes");const t=n.length,e=new Uint8Array(t);for(let r=0;r<t;++r)e[r]=n.charCodeAt(r)&255;return e}function Z7(){const n=new Uint8Array(4);return n[0]=1,new Uint32Array(n.buffer,0,1)[0]===1}class Ti{static get isLittleEndian(){return Se(this,"isLittleEndian",Z7())}static get isOffscreenCanvasSupported(){return Se(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return Se(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get isFloat16ArraySupported(){return Se(this,"isFloat16ArraySupported",typeof Float16Array<"u")}static get isSanitizerSupported(){return Se(this,"isSanitizerSupported",typeof Sanitizer<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return Se(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return Se(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}static get isAlphaColorInputSupported(){return Se(this,"isAlphaColorInputSupported",(()=>{if(typeof document>"u")return!1;const t=document.createElement("input");return t.type="color",t.setAttribute("alpha",""),t.value="#ff000080",t.value!=="#ff0000"})())}}class Qt{static get hexNums(){return Se(this,"hexNums",Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")))}static makeHexColor(t,e,r){return`#${this.hexNums[t]}${this.hexNums[e]}${this.hexNums[r]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let r;t[0]?(t[0]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[3],e[3]*=t[3]):(r=e[0],e[0]=e[1],e[1]=r,r=e[2],e[2]=e[3],e[3]=r,t[1]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,r=0){const i=t[r],s=t[r+1];t[r]=i*e[0]+s*e[2]+e[4],t[r+1]=i*e[1]+s*e[3]+e[5]}static applyTransformToBezier(t,e,r=0){const i=e[0],s=e[1],A=e[2],a=e[3],o=e[4],l=e[5];for(let h=0;h<6;h+=2){const u=t[r+h],d=t[r+h+1];t[r+h]=u*i+d*A+o,t[r+h+1]=u*s+d*a+l}}static applyInverseTransform(t,e){const r=t[0],i=t[1],s=e[0]*e[3]-e[1]*e[2];t[0]=(r*e[3]-i*e[2]+e[2]*e[5]-e[4]*e[3])/s,t[1]=(-r*e[1]+i*e[0]+e[4]*e[1]-e[5]*e[0])/s}static axialAlignedBoundingBox(t,e,r){const i=e[0],s=e[1],A=e[2],a=e[3],o=e[4],l=e[5],h=t[0],u=t[1],d=t[2],f=t[3];let p=i*h+o,m=p,y=i*d+o,w=y,B=a*u+l,E=B,S=a*f+l,_=S;if(s!==0||A!==0){const L=s*h,k=s*d,H=A*u,Q=A*f;p+=H,w+=H,y+=Q,m+=Q,B+=L,_+=L,S+=k,E+=k}r[0]=Math.min(r[0],p,y,m,w),r[1]=Math.min(r[1],B,S,E,_),r[2]=Math.max(r[2],p,y,m,w),r[3]=Math.max(r[3],B,S,E,_)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const r=t[0],i=t[1],s=t[2],A=t[3],a=r**2+i**2,o=r*s+i*A,l=s**2+A**2,h=(a+l)/2,u=Math.sqrt(h**2-(a*l-o**2));e[0]=Math.sqrt(h+u||1),e[1]=Math.sqrt(h-u||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>i)return null;const s=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),A=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return s>A?null:[r,s,i,A]}static pointBoundingBox(t,e,r){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}static rectBoundingBox(t,e,r,i,s){s[0]=Math.min(s[0],t,r),s[1]=Math.min(s[1],e,i),s[2]=Math.max(s[2],t,r),s[3]=Math.max(s[3],e,i)}static bezierBoundingBox(t,e,r,i,s,A,a,o,l){l[0]=Math.min(l[0],t,a),l[1]=Math.min(l[1],e,o),l[2]=Math.max(l[2],t,a),l[3]=Math.max(l[3],e,o),I(this,yl,T4).call(this,t,r,s,a,e,i,A,o,3*(-t+3*(r-s)+a),6*(t-2*r+s),3*(r-t),l),I(this,yl,T4).call(this,t,r,s,a,e,i,A,o,3*(-e+3*(i-A)+o),6*(e-2*i+A),3*(i-e),l)}}yl=new WeakSet,zB=function(t,e,r,i,s,A,a,o,l,h){if(l<=0||l>=1)return;const u=1-l,d=l*l,f=d*l,p=u*(u*(u*t+3*l*e)+3*d*r)+f*i,m=u*(u*(u*s+3*l*A)+3*d*a)+f*o;h[0]=Math.min(h[0],p),h[1]=Math.min(h[1],m),h[2]=Math.max(h[2],p),h[3]=Math.max(h[3],m)},T4=function(t,e,r,i,s,A,a,o,l,h,u,d){if(Math.abs(l)<1e-12){Math.abs(h)>=1e-12&&I(this,yl,zB).call(this,t,e,r,i,s,A,a,o,-u/h,d);return}const f=h**2-4*u*l;if(f<0)return;const p=Math.sqrt(f),m=2*l;I(this,yl,zB).call(this,t,e,r,i,s,A,a,o,(-h+p)/m,d),I(this,yl,zB).call(this,t,e,r,i,s,A,a,o,(-h-p)/m,d)},T(Qt,yl);function tK(n){return decodeURIComponent(escape(n))}let P5=null,mU=null;function vU(n){return P5||(P5=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,mU=new Map([["ſt","ſt"]])),n.replaceAll(P5,(t,e,r)=>e?e.normalize("NFKC"):mU.get(r))}function M5(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const n=new Uint8Array(32);return crypto.getRandomValues(n),J7(n)}const zd="pdfjs_internal_id_";function eK(n,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[r,i,...s]=e;if(!n(r)&&!Number.isInteger(r)||!t(i))return!1;const A=s.length;let a=!0;switch(i.name){case"XYZ":if(A<2||A>3)return!1;break;case"Fit":case"FitB":return A===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(A>1)return!1;break;case"FitR":if(A!==4)return!1;a=!1;break;default:return!1}for(const o of s)if(!(typeof o=="number"||a&&o===null))return!1;return!0}const y2=()=>[],b2=()=>new Map,B2=()=>Object.create(null);function Gr(n,t,e){return Math.min(Math.max(n,t),e)}class nm{static textContent(t){const e=[],r={items:e,styles:Object.create(null)};function i(s){var o;if(!s)return;let A=null;const a=s.name;if(a==="#text")A=s.value;else if(nm.shouldBuildText(a))(o=s==null?void 0:s.attributes)!=null&&o.textContent?A=s.attributes.textContent:s.value&&(A=s.value);else return;if(A!==null&&e.push({str:A}),!!s.children)for(const l of s.children)i(l)}return i(t),r}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}class k5{static setupStorage(t,e,r,i,s){const A=i.getValue(e,{value:null});switch(r.name){case"textarea":if(A.value!==null&&(t.textContent=A.value),s==="print")break;t.addEventListener("input",a=>{i.setValue(e,{value:a.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(A.value===r.attributes.xfaOn?t.setAttribute("checked",!0):A.value===r.attributes.xfaOff&&t.removeAttribute("checked"),s==="print")break;t.addEventListener("change",a=>{i.setValue(e,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})})}else{if(A.value!==null&&t.setAttribute("value",A.value),s==="print")break;t.addEventListener("input",a=>{i.setValue(e,{value:a.target.value})})}break;case"select":if(A.value!==null){t.setAttribute("value",A.value);for(const a of r.children)a.attributes.value===A.value?a.attributes.selected=!0:Object.hasOwn(a.attributes,"selected")&&delete a.attributes.selected}t.addEventListener("input",a=>{const o=a.target.options,l=o.selectedIndex===-1?"":o[o.selectedIndex].value;i.setValue(e,{value:l})});break}}static setAttributes({html:t,element:e,storage:r=null,intent:i,linkService:s}){const{attributes:A}=e,a=t instanceof HTMLAnchorElement;A.type==="radio"&&(A.name=`${A.name}-${i}`);for(const[o,l]of Object.entries(A))if(l!=null)switch(o){case"class":l.length&&t.setAttribute(o,l.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",l);break;case"style":Object.assign(t.style,l);break;case"textContent":t.textContent=l;break;default:(!a||o!=="href"&&o!=="newWindow")&&t.setAttribute(o,l)}a&&s.addLinkAttributes(t,A.href,A.newWindow),r&&A.dataId&&this.setupStorage(t,A.dataId,e,r)}static render(t){var u,d;const e=t.annotationStorage,r=t.linkService,i=t.xfaHtml,s=t.intent||"display",A=document.createElement(i.name);i.attributes&&this.setAttributes({html:A,element:i,intent:s,linkService:r});const a=s!=="richText",o=t.div;if(o.append(A),t.viewport){const f=`matrix(${t.viewport.transform.join(",")})`;o.style.transform=f}a&&o.setAttribute("class","xfaLayer xfaFont");const l=[];if(i.children.length===0){if(i.value){const f=document.createTextNode(i.value);A.append(f),a&&nm.shouldBuildText(i.name)&&l.push(f)}return{textDivs:l}}const h=[[i,-1,A]];for(;h.length>0;){const[f,p,m]=h.at(-1);if(p+1===f.children.length){h.pop();continue}const y=f.children[++h.at(-1)[1]];if(y===null)continue;const{name:w}=y;if(w==="#text"){const E=document.createTextNode(y.value);l.push(E),m.append(E);continue}const B=(u=y==null?void 0:y.attributes)!=null&&u.xmlns?document.createElementNS(y.attributes.xmlns,w):document.createElement(w);if(m.append(B),y.attributes&&this.setAttributes({html:B,element:y,storage:e,intent:s,linkService:r}),((d=y.children)==null?void 0:d.length)>0)h.push([y,-1,B]);else if(y.value){const E=document.createTextNode(y.value);a&&nm.shouldBuildText(w)&&l.push(E),B.append(E)}}for(const f of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))f.setAttribute("readOnly",!0);return{textDivs:l}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const Al="http://www.w3.org/2000/svg",Du=class Du{};ct(Du,"CSS",96),ct(Du,"PDF",72),ct(Du,"PDF_TO_CSS_UNITS",Du.CSS/Du.PDF);let al=Du;async function C2(n,t="text"){if(am(n,document.baseURI)){const e=await fetch(n);if(!e.ok)throw new Error(e.statusText);switch(t){case"blob":return e.blob();case"bytes":return e.bytes();case"json":return e.json()}return e.text()}return new Promise((e,r)=>{const i=new XMLHttpRequest;i.open("GET",n,!0),i.responseType=t==="bytes"?"arraybuffer":t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"bytes":e(new Uint8Array(i.response));return;case"blob":case"json":e(i.response);return}e(i.responseText);return}r(new Error(i.statusText))}},i.send(null)})}class sm{constructor({viewBox:t,userUnit:e,scale:r,rotation:i,offsetX:s=0,offsetY:A=0,dontFlip:a=!1}){this.viewBox=t,this.userUnit=e,this.scale=r,this.rotation=i,this.offsetX=s,this.offsetY=A,r*=e;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let h,u,d,f;switch(i%=360,i<0&&(i+=360),i){case 180:h=-1,u=0,d=0,f=1;break;case 90:h=0,u=1,d=1,f=0;break;case 270:h=0,u=-1,d=-1,f=0;break;case 0:h=1,u=0,d=0,f=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(d=-d,f=-f);let p,m,y,w;h===0?(p=Math.abs(l-t[1])*r+s,m=Math.abs(o-t[0])*r+A,y=(t[3]-t[1])*r,w=(t[2]-t[0])*r):(p=Math.abs(o-t[0])*r+s,m=Math.abs(l-t[1])*r+A,y=(t[2]-t[0])*r,w=(t[3]-t[1])*r),this.transform=[h*r,u*r,d*r,f*r,p-h*r*o-d*r*l,m-u*r*o-f*r*l],this.width=y,this.height=w}get rawDims(){const t=this.viewBox;return Se(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:s=!1}={}){return new sm({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:r,offsetY:i,dontFlip:s})}convertToViewportPoint(t,e){const r=[t,e];return Qt.applyTransform(r,this.transform),r}convertToViewportRectangle(t){const e=[t[0],t[1]];Qt.applyTransform(e,this.transform);const r=[t[2],t[3]];return Qt.applyTransform(r,this.transform),[e[0],e[1],r[0],r[1]]}convertToPdfPoint(t,e){const r=[t,e];return Qt.applyInverseTransform(r,this.transform),r}}class x2 extends vu{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function Am(n){const t=n.length;let e=0;for(;e<t&&n[e].trim()==="";)e++;return n.substring(e,e+5).toLowerCase()==="data:"}function E2(n){return typeof n=="string"&&/\.pdf$/i.test(n)}function wU(n){return[n]=n.split(/[#?]/,1),Q5(n)}function yU(n,t="document.pdf"){if(typeof n!="string")return t;if(Am(n))return Ue('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const r=(a=>{try{return new URL(a)}catch{try{return new URL(decodeURIComponent(a))}catch{try{return new URL(a,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(a),"https://foo.bar")}catch{return null}}}}})(n);if(!r)return t;const i=a=>{try{let o=decodeURIComponent(a);return o.includes("/")&&(o=Q5(o),/^\.pdf$/i.test(o))?a:o}catch{return a}},s=/\.pdf$/i,A=Q5(r.pathname);if(s.test(A))return i(A);if(r.searchParams.size>0){const a=l=>[...l].findLast(h=>s.test(h)),o=a(r.searchParams.values())??a(r.searchParams.keys());if(o)return i(o)}if(r.hash){const o=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(r.hash);if(o)return i(o[0])}return t}class bU{constructor(){T(this,Yc,new Map);ct(this,"times",[])}time(t){c(this,Yc).has(t)&&Ue(`Timer is already running for ${t}`),c(this,Yc).set(t,Date.now())}timeEnd(t){c(this,Yc).has(t)||Ue(`Timer has not been started for ${t}`),this.times.push({name:t,start:c(this,Yc).get(t),end:Date.now()}),c(this,Yc).delete(t)}toString(){const t=Math.max(...this.times.map(e=>e.name.length));return this.times.map(e=>`${e.name.padEnd(t)} ${e.end-e.start}ms
|
|
219
|
-
`).join("")}}Yc=new WeakMap;function am(n,t){const e=t?URL.parse(n,t):URL.parse(n);return/https?:/.test((e==null?void 0:e.protocol)??"")}function nA(n){n.preventDefault()}function Jr(n){n.preventDefault(),n.stopPropagation()}function rK(n){console.log("Deprecated API usage: "+n)}class om{static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;c(this,gv)||C(this,gv,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=c(this,gv).exec(t);if(!e)return null;const r=parseInt(e[1],10);let i=parseInt(e[2],10);i=i>=1&&i<=12?i-1:0;let s=parseInt(e[3],10);s=s>=1&&s<=31?s:1;let A=parseInt(e[4],10);A=A>=0&&A<=23?A:0;let a=parseInt(e[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(e[6],10);o=o>=0&&o<=59?o:0;const l=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,l==="-"?(A+=h,a+=u):l==="+"&&(A-=h,a-=u),new Date(Date.UTC(r,i,s,A,a,o))}}gv=new WeakMap,T(om,gv);function BU(n,{scale:t=1,rotation:e=0}){const{width:r,height:i}=n.attributes.style,s=[0,0,parseInt(r,10),parseInt(i,10)];return new sm({viewBox:s,userUnit:1,scale:t,rotation:e})}function S2(n){if(n.startsWith("#")){const e=n.slice(1);return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length>=8?parseInt(e.slice(6,8),16)/255:1]}if(n.startsWith("rgb(")){const[e,r,i]=n.slice(4,-1).split(",").map(s=>parseInt(s,10));return[e,r,i,1]}if(n.startsWith("rgba(")){const e=n.slice(5,-1).split(",");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseFloat(e[3])]}const t=n.match(/^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+|none))?\)$/);return t?[Math.round(parseFloat(t[1])*255),Math.round(parseFloat(t[2])*255),Math.round(parseFloat(t[3])*255),t[4]!==void 0&&t[4]!=="none"?parseFloat(t[4]):1]:null}function Xd(n){const t=S2(n);return t?t.slice(0,3):(Ue(`Not a valid color format: "${n}"`),[0,0,0])}function iK(n){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const e of n.keys()){t.style.color=e;const r=window.getComputedStyle(t).color;n.set(e,Xd(r))}t.remove()}function jr(n){const{a:t,b:e,c:r,d:i,e:s,f:A}=n.getTransform();return[t,e,r,i,s,A]}function oo(n){const{a:t,b:e,c:r,d:i,e:s,f:A}=n.getTransform().invertSelf();return[t,e,r,i,s,A]}function Mc(n,t,e=!1,r=!0){if(t instanceof sm){const{pageWidth:i,pageHeight:s}=t.rawDims,{style:A}=n,a=Ti.isCSSRoundSupported,o=`var(--total-scale-factor) * ${i}px`,l=`var(--total-scale-factor) * ${s}px`,h=a?`round(down, ${o}, var(--scale-round-x))`:`calc(${o})`,u=a?`round(down, ${l}, var(--scale-round-y))`:`calc(${l})`;!e||t.rotation%180===0?(A.width=h,A.height=u):(A.width=u,A.height=h)}r&&n.setAttribute("data-main-rotation",t.rotation)}class ya{constructor(){const{pixelRatio:t}=ya;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,r,i,s=-1){let A=1/0,a=1/0,o=1/0;r=ya.capPixels(r,s),r>0&&(A=Math.sqrt(r/(t*e))),i!==-1&&(a=i/t,o=i/e);const l=Math.min(A,a,o);return this.sx>l||this.sy>l?(this.sx=l,this.sy=l,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const r=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,r):r}return t}}const F2=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class nK{static get isDarkMode(){var t;return Se(this,"isDarkMode",!!((t=window==null?void 0:window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches))}}class CU{static get commentForegroundColor(){const t=document.createElement("span");t.classList.add("comment","sidebar");const{style:e}=t;e.width=e.height="0",e.display="none",e.color="var(--comment-fg-color)",document.body.append(t);const{color:r}=window.getComputedStyle(t);return t.remove(),Se(this,"commentForegroundColor",Xd(r))}}function xU(n,t){t=Gr(t??1,0,1);const e=255*(1-t);return n.map(r=>Math.round(r*t+e))}function EU(n,t){const e=n[0]/255,r=n[1]/255,i=n[2]/255,s=Math.max(e,r,i),A=Math.min(e,r,i),a=(s+A)/2;if(s===A)t[0]=t[1]=0;else{const o=s-A;switch(t[1]=a<.5?o/(s+A):o/(2-s-A),s){case e:t[0]=((r-i)/o+(r<i?6:0))*60;break;case r:t[0]=((i-e)/o+2)*60;break;case i:t[0]=((e-r)/o+4)*60;break}}t[2]=a}function O5(n,t){const e=n[0],r=n[1],i=n[2],s=(1-Math.abs(2*i-1))*r,A=s*(1-Math.abs(e/60%2-1)),a=i-s/2;switch(Math.floor(e/60)){case 0:t[0]=s+a,t[1]=A+a,t[2]=a;break;case 1:t[0]=A+a,t[1]=s+a,t[2]=a;break;case 2:t[0]=a,t[1]=s+a,t[2]=A+a;break;case 3:t[0]=a,t[1]=A+a,t[2]=s+a;break;case 4:t[0]=A+a,t[1]=a,t[2]=s+a;break;case 5:case 6:t[0]=s+a,t[1]=a,t[2]=A+a;break}}function SU(n){return n<=.03928?n/12.92:((n+.055)/1.055)**2.4}function FU(n,t,e){O5(n,e),e.map(SU);const r=.2126*e[0]+.7152*e[1]+.0722*e[2];O5(t,e),e.map(SU);const i=.2126*e[0]+.7152*e[1]+.0722*e[2];return r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)}const TU=new Map;function _U(n,t){const e=n[0]+n[1]*256+n[2]*65536+t[0]*16777216+t[1]*4294967296+t[2]*1099511627776;let r=TU.get(e);if(r)return r;const i=new Float32Array(9),s=i.subarray(0,3),A=i.subarray(3,6);EU(n,A);const a=i.subarray(6,9);EU(t,a);const o=a[2]<.5,l=o?12:4.5;if(A[2]=o?Math.sqrt(A[2]):1-Math.sqrt(1-A[2]),FU(A,a,s)<l){let h,u;o?(h=A[2],u=1):(h=0,u=A[2]);const d=.005;for(;u-h>d;){const f=A[2]=(h+u)/2;o===FU(A,a,s)<l?h=f:u=f}A[2]=o?u:h}return O5(A,s),r=Qt.makeHexColor(Math.round(s[0]*255),Math.round(s[1]*255),Math.round(s[2]*255)),TU.set(e,r),r}function D5({html:n,dir:t,className:e},r){const i=document.createDocumentFragment();if(typeof n=="string"){const s=document.createElement("p");s.dir=t||"auto";const A=n.split(/(?:\r\n?|\n)/);for(let a=0,o=A.length;a<o;++a){const l=A[a];s.append(document.createTextNode(l)),a<o-1&&s.append(document.createElement("br"))}i.append(s)}else k5.render({xfaHtml:n,div:i,intent:"richText"});i.firstElementChild.classList.add("richText",e),r.append(i)}function IU(n){const t=new Path2D;if(!n)return t;for(let e=0,r=n.length;e<r;)switch(n[e++]){case rm.moveTo:t.moveTo(n[e++],n[e++]);break;case rm.lineTo:t.lineTo(n[e++],n[e++]);break;case rm.curveTo:t.bezierCurveTo(n[e++],n[e++],n[e++],n[e++],n[e++],n[e++]);break;case rm.quadraticCurveTo:t.quadraticCurveTo(n[e++],n[e++],n[e++],n[e++]);break;case rm.closePath:t.closePath();break;default:Ue(`Unrecognized drawing path operator: ${n[e-1]}`);break}return t}const bl=class bl{constructor(t){T(this,In);T(this,Jc,null);T(this,Zc,null);T(this,zA);T(this,XA,null);T(this,pv,null);T(this,th,null);T(this,Pg,null);T(this,Mg,null);C(this,zA,t),c(bl,mv)||C(bl,mv,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const t=C(this,Jc,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=c(this,zA)._uiManager._signal;e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("contextmenu",nA,{signal:e}),t.addEventListener("pointerdown",I(bl,Xb,cD),{signal:e}));const r=C(this,XA,document.createElement("div"));r.className="buttons",t.append(r);const i=c(this,zA).toolbarPosition;if(i){const{style:s}=t,A=c(this,zA)._uiManager.direction==="ltr"?1-i[0]:i[0];s.insetInlineEnd=`${100*A}%`,s.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return c(this,Jc)}hide(){var t;c(this,Jc).classList.add("hidden"),(t=c(this,Zc))==null||t.hideDropdown()}show(){var t,e;c(this,Jc).classList.remove("hidden"),(t=c(this,pv))==null||t.shown(),(e=c(this,th))==null||e.shown()}addDeleteButton(){const{editorType:t,_uiManager:e}=c(this,zA),r=document.createElement("button");r.classList.add("basic","deleteButton"),r.tabIndex=0,r.setAttribute("data-l10n-id",c(bl,mv)[t]),I(this,In,_0).call(this,r)&&r.addEventListener("click",i=>{e.delete()},{signal:e._signal}),c(this,XA).append(r)}async addAltText(t){const e=await t.render();I(this,In,_0).call(this,e),c(this,XA).append(e,c(this,In,bw)),C(this,pv,t)}addComment(t,e=null){if(c(this,th))return;const r=t.renderForToolbar();if(!r)return;I(this,In,_0).call(this,r);const i=C(this,Pg,c(this,In,bw));e?(c(this,XA).insertBefore(r,e),c(this,XA).insertBefore(i,e)):c(this,XA).append(r,i),C(this,th,t),t.toolbar=this}addColorPicker(t){if(c(this,Zc))return;C(this,Zc,t);const e=t.renderButton();I(this,In,_0).call(this,e),c(this,XA).append(e,c(this,In,bw))}async addEditSignatureButton(t){const e=C(this,Mg,await t.renderEditButton(c(this,zA)));I(this,In,_0).call(this,e),c(this,XA).append(e,c(this,In,bw))}removeButton(t){var e,r;switch(t){case"comment":(e=c(this,th))==null||e.removeToolbarCommentButton(),C(this,th,null),(r=c(this,Pg))==null||r.remove(),C(this,Pg,null);break}}async addButton(t,e){switch(t){case"colorPicker":e&&this.addColorPicker(e);break;case"altText":e&&await this.addAltText(e);break;case"editSignature":e&&await this.addEditSignatureButton(e);break;case"delete":this.addDeleteButton();break;case"comment":e&&this.addComment(e);break}}async addButtonBefore(t,e,r){if(!e&&t==="comment")return;const i=c(this,XA).querySelector(r);i&&t==="comment"&&this.addComment(e,i)}updateEditSignatureButton(t){c(this,Mg)&&(c(this,Mg).title=t)}remove(){var t;c(this,Jc).remove(),(t=c(this,Zc))==null||t.destroy(),C(this,Zc,null)}};Jc=new WeakMap,Zc=new WeakMap,zA=new WeakMap,XA=new WeakMap,pv=new WeakMap,th=new WeakMap,Pg=new WeakMap,Mg=new WeakMap,mv=new WeakMap,Xb=new WeakSet,cD=function(t){t.stopPropagation()},In=new WeakSet,hD=function(t){c(this,zA)._focusEventsAllowed=!1,Jr(t)},uD=function(t){c(this,zA)._focusEventsAllowed=!0,Jr(t)},_0=function(t){const e=c(this,zA)._uiManager._signal;return!(e instanceof AbortSignal)||e.aborted?!1:(t.addEventListener("focusin",I(this,In,hD).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",I(this,In,uD).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",nA,{signal:e}),!0)},bw=function(){const t=document.createElement("div");return t.className="divider",t},T(bl,Xb),T(bl,mv,null);let R5=bl;class sK{constructor(t){T(this,Cl);T(this,vv,null);T(this,Ru,null);T(this,Bl);C(this,Bl,t)}show(t,e,r){const[i,s]=I(this,Cl,dD).call(this,e,r),{style:A}=c(this,Ru)||C(this,Ru,I(this,Cl,fD).call(this));t.append(c(this,Ru)),A.insetInlineEnd=`${100*i}%`,A.top=`calc(${100*s}% + var(--editor-toolbar-vert-offset))`}hide(){c(this,Ru).remove()}}vv=new WeakMap,Ru=new WeakMap,Bl=new WeakMap,Cl=new WeakSet,fD=function(){const t=C(this,Ru,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar");const e=c(this,Bl)._signal;e instanceof AbortSignal&&!e.aborted&&t.addEventListener("contextmenu",nA,{signal:e});const r=C(this,vv,document.createElement("div"));return r.className="buttons",t.append(r),c(this,Bl).hasCommentManager()&&I(this,Cl,_4).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{c(this,Bl).commentSelection("floating_button")}),I(this,Cl,_4).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{c(this,Bl).highlightSelection("floating_button")}),t},dD=function(t,e){let r=0,i=0;for(const s of t){const A=s.y+s.height;if(A<r)continue;const a=s.x+(e?s.width:0);if(A>r){i=a,r=A;continue}e?a>i&&(i=a):a<i&&(i=a)}return[e?1-i:i,r]},_4=function(t,e,r,i){const s=document.createElement("button");s.classList.add("basic",t),s.tabIndex=0,s.setAttribute("data-l10n-id",e);const A=document.createElement("span");s.append(A),A.className="visuallyHidden",A.setAttribute("data-l10n-id",r);const a=c(this,Bl)._signal;a instanceof AbortSignal&&!a.aborted&&(s.addEventListener("contextmenu",nA,{signal:a}),s.addEventListener("click",i,{signal:a})),c(this,vv).append(s)};function UU(n,t,e){for(const r of e)t.addEventListener(r,n[r].bind(n))}const Cr=class Cr{static initializeAndAddPointerId(t){(c(Cr,Ku)||C(Cr,Ku,new Set)).add(t)}static setPointer(t,e){c(Cr,Hu)||C(Cr,Hu,e),c(Cr,Vu)??C(Cr,Vu,t)}static setTimeStamp(t){C(Cr,kg,t)}static isSamePointerId(t){return c(Cr,Hu)===t}static isSamePointerIdOrRemove(t){var e;return c(Cr,Hu)===t?!0:((e=c(Cr,Ku))==null||e.delete(t),!1)}static isSamePointerType(t){return c(Cr,Vu)===t}static isInitializedAndDifferentPointerType(t){return c(Cr,Vu)!==null&&!Cr.isSamePointerType(t)}static isSameTimeStamp(t){return c(Cr,kg)===t}static isUsingMultiplePointers(){var t;return((t=c(Cr,Ku))==null?void 0:t.size)>=1}static clearPointerType(){C(Cr,Vu,null)}static clearPointerIds(){C(Cr,Hu,NaN),C(Cr,Ku,null)}static clearTimeStamp(){C(Cr,kg,NaN)}};Hu=new WeakMap,Ku=new WeakMap,kg=new WeakMap,Vu=new WeakMap,T(Cr,Hu,NaN),T(Cr,Ku,null),T(Cr,kg,NaN),T(Cr,Vu,null);let zn=Cr;class AK{constructor(){T(this,qb,0)}get id(){return`${Z0}${Yi(this,qb)._++}`}}qb=new WeakMap;const HF=class HF{constructor(){T(this,Dg);T(this,Og,M5());T(this,wv,0);T(this,Zn,null)}static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',r=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=t;const s=i.decode().then(()=>(r.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(r.getImageData(0,0,1,1).data.buffer)[0]===0));return Se(this,"_isSVGFittingCanvas",s)}async getFromFile(t){const{lastModified:e,name:r,size:i,type:s}=t;return I(this,Dg,XB).call(this,`${e}_${r}_${i}_${s}`,t)}async getFromUrl(t){return I(this,Dg,XB).call(this,t,t)}async getFromBlob(t,e){const r=await e;return I(this,Dg,XB).call(this,t,r)}async getFromId(t){c(this,Zn)||C(this,Zn,new Map);const e=c(this,Zn).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:r}=e;return delete e.blobPromise,this.getFromBlob(e.id,r)}return this.getFromUrl(e.url)}getFromCanvas(t,e){c(this,Zn)||C(this,Zn,new Map);let r=c(this,Zn).get(t);if(r!=null&&r.bitmap)return r.refCounter+=1,r;const i=new OffscreenCanvas(e.width,e.height);return i.getContext("2d").drawImage(e,0,0),r={bitmap:i.transferToImageBitmap(),id:`image_${c(this,Og)}_${Yi(this,wv)._++}`,refCounter:1,isSvg:!1},c(this,Zn).set(t,r),c(this,Zn).set(r.id,r),r}getSvgUrl(t){const e=c(this,Zn).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var i;c(this,Zn)||C(this,Zn,new Map);const e=c(this,Zn).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;const{bitmap:r}=e;if(!e.url&&!e.file){const s=new OffscreenCanvas(r.width,r.height);s.getContext("bitmaprenderer").transferFromImageBitmap(r),e.blobPromise=s.convertToBlob()}(i=r.close)==null||i.call(r),e.bitmap=null}isValidId(t){return t.startsWith(`image_${c(this,Og)}_`)}};Og=new WeakMap,wv=new WeakMap,Zn=new WeakMap,Dg=new WeakSet,XB=async function(t,e){c(this,Zn)||C(this,Zn,new Map);let r=c(this,Zn).get(t);if(r===null)return null;if(r!=null&&r.bitmap)return r.refCounter+=1,r;try{r||(r={bitmap:null,id:`image_${c(this,Og)}_${Yi(this,wv)._++}`,refCounter:0,isSvg:!1});let i;if(typeof e=="string"?(r.url=e,i=await C2(e,"blob")):e instanceof File?i=r.file=e:e instanceof Blob&&(i=e),i.type==="image/svg+xml"){const s=HF._isSVGFittingCanvas,A=new FileReader,a=new Image,o=new Promise((l,h)=>{a.onload=()=>{r.bitmap=a,r.isSvg=!0,l()},A.onload=async()=>{const u=r.svgUrl=A.result;a.src=await s?`${u}#svgView(preserveAspectRatio(none))`:u},a.onerror=A.onerror=h});A.readAsDataURL(i),await o}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){Ue(i),r=null}return c(this,Zn).set(t,r),r&&c(this,Zn).set(r.id,r),r};let H5=HF;class aK{constructor(t=128){T(this,Li,[]);T(this,eh,!1);T(this,yv);T(this,Ai,-1);C(this,yv,t)}add({cmd:t,undo:e,post:r,mustExec:i,type:s=NaN,overwriteIfSameType:A=!1,keepUndo:a=!1}){if(i&&t(),c(this,eh))return;const o={cmd:t,undo:e,post:r,type:s};if(c(this,Ai)===-1){c(this,Li).length>0&&(c(this,Li).length=0),C(this,Ai,0),c(this,Li).push(o);return}if(A&&c(this,Li)[c(this,Ai)].type===s){a&&(o.undo=c(this,Li)[c(this,Ai)].undo),c(this,Li)[c(this,Ai)]=o;return}const l=c(this,Ai)+1;l===c(this,yv)?c(this,Li).splice(0,1):(C(this,Ai,l),l<c(this,Li).length&&c(this,Li).splice(l)),c(this,Li).push(o)}undo(){if(c(this,Ai)===-1)return;C(this,eh,!0);const{undo:t,post:e}=c(this,Li)[c(this,Ai)];t(),e==null||e(),C(this,eh,!1),C(this,Ai,c(this,Ai)-1)}redo(){if(c(this,Ai)<c(this,Li).length-1){C(this,Ai,c(this,Ai)+1),C(this,eh,!0);const{cmd:t,post:e}=c(this,Li)[c(this,Ai)];t(),e==null||e(),C(this,eh,!1)}}hasSomethingToUndo(){return c(this,Ai)!==-1}hasSomethingToRedo(){return c(this,Ai)<c(this,Li).length-1}cleanType(t){if(c(this,Ai)!==-1){for(let e=c(this,Ai);e>=0;e--)if(c(this,Li)[e].type!==t){c(this,Li).splice(e+1,c(this,Ai)-e),C(this,Ai,e);return}c(this,Li).length=0,C(this,Ai,-1)}}destroy(){C(this,Li,null)}}Li=new WeakMap,eh=new WeakMap,yv=new WeakMap,Ai=new WeakMap;class lm{constructor(t){T(this,Yb);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=Ti.platform;for(const[r,i,s={}]of t)for(const A of r){const a=A.startsWith("mac+");e&&a?(this.callbacks.set(A.slice(4),{callback:i,options:s}),this.allKeys.add(A.split("+").at(-1))):!e&&!a&&(this.callbacks.set(A,{callback:i,options:s}),this.allKeys.add(A.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const r=this.callbacks.get(I(this,Yb,gD).call(this,e));if(!r)return;const{callback:i,options:{bubbles:s=!1,args:A=[],checker:a=null}}=r;a&&!a(t,e)||(i.bind(t,...A,e)(),s||Jr(e))}}Yb=new WeakSet,gD=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e};const Jb=class Jb{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return iK(t),Se(this,"_colors",t)}convert(t){const e=Xd(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[r,i]of this._colors)if(i.every((s,A)=>s===e[A]))return Jb._colorsMapping.get(r);return e}getHexCode(t){const e=this._colors.get(t);return e?Qt.makeHexColor(...e):t}};ct(Jb,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let K5=Jb;const qg=class qg{constructor(t,e,r,i,s,A,a,o,l,h,u,d,f,p,m,y){T(this,Dt);T(this,Rg,new AbortController);T(this,lA,null);T(this,Hg,null);T(this,pi,new Map);T(this,ai,new Map);T(this,Kg,null);T(this,Vg,null);T(this,ys,null);T(this,Gg,null);T(this,qA,new aK);T(this,dn,null);T(this,rh,null);T(this,ih,null);T(this,nh,0);T(this,sh,new Set);T(this,wo,null);T(this,YA,null);T(this,Gu,new Set);ct(this,"_editorUndoBar",null);T(this,bv,!1);T(this,Bv,!1);T(this,jg,!1);T(this,Cv,null);T(this,yo,null);T(this,Ah,null);T(this,$g,null);T(this,ah,!1);T(this,bo,null);T(this,Zb,new AK);T(this,xl,!1);T(this,Wg,!1);T(this,xv,!1);T(this,oh,null);T(this,ju,null);T(this,zg,null);T(this,lh,null);T(this,Ev,null);T(this,$i,Be.NONE);T(this,gr,new Set);T(this,El,null);T(this,ch,null);T(this,hh,null);T(this,Sv,null);T(this,Xg,null);T(this,Fv,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});T(this,uh,[0,0]);T(this,Bo,null);T(this,Sl,null);T(this,Tv,null);T(this,_v,null);T(this,JA,null);const w=this._signal=c(this,Rg).signal;C(this,Sl,t),C(this,Tv,e),C(this,_v,r),C(this,Vg,i),C(this,dn,s),C(this,ch,A),C(this,Xg,o),this._eventBus=a,a._on("editingaction",this.onEditingAction.bind(this),{signal:w}),a._on("pagechanging",this.onPageChanging.bind(this),{signal:w}),a._on("scalechanging",this.onScaleChanging.bind(this),{signal:w}),a._on("rotationchanging",this.onRotationChanging.bind(this),{signal:w}),a._on("setpreference",this.onSetPreference.bind(this),{signal:w}),a._on("switchannotationeditorparams",B=>this.updateParams(B.type,B.value),{signal:w}),window.addEventListener("pointerdown",()=>{C(this,Wg,!0)},{capture:!0,signal:w}),window.addEventListener("pointerup",()=>{C(this,Wg,!1)},{capture:!0,signal:w}),window.addEventListener("beforeunload",I(this,Dt,pD).bind(this),{capture:!0,signal:w}),I(this,Dt,wD).call(this),I(this,Dt,ED).call(this),I(this,Dt,U4).call(this),C(this,ys,o.annotationStorage),C(this,Cv,o.filterFactory),C(this,hh,l),C(this,$g,h||null),C(this,bv,u),C(this,Bv,d),C(this,jg,f),C(this,Ev,p||null),this.viewParameters={realScale:al.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=m||null,this._supportsPinchToZoom=y!==!1,s==null||s.setSidebarUiManager(this)}static get _keyboardManager(){const t=qg.prototype,e=A=>c(A,Sl).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&A.hasSomethingToControl(),r=(A,{target:a})=>{if(a instanceof HTMLInputElement){const{type:o}=a;return o!=="text"&&o!=="number"}return!0},i=this.TRANSLATE_SMALL,s=this.TRANSLATE_BIG;return Se(this,"_keyboardManager",new lm([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],t.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:r}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(A,{target:a})=>!(a instanceof HTMLButtonElement)&&c(A,Sl).contains(a)&&!A.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(A,{target:a})=>!(a instanceof HTMLButtonElement)&&c(A,Sl).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:e}]]))}destroy(){var t,e,r,i,s,A,a,o,l;(t=c(this,JA))==null||t.resolve(),C(this,JA,null),(e=c(this,Rg))==null||e.abort(),C(this,Rg,null),this._signal=null;for(const h of c(this,ai).values())h.destroy();c(this,ai).clear(),c(this,pi).clear(),c(this,Gu).clear(),(r=c(this,lh))==null||r.clear(),C(this,lA,null),c(this,gr).clear(),c(this,qA).destroy(),(i=c(this,Vg))==null||i.destroy(),(s=c(this,dn))==null||s.destroy(),(A=c(this,ch))==null||A.destroy(),(a=c(this,bo))==null||a.hide(),C(this,bo,null),(o=c(this,zg))==null||o.destroy(),C(this,zg,null),C(this,Hg,null),c(this,yo)&&(clearTimeout(c(this,yo)),C(this,yo,null)),c(this,Bo)&&(clearTimeout(c(this,Bo)),C(this,Bo,null)),(l=this._editorUndoBar)==null||l.destroy(),C(this,Xg,null)}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return c(this,Ev)}get useNewAltTextFlow(){return c(this,Bv)}get useNewAltTextWhenAddingImage(){return c(this,jg)}get hcmFilter(){return Se(this,"hcmFilter",c(this,hh)?c(this,Cv).addHCMFilter(c(this,hh).foreground,c(this,hh).background):"none")}get direction(){return Se(this,"direction",getComputedStyle(c(this,Sl)).direction)}get _highlightColors(){return Se(this,"_highlightColors",c(this,$g)?new Map(c(this,$g).split(",").map(t=>(t=t.split("=").map(e=>e.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return Se(this,"highlightColors",null);const e=new Map,r=!!c(this,hh);for(const[i,s]of t){const A=i.endsWith("_HCM");if(r&&A){e.set(i.replace("_HCM",""),s);continue}!r&&!A&&e.set(i,s)}return Se(this,"highlightColors",e)}get highlightColorNames(){return Se(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const e=this.highlightColorNames.get(t);return this._highlightColors.get(e)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),C(this,ih,t)}setMainHighlightColorPicker(t){C(this,zg,t)}editAltText(t,e=!1){var r;(r=c(this,Vg))==null||r.editAltText(this,t,e)}hasCommentManager(){return!!c(this,dn)}editComment(t,e,r,i){var s;(s=c(this,dn))==null||s.showDialog(this,t,e,r,i)}selectComment(t,e){const r=c(this,ai).get(t),i=r==null?void 0:r.getEditorByUID(e);i==null||i.toggleComment(!0,!0)}updateComment(t){var e;(e=c(this,dn))==null||e.updateComment(t.getData())}updatePopupColor(t){var e;(e=c(this,dn))==null||e.updatePopupColor(t)}removeComment(t){var e;(e=c(this,dn))==null||e.removeComments([t.uid])}deleteComment(t,e){const r=()=>{t.comment=e},i=()=>{var s;(s=this._editorUndoBar)==null||s.show(r,"comment"),this.toggleComment(null),t.comment=null};this.addCommands({cmd:i,undo:r,mustExec:!0})}toggleComment(t,e,r=void 0){var i;(i=c(this,dn))==null||i.toggleCommentPopup(t,e,r)}makeCommentColor(t,e){var r;return t&&((r=c(this,dn))==null?void 0:r.makeCommentColor(t,e))||null}getCommentDialogElement(){var t;return((t=c(this,dn))==null?void 0:t.dialogElement)||null}async waitForEditorsRendered(t){if(c(this,ai).has(t-1))return;const{resolve:e,promise:r}=Promise.withResolvers(),i=s=>{s.pageNumber===t&&(this._eventBus._off("editorsrendered",i),e())};this._eventBus.on("editorsrendered",i),await r}getSignature(t){var e;(e=c(this,ch))==null||e.getSignature({uiManager:this,editor:t})}get signatureManager(){return c(this,ch)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":C(this,jg,e);break}}onPageChanging({pageNumber:t}){C(this,nh,t-1)}deletePage(t){for(const e of this.getEditors(t))e.remove();c(this,ai).delete(t),c(this,nh)===t&&C(this,nh,0)}focusMainContainer(){c(this,Sl).focus()}findParent(t,e){for(const r of c(this,ai).values()){const{x:i,y:s,width:A,height:a}=r.div.getBoundingClientRect();if(t>=i&&t<=i+A&&e>=s&&e<=s+a)return r}return null}disableUserSelect(t=!1){c(this,Tv).classList.toggle("noUserSelect",t)}addShouldRescale(t){c(this,Gu).add(t)}removeShouldRescale(t){c(this,Gu).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*al.PDF_TO_CSS_UNITS;for(const r of c(this,Gu))r.onScaleChanging();(e=c(this,ih))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t="",e=!1){const r=document.getSelection();if(!r||r.isCollapsed)return;const{anchorNode:i,anchorOffset:s,focusNode:A,focusOffset:a}=r,o=r.toString(),h=I(this,Dt,qB).call(this,r).closest(".textLayer"),u=this.getSelectionBoxes(h);if(!u)return;r.empty();const d=I(this,Dt,I4).call(this,h),f=c(this,$i)===Be.NONE,p=()=>{const m=d==null?void 0:d.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:u,anchorNode:i,anchorOffset:s,focusNode:A,focusOffset:a,text:o});f&&this.showAllEditors("highlight",!0,!0),e&&(m==null||m.editComment())};if(f){this.switchToMode(Be.HIGHLIGHT,p);return}p()}commentSelection(t=""){this.highlightSelection(t,!0)}getAndRemoveDataFromAnnotationStorage(t){if(!c(this,ys))return null;const e=`${Z0}${t}`,r=c(this,ys).getRawValue(e);return r&&c(this,ys).remove(e),r}addToAnnotationStorage(t){!t.isEmpty()&&c(this,ys)&&!c(this,ys).has(t.id)&&c(this,ys).setValue(t.id,t)}a11yAlert(t,e=null){const r=c(this,_v);r&&(r.setAttribute("data-l10n-id",t),e?r.setAttribute("data-l10n-args",JSON.stringify(e)):r.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,c(this,ah)&&(C(this,ah,!1),I(this,Dt,Bw).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of c(this,gr))if(e.div.contains(t)){C(this,ju,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!c(this,ju))return;const[t,e]=c(this,ju);C(this,ju,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){I(this,Dt,U4).call(this),this.setEditingState(!0)}removeEditListeners(){I(this,Dt,BD).call(this),this.setEditingState(!1)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const r of c(this,YA))if(r.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const r of c(this,YA))if(r.isHandlingMimeForPasting(e.type)){r.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var r;if(t.preventDefault(),(r=c(this,lA))==null||r.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of c(this,gr)){const s=i.serialize(!0);s&&e.push(s)}e.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:e}=t;for(const s of e.items)for(const A of c(this,YA))if(A.isHandlingMimeForPasting(s.type)){A.paste(s,this.currentLayer);return}let r=e.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(s){Ue(`paste: "${s.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const i=this.currentLayer;try{const s=[];for(const o of r){const l=await i.deserialize(o);if(!l)return;s.push(l)}const A=()=>{for(const o of s)I(this,Dt,L4).call(this,o);I(this,Dt,Q4).call(this,s)},a=()=>{for(const o of s)o.remove()};this.addCommands({cmd:A,undo:a,mustExec:!0})}catch(s){Ue(`paste: "${s.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),c(this,$i)!==Be.NONE&&!this.isEditorHandlingKeyboard&&qg._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,c(this,ah)&&(C(this,ah,!1),I(this,Dt,Bw).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}updatePageIndex(t,e){for(const i of this.getEditors(t))i.pageIndex=e;const r=c(this,Kg).get(t);r&&(r.pageIndex=e,c(this,ai).set(e,r),c(this,xl)?r.enable():r.disable())}startUpdatePages(){C(this,Kg,new Map(c(this,ai))),c(this,ai).clear()}endUpdatePages(){C(this,Kg,null)}clonePage(t,e){for(const r of this.getEditors(t)){const i=r.serialize(r.mode!==Be.HIGHLIGHT);i&&(i.pageIndex=e,i.id=this.getId(),i.isClone=!0,delete i.popupRef,c(this,ys).setValue(i.id,i))}}findClonesForPage(t){const e=[],{pageIndex:r}=t;for(const[i,s]of c(this,ys))s.pageIndex===r&&s.isClone&&(c(this,ys).remove(i),e.push(t.deserialize(s).then(A=>{A&&(A.isClone=!0,t.addOrRebuild(A))})));return Promise.all(e)}setEditingState(t){t?(I(this,Dt,yD).call(this),I(this,Dt,CD).call(this),I(this,Dt,Ps).call(this,{isEditing:c(this,$i)!==Be.NONE,isEmpty:I(this,Dt,Cw).call(this),hasSomethingToUndo:c(this,qA).hasSomethingToUndo(),hasSomethingToRedo:c(this,qA).hasSomethingToRedo(),hasSelectedEditor:!1})):(I(this,Dt,bD).call(this),I(this,Dt,xD).call(this),I(this,Dt,Ps).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!c(this,YA)){C(this,YA,t);for(const e of c(this,YA))I(this,Dt,Cc).call(this,e.defaultPropertiesToUpdate)}}getId(){return c(this,Zb).id}get currentLayer(){return c(this,ai).get(c(this,nh))}getLayer(t){return c(this,ai).get(t)}get currentPageIndex(){return c(this,nh)}addLayer(t){c(this,ai).set(t.pageIndex,t),c(this,xl)?t.enable():t.disable()}removeLayer(t){c(this,ai).delete(t.pageIndex)}async updateMode(t,e=null,r=!1,i=!1,s=!1,A=!1){var a,o,l,h,u,d;if(c(this,$i)!==t&&!(c(this,JA)&&(await c(this,JA).promise,!c(this,JA)))){if(C(this,JA,Promise.withResolvers()),(a=c(this,ih))==null||a.commitOrRemove(),c(this,$i)===Be.POPUP&&((o=c(this,dn))==null||o.hideSidebar()),(l=c(this,dn))==null||l.destroyPopup(),C(this,$i,t),t===Be.NONE){this.setEditingState(!1),I(this,Dt,FD).call(this);for(const f of c(this,pi).values())f.hideStandaloneCommentButton();(h=this._editorUndoBar)==null||h.hide(),this.toggleComment(null),c(this,JA).resolve();return}for(const f of c(this,pi).values())f.addStandaloneCommentButton();t===Be.SIGNATURE&&await((u=c(this,ch))==null?void 0:u.loadSignatures()),r&&zn.clearPointerType(),this.setEditingState(!0),await I(this,Dt,SD).call(this),this.unselectAll();for(const f of c(this,ai).values())f.updateMode(t);if(t===Be.POPUP){c(this,Hg)||C(this,Hg,await c(this,Xg).getAnnotationsByType(new Set(c(this,YA).map(m=>m._editorType))));const f=new Set,p=[];for(const m of c(this,pi).values()){const{annotationElementId:y,hasComment:w,deleted:B}=m;y&&f.add(y),w&&!B&&p.push(m.getData())}for(const m of c(this,Hg)){const{id:y,popupRef:w,contentsObj:B}=m;w&&(B!=null&&B.str)&&!f.has(y)&&!c(this,sh).has(y)&&p.push(m)}(d=c(this,dn))==null||d.showSidebar(p)}if(!e){i&&this.addNewEditorFromKeyboard(),c(this,JA).resolve();return}for(const f of c(this,pi).values())f.uid===e?(this.setSelected(f),A?f.editComment():s?f.enterInEditMode():f.focus()):f.unselect();c(this,JA).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==c(this,$i)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,e){if(c(this,YA)){switch(t){case Ie.CREATE:this.currentLayer.addNewEditor(e);return;case Ie.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(c(this,Sv)||C(this,Sv,new Map)).set(t,e),this.showAllEditors("highlight",e);break}if(this.hasSelection)for(const r of c(this,gr))r.updateParams(t,e);else for(const r of c(this,YA))r.updateDefaultParams(t,e)}}showAllEditors(t,e,r=!1){var s;for(const A of c(this,pi).values())A.editorType===t&&A.show(e);(((s=c(this,Sv))==null?void 0:s.get(Ie.HIGHLIGHT_SHOW_ALL))??!0)!==e&&I(this,Dt,Cc).call(this,[[Ie.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(c(this,xv)!==t){C(this,xv,t);for(const e of c(this,ai).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}*getEditors(t){for(const e of c(this,pi).values())e.pageIndex===t&&(yield e)}getEditor(t){return c(this,pi).get(t)}addEditor(t){c(this,pi).set(t.id,t)}removeEditor(t){var e,r;t.div.contains(document.activeElement)&&(c(this,yo)&&clearTimeout(c(this,yo)),C(this,yo,setTimeout(()=>{this.focusMainContainer(),C(this,yo,null)},0))),c(this,pi).delete(t.id),t.annotationElementId&&((e=c(this,lh))==null||e.delete(t.annotationElementId)),this.unselect(t),(!t.annotationElementId||!c(this,sh).has(t.annotationElementId))&&((r=c(this,ys))==null||r.remove(t.id))}addDeletedAnnotationElement(t){c(this,sh).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return c(this,sh).has(t)}removeDeletedAnnotationElement(t){c(this,sh).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){c(this,lA)!==t&&(C(this,lA,t),t&&I(this,Dt,Cc).call(this,t.propertiesToUpdate))}updateUI(t){c(this,Dt,TD)===t&&I(this,Dt,Cc).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){I(this,Dt,Cc).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(c(this,gr).has(t)){c(this,gr).delete(t),t.unselect(),I(this,Dt,Ps).call(this,{hasSelectedEditor:this.hasSelection});return}c(this,gr).add(t),t.select(),I(this,Dt,Cc).call(this,t.propertiesToUpdate),I(this,Dt,Ps).call(this,{hasSelectedEditor:!0})}setSelected(t){var e,r;this.updateToolbar({mode:t.mode,editId:t.uid}),(e=c(this,ih))==null||e.commitOrRemove();for(const i of c(this,gr))i!==t&&i.unselect();(r=c(this,dn))==null||r.destroyPopup(),c(this,gr).clear(),c(this,gr).add(t),t.select(),I(this,Dt,Cc).call(this,t.propertiesToUpdate),I(this,Dt,Ps).call(this,{hasSelectedEditor:!0})}isSelected(t){return c(this,gr).has(t)}get firstSelectedEditor(){return c(this,gr).values().next().value}unselect(t){t.unselect(),c(this,gr).delete(t),I(this,Dt,Ps).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return c(this,gr).size!==0}get isEnterHandled(){return c(this,gr).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;c(this,qA).undo(),I(this,Dt,Ps).call(this,{hasSomethingToUndo:c(this,qA).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:I(this,Dt,Cw).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){c(this,qA).redo(),I(this,Dt,Ps).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:c(this,qA).hasSomethingToRedo(),isEmpty:I(this,Dt,Cw).call(this)})}addCommands(t){c(this,qA).add(t),I(this,Dt,Ps).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:I(this,Dt,Cw).call(this)})}cleanUndoStack(t){c(this,qA).cleanType(t)}delete(){var s;this.commitOrRemove();const t=(s=this.currentLayer)==null?void 0:s.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...c(this,gr)],r=()=>{var A;(A=this._editorUndoBar)==null||A.show(i,e.length===1?e[0].editorType:e.length);for(const a of e)a.remove()},i=()=>{for(const A of e)I(this,Dt,L4).call(this,A)};this.addCommands({cmd:r,undo:i,mustExec:!0})}commitOrRemove(){var t;(t=c(this,lA))==null||t.commitOrRemove()}hasSomethingToControl(){return c(this,lA)||this.hasSelection}selectAll(){for(const t of c(this,gr))t.commit();I(this,Dt,Q4).call(this,c(this,pi).values())}unselectAll(){var t,e;if(!(c(this,lA)&&(c(this,lA).commitOrRemove(),c(this,$i)!==Be.NONE))&&!((t=c(this,ih))!=null&&t.commitOrRemove())&&((e=c(this,dn))==null||e.destroyPopup(),!!this.hasSelection)){for(const r of c(this,gr))r.unselect();c(this,gr).clear(),I(this,Dt,Ps).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;c(this,uh)[0]+=t,c(this,uh)[1]+=e;const[i,s]=c(this,uh),A=[...c(this,gr)],a=1e3;c(this,Bo)&&clearTimeout(c(this,Bo)),C(this,Bo,setTimeout(()=>{C(this,Bo,null),c(this,uh)[0]=c(this,uh)[1]=0,this.addCommands({cmd:()=>{for(const o of A)c(this,pi).has(o.id)&&(o.translateInPage(i,s),o.translationDone())},undo:()=>{for(const o of A)c(this,pi).has(o.id)&&(o.translateInPage(-i,-s),o.translationDone())},mustExec:!1})},a));for(const o of A)o.translateInPage(t,e),o.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),C(this,wo,new Map);for(const t of c(this,gr))c(this,wo).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!c(this,wo))return!1;this.disableUserSelect(!1);const t=c(this,wo);C(this,wo,null);let e=!1;for(const[{x:i,y:s,pageIndex:A},a]of t)a.newX=i,a.newY=s,a.newPageIndex=A,e||(e=i!==a.savedX||s!==a.savedY||A!==a.savedPageIndex);if(!e)return!1;const r=(i,s,A,a)=>{if(c(this,pi).has(i.id)){const o=c(this,ai).get(a);o?i._setParentAndPosition(o,s,A):(i.pageIndex=a,i.x=s,i.y=A)}};return this.addCommands({cmd:()=>{for(const[i,{newX:s,newY:A,newPageIndex:a}]of t)r(i,s,A,a)},undo:()=>{for(const[i,{savedX:s,savedY:A,savedPageIndex:a}]of t)r(i,s,A,a)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(c(this,wo))for(const r of c(this,wo).keys())r.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||c(this,gr).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return c(this,lA)===t}getActive(){return c(this,lA)}getMode(){return c(this,$i)}isEditingMode(){return c(this,$i)!==Be.NONE}get imageManager(){return Se(this,"imageManager",new H5)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let l=0,h=e.rangeCount;l<h;l++)if(!t.contains(e.getRangeAt(l).commonAncestorContainer))return null;const{x:r,y:i,width:s,height:A}=t.getBoundingClientRect();let a;switch(t.getAttribute("data-main-rotation")){case"90":a=(l,h,u,d)=>({x:(h-i)/A,y:1-(l+u-r)/s,width:d/A,height:u/s});break;case"180":a=(l,h,u,d)=>({x:1-(l+u-r)/s,y:1-(h+d-i)/A,width:u/s,height:d/A});break;case"270":a=(l,h,u,d)=>({x:1-(h+d-i)/A,y:(l-r)/s,width:d/A,height:u/s});break;default:a=(l,h,u,d)=>({x:(l-r)/s,y:(h-i)/A,width:u/s,height:d/A});break}const o=[];for(let l=0,h=e.rangeCount;l<h;l++){const u=e.getRangeAt(l);if(!u.collapsed)for(const{x:d,y:f,width:p,height:m}of u.getClientRects())p===0||m===0||o.push(a(d,f,p,m))}return o.length===0?null:o}addChangedExistingAnnotation({annotationElementId:t,id:e}){(c(this,Gg)||C(this,Gg,new Map)).set(t,e)}removeChangedExistingAnnotation({annotationElementId:t}){var e;(e=c(this,Gg))==null||e.delete(t)}renderAnnotationElement(t){var i;const e=(i=c(this,Gg))==null?void 0:i.get(t.data.id);if(!e)return;const r=c(this,ys).getRawValue(e);r&&(c(this,$i)===Be.NONE&&!r.hasBeenModified||r.renderAnnotationElement(t))}setMissingCanvas(t,e,r){var s;const i=(s=c(this,lh))==null?void 0:s.get(t);i&&(i.setCanvas(e,r),c(this,lh).delete(t))}addMissingCanvas(t,e){(c(this,lh)||C(this,lh,new Map)).set(t,e)}};Rg=new WeakMap,lA=new WeakMap,Hg=new WeakMap,pi=new WeakMap,ai=new WeakMap,Kg=new WeakMap,Vg=new WeakMap,ys=new WeakMap,Gg=new WeakMap,qA=new WeakMap,dn=new WeakMap,rh=new WeakMap,ih=new WeakMap,nh=new WeakMap,sh=new WeakMap,wo=new WeakMap,YA=new WeakMap,Gu=new WeakMap,bv=new WeakMap,Bv=new WeakMap,jg=new WeakMap,Cv=new WeakMap,yo=new WeakMap,Ah=new WeakMap,$g=new WeakMap,ah=new WeakMap,bo=new WeakMap,Zb=new WeakMap,xl=new WeakMap,Wg=new WeakMap,xv=new WeakMap,oh=new WeakMap,ju=new WeakMap,zg=new WeakMap,lh=new WeakMap,Ev=new WeakMap,$i=new WeakMap,gr=new WeakMap,El=new WeakMap,ch=new WeakMap,hh=new WeakMap,Sv=new WeakMap,Xg=new WeakMap,Fv=new WeakMap,uh=new WeakMap,Bo=new WeakMap,Sl=new WeakMap,Tv=new WeakMap,_v=new WeakMap,JA=new WeakMap,Dt=new WeakSet,qB=function({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t},I4=function(t){const{currentLayer:e}=this;if(e.hasTextLayer(t))return e;for(const r of c(this,ai).values())if(r.hasTextLayer(t))return r;return null},pD=function(t){var e;this.commitOrRemove(),(e=this.currentLayer)==null||e.endDrawingSession(!1)},mD=function(){const t=document.getSelection();if(!t||t.isCollapsed)return;const r=I(this,Dt,qB).call(this,t).closest(".textLayer"),i=this.getSelectionBoxes(r);i&&(c(this,bo)||C(this,bo,new sK(this)),c(this,bo).show(r,i,this.direction==="ltr"))},vD=function(){var s,A,a;const t=document.getSelection();if(!t||t.isCollapsed){c(this,El)&&((s=c(this,bo))==null||s.hide(),C(this,El,null),I(this,Dt,Ps).call(this,{hasSelectedText:!1}));return}const{anchorNode:e}=t;if(e===c(this,El))return;const i=I(this,Dt,qB).call(this,t).closest(".textLayer");if(!i){c(this,El)&&((A=c(this,bo))==null||A.hide(),C(this,El,null),I(this,Dt,Ps).call(this,{hasSelectedText:!1}));return}if((a=c(this,bo))==null||a.hide(),C(this,El,e),I(this,Dt,Ps).call(this,{hasSelectedText:!0}),!(c(this,$i)!==Be.HIGHLIGHT&&c(this,$i)!==Be.NONE)&&(c(this,$i)===Be.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),C(this,ah,this.isShiftKeyDown),!this.isShiftKeyDown)){const o=c(this,$i)===Be.HIGHLIGHT?I(this,Dt,I4).call(this,i):null;if(o==null||o.toggleDrawing(),c(this,Wg)){const l=new AbortController,h=this.combinedSignal(l),u=d=>{d.type==="pointerup"&&d.button!==0||(l.abort(),o==null||o.toggleDrawing(!0),d.type==="pointerup"&&I(this,Dt,Bw).call(this,"main_toolbar"))};window.addEventListener("pointerup",u,{signal:h}),window.addEventListener("blur",u,{signal:h})}else o==null||o.toggleDrawing(!0),I(this,Dt,Bw).call(this,"main_toolbar")}},Bw=function(t=""){c(this,$i)===Be.HIGHLIGHT?this.highlightSelection(t):c(this,bv)&&I(this,Dt,mD).call(this)},wD=function(){document.addEventListener("selectionchange",I(this,Dt,vD).bind(this),{signal:this._signal})},yD=function(){if(c(this,Ah))return;C(this,Ah,new AbortController);const t=this.combinedSignal(c(this,Ah));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})},bD=function(){var t;(t=c(this,Ah))==null||t.abort(),C(this,Ah,null)},U4=function(){if(c(this,oh))return;C(this,oh,new AbortController);const t=this.combinedSignal(c(this,oh));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})},BD=function(){var t;(t=c(this,oh))==null||t.abort(),C(this,oh,null)},CD=function(){if(c(this,rh))return;C(this,rh,new AbortController);const t=this.combinedSignal(c(this,rh));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})},xD=function(){var t;(t=c(this,rh))==null||t.abort(),C(this,rh,null)},ED=function(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})},Ps=function(t){Object.entries(t).some(([r,i])=>c(this,Fv)[r]!==i)&&(this._eventBus.dispatch("editingstateschanged",{source:this,details:Object.assign(c(this,Fv),t)}),c(this,$i)===Be.HIGHLIGHT&&t.hasSelectedEditor===!1&&I(this,Dt,Cc).call(this,[[Ie.HIGHLIGHT_FREE,!0]]))},Cc=function(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})},SD=async function(){if(!c(this,xl)){C(this,xl,!0);const t=[];for(const e of c(this,ai).values())t.push(e.enable());await Promise.all(t);for(const e of c(this,pi).values())e.enable()}},FD=function(){if(this.unselectAll(),c(this,xl)){C(this,xl,!1);for(const t of c(this,ai).values())t.disable();for(const t of c(this,pi).values())t.disable()}},L4=function(t){const e=c(this,ai).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))},TD=function(){let t=null;for(t of c(this,gr));return t},Cw=function(){if(c(this,pi).size===0)return!0;if(c(this,pi).size===1)for(const t of c(this,pi).values())return t.isEmpty();return!1},Q4=function(t){for(const e of c(this,gr))e.unselect();c(this,gr).clear();for(const e of t)e.isEmpty()||(c(this,gr).add(e),e.select());I(this,Dt,Ps).call(this,{hasSelectedEditor:this.hasSelection})},ct(qg,"TRANSLATE_SMALL",1),ct(qg,"TRANSLATE_BIG",10);let kc=qg;const bs=class bs{constructor(t){T(this,Ua);T(this,gn,null);T(this,Co,!1);T(this,Ia,null);T(this,Yg,null);T(this,xo,null);T(this,cA,null);T(this,Jg,!1);T(this,Eo,null);T(this,Ks,null);T(this,Fl,null);T(this,$u,null);T(this,So,!1);C(this,Ks,t),C(this,So,t._uiManager.useNewAltTextFlow),c(bs,fh)||C(bs,fh,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){bs._l10n??(bs._l10n=t)}async render(){const t=C(this,Ia,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=C(this,Yg,document.createElement("span"));t.append(e),c(this,So)?(t.classList.add("new"),t.setAttribute("data-l10n-id",c(bs,fh).missing),e.setAttribute("data-l10n-id",c(bs,fh)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const r=c(this,Ks)._uiManager._signal;t.addEventListener("contextmenu",nA,{signal:r}),t.addEventListener("pointerdown",s=>s.stopPropagation(),{signal:r});const i=s=>{s.preventDefault(),c(this,Ks)._uiManager.editAltText(c(this,Ks)),c(this,So)&&c(this,Ks)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:c(this,Ua,xw)}})};return t.addEventListener("click",i,{capture:!0,signal:r}),t.addEventListener("keydown",s=>{s.target===t&&s.key==="Enter"&&(C(this,Jg,!0),i(s))},{signal:r}),await I(this,Ua,YB).call(this),t}finish(){c(this,Ia)&&(c(this,Ia).focus({focusVisible:c(this,Jg)}),C(this,Jg,!1))}isEmpty(){return c(this,So)?c(this,gn)===null:!c(this,gn)&&!c(this,Co)}hasData(){return c(this,So)?c(this,gn)!==null||!!c(this,Fl):this.isEmpty()}get guessedText(){return c(this,Fl)}async setGuessedText(t){c(this,gn)===null&&(C(this,Fl,t),C(this,$u,await bs._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),I(this,Ua,YB).call(this))}toggleAltTextBadge(t=!1){var e;if(!c(this,So)||c(this,gn)){(e=c(this,Eo))==null||e.remove(),C(this,Eo,null);return}if(!c(this,Eo)){const r=C(this,Eo,document.createElement("div"));r.className="noAltTextBadge",c(this,Ks).div.append(r)}c(this,Eo).classList.toggle("hidden",!t)}serialize(t){let e=c(this,gn);return!t&&c(this,Fl)===e&&(e=c(this,$u)),{altText:e,decorative:c(this,Co),guessedText:c(this,Fl),textWithDisclaimer:c(this,$u)}}get data(){return{altText:c(this,gn),decorative:c(this,Co)}}set data({altText:t,decorative:e,guessedText:r,textWithDisclaimer:i,cancel:s=!1}){r&&(C(this,Fl,r),C(this,$u,i)),!(c(this,gn)===t&&c(this,Co)===e)&&(s||(C(this,gn,t),C(this,Co,e)),I(this,Ua,YB).call(this))}toggle(t=!1){c(this,Ia)&&(!t&&c(this,cA)&&(clearTimeout(c(this,cA)),C(this,cA,null)),c(this,Ia).disabled=!t)}shown(){c(this,Ks)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:c(this,Ua,xw)}})}destroy(){var t,e;(t=c(this,Ia))==null||t.remove(),C(this,Ia,null),C(this,Yg,null),C(this,xo,null),(e=c(this,Eo))==null||e.remove(),C(this,Eo,null)}};gn=new WeakMap,Co=new WeakMap,Ia=new WeakMap,Yg=new WeakMap,xo=new WeakMap,cA=new WeakMap,Jg=new WeakMap,Eo=new WeakMap,Ks=new WeakMap,Fl=new WeakMap,$u=new WeakMap,So=new WeakMap,fh=new WeakMap,Ua=new WeakSet,xw=function(){return c(this,gn)&&"added"||c(this,gn)===null&&this.guessedText&&"review"||"missing"},YB=async function(){var i,s,A;const t=c(this,Ia);if(!t)return;if(c(this,So)){if(t.classList.toggle("done",!!c(this,gn)),t.setAttribute("data-l10n-id",c(bs,fh)[c(this,Ua,xw)]),(i=c(this,Yg))==null||i.setAttribute("data-l10n-id",c(bs,fh)[`${c(this,Ua,xw)}-label`]),!c(this,gn)){(s=c(this,xo))==null||s.remove();return}}else{if(!c(this,gn)&&!c(this,Co)){t.classList.remove("done"),(A=c(this,xo))==null||A.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=c(this,xo);if(!e){C(this,xo,e=document.createElement("span")),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${c(this,Ks).id}`;const a=100,o=c(this,Ks)._uiManager._signal;o.addEventListener("abort",()=>{clearTimeout(c(this,cA)),C(this,cA,null)},{once:!0}),t.addEventListener("mouseenter",()=>{C(this,cA,setTimeout(()=>{C(this,cA,null),c(this,xo).classList.add("show"),c(this,Ks)._reportTelemetry({action:"alt_text_tooltip"})},a))},{signal:o}),t.addEventListener("mouseleave",()=>{var l;c(this,cA)&&(clearTimeout(c(this,cA)),C(this,cA,null)),(l=c(this,xo))==null||l.classList.remove("show")},{signal:o})}c(this,Co)?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=c(this,gn)),e.parentNode||t.append(e);const r=c(this,Ks).getElementForAltText();r==null||r.setAttribute("aria-describedby",e.id)},T(bs,fh,null),ct(bs,"_l10n",null);let T2=bs;class _2{constructor(t){T(this,Uv);T(this,Un,null);T(this,ZA,null);T(this,Wu,!1);T(this,Dr,null);T(this,Iv,null);T(this,dh,null);T(this,ta,null);T(this,gh,null);T(this,ph,!1);T(this,zu,null);C(this,Dr,t)}renderForToolbar(){const t=C(this,ZA,document.createElement("button"));return t.className="comment",I(this,Uv,N4).call(this,t,!1)}renderForStandalone(){const t=C(this,Un,document.createElement("button"));t.className="annotationCommentButton";const e=c(this,Dr).commentButtonPosition;if(e){const{style:r}=t;r.insetInlineEnd=`calc(${100*(c(this,Dr)._uiManager.direction==="ltr"?1-e[0]:e[0])}% - var(--comment-button-dim))`,r.top=`calc(${100*e[1]}% - var(--comment-button-dim))`;const i=c(this,Dr).commentButtonColor;i&&(r.backgroundColor=i)}return I(this,Uv,N4).call(this,t,!0)}focusButton(){setTimeout(()=>{var t;(t=c(this,Un)??c(this,ZA))==null||t.focus()},0)}onUpdatedColor(){if(!c(this,Un))return;const t=c(this,Dr).commentButtonColor;t&&(c(this,Un).style.backgroundColor=t),c(this,Dr)._uiManager.updatePopupColor(c(this,Dr))}get commentButtonWidth(){var t;return(((t=c(this,Un))==null?void 0:t.getBoundingClientRect().width)??0)/c(this,Dr).parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(c(this,zu))return c(this,zu);if(!c(this,Un))return null;const{x:t,y:e,height:r}=c(this,Un).getBoundingClientRect(),{x:i,y:s,width:A,height:a}=c(this,Dr).parent.boundingClientRect;return[(t-i)/A,(e+r-s)/a]}set commentPopupPositionInLayer(t){C(this,zu,t)}hasDefaultPopupPosition(){return c(this,zu)===null}removeStandaloneCommentButton(){var t;(t=c(this,Un))==null||t.remove(),C(this,Un,null)}removeToolbarCommentButton(){var t;(t=c(this,ZA))==null||t.remove(),C(this,ZA,null)}setCommentButtonStates({selected:t,hasPopup:e}){c(this,Un)&&(c(this,Un).classList.toggle("selected",t),c(this,Un).ariaExpanded=e)}edit(t){const e=this.commentPopupPositionInLayer;let r,i;if(e)[r,i]=e;else{[r,i]=c(this,Dr).commentButtonPosition;const{width:h,height:u,x:d,y:f}=c(this,Dr);r=d+r*h,i=f+i*u}const s=c(this,Dr).parent.boundingClientRect,{x:A,y:a,width:o,height:l}=s;c(this,Dr)._uiManager.editComment(c(this,Dr),A+r*o,a+i*l,{...t,parentDimensions:s})}finish(){c(this,ZA)&&(c(this,ZA).focus({focusVisible:c(this,Wu)}),C(this,Wu,!1))}isDeleted(){return c(this,ph)||c(this,ta)===""}isEmpty(){return c(this,ta)===null}hasBeenEdited(){return this.isDeleted()||c(this,ta)!==c(this,Iv)}serialize(){return this.data}get data(){return{text:c(this,ta),richText:c(this,dh),date:c(this,gh),deleted:this.isDeleted()}}set data(t){if(t!==c(this,ta)&&C(this,dh,null),t===null){C(this,ta,""),C(this,ph,!0);return}C(this,ta,t),C(this,gh,new Date),C(this,ph,!1)}restoreData({text:t,richText:e,date:r}){C(this,ta,t),C(this,dh,e),C(this,gh,r),C(this,ph,!1)}setInitialText(t,e=null){C(this,Iv,t),this.data=t,C(this,gh,null),C(this,dh,e)}shown(){}destroy(){var t,e;(t=c(this,ZA))==null||t.remove(),C(this,ZA,null),(e=c(this,Un))==null||e.remove(),C(this,Un,null),C(this,ta,""),C(this,dh,null),C(this,gh,null),C(this,Dr,null),C(this,Wu,!1),C(this,ph,!1)}}Un=new WeakMap,ZA=new WeakMap,Wu=new WeakMap,Dr=new WeakMap,Iv=new WeakMap,dh=new WeakMap,ta=new WeakMap,gh=new WeakMap,ph=new WeakMap,zu=new WeakMap,Uv=new WeakSet,N4=function(t,e){if(!c(this,Dr)._uiManager.hasCommentManager())return null;t.tabIndex="0",t.ariaHasPopup="dialog",e?(t.ariaControls="commentPopup",t.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(t.ariaControlsElements=[c(this,Dr)._uiManager.getCommentDialogElement()],t.setAttribute("data-l10n-id","pdfjs-editor-add-comment-button"));const r=c(this,Dr)._uiManager._signal;if(!(r instanceof AbortSignal)||r.aborted)return t;t.addEventListener("contextmenu",nA,{signal:r}),e&&(t.addEventListener("focusin",s=>{c(this,Dr)._focusEventsAllowed=!1,Jr(s)},{capture:!0,signal:r}),t.addEventListener("focusout",s=>{c(this,Dr)._focusEventsAllowed=!0,Jr(s)},{capture:!0,signal:r})),t.addEventListener("pointerdown",s=>s.stopPropagation(),{signal:r});const i=s=>{s.preventDefault(),t===c(this,ZA)?this.edit():c(this,Dr).toggleComment(!0)};return t.addEventListener("click",i,{capture:!0,signal:r}),t.addEventListener("keydown",s=>{s.target===t&&s.key==="Enter"&&(C(this,Wu,!0),i(s))},{signal:r}),t.addEventListener("pointerenter",()=>{c(this,Dr).toggleComment(!1,!0)},{signal:r}),t.addEventListener("pointerleave",()=>{c(this,Dr).toggleComment(!1,!1)},{signal:r}),t};const KF=class KF{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:r=null,onPinchStart:i=null,onPinching:s=null,onPinchEnd:A=null,signal:a}){T(this,mh);T(this,Zg);T(this,Xu,!1);T(this,Lv,null);T(this,Qv);T(this,Nv);T(this,Pv);T(this,Mv);T(this,Tl,null);T(this,qu);T(this,_l,null);T(this,Yu);T(this,Il,null);C(this,Zg,t),C(this,Lv,r),C(this,Qv,e),C(this,Nv,i),C(this,Pv,s),C(this,Mv,A),C(this,Yu,new AbortController),C(this,qu,AbortSignal.any([a,c(this,Yu).signal])),t.addEventListener("touchstart",I(this,mh,_D).bind(this),{passive:!1,signal:c(this,qu)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/ya.pixelRatio}destroy(){var t,e;(t=c(this,Yu))==null||t.abort(),C(this,Yu,null),(e=c(this,Tl))==null||e.abort(),C(this,Tl,null)}};Zg=new WeakMap,Xu=new WeakMap,Lv=new WeakMap,Qv=new WeakMap,Nv=new WeakMap,Pv=new WeakMap,Mv=new WeakMap,Tl=new WeakMap,qu=new WeakMap,_l=new WeakMap,Yu=new WeakMap,Il=new WeakMap,mh=new WeakSet,_D=function(t){var i,s,A;if((i=c(this,Qv))!=null&&i.call(this))return;if(t.touches.length===1){if(c(this,Tl))return;const a=C(this,Tl,new AbortController),o=AbortSignal.any([c(this,qu),a.signal]),l=c(this,Zg),h={capture:!0,signal:o,passive:!1},u=d=>{var f;d.pointerType==="touch"&&((f=c(this,Tl))==null||f.abort(),C(this,Tl,null))};l.addEventListener("pointerdown",d=>{d.pointerType==="touch"&&(Jr(d),u(d))},h),l.addEventListener("pointerup",u,h),l.addEventListener("pointercancel",u,h);return}if(!c(this,Il)){C(this,Il,new AbortController);const a=AbortSignal.any([c(this,qu),c(this,Il).signal]),o=c(this,Zg),l={signal:a,capture:!1,passive:!1};o.addEventListener("touchmove",I(this,mh,ID).bind(this),l);const h=I(this,mh,UD).bind(this);o.addEventListener("touchend",h,l),o.addEventListener("touchcancel",h,l),l.capture=!0,o.addEventListener("pointerdown",Jr,l),o.addEventListener("pointermove",Jr,l),o.addEventListener("pointercancel",Jr,l),o.addEventListener("pointerup",Jr,l),(s=c(this,Nv))==null||s.call(this)}if(Jr(t),t.touches.length!==2||(A=c(this,Lv))!=null&&A.call(this)){C(this,_l,null);return}let[e,r]=t.touches;e.identifier>r.identifier&&([e,r]=[r,e]),C(this,_l,{touch0X:e.screenX,touch0Y:e.screenY,touch1X:r.screenX,touch1Y:r.screenY})},ID=function(t){var S;if(!c(this,_l)||t.touches.length!==2)return;Jr(t);let[e,r]=t.touches;e.identifier>r.identifier&&([e,r]=[r,e]);const{screenX:i,screenY:s}=e,{screenX:A,screenY:a}=r,o=c(this,_l),{touch0X:l,touch0Y:h,touch1X:u,touch1Y:d}=o,f=u-l,p=d-h,m=A-i,y=a-s,w=Math.hypot(m,y)||1,B=Math.hypot(f,p)||1;if(!c(this,Xu)&&Math.abs(B-w)<=KF.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(o.touch0X=i,o.touch0Y=s,o.touch1X=A,o.touch1Y=a,!c(this,Xu)){C(this,Xu,!0);return}const E=[(i+A)/2,(s+a)/2];(S=c(this,Pv))==null||S.call(this,E,B,w)},UD=function(t){var e;t.touches.length>=2||(c(this,Il)&&(c(this,Il).abort(),C(this,Il,null),(e=c(this,Mv))==null||e.call(this)),c(this,_l)&&(Jr(t),C(this,_l,null),C(this,Xu,!1)))};let cm=KF;const Qe=class Qe{constructor(t){T(this,pe);T(this,Ju,null);T(this,La,null);T(this,ei,null);T(this,pr,null);T(this,Ul,null);T(this,tp,!1);T(this,vh,null);T(this,kv,"");T(this,Ln,null);T(this,Zu,null);T(this,Ll,null);T(this,ea,null);T(this,wh,null);T(this,Ov,"");T(this,tf,!1);T(this,hA,null);T(this,Dv,!1);T(this,ef,!1);T(this,Ql,!1);T(this,Fo,null);T(this,ep,0);T(this,rp,0);T(this,ra,null);T(this,rf,null);ct(this,"isSelected",!1);ct(this,"_isCopy",!1);ct(this,"_editToolbar",null);ct(this,"_initialOptions",Object.create(null));ct(this,"_initialData",null);ct(this,"_isVisible",!0);ct(this,"_uiManager",null);ct(this,"_focusEventsAllowed",!0);T(this,Rv,!1);T(this,tB,Qe._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null,this.creationDate=t.creationDate||new Date,this.modificationDate=t.modificationDate||null,this.canAddComment=!0;const{rotation:e,rawDims:{pageWidth:r,pageHeight:i,pageX:s,pageY:A}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[s,A];const[a,o]=this.parentDimensions;this.x=t.x/a,this.y=t.y/o,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=Qe.prototype._resizeWithKeyboard,e=kc.TRANSLATE_SMALL,r=kc.TRANSLATE_BIG;return Se(this,"_resizerKeyboardManager",new lm([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,r]}],[["Escape","mac+Escape"],Qe.prototype._stopResizingWithKeyboard]]))}updatePageIndex(t){this.pageIndex=t}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return Se(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new oK({id:t._uiManager.getId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){if(Qe._l10n??(Qe._l10n=t),Qe._l10nResizer||(Qe._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),Qe._borderLineWidth!==-1)return;const r=getComputedStyle(document.documentElement);Qe._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){lr("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return c(this,Rv)}set _isDraggable(t){var e;C(this,Rv,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=c(this,tB)}setParent(t){var e;t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):(I(this,pe,Ew).call(this),(e=c(this,ea))==null||e.remove(),C(this,ea,null)),this.parent=t}focusin(t){this._focusEventsAllowed&&(c(this,tf)?C(this,tf,!1):this.parent.setSelected(this))}focusout(t){var r;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(r=this.parent)!=null&&r.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,r,i){const[s,A]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(t+r)/s,this.y=(e+i)/A,this.fixAndSetPosition()}_moveAfterPaste(t,e){if(this.isClone){delete this.isClone;return}const[r,i]=this.parentDimensions;this.setAt(t*r,e*i,this.width*r,this.height*i),this._onTranslated()}translate(t,e){I(this,pe,P4).call(this,this.parentDimensions,t,e)}translateInPage(t,e){c(this,hA)||C(this,hA,[this.x,this.y,this.width,this.height]),I(this,pe,P4).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,e){c(this,hA)||C(this,hA,[this.x,this.y,this.width,this.height]);const{div:r,parentDimensions:[i,s]}=this;if(this.x+=t/i,this.y+=e/s,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:u,y:d}=this.div.getBoundingClientRect();this.parent.findNewParent(this,u,d)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:A,y:a}=this;const[o,l]=this.getBaseTranslation();A+=o,a+=l;const{style:h}=r;h.left=`${(100*A).toFixed(2)}%`,h.top=`${(100*a).toFixed(2)}%`,this._onTranslating(A,a),r.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!c(this,hA)&&(c(this,hA)[0]!==this.x||c(this,hA)[1]!==this.y)}get _hasBeenResized(){return!!c(this,hA)&&(c(this,hA)[2]!==this.width||c(this,hA)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:r}=Qe,i=r/t,s=r/e;switch(this.rotation){case 90:return[-i,s];case 180:return[i,s];case 270:return[i,-s];default:return[-i,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[r,i]}=this;let{x:s,y:A,width:a,height:o}=this;if(a*=r,o*=i,s*=r,A*=i,this._mustFixPosition)switch(t){case 0:s=Gr(s,0,r-a),A=Gr(A,0,i-o);break;case 90:s=Gr(s,0,r-o),A=Gr(A,a,i);break;case 180:s=Gr(s,a,r),A=Gr(A,o,i);break;case 270:s=Gr(s,o,r),A=Gr(A,0,i-a);break}this.x=s/=r,this.y=A/=i;const[l,h]=this.getBaseTranslation();s+=l,A+=h,e.left=`${(100*s).toFixed(2)}%`,e.top=`${(100*A).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var r;return I(r=Qe,Hv,M4).call(r,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var r;return I(r=Qe,Hv,M4).call(r,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,r]}=this;return[e*t,r*t]}setDims(){const{div:{style:t},width:e,height:r}=this;t.width=`${(100*e).toFixed(2)}%`,t.height=`${(100*r).toFixed(2)}%`}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=c(this,ei))==null||t.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||c(this,ef))return this._editToolbar;this._editToolbar=new R5(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[e,r]of t)await this._editToolbar.addButton(e,r);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){var t;(t=this._editToolbar)==null||t.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){var t;(t=this._editToolbar)==null||t.removeButton("comment")}removeEditToolbar(){var t,e;(t=this._editToolbar)==null||t.remove(),this._editToolbar=null,(e=c(this,ei))==null||e.destroy()}addContainer(t){var r;const e=(r=this._editToolbar)==null?void 0:r.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return c(this,ei)||(T2.initialize(Qe._l10n),C(this,ei,new T2(this)),c(this,Ju)&&(c(this,ei).data=c(this,Ju),C(this,Ju,null))),c(this,ei)}get altTextData(){var t;return(t=c(this,ei))==null?void 0:t.data}set altTextData(t){c(this,ei)&&(c(this,ei).data=t)}get guessedAltText(){var t;return(t=c(this,ei))==null?void 0:t.guessedText}async setGuessedAltText(t){var e;await((e=c(this,ei))==null?void 0:e.setGuessedText(t))}serializeAltText(t){var e;return(e=c(this,ei))==null?void 0:e.serialize(t)}hasAltText(){return!!c(this,ei)&&!c(this,ei).isEmpty()}hasAltTextData(){var t;return((t=c(this,ei))==null?void 0:t.hasData())??!1}focusCommentButton(){var t;(t=c(this,pr))==null||t.focusButton()}addCommentButton(){return this.canAddComment?c(this,pr)||C(this,pr,new _2(this)):null}addStandaloneCommentButton(){if(this._uiManager.hasCommentManager()){if(c(this,Ul)){this._uiManager.isEditingMode()&&c(this,Ul).classList.remove("hidden");return}this.hasComment&&(C(this,Ul,c(this,pr).renderForStandalone()),this.div.append(c(this,Ul)))}}removeStandaloneCommentButton(){c(this,pr).removeStandaloneCommentButton(),C(this,Ul,null)}hideStandaloneCommentButton(){var t;(t=c(this,Ul))==null||t.classList.add("hidden")}get comment(){if(!c(this,pr))return null;const{data:{richText:t,text:e,date:r,deleted:i}}=c(this,pr);return{text:e,richText:t,date:r,deleted:i,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(t){c(this,pr)||C(this,pr,new _2(this)),typeof t=="object"&&t!==null?c(this,pr).restoreData(t):c(this,pr).data=t,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:t,popupRef:e,richText:r}){if(!e||(c(this,pr)||C(this,pr,new _2(this)),c(this,pr).setInitialText(t,r),!this.annotationElementId))return;const i=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);i&&this.updateFromAnnotationLayer(i)}get hasEditedComment(){var t;return(t=c(this,pr))==null?void 0:t.hasBeenEdited()}get hasDeletedComment(){var t;return(t=c(this,pr))==null?void 0:t.isDeleted()}get hasComment(){return!!c(this,pr)&&!c(this,pr).isEmpty()&&!c(this,pr).isDeleted()}async editComment(t){c(this,pr)||C(this,pr,new _2(this)),c(this,pr).edit(t)}toggleComment(t,e=void 0){this.hasComment&&this._uiManager.toggleComment(this,t,e)}setSelectedCommentButton(t){c(this,pr).setSelectedButton(t)}addComment(t){if(this.hasEditedComment){const[,,,i]=t.rect,[s]=this.pageDimensions,[A]=this.pageTranslation,a=A+s+1,o=i-100,l=a+180;t.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[a,o,l,i]}}}updateFromAnnotationLayer({popup:{contents:t,deleted:e}}){c(this,pr).data=e?null:t}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){var A;const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=c(this,tp)?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),I(this,pe,R4).call(this);const[e,r]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*r/e).toFixed(2)}%`,t.style.maxHeight=`${(100*e/r).toFixed(2)}%`);const[i,s]=this.getInitialTranslation();return this.translate(i,s),UU(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(c(this,rf)||C(this,rf,new cm({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:I(this,pe,ND).bind(this),onPinching:I(this,pe,PD).bind(this),onPinchEnd:I(this,pe,MD).bind(this),signal:this._uiManager._signal}))),this.addStandaloneCommentButton(),(A=this._uiManager._editorUndoBar)==null||A.hide(),t}pointerdown(t){const{isMac:e}=Ti.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(C(this,tf,!0),this._isDraggable){I(this,pe,kD).call(this,t);return}I(this,pe,D4).call(this,t)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){c(this,Fo)&&clearTimeout(c(this,Fo)),C(this,Fo,setTimeout(()=>{var t;C(this,Fo,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,r){t.changeParent(this),this.x=e,this.y=r,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,r=this.rotation){const i=this.parentScale,[s,A]=this.pageDimensions,[a,o]=this.pageTranslation,l=t/i,h=e/i,u=this.x*s,d=this.y*A,f=this.width*s,p=this.height*A;switch(r){case 0:return[u+l+a,A-d-h-p+o,u+l+f+a,A-d-h+o];case 90:return[u+h+a,A-d+l+o,u+h+p+a,A-d+l+f+o];case 180:return[u-l-f+a,A-d+h+o,u-l+a,A-d+h+p+o];case 270:return[u-h-p+a,A-d-l-f+o,u-h+a,A-d-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[r,i,s,A]=t,a=s-r,o=A-i;switch(this.rotation){case 0:return[r,e-A,a,o];case 90:return[r,e-i,o,a];case 180:return[s,e-i,a,o];case 270:return[s,e-A,o,a];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&Qe._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){var t;(t=c(this,pr))==null||t.onUpdatedColor()}getData(){const{comment:{text:t,color:e,date:r,opacity:i,deleted:s,richText:A},uid:a,pageIndex:o,creationDate:l,modificationDate:h}=this;return{id:a,pageIndex:o,rect:this.getPDFRect(),richText:A,contentsObj:{str:t},creationDate:l,modificationDate:r||h,popupRef:!s,color:e,opacity:i}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),C(this,ef,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),C(this,ef,!1),!0):!1}isInEditMode(){return c(this,ef)}shouldGetKeyboardEvents(){return c(this,Ql)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:r,right:i}=this.getClientDimensions(),{innerHeight:s,innerWidth:A}=window;return e<A&&i>0&&t<s&&r>0}rebuild(){I(this,pe,R4).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){var r;return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:((r=this._initialData)==null?void 0:r.popupRef)||""}}static async deserialize(t,e,r){const i=new this.prototype.constructor({parent:e,id:r.getId(),uiManager:r,annotationElementId:t.annotationElementId,creationDate:t.creationDate,modificationDate:t.modificationDate});i.rotation=t.rotation,C(i,Ju,t.accessibilityData),i._isCopy=t.isCopy||!1;const[s,A]=i.pageDimensions,[a,o,l,h]=i.getRectInCurrentCoords(t.rect,A);return i.x=a/s,i.y=o/A,i.width=l/s,i.height=h/A,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e,r;if((t=c(this,wh))==null||t.abort(),C(this,wh,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.hideCommentPopup(),c(this,Fo)&&(clearTimeout(c(this,Fo)),C(this,Fo,null)),I(this,pe,Ew).call(this),this.removeEditToolbar(),c(this,ra)){for(const i of c(this,ra).values())clearTimeout(i);C(this,ra,null)}this.parent=null,(e=c(this,rf))==null||e.destroy(),C(this,rf,null),(r=c(this,ea))==null||r.remove(),C(this,ea,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(I(this,pe,LD).call(this),c(this,Ln).classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){const{commentButtonPosition:[t,e]}=this,[r,i,s,A]=this.getPDFRect();return[Qe._round(r+(s-r)*t),Qe._round(i+(A-i)*(1-e))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return c(this,pr).commentPopupPositionInLayer}set commentPopupPosition(t){c(this,pr).commentPopupPositionInLayer=t}hasDefaultPopupPosition(){return c(this,pr).hasDefaultPopupPosition()}get commentButtonWidth(){return c(this,pr).commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(t){var e;(e=c(this,pr))==null||e.setCommentButtonStates(t)}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),C(this,Ll,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=c(this,Ln).children;if(!c(this,La)){C(this,La,Array.from(e));const A=I(this,pe,OD).bind(this),a=I(this,pe,DD).bind(this),o=this._uiManager._signal;for(const l of c(this,La)){const h=l.getAttribute("data-resizer-name");l.setAttribute("role","spinbutton"),l.addEventListener("keydown",A,{signal:o}),l.addEventListener("blur",a,{signal:o}),l.addEventListener("focus",I(this,pe,RD).bind(this,h),{signal:o}),l.setAttribute("data-l10n-id",Qe._l10nResizer[h])}}const r=c(this,La)[0];let i=0;for(const A of e){if(A===r)break;i++}const s=(360-this.rotation+this.parentRotation)%360/90*(c(this,La).length/4);if(s!==i){if(s<i)for(let a=0;a<i-s;a++)c(this,Ln).append(c(this,Ln).firstElementChild);else if(s>i)for(let a=0;a<s-i;a++)c(this,Ln).firstElementChild.before(c(this,Ln).lastElementChild);let A=0;for(const a of e){const l=c(this,La)[A++].getAttribute("data-resizer-name");a.setAttribute("data-l10n-id",Qe._l10nResizer[l])}}I(this,pe,H4).call(this,0),C(this,Ql,!0),c(this,Ln).firstElementChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(t,e){c(this,Ql)&&I(this,pe,O4).call(this,c(this,Ov),{deltaX:t,deltaY:e,fromKeyboard:!0})}_stopResizingWithKeyboard(){I(this,pe,Ew).call(this),this.div.focus()}select(){var t,e,r;if(this.isSelected&&this._editToolbar){this._editToolbar.show();return}if(this.isSelected=!0,this.makeResizable(),(t=this.div)==null||t.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var i,s;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((s=this._editToolbar)==null||s.show())});return}(e=this._editToolbar)==null||e.show(),(r=c(this,ei))==null||r.toggleAltTextBadge(!1)}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>{var t;return(t=this.div)==null?void 0:t.focus({preventScroll:!0})},0)}unselect(){var t,e,r,i,s;this.isSelected&&(this.isSelected=!1,(t=c(this,Ln))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(s=c(this,ei))==null||s.toggleAltTextBadge(!0),this.hideCommentPopup())}hideCommentPopup(){this.hasComment&&this._uiManager.toggleComment(null)}updateParams(t,e){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){t.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.uid}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return c(this,Dv)}set isEditing(t){C(this,Dv,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){c(this,ra)||C(this,ra,new Map);const{action:r}=t;let i=c(this,ra).get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(t),c(this,ra).delete(r),c(this,ra).size===0&&C(this,ra,null)},Qe._telemetryTimeout),c(this,ra).set(r,i);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),C(this,tp,!1)}disable(){this.div&&(this.div.tabIndex=-1),C(this,tp,!0)}updateFakeAnnotationElement(t){if(!c(this,ea)&&!this.deleted){C(this,ea,t.addFakeAnnotation(this));return}if(this.deleted){c(this,ea).remove(),C(this,ea,null);return}(this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&c(this,ea).updateEdited({rect:this.getPDFRect(),popup:this.comment})}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const r=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),r.before(e)}return e}resetAnnotationElement(t){const{firstElementChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};Ju=new WeakMap,La=new WeakMap,ei=new WeakMap,pr=new WeakMap,Ul=new WeakMap,tp=new WeakMap,vh=new WeakMap,kv=new WeakMap,Ln=new WeakMap,Zu=new WeakMap,Ll=new WeakMap,ea=new WeakMap,wh=new WeakMap,Ov=new WeakMap,tf=new WeakMap,hA=new WeakMap,Dv=new WeakMap,ef=new WeakMap,Ql=new WeakMap,Fo=new WeakMap,ep=new WeakMap,rp=new WeakMap,ra=new WeakMap,rf=new WeakMap,Rv=new WeakMap,tB=new WeakMap,pe=new WeakSet,P4=function([t,e],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/t,this.y+=i/e,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},Hv=new WeakSet,M4=function(t,e,r){switch(r){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},JB=function(t){switch(t){case 90:{const[e,r]=this.pageDimensions;return[0,-e/r,r/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,r]=this.pageDimensions;return[0,e/r,-r/e,0]}default:return[1,0,0,1]}},LD=function(){if(c(this,Ln))return;C(this,Ln,document.createElement("div")),c(this,Ln).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const r of t){const i=document.createElement("div");c(this,Ln).append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",I(this,pe,QD).bind(this,r),{signal:e}),i.addEventListener("contextmenu",nA,{signal:e}),i.tabIndex=-1}this.div.prepend(c(this,Ln))},QD=function(t,e){var h;e.preventDefault();const{isMac:r}=Ti.platform;if(e.button!==0||e.ctrlKey&&r)return;(h=c(this,ei))==null||h.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,C(this,Zu,[e.screenX,e.screenY]);const s=new AbortController,A=this._uiManager.combinedSignal(s);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",I(this,pe,O4).bind(this,t),{passive:!0,capture:!0,signal:A}),window.addEventListener("touchmove",Jr,{passive:!1,signal:A}),window.addEventListener("contextmenu",nA,{signal:A}),C(this,Ll,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const a=this.parent.div.style.cursor,o=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const l=()=>{var u;s.abort(),this.parent.togglePointerEvents(!0),(u=c(this,ei))==null||u.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=a,this.div.style.cursor=o,I(this,pe,ZB).call(this)};window.addEventListener("pointerup",l,{signal:A}),window.addEventListener("blur",l,{signal:A})},k4=function(t,e,r,i){this.width=r,this.height=i,this.x=t,this.y=e,this.setDims(),this.fixAndSetPosition(),this._onResized()},ZB=function(){if(!c(this,Ll))return;const{savedX:t,savedY:e,savedWidth:r,savedHeight:i}=c(this,Ll);C(this,Ll,null);const s=this.x,A=this.y,a=this.width,o=this.height;s===t&&A===e&&a===r&&o===i||this.addCommands({cmd:I(this,pe,k4).bind(this,s,A,a,o),undo:I(this,pe,k4).bind(this,t,e,r,i),mustExec:!0})},O4=function(t,e){const[r,i]=this.parentDimensions,s=this.x,A=this.y,a=this.width,o=this.height,l=Qe.MIN_SIZE/r,h=Qe.MIN_SIZE/i,u=I(this,pe,JB).call(this,this.rotation),d=(rt,it)=>[u[0]*rt+u[2]*it,u[1]*rt+u[3]*it],f=I(this,pe,JB).call(this,360-this.rotation),p=(rt,it)=>[f[0]*rt+f[2]*it,f[1]*rt+f[3]*it];let m,y,w=!1,B=!1;switch(t){case"topLeft":w=!0,m=(rt,it)=>[0,0],y=(rt,it)=>[rt,it];break;case"topMiddle":m=(rt,it)=>[rt/2,0],y=(rt,it)=>[rt/2,it];break;case"topRight":w=!0,m=(rt,it)=>[rt,0],y=(rt,it)=>[0,it];break;case"middleRight":B=!0,m=(rt,it)=>[rt,it/2],y=(rt,it)=>[0,it/2];break;case"bottomRight":w=!0,m=(rt,it)=>[rt,it],y=(rt,it)=>[0,0];break;case"bottomMiddle":m=(rt,it)=>[rt/2,it],y=(rt,it)=>[rt/2,0];break;case"bottomLeft":w=!0,m=(rt,it)=>[0,it],y=(rt,it)=>[rt,0];break;case"middleLeft":B=!0,m=(rt,it)=>[0,it/2],y=(rt,it)=>[rt,it/2];break}const E=m(a,o),S=y(a,o);let _=d(...S);const L=Qe._round(s+_[0]),k=Qe._round(A+_[1]);let H=1,Q=1,W,U;if(e.fromKeyboard)({deltaX:W,deltaY:U}=e);else{const{screenX:rt,screenY:it}=e,[At,ut]=c(this,Zu);[W,U]=this.screenToPageTranslation(rt-At,it-ut),c(this,Zu)[0]=rt,c(this,Zu)[1]=it}if([W,U]=p(W/r,U/i),w){const rt=Math.hypot(a,o);H=Q=Math.max(Math.min(Math.hypot(S[0]-E[0]-W,S[1]-E[1]-U)/rt,1/a,1/o),l/a,h/o)}else B?H=Gr(Math.abs(S[0]-E[0]-W),l,1)/a:Q=Gr(Math.abs(S[1]-E[1]-U),h,1)/o;const D=Qe._round(a*H),j=Qe._round(o*Q);_=d(...y(D,j));const V=L-_[0],st=k-_[1];c(this,hA)||C(this,hA,[this.x,this.y,this.width,this.height]),this.width=D,this.height=j,this.x=V,this.y=st,this.setDims(),this.fixAndSetPosition(),this._onResizing()},ND=function(){var t;C(this,Ll,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(t=c(this,ei))==null||t.toggle(!1),this.parent.togglePointerEvents(!1)},PD=function(t,e,r){let s=.7*(r/e)+1-.7;if(s===1)return;const A=I(this,pe,JB).call(this,this.rotation),a=(L,k)=>[A[0]*L+A[2]*k,A[1]*L+A[3]*k],[o,l]=this.parentDimensions,h=this.x,u=this.y,d=this.width,f=this.height,p=Qe.MIN_SIZE/o,m=Qe.MIN_SIZE/l;s=Math.max(Math.min(s,1/d,1/f),p/d,m/f);const y=Qe._round(d*s),w=Qe._round(f*s);if(y===d&&w===f)return;c(this,hA)||C(this,hA,[h,u,d,f]);const B=a(d/2,f/2),E=Qe._round(h+B[0]),S=Qe._round(u+B[1]),_=a(y/2,w/2);this.x=E-_[0],this.y=S-_[1],this.width=y,this.height=w,this.setDims(),this.fixAndSetPosition(),this._onResizing()},MD=function(){var t;(t=c(this,ei))==null||t.toggle(!0),this.parent.togglePointerEvents(!0),I(this,pe,ZB).call(this)},D4=function(t){const{isMac:e}=Ti.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},kD=function(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let r=!1;const i=new AbortController,s=this._uiManager.combinedSignal(i),A={capture:!0,passive:!1,signal:s},a=l=>{i.abort(),C(this,vh,null),C(this,tf,!1),this._uiManager.endDragSession()||I(this,pe,D4).call(this,l),r&&this._onStopDragging()};e&&(C(this,ep,t.clientX),C(this,rp,t.clientY),C(this,vh,t.pointerId),C(this,kv,t.pointerType),window.addEventListener("pointermove",l=>{r||(r=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());const{clientX:h,clientY:u,pointerId:d}=l;if(d!==c(this,vh)){Jr(l);return}const[f,p]=this.screenToPageTranslation(h-c(this,ep),u-c(this,rp));C(this,ep,h),C(this,rp,u),this._uiManager.dragSelectedEditors(f,p)},A),window.addEventListener("touchmove",Jr,A),window.addEventListener("pointerdown",l=>{l.pointerType===c(this,kv)&&(c(this,rf)||l.isPrimary)&&a(l),Jr(l)},A));const o=l=>{if(!c(this,vh)||c(this,vh)===l.pointerId){a(l);return}Jr(l)};window.addEventListener("pointerup",o,{signal:s}),window.addEventListener("blur",o,{signal:s})},R4=function(){if(c(this,wh)||!this.div)return;C(this,wh,new AbortController);const t=this._uiManager.combinedSignal(c(this,wh));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},OD=function(t){Qe._resizerKeyboardManager.exec(this,t)},DD=function(t){var e;c(this,Ql)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==c(this,Ln)&&I(this,pe,Ew).call(this)},RD=function(t){C(this,Ov,c(this,Ql)?t:"")},H4=function(t){if(c(this,La))for(const e of c(this,La))e.tabIndex=t},Ew=function(){C(this,Ql,!1),I(this,pe,H4).call(this,-1),I(this,pe,ZB).call(this)},T(Qe,Hv),ct(Qe,"_l10n",null),ct(Qe,"_l10nResizer",null),ct(Qe,"_borderLineWidth",-1),ct(Qe,"_colorManager",new K5),ct(Qe,"_zIndex",1),ct(Qe,"_telemetryTimeout",1e3);let Mr=Qe;class oK extends Mr{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const LU=3285377520,RA=4294901760,lo=65535;class V5{constructor(t){this.h1=t?t&4294967295:LU,this.h2=t?t&4294967295:LU}update(t){let e,r;if(typeof t=="string"){e=new Uint8Array(t.length*2),r=0;for(let m=0,y=t.length;m<y;m++){const w=t.charCodeAt(m);w<=255?e[r++]=w:(e[r++]=w>>>8,e[r++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),r=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=r>>2,s=r-i*4,A=new Uint32Array(e.buffer,0,i);let a=0,o=0,l=this.h1,h=this.h2;const u=3432918353,d=461845907,f=u&lo,p=d&lo;for(let m=0;m<i;m++)m&1?(a=A[m],a=a*u&RA|a*f&lo,a=a<<15|a>>>17,a=a*d&RA|a*p&lo,l^=a,l=l<<13|l>>>19,l=l*5+3864292196):(o=A[m],o=o*u&RA|o*f&lo,o=o<<15|o>>>17,o=o*d&RA|o*p&lo,h^=o,h=h<<13|h>>>19,h=h*5+3864292196);switch(a=0,s){case 3:a^=e[i*4+2]<<16;case 2:a^=e[i*4+1]<<8;case 1:a^=e[i*4],a=a*u&RA|a*f&lo,a=a<<15|a>>>17,a=a*d&RA|a*p&lo,i&1?l^=a:h^=a}this.h1=l,this.h2=h}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&RA|t*36045&lo,e=e*4283543511&RA|((e<<16|t>>>16)*2950163797&RA)>>>16,t^=e>>>1,t=t*444984403&RA|t*60499&lo,e=e*3301882366&RA|((e<<16|t>>>16)*3120437893&RA)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const hm=Object.freeze({map:null,hash:"",transfer:void 0});class G5{constructor(){T(this,eB);T(this,nf,!1);T(this,sf,null);T(this,Nl,null);T(this,Qn,new Map);ct(this,"onSetModified",null);ct(this,"onResetModified",null);ct(this,"onAnnotationEditor",null)}getValue(t,e){const r=c(this,Qn).get(t);return r===void 0?e:Object.assign(e,r)}getRawValue(t){return c(this,Qn).get(t)}remove(t){var r;const e=c(this,Qn).get(t);e!==void 0&&(e instanceof Mr&&c(this,Nl).delete(e.annotationElementId),c(this,Qn).delete(t),c(this,Qn).size===0&&this.resetModified(),!c(this,Qn).values().some(i=>i instanceof Mr)&&((r=this.onAnnotationEditor)==null||r.call(this,null)))}setValue(t,e){var s;const r=c(this,Qn).get(t);let i=!1;if(r!==void 0)for(const[A,a]of Object.entries(e))r[A]!==a&&(i=!0,r[A]=a);else i=!0,c(this,Qn).set(t,e);i&&I(this,eB,HD).call(this),e instanceof Mr&&((c(this,Nl)||C(this,Nl,new Map)).set(e.annotationElementId,e),(s=this.onAnnotationEditor)==null||s.call(this,e.constructor._type))}has(t){return c(this,Qn).has(t)}get size(){return c(this,Qn).size}resetModified(){var t;c(this,nf)&&(C(this,nf,!1),(t=this.onResetModified)==null||t.call(this))}get print(){return new QU(this)}get serializable(){if(c(this,Qn).size===0)return hm;const t=new Map,e=new V5,r=[],i=Object.create(null);let s=!1;for(const[A,a]of c(this,Qn)){const o=a instanceof Mr?a.serialize(!1,i):a;a.page&&(a.pageIndex=a.page._pageIndex,delete a.page),o&&(t.set(A,o),e.update(`${A}:${JSON.stringify(o)}`),s||(s=!!o.bitmap))}if(s)for(const A of t.values())A.bitmap&&r.push(A.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:r}:hm}get editorStats(){let t=null;const e=new Map;let r=0,i=0;for(const s of c(this,Qn).values()){if(!(s instanceof Mr)){s.popup&&(s.popup.deleted?i+=1:r+=1);continue}s.isCommentDeleted?i+=1:s.hasEditedComment&&(r+=1);const A=s.telemetryFinalData;if(!A)continue;const{type:a}=A;e.has(a)||e.set(a,Object.getPrototypeOf(s).constructor),t||(t=Object.create(null));const o=t[a]||(t[a]=new Map);for(const[l,h]of Object.entries(A)){if(l==="type")continue;const u=o.getOrInsertComputed(l,b2);u.set(h,(u.get(h)??0)+1)}}if((i>0||r>0)&&(t||(t=Object.create(null)),t.comments={deleted:i,edited:r}),!t)return null;for(const[s,A]of e)t[s]=A.computeTelemetryFinalData(t[s]);return t}resetModifiedIds(){C(this,sf,null)}updateEditor(t,e){var i;const r=(i=c(this,Nl))==null?void 0:i.get(t);return r?(r.updateFromAnnotationLayer(e),!0):!1}getEditor(t){var e;return((e=c(this,Nl))==null?void 0:e.get(t))||null}get modifiedIds(){if(c(this,sf))return c(this,sf);const t=[];if(c(this,Nl))for(const r of c(this,Nl).values())r.serialize()&&t.push(r.annotationElementId);let e="";if(t.length){const r=new V5;r.update(t.join(",")),e=r.hexdigest()}return C(this,sf,{ids:new Set(t),hash:e})}[Symbol.iterator](){return c(this,Qn).entries()}}nf=new WeakMap,sf=new WeakMap,Nl=new WeakMap,Qn=new WeakMap,eB=new WeakSet,HD=function(){var t;c(this,nf)||(C(this,nf,!0),(t=this.onSetModified)==null||t.call(this))};class QU extends G5{constructor(e){super();T(this,Kv,hm);const{serializable:r}=e;if(r===hm)return;const{map:i,hash:s,transfer:A}=r,a=structuredClone(i,A?{transfer:A}:null);C(this,Kv,{map:a,hash:s,transfer:[]})}get print(){lr("Should not call PrintAnnotationStorage.print")}get serializable(){return c(this,Kv)}get modifiedIds(){return Se(this,"modifiedIds",{ids:new Set,hash:""})}}Kv=new WeakMap;const qd="__forcedDependency",{floor:NU,ceil:PU}=Math;function MU(n,t,e,r,i,s){n[t*4+0]=Math.min(n[t*4+0],e),n[t*4+1]=Math.min(n[t*4+1],r),n[t*4+2]=Math.max(n[t*4+2],i),n[t*4+3]=Math.max(n[t*4+3],s)}const j5=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];class lK{constructor(t,e){T(this,ip);T(this,yh);C(this,ip,t),C(this,yh,e)}get length(){return c(this,ip).length}isEmpty(t){return c(this,ip)[t]===j5}minX(t){return c(this,yh)[t*4+0]/256}minY(t){return c(this,yh)[t*4+1]/256}maxX(t){return(c(this,yh)[t*4+2]+1)/256}maxY(t){return(c(this,yh)[t*4+3]+1)/256}}ip=new WeakMap,yh=new WeakMap;const kU=(n,t)=>n==null?void 0:n.getOrInsertComputed(t,()=>({dependencies:new Set,isRenderingOperation:!1}));class cK{constructor(t,e){T(this,Vv);T(this,Pl,[[1,0,0,1,0,0]]);T(this,ur,[-1/0,-1/0,1/0,1/0]);T(this,$r,new Float64Array(il));ct(this,"_pendingBBoxIdx",-1);T(this,Af);T(this,af);T(this,of);T(this,ts);ct(this,"_savesStack",[]);ct(this,"_markedContentStack",[]);C(this,Af,t.width),C(this,af,t.height),I(this,Vv,K4).call(this,e)}growOperationsCount(t){t>=c(this,ts).length&&I(this,Vv,K4).call(this,t,c(this,ts))}get clipBox(){return c(this,ur)}save(t){return C(this,ur,{__proto__:c(this,ur)}),this._savesStack.push(t),this}restore(t,e){const r=Object.getPrototypeOf(c(this,ur));if(r===null)return this;C(this,ur,r);const i=this._savesStack.pop();return i!==void 0&&(e==null||e(i,t),c(this,ts)[t]=c(this,ts)[i]),this}recordOpenMarker(t){return this._savesStack.push(t),this}getOpenMarker(){return this._savesStack.length===0?null:this._savesStack.at(-1)}recordCloseMarker(t,e){const r=this._savesStack.pop();return r!==void 0&&(e==null||e(r,t),c(this,ts)[t]=c(this,ts)[r]),this}beginMarkedContent(t){return this._markedContentStack.push(t),this}endMarkedContent(t,e){const r=this._markedContentStack.pop();return r!==void 0&&(e==null||e(r,t),c(this,ts)[t]=c(this,ts)[r]),this}pushBaseTransform(t){return c(this,Pl).push(Qt.multiplyByDOMMatrix(c(this,Pl).at(-1),t.getTransform())),this}popBaseTransform(){return c(this,Pl).length>1&&c(this,Pl).pop(),this}resetBBox(t){return this._pendingBBoxIdx!==t&&(this._pendingBBoxIdx=t,c(this,$r).set(il,0)),this}recordClipBox(t,e,r,i,s,A){const a=Qt.multiplyByDOMMatrix(c(this,Pl).at(-1),e.getTransform()),o=il.slice();Qt.axialAlignedBoundingBox([r,s,i,A],a,o);const l=Qt.intersect(c(this,ur),o);return l?(c(this,ur)[0]=l[0],c(this,ur)[1]=l[1],c(this,ur)[2]=l[2],c(this,ur)[3]=l[3]):(c(this,ur)[0]=c(this,ur)[1]=1/0,c(this,ur)[2]=c(this,ur)[3]=-1/0),this}recordBBox(t,e,r,i,s,A){const a=c(this,ur);if(a[0]===1/0)return this;const o=Qt.multiplyByDOMMatrix(c(this,Pl).at(-1),e.getTransform());if(a[0]===-1/0)return Qt.axialAlignedBoundingBox([r,s,i,A],o,c(this,$r)),this;const l=il.slice();return Qt.axialAlignedBoundingBox([r,s,i,A],o,l),c(this,$r)[0]=Gr(l[0],a[0],c(this,$r)[0]),c(this,$r)[1]=Gr(l[1],a[1],c(this,$r)[1]),c(this,$r)[2]=Gr(l[2],c(this,$r)[2],a[2]),c(this,$r)[3]=Gr(l[3],c(this,$r)[3],a[3]),this}recordFullPageBBox(t){return c(this,$r)[0]=Math.max(0,c(this,ur)[0]),c(this,$r)[1]=Math.max(0,c(this,ur)[1]),c(this,$r)[2]=Math.min(c(this,Af),c(this,ur)[2]),c(this,$r)[3]=Math.min(c(this,af),c(this,ur)[3]),this}recordOperation(t,e=!1,r){if(this._pendingBBoxIdx!==t)return this;const i=NU(c(this,$r)[0]*256/c(this,Af)),s=NU(c(this,$r)[1]*256/c(this,af)),A=PU(c(this,$r)[2]*256/c(this,Af)),a=PU(c(this,$r)[3]*256/c(this,af));if(MU(c(this,of),t,i,s,A,a),r)for(const o of r)for(const l of o)l!==t&&MU(c(this,of),l,i,s,A,a);return e||(this._pendingBBoxIdx=-1),this}bboxToClipBoxDropOperation(t){return this._pendingBBoxIdx===t&&(this._pendingBBoxIdx=-1,c(this,ur)[0]=Math.max(c(this,ur)[0],c(this,$r)[0]),c(this,ur)[1]=Math.max(c(this,ur)[1],c(this,$r)[1]),c(this,ur)[2]=Math.min(c(this,ur)[2],c(this,$r)[2]),c(this,ur)[3]=Math.min(c(this,ur)[3],c(this,$r)[3])),this}take(){return new lK(c(this,ts),c(this,of))}takeDebugMetadata(){throw new Error("Unreachable")}recordSimpleData(t,e){return this}recordIncrementalData(t,e){return this}resetIncrementalData(t,e){return this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,r){return this}recordFutureForcedDependency(t,e){return this}inheritSimpleDataAsFutureForcedDependencies(t){return this}inheritPendingDependenciesAsFutureForcedDependencies(){return this}recordCharacterBBox(t,e,r,i=1,s=0,A=0,a){return this}getSimpleIndex(t){}recordDependencies(t,e){return this}recordNamedDependency(t,e){return this}recordShowTextOperation(t,e=!1){return this}}Pl=new WeakMap,ur=new WeakMap,$r=new WeakMap,Af=new WeakMap,af=new WeakMap,of=new WeakMap,ts=new WeakMap,Vv=new WeakSet,K4=function(t,e){const r=new ArrayBuffer(t*4);C(this,of,new Uint8ClampedArray(r)),C(this,ts,new Uint32Array(r)),e&&e.length>0?(c(this,ts).set(e),c(this,ts).fill(j5,e.length)):c(this,ts).fill(j5)};class hK{constructor(t,e=!1){T(this,Vs,{__proto__:null});T(this,Gs,{__proto__:null,transform:[],moveText:[],sameLineText:[],[qd]:[]});T(this,lf,new Map);T(this,Qa,new Set);T(this,np,new Map);T(this,bh);T(this,Bh);T(this,xr);C(this,xr,t),e&&(C(this,bh,new Map),C(this,Bh,(r,i)=>{kU(c(this,bh),i).dependencies.add(r)}))}get clipBox(){return c(this,xr).clipBox}growOperationsCount(t){c(this,xr).growOperationsCount(t)}save(t){return C(this,Vs,{__proto__:c(this,Vs)}),C(this,Gs,{__proto__:c(this,Gs),transform:{__proto__:c(this,Gs).transform},moveText:{__proto__:c(this,Gs).moveText},sameLineText:{__proto__:c(this,Gs).sameLineText},[qd]:{__proto__:c(this,Gs)[qd]}}),c(this,xr).save(t),this}restore(t){c(this,xr).restore(t,c(this,Bh));const e=Object.getPrototypeOf(c(this,Vs));return e===null?this:(C(this,Vs,e),C(this,Gs,Object.getPrototypeOf(c(this,Gs))),this)}recordOpenMarker(t){return c(this,xr).recordOpenMarker(t,c(this,Bh)),this}getOpenMarker(){return c(this,xr).getOpenMarker()}recordCloseMarker(t){return c(this,xr).recordCloseMarker(t,c(this,Bh)),this}beginMarkedContent(t){return c(this,xr).beginMarkedContent(t),this}endMarkedContent(t){return c(this,xr).endMarkedContent(t,c(this,Bh)),this}pushBaseTransform(t){return c(this,xr).pushBaseTransform(t),this}popBaseTransform(){return c(this,xr).popBaseTransform(),this}recordSimpleData(t,e){return c(this,Vs)[t]=e,this}recordIncrementalData(t,e){return c(this,Gs)[t].push(e),this}resetIncrementalData(t,e){return c(this,Gs)[t].length=0,this}recordNamedData(t,e){return c(this,lf).set(t,e),this}recordSimpleDataFromNamed(t,e,r){c(this,Vs)[t]=c(this,lf).get(e)??r}recordFutureForcedDependency(t,e){return this.recordIncrementalData(qd,e),this}inheritSimpleDataAsFutureForcedDependencies(t){for(const e of t)e in c(this,Vs)&&this.recordFutureForcedDependency(e,c(this,Vs)[e]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const t of c(this,Qa))this.recordFutureForcedDependency(qd,t);return this}resetBBox(t){return c(this,xr).resetBBox(t),this}recordClipBox(t,e,r,i,s,A){return c(this,xr).recordClipBox(t,e,r,i,s,A),this}recordBBox(t,e,r,i,s,A){return c(this,xr).recordBBox(t,e,r,i,s,A),this}recordCharacterBBox(t,e,r,i=1,s=0,A=0,a){const o=r.bbox;let l,h;if(o&&(l=o[2]!==o[0]&&o[3]!==o[1]&&c(this,np).get(r),l!==!1&&(h=[0,0,0,0],Qt.axialAlignedBoundingBox(o,r.fontMatrix,h),(i!==1||s!==0||A!==0)&&Qt.scaleMinMax([i,0,0,-i,s,A],h),l)))return this.recordBBox(t,e,h[0],h[2],h[1],h[3]);if(!a)return this.recordFullPageBBox(t);const u=a();return o&&h&&l===void 0&&(l=h[0]<=s-u.actualBoundingBoxLeft&&h[2]>=s+u.actualBoundingBoxRight&&h[1]<=A-u.actualBoundingBoxAscent&&h[3]>=A+u.actualBoundingBoxDescent,c(this,np).set(r,l),l)?this.recordBBox(t,e,h[0],h[2],h[1],h[3]):this.recordBBox(t,e,s-u.actualBoundingBoxLeft,s+u.actualBoundingBoxRight,A-u.actualBoundingBoxAscent,A+u.actualBoundingBoxDescent)}recordFullPageBBox(t){return c(this,xr).recordFullPageBBox(t),this}getSimpleIndex(t){return c(this,Vs)[t]}recordDependencies(t,e){const r=c(this,Qa),i=c(this,Vs),s=c(this,Gs);for(const A of e)A in c(this,Vs)?r.add(i[A]):A in s&&s[A].forEach(r.add,r);return this}recordNamedDependency(t,e){return c(this,lf).has(e)&&c(this,Qa).add(c(this,lf).get(e)),this}recordOperation(t,e=!1){if(this.recordDependencies(t,[qd]),c(this,bh)){const i=kU(c(this,bh),t),{dependencies:s}=i;c(this,Qa).forEach(s.add,s),c(this,xr)._savesStack.forEach(s.add,s),c(this,xr)._markedContentStack.forEach(s.add,s),s.delete(t),i.isRenderingOperation=!0}const r=!e&&t===c(this,xr)._pendingBBoxIdx;return c(this,xr).recordOperation(t,e,[c(this,Qa),c(this,xr)._savesStack,c(this,xr)._markedContentStack]),r&&c(this,Qa).clear(),this}recordShowTextOperation(t,e=!1){const r=Array.from(c(this,Qa));this.recordOperation(t,e),this.recordIncrementalData("sameLineText",t);for(const i of r)this.recordIncrementalData("sameLineText",i);return this}bboxToClipBoxDropOperation(t,e=!1){const r=!e&&t===c(this,xr)._pendingBBoxIdx;return c(this,xr).bboxToClipBoxDropOperation(t),r&&c(this,Qa).clear(),this}take(){return c(this,np).clear(),c(this,xr).take()}takeDebugMetadata(){return c(this,bh)}}Vs=new WeakMap,Gs=new WeakMap,lf=new WeakMap,Qa=new WeakMap,np=new WeakMap,bh=new WeakMap,Bh=new WeakMap,xr=new WeakMap;const VF=class VF{constructor(t,e,r){T(this,Er);T(this,mi);T(this,Na);T(this,sp,0);T(this,Ap,0);if(t instanceof VF&&c(t,Na)===!!r)return t;C(this,Er,t),C(this,mi,e),C(this,Na,!!r)}get clipBox(){return c(this,Er).clipBox}growOperationsCount(){throw new Error("Unreachable")}save(t){return Yi(this,Ap)._++,c(this,Er).save(c(this,mi)),this}restore(t){return c(this,Ap)>0&&(c(this,Er).restore(c(this,mi)),Yi(this,Ap)._--),this}recordOpenMarker(t){return Yi(this,sp)._++,this}getOpenMarker(){return c(this,sp)>0?c(this,mi):c(this,Er).getOpenMarker()}recordCloseMarker(t){return Yi(this,sp)._--,this}beginMarkedContent(t){return this}endMarkedContent(t){return this}pushBaseTransform(t){return c(this,Er).pushBaseTransform(t),this}popBaseTransform(){return c(this,Er).popBaseTransform(),this}recordSimpleData(t,e){return c(this,Er).recordSimpleData(t,c(this,mi)),this}recordIncrementalData(t,e){return c(this,Er).recordIncrementalData(t,c(this,mi)),this}resetIncrementalData(t,e){return c(this,Er).resetIncrementalData(t,c(this,mi)),this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,r){return c(this,Er).recordSimpleDataFromNamed(t,e,c(this,mi)),this}recordFutureForcedDependency(t,e){return c(this,Er).recordFutureForcedDependency(t,c(this,mi)),this}inheritSimpleDataAsFutureForcedDependencies(t){return c(this,Er).inheritSimpleDataAsFutureForcedDependencies(t),this}inheritPendingDependenciesAsFutureForcedDependencies(){return c(this,Er).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(t){return c(this,Na)||c(this,Er).resetBBox(c(this,mi)),this}recordClipBox(t,e,r,i,s,A){return c(this,Na)||c(this,Er).recordClipBox(c(this,mi),e,r,i,s,A),this}recordBBox(t,e,r,i,s,A){return c(this,Na)||c(this,Er).recordBBox(c(this,mi),e,r,i,s,A),this}recordCharacterBBox(t,e,r,i,s,A,a){return c(this,Na)||c(this,Er).recordCharacterBBox(c(this,mi),e,r,i,s,A,a),this}recordFullPageBBox(t){return c(this,Na)||c(this,Er).recordFullPageBBox(c(this,mi)),this}getSimpleIndex(t){return c(this,Er).getSimpleIndex(t)}recordDependencies(t,e){return c(this,Er).recordDependencies(c(this,mi),e),this}recordNamedDependency(t,e){return c(this,Er).recordNamedDependency(c(this,mi),e),this}recordOperation(t){return c(this,Er).recordOperation(c(this,mi),!0),this}recordShowTextOperation(t){return c(this,Er).recordShowTextOperation(c(this,mi),!0),this}bboxToClipBoxDropOperation(t){return c(this,Na)||c(this,Er).bboxToClipBoxDropOperation(c(this,mi),!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}};Er=new WeakMap,mi=new WeakMap,Na=new WeakMap,sp=new WeakMap,Ap=new WeakMap;let um=VF;const HA={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["filter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],transform:["transform"],transformAndFill:["transform","fillColor"]},jv=class jv{constructor(t){T(this,cf);T(this,hf);T(this,uf,4);T(this,ff,0);T(this,df,new(c(jv,Gv))(c(this,uf)*6));C(this,cf,t.width),C(this,hf,t.height)}record(t,e,r,i){if(c(this,ff)===c(this,uf)){C(this,uf,c(this,uf)*2);const a=new(c(jv,Gv))(c(this,uf)*6);a.set(c(this,df)),C(this,df,a)}const s=Qt.domMatrixToTransform(t.getTransform());let A;if(i[0]!==1/0){const a=il.slice();Qt.axialAlignedBoundingBox([0,-r,e,0],s,a);const o=Qt.intersect(i,a);if(!o)return;const[l,h,u,d]=o;if(l!==a[0]||h!==a[1]||u!==a[2]||d!==a[3]){const f=Math.atan2(s[1],s[0]),p=Math.abs(Math.sin(f)),m=Math.abs(Math.cos(f));if(p<1e-6||m<1e-6||Math.abs(p-m)<1e-6)A=[l,h,l,d,u,h];else{const y=u-l,w=d-h,B=p*p,E=m*m,S=m*p,_=E-B,L=(w*E-y*S)/_,k=(w*S-y*B)/_;A=[l+k,h,l,h+L,u,d-L]}}}A||(A=[0,-r,0,0,e,-r],Qt.applyTransform(A,s,0),Qt.applyTransform(A,s,2),Qt.applyTransform(A,s,4)),A[0]/=c(this,cf),A[1]/=c(this,hf),A[2]/=c(this,cf),A[3]/=c(this,hf),A[4]/=c(this,cf),A[5]/=c(this,hf),c(this,df).set(A,c(this,ff)*6),Yi(this,ff)._++}take(){return c(this,df).subarray(0,c(this,ff)*6)}};cf=new WeakMap,hf=new WeakMap,uf=new WeakMap,ff=new WeakMap,df=new WeakMap,Gv=new WeakMap,T(jv,Gv,Ti.isFloat16ArraySupported?Float16Array:Float32Array);let $5=jv;class uK{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){T(this,ap,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),c(this,ap).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:e,_inspectFont:r}){if(!(!t||c(this,ap).has(t.loadedName))){if(ni(!e,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:s,style:A}=t,a=new FontFace(i,s,A);this.addNativeFontFace(a);try{await a.load(),c(this,ap).add(i),r==null||r(t)}catch{Ue(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(a)}return}lr("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const r=t.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw Ue(`Failed to load font '${r.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(t,i)})}}get isFontLoadingAPISupported(){var e;const t=!!((e=this._document)!=null&&e.fonts);return Se(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return Se(this,"isSyncFontLoadingSupported",rA||Ti.platform.isFirefox)}_queueLoadingCallback(t){function e(){for(ni(!i.done,"completeRequest() cannot be called twice."),i.done=!0;r.length>0&&r[0].done;){const s=r.shift();setTimeout(s.callback,0)}}const{loadingRequests:r}=this,i={done:!1,complete:e,callback:t};return r.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return Se(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function r(_,L){return _.charCodeAt(L)<<24|_.charCodeAt(L+1)<<16|_.charCodeAt(L+2)<<8|_.charCodeAt(L+3)&255}function i(_){return String.fromCharCode(_>>24&255,_>>16&255,_>>8&255,_&255)}function s(_,L,k,H){const Q=_.substring(0,L),W=_.substring(L+k);return Q+H+W}let A,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function u(_,L){if(++h>30){Ue("Load test font never loaded."),L();return}if(l.font="30px "+_,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){L();return}setTimeout(u.bind(null,_,L))}const d=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=s(f,976,d.length,d);const m=16,y=1482184792;let w=r(f,m);for(A=0,a=d.length-3;A<a;A+=4)w=w-y+r(d,A)|0;A<d.length&&(w=w-y+r(d+"XXX",A)|0),f=s(f,m,4,i(w));const B=`url(data:font/opentype;base64,${btoa(f)});`,E=`@font-face {font-family:"${d}";src:${B}}`;this.insertRule(E);const S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(const _ of[t.loadedName,d]){const L=this._document.createElement("span");L.textContent="Hi",L.style.fontFamily=_,S.append(L)}this._document.body.append(S),u(d,()=>{S.remove(),e.complete()})}}ap=new WeakMap;class fK{constructor(t,e=null,r,i){ct(this,"compiledGlyphs",Object.create(null));T(this,Sr);C(this,Sr,t),this._inspectFont=e,r&&(this.charProcOperatorList=r),i&&Object.assign(this,i)}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var r;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${this.data.toBase64()});`;let e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${t}}`}return(r=this._inspectFont)==null||r.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const r=this.loadedName+"_path_"+e;let i;try{i=t.get(r)}catch(A){Ue(`getPathGenerator - ignoring character: "${A}".`)}const s=IU(i==null?void 0:i.path);return this.fontExtraProperties||t.delete(r),this.compiledGlyphs[e]=s}get black(){return c(this,Sr).black}get bold(){return c(this,Sr).bold}get disableFontFace(){return c(this,Sr).disableFontFace}set disableFontFace(t){Se(this,"disableFontFace",!!t)}get fontExtraProperties(){return c(this,Sr).fontExtraProperties}get isInvalidPDFjsFont(){return c(this,Sr).isInvalidPDFjsFont}get isType3Font(){return c(this,Sr).isType3Font}get italic(){return c(this,Sr).italic}get missingFile(){return c(this,Sr).missingFile}get remeasure(){return c(this,Sr).remeasure}get vertical(){return c(this,Sr).vertical}get ascent(){return c(this,Sr).ascent}get defaultWidth(){return c(this,Sr).defaultWidth}get descent(){return c(this,Sr).descent}get bbox(){return c(this,Sr).bbox}get fontMatrix(){return c(this,Sr).fontMatrix}get fallbackName(){return c(this,Sr).fallbackName}get loadedName(){return c(this,Sr).loadedName}get mimetype(){return c(this,Sr).mimetype}get name(){return c(this,Sr).name}get data(){return c(this,Sr).data}clearData(){c(this,Sr).clearData()}get cssFontInfo(){return c(this,Sr).cssFontInfo}get systemFontInfo(){return c(this,Sr).systemFontInfo}get defaultVMetrics(){return c(this,Sr).defaultVMetrics}}Sr=new WeakMap;class OU{}ct(OU,"strings",["fontFamily","fontWeight","italicAngle"]);class DU{}ct(DU,"strings",["css","loadedName","baseFontName","src"]);const es=class es{};ct(es,"bools",["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"]),ct(es,"numbers",["ascent","defaultWidth","descent"]),ct(es,"strings",["fallbackName","loadedName","mimetype","name"]),ct(es,"OFFSET_NUMBERS",Math.ceil(es.bools.length*2/8)),ct(es,"OFFSET_BBOX",es.OFFSET_NUMBERS+es.numbers.length*8),ct(es,"OFFSET_FONT_MATRIX",es.OFFSET_BBOX+1+2*4),ct(es,"OFFSET_DEFAULT_VMETRICS",es.OFFSET_FONT_MATRIX+1+8*6),ct(es,"OFFSET_STRINGS",es.OFFSET_DEFAULT_VMETRICS+1+2*3);let sA=es;class ds{}ct(ds,"KIND",0),ct(ds,"HAS_BBOX",1),ct(ds,"HAS_BACKGROUND",2),ct(ds,"SHADING_TYPE",3),ct(ds,"N_COORD",4),ct(ds,"N_COLOR",8),ct(ds,"N_STOP",12),ct(ds,"N_FIGURES",16);class dK{constructor(t){T(this,lp);T(this,$v);T(this,rB,new TextDecoder);T(this,op);C(this,$v,t),C(this,op,new DataView(t))}get fontFamily(){return I(this,lp,tC).call(this,0)}get fontWeight(){return I(this,lp,tC).call(this,1)}get italicAngle(){return I(this,lp,tC).call(this,2)}}$v=new WeakMap,rB=new WeakMap,op=new WeakMap,lp=new WeakSet,tC=function(t){ni(t<OU.strings.length,"Invalid string index");let e=0;for(let i=0;i<t;i++)e+=c(this,op).getUint32(e)+4;const r=c(this,op).getUint32(e);return c(this,rB).decode(new Uint8Array(c(this,$v),e+4,r))};class gK{constructor(t){T(this,pf);T(this,gf);T(this,cp,new TextDecoder);T(this,To);C(this,gf,t),C(this,To,new DataView(t))}get guessFallback(){return c(this,To).getUint8(0)!==0}get css(){return I(this,pf,Sw).call(this,0)}get loadedName(){return I(this,pf,Sw).call(this,1)}get baseFontName(){return I(this,pf,Sw).call(this,2)}get src(){return I(this,pf,Sw).call(this,3)}get style(){let t=1;t+=4+c(this,To).getUint32(t);const e=c(this,To).getUint32(t),r=c(this,cp).decode(new Uint8Array(c(this,gf),t+4,e));t+=4+e;const i=c(this,To).getUint32(t),s=c(this,cp).decode(new Uint8Array(c(this,gf),t+4,i));return{style:r,weight:s}}}gf=new WeakMap,cp=new WeakMap,To=new WeakMap,pf=new WeakSet,Sw=function(t){ni(t<DU.strings.length,"Invalid string index");let e=5;for(let i=0;i<t;i++)e+=c(this,To).getUint32(e)+4;const r=c(this,To).getUint32(e);return c(this,cp).decode(new Uint8Array(c(this,gf),e+4,r))};class pK{constructor({buffer:t,extra:e}){T(this,mr);T(this,Pa);T(this,iB,new TextDecoder);T(this,Qi);C(this,Pa,t),C(this,Qi,new DataView(t)),e&&Object.assign(this,e)}get black(){return I(this,mr,eo).call(this,0)}get bold(){return I(this,mr,eo).call(this,1)}get disableFontFace(){return I(this,mr,eo).call(this,2)}get fontExtraProperties(){return I(this,mr,eo).call(this,3)}get isInvalidPDFjsFont(){return I(this,mr,eo).call(this,4)}get isType3Font(){return I(this,mr,eo).call(this,5)}get italic(){return I(this,mr,eo).call(this,6)}get missingFile(){return I(this,mr,eo).call(this,7)}get remeasure(){return I(this,mr,eo).call(this,8)}get vertical(){return I(this,mr,eo).call(this,9)}get ascent(){return I(this,mr,eC).call(this,0)}get defaultWidth(){return I(this,mr,eC).call(this,1)}get descent(){return I(this,mr,eC).call(this,2)}get bbox(){return I(this,mr,rC).call(this,sA.OFFSET_BBOX,4,"getInt16",2)}get fontMatrix(){return I(this,mr,rC).call(this,sA.OFFSET_FONT_MATRIX,6,"getFloat64",8)}get defaultVMetrics(){return I(this,mr,rC).call(this,sA.OFFSET_DEFAULT_VMETRICS,3,"getInt16",2)}get fallbackName(){return I(this,mr,Fw).call(this,0)}get loadedName(){return I(this,mr,Fw).call(this,1)}get mimetype(){return I(this,mr,Fw).call(this,2)}get name(){return I(this,mr,Fw).call(this,3)}get data(){const{offset:t,length:e}=I(this,mr,V4).call(this);return e===0?void 0:new Uint8Array(c(this,Pa),t+4,e)}clearData(){const{offset:t,length:e}=I(this,mr,V4).call(this);e!==0&&(c(this,Qi).setUint32(t,0),C(this,Pa,new Uint8Array(c(this,Pa),0,t+4).slice().buffer),C(this,Qi,new DataView(c(this,Pa))))}get cssFontInfo(){let t=sA.OFFSET_STRINGS;const e=c(this,Qi).getUint32(t);t+=4+e;const r=c(this,Qi).getUint32(t);t+=4+r;const i=c(this,Qi).getUint32(t);if(i===0)return null;const s=new Uint8Array(i);return s.set(new Uint8Array(c(this,Pa),t+4,i)),new dK(s.buffer)}get systemFontInfo(){let t=sA.OFFSET_STRINGS;const e=c(this,Qi).getUint32(t);t+=4+e;const r=c(this,Qi).getUint32(t);if(r===0)return null;const i=new Uint8Array(r);return i.set(new Uint8Array(c(this,Pa),t+4,r)),new gK(i.buffer)}}Pa=new WeakMap,iB=new WeakMap,Qi=new WeakMap,mr=new WeakSet,eo=function(t){ni(t<sA.bools.length,"Invalid boolean index");const e=Math.floor(t/4),r=t*2%8,i=c(this,Qi).getUint8(e)>>r&3;return i===0?void 0:i===2},eC=function(t){return ni(t<sA.numbers.length,"Invalid number index"),c(this,Qi).getFloat64(sA.OFFSET_NUMBERS+t*8)},rC=function(t,e,r,i){const s=c(this,Qi).getUint8(t);if(s===0)return;ni(s===e,"Invalid array length."),t+=1;const A=new Array(s);for(let a=0;a<s;a++)A[a]=c(this,Qi)[r](t,!0),t+=i;return A},Fw=function(t){ni(t<sA.strings.length,"Invalid string index");let e=sA.OFFSET_STRINGS+4;for(let i=0;i<t;i++)e+=c(this,Qi).getUint32(e)+4;const r=c(this,Qi).getUint32(e);return c(this,iB).decode(new Uint8Array(c(this,Pa),e+4,r))},V4=function(){let t=sA.OFFSET_STRINGS;const e=c(this,Qi).getUint32(t);t+=4+e;const r=c(this,Qi).getUint32(t);t+=4+r;const i=c(this,Qi).getUint32(t);t+=4+i;const s=c(this,Qi).getUint32(t);return{offset:t,length:s}};class mK{constructor(t){this.buffer=t,this.view=new DataView(t),this.data=new Uint8Array(t)}getIR(){const t=this.view,e=this.data[ds.KIND],r=!!this.data[ds.HAS_BBOX],i=!!this.data[ds.HAS_BACKGROUND],s=t.getUint32(ds.N_COORD,!0),A=t.getUint32(ds.N_COLOR,!0),a=t.getUint32(ds.N_STOP,!0);let o=20;const l=new Float32Array(this.buffer,o,s*2);o+=s*8;const h=new Uint8Array(this.buffer,o,A*4);o+=A*4;const u=[];for(let p=0;p<a;++p){const m=t.getFloat32(o,!0);o+=4;const y=t.getUint32(o,!0);o+=4,u.push([m,`#${y.toString(16).padStart(6,"0")}`])}let d=null;if(r){d=[];for(let p=0;p<4;++p)d.push(t.getFloat32(o,!0)),o+=4}let f=null;if(i&&(f=new Uint8Array(this.buffer,o,3),o+=3),e===1)return["RadialAxial","axial",d,u,Array.from(l.slice(0,2)),Array.from(l.slice(2,4)),null,null];if(e===2)return["RadialAxial","radial",d,u,[l[0],l[1]],[l[3],l[4]],l[2],l[5]];if(e===3){const p=this.data[ds.SHADING_TYPE];let m=null;if(l.length>0){m=il.slice();for(let y=0,w=l.length;y<w;y+=2)Qt.pointBoundingBox(l[y],l[y+1],m)}return["Mesh",p,l,h,s,m,d,f]}throw new Error(`Unsupported pattern kind: ${e}`)}}class vK{constructor(t){T(this,hp);C(this,hp,t)}get path(){return Ti.isFloat16ArraySupported?new Float16Array(c(this,hp)):new Float32Array(c(this,hp))}}hp=new WeakMap;function wK(n){if(n instanceof URL)return n;if(typeof n=="string"){if(rA){if(/^[a-z][a-z0-9\-+.]+:/i.test(n))return new URL(n);const e=process.getBuiltinModule("url");return new URL(e.pathToFileURL(n))}const t=URL.parse(n,window.location);if(t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function yK(n){if(rA&&typeof Buffer<"u"&&n instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength)return n;if(typeof n=="string")return w2(n);if(n instanceof ArrayBuffer||ArrayBuffer.isView(n)||typeof n=="object"&&!isNaN(n==null?void 0:n.length))return new Uint8Array(n);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function I2(n){if(typeof n!="string")return null;if(n.endsWith("/"))return n;throw new Error(`Invalid factory url: "${n}" must include trailing slash.`)}const W5=n=>typeof n=="object"&&Number.isInteger(n==null?void 0:n.num)&&n.num>=0&&Number.isInteger(n==null?void 0:n.gen)&&n.gen>=0,bK=n=>typeof n=="object"&&typeof(n==null?void 0:n.name)=="string",RU=eK.bind(null,W5,bK);class BK{constructor(){T(this,Ml,new Map);T(this,nB,Promise.resolve())}postMessage(t,e){const r={data:structuredClone(t,e?{transfer:e}:null)};c(this,nB).then(()=>{for(const[i]of c(this,Ml))i.call(this,r)})}addEventListener(t,e,r=null){let i=null;if((r==null?void 0:r.signal)instanceof AbortSignal){const{signal:s}=r;if(s.aborted){Ue("LoopbackPort - cannot use an `aborted` signal.");return}const A=()=>this.removeEventListener(t,e);i=()=>s.removeEventListener("abort",A),s.addEventListener("abort",A)}c(this,Ml).set(e,i)}removeEventListener(t,e){const r=c(this,Ml).get(e);r==null||r(),c(this,Ml).delete(e)}terminate(){for(const[,t]of c(this,Ml))t==null||t();c(this,Ml).clear()}}Ml=new WeakMap,nB=new WeakMap;const U2={DATA:1,ERROR:2},Hi={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function HU(){}function ks(n){if(n instanceof sl||n instanceof v2||n instanceof pU||n instanceof im||n instanceof N5)return n;switch(n instanceof Error||typeof n=="object"&&n!==null||lr('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),n.name){case"AbortException":return new sl(n.message);case"InvalidPDFException":return new v2(n.message);case"PasswordException":return new pU(n.message,n.code);case"ResponseException":return new im(n.message,n.status,n.missing);case"UnknownErrorException":return new N5(n.message,n.details)}return new N5(n.message,n.toString())}class fm{constructor(t,e,r){T(this,ia);T(this,up,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=r,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),r.addEventListener("message",I(this,ia,KD).bind(this),{signal:c(this,up).signal})}on(t,e){const r=this.actionHandler;if(r[t])throw new Error(`There is already an actionName called "${t}"`);r[t]=e}send(t,e,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},r)}sendWithPromise(t,e,r){const i=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[i]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},r)}catch(A){s.reject(A)}return s.promise}sendWithStream(t,e,r,i){const s=this.streamId++,A=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:l=>{const h=Promise.withResolvers();return this.streamControllers[s]={controller:l,startCall:h,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:A,targetName:a,action:t,streamId:s,data:e,desiredSize:l.desiredSize},i),h.promise},pull:l=>{const h=Promise.withResolvers();return this.streamControllers[s].pullCall=h,o.postMessage({sourceName:A,targetName:a,stream:Hi.PULL,streamId:s,desiredSize:l.desiredSize}),h.promise},cancel:l=>{ni(l instanceof Error,"cancel must have a valid reason");const h=Promise.withResolvers();return this.streamControllers[s].cancelCall=h,this.streamControllers[s].isClosed=!0,o.postMessage({sourceName:A,targetName:a,stream:Hi.CANCEL,streamId:s,reason:ks(l)}),h.promise}},r)}destroy(){var t;(t=c(this,up))==null||t.abort(),C(this,up,null)}}up=new WeakMap,ia=new WeakSet,KD=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){I(this,ia,GD).call(this,t);return}if(t.callback){const r=t.callbackId,i=this.callbackCapabilities[r];if(!i)throw new Error(`Cannot resolve callback ${r}`);if(delete this.callbackCapabilities[r],t.callback===U2.DATA)i.resolve(t.data);else if(t.callback===U2.ERROR)i.reject(ks(t.reason));else throw new Error("Unexpected callback case");return}const e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const r=this.sourceName,i=t.sourceName,s=this.comObj;Promise.try(e,t.data).then(function(A){s.postMessage({sourceName:r,targetName:i,callback:U2.DATA,callbackId:t.callbackId,data:A})},function(A){s.postMessage({sourceName:r,targetName:i,callback:U2.ERROR,callbackId:t.callbackId,reason:ks(A)})});return}if(t.streamId){I(this,ia,VD).call(this,t);return}e(t.data)},VD=function(t){const e=t.streamId,r=this.sourceName,i=t.sourceName,s=this.comObj,A=this,a=this.actionHandler[t.action],o={enqueue(l,h=1,u){if(this.isCancelled)return;const d=this.desiredSize;this.desiredSize-=h,d>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:r,targetName:i,stream:Hi.ENQUEUE,streamId:e,chunk:l},u)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:r,targetName:i,stream:Hi.CLOSE,streamId:e}),delete A.streamSinks[e])},error(l){ni(l instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,s.postMessage({sourceName:r,targetName:i,stream:Hi.ERROR,streamId:e,reason:ks(l)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[e]=o,Promise.try(a,t.data,o).then(function(){s.postMessage({sourceName:r,targetName:i,stream:Hi.START_COMPLETE,streamId:e,success:!0})},function(l){s.postMessage({sourceName:r,targetName:i,stream:Hi.START_COMPLETE,streamId:e,reason:ks(l)})})},GD=function(t){const e=t.streamId,r=this.sourceName,i=t.sourceName,s=this.comObj,A=this.streamControllers[e],a=this.streamSinks[e];switch(t.stream){case Hi.START_COMPLETE:t.success?A.startCall.resolve():A.startCall.reject(ks(t.reason));break;case Hi.PULL_COMPLETE:t.success?A.pullCall.resolve():A.pullCall.reject(ks(t.reason));break;case Hi.PULL:if(!a){s.postMessage({sourceName:r,targetName:i,stream:Hi.PULL_COMPLETE,streamId:e,success:!0});break}a.desiredSize<=0&&t.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=t.desiredSize,Promise.try(a.onPull||HU).then(function(){s.postMessage({sourceName:r,targetName:i,stream:Hi.PULL_COMPLETE,streamId:e,success:!0})},function(l){s.postMessage({sourceName:r,targetName:i,stream:Hi.PULL_COMPLETE,streamId:e,reason:ks(l)})});break;case Hi.ENQUEUE:if(ni(A,"enqueue should have stream controller"),A.isClosed)break;A.controller.enqueue(t.chunk);break;case Hi.CLOSE:if(ni(A,"close should have stream controller"),A.isClosed)break;A.isClosed=!0,A.controller.close(),I(this,ia,iC).call(this,A,e);break;case Hi.ERROR:ni(A,"error should have stream controller"),A.controller.error(ks(t.reason)),I(this,ia,iC).call(this,A,e);break;case Hi.CANCEL_COMPLETE:t.success?A.cancelCall.resolve():A.cancelCall.reject(ks(t.reason)),I(this,ia,iC).call(this,A,e);break;case Hi.CANCEL:if(!a)break;const o=ks(t.reason);Promise.try(a.onCancel||HU,o).then(function(){s.postMessage({sourceName:r,targetName:i,stream:Hi.CANCEL_COMPLETE,streamId:e,success:!0})},function(l){s.postMessage({sourceName:r,targetName:i,stream:Hi.CANCEL_COMPLETE,streamId:e,reason:ks(l)})}),a.sinkCapability.reject(o),a.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},iC=async function(t,e){var r,i,s;await Promise.allSettled([(r=t.startCall)==null?void 0:r.promise,(i=t.pullCall)==null?void 0:i.promise,(s=t.cancelCall)==null?void 0:s.promise]),delete this.streamControllers[e]};class KU{constructor({cMapUrl:t=null,standardFontDataUrl:e=null,wasmUrl:r=null}){T(this,sB,Object.freeze({cMapUrl:"CMap",standardFontDataUrl:"font",wasmUrl:"wasm"}));this.cMapUrl=t,this.standardFontDataUrl=e,this.wasmUrl=r}async fetch({kind:t,filename:e}){switch(t){case"cMapUrl":case"standardFontDataUrl":case"wasmUrl":break;default:lr(`Not implemented: ${t}`)}const r=this[t];if(!r)throw new Error(`Ensure that the \`${t}\` API parameter is provided.`);const i=`${r}${e}`;return this._fetch(i,t).catch(s=>{throw new Error(`Unable to load ${c(this,sB)[t]} data at: ${i}`)})}async _fetch(t,e){lr("Abstract method `_fetch` called.")}}sB=new WeakMap;class VU extends KU{async _fetch(t,e){const r=e==="cMapUrl"&&!t.endsWith(".bcmap")?"text":"bytes",i=await C2(t,r);return i instanceof Uint8Array?i:w2(i)}}class GU{constructor({enableHWA:t=!1}){T(this,Wv,!1);C(this,Wv,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(t,e);return{canvas:r,context:r.getContext("2d",{willReadFrequently:!c(this,Wv)})}}reset({canvas:t},e,r){if(!t)throw new Error("Canvas is not specified");if(e<=0||r<=0)throw new Error("Invalid canvas size");t.width=e,t.height=r}destroy(t){const{canvas:e}=t;if(!e)throw new Error("Canvas is not specified");e.width=e.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){lr("Abstract method `_createCanvas` called.")}}Wv=new WeakMap;class CK extends GU{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const r=this._document.createElement("canvas");return r.width=t,r.height=e,r}}class jU{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,r,i,s){return"none"}destroy(t=!1){}}class xK extends jU{constructor({docId:e,ownerDocument:r=globalThis.document}){super();T(this,jt);T(this,mf);T(this,fp);T(this,kl);T(this,Ol);T(this,rs);T(this,vf);T(this,wf,0);C(this,Ol,e),C(this,rs,r)}addFilter(e){if(!e)return"none";let r=c(this,jt,fs).get(e);if(r)return r;const[i,s,A]=I(this,jt,nC).call(this,e),a=e.length===1?i:`${i}${s}${A}`;if(r=c(this,jt,fs).get(a),r)return c(this,jt,fs).set(e,r),r;const o=`g_${c(this,Ol)}_transfer_map_${Yi(this,wf)._++}`,l=I(this,jt,U0).call(this,o);c(this,jt,fs).set(e,l),c(this,jt,fs).set(a,l);const h=I(this,jt,L0).call(this,o);return I(this,jt,Iw).call(this,i,s,A,h),l}addHCMFilter(e,r){var p;const i=`${e}-${r}`,s="base";let A=c(this,jt,Tw).get(s);if((A==null?void 0:A.key)===i||(A?((p=A.filter)==null||p.remove(),A.key=i,A.url="none",A.filter=null):(A={key:i,url:"none",filter:null},c(this,jt,Tw).set(s,A)),!e||!r))return A.url;const a=I(this,jt,Uw).call(this,e);e=Qt.makeHexColor(...a);const o=I(this,jt,Uw).call(this,r);if(r=Qt.makeHexColor(...o),c(this,jt,I0).style.color="",e==="#000000"&&r==="#ffffff"||e===r)return A.url;const l=new Array(256);for(let m=0;m<=255;m++){const y=m/255;l[m]=y<=.03928?y/12.92:((y+.055)/1.055)**2.4}const h=l.join(","),u=`g_${c(this,Ol)}_hcm_filter`,d=A.filter=I(this,jt,L0).call(this,u);I(this,jt,Iw).call(this,h,h,h,d),I(this,jt,G4).call(this,d);const f=(m,y)=>{const w=a[m]/255,B=o[m]/255,E=new Array(y+1);for(let S=0;S<=y;S++)E[S]=w+S/y*(B-w);return E.join(",")};return I(this,jt,Iw).call(this,f(0,5),f(1,5),f(2,5),d),A.url=I(this,jt,U0).call(this,u),A.url}addAlphaFilter(e){let r=c(this,jt,fs).get(e);if(r)return r;const[i]=I(this,jt,nC).call(this,[e]),s=`alpha_${i}`;if(r=c(this,jt,fs).get(s),r)return c(this,jt,fs).set(e,r),r;const A=`g_${c(this,Ol)}_alpha_map_${Yi(this,wf)._++}`,a=I(this,jt,U0).call(this,A);c(this,jt,fs).set(e,a),c(this,jt,fs).set(s,a);const o=I(this,jt,L0).call(this,A);return I(this,jt,j4).call(this,i,o),a}addLuminosityFilter(e){let r=c(this,jt,fs).get(e||"luminosity");if(r)return r;let i,s;if(e?([i]=I(this,jt,nC).call(this,[e]),s=`luminosity_${i}`):s="luminosity",r=c(this,jt,fs).get(s),r)return c(this,jt,fs).set(e,r),r;const A=`g_${c(this,Ol)}_luminosity_map_${Yi(this,wf)._++}`,a=I(this,jt,U0).call(this,A);c(this,jt,fs).set(e,a),c(this,jt,fs).set(s,a);const o=I(this,jt,L0).call(this,A);return I(this,jt,jD).call(this,o),e&&I(this,jt,j4).call(this,i,o),a}addHighlightHCMFilter(e,r,i,s,A){var B;const a=`${r}-${i}-${s}-${A}`;let o=c(this,jt,Tw).get(e);if((o==null?void 0:o.key)===a||(o?((B=o.filter)==null||B.remove(),o.key=a,o.url="none",o.filter=null):(o={key:a,url:"none",filter:null},c(this,jt,Tw).set(e,o)),!r||!i))return o.url;const[l,h]=[r,i].map(I(this,jt,Uw).bind(this));let u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),d=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),[f,p]=[s,A].map(I(this,jt,Uw).bind(this));d<u&&([u,d,f,p]=[d,u,p,f]),c(this,jt,I0).style.color="";const m=(E,S,_)=>{const L=new Array(256),k=(d-u)/_,H=E/255,Q=(S-E)/(255*_);let W=0;for(let U=0;U<=_;U++){const D=Math.round(u+U*k),j=H+U*Q;for(let V=W;V<=D;V++)L[V]=j;W=D+1}for(let U=W;U<256;U++)L[U]=L[W-1];return L.join(",")},y=`g_${c(this,Ol)}_hcm_${e}_filter`,w=o.filter=I(this,jt,L0).call(this,y);return I(this,jt,G4).call(this,w),I(this,jt,Iw).call(this,m(f[0],p[0],5),m(f[1],p[1],5),m(f[2],p[2],5),w),o.url=I(this,jt,U0).call(this,y),o.url}destroy(e=!1){var r,i,s,A;e&&((r=c(this,vf))!=null&&r.size)||((i=c(this,kl))==null||i.parentNode.parentNode.remove(),C(this,kl,null),(s=c(this,fp))==null||s.clear(),C(this,fp,null),(A=c(this,vf))==null||A.clear(),C(this,vf,null),C(this,wf,0))}}mf=new WeakMap,fp=new WeakMap,kl=new WeakMap,Ol=new WeakMap,rs=new WeakMap,vf=new WeakMap,wf=new WeakMap,jt=new WeakSet,fs=function(){return c(this,fp)||C(this,fp,new Map)},Tw=function(){return c(this,vf)||C(this,vf,new Map)},I0=function(){if(!c(this,kl)){const e=c(this,rs).createElement("div"),{style:r}=e;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const i=c(this,rs).createElementNS(Al,"svg");i.setAttribute("width",0),i.setAttribute("height",0),C(this,kl,c(this,rs).createElementNS(Al,"defs")),e.append(i),i.append(c(this,kl)),c(this,rs).body.append(e)}return c(this,kl)},nC=function(e){if(e.length===1){const l=e[0],h=new Array(256);for(let d=0;d<256;d++)h[d]=l[d]/255;const u=h.join(",");return[u,u,u]}const[r,i,s]=e,A=new Array(256),a=new Array(256),o=new Array(256);for(let l=0;l<256;l++)A[l]=r[l]/255,a[l]=i[l]/255,o[l]=s[l]/255;return[A.join(","),a.join(","),o.join(",")]},U0=function(e){if(c(this,mf)===void 0){C(this,mf,"");const r=c(this,rs).URL;r!==c(this,rs).baseURI&&(Am(r)?Ue('#createUrl: ignore "data:"-URL for performance reasons.'):C(this,mf,L5(r,"")))}return`url(${c(this,mf)}#${e})`},jD=function(e){const r=c(this,rs).createElementNS(Al,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(r)},G4=function(e){const r=c(this,rs).createElementNS(Al,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(r)},L0=function(e){const r=c(this,rs).createElementNS(Al,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",e),c(this,jt,I0).append(r),r},_w=function(e,r,i){const s=c(this,rs).createElementNS(Al,r);s.setAttribute("type","discrete"),s.setAttribute("tableValues",i),e.append(s)},Iw=function(e,r,i,s){const A=c(this,rs).createElementNS(Al,"feComponentTransfer");s.append(A),I(this,jt,_w).call(this,A,"feFuncR",e),I(this,jt,_w).call(this,A,"feFuncG",r),I(this,jt,_w).call(this,A,"feFuncB",i)},j4=function(e,r){const i=c(this,rs).createElementNS(Al,"feComponentTransfer");r.append(i),I(this,jt,_w).call(this,i,"feFuncA",e)},Uw=function(e){return c(this,jt,I0).style.color=e,Xd(getComputedStyle(c(this,jt,I0)).getPropertyValue("color"))},rA&&Ue("Please use the `legacy` build in Node.js environments.");async function EK(n){const e=await process.getBuiltinModule("fs/promises").readFile(n);return new Uint8Array(e)}class SK extends jU{}class FK extends GU{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:P0&&P0.tagName.toUpperCase()==="SCRIPT"&&P0.src||new URL("index.umd.cjs",document.baseURI).href)("@napi-rs/canvas").createCanvas(t,e)}}class TK extends KU{async _fetch(t,e){return EK(t)}}const _K=`
|
|
220
|
-
struct Uniforms {
|
|
221
|
-
offsetX : f32,
|
|
222
|
-
offsetY : f32,
|
|
223
|
-
scaleX : f32,
|
|
224
|
-
scaleY : f32,
|
|
225
|
-
paddedWidth : f32,
|
|
226
|
-
paddedHeight : f32,
|
|
227
|
-
borderSize : f32,
|
|
228
|
-
_pad : f32,
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
@group(0) @binding(0) var<uniform> u : Uniforms;
|
|
232
|
-
|
|
233
|
-
struct VertexInput {
|
|
234
|
-
@location(0) position : vec2<f32>,
|
|
235
|
-
@location(1) color : vec4<f32>,
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
struct VertexOutput {
|
|
239
|
-
@builtin(position) position : vec4<f32>,
|
|
240
|
-
@location(0) color : vec3<f32>,
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
@vertex
|
|
244
|
-
fn vs_main(in : VertexInput) -> VertexOutput {
|
|
245
|
-
var out : VertexOutput;
|
|
246
|
-
let cx = (in.position.x + u.offsetX) * u.scaleX;
|
|
247
|
-
let cy = (in.position.y + u.offsetY) * u.scaleY;
|
|
248
|
-
out.position = vec4<f32>(
|
|
249
|
-
((cx + u.borderSize) / u.paddedWidth) * 2.0 - 1.0,
|
|
250
|
-
1.0 - ((cy + u.borderSize) / u.paddedHeight) * 2.0,
|
|
251
|
-
0.0,
|
|
252
|
-
1.0
|
|
253
|
-
);
|
|
254
|
-
out.color = in.color.rgb;
|
|
255
|
-
return out;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
@fragment
|
|
259
|
-
fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
260
|
-
return vec4<f32>(in.color, 1.0);
|
|
261
|
-
}
|
|
262
|
-
`;class IK{constructor(){T(this,aB);T(this,AB,null);T(this,Dl,null);T(this,yf,null);T(this,dp,null)}init(){return c(this,AB)||C(this,AB,I(this,aB,$D).call(this))}get isReady(){return c(this,Dl)!==null}loadMeshShader(){if(!c(this,Dl)||c(this,yf))return;const t=c(this,Dl).createShaderModule({code:_K});C(this,yf,c(this,Dl).createRenderPipeline({layout:"auto",vertex:{module:t,entryPoint:"vs_main",buffers:[{arrayStride:2*4,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]},{arrayStride:4,attributes:[{shaderLocation:1,offset:0,format:"unorm8x4"}]}]},fragment:{module:t,entryPoint:"fs_main",targets:[{format:c(this,dp)}]},primitive:{topology:"triangle-list"}}))}draw(t,e,r,i,s,A,a,o){this.loadMeshShader();const l=c(this,Dl),{offsetX:h,offsetY:u,scaleX:d,scaleY:f}=i,p=l.createBuffer({size:Math.max(t.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});t.byteLength>0&&l.queue.writeBuffer(p,0,t);const m=l.createBuffer({size:Math.max(e.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});e.byteLength>0&&l.queue.writeBuffer(m,0,e);const y=l.createBuffer({size:8*4,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST});l.queue.writeBuffer(y,0,new Float32Array([h,u,d,f,A,a,o,0]));const w=l.createBindGroup({layout:c(this,yf).getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:y}}]}),B=new OffscreenCanvas(A,a),E=B.getContext("webgpu");E.configure({device:l,format:c(this,dp),alphaMode:s?"opaque":"premultiplied"});const S=s?{r:s[0]/255,g:s[1]/255,b:s[2]/255,a:1}:{r:0,g:0,b:0,a:0},_=l.createCommandEncoder(),L=_.beginRenderPass({colorAttachments:[{view:E.getCurrentTexture().createView(),clearValue:S,loadOp:"clear",storeOp:"store"}]});return r>0&&(L.setPipeline(c(this,yf)),L.setBindGroup(0,w),L.setVertexBuffer(0,p),L.setVertexBuffer(1,m),L.draw(r)),L.end(),l.queue.submit([_.finish()]),p.destroy(),m.destroy(),y.destroy(),B.transferToImageBitmap()}}AB=new WeakMap,Dl=new WeakMap,yf=new WeakMap,dp=new WeakMap,aB=new WeakSet,$D=async function(){var t;if(!((t=globalThis.navigator)!=null&&t.gpu))return!1;try{const e=await navigator.gpu.requestAdapter();return e?(C(this,dp,navigator.gpu.getPreferredCanvasFormat()),C(this,Dl,await e.requestDevice()),!0):!1}catch{return!1}};const L2=new IK;function UK(){return L2.init()}function LK(){return L2.isReady}function QK(){L2.loadMeshShader()}function NK(n,t,e,r,i,s,A,a){return L2.draw(n,t,e,r,i,s,A,a)}const En={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Q2(n,t){if(!t)return;const e=t[2]-t[0],r=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],e,r),n.clip(i)}class z5{isModifyingCurrentTransform(){return!1}getPattern(){lr("Abstract method `getPattern` called.")}}class PK extends z5{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}isOriginBased(){return this._p0[0]===0&&this._p0[1]===0&&(!this.isRadial()||this._p1[0]===0&&this._p1[1]===0)}isRadial(){return this._type==="radial"}areConic(){if(!this.isRadial())return!1;const t=Math.hypot(this._p0[0]-this._p1[0],this._p0[1]-this._p1[1]);return t+this._r1>this._r0&&t+this._r0>this._r1}_createGradient(t,e=null){let r,i=this._p0,s=this._p1;if(e&&(i=i.slice(),s=s.slice(),Qt.applyTransform(i,e),Qt.applyTransform(s,e)),this._type==="axial")r=t.createLinearGradient(i[0],i[1],s[0],s[1]);else if(this._type==="radial"){let A=this._r0,a=this._r1;if(e){const o=new Float32Array(2);Qt.singularValueDecompose2dScale(e,o),A*=o[0],a*=o[0]}r=t.createRadialGradient(i[0],i[1],A,s[0],s[1],a)}for(const A of this._colorStops)r.addColorStop(A[0],A[1]);return r}_createReversedGradient(t,e=null){let r=this._p1,i=this._p0;e&&(r=r.slice(),i=i.slice(),Qt.applyTransform(r,e),Qt.applyTransform(i,e));let s=this._r1,A=this._r0;if(e){const l=new Float32Array(2);Qt.singularValueDecompose2dScale(e,l),s*=l[0],A*=l[0]}const a=t.createRadialGradient(r[0],r[1],s,i[0],i[1],A),o=this._colorStops.map(([l,h])=>[1-l,h]).reverse();for(const[l,h]of o)a.addColorStop(l,h);return a}getPattern(t,e,r,i){let s;if(i===En.STROKE||i===En.FILL){if(this.isOriginBased()){let d=Qt.transform(r,e.baseTransform);this.matrix&&(d=Qt.transform(d,this.matrix));const f=.001,p=Math.hypot(d[0],d[1]),m=Math.hypot(d[2],d[3]),y=(d[0]*d[2]+d[1]*d[3])/(p*m);if(Math.abs(y)<f)if(this.isRadial()){if(Math.abs(p-m)<f)return this._createGradient(t,d)}else return this._createGradient(t,d)}const A=e.current.getClippedPathBoundingBox(i,jr(t))||[0,0,0,0],a=Math.ceil(A[2]-A[0])||1,o=Math.ceil(A[3]-A[1])||1,l=e.canvasFactory.create(a,o),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-A[0],-A[1]),r=Qt.transform(r,[1,0,0,1,A[0],A[1]]),h.transform(...e.baseTransform),this.matrix&&h.transform(...this.matrix),Q2(h,this._bbox),this.areConic()&&(h.fillStyle=this._createReversedGradient(h),h.fill()),h.fillStyle=this._createGradient(h),h.fill(),s=t.createPattern(l.canvas,"no-repeat"),e.canvasFactory.destroy(l);const u=new DOMMatrix(r);s.setTransform(u)}else this.areConic()&&(t.save(),Q2(t,this._bbox),t.fillStyle=this._createReversedGradient(t),t.fillRect(-1e10,-1e10,2e10,2e10),t.restore()),Q2(t,this._bbox),s=this._createGradient(t);return s}}function MK(n,t,e,r,i,s,A,a){const o=t.coords,l=t.colors,h=n.data,u=n.width*4;let d;o[e*2+1]>o[r*2+1]&&(d=e,e=r,r=d,d=s,s=A,A=d),o[r*2+1]>o[i*2+1]&&(d=r,r=i,i=d,d=A,A=a,a=d),o[e*2+1]>o[r*2+1]&&(d=e,e=r,r=d,d=s,s=A,A=d);const f=(o[e*2]+t.offsetX)*t.scaleX,p=(o[e*2+1]+t.offsetY)*t.scaleY,m=(o[r*2]+t.offsetX)*t.scaleX,y=(o[r*2+1]+t.offsetY)*t.scaleY,w=(o[i*2]+t.offsetX)*t.scaleX,B=(o[i*2+1]+t.offsetY)*t.scaleY;if(p>=B)return;const E=l[s*4],S=l[s*4+1],_=l[s*4+2],L=l[A*4],k=l[A*4+1],H=l[A*4+2],Q=l[a*4],W=l[a*4+1],U=l[a*4+2],D=Math.round(p),j=Math.round(B);let V,st,rt,it,At,ut,vt,mt;for(let M=D;M<=j;M++){if(M<y){const ot=M<p?0:(p-M)/(p-y);V=f-(f-m)*ot,st=E-(E-L)*ot,rt=S-(S-k)*ot,it=_-(_-H)*ot}else{let ot;M>B?ot=1:y===B?ot=0:ot=(y-M)/(y-B),V=m-(m-w)*ot,st=L-(L-Q)*ot,rt=k-(k-W)*ot,it=H-(H-U)*ot}let $;M<p?$=0:M>B?$=1:$=(p-M)/(p-B),At=f-(f-w)*$,ut=E-(E-Q)*$,vt=S-(S-W)*$,mt=_-(_-U)*$;const q=Math.round(Math.min(V,At)),tt=Math.round(Math.max(V,At));let et=u*M+q*4;for(let ot=q;ot<=tt;ot++)$=(V-ot)/(V-At),$<0?$=0:$>1&&($=1),h[et++]=st-(st-ut)*$|0,h[et++]=rt-(rt-vt)*$|0,h[et++]=it-(it-mt)*$|0,h[et++]=255}}class kK extends z5{constructor(t){super(),this._posData=t[2],this._colData=t[3],this._vertexCount=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null,QK()}_createMeshCanvas(t,e,r){const a=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-a,h=Math.ceil(this._bounds[3])-o,u=Math.min(Math.ceil(Math.abs(l*t[0]*1.1)),3e3)||1,d=Math.min(Math.ceil(Math.abs(h*t[1]*1.1)),3e3)||1,f=l?l/u:1,p=h?h/d:1,m={coords:this._posData,colors:this._colData,offsetX:-a,offsetY:-o,scaleX:1/f,scaleY:1/p},y=u+2*2,w=d+2*2,B=r.create(y,w);if(LK()&&this._vertexCount>48)B.context.drawImage(NK(this._posData,this._colData,this._vertexCount,m,e,y,w,2),0,0);else{const E=B.context.createImageData(u,d);if(e){const S=E.data;for(let _=0,L=S.length;_<L;_+=4)S[_]=e[0],S[_+1]=e[1],S[_+2]=e[2],S[_+3]=255}for(let S=0,_=this._vertexCount;S<_;S+=3)MK(E,m,S,S+1,S+2,S,S+1,S+2);B.context.putImageData(E,2,2)}return{canvas:B.canvas,offsetX:a-2*f,offsetY:o-2*p,scaleX:f,scaleY:p}}isModifyingCurrentTransform(){return!0}getPattern(t,e,r,i){Q2(t,this._bbox);const s=new Float32Array(2);if(i===En.SHADING)Qt.singularValueDecompose2dScale(jr(t),s);else if(this.matrix){Qt.singularValueDecompose2dScale(this.matrix,s);const[o,l]=s;Qt.singularValueDecompose2dScale(e.baseTransform,s),s[0]*=o,s[1]*=l}else Qt.singularValueDecompose2dScale(e.baseTransform,s);const A=this._createMeshCanvas(s,i===En.SHADING?null:this._background,e.canvasFactory);i!==En.SHADING&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(A.offsetX,A.offsetY),t.scale(A.scaleX,A.scaleY);const a=t.createPattern(A.canvas,"no-repeat");return e.canvasFactory.destroy(A),a}}class OK extends z5{getPattern(){return"hotpink"}}function DK(n){switch(n[0]){case"RadialAxial":return new PK(n);case"Mesh":return new kK(n);case"Dummy":return new OK}throw new Error(`Unknown IR type: ${n[0]}`)}const $U={COLORED:1,UNCOLORED:2},oB=class oB{constructor(t,e,r,i){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.needsIsolation=t[9]??!0,this.ctx=e,this.canvasGraphicsFactory=r,this.baseTransform=i,this.patternBaseMatrix=this.matrix?Qt.transform(i,this.matrix):i}canSkipPatternCanvas([t,e,r,i]){const[s,A,a,o]=this.bbox,l=Math.abs(this.xstep),h=Math.abs(this.ystep);if(t>l+1e-6||e>h+1e-6)return null;const u=Math.floor((r-a)/l)+1,d=Math.ceil((r+t-s)/l)-1,f=Math.floor((i-o)/h)+1,p=Math.ceil((i+e-A)/h)-1;return d<=u&&p<=f?[u,f]:null}updatePatternDims(t,e){const r=Qt.inverseTransform(this.patternBaseMatrix),i=[t[0],t[1]],s=[t[2],t[3]];Qt.applyTransform(i,r),Qt.applyTransform(s,r),e[0]=Math.abs(s[0]-i[0]),e[1]=Math.abs(s[1]-i[1]),e[2]=Math.min(i[0],s[0]),e[3]=Math.min(i[1],s[1])}_renderTileCanvas(t,e,r,i){var d,f;const[s,A,a,o]=this.bbox,l=t.canvasFactory.create(r.size,i.size),h=l.context,u=this.canvasGraphicsFactory.createCanvasGraphics(h,e);return u.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(u,this.paintType,this.color),h.translate(-r.scale*s,-i.scale*A),u.transform(0,r.scale,0,0,i.scale,0,0),h.save(),(d=u.dependencyTracker)==null||d.save(),this.clipBbox(u,s,A,a,o),u.baseTransform=jr(u.ctx),u.executeOperatorList(this.operatorList),u.endDrawing(),(f=u.dependencyTracker)==null||f.restore(),h.restore(),l}_getCombinedScales(){const t=new Float32Array(2);Qt.singularValueDecompose2dScale(this.matrix,t);const[e,r]=t;return Qt.singularValueDecompose2dScale(this.baseTransform,t),[e*t[0],r*t[1]]}drawPattern(t,e,r=!1,[i,s],A){const[a,o,l,h]=this.bbox,u=t.dependencyTracker;if(u&&(t.dependencyTracker=new um(u,A)),t.save(),r?t.ctx.clip(e,"evenodd"):t.ctx.clip(e),t.ctx.setTransform(...this.patternBaseMatrix),t.ctx.translate(i*this.xstep,s*this.ystep),this.needsIsolation||t.ctx.globalAlpha!==1||t.ctx.globalCompositeOperation!=="source-over"||t.inSMaskMode){const d=l-a,f=h-o,[p,m]=this._getCombinedScales(),y=this.getSizeAndScale(d,this.ctx.canvas.width,p),w=this.getSizeAndScale(f,this.ctx.canvas.height,m),B=this._renderTileCanvas(t,A,y,w);t.ctx.drawImage(B.canvas,a,o,d,f),t.canvasFactory.destroy(B)}else this.setFillAndStrokeStyleToContext(t,this.paintType,this.color),this.clipBbox(t,a,o,l,h),t.baseTransformStack.push(t.baseTransform),t.baseTransform=jr(t.ctx),t.executeOperatorList(this.operatorList),t.baseTransform=t.baseTransformStack.pop();t.restore(),u&&(t.dependencyTracker=u)}createPatternCanvas(t,e){const[r,i,s,A]=this.bbox,a=s-r,o=A-i;let{xstep:l,ystep:h}=this;l=Math.abs(l),h=Math.abs(h),m2("TilingType: "+this.tilingType);const[u,d]=this._getCombinedScales();let f=a,p=o,m=!1,y=!1;Math.ceil(l*u)>=Math.ceil(a*u)?f=l:m=!0,Math.ceil(h*d)>=Math.ceil(o*d)?p=h:y=!0;const w=this.getSizeAndScale(f,this.ctx.canvas.width,u),B=this.getSizeAndScale(p,this.ctx.canvas.height,d),E=this._renderTileCanvas(t,e,w,B);if(m||y){const S=E.canvas;m&&(f=l),y&&(p=h);const _=this.getSizeAndScale(f,this.ctx.canvas.width,u),L=this.getSizeAndScale(p,this.ctx.canvas.height,d),k=_.size,H=L.size,Q=t.canvasFactory.create(k,H),W=Q.context,U=m?Math.floor(a/l):0,D=y?Math.floor(o/h):0;for(let j=0;j<=U;j++)for(let V=0;V<=D;V++)W.drawImage(S,k*j,H*V,k,H,0,0,k,H);return t.canvasFactory.destroy(E),{canvas:Q.canvas,canvasEntry:Q,scaleX:_.scale,scaleY:L.scale,offsetX:r,offsetY:i}}return{canvas:E.canvas,canvasEntry:E,scaleX:w.scale,scaleY:B.scale,offsetX:r,offsetY:i}}getSizeAndScale(t,e,r){const i=Math.max(oB.MAX_PATTERN_SIZE,e);let s=Math.ceil(t*r);return s>=i?s=i:r=s/t,{scale:r,size:s}}clipBbox(t,e,r,i,s){const A=i-e,a=s-r,o=new Path2D;o.rect(e,r,A,a),Qt.axialAlignedBoundingBox([e,r,i,s],jr(t.ctx),t.current.minMax),t.ctx.clip(o),t.current.updateClipFromPath()}setFillAndStrokeStyleToContext(t,e,r){const i=t.ctx,s=t.current;switch(s.patternFill=s.patternStroke=!1,e){case $U.COLORED:const{fillStyle:A,strokeStyle:a}=this.ctx;i.fillStyle=s.fillColor=A,i.strokeStyle=s.strokeColor=a;break;case $U.UNCOLORED:i.fillStyle=i.strokeStyle=r,s.fillColor=s.strokeColor=r;break;default:throw new Y7(`Unsupported paint type: ${e}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,e,r,i,s){const A=i!==En.SHADING?Qt.transform(r,this.patternBaseMatrix):r,a=this.createPatternCanvas(e,s);let o=new DOMMatrix(A);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return e.canvasFactory.destroy(a.canvasEntry),l.setTransform(o),l}};ct(oB,"MAX_PATTERN_SIZE",3e3);let dm=oB;function RK({src:n,srcPos:t=0,dest:e,width:r,height:i,nonBlackColor:s=4294967295,inverseDecode:A=!1}){const a=Ti.isLittleEndian?4278190080:255,[o,l]=A?[s,a]:[a,s],h=r>>3,u=r&7,d=o^l,f=n.length;e=new Uint32Array(e.buffer);let p=0;for(let m=0;m<i;++m){for(const w=t+h;t<w;++t,p+=8){const B=n[t];e[p]=o^-(B>>7&1)&d,e[p+1]=o^-(B>>6&1)&d,e[p+2]=o^-(B>>5&1)&d,e[p+3]=o^-(B>>4&1)&d,e[p+4]=o^-(B>>3&1)&d,e[p+5]=o^-(B>>2&1)&d,e[p+6]=o^-(B>>1&1)&d,e[p+7]=o^-(B&1)&d}if(u===0)continue;const y=t<f?n[t++]:255;for(let w=0;w<u;++w,++p)e[p]=o^-(y>>7-w&1)&d}return{srcPos:t,destPos:p}}const WU=16,zU=100,HK=15,XU=10,Os=16,X5=new DOMMatrix,AA=new Float32Array(2);function KK(n,t){if(n._removeMirroring)throw new Error("Context is already forwarding operations.");n.__originalSave=n.save,n.__originalRestore=n.restore,n.__originalRotate=n.rotate,n.__originalScale=n.scale,n.__originalTranslate=n.translate,n.__originalTransform=n.transform,n.__originalSetTransform=n.setTransform,n.__originalResetTransform=n.resetTransform,n.__originalClip=n.clip,n.__originalMoveTo=n.moveTo,n.__originalLineTo=n.lineTo,n.__originalBezierCurveTo=n.bezierCurveTo,n.__originalRect=n.rect,n.__originalClosePath=n.closePath,n.__originalBeginPath=n.beginPath,n._removeMirroring=()=>{n.save=n.__originalSave,n.restore=n.__originalRestore,n.rotate=n.__originalRotate,n.scale=n.__originalScale,n.translate=n.__originalTranslate,n.transform=n.__originalTransform,n.setTransform=n.__originalSetTransform,n.resetTransform=n.__originalResetTransform,n.clip=n.__originalClip,n.moveTo=n.__originalMoveTo,n.lineTo=n.__originalLineTo,n.bezierCurveTo=n.__originalBezierCurveTo,n.rect=n.__originalRect,n.closePath=n.__originalClosePath,n.beginPath=n.__originalBeginPath,delete n._removeMirroring},n.save=function(){t.save(),this.__originalSave()},n.restore=function(){t.restore(),this.__originalRestore()},n.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},n.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},n.transform=function(e,r,i,s,A,a){t.transform(e,r,i,s,A,a),this.__originalTransform(e,r,i,s,A,a)},n.setTransform=function(e,r,i,s,A,a){r===void 0?(t.setTransform(e),this.__originalSetTransform(e)):(t.setTransform(e,r,i,s,A,a),this.__originalSetTransform(e,r,i,s,A,a))},n.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},n.rotate=function(e){t.rotate(e),this.__originalRotate(e)},n.clip=function(e){t.clip(e),this.__originalClip(e)},n.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},n.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},n.bezierCurveTo=function(e,r,i,s,A,a){t.bezierCurveTo(e,r,i,s,A,a),this.__originalBezierCurveTo(e,r,i,s,A,a)},n.rect=function(e,r,i,s){t.rect(e,r,i,s),this.__originalRect(e,r,i,s)},n.closePath=function(){t.closePath(),this.__originalClosePath()},n.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}function N2(n,t,e,r,i,s,A,a,o,l){const[h,u,d,f,p,m]=jr(n);if(u===0&&d===0){const B=A*h+p,E=Math.round(B),S=a*f+m,_=Math.round(S),L=(A+o)*h+p,k=Math.abs(Math.round(L)-E)||1,H=(a+l)*f+m,Q=Math.abs(Math.round(H)-_)||1;return n.setTransform(Math.sign(h),0,0,Math.sign(f),E,_),n.drawImage(t,e,r,i,s,0,0,k,Q),n.setTransform(h,u,d,f,p,m),[k,Q]}if(h===0&&f===0){const B=a*d+p,E=Math.round(B),S=A*u+m,_=Math.round(S),L=(a+l)*d+p,k=Math.abs(Math.round(L)-E)||1,H=(A+o)*u+m,Q=Math.abs(Math.round(H)-_)||1;return n.setTransform(0,Math.sign(u),Math.sign(d),0,E,_),n.drawImage(t,e,r,i,s,0,0,Q,k),n.setTransform(h,u,d,f,p,m),[Q,k]}n.drawImage(t,e,r,i,s,A,a,o,l);const y=Math.hypot(h,u),w=Math.hypot(d,f);return[y*o,w*l]}class qU{constructor(t,e){ct(this,"alphaIsShape",!1);ct(this,"fontSize",0);ct(this,"fontSizeScale",1);ct(this,"textMatrix",null);ct(this,"textMatrixScale",1);ct(this,"fontMatrix",_5);ct(this,"leading",0);ct(this,"x",0);ct(this,"y",0);ct(this,"lineX",0);ct(this,"lineY",0);ct(this,"charSpacing",0);ct(this,"wordSpacing",0);ct(this,"textHScale",1);ct(this,"textRenderingMode",Ji.FILL);ct(this,"textRise",0);ct(this,"fillColor","#000000");ct(this,"strokeColor","#000000");ct(this,"tilingPatternDims",null);ct(this,"patternFill",!1);ct(this,"patternStroke",!1);ct(this,"fillAlpha",1);ct(this,"strokeAlpha",1);ct(this,"lineWidth",1);ct(this,"activeSMask",null);ct(this,"transferMaps","none");ct(this,"minMax",mu.slice());this.clipBox=new Float32Array([0,0,t,e])}clone(){var e;const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t.tilingPatternDims=(e=this.tilingPatternDims)==null?void 0:e.slice(),t}getPathBoundingBox(t=En.FILL,e=null){const r=this.minMax.slice();if(t===En.STROKE){e||lr("Stroke bounding box must include transform."),Qt.singularValueDecompose2dScale(e,AA);const i=AA[0]*this.lineWidth/2,s=AA[1]*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}updateClipFromPath(){const t=Qt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(mu,0)}getClippedPathBoundingBox(t=En.FILL,e=null){return Qt.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function YU(n,t){if(t instanceof ImageData){n.putImageData(t,0,0);return}const e=t.height,r=t.width,i=e%Os,s=(e-i)/Os,A=i===0?s:s+1,a=n.createImageData(r,Os);let o=0,l;const h=t.data,u=a.data;let d,f,p,m;if(t.kind===tm.GRAYSCALE_1BPP){const y=h.byteLength,w=new Uint32Array(u.buffer,0,u.byteLength>>2),B=w.length,E=r+7>>3,S=4294967295,_=Ti.isLittleEndian?4278190080:255;for(d=0;d<A;d++){for(p=d<s?Os:i,l=0,f=0;f<p;f++){const L=y-o;let k=0;const H=L>E?r:L*8-7,Q=H&-8;let W=0,U=0;for(;k<Q;k+=8)U=h[o++],w[l++]=U&128?S:_,w[l++]=U&64?S:_,w[l++]=U&32?S:_,w[l++]=U&16?S:_,w[l++]=U&8?S:_,w[l++]=U&4?S:_,w[l++]=U&2?S:_,w[l++]=U&1?S:_;for(;k<H;k++)W===0&&(U=h[o++],W=128),w[l++]=U&W?S:_,W>>=1}for(;l<B;)w[l++]=0;n.putImageData(a,0,d*Os)}}else if(t.kind===tm.RGBA_32BPP){for(f=0,m=r*Os*4,d=0;d<s;d++)u.set(h.subarray(o,o+m)),o+=m,n.putImageData(a,0,f),f+=Os;d<A&&(m=r*i*4,u.set(h.subarray(o,o+m)),n.putImageData(a,0,f))}else if(t.kind===tm.RGB_24BPP)for(p=Os,m=r*p,d=0;d<A;d++){for(d>=s&&(p=i,m=r*p),l=0,f=m;f--;)u[l++]=h[o++],u[l++]=h[o++],u[l++]=h[o++],u[l++]=255;n.putImageData(a,0,d*Os)}else throw new Error(`bad image kind: ${t.kind}`)}function JU(n,t){if(t.bitmap){n.drawImage(t.bitmap,0,0);return}const e=t.height,r=t.width,i=e%Os,s=(e-i)/Os,A=i===0?s:s+1,a=n.createImageData(r,Os);let o=0;const l=t.data,h=a.data;for(let u=0;u<A;u++){const d=u<s?Os:i;({srcPos:o}=RK({src:l,srcPos:o,dest:h,width:r,height:d,nonBlackColor:0})),n.putImageData(a,0,u*Os)}}function gm(n,t){const e=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of e)n[r]!==void 0&&(t[r]=n[r]);n.setLineDash!==void 0&&(t.setLineDash(n.getLineDash()),t.lineDashOffset=n.lineDashOffset)}function P2(n){n.strokeStyle=n.fillStyle="#000000",n.fillRule="nonzero",n.globalAlpha=1,n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=10,n.globalCompositeOperation="source-over",n.font="10px sans-serif",n.setLineDash!==void 0&&(n.setLineDash([]),n.lineDashOffset=0);const{filter:t}=n;t!=="none"&&t!==""&&(n.filter="none")}function ZU(n,t){if(t)return!0;Qt.singularValueDecompose2dScale(n,AA);const e=Math.fround(ya.pixelRatio*al.PDF_TO_CSS_UNITS);return AA[0]<=e&&AA[1]<=e}const VK=["butt","round","square"],GK=["miter","round","bevel"],jK={},t3={},GF=class GF{constructor(t,e,r,i,s,{optionalContentConfig:A,markedContentStack:a=null},o,l,h,u){T(this,Ma);this.ctx=t,this.current=new qU(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.commonObjs=e,this.objs=r,this.canvasFactory=i,this.filterFactory=s,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.tempSMask=null,this.smaskGroupCanvases=[],this.smaskPreparedEntry=null,this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=A,this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=h??null,this.imagesTracker=u??null}getObject(t,e,r=null){var i;return typeof e=="string"?((i=this.dependencyTracker)==null||i.recordNamedDependency(t,e),e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e)):r}beginDrawing({transform:t,viewport:e,transparency:r=!1,background:i=null}){const s=this.ctx.canvas.width,A=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,s,A),this.ctx.fillStyle=a,r){const o=this.transparentCanvasEntry=this.canvasFactory.create(s,A);this.compositeCtx=this.ctx,{canvas:this.transparentCanvas,context:this.ctx}=o,this.ctx.save(),this.ctx.transform(...jr(this.compositeCtx))}this.ctx.save(),P2(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[3]),this.ctx.transform(...e.transform),this.viewportScale=e.scale,this.baseTransform=jr(this.ctx)}executeOperatorList(t,e,r,i,s){var w;const A=t.argsArray,a=t.fnArray;let o=e||0;const l=A.length;if(l===o)return o;const h=l-o>XU&&typeof r=="function",u=h?Date.now()+HK:0;let d=0;const f=this.commonObjs,p=this.objs;let m,y;for(;;){if(i!==void 0){if(o===i.nextBreakPoint)return i.breakIt(o,r),o;if(i.shouldSkip(o)){if(++o===l)return o;continue}}if(!s||s(o))if(m=a[o],y=A[o]??null,m!==ao.dependency)y===null?this[m](o):this[m](o,...y);else for(const B of y){(w=this.dependencyTracker)==null||w.recordNamedData(B,o);const E=B.startsWith("g_")?f:p;if(!E.has(B))return E.get(B,r),o}if(o++,o===l)return o;if(h&&++d>XU){if(Date.now()>u)return r(),o;d=0}}}endDrawing(){I(this,Ma,$4).call(this);for(const t of this.smaskGroupCanvases)this.canvasFactory.destroy(t);this.smaskGroupCanvases.length=0,this._clearPreparedSMask(),this.tempSMask=null,this.smaskStack.length=0,this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),I(this,Ma,W4).call(this)}_scaleImage(t,e){const r=t.width??t.displayWidth,i=t.height??t.displayHeight,s=Math.max(Math.hypot(e[0],e[1]),1),A=Math.max(Math.hypot(e[2],e[3]),1),a=[];let o=s,l=A,h=r,u=i;for(;o>2&&h>1||l>2&&u>1;){let w=h,B=u;o>2&&h>1&&(w=Math.ceil(h/2),o/=h/w),l>2&&u>1&&(B=Math.ceil(u/2),l/=u/B),a.push({newWidth:w,newHeight:B}),h=w,u=B}if(a.length===0)return{img:t,paintWidth:r,paintHeight:i,tmpCanvas:null};if(a.length===1){const{newWidth:w,newHeight:B}=a[0],E=this.canvasFactory.create(w,B);return E.context.drawImage(t,0,0,r,i,0,0,w,B),{img:E.canvas,paintWidth:w,paintHeight:B,tmpCanvas:E}}let d=this.canvasFactory.create(1,1),f=this.canvasFactory.create(1,1),p=r,m=i,y=t;for(const{newWidth:w,newHeight:B}of a)this.canvasFactory.reset(f,w,B),f.context.drawImage(y,0,0,p,m,0,0,w,B),[d,f]=[f,d],y=d.canvas,p=w,m=B;return this.canvasFactory.destroy(f),{img:d.canvas,paintWidth:p,paintHeight:m,tmpCanvas:d}}_createMaskCanvas(t,e){var U,D;const r=this.ctx,{width:i,height:s}=e,A=this.current.fillColor,a=this.current.patternFill,o=jr(r);let l,h,u,d;if((e.bitmap||e.data)&&e.count>1){const j=e.bitmap||e.data.buffer;h=JSON.stringify(a?o:[o.slice(0,4),A]),l=this._cachedBitmapsMap.getOrInsertComputed(j,b2);const V=l.get(h);if(V&&!a){const st=Math.round(Math.min(o[0],o[2])+o[4]),rt=Math.round(Math.min(o[1],o[3])+o[5]);return(U=this.dependencyTracker)==null||U.recordDependencies(t,HA.transformAndFill),{canvas:V,offsetX:st,offsetY:rt}}u=V}u||(d=this.canvasFactory.create(i,s),JU(d.context,e));let f=Qt.transform(o,[1/i,0,0,-1/s,0,0]);f=Qt.transform(f,[1,0,0,1,0,-s]);const p=mu.slice();Qt.axialAlignedBoundingBox([0,0,i,s],f,p);const[m,y,w,B]=p,E=Math.round(w-m)||1,S=Math.round(B-y)||1,_=this.canvasFactory.create(E,S),L=_.context,k=m,H=y;L.translate(-k,-H),L.transform(...f);let Q=null;if(!u){const j=this._scaleImage(d.canvas,oo(L));u=j.img,Q=j.tmpCanvas,u!==d.canvas&&(this.canvasFactory.destroy(d),d=null),l&&a&&(l.set(h,u),Q=null,d=null)}L.imageSmoothingEnabled=ZU(jr(L),e.interpolate),N2(L,u,0,0,u.width,u.height,0,0,i,s),Q&&this.canvasFactory.destroy(Q),d&&this.canvasFactory.destroy(d),L.globalCompositeOperation="source-in";const W=Qt.transform(oo(L),[1,0,0,1,-k,-H]);return L.fillStyle=a?A.getPattern(r,this,W,En.FILL,t):A,L.fillRect(0,0,i,s),l&&!a&&l.set(h,_.canvas),(D=this.dependencyTracker)==null||D.recordDependencies(t,HA.transformAndFill),{canvas:_.canvas,canvasEntry:l&&!a?null:_,offsetX:Math.round(k),offsetY:Math.round(H)}}setLineWidth(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineWidth",t),e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineCap",t),this.ctx.lineCap=VK[e]}setLineJoin(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineJoin",t),this.ctx.lineJoin=GK[e]}setMiterLimit(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("miterLimit",t),this.ctx.miterLimit=e}setDash(t,e,r){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("dash",t);const i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(e),i.lineDashOffset=r)}setRenderingIntent(t,e){}setFlatness(t,e){}setGState(t,e){var r,i,s,A,a;for(const[o,l]of e)switch(o){case"LW":this.setLineWidth(t,l);break;case"LC":this.setLineCap(t,l);break;case"LJ":this.setLineJoin(t,l);break;case"ML":this.setMiterLimit(t,l);break;case"D":this.setDash(t,l[0],l[1]);break;case"RI":this.setRenderingIntent(t,l);break;case"FL":this.setFlatness(t,l);break;case"Font":this.setFont(t,l[0],l[1]);break;case"CA":(r=this.dependencyTracker)==null||r.recordSimpleData("strokeAlpha",t),this.current.strokeAlpha=l;break;case"ca":(i=this.dependencyTracker)==null||i.recordSimpleData("fillAlpha",t),this.ctx.globalAlpha=this.current.fillAlpha=l;break;case"BM":(s=this.dependencyTracker)==null||s.recordSimpleData("globalCompositeOperation",t),this.ctx.globalCompositeOperation=l;break;case"SMask":(A=this.dependencyTracker)==null||A.recordSimpleData("SMask",t),this.current.activeSMask=l?this.tempSMask:null,this.current.activeSMask&&(this.current.activeSMask.blendMode=this.ctx.globalCompositeOperation),this.tempSMask=null,this.checkSMaskState(t);break;case"TR":(a=this.dependencyTracker)==null||a.recordSimpleData("filter",t),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l);break}}get inSMaskMode(){return!!this.suspendedCtx}_clearPreparedSMask(){this.smaskPreparedEntry&&(this.canvasFactory.destroy(this.smaskPreparedEntry),this.smaskPreparedEntry=null),this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0}_ensurePreparedSMask(t,e,r){t!==this.smaskPreparedFor&&(this._clearPreparedSMask(),this._prepareSMaskCanvas(t,e,r))}checkSMaskState(t){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode(t):!this.current.activeSMask&&e?this.endSMaskMode():this.current.activeSMask&&e&&this._ensurePreparedSMask(this.current.activeSMask,this.ctx.canvas.width,this.ctx.canvas.height)}_prepareSMaskCanvas(t,e,r){const{canvas:i,subtype:s,backdrop:A,transferMap:a}=t,o=s==="Luminosity"||s==="Alpha"&&a;if(!A&&!o){this.smaskPreparedFor=t;return}let l,h,u;if(A&&o){const d=this.canvasFactory.create(e,r),f=d.context;f.drawImage(i,t.offsetX,t.offsetY),f.globalCompositeOperation="destination-atop",f.fillStyle=A,f.fillRect(0,0,e,r),f.globalCompositeOperation="source-over",l=this.canvasFactory.create(e,r);const p=l.context;p.filter=s==="Alpha"?this.filterFactory.addAlphaFilter(a):this.filterFactory.addLuminosityFilter(a),p.drawImage(d.canvas,0,0),p.filter="none",this.canvasFactory.destroy(d),h=u=0}else if(o){l=this.canvasFactory.create(i.width,i.height);const d=l.context;d.filter=s==="Alpha"?this.filterFactory.addAlphaFilter(a):this.filterFactory.addLuminosityFilter(a),d.drawImage(i,0,0),d.filter="none",{offsetX:h,offsetY:u}=t}else{l=this.canvasFactory.create(e,r);const d=l.context;d.drawImage(i,t.offsetX,t.offsetY),d.globalCompositeOperation="destination-atop",d.fillStyle=A,d.fillRect(0,0,e,r),d.globalCompositeOperation="source-over",h=u=0}this.smaskPreparedEntry=l,this.smaskPreparedFor=t,this.smaskPreparedOffsetX=h,this.smaskPreparedOffsetY=u}beginSMaskMode(t){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const{width:e,height:r}=this.ctx.canvas,i=this.canvasFactory.create(e,r);this.smaskScratchCanvas=i,this.suspendedCtx=this.ctx;const s=this.ctx=i.context;s.setTransform(this.suspendedCtx.getTransform()),gm(this.suspendedCtx,s),KK(s,this.suspendedCtx),this._ensurePreparedSMask(this.current.activeSMask,e,r),this.setGState(t,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),gm(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null,this.canvasFactory.destroy(this.smaskScratchCanvas),this.smaskScratchCanvas=null,this._clearPreparedSMask()}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.ctx.restore()}composeSMask(t,e,r,i){const s=i[0],A=i[1],a=i[2]-s,o=i[3]-A;if(a===0||o===0)return;const l=this.smaskPreparedEntry;if(l){const h=s-this.smaskPreparedOffsetX,u=A-this.smaskPreparedOffsetY;r.save(),r.globalAlpha=1,r.setTransform(1,0,0,1,0,0);const d=new Path2D;d.rect(s,A,a,o),r.clip(d),r.globalCompositeOperation="destination-in",r.drawImage(l.canvas,h,u,a,o,s,A,a,o),r.restore()}else this.genericComposeSMask(e.context,r,a,o,s,A,e.offsetX,e.offsetY);t.save(),t.globalAlpha=1,t.globalCompositeOperation=e.blendMode||"source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(r.canvas,s,A,a,o,s,A,a,o),t.restore()}genericComposeSMask(t,e,r,i,s,A,a,o){const l=t.canvas,h=s-a,u=A-o;e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const d=new Path2D;d.rect(s,A,r,i),e.clip(d),e.globalCompositeOperation="destination-in",e.drawImage(l,h,u,r,i,s,A,r,i),e.restore()}save(t){var r;this.inSMaskMode&&gm(this.ctx,this.suspendedCtx),this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone(),(r=this.dependencyTracker)==null||r.save(t)}restore(t){var e;if((e=this.dependencyTracker)==null||e.restore(t),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&(gm(this.suspendedCtx,this.ctx),this.ctx.setTransform(this.suspendedCtx.getTransform())),this.checkSMaskState(t),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,e,r,i,s,A,a){var o;(o=this.dependencyTracker)==null||o.recordIncrementalData("transform",t),this.ctx.transform(e,r,i,s,A,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,r,i){let[s]=r;if(!i){s||(s=r[0]=new Path2D),e!==ao.stroke&&e!==ao.closeStroke&&(this.current.tilingPatternDims=null),this[e](t,s);return}if(this.dependencyTracker!==null){const a=e===ao.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(t).recordBBox(t,this.ctx,i[0]-a,i[2]+a,i[1]-a,i[3]+a).recordDependencies(t,["transform"])}s instanceof Path2D||(s=r[0]=IU(s)),Qt.axialAlignedBoundingBox(i,jr(this.ctx),this.current.minMax);const A=this.current.tilingPatternDims;if(A&&e!==ao.stroke&&e!==ao.closeStroke&&this.current.fillColor instanceof dm){const a=Qt.intersect(this.current.clipBox,this.current.minMax);a?this.current.fillColor.updatePatternDims(a,A):this.current.tilingPatternDims=null}this[e](t,s),this._pathStartIdx=t}closePath(t){this.ctx.closePath()}stroke(t,e,r=!0){var A;const i=this.ctx,s=this.current.strokeColor;if(i.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof s=="object"&&(s!=null&&s.getPattern)){const a=s.isModifyingCurrentTransform()?i.getTransform():null;if(i.save(),i.strokeStyle=s.getPattern(i,this,oo(i),En.STROKE,t),a){const o=new Path2D;o.addPath(e,i.getTransform().invertSelf().multiplySelf(a)),e=o}this.rescaleAndStroke(e,!1),i.restore()}else this.rescaleAndStroke(e,!0);(A=this.dependencyTracker)==null||A.recordDependencies(t,HA.stroke),r&&this.consumePath(t,e,this.current.getClippedPathBoundingBox(En.STROKE,jr(this.ctx))),i.globalAlpha=this.current.fillAlpha}closeStroke(t,e){this.stroke(t,e)}fill(t,e,r=!0){var l,h,u;const i=this.ctx,s=this.current.fillColor,A=this.current.patternFill;let a=!1;const o=this.current.getClippedPathBoundingBox();if((l=this.dependencyTracker)==null||l.recordDependencies(t,HA.fill),A){const d=this.current.tilingPatternDims,f=d&&s.canSkipPatternCanvas(d);if(f){s.drawPattern(this,e,this.pendingEOFill,f,t),this.pendingEOFill=!1,r&&this.consumePath(t,e,o),this.current.tilingPatternDims=null;return}const p=s.isModifyingCurrentTransform()?i.getTransform():null;if((h=this.dependencyTracker)==null||h.save(t),i.save(),i.fillStyle=s.getPattern(i,this,oo(i),En.FILL,t),p){const m=new Path2D;m.addPath(e,i.getTransform().invertSelf().multiplySelf(p)),e=m}a=!0}this.contentVisible&&o!==null&&(this.pendingEOFill?(i.fill(e,"evenodd"),this.pendingEOFill=!1):i.fill(e)),a&&(i.restore(),(u=this.dependencyTracker)==null||u.restore(t)),r&&this.consumePath(t,e,o)}eoFill(t,e){this.pendingEOFill=!0,this.fill(t,e)}fillStroke(t,e){this.fill(t,e,!1),this.stroke(t,e,!1),this.consumePath(t,e)}eoFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}closeFillStroke(t,e){this.fillStroke(t,e)}closeEOFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}endPath(t,e){this.consumePath(t,e)}rawFillPath(t,e){var r;this.ctx.fill(e),(r=this.dependencyTracker)==null||r.recordDependencies(t,HA.rawFillPath).recordOperation(t)}clip(t){var e;(e=this.dependencyTracker)==null||e.recordFutureForcedDependency("clipMode",t),this.pendingClip=jK}eoClip(t){var e;(e=this.dependencyTracker)==null||e.recordFutureForcedDependency("clipMode",t),this.pendingClip=t3}beginText(t){var e;this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,(e=this.dependencyTracker)==null||e.recordOpenMarker(t).resetIncrementalData("sameLineText").resetIncrementalData("moveText",t)}endText(t){const e=this.pendingTextPaths,r=this.ctx;if(this.dependencyTracker){const{dependencyTracker:i}=this;e!==void 0&&i.recordFutureForcedDependency("textClip",i.getOpenMarker()).recordFutureForcedDependency("textClip",t),i.recordCloseMarker(t)}if(e!==void 0){const i=new Path2D,s=r.getTransform().invertSelf();for(const{transform:A,x:a,y:o,fontSize:l,path:h}of e)h&&i.addPath(h,new DOMMatrix(A).preMultiplySelf(s).translate(a,o).scale(l,-l));r.clip(i)}delete this.pendingTextPaths}setCharSpacing(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("charSpacing",t),this.current.charSpacing=e}setWordSpacing(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("wordSpacing",t),this.current.wordSpacing=e}setHScale(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("hScale",t),this.current.textHScale=e/100}setLeading(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("leading",t),this.current.leading=-e}setFont(t,e,r){var u,d;(u=this.dependencyTracker)==null||u.recordSimpleData("font",t).recordSimpleDataFromNamed("fontObj",e,t);const i=this.commonObjs.get(e),s=this.current;if(!i)throw new Error(`Can't find font for ${e}`);if(s.fontMatrix=i.fontMatrix||_5,(s.fontMatrix[0]===0||s.fontMatrix[3]===0)&&Ue("Invalid font matrix for font "+e),r<0?(r=-r,s.fontDirection=-1):s.fontDirection=1,this.current.font=i,this.current.fontSize=r,i.isType3Font)return;const A=i.loadedName||"sans-serif",a=((d=i.systemFontInfo)==null?void 0:d.css)||`"${A}", ${i.fallbackName}`;let o="normal";i.black?o="900":i.bold&&(o="bold");const l=i.italic?"italic":"normal";let h=r;r<WU?h=WU:r>zU&&(h=zU),this.current.fontSizeScale=r/h,this.ctx.font=`${l} ${o} ${h}px ${a}`}setTextRenderingMode(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("textRenderingMode",t),this.current.textRenderingMode=e}setTextRise(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("textRise",t),this.current.textRise=e}moveText(t,e,r){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordIncrementalData("moveText",t),this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=r}setLeadingMoveText(t,e,r){this.setLeading(t,-r),this.moveText(t,e,r)}setTextMatrix(t,e){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordSimpleData("textMatrix",t);const{current:r}=this;r.textMatrix=e,r.textMatrixScale=Math.hypot(e[0],e[1]),r.x=r.lineX=0,r.y=r.lineY=0}nextLine(t){var e;this.moveText(t,0,this.current.leading),(e=this.dependencyTracker)==null||e.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??t)}paintChar(t,e,r,i,s,A){var w,B,E,S;const a=this.ctx,o=this.current,l=o.font,h=o.textRenderingMode,u=o.fontSize/o.fontSizeScale,d=h&Ji.FILL_STROKE_MASK,f=!!(h&Ji.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile,m=o.patternStroke&&!l.missingFile;let y;if((l.disableFontFace||f||p||m)&&!l.missingFile&&(y=l.getPathGenerator(this.commonObjs,e)),y&&(l.disableFontFace||p||m)){a.save(),a.translate(r,i),a.scale(u,-u),(w=this.dependencyTracker)==null||w.recordCharacterBBox(t,a,l);let _;if(d===Ji.FILL||d===Ji.FILL_STROKE)if(s){_=a.getTransform(),a.setTransform(...s);const L=I(this,Ma,z4).call(this,y,_,s);a.fill(L)}else a.fill(y);if(d===Ji.STROKE||d===Ji.FILL_STROKE)if(A){_||(_=a.getTransform()),a.setTransform(...A);const{a:L,b:k,c:H,d:Q}=_,W=Qt.inverseTransform(A),U=Qt.transform([L,k,H,Q,0,0],W);Qt.singularValueDecompose2dScale(U,AA),a.lineWidth*=Math.max(AA[0],AA[1])/u,a.stroke(I(this,Ma,z4).call(this,y,_,A))}else a.lineWidth/=u,a.stroke(y);a.restore()}else(d===Ji.FILL||d===Ji.FILL_STROKE)&&(a.fillText(e,r,i),(B=this.dependencyTracker)==null||B.recordCharacterBBox(t,a,l,u,r,i,()=>a.measureText(e))),(d===Ji.STROKE||d===Ji.FILL_STROKE)&&(this.dependencyTracker&&((E=this.dependencyTracker)==null||E.recordCharacterBBox(t,a,l,u,r,i,()=>a.measureText(e)).recordDependencies(t,HA.stroke)),a.strokeText(e,r,i));f&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:jr(a),x:r,y:i,fontSize:u,path:y}),(S=this.dependencyTracker)==null||S.recordCharacterBBox(t,a,l,u,r,i))}get isFontSubpixelAAEnabled(){const t=this.canvasFactory.create(10,10),e=t.context;e.scale(1.5,1),e.fillText("I",0,10);const r=e.getImageData(0,0,10,10).data;this.canvasFactory.destroy(t);let i=!1;for(let s=3;s<r.length;s+=4)if(r[s]>0&&r[s]<255){i=!0;break}return Se(this,"isFontSubpixelAAEnabled",i)}showText(t,e){var U,D,j,V;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(t,HA.showText).resetBBox(t),this.current.textRenderingMode&Ji.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",t).inheritPendingDependenciesAsFutureForcedDependencies());const r=this.current,i=r.font;if(i.isType3Font){this.showType3Text(t,e),(U=this.dependencyTracker)==null||U.recordShowTextOperation(t);return}const s=r.fontSize;if(s===0){(D=this.dependencyTracker)==null||D.recordOperation(t);return}const A=this.ctx,a=r.fontSizeScale,o=r.charSpacing,l=r.wordSpacing,h=r.fontDirection,u=r.textHScale*h,d=e.length,f=i.vertical,p=f?1:-1,m=i.defaultVMetrics,y=s*r.fontMatrix[0],w=r.textRenderingMode===Ji.FILL&&!i.disableFontFace&&!r.patternFill;A.save(),r.textMatrix&&A.transform(...r.textMatrix),A.translate(r.x,r.y+r.textRise),h>0?A.scale(u,-1):A.scale(u,1);let B,E;const S=r.textRenderingMode&Ji.FILL_STROKE_MASK,_=S===Ji.FILL||S===Ji.FILL_STROKE,L=S===Ji.STROKE||S===Ji.FILL_STROKE;let k=r.lineWidth;const H=r.textMatrixScale;if(H===0||k===0?L&&(k=this.getSinglePixelWidth()):k/=H,a!==1&&(A.scale(a,a),k/=a),A.lineWidth=k,_&&r.patternFill){A.save();const st=r.fillColor.getPattern(A,this,oo(A),En.FILL,t);B=jr(A),A.restore(),A.fillStyle=st}if(L&&r.patternStroke){A.save();const st=r.strokeColor.getPattern(A,this,oo(A),En.STROKE,t);E=jr(A),A.restore(),A.strokeStyle=st}if(i.isInvalidPDFjsFont){const st=[];let rt=0;for(const At of e)st.push(At.unicode),rt+=At.width;const it=st.join("");if(A.fillText(it,0,0),this.dependencyTracker!==null){const At=A.measureText(it);this.dependencyTracker.recordBBox(t,this.ctx,-At.actualBoundingBoxLeft,At.actualBoundingBoxRight,-At.actualBoundingBoxAscent,At.actualBoundingBoxDescent).recordShowTextOperation(t)}r.x+=rt*y*u,A.restore(),this.compose();return}let Q=0,W;for(W=0;W<d;++W){const st=e[W];if(typeof st=="number"){Q+=p*st*s/1e3;continue}let rt=!1;const it=(st.isSpace?l:0)+o,At=st.fontChar,ut=st.accent;let vt,mt,M=st.width;if(f){const tt=st.vmetric||m,et=-(st.vmetric?tt[1]:M*.5)*y,ot=tt[2]*y;M=tt?-tt[0]:M,vt=et/a,mt=(Q+ot)/a}else vt=Q/a,mt=0;let $;if(i.remeasure&&M>0){$=A.measureText(At);const tt=$.width*1e3/s*a;if(M<tt&&this.isFontSubpixelAAEnabled){const et=M/tt;rt=!0,A.save(),A.scale(et,1),vt/=et}else M!==tt&&(vt+=(M-tt)/2e3*s/a)}if(this.contentVisible&&(st.isInFont||i.missingFile)){if(w&&!ut)A.fillText(At,vt,mt),(j=this.dependencyTracker)==null||j.recordCharacterBBox(t,A,$?{bbox:null}:i,s/a,vt,mt,()=>$??A.measureText(At));else if(this.paintChar(t,At,vt,mt,B,E),ut){const tt=vt+s*ut.offset.x/a,et=mt-s*ut.offset.y/a;this.paintChar(t,ut.fontChar,tt,et,B,E)}}const q=f?M*y-it*h:M*y+it*h;Q+=q,rt&&A.restore()}f?r.y-=Q:r.x+=Q*u,A.restore(),this.compose(),(V=this.dependencyTracker)==null||V.recordShowTextOperation(t)}showType3Text(t,e){const r=this.ctx,i=this.current,s=i.font,A=i.fontSize,a=i.fontDirection,o=s.vertical?1:-1,l=i.charSpacing,h=i.wordSpacing,u=i.textHScale*a,d=i.fontMatrix||_5,f=e.length,p=i.textRenderingMode===Ji.INVISIBLE;let m,y,w,B;if(p||A===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,r.save(),i.textMatrix&&r.transform(...i.textMatrix),r.translate(i.x,i.y+i.textRise),r.scale(u,a);const E=this.dependencyTracker;for(this.dependencyTracker=E?new um(E,t):null,m=0;m<f;++m){if(y=e[m],typeof y=="number"){B=o*y*A/1e3,this.ctx.translate(B,0),i.x+=B*u;continue}const S=(y.isSpace?h:0)+l,_=s.charProcOperatorList[y.operatorListId];_?this.contentVisible&&(this.save(),r.scale(A,A),r.transform(...d),this.executeOperatorList(_),this.restore()):Ue(`Type3 character "${y.operatorListId}" is not available.`);const L=[y.width,0];Qt.applyTransform(L,d),w=L[0]*A+S,r.translate(w,0),i.x+=w*u}r.restore(),E&&(this.dependencyTracker=E)}setCharWidth(t,e,r){}setCharWidthAndBounds(t,e,r,i,s,A,a){var l;const o=new Path2D;o.rect(i,s,A-i,a-s),this.ctx.clip(o),(l=this.dependencyTracker)==null||l.recordBBox(t,this.ctx,i,A,s,a).recordClipBox(t,this.ctx,i,A,s,a),this.endPath(t)}getColorN_Pattern(t,e){let r;if(e[0]==="TilingPattern"){const i=this.baseTransform||jr(this.ctx),s={createCanvasGraphics:(A,a)=>new GF(A,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new um(this.dependencyTracker,a,!0):null)};r=new dm(e,this.ctx,s,i)}else r=this._getPattern(t,e[1],e[2]);return r}setStrokeColorN(t,...e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("strokeColor",t),this.current.strokeColor=this.getColorN_Pattern(t,e),this.current.patternStroke=!0}setFillColorN(t,...e){var i;(i=this.dependencyTracker)==null||i.recordSimpleData("fillColor",t);const r=this.current.fillColor=this.getColorN_Pattern(t,e);this.current.patternFill=!0,this.current.tilingPatternDims=r instanceof dm?[0,0,0,0]:null}setStrokeRGBColor(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor=e,this.current.patternStroke=!1}setStrokeTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor=e,this.current.patternFill=!1,this.current.tilingPatternDims=null}setFillTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1,this.current.tilingPatternDims=null}_getPattern(t,e,r=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=DK(this.getObject(t,e)),this.cachedPatterns.set(e,i)),r&&(i.matrix=r),i}shadingFill(t,e){var A;if(!this.contentVisible)return;const r=this.ctx;this.save(t);const i=this._getPattern(t,e);r.fillStyle=i.getPattern(r,this,oo(r),En.SHADING,t);const s=oo(r);if(s){const{width:a,height:o}=r.canvas,l=mu.slice();Qt.axialAlignedBoundingBox([0,0,a,o],s,l);const[h,u,d,f]=l;this.ctx.fillRect(h,u,d-h,f-u)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(A=this.dependencyTracker)==null||A.resetBBox(t).recordFullPageBBox(t).recordDependencies(t,HA.transform).recordDependencies(t,HA.fill).recordOperation(t),this.compose(this.current.getClippedPathBoundingBox()),this.restore(t)}beginInlineImage(){lr("Should not call beginInlineImage")}beginImageData(){lr("Should not call beginImageData")}paintFormXObjectBegin(t,e,r){var i;if(this.contentVisible&&(this.save(t),this.baseTransformStack.push(this.baseTransform),e&&this.transform(t,...e),this.baseTransform=jr(this.ctx),r)){Qt.axialAlignedBoundingBox(r,this.baseTransform,this.current.minMax);const[s,A,a,o]=r,l=new Path2D;l.rect(s,A,a-s,o-A),this.ctx.clip(l),(i=this.dependencyTracker)==null||i.recordClipBox(t,this.ctx,s,a,A,o),this.endPath(t)}}paintFormXObjectEnd(t){this.contentVisible&&(this.restore(t),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t,e){var p;if(!this.contentVisible)return;this.save(t);const{inSMaskMode:r}=this;r&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;if(e.isolated||m2("TODO: Support non-isolated groups."),e.knockout&&Ue("Knockout groups not supported."),!e.needsIsolation&&i.globalAlpha===1&&i.globalCompositeOperation==="source-over"&&!r){if(e.bbox){let m=new Path2D;const[y,w,B,E]=e.bbox;if(m.rect(y,w,B-y,E-w),e.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(e.matrix)),m=S}i.clip(m)}this.groupStack.push(null),this.groupLevel++;return}const s=jr(i);e.matrix&&i.transform(...e.matrix);const A=[0,0,i.canvas.width,i.canvas.height];let a;e.bbox?(a=mu.slice(),Qt.axialAlignedBoundingBox(e.bbox,jr(i),a),a=Qt.intersect(a,A)||[0,0,0,0]):a=A;const o=Math.floor(a[0]),l=Math.floor(a[1]),h=Math.max(Math.ceil(a[2])-o,1),u=Math.max(Math.ceil(a[3])-l,1);this.current.startNewPathAndClipBox([0,0,h,u]);const d=this.canvasFactory.create(h,u);e.smask&&this.smaskGroupCanvases.push(d);const f=d.context;if(f.translate(-o,-l),f.transform(...s),!e.isolated&&!e.smask&&r&&e.needsIsolation&&(f.save(),f.setTransform(1,0,0,1,0,0),f.drawImage(i.canvas,-o,-l),f.restore()),e.bbox){let m=new Path2D;const[y,w,B,E]=e.bbox;if(m.rect(y,w,B-y,E-w),e.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(e.matrix)),m=S}f.clip(m)}e.smask&&this.smaskStack.push({canvas:d.canvas,context:f,offsetX:o,offsetY:l,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null}),(!e.smask||this.dependencyTracker)&&(i.setTransform(1,0,0,1,0,0),i.translate(o,l),i.save()),gm(i,f),this.ctx=f,(p=this.dependencyTracker)==null||p.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(i),this.setGState(t,[["BM","source-over"],["ca",1],["CA",1],["TR",null]]),this.groupStack.push(i),this.groupLevel++}endGroup(t,e){var s;if(!this.contentVisible)return;this.groupLevel--;const r=this.ctx,i=this.groupStack.pop();if(i===null){this.restore(t);return}if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,(s=this.dependencyTracker)==null||s.popBaseTransform(),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(t),this.dependencyTracker&&(this.ctx.restore(),this.inSMaskMode&&this.ctx.setTransform(this.suspendedCtx.getTransform()));else{this.ctx.restore();const A=jr(this.ctx);this.restore(t),this.ctx.save(),this.ctx.setTransform(...A);const a=mu.slice();Qt.axialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],A,a),this.ctx.drawImage(r.canvas,0,0),this.ctx.restore(),this.canvasFactory.destroy({canvas:r.canvas,context:r}),this.compose(a)}}beginAnnotation(t,e,r,i,s,A){if(I(this,Ma,$4).call(this),P2(this.ctx),this.ctx.save(),this.save(t),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),r){const a=r[2]-r[0],o=r[3]-r[1];if(A&&this.annotationCanvasMap){i=i.slice(),i[4]-=r[0],i[5]-=r[1],r=r.slice(),r[0]=r[1]=0,r[2]=a,r[3]=o,Qt.singularValueDecompose2dScale(jr(this.ctx),AA);const{viewportScale:l}=this,h=Math.ceil(a*this.outputScaleX*l),u=Math.ceil(o*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(h,u);const{canvas:d,context:f}=this.annotationCanvas;this.annotationCanvasMap.set(e,d),this.annotationCanvas.savedCtx=this.ctx,this.ctx=f,this.ctx.save(),this.ctx.setTransform(AA[0],0,0,-AA[1],0,o*AA[1]),P2(this.ctx)}else{P2(this.ctx),this.endPath(t);const l=new Path2D;l.rect(r[0],r[1],a,o),this.ctx.clip(l)}}this.current=new qU(this.ctx.canvas.width,this.ctx.canvas.height),this.baseTransformStack.push(this.baseTransform),this.transform(t,...i),this.transform(t,...s),this.baseTransform=jr(this.ctx)}endAnnotation(t){this.annotationCanvas&&(this.ctx.restore(),I(this,Ma,W4).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.baseTransform=this.baseTransformStack.pop()}paintImageMaskXObject(t,e){var a;if(!this.contentVisible)return;const r=e.count;e=this.getObject(t,e.data,e),e.count=r;const i=this.ctx,s=this._createMaskCanvas(t,e),A=s.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(A,s.offsetX,s.offsetY),(a=this.dependencyTracker)==null||a.resetBBox(t).recordBBox(t,this.ctx,s.offsetX,s.offsetX+A.width,s.offsetY,s.offsetY+A.height).recordOperation(t),i.restore(),s.canvasEntry&&this.canvasFactory.destroy(s.canvasEntry),this.compose()}paintImageMaskXObjectRepeat(t,e,r,i=0,s=0,A,a){var u,d,f;if(!this.contentVisible)return;e=this.getObject(t,e.data,e);const o=this.ctx;o.save();const l=jr(o);o.transform(r,i,s,A,0,0);const h=this._createMaskCanvas(t,e);o.setTransform(1,0,0,1,h.offsetX-l[4],h.offsetY-l[5]),(u=this.dependencyTracker)==null||u.resetBBox(t);for(let p=0,m=a.length;p<m;p+=2){const y=Qt.transform(l,[r,i,s,A,a[p],a[p+1]]);o.drawImage(h.canvas,y[4],y[5]),(d=this.dependencyTracker)==null||d.recordBBox(t,this.ctx,y[4],y[4]+h.canvas.width,y[5],y[5]+h.canvas.height)}o.restore(),h.canvasEntry&&this.canvasFactory.destroy(h.canvasEntry),this.compose(),(f=this.dependencyTracker)==null||f.recordOperation(t)}paintImageMaskXObjectGroup(t,e){var A,a,o;if(!this.contentVisible)return;const r=this.ctx,i=this.current.fillColor,s=this.current.patternFill;(A=this.dependencyTracker)==null||A.resetBBox(t).recordDependencies(t,HA.transformAndFill);for(const l of e){const{data:h,width:u,height:d,transform:f}=l,p=this.canvasFactory.create(u,d),m=p.context;m.save();const y=this.getObject(t,h,l);JU(m,y),m.globalCompositeOperation="source-in",m.fillStyle=s?i.getPattern(m,this,oo(r),En.FILL,t):i,m.fillRect(0,0,u,d),m.restore(),r.save(),r.transform(...f),r.scale(1,-1),N2(r,p.canvas,0,0,u,d,0,-1,1,1),this.canvasFactory.destroy(p),(a=this.dependencyTracker)==null||a.recordBBox(t,r,0,u,0,d),r.restore()}this.compose(),(o=this.dependencyTracker)==null||o.recordOperation(t)}paintImageXObject(t,e){if(!this.contentVisible)return;const r=this.getObject(t,e);if(!r){Ue("Dependent image isn't ready yet");return}this.paintInlineImageXObject(t,r)}paintImageXObjectRepeat(t,e,r,i,s){if(!this.contentVisible)return;const A=this.getObject(t,e);if(!A){Ue("Dependent image isn't ready yet");return}const a=A.width,o=A.height,l=[];for(let h=0,u=s.length;h<u;h+=2)l.push({transform:[r,0,0,i,s[h],s[h+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(t,A,l)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return{img:t.bitmap,canvasEntry:null};const{bitmap:e,width:r,height:i}=t,s=this.canvasFactory.create(r,i),A=s.context;return A.filter=this.current.transferMaps,A.drawImage(e,0,0),A.filter="none",{img:s.canvas,canvasEntry:s}}paintInlineImageXObject(t,e){var h;if(!this.contentVisible)return;const r=e.width,i=e.height,s=this.ctx;this.save(t);const{filter:A}=s;A!=="none"&&A!==""&&(s.filter="none"),s.scale(1/r,-1/i);let a,o=null;if(e.bitmap){const u=this.applyTransferMapsToBitmap(e);a=u.img,o=u.canvasEntry}else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)a=e;else{const u=this.canvasFactory.create(r,i);YU(u.context,e),a=this.applyTransferMapsToCanvas(u.context),o=u}const l=this._scaleImage(a,oo(s));s.imageSmoothingEnabled=ZU(jr(s),e.interpolate),this.dependencyTracker&&(this.dependencyTracker.resetBBox(t).recordBBox(t,s,0,r,-i,0).recordDependencies(t,HA.imageXObject).recordOperation(t),(h=this.imagesTracker)==null||h.record(s,r,i,this.dependencyTracker.clipBox)),N2(s,l.img,0,0,l.paintWidth,l.paintHeight,0,-i,r,i),l.tmpCanvas&&this.canvasFactory.destroy(l.tmpCanvas),o&&this.canvasFactory.destroy(o),this.compose(),this.restore(t)}paintInlineImageXObjectGroup(t,e,r){var a,o,l;if(!this.contentVisible)return;const i=this.ctx;let s,A=null;if(e.bitmap)s=e.bitmap;else{const h=e.width,u=e.height,d=this.canvasFactory.create(h,u);YU(d.context,e),s=this.applyTransferMapsToCanvas(d.context),A=d}(a=this.dependencyTracker)==null||a.resetBBox(t);for(const h of r)i.save(),i.transform(...h.transform),i.scale(1,-1),N2(i,s,h.x,h.y,h.w,h.h,0,-1,1,1),(o=this.dependencyTracker)==null||o.recordBBox(t,i,0,1,-1,0),i.restore();A&&this.canvasFactory.destroy(A),(l=this.dependencyTracker)==null||l.recordOperation(t),this.compose()}paintSolidColorImageMask(t){var e;this.contentVisible&&((e=this.dependencyTracker)==null||e.resetBBox(t).recordBBox(t,this.ctx,0,1,0,1).recordDependencies(t,HA.fill).recordOperation(t),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t,e){}markPointProps(t,e,r){}beginMarkedContent(t,e){var r;(r=this.dependencyTracker)==null||r.beginMarkedContent(t),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e,r){var i;(i=this.dependencyTracker)==null||i.beginMarkedContent(t),e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(t){var e;(e=this.dependencyTracker)==null||e.endMarkedContent(t),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(t){}endCompat(t){}consumePath(t,e,r){var A,a;const i=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(r);const s=this.ctx;this.pendingClip?(i||(this.pendingClip===t3?s.clip(e,"evenodd"):s.clip(e)),this.pendingClip=null,(A=this.dependencyTracker)==null||A.bboxToClipBoxDropOperation(t).recordFutureForcedDependency("clipPath",t)):(a=this.dependencyTracker)==null||a.recordOperation(t),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=jr(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const e=Math.abs(t[0]*t[3]-t[2]*t[1]),r=Math.hypot(t[0],t[2]),i=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:e,b:r,c:i,d:s}=this.ctx.getTransform();let A,a;if(r===0&&i===0){const o=Math.abs(e),l=Math.abs(s);if(o===l)if(t===0)A=a=1/o;else{const h=o*t;A=a=h<1?1/h:1}else if(t===0)A=1/o,a=1/l;else{const h=o*t,u=l*t;A=h<1?1/h:1,a=u<1?1/u:1}}else{const o=Math.abs(e*s-r*i),l=Math.hypot(e,r),h=Math.hypot(i,s);if(t===0)A=h/o,a=l/o;else{const u=t*o;A=h>u?h/u:1,a=l>u?l/u:1}}this._cachedScaleForStroking[0]=A,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(t,e){const{ctx:r,current:{lineWidth:i}}=this,[s,A]=this.getScaleForStroking();if(s===A){r.lineWidth=(i||1)*s,r.stroke(t);return}const a=r.getLineDash();e&&r.save(),r.scale(s,A),X5.a=1/s,X5.d=1/A;const o=new Path2D;if(o.addPath(t,X5),a.length>0){const l=Math.max(s,A);r.setLineDash(a.map(h=>h/l)),r.lineDashOffset/=l}r.lineWidth=i||1,r.stroke(o),e&&r.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};Ma=new WeakSet,$4=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.canvasFactory.destroy(this.transparentCanvasEntry),this.transparentCanvas=null,this.transparentCanvasEntry=null)},W4=function(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}},z4=function(t,e,r){const i=new Path2D;return i.addPath(t,new DOMMatrix(r).invertSelf().multiplySelf(e)),i};let Yd=GF;for(const n in ao)Yd.prototype[n]!==void 0&&(Yd.prototype[ao[n]]=Yd.prototype[n]);class M2{constructor(t,e,r){T(this,zv,null);T(this,Xv,null);ct(this,"_fullReader",null);ct(this,"_rangeReaders",new Set);ct(this,"_source",null);this._source=t,C(this,zv,e),C(this,Xv,r)}get _progressiveDataLength(){var t;return((t=this._fullReader)==null?void 0:t._loaded)??0}getFullReader(){return ni(!this._fullReader,"BasePDFStream.getFullReader can only be called once."),this._fullReader=new(c(this,zv))(this)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const r=new(c(this,Xv))(this,t,e);return this._rangeReaders.add(r),r}cancelAllRequests(t){var e;(e=this._fullReader)==null||e.cancel(t);for(const r of new Set(this._rangeReaders))r.cancel(t)}}zv=new WeakMap,Xv=new WeakMap;class k2{constructor(t){ct(this,"onProgress",null);ct(this,"_contentLength",0);ct(this,"_filename",null);ct(this,"_headersCapability",Promise.withResolvers());ct(this,"_isRangeSupported",!1);ct(this,"_isStreamingSupported",!1);ct(this,"_loaded",0);ct(this,"_stream",null);this._stream=t}_callOnProgress(){var t;(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){lr("Abstract method `read` called")}cancel(t){lr("Abstract method `cancel` called")}}class O2{constructor(t,e,r){ct(this,"_stream",null);this._stream=t}async read(){lr("Abstract method `read` called")}cancel(t){lr("Abstract method `cancel` called")}}function $K(n){let t=!0,e=r("filename\\*","i").exec(n);if(e){e=e[1];let h=a(e);return h=unescape(h),h=o(h),h=l(h),s(h)}if(e=A(n),e){const h=l(e);return s(h)}if(e=r("filename","i").exec(n),e){e=e[1];let h=a(e);return h=l(h),s(h)}function r(h,u){return new RegExp("(?:^|;)\\s*"+h+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',u)}function i(h,u){if(h){if(!/^[\x00-\xFF]+$/.test(u))return u;try{const d=new TextDecoder(h,{fatal:!0}),f=w2(u);u=d.decode(f),t=!1}catch{}}return u}function s(h){return t&&/[\x80-\xff]/.test(h)&&(h=i("utf-8",h),t&&(h=i("iso-8859-1",h))),h}function A(h){const u=[];let d;const f=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(d=f.exec(h))!==null;){let[,m,y,w]=d;if(m=parseInt(m,10),m in u){if(m===0)break;continue}u[m]=[y,w]}const p=[];for(let m=0;m<u.length&&m in u;++m){let[y,w]=u[m];w=a(w),y&&(w=unescape(w),m===0&&(w=o(w))),p.push(w)}return p.join("")}function a(h){if(h.startsWith('"')){const u=h.slice(1).split('\\"');for(let d=0;d<u.length;++d){const f=u[d].indexOf('"');f!==-1&&(u[d]=u[d].slice(0,f),u.length=d+1),u[d]=u[d].replaceAll(/\\(.)/g,"$1")}h=u.join('"')}return h}function o(h){const u=h.indexOf("'");if(u===-1)return h;const d=h.slice(0,u),p=h.slice(u+1).replace(/^[^']*'/,"");return i(d,p)}function l(h){return!h.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(h)?h:h.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(u,d,f,p){if(f==="q"||f==="Q")return p=p.replaceAll("_"," "),p=p.replaceAll(/=([0-9a-fA-F]{2})/g,function(m,y){return String.fromCharCode(parseInt(y,16))}),i(d,p);try{p=atob(p)}catch{}return i(d,p)})}return""}function e3(n,t){const e=new Headers;if(!n||!t||typeof t!="object")return e;for(const r in t){const i=t[r];i!==void 0&&e.append(r,i)}return e}function D2(n){var t;return((t=URL.parse(n))==null?void 0:t.origin)??null}function r3({responseHeaders:n,isHttp:t,rangeChunkSize:e,disableRange:r}){const i={contentLength:0,isRangeSupported:!1},s=parseInt(n.get("Content-Length"),10);return!Number.isInteger(s)||(i.contentLength=s,s<=2*e)||r||!t||n.get("Accept-Ranges")!=="bytes"||(n.get("Content-Encoding")||"identity")==="identity"&&(i.isRangeSupported=!0),i}function i3(n){const t=n.get("Content-Disposition");if(t){let e=$K(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(E2(e))return e}return null}function R2(n,t){return new im(`Unexpected server response (${n}) while retrieving PDF "${t.href}".`,n,n===404||n===0&&t.protocol==="file:")}function n3(n,t){if(n!==t)throw new Error(`Expected range response-origin "${n}" to match "${t}".`)}function s3(n,t,e,r){return fetch(n,{method:"GET",headers:t,signal:r.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"})}function A3(n,t){if(n!==200&&n!==206)throw R2(n,t)}function H2(n){if(n instanceof Uint8Array)return n.buffer;if(n instanceof ArrayBuffer)return n;throw new Error(`getArrayBuffer - unexpected data: ${n}`)}class WK extends M2{constructor(e){super(e,zK,XK);ct(this,"_responseOrigin",null);const{httpHeaders:r,url:i}=e;ni(/https?:/.test(i.protocol),"PDFFetchStream only supports http(s):// URLs."),this.headers=e3(!0,r)}}class zK extends k2{constructor(e){super(e);ct(this,"_abortController",new AbortController);ct(this,"_reader",null);const{disableRange:r,disableStream:i,rangeChunkSize:s,url:A,withCredentials:a}=e._source;this._isStreamingSupported=!i;const o=new Headers(e.headers);s3(A,o,a,this._abortController).then(l=>{e._responseOrigin=D2(l.url),A3(l.status,A),this._reader=l.body.getReader();const h=l.headers,{contentLength:u,isRangeSupported:d}=r3({responseHeaders:h,isHttp:!0,rangeChunkSize:s,disableRange:r});this._contentLength=u,this._isRangeSupported=d,this._filename=i3(h),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new sl("Streaming is disabled.")),this._headersCapability.resolve()}).catch(this._headersCapability.reject)}async read(){await this._headersCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:(this._loaded+=e.byteLength,this._callOnProgress(),{value:H2(e),done:!1})}cancel(e){var r;(r=this._reader)==null||r.cancel(e),this._abortController.abort()}}class XK extends O2{constructor(e,r,i){super(e,r,i);ct(this,"_abortController",new AbortController);ct(this,"_readCapability",Promise.withResolvers());ct(this,"_reader",null);const{url:s,withCredentials:A}=e._source,a=new Headers(e.headers);a.append("Range",`bytes=${r}-${i-1}`),s3(s,a,A,this._abortController).then(o=>{const l=D2(o.url);n3(l,e._responseOrigin),A3(o.status,s),this._reader=o.body.getReader(),this._readCapability.resolve()}).catch(this._readCapability.reject)}async read(){await this._readCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:{value:H2(e),done:!1}}cancel(e){var r;(r=this._reader)==null||r.cancel(e),this._abortController.abort()}}function a3(n){return n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer}function K2(){for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}class qK extends M2{constructor(e){super(e,YK,JK);T(this,lB);ct(this,"_progressiveDone",!1);ct(this,"_queuedChunks",[]);const{pdfDataRangeTransport:r}=e,{initialData:i,progressiveDone:s}=r;if((i==null?void 0:i.length)>0){const a=a3(i);this._queuedChunks.push(a)}this._progressiveDone=s;const A=a=>{var o;switch(a.type){case"range":case"progressiveRead":I(this,lB,WD).call(this,a.begin,a.chunk);break;case"progressiveDone":(o=this._fullReader)==null||o.progressiveDone(),this._progressiveDone=!0;break}};r.transportReady(A)}getFullReader(){const e=super.getFullReader();return this._queuedChunks=null,e}getRangeReader(e,r){const i=super.getRangeReader(e,r);return i&&(i.onDone=()=>this._rangeReaders.delete(i),this._source.pdfDataRangeTransport.requestDataRange(e,r)),i}cancelAllRequests(e){super.cancelAllRequests(e),this._source.pdfDataRangeTransport.abort()}}lB=new WeakSet,WD=function(e,r){const i=a3(r);if(e===void 0)this._fullReader?this._fullReader._enqueue(i):this._queuedChunks.push(i);else{const s=this._rangeReaders.keys().find(A=>A._begin===e);ni(s,"#onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."),s._enqueue(i)}};class YK extends k2{constructor(e){super(e);T(this,qv,K2.bind(this));ct(this,"_done",!1);ct(this,"_queuedChunks",null);ct(this,"_requests",[]);const{pdfDataRangeTransport:r,disableRange:i,disableStream:s}=e._source,{length:A,contentDispositionFilename:a}=r;this._queuedChunks=e._queuedChunks||[];for(const l of this._queuedChunks)this._loaded+=l.byteLength;this._done=e._progressiveDone,this._contentLength=A,this._isStreamingSupported=!s,this._isRangeSupported=!i,E2(a)&&(this._filename=a),this._headersCapability.resolve();const o=this._loaded;Promise.resolve().then(()=>{o>0&&this._loaded===o&&this._callOnProgress()})}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength,this._callOnProgress())}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,c(this,qv).call(this)}progressiveDone(){this._done||(this._done=!0),this._queuedChunks.length===0&&c(this,qv).call(this)}}qv=new WeakMap;class JK extends O2{constructor(e,r,i){super(e,r,i);T(this,Yv,K2.bind(this));ct(this,"onDone",null);ct(this,"_begin",-1);ct(this,"_done",!1);ct(this,"_queuedChunk",null);ct(this,"_requests",[]);this._begin=r}_enqueue(e){var r;this._done||(this._requests.length===0?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),c(this,Yv).call(this)),this._done=!0,(r=this.onDone)==null||r.call(this))}async read(){if(this._queuedChunk){const r=this._queuedChunk;return this._queuedChunk=null,{value:r,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){var r;this._done=!0,c(this,Yv).call(this),(r=this.onDone)==null||r.call(this)}}Yv=new WeakMap;const q5=200,o3=206;function ZK(n){return typeof n!="string"?n:w2(n).buffer}class t9 extends M2{constructor(e){super(e,e9,r9);T(this,gp);T(this,_o,new WeakMap);ct(this,"_responseOrigin",null);const{httpHeaders:r,url:i}=e;this.url=i,this.isHttp=/https?:/.test(i.protocol),this.headers=e3(this.isHttp,r)}_request(e){const r=new XMLHttpRequest,i={validateStatus:null,onHeadersReceived:e.onHeadersReceived,onDone:e.onDone,onError:e.onError,onProgress:e.onProgress};c(this,_o).set(r,i),r.open("GET",this.url),r.withCredentials=this._source.withCredentials;for(const[s,A]of this.headers)r.setRequestHeader(s,A);return this.isHttp&&"begin"in e&&"end"in e?(r.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.validateStatus=s=>s===o3||s===q5):i.validateStatus=s=>s===q5,r.responseType="arraybuffer",ni(e.onError,"Expected `onError` callback to be provided."),r.onerror=()=>e.onError(r.status),r.onreadystatechange=I(this,gp,XD).bind(this,r),r.onprogress=I(this,gp,zD).bind(this,r),r.send(null),r}_abortRequest(e){c(this,_o).has(e)&&(c(this,_o).delete(e),e.abort())}getRangeReader(e,r){const i=super.getRangeReader(e,r);return i&&(i.onClosed=()=>this._rangeReaders.delete(i)),i}}_o=new WeakMap,gp=new WeakSet,zD=function(e,r){var s;const i=c(this,_o).get(e);(s=i==null?void 0:i.onProgress)==null||s.call(i,r)},XD=function(e,r){const i=c(this,_o).get(e);if(!i||(e.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),e.readyState!==4)||!c(this,_o).has(e))return;if(c(this,_o).delete(e),e.status===0&&this.isHttp){i.onError(e.status);return}const s=e.status||q5;if(!i.validateStatus(s)){i.onError(e.status);return}const A=ZK(e.response);if(s===o3){const a=e.getResponseHeader("Content-Range");/bytes (\d+)-(\d+)\/(\d+)/.test(a)?i.onDone(A):(Ue('Missing or invalid "Content-Range" header.'),i.onError(0))}else A?i.onDone(A):i.onError(e.status)};class e9 extends k2{constructor(e){super(e);T(this,Io);T(this,Jv,K2.bind(this));ct(this,"_cachedChunks",[]);ct(this,"_done",!1);ct(this,"_requests",[]);ct(this,"_storedError",null);this._fullRequestXhr=e._request({onHeadersReceived:I(this,Io,qD).bind(this),onDone:I(this,Io,YD).bind(this),onError:I(this,Io,JD).bind(this),onProgress:I(this,Io,ZD).bind(this)})}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e),c(this,Jv).call(this),this._stream._abortRequest(this._fullRequestXhr),this._fullRequestXhr=null}}Jv=new WeakMap,Io=new WeakSet,qD=function(){const e=this._stream,{disableRange:r,rangeChunkSize:i}=e._source,s=this._fullRequestXhr;e._responseOrigin=D2(s.responseURL);const A=s.getAllResponseHeaders(),a=new Headers(A?A.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(h=>{const[u,...d]=h.split(": ");return[u,d.join(": ")]}):[]),{contentLength:o,isRangeSupported:l}=r3({responseHeaders:a,isHttp:e.isHttp,rangeChunkSize:i,disableRange:r});this._contentLength=o,this._isRangeSupported=l,this._filename=i3(a),this._isRangeSupported&&e._abortRequest(s),this._headersCapability.resolve()},YD=function(e){this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._cachedChunks.push(e),this._done=!0,this._cachedChunks.length===0&&c(this,Jv).call(this)},JD=function(e){this._storedError=R2(e,this._stream.url),this._headersCapability.reject(this._storedError);for(const r of this._requests)r.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0},ZD=function(e){var r;(r=this.onProgress)==null||r.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})};class r9 extends O2{constructor(e,r,i){super(e,r,i);T(this,Rl);T(this,Zv,K2.bind(this));ct(this,"onClosed",null);ct(this,"_done",!1);ct(this,"_queuedChunk",null);ct(this,"_requests",[]);ct(this,"_storedError",null);this._requestXhr=e._request({begin:r,end:i,onHeadersReceived:I(this,Rl,tR).bind(this),onDone:I(this,Rl,eR).bind(this),onError:I(this,Rl,X4).bind(this),onProgress:null})}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const r=this._queuedChunk;return this._queuedChunk=null,{value:r,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){var r;this._done=!0,c(this,Zv).call(this),this._stream._abortRequest(this._requestXhr),(r=this.onClosed)==null||r.call(this)}}Zv=new WeakMap,Rl=new WeakSet,tR=function(){var r;const e=D2((r=this._requestXhr)==null?void 0:r.responseURL);try{n3(e,this._stream._responseOrigin)}catch(i){this._storedError=i,I(this,Rl,X4).call(this,0)}},eR=function(e){var r;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0,c(this,Zv).call(this),(r=this.onClosed)==null||r.call(this)},X4=function(e){this._storedError??(this._storedError=R2(e,this._stream.url));for(const r of this._requests)r.reject(this._storedError);this._requests.length=0,this._queuedChunk=null};function l3(n,t=null){const e=process.getBuiltinModule("fs"),{Readable:r}=process.getBuiltinModule("stream"),i=e.createReadStream(n,t);return r.toWeb(i)}class i9 extends M2{constructor(t){super(t,n9,s9);const{url:e}=t;ni(e.protocol==="file:","PDFNodeStream only supports file:// URLs.")}}class n9 extends k2{constructor(e){super(e);ct(this,"_reader",null);const{disableRange:r,disableStream:i,rangeChunkSize:s,url:A}=e._source;this._isStreamingSupported=!i,process.getBuiltinModule("fs/promises").lstat(A).then(o=>{const l=l3(A);this._reader=l.getReader();const{size:h}=o;this._contentLength=h,this._isRangeSupported=!r&&h>2*s,!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new sl("Streaming is disabled.")),this._headersCapability.resolve()}).catch(o=>{o.code==="ENOENT"&&(o=R2(0,A)),this._headersCapability.reject(o)})}async read(){await this._headersCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:(this._loaded+=e.byteLength,this._callOnProgress(),{value:H2(e),done:!1})}cancel(e){var r;(r=this._reader)==null||r.cancel(e)}}class s9 extends O2{constructor(e,r,i){super(e,r,i);ct(this,"_readCapability",Promise.withResolvers());ct(this,"_reader",null);const{url:s}=e._source;try{const A=l3(s,{start:r,end:i-1});this._reader=A.getReader(),this._readCapability.resolve()}catch(A){this._readCapability.reject(A)}}async read(){await this._readCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:{value:H2(e),done:!1}}cancel(e){var r;(r=this._reader)==null||r.cancel(e)}}function A9(n){return am(n)?WK:rA?i9:t9}class ba{static get workerPort(){return c(this,t1)}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");C(this,t1,t)}static get workerSrc(){return c(this,e1)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");C(this,e1,t)}}t1=new WeakMap,e1=new WeakMap,T(ba,t1,null),T(ba,e1,"");class a9{constructor({parsedData:t,rawData:e}){T(this,pp);T(this,r1);C(this,pp,t),C(this,r1,e)}getRaw(){return c(this,r1)}get(t){return c(this,pp).get(t)??null}[Symbol.iterator](){return c(this,pp).entries()}}pp=new WeakMap,r1=new WeakMap;const Jd=Symbol("INTERNAL");class o9{constructor(t,{name:e,intent:r,usage:i,rbGroups:s}){T(this,i1,!1);T(this,n1,!1);T(this,s1,!1);T(this,mp,!0);C(this,i1,!!(t&iA.DISPLAY)),C(this,n1,!!(t&iA.PRINT)),this.name=e,this.intent=r,this.usage=i,this.rbGroups=s}get visible(){if(c(this,s1))return c(this,mp);if(!c(this,mp))return!1;const{print:t,view:e}=this.usage;return c(this,i1)?(e==null?void 0:e.viewState)!=="OFF":c(this,n1)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,r=!1){t!==Jd&&lr("Internal method `_setVisible` called."),C(this,s1,r),C(this,mp,e)}}i1=new WeakMap,n1=new WeakMap,s1=new WeakMap,mp=new WeakMap;class l9{constructor(t,e=iA.DISPLAY){T(this,A1);T(this,Ch,null);T(this,Fr,new Map);T(this,vp,null);T(this,wp,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,C(this,wp,t.order);for(const r of t.groups)c(this,Fr).set(r.id,new o9(e,r));if(t.baseState==="OFF")for(const r of c(this,Fr).values())r._setVisible(Jd,!1);for(const r of t.on)c(this,Fr).get(r)._setVisible(Jd,!0);for(const r of t.off)c(this,Fr).get(r)._setVisible(Jd,!1);C(this,vp,this.getHash())}}isVisible(t){if(c(this,Fr).size===0)return!0;if(!t)return m2("Optional content group not defined."),!0;if(t.type==="OCG")return c(this,Fr).has(t.id)?c(this,Fr).get(t.id).visible:(Ue(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return I(this,A1,q4).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!c(this,Fr).has(e))return Ue(`Optional content group not found: ${e}`),!0;if(c(this,Fr).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!c(this,Fr).has(e))return Ue(`Optional content group not found: ${e}`),!0;if(!c(this,Fr).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!c(this,Fr).has(e))return Ue(`Optional content group not found: ${e}`),!0;if(!c(this,Fr).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!c(this,Fr).has(e))return Ue(`Optional content group not found: ${e}`),!0;if(c(this,Fr).get(e).visible)return!1}return!0}return Ue(`Unknown optional content policy ${t.policy}.`),!0}return Ue(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,r=!0){var s;const i=c(this,Fr).get(t);if(!i){Ue(`Optional content group not found: ${t}`);return}if(r&&e&&i.rbGroups.length)for(const A of i.rbGroups)for(const a of A)a!==t&&((s=c(this,Fr).get(a))==null||s._setVisible(Jd,!1,!0));i._setVisible(Jd,!!e,!0),C(this,Ch,null)}setOCGState({state:t,preserveRB:e}){let r;for(const i of t){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}const s=c(this,Fr).get(i);if(s)switch(r){case"ON":this.setVisibility(i,!0,e);break;case"OFF":this.setVisibility(i,!1,e);break;case"Toggle":this.setVisibility(i,!s.visible,e);break}}C(this,Ch,null)}get hasInitialVisibility(){return c(this,vp)===null||this.getHash()===c(this,vp)}getOrder(){return c(this,Fr).size?c(this,wp)?c(this,wp).slice():[...c(this,Fr).keys()]:null}getGroup(t){return c(this,Fr).get(t)||null}getHash(){if(c(this,Ch)!==null)return c(this,Ch);const t=new V5;for(const[e,r]of c(this,Fr))t.update(`${e}:${r.visible}`);return C(this,Ch,t.hexdigest())}[Symbol.iterator](){return c(this,Fr).entries()}}Ch=new WeakMap,Fr=new WeakMap,vp=new WeakMap,wp=new WeakMap,A1=new WeakSet,q4=function(t){const e=t.length;if(e<2)return!0;const r=t[0];for(let i=1;i<e;i++){const s=t[i];let A;if(Array.isArray(s))A=I(this,A1,q4).call(this,s);else if(c(this,Fr).has(s))A=c(this,Fr).get(s).visible;else return Ue(`Optional content group not found: ${s}`),!0;switch(r){case"And":if(!A)return!1;break;case"Or":if(A)return!0;break;case"Not":return!A;default:return!0}}return r==="And"};class c9{constructor(){T(this,is);T(this,Ni,null);T(this,ka,null);T(this,Nn,0);T(this,bf,null);T(this,Uo,null)}get pagesNumber(){return c(this,Nn)}set pagesNumber(t){c(this,Nn)!==t&&(C(this,Nn,t),C(this,Ni,null),C(this,ka,null))}movePages(t,e,r){I(this,is,Lw).call(this);const i=c(this,Ni),s=I(this,is,Qw).call(this),A=e.length,a=new Uint32Array(A);let o=0;for(let d=0;d<A;d++){const f=e[d]-1;a[d]=i[f],f<r&&o++}const l=c(this,Nn),h=l-A,u=Gr(r-o,0,h);for(let d=0,f=0;d<l;d++)t.has(d+1)||(i[f++]=i[d]);i.copyWithin(u+A,u,h),i.set(a,u),I(this,is,sC).call(this,s),i.every((d,f)=>d===f+1)&&C(this,Ni,null)}deletePages(t){I(this,is,Lw).call(this);const e=c(this,Ni),r=I(this,is,Qw).call(this);C(this,Uo,{pageNumberToId:e.slice(),pagesNumber:c(this,Nn),prevPageNumbers:c(this,ka).slice()});const i=c(this,Nn)-t.length;C(this,Nn,i);const s=C(this,Ni,new Uint32Array(i));C(this,ka,new Int32Array(i));let A=0,a=0;for(const o of t){const l=o-1;l!==A&&(s.set(e.subarray(A,l),a),a+=l-A),A=l+1}A<e.length&&s.set(e.subarray(A),a),I(this,is,sC).call(this,r,new Set(t))}cancelDelete(){c(this,Uo)&&(C(this,Ni,c(this,Uo).pageNumberToId),C(this,Nn,c(this,Uo).pagesNumber),C(this,ka,c(this,Uo).prevPageNumbers),C(this,Uo,null))}cleanSavedData(){C(this,Uo,null)}copyPages(t){I(this,is,Lw).call(this),C(this,bf,{pageNumbers:t,pageIds:t.map(e=>c(this,Ni)[e-1])})}cancelCopy(){C(this,bf,null)}pastePages(t){I(this,is,Lw).call(this);const e=c(this,Ni),r=I(this,is,Qw).call(this),{pageNumbers:i,pageIds:s}=c(this,bf),A=c(this,Nn)+i.length;C(this,Nn,A);const a=C(this,Ni,new Uint32Array(A));C(this,ka,new Int32Array(A)),a.set(e.subarray(0,t),0),a.set(s,t),a.set(e.subarray(t),t+i.length),I(this,is,sC).call(this,r,null,t,i),C(this,bf,null)}hasBeenAltered(){return c(this,Ni)!==null}getPageMappingForSaving(t=null){t??(t=I(this,is,Qw).call(this));let e=0;for(const i of t.values())e=Math.max(e,i.length);const r=new Array(e);for(let i=0;i<e;i++)r[i]={document:null,pageIndices:[],includePages:[]};for(const[i,s]of t)for(let A=0,a=s.length;A<a;A++)r[A].includePages.push([i-1,s[A]-1]);for(const{includePages:i,pageIndices:s}of r){i.sort((A,a)=>A[0]-a[0]);for(let A=0,a=i.length;A<a;A++)s.push(i[A][1]),i[A]=i[A][0]}return r}extractPages(t){t=Array.from(t).sort((r,i)=>r-i);const e=new Map;for(let r=0,i=t.length;r<i;r++){const s=this.getPageId(t[r]);e.getOrInsertComputed(s,y2).push(r+1)}return this.getPageMappingForSaving(e)}getPrevPageNumber(t){var e;return((e=c(this,ka))==null?void 0:e[t-1])??0}getPageNumber(t){if(!c(this,Ni))return t;const e=c(this,Ni);for(let r=0,i=c(this,Nn);r<i;r++)if(e[r]===t)return r+1;return 0}getPageId(t){var e;return((e=c(this,Ni))==null?void 0:e[t-1])??t}getMapping(){var t;return(t=c(this,Ni))==null?void 0:t.subarray(0,this.pagesNumber)}}Ni=new WeakMap,ka=new WeakMap,Nn=new WeakMap,bf=new WeakMap,Uo=new WeakMap,is=new WeakSet,Lw=function(){if(c(this,Ni))return;const t=c(this,Nn),e=C(this,Ni,new Uint32Array(t));for(let r=0;r<t;r++)e[r]=r+1;C(this,ka,new Int32Array(e))},Qw=function(){const t=new Map,e=c(this,Ni);for(let r=0,i=c(this,Nn);r<i;r++){const s=e[r],A=t.get(s);A?A.push(r+1):t.set(s,[r+1])}return t},sC=function(t,e=null,r=-1,i=null){const s=c(this,ka),A=c(this,Ni),a=r+((i==null?void 0:i.length)??0),o=new Map;for(let l=0,h=c(this,Nn);l<h;l++){if(l>=r&&l<a){s[l]=-i[l-r];continue}const u=A[l],d=t.get(u);let f=o.get(u)||0;if(e&&d)for(;f<d.length&&e.has(d[f]);)f++;s[l]=d==null?void 0:d[f],o.set(u,f+1)}};const Zd=Symbol("INITIAL_DATA"),c3=()=>({...Promise.withResolvers(),data:Zd});class h3{constructor(){T(this,na,new Map)}get(t,e=null){if(e){const i=c(this,na).getOrInsertComputed(t,c3);return i.promise.then(()=>e(i.data)),null}const r=c(this,na).get(t);if(!r||r.data===Zd)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return r.data}has(t){const e=c(this,na).get(t);return!!e&&e.data!==Zd}delete(t){const e=c(this,na).get(t);return!e||e.data===Zd?!1:(c(this,na).delete(t),!0)}resolve(t,e=null){const r=c(this,na).getOrInsertComputed(t,c3);if(r.data!==Zd)throw new Error(`Object already resolved ${t}.`);r.data=e,r.resolve()}clear(){var t;for(const{data:e}of c(this,na).values())(t=e==null?void 0:e.bitmap)==null||t.close();c(this,na).clear()}*[Symbol.iterator](){for(const[t,{data:e}]of c(this,na))e!==Zd&&(yield[t,e])}}na=new WeakMap;const h9=1e5,u3=30,Pn=class Pn{constructor({textContentSource:t,images:e,container:r,viewport:i}){T(this,Kl);T(this,xh,Promise.withResolvers());T(this,Bs,null);T(this,a1,!1);T(this,o1,!!((FO=globalThis.FontInspector)!=null&&FO.enabled));T(this,yp,null);T(this,Bf,null);T(this,Hl,null);T(this,l1,0);T(this,c1,0);T(this,Cf,null);T(this,h1,null);T(this,bp,0);T(this,Eh,0);T(this,Bp,Object.create(null));T(this,u1,[]);T(this,Cp,null);T(this,xf,[]);T(this,f1,new WeakMap);T(this,d1,null);var l;if(t instanceof ReadableStream)C(this,Cp,t);else if(typeof t=="object")C(this,Cp,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');C(this,Bs,C(this,h1,r)),C(this,yp,e),C(this,Eh,i.scale*ya.pixelRatio),C(this,bp,i.rotation),C(this,Hl,{div:null,properties:null,ctx:null});const{pageWidth:s,pageHeight:A,pageX:a,pageY:o}=i.rawDims;C(this,d1,[1,0,0,-1,-a,o+A]),C(this,c1,s),C(this,l1,A),I(l=Pn,uA,nR).call(l),r.style.setProperty("--min-font-size",c(Pn,Ep)),Mc(r,i),c(this,xh).promise.finally(()=>{c(Pn,Sp).delete(this),C(this,Hl,null),C(this,Bp,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=Ti.platform;return Se(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){c(this,yp)&&c(this,Bs).append(c(this,yp).render());const t=()=>{c(this,Cf).read().then(({value:e,done:r})=>{if(r){c(this,xh).resolve();return}c(this,Bf)??C(this,Bf,e.lang),Object.assign(c(this,Bp),e.styles),I(this,Kl,rR).call(this,e.items),t()},c(this,xh).reject)};return C(this,Cf,c(this,Cp).getReader()),c(Pn,Sp).add(this),t(),c(this,xh).promise}update({viewport:t,onBefore:e=null}){var s;const r=t.scale*ya.pixelRatio,i=t.rotation;if(i!==c(this,bp)&&(e==null||e(),C(this,bp,i),Mc(c(this,h1),{rotation:i})),r!==c(this,Eh)){e==null||e(),C(this,Eh,r);const A={div:null,properties:null,ctx:I(s=Pn,uA,AC).call(s,c(this,Bf))};for(const a of c(this,xf))A.properties=c(this,f1).get(a),A.div=a,I(this,Kl,Y4).call(this,A)}}cancel(){var e;const t=new sl("TextLayer task cancelled.");(e=c(this,Cf))==null||e.cancel(t).catch(()=>{}),C(this,Cf,null),c(this,xh).reject(t)}get textDivs(){return c(this,xf)}get textContentItemsStr(){return c(this,u1)}static cleanup(){if(!(c(this,Sp).size>0)){c(this,xp).clear();for(const{canvas:t}of c(this,Ef).values())t.remove();c(this,Ef).clear()}}};xh=new WeakMap,Bs=new WeakMap,a1=new WeakMap,o1=new WeakMap,yp=new WeakMap,Bf=new WeakMap,Hl=new WeakMap,l1=new WeakMap,c1=new WeakMap,Cf=new WeakMap,h1=new WeakMap,bp=new WeakMap,Eh=new WeakMap,Bp=new WeakMap,u1=new WeakMap,Cp=new WeakMap,xf=new WeakMap,f1=new WeakMap,d1=new WeakMap,xp=new WeakMap,Ef=new WeakMap,g1=new WeakMap,Ep=new WeakMap,Sp=new WeakMap,Kl=new WeakSet,rR=function(t){var i,s;if(c(this,a1))return;(s=c(this,Hl)).ctx??(s.ctx=I(i=Pn,uA,AC).call(i,c(this,Bf)));const e=c(this,xf),r=c(this,u1);for(const A of t){if(e.length>h9){Ue("Ignoring additional textDivs for performance reasons."),C(this,a1,!0);return}if(A.str===void 0){if(A.type==="beginMarkedContentProps"||A.type==="beginMarkedContent"){const a=c(this,Bs);C(this,Bs,document.createElement("span")),c(this,Bs).classList.add("markedContent"),A.id&&c(this,Bs).setAttribute("id",`${A.id}`),A.tag==="Artifact"&&(c(this,Bs).ariaHidden=!0),a.append(c(this,Bs))}else A.type==="endMarkedContent"&&C(this,Bs,c(this,Bs).parentNode);continue}r.push(A.str),I(this,Kl,iR).call(this,A)}},iR=function(t){var p;const e=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};c(this,xf).push(e);const i=Qt.transform(c(this,d1),t.transform);let s=Math.atan2(i[1],i[0]);const A=c(this,Bp)[t.fontName];A.vertical&&(s+=Math.PI/2);let a=c(this,o1)&&A.fontSubstitution||A.fontFamily;a=Pn.fontFamilyMap.get(a)||a;const o=Math.hypot(i[2],i[3]),l=o*I(p=Pn,uA,sR).call(p,a,A,c(this,Bf));let h,u;s===0?(h=i[4],u=i[5]-l):(h=i[4]+l*Math.sin(s),u=i[5]-l*Math.cos(s));const d=e.style;d.left=`${(100*h/c(this,c1)).toFixed(2)}%`,d.top=`${(100*u/c(this,l1)).toFixed(2)}%`,d.setProperty("--font-height",`${o.toFixed(2)}px`),d.fontFamily=a,r.fontSize=o,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,c(this,o1)&&(e.dataset.fontName=A.fontSubstitutionLoadedName||t.fontName),s!==0&&(r.angle=s*(180/Math.PI));let f=!1;if(t.str.length>1)f=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const m=Math.abs(t.transform[0]),y=Math.abs(t.transform[3]);m!==y&&Math.max(m,y)/Math.min(m,y)>1.5&&(f=!0)}if(f&&(r.canvasWidth=A.vertical?t.height:t.width),c(this,f1).set(e,r),c(this,Hl).div=e,c(this,Hl).properties=r,I(this,Kl,Y4).call(this,c(this,Hl)),r.hasText&&c(this,Bs).append(e),r.hasEOL){const m=document.createElement("br");m.setAttribute("role","presentation"),c(this,Bs).append(m)}},Y4=function(t){var A;const{div:e,properties:r,ctx:i}=t,{style:s}=e;if(r.canvasWidth!==0&&r.hasText){const{fontFamily:a}=s,{canvasWidth:o,fontSize:l}=r;I(A=Pn,uA,J4).call(A,i,l*c(this,Eh),a);const{width:h}=i.measureText(e.textContent);h>0&&s.setProperty("--scale-x",o*c(this,Eh)/h)}r.angle!==0&&s.setProperty("--rotate",`${r.angle}deg`)},uA=new WeakSet,AC=function(t=null){let e=c(this,Ef).get(t||(t=""));if(!e){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=t,document.body.append(r),e=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),c(this,Ef).set(t,e),c(this,g1).set(e,{size:0,family:""})}return e},J4=function(t,e,r){const i=c(this,g1).get(t);e===i.size&&r===i.family||(t.font=`${e}px ${r}`,i.size=e,i.family=r)},nR=function(){if(c(this,Ep)!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),C(this,Ep,t.getBoundingClientRect().height),t.remove()},sR=function(t,e,r){const i=c(this,xp).get(t);if(i)return i;const s=I(this,uA,AC).call(this,r);s.canvas.width=s.canvas.height=u3,I(this,uA,J4).call(this,s,u3,t);const A=s.measureText(""),a=A.fontBoundingBoxAscent,o=Math.abs(A.fontBoundingBoxDescent);s.canvas.width=s.canvas.height=0;let l=.8;return a?l=a/(a+o):(Ti.platform.isFirefox&&Ue("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),e.ascent?l=e.ascent:e.descent&&(l=1+e.descent)),c(this,xp).set(t,l),l},T(Pn,uA),T(Pn,xp,new Map),T(Pn,Ef,new Map),T(Pn,g1,new WeakMap),T(Pn,Ep,null),T(Pn,Sp,new Set);let tg=Pn;const u9=100;function Y5(n={}){typeof n=="string"||n instanceof URL?n={url:n}:(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});const t=new J5,{docId:e}=t,r=n.url?wK(n.url):null,i=n.data?yK(n.data):null,s=n.httpHeaders||null,A=n.withCredentials===!0,a=n.password??null,o=n.range instanceof Z5?n.range:null,l=Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>0?n.rangeChunkSize:2**16;let h=n.worker instanceof eg?n.worker:null;const u=n.verbosity,d=typeof n.docBaseUrl=="string"&&!Am(n.docBaseUrl)?n.docBaseUrl:null,f=I2(n.cMapUrl),p=n.cMapPacked!==!1,m=I2(n.iccUrl),y=I2(n.standardFontDataUrl),w=I2(n.wasmUrl),B=n.stopAtErrors!==!0,E=Number.isInteger(n.maxImageSize)&&n.maxImageSize>-1?n.maxImageSize:-1,S=typeof n.isOffscreenCanvasSupported=="boolean"?n.isOffscreenCanvasSupported:!rA,_=typeof n.isImageDecoderSupported=="boolean"?n.isImageDecoderSupported:!rA&&(Ti.platform.isFirefox||!globalThis.chrome),L=Number.isInteger(n.canvasMaxAreaInBytes)?n.canvasMaxAreaInBytes:-1,k=typeof n.disableFontFace=="boolean"?n.disableFontFace:rA,H=n.fontExtraProperties===!0,Q=n.enableXfa===!0,W=n.ownerDocument||globalThis.document,U=n.disableRange===!0,D=n.disableStream===!0,j=n.disableAutoFetch===!0,V=n.pdfBug===!0,st=n.CanvasFactory||(rA?FK:CK),rt=n.FilterFactory||(rA?SK:xK),it=n.BinaryDataFactory||(rA?TK:VU),At=n.enableHWA===!0,vt=n.enableWebGPU===!0?UK():Promise.resolve(!1),mt=n.useWasm!==!1,M=n.pagesMapper||new c9,$=typeof n.useSystemFonts=="boolean"?n.useSystemFonts:!rA&&!k,q=typeof n.useWorkerFetch=="boolean"?n.useWorkerFetch:!!(it===VU&&f&&p&&y&&w&&am(f,document.baseURI)&&am(y,document.baseURI)&&am(w,document.baseURI)),tt=null;z7(u);const et={canvasFactory:new st({ownerDocument:W,enableHWA:At}),filterFactory:new rt({docId:e,ownerDocument:W}),binaryDataFactory:q?null:new it({cMapUrl:f,standardFontDataUrl:y,wasmUrl:w})};h||(h=eg.create({verbosity:u,port:ba.workerPort}),t._worker=h);const ot={docId:e,apiVersion:"5.7.284",data:i,password:a,disableAutoFetch:j,rangeChunkSize:l,docBaseUrl:d,enableXfa:Q,evaluatorOptions:{maxImageSize:E,disableFontFace:k,ignoreErrors:B,isOffscreenCanvasSupported:S,isImageDecoderSupported:_,canvasMaxAreaInBytes:L,fontExtraProperties:H,useSystemFonts:$,useWasm:mt,useWorkerFetch:q,cMapUrl:f,cMapPacked:p,iccUrl:m,standardFontDataUrl:y,wasmUrl:w,hasGPU:!1}},dt={ownerDocument:W,pdfBug:V,styleElement:tt,enableHWA:At,loadingParams:{disableAutoFetch:j,enableXfa:Q}};return Promise.all([h.promise,vt]).then(function([,wt]){if(t.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");ot.evaluatorOptions.hasGPU=wt;const yt=h.messageHandler.sendWithPromise("GetDocRequest",ot,i?[i.buffer]:null);let St;if(!i)if(o)St=new qK({pdfDataRangeTransport:o,disableRange:U,disableStream:D});else if(r){const Mt=A9(r);St=new Mt({url:r,httpHeaders:s,withCredentials:A,rangeChunkSize:l,disableRange:U,disableStream:D})}else throw new Error("getDocument - expected either `data`, `range`, or `url` parameter.");return yt.then(Mt=>{if(t.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");const Pt=new fm(e,Mt,h.port),$t=new d9(Pt,t,St,dt,et,M);t._transport=$t,Pt.send("Ready",null)})}).catch(t._capability.reject),t}const hB=class hB{constructor(){ct(this,"_capability",Promise.withResolvers());ct(this,"_transport",null);ct(this,"_worker",null);ct(this,"docId",`d${Yi(hB,cB)._++}`);ct(this,"destroyed",!1);ct(this,"onPassword",null);ct(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var t,e,r,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),await((e=this._transport)==null?void 0:e.destroy())}catch(s){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,s}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null}async getData(){return this._transport.getData()}};cB=new WeakMap,T(hB,cB,0);let J5=hB;class Z5{constructor(t,e,r=!1,i=null){T(this,Fp,Promise.withResolvers());T(this,Sf,null);this.length=t,this.initialData=e,this.progressiveDone=r,this.contentDispositionFilename=i,Object.defineProperty(this,"onDataProgress",{value:()=>{rK("`PDFDataRangeTransport.prototype.onDataProgress` - method was removed, since loading progress is now reported automatically through the `PDFDataTransportStream` class (and related code).")}})}onDataRange(t,e){c(this,Sf).call(this,{type:"range",begin:t,chunk:e})}onDataProgressiveRead(t){c(this,Fp).promise.then(()=>{c(this,Sf).call(this,{type:"progressiveRead",chunk:t})})}onDataProgressiveDone(){c(this,Fp).promise.then(()=>{c(this,Sf).call(this,{type:"progressiveDone"})})}transportReady(t){C(this,Sf,t),c(this,Fp).resolve()}requestDataRange(t,e){lr("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}Fp=new WeakMap,Sf=new WeakMap;class f9{constructor(t,e){this._pdfInfo=t,this._transport=e}get pagesMapper(){return this._transport.pagesMapper}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Se(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(t,e){return this._transport.getAnnotationsByType(t,e)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}extractPages(t){return this._transport.extractPages(t)}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getRawData(t){return this._transport.getRawData(t)}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}const jF=class jF{constructor(t,e,r,i,s=!1){T(this,Tf);T(this,Vl,!1);T(this,Ff,null);this._pageIndex=t,this._pageInfo=e,this._transport=r,this._stats=s?new bU:null,this._pdfBug=s,this.commonObjs=r.commonObjs,this.objs=new h3,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null,C(this,Ff,i),this.imageCoordinates=null}clone(t){const e=new jF(t,this._pageInfo,this._transport,c(this,Ff),this._pdfBug);return e.clonedFromIndex=this.clonedFromIndex??this._pageIndex,this._transport.updatePage(e),e}get pageNumber(){return this._pageIndex+1}set pageNumber(t){this._pageIndex=t-1,this._transport.updatePage(this)}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:s=!1}={}){return new sm({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:r,offsetY:i,dontFlip:s})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Se(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null}render({canvasContext:t,canvas:e=t.canvas,viewport:r,intent:i="display",annotationMode:s=nl.ENABLE,transform:A=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:h=null,printAnnotationStorage:u=null,isEditing:d=!1,recordImages:f=!1,recordOperations:p=!1,operationsFilter:m=null}){var j,V,st;(j=this._stats)==null||j.time("Overall");const y=this._transport.getRenderingIntent(i,s,u,d),{renderingIntent:w,cacheKey:B}=y;C(this,Vl,!1),o||(o=this._transport.getOptionalContentConfig(w));const E=this._intentStates.getOrInsertComputed(B,B2);E.streamReaderCancelTimeout&&(clearTimeout(E.streamReaderCancelTimeout),E.streamReaderCancelTimeout=null);const S=!!(w&iA.PRINT);E.displayReadyCapability||(E.displayReadyCapability=Promise.withResolvers(),E.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(V=this._stats)==null||V.time("Page Request"),this._pumpOperatorList(y));const _=!!(this._pdfBug&&((st=globalThis.StepperManager)!=null&&st.enabled)),L=!!e&&!this.recordedBBoxes&&(p||_),k=!!e&&!this.imageCoordinates&&f,H=rt=>{var it,At,ut,vt;if(E.renderTasks.delete(U),L){const mt=(it=U.gfx)==null?void 0:it.dependencyTracker.take();mt&&((At=U.stepper)==null||At.setOperatorBBoxes(mt,U.gfx.dependencyTracker.takeDebugMetadata()),p&&(this.recordedBBoxes=mt))}k&&!rt&&(this.imageCoordinates=(ut=U.gfx)==null?void 0:ut.imagesTracker.take()),S&&C(this,Vl,!0),I(this,Tf,Nw).call(this),rt?(U.capability.reject(rt),this._abortOperatorList({intentState:E,reason:rt instanceof Error?rt:new Error(rt)})):U.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(vt=globalThis.Stats)!=null&&vt.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))};let Q=null,W=null;(L||k)&&(W=new cK(e,E.operatorList.length)),L&&(Q=new hK(W,_));const U=new ex({callback:H,params:{canvas:e,canvasContext:t,dependencyTracker:Q??W,imagesTracker:k?new $5(e):null,viewport:r,transform:A,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:E.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!S,pdfBug:this._pdfBug,pageColors:h,enableHWA:this._transport.enableHWA,operationsFilter:m});(E.renderTasks||(E.renderTasks=new Set)).add(U);const D=U.task;return Promise.all([E.displayReadyCapability.promise,o]).then(([rt,it])=>{var At;if(this.destroyed){H();return}if((At=this._stats)==null||At.time("Rendering"),!(it.renderingIntent&w))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");U.initializeGraphics({transparency:rt,optionalContentConfig:it}),U.operatorListChanged()}).catch(H),D}getOperatorList({intent:t="display",annotationMode:e=nl.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){var l;function s(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(o))}const A=this._transport.getRenderingIntent(t,e,r,i,!0),a=this._intentStates.getOrInsertComputed(A.cacheKey,B2);let o;return a.opListReadCapability||(o=Object.create(null),o.operatorListChanged=s,a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||(a.renderTasks=new Set)).add(o),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(l=this._stats)==null||l.time("Page Request"),this._pumpOperatorList(A)),a.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageId:c(this,Ff).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(i){return i.items.length}})}async getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(i=>nm.textContent(i));const e=this.streamTextContent(t),r={items:[],styles:Object.create(null),lang:null};for await(const i of e)r.lang??(r.lang=i.lang),Object.assign(r.styles,i.styles),r.items.push(...i.items);return r}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const r of e.renderTasks)t.push(r.completed),r.cancel();return this.objs.clear(),C(this,Vl,!1),Promise.all(t)}cleanup(t=!1){C(this,Vl,!0);const e=I(this,Tf,Nw).call(this);return t&&e&&this._stats&&(this._stats=new bU),e}_startRenderPage(t,e){var i,s;const r=this._intentStates.get(e);r&&((i=this._stats)==null||i.timeEnd("Page Request"),(s=r.displayReadyCapability)==null||s.resolve(t))}_renderPageChunk(t,e){for(let r=0,i=t.length;r<i;r++)e.operatorList.fnArray.push(t.fnArray[r]),e.operatorList.argsArray.push(t.argsArray[r]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(const r of e.renderTasks)r.operatorListChanged();t.lastChunk&&I(this,Tf,Nw).call(this)}_pumpOperatorList({renderingIntent:t,cacheKey:e,annotationStorageSerializable:r,modifiedIds:i}){const{map:s,transfer:A}=r,o=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageId:c(this,Ff).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,intent:t,cacheKey:e,annotationStorage:s,modifiedIds:i},void 0,A).getReader(),l=this._intentStates.get(e);l.streamReader=o;const h=()=>{o.read().then(({value:u,done:d})=>{if(d){l.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(u,l),h())},u=>{if(l.streamReader=null,!this._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;for(const d of l.renderTasks)d.operatorListChanged();I(this,Tf,Nw).call(this)}if(l.displayReadyCapability)l.displayReadyCapability.reject(u);else if(l.opListReadCapability)l.opListReadCapability.reject(u);else throw u}})};h()}_abortOperatorList({intentState:t,reason:e,force:r=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!r){if(t.renderTasks.size>0)return;if(e instanceof x2){let i=u9;e.extraDelay>0&&e.extraDelay<1e3&&(i+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},i);return}}if(t.streamReader.cancel(new sl(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[i,s]of this._intentStates)if(s===t){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}};Vl=new WeakMap,Ff=new WeakMap,Tf=new WeakSet,Nw=function(){if(!c(this,Vl)||this.destroyed)return!1;for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),C(this,Vl,!1),!0};let tx=jF;const vi=class vi{constructor({name:t=null,port:e=null,verbosity:r=X7()}={}){T(this,Cs);T(this,Sh,Promise.withResolvers());T(this,Oa,null);T(this,Gl,null);T(this,_f,null);if(this.name=t,this.destroyed=!1,this.verbosity=r,e){if(c(vi,Uf).has(e))throw new Error("Cannot use more than one PDFWorker per port.");c(vi,Uf).set(e,this),I(this,Cs,AR).call(this,e)}else I(this,Cs,aR).call(this)}get promise(){return c(this,Sh).promise}get port(){return c(this,Gl)}get messageHandler(){return c(this,Oa)}destroy(){var t,e;this.destroyed=!0,(t=c(this,_f))==null||t.terminate(),C(this,_f,null),c(vi,Uf).delete(c(this,Gl)),C(this,Gl,null),(e=c(this,Oa))==null||e.destroy(),C(this,Oa,null)}static create(t){const e=c(this,Uf).get(t==null?void 0:t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new vi(t)}static get workerSrc(){if(ba.workerSrc)return ba.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Se(this,"_setupFakeWorkerGlobal",(async()=>c(this,Tp,oC)?c(this,Tp,oC):(await import(this.workerSrc)).WorkerMessageHandler)())}};Sh=new WeakMap,Oa=new WeakMap,Gl=new WeakMap,_f=new WeakMap,uB=new WeakMap,If=new WeakMap,Uf=new WeakMap,Cs=new WeakSet,aC=function(){c(this,Sh).resolve(),c(this,Oa).send("configure",{verbosity:this.verbosity})},AR=function(t){C(this,Gl,t),C(this,Oa,new fm("main","worker",t)),c(this,Oa).on("ready",()=>{}),I(this,Cs,aC).call(this)},aR=function(){if(c(vi,If)||c(vi,Tp,oC)){I(this,Cs,Pw).call(this);return}let{workerSrc:t}=vi;try{vi._isSameOrigin(window.location,t)||(t=vi._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),r=new fm("main","worker",e),i=()=>{s.abort(),r.destroy(),e.terminate(),this.destroyed?c(this,Sh).reject(new Error("Worker was destroyed")):I(this,Cs,Pw).call(this)},s=new AbortController;e.addEventListener("error",()=>{c(this,_f)||i()},{signal:s.signal}),r.on("test",a=>{if(s.abort(),this.destroyed||!a){i();return}C(this,Oa,r),C(this,Gl,e),C(this,_f,e),I(this,Cs,aC).call(this)}),r.on("ready",a=>{if(s.abort(),this.destroyed){i();return}try{A()}catch{I(this,Cs,Pw).call(this)}});const A=()=>{const a=new Uint8Array;r.send("test",a,[a.buffer])};A();return}catch{m2("The worker has been disabled.")}I(this,Cs,Pw).call(this)},Pw=function(){c(vi,If)||(Ue("Setting up fake worker."),C(vi,If,!0)),vi._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){c(this,Sh).reject(new Error("Worker was destroyed"));return}const e=new BK;C(this,Gl,e);const r=`fake${Yi(vi,uB)._++}`,i=new fm(r+"_worker",r,e);t.setup(i,e),C(this,Oa,new fm(r,r+"_worker",e)),I(this,Cs,aC).call(this)}).catch(t=>{c(this,Sh).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Tp=new WeakSet,oC=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch{return null}},T(vi,Tp),T(vi,uB,0),T(vi,If,!1),T(vi,Uf,new WeakMap),rA&&(C(vi,If,!0),ba.workerSrc||(ba.workerSrc="./pdf.worker.mjs")),vi._isSameOrigin=(t,e)=>{const r=URL.parse(t);if(!(r!=null&&r.origin)||r.origin==="null")return!1;const i=new URL(e,r);return r.origin===i.origin},vi._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};let eg=vi;class d9{constructor(t,e,r,i,s,A){T(this,Ra);ct(this,"downloadInfoCapability",Promise.withResolvers());T(this,fA,null);T(this,Lf,new Map);T(this,jl,null);T(this,Da,new Map);T(this,Qf,new Map);T(this,_p,new Map);T(this,$l,null);this.messageHandler=t,this.loadingTask=e,C(this,jl,r),this.commonObjs=new h3,this.fontLoader=new uK({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.enableHWA=i.enableHWA,this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.binaryDataFactory=s.binaryDataFactory,this.pagesMapper=A,this.destroyed=!1,this.destroyCapability=null,this.setupMessageHandler()}updatePage(t){const{_pageIndex:e}=t;c(this,Da).set(e,t),c(this,Qf).set(e,Promise.resolve(t))}get annotationStorage(){return Se(this,"annotationStorage",new G5)}getRenderingIntent(t,e=nl.ENABLE,r=null,i=!1,s=!1){let A=iA.DISPLAY,a=hm;switch(t){case"any":A=iA.ANY;break;case"display":break;case"print":A=iA.PRINT;break;default:Ue(`getRenderingIntent - invalid intent: ${t}`)}const o=A&iA.PRINT&&r instanceof QU?r:this.annotationStorage;switch(e){case nl.DISABLE:A+=iA.ANNOTATIONS_DISABLE;break;case nl.ENABLE:break;case nl.ENABLE_FORMS:A+=iA.ANNOTATIONS_FORMS;break;case nl.ENABLE_STORAGE:A+=iA.ANNOTATIONS_STORAGE,a=o.serializable;break;default:Ue(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(A+=iA.IS_EDITING),s&&(A+=iA.OPLIST);const{ids:l,hash:h}=o.modifiedIds,u=[A,a.hash,h];return{renderingIntent:A,cacheKey:u.join("_"),annotationStorageSerializable:a,modifiedIds:l}}destroy(){var r;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(r=c(this,$l))==null||r.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of c(this,Da).values())t.push(i._destroy());c(this,Da).clear(),c(this,Qf).clear(),c(this,_p).clear(),Object.hasOwn(this,"annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var i,s;this.commonObjs.clear(),this.fontLoader.clear(),c(this,Lf).clear(),this.filterFactory.destroy(),tg.cleanup(),(i=c(this,jl))==null||i.cancelAllRequests(new sl("Worker was terminated.")),(s=this.messageHandler)==null||s.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(r,i)=>{ni(c(this,jl),"GetReader - no `BasePDFStream` instance available."),C(this,fA,c(this,jl).getFullReader()),c(this,fA).onProgress=s=>I(this,Ra,lC).call(this,s),i.onPull=()=>{c(this,fA).read().then(function({value:s,done:A}){if(A){i.close();return}ni(s instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{i.error(s)})},i.onCancel=s=>{c(this,fA).cancel(s),i.ready.catch(A=>{if(!this.destroyed)throw A})}}),t.on("ReaderHeadersReady",async r=>{await c(this,fA).headersReady;const{isStreamingSupported:i,isRangeSupported:s,contentLength:A}=c(this,fA);return i&&s&&(c(this,fA).onProgress=null),{isStreamingSupported:i,isRangeSupported:s,contentLength:A}}),t.on("GetRangeReader",(r,i)=>{ni(c(this,jl),"GetRangeReader - no `BasePDFStream` instance available.");const s=c(this,jl).getRangeReader(r.begin,r.end);if(!s){i.close();return}i.onPull=()=>{s.read().then(function({value:A,done:a}){if(a){i.close();return}ni(A instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(A),1,[A])}).catch(A=>{i.error(A)})},i.onCancel=A=>{s.cancel(A),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("GetDoc",({pdfInfo:r})=>{this.pagesMapper.pagesNumber=r.numPages,this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,e._capability.resolve(new f9(r,this))}),t.on("DocException",r=>{e._capability.reject(ks(r))}),t.on("PasswordRequest",r=>{C(this,$l,Promise.withResolvers());try{if(!e.onPassword)throw ks(r);const i=s=>{s instanceof Error?c(this,$l).reject(s):c(this,$l).resolve({password:s})};e.onPassword(i,r.code)}catch(i){c(this,$l).reject(i)}return c(this,$l).promise}),t.on("DataLoaded",r=>{I(this,Ra,lC).call(this,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),t.on("StartRenderPage",r=>{if(this.destroyed)return;c(this,Da).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),t.on("commonobj",([r,i,s])=>{var A;if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":if("error"in s){const d=s.error;Ue(`Error during font loading: ${d}`),this.commonObjs.resolve(r,d);break}const a=new pK(s),o=this._params.pdfBug&&((A=globalThis.FontInspector)!=null&&A.enabled)?(d,f)=>globalThis.FontInspector.fontAdded(d,f):null,l=new fK(a,o,s.charProcOperatorList,s.extra);this.fontLoader.bind(l).catch(()=>t.sendWithPromise("FontFallback",{id:r})).finally(()=>{l.fontExtraProperties||l.clearData(),this.commonObjs.resolve(r,l)});break;case"CopyLocalImage":const{imageRef:h}=s;ni(h,"The imageRef must be defined.");for(const d of c(this,Da).values())for(const[,f]of d.objs){if((f==null?void 0:f.ref)!==h)continue;if(!f.dataLen)return null;const p=structuredClone(f);return this.commonObjs.resolve(r,p),f.dataLen}break;case"FontPath":this.commonObjs.resolve(r,new vK(s));break;case"Image":this.commonObjs.resolve(r,s);break;case"Pattern":const u=new mK(s);this.commonObjs.resolve(r,u.getIR());break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),t.on("obj",([r,i,s,A])=>{var o;if(this.destroyed)return;const a=c(this,Da).get(i);if(!a.objs.has(r)){if(a._intentStates.size===0){(o=A==null?void 0:A.bitmap)==null||o.close();return}switch(s){case"Image":case"Pattern":a.objs.resolve(r,A);break;default:throw new Error(`Got unknown object type ${s}`)}}}),t.on("DocProgress",r=>{this.destroyed||I(this,Ra,lC).call(this,r)}),t.on("FetchBinaryData",async r=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.binaryDataFactory)throw new Error("`BinaryDataFactory` not initialized, see the `useWorkerFetch` parameter.");return this.binaryDataFactory.fetch(r)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var r;this.annotationStorage.size<=0&&Ue("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:((r=c(this,fA))==null?void 0:r.filename)??null},e).finally(()=>{this.annotationStorage.resetModified()})}extractPages(t){const e={pageInfos:t};let r;if(this.annotationStorage.size>0){const{map:i,transfer:s}=this.annotationStorage.serializable;e.annotationStorage=i,r=s}return this.messageHandler.sendWithPromise("ExtractPages",e,r).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this.pagesMapper.pagesNumber)return Promise.reject(new Error("Invalid page request."));const e=t-1,r=this.pagesMapper.getPageId(t)-1,i=c(this,Qf).get(e);if(i)return i;const s=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(A=>{if(this.destroyed)throw new Error("Transport destroyed");A.refStr&&c(this,_p).set(A.refStr,r);const a=new tx(e,A,this,this.pagesMapper,this._params.pdfBug);return c(this,Da).set(e,a),a});return c(this,Qf).set(e,s),s}async getPageIndex(t){if(!W5(t))throw new Error("Invalid pageIndex request.");const e=await this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}),r=this.pagesMapper.getPageNumber(e+1);if(r===0)throw new Error("GetPageIndex: page has been removed.");return r-1}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:this.pagesMapper.getPageId(t+1)-1,intent:e})}getFieldObjects(){return I(this,Ra,Mw).call(this,"GetFieldObjects")}hasJSActions(){return I(this,Ra,Mw).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(t,e){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:t,pageIndexesToSkip:e})}getDocJSActions(){return I(this,Ra,Mw).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:this.pagesMapper.getPageId(t+1)-1})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:this.pagesMapper.getPageId(t+1)-1})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return I(this,Ra,Mw).call(this,"GetOptionalContentConfig").then(e=>new l9(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata";return c(this,Lf).getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,null).then(e=>{var r,i;return{info:e[0],metadata:e[1]?new a9(e[1]):null,contentDispositionFilename:((r=c(this,fA))==null?void 0:r.filename)??null,contentLength:((i=c(this,fA))==null?void 0:i.contentLength)??null,hasStructTree:e[2]}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}getRawData(t){return this.messageHandler.sendWithPromise("GetRawData",t)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of c(this,Da).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),c(this,Lf).clear(),this.filterFactory.destroy(!0),tg.cleanup()}}cachedPageNumber(t){if(!W5(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`,r=c(this,_p).get(e);if(r>=0){const i=this.pagesMapper.getPageNumber(r+1);if(i!==0)return i}return null}}fA=new WeakMap,Lf=new WeakMap,jl=new WeakMap,Da=new WeakMap,Qf=new WeakMap,_p=new WeakMap,$l=new WeakMap,Ra=new WeakSet,Mw=function(t,e=null){return c(this,Lf).getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,e))},lC=function({loaded:t,total:e}){var r,i;(i=(r=this.loadingTask).onProgress)==null||i.call(r,{loaded:t,total:e,percent:e?Gr(Math.round(t/e*100),0,100):NaN})};class g9{constructor(t){ct(this,"_internalRenderTask",null);ct(this,"onContinue",null);ct(this,"onError",null);this._internalRenderTask=t}get promise(){return this._internalRenderTask.capability.promise}cancel(t=0){this._internalRenderTask.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this._internalRenderTask.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this._internalRenderTask;return t.form||t.canvas&&(e==null?void 0:e.size)>0}get imageCoordinates(){return this._internalRenderTask.imageCoordinates||null}}const Pf=class Pf{constructor({callback:t,params:e,objs:r,commonObjs:i,annotationCanvasMap:s,operatorList:A,pageIndex:a,canvasFactory:o,filterFactory:l,useRequestAnimationFrame:h=!1,pdfBug:u=!1,pageColors:d=null,enableHWA:f=!1,operationsFilter:p=null}){T(this,Fh,null);this.callback=t,this.params=e,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=A,this._pageIndex=a,this.canvasFactory=o,this.filterFactory=l,this._pdfBug=u,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=h===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new g9(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvas,this._canvasContext=e.canvas?null:e.canvasContext,this._enableHWA=f,this._dependencyTracker=e.dependencyTracker,this._imagesTracker=e.imagesTracker,this._operationsFilter=p}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var l,h;if(this.cancelled)return;if(this._canvas){if(c(Pf,Nf).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");c(Pf,Nf).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:r,transform:i,background:s,dependencyTracker:A,imagesTracker:a}=this.params,o=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new Yd(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors,A,a),this.gfx.beginDrawing({transform:i,viewport:r,transparency:t,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(h=this.graphicsReadyCallback)==null||h.call(this)}cancel(t=null,e=0){var r,i,s;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),c(this,Fh)&&(window.cancelAnimationFrame(c(this,Fh)),C(this,Fh,null)),c(Pf,Nf).delete(this._canvas),t||(t=new x2(`Rendering cancelled, page ${this._pageIndex+1}`,e)),this.callback(t),(s=(i=this.task).onError)==null||s.call(i,t)}operatorListChanged(){var t,e;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.gfx.dependencyTracker)==null||t.growOperationsCount(this.operatorList.fnArray.length),(e=this.stepper)==null||e.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?C(this,Fh,window.requestAnimationFrame(()=>{C(this,Fh,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),c(Pf,Nf).delete(this._canvas),this.callback())))}};Fh=new WeakMap,Nf=new WeakMap,T(Pf,Nf,new WeakSet);let ex=Pf;const f3="5.7.284",d3="7e5b36c2d",js=class js{constructor({editor:t=null,uiManager:e=null}){T(this,Tr);T(this,dA,null);T(this,Mf,null);T(this,Ip);T(this,tn,null);T(this,p1,!1);T(this,Up,!1);T(this,Wl,null);T(this,m1);T(this,Th,null);T(this,Ha,null);var r,i;t?(C(this,Up,!1),C(this,Wl,t)):C(this,Up,!0),C(this,Ha,(t==null?void 0:t._uiManager)||e),C(this,m1,c(this,Ha)._eventBus),C(this,Ip,((r=t==null?void 0:t.color)==null?void 0:r.toUpperCase())||((i=c(this,Ha))==null?void 0:i.highlightColors.values().next().value)||"#FFFF98"),c(js,v1)||C(js,v1,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return Se(this,"_keyboardManager",new lm([[["Escape","mac+Escape"],js.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],js.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],js.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],js.prototype._moveToPrevious],[["Home","mac+Home"],js.prototype._moveToBeginning],[["End","mac+End"],js.prototype._moveToEnd]]))}renderButton(){const t=C(this,dA,document.createElement("button"));t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",c(this,Wl)&&(t.ariaControls=`${c(this,Wl).id}_colorpicker_dropdown`);const e=c(this,Ha)._signal;t.addEventListener("click",I(this,Tr,Td).bind(this),{signal:e}),t.addEventListener("keydown",I(this,Tr,eT).bind(this),{signal:e});const r=C(this,Mf,document.createElement("span"));return r.className="swatch",r.ariaHidden="true",r.style.backgroundColor=c(this,Ip),t.append(r),t}renderMainDropdown(){const t=C(this,tn,I(this,Tr,Z4).call(this));return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}_colorSelectFromKeyboard(t){if(t.target===c(this,dA)){I(this,Tr,Td).call(this,t);return}const e=t.target.getAttribute("data-color");e&&I(this,Tr,tT).call(this,e,t)}_moveToNext(t){var e,r;if(!c(this,Tr,au)){I(this,Tr,Td).call(this,t);return}if(t.target===c(this,dA)){(e=c(this,tn).firstElementChild)==null||e.focus();return}(r=t.target.nextSibling)==null||r.focus()}_moveToPrevious(t){var e,r;if(t.target===((e=c(this,tn))==null?void 0:e.firstElementChild)||t.target===c(this,dA)){c(this,Tr,au)&&this._hideDropdownFromKeyboard();return}c(this,Tr,au)||I(this,Tr,Td).call(this,t),(r=t.target.previousSibling)==null||r.focus()}_moveToBeginning(t){var e;if(!c(this,Tr,au)){I(this,Tr,Td).call(this,t);return}(e=c(this,tn).firstElementChild)==null||e.focus()}_moveToEnd(t){var e;if(!c(this,Tr,au)){I(this,Tr,Td).call(this,t);return}(e=c(this,tn).lastElementChild)==null||e.focus()}hideDropdown(){var t,e;(t=c(this,tn))==null||t.classList.add("hidden"),c(this,dA).ariaExpanded="false",(e=c(this,Th))==null||e.abort(),C(this,Th,null)}_hideDropdownFromKeyboard(){var t;if(!c(this,Up)){if(!c(this,Tr,au)){(t=c(this,Wl))==null||t.unselect();return}this.hideDropdown(),c(this,dA).focus({preventScroll:!0,focusVisible:c(this,p1)})}}updateColor(t){if(c(this,Mf)&&(c(this,Mf).style.backgroundColor=t),!c(this,tn))return;const e=c(this,Ha).highlightColors.values();for(const r of c(this,tn).children)r.ariaSelected=e.next().value===t.toUpperCase()}destroy(){var t,e;(t=c(this,dA))==null||t.remove(),C(this,dA,null),C(this,Mf,null),(e=c(this,tn))==null||e.remove(),C(this,tn,null)}};dA=new WeakMap,Mf=new WeakMap,Ip=new WeakMap,tn=new WeakMap,p1=new WeakMap,Up=new WeakMap,Wl=new WeakMap,m1=new WeakMap,Th=new WeakMap,Ha=new WeakMap,v1=new WeakMap,Tr=new WeakSet,Z4=function(){const t=document.createElement("div"),e=c(this,Ha)._signal;t.addEventListener("contextmenu",nA,{signal:e}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),c(this,Wl)&&(t.id=`${c(this,Wl).id}_colorpicker_dropdown`);for(const[r,i]of c(this,Ha).highlightColors){const s=document.createElement("button");s.tabIndex="0",s.role="option",s.setAttribute("data-color",i),s.title=r,s.setAttribute("data-l10n-id",c(js,v1)[r]);const A=document.createElement("span");s.append(A),A.className="swatch",A.style.backgroundColor=i,s.ariaSelected=i===c(this,Ip),s.addEventListener("click",I(this,Tr,tT).bind(this,i),{signal:e}),t.append(s)}return t.addEventListener("keydown",I(this,Tr,eT).bind(this),{signal:e}),t},tT=function(t,e){e.stopPropagation(),c(this,m1).dispatch("switchannotationeditorparams",{source:this,type:Ie.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)},eT=function(t){js._keyboardManager.exec(this,t)},Td=function(t){if(c(this,Tr,au)){this.hideDropdown();return}if(C(this,p1,t.detail===0),c(this,Th)||(C(this,Th,new AbortController),window.addEventListener("pointerdown",I(this,Tr,oR).bind(this),{signal:c(this,Ha).combinedSignal(c(this,Th))})),c(this,dA).ariaExpanded="true",c(this,tn)){c(this,tn).classList.remove("hidden");return}const e=C(this,tn,I(this,Tr,Z4).call(this));c(this,dA).append(e)},oR=function(t){var e;(e=c(this,tn))!=null&&e.contains(t.target)||this.hideDropdown()},au=function(){return c(this,tn)&&!c(this,tn).classList.contains("hidden")},T(js,v1,null);let pm=js;const Of=class Of{constructor(t){T(this,gA,null);T(this,Lp,!1);T(this,kf,null);T(this,zl,null);C(this,kf,t),C(this,zl,t._uiManager),c(Of,w1)||C(Of,w1,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(c(this,gA))return c(this,gA);const{editorType:t,colorType:e,colorAndOpacityType:r,opacityType:i,color:s,opacity:A}=c(this,kf),a=C(this,Lp,Ti.isAlphaColorInputSupported&&i!==void 0),o=C(this,gA,document.createElement("input"));if(o.type="color",a){o.setAttribute("alpha","");const l=Qt.hexNums[Math.round((A??1)*255)];o.value=(s||"#000000")+l}else o.value=s||"#000000";return o.className="basicColorPicker",o.tabIndex=0,o.setAttribute("data-l10n-id",c(Of,w1)[t]),o.addEventListener("input",()=>{if(a){const l=S2(o.value);if(!l)return;const[h,u,d,f]=l,p=Qt.makeHexColor(h,u,d);r!==void 0?c(this,zl).updateParams(r,{color:p,opacity:f}):(c(this,zl).updateParams(e,p),c(this,zl).updateParams(i,f))}else c(this,zl).updateParams(e,o.value)},{signal:c(this,zl)._signal}),o}update(t){if(c(this,gA))if(c(this,Lp)){const e=Qt.hexNums[Math.round(c(this,kf).opacity*255)];c(this,gA).value=t+e}else c(this,gA).value=t}updateOpacity(t){if(!c(this,gA)||!c(this,Lp))return;const e=Qt.hexNums[Math.round(t*255)];c(this,gA).value=c(this,kf).color+e}destroy(){var t;(t=c(this,gA))==null||t.remove(),C(this,gA,null)}hideDropdown(){}};gA=new WeakMap,Lp=new WeakMap,kf=new WeakMap,zl=new WeakMap,w1=new WeakMap,T(Of,w1,null);let V2=Of;function g3(n){return Math.floor(Gr(n,0,1)*255).toString(16).padStart(2,"0")}function mm(n){return Gr(n,0,1)*255}class p3{static CMYK_G([t,e,r,i]){return["G",1-Math.min(1,.3*t+.59*r+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=mm(t),[t,t,t]}static G_HTML([t]){const e=g3(t);return`#${e}${e}${e}`}static RGB_G([t,e,r]){return["G",.3*t+.59*e+.11*r]}static RGB_rgb(t){return t.map(mm)}static RGB_HTML(t){return`#${t.map(g3).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,r,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,r+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,r,i]){return[mm(1-Math.min(1,t+i)),mm(1-Math.min(1,r+i)),mm(1-Math.min(1,e+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,r]){const i=1-t,s=1-e,A=1-r,a=Math.min(i,s,A);return["CMYK",i,s,A,a]}}class p9{create(t,e,r=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),r||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){lr("Abstract method `_createSVG` called.")}}class vm extends p9{_createSVG(t){return document.createElementNS(Al,t)}}const m9=9,wu=new WeakSet,v9=new Date().getTimezoneOffset()*60*1e3;class rx{static create(t){switch(t.data.annotationType){case Fi.LINK:return new ix(t);case Fi.TEXT:return new y9(t);case Fi.WIDGET:switch(t.data.fieldType){case"Tx":return new b9(t);case"Btn":return t.data.radioButton?new m3(t):t.data.checkBox?new C9(t):new x9(t);case"Ch":return new E9(t);case"Sig":return new B9(t)}return new yu(t);case Fi.POPUP:return new nx(t);case Fi.FREETEXT:return new v3(t);case Fi.LINE:return new F9(t);case Fi.SQUARE:return new T9(t);case Fi.CIRCLE:return new _9(t);case Fi.POLYLINE:return new w3(t);case Fi.CARET:return new U9(t);case Fi.INK:return new sx(t);case Fi.POLYGON:return new I9(t);case Fi.HIGHLIGHT:return new y3(t);case Fi.UNDERLINE:return new L9(t);case Fi.SQUIGGLY:return new Q9(t);case Fi.STRIKEOUT:return new N9(t);case Fi.STAMP:return new b3(t);case Fi.FILEATTACHMENT:return new P9(t);default:return new si(t)}}}const $F=class $F{constructor(t,{isRenderable:e=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){T(this,y1);T(this,Df,null);T(this,Qp,!1);T(this,sa,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableComment=t.enableComment,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,this.hasOwnCommentButton=!1,e&&(this.contentElement=this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:e}){return!!(t!=null&&t.str||e!=null&&e.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return $F._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){var r;const{data:t}=this,e=(r=this.annotationStorage)==null?void 0:r.getEditor(t.id);return e?e.getData():t}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){var a;const t=(a=this.annotationStorage)==null?void 0:a.getEditor(this.data.id);if(t)return t.commentButtonPositionInPage;const{quadPoints:e,inkLists:r,rect:i}=this.data;let s=-1/0,A=-1/0;if((e==null?void 0:e.length)>=8){for(let o=0;o<e.length;o+=8)e[o+1]>A?(A=e[o+1],s=e[o+2]):e[o+1]===A&&(s=Math.max(s,e[o+2]));return[s,A]}if((r==null?void 0:r.length)>=1){for(const o of r)for(let l=0,h=o.length;l<h;l+=2)o[l+1]>A?(A=o[l+1],s=o[l]):o[l+1]===A&&(s=Math.max(s,o[l]));if(s!==1/0)return[s,A]}return i?[i[2],i[3]]:null}_normalizePoint(t){const{page:{view:e},viewport:{rawDims:{pageWidth:r,pageHeight:i,pageX:s,pageY:A}}}=this.parent;return t[1]=e[3]-t[1]+e[1],t[0]=100*(t[0]-s)/r,t[1]=100*(t[1]-A)/i,t}get commentText(){var e,r,i;const{data:t}=this;return((r=(e=this.annotationStorage.getRawValue(`${Z0}${t.id}`))==null?void 0:e.popup)==null?void 0:r.contents)||((i=t.contentsObj)==null?void 0:i.str)||""}set commentText(t){const{data:e}=this,r={deleted:!t,contents:t||""};this.annotationStorage.updateEditor(e.id,{popup:r})||this.annotationStorage.setValue(`${Z0}${e.id}`,{id:e.id,annotationType:e.annotationType,page:this.parent.page,popup:r,popupRef:e.popupRef,modificationDate:new Date}),t||this.removePopup()}removePopup(){var t,e;(e=((t=c(this,sa))==null?void 0:t.popup)||this.popup)==null||e.remove(),C(this,sa,this.popup=null)}updateEdited(t){var s;if(!this.container)return;t.rect&&(c(this,Df)||C(this,Df,{rect:this.data.rect.slice(0)}));const{rect:e,popup:r}=t;e&&I(this,y1,rT).call(this,e);let i=((s=c(this,sa))==null?void 0:s.popup)||this.popup;!i&&(r!=null&&r.text)&&(this._createPopup(r),i=c(this,sa).popup),i&&(i.updateEdited(t),r!=null&&r.deleted&&(i.remove(),C(this,sa,null),this.popup=null))}resetEdited(){var t;c(this,Df)&&(I(this,y1,rT).call(this,c(this,Df).rect),(t=c(this,sa))==null||t.popup.resetEdited(),C(this,Df,null))}_createContainer(t){const{data:e,parent:{page:r,viewport:i}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",e.id),!(this instanceof yu)&&!(this instanceof ix)&&(s.tabIndex=0);const{style:A}=s;if(A.zIndex=this.parent.zIndex,this.parent.zIndex+=2,e.alternativeText&&(s.title=e.alternativeText),e.noRotate&&s.classList.add("norotate"),!e.rect||this instanceof nx){const{rotation:m}=e;return!e.hasOwnCanvas&&m!==0&&this.setRotation(m,s),s}const{width:a,height:o}=this;if(!t&&e.borderStyle.width>0){A.borderWidth=`${e.borderStyle.width}px`;const m=e.borderStyle.horizontalCornerRadius,y=e.borderStyle.verticalCornerRadius;if(m>0||y>0){const B=`calc(${m}px * var(--total-scale-factor)) / calc(${y}px * var(--total-scale-factor))`;A.borderRadius=B}else if(this instanceof m3){const B=`calc(${a}px * var(--total-scale-factor)) / calc(${o}px * var(--total-scale-factor))`;A.borderRadius=B}switch(e.borderStyle.style){case Wd.SOLID:A.borderStyle="solid";break;case Wd.DASHED:A.borderStyle="dashed";break;case Wd.BEVELED:Ue("Unimplemented border style: beveled");break;case Wd.INSET:Ue("Unimplemented border style: inset");break;case Wd.UNDERLINE:A.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(C(this,Qp,!0),A.borderColor=Qt.makeHexColor(...w)):A.borderWidth=0}const l=Qt.normalizeRect([e.rect[0],r.view[3]-e.rect[1]+r.view[1],e.rect[2],r.view[3]-e.rect[3]+r.view[1]]),{pageWidth:h,pageHeight:u,pageX:d,pageY:f}=i.rawDims;A.left=`${100*(l[0]-d)/h}%`,A.top=`${100*(l[1]-f)/u}%`;const{rotation:p}=e;return e.hasOwnCanvas||p===0?(A.width=`${100*a/h}%`,A.height=`${100*o/u}%`):this.setRotation(p,s),s}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims;let{width:s,height:A}=this;t%180!==0&&([s,A]=[A,s]),e.style.width=`${100*s/r}%`,e.style.height=`${100*A/i}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,r,i)=>{const s=i.detail[e],A=s[0],a=s.slice(1);i.target.style[r]=p3[`${A}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[r]:p3[`${A}_rgb`](a)})};return Se(this,"_commonActions",{display:e=>{const{display:r}=e.detail,i=r%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:r}=e.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const r=e.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(t,e){const r=this._commonActions;for(const i of Object.keys(e.detail)){const s=t[i]||r[i];s==null||s(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const r=this._commonActions;for(const[i,s]of Object.entries(e)){const A=r[i];if(A){const a={detail:{[i]:s},target:t};A(a),delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,r,i,s]=this.data.rect.map(m=>Math.fround(m));if(t.length===8){const[m,y,w,B]=t.subarray(2,6);if(i===m&&s===y&&e===w&&r===B)return}const{style:A}=this.container;let a;if(c(this,Qp)){const{borderColor:m,borderWidth:y}=A;A.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${m}" stroke-width="${y}">`],this.container.classList.add("hasBorder")}const o=i-e,l=s-r,{svgFactory:h}=this,u=h.createElement("svg");u.classList.add("quadrilateralsContainer"),u.setAttribute("width",0),u.setAttribute("height",0),u.role="none";const d=h.createElement("defs");u.append(d);const f=h.createElement("clipPath"),p=`clippath_${this.data.id}`;f.setAttribute("id",p),f.setAttribute("clipPathUnits","objectBoundingBox"),d.append(f);for(let m=2,y=t.length;m<y;m+=8){const w=t[m],B=t[m+1],E=t[m+2],S=t[m+3],_=h.createElement("rect"),L=(E-e)/o,k=(s-B)/l,H=(w-E)/o,Q=(B-S)/l;_.setAttribute("x",L),_.setAttribute("y",k),_.setAttribute("width",H),_.setAttribute("height",Q),f.append(_),a==null||a.push(`<rect vector-effect="non-scaling-stroke" x="${L}" y="${k}" width="${H}" height="${Q}"/>`)}c(this,Qp)&&(a.push("</g></svg>')"),A.backgroundImage=a.join("")),this.container.append(u),this.container.style.clipPath=`url(#${p})`}_createPopup(t=null){const{data:e}=this;let r,i;t?(r={str:t.text},i=t.date):(r=e.contentsObj,i=e.modificationDate),C(this,sa,new nx({data:{color:e.color,titleObj:e.titleObj,modificationDate:i,contentsObj:r,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}))}get hasPopupElement(){return!!(c(this,sa)||this.popup||this.data.popupRef)}get extraPopupElement(){return c(this,sa)}render(){lr("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const r=[];if(this._fieldObjects){const i=this._fieldObjects[t];if(i)for(const{page:s,id:A,exportValues:a}of i){if(s===-1||A===e)continue;const o=typeof a=="string"?a:null,l=document.querySelector(`[data-element-id="${A}"]`);if(l&&!wu.has(l)){Ue(`_getElementsByName - element not allowed: ${A}`);continue}r.push({id:A,exportValue:o,domElement:l})}return r}for(const i of document.getElementsByName(t)){const{exportValue:s}=i,A=i.getAttribute("data-element-id");A!==e&&wu.has(i)&&r.push({id:A,exportValue:s,domElement:i})}return r}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Df=new WeakMap,Qp=new WeakMap,sa=new WeakMap,y1=new WeakSet,rT=function(t){const{container:{style:e},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:s,pageHeight:A,pageX:a,pageY:o}}}}=this;r==null||r.splice(0,4,...t),e.left=`${100*(t[0]-a)/s}%`,e.top=`${100*(A-t[3]+o)/A}%`,i===0?(e.width=`${100*(t[2]-t[0])/s}%`,e.height=`${100*(t[3]-t[1])/A}%`):this.setRotation(i)};let si=$F;class w9 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.editor=t.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){const{editor:t}=this;t.hasComment&&this._createPopup(t.comment)}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(t){this.editor.comment=t,t||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.parent.removeAnnotation(this.data.id),this.container.remove(),this.container=null,this.removePopup()}}class ix extends si{constructor(e,r=null){super(e,{isRenderable:!0,ignoreBorder:!!(r!=null&&r.ignoreBorder),createQuadrilaterals:!0});T(this,pA);this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:r}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let s=!1;return e.url?(r.addLinkAttributes(i,e.url,e.newWindow),s=!0):e.action?(this._bindNamedAction(i,e.action,e.overlaidText),s=!0):e.attachment?(I(this,pA,lR).call(this,i,e.attachment,e.overlaidText,e.attachmentDest),s=!0):e.setOCGState?(I(this,pA,cR).call(this,i,e.setOCGState,e.overlaidText),s=!0):e.dest?(this._bindLink(i,e.dest,e.overlaidText),s=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),s=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),s=!0):this.isTooltipOnly&&!s&&(this._bindLink(i,""),s=!0)),this.container.classList.add("linkAnnotation"),s&&(this.contentElement=i,this.container.append(i)),this.container}_bindLink(e,r,i=""){e.href=this.linkService.getDestinationHash(r),e.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&I(this,pA,_d).call(this),i&&(e.title=i)}_bindNamedAction(e,r,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(r),!1),i&&(e.title=i),I(this,pA,_d).call(this)}_bindJSAction(e,r){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const s of Object.keys(r.actions)){const A=i.get(s);A&&(e[A]=()=>{var a;return(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:s}}),!1})}r.overlaidText&&(e.title=r.overlaidText),e.onclick||(e.onclick=()=>!1),I(this,pA,_d).call(this)}_bindResetFormAction(e,r){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),I(this,pA,_d).call(this),!this._fieldObjects){Ue('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(e.onclick=()=>!1);return}e.onclick=()=>{var u;i==null||i();const{fields:s,refs:A,include:a}=r,o=[];if(s.length!==0||A.length!==0){const d=new Set(A);for(const f of s){const p=this._fieldObjects[f]||[];for(const{id:m}of p)d.add(m)}for(const f of Object.values(this._fieldObjects))for(const p of f)d.has(p.id)===a&&o.push(p)}else for(const d of Object.values(this._fieldObjects))o.push(...d);const l=this.annotationStorage,h=[];for(const d of o){const{id:f}=d;switch(h.push(f),d.type){case"text":{const m=d.defaultValue||"";l.setValue(f,{value:m});break}case"checkbox":case"radiobutton":{const m=d.defaultValue===d.exportValues;l.setValue(f,{value:m});break}case"combobox":case"listbox":{const m=d.defaultValue||"";l.setValue(f,{value:m});break}default:continue}const p=document.querySelector(`[data-element-id="${f}"]`);if(p){if(!wu.has(p)){Ue(`_bindResetFormAction - element not allowed: ${f}`);continue}}else continue;p.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((u=this.linkService.eventBus)==null||u.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:h,name:"ResetForm"}})),!1}}}pA=new WeakSet,_d=function(){this.container.setAttribute("data-internal-link","")},lR=function(e,r,i="",s=null){e.href=this.linkService.getAnchorUrl(""),r.description?e.title=r.description:i&&(e.title=i),e.onclick=()=>{var A;return(A=this.downloadManager)==null||A.openOrDownloadData(r.content,r.filename,s),!1},I(this,pA,_d).call(this)},cR=function(e,r,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(r),!1),i&&(e.title=i),I(this,pA,_d).call(this)};class y9 extends si{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(t),this.container}}class yu extends si{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Ti.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,r,i,s){r.includes("mouse")?t.addEventListener(r,A=>{var a;(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:s(A),shift:A.shiftKey,modifier:this._getKeyModifier(A)}})}):t.addEventListener(r,A=>{var a;if(r==="blur"){if(!e.focused||!A.relatedTarget)return;e.focused=!1}else if(r==="focus"){if(e.focused)return;e.focused=!0}s&&((a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:s(A)}}))})}_setEventListeners(t,e,r,i){var s,A,a;for(const[o,l]of r)(l==="Action"||(s=this.data.actions)!=null&&s[l])&&((l==="Focus"||l==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,o,l,i),l==="Focus"&&!((A=this.data.actions)!=null&&A.Blur)?this._setEventListener(t,e,"blur","Blur",null):l==="Blur"&&!((a=this.data.actions)!=null&&a.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":Qt.makeHexColor(...e)}_setTextStyle(t){const e=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||m9,s=t.style;let A;const a=2,o=l=>Math.round(10*l)/10;if(this.data.multiLine){const l=Math.abs(this.data.rect[3]-this.data.rect[1]-a),h=Math.round(l/(I5*i))||1,u=l/h;A=Math.min(i,o(u/I5))}else{const l=Math.abs(this.data.rect[3]-this.data.rect[1]-a);A=Math.min(i,o(l/I5))}s.fontSize=`calc(${A}px * var(--total-scale-factor))`,s.color=Qt.makeHexColor(...r),this.data.textAlignment!==null&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class b9 extends yu{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,r,i){const s=this.annotationStorage;for(const A of this._getElementsByName(t.name,t.id))A.domElement&&(A.domElement[e]=r),s.setValue(A.id,{[i]:r})}render(){var i,s;const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const A=t.getValue(e,{value:this.data.fieldValue});let a=A.value||"";const o=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;o&&a.length>o&&(a=a.slice(0,o));let l=A.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
|
|
263
|
-
`))||null;l&&this.data.comb&&(l=l.replaceAll(/\s+/g,""));const h={userValue:a,formattedValue:l,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=l??a,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type=this.data.password?"password":"text",r.setAttribute("value",l??a),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),wu.add(r),this.contentElement=r,r.setAttribute("data-element-id",e),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=0;const{datetimeFormat:u,datetimeType:d,timeStep:f}=this.data,p=!!d&&this.enableScripting;u&&(r.title=u),this._setRequired(r,this.data.required),o&&(r.maxLength=o),r.addEventListener("input",y=>{t.setValue(e,{value:y.target.value}),this.setPropertyOnSiblings(r,"value",y.target.value,"value"),h.formattedValue=null}),r.addEventListener("resetform",y=>{const w=this.data.defaultFieldValue??"";r.value=h.userValue=w,h.formattedValue=null});let m=y=>{const{formattedValue:w}=h;w!=null&&(y.target.value=w),y.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",w=>{var E;if(h.focused)return;const{target:B}=w;if(p&&(B.type=d,f&&(B.step=f)),h.userValue){const S=h.userValue;if(p)if(d==="time"){const _=new Date(S),L=[_.getHours(),_.getMinutes(),_.getSeconds()];B.value=L.map(k=>k.toString().padStart(2,"0")).join(":")}else B.value=new Date(S-v9).toISOString().split(d==="date"?"T":".",1)[0];else B.value=S}h.lastCommittedValue=B.value,h.commitKey=1,(E=this.data.actions)!=null&&E.Focus||(h.focused=!0)}),r.addEventListener("updatefromsandbox",w=>{this.showElementAndHideCanvas(w.target);const B={value(E){h.userValue=E.detail.value??"",p||t.setValue(e,{value:h.userValue.toString()}),E.target.value=h.userValue},formattedValue(E){const{formattedValue:S}=E.detail;h.formattedValue=S,S!=null&&E.target!==document.activeElement&&(E.target.value=S);const _={formattedValue:S};p&&(_.value=S),t.setValue(e,_)},selRange(E){E.target.setSelectionRange(...E.detail.selRange)},charLimit:E=>{var k;const{charLimit:S}=E.detail,{target:_}=E;if(S===0){_.removeAttribute("maxLength");return}_.setAttribute("maxLength",S);let L=h.userValue;!L||L.length<=S||(L=L.slice(0,S),_.value=h.userValue=L,t.setValue(e,{value:L}),(k=this.linkService.eventBus)==null||k.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:L,willCommit:!0,commitKey:1,selStart:_.selectionStart,selEnd:_.selectionEnd}}))}};this._dispatchEventFromSandbox(B,w)}),r.addEventListener("keydown",w=>{var S;h.commitKey=1;let B=-1;if(w.key==="Escape"?B=0:w.key==="Enter"&&!this.data.multiLine?B=2:w.key==="Tab"&&(h.commitKey=3),B===-1)return;const{value:E}=w.target;h.lastCommittedValue!==E&&(h.lastCommittedValue=E,h.userValue=E,(S=this.linkService.eventBus)==null||S.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:E,willCommit:!0,commitKey:B,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}}))});const y=m;m=null,r.addEventListener("blur",w=>{var S,_;if(!h.focused||!w.relatedTarget)return;(S=this.data.actions)!=null&&S.Blur||(h.focused=!1);const{target:B}=w;let{value:E}=B;if(p){if(E&&d==="time"){const L=E.split(":").map(k=>parseInt(k,10));E=new Date(2e3,0,1,L[0],L[1],L[2]||0).valueOf(),B.step=""}else E.includes("T")||(E=`${E}T00:00`),E=new Date(E).valueOf();B.type="text"}h.userValue=E,h.lastCommittedValue!==E&&((_=this.linkService.eventBus)==null||_.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:E,willCommit:!0,commitKey:h.commitKey,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}})),y(w)}),(s=this.data.actions)!=null&&s.Keystroke&&r.addEventListener("beforeinput",w=>{var Q;h.lastCommittedValue=null;const{data:B,target:E}=w,{value:S,selectionStart:_,selectionEnd:L}=E;let k=_,H=L;switch(w.inputType){case"deleteWordBackward":{const W=S.substring(0,_).match(/\w*[^\w]*$/);W&&(k-=W[0].length);break}case"deleteWordForward":{const W=S.substring(_).match(/^[^\w]*\w*/);W&&(H+=W[0].length);break}case"deleteContentBackward":_===L&&(k-=1);break;case"deleteContentForward":_===L&&(H+=1);break}w.preventDefault(),(Q=this.linkService.eventBus)==null||Q.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:S,change:B||"",willCommit:!1,selStart:k,selEnd:H}})}),this._setEventListeners(r,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],w=>w.target.value)}if(m&&r.addEventListener("blur",m),this.data.comb){const w=(this.data.rect[2]-this.data.rect[0])/o;r.classList.add("comb"),r.style.letterSpacing=`calc(${w}px * var(--total-scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class B9 extends yu{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class C9 extends yu{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,r=e.id;let i=t.getValue(r,{value:e.exportValue===e.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",t.setValue(r,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const s=document.createElement("input");return wu.add(s),s.setAttribute("data-element-id",r),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=e.fieldName,i&&s.setAttribute("checked",!0),s.setAttribute("exportValue",e.exportValue),s.tabIndex=0,s.addEventListener("change",A=>{const{name:a,checked:o}=A.target;for(const l of this._getElementsByName(a,r)){const h=o&&l.exportValue===e.exportValue;l.domElement&&(l.domElement.checked=h),t.setValue(l.id,{value:h})}t.setValue(r,{value:o})}),s.addEventListener("resetform",A=>{const a=e.defaultFieldValue||"Off";A.target.checked=a===e.exportValue}),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",A=>{const a={value(o){o.target.checked=o.detail.value!=="Off",t.setValue(r,{value:o.target.checked})}};this._dispatchEventFromSandbox(a,A)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],A=>A.target.checked)),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class m3 extends yu{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,r=e.id;let i=t.getValue(r,{value:e.fieldValue===e.buttonValue}).value;if(typeof i=="string"&&(i=i!==e.buttonValue,t.setValue(r,{value:i})),i)for(const A of this._getElementsByName(e.fieldName,r))t.setValue(A.id,{value:!1});const s=document.createElement("input");if(wu.add(s),s.setAttribute("data-element-id",r),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=e.fieldName,i&&s.setAttribute("checked",!0),s.tabIndex=0,s.addEventListener("change",A=>{const{name:a,checked:o}=A.target;for(const l of this._getElementsByName(a,r))t.setValue(l.id,{value:!1});t.setValue(r,{value:o})}),s.addEventListener("resetform",A=>{const a=e.defaultFieldValue;A.target.checked=a!=null&&a===e.buttonValue}),this.enableScripting&&this.hasJSActions){const A=e.buttonValue;s.addEventListener("updatefromsandbox",a=>{const o={value:l=>{const h=A===l.detail.value;for(const u of this._getElementsByName(l.target.name)){const d=h&&u.id===r;u.domElement&&(u.domElement.checked=d),t.setValue(u.id,{value:d})}}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)}return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class x9 extends ix{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),t}}class E9 extends yu{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,r=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");wu.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=0;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",u=>{const d=this.data.defaultFieldValue;for(const f of i.options)f.selected=f.value===d});const A=(u,d)=>{const f=d.replaceAll(" "," ");u.textContent=f,f!==d&&u.setAttribute("display-value",d)};for(const u of this.data.options){const d=document.createElement("option");A(d,u.displayValue),d.value=u.exportValue,r.value.includes(u.exportValue)&&(d.setAttribute("selected",!0),s=!1),i.append(d)}let a=null;if(s){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),i.prepend(u),a=()=>{u.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}const o=u=>{const d=u?"value":"textContent",{options:f,multiple:p}=i;return p?Array.prototype.filter.call(f,m=>m.selected).map(m=>m[d]):f.selectedIndex===-1?null:f[f.selectedIndex][d]};let l=o(!1);const h=u=>{const d=u.target.options;return Array.prototype.map.call(d,f=>({displayValue:f.getAttribute("display-value")||f.textContent,exportValue:f.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",u=>{const d={value(f){a==null||a();const p=f.detail.value,m=new Set(Array.isArray(p)?p:[p]);for(const y of i.options)y.selected=m.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(f){i.multiple=!0},remove(f){const p=i.options,m=f.detail.remove;p[m].selected=!1,i.remove(m),p.length>0&&Array.prototype.findIndex.call(p,w=>w.selected)===-1&&(p[0].selected=!0),t.setValue(e,{value:o(!0),items:h(f)}),l=o(!1)},clear(f){for(;i.length!==0;)i.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(f){const{index:p,displayValue:m,exportValue:y}=f.detail.insert,w=i.children[p],B=document.createElement("option");A(B,m),B.value=y,w?w.before(B):i.append(B),t.setValue(e,{value:o(!0),items:h(f)}),l=o(!1)},items(f){const{items:p}=f.detail;for(;i.length!==0;)i.remove(0);for(const m of p){const{displayValue:y,exportValue:w}=m,B=document.createElement("option");A(B,y),B.value=w,i.append(B)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(f)}),l=o(!1)},indices(f){const p=new Set(f.detail.indices);for(const m of f.target.options)m.selected=p.has(m.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(f){f.target.disabled=!f.detail.editable}};this._dispatchEventFromSandbox(d,u)}),i.addEventListener("input",u=>{var p;const d=o(!0),f=o(!1);t.setValue(e,{value:d}),u.preventDefault(),(p=this.linkService.eventBus)==null||p.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:f,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):i.addEventListener("input",function(u){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class nx extends si{constructor(e){const{data:r,elements:i,parent:s}=e,A=!!s._commentManager;super(e,{isRenderable:!A&&si._hasPopupData(r)});T(this,b1);if(this.elements=i,A&&si._hasPopupData(r)){const a=this.popup=I(this,b1,iT).call(this);for(const o of i)o.popup=a}else this.popup=null}render(){const{container:e}=this;e.classList.add("popupAnnotation"),e.role="comment";const r=this.popup=I(this,b1,iT).call(this),i=[];for(const s of this.elements)s.popup=r,s.container.ariaHasPopup="dialog",i.push(s.data.id),s.addHighlightArea();return this.container.setAttribute("aria-controls",i.map(s=>`${zd}${s}`).join(",")),this.container}}b1=new WeakSet,iT=function(){return new S9({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})};class S9{constructor({container:t,color:e,elements:r,titleObj:i,modificationDate:s,contentsObj:A,richText:a,parent:o,rect:l,parentRect:h,open:u,commentManager:d=null}){T(this,De);T(this,mA,null);T(this,_h,I(this,De,fR).bind(this));T(this,fB,I(this,De,oT).bind(this));T(this,dB,I(this,De,fC).bind(this));T(this,Np,I(this,De,uC).bind(this));T(this,Pp,null);T(this,wi,null);T(this,Lo,null);T(this,Ih,null);T(this,Rf,null);T(this,Mp,null);T(this,kp,null);T(this,Qo,!1);T(this,vA,null);T(this,Xl,null);T(this,ql,null);T(this,yi,null);T(this,Yl,null);T(this,Uh,null);T(this,B1,null);T(this,Jl,null);T(this,Op,null);T(this,Hf,null);T(this,Lh,!1);T(this,pn,null);T(this,Qh,null);C(this,wi,t),C(this,Op,i),C(this,Lo,A),C(this,Jl,a),C(this,Mp,o),C(this,Pp,e),C(this,B1,l),C(this,kp,h),C(this,Rf,r),C(this,mA,d),C(this,pn,r[0]),C(this,Ih,om.toDateObject(s)),this.trigger=r.flatMap(f=>f.getElementsToTriggerPopup()),d||(I(this,De,cC).call(this),c(this,wi).hidden=!0,u&&I(this,De,uC).call(this))}renderCommentButton(){if(c(this,yi)){c(this,yi).parentNode||c(this,pn).container.after(c(this,yi));return}if(c(this,Yl)||I(this,De,nT).call(this),!c(this,Yl))return;const{signal:t}=C(this,Xl,new AbortController),e=c(this,pn).hasOwnCommentButton,r=()=>{c(this,mA).toggleCommentPopup(this,!0,void 0,!e)},i=()=>{c(this,mA).toggleCommentPopup(this,!1,!0,!e)},s=()=>{c(this,mA).toggleCommentPopup(this,!1,!1)};if(e){C(this,yi,c(this,pn).container);for(const A of this.trigger)A.ariaHasPopup="dialog",A.ariaControls="commentPopup",A.addEventListener("keydown",c(this,_h),{signal:t}),A.addEventListener("click",r,{signal:t}),A.addEventListener("pointerenter",i,{signal:t}),A.addEventListener("pointerleave",s,{signal:t}),A.classList.add("popupTriggerArea")}else{const A=C(this,yi,document.createElement("button"));A.className="annotationCommentButton";const a=c(this,pn).container;A.style.zIndex=parseInt(a.style.zIndex,10)+1,A.tabIndex=0,A.ariaHasPopup="dialog",A.ariaControls="commentPopup",A.setAttribute("data-l10n-id","pdfjs-show-comment-button"),I(this,De,AT).call(this),I(this,De,sT).call(this),A.addEventListener("keydown",c(this,_h),{signal:t}),A.addEventListener("click",r,{signal:t}),A.addEventListener("pointerenter",i,{signal:t}),A.addEventListener("pointerleave",s,{signal:t}),a.after(A)}}get commentButtonColor(){const{color:t,opacity:e}=c(this,pn).commentData;return t?c(this,Mp)._commentManager.makeCommentColor(t,e):null}focusCommentButton(){setTimeout(()=>{var t;(t=c(this,yi))==null||t.focus()},0)}getData(){const{richText:t,color:e,opacity:r,creationDate:i,modificationDate:s}=c(this,pn).commentData;return{contentsObj:{str:this.comment},richText:t,color:e,opacity:r,creationDate:i,modificationDate:s}}get elementBeforePopup(){return c(this,yi)}get comment(){return c(this,Qh)||C(this,Qh,c(this,pn).commentText),c(this,Qh)}set comment(t){t!==this.comment&&(c(this,pn).commentText=C(this,Qh,t))}focus(){var t;(t=c(this,pn).container)==null||t.focus()}get parentBoundingClientRect(){return c(this,pn).layer.getBoundingClientRect()}setCommentButtonStates({selected:t,hasPopup:e}){c(this,yi)&&(c(this,yi).classList.toggle("selected",t),c(this,yi).ariaExpanded=e)}setSelectedCommentButton(t){c(this,yi).classList.toggle("selected",t)}get commentPopupPosition(){if(c(this,Uh))return c(this,Uh);const{x:t,y:e,height:r}=c(this,yi).getBoundingClientRect(),{x:i,y:s,width:A,height:a}=c(this,pn).layer.getBoundingClientRect();return[(t-i)/A,(e+r-s)/a]}set commentPopupPosition(t){C(this,Uh,t)}hasDefaultPopupPosition(){return c(this,Uh)===null}get commentButtonPosition(){return c(this,Yl)}get commentButtonWidth(){return c(this,yi).getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(t){const[e,r]=c(this,Uh)||this.commentButtonPosition.map(l=>l/100),i=this.parentBoundingClientRect,{x:s,y:A,width:a,height:o}=i;c(this,mA).showDialog(null,this,s+e*a,A+r*o,{...t,parentDimensions:i})}render(){var r,i;if(c(this,vA))return;const t=C(this,vA,document.createElement("div"));if(t.className="popup",c(this,Pp)){const s=t.style.outlineColor=Qt.makeHexColor(...c(this,Pp));t.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`}const e=document.createElement("span");if(e.className="header",(r=c(this,Op))!=null&&r.str){const s=document.createElement("span");s.className="title",e.append(s),{dir:s.dir,str:s.textContent}=c(this,Op)}if(t.append(e),c(this,Ih)){const s=document.createElement("time");s.className="popupDate",s.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),s.setAttribute("data-l10n-args",JSON.stringify({dateObj:c(this,Ih).valueOf()})),s.dateTime=c(this,Ih).toISOString(),e.append(s)}D5({html:c(this,De,hC)||c(this,Lo).str,dir:(i=c(this,Lo))==null?void 0:i.dir,className:"popupContent"},t),c(this,wi).append(t)}updateEdited({rect:t,popup:e,deleted:r}){var i;if(c(this,mA)){r?(this.remove(),C(this,Qh,null)):e&&(e.deleted?this.remove():(I(this,De,AT).call(this),C(this,Qh,e.text))),t&&(C(this,Yl,null),I(this,De,nT).call(this),I(this,De,sT).call(this));return}if(r||e!=null&&e.deleted){this.remove();return}I(this,De,cC).call(this),c(this,Hf)||C(this,Hf,{contentsObj:c(this,Lo),richText:c(this,Jl)}),t&&C(this,ql,null),e&&e.text&&(C(this,Jl,I(this,De,uR).call(this,e.text)),C(this,Ih,om.toDateObject(e.date)),C(this,Lo,null)),(i=c(this,vA))==null||i.remove(),C(this,vA,null)}resetEdited(){var t;c(this,Hf)&&({contentsObj:Yi(this,Lo)._,richText:Yi(this,Jl)._}=c(this,Hf),C(this,Hf,null),(t=c(this,vA))==null||t.remove(),C(this,vA,null),C(this,ql,null))}remove(){var t,e,r;if((t=c(this,Xl))==null||t.abort(),C(this,Xl,null),(e=c(this,vA))==null||e.remove(),C(this,vA,null),C(this,Lh,!1),C(this,Qo,!1),(r=c(this,yi))==null||r.remove(),C(this,yi,null),this.trigger)for(const i of this.trigger)i.classList.remove("popupTriggerArea")}forceHide(){C(this,Lh,this.isVisible),c(this,Lh)&&(c(this,wi).hidden=!0)}maybeShow(){c(this,mA)||(I(this,De,cC).call(this),c(this,Lh)&&(c(this,vA)||I(this,De,fC).call(this),C(this,Lh,!1),c(this,wi).hidden=!1))}get isVisible(){return c(this,mA)?!1:c(this,wi).hidden===!1}}mA=new WeakMap,_h=new WeakMap,fB=new WeakMap,dB=new WeakMap,Np=new WeakMap,Pp=new WeakMap,wi=new WeakMap,Lo=new WeakMap,Ih=new WeakMap,Rf=new WeakMap,Mp=new WeakMap,kp=new WeakMap,Qo=new WeakMap,vA=new WeakMap,Xl=new WeakMap,ql=new WeakMap,yi=new WeakMap,Yl=new WeakMap,Uh=new WeakMap,B1=new WeakMap,Jl=new WeakMap,Op=new WeakMap,Hf=new WeakMap,Lh=new WeakMap,pn=new WeakMap,Qh=new WeakMap,De=new WeakSet,cC=function(){var e;if(c(this,Xl))return;C(this,Xl,new AbortController);const{signal:t}=c(this,Xl);for(const r of this.trigger)r.addEventListener("click",c(this,Np),{signal:t}),r.addEventListener("pointerenter",c(this,dB),{signal:t}),r.addEventListener("pointerleave",c(this,fB),{signal:t}),r.classList.add("popupTriggerArea");for(const r of c(this,Rf))(e=r.container)==null||e.addEventListener("keydown",c(this,_h),{signal:t})},nT=function(){const t=c(this,Rf).find(e=>e.hasCommentButton);t&&C(this,Yl,t._normalizePoint(t.commentButtonPosition))},sT=function(){if(c(this,pn).extraPopupElement&&!c(this,pn).editor)return;c(this,yi)||this.renderCommentButton();const[t,e]=c(this,Yl),{style:r}=c(this,yi);r.left=`calc(${t}%)`,r.top=`calc(${e}% - var(--comment-button-dim))`},AT=function(){c(this,pn).extraPopupElement||(c(this,yi)||this.renderCommentButton(),c(this,yi).style.backgroundColor=this.commentButtonColor||"")},hC=function(){const t=c(this,Jl),e=c(this,Lo);return t!=null&&t.str&&(!(e!=null&&e.str)||e.str===t.str)&&c(this,Jl).html||null},aT=function(){var t,e,r;return((r=(e=(t=c(this,De,hC))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:r.fontSize)||0},hR=function(){var t,e,r;return((r=(e=(t=c(this,De,hC))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:r.color)||null},uR=function(t){const e=[],r={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:e}]}},i={style:{color:c(this,De,hR),fontSize:c(this,De,aT)?`calc(${c(this,De,aT)}px * var(--total-scale-factor))`:""}};for(const s of t.split(`
|
|
264
|
-
`))e.push({name:"span",value:s,attributes:i});return r},fR=function(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&c(this,Qo))&&I(this,De,uC).call(this)},dR=function(){if(c(this,ql)!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:r,pageX:i,pageY:s}}}=c(this,Mp);let A=!!c(this,kp),a=A?c(this,kp):c(this,B1);for(const p of c(this,Rf))if(!a||Qt.intersect(p.data.rect,a)!==null){a=p.data.rect,A=!0;break}const o=Qt.normalizeRect([a[0],t[3]-a[1]+t[1],a[2],t[3]-a[3]+t[1]]),h=A?a[2]-a[0]+5:0,u=o[0]+h,d=o[1];C(this,ql,[100*(u-i)/e,100*(d-s)/r]);const{style:f}=c(this,wi);f.left=`${c(this,ql)[0]}%`,f.top=`${c(this,ql)[1]}%`},uC=function(){if(c(this,mA)){c(this,mA).toggleCommentPopup(this,!1);return}C(this,Qo,!c(this,Qo)),c(this,Qo)?(I(this,De,fC).call(this),c(this,wi).addEventListener("click",c(this,Np)),c(this,wi).addEventListener("keydown",c(this,_h))):(I(this,De,oT).call(this),c(this,wi).removeEventListener("click",c(this,Np)),c(this,wi).removeEventListener("keydown",c(this,_h)))},fC=function(){c(this,vA)||this.render(),this.isVisible?c(this,Qo)&&c(this,wi).classList.add("focused"):(I(this,De,dR).call(this),c(this,wi).hidden=!1,c(this,wi).style.zIndex=parseInt(c(this,wi).style.zIndex,10)+1e3)},oT=function(){c(this,wi).classList.remove("focused"),!(c(this,Qo)||!this.isVisible)&&(c(this,wi).hidden=!0,c(this,wi).style.zIndex=parseInt(c(this,wi).style.zIndex,10)-1e3)};class v3 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=Be.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=this.contentElement=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const r=document.createElement("span");r.textContent=e,t.append(r)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}class F9 extends si{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,C1,null)}render(){this.container.classList.add("lineAnnotation");const{data:e,width:r,height:i}=this,s=this.svgFactory.create(r,i,!0),A=C(this,C1,this.svgFactory.createElement("svg:line"));return A.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),A.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),A.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),A.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),A.setAttribute("stroke-width",e.borderStyle.width||1),A.setAttribute("stroke","transparent"),A.setAttribute("fill","transparent"),s.append(A),this.container.append(s),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,C1)}addHighlightArea(){this.container.classList.add("highlightArea")}}C1=new WeakMap;class T9 extends si{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,x1,null)}render(){this.container.classList.add("squareAnnotation");const{data:e,width:r,height:i}=this,s=this.svgFactory.create(r,i,!0),A=e.borderStyle.width,a=C(this,x1,this.svgFactory.createElement("svg:rect"));return a.setAttribute("x",A/2),a.setAttribute("y",A/2),a.setAttribute("width",r-A),a.setAttribute("height",i-A),a.setAttribute("stroke-width",A||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,x1)}addHighlightArea(){this.container.classList.add("highlightArea")}}x1=new WeakMap;class _9 extends si{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,E1,null)}render(){this.container.classList.add("circleAnnotation");const{data:e,width:r,height:i}=this,s=this.svgFactory.create(r,i,!0),A=e.borderStyle.width,a=C(this,E1,this.svgFactory.createElement("svg:ellipse"));return a.setAttribute("cx",r/2),a.setAttribute("cy",i/2),a.setAttribute("rx",r/2-A/2),a.setAttribute("ry",i/2-A/2),a.setAttribute("stroke-width",A||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,E1)}addHighlightArea(){this.container.classList.add("highlightArea")}}E1=new WeakMap;class w3 extends si{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,S1,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:r,borderStyle:i,popupRef:s},width:A,height:a}=this;if(!r)return this.container;const o=this.svgFactory.create(A,a,!0);let l=[];for(let u=0,d=r.length;u<d;u+=2){const f=r[u]-e[0],p=e[3]-r[u+1];l.push(`${f},${p}`)}l=l.join(" ");const h=C(this,S1,this.svgFactory.createElement(this.svgElementName));return h.setAttribute("points",l),h.setAttribute("stroke-width",i.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),o.append(h),this.container.append(o),!s&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,S1)}addHighlightArea(){this.container.classList.add("highlightArea")}}S1=new WeakMap;class I9 extends w3{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class U9 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}}class sx extends si{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,T1);T(this,F1,null);T(this,Kf,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?Be.HIGHLIGHT:Be.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,rotation:r,inkLists:i,borderStyle:s,popupRef:A}}=this,{transform:a,width:o,height:l}=I(this,T1,lT).call(this,r,e),h=this.svgFactory.create(o,l,!0),u=C(this,F1,this.svgFactory.createElement("svg:g"));h.append(u),u.setAttribute("stroke-width",s.width||1),u.setAttribute("stroke-linecap","round"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit",10),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),u.setAttribute("transform",a);for(let d=0,f=i.length;d<f;d++){const p=this.svgFactory.createElement(this.svgElementName);c(this,Kf).push(p),p.setAttribute("points",i[d].join(",")),u.append(p)}return!A&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(h),this._editOnDoubleClick(),this.container}updateEdited(e){super.updateEdited(e);const{thickness:r,points:i,rect:s}=e,A=c(this,F1);if(r>=0&&A.setAttribute("stroke-width",r||1),i)for(let a=0,o=c(this,Kf).length;a<o;a++)c(this,Kf)[a].setAttribute("points",i[a].join(","));if(s){const{transform:a,width:o,height:l}=I(this,T1,lT).call(this,this.data.rotation,s);A.parentElement.setAttribute("viewBox",`0 0 ${o} ${l}`),A.setAttribute("transform",a)}}getElementsToTriggerPopup(){return c(this,Kf)}addHighlightArea(){this.container.classList.add("highlightArea")}}F1=new WeakMap,Kf=new WeakMap,T1=new WeakSet,lT=function(e,r){switch(e){case 90:return{transform:`rotate(90) translate(${-r[0]},${r[1]}) scale(1,-1)`,width:r[3]-r[1],height:r[2]-r[0]};case 180:return{transform:`rotate(180) translate(${-r[2]},${r[1]}) scale(1,-1)`,width:r[2]-r[0],height:r[3]-r[1]};case 270:return{transform:`rotate(270) translate(${-r[2]},${r[3]}) scale(1,-1)`,width:r[3]-r[1],height:r[2]-r[0]};default:return{transform:`translate(${-r[0]},${r[3]}) scale(1,-1)`,width:r[2]-r[0],height:r[3]-r[1]}}};class y3 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=Be.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const r=document.createElement("mark");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class L9 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("underlineAnnotation"),t){const r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class Q9 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("squigglyAnnotation"),t){const r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class N9 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("strikeoutAnnotation"),t){const r=document.createElement("s");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class b3 extends si{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=Be.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}class P9 extends si{constructor(e){var i;super(e,{isRenderable:!0});T(this,I1);T(this,_1,null);const{file:r}=this.data;this.filename=r.filename,this.content=r.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:r}=this;let i;r.hasAppearance||r.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(r.name)?"paperclip":"pushpin"}.svg`,r.fillAlpha&&r.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(r.fillAlpha*100)}%);`)),i.addEventListener("dblclick",I(this,I1,cT).bind(this)),C(this,_1,i);const{isMac:s}=Ti.platform;return e.addEventListener("keydown",A=>{A.key==="Enter"&&(s?A.metaKey:A.ctrlKey)&&I(this,I1,cT).call(this)}),!r.popupRef&&this.hasPopupData?(this.hasOwnCommentButton=!0,this._createPopup()):i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return c(this,_1)}addHighlightArea(){this.container.classList.add("highlightArea")}}_1=new WeakMap,I1=new WeakSet,cT=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};const WF=class WF{constructor({div:t,accessibilityManager:e,annotationCanvasMap:r,annotationEditorUIManager:i,page:s,viewport:A,structTreeLayer:a,commentManager:o,linkService:l,annotationStorage:h}){T(this,Zl);T(this,Vf,null);T(this,Gf,null);T(this,Dp,null);T(this,Nh,new Map);T(this,U1,null);T(this,jf,null);T(this,wA,[]);T(this,L1,!1);ct(this,"zIndex",0);this.div=t,C(this,Vf,e),C(this,Gf,r),C(this,U1,a||null),C(this,jf,l||null),C(this,Dp,h||new G5),this.page=s,this.viewport=A,this._annotationEditorUIManager=i,this._commentManager=o||null}hasEditableAnnotations(){return c(this,Nh).size>0}async render(t){var a;const{annotations:e}=t,r=this.div;Mc(r,this.viewport);const i=new Map,s=[],A={data:null,layer:r,linkService:c(this,jf),downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new vm,annotationStorage:c(this,Dp),enableComment:t.enableComment===!0,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of e){if(o.noHTML)continue;const l=o.annotationType===Fi.POPUP;if(l){const d=i.get(o.id);if(!d)continue;if(!this._commentManager){s.push(o);continue}A.elements=d}else if(o.rect[2]===o.rect[0]||o.rect[3]===o.rect[1])continue;A.data=o;const h=rx.create(A);if(!h.isRenderable)continue;l||(c(this,wA).push(h),o.popupRef&&i.getOrInsertComputed(o.popupRef,y2).push(h));const u=h.render();o.hidden&&(u.style.visibility="hidden"),h._isEditable&&(c(this,Nh).set(h.data.id,h),(a=this._annotationEditorUIManager)==null||a.renderAnnotationElement(h))}await I(this,Zl,dC).call(this);for(const o of s){const l=A.elements=i.get(o.id);A.data=o;const h=rx.create(A);if(!h.isRenderable)continue;const u=h.render();h.contentElement.id=`${zd}${o.id}`,o.hidden&&(u.style.visibility="hidden"),l.at(-1).container.after(u)}I(this,Zl,hT).call(this)}async addLinkAnnotations(t){const e={data:null,layer:this.div,linkService:c(this,jf),svgFactory:new vm,parent:this};for(const r of t){r.borderStyle||(r.borderStyle=WF._defaultBorderStyle),e.data=r;const i=rx.create(e);i.isRenderable&&(i.render(),i.contentElement.id=`${zd}${r.id}`,c(this,wA).push(i))}await I(this,Zl,dC).call(this)}update({viewport:t}){const e=this.div;this.viewport=t,Mc(e,{rotation:t.rotation}),I(this,Zl,hT).call(this),e.hidden=!1}getEditableAnnotations(){return c(this,Nh).values()}getEditableAnnotation(t){return c(this,Nh).get(t)}addFakeAnnotation(t){const{div:e}=this,{id:r,rotation:i}=t,s=new w9({data:{id:r,rect:t.getPDFRect(),rotation:i},editor:t,layer:e,parent:this,enableComment:!!this._commentManager,linkService:c(this,jf),annotationStorage:c(this,Dp)});return s.render(),s.contentElement.id=`${zd}${r}`,s.createOrUpdatePopup(),c(this,wA).push(s),s}removeAnnotation(t){var i;const e=c(this,wA).findIndex(s=>s.data.id===t);if(e<0)return;const[r]=c(this,wA).splice(e,1);(i=c(this,Vf))==null||i.removePointerInTextLayer(r.contentElement)}updateFakeAnnotations(t){if(t.length!==0){for(const e of t)e.updateFakeAnnotationElement(this);I(this,Zl,dC).call(this)}}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}static get _defaultBorderStyle(){return Se(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:Wd.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};Vf=new WeakMap,Gf=new WeakMap,Dp=new WeakMap,Nh=new WeakMap,U1=new WeakMap,jf=new WeakMap,wA=new WeakMap,L1=new WeakMap,Zl=new WeakSet,dC=async function(){var r,i,s;if(c(this,wA).length===0)return;this.div.replaceChildren();const t=[];if(!c(this,L1)){C(this,L1,!0);for(const{contentElement:A,data:{id:a}}of c(this,wA)){const o=A.id=`${zd}${a}`;t.push((r=c(this,U1))==null?void 0:r.getAriaAttributes(o).then(l=>{if(l)for(const[h,u]of l)A.setAttribute(h,u)}))}}c(this,wA).sort(({data:{rect:[A,a,o,l]}},{data:{rect:[h,u,d,f]}})=>{if(A===o&&a===l)return 1;if(h===d&&u===f)return-1;const p=l,m=a,y=(a+l)/2,w=f,B=u,E=(u+f)/2;if(y>=w&&E<=m)return-1;if(E>=p&&y<=B)return 1;const S=(A+o)/2,_=(h+d)/2;return S-_});const e=document.createDocumentFragment();for(const A of c(this,wA))e.append(A.container),this._commentManager?(s=((i=A.extraPopupElement)==null?void 0:i.popup)||A.popup)==null||s.renderCommentButton():A.extraPopupElement&&e.append(A.extraPopupElement.render());if(this.div.append(e),await Promise.all(t),c(this,Vf))for(const A of c(this,wA))c(this,Vf).addPointerInTextLayer(A.contentElement,!1)},hT=function(){var e;if(!c(this,Gf))return;const t=this.div;for(const[r,i]of c(this,Gf)){const s=t.querySelector(`[data-annotation-id="${r}"]`);if(!s)continue;i.className="annotationContent";const{firstChild:A}=s;A?A.nodeName==="CANVAS"?A.replaceWith(i):A.classList.contains("annotationContent")?A.after(i):A.before(i):s.append(i);const a=c(this,Nh).get(r);a&&(a._hasNoCanvas?((e=this._annotationEditorUIManager)==null||e.setMissingCanvas(r,s.id,i),a._hasNoCanvas=!1):a.canvas=i)}c(this,Gf).clear()};let G2=WF;const j2=/\r\n?|\n/g,Wr=class Wr extends Mr{constructor(e){super({...e,name:"freeTextEditor"});T(this,Wi);T(this,yA,"");T(this,Q1,`${this.id}-editor`);T(this,$f,null);T(this,bA);ct(this,"_colorPicker",null);this.color=e.color||Wr._defaultColor||Mr._defaultLineColor,C(this,bA,e.fontSize||Wr._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"),this.canAddComment=!1}static get _keyboardManager(){const e=Wr.prototype,r=A=>A.isEmpty(),i=kc.TRANSLATE_SMALL,s=kc.TRANSLATE_BIG;return Se(this,"_keyboardManager",new lm([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-s,0],checker:r}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[s,0],checker:r}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-s],checker:r}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,s],checker:r}]]))}static initialize(e,r){Mr.initialize(e,r);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,r){switch(e){case Ie.FREETEXT_SIZE:Wr._defaultFontSize=r;break;case Ie.FREETEXT_COLOR:Wr._defaultColor=r;break}}updateParams(e,r){switch(e){case Ie.FREETEXT_SIZE:I(this,Wi,gR).call(this,r);break;case Ie.FREETEXT_COLOR:I(this,Wi,pR).call(this,r);break}}static get defaultPropertiesToUpdate(){return[[Ie.FREETEXT_SIZE,Wr._defaultFontSize],[Ie.FREETEXT_COLOR,Wr._defaultColor||Mr._defaultLineColor]]}get propertiesToUpdate(){return[[Ie.FREETEXT_SIZE,c(this,bA)],[Ie.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new V2(this)),[["colorPicker",this._colorPicker]]}get colorType(){return Ie.FREETEXT_COLOR}onUpdatedColor(){var e;this.editorDiv.style.color=this.color,(e=this._colorPicker)==null||e.update(this.color),super.onUpdatedColor()}_translateEmpty(e,r){this._uiManager.translateSelectedEditors(e,r,!0)}getInitialTranslation(){const e=this.parentScale;return[-Wr._internalPadding*e,-(Wr._internalPadding+c(this,bA))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),C(this,$f,new AbortController);const e=this._uiManager.combinedSignal(c(this,$f));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e}),!0}disableEditMode(){var e;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",c(this,Q1)),this._isDraggable=!0,(e=c(this,$f))==null||e.abort(),C(this,$f,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){var r;this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),(r=this._initialOptions)!=null&&r.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=c(this,yA),r=C(this,yA,I(this,Wi,mR).call(this).trimEnd());if(e===r)return;const i=s=>{if(C(this,yA,s),!s){this.remove();return}I(this,Wi,mC).call(this),this._uiManager.rebuild(this),I(this,Wi,gC).call(this)};this.addCommands({cmd:()=>{i(r)},undo:()=>{i(e)},mustExec:!1}),I(this,Wi,gC).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){Wr._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,r;(this._isCopy||this.annotationElementId)&&(e=this.x,r=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",c(this,Q1)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${c(this,bA)}px * var(--total-scale-factor))`,i.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[s,A]=this.parentDimensions;if(this.annotationElementId){const{position:a}=this._initialData;let[o,l]=this.getInitialTranslation();[o,l]=this.pageTranslationToScreen(o,l);const[h,u]=this.pageDimensions,[d,f]=this.pageTranslation;let p,m;switch(this.rotation){case 0:p=e+(a[0]-d)/h,m=r+this.height-(a[1]-f)/u;break;case 90:p=e+(a[0]-d)/h,m=r-(a[1]-f)/u,[o,l]=[l,-o];break;case 180:p=e-this.width+(a[0]-d)/h,m=r-(a[1]-f)/u,[o,l]=[-o,-l];break;case 270:p=e+(a[0]-d-this.height*u)/h,m=r+(a[1]-f-this.width*h)/u,[o,l]=[-l,o];break}this.setAt(p*s,m*A,o,l)}else this._moveAfterPaste(e,r);I(this,Wi,mC).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var p,m,y;const r=e.clipboardData||window.clipboardData,{types:i}=r;if(i.length===1&&i[0]==="text/plain")return;e.preventDefault();const s=I(p=Wr,tc,uT).call(p,r.getData("text")||"").replaceAll(j2,`
|
|
265
|
-
`);if(!s)return;const A=window.getSelection();if(!A.rangeCount)return;this.editorDiv.normalize(),A.deleteFromDocument();const a=A.getRangeAt(0);if(!s.includes(`
|
|
266
|
-
`)){a.insertNode(document.createTextNode(s)),this.editorDiv.normalize(),A.collapseToStart();return}const{startContainer:o,startOffset:l}=a,h=[],u=[];if(o.nodeType===Node.TEXT_NODE){const w=o.parentElement;if(u.push(o.nodeValue.slice(l).replaceAll(j2,"")),w!==this.editorDiv){let B=h;for(const E of this.editorDiv.childNodes){if(E===w){B=u;continue}B.push(I(m=Wr,tc,pC).call(m,E))}}h.push(o.nodeValue.slice(0,l).replaceAll(j2,""))}else if(o===this.editorDiv){let w=h,B=0;for(const E of this.editorDiv.childNodes)B++===l&&(w=u),w.push(I(y=Wr,tc,pC).call(y,E))}C(this,yA,`${h.join(`
|
|
267
|
-
`)}${s}${u.join(`
|
|
268
|
-
`)}`),I(this,Wi,mC).call(this);const d=new Range;let f=Math.sumPrecise(h.map(w=>w.length));for(const{firstChild:w}of this.editorDiv.childNodes)if(w.nodeType===Node.TEXT_NODE){const B=w.nodeValue.length;if(f<=B){d.setStart(w,f),d.setEnd(w,f);break}f-=B}A.removeAllRanges(),A.addRange(d)}get contentDiv(){return this.editorDiv}getPDFRect(){const e=Wr._internalPadding*this.parentScale;return this.getRect(e,e)}static async deserialize(e,r,i){var a;let s=null;if(e instanceof v3){const{data:{defaultAppearanceData:{fontSize:o,fontColor:l},rect:h,rotation:u,id:d,popupRef:f,richText:p,contentsObj:m,creationDate:y,modificationDate:w},textContent:B,textPosition:E,parent:{page:{pageNumber:S}}}=e;if(!B||B.length===0)return null;s=e={annotationType:Be.FREETEXT,color:Array.from(l),fontSize:o,value:B.join(`
|
|
269
|
-
`),position:E,pageIndex:S-1,rect:h.slice(0),rotation:u,annotationElementId:d,id:d,deleted:!1,popupRef:f,comment:(m==null?void 0:m.str)||null,richText:p,creationDate:y,modificationDate:w}}const A=await super.deserialize(e,r,i);return C(A,bA,e.fontSize),A.color=Qt.makeHexColor(...e.color),C(A,yA,I(a=Wr,tc,uT).call(a,e.value)),A._initialData=s,e.comment&&A.setCommentData(e),A}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const r=Mr._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),i=Object.assign(super.serialize(e),{color:r,fontSize:c(this,bA),value:I(this,Wi,vR).call(this)});return this.addComment(i),e?(i.isCopy=!0,i):this.annotationElementId&&!I(this,Wi,wR).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(e){const r=super.renderAnnotationElement(e);if(!r)return null;const{style:i}=r;i.fontSize=`calc(${c(this,bA)}px * var(--total-scale-factor))`,i.color=this.color,r.replaceChildren();for(const s of c(this,yA).split(`
|
|
270
|
-
`)){const A=document.createElement("div");A.append(s?document.createTextNode(s):document.createElement("br")),r.append(A)}return e.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:c(this,yA)}}),r}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};yA=new WeakMap,Q1=new WeakMap,$f=new WeakMap,bA=new WeakMap,Wi=new WeakSet,gR=function(e){const r=s=>{this.editorDiv.style.fontSize=`calc(${s}px * var(--total-scale-factor))`,this.translate(0,-(s-c(this,bA))*this.parentScale),C(this,bA,s),I(this,Wi,gC).call(this)},i=c(this,bA);this.addCommands({cmd:r.bind(this,e),undo:r.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Ie.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},pR=function(e){const r=s=>{this.color=s,this.onUpdatedColor()},i=this.color;this.addCommands({cmd:r.bind(this,e),undo:r.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Ie.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},mR=function(){var i;const e=[];this.editorDiv.normalize();let r=null;for(const s of this.editorDiv.childNodes)(r==null?void 0:r.nodeType)===Node.TEXT_NODE&&s.nodeName==="BR"||(e.push(I(i=Wr,tc,pC).call(i,s)),r=s);return e.join(`
|
|
271
|
-
`)},gC=function(){const[e,r]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:s,div:A}=this,a=A.style.display,o=A.classList.contains("hidden");A.classList.remove("hidden"),A.style.display="hidden",s.div.append(this.div),i=A.getBoundingClientRect(),A.remove(),A.style.display=a,A.classList.toggle("hidden",o)}this.rotation%180===this.parentRotation%180?(this.width=i.width/e,this.height=i.height/r):(this.width=i.height/e,this.height=i.width/r),this.fixAndSetPosition()},tc=new WeakSet,pC=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(j2,"")},mC=function(){if(this.editorDiv.replaceChildren(),!!c(this,yA))for(const e of c(this,yA).split(`
|
|
272
|
-
`)){const r=document.createElement("div");r.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(r)}},vR=function(){return c(this,yA).replaceAll(" "," ")},uT=function(e){return e.replaceAll(" "," ")},wR=function(e){const{value:r,fontSize:i,color:s,pageIndex:A}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==r||e.fontSize!==i||e.color.some((a,o)=>a!==s[o])||e.pageIndex!==A},T(Wr,tc),ct(Wr,"_freeTextDefaultContent",""),ct(Wr,"_internalPadding",0),ct(Wr,"_defaultColor",null),ct(Wr,"_defaultFontSize",10),ct(Wr,"_type","freetext"),ct(Wr,"_editorType",Be.FREETEXT);let Ax=Wr;class Wt{toSVGPath(){lr("Abstract method `toSVGPath` must be implemented.")}get box(){lr("Abstract getter `box` must be implemented.")}serialize(t,e){lr("Abstract method `serialize` must be implemented.")}static _rescale(t,e,r,i,s,A){A||(A=new Float32Array(t.length));for(let a=0,o=t.length;a<o;a+=2)A[a]=e+t[a]*i,A[a+1]=r+t[a+1]*s;return A}static _rescaleAndSwap(t,e,r,i,s,A){A||(A=new Float32Array(t.length));for(let a=0,o=t.length;a<o;a+=2)A[a]=e+t[a+1]*i,A[a+1]=r+t[a]*s;return A}static _translate(t,e,r,i){i||(i=new Float32Array(t.length));for(let s=0,A=t.length;s<A;s+=2)i[s]=e+t[s],i[s+1]=r+t[s+1];return i}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,e,r,i,s){switch(s){case 90:return[1-e/r,t/i];case 180:return[1-t/r,1-e/i];case 270:return[e/r,1-t/i];default:return[t/r,e/i]}}static _normalizePagePoint(t,e,r){switch(r){case 90:return[1-e,t];case 180:return[1-t,1-e];case 270:return[e,1-t];default:return[t,e]}}static createBezierPoints(t,e,r,i,s,A){return[(t+5*r)/6,(e+5*i)/6,(5*r+s)/6,(5*i+A)/6,(r+s)/2,(i+A)/2]}}ct(Wt,"PRECISION",1e-4);const ec=class ec{constructor({x:t,y:e},r,i,s,A,a=0){T(this,en);T(this,BA);T(this,Ka,[]);T(this,Rp);T(this,Hp);T(this,No,[]);T(this,We,new Float32Array(18));T(this,Wf);T(this,zf);T(this,N1);T(this,P1);T(this,Kp);T(this,Vp);T(this,Ph,[]);C(this,BA,r),C(this,Vp,s*i),C(this,Hp,A),c(this,We).set([NaN,NaN,NaN,NaN,t,e],6),C(this,Rp,a),C(this,P1,c(ec,M1)*i),C(this,N1,c(ec,pB)*i),C(this,Kp,i),c(this,Ph).push(t,e)}isEmpty(){return isNaN(c(this,We)[8])}add({x:t,y:e}){var Q;C(this,Wf,t),C(this,zf,e);const[r,i,s,A]=c(this,BA);let[a,o,l,h]=c(this,We).subarray(8,12);const u=t-l,d=e-h,f=Math.hypot(u,d);if(f<c(this,N1))return!1;const p=f-c(this,P1),m=p/f,y=m*u,w=m*d;let B=a,E=o;a=l,o=h,l+=y,h+=w,(Q=c(this,Ph))==null||Q.push(t,e);const S=-w/p,_=y/p,L=S*c(this,Vp),k=_*c(this,Vp);return c(this,We).set(c(this,We).subarray(2,8),0),c(this,We).set([l+L,h+k],4),c(this,We).set(c(this,We).subarray(14,18),12),c(this,We).set([l-L,h-k],16),isNaN(c(this,We)[6])?(c(this,No).length===0&&(c(this,We).set([a+L,o+k],2),c(this,No).push(NaN,NaN,NaN,NaN,(a+L-r)/s,(o+k-i)/A),c(this,We).set([a-L,o-k],14),c(this,Ka).push(NaN,NaN,NaN,NaN,(a-L-r)/s,(o-k-i)/A)),c(this,We).set([B,E,a,o,l,h],6),!this.isEmpty()):(c(this,We).set([B,E,a,o,l,h],6),Math.abs(Math.atan2(E-o,B-a)-Math.atan2(w,y))<Math.PI/2?([a,o,l,h]=c(this,We).subarray(2,6),c(this,No).push(NaN,NaN,NaN,NaN,((a+l)/2-r)/s,((o+h)/2-i)/A),[a,o,B,E]=c(this,We).subarray(14,18),c(this,Ka).push(NaN,NaN,NaN,NaN,((B+a)/2-r)/s,((E+o)/2-i)/A),!0):([B,E,a,o,l,h]=c(this,We).subarray(0,6),c(this,No).push(((B+5*a)/6-r)/s,((E+5*o)/6-i)/A,((5*a+l)/6-r)/s,((5*o+h)/6-i)/A,((a+l)/2-r)/s,((o+h)/2-i)/A),[l,h,a,o,B,E]=c(this,We).subarray(12,18),c(this,Ka).push(((B+5*a)/6-r)/s,((E+5*o)/6-i)/A,((5*a+l)/6-r)/s,((5*o+h)/6-i)/A,((a+l)/2-r)/s,((o+h)/2-i)/A),!0))}toSVGPath(){if(this.isEmpty())return"";const t=c(this,No),e=c(this,Ka);if(isNaN(c(this,We)[6])&&!this.isEmpty())return I(this,en,yR).call(this);const r=[];r.push(`M${t[4]} ${t[5]}`);for(let i=6;i<t.length;i+=6)isNaN(t[i])?r.push(`L${t[i+4]} ${t[i+5]}`):r.push(`C${t[i]} ${t[i+1]} ${t[i+2]} ${t[i+3]} ${t[i+4]} ${t[i+5]}`);I(this,en,BR).call(this,r);for(let i=e.length-6;i>=6;i-=6)isNaN(e[i])?r.push(`L${e[i+4]} ${e[i+5]}`):r.push(`C${e[i]} ${e[i+1]} ${e[i+2]} ${e[i+3]} ${e[i+4]} ${e[i+5]}`);return I(this,en,bR).call(this,r),r.join(" ")}newFreeDrawOutline(t,e,r,i,s,A){return new B3(t,e,r,i,s,A)}getOutlines(){var u;const t=c(this,No),e=c(this,Ka),r=c(this,We),[i,s,A,a]=c(this,BA),o=new Float32Array((((u=c(this,Ph))==null?void 0:u.length)??0)+2);for(let d=0,f=o.length-2;d<f;d+=2)o[d]=(c(this,Ph)[d]-i)/A,o[d+1]=(c(this,Ph)[d+1]-s)/a;if(o[o.length-2]=(c(this,Wf)-i)/A,o[o.length-1]=(c(this,zf)-s)/a,isNaN(r[6])&&!this.isEmpty())return I(this,en,CR).call(this,o);const l=new Float32Array(c(this,No).length+24+c(this,Ka).length);let h=t.length;for(let d=0;d<h;d+=2){if(isNaN(t[d])){l[d]=l[d+1]=NaN;continue}l[d]=t[d],l[d+1]=t[d+1]}h=I(this,en,ER).call(this,l,h);for(let d=e.length-6;d>=6;d-=6)for(let f=0;f<6;f+=2){if(isNaN(e[d+f])){l[h]=l[h+1]=NaN,h+=2;continue}l[h]=e[d+f],l[h+1]=e[d+f+1],h+=2}return I(this,en,xR).call(this,l,h),this.newFreeDrawOutline(l,o,c(this,BA),c(this,Kp),c(this,Rp),c(this,Hp))}};BA=new WeakMap,Ka=new WeakMap,Rp=new WeakMap,Hp=new WeakMap,No=new WeakMap,We=new WeakMap,Wf=new WeakMap,zf=new WeakMap,N1=new WeakMap,P1=new WeakMap,Kp=new WeakMap,Vp=new WeakMap,Ph=new WeakMap,M1=new WeakMap,gB=new WeakMap,pB=new WeakMap,en=new WeakSet,kw=function(){const t=c(this,We).subarray(4,6),e=c(this,We).subarray(16,18),[r,i,s,A]=c(this,BA);return[(c(this,Wf)+(t[0]-e[0])/2-r)/s,(c(this,zf)+(t[1]-e[1])/2-i)/A,(c(this,Wf)+(e[0]-t[0])/2-r)/s,(c(this,zf)+(e[1]-t[1])/2-i)/A]},yR=function(){const[t,e,r,i]=c(this,BA),[s,A,a,o]=I(this,en,kw).call(this);return`M${(c(this,We)[2]-t)/r} ${(c(this,We)[3]-e)/i} L${(c(this,We)[4]-t)/r} ${(c(this,We)[5]-e)/i} L${s} ${A} L${a} ${o} L${(c(this,We)[16]-t)/r} ${(c(this,We)[17]-e)/i} L${(c(this,We)[14]-t)/r} ${(c(this,We)[15]-e)/i} Z`},bR=function(t){const e=c(this,Ka);t.push(`L${e[4]} ${e[5]} Z`)},BR=function(t){const[e,r,i,s]=c(this,BA),A=c(this,We).subarray(4,6),a=c(this,We).subarray(16,18),[o,l,h,u]=I(this,en,kw).call(this);t.push(`L${(A[0]-e)/i} ${(A[1]-r)/s} L${o} ${l} L${h} ${u} L${(a[0]-e)/i} ${(a[1]-r)/s}`)},CR=function(t){const e=c(this,We),[r,i,s,A]=c(this,BA),[a,o,l,h]=I(this,en,kw).call(this),u=new Float32Array(36);return u.set([NaN,NaN,NaN,NaN,(e[2]-r)/s,(e[3]-i)/A,NaN,NaN,NaN,NaN,(e[4]-r)/s,(e[5]-i)/A,NaN,NaN,NaN,NaN,a,o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,(e[16]-r)/s,(e[17]-i)/A,NaN,NaN,NaN,NaN,(e[14]-r)/s,(e[15]-i)/A],0),this.newFreeDrawOutline(u,t,c(this,BA),c(this,Kp),c(this,Rp),c(this,Hp))},xR=function(t,e){const r=c(this,Ka);return t.set([NaN,NaN,NaN,NaN,r[4],r[5]],e),e+=6},ER=function(t,e){const r=c(this,We).subarray(4,6),i=c(this,We).subarray(16,18),[s,A,a,o]=c(this,BA),[l,h,u,d]=I(this,en,kw).call(this);return t.set([NaN,NaN,NaN,NaN,(r[0]-s)/a,(r[1]-A)/o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,u,d,NaN,NaN,NaN,NaN,(i[0]-s)/a,(i[1]-A)/o],e),e+=24},T(ec,M1,8),T(ec,gB,2),T(ec,pB,c(ec,M1)+c(ec,gB));let $2=ec;class B3 extends Wt{constructor(e,r,i,s,A,a){super();T(this,mB);T(this,Gp);T(this,Xf,new Float32Array(4));T(this,rc);T(this,k1);T(this,CA);T(this,O1);T(this,Pi);C(this,Pi,e),C(this,CA,r),C(this,Gp,i),C(this,O1,s),C(this,rc,A),C(this,k1,a),this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],I(this,mB,SR).call(this,a);const[o,l,h,u]=c(this,Xf);for(let d=0,f=e.length;d<f;d+=2)e[d]=(e[d]-o)/h,e[d+1]=(e[d+1]-l)/u;for(let d=0,f=r.length;d<f;d+=2)r[d]=(r[d]-o)/h,r[d+1]=(r[d+1]-l)/u}toSVGPath(){const e=[`M${c(this,Pi)[4]} ${c(this,Pi)[5]}`];for(let r=6,i=c(this,Pi).length;r<i;r+=6){if(isNaN(c(this,Pi)[r])){e.push(`L${c(this,Pi)[r+4]} ${c(this,Pi)[r+5]}`);continue}e.push(`C${c(this,Pi)[r]} ${c(this,Pi)[r+1]} ${c(this,Pi)[r+2]} ${c(this,Pi)[r+3]} ${c(this,Pi)[r+4]} ${c(this,Pi)[r+5]}`)}return e.push("Z"),e.join(" ")}serialize([e,r,i,s],A){const a=i-e,o=s-r;let l,h;switch(A){case 0:l=Wt._rescale(c(this,Pi),e,s,a,-o),h=Wt._rescale(c(this,CA),e,s,a,-o);break;case 90:l=Wt._rescaleAndSwap(c(this,Pi),e,r,a,o),h=Wt._rescaleAndSwap(c(this,CA),e,r,a,o);break;case 180:l=Wt._rescale(c(this,Pi),i,r,-a,o),h=Wt._rescale(c(this,CA),i,r,-a,o);break;case 270:l=Wt._rescaleAndSwap(c(this,Pi),i,s,-a,-o),h=Wt._rescaleAndSwap(c(this,CA),i,s,-a,-o);break}return{outline:Array.from(l),points:[Array.from(h)]}}get box(){return c(this,Xf)}newOutliner(e,r,i,s,A,a=0){return new $2(e,r,i,s,A,a)}getNewOutline(e,r){const[i,s,A,a]=c(this,Xf),[o,l,h,u]=c(this,Gp),d=A*h,f=a*u,p=i*h+o,m=s*u+l,y=this.newOutliner({x:c(this,CA)[0]*d+p,y:c(this,CA)[1]*f+m},c(this,Gp),c(this,O1),e,c(this,k1),r??c(this,rc));for(let w=2;w<c(this,CA).length;w+=2)y.add({x:c(this,CA)[w]*d+p,y:c(this,CA)[w+1]*f+m});return y.getOutlines()}}Gp=new WeakMap,Xf=new WeakMap,rc=new WeakMap,k1=new WeakMap,CA=new WeakMap,O1=new WeakMap,Pi=new WeakMap,mB=new WeakSet,SR=function(e){const r=c(this,Pi);let i=r[4],s=r[5];const A=[i,s,i,s];let a=i,o=s,l=i,h=s;const u=e?Math.max:Math.min,d=new Float32Array(4);for(let p=6,m=r.length;p<m;p+=6){const y=r[p+4],w=r[p+5];isNaN(r[p])?(Qt.pointBoundingBox(y,w,A),o>w?(a=y,o=w):o===w&&(a=u(a,y)),h<w?(l=y,h=w):h===w&&(l=u(l,y))):(d.set(il,0),Qt.bezierBoundingBox(i,s,...r.slice(p,p+6),d),Qt.rectBoundingBox(...d,A),o>d[1]?(a=d[0],o=d[1]):o===d[1]&&(a=u(a,d[0])),h<d[3]?(l=d[2],h=d[3]):h===d[3]&&(l=u(l,d[2]))),i=y,s=w}const f=c(this,Xf);f[0]=A[0]-c(this,rc),f[1]=A[1]-c(this,rc),f[2]=A[2]-A[0]+2*c(this,rc),f[3]=A[3]-A[1]+2*c(this,rc),this.firstPoint=[a,o],this.lastPoint=[l,h]};class ax{constructor(t,e=0,r=0,i=!0){T(this,xs);T(this,D1);T(this,R1);T(this,H1);T(this,Mh,[]);T(this,Va,[]);const s=il.slice(),A=10**-4;for(const{x:m,y,width:w,height:B}of t){const E=Math.floor((m-e)/A)*A,S=Math.ceil((m+w+e)/A)*A,_=Math.floor((y-e)/A)*A,L=Math.ceil((y+B+e)/A)*A,k=[E,_,L,!0],H=[S,_,L,!1];c(this,Mh).push(k,H),Qt.rectBoundingBox(E,_,S,L,s)}const a=s[2]-s[0]+2*r,o=s[3]-s[1]+2*r,l=s[0]-r,h=s[1]-r;let u=i?-1/0:1/0,d=1/0;const f=c(this,Mh).at(i?-1:-2),p=[f[0],f[2]];for(const m of c(this,Mh)){const[y,w,B,E]=m;!E&&i?w<d?(d=w,u=y):w===d&&(u=Math.max(u,y)):E&&!i&&(w<d?(d=w,u=y):w===d&&(u=Math.min(u,y))),m[0]=(y-l)/a,m[1]=(w-h)/o,m[2]=(B-h)/o}C(this,D1,new Float32Array([l,h,a,o])),C(this,R1,[u,d]),C(this,H1,p)}getOutlines(){c(this,Mh).sort((e,r)=>e[0]-r[0]||e[1]-r[1]||e[2]-r[2]);const t=[];for(const e of c(this,Mh))e[3]?(t.push(...I(this,xs,fT).call(this,e)),I(this,xs,TR).call(this,e)):(I(this,xs,_R).call(this,e),t.push(...I(this,xs,fT).call(this,e)));return I(this,xs,FR).call(this,t)}}D1=new WeakMap,R1=new WeakMap,H1=new WeakMap,Mh=new WeakMap,Va=new WeakMap,xs=new WeakSet,FR=function(t){const e=[],r=new Set;for(const A of t){const[a,o,l]=A;e.push([a,o,A],[a,l,A])}e.sort((A,a)=>A[1]-a[1]||A[0]-a[0]);for(let A=0,a=e.length;A<a;A+=2){const o=e[A][2],l=e[A+1][2];o.push(l),l.push(o),r.add(o),r.add(l)}const i=[];let s;for(;r.size>0;){const A=r.values().next().value;let[a,o,l,h,u]=A;r.delete(A);let d=a,f=o;for(s=[a,l],i.push(s);;){let p;if(r.has(h))p=h;else if(r.has(u))p=u;else break;r.delete(p),[a,o,l,h,u]=p,d!==a&&(s.push(d,f,a,f===o?o:l),d=a),f=f===o?l:o}s.push(d,f)}return new M9(i,c(this,D1),c(this,R1),c(this,H1))},vC=function(t){const e=c(this,Va);let r=0,i=e.length-1;for(;r<=i;){const s=r+i>>1,A=e[s][0];if(A===t)return s;A<t?r=s+1:i=s-1}return i+1},TR=function([,t,e]){const r=I(this,xs,vC).call(this,t);c(this,Va).splice(r,0,[t,e])},_R=function([,t,e]){const r=I(this,xs,vC).call(this,t);for(let i=r;i<c(this,Va).length;i++){const[s,A]=c(this,Va)[i];if(s!==t)break;if(s===t&&A===e){c(this,Va).splice(i,1);return}}for(let i=r-1;i>=0;i--){const[s,A]=c(this,Va)[i];if(s!==t)break;if(s===t&&A===e){c(this,Va).splice(i,1);return}}},fT=function(t){const[e,r,i]=t,s=[[e,r,i]],A=I(this,xs,vC).call(this,i);for(let a=0;a<A;a++){const[o,l]=c(this,Va)[a];for(let h=0,u=s.length;h<u;h++){const[,d,f]=s[h];if(!(l<=d||f<=o)){if(d>=o){if(f>l)s[h][1]=l;else{if(u===1)return[];s.splice(h,1),h--,u--}continue}s[h][2]=o,f>l&&s.push([e,l,f])}}}return s};class M9 extends Wt{constructor(e,r,i,s){super();T(this,K1);T(this,jp);C(this,jp,e),C(this,K1,r),this.firstPoint=i,this.lastPoint=s}toSVGPath(){const e=[];for(const r of c(this,jp)){let[i,s]=r;e.push(`M${i} ${s}`);for(let A=2;A<r.length;A+=2){const a=r[A],o=r[A+1];a===i?(e.push(`V${o}`),s=o):o===s&&(e.push(`H${a}`),i=a)}e.push("Z")}return e.join(" ")}serialize([e,r,i,s],A){const a=[],o=i-e,l=s-r;for(const h of c(this,jp)){const u=new Array(h.length);for(let d=0;d<h.length;d+=2)u[d]=e+h[d]*o,u[d+1]=s-h[d+1]*l;a.push(u)}return a}get box(){return c(this,K1)}get classNamesForOutlining(){return["highlightOutline"]}}K1=new WeakMap,jp=new WeakMap;class ox extends $2{newFreeDrawOutline(t,e,r,i,s,A){return new k9(t,e,r,i,s,A)}}class k9 extends B3{newOutliner(t,e,r,i,s,A=0){return new ox(t,e,r,i,s,A)}}const or=class or extends Mr{constructor(e){super({...e,name:"highlightEditor"});T(this,Re);T(this,$p,null);T(this,V1,0);T(this,ic);T(this,qf,null);T(this,G1,null);T(this,$s,null);T(this,j1,null);T(this,$1,0);T(this,Yf,null);T(this,xA,null);T(this,EA,null);T(this,Mn,!1);T(this,Wp,null);T(this,zp,null);T(this,ns,null);T(this,Xp,"");T(this,Aa);T(this,W1,"");this.color=e.color||or._defaultColor,C(this,Aa,e.thickness||or._defaultThickness),this.opacity=e.opacity||or._defaultOpacity,C(this,ic,e.boxes||null),C(this,W1,e.methodOfCreation||""),C(this,Xp,e.text||""),this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",e.highlightId>-1?(C(this,Mn,!0),I(this,Re,wC).call(this,e),I(this,Re,Id).call(this)):c(this,ic)&&(C(this,$p,e.anchorNode),C(this,V1,e.anchorOffset),C(this,j1,e.focusNode),C(this,$1,e.focusOffset),I(this,Re,dT).call(this),I(this,Re,Id).call(this),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}static get _keyboardManager(){const e=or.prototype;return Se(this,"_keyboardManager",new lm([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:c(this,Mn)?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:c(this,Aa),methodOfCreation:c(this,W1)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}static initialize(e,r){var i;Mr.initialize(e,r),or._defaultColor||(or._defaultColor=((i=r.highlightColors)==null?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(e,r){switch(e){case Ie.HIGHLIGHT_COLOR:or._defaultColor=r;break;case Ie.HIGHLIGHT_THICKNESS:or._defaultThickness=r;break}}translateInPage(e,r){}get toolbarPosition(){return c(this,zp)}get commentButtonPosition(){return c(this,Wp)}updateParams(e,r){switch(e){case Ie.HIGHLIGHT_COLOR:I(this,Re,IR).call(this,r);break;case Ie.HIGHLIGHT_THICKNESS:I(this,Re,UR).call(this,r);break}}static get defaultPropertiesToUpdate(){return[[Ie.HIGHLIGHT_COLOR,or._defaultColor],[Ie.HIGHLIGHT_THICKNESS,or._defaultThickness]]}get propertiesToUpdate(){return[[Ie.HIGHLIGHT_COLOR,this.color||or._defaultColor],[Ie.HIGHLIGHT_THICKNESS,c(this,Aa)||or._defaultThickness],[Ie.HIGHLIGHT_FREE,c(this,Mn)]]}onUpdatedColor(){var e,r;(e=this.parent)==null||e.drawLayer.updateProperties(c(this,EA),{root:{fill:this.color,"fill-opacity":this.opacity}}),(r=c(this,G1))==null||r.updateColor(this.color),super.onUpdatedColor()}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",C(this,G1,new pm({editor:this}))]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(I(this,Re,bC).call(this))}getBaseTranslation(){return[0,0]}getRect(e,r){return super.getRect(e,r,I(this,Re,bC).call(this))}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){I(this,Re,gT).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(I(this,Re,Id).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let r=!1;this.parent&&!e?I(this,Re,gT).call(this):e&&(I(this,Re,Id).call(this,e),r=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),r&&this.select()}rotate(e){var s,A,a;const{drawLayer:r}=this.parent;let i;c(this,Mn)?(e=(e-this.rotation+360)%360,i=I(s=or,aa,Q0).call(s,c(this,xA).box,e)):i=I(A=or,aa,Q0).call(A,[this.x,this.y,this.width,this.height],e),r.updateProperties(c(this,EA),{bbox:i,root:{"data-main-rotation":e}}),r.updateProperties(c(this,ns),{bbox:I(a=or,aa,Q0).call(a,c(this,$s).box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;const e=super.render();c(this,Xp)&&(e.setAttribute("aria-label",c(this,Xp)),e.setAttribute("role","mark")),c(this,Mn)?e.classList.add("free"):this.div.addEventListener("keydown",I(this,Re,QR).bind(this),{signal:this._uiManager._signal});const r=C(this,Yf,document.createElement("div"));return e.append(r),r.setAttribute("aria-hidden","true"),r.className="internal",r.style.clipPath=c(this,qf),this.setDims(),UU(this,c(this,Yf),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(c(this,ns),{rootClass:{hovered:!0}})}pointerleave(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(c(this,ns),{rootClass:{hovered:!1}})}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:I(this,Re,yC).call(this,!0);break;case 1:case 3:I(this,Re,yC).call(this,!1);break}}select(){var e;super.select(),c(this,ns)&&((e=this.parent)==null||e.drawLayer.updateProperties(c(this,ns),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var e;super.unselect(),c(this,ns)&&((e=this.parent)==null||e.drawLayer.updateProperties(c(this,ns),{rootClass:{selected:!1}}),c(this,Mn)||I(this,Re,yC).call(this,!1))}get _mustFixPosition(){return!c(this,Mn)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(c(this,EA),{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(c(this,ns),{rootClass:{hidden:!e}}))}static startHighlighting(e,r,{target:i,x:s,y:A}){const{x:a,y:o,width:l,height:h}=i.getBoundingClientRect(),u=new AbortController,d=e.combinedSignal(u),f=p=>{u.abort(),I(this,aa,kR).call(this,e,p)};window.addEventListener("blur",f,{signal:d}),window.addEventListener("pointerup",f,{signal:d}),window.addEventListener("pointerdown",Jr,{capture:!0,passive:!1,signal:d}),window.addEventListener("contextmenu",nA,{signal:d}),i.addEventListener("pointermove",I(this,aa,MR).bind(this,e),{signal:d}),this._freeHighlight=new ox({x:s,y:A},[a,o,l,h],e.scale,this._defaultThickness/2,r,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static async deserialize(e,r,i){var y,w,B,E;let s=null;if(e instanceof y3){const{data:{quadPoints:S,rect:_,rotation:L,id:k,color:H,opacity:Q,popupRef:W,richText:U,contentsObj:D,creationDate:j,modificationDate:V},parent:{page:{pageNumber:st}}}=e;s=e={annotationType:Be.HIGHLIGHT,color:Array.from(H),opacity:Q,quadPoints:S,boxes:null,pageIndex:st-1,rect:_.slice(0),rotation:L,annotationElementId:k,id:k,deleted:!1,popupRef:W,richText:U,comment:(D==null?void 0:D.str)||null,creationDate:j,modificationDate:V}}else if(e instanceof sx){const{data:{inkLists:S,rect:_,rotation:L,id:k,color:H,borderStyle:{rawWidth:Q},popupRef:W,richText:U,contentsObj:D,creationDate:j,modificationDate:V},parent:{page:{pageNumber:st}}}=e;s=e={annotationType:Be.HIGHLIGHT,color:Array.from(H),thickness:Q,inkLists:S,boxes:null,pageIndex:st-1,rect:_.slice(0),rotation:L,annotationElementId:k,id:k,deleted:!1,popupRef:W,richText:U,comment:(D==null?void 0:D.str)||null,creationDate:j,modificationDate:V}}const{color:A,quadPoints:a,inkLists:o,outlines:l,opacity:h}=e,u=await super.deserialize(e,r,i);u.color=Qt.makeHexColor(...A),u.opacity=h||1,o&&C(u,Aa,e.thickness),u._initialData=s,e.comment&&u.setCommentData(e);const[d,f]=u.pageDimensions,[p,m]=u.pageTranslation;if(a){const S=C(u,ic,[]);for(let _=0;_<a.length;_+=8)S.push({x:(a[_]-p)/d,y:1-(a[_+1]-m)/f,width:(a[_+2]-a[_])/d,height:(a[_+1]-a[_+5])/f});I(y=u,Re,dT).call(y),I(w=u,Re,Id).call(w),u.rotate(u.rotation)}else if(o||l){C(u,Mn,!0);const S=(o||l.points)[0],_={x:S[0]-p,y:f-(S[1]-m)},L=new ox(_,[0,0,d,f],1,c(u,Aa)/2,!0,.001);for(let Q=0,W=S.length;Q<W;Q+=2)_.x=S[Q]-p,_.y=f-(S[Q+1]-m),L.add(_);const{id:k,clipPathId:H}=r.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:u.color,"fill-opacity":u._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:L.toSVGPath()}},!0,!0);I(B=u,Re,wC).call(B,{highlightOutlines:L.getOutlines(),highlightId:k,clipPathId:H}),I(E=u,Re,Id).call(E),u.rotate(u.parentRotation)}return u}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();const r=Mr._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),i=super.serialize(e);return Object.assign(i,{color:r,opacity:this.opacity,thickness:c(this,Aa),quadPoints:I(this,Re,NR).call(this),outlines:I(this,Re,PR).call(this,i.rect)}),this.addComment(i),this.annotationElementId&&!I(this,Re,OR).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(e){return this.deleted?(e.hide(),null):(e.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};$p=new WeakMap,V1=new WeakMap,ic=new WeakMap,qf=new WeakMap,G1=new WeakMap,$s=new WeakMap,j1=new WeakMap,$1=new WeakMap,Yf=new WeakMap,xA=new WeakMap,EA=new WeakMap,Mn=new WeakMap,Wp=new WeakMap,zp=new WeakMap,ns=new WeakMap,Xp=new WeakMap,Aa=new WeakMap,W1=new WeakMap,Re=new WeakSet,dT=function(){const e=new ax(c(this,ic),.001);C(this,xA,e.getOutlines()),[this.x,this.y,this.width,this.height]=c(this,xA).box;const r=new ax(c(this,ic),.0025,.001,this._uiManager.direction==="ltr");C(this,$s,r.getOutlines());const{firstPoint:i}=c(this,xA);C(this,Wp,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height]);const{lastPoint:s}=c(this,$s);C(this,zp,[(s[0]-this.x)/this.width,(s[1]-this.y)/this.height])},wC=function({highlightOutlines:e,highlightId:r,clipPathId:i}){var d,f;if(C(this,xA,e),C(this,$s,e.getNewOutline(c(this,Aa)/2+1.5,.0025)),r>=0)C(this,EA,r),C(this,qf,i),this.parent.drawLayer.finalizeDraw(r,{bbox:e.box,path:{d:e.toSVGPath()}}),C(this,ns,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:c(this,$s).box,path:{d:c(this,$s).toSVGPath()}},!0));else if(this.parent){const p=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(c(this,EA),{bbox:I(d=or,aa,Q0).call(d,c(this,xA).box,(p-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(c(this,ns),{bbox:I(f=or,aa,Q0).call(f,c(this,$s).box,p),path:{d:c(this,$s).toSVGPath()}})}const[A,a,o,l]=e.box;switch(this.rotation){case 0:this.x=A,this.y=a,this.width=o,this.height=l;break;case 90:{const[p,m]=this.parentDimensions;this.x=a,this.y=1-A,this.width=o*m/p,this.height=l*p/m;break}case 180:this.x=1-A,this.y=1-a,this.width=o,this.height=l;break;case 270:{const[p,m]=this.parentDimensions;this.x=1-a,this.y=A,this.width=o*m/p,this.height=l*p/m;break}}const{firstPoint:h}=e;C(this,Wp,[(h[0]-A)/o,(h[1]-a)/l]);const{lastPoint:u}=c(this,$s);C(this,zp,[(u[0]-A)/o,(u[1]-a)/l])},IR=function(e){const r=(A,a)=>{this.color=A,this.opacity=a,this.onUpdatedColor()},i=this.color,s=this.opacity;this.addCommands({cmd:r.bind(this,e,or._defaultOpacity),undo:r.bind(this,i,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Ie.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(e)},!0)},UR=function(e){const r=c(this,Aa),i=s=>{C(this,Aa,s),I(this,Re,LR).call(this,s)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Ie.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},LR=function(e){c(this,Mn)&&(I(this,Re,wC).call(this,{highlightOutlines:c(this,xA).getNewOutline(e/2)}),this.fixAndSetPosition(),this.setDims())},gT=function(){c(this,EA)===null||!this.parent||(this.parent.drawLayer.remove(c(this,EA)),C(this,EA,null),this.parent.drawLayer.remove(c(this,ns)),C(this,ns,null))},Id=function(e=this.parent){c(this,EA)===null&&({id:Yi(this,EA)._,clipPathId:Yi(this,qf)._}=e.drawLayer.draw({bbox:c(this,xA).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:c(this,Mn)},path:{d:c(this,xA).toSVGPath()}},!1,!0),C(this,ns,e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:c(this,Mn)},bbox:c(this,$s).box,path:{d:c(this,$s).toSVGPath()}},c(this,Mn))),c(this,Yf)&&(c(this,Yf).style.clipPath=c(this,qf)))},aa=new WeakSet,Q0=function([e,r,i,s],A){switch(A){case 90:return[1-r-s,e,s,i];case 180:return[1-e-i,1-r-s,i,s];case 270:return[r,1-e-i,s,i]}return[e,r,i,s]},QR=function(e){or._keyboardManager.exec(this,e)},yC=function(e){if(!c(this,$p))return;const r=window.getSelection();e?r.setPosition(c(this,$p),c(this,V1)):r.setPosition(c(this,j1),c(this,$1))},bC=function(){return c(this,Mn)?this.rotation:0},NR=function(){if(c(this,Mn))return null;const[e,r]=this.pageDimensions,[i,s]=this.pageTranslation,A=c(this,ic),a=new Float32Array(A.length*8);let o=0;for(const{x:l,y:h,width:u,height:d}of A){const f=l*e+i,p=(1-h)*r+s;a[o]=a[o+4]=f,a[o+1]=a[o+3]=p,a[o+2]=a[o+6]=f+u*e,a[o+5]=a[o+7]=p-d*r,o+=8}return a},PR=function(e){return c(this,xA).serialize(e,I(this,Re,bC).call(this))},MR=function(e,r){this._freeHighlight.add(r)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},kR=function(e,r){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(r,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},OR=function(e){const{color:r}=this._initialData;return this.hasEditedComment||e.color.some((i,s)=>i!==r[s])},T(or,aa),ct(or,"_defaultColor",null),ct(or,"_defaultOpacity",1),ct(or,"_defaultThickness",12),ct(or,"_type","highlight"),ct(or,"_editorType",Be.HIGHLIGHT),ct(or,"_freeHighlightId",-1),ct(or,"_freeHighlight",null),ct(or,"_freeHighlightClipId","");let W2=or;class C3{constructor(){T(this,Jf,Object.create(null))}updateProperty(t,e){this[t]=e,this.updateSVGProperty(t,e)}updateProperties(t){if(t)for(const[e,r]of Object.entries(t))e.startsWith("_")||this.updateProperty(e,r)}updateSVGProperty(t,e){c(this,Jf)[t]=e}toSVGProperties(){const t=c(this,Jf);return C(this,Jf,Object.create(null)),{root:t}}reset(){C(this,Jf,Object.create(null))}updateAll(t=this){this.updateProperties(t)}clone(){lr("Not implemented")}}Jf=new WeakMap;const Xe=class Xe extends Mr{constructor(e){super(e);T(this,rr);T(this,Es,null);T(this,qp);ct(this,"_colorPicker",null);ct(this,"_drawId",null);C(this,qp,e.mustBeCommitted||!1),this._addOutlines(e)}onUpdatedColor(){var e;(e=this._colorPicker)==null||e.update(this.color),super.onUpdatedColor()}onUpdatedOpacity(){var e,r;(r=(e=this._colorPicker)==null?void 0:e.updateOpacity)==null||r.call(e,this.opacity)}_addOutlines(e){e.drawOutlines&&(I(this,rr,pT).call(this,e),I(this,rr,Ow).call(this))}static _mergeSVGProperties(e,r){const i=new Set(Object.keys(e));for(const[s,A]of Object.entries(r))i.has(s)?Object.assign(e[s],A):e[s]=A;return e}static getDefaultDrawingOptions(e){lr("Not implemented")}static get typesMap(){lr("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,r){const i=this.typesMap.get(e);i&&this._defaultDrawingOptions.updateProperty(i,r),this._currentParent&&(c(Xe,mn).updateProperty(i,r),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,r){const i=this.constructor.typesMap.get(e);i&&this._updateProperty(e,i,r)}static get defaultPropertiesToUpdate(){const e=[],r=this._defaultDrawingOptions;for(const[i,s]of this.typesMap)e.push([i,r[s]]);return e}get propertiesToUpdate(){const e=[],{_drawingOptions:r}=this;for(const[i,s]of this.constructor.typesMap)e.push([i,r[s]]);return e}_updateProperty(e,r,i){const s=this._drawingOptions,A=s[r],a=o=>{var h;s.updateProperty(r,o);const l=c(this,Es).updateProperty(r,o);l&&I(this,rr,Dw).call(this,l),(h=this.parent)==null||h.drawLayer.updateProperties(this._drawId,s.toSVGProperties()),e===this.colorType?this.onUpdatedColor():e===this.opacityType&&this.onUpdatedOpacity()};this.addCommands({cmd:a.bind(this,i),undo:a.bind(this,A),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_updateColorAndOpacity(e,r){const i=this.constructor.typesMap.get(this.colorType),s=this.constructor.typesMap.get(this.opacityType),A=this._drawingOptions,a=A[i],o=A[s],l=(h,u)=>{var d;A.updateProperty(i,h),A.updateProperty(s,u),c(this,Es).updateProperty(i,h),c(this,Es).updateProperty(s,u),(d=this.parent)==null||d.drawLayer.updateProperties(this._drawId,A.toSVGProperties()),this.onUpdatedColor(),this.onUpdatedOpacity()};this.addCommands({cmd:l.bind(this,e,r),undo:l.bind(this,a,o),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Ie.INK_COLOR_AND_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,Xe._mergeSVGProperties(c(this,Es).getPathResizingSVGProperties(I(this,rr,BC).call(this)),{bbox:I(this,rr,N0).call(this)}))}_onResized(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,Xe._mergeSVGProperties(c(this,Es).getPathResizedSVGProperties(I(this,rr,BC).call(this)),{bbox:I(this,rr,N0).call(this)}))}_onTranslating(e,r){var i;(i=this.parent)==null||i.drawLayer.updateProperties(this._drawId,{bbox:I(this,rr,N0).call(this)})}_onTranslated(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,Xe._mergeSVGProperties(c(this,Es).getPathTranslatedSVGProperties(I(this,rr,BC).call(this),this.parentDimensions),{bbox:I(this,rr,N0).call(this)}))}_onStartDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,c(this,qp)&&(C(this,qp,!1),this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){I(this,rr,vT).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(I(this,rr,Ow).call(this),I(this,rr,Dw).call(this,c(this,Es).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let r=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),I(this,rr,vT).call(this)):e&&(this._uiManager.addShouldRescale(this),I(this,rr,Ow).call(this,e),r=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),r&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,Xe._mergeSVGProperties({bbox:I(this,rr,N0).call(this)},c(this,Es).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&I(this,rr,Dw).call(this,c(this,Es).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let e,r;this._isCopy&&(e=this.x,r=this.y);const i=super.render();i.classList.add("draw");const s=document.createElement("div");return i.append(s),s.setAttribute("aria-hidden","true"),s.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(e,r),i}static createDrawerInstance(e,r,i,s,A){lr("Not implemented")}static startDrawing(e,r,i,s){var y;const{target:A,offsetX:a,offsetY:o,pointerId:l,pointerType:h}=s;if(zn.isInitializedAndDifferentPointerType(h))return;const{viewport:{rotation:u}}=e,{width:d,height:f}=A.getBoundingClientRect(),p=C(Xe,Zf,new AbortController),m=e.combinedSignal(p);if(zn.setPointer(h,l),window.addEventListener("pointerup",w=>{zn.isSamePointerIdOrRemove(w.pointerId)&&this._endDraw(w)},{signal:m}),window.addEventListener("pointercancel",w=>{zn.isSamePointerIdOrRemove(w.pointerId)&&this._currentParent.endDrawingSession()},{signal:m}),window.addEventListener("pointerdown",w=>{zn.isSamePointerType(w.pointerType)&&(zn.initializeAndAddPointerId(w.pointerId),c(Xe,mn).isCancellable()&&(c(Xe,mn).removeLastElement(),c(Xe,mn).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:m}),window.addEventListener("contextmenu",nA,{signal:m}),A.addEventListener("pointermove",this._drawMove.bind(this),{signal:m}),A.addEventListener("touchmove",w=>{zn.isSameTimeStamp(w.timeStamp)&&Jr(w)},{signal:m}),e.toggleDrawing(),(y=r._editorUndoBar)==null||y.hide(),c(Xe,mn)){e.drawLayer.updateProperties(this._currentDrawId,c(Xe,mn).startNew(a,o,d,f,u));return}r.updateUIForDefaultProperties(this),C(Xe,mn,this.createDrawerInstance(a,o,d,f,u)),C(Xe,td,this.getDefaultDrawingOptions()),this._currentParent=e,{id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties(c(Xe,td).toSVGProperties(),c(Xe,mn).defaultSVGProperties),!0,!1)}static _drawMove(e){if(zn.isSameTimeStamp(e.timeStamp),!c(Xe,mn))return;const{offsetX:r,offsetY:i,pointerId:s}=e;if(zn.isSamePointerId(s)){if(zn.isUsingMultiplePointers()){this._endDraw(e);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,c(Xe,mn).add(r,i)),zn.setTimeStamp(e.timeStamp),Jr(e)}}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,C(Xe,mn,null),C(Xe,td,null),zn.clearTimeStamp()),c(Xe,Zf)&&(c(Xe,Zf).abort(),C(Xe,Zf,null),zn.clearPointerIds())}static _endDraw(e){const r=this._currentParent;if(r){if(r.toggleDrawing(!0),this._cleanup(!1),(e==null?void 0:e.target)===r.div&&r.drawLayer.updateProperties(this._currentDrawId,c(Xe,mn).end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){const i=c(Xe,mn),s=this._currentDrawId,A=i.getLastElement();r.addCommands({cmd:()=>{r.drawLayer.updateProperties(s,i.setLastElement(A))},undo:()=>{r.drawLayer.updateProperties(s,i.removeLastElement())},mustExec:!1,type:Ie.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(e){const r=this._currentParent;if(!r)return null;if(r.toggleDrawing(!0),r.cleanUndoStack(Ie.DRAW_STEP),!c(Xe,mn).isEmpty()){const{pageDimensions:[i,s],scale:A}=r,a=r.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:c(Xe,mn).getOutlines(i*A,s*A,A,this._INNER_MARGIN),drawingOptions:c(Xe,td),mustBeCommitted:!e});return this._cleanup(!0),a}return r.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,r,i,s,A,a){lr("Not implemented")}static async deserialize(e,r,i){var u,d;const{rawDims:{pageWidth:s,pageHeight:A,pageX:a,pageY:o}}=r.viewport,l=this.deserializeDraw(a,o,s,A,this._INNER_MARGIN,e),h=await super.deserialize(e,r,i);return h.createDrawingOptions(e),I(u=h,rr,pT).call(u,{drawOutlines:l}),I(d=h,rr,Ow).call(d),h.onScaleChanging(),h.rotate(),h}serializeDraw(e){const[r,i]=this.pageTranslation,[s,A]=this.pageDimensions;return c(this,Es).serialize([r,i,s,A],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};Es=new WeakMap,qp=new WeakMap,mn=new WeakMap,Zf=new WeakMap,td=new WeakMap,rr=new WeakSet,pT=function({drawOutlines:e,drawId:r,drawingOptions:i}){C(this,Es,e),this._drawingOptions||(this._drawingOptions=i),this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),r>=0?(this._drawId=r,this.parent.drawLayer.finalizeDraw(r,e.defaultProperties)):this._drawId=I(this,rr,mT).call(this,e,this.parent),I(this,rr,Dw).call(this,e.box)},mT=function(e,r){const{id:i}=r.drawLayer.draw(Xe._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return i},vT=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},Ow=function(e=this.parent){if(!(this._drawId!==null&&this.parent===e)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,e.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=I(this,rr,mT).call(this,c(this,Es),e)}},DR=function([e,r,i,s]){const{parentDimensions:[A,a],rotation:o}=this;switch(o){case 90:return[r,1-e,i*(a/A),s*(A/a)];case 180:return[1-e,1-r,i,s];case 270:return[1-r,e,i*(a/A),s*(A/a)];default:return[e,r,i,s]}},BC=function(){const{x:e,y:r,width:i,height:s,parentDimensions:[A,a],rotation:o}=this;switch(o){case 90:return[1-r,e,i*(A/a),s*(a/A)];case 180:return[1-e,1-r,i,s];case 270:return[r,1-e,i*(A/a),s*(a/A)];default:return[e,r,i,s]}},Dw=function(e){[this.x,this.y,this.width,this.height]=I(this,rr,DR).call(this,e),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()},N0=function(){const{x:e,y:r,width:i,height:s,rotation:A,parentRotation:a,parentDimensions:[o,l]}=this;switch((A*4+a)/90){case 1:return[1-r-s,e,s,i];case 2:return[1-e-i,1-r-s,i,s];case 3:return[r,1-e-i,s,i];case 4:return[e,r-i*(o/l),s*(l/o),i*(o/l)];case 5:return[1-r,e,i*(o/l),s*(l/o)];case 6:return[1-e-s*(l/o),1-r,s*(l/o),i*(o/l)];case 7:return[r-i*(o/l),1-e-s*(l/o),i*(o/l),s*(l/o)];case 8:return[e-i,r-s,i,s];case 9:return[1-r,e-i,s,i];case 10:return[1-e,1-r,i,s];case 11:return[r-s,1-e,s,i];case 12:return[e-s*(l/o),r,s*(l/o),i*(o/l)];case 13:return[1-r-i*(o/l),e-s*(l/o),i*(o/l),s*(l/o)];case 14:return[1-e,1-r-i*(o/l),s*(l/o),i*(o/l)];case 15:return[r,1-e,i*(o/l),s*(l/o)];default:return[e,r,i,s]}},ct(Xe,"_currentDrawId",-1),ct(Xe,"_currentParent",null),T(Xe,mn,null),T(Xe,Zf,null),T(Xe,td,null),ct(Xe,"_INNER_MARGIN",3);let z2=Xe;class O9{constructor(t,e,r,i,s,A){T(this,Jp);T(this,Po,new Float64Array(6));T(this,vn);T(this,wn);T(this,ed);T(this,Yp);T(this,Ss);T(this,kn,"");T(this,oa,0);T(this,rd,new wm);T(this,id);T(this,nd);C(this,id,r),C(this,nd,i),C(this,ed,s),C(this,Yp,A),[t,e]=I(this,Jp,CC).call(this,t,e);const a=C(this,vn,[NaN,NaN,NaN,NaN,t,e]);C(this,Ss,[t,e]),C(this,wn,[{line:a,points:c(this,Ss)}]),c(this,Po).set(a,0)}updateProperty(t,e){t==="stroke-width"&&C(this,Yp,e)}isEmpty(){return!c(this,wn)||c(this,wn).length===0}isCancellable(){return c(this,Ss).length<=10}add(t,e){[t,e]=I(this,Jp,CC).call(this,t,e);const[r,i,s,A]=c(this,Po).subarray(2,6),a=t-s,o=e-A;return Math.hypot(c(this,id)*a,c(this,nd)*o)<=2?null:(c(this,Ss).push(t,e),isNaN(r)?(c(this,Po).set([s,A,t,e],2),c(this,vn).push(NaN,NaN,NaN,NaN,t,e),{path:{d:this.toSVGPath()}}):(isNaN(c(this,Po)[0])&&c(this,vn).splice(6,6),c(this,Po).set([r,i,s,A,t,e],0),c(this,vn).push(...Wt.createBezierPoints(r,i,s,A,t,e)),{path:{d:this.toSVGPath()}}))}end(t,e){const r=this.add(t,e);return r||(c(this,Ss).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,e,r,i,s){C(this,id,r),C(this,nd,i),C(this,ed,s),[t,e]=I(this,Jp,CC).call(this,t,e);const A=C(this,vn,[NaN,NaN,NaN,NaN,t,e]);C(this,Ss,[t,e]);const a=c(this,wn).at(-1);return a&&(a.line=new Float32Array(a.line),a.points=new Float32Array(a.points)),c(this,wn).push({line:A,points:c(this,Ss)}),c(this,Po).set(A,0),C(this,oa,0),this.toSVGPath(),null}getLastElement(){return c(this,wn).at(-1)}setLastElement(t){return c(this,wn)?(c(this,wn).push(t),C(this,vn,t.line),C(this,Ss,t.points),C(this,oa,0),{path:{d:this.toSVGPath()}}):c(this,rd).setLastElement(t)}removeLastElement(){if(!c(this,wn))return c(this,rd).removeLastElement();c(this,wn).pop(),C(this,kn,"");for(let t=0,e=c(this,wn).length;t<e;t++){const{line:r,points:i}=c(this,wn)[t];C(this,vn,r),C(this,Ss,i),C(this,oa,0),this.toSVGPath()}return{path:{d:c(this,kn)}}}toSVGPath(){const t=Wt.svgRound(c(this,vn)[4]),e=Wt.svgRound(c(this,vn)[5]);if(c(this,Ss).length===2)return C(this,kn,`${c(this,kn)} M ${t} ${e} Z`),c(this,kn);if(c(this,Ss).length<=6){const i=c(this,kn).lastIndexOf("M");C(this,kn,`${c(this,kn).slice(0,i)} M ${t} ${e}`),C(this,oa,6)}if(c(this,Ss).length===4){const i=Wt.svgRound(c(this,vn)[10]),s=Wt.svgRound(c(this,vn)[11]);return C(this,kn,`${c(this,kn)} L ${i} ${s}`),C(this,oa,12),c(this,kn)}const r=[];c(this,oa)===0&&(r.push(`M ${t} ${e}`),C(this,oa,6));for(let i=c(this,oa),s=c(this,vn).length;i<s;i+=6){const[A,a,o,l,h,u]=c(this,vn).slice(i,i+6).map(Wt.svgRound);r.push(`C${A} ${a} ${o} ${l} ${h} ${u}`)}return C(this,kn,c(this,kn)+r.join(" ")),C(this,oa,c(this,vn).length),c(this,kn)}getOutlines(t,e,r,i){const s=c(this,wn).at(-1);return s.line=new Float32Array(s.line),s.points=new Float32Array(s.points),c(this,rd).build(c(this,wn),t,e,r,c(this,ed),c(this,Yp),i),C(this,Po,null),C(this,vn,null),C(this,wn,null),C(this,kn,null),c(this,rd)}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}Po=new WeakMap,vn=new WeakMap,wn=new WeakMap,ed=new WeakMap,Yp=new WeakMap,Ss=new WeakMap,kn=new WeakMap,oa=new WeakMap,rd=new WeakMap,id=new WeakMap,nd=new WeakMap,Jp=new WeakSet,CC=function(t,e){return Wt._normalizePoint(t,e,c(this,id),c(this,nd),c(this,ed))};class wm extends Wt{constructor(){super(...arguments);T(this,On);T(this,Fs);T(this,z1,0);T(this,X1);T(this,SA);T(this,Mo);T(this,ko);T(this,Zp);T(this,t0);T(this,sd)}build(e,r,i,s,A,a,o){C(this,Mo,r),C(this,ko,i),C(this,Zp,s),C(this,t0,A),C(this,sd,a),C(this,X1,o??0),C(this,SA,e),I(this,On,HR).call(this)}get thickness(){return c(this,sd)}setLastElement(e){return c(this,SA).push(e),{path:{d:this.toSVGPath()}}}removeLastElement(){return c(this,SA).pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const e=[];for(const{line:r}of c(this,SA)){if(e.push(`M${Wt.svgRound(r[4])} ${Wt.svgRound(r[5])}`),r.length===6){e.push("Z");continue}if(r.length===12&&isNaN(r[6])){e.push(`L${Wt.svgRound(r[10])} ${Wt.svgRound(r[11])}`);continue}for(let i=6,s=r.length;i<s;i+=6){const[A,a,o,l,h,u]=r.subarray(i,i+6).map(Wt.svgRound);e.push(`C${A} ${a} ${o} ${l} ${h} ${u}`)}}return e.join("")}serialize([e,r,i,s],A){const a=[],o=[],[l,h,u,d]=I(this,On,RR).call(this);let f,p,m,y,w,B,E,S,_;switch(c(this,t0)){case 0:_=Wt._rescale,f=e,p=r+s,m=i,y=-s,w=e+l*i,B=r+(1-h-d)*s,E=e+(l+u)*i,S=r+(1-h)*s;break;case 90:_=Wt._rescaleAndSwap,f=e,p=r,m=i,y=s,w=e+h*i,B=r+l*s,E=e+(h+d)*i,S=r+(l+u)*s;break;case 180:_=Wt._rescale,f=e+i,p=r,m=-i,y=s,w=e+(1-l-u)*i,B=r+h*s,E=e+(1-l)*i,S=r+(h+d)*s;break;case 270:_=Wt._rescaleAndSwap,f=e+i,p=r+s,m=-i,y=-s,w=e+(1-h-d)*i,B=r+(1-l-u)*s,E=e+(1-h)*i,S=r+(1-l)*s;break}for(const{line:L,points:k}of c(this,SA))a.push(_(L,f,p,m,y,A?new Array(L.length):null)),o.push(_(k,f,p,m,y,A?new Array(k.length):null));return{lines:a,points:o,rect:[w,B,E,S]}}static deserialize(e,r,i,s,A,{paths:{lines:a,points:o},rotation:l,thickness:h}){const u=[];let d,f,p,m,y;switch(l){case 0:y=Wt._rescale,d=-e/i,f=r/s+1,p=1/i,m=-1/s;break;case 90:y=Wt._rescaleAndSwap,d=-r/s,f=-e/i,p=1/s,m=1/i;break;case 180:y=Wt._rescale,d=e/i+1,f=-r/s,p=-1/i,m=1/s;break;case 270:y=Wt._rescaleAndSwap,d=r/s+1,f=e/i+1,p=-1/s,m=-1/i;break}if(!a){a=[];for(const B of o){const E=B.length;if(E===2){a.push(new Float32Array([NaN,NaN,NaN,NaN,B[0],B[1]]));continue}if(E===4){a.push(new Float32Array([NaN,NaN,NaN,NaN,B[0],B[1],NaN,NaN,NaN,NaN,B[2],B[3]]));continue}const S=new Float32Array(3*(E-2));a.push(S);let[_,L,k,H]=B.subarray(0,4);S.set([NaN,NaN,NaN,NaN,_,L],0);for(let Q=4;Q<E;Q+=2){const W=B[Q],U=B[Q+1];S.set(Wt.createBezierPoints(_,L,k,H,W,U),(Q-2)*3),[_,L,k,H]=[k,H,W,U]}}}for(let B=0,E=a.length;B<E;B++)u.push({line:y(a[B].map(S=>S??NaN),d,f,p,m),points:y(o[B].map(S=>S??NaN),d,f,p,m)});const w=new this.prototype.constructor;return w.build(u,i,s,1,l,h,A),w}get box(){return c(this,Fs)}updateProperty(e,r){return e==="stroke-width"?I(this,On,KR).call(this,r):null}updateParentDimensions([e,r],i){const[s,A]=I(this,On,xc).call(this);C(this,Mo,e),C(this,ko,r),C(this,Zp,i);const[a,o]=I(this,On,xc).call(this),l=a-s,h=o-A,u=c(this,Fs);return u[0]-=l,u[1]-=h,u[2]+=2*l,u[3]+=2*h,u}updateRotation(e){return C(this,z1,e),{path:{transform:this.rotationTransform}}}get viewBox(){return c(this,Fs).map(Wt.svgRound).join(" ")}get defaultProperties(){const[e,r]=c(this,Fs);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Wt.svgRound(e)} ${Wt.svgRound(r)}`}}}get rotationTransform(){const[,,e,r]=c(this,Fs);let i=0,s=0,A=0,a=0,o=0,l=0;switch(c(this,z1)){case 90:s=r/e,A=-e/r,o=e;break;case 180:i=-1,a=-1,o=e,l=r;break;case 270:s=-r/e,A=e/r,l=r;break;default:return""}return`matrix(${i} ${s} ${A} ${a} ${Wt.svgRound(o)} ${Wt.svgRound(l)})`}getPathResizingSVGProperties([e,r,i,s]){const[A,a]=I(this,On,xc).call(this),[o,l,h,u]=c(this,Fs);if(Math.abs(h-A)<=Wt.PRECISION||Math.abs(u-a)<=Wt.PRECISION){const y=e+i/2-(o+h/2),w=r+s/2-(l+u/2);return{path:{"transform-origin":`${Wt.svgRound(e)} ${Wt.svgRound(r)}`,transform:`${this.rotationTransform} translate(${y} ${w})`}}}const d=(i-2*A)/(h-2*A),f=(s-2*a)/(u-2*a),p=h/i,m=u/s;return{path:{"transform-origin":`${Wt.svgRound(o)} ${Wt.svgRound(l)}`,transform:`${this.rotationTransform} scale(${p} ${m}) translate(${Wt.svgRound(A)} ${Wt.svgRound(a)}) scale(${d} ${f}) translate(${Wt.svgRound(-A)} ${Wt.svgRound(-a)})`}}}getPathResizedSVGProperties([e,r,i,s]){const[A,a]=I(this,On,xc).call(this),o=c(this,Fs),[l,h,u,d]=o;if(o[0]=e,o[1]=r,o[2]=i,o[3]=s,Math.abs(u-A)<=Wt.PRECISION||Math.abs(d-a)<=Wt.PRECISION){const w=e+i/2-(l+u/2),B=r+s/2-(h+d/2);for(const{line:E,points:S}of c(this,SA))Wt._translate(E,w,B,E),Wt._translate(S,w,B,S);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Wt.svgRound(e)} ${Wt.svgRound(r)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const f=(i-2*A)/(u-2*A),p=(s-2*a)/(d-2*a),m=-f*(l+A)+e+A,y=-p*(h+a)+r+a;if(f!==1||p!==1||m!==0||y!==0)for(const{line:w,points:B}of c(this,SA))Wt._rescale(w,m,y,f,p,w),Wt._rescale(B,m,y,f,p,B);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Wt.svgRound(e)} ${Wt.svgRound(r)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,r],i){const[s,A]=i,a=c(this,Fs),o=e-a[0],l=r-a[1];if(c(this,Mo)===s&&c(this,ko)===A)for(const{line:h,points:u}of c(this,SA))Wt._translate(h,o,l,h),Wt._translate(u,o,l,u);else{const h=c(this,Mo)/s,u=c(this,ko)/A;C(this,Mo,s),C(this,ko,A);for(const{line:d,points:f}of c(this,SA))Wt._rescale(d,o,l,h,u,d),Wt._rescale(f,o,l,h,u,f);a[2]*=h,a[3]*=u}return a[0]=e,a[1]=r,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${Wt.svgRound(e)} ${Wt.svgRound(r)}`}}}get defaultSVGProperties(){const e=c(this,Fs);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${Wt.svgRound(e[0])} ${Wt.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}}Fs=new WeakMap,z1=new WeakMap,X1=new WeakMap,SA=new WeakMap,Mo=new WeakMap,ko=new WeakMap,Zp=new WeakMap,t0=new WeakMap,sd=new WeakMap,On=new WeakSet,xc=function(e=c(this,sd)){const r=c(this,X1)+e/2*c(this,Zp);return c(this,t0)%180===0?[r/c(this,Mo),r/c(this,ko)]:[r/c(this,ko),r/c(this,Mo)]},RR=function(){const[e,r,i,s]=c(this,Fs),[A,a]=I(this,On,xc).call(this,0);return[e+A,r+a,i-2*A,s-2*a]},HR=function(){const e=C(this,Fs,mu.slice());for(const{line:s}of c(this,SA)){if(s.length<=12){for(let o=4,l=s.length;o<l;o+=6)Qt.pointBoundingBox(s[o],s[o+1],e);continue}let A=s[4],a=s[5];for(let o=6,l=s.length;o<l;o+=6){const[h,u,d,f,p,m]=s.subarray(o,o+6);Qt.bezierBoundingBox(A,a,h,u,d,f,p,m,e),A=p,a=m}}const[r,i]=I(this,On,xc).call(this);e[0]=Gr(e[0]-r,0,1),e[1]=Gr(e[1]-i,0,1),e[2]=Gr(e[2]+r,0,1),e[3]=Gr(e[3]+i,0,1),e[2]-=e[0],e[3]-=e[1]},KR=function(e){const[r,i]=I(this,On,xc).call(this);C(this,sd,e);const[s,A]=I(this,On,xc).call(this),[a,o]=[s-r,A-i],l=c(this,Fs);return l[0]-=a,l[1]-=o,l[2]+=2*a,l[3]+=2*o,l};class X2 extends C3{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:Mr._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,e){t==="stroke-width"&&(e??(e=this["stroke-width"]),e*=this._viewParameters.realScale),super.updateSVGProperty(t,e)}clone(){const t=new X2(this._viewParameters);return t.updateAll(this),t}}const e0=class e0 extends z2{constructor(e){super({...e,name:"inkEditor"});T(this,vB);this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(e,r){Mr.initialize(e,r),this._defaultDrawingOptions=new X2(r.viewParameters)}static getDefaultDrawingOptions(e){const r=this._defaultDrawingOptions.clone();return r.updateProperties(e),r}static get supportMultipleDrawings(){return!0}static get typesMap(){return Se(this,"typesMap",new Map([[Ie.INK_THICKNESS,"stroke-width"],[Ie.INK_COLOR,"stroke"],[Ie.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(e,r,i,s,A){return new O9(e,r,i,s,A,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(e,r,i,s,A,a){return wm.deserialize(e,r,i,s,A,a)}static async deserialize(e,r,i){let s=null;if(e instanceof sx){const{data:{inkLists:a,rect:o,rotation:l,id:h,color:u,opacity:d,borderStyle:{rawWidth:f},popupRef:p,richText:m,contentsObj:y,creationDate:w,modificationDate:B},parent:{page:{pageNumber:E}}}=e;s=e={annotationType:Be.INK,color:Array.from(u),thickness:f,opacity:d,paths:{points:a},boxes:null,pageIndex:E-1,rect:o.slice(0),rotation:l,annotationElementId:h,id:h,deleted:!1,popupRef:p,richText:m,comment:(y==null?void 0:y.str)||null,creationDate:w,modificationDate:B}}const A=await super.deserialize(e,r,i);return A._initialData=s,e.comment&&A.setCommentData(e),A}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new V2(this)),[["colorPicker",this._colorPicker]]}get colorType(){return Ie.INK_COLOR}get colorAndOpacityType(){return Ie.INK_COLOR_AND_OPACITY}get opacityType(){return Ie.INK_OPACITY}updateParams(e,r){if(e===Ie.INK_COLOR_AND_OPACITY){this._updateColorAndOpacity(r.color,r.opacity);return}super.updateParams(e,r)}static updateDefaultParams(e,r){if(e===Ie.INK_COLOR_AND_OPACITY){super.updateDefaultParams(Ie.INK_COLOR,r.color),super.updateDefaultParams(Ie.INK_OPACITY,r.opacity);return}super.updateDefaultParams(e,r)}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:e,_drawingOptions:r,parent:i}=this;r.updateSVGProperty("stroke-width"),i.drawLayer.updateProperties(e,r.toSVGProperties())}static onScaleChangingWhenDrawing(){const e=this._currentParent;e&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),e.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:e,thickness:r,opacity:i}){this._drawingOptions=e0.getDefaultDrawingOptions({stroke:Qt.makeHexColor(...e),"stroke-width":r,"stroke-opacity":i})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:r,points:i}=this.serializeDraw(e),{_drawingOptions:{stroke:s,"stroke-opacity":A,"stroke-width":a}}=this,o=Object.assign(super.serialize(e),{color:Mr._colorManager.convert(s),opacity:A,thickness:a,paths:{lines:r,points:i}});return this.addComment(o),e?(o.isCopy=!0,o):this.annotationElementId&&!I(this,vB,VR).call(this,o)?null:(o.id=this.annotationElementId,o)}renderAnnotationElement(e){if(this.deleted)return e.hide(),null;const{points:r,rect:i}=this.serializeDraw(!1);return e.updateEdited({rect:i,thickness:this._drawingOptions["stroke-width"],points:r,popup:this.comment}),null}};vB=new WeakSet,VR=function(e){const{color:r,thickness:i,opacity:s,pageIndex:A}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||e.color.some((a,o)=>a!==r[o])||e.thickness!==i||e.opacity!==s||e.pageIndex!==A},ct(e0,"_type","ink"),ct(e0,"_editorType",Be.INK),ct(e0,"_defaultDrawingOptions",null);let lx=e0;class cx extends wm{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const q2=8,ym=3;class co{static extractContoursFromText(t,{fontFamily:e,fontStyle:r,fontWeight:i},s,A,a,o){let l=new OffscreenCanvas(1,1),h=l.getContext("2d",{alpha:!1});const u=200,d=h.font=`${r} ${i} ${u}px ${e}`,{actualBoundingBoxLeft:f,actualBoundingBoxRight:p,actualBoundingBoxAscent:m,actualBoundingBoxDescent:y,fontBoundingBoxAscent:w,fontBoundingBoxDescent:B,width:E}=h.measureText(t),S=1.5,_=Math.ceil(Math.max(Math.abs(f)+Math.abs(p)||0,E)*S),L=Math.ceil(Math.max(Math.abs(m)+Math.abs(y)||u,Math.abs(w)+Math.abs(B)||u)*S);l=new OffscreenCanvas(_,L),h=l.getContext("2d",{alpha:!0,willReadFrequently:!0}),h.font=d,h.filter="grayscale(1)",h.fillStyle="white",h.fillRect(0,0,_,L),h.fillStyle="black",h.fillText(t,_*(S-1)/2,L*(3-S)/2);const k=I(this,fr,bT).call(this,h.getImageData(0,0,_,L).data),H=I(this,fr,zR).call(this,k),Q=I(this,fr,BT).call(this,H),W=I(this,fr,yT).call(this,k,_,L,Q);return this.processDrawnLines({lines:{curves:W,width:_,height:L},pageWidth:s,pageHeight:A,rotation:a,innerMargin:o,mustSmooth:!0,areContours:!0})}static process(t,e,r,i,s){const[A,a,o]=I(this,fr,XR).call(this,t),[l,h]=I(this,fr,WR).call(this,A,a,o,Math.hypot(a,o)*c(this,Ad).sigmaSFactor,c(this,Ad).sigmaR,c(this,Ad).kernelSize),u=I(this,fr,BT).call(this,h),d=I(this,fr,yT).call(this,l,a,o,u);return this.processDrawnLines({lines:{curves:d,width:a,height:o},pageWidth:e,pageHeight:r,rotation:i,innerMargin:s,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:t,pageWidth:e,pageHeight:r,rotation:i,innerMargin:s,mustSmooth:A,areContours:a}){i%180!==0&&([e,r]=[r,e]);const{curves:o,width:l,height:h}=t,u=t.thickness??0,d=[],f=Math.min(e/l,r/h),p=f/e,m=f/r,y=[];for(const{points:B}of o){const E=A?I(this,fr,$R).call(this,B):B;if(!E)continue;y.push(E);const S=E.length,_=new Float32Array(S),L=new Float32Array(3*(S===2?2:S-2));if(d.push({line:L,points:_}),S===2){_[0]=E[0]*p,_[1]=E[1]*m,L.set([NaN,NaN,NaN,NaN,_[0],_[1]],0);continue}let[k,H,Q,W]=E;k*=p,H*=m,Q*=p,W*=m,_.set([k,H,Q,W],0),L.set([NaN,NaN,NaN,NaN,k,H],0);for(let U=4;U<S;U+=2){const D=_[U]=E[U]*p,j=_[U+1]=E[U+1]*m;L.set(Wt.createBezierPoints(k,H,Q,W,D,j),(U-2)*3),[k,H,Q,W]=[Q,W,D,j]}}if(d.length===0)return null;const w=a?new cx:new wm;return w.build(d,e,r,1,i,a?0:u,s),{outline:w,newCurves:y,areContours:a,thickness:u,width:l,height:h}}static async compressSignature({outlines:t,areContours:e,thickness:r,width:i,height:s}){let A=1/0,a=-1/0,o=0;for(const B of t){o+=B.length;for(let E=2,S=B.length;E<S;E++){const _=B[E]-B[E-2];A=Math.min(A,_),a=Math.max(a,_)}}let l;A>=-128&&a<=127?l=Int8Array:A>=-32768&&a<=32767?l=Int16Array:l=Int32Array;const h=t.length,u=q2+ym*h,d=new Uint32Array(u);let f=0;d[f++]=u*Uint32Array.BYTES_PER_ELEMENT+(o-2*h)*l.BYTES_PER_ELEMENT,d[f++]=0,d[f++]=i,d[f++]=s,d[f++]=e?0:1,d[f++]=Math.max(0,Math.floor(r??0)),d[f++]=h,d[f++]=l.BYTES_PER_ELEMENT;for(const B of t)d[f++]=B.length-2,d[f++]=B[0],d[f++]=B[1];const p=new CompressionStream("deflate-raw"),m=p.writable.getWriter();await m.ready,m.write(d);const y=l.prototype.constructor;for(const B of t){const E=new y(B.length-2);for(let S=2,_=B.length;S<_;S++)E[S-2]=B[S]-B[S-2];m.write(E)}return m.close(),(await new Response(p.readable).bytes()).toBase64()}static async decompressSignature(t){try{const e=Uint8Array.fromBase64(t),{readable:r,writable:i}=new DecompressionStream("deflate-raw"),s=i.getWriter();await s.ready,s.write(e).then(async()=>{await s.ready,await s.close()}).catch(()=>{});let A=null,a=0;for await(const E of r)A||(A=new Uint8Array(new Uint32Array(E.buffer,0,4)[0])),A.set(E,a),a+=E.length;const o=new Uint32Array(A.buffer,0,A.length>>2),l=o[1];if(l!==0)throw new Error(`Invalid version: ${l}`);const h=o[2],u=o[3],d=o[4]===0,f=o[5],p=o[6],m=o[7],y=[],w=(q2+ym*p)*Uint32Array.BYTES_PER_ELEMENT;let B;switch(m){case Int8Array.BYTES_PER_ELEMENT:B=new Int8Array(A.buffer,w);break;case Int16Array.BYTES_PER_ELEMENT:B=new Int16Array(A.buffer,w);break;case Int32Array.BYTES_PER_ELEMENT:B=new Int32Array(A.buffer,w);break}a=0;for(let E=0;E<p;E++){const S=o[ym*E+q2],_=new Float32Array(S+2);y.push(_);for(let L=0;L<ym-1;L++)_[L]=o[ym*E+q2+L+1];for(let L=0;L<S;L++)_[L+2]=_[L]+B[a++]}return{areContours:d,thickness:f,outlines:y,width:h,height:u}}catch(e){return Ue(`decompressSignature: ${e}`),null}}}Ad=new WeakMap,fr=new WeakSet,wT=function(t,e,r,i){return r-=t,i-=e,r===0?i>0?0:4:r===1?i+6:2-i},Ga=new WeakMap,GR=function(t,e,r,i,s,A,a){const o=I(this,fr,wT).call(this,r,i,s,A);for(let l=0;l<8;l++){const h=(-l+o-a+16)%8,u=c(this,Ga)[2*h],d=c(this,Ga)[2*h+1];if(t[(r+u)*e+(i+d)]!==0)return h}return-1},jR=function(t,e,r,i,s,A,a){const o=I(this,fr,wT).call(this,r,i,s,A);for(let l=0;l<8;l++){const h=(l+o+a+16)%8,u=c(this,Ga)[2*h],d=c(this,Ga)[2*h+1];if(t[(r+u)*e+(i+d)]!==0)return h}return-1},yT=function(t,e,r,i){const s=t.length,A=new Int32Array(s);for(let h=0;h<s;h++)A[h]=t[h]<=i?1:0;for(let h=1;h<r-1;h++)A[h*e]=A[h*e+e-1]=0;for(let h=0;h<e;h++)A[h]=A[e*r-1-h]=0;let a=1,o;const l=[];for(let h=1;h<r-1;h++){o=1;for(let u=1;u<e-1;u++){const d=h*e+u,f=A[d];if(f===0)continue;let p=h,m=u;if(f===1&&A[d-1]===0)a+=1,m-=1;else if(f>=1&&A[d+1]===0)a+=1,m+=1,f>1&&(o=f);else{f!==1&&(o=Math.abs(f));continue}const y=[u,h],w=m===u+1,B={isHole:w,points:y,id:a,parent:0};l.push(B);let E;for(const U of l)if(U.id===o){E=U;break}E?E.isHole?B.parent=w?E.parent:o:B.parent=w?o:E.parent:B.parent=w?o:0;const S=I(this,fr,GR).call(this,A,e,h,u,p,m,0);if(S===-1){A[d]=-a,A[d]!==1&&(o=Math.abs(A[d]));continue}let _=c(this,Ga)[2*S],L=c(this,Ga)[2*S+1];const k=h+_,H=u+L;p=k,m=H;let Q=h,W=u;for(;;){const U=I(this,fr,jR).call(this,A,e,Q,W,p,m,1);_=c(this,Ga)[2*U],L=c(this,Ga)[2*U+1];const D=Q+_,j=W+L;y.push(j,D);const V=Q*e+W;if(A[V+1]===0?A[V]=-a:A[V]===1&&(A[V]=a),D===h&&j===u&&Q===k&&W===H){A[d]!==1&&(o=Math.abs(A[d]));break}else p=Q,m=W,Q=D,W=j}}}return l},xC=function(t,e,r,i){if(r-e<=4){for(let k=e;k<r-2;k+=2)i.push(t[k],t[k+1]);return}const s=t[e],A=t[e+1],a=t[r-4]-s,o=t[r-3]-A,l=Math.hypot(a,o),h=a/l,u=o/l,d=h*A-u*s,f=o/a,p=1/l,m=Math.atan(f),y=Math.cos(m),w=Math.sin(m),B=p*(Math.abs(y)+Math.abs(w)),E=p*(1-B+B**2),S=Math.max(Math.atan(Math.abs(w+y)*E),Math.atan(Math.abs(w-y)*E));let _=0,L=e;for(let k=e+2;k<r-2;k+=2){const H=Math.abs(d-h*t[k+1]+u*t[k]);H>_&&(L=k,_=H)}_>(l*S)**2?(I(this,fr,xC).call(this,t,e,L+2,i),I(this,fr,xC).call(this,t,L,r,i)):i.push(s,A)},$R=function(t){const e=[],r=t.length;return I(this,fr,xC).call(this,t,0,r,e),e.push(t[r-2],t[r-1]),e.length<=4?null:e},WR=function(t,e,r,i,s,A){const a=new Float32Array(A**2),o=-2*i**2,l=A>>1;for(let m=0;m<A;m++){const y=(m-l)**2;for(let w=0;w<A;w++)a[m*A+w]=Math.exp((y+(w-l)**2)/o)}const h=new Float32Array(256),u=-2*s**2;for(let m=0;m<256;m++)h[m]=Math.exp(m**2/u);const d=t.length,f=new Uint8Array(d),p=new Uint32Array(256);for(let m=0;m<r;m++)for(let y=0;y<e;y++){const w=m*e+y,B=t[w];let E=0,S=0;for(let L=0;L<A;L++){const k=m+L-l;if(!(k<0||k>=r))for(let H=0;H<A;H++){const Q=y+H-l;if(Q<0||Q>=e)continue;const W=t[k*e+Q],U=a[L*A+H]*h[Math.abs(W-B)];E+=W*U,S+=U}}const _=f[w]=Math.round(E/S);p[_]++}return[f,p]},zR=function(t){const e=new Uint32Array(256);for(const r of t)e[r]++;return e},bT=function(t){const e=t.length,r=new Uint8ClampedArray(e>>2);let i=-1/0,s=1/0;for(let a=0,o=r.length;a<o;a++){const l=r[a]=t[a<<2];i=Math.max(i,l),s=Math.min(s,l)}const A=255/(i-s);for(let a=0,o=r.length;a<o;a++)r[a]=(r[a]-s)*A;return r},BT=function(t){let e,r=-1/0,i=-1/0;const s=t.findIndex(o=>o!==0);let A=s,a=s;for(e=s;e<256;e++){const o=t[e];o>r&&(e-A>i&&(i=e-A,a=e-1),r=o,A=e)}for(e=a-1;e>=0&&!(t[e]>t[e+1]);e--);return e},XR=function(t){const e=t,{width:r,height:i}=t,{maxDim:s}=c(this,Ad);let A=r,a=i;if(r>s||i>s){let d=r,f=i,p=Math.log2(Math.max(r,i)/s);const m=Math.floor(p);p=p===m?m-1:m;for(let w=0;w<p;w++){A=Math.ceil(d/2),a=Math.ceil(f/2);const B=new OffscreenCanvas(A,a);B.getContext("2d").drawImage(t,0,0,d,f,0,0,A,a),d=A,f=a,t!==e&&t.close(),t=B.transferToImageBitmap()}const y=Math.min(s/A,s/a);A=Math.round(A*y),a=Math.round(a*y)}const l=new OffscreenCanvas(A,a).getContext("2d",{willReadFrequently:!0});l.fillStyle="white",l.fillRect(0,0,A,a),l.filter="grayscale(1)",l.drawImage(t,0,0,t.width,t.height,0,0,A,a);const h=l.getImageData(0,0,A,a).data;return[I(this,fr,bT).call(this,h),A,a]},T(co,fr),T(co,Ad,{maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16}),T(co,Ga,new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]));class hx extends C3{constructor(){super(),super.updateProperties({fill:Mr._defaultLineColor,"stroke-width":0})}clone(){const t=new hx;return t.updateAll(this),t}}class ux extends X2{constructor(t){super(t),super.updateProperties({stroke:Mr._defaultLineColor,"stroke-width":1})}clone(){const t=new ux(this._viewParameters);return t.updateAll(this),t}}const FA=class FA extends z2{constructor(e){super({...e,mustBeCommitted:!0,name:"signatureEditor"});T(this,kh,!1);T(this,Oo,null);T(this,Oh,null);T(this,ad,null);this._willKeepAspectRatio=!0,C(this,Oh,e.signatureData||null),C(this,Oo,null),this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(e,r){Mr.initialize(e,r),this._defaultDrawingOptions=new hx,this._defaultDrawnSignatureOptions=new ux(r.viewParameters)}static getDefaultDrawingOptions(e){const r=this._defaultDrawingOptions.clone();return r.updateProperties(e),r}static get supportMultipleDrawings(){return!1}static get typesMap(){return Se(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!c(this,Oo)}}static computeTelemetryFinalData(e){const r=e.get("hasDescription");return{hasAltText:r.get(!0)??0,hasNoAltText:r.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let e,r;const{_isCopy:i}=this;if(i&&(this._isCopy=!1,e=this.x,r=this.y),super.render(),this._drawId===null)if(c(this,Oh)){const{lines:s,mustSmooth:A,areContours:a,description:o,uuid:l,heightInPage:h}=c(this,Oh),{rawDims:{pageWidth:u,pageHeight:d},rotation:f}=this.parent.viewport,p=co.processDrawnLines({lines:s,pageWidth:u,pageHeight:d,rotation:f,innerMargin:FA._INNER_MARGIN,mustSmooth:A,areContours:a});this.addSignature(p,h,o,l)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:c(this,Oo)||""}));return i&&(this._isCopy=!0,this._moveAfterPaste(e,r)),this.div}setUuid(e){C(this,ad,e),this.addEditToolbar()}getUuid(){return c(this,ad)}get description(){return c(this,Oo)}set description(e){C(this,Oo,e),this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:e})),super.addEditToolbar().then(r=>{r==null||r.updateEditSignatureButton(e)}))}getSignaturePreview(){const{newCurves:e,areContours:r,thickness:i,width:s,height:A}=c(this,Oh),a=Math.max(s,A),o=co.processDrawnLines({lines:{curves:e.map(l=>({points:l})),thickness:i,width:s,height:A},pageWidth:a,pageHeight:a,rotation:0,innerMargin:0,mustSmooth:!1,areContours:r});return{areContours:r,outline:o.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(e,r,i,s){const{x:A,y:a}=this,{outline:o}=C(this,Oh,e);C(this,kh,o instanceof cx),this.description=i;let l;c(this,kh)?l=FA.getDefaultDrawingOptions():(l=FA._defaultDrawnSignatureOptions.clone(),l.updateProperties({"stroke-width":o.thickness})),this._addOutlines({drawOutlines:o,drawingOptions:l});const[,h]=this.pageDimensions;let u=r/h;u=u>=1?.5:u,this.width*=u/this.height,this.width>=1&&(u*=.9/this.width,this.width=.9),this.height=u,this.setDims(),this.x=A,this.y=a,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(s),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!s,hasDescription:!!i}}),this.div.hidden=!1}getFromImage(e){const{rawDims:{pageWidth:r,pageHeight:i},rotation:s}=this.parent.viewport;return co.process(e,r,i,s,FA._INNER_MARGIN)}getFromText(e,r){const{rawDims:{pageWidth:i,pageHeight:s},rotation:A}=this.parent.viewport;return co.extractContoursFromText(e,r,i,s,A,FA._INNER_MARGIN)}getDrawnSignature(e){const{rawDims:{pageWidth:r,pageHeight:i},rotation:s}=this.parent.viewport;return co.processDrawnLines({lines:e,pageWidth:r,pageHeight:i,rotation:s,innerMargin:FA._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:e,thickness:r}){e?this._drawingOptions=FA.getDefaultDrawingOptions():(this._drawingOptions=FA._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":r}))}serialize(e=!1){if(this.isEmpty())return null;const{lines:r,points:i}=this.serializeDraw(e),{_drawingOptions:{"stroke-width":s}}=this,A=Object.assign(super.serialize(e),{isSignature:!0,areContours:c(this,kh),color:[0,0,0],thickness:c(this,kh)?0:s});return this.addComment(A),e?(A.paths={lines:r,points:i},A.uuid=c(this,ad),A.isCopy=!0):A.lines=r,c(this,Oo)&&(A.accessibilityData={type:"Figure",alt:c(this,Oo)}),A}static deserializeDraw(e,r,i,s,A,a){return a.areContours?cx.deserialize(e,r,i,s,A,a):wm.deserialize(e,r,i,s,A,a)}static async deserialize(e,r,i){var A;const s=await super.deserialize(e,r,i);return C(s,kh,e.areContours),s.description=((A=e.accessibilityData)==null?void 0:A.alt)||"",C(s,ad,e.uuid),s}};kh=new WeakMap,Oo=new WeakMap,Oh=new WeakMap,ad=new WeakMap,ct(FA,"_type","signature"),ct(FA,"_editorType",Be.SIGNATURE),ct(FA,"_defaultDrawingOptions",null);let fx=FA;class dx extends Mr{constructor(e){super({...e,name:"stampEditor"});T(this,ir);T(this,ri,null);T(this,yn,null);T(this,Dh,null);T(this,nc,null);T(this,Rh,null);T(this,r0,"");T(this,sc,null);T(this,od,!1);T(this,Do,null);T(this,TA,!1);T(this,i0,!1);C(this,nc,e.bitmapUrl),C(this,Rh,e.bitmapFile),this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(e,r){Mr.initialize(e,r)}static isHandlingMimeForPasting(e){return F2.includes(e)}static paste(e,r){r.pasteEditor({mode:Be.STAMP},{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var e;return{type:"stamp",hasAltText:!!((e=this.altTextData)!=null&&e.altText)}}static computeTelemetryFinalData(e){const r=e.get("hasAltText");return{hasAltText:r.get(!0)??0,hasNoAltText:r.get(!1)??0}}async mlGuessAltText(e=null,r=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!await i.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:s,width:A,height:a}=e||this.copyCanvas(null,null,!0).imageData,o=await i.guess({name:"altText",request:{data:s,width:A,height:a,channels:s.length/(A*a)}});if(!o)throw new Error("No response from the AI service.");if(o.error)throw new Error("Error from the AI service.");if(o.cancel)return null;if(!o.output)throw new Error("No valid response from the AI service.");const l=o.output;return await this.setGuessedAltText(l),r&&!this.hasAltTextData()&&(this.altTextData={alt:l,decorative:!1}),l}remove(){var e;c(this,yn)&&(C(this,ri,null),this._uiManager.imageManager.deleteId(c(this,yn)),(e=c(this,sc))==null||e.remove(),C(this,sc,null),c(this,Do)&&(clearTimeout(c(this,Do)),C(this,Do,null))),super.remove()}rebuild(){if(!this.parent){c(this,yn)&&I(this,ir,EC).call(this);return}super.rebuild(),this.div!==null&&(c(this,yn)&&c(this,sc)===null&&I(this,ir,EC).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(c(this,Dh)||c(this,ri)||c(this,nc)||c(this,Rh)||c(this,yn)||c(this,od))}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let e,r;return this._isCopy&&(e=this.x,r=this.y),super.render(),this.div.hidden=!0,this.createAltText(),c(this,od)||(c(this,ri)?I(this,ir,SC).call(this):I(this,ir,EC).call(this)),this._isCopy&&this._moveAfterPaste(e,r),this._uiManager.addShouldRescale(this),this.div}setCanvas(e,r){const{id:i,bitmap:s}=this._uiManager.imageManager.getFromCanvas(e,r);r.remove(),i&&this._uiManager.imageManager.isValidId(i)&&(C(this,yn,i),s&&C(this,ri,s),C(this,od,!1),I(this,ir,SC).call(this))}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;c(this,Do)!==null&&clearTimeout(c(this,Do)),C(this,Do,setTimeout(()=>{C(this,Do,null),I(this,ir,CT).call(this)},200))}copyCanvas(e,r,i=!1){e||(e=224);const{width:s,height:A}=c(this,ri),a=new ya;let o=c(this,ri),l=s,h=A,u=null;if(r){if(s>r||A>r){const k=Math.min(r/s,r/A);l=Math.floor(s*k),h=Math.floor(A*k)}u=document.createElement("canvas");const f=u.width=Math.ceil(l*a.sx),p=u.height=Math.ceil(h*a.sy);c(this,TA)||(o=I(this,ir,FC).call(this,f,p));const m=u.getContext("2d");m.filter=this._uiManager.hcmFilter;let y="white",w="#cfcfd8";this._uiManager.hcmFilter!=="none"?w="black":nK.isDarkMode&&(y="#8f8f9d",w="#42414d");const B=15,E=B*a.sx,S=B*a.sy,_=new OffscreenCanvas(E*2,S*2),L=_.getContext("2d");L.fillStyle=y,L.fillRect(0,0,E*2,S*2),L.fillStyle=w,L.fillRect(0,0,E,S),L.fillRect(E,S,E,S),m.fillStyle=m.createPattern(_,"repeat"),m.fillRect(0,0,f,p),m.drawImage(o,0,0,o.width,o.height,0,0,f,p)}let d=null;if(i){let f,p;if(a.symmetric&&o.width<e&&o.height<e)f=o.width,p=o.height;else if(o=c(this,ri),s>e||A>e){const w=Math.min(e/s,e/A);f=Math.floor(s*w),p=Math.floor(A*w),c(this,TA)||(o=I(this,ir,FC).call(this,f,p))}const y=new OffscreenCanvas(f,p).getContext("2d",{willReadFrequently:!0});y.drawImage(o,0,0,o.width,o.height,0,0,f,p),d={width:f,height:p,data:y.getImageData(0,0,f,p).data}}return{canvas:u,width:l,height:h,imageData:d}}static async deserialize(e,r,i){var y;let s=null,A=!1;if(e instanceof b3){const{data:{rect:w,rotation:B,id:E,structParent:S,popupRef:_,richText:L,contentsObj:k,creationDate:H,modificationDate:Q},container:W,parent:{page:{pageNumber:U}},canvas:D}=e;let j,V;D?(delete e.canvas,{id:j,bitmap:V}=i.imageManager.getFromCanvas(W.id,D),D.remove()):(A=!0,e._hasNoCanvas=!0);const st=((y=await r._structTree.getAriaAttributes(`${zd}${E}`))==null?void 0:y.get("aria-label"))||"";s=e={annotationType:Be.STAMP,bitmapId:j,bitmap:V,pageIndex:U-1,rect:w.slice(0),rotation:B,annotationElementId:E,id:E,deleted:!1,accessibilityData:{decorative:!1,altText:st},isSvg:!1,structParent:S,popupRef:_,richText:L,comment:(k==null?void 0:k.str)||null,creationDate:H,modificationDate:Q}}const a=await super.deserialize(e,r,i),{rect:o,bitmap:l,bitmapUrl:h,bitmapId:u,isSvg:d,accessibilityData:f}=e;A?(i.addMissingCanvas(e.id,a),C(a,od,!0)):u&&i.imageManager.isValidId(u)?(C(a,yn,u),l&&C(a,ri,l)):C(a,nc,h),C(a,TA,d);const[p,m]=a.pageDimensions;return a.width=(o[2]-o[0])/p,a.height=(o[3]-o[1])/m,f&&(a.altTextData=f),a._initialData=s,e.comment&&a.setCommentData(e),C(a,i0,!!s),a}serialize(e=!1,r=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i=Object.assign(super.serialize(e),{bitmapId:c(this,yn),isSvg:c(this,TA)});if(this.addComment(i),e)return i.bitmapUrl=I(this,ir,TC).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i.isCopy=!0,i;const{decorative:s,altText:A}=this.serializeAltText(!1);if(!s&&A&&(i.accessibilityData={type:"Figure",alt:A}),this.annotationElementId){const o=I(this,ir,qR).call(this,i);return o.isSame?null:(o.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1,i.id=this.annotationElementId,delete i.bitmapId,i)}if(r===null)return i;r.stamps||(r.stamps=new Map);const a=c(this,TA)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(!r.stamps.has(c(this,yn)))r.stamps.set(c(this,yn),{area:a,serialized:i}),i.bitmap=I(this,ir,TC).call(this,!1);else if(c(this,TA)){const o=r.stamps.get(c(this,yn));a>o.area&&(o.area=a,o.serialized.bitmap.close(),o.serialized.bitmap=I(this,ir,TC).call(this,!1))}return i}renderAnnotationElement(e){return this.deleted?(e.hide(),null):(e.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}}ri=new WeakMap,yn=new WeakMap,Dh=new WeakMap,nc=new WeakMap,Rh=new WeakMap,r0=new WeakMap,sc=new WeakMap,od=new WeakMap,Do=new WeakMap,TA=new WeakMap,i0=new WeakMap,ir=new WeakSet,Rw=function(e,r=!1){if(!e){this.remove();return}C(this,ri,e.bitmap),r||(C(this,yn,e.id),C(this,TA,e.isSvg)),e.file&&C(this,r0,e.file.name),I(this,ir,SC).call(this)},Hw=function(){if(C(this,Dh,null),this._uiManager.enableWaiting(!1),!!c(this,sc)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&c(this,ri)){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&c(this,ri)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},EC=function(){if(c(this,yn)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(c(this,yn)).then(i=>I(this,ir,Rw).call(this,i,!0)).finally(()=>I(this,ir,Hw).call(this));return}if(c(this,nc)){const i=c(this,nc);C(this,nc,null),this._uiManager.enableWaiting(!0),C(this,Dh,this._uiManager.imageManager.getFromUrl(i).then(s=>I(this,ir,Rw).call(this,s)).finally(()=>I(this,ir,Hw).call(this)));return}if(c(this,Rh)){const i=c(this,Rh);C(this,Rh,null),this._uiManager.enableWaiting(!0),C(this,Dh,this._uiManager.imageManager.getFromFile(i).then(s=>I(this,ir,Rw).call(this,s)).finally(()=>I(this,ir,Hw).call(this)));return}const e=document.createElement("input");e.type="file",e.accept=F2.join(",");const r=this._uiManager._signal;C(this,Dh,new Promise(i=>{e.addEventListener("change",async()=>{if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const s=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),I(this,ir,Rw).call(this,s)}i()},{signal:r}),e.addEventListener("cancel",()=>{this.remove(),i()},{signal:r})}).finally(()=>I(this,ir,Hw).call(this))),e.click()},SC=function(){var l;const{div:e}=this;let{width:r,height:i}=c(this,ri);const[s,A]=this.pageDimensions,a=.75;if(this.width)r=this.width*s,i=this.height*A;else if(r>a*s||i>a*A){const h=Math.min(a*s/r,a*A/i);r*=h,i*=h}this._uiManager.enableWaiting(!1);const o=C(this,sc,document.createElement("canvas"));o.setAttribute("role","img"),this.addContainer(o),this.width=r/s,this.height=i/A,this.setDims(),(l=this._initialOptions)!=null&&l.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),I(this,ir,CT).call(this),c(this,i0)||(this.parent.addUndoableEditor(this),C(this,i0,!0)),this._reportTelemetry({action:"inserted_image"}),c(this,r0)&&this.div.setAttribute("aria-description",c(this,r0)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")},FC=function(e,r){const{width:i,height:s}=c(this,ri);let A=i,a=s,o=c(this,ri);for(;A>2*e||a>2*r;){const l=A,h=a;A>2*e&&(A=Math.ceil(A/2)),a>2*r&&(a=Math.ceil(a/2));const u=new OffscreenCanvas(A,a);u.getContext("2d").drawImage(o,0,0,l,h,0,0,A,a),o=u.transferToImageBitmap()}return o},CT=function(){const[e,r]=this.parentDimensions,{width:i,height:s}=this,A=new ya,a=Math.ceil(i*e*A.sx),o=Math.ceil(s*r*A.sy),l=c(this,sc);if(!l||l.width===a&&l.height===o)return;l.width=a,l.height=o;const h=c(this,TA)?c(this,ri):I(this,ir,FC).call(this,a,o),u=l.getContext("2d");u.filter=this._uiManager.hcmFilter,u.drawImage(h,0,0,h.width,h.height,0,0,a,o)},TC=function(e){if(e){if(c(this,TA)){const s=this._uiManager.imageManager.getSvgUrl(c(this,yn));if(s)return s}const r=document.createElement("canvas");return{width:r.width,height:r.height}=c(this,ri),r.getContext("2d").drawImage(c(this,ri),0,0),r.toDataURL()}if(c(this,TA)){const[r,i]=this.pageDimensions,s=Math.round(this.width*r*al.PDF_TO_CSS_UNITS),A=Math.round(this.height*i*al.PDF_TO_CSS_UNITS),a=new OffscreenCanvas(s,A);return a.getContext("2d").drawImage(c(this,ri),0,0,c(this,ri).width,c(this,ri).height,0,0,s,A),a.transferToImageBitmap()}return structuredClone(c(this,ri))},qR=function(e){var a;const{pageIndex:r,accessibilityData:{altText:i}}=this._initialData,s=e.pageIndex===r,A=(((a=e.accessibilityData)==null?void 0:a.alt)||"")===i;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&s&&A,isSameAltText:A}},ct(dx,"_type","stamp"),ct(dx,"_editorType",Be.STAMP);const $a=class $a{constructor({uiManager:t,pageIndex:e,div:r,structTreeLayer:i,accessibilityManager:s,annotationLayer:A,drawLayer:a,textLayer:o,viewport:l,l10n:h}){T(this,Qr);T(this,ld);T(this,n0,!1);T(this,Hh,null);T(this,Kh,null);T(this,Ac,null);T(this,Ws,new Map);T(this,Vh,!1);T(this,s0,!1);T(this,A0,!1);T(this,ja,null);T(this,ac,null);T(this,bn,null);T(this,oc,null);T(this,Gh,null);T(this,a0,-1);T(this,te);const u=[...c($a,jh).values()];if(!$a._initialized){$a._initialized=!0;for(const d of u)d.initialize(h,t)}t.registerEditorTypes(u),C(this,te,t),this.pageIndex=e,this.div=r,C(this,ld,s),C(this,Hh,A),this.viewport=l,C(this,bn,o),this.drawLayer=a,this._structTree=i,c(this,te).addLayer(this)}get isEmpty(){return c(this,Ws).size===0}get isInvisible(){return this.isEmpty&&c(this,te).getMode()===Be.NONE}updateToolbar(t){c(this,te).updateToolbar(t)}updateMode(t=c(this,te).getMode()){switch(I(this,Qr,_C).call(this),t){case Be.NONE:this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case Be.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case Be.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;if(e.toggle("nonEditing",!1),t===Be.POPUP)e.toggle("commentEditing",!0);else{e.toggle("commentEditing",!1);for(const r of c($a,jh).values())e.toggle(`${r._type}Editing`,t===r._editorType)}this.div.hidden=!1}hasTextLayer(t){var e;return t===((e=c(this,bn))==null?void 0:e.div)}setEditingState(t){c(this,te).setEditingState(t)}addCommands(t){c(this,te).addCommands(t)}cleanUndoStack(t){c(this,te).cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){var e;(e=c(this,Hh))==null||e.togglePointerEvents(t)}async enable(){var r;C(this,A0,!0),this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),(r=c(this,Gh))==null||r.abort(),C(this,Gh,null);const t=new Set;for(const i of c(this,Qr,xT))i.enableEditing(),i.show(!0),i.annotationElementId&&(c(this,te).removeChangedExistingAnnotation(i),t.add(i.annotationElementId));const e=c(this,Hh);if(e)for(const i of e.getEditableAnnotations()){if(i.hide(),c(this,te).isDeletedAnnotationElement(i.data.id)||t.has(i.data.id))continue;const s=await this.deserialize(i);s&&(this.addOrRebuild(s),s.enableEditing())}C(this,A0,!1),c(this,te)._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){var i;if(C(this,s0,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),c(this,bn)&&!c(this,Gh)){C(this,Gh,new AbortController);const s=c(this,te).combinedSignal(c(this,Gh));c(this,bn).div.addEventListener("pointerdown",A=>{const{clientX:o,clientY:l,timeStamp:h}=A,u=c(this,a0);if(h-u>500){C(this,a0,h);return}C(this,a0,-1);const{classList:d}=this.div;d.toggle("getElements",!0);const f=document.elementsFromPoint(o,l);if(d.toggle("getElements",!1),!this.div.contains(f[0]))return;let p;const m=new RegExp(`^${Z0}[0-9]+$`);for(const w of f)if(m.test(w.id)){p=w.id;break}if(!p)return;const y=c(this,Ws).get(p);(y==null?void 0:y.annotationElementId)===null&&(Jr(A),y.dblclick(A))},{signal:s,capture:!0})}const t=c(this,Hh),e=[];if(t){const s=new Map,A=new Map;for(const a of c(this,Qr,xT)){if(a.disableEditing(),!a.annotationElementId){e.push(a);continue}if(a.serialize()!==null){s.set(a.annotationElementId,a);continue}else A.set(a.annotationElementId,a);(i=this.getEditableAnnotation(a.annotationElementId))==null||i.show(),a.remove()}for(const a of t.getEditableAnnotations()){const{id:o}=a.data;if(c(this,te).isDeletedAnnotationElement(o)){a.updateEdited({deleted:!0});continue}let l=A.get(o);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=s.get(o),l&&(c(this,te).addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}I(this,Qr,_C).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:r}=this.div;for(const s of c($a,jh).values())r.remove(`${s._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),t==null||t.updateFakeAnnotations(e),C(this,s0,!1)}getEditableAnnotation(t){var e;return((e=c(this,Hh))==null?void 0:e.getEditableAnnotation(t))||null}setActiveEditor(t){c(this,te).getActive()!==t&&c(this,te).setActiveEditor(t)}enableTextSelection(){var t;if(this.div.tabIndex=-1,(t=c(this,bn))!=null&&t.div&&!c(this,oc)){C(this,oc,new AbortController);const e=c(this,te).combinedSignal(c(this,oc));c(this,bn).div.addEventListener("pointerdown",I(this,Qr,YR).bind(this),{signal:e}),c(this,bn).div.classList.add("highlighting")}}disableTextSelection(){var t;this.div.tabIndex=0,(t=c(this,bn))!=null&&t.div&&c(this,oc)&&(c(this,oc).abort(),C(this,oc,null),c(this,bn).div.classList.remove("highlighting"))}enableClick(){if(c(this,Kh))return;C(this,Kh,new AbortController);const t=c(this,te).combinedSignal(c(this,Kh));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const e=this.pointerup.bind(this);this.div.addEventListener("pointerup",e,{signal:t}),this.div.addEventListener("pointercancel",e,{signal:t})}disableClick(){var t;(t=c(this,Kh))==null||t.abort(),C(this,Kh,null)}attach(t){c(this,Ws).set(t.id,t);const{annotationElementId:e}=t;e&&c(this,te).isDeletedAnnotationElement(e)&&c(this,te).removeDeletedAnnotationElement(t)}detach(t){var e;c(this,Ws).delete(t.id),(e=c(this,ld))==null||e.removePointerInTextLayer(t.contentDiv),!c(this,s0)&&t.annotationElementId&&c(this,te).addDeletedAnnotationElement(t)}remove(t){this.detach(t),c(this,te).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(c(this,te).addDeletedAnnotationElement(t),Mr.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),(e=t.parent)==null||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),c(this,te).addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!c(this,A0)),c(this,te).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){var r;if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&!c(this,Ac)&&(t._focusEventsAllowed=!1,C(this,Ac,setTimeout(()=>{C(this,Ac,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:c(this,te)._signal}),e.focus())},0))),t._structTreeParentId=(r=c(this,ld))==null?void 0:r.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const e=()=>t._uiManager.rebuild(t),r=()=>{t.remove()};this.addCommands({cmd:e,undo:r,mustExec:!1})}getEditorByUID(t){for(const e of c(this,Ws).values())if(e.uid===t)return e;return null}combinedSignal(t){return c(this,te).combinedSignal(t)}canCreateNewEmptyEditor(){var t;return(t=c(this,Qr,qo))==null?void 0:t.canCreateNewEmptyEditor()}async pasteEditor(t,e){this.updateToolbar(t),await c(this,te).updateMode(t.mode);const{offsetX:r,offsetY:i}=I(this,Qr,ST).call(this),s=c(this,te).getId(),A=I(this,Qr,ET).call(this,{parent:this,id:s,x:r,y:i,uiManager:c(this,te),isCentered:!0,...e});A&&this.add(A)}async deserialize(t){var e;return await((e=c($a,jh).get(t.annotationType??t.annotationEditorType))==null?void 0:e.deserialize(t,this,c(this,te)))||null}createAndAddNewEditor(t,e,r={}){const i=c(this,te).getId(),s=I(this,Qr,ET).call(this,{parent:this,id:i,x:t.offsetX,y:t.offsetY,uiManager:c(this,te),isCentered:e,...r});return s&&this.add(s),s}get boundingClientRect(){return this.div.getBoundingClientRect()}addNewEditor(t={}){this.createAndAddNewEditor(I(this,Qr,ST).call(this),!0,t)}setSelected(t){c(this,te).setSelected(t)}toggleSelected(t){c(this,te).toggleSelected(t)}unselect(t){c(this,te).unselect(t)}pointerup(t){var i;const{isMac:e}=Ti.platform;if(t.button!==0||t.ctrlKey&&e||t.target!==this.div||!c(this,Vh)||(C(this,Vh,!1),(i=c(this,Qr,qo))!=null&&i.isDrawer&&c(this,Qr,qo).supportMultipleDrawings))return;if(!c(this,n0)){C(this,n0,!0);return}const r=c(this,te).getMode();if(r===Be.STAMP||r===Be.POPUP||r===Be.SIGNATURE){c(this,te).unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){var i;if(c(this,te).getMode()===Be.HIGHLIGHT&&this.enableTextSelection(),c(this,Vh)){C(this,Vh,!1);return}const{isMac:e}=Ti.platform;if(t.button!==0||t.ctrlKey&&e||t.target!==this.div)return;if(C(this,Vh,!0),(i=c(this,Qr,qo))!=null&&i.isDrawer){this.startDrawingSession(t);return}const r=c(this,te).getActive();C(this,n0,!r||r.isEmpty())}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),c(this,ja)){c(this,Qr,qo).startDrawing(this,c(this,te),!1,t);return}c(this,te).setCurrentDrawingSession(this),C(this,ja,new AbortController);const e=c(this,te).combinedSignal(c(this,ja));this.div.addEventListener("blur",({relatedTarget:r})=>{r&&!this.div.contains(r)&&(C(this,ac,null),this.commitOrRemove())},{signal:e}),c(this,Qr,qo).startDrawing(this,c(this,te),!1,t)}pause(t){if(t){const{activeElement:e}=document;this.div.contains(e)&&C(this,ac,e);return}c(this,ac)&&setTimeout(()=>{var e;(e=c(this,ac))==null||e.focus(),C(this,ac,null)},0)}endDrawingSession(t=!1){return c(this,ja)?(c(this,te).setCurrentDrawingSession(null),c(this,ja).abort(),C(this,ja,null),C(this,ac,null),c(this,Qr,qo).endDrawing(t)):null}findNewParent(t,e,r){const i=c(this,te).findParent(e,r);return i===null||i===this?!1:(i.changeParent(t),!0)}commitOrRemove(){return c(this,ja)?(this.endDrawingSession(),!0):!1}onScaleChanging(){c(this,ja)&&c(this,Qr,qo).onScaleChangingWhenDrawing(this)}destroy(){var t,e;this.commitOrRemove(),((t=c(this,te).getActive())==null?void 0:t.parent)===this&&(c(this,te).commitOrRemove(),c(this,te).setActiveEditor(null)),c(this,Ac)&&(clearTimeout(c(this,Ac)),C(this,Ac,null));for(const r of c(this,Ws).values())(e=c(this,ld))==null||e.removePointerInTextLayer(r.contentDiv),r.setParent(null),r.isAttachedToDOM=!1,r.div.remove();this.div=null,c(this,Ws).clear(),c(this,te).removeLayer(this)}async render({viewport:t}){this.viewport=t,Mc(this.div,t);for(const e of c(this,te).getEditors(this.pageIndex))this.add(e),e.rebuild();await c(this,te).findClonesForPage(this),this.div.hidden=this.isEmpty,this.updateMode()}update({viewport:t}){c(this,te).commitOrRemove(),I(this,Qr,_C).call(this);const e=this.viewport.rotation,r=t.rotation;if(this.viewport=t,Mc(this.div,{rotation:r}),e!==r)for(const i of c(this,Ws).values())i.rotate(r)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return c(this,te).viewParameters.realScale}};ld=new WeakMap,n0=new WeakMap,Hh=new WeakMap,Kh=new WeakMap,Ac=new WeakMap,Ws=new WeakMap,Vh=new WeakMap,s0=new WeakMap,A0=new WeakMap,ja=new WeakMap,ac=new WeakMap,bn=new WeakMap,oc=new WeakMap,Gh=new WeakMap,a0=new WeakMap,te=new WeakMap,jh=new WeakMap,Qr=new WeakSet,xT=function(){return c(this,Ws).size!==0?c(this,Ws).values():c(this,te).getEditors(this.pageIndex)},YR=function(t){c(this,te).unselectAll();const{target:e}=t;if(e===c(this,bn).div||(e.getAttribute("role")==="img"||e.classList.contains("endOfContent")||e.classList.contains("textLayerImagePlaceholder"))&&c(this,bn).div.contains(e)){const{isMac:r}=Ti.platform;if(t.button!==0||t.ctrlKey&&r)return;c(this,te).showAllEditors("highlight",!0,!0),c(this,bn).div.classList.add("free"),this.toggleDrawing(),W2.startHighlighting(this,c(this,te).direction==="ltr",{target:c(this,bn).div,x:t.x,y:t.y}),c(this,bn).div.addEventListener("pointerup",()=>{c(this,bn).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:c(this,te)._signal}),t.preventDefault()}},qo=function(){return c($a,jh).get(c(this,te).getMode())},ET=function(t){const e=c(this,Qr,qo);return e?new e.prototype.constructor(t):null},ST=function(){const{x:t,y:e,width:r,height:i}=this.boundingClientRect,s=Math.max(0,t),A=Math.max(0,e),a=Math.min(window.innerWidth,t+r),o=Math.min(window.innerHeight,e+i),l=(s+a)/2-t,h=(A+o)/2-e,[u,d]=this.viewport.rotation%180===0?[l,h]:[h,l];return{offsetX:u,offsetY:d}},_C=function(){for(const t of c(this,Ws).values())t.isEmpty()&&t.remove()},ct($a,"_initialized",!1),T($a,jh,new Map([Ax,lx,dx,W2,fx].map(t=>[t._editorType,t])));let Y2=$a;const rn=class rn{constructor(){T(this,Ro);T(this,Wa,null);T(this,Ts,new Map);T(this,cd,new Map)}setParent(t){if(!c(this,Wa)){C(this,Wa,t);return}if(c(this,Wa)!==t){if(c(this,Ts).size>0)for(const e of c(this,Ts).values())e.remove(),t.append(e);C(this,Wa,t)}}static get _svgFactory(){return Se(this,"_svgFactory",new vm)}draw(t,e=!1,r=!1){const i=Yi(rn,q1)._++,s=I(this,Ro,FT).call(this),A=rn._svgFactory.createElement("defs");s.append(A);const a=rn._svgFactory.createElement("path");A.append(a);const o=`path_${i}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke"),e&&c(this,cd).set(i,a);const l=r?I(this,Ro,ZR).call(this,A,o):null,h=rn._svgFactory.createElement("use");return s.append(h),h.setAttribute("href",`#${o}`),this.updateProperties(s,t),c(this,Ts).set(i,s),{id:i,clipPathId:`url(#${l})`}}drawOutline(t,e){const r=Yi(rn,q1)._++,i=I(this,Ro,FT).call(this),s=rn._svgFactory.createElement("defs");i.append(s);const A=rn._svgFactory.createElement("path");s.append(A);const a=`path_${r}`;A.setAttribute("id",a),A.setAttribute("vector-effect","non-scaling-stroke");let o;if(e){const u=rn._svgFactory.createElement("mask");s.append(u),o=`mask_${r}`,u.setAttribute("id",o),u.setAttribute("maskUnits","objectBoundingBox");const d=rn._svgFactory.createElement("rect");u.append(d),d.setAttribute("width","1"),d.setAttribute("height","1"),d.setAttribute("fill","white");const f=rn._svgFactory.createElement("use");u.append(f),f.setAttribute("href",`#${a}`),f.setAttribute("stroke","none"),f.setAttribute("fill","black"),f.setAttribute("fill-rule","nonzero"),f.classList.add("mask")}const l=rn._svgFactory.createElement("use");i.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const h=l.cloneNode();return i.append(h),l.classList.add("mainOutline"),h.classList.add("secondaryOutline"),this.updateProperties(i,t),c(this,Ts).set(r,i),r}finalizeDraw(t,e){c(this,cd).delete(t),this.updateProperties(t,e)}updateProperties(t,e){var o;if(!e)return;const{root:r,bbox:i,rootClass:s,path:A}=e,a=typeof t=="number"?c(this,Ts).get(t):t;if(a){if(r&&I(this,Ro,TT).call(this,a,r),i&&I(o=rn,wB,JR).call(o,a,i),s){const{classList:l}=a;for(const[h,u]of Object.entries(s))l.toggle(h,u)}if(A){const h=a.firstElementChild.firstElementChild;I(this,Ro,TT).call(this,h,A)}}}updateParent(t,e){if(e===this)return;const r=c(this,Ts).get(t);r&&(c(e,Wa).append(r),c(this,Ts).delete(t),c(e,Ts).set(t,r))}remove(t){c(this,cd).delete(t),c(this,Wa)!==null&&(c(this,Ts).get(t).remove(),c(this,Ts).delete(t))}destroy(){C(this,Wa,null);for(const t of c(this,Ts).values())t.remove();c(this,Ts).clear(),c(this,cd).clear()}};Wa=new WeakMap,Ts=new WeakMap,cd=new WeakMap,q1=new WeakMap,wB=new WeakSet,JR=function(t,[e,r,i,s]){const{style:A}=t;A.top=`${100*r}%`,A.left=`${100*e}%`,A.width=`${100*i}%`,A.height=`${100*s}%`},Ro=new WeakSet,FT=function(){const t=rn._svgFactory.create(1,1,!0);return c(this,Wa).append(t),t.setAttribute("aria-hidden",!0),t},ZR=function(t,e){const r=rn._svgFactory.createElement("clipPath");t.append(r);const i=`clip_${e}`;r.setAttribute("id",i),r.setAttribute("clipPathUnits","objectBoundingBox");const s=rn._svgFactory.createElement("use");return r.append(s),s.setAttribute("href",`#${e}`),s.classList.add("clip"),i},TT=function(t,e){for(const[r,i]of Object.entries(e))i===null?t.removeAttribute(r):t.setAttribute(r,i)},T(rn,wB),T(rn,q1,0);let J2=rn;function Z2(n){return`${(n*100).toFixed(2)}%`}const tw=class tw{constructor(t,e,r,i){T(this,yB);T(this,o0,[]);T(this,Y1,new Map);T(this,J1,null);T(this,l0,0);T(this,Ho,0);T(this,Ko,0);C(this,l0,t),C(this,o0,e),C(this,Ho,r.rawDims.pageWidth),C(this,Ko,r.rawDims.pageHeight),C(this,J1,i)}render(){const t=document.createElement("div");t.className="textLayerImages";for(let e=0;e<c(this,o0).length;e+=6){const r=I(this,yB,t6).call(this,c(this,o0).subarray(e,e+6));r&&t.append(r)}return t.addEventListener("contextmenu",e=>{var w;if(!(e.target instanceof HTMLCanvasElement))return;const r=e.target,i=c(this,Y1).get(r);if(!i)return;const s=(w=c(tw,Z1))==null?void 0:w.deref();if(s===r)return;s&&(s.width=0,s.height=0),C(tw,Z1,new WeakRef(r));const{inverseTransform:A,x1:a,y1:o,width:l,height:h}=i,u=c(this,J1).call(this),d=Math.ceil(a*u.width),f=Math.ceil(o*u.height),p=Math.floor((a+l/c(this,Ho))*u.width),m=Math.floor((o+h/c(this,Ko))*u.height);r.width=p-d,r.height=m-f;const y=r.getContext("2d");y.setTransform(...A),y.translate(-d,-f),y.drawImage(u,0,0)}),t}};o0=new WeakMap,Y1=new WeakMap,J1=new WeakMap,l0=new WeakMap,Ho=new WeakMap,Ko=new WeakMap,Z1=new WeakMap,yB=new WeakSet,t6=function([t,e,r,i,s,A]){const a=Math.hypot((s-t)*c(this,Ho),(A-e)*c(this,Ko)),o=Math.hypot((r-t)*c(this,Ho),(i-e)*c(this,Ko));if(a<c(this,l0)||o<c(this,l0))return null;const l=[(s-t)*c(this,Ho)/a,(A-e)*c(this,Ko)/a,(r-t)*c(this,Ho)/o,(i-e)*c(this,Ko)/o,0,0],h=Qt.inverseTransform(l),u=document.createElement("canvas");return u.className="textLayerImagePlaceholder",u.width=0,u.height=0,Object.assign(u.style,{opacity:0,position:"absolute",left:Z2(t),top:Z2(e),width:Z2(a/c(this,Ho)),height:Z2(o/c(this,Ko)),transformOrigin:"0% 0%",transform:`matrix(${l.join(",")})`}),c(this,Y1).set(u,{inverseTransform:h,width:a,height:o,x1:t,y1:e}),u},T(tw,Z1,null);let ty=tw;globalThis._pdfjsTestingUtils={HighlightOutliner:ax},globalThis.pdfjsLib={AbortException:sl,AnnotationEditorLayer:Y2,AnnotationEditorParamsType:Ie,AnnotationEditorType:Be,AnnotationEditorUIManager:kc,AnnotationLayer:G2,AnnotationMode:nl,AnnotationType:Fi,applyOpacity:xU,build:d3,ColorPicker:pm,createValidAbsoluteUrl:U5,CSSConstants:CU,DOMSVGFactory:vm,DrawLayer:J2,FeatureTest:Ti,fetchData:C2,findContrastColor:_U,getDocument:Y5,getFilenameFromUrl:wU,getPdfFilenameFromUrl:yU,getRGB:Xd,getRGBA:S2,getUuid:M5,getXfaPageViewport:BU,GlobalWorkerOptions:ba,ImageKind:tm,InvalidPDFException:v2,isDataScheme:Am,isPdfFile:E2,isValidExplicitDest:RU,makeArr:y2,makeMap:b2,makeObj:B2,MathClamp:Gr,noContextMenu:nA,normalizeUnicode:vU,OPS:ao,OutputScale:ya,PasswordResponses:gU,PDFDataRangeTransport:Z5,PDFDateString:om,PDFWorker:eg,PermissionFlag:dU,PixelsPerInch:al,RenderingCancelledException:x2,renderRichText:D5,ResponseException:im,setLayerDimensions:Mc,shadow:Se,SignatureExtractor:co,stopEvent:Jr,SupportedImageMimeTypes:F2,TextLayer:tg,TextLayerImages:ty,TouchManager:cm,updateUrlHash:L5,Util:Qt,VerbosityLevel:em,version:f3,XfaLayer:k5};const D9=Object.freeze(Object.defineProperty({__proto__:null,AbortException:sl,AnnotationEditorLayer:Y2,AnnotationEditorParamsType:Ie,AnnotationEditorType:Be,AnnotationEditorUIManager:kc,AnnotationLayer:G2,AnnotationMode:nl,AnnotationType:Fi,CSSConstants:CU,ColorPicker:pm,DOMSVGFactory:vm,DrawLayer:J2,FeatureTest:Ti,GlobalWorkerOptions:ba,ImageKind:tm,InvalidPDFException:v2,MathClamp:Gr,OPS:ao,OutputScale:ya,PDFDataRangeTransport:Z5,PDFDateString:om,PDFWorker:eg,PasswordResponses:gU,PermissionFlag:dU,PixelsPerInch:al,RenderingCancelledException:x2,ResponseException:im,SignatureExtractor:co,SupportedImageMimeTypes:F2,TextLayer:tg,TextLayerImages:ty,TouchManager:cm,Util:Qt,VerbosityLevel:em,XfaLayer:k5,applyOpacity:xU,build:d3,createValidAbsoluteUrl:U5,fetchData:C2,findContrastColor:_U,getDocument:Y5,getFilenameFromUrl:wU,getPdfFilenameFromUrl:yU,getRGB:Xd,getRGBA:S2,getUuid:M5,getXfaPageViewport:BU,isDataScheme:Am,isPdfFile:E2,isValidExplicitDest:RU,makeArr:y2,makeMap:b2,makeObj:B2,noContextMenu:nA,normalizeUnicode:vU,renderRichText:D5,setLayerDimensions:Mc,shadow:Se,stopEvent:Jr,updateUrlHash:L5,version:f3},Symbol.toStringTag,{value:"Module"}));ba.workerSrc="";const x3=25.4/72,gx=8;class E3{importFromFilePicker(t){const e=document.createElement("input");e.type="file",e.accept=".pdf",e.style.display="none",document.body.appendChild(e),e.addEventListener("change",async()=>{var s;const r=(s=e.files)==null?void 0:s[0];if(document.body.removeChild(e),!r)return;const i=await r.arrayBuffer();await this.convert(t,i)}),e.click()}async convert(t,e,r=1){try{const s=await(await Y5({data:e}).promise).getPage(r),a=s.getViewport({scale:1}).height,o=await s.getOperatorList(),l=this.extractEntities(o,a);if(l.length===0){Zs.log.warn("[PdfImport] No vector paths found in PDF page.");return}const h=t.doc.database.tables.blockTable.modelSpace;for(const u of l)h.appendEntity(u);Zs.log.info(`[PdfImport] Imported ${l.length} entities from PDF.`)}catch(i){Zs.log.error("[PdfImport] Failed to import PDF:",i)}}extractEntities(t,e){const{OPS:r}=D9,{fnArray:i,argsArray:s}=t,A=[];let a=[],o=[],l=0,h=0;const u=()=>{o.length>1&&a.push(o),o=[]},d=()=>{u();for(const m of a){const y=this.subpathToEntity(m);y&&A.push(y)}a=[]},f=(m,y)=>m*x3,p=(m,y)=>(e-y)*x3;for(let m=0;m<i.length;m++){const y=i[m],w=s[m];switch(y){case r.moveTo:{u(),l=w[0],h=w[1],o=[{x:f(l),y:p(l,h)}];break}case r.lineTo:{l=w[0],h=w[1],o.push({x:f(l),y:p(l,h)});break}case r.curveTo:{const[B,E,S,_,L,k]=w,H=px({x:l,y:h},{x:B,y:E},{x:S,y:_},{x:L,y:k},gx);for(const Q of H)o.push({x:f(Q.x,Q.y),y:p(Q.x,Q.y)});l=L,h=k;break}case r.curveTo2:{const[B,E,S,_]=w,L=px({x:l,y:h},{x:l,y:h},{x:B,y:E},{x:S,y:_},gx);for(const k of L)o.push({x:f(k.x,k.y),y:p(k.x,k.y)});l=S,h=_;break}case r.curveTo3:{const[B,E,S,_]=w,L=px({x:l,y:h},{x:B,y:E},{x:S,y:_},{x:S,y:_},gx);for(const k of L)o.push({x:f(k.x,k.y),y:p(k.x,k.y)});l=S,h=_;break}case r.closePath:{o.length>0&&a.length===0&&o.push({...o[0]}),u();break}case r.stroke:case r.fill:case r.eoFill:case r.fillStroke:case r.eoFillStroke:case r.endPath:{d();break}}}return d(),A}subpathToEntity(t){if(t.length<2)return null;if(t.length===2)return new Zs.AcDbLine(new Zs.AcGePoint3d(t[0].x,t[0].y,0),new Zs.AcGePoint3d(t[1].x,t[1].y,0));const e=new Zs.AcDbPolyline;for(let a=0;a<t.length;a++)e.addVertexAt(a,new Zs.AcGePoint2d(t[a].x,t[a].y));const r=t[0],i=t[t.length-1],s=r.x-i.x,A=r.y-i.y;return Math.sqrt(s*s+A*A)<1e-6&&(e.closed=!0),e}}function px(n,t,e,r,i){const s=[];for(let A=1;A<=i;A++){const a=A/i,o=1-a,l=o*o*o*n.x+3*o*o*a*t.x+3*o*a*a*e.x+a*a*a*r.x,h=o*o*o*n.y+3*o*o*a*t.y+3*o*a*a*e.y+a*a*a*r.y;s.push({x:l,y:h})}return s}class S3 extends Ye.AcEdCommand{async execute(t){new E3().importFromFilePicker(t)}}const F3="PdfPlugin",T3=["cpdf","ipdf"];async function _3(){const{AcApPdfPlugin:n}=await Promise.resolve().then(()=>YAt);return new n}function R9(n){n.registerLazyPlugin({name:F3,triggers:[...T3],loader:_3})}/*!
|
|
273
|
-
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
274
|
-
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
275
|
-
* Released under MIT License
|
|
276
|
-
*//*! *****************************************************************************
|
|
277
|
-
Copyright (c) Microsoft Corporation.
|
|
278
|
-
|
|
279
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
280
|
-
purpose with or without fee is hereby granted.
|
|
281
|
-
|
|
282
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
283
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
284
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
285
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
286
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
287
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
288
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
289
|
-
***************************************************************************** */var mx=function(n,t){return mx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},mx(n,t)};function Ba(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mx(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var vx=function(){return vx=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},vx.apply(this,arguments)};function gs(n,t,e,r){function i(s){return s instanceof e?s:new e(function(A){A(s)})}return new(e||(e=Promise))(function(s,A){function a(h){try{l(r.next(h))}catch(u){A(u)}}function o(h){try{l(r.throw(h))}catch(u){A(u)}}function l(h){h.done?s(h.value):i(h.value).then(a,o)}l((r=r.apply(n,[])).next())})}function Xn(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,A;return A={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function a(l){return function(h){return o([l,h])}}function o(l){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(n,e)}catch(h){l=[6,h],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ey(n,t,e){if(arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||t)}for(var ol=function(){function n(t,e,r,i){this.left=t,this.top=e,this.width=r,this.height=i}return n.prototype.add=function(t,e,r,i){return new n(this.left+t,this.top+e,this.width+r,this.height+i)},n.fromClientRect=function(t,e){return new n(e.left+t.windowBounds.left,e.top+t.windowBounds.top,e.width,e.height)},n.fromDOMRectList=function(t,e){var r=Array.from(e).find(function(i){return i.width!==0});return r?new n(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):n.EMPTY},n.EMPTY=new n(0,0,0,0),n}(),ry=function(n,t){return ol.fromClientRect(n,t.getBoundingClientRect())},H9=function(n){var t=n.body,e=n.documentElement;if(!t||!e)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,e.scrollWidth),Math.max(t.offsetWidth,e.offsetWidth),Math.max(t.clientWidth,e.clientWidth)),i=Math.max(Math.max(t.scrollHeight,e.scrollHeight),Math.max(t.offsetHeight,e.offsetHeight),Math.max(t.clientHeight,e.clientHeight));return new ol(0,0,r,i)},iy=function(n){for(var t=[],e=0,r=n.length;e<r;){var i=n.charCodeAt(e++);if(i>=55296&&i<=56319&&e<r){var s=n.charCodeAt(e++);(s&64512)===56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),e--)}else t.push(i)}return t},_i=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var e=n.length;if(!e)return"";for(var r=[],i=-1,s="";++i<e;){var A=n[i];A<=65535?r.push(A):(A-=65536,r.push((A>>10)+55296,A%1024+56320)),(i+1===e||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},I3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K9=typeof Uint8Array>"u"?[]:new Uint8Array(256),ny=0;ny<I3.length;ny++)K9[I3.charCodeAt(ny)]=ny;for(var U3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bm=typeof Uint8Array>"u"?[]:new Uint8Array(256),sy=0;sy<U3.length;sy++)bm[U3.charCodeAt(sy)]=sy;for(var V9=function(n){var t=n.length*.75,e=n.length,r,i=0,s,A,a,o;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),h=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<e;r+=4)s=bm[n.charCodeAt(r)],A=bm[n.charCodeAt(r+1)],a=bm[n.charCodeAt(r+2)],o=bm[n.charCodeAt(r+3)],h[i++]=s<<2|A>>4,h[i++]=(A&15)<<4|a>>2,h[i++]=(a&3)<<6|o&63;return l},G9=function(n){for(var t=n.length,e=[],r=0;r<t;r+=2)e.push(n[r+1]<<8|n[r]);return e},j9=function(n){for(var t=n.length,e=[],r=0;r<t;r+=4)e.push(n[r+3]<<24|n[r+2]<<16|n[r+1]<<8|n[r]);return e},bu=5,wx=11,yx=2,$9=wx-bu,L3=65536>>bu,W9=1<<bu,bx=W9-1,z9=1024>>bu,X9=L3+z9,q9=X9,Y9=32,J9=q9+Y9,Z9=65536>>wx,tV=1<<$9,eV=tV-1,Q3=function(n,t,e){return n.slice?n.slice(t,e):new Uint16Array(Array.prototype.slice.call(n,t,e))},rV=function(n,t,e){return n.slice?n.slice(t,e):new Uint32Array(Array.prototype.slice.call(n,t,e))},iV=function(n,t){var e=V9(n),r=Array.isArray(e)?j9(e):new Uint32Array(e),i=Array.isArray(e)?G9(e):new Uint16Array(e),s=24,A=Q3(i,s/2,r[4]/2),a=r[5]===2?Q3(i,(s+r[4])/2):rV(r,Math.ceil((s+r[4])/4));return new nV(r[0],r[1],r[2],r[3],A,a)},nV=function(){function n(t,e,r,i,s,A){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=A}return n.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>bu],e=(e<<yx)+(t&bx),this.data[e];if(t<=65535)return e=this.index[L3+(t-55296>>bu)],e=(e<<yx)+(t&bx),this.data[e];if(t<this.highStart)return e=J9-Z9+(t>>wx),e=this.index[e],e+=t>>bu&eV,e=this.index[e],e=(e<<yx)+(t&bx),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},n}(),N3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sV=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ay=0;Ay<N3.length;Ay++)sV[N3.charCodeAt(Ay)]=Ay;var AV="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",P3=50,aV=1,M3=2,k3=3,oV=4,lV=5,O3=7,D3=8,R3=9,Oc=10,Bx=11,H3=12,Cx=13,cV=14,Bm=15,xx=16,ay=17,Cm=18,hV=19,K3=20,Ex=21,xm=22,Sx=23,rg=24,aA=25,Em=26,Sm=27,ig=28,uV=29,Bu=30,fV=31,oy=32,ly=33,Fx=34,Tx=35,_x=36,Fm=37,Ix=38,cy=39,hy=40,Ux=41,V3=42,dV=43,gV=[9001,65288],G3="!",ze="×",uy="÷",Lx=iV(AV),ll=[Bu,_x],Qx=[aV,M3,k3,lV],j3=[Oc,D3],$3=[Sm,Em],pV=Qx.concat(j3),W3=[Ix,cy,hy,Fx,Tx],mV=[Bm,Cx],vV=function(n,t){t===void 0&&(t="strict");var e=[],r=[],i=[];return n.forEach(function(s,A){var a=Lx.get(s);if(a>P3?(i.push(!0),a-=P3):i.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return r.push(A),e.push(xx);if(a===oV||a===Bx){if(A===0)return r.push(A),e.push(Bu);var o=e[A-1];return pV.indexOf(o)===-1?(r.push(r[A-1]),e.push(o)):(r.push(A),e.push(Bu))}if(r.push(A),a===fV)return e.push(t==="strict"?Ex:Fm);if(a===V3||a===uV)return e.push(Bu);if(a===dV)return s>=131072&&s<=196605||s>=196608&&s<=262141?e.push(Fm):e.push(Bu);e.push(a)}),[r,e,i]},Nx=function(n,t,e,r){var i=r[e];if(Array.isArray(n)?n.indexOf(i)!==-1:n===i)for(var s=e;s<=r.length;){s++;var A=r[s];if(A===t)return!0;if(A!==Oc)break}if(i===Oc)for(var s=e;s>0;){s--;var a=r[s];if(Array.isArray(n)?n.indexOf(a)!==-1:n===a)for(var o=e;o<=r.length;){o++;var A=r[o];if(A===t)return!0;if(A!==Oc)break}if(a!==Oc)break}return!1},z3=function(n,t){for(var e=n;e>=0;){var r=t[e];if(r===Oc)e--;else return r}return 0},wV=function(n,t,e,r,i){if(e[r]===0)return ze;var s=r-1;if(Array.isArray(i)&&i[s]===!0)return ze;var A=s-1,a=s+1,o=t[s],l=A>=0?t[A]:0,h=t[a];if(o===M3&&h===k3)return ze;if(Qx.indexOf(o)!==-1)return G3;if(Qx.indexOf(h)!==-1||j3.indexOf(h)!==-1)return ze;if(z3(s,t)===D3)return uy;if(Lx.get(n[s])===Bx||(o===oy||o===ly)&&Lx.get(n[a])===Bx||o===O3||h===O3||o===R3||[Oc,Cx,Bm].indexOf(o)===-1&&h===R3||[ay,Cm,hV,rg,ig].indexOf(h)!==-1||z3(s,t)===xm||Nx(Sx,xm,s,t)||Nx([ay,Cm],Ex,s,t)||Nx(H3,H3,s,t))return ze;if(o===Oc)return uy;if(o===Sx||h===Sx)return ze;if(h===xx||o===xx)return uy;if([Cx,Bm,Ex].indexOf(h)!==-1||o===cV||l===_x&&mV.indexOf(o)!==-1||o===ig&&h===_x||h===K3||ll.indexOf(h)!==-1&&o===aA||ll.indexOf(o)!==-1&&h===aA||o===Sm&&[Fm,oy,ly].indexOf(h)!==-1||[Fm,oy,ly].indexOf(o)!==-1&&h===Em||ll.indexOf(o)!==-1&&$3.indexOf(h)!==-1||$3.indexOf(o)!==-1&&ll.indexOf(h)!==-1||[Sm,Em].indexOf(o)!==-1&&(h===aA||[xm,Bm].indexOf(h)!==-1&&t[a+1]===aA)||[xm,Bm].indexOf(o)!==-1&&h===aA||o===aA&&[aA,ig,rg].indexOf(h)!==-1)return ze;if([aA,ig,rg,ay,Cm].indexOf(h)!==-1)for(var u=s;u>=0;){var d=t[u];if(d===aA)return ze;if([ig,rg].indexOf(d)!==-1)u--;else break}if([Sm,Em].indexOf(h)!==-1)for(var u=[ay,Cm].indexOf(o)!==-1?A:s;u>=0;){var d=t[u];if(d===aA)return ze;if([ig,rg].indexOf(d)!==-1)u--;else break}if(Ix===o&&[Ix,cy,Fx,Tx].indexOf(h)!==-1||[cy,Fx].indexOf(o)!==-1&&[cy,hy].indexOf(h)!==-1||[hy,Tx].indexOf(o)!==-1&&h===hy||W3.indexOf(o)!==-1&&[K3,Em].indexOf(h)!==-1||W3.indexOf(h)!==-1&&o===Sm||ll.indexOf(o)!==-1&&ll.indexOf(h)!==-1||o===rg&&ll.indexOf(h)!==-1||ll.concat(aA).indexOf(o)!==-1&&h===xm&&gV.indexOf(n[a])===-1||ll.concat(aA).indexOf(h)!==-1&&o===Cm)return ze;if(o===Ux&&h===Ux){for(var f=e[s],p=1;f>0&&(f--,t[f]===Ux);)p++;if(p%2!==0)return ze}return o===oy&&h===ly?ze:uy},yV=function(n,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var e=vV(n,t.lineBreak),r=e[0],i=e[1],s=e[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(i=i.map(function(a){return[aA,Bu,V3].indexOf(a)!==-1?Fm:a}));var A=t.wordBreak==="keep-all"?s.map(function(a,o){return a&&n[o]>=19968&&n[o]<=40959}):void 0;return[r,i,A]},bV=function(){function n(t,e,r,i){this.codePoints=t,this.required=e===G3,this.start=r,this.end=i}return n.prototype.slice=function(){return _i.apply(void 0,this.codePoints.slice(this.start,this.end))},n}(),BV=function(n,t){var e=iy(n),r=yV(e,t),i=r[0],s=r[1],A=r[2],a=e.length,o=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var h=ze;l<a&&(h=wV(e,s,i,++l,A))===ze;);if(h!==ze||l===a){var u=new bV(e,h,o,l);return o=l,{value:u,done:!1}}return{done:!0,value:null}}}},CV=1,xV=2,Tm=4,X3=8,fy=10,q3=47,_m=92,EV=9,SV=32,dy=34,Im=61,FV=35,TV=36,_V=37,gy=39,py=40,Um=41,IV=95,Ds=45,UV=33,LV=60,QV=62,NV=64,PV=91,MV=93,kV=61,OV=123,my=63,DV=125,Y3=124,RV=126,HV=128,J3=65533,Px=42,Cu=43,KV=44,VV=58,GV=59,Lm=46,jV=0,$V=8,WV=11,zV=14,XV=31,qV=127,ho=-1,Z3=48,tL=97,eL=101,YV=102,JV=117,ZV=122,rL=65,iL=69,nL=70,tG=85,eG=90,qn=function(n){return n>=Z3&&n<=57},rG=function(n){return n>=55296&&n<=57343},ng=function(n){return qn(n)||n>=rL&&n<=nL||n>=tL&&n<=YV},iG=function(n){return n>=tL&&n<=ZV},nG=function(n){return n>=rL&&n<=eG},sG=function(n){return iG(n)||nG(n)},AG=function(n){return n>=HV},vy=function(n){return n===fy||n===EV||n===SV},wy=function(n){return sG(n)||AG(n)||n===IV},sL=function(n){return wy(n)||qn(n)||n===Ds},aG=function(n){return n>=jV&&n<=$V||n===WV||n>=zV&&n<=XV||n===qV},Dc=function(n,t){return n!==_m?!1:t!==fy},yy=function(n,t,e){return n===Ds?wy(t)||Dc(t,e):wy(n)?!0:!!(n===_m&&Dc(n,t))},Mx=function(n,t,e){return n===Cu||n===Ds?qn(t)?!0:t===Lm&&qn(e):qn(n===Lm?t:n)},oG=function(n){var t=0,e=1;(n[t]===Cu||n[t]===Ds)&&(n[t]===Ds&&(e=-1),t++);for(var r=[];qn(n[t]);)r.push(n[t++]);var i=r.length?parseInt(_i.apply(void 0,r),10):0;n[t]===Lm&&t++;for(var s=[];qn(n[t]);)s.push(n[t++]);var A=s.length,a=A?parseInt(_i.apply(void 0,s),10):0;(n[t]===iL||n[t]===eL)&&t++;var o=1;(n[t]===Cu||n[t]===Ds)&&(n[t]===Ds&&(o=-1),t++);for(var l=[];qn(n[t]);)l.push(n[t++]);var h=l.length?parseInt(_i.apply(void 0,l),10):0;return e*(i+a*Math.pow(10,-A))*Math.pow(10,o*h)},lG={type:2},cG={type:3},hG={type:4},uG={type:13},fG={type:8},dG={type:21},gG={type:9},pG={type:10},mG={type:11},vG={type:12},wG={type:14},by={type:23},yG={type:1},bG={type:25},BG={type:24},CG={type:26},xG={type:27},EG={type:28},SG={type:29},FG={type:31},kx={type:32},AL=function(){function n(){this._value=[]}return n.prototype.write=function(t){this._value=this._value.concat(iy(t))},n.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==kx;)t.push(e),e=this.consumeToken();return t},n.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case dy:return this.consumeStringToken(dy);case FV:var e=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);if(sL(e)||Dc(r,i)){var s=yy(e,r,i)?xV:CV,A=this.consumeName();return{type:5,value:A,flags:s}}break;case TV:if(this.peekCodePoint(0)===Im)return this.consumeCodePoint(),uG;break;case gy:return this.consumeStringToken(gy);case py:return lG;case Um:return cG;case Px:if(this.peekCodePoint(0)===Im)return this.consumeCodePoint(),wG;break;case Cu:if(Mx(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case KV:return hG;case Ds:var a=t,o=this.peekCodePoint(0),l=this.peekCodePoint(1);if(Mx(a,o,l))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(yy(a,o,l))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(o===Ds&&l===QV)return this.consumeCodePoint(),this.consumeCodePoint(),BG;break;case Lm:if(Mx(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case q3:if(this.peekCodePoint(0)===Px)for(this.consumeCodePoint();;){var h=this.consumeCodePoint();if(h===Px&&(h=this.consumeCodePoint(),h===q3))return this.consumeToken();if(h===ho)return this.consumeToken()}break;case VV:return CG;case GV:return xG;case LV:if(this.peekCodePoint(0)===UV&&this.peekCodePoint(1)===Ds&&this.peekCodePoint(2)===Ds)return this.consumeCodePoint(),this.consumeCodePoint(),bG;break;case NV:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),f=this.peekCodePoint(2);if(yy(u,d,f)){var A=this.consumeName();return{type:7,value:A}}break;case PV:return EG;case _m:if(Dc(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case MV:return SG;case kV:if(this.peekCodePoint(0)===Im)return this.consumeCodePoint(),fG;break;case OV:return mG;case DV:return vG;case JV:case tG:var p=this.peekCodePoint(0),m=this.peekCodePoint(1);return p===Cu&&(ng(m)||m===my)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case Y3:if(this.peekCodePoint(0)===Im)return this.consumeCodePoint(),gG;if(this.peekCodePoint(0)===Y3)return this.consumeCodePoint(),dG;break;case RV:if(this.peekCodePoint(0)===Im)return this.consumeCodePoint(),pG;break;case ho:return kx}return vy(t)?(this.consumeWhiteSpace(),FG):qn(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):wy(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:_i(t)}},n.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},n.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},n.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},n.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();ng(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var r=!1;e===my&&t.length<6;)t.push(e),e=this.consumeCodePoint(),r=!0;if(r){var i=parseInt(_i.apply(void 0,t.map(function(o){return o===my?Z3:o})),16),s=parseInt(_i.apply(void 0,t.map(function(o){return o===my?nL:o})),16);return{type:30,start:i,end:s}}var A=parseInt(_i.apply(void 0,t),16);if(this.peekCodePoint(0)===Ds&&ng(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var a=[];ng(e)&&a.length<6;)a.push(e),e=this.consumeCodePoint();var s=parseInt(_i.apply(void 0,a),16);return{type:30,start:A,end:s}}else return{type:30,start:A,end:A}},n.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===py?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===py?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},n.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===ho)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===gy||e===dy){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===ho||this.peekCodePoint(0)===Um)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),by)}for(;;){var i=this.consumeCodePoint();if(i===ho||i===Um)return{type:22,value:_i.apply(void 0,t)};if(vy(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===ho||this.peekCodePoint(0)===Um?(this.consumeCodePoint(),{type:22,value:_i.apply(void 0,t)}):(this.consumeBadUrlRemnants(),by);if(i===dy||i===gy||i===py||aG(i))return this.consumeBadUrlRemnants(),by;if(i===_m)if(Dc(i,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),by;else t.push(i)}},n.prototype.consumeWhiteSpace=function(){for(;vy(this.peekCodePoint(0));)this.consumeCodePoint()},n.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===Um||t===ho)return;Dc(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},n.prototype.consumeStringSlice=function(t){for(var e=5e4,r="";t>0;){var i=Math.min(e,t);r+=_i.apply(void 0,this._value.splice(0,i)),t-=i}return this._value.shift(),r},n.prototype.consumeStringToken=function(t){var e="",r=0;do{var i=this._value[r];if(i===ho||i===void 0||i===t)return e+=this.consumeStringSlice(r),{type:0,value:e};if(i===fy)return this._value.splice(0,r),yG;if(i===_m){var s=this._value[r+1];s!==ho&&s!==void 0&&(s===fy?(e+=this.consumeStringSlice(r),r=-1,this._value.shift()):Dc(i,s)&&(e+=this.consumeStringSlice(r),e+=_i(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},n.prototype.consumeNumber=function(){var t=[],e=Tm,r=this.peekCodePoint(0);for((r===Cu||r===Ds)&&t.push(this.consumeCodePoint());qn(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(r===Lm&&qn(i))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=X3;qn(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0),i=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((r===iL||r===eL)&&((i===Cu||i===Ds)&&qn(s)||qn(i)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=X3;qn(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[oG(t),e]},n.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],r=t[1],i=this.peekCodePoint(0),s=this.peekCodePoint(1),A=this.peekCodePoint(2);if(yy(i,s,A)){var a=this.consumeName();return{type:15,number:e,flags:r,unit:a}}return i===_V?(this.consumeCodePoint(),{type:16,number:e,flags:r}):{type:17,number:e,flags:r}},n.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(ng(t)){for(var e=_i(t);ng(this.peekCodePoint(0))&&e.length<6;)e+=_i(this.consumeCodePoint());vy(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(e,16);return r===0||rG(r)||r>1114111?J3:r}return t===ho?J3:t},n.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(sL(e))t+=_i(e);else if(Dc(e,this.peekCodePoint(0)))t+=_i(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),t}},n}(),aL=function(){function n(t){this._tokens=t}return n.create=function(t){var e=new AL;return e.write(t),new n(e.read())},n.parseValue=function(t){return n.create(t).parseComponentValue()},n.parseValues=function(t){return n.create(t).parseComponentValues()},n.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},n.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(e.type===32)return t;t.push(e),t.push()}},n.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},n.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},r=this.consumeToken();;){if(r.type===32||_G(r,t))return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue()),r=this.consumeToken()}},n.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue())}},n.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?kx:t},n.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},n}(),Qm=function(n){return n.type===15},sg=function(n){return n.type===17},Br=function(n){return n.type===20},TG=function(n){return n.type===0},Ox=function(n,t){return Br(n)&&n.value===t},oL=function(n){return n.type!==31},Ag=function(n){return n.type!==31&&n.type!==4},uo=function(n){var t=[],e=[];return n.forEach(function(r){if(r.type===4){if(e.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(e),e=[];return}r.type!==31&&e.push(r)}),e.length&&t.push(e),t},_G=function(n,t){return t===11&&n.type===12||t===28&&n.type===29?!0:t===2&&n.type===3},Rc=function(n){return n.type===17||n.type===15},Ki=function(n){return n.type===16||Rc(n)},lL=function(n){return n.length>1?[n[0],n[1]]:[n[0]]},Sn={type:17,number:0,flags:Tm},Dx={type:16,number:50,flags:Tm},Hc={type:16,number:100,flags:Tm},Nm=function(n,t,e){var r=n[0],i=n[1];return[kr(r,t),kr(typeof i<"u"?i:r,e)]},kr=function(n,t){if(n.type===16)return n.number/100*t;if(Qm(n))switch(n.unit){case"rem":case"em":return 16*n.number;case"px":default:return n.number}return n.number},cL="deg",hL="grad",uL="rad",fL="turn",By={name:"angle",parse:function(n,t){if(t.type===15)switch(t.unit){case cL:return Math.PI*t.number/180;case hL:return Math.PI/200*t.number;case uL:return t.number;case fL:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},dL=function(n){return n.type===15&&(n.unit===cL||n.unit===hL||n.unit===uL||n.unit===fL)},gL=function(n){var t=n.filter(Br).map(function(e){return e.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Sn,Sn];case"to top":case"bottom":return KA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Sn,Hc];case"to right":case"left":return KA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Hc,Hc];case"to bottom":case"top":return KA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Hc,Sn];case"to left":case"right":return KA(270)}return 0},KA=function(n){return Math.PI*n/180},Kc={name:"color",parse:function(n,t){if(t.type===18){var e=IG[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return e(n,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),i=t.value.substring(1,2),s=t.value.substring(2,3);return Gc(parseInt(r+r,16),parseInt(i+i,16),parseInt(s+s,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),i=t.value.substring(1,2),s=t.value.substring(2,3),A=t.value.substring(3,4);return Gc(parseInt(r+r,16),parseInt(i+i,16),parseInt(s+s,16),parseInt(A+A,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),i=t.value.substring(2,4),s=t.value.substring(4,6);return Gc(parseInt(r,16),parseInt(i,16),parseInt(s,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),i=t.value.substring(2,4),s=t.value.substring(4,6),A=t.value.substring(6,8);return Gc(parseInt(r,16),parseInt(i,16),parseInt(s,16),parseInt(A,16)/255)}}if(t.type===20){var a=cl[t.value.toUpperCase()];if(typeof a<"u")return a}return cl.TRANSPARENT}},Vc=function(n){return(255&n)===0},un=function(n){var t=255&n,e=255&n>>8,r=255&n>>16,i=255&n>>24;return t<255?"rgba("+i+","+r+","+e+","+t/255+")":"rgb("+i+","+r+","+e+")"},Gc=function(n,t,e,r){return(n<<24|t<<16|e<<8|Math.round(r*255)<<0)>>>0},pL=function(n,t){if(n.type===17)return n.number;if(n.type===16){var e=t===3?1:255;return t===3?n.number/100*e:Math.round(n.number/100*e)}return 0},mL=function(n,t){var e=t.filter(Ag);if(e.length===3){var r=e.map(pL),i=r[0],s=r[1],A=r[2];return Gc(i,s,A,1)}if(e.length===4){var a=e.map(pL),i=a[0],s=a[1],A=a[2],o=a[3];return Gc(i,s,A,o)}return 0};function Rx(n,t,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(t-n)*e*6+n:e<1/2?t:e<2/3?(t-n)*6*(2/3-e)+n:n}var vL=function(n,t){var e=t.filter(Ag),r=e[0],i=e[1],s=e[2],A=e[3],a=(r.type===17?KA(r.number):By.parse(n,r))/(Math.PI*2),o=Ki(i)?i.number/100:0,l=Ki(s)?s.number/100:0,h=typeof A<"u"&&Ki(A)?kr(A,1):1;if(o===0)return Gc(l*255,l*255,l*255,1);var u=l<=.5?l*(o+1):l+o-l*o,d=l*2-u,f=Rx(d,u,a+1/3),p=Rx(d,u,a),m=Rx(d,u,a-1/3);return Gc(f*255,p*255,m*255,h)},IG={hsl:vL,hsla:vL,rgb:mL,rgba:mL},Pm=function(n,t){return Kc.parse(n,aL.create(t).parseComponentValue())},cl={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},UG={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(n,t){return t.map(function(e){if(Br(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},LG={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Cy=function(n,t){var e=Kc.parse(n,t[0]),r=t[1];return r&&Ki(r)?{color:e,stop:r}:{color:e,stop:null}},wL=function(n,t){var e=n[0],r=n[n.length-1];e.stop===null&&(e.stop=Sn),r.stop===null&&(r.stop=Hc);for(var i=[],s=0,A=0;A<n.length;A++){var a=n[A].stop;if(a!==null){var o=kr(a,t);o>s?i.push(o):i.push(s),s=o}else i.push(null)}for(var l=null,A=0;A<i.length;A++){var h=i[A];if(h===null)l===null&&(l=A);else if(l!==null){for(var u=A-l,d=i[l-1],f=(h-d)/(u+1),p=1;p<=u;p++)i[l+p-1]=f*p;l=null}}return n.map(function(m,y){var w=m.color;return{color:w,stop:Math.max(Math.min(1,i[y]/t),0)}})},QG=function(n,t,e){var r=t/2,i=e/2,s=kr(n[0],t)-r,A=i-kr(n[1],e);return(Math.atan2(A,s)+Math.PI*2)%(Math.PI*2)},NG=function(n,t,e){var r=typeof n=="number"?n:QG(n,t,e),i=Math.abs(t*Math.sin(r))+Math.abs(e*Math.cos(r)),s=t/2,A=e/2,a=i/2,o=Math.sin(r-Math.PI/2)*a,l=Math.cos(r-Math.PI/2)*a;return[i,s-l,s+l,A-o,A+o]},Ca=function(n,t){return Math.sqrt(n*n+t*t)},yL=function(n,t,e,r,i){var s=[[0,0],[0,t],[n,0],[n,t]];return s.reduce(function(A,a){var o=a[0],l=a[1],h=Ca(e-o,r-l);return(i?h<A.optimumDistance:h>A.optimumDistance)?{optimumCorner:a,optimumDistance:h}:A},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},PG=function(n,t,e,r,i){var s=0,A=0;switch(n.size){case 0:n.shape===0?s=A=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-i)):n.shape===1&&(s=Math.min(Math.abs(t),Math.abs(t-r)),A=Math.min(Math.abs(e),Math.abs(e-i)));break;case 2:if(n.shape===0)s=A=Math.min(Ca(t,e),Ca(t,e-i),Ca(t-r,e),Ca(t-r,e-i));else if(n.shape===1){var a=Math.min(Math.abs(e),Math.abs(e-i))/Math.min(Math.abs(t),Math.abs(t-r)),o=yL(r,i,t,e,!0),l=o[0],h=o[1];s=Ca(l-t,(h-e)/a),A=a*s}break;case 1:n.shape===0?s=A=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-i)):n.shape===1&&(s=Math.max(Math.abs(t),Math.abs(t-r)),A=Math.max(Math.abs(e),Math.abs(e-i)));break;case 3:if(n.shape===0)s=A=Math.max(Ca(t,e),Ca(t,e-i),Ca(t-r,e),Ca(t-r,e-i));else if(n.shape===1){var a=Math.max(Math.abs(e),Math.abs(e-i))/Math.max(Math.abs(t),Math.abs(t-r)),u=yL(r,i,t,e,!1),l=u[0],h=u[1];s=Ca(l-t,(h-e)/a),A=a*s}break}return Array.isArray(n.size)&&(s=kr(n.size[0],r),A=n.size.length===2?kr(n.size[1],i):s),[s,A]},MG=function(n,t){var e=KA(180),r=[];return uo(t).forEach(function(i,s){if(s===0){var A=i[0];if(A.type===20&&A.value==="to"){e=gL(i);return}else if(dL(A)){e=By.parse(n,A);return}}var a=Cy(n,i);r.push(a)}),{angle:e,stops:r,type:1}},xy=function(n,t){var e=KA(180),r=[];return uo(t).forEach(function(i,s){if(s===0){var A=i[0];if(A.type===20&&["top","left","right","bottom"].indexOf(A.value)!==-1){e=gL(i);return}else if(dL(A)){e=(By.parse(n,A)+KA(270))%KA(360);return}}var a=Cy(n,i);r.push(a)}),{angle:e,stops:r,type:1}},kG=function(n,t){var e=KA(180),r=[],i=1,s=0,A=3,a=[];return uo(t).forEach(function(o,l){var h=o[0];if(l===0){if(Br(h)&&h.value==="linear"){i=1;return}else if(Br(h)&&h.value==="radial"){i=2;return}}if(h.type===18){if(h.name==="from"){var u=Kc.parse(n,h.values[0]);r.push({stop:Sn,color:u})}else if(h.name==="to"){var u=Kc.parse(n,h.values[0]);r.push({stop:Hc,color:u})}else if(h.name==="color-stop"){var d=h.values.filter(Ag);if(d.length===2){var u=Kc.parse(n,d[1]),f=d[0];sg(f)&&r.push({stop:{type:16,number:f.number*100,flags:f.flags},color:u})}}}}),i===1?{angle:(e+KA(180))%KA(360),stops:r,type:i}:{size:A,shape:s,stops:r,position:a,type:i}},bL="closest-side",BL="farthest-side",CL="closest-corner",xL="farthest-corner",EL="circle",SL="ellipse",FL="cover",TL="contain",OG=function(n,t){var e=0,r=3,i=[],s=[];return uo(t).forEach(function(A,a){var o=!0;if(a===0){var l=!1;o=A.reduce(function(u,d){if(l)if(Br(d))switch(d.value){case"center":return s.push(Dx),u;case"top":case"left":return s.push(Sn),u;case"right":case"bottom":return s.push(Hc),u}else(Ki(d)||Rc(d))&&s.push(d);else if(Br(d))switch(d.value){case EL:return e=0,!1;case SL:return e=1,!1;case"at":return l=!0,!1;case bL:return r=0,!1;case FL:case BL:return r=1,!1;case TL:case CL:return r=2,!1;case xL:return r=3,!1}else if(Rc(d)||Ki(d))return Array.isArray(r)||(r=[]),r.push(d),!1;return u},o)}if(o){var h=Cy(n,A);i.push(h)}}),{size:r,shape:e,stops:i,position:s,type:2}},Ey=function(n,t){var e=0,r=3,i=[],s=[];return uo(t).forEach(function(A,a){var o=!0;if(a===0?o=A.reduce(function(h,u){if(Br(u))switch(u.value){case"center":return s.push(Dx),!1;case"top":case"left":return s.push(Sn),!1;case"right":case"bottom":return s.push(Hc),!1}else if(Ki(u)||Rc(u))return s.push(u),!1;return h},o):a===1&&(o=A.reduce(function(h,u){if(Br(u))switch(u.value){case EL:return e=0,!1;case SL:return e=1,!1;case TL:case bL:return r=0,!1;case BL:return r=1,!1;case CL:return r=2,!1;case FL:case xL:return r=3,!1}else if(Rc(u)||Ki(u))return Array.isArray(r)||(r=[]),r.push(u),!1;return h},o)),o){var l=Cy(n,A);i.push(l)}}),{size:r,shape:e,stops:i,position:s,type:2}},DG=function(n){return n.type===1},RG=function(n){return n.type===2},Hx={name:"image",parse:function(n,t){if(t.type===22){var e={url:t.value,type:0};return n.cache.addImage(t.value),e}if(t.type===18){var r=_L[t.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(n,t.values)}throw new Error("Unsupported image type "+t.type)}};function HG(n){return!(n.type===20&&n.value==="none")&&(n.type!==18||!!_L[n.name])}var _L={"linear-gradient":MG,"-moz-linear-gradient":xy,"-ms-linear-gradient":xy,"-o-linear-gradient":xy,"-webkit-linear-gradient":xy,"radial-gradient":OG,"-moz-radial-gradient":Ey,"-ms-radial-gradient":Ey,"-o-radial-gradient":Ey,"-webkit-radial-gradient":Ey,"-webkit-gradient":kG},KG={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(n,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t.filter(function(r){return Ag(r)&&HG(r)}).map(function(r){return Hx.parse(n,r)})}},VG={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(n,t){return t.map(function(e){if(Br(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},GG={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(n,t){return uo(t).map(function(e){return e.filter(Ki)}).map(lL)}},jG={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(n,t){return uo(t).map(function(e){return e.filter(Br).map(function(r){return r.value}).join(" ")}).map($G)}},$G=function(n){switch(n){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},ag;(function(n){n.AUTO="auto",n.CONTAIN="contain",n.COVER="cover"})(ag||(ag={}));var WG={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(n,t){return uo(t).map(function(e){return e.filter(zG)})}},zG=function(n){return Br(n)||Ki(n)},Sy=function(n){return{name:"border-"+n+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},XG=Sy("top"),qG=Sy("right"),YG=Sy("bottom"),JG=Sy("left"),Fy=function(n){return{name:"border-radius-"+n,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return lL(e.filter(Ki))}}},ZG=Fy("top-left"),tj=Fy("top-right"),ej=Fy("bottom-right"),rj=Fy("bottom-left"),Ty=function(n){return{name:"border-"+n+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},ij=Ty("top"),nj=Ty("right"),sj=Ty("bottom"),Aj=Ty("left"),_y=function(n){return{name:"border-"+n+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return Qm(e)?e.number:0}}},aj=_y("top"),oj=_y("right"),lj=_y("bottom"),cj=_y("left"),hj={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},uj={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(n,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},fj={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(n,t){return t.filter(Br).reduce(function(e,r){return e|dj(r.value)},0)}},dj=function(n){switch(n){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},gj={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},pj={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(n,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},Iy;(function(n){n.NORMAL="normal",n.STRICT="strict"})(Iy||(Iy={}));var mj={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"strict":return Iy.STRICT;case"normal":default:return Iy.NORMAL}}},vj={name:"line-height",initialValue:"normal",prefix:!1,type:4},IL=function(n,t){return Br(n)&&n.value==="normal"?1.2*t:n.type===17?t*n.number:Ki(n)?kr(n,t):t},wj={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(n,t){return t.type===20&&t.value==="none"?null:Hx.parse(n,t)}},yj={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(n,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},Kx={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Uy=function(n){return{name:"margin-"+n,initialValue:"0",prefix:!1,type:4}},bj=Uy("top"),Bj=Uy("right"),Cj=Uy("bottom"),xj=Uy("left"),Ej={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(n,t){return t.filter(Br).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Sj={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ly=function(n){return{name:"padding-"+n,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Fj=Ly("top"),Tj=Ly("right"),_j=Ly("bottom"),Ij=Ly("left"),Uj={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(n,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Lj={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(n,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Qj={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.length===1&&Ox(t[0],"none")?[]:uo(t).map(function(e){for(var r={color:cl.TRANSPARENT,offsetX:Sn,offsetY:Sn,blur:Sn},i=0,s=0;s<e.length;s++){var A=e[s];Rc(A)?(i===0?r.offsetX=A:i===1?r.offsetY=A:r.blur=A,i++):r.color=Kc.parse(n,A)}return r})}},Nj={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Pj={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(n,t){if(t.type===20&&t.value==="none")return null;if(t.type===18){var e=Oj[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return e(t.values)}return null}},Mj=function(n){var t=n.filter(function(e){return e.type===17}).map(function(e){return e.number});return t.length===6?t:null},kj=function(n){var t=n.filter(function(o){return o.type===17}).map(function(o){return o.number}),e=t[0],r=t[1];t[2],t[3];var i=t[4],s=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var A=t[12],a=t[13];return t[14],t[15],t.length===16?[e,r,i,s,A,a]:null},Oj={matrix:Mj,matrix3d:kj},UL={type:16,number:50,flags:Tm},Dj=[UL,UL],Rj={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(n,t){var e=t.filter(Ki);return e.length!==2?Dj:[e[0],e[1]]}},Hj={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Mm;(function(n){n.NORMAL="normal",n.BREAK_ALL="break-all",n.KEEP_ALL="keep-all"})(Mm||(Mm={}));for(var Kj={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"break-all":return Mm.BREAK_ALL;case"keep-all":return Mm.KEEP_ALL;case"normal":default:return Mm.NORMAL}}},Vj={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(n,t){if(t.type===20)return{auto:!0,order:0};if(sg(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},LL={name:"time",parse:function(n,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},Gj={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(n,t){return sg(t)?t.number:1}},jj={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},$j={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(n,t){return t.filter(Br).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return e!==0})}},Wj={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(n,t){var e=[],r=[];return t.forEach(function(i){switch(i.type){case 20:case 0:e.push(i.value);break;case 17:e.push(i.number.toString());break;case 4:r.push(e.join(" ")),e.length=0;break}}),e.length&&r.push(e.join(" ")),r.map(function(i){return i.indexOf(" ")===-1?i:"'"+i+"'"})}},zj={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Xj={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(n,t){if(sg(t))return t.number;if(Br(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},qj={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.filter(Br).map(function(e){return e.value})}},Yj={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Zi=function(n,t){return(n&t)!==0},Jj={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(n,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t}},Zj={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;for(var r=[],i=t.filter(oL),s=0;s<i.length;s++){var A=i[s],a=i[s+1];if(A.type===20){var o=a&&sg(a)?a.number:1;r.push({counter:A.value,increment:o})}}return r}},t$={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return[];for(var e=[],r=t.filter(oL),i=0;i<r.length;i++){var s=r[i],A=r[i+1];if(Br(s)&&s.value!=="none"){var a=A&&sg(A)?A.number:0;e.push({counter:s.value,reset:a})}}return e}},e$={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(n,t){return t.filter(Qm).map(function(e){return LL.parse(n,e)})}},r$={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;var r=[],i=t.filter(TG);if(i.length%2!==0)return null;for(var s=0;s<i.length;s+=2){var A=i[s].value,a=i[s+1].value;r.push({open:A,close:a})}return r}},QL=function(n,t,e){if(!n)return"";var r=n[Math.min(t,n.length-1)];return r?e?r.open:r.close:""},i$={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.length===1&&Ox(t[0],"none")?[]:uo(t).map(function(e){for(var r={color:255,offsetX:Sn,offsetY:Sn,blur:Sn,spread:Sn,inset:!1},i=0,s=0;s<e.length;s++){var A=e[s];Ox(A,"inset")?r.inset=!0:Rc(A)?(i===0?r.offsetX=A:i===1?r.offsetY=A:i===2?r.blur=A:r.spread=A,i++):r.color=Kc.parse(n,A)}return r})}},n$={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(n,t){var e=[0,1,2],r=[];return t.filter(Br).forEach(function(i){switch(i.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),e.forEach(function(i){r.indexOf(i)===-1&&r.push(i)}),r}},s$={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},A$={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(n,t){return Qm(t)?t.number:0}},a$=function(){function n(t,e){var r,i;this.animationDuration=Gt(t,e$,e.animationDuration),this.backgroundClip=Gt(t,UG,e.backgroundClip),this.backgroundColor=Gt(t,LG,e.backgroundColor),this.backgroundImage=Gt(t,KG,e.backgroundImage),this.backgroundOrigin=Gt(t,VG,e.backgroundOrigin),this.backgroundPosition=Gt(t,GG,e.backgroundPosition),this.backgroundRepeat=Gt(t,jG,e.backgroundRepeat),this.backgroundSize=Gt(t,WG,e.backgroundSize),this.borderTopColor=Gt(t,XG,e.borderTopColor),this.borderRightColor=Gt(t,qG,e.borderRightColor),this.borderBottomColor=Gt(t,YG,e.borderBottomColor),this.borderLeftColor=Gt(t,JG,e.borderLeftColor),this.borderTopLeftRadius=Gt(t,ZG,e.borderTopLeftRadius),this.borderTopRightRadius=Gt(t,tj,e.borderTopRightRadius),this.borderBottomRightRadius=Gt(t,ej,e.borderBottomRightRadius),this.borderBottomLeftRadius=Gt(t,rj,e.borderBottomLeftRadius),this.borderTopStyle=Gt(t,ij,e.borderTopStyle),this.borderRightStyle=Gt(t,nj,e.borderRightStyle),this.borderBottomStyle=Gt(t,sj,e.borderBottomStyle),this.borderLeftStyle=Gt(t,Aj,e.borderLeftStyle),this.borderTopWidth=Gt(t,aj,e.borderTopWidth),this.borderRightWidth=Gt(t,oj,e.borderRightWidth),this.borderBottomWidth=Gt(t,lj,e.borderBottomWidth),this.borderLeftWidth=Gt(t,cj,e.borderLeftWidth),this.boxShadow=Gt(t,i$,e.boxShadow),this.color=Gt(t,hj,e.color),this.direction=Gt(t,uj,e.direction),this.display=Gt(t,fj,e.display),this.float=Gt(t,gj,e.cssFloat),this.fontFamily=Gt(t,Wj,e.fontFamily),this.fontSize=Gt(t,zj,e.fontSize),this.fontStyle=Gt(t,Yj,e.fontStyle),this.fontVariant=Gt(t,qj,e.fontVariant),this.fontWeight=Gt(t,Xj,e.fontWeight),this.letterSpacing=Gt(t,pj,e.letterSpacing),this.lineBreak=Gt(t,mj,e.lineBreak),this.lineHeight=Gt(t,vj,e.lineHeight),this.listStyleImage=Gt(t,wj,e.listStyleImage),this.listStylePosition=Gt(t,yj,e.listStylePosition),this.listStyleType=Gt(t,Kx,e.listStyleType),this.marginTop=Gt(t,bj,e.marginTop),this.marginRight=Gt(t,Bj,e.marginRight),this.marginBottom=Gt(t,Cj,e.marginBottom),this.marginLeft=Gt(t,xj,e.marginLeft),this.opacity=Gt(t,Gj,e.opacity);var s=Gt(t,Ej,e.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=Gt(t,Sj,e.overflowWrap),this.paddingTop=Gt(t,Fj,e.paddingTop),this.paddingRight=Gt(t,Tj,e.paddingRight),this.paddingBottom=Gt(t,_j,e.paddingBottom),this.paddingLeft=Gt(t,Ij,e.paddingLeft),this.paintOrder=Gt(t,n$,e.paintOrder),this.position=Gt(t,Lj,e.position),this.textAlign=Gt(t,Uj,e.textAlign),this.textDecorationColor=Gt(t,jj,(r=e.textDecorationColor)!==null&&r!==void 0?r:e.color),this.textDecorationLine=Gt(t,$j,(i=e.textDecorationLine)!==null&&i!==void 0?i:e.textDecoration),this.textShadow=Gt(t,Qj,e.textShadow),this.textTransform=Gt(t,Nj,e.textTransform),this.transform=Gt(t,Pj,e.transform),this.transformOrigin=Gt(t,Rj,e.transformOrigin),this.visibility=Gt(t,Hj,e.visibility),this.webkitTextStrokeColor=Gt(t,s$,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=Gt(t,A$,e.webkitTextStrokeWidth),this.wordBreak=Gt(t,Kj,e.wordBreak),this.zIndex=Gt(t,Vj,e.zIndex)}return n.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},n.prototype.isTransparent=function(){return Vc(this.backgroundColor)},n.prototype.isTransformed=function(){return this.transform!==null},n.prototype.isPositioned=function(){return this.position!==0},n.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},n.prototype.isFloating=function(){return this.float!==0},n.prototype.isInlineLevel=function(){return Zi(this.display,4)||Zi(this.display,33554432)||Zi(this.display,268435456)||Zi(this.display,536870912)||Zi(this.display,67108864)||Zi(this.display,134217728)},n}(),o$=function(){function n(t,e){this.content=Gt(t,Jj,e.content),this.quotes=Gt(t,r$,e.quotes)}return n}(),NL=function(){function n(t,e){this.counterIncrement=Gt(t,Zj,e.counterIncrement),this.counterReset=Gt(t,t$,e.counterReset)}return n}(),Gt=function(n,t,e){var r=new AL,i=e!==null&&typeof e<"u"?e.toString():t.initialValue;r.write(i);var s=new aL(r.read());switch(t.type){case 2:var A=s.parseComponentValue();return t.parse(n,Br(A)?A.value:t.initialValue);case 0:return t.parse(n,s.parseComponentValue());case 1:return t.parse(n,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(t.format){case"angle":return By.parse(n,s.parseComponentValue());case"color":return Kc.parse(n,s.parseComponentValue());case"image":return Hx.parse(n,s.parseComponentValue());case"length":var a=s.parseComponentValue();return Rc(a)?a:Sn;case"length-percentage":var o=s.parseComponentValue();return Ki(o)?o:Sn;case"time":return LL.parse(n,s.parseComponentValue())}break}},l$="data-html2canvas-debug",c$=function(n){var t=n.getAttribute(l$);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Vx=function(n,t){var e=c$(n);return e===1||t===e},fo=function(){function n(t,e){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,Vx(e,3))debugger;this.styles=new a$(t,window.getComputedStyle(e,null)),iE(e)&&(this.styles.animationDuration.some(function(r){return r>0})&&(e.style.animationDuration="0s"),this.styles.transform!==null&&(e.style.transform="none")),this.bounds=ry(this.context,e),Vx(e,4)&&(this.flags|=16)}return n}(),h$="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",PL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",km=typeof Uint8Array>"u"?[]:new Uint8Array(256),Qy=0;Qy<PL.length;Qy++)km[PL.charCodeAt(Qy)]=Qy;for(var u$=function(n){var t=n.length*.75,e=n.length,r,i=0,s,A,a,o;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),h=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<e;r+=4)s=km[n.charCodeAt(r)],A=km[n.charCodeAt(r+1)],a=km[n.charCodeAt(r+2)],o=km[n.charCodeAt(r+3)],h[i++]=s<<2|A>>4,h[i++]=(A&15)<<4|a>>2,h[i++]=(a&3)<<6|o&63;return l},f$=function(n){for(var t=n.length,e=[],r=0;r<t;r+=2)e.push(n[r+1]<<8|n[r]);return e},d$=function(n){for(var t=n.length,e=[],r=0;r<t;r+=4)e.push(n[r+3]<<24|n[r+2]<<16|n[r+1]<<8|n[r]);return e},xu=5,Gx=11,jx=2,g$=Gx-xu,ML=65536>>xu,p$=1<<xu,$x=p$-1,m$=1024>>xu,v$=ML+m$,w$=v$,y$=32,b$=w$+y$,B$=65536>>Gx,C$=1<<g$,x$=C$-1,kL=function(n,t,e){return n.slice?n.slice(t,e):new Uint16Array(Array.prototype.slice.call(n,t,e))},E$=function(n,t,e){return n.slice?n.slice(t,e):new Uint32Array(Array.prototype.slice.call(n,t,e))},S$=function(n,t){var e=u$(n),r=Array.isArray(e)?d$(e):new Uint32Array(e),i=Array.isArray(e)?f$(e):new Uint16Array(e),s=24,A=kL(i,s/2,r[4]/2),a=r[5]===2?kL(i,(s+r[4])/2):E$(r,Math.ceil((s+r[4])/4));return new F$(r[0],r[1],r[2],r[3],A,a)},F$=function(){function n(t,e,r,i,s,A){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=A}return n.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>xu],e=(e<<jx)+(t&$x),this.data[e];if(t<=65535)return e=this.index[ML+(t-55296>>xu)],e=(e<<jx)+(t&$x),this.data[e];if(t<this.highStart)return e=b$-B$+(t>>Gx),e=this.index[e],e+=t>>xu&x$,e=this.index[e],e=(e<<jx)+(t&$x),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},n}(),OL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T$=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ny=0;Ny<OL.length;Ny++)T$[OL.charCodeAt(Ny)]=Ny;var _$=1,Wx=2,zx=3,DL=4,RL=5,I$=7,HL=8,Xx=9,qx=10,KL=11,VL=12,GL=13,jL=14,Yx=15,U$=function(n){for(var t=[],e=0,r=n.length;e<r;){var i=n.charCodeAt(e++);if(i>=55296&&i<=56319&&e<r){var s=n.charCodeAt(e++);(s&64512)===56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),e--)}else t.push(i)}return t},L$=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var e=n.length;if(!e)return"";for(var r=[],i=-1,s="";++i<e;){var A=n[i];A<=65535?r.push(A):(A-=65536,r.push((A>>10)+55296,A%1024+56320)),(i+1===e||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},Q$=S$(h$),VA="×",Jx="÷",N$=function(n){return Q$.get(n)},P$=function(n,t,e){var r=e-2,i=t[r],s=t[e-1],A=t[e];if(s===Wx&&A===zx)return VA;if(s===Wx||s===zx||s===DL||A===Wx||A===zx||A===DL)return Jx;if(s===HL&&[HL,Xx,KL,VL].indexOf(A)!==-1||(s===KL||s===Xx)&&(A===Xx||A===qx)||(s===VL||s===qx)&&A===qx||A===GL||A===RL||A===I$||s===_$)return VA;if(s===GL&&A===jL){for(;i===RL;)i=t[--r];if(i===jL)return VA}if(s===Yx&&A===Yx){for(var a=0;i===Yx;)a++,i=t[--r];if(a%2===0)return VA}return Jx},M$=function(n){var t=U$(n),e=t.length,r=0,i=0,s=t.map(N$);return{next:function(){if(r>=e)return{done:!0,value:null};for(var A=VA;r<e&&(A=P$(t,s,++r))===VA;);if(A!==VA||r===e){var a=L$.apply(null,t.slice(i,r));return i=r,{value:a,done:!1}}return{done:!0,value:null}}}},k$=function(n){for(var t=M$(n),e=[],r;!(r=t.next()).done;)r.value&&e.push(r.value.slice());return e},O$=function(n){var t=123;if(n.createRange){var e=n.createRange();if(e.getBoundingClientRect){var r=n.createElement("boundtest");r.style.height=t+"px",r.style.display="block",n.body.appendChild(r),e.selectNode(r);var i=e.getBoundingClientRect(),s=Math.round(i.height);if(n.body.removeChild(r),s===t)return!0}}return!1},D$=function(n){var t=n.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",n.body.appendChild(t);var e=n.createRange();t.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var r=t.firstChild,i=iy(r.data).map(function(o){return _i(o)}),s=0,A={},a=i.every(function(o,l){e.setStart(r,s),e.setEnd(r,s+o.length);var h=e.getBoundingClientRect();s+=o.length;var u=h.x>A.x||h.y>A.y;return A=h,l===0?!0:u});return n.body.removeChild(t),a},R$=function(){return typeof new Image().crossOrigin<"u"},H$=function(){return typeof new XMLHttpRequest().responseType=="string"},K$=function(n){var t=new Image,e=n.createElement("canvas"),r=e.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),e.toDataURL()}catch{return!1}return!0},$L=function(n){return n[0]===0&&n[1]===255&&n[2]===0&&n[3]===255},V$=function(n){var t=n.createElement("canvas"),e=100;t.width=e,t.height=e;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,e,e);var i=new Image,s=t.toDataURL();i.src=s;var A=Zx(e,e,0,0,i);return r.fillStyle="red",r.fillRect(0,0,e,e),WL(A).then(function(a){r.drawImage(a,0,0);var o=r.getImageData(0,0,e,e).data;r.fillStyle="red",r.fillRect(0,0,e,e);var l=n.createElement("div");return l.style.backgroundImage="url("+s+")",l.style.height=e+"px",$L(o)?WL(Zx(e,e,0,0,l)):Promise.reject(!1)}).then(function(a){return r.drawImage(a,0,0),$L(r.getImageData(0,0,e,e).data)}).catch(function(){return!1})},Zx=function(n,t,e,r,i){var s="http://www.w3.org/2000/svg",A=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return A.setAttributeNS(null,"width",n.toString()),A.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",e.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),A.appendChild(a),a.appendChild(i),A},WL=function(n){return new Promise(function(t,e){var r=new Image;r.onload=function(){return t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(n))})},Fn={get SUPPORT_RANGE_BOUNDS(){var n=O$(document);return Object.defineProperty(Fn,"SUPPORT_RANGE_BOUNDS",{value:n}),n},get SUPPORT_WORD_BREAKING(){var n=Fn.SUPPORT_RANGE_BOUNDS&&D$(document);return Object.defineProperty(Fn,"SUPPORT_WORD_BREAKING",{value:n}),n},get SUPPORT_SVG_DRAWING(){var n=K$(document);return Object.defineProperty(Fn,"SUPPORT_SVG_DRAWING",{value:n}),n},get SUPPORT_FOREIGNOBJECT_DRAWING(){var n=typeof Array.from=="function"&&typeof window.fetch=="function"?V$(document):Promise.resolve(!1);return Object.defineProperty(Fn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:n}),n},get SUPPORT_CORS_IMAGES(){var n=R$();return Object.defineProperty(Fn,"SUPPORT_CORS_IMAGES",{value:n}),n},get SUPPORT_RESPONSE_TYPE(){var n=H$();return Object.defineProperty(Fn,"SUPPORT_RESPONSE_TYPE",{value:n}),n},get SUPPORT_CORS_XHR(){var n="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Fn,"SUPPORT_CORS_XHR",{value:n}),n},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var n=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Fn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:n}),n}},Om=function(){function n(t,e){this.text=t,this.bounds=e}return n}(),G$=function(n,t,e,r){var i=W$(t,e),s=[],A=0;return i.forEach(function(a){if(e.textDecorationLine.length||a.trim().length>0)if(Fn.SUPPORT_RANGE_BOUNDS){var o=zL(r,A,a.length).getClientRects();if(o.length>1){var l=tE(a),h=0;l.forEach(function(d){s.push(new Om(d,ol.fromDOMRectList(n,zL(r,h+A,d.length).getClientRects()))),h+=d.length})}else s.push(new Om(a,ol.fromDOMRectList(n,o)))}else{var u=r.splitText(a.length);s.push(new Om(a,j$(n,r))),r=u}else Fn.SUPPORT_RANGE_BOUNDS||(r=r.splitText(a.length));A+=a.length}),s},j$=function(n,t){var e=t.ownerDocument;if(e){var r=e.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var s=ry(n,r);return r.firstChild&&i.replaceChild(r.firstChild,r),s}}return ol.EMPTY},zL=function(n,t,e){var r=n.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(n,t),i.setEnd(n,t+e),i},tE=function(n){if(Fn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(n)).map(function(e){return e.segment})}return k$(n)},$$=function(n,t){if(Fn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(n)).map(function(r){return r.segment})}return X$(n,t)},W$=function(n,t){return t.letterSpacing!==0?tE(n):$$(n,t)},z$=[32,160,4961,65792,65793,4153,4241],X$=function(n,t){for(var e=BV(n,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),r=[],i,s=function(){if(i.value){var A=i.value.slice(),a=iy(A),o="";a.forEach(function(l){z$.indexOf(l)===-1?o+=_i(l):(o.length&&r.push(o),r.push(_i(l)),o="")}),o.length&&r.push(o)}};!(i=e.next()).done;)s();return r},q$=function(){function n(t,e,r){this.text=Y$(e.data,r.textTransform),this.textBounds=G$(t,this.text,r,e)}return n}(),Y$=function(n,t){switch(t){case 1:return n.toLowerCase();case 3:return n.replace(J$,Z$);case 2:return n.toUpperCase();default:return n}},J$=/(^|\s|:|-|\(|\))([a-z])/g,Z$=function(n,t,e){return n.length>0?t+e.toUpperCase():n},XL=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.src=r.currentSrc||r.src,i.intrinsicWidth=r.naturalWidth,i.intrinsicHeight=r.naturalHeight,i.context.cache.addImage(i.src),i}return t}(fo),qL=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.canvas=r,i.intrinsicWidth=r.width,i.intrinsicHeight=r.height,i}return t}(fo),YL=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this,s=new XMLSerializer,A=ry(e,r);return r.setAttribute("width",A.width+"px"),r.setAttribute("height",A.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(r)),i.intrinsicWidth=r.width.baseVal.value,i.intrinsicHeight=r.height.baseVal.value,i.context.cache.addImage(i.svg),i}return t}(fo),JL=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.value=r.value,i}return t}(fo),eE=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.start=r.start,i.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,i}return t}(fo),tW=[{type:15,flags:0,unit:"px",number:3}],eW=[{type:16,flags:0,number:50}],rW=function(n){return n.width>n.height?new ol(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new ol(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n},iW=function(n){var t=n.type===nW?new Array(n.value.length+1).join("•"):n.value;return t.length===0?n.placeholder||"":t},Py="checkbox",My="radio",nW="password",ZL=707406591,rE=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;switch(i.type=r.type.toLowerCase(),i.checked=r.checked,i.value=iW(r),(i.type===Py||i.type===My)&&(i.styles.backgroundColor=3739148031,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=2779096575,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=1,i.styles.backgroundClip=[0],i.styles.backgroundOrigin=[0],i.bounds=rW(i.bounds)),i.type){case Py:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=tW;break;case My:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=eW;break}return i}return t}(fo),tQ=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this,s=r.options[r.selectedIndex||0];return i.value=s&&s.text||"",i}return t}(fo),eQ=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.value=r.value,i}return t}(fo),rQ=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;i.src=r.src,i.width=parseInt(r.width,10)||0,i.height=parseInt(r.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){i.tree=nQ(e,r.contentWindow.document.documentElement);var s=r.contentWindow.document.documentElement?Pm(e,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):cl.TRANSPARENT,A=r.contentWindow.document.body?Pm(e,getComputedStyle(r.contentWindow.document.body).backgroundColor):cl.TRANSPARENT;i.backgroundColor=Vc(s)?Vc(A)?i.styles.backgroundColor:A:s}}catch{}return i}return t}(fo),sW=["OL","UL","MENU"],ky=function(n,t,e,r){for(var i=t.firstChild,s=void 0;i;i=s)if(s=i.nextSibling,sQ(i)&&i.data.trim().length>0)e.textNodes.push(new q$(n,i,e.styles));else if(og(i))if(hQ(i)&&i.assignedNodes)i.assignedNodes().forEach(function(a){return ky(n,a,e,r)});else{var A=iQ(n,i);A.styles.isVisible()&&(AW(i,A,r)?A.flags|=4:aW(A.styles)&&(A.flags|=2),sW.indexOf(i.tagName)!==-1&&(A.flags|=8),e.elements.push(A),i.slot,i.shadowRoot?ky(n,i.shadowRoot,A,r):!Dy(i)&&!AQ(i)&&!Ry(i)&&ky(n,i,A,r))}},iQ=function(n,t){return sE(t)?new XL(n,t):aQ(t)?new qL(n,t):AQ(t)?new YL(n,t):oW(t)?new JL(n,t):lW(t)?new eE(n,t):cW(t)?new rE(n,t):Ry(t)?new tQ(n,t):Dy(t)?new eQ(n,t):lQ(t)?new rQ(n,t):new fo(n,t)},nQ=function(n,t){var e=iQ(n,t);return e.flags|=4,ky(n,t,e,e),e},AW=function(n,t,e){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||nE(n)&&e.styles.isTransparent()},aW=function(n){return n.isPositioned()||n.isFloating()},sQ=function(n){return n.nodeType===Node.TEXT_NODE},og=function(n){return n.nodeType===Node.ELEMENT_NODE},iE=function(n){return og(n)&&typeof n.style<"u"&&!Oy(n)},Oy=function(n){return typeof n.className=="object"},oW=function(n){return n.tagName==="LI"},lW=function(n){return n.tagName==="OL"},cW=function(n){return n.tagName==="INPUT"},hW=function(n){return n.tagName==="HTML"},AQ=function(n){return n.tagName==="svg"},nE=function(n){return n.tagName==="BODY"},aQ=function(n){return n.tagName==="CANVAS"},oQ=function(n){return n.tagName==="VIDEO"},sE=function(n){return n.tagName==="IMG"},lQ=function(n){return n.tagName==="IFRAME"},cQ=function(n){return n.tagName==="STYLE"},uW=function(n){return n.tagName==="SCRIPT"},Dy=function(n){return n.tagName==="TEXTAREA"},Ry=function(n){return n.tagName==="SELECT"},hQ=function(n){return n.tagName==="SLOT"},uQ=function(n){return n.tagName.indexOf("-")>0},fW=function(){function n(){this.counters={}}return n.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},n.prototype.getCounterValues=function(t){var e=this.counters[t];return e||[]},n.prototype.pop=function(t){var e=this;t.forEach(function(r){return e.counters[r].pop()})},n.prototype.parse=function(t){var e=this,r=t.counterIncrement,i=t.counterReset,s=!0;r!==null&&r.forEach(function(a){var o=e.counters[a.counter];o&&a.increment!==0&&(s=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=a.increment)});var A=[];return s&&i.forEach(function(a){var o=e.counters[a.counter];A.push(a.counter),o||(o=e.counters[a.counter]=[]),o.push(a.reset)}),A},n}(),fQ={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},dQ={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},dW={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},gW={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},lg=function(n,t,e,r,i,s){return n<t||n>e?Rm(n,i,s.length>0):r.integers.reduce(function(A,a,o){for(;n>=a;)n-=a,A+=r.values[o];return A},"")+s},gQ=function(n,t,e,r){var i="";do e||n--,i=r(n)+i,n/=t;while(n*t>=t);return i},Ii=function(n,t,e,r,i){var s=e-t+1;return(n<0?"-":"")+(gQ(Math.abs(n),s,r,function(A){return _i(Math.floor(A%s)+t)})+i)},Eu=function(n,t,e){e===void 0&&(e=". ");var r=t.length;return gQ(Math.abs(n),r,!1,function(i){return t[Math.floor(i%r)]})+e},cg=1,jc=2,$c=4,Dm=8,hl=function(n,t,e,r,i,s){if(n<-9999||n>9999)return Rm(n,4,i.length>0);var A=Math.abs(n),a=i;if(A===0)return t[0]+a;for(var o=0;A>0&&o<=4;o++){var l=A%10;l===0&&Zi(s,cg)&&a!==""?a=t[l]+a:l>1||l===1&&o===0||l===1&&o===1&&Zi(s,jc)||l===1&&o===1&&Zi(s,$c)&&n>100||l===1&&o>1&&Zi(s,Dm)?a=t[l]+(o>0?e[o-1]:"")+a:l===1&&o>0&&(a=e[o-1]+a),A=Math.floor(A/10)}return(n<0?r:"")+a},pQ="十百千萬",mQ="拾佰仟萬",vQ="マイナス",AE="마이너스",Rm=function(n,t,e){var r=e?". ":"",i=e?"、":"",s=e?", ":"",A=e?" ":"";switch(t){case 0:return"•"+A;case 1:return"◦"+A;case 2:return"◾"+A;case 5:var a=Ii(n,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return Eu(n,"〇一二三四五六七八九",i);case 6:return lg(n,1,3999,fQ,3,r).toLowerCase();case 7:return lg(n,1,3999,fQ,3,r);case 8:return Ii(n,945,969,!1,r);case 9:return Ii(n,97,122,!1,r);case 10:return Ii(n,65,90,!1,r);case 11:return Ii(n,1632,1641,!0,r);case 12:case 49:return lg(n,1,9999,dQ,3,r);case 35:return lg(n,1,9999,dQ,3,r).toLowerCase();case 13:return Ii(n,2534,2543,!0,r);case 14:case 30:return Ii(n,6112,6121,!0,r);case 15:return Eu(n,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Eu(n,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return hl(n,"零一二三四五六七八九",pQ,"負",i,jc|$c|Dm);case 47:return hl(n,"零壹貳參肆伍陸柒捌玖",mQ,"負",i,cg|jc|$c|Dm);case 42:return hl(n,"零一二三四五六七八九",pQ,"负",i,jc|$c|Dm);case 41:return hl(n,"零壹贰叁肆伍陆柒捌玖",mQ,"负",i,cg|jc|$c|Dm);case 26:return hl(n,"〇一二三四五六七八九","十百千万",vQ,i,0);case 25:return hl(n,"零壱弐参四伍六七八九","拾百千万",vQ,i,cg|jc|$c);case 31:return hl(n,"영일이삼사오육칠팔구","십백천만",AE,s,cg|jc|$c);case 33:return hl(n,"零一二三四五六七八九","十百千萬",AE,s,0);case 32:return hl(n,"零壹貳參四五六七八九","拾百千",AE,s,cg|jc|$c);case 18:return Ii(n,2406,2415,!0,r);case 20:return lg(n,1,19999,gW,3,r);case 21:return Ii(n,2790,2799,!0,r);case 22:return Ii(n,2662,2671,!0,r);case 22:return lg(n,1,10999,dW,3,r);case 23:return Eu(n,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Eu(n,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Ii(n,3302,3311,!0,r);case 28:return Eu(n,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Eu(n,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Ii(n,3792,3801,!0,r);case 37:return Ii(n,6160,6169,!0,r);case 38:return Ii(n,4160,4169,!0,r);case 39:return Ii(n,2918,2927,!0,r);case 40:return Ii(n,1776,1785,!0,r);case 43:return Ii(n,3046,3055,!0,r);case 44:return Ii(n,3174,3183,!0,r);case 45:return Ii(n,3664,3673,!0,r);case 46:return Ii(n,3872,3881,!0,r);case 3:default:return Ii(n,48,57,!0,r)}},wQ="data-html2canvas-ignore",yQ=function(){function n(t,e,r){if(this.context=t,this.options=r,this.scrolledElements=[],this.referenceElement=e,this.counters=new fW,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return n.prototype.toIFrame=function(t,e){var r=this,i=pW(t,e);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var s=t.defaultView.pageXOffset,A=t.defaultView.pageYOffset,a=i.contentWindow,o=a.document,l=wW(i).then(function(){return gs(r,void 0,void 0,function(){var h,u;return Xn(this,function(d){switch(d.label){case 0:return this.scrolledElements.forEach(CW),a&&(a.scrollTo(e.left,e.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==e.top||a.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-e.left,a.scrollY-e.top,0,0))),h=this.options.onclone,u=this.clonedReferenceElement,typeof u>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:d.sent(),d.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,vW(o)]:[3,4];case 3:d.sent(),d.label=4;case 4:return typeof h=="function"?[2,Promise.resolve().then(function(){return h(o,u)}).then(function(){return i})]:[2,i]}})})});return o.open(),o.write(bW(document.doctype)+"<html></html>"),BW(this.referenceElement.ownerDocument,s,A),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),l},n.prototype.createElementClone=function(t){if(Vx(t,2))debugger;if(aQ(t))return this.createCanvasClone(t);if(oQ(t))return this.createVideoClone(t);if(cQ(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return sE(e)&&(sE(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),uQ(e)?this.createCustomElementClone(e):e},n.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return aE(t.style,e),e},n.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var r=[].slice.call(e.cssRules,0).reduce(function(s,A){return A&&typeof A.cssText=="string"?s+A.cssText:s},""),i=t.cloneNode(!1);return i.textContent=r,i}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return t.cloneNode(!1)},n.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var r=t.ownerDocument.createElement("img");try{return r.src=t.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var i=t.cloneNode(!1);try{i.width=t.width,i.height=t.height;var s=t.getContext("2d"),A=i.getContext("2d");if(A)if(!this.options.allowTaint&&s)A.putImageData(s.getImageData(0,0,t.width,t.height),0,0);else{var a=(e=t.getContext("webgl2"))!==null&&e!==void 0?e:t.getContext("webgl");if(a){var o=a.getContextAttributes();(o==null?void 0:o.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}A.drawImage(t,0,0)}return i}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return i},n.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var r=e.getContext("2d");try{return r&&(r.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||r.getImageData(0,0,e.width,e.height)),e}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var i=t.ownerDocument.createElement("canvas");return i.width=t.offsetWidth,i.height=t.offsetHeight,i},n.prototype.appendChildNode=function(t,e,r){(!og(e)||!uW(e)&&!e.hasAttribute(wQ)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!og(e)||!cQ(e))&&t.appendChild(this.cloneNode(e,r))},n.prototype.cloneChildNodes=function(t,e,r){for(var i=this,s=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;s;s=s.nextSibling)if(og(s)&&hQ(s)&&typeof s.assignedNodes=="function"){var A=s.assignedNodes();A.length&&A.forEach(function(a){return i.appendChildNode(e,a,r)})}else this.appendChildNode(e,s,r)},n.prototype.cloneNode=function(t,e){if(sQ(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var r=t.ownerDocument.defaultView;if(r&&og(t)&&(iE(t)||Oy(t))){var i=this.createElementClone(t);i.style.transitionProperty="none";var s=r.getComputedStyle(t),A=r.getComputedStyle(t,":before"),a=r.getComputedStyle(t,":after");this.referenceElement===t&&iE(i)&&(this.clonedReferenceElement=i),nE(i)&&SW(i);var o=this.counters.parse(new NL(this.context,s)),l=this.resolvePseudoContent(t,i,A,Hm.BEFORE);uQ(t)&&(e=!0),oQ(t)||this.cloneChildNodes(t,i,e),l&&i.insertBefore(l,i.firstChild);var h=this.resolvePseudoContent(t,i,a,Hm.AFTER);return h&&i.appendChild(h),this.counters.pop(o),(s&&(this.options.copyStyles||Oy(t))&&!lQ(t)||e)&&aE(s,i),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([i,t.scrollLeft,t.scrollTop]),(Dy(t)||Ry(t))&&(Dy(i)||Ry(i))&&(i.value=t.value),i}return t.cloneNode(!1)},n.prototype.resolvePseudoContent=function(t,e,r,i){var s=this;if(r){var A=r.content,a=e.ownerDocument;if(!(!a||!A||A==="none"||A==="-moz-alt-content"||r.display==="none")){this.counters.parse(new NL(this.context,r));var o=new o$(this.context,r),l=a.createElement("html2canvaspseudoelement");aE(r,l),o.content.forEach(function(u){if(u.type===0)l.appendChild(a.createTextNode(u.value));else if(u.type===22){var d=a.createElement("img");d.src=u.value,d.style.opacity="1",l.appendChild(d)}else if(u.type===18){if(u.name==="attr"){var f=u.values.filter(Br);f.length&&l.appendChild(a.createTextNode(t.getAttribute(f[0].value)||""))}else if(u.name==="counter"){var p=u.values.filter(Ag),m=p[0],y=p[1];if(m&&Br(m)){var w=s.counters.getCounterValue(m.value),B=y&&Br(y)?Kx.parse(s.context,y.value):3;l.appendChild(a.createTextNode(Rm(w,B,!1)))}}else if(u.name==="counters"){var E=u.values.filter(Ag),m=E[0],S=E[1],y=E[2];if(m&&Br(m)){var _=s.counters.getCounterValues(m.value),L=y&&Br(y)?Kx.parse(s.context,y.value):3,k=S&&S.type===0?S.value:"",H=_.map(function(U){return Rm(U,L,!1)}).join(k);l.appendChild(a.createTextNode(H))}}}else if(u.type===20)switch(u.value){case"open-quote":l.appendChild(a.createTextNode(QL(o.quotes,s.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(QL(o.quotes,--s.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(u.value))}}),l.className=oE+" "+lE;var h=i===Hm.BEFORE?" "+oE:" "+lE;return Oy(e)?e.className.baseValue+=h:e.className+=h,l}}},n.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},n}(),Hm;(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"})(Hm||(Hm={}));var pW=function(n,t){var e=n.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=t.width.toString(),e.height=t.height.toString(),e.scrolling="no",e.setAttribute(wQ,"true"),n.body.appendChild(e),e},mW=function(n){return new Promise(function(t){if(n.complete){t();return}if(!n.src){t();return}n.onload=t,n.onerror=t})},vW=function(n){return Promise.all([].slice.call(n.images,0).map(mW))},wW=function(n){return new Promise(function(t,e){var r=n.contentWindow;if(!r)return e("No window assigned for iframe");var i=r.document;r.onload=n.onload=function(){r.onload=n.onload=null;var s=setInterval(function(){i.body.childNodes.length>0&&i.readyState==="complete"&&(clearInterval(s),t(n))},50)}})},yW=["all","d","content"],aE=function(n,t){for(var e=n.length-1;e>=0;e--){var r=n.item(e);yW.indexOf(r)===-1&&t.style.setProperty(r,n.getPropertyValue(r))}return t},bW=function(n){var t="";return n&&(t+="<!DOCTYPE ",n.name&&(t+=n.name),n.internalSubset&&(t+=n.internalSubset),n.publicId&&(t+='"'+n.publicId+'"'),n.systemId&&(t+='"'+n.systemId+'"'),t+=">"),t},BW=function(n,t,e){n&&n.defaultView&&(t!==n.defaultView.pageXOffset||e!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(t,e)},CW=function(n){var t=n[0],e=n[1],r=n[2];t.scrollLeft=e,t.scrollTop=r},xW=":before",EW=":after",oE="___html2canvas___pseudoelement_before",lE="___html2canvas___pseudoelement_after",bQ=`{
|
|
290
|
-
content: "" !important;
|
|
291
|
-
display: none !important;
|
|
292
|
-
}`,SW=function(n){FW(n,"."+oE+xW+bQ+`
|
|
293
|
-
.`+lE+EW+bQ)},FW=function(n,t){var e=n.ownerDocument;if(e){var r=e.createElement("style");r.textContent=t,n.appendChild(r)}},BQ=function(){function n(){}return n.getOrigin=function(t){var e=n._link;return e?(e.href=t,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},n.isSameOrigin=function(t){return n.getOrigin(t)===n._origin},n.setContext=function(t){n._link=t.document.createElement("a"),n._origin=n.getOrigin(t.location.href)},n._origin="about:blank",n}(),TW=function(){function n(t,e){this.context=t,this._options=e,this._cache={}}return n.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)||(hE(t)||LW(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),e},n.prototype.match=function(t){return this._cache[t]},n.prototype.loadImage=function(t){return gs(this,void 0,void 0,function(){var e,r,i,s,A=this;return Xn(this,function(a){switch(a.label){case 0:return e=BQ.isSameOrigin(t),r=!cE(t)&&this._options.useCORS===!0&&Fn.SUPPORT_CORS_IMAGES&&!e,i=!cE(t)&&!e&&!hE(t)&&typeof this._options.proxy=="string"&&Fn.SUPPORT_CORS_XHR&&!r,!e&&this._options.allowTaint===!1&&!cE(t)&&!hE(t)&&!i&&!r?[2]:(s=t,i?[4,this.proxy(s)]:[3,2]);case 1:s=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(o,l){var h=new Image;h.onload=function(){return o(h)},h.onerror=l,(QW(s)||r)&&(h.crossOrigin="anonymous"),h.src=s,h.complete===!0&&setTimeout(function(){return o(h)},500),A._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},n.prototype.has=function(t){return typeof this._cache[t]<"u"},n.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},n.prototype.proxy=function(t){var e=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var i=t.substring(0,256);return new Promise(function(s,A){var a=Fn.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(a==="text")s(o.response);else{var u=new FileReader;u.addEventListener("load",function(){return s(u.result)},!1),u.addEventListener("error",function(d){return A(d)},!1),u.readAsDataURL(o.response)}else A("Failed to proxy resource "+i+" with status code "+o.status)},o.onerror=A;var l=r.indexOf("?")>-1?"&":"?";if(o.open("GET",""+r+l+"url="+encodeURIComponent(t)+"&responseType="+a),a!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=a),e._options.imageTimeout){var h=e._options.imageTimeout;o.timeout=h,o.ontimeout=function(){return A("Timed out ("+h+"ms) proxying "+i)}}o.send()})},n}(),_W=/^data:image\/svg\+xml/i,IW=/^data:image\/.*;base64,/i,UW=/^data:image\/.*/i,LW=function(n){return Fn.SUPPORT_SVG_DRAWING||!NW(n)},cE=function(n){return UW.test(n)},QW=function(n){return IW.test(n)},hE=function(n){return n.substr(0,4)==="blob"},NW=function(n){return n.substr(-3).toLowerCase()==="svg"||_W.test(n)},Ht=function(){function n(t,e){this.type=0,this.x=t,this.y=e}return n.prototype.add=function(t,e){return new n(this.x+t,this.y+e)},n}(),hg=function(n,t,e){return new Ht(n.x+(t.x-n.x)*e,n.y+(t.y-n.y)*e)},Hy=function(){function n(t,e,r,i){this.type=1,this.start=t,this.startControl=e,this.endControl=r,this.end=i}return n.prototype.subdivide=function(t,e){var r=hg(this.start,this.startControl,t),i=hg(this.startControl,this.endControl,t),s=hg(this.endControl,this.end,t),A=hg(r,i,t),a=hg(i,s,t),o=hg(A,a,t);return e?new n(this.start,r,A,o):new n(o,a,s,this.end)},n.prototype.add=function(t,e){return new n(this.start.add(t,e),this.startControl.add(t,e),this.endControl.add(t,e),this.end.add(t,e))},n.prototype.reverse=function(){return new n(this.end,this.endControl,this.startControl,this.start)},n}(),GA=function(n){return n.type===1},PW=function(){function n(t){var e=t.styles,r=t.bounds,i=Nm(e.borderTopLeftRadius,r.width,r.height),s=i[0],A=i[1],a=Nm(e.borderTopRightRadius,r.width,r.height),o=a[0],l=a[1],h=Nm(e.borderBottomRightRadius,r.width,r.height),u=h[0],d=h[1],f=Nm(e.borderBottomLeftRadius,r.width,r.height),p=f[0],m=f[1],y=[];y.push((s+o)/r.width),y.push((p+u)/r.width),y.push((A+m)/r.height),y.push((l+d)/r.height);var w=Math.max.apply(Math,y);w>1&&(s/=w,A/=w,o/=w,l/=w,u/=w,d/=w,p/=w,m/=w);var B=r.width-o,E=r.height-d,S=r.width-u,_=r.height-m,L=e.borderTopWidth,k=e.borderRightWidth,H=e.borderBottomWidth,Q=e.borderLeftWidth,W=kr(e.paddingTop,t.bounds.width),U=kr(e.paddingRight,t.bounds.width),D=kr(e.paddingBottom,t.bounds.width),j=kr(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||A>0?Zr(r.left+Q/3,r.top+L/3,s-Q/3,A-L/3,cr.TOP_LEFT):new Ht(r.left+Q/3,r.top+L/3),this.topRightBorderDoubleOuterBox=s>0||A>0?Zr(r.left+B,r.top+L/3,o-k/3,l-L/3,cr.TOP_RIGHT):new Ht(r.left+r.width-k/3,r.top+L/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?Zr(r.left+S,r.top+E,u-k/3,d-H/3,cr.BOTTOM_RIGHT):new Ht(r.left+r.width-k/3,r.top+r.height-H/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?Zr(r.left+Q/3,r.top+_,p-Q/3,m-H/3,cr.BOTTOM_LEFT):new Ht(r.left+Q/3,r.top+r.height-H/3),this.topLeftBorderDoubleInnerBox=s>0||A>0?Zr(r.left+Q*2/3,r.top+L*2/3,s-Q*2/3,A-L*2/3,cr.TOP_LEFT):new Ht(r.left+Q*2/3,r.top+L*2/3),this.topRightBorderDoubleInnerBox=s>0||A>0?Zr(r.left+B,r.top+L*2/3,o-k*2/3,l-L*2/3,cr.TOP_RIGHT):new Ht(r.left+r.width-k*2/3,r.top+L*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?Zr(r.left+S,r.top+E,u-k*2/3,d-H*2/3,cr.BOTTOM_RIGHT):new Ht(r.left+r.width-k*2/3,r.top+r.height-H*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?Zr(r.left+Q*2/3,r.top+_,p-Q*2/3,m-H*2/3,cr.BOTTOM_LEFT):new Ht(r.left+Q*2/3,r.top+r.height-H*2/3),this.topLeftBorderStroke=s>0||A>0?Zr(r.left+Q/2,r.top+L/2,s-Q/2,A-L/2,cr.TOP_LEFT):new Ht(r.left+Q/2,r.top+L/2),this.topRightBorderStroke=s>0||A>0?Zr(r.left+B,r.top+L/2,o-k/2,l-L/2,cr.TOP_RIGHT):new Ht(r.left+r.width-k/2,r.top+L/2),this.bottomRightBorderStroke=u>0||d>0?Zr(r.left+S,r.top+E,u-k/2,d-H/2,cr.BOTTOM_RIGHT):new Ht(r.left+r.width-k/2,r.top+r.height-H/2),this.bottomLeftBorderStroke=p>0||m>0?Zr(r.left+Q/2,r.top+_,p-Q/2,m-H/2,cr.BOTTOM_LEFT):new Ht(r.left+Q/2,r.top+r.height-H/2),this.topLeftBorderBox=s>0||A>0?Zr(r.left,r.top,s,A,cr.TOP_LEFT):new Ht(r.left,r.top),this.topRightBorderBox=o>0||l>0?Zr(r.left+B,r.top,o,l,cr.TOP_RIGHT):new Ht(r.left+r.width,r.top),this.bottomRightBorderBox=u>0||d>0?Zr(r.left+S,r.top+E,u,d,cr.BOTTOM_RIGHT):new Ht(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||m>0?Zr(r.left,r.top+_,p,m,cr.BOTTOM_LEFT):new Ht(r.left,r.top+r.height),this.topLeftPaddingBox=s>0||A>0?Zr(r.left+Q,r.top+L,Math.max(0,s-Q),Math.max(0,A-L),cr.TOP_LEFT):new Ht(r.left+Q,r.top+L),this.topRightPaddingBox=o>0||l>0?Zr(r.left+Math.min(B,r.width-k),r.top+L,B>r.width+k?0:Math.max(0,o-k),Math.max(0,l-L),cr.TOP_RIGHT):new Ht(r.left+r.width-k,r.top+L),this.bottomRightPaddingBox=u>0||d>0?Zr(r.left+Math.min(S,r.width-Q),r.top+Math.min(E,r.height-H),Math.max(0,u-k),Math.max(0,d-H),cr.BOTTOM_RIGHT):new Ht(r.left+r.width-k,r.top+r.height-H),this.bottomLeftPaddingBox=p>0||m>0?Zr(r.left+Q,r.top+Math.min(_,r.height-H),Math.max(0,p-Q),Math.max(0,m-H),cr.BOTTOM_LEFT):new Ht(r.left+Q,r.top+r.height-H),this.topLeftContentBox=s>0||A>0?Zr(r.left+Q+j,r.top+L+W,Math.max(0,s-(Q+j)),Math.max(0,A-(L+W)),cr.TOP_LEFT):new Ht(r.left+Q+j,r.top+L+W),this.topRightContentBox=o>0||l>0?Zr(r.left+Math.min(B,r.width+Q+j),r.top+L+W,B>r.width+Q+j?0:o-Q+j,l-(L+W),cr.TOP_RIGHT):new Ht(r.left+r.width-(k+U),r.top+L+W),this.bottomRightContentBox=u>0||d>0?Zr(r.left+Math.min(S,r.width-(Q+j)),r.top+Math.min(E,r.height+L+W),Math.max(0,u-(k+U)),d-(H+D),cr.BOTTOM_RIGHT):new Ht(r.left+r.width-(k+U),r.top+r.height-(H+D)),this.bottomLeftContentBox=p>0||m>0?Zr(r.left+Q+j,r.top+_,Math.max(0,p-(Q+j)),m-(H+D),cr.BOTTOM_LEFT):new Ht(r.left+Q+j,r.top+r.height-(H+D))}return n}(),cr;(function(n){n[n.TOP_LEFT=0]="TOP_LEFT",n[n.TOP_RIGHT=1]="TOP_RIGHT",n[n.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",n[n.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(cr||(cr={}));var Zr=function(n,t,e,r,i){var s=4*((Math.sqrt(2)-1)/3),A=e*s,a=r*s,o=n+e,l=t+r;switch(i){case cr.TOP_LEFT:return new Hy(new Ht(n,l),new Ht(n,l-a),new Ht(o-A,t),new Ht(o,t));case cr.TOP_RIGHT:return new Hy(new Ht(n,t),new Ht(n+A,t),new Ht(o,l-a),new Ht(o,l));case cr.BOTTOM_RIGHT:return new Hy(new Ht(o,t),new Ht(o,t+a),new Ht(n+A,l),new Ht(n,l));case cr.BOTTOM_LEFT:default:return new Hy(new Ht(o,l),new Ht(o-A,l),new Ht(n,t+a),new Ht(n,t))}},Ky=function(n){return[n.topLeftBorderBox,n.topRightBorderBox,n.bottomRightBorderBox,n.bottomLeftBorderBox]},MW=function(n){return[n.topLeftContentBox,n.topRightContentBox,n.bottomRightContentBox,n.bottomLeftContentBox]},Vy=function(n){return[n.topLeftPaddingBox,n.topRightPaddingBox,n.bottomRightPaddingBox,n.bottomLeftPaddingBox]},kW=function(){function n(t,e,r){this.offsetX=t,this.offsetY=e,this.matrix=r,this.type=0,this.target=6}return n}(),Gy=function(){function n(t,e){this.path=t,this.target=e,this.type=1}return n}(),OW=function(){function n(t){this.opacity=t,this.type=2,this.target=6}return n}(),DW=function(n){return n.type===0},CQ=function(n){return n.type===1},RW=function(n){return n.type===2},xQ=function(n,t){return n.length===t.length?n.some(function(e,r){return e===t[r]}):!1},HW=function(n,t,e,r,i){return n.map(function(s,A){switch(A){case 0:return s.add(t,e);case 1:return s.add(t+r,e);case 2:return s.add(t+r,e+i);case 3:return s.add(t,e+i)}return s})},EQ=function(){function n(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return n}(),SQ=function(){function n(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new PW(this.container),this.container.styles.opacity<1&&this.effects.push(new OW(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new kW(r,i,s))}if(this.container.styles.overflowX!==0){var A=Ky(this.curves),a=Vy(this.curves);xQ(A,a)?this.effects.push(new Gy(A,6)):(this.effects.push(new Gy(A,2)),this.effects.push(new Gy(a,4)))}}return n.prototype.getEffects=function(t){for(var e=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,i=this.effects.slice(0);r;){var s=r.effects.filter(function(o){return!CQ(o)});if(e||r.container.styles.position!==0||!r.parent){if(i.unshift.apply(i,s),e=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var A=Ky(r.curves),a=Vy(r.curves);xQ(A,a)||i.unshift(new Gy(a,6))}}else i.unshift.apply(i,s);r=r.parent}return i.filter(function(o){return Zi(o.target,t)})},n}(),uE=function(n,t,e,r){n.container.elements.forEach(function(i){var s=Zi(i.flags,4),A=Zi(i.flags,2),a=new SQ(i,n);Zi(i.styles.display,2048)&&r.push(a);var o=Zi(i.flags,8)?[]:r;if(s||A){var l=s||i.styles.isPositioned()?e:t,h=new EQ(a);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var u=i.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(p,m){return u>p.element.container.styles.zIndex.order?(d=m,!1):d>0}),l.negativeZIndex.splice(d,0,h)}else if(u>0){var f=0;l.positiveZIndex.some(function(p,m){return u>=p.element.container.styles.zIndex.order?(f=m+1,!1):f>0}),l.positiveZIndex.splice(f,0,h)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(h)}else i.styles.isFloating()?l.nonPositionedFloats.push(h):l.nonPositionedInlineLevel.push(h);uE(a,h,s?h:e,o)}else i.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),uE(a,t,e,o);Zi(i.flags,8)&&FQ(i,o)})},FQ=function(n,t){for(var e=n instanceof eE?n.start:1,r=n instanceof eE?n.reversed:!1,i=0;i<t.length;i++){var s=t[i];s.container instanceof JL&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=Rm(e,s.container.styles.listStyleType,!0),e+=r?-1:1}},KW=function(n){var t=new SQ(n,null),e=new EQ(t),r=[];return uE(t,e,e,r),FQ(t.container,r),e},TQ=function(n,t){switch(t){case 0:return jA(n.topLeftBorderBox,n.topLeftPaddingBox,n.topRightBorderBox,n.topRightPaddingBox);case 1:return jA(n.topRightBorderBox,n.topRightPaddingBox,n.bottomRightBorderBox,n.bottomRightPaddingBox);case 2:return jA(n.bottomRightBorderBox,n.bottomRightPaddingBox,n.bottomLeftBorderBox,n.bottomLeftPaddingBox);case 3:default:return jA(n.bottomLeftBorderBox,n.bottomLeftPaddingBox,n.topLeftBorderBox,n.topLeftPaddingBox)}},VW=function(n,t){switch(t){case 0:return jA(n.topLeftBorderBox,n.topLeftBorderDoubleOuterBox,n.topRightBorderBox,n.topRightBorderDoubleOuterBox);case 1:return jA(n.topRightBorderBox,n.topRightBorderDoubleOuterBox,n.bottomRightBorderBox,n.bottomRightBorderDoubleOuterBox);case 2:return jA(n.bottomRightBorderBox,n.bottomRightBorderDoubleOuterBox,n.bottomLeftBorderBox,n.bottomLeftBorderDoubleOuterBox);case 3:default:return jA(n.bottomLeftBorderBox,n.bottomLeftBorderDoubleOuterBox,n.topLeftBorderBox,n.topLeftBorderDoubleOuterBox)}},GW=function(n,t){switch(t){case 0:return jA(n.topLeftBorderDoubleInnerBox,n.topLeftPaddingBox,n.topRightBorderDoubleInnerBox,n.topRightPaddingBox);case 1:return jA(n.topRightBorderDoubleInnerBox,n.topRightPaddingBox,n.bottomRightBorderDoubleInnerBox,n.bottomRightPaddingBox);case 2:return jA(n.bottomRightBorderDoubleInnerBox,n.bottomRightPaddingBox,n.bottomLeftBorderDoubleInnerBox,n.bottomLeftPaddingBox);case 3:default:return jA(n.bottomLeftBorderDoubleInnerBox,n.bottomLeftPaddingBox,n.topLeftBorderDoubleInnerBox,n.topLeftPaddingBox)}},jW=function(n,t){switch(t){case 0:return jy(n.topLeftBorderStroke,n.topRightBorderStroke);case 1:return jy(n.topRightBorderStroke,n.bottomRightBorderStroke);case 2:return jy(n.bottomRightBorderStroke,n.bottomLeftBorderStroke);case 3:default:return jy(n.bottomLeftBorderStroke,n.topLeftBorderStroke)}},jy=function(n,t){var e=[];return GA(n)?e.push(n.subdivide(.5,!1)):e.push(n),GA(t)?e.push(t.subdivide(.5,!0)):e.push(t),e},jA=function(n,t,e,r){var i=[];return GA(n)?i.push(n.subdivide(.5,!1)):i.push(n),GA(e)?i.push(e.subdivide(.5,!0)):i.push(e),GA(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),GA(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},_Q=function(n){var t=n.bounds,e=n.styles;return t.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},$y=function(n){var t=n.styles,e=n.bounds,r=kr(t.paddingLeft,e.width),i=kr(t.paddingRight,e.width),s=kr(t.paddingTop,e.width),A=kr(t.paddingBottom,e.width);return e.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+s+A))},$W=function(n,t){return n===0?t.bounds:n===2?$y(t):_Q(t)},WW=function(n,t){return n===0?t.bounds:n===2?$y(t):_Q(t)},fE=function(n,t,e){var r=$W(fg(n.styles.backgroundOrigin,t),n),i=WW(fg(n.styles.backgroundClip,t),n),s=zW(fg(n.styles.backgroundSize,t),e,r),A=s[0],a=s[1],o=Nm(fg(n.styles.backgroundPosition,t),r.width-A,r.height-a),l=XW(fg(n.styles.backgroundRepeat,t),o,s,r,i),h=Math.round(r.left+o[0]),u=Math.round(r.top+o[1]);return[l,h,u,A,a]},ug=function(n){return Br(n)&&n.value===ag.AUTO},Wy=function(n){return typeof n=="number"},zW=function(n,t,e){var r=t[0],i=t[1],s=t[2],A=n[0],a=n[1];if(!A)return[0,0];if(Ki(A)&&a&&Ki(a))return[kr(A,e.width),kr(a,e.height)];var o=Wy(s);if(Br(A)&&(A.value===ag.CONTAIN||A.value===ag.COVER)){if(Wy(s)){var l=e.width/e.height;return l<s!=(A.value===ag.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var h=Wy(r),u=Wy(i),d=h||u;if(ug(A)&&(!a||ug(a))){if(h&&u)return[r,i];if(!o&&!d)return[e.width,e.height];if(d&&o){var f=h?r:i*s,p=u?i:r/s;return[f,p]}var m=h?r:e.width,y=u?i:e.height;return[m,y]}if(o){var w=0,B=0;return Ki(A)?w=kr(A,e.width):Ki(a)&&(B=kr(a,e.height)),ug(A)?w=B*s:(!a||ug(a))&&(B=w/s),[w,B]}var E=null,S=null;if(Ki(A)?E=kr(A,e.width):a&&Ki(a)&&(S=kr(a,e.height)),E!==null&&(!a||ug(a))&&(S=h&&u?E/r*i:e.height),S!==null&&ug(A)&&(E=h&&u?S/i*r:e.width),E!==null&&S!==null)return[E,S];throw new Error("Unable to calculate background-size for element")},fg=function(n,t){var e=n[t];return typeof e>"u"?n[0]:e},XW=function(n,t,e,r,i){var s=t[0],A=t[1],a=e[0],o=e[1];switch(n){case 2:return[new Ht(Math.round(r.left),Math.round(r.top+A)),new Ht(Math.round(r.left+r.width),Math.round(r.top+A)),new Ht(Math.round(r.left+r.width),Math.round(o+r.top+A)),new Ht(Math.round(r.left),Math.round(o+r.top+A))];case 3:return[new Ht(Math.round(r.left+s),Math.round(r.top)),new Ht(Math.round(r.left+s+a),Math.round(r.top)),new Ht(Math.round(r.left+s+a),Math.round(r.height+r.top)),new Ht(Math.round(r.left+s),Math.round(r.height+r.top))];case 1:return[new Ht(Math.round(r.left+s),Math.round(r.top+A)),new Ht(Math.round(r.left+s+a),Math.round(r.top+A)),new Ht(Math.round(r.left+s+a),Math.round(r.top+A+o)),new Ht(Math.round(r.left+s),Math.round(r.top+A+o))];default:return[new Ht(Math.round(i.left),Math.round(i.top)),new Ht(Math.round(i.left+i.width),Math.round(i.top)),new Ht(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Ht(Math.round(i.left),Math.round(i.height+i.top))]}},qW="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",IQ="Hidden Text",YW=function(){function n(t){this._data={},this._document=t}return n.prototype.parseMetrics=function(t,e){var r=this._document.createElement("div"),i=this._document.createElement("img"),s=this._document.createElement("span"),A=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=e,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",A.appendChild(r),i.src=qW,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",s.style.fontFamily=t,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(IQ)),r.appendChild(s),r.appendChild(i);var a=i.offsetTop-s.offsetTop+2;r.removeChild(s),r.appendChild(this._document.createTextNode(IQ)),r.style.lineHeight="normal",i.style.verticalAlign="super";var o=i.offsetTop-r.offsetTop+2;return A.removeChild(r),{baseline:a,middle:o}},n.prototype.getMetrics=function(t,e){var r=t+" "+e;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,e)),this._data[r]},n}(),UQ=function(){function n(t,e){this.context=t,this.options=e}return n}(),JW=1e4,ZW=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i._activeEffects=[],i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),r.canvas||(i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px"),i.fontMetrics=new YW(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),i}return t.prototype.applyEffects=function(e){for(var r=this;this._activeEffects.length;)this.popEffect();e.forEach(function(i){return r.applyEffect(i)})},t.prototype.applyEffect=function(e){this.ctx.save(),RW(e)&&(this.ctx.globalAlpha=e.opacity),DW(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),CQ(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return gs(this,void 0,void 0,function(){var r;return Xn(this,function(i){switch(i.label){case 0:return r=e.element.container.styles,r.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return gs(this,void 0,void 0,function(){return Xn(this,function(r){switch(r.label){case 0:if(Zi(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(e)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,r,i){var s=this;if(r===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i);else{var A=tE(e.text);A.reduce(function(a,o){return s.ctx.fillText(o,a,e.bounds.top+i),a+s.ctx.measureText(o).width},e.bounds.left)}},t.prototype.createFontStyle=function(e){var r=e.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),i=nz(e.fontFamily).join(", "),s=Qm(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,r,e.fontWeight,s,i].join(" "),i,s]},t.prototype.renderTextNode=function(e,r){return gs(this,void 0,void 0,function(){var i,s,A,a,o,l,h,u,d=this;return Xn(this,function(f){return i=this.createFontStyle(r),s=i[0],A=i[1],a=i[2],this.ctx.font=s,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(A,a),l=o.baseline,h=o.middle,u=r.paintOrder,e.textBounds.forEach(function(p){u.forEach(function(m){switch(m){case 0:d.ctx.fillStyle=un(r.color),d.renderTextWithLetterSpacing(p,r.letterSpacing,l);var y=r.textShadow;y.length&&p.text.trim().length&&(y.slice(0).reverse().forEach(function(w){d.ctx.shadowColor=un(w.color),d.ctx.shadowOffsetX=w.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=w.offsetY.number*d.options.scale,d.ctx.shadowBlur=w.blur.number,d.renderTextWithLetterSpacing(p,r.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),r.textDecorationLine.length&&(d.ctx.fillStyle=un(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+l),p.bounds.width,1);break;case 2:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:d.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+h),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(d.ctx.strokeStyle=un(r.webkitTextStrokeColor),d.ctx.lineWidth=r.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(e,r,i){if(i&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=$y(e),A=Vy(r);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return gs(this,void 0,void 0,function(){var r,i,s,A,a,o,B,B,l,h,u,d,S,f,p,_,m,y,w,B,E,S,_;return Xn(this,function(L){switch(L.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,i=e.curves,s=r.styles,A=0,a=r.textNodes,L.label=1;case 1:return A<a.length?(o=a[A],[4,this.renderTextNode(o,s)]):[3,4];case 2:L.sent(),L.label=3;case 3:return A++,[3,1];case 4:if(!(r instanceof XL))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return B=L.sent(),this.renderReplacedElement(r,i,B),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof qL&&this.renderReplacedElement(r,i,r.canvas),!(r instanceof YL))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return B=L.sent(),this.renderReplacedElement(r,i,B),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof rQ&&r.tree?(l=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:h=L.sent(),r.width&&r.height&&this.ctx.drawImage(h,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),L.label=14;case 14:if(r instanceof rE&&(u=Math.min(r.bounds.width,r.bounds.height),r.type===Py?r.checked&&(this.ctx.save(),this.path([new Ht(r.bounds.left+u*.39363,r.bounds.top+u*.79),new Ht(r.bounds.left+u*.16,r.bounds.top+u*.5549),new Ht(r.bounds.left+u*.27347,r.bounds.top+u*.44071),new Ht(r.bounds.left+u*.39694,r.bounds.top+u*.5649),new Ht(r.bounds.left+u*.72983,r.bounds.top+u*.23),new Ht(r.bounds.left+u*.84,r.bounds.top+u*.34085),new Ht(r.bounds.left+u*.39363,r.bounds.top+u*.79)]),this.ctx.fillStyle=un(ZL),this.ctx.fill(),this.ctx.restore()):r.type===My&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+u/2,r.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=un(ZL),this.ctx.fill(),this.ctx.restore())),tz(r)&&r.value.length){switch(d=this.createFontStyle(s),S=d[0],f=d[1],p=this.fontMetrics.getMetrics(S,f).baseline,this.ctx.font=S,this.ctx.fillStyle=un(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=rz(r.styles.textAlign),_=$y(r),m=0,r.styles.textAlign){case 1:m+=_.width/2;break;case 2:m+=_.width;break}y=_.add(m,0,0,-_.height/2+1),this.ctx.save(),this.path([new Ht(_.left,_.top),new Ht(_.left+_.width,_.top),new Ht(_.left+_.width,_.top+_.height),new Ht(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Om(r.value,y),s.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Zi(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];B=void 0,E=w.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return B=L.sent(),this.ctx.drawImage(B,r.bounds.left-(B.width+10),r.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:e.listValue&&r.styles.listStyleType!==-1&&(S=this.createFontStyle(s)[0],this.ctx.font=S,this.ctx.fillStyle=un(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new ol(r.bounds.left,r.bounds.top+kr(r.styles.paddingTop,r.bounds.width),r.bounds.width,IL(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Om(e.listValue,_),s.letterSpacing,IL(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return gs(this,void 0,void 0,function(){var r,i,w,s,A,w,a,o,w,l,h,w,u,d,w,f,p,w,m,y,w;return Xn(this,function(B){switch(B.label){case 0:if(Zi(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:B.sent(),r=0,i=e.negativeZIndex,B.label=2;case 2:return r<i.length?(w=i[r],[4,this.renderStack(w)]):[3,5];case 3:B.sent(),B.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:B.sent(),s=0,A=e.nonInlineLevel,B.label=7;case 7:return s<A.length?(w=A[s],[4,this.renderNode(w)]):[3,10];case 8:B.sent(),B.label=9;case 9:return s++,[3,7];case 10:a=0,o=e.nonPositionedFloats,B.label=11;case 11:return a<o.length?(w=o[a],[4,this.renderStack(w)]):[3,14];case 12:B.sent(),B.label=13;case 13:return a++,[3,11];case 14:l=0,h=e.nonPositionedInlineLevel,B.label=15;case 15:return l<h.length?(w=h[l],[4,this.renderStack(w)]):[3,18];case 16:B.sent(),B.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,B.label=19;case 19:return u<d.length?(w=d[u],[4,this.renderNode(w)]):[3,22];case 20:B.sent(),B.label=21;case 21:return u++,[3,19];case 22:f=0,p=e.zeroOrAutoZIndexOrTransformedOrOpacity,B.label=23;case 23:return f<p.length?(w=p[f],[4,this.renderStack(w)]):[3,26];case 24:B.sent(),B.label=25;case 25:return f++,[3,23];case 26:m=0,y=e.positiveZIndex,B.label=27;case 27:return m<y.length?(w=y[m],[4,this.renderStack(w)]):[3,30];case 28:B.sent(),B.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var r=this;e.forEach(function(i,s){var A=GA(i)?i.start:i;s===0?r.ctx.moveTo(A.x,A.y):r.ctx.lineTo(A.x,A.y),GA(i)&&r.ctx.bezierCurveTo(i.startControl.x,i.startControl.y,i.endControl.x,i.endControl.y,i.end.x,i.end.y)})},t.prototype.renderRepeat=function(e,r,i,s){this.path(e),this.ctx.fillStyle=r,this.ctx.translate(i,s),this.ctx.fill(),this.ctx.translate(-i,-s)},t.prototype.resizeImage=function(e,r,i){var s;if(e.width===r&&e.height===i)return e;var A=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,a=A.createElement("canvas");a.width=Math.max(1,r),a.height=Math.max(1,i);var o=a.getContext("2d");return o.drawImage(e,0,0,e.width,e.height,0,0,r,i),a},t.prototype.renderBackgroundImage=function(e){return gs(this,void 0,void 0,function(){var r,i,s,A,a,o;return Xn(this,function(l){switch(l.label){case 0:r=e.styles.backgroundImage.length-1,i=function(h){var u,d,f,W,rt,it,j,V,H,p,W,rt,it,j,V,m,y,w,B,E,S,_,L,k,H,Q,W,U,D,j,V,st,rt,it,At,ut,vt,mt,M,$,q,tt;return Xn(this,function(et){switch(et.label){case 0:if(h.type!==0)return[3,5];u=void 0,d=h.url,et.label=1;case 1:return et.trys.push([1,3,,4]),[4,s.context.cache.match(d)];case 2:return u=et.sent(),[3,4];case 3:return et.sent(),s.context.logger.error("Error loading background-image "+d),[3,4];case 4:return u&&(f=fE(e,r,[u.width,u.height,u.width/u.height]),W=f[0],rt=f[1],it=f[2],j=f[3],V=f[4],H=s.ctx.createPattern(s.resizeImage(u,j,V),"repeat"),s.renderRepeat(W,H,rt,it)),[3,6];case 5:DG(h)?(p=fE(e,r,[null,null,null]),W=p[0],rt=p[1],it=p[2],j=p[3],V=p[4],m=NG(h.angle,j,V),y=m[0],w=m[1],B=m[2],E=m[3],S=m[4],_=document.createElement("canvas"),_.width=j,_.height=V,L=_.getContext("2d"),k=L.createLinearGradient(w,E,B,S),wL(h.stops,y).forEach(function(ot){return k.addColorStop(ot.stop,un(ot.color))}),L.fillStyle=k,L.fillRect(0,0,j,V),j>0&&V>0&&(H=s.ctx.createPattern(_,"repeat"),s.renderRepeat(W,H,rt,it))):RG(h)&&(Q=fE(e,r,[null,null,null]),W=Q[0],U=Q[1],D=Q[2],j=Q[3],V=Q[4],st=h.position.length===0?[Dx]:h.position,rt=kr(st[0],j),it=kr(st[st.length-1],V),At=PG(h,rt,it,j,V),ut=At[0],vt=At[1],ut>0&&vt>0&&(mt=s.ctx.createRadialGradient(U+rt,D+it,0,U+rt,D+it,ut),wL(h.stops,ut*2).forEach(function(ot){return mt.addColorStop(ot.stop,un(ot.color))}),s.path(W),s.ctx.fillStyle=mt,ut!==vt?(M=e.bounds.left+.5*e.bounds.width,$=e.bounds.top+.5*e.bounds.height,q=vt/ut,tt=1/q,s.ctx.save(),s.ctx.translate(M,$),s.ctx.transform(1,0,0,q,0,0),s.ctx.translate(-M,-$),s.ctx.fillRect(U,tt*(D-$)+$,j,V*tt),s.ctx.restore()):s.ctx.fill())),et.label=6;case 6:return r--,[2]}})},s=this,A=0,a=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return A<a.length?(o=a[A],[5,i(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,r,i){return gs(this,void 0,void 0,function(){return Xn(this,function(s){return this.path(TQ(i,r)),this.ctx.fillStyle=un(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,r,i,s){return gs(this,void 0,void 0,function(){var A,a;return Xn(this,function(o){switch(o.label){case 0:return r<3?[4,this.renderSolidBorder(e,i,s)]:[3,2];case 1:return o.sent(),[2];case 2:return A=VW(s,i),this.path(A),this.ctx.fillStyle=un(e),this.ctx.fill(),a=GW(s,i),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return gs(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u=this;return Xn(this,function(d){switch(d.label){case 0:return this.applyEffects(e.getEffects(2)),r=e.container.styles,i=!Vc(r.backgroundColor)||r.backgroundImage.length,s=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],A=ez(fg(r.backgroundClip,0),e.curves),i||r.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),Vc(r.backgroundColor)||(this.ctx.fillStyle=un(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(f){u.ctx.save();var p=Ky(e.curves),m=f.inset?0:JW,y=HW(p,-m+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(u.path(p),u.ctx.clip(),u.mask(y)):(u.mask(p),u.ctx.clip(),u.path(y)),u.ctx.shadowOffsetX=f.offsetX.number+m,u.ctx.shadowOffsetY=f.offsetY.number,u.ctx.shadowColor=un(f.color),u.ctx.shadowBlur=f.blur.number,u.ctx.fillStyle=f.inset?un(f.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),d.label=2;case 2:a=0,o=0,l=s,d.label=3;case 3:return o<l.length?(h=l[o],h.style!==0&&!Vc(h.color)&&h.width>0?h.style!==2?[3,5]:[4,this.renderDashedDottedBorder(h.color,h.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return h.style!==3?[3,7]:[4,this.renderDashedDottedBorder(h.color,h.width,a,e.curves,3)];case 6:return d.sent(),[3,11];case 7:return h.style!==4?[3,9]:[4,this.renderDoubleBorder(h.color,h.width,a,e.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(h.color,a,e.curves)];case 10:d.sent(),d.label=11;case 11:a++,d.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,r,i,s,A){return gs(this,void 0,void 0,function(){var a,o,l,h,u,d,f,p,m,y,w,B,E,S,_,L,_,L;return Xn(this,function(k){return this.ctx.save(),a=jW(s,i),o=TQ(s,i),A===2&&(this.path(o),this.ctx.clip()),GA(o[0])?(l=o[0].start.x,h=o[0].start.y):(l=o[0].x,h=o[0].y),GA(o[1])?(u=o[1].end.x,d=o[1].end.y):(u=o[1].x,d=o[1].y),i===0||i===2?f=Math.abs(l-u):f=Math.abs(h-d),this.ctx.beginPath(),A===3?this.formatPath(a):this.formatPath(o.slice(0,2)),p=r<3?r*3:r*2,m=r<3?r*2:r,A===3&&(p=r,m=r),y=!0,f<=p*2?y=!1:f<=p*2+m?(w=f/(2*p+m),p*=w,m*=w):(B=Math.floor((f+m)/(p+m)),E=(f-B*p)/(B-1),S=(f-(B+1)*p)/B,m=S<=0||Math.abs(m-E)<Math.abs(m-S)?E:S),y&&(A===3?this.ctx.setLineDash([0,p+m]):this.ctx.setLineDash([p,m])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=un(e),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(GA(o[0])&&(_=o[3],L=o[0],this.ctx.beginPath(),this.formatPath([new Ht(_.end.x,_.end.y),new Ht(L.start.x,L.start.y)]),this.ctx.stroke()),GA(o[1])&&(_=o[1],L=o[2],this.ctx.beginPath(),this.formatPath([new Ht(_.end.x,_.end.y),new Ht(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return gs(this,void 0,void 0,function(){var r;return Xn(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=un(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=KW(e),[4,this.renderStack(r)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(UQ),tz=function(n){return n instanceof eQ||n instanceof tQ?!0:n instanceof rE&&n.type!==My&&n.type!==Py},ez=function(n,t){switch(n){case 0:return Ky(t);case 2:return MW(t);case 1:default:return Vy(t)}},rz=function(n){switch(n){case 1:return"center";case 2:return"right";case 0:default:return"left"}},iz=["-apple-system","system-ui"],nz=function(n){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?n.filter(function(t){return iz.indexOf(t)===-1}):n},sz=function(n){Ba(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=r,i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),i}return t.prototype.render=function(e){return gs(this,void 0,void 0,function(){var r,i;return Xn(this,function(s){switch(s.label){case 0:return r=Zx(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Az(r)];case 1:return i=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=un(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(UQ),Az=function(n){return new Promise(function(t,e){var r=new Image;r.onload=function(){t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(n))})},az=function(){function n(t){var e=t.id,r=t.enabled;this.id=e,this.enabled=r,this.start=Date.now()}return n.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ey([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.prototype.getTime=function(){return Date.now()-this.start},n.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ey([this.id,this.getTime()+"ms"],t))},n.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ey([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,ey([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.instances={},n}(),oz=function(){function n(t,e){var r;this.windowBounds=e,this.instanceName="#"+n.instanceCount++,this.logger=new az({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new TW(this,t)}return n.instanceCount=1,n}(),lz=function(n,t){return t===void 0&&(t={}),cz(n,t)};typeof window<"u"&&BQ.setContext(window);var cz=function(n,t){return gs(void 0,void 0,void 0,function(){var e,r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,_,k,L,k,H,Q,W,U,D,j,V,st,rt,it,At,ut,vt,mt,M,$,q;return Xn(this,function(tt){switch(tt.label){case 0:if(!n||typeof n!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=n.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(r=e.defaultView,!r)throw new Error("Document is not attached to a Window");return i={allowTaint:(H=t.allowTaint)!==null&&H!==void 0?H:!1,imageTimeout:(Q=t.imageTimeout)!==null&&Q!==void 0?Q:15e3,proxy:t.proxy,useCORS:(W=t.useCORS)!==null&&W!==void 0?W:!1},s=vx({logging:(U=t.logging)!==null&&U!==void 0?U:!0,cache:t.cache},i),A={windowWidth:(D=t.windowWidth)!==null&&D!==void 0?D:r.innerWidth,windowHeight:(j=t.windowHeight)!==null&&j!==void 0?j:r.innerHeight,scrollX:(V=t.scrollX)!==null&&V!==void 0?V:r.pageXOffset,scrollY:(st=t.scrollY)!==null&&st!==void 0?st:r.pageYOffset},a=new ol(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),o=new oz(s,a),l=(rt=t.foreignObjectRendering)!==null&&rt!==void 0?rt:!1,h={allowTaint:(it=t.allowTaint)!==null&&it!==void 0?it:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),u=new yQ(o,n,h),d=u.clonedReferenceElement,d?[4,u.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=tt.sent(),p=nE(d)||hW(d)?H9(d.ownerDocument):ry(o,d),m=p.width,y=p.height,w=p.left,B=p.top,E=hz(o,d,t.backgroundColor),S={canvas:t.canvas,backgroundColor:E,scale:(ut=(At=t.scale)!==null&&At!==void 0?At:r.devicePixelRatio)!==null&&ut!==void 0?ut:1,x:((vt=t.x)!==null&&vt!==void 0?vt:0)+w,y:((mt=t.y)!==null&&mt!==void 0?mt:0)+B,width:(M=t.width)!==null&&M!==void 0?M:Math.ceil(m),height:($=t.height)!==null&&$!==void 0?$:Math.ceil(y)},l?(o.logger.debug("Document cloned, using foreign object rendering"),k=new sz(o,S),[4,k.render(d)]):[3,3];case 2:return _=tt.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+w+","+B+" with size "+m+"x"+y+" using computed rendering"),o.logger.debug("Starting DOM parsing"),L=nQ(o,d),E===L.styles.backgroundColor&&(L.styles.backgroundColor=cl.TRANSPARENT),o.logger.debug("Starting renderer for element at "+S.x+","+S.y+" with size "+S.width+"x"+S.height),k=new ZW(o,S),[4,k.render(L)];case 4:_=tt.sent(),tt.label=5;case 5:return(!((q=t.removeContainer)!==null&&q!==void 0)||q)&&(yQ.destroy(f)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,_]}})})},hz=function(n,t,e){var r=t.ownerDocument,i=r.documentElement?Pm(n,getComputedStyle(r.documentElement).backgroundColor):cl.TRANSPARENT,s=r.body?Pm(n,getComputedStyle(r.body).backgroundColor):cl.TRANSPARENT,A=typeof e=="string"?Pm(n,e):e===null?cl.TRANSPARENT:4294967295;return t===r.documentElement?Vc(i)?Vc(s)?A:s:i:A};const uz=Object.freeze(Object.defineProperty({__proto__:null,default:lz},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function LQ(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function fz(n){if(Array.isArray(n))return n}function dz(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,i,s,A,a=[],o=!0,l=!1;try{if(s=(e=e.call(n)).next,t!==0)for(;!(o=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(h){l=!0,i=h}finally{try{if(!o&&e.return!=null&&(A=e.return(),Object(A)!==A))return}finally{if(l)throw i}}return a}}function gz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
294
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pz(n,t){return fz(n)||dz(n,t)||mz(n,t)||gz()}function mz(n,t){if(n){if(typeof n=="string")return LQ(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?LQ(n,t):void 0}}const QQ=Object.entries,NQ=Object.setPrototypeOf,vz=Object.isFrozen,wz=Object.getPrototypeOf,yz=Object.getOwnPropertyDescriptor;let ps=Object.freeze,$A=Object.seal,dg=Object.create,PQ=typeof Reflect<"u"&&Reflect,dE=PQ.apply,gE=PQ.construct;ps||(ps=function(t){return t}),$A||($A=function(t){return t}),dE||(dE=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return t.apply(e,i)}),gE||(gE=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const gg=Vi(Array.prototype.forEach),bz=Vi(Array.prototype.lastIndexOf),MQ=Vi(Array.prototype.pop),pg=Vi(Array.prototype.push),Bz=Vi(Array.prototype.splice),ms=Array.isArray,Km=Vi(String.prototype.toLowerCase),pE=Vi(String.prototype.toString),kQ=Vi(String.prototype.match),mg=Vi(String.prototype.replace),OQ=Vi(String.prototype.indexOf),Cz=Vi(String.prototype.trim),xz=Vi(Number.prototype.toString),Ez=Vi(Boolean.prototype.toString),DQ=typeof BigInt>"u"?null:Vi(BigInt.prototype.toString),RQ=typeof Symbol>"u"?null:Vi(Symbol.prototype.toString),ui=Vi(Object.prototype.hasOwnProperty),Vm=Vi(Object.prototype.toString),Tn=Vi(RegExp.prototype.test),Gm=Sz(TypeError);function Vi(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return dE(n,t,r)}}function Sz(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return gE(n,e)}}function Oe(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Km;if(NQ&&NQ(n,null),!ms(t))return n;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=e(i);s!==i&&(vz(t)||(t[r]=s),i=s)}n[i]=!0}return n}function Fz(n){for(let t=0;t<n.length;t++)ui(n,t)||(n[t]=null);return n}function Yn(n){const t=dg(null);for(const r of QQ(n)){var e=pz(r,2);const i=e[0],s=e[1];ui(n,i)&&(ms(s)?t[i]=Fz(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=Yn(s):t[i]=s)}return t}function Tz(n){switch(typeof n){case"string":return n;case"number":return xz(n);case"boolean":return Ez(n);case"bigint":return DQ?DQ(n):"0";case"symbol":return RQ?RQ(n):"Symbol()";case"undefined":return Vm(n);case"function":case"object":{if(n===null)return Vm(n);const t=n,e=go(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:Vm(r)}return Vm(n)}default:return Vm(n)}}function go(n,t){for(;n!==null;){const r=yz(n,t);if(r){if(r.get)return Vi(r.get);if(typeof r.value=="function")return Vi(r.value)}n=wz(n)}function e(){return null}return e}function _z(n){try{return Tn(n,""),!0}catch{return!1}}const HQ=ps(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mE=ps(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vE=ps(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Iz=ps(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wE=ps(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Uz=ps(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),KQ=ps(["#text"]),VQ=ps(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),yE=ps(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),GQ=ps(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zy=ps(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Lz=$A(/{{[\w\W]*|^[\w\W]*}}/g),Qz=$A(/<%[\w\W]*|^[\w\W]*%>/g),Nz=$A(/\${[\w\W]*/g),Pz=$A(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mz=$A(/^aria-[\-\w]+$/),jQ=$A(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kz=$A(/^(?:\w+script|data):/i),Oz=$A(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dz=$A(/^html$/i),Rz=$A(/^[a-z][.\w]*(-[.\w]+)+$/i),po={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hz=function(){return typeof window>"u"?null:window},Kz=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(A){return A},createScriptURL(A){return A}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},$Q=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function WQ(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hz();const t=Zt=>WQ(Zt);if(t.version="3.4.7",t.removed=[],!n||!n.document||n.document.nodeType!==po.document||!n.Element)return t.isSupported=!1,t;let e=n.document;const r=e,i=r.currentScript;n.DocumentFragment;const s=n.HTMLTemplateElement,A=n.Node,a=n.Element,o=n.NodeFilter,l=n.NamedNodeMap;l===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const h=n.DOMParser,u=n.trustedTypes,d=a.prototype,f=go(d,"cloneNode"),p=go(d,"remove"),m=go(d,"nextSibling"),y=go(d,"childNodes"),w=go(d,"parentNode"),B=go(d,"shadowRoot"),E=go(d,"attributes"),S=A&&A.prototype?go(A.prototype,"nodeType"):null,_=A&&A.prototype?go(A.prototype,"nodeName"):null;if(typeof s=="function"){const Zt=e.createElement("template");Zt.content&&Zt.content.ownerDocument&&(e=Zt.content.ownerDocument)}let L,k="";const H=e,Q=H.implementation,W=H.createNodeIterator,U=H.createDocumentFragment,D=H.getElementsByTagName,j=r.importNode;let V=$Q();t.isSupported=typeof QQ=="function"&&typeof w=="function"&&Q&&Q.createHTMLDocument!==void 0;const st=Lz,rt=Qz,it=Nz,At=Pz,ut=Mz,vt=kz,mt=Oz,M=Rz;let $=jQ,q=null;const tt=Oe({},[...HQ,...mE,...vE,...wE,...KQ]);let et=null;const ot=Oe({},[...VQ,...yE,...GQ,...zy]);let dt=Object.seal(dg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,yt=null;const St=Object.seal(dg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mt=!0,Pt=!0,$t=!1,z=!0,Nt=!1,ve=!0,re=!1,Tt=!1,ie=!1,kt=!1,qt=!1,zt=!1,we=!0,Ne=!1;const me="user-content-";let Pe=!0,Ce=!1,Vt={},ce=null;const Xt=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let vr=null;const je=Oe({},["audio","video","img","source","image","track"]);let xe=null;const Ee=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nr="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let Ae=He,ge=!1,ar=null;const fe=Oe({},[nr,ne,He],pE);let de=Oe({},["mi","mo","mn","ms","mtext"]),Ze=Oe({},["annotation-xml"]);const lc=Oe({},["title","style","font","a","script"]);let bi=null;const za=["application/xhtml+xml","text/html"],la="text/html";let Kt=null,ss=null;const Xa=e.createElement("form"),_s=function(Z){return Z instanceof RegExp||Z instanceof Function},As=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ss&&ss===Z)return;(!Z||typeof Z!="object")&&(Z={}),Z=Yn(Z),bi=za.indexOf(Z.PARSER_MEDIA_TYPE)===-1?la:Z.PARSER_MEDIA_TYPE,Kt=bi==="application/xhtml+xml"?pE:Km,q=ui(Z,"ALLOWED_TAGS")&&ms(Z.ALLOWED_TAGS)?Oe({},Z.ALLOWED_TAGS,Kt):tt,et=ui(Z,"ALLOWED_ATTR")&&ms(Z.ALLOWED_ATTR)?Oe({},Z.ALLOWED_ATTR,Kt):ot,ar=ui(Z,"ALLOWED_NAMESPACES")&&ms(Z.ALLOWED_NAMESPACES)?Oe({},Z.ALLOWED_NAMESPACES,pE):fe,xe=ui(Z,"ADD_URI_SAFE_ATTR")&&ms(Z.ADD_URI_SAFE_ATTR)?Oe(Yn(Ee),Z.ADD_URI_SAFE_ATTR,Kt):Ee,vr=ui(Z,"ADD_DATA_URI_TAGS")&&ms(Z.ADD_DATA_URI_TAGS)?Oe(Yn(je),Z.ADD_DATA_URI_TAGS,Kt):je,ce=ui(Z,"FORBID_CONTENTS")&&ms(Z.FORBID_CONTENTS)?Oe({},Z.FORBID_CONTENTS,Kt):Xt,wt=ui(Z,"FORBID_TAGS")&&ms(Z.FORBID_TAGS)?Oe({},Z.FORBID_TAGS,Kt):Yn({}),yt=ui(Z,"FORBID_ATTR")&&ms(Z.FORBID_ATTR)?Oe({},Z.FORBID_ATTR,Kt):Yn({}),Vt=ui(Z,"USE_PROFILES")?Z.USE_PROFILES&&typeof Z.USE_PROFILES=="object"?Yn(Z.USE_PROFILES):Z.USE_PROFILES:!1,Mt=Z.ALLOW_ARIA_ATTR!==!1,Pt=Z.ALLOW_DATA_ATTR!==!1,$t=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,z=Z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Nt=Z.SAFE_FOR_TEMPLATES||!1,ve=Z.SAFE_FOR_XML!==!1,re=Z.WHOLE_DOCUMENT||!1,kt=Z.RETURN_DOM||!1,qt=Z.RETURN_DOM_FRAGMENT||!1,zt=Z.RETURN_TRUSTED_TYPE||!1,ie=Z.FORCE_BODY||!1,we=Z.SANITIZE_DOM!==!1,Ne=Z.SANITIZE_NAMED_PROPS||!1,Pe=Z.KEEP_CONTENT!==!1,Ce=Z.IN_PLACE||!1,$=_z(Z.ALLOWED_URI_REGEXP)?Z.ALLOWED_URI_REGEXP:jQ,Ae=typeof Z.NAMESPACE=="string"?Z.NAMESPACE:He,de=ui(Z,"MATHML_TEXT_INTEGRATION_POINTS")&&Z.MATHML_TEXT_INTEGRATION_POINTS&&typeof Z.MATHML_TEXT_INTEGRATION_POINTS=="object"?Yn(Z.MATHML_TEXT_INTEGRATION_POINTS):Oe({},["mi","mo","mn","ms","mtext"]),Ze=ui(Z,"HTML_INTEGRATION_POINTS")&&Z.HTML_INTEGRATION_POINTS&&typeof Z.HTML_INTEGRATION_POINTS=="object"?Yn(Z.HTML_INTEGRATION_POINTS):Oe({},["annotation-xml"]);const xt=ui(Z,"CUSTOM_ELEMENT_HANDLING")&&Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING=="object"?Yn(Z.CUSTOM_ELEMENT_HANDLING):dg(null);if(dt=dg(null),ui(xt,"tagNameCheck")&&_s(xt.tagNameCheck)&&(dt.tagNameCheck=xt.tagNameCheck),ui(xt,"attributeNameCheck")&&_s(xt.attributeNameCheck)&&(dt.attributeNameCheck=xt.attributeNameCheck),ui(xt,"allowCustomizedBuiltInElements")&&typeof xt.allowCustomizedBuiltInElements=="boolean"&&(dt.allowCustomizedBuiltInElements=xt.allowCustomizedBuiltInElements),Nt&&(Pt=!1),qt&&(kt=!0),Vt&&(q=Oe({},KQ),et=dg(null),Vt.html===!0&&(Oe(q,HQ),Oe(et,VQ)),Vt.svg===!0&&(Oe(q,mE),Oe(et,yE),Oe(et,zy)),Vt.svgFilters===!0&&(Oe(q,vE),Oe(et,yE),Oe(et,zy)),Vt.mathMl===!0&&(Oe(q,wE),Oe(et,GQ),Oe(et,zy))),St.tagCheck=null,St.attributeCheck=null,ui(Z,"ADD_TAGS")&&(typeof Z.ADD_TAGS=="function"?St.tagCheck=Z.ADD_TAGS:ms(Z.ADD_TAGS)&&(q===tt&&(q=Yn(q)),Oe(q,Z.ADD_TAGS,Kt))),ui(Z,"ADD_ATTR")&&(typeof Z.ADD_ATTR=="function"?St.attributeCheck=Z.ADD_ATTR:ms(Z.ADD_ATTR)&&(et===ot&&(et=Yn(et)),Oe(et,Z.ADD_ATTR,Kt))),ui(Z,"ADD_URI_SAFE_ATTR")&&ms(Z.ADD_URI_SAFE_ATTR)&&Oe(xe,Z.ADD_URI_SAFE_ATTR,Kt),ui(Z,"FORBID_CONTENTS")&&ms(Z.FORBID_CONTENTS)&&(ce===Xt&&(ce=Yn(ce)),Oe(ce,Z.FORBID_CONTENTS,Kt)),ui(Z,"ADD_FORBID_CONTENTS")&&ms(Z.ADD_FORBID_CONTENTS)&&(ce===Xt&&(ce=Yn(ce)),Oe(ce,Z.ADD_FORBID_CONTENTS,Kt)),Pe&&(q["#text"]=!0),re&&Oe(q,["html","head","body"]),q.table&&(Oe(q,["tbody"]),delete wt.tbody),Z.TRUSTED_TYPES_POLICY){if(typeof Z.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=Z.TRUSTED_TYPES_POLICY,k=L.createHTML("")}else L===void 0&&(L=Kz(u,i)),L!==null&&typeof k=="string"&&(k=L.createHTML(""));(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&q===tt&&(q=Yn(q)),V.uponSanitizeAttribute.length>0&&et===ot&&(et=Yn(et)),ps&&ps(Z),ss=Z},zr=Oe({},[...mE,...vE,...Iz]),Mi=Oe({},[...wE,...Uz]),nn=function(Z){let xt=w(Z);(!xt||!xt.tagName)&&(xt={namespaceURI:Ae,tagName:"template"});const Rt=Km(Z.tagName),qe=Km(xt.tagName);return ar[Z.namespaceURI]?Z.namespaceURI===ne?xt.namespaceURI===He?Rt==="svg":xt.namespaceURI===nr?Rt==="svg"&&(qe==="annotation-xml"||de[qe]):!!zr[Rt]:Z.namespaceURI===nr?xt.namespaceURI===He?Rt==="math":xt.namespaceURI===ne?Rt==="math"&&Ze[qe]:!!Mi[Rt]:Z.namespaceURI===He?xt.namespaceURI===ne&&!Ze[qe]||xt.namespaceURI===nr&&!de[qe]?!1:!Mi[Rt]&&(lc[Rt]||!zr[Rt]):!!(bi==="application/xhtml+xml"&&ar[Z.namespaceURI]):!1},sn=function(Z){pg(t.removed,{element:Z});try{w(Z).removeChild(Z)}catch{p(Z)}},as=function(Z,xt){try{pg(t.removed,{attribute:xt.getAttributeNode(Z),from:xt})}catch{pg(t.removed,{attribute:null,from:xt})}if(xt.removeAttribute(Z),Z==="is")if(kt||qt)try{sn(xt)}catch{}else try{xt.setAttribute(Z,"")}catch{}},zs=function(Z){let xt=null,Rt=null;if(ie)Z="<remove></remove>"+Z;else{const dr=kQ(Z,/^[\r\n\t ]+/);Rt=dr&&dr[0]}bi==="application/xhtml+xml"&&Ae===He&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");const qe=L?L.createHTML(Z):Z;if(Ae===He)try{xt=new h().parseFromString(qe,bi)}catch{}if(!xt||!xt.documentElement){xt=Q.createDocument(Ae,"template",null);try{xt.documentElement.innerHTML=ge?k:qe}catch{}}const Ke=xt.body||xt.documentElement;return Z&&Rt&&Ke.insertBefore(e.createTextNode(Rt),Ke.childNodes[0]||null),Ae===He?D.call(xt,re?"html":"body")[0]:re?xt.documentElement:Ke},_A=function(Z){return W.call(Z.ownerDocument||Z,Z,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},Xs=function(Z){Z.normalize();const xt=W.call(Z.ownerDocument||Z,Z,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let Rt=xt.nextNode();for(;Rt;){let qe=Rt.data;gg([st,rt,it],Ke=>{qe=mg(qe,Ke," ")}),Rt.data=qe,Rt=xt.nextNode()}},os=function(Z){const xt=_?_(Z):null;return typeof xt!="string"||Kt(xt)!=="form"?!1:typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||Z.attributes!==E(Z)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function"||Z.nodeType!==S(Z)||Z.childNodes!==y(Z)},Bn=function(Z){if(!S||typeof Z!="object"||Z===null)return!1;try{return S(Z)===po.documentFragment}catch{return!1}},ca=function(Z){if(!S||typeof Z!="object"||Z===null)return!1;try{return typeof S(Z)=="number"}catch{return!1}};function zi(Zt,Z,xt){gg(Zt,Rt=>{Rt.call(t,Z,xt,ss)})}const Vo=function(Z){let xt=null;if(zi(V.beforeSanitizeElements,Z,null),os(Z))return sn(Z),!0;const Rt=Kt(Z.nodeName);if(zi(V.uponSanitizeElement,Z,{tagName:Rt,allowedTags:q}),ve&&Z.hasChildNodes()&&!ca(Z.firstElementChild)&&Tn(/<[/\w!]/g,Z.innerHTML)&&Tn(/<[/\w!]/g,Z.textContent)||ve&&Z.namespaceURI===He&&Rt==="style"&&ca(Z.firstElementChild)||Z.nodeType===po.progressingInstruction||ve&&Z.nodeType===po.comment&&Tn(/<[/\w]/g,Z.data))return sn(Z),!0;if(wt[Rt]||!(St.tagCheck instanceof Function&&St.tagCheck(Rt))&&!q[Rt]){if(!wt[Rt]&&hc(Rt)&&(dt.tagNameCheck instanceof RegExp&&Tn(dt.tagNameCheck,Rt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Rt)))return!1;if(Pe&&!ce[Rt]){const Ke=w(Z),dr=y(Z);if(dr&&Ke){const Dn=dr.length;for(let ki=Dn-1;ki>=0;--ki){const Cn=f(dr[ki],!0);Ke.insertBefore(Cn,m(Z))}}}return sn(Z),!0}return(S?S(Z):Z.nodeType)===po.element&&!nn(Z)||(Rt==="noscript"||Rt==="noembed"||Rt==="noframes")&&Tn(/<\/no(script|embed|frames)/i,Z.innerHTML)?(sn(Z),!0):(Nt&&Z.nodeType===po.text&&(xt=Z.textContent,gg([st,rt,it],Ke=>{xt=mg(xt,Ke," ")}),Z.textContent!==xt&&(pg(t.removed,{element:Z.cloneNode()}),Z.textContent=xt)),zi(V.afterSanitizeElements,Z,null),!1)},cc=function(Z,xt,Rt){if(yt[xt]||we&&(xt==="id"||xt==="name")&&(Rt in e||Rt in Xa))return!1;const qe=et[xt]||St.attributeCheck instanceof Function&&St.attributeCheck(xt,Z);if(!(Pt&&!yt[xt]&&Tn(At,xt))){if(!(Mt&&Tn(ut,xt))){if(!qe||yt[xt]){if(!(hc(Z)&&(dt.tagNameCheck instanceof RegExp&&Tn(dt.tagNameCheck,Z)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Z))&&(dt.attributeNameCheck instanceof RegExp&&Tn(dt.attributeNameCheck,xt)||dt.attributeNameCheck instanceof Function&&dt.attributeNameCheck(xt,Z))||xt==="is"&&dt.allowCustomizedBuiltInElements&&(dt.tagNameCheck instanceof RegExp&&Tn(dt.tagNameCheck,Rt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Rt))))return!1}else if(!xe[xt]){if(!Tn($,mg(Rt,mt,""))){if(!((xt==="src"||xt==="xlink:href"||xt==="href")&&Z!=="script"&&OQ(Rt,"data:")===0&&vr[Z])){if(!($t&&!Tn(vt,mg(Rt,mt,"")))){if(Rt)return!1}}}}}}return!0},$h=Oe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),hc=function(Z){return!$h[Km(Z)]&&Tn(M,Z)},c0=function(Z){zi(V.beforeSanitizeAttributes,Z,null);const xt=Z.attributes;if(!xt||os(Z))return;const Rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let qe=xt.length;for(;qe--;){const Ke=xt[qe],dr=Ke.name,Dn=Ke.namespaceURI,ki=Ke.value,Cn=Kt(dr),hd=ki;let $e=dr==="value"?hd:Cz(hd);if(Rt.attrName=Cn,Rt.attrValue=$e,Rt.keepAttr=!0,Rt.forceKeepAttr=void 0,zi(V.uponSanitizeAttribute,Z,Rt),$e=Rt.attrValue,Ne&&(Cn==="id"||Cn==="name")&&OQ($e,me)!==0&&(as(dr,Z),$e=me+$e),ve&&Tn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$e)){as(dr,Z);continue}if(Cn==="attributename"&&kQ($e,"href")){as(dr,Z);continue}if(Rt.forceKeepAttr)continue;if(!Rt.keepAttr){as(dr,Z);continue}if(!z&&Tn(/\/>/i,$e)){as(dr,Z);continue}Nt&&gg([st,rt,it],IA=>{$e=mg($e,IA," ")});const ud=Kt(Z.nodeName);if(!cc(ud,Cn,$e)){as(dr,Z);continue}if(L&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Dn)switch(u.getAttributeType(ud,Cn)){case"TrustedHTML":{$e=L.createHTML($e);break}case"TrustedScriptURL":{$e=L.createScriptURL($e);break}}if($e!==hd)try{Dn?Z.setAttributeNS(Dn,dr,$e):Z.setAttribute(dr,$e),os(Z)?sn(Z):MQ(t.removed)}catch{as(dr,Z)}}zi(V.afterSanitizeAttributes,Z,null)},Go=function(Z){let xt=null;const Rt=_A(Z);for(zi(V.beforeSanitizeShadowDOM,Z,null);xt=Rt.nextNode();)if(zi(V.uponSanitizeShadowNode,xt,null),Vo(xt),c0(xt),Bn(xt.content)&&Go(xt.content),(S?S(xt):xt.nodeType)===po.element){const Ke=B?B(xt):xt.shadowRoot;Bn(Ke)&&(qa(Ke),Go(Ke))}zi(V.afterSanitizeShadowDOM,Z,null)},qa=function(Z){const xt=S?S(Z):Z.nodeType;if(xt===po.element){const Ke=B?B(Z):Z.shadowRoot;Bn(Ke)&&(qa(Ke),Go(Ke))}const Rt=y?y(Z):Z.childNodes;if(!Rt)return;const qe=[];gg(Rt,Ke=>{pg(qe,Ke)});for(const Ke of qe)qa(Ke);if(xt===po.element){const Ke=_?_(Z):null;if(typeof Ke=="string"&&Kt(Ke)==="template"){const dr=Z.content;Bn(dr)&&qa(dr)}}};return t.sanitize=function(Zt){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xt=null,Rt=null,qe=null,Ke=null;if(ge=!Zt,ge&&(Zt="<!-->"),typeof Zt!="string"&&!ca(Zt)&&(Zt=Tz(Zt),typeof Zt!="string"))throw Gm("dirty is not a string, aborting");if(!t.isSupported)return Zt;if(Tt||As(Z),t.removed=[],typeof Zt=="string"&&(Ce=!1),Ce){const ki=_?_(Zt):Zt.nodeName;if(typeof ki=="string"){const Cn=Kt(ki);if(!q[Cn]||wt[Cn])throw Gm("root node is forbidden and cannot be sanitized in-place")}if(os(Zt))throw Gm("root node is clobbered and cannot be sanitized in-place");qa(Zt)}else if(ca(Zt))xt=zs("<!---->"),Rt=xt.ownerDocument.importNode(Zt,!0),Rt.nodeType===po.element&&Rt.nodeName==="BODY"||Rt.nodeName==="HTML"?xt=Rt:xt.appendChild(Rt),qa(Rt);else{if(!kt&&!Nt&&!re&&Zt.indexOf("<")===-1)return L&&zt?L.createHTML(Zt):Zt;if(xt=zs(Zt),!xt)return kt?null:zt?k:""}xt&&ie&&sn(xt.firstChild);const dr=_A(Ce?Zt:xt);for(;qe=dr.nextNode();)Vo(qe),c0(qe),Bn(qe.content)&&Go(qe.content);if(Ce)return Nt&&Xs(Zt),Zt;if(kt){if(Nt&&Xs(xt),qt)for(Ke=U.call(xt.ownerDocument);xt.firstChild;)Ke.appendChild(xt.firstChild);else Ke=xt;return(et.shadowroot||et.shadowrootmode)&&(Ke=j.call(r,Ke,!0)),Ke}let Dn=re?xt.outerHTML:xt.innerHTML;return re&&q["!doctype"]&&xt.ownerDocument&&xt.ownerDocument.doctype&&xt.ownerDocument.doctype.name&&Tn(Dz,xt.ownerDocument.doctype.name)&&(Dn="<!DOCTYPE "+xt.ownerDocument.doctype.name+`>
|
|
295
|
-
`+Dn),Nt&&gg([st,rt,it],ki=>{Dn=mg(Dn,ki," ")}),L&&zt?L.createHTML(Dn):Dn},t.setConfig=function(){let Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};As(Zt),Tt=!0},t.clearConfig=function(){ss=null,Tt=!1},t.isValidAttribute=function(Zt,Z,xt){ss||As({});const Rt=Kt(Zt),qe=Kt(Z);return cc(Rt,qe,xt)},t.addHook=function(Zt,Z){typeof Z=="function"&&pg(V[Zt],Z)},t.removeHook=function(Zt,Z){if(Z!==void 0){const xt=bz(V[Zt],Z);return xt===-1?void 0:Bz(V[Zt],xt,1)[0]}return MQ(V[Zt])},t.removeHooks=function(Zt){V[Zt]=[]},t.removeAllHooks=function(){V=$Q()},t}var Vz=WQ();const Gz=Object.freeze(Object.defineProperty({__proto__:null,default:Vz},Symbol.toStringTag,{value:"Module"}));var jm=function(n){return n&&n.Math===Math&&n},ti=jm(typeof globalThis=="object"&&globalThis)||jm(typeof window=="object"&&window)||jm(typeof self=="object"&&self)||jm(typeof Hd=="object"&&Hd)||jm(typeof Hd=="object"&&Hd)||function(){return this}()||Function("return this")(),$m={},fi=function(n){try{return!!n()}catch{return!0}},jz=fi,xa=!jz(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),$z=fi,Xy=!$z(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")}),Wz=Xy,qy=Function.prototype.call,_n=Wz?qy.bind(qy):function(){return qy.apply(qy,arguments)},zQ={},XQ={}.propertyIsEnumerable,qQ=Object.getOwnPropertyDescriptor,zz=qQ&&!XQ.call({1:2},1);zQ.f=zz?function(t){var e=qQ(this,t);return!!e&&e.enumerable}:XQ;var bE=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}},YQ=Xy,JQ=Function.prototype,BE=JQ.call,Xz=YQ&&JQ.bind.bind(BE,BE),di=YQ?Xz:function(n){return function(){return BE.apply(n,arguments)}},ZQ=di,qz=ZQ({}.toString),Yz=ZQ("".slice),Su=function(n){return Yz(qz(n),8,-1)},Jz=di,Zz=fi,tX=Su,CE=Object,eX=Jz("".split),tN=Zz(function(){return!CE("z").propertyIsEnumerable(0)})?function(n){return tX(n)==="String"?eX(n,""):CE(n)}:CE,Yy=function(n){return n==null},rX=Yy,iX=TypeError,Ea=function(n){if(rX(n))throw new iX("Can't call method on "+n);return n},nX=tN,sX=Ea,Wm=function(n){return nX(sX(n))},xE=typeof document=="object"&&document.all,Ui=typeof xE>"u"&&xE!==void 0?function(n){return typeof n=="function"||n===xE}:function(n){return typeof n=="function"},AX=Ui,Rs=function(n){return typeof n=="object"?n!==null:AX(n)},EE=ti,aX=Ui,oX=function(n){return aX(n)?n:void 0},Fu=function(n,t){return arguments.length<2?oX(EE[n]):EE[n]&&EE[n][t]},lX=di,Jy=lX({}.isPrototypeOf),cX=ti,eN=cX.navigator,rN=eN&&eN.userAgent,zm=rN?String(rN):"",iN=ti,SE=zm,nN=iN.process,sN=iN.Deno,AN=nN&&nN.versions||sN&&sN.version,aN=AN&&AN.v8,Sa,Zy;aN&&(Sa=aN.split("."),Zy=Sa[0]>0&&Sa[0]<4?1:+(Sa[0]+Sa[1])),!Zy&&SE&&(Sa=SE.match(/Edge\/(\d+)/),(!Sa||Sa[1]>=74)&&(Sa=SE.match(/Chrome\/(\d+)/),Sa&&(Zy=+Sa[1])));var FE=Zy,oN=FE,hX=fi,uX=ti,fX=uX.String,lN=!!Object.getOwnPropertySymbols&&!hX(function(){var n=Symbol("symbol detection");return!fX(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&oN&&oN<41}),dX=lN,cN=dX&&!Symbol.sham&&typeof Symbol.iterator=="symbol",gX=Fu,pX=Ui,mX=Jy,vX=cN,wX=Object,hN=vX?function(n){return typeof n=="symbol"}:function(n){var t=gX("Symbol");return pX(t)&&mX(t.prototype,wX(n))},yX=String,tb=function(n){try{return yX(n)}catch{return"Object"}},bX=Ui,BX=tb,CX=TypeError,ul=function(n){if(bX(n))return n;throw new CX(BX(n)+" is not a function")},xX=ul,EX=Yy,vg=function(n,t){var e=n[t];return EX(e)?void 0:xX(e)},TE=_n,_E=Ui,IE=Rs,SX=TypeError,FX=function(n,t){var e,r;if(t==="string"&&_E(e=n.toString)&&!IE(r=TE(e,n))||_E(e=n.valueOf)&&!IE(r=TE(e,n))||t!=="string"&&_E(e=n.toString)&&!IE(r=TE(e,n)))return r;throw new SX("Can't convert object to primitive value")},uN={exports:{}},fN=ti,TX=Object.defineProperty,UE=function(n,t){try{TX(fN,n,{value:t,configurable:!0,writable:!0})}catch{fN[n]=t}return t},_X=ti,IX=UE,dN="__core-js_shared__",gN=uN.exports=_X[dN]||IX(dN,{});(gN.versions||(gN.versions=[])).push({version:"3.49.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"});var LE=uN.exports,pN=LE,QE=function(n,t){return pN[n]||(pN[n]=t||{})},UX=Ea,LX=Object,eb=function(n){return LX(UX(n))},QX=di,NX=eb,PX=QX({}.hasOwnProperty),Fa=Object.hasOwn||function(t,e){return PX(NX(t),e)},MX=di,kX=0,OX=Math.random(),DX=MX(1.1.toString),mN=function(n){return"Symbol("+(n===void 0?"":n)+")_"+DX(++kX+OX,36)},RX=ti,HX=QE,vN=Fa,KX=mN,VX=lN,GX=cN,wg=RX.Symbol,NE=HX("wks"),jX=GX?wg.for||wg:wg&&wg.withoutSetter||KX,fn=function(n){return vN(NE,n)||(NE[n]=VX&&vN(wg,n)?wg[n]:jX("Symbol."+n)),NE[n]},$X=_n,wN=Rs,yN=hN,WX=vg,zX=FX,XX=fn,qX=TypeError,YX=XX("toPrimitive"),JX=function(n,t){if(!wN(n)||yN(n))return n;var e=WX(n,YX),r;if(e){if(t===void 0&&(t="default"),r=$X(e,n,t),!wN(r)||yN(r))return r;throw new qX("Can't convert object to primitive value")}return t===void 0&&(t="number"),zX(n,t)},ZX=JX,tq=hN,bN=function(n){var t=ZX(n,"string");return tq(t)?t:t+""},eq=ti,BN=Rs,PE=eq.document,rq=BN(PE)&&BN(PE.createElement),rb=function(n){return rq?PE.createElement(n):{}},iq=xa,nq=fi,sq=rb,CN=!iq&&!nq(function(){return Object.defineProperty(sq("div"),"a",{get:function(){return 7}}).a!==7}),Aq=xa,aq=_n,oq=zQ,lq=bE,cq=Wm,hq=bN,uq=Fa,fq=CN,xN=Object.getOwnPropertyDescriptor;$m.f=Aq?xN:function(t,e){if(t=cq(t),e=hq(e),fq)try{return xN(t,e)}catch{}if(uq(t,e))return lq(!aq(oq.f,t,e),t[e])};var fl={},dq=xa,gq=fi,EN=dq&&gq(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),pq=Rs,mq=String,vq=TypeError,vs=function(n){if(pq(n))return n;throw new vq(mq(n)+" is not an object")},wq=xa,yq=CN,bq=EN,ib=vs,SN=bN,Bq=TypeError,ME=Object.defineProperty,Cq=Object.getOwnPropertyDescriptor,kE="enumerable",OE="configurable",DE="writable";fl.f=wq?bq?function(t,e,r){if(ib(t),e=SN(e),ib(r),typeof t=="function"&&e==="prototype"&&"value"in r&&DE in r&&!r[DE]){var i=Cq(t,e);i&&i[DE]&&(t[e]=r.value,r={configurable:OE in r?r[OE]:i[OE],enumerable:kE in r?r[kE]:i[kE],writable:!1})}return ME(t,e,r)}:ME:function(t,e,r){if(ib(t),e=SN(e),ib(r),yq)try{return ME(t,e,r)}catch{}if("get"in r||"set"in r)throw new Bq("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var xq=xa,Eq=fl,Sq=bE,Xm=xq?function(n,t,e){return Eq.f(n,t,Sq(1,e))}:function(n,t,e){return n[t]=e,n},FN={exports:{}},RE=xa,Fq=Fa,TN=Function.prototype,Tq=RE&&Object.getOwnPropertyDescriptor,_N=Fq(TN,"name"),_q=_N&&(function(){}).name==="something",Iq=_N&&(!RE||RE&&Tq(TN,"name").configurable),nb={PROPER:_q,CONFIGURABLE:Iq},Uq=di,Lq=Ui,HE=LE,Qq=Uq(Function.toString);Lq(HE.inspectSource)||(HE.inspectSource=function(n){return Qq(n)});var KE=HE.inspectSource,Nq=ti,Pq=Ui,IN=Nq.WeakMap,Mq=Pq(IN)&&/native code/.test(String(IN)),kq=QE,Oq=mN,UN=kq("keys"),VE=function(n){return UN[n]||(UN[n]=Oq(n))},GE={},Dq=Mq,LN=ti,Rq=Rs,Hq=Xm,jE=Fa,$E=LE,Kq=VE,Vq=GE,QN="Object already initialized",WE=LN.TypeError,Gq=LN.WeakMap,sb,qm,Ab,jq=function(n){return Ab(n)?qm(n):sb(n,{})},$q=function(n){return function(t){var e;if(!Rq(t)||(e=qm(t)).type!==n)throw new WE("Incompatible receiver, "+n+" required");return e}};if(Dq||$E.state){var mo=$E.state||($E.state=new Gq);mo.get=mo.get,mo.has=mo.has,mo.set=mo.set,sb=function(n,t){if(mo.has(n))throw new WE(QN);return t.facade=n,mo.set(n,t),t},qm=function(n){return mo.get(n)||{}},Ab=function(n){return mo.has(n)}}else{var yg=Kq("state");Vq[yg]=!0,sb=function(n,t){if(jE(n,yg))throw new WE(QN);return t.facade=n,Hq(n,yg,t),t},qm=function(n){return jE(n,yg)?n[yg]:{}},Ab=function(n){return jE(n,yg)}}var ab={set:sb,get:qm,has:Ab,enforce:jq,getterFor:$q},zE=di,Wq=fi,zq=Ui,ob=Fa,XE=xa,Xq=nb.CONFIGURABLE,qq=KE,NN=ab,Yq=NN.enforce,Jq=NN.get,PN=String,lb=Object.defineProperty,Zq=zE("".slice),tY=zE("".replace),eY=zE([].join),rY=XE&&!Wq(function(){return lb(function(){},"length",{value:8}).length!==8}),iY=String(String).split("String"),nY=FN.exports=function(n,t,e){Zq(PN(t),0,7)==="Symbol("&&(t="["+tY(PN(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!ob(n,"name")||Xq&&n.name!==t)&&(XE?lb(n,"name",{value:t,configurable:!0}):n.name=t),rY&&e&&ob(e,"arity")&&n.length!==e.arity&&lb(n,"length",{value:e.arity});try{e&&ob(e,"constructor")&&e.constructor?XE&&lb(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch{}var r=Yq(n);return ob(r,"source")||(r.source=eY(iY,typeof t=="string"?t:"")),n};Function.prototype.toString=nY(function(){return zq(this)&&Jq(this).source||qq(this)},"toString");var MN=FN.exports,sY=Ui,AY=fl,aY=MN,oY=UE,Tu=function(n,t,e,r){r||(r={});var i=r.enumerable,s=r.name!==void 0?r.name:t;if(sY(e)&&aY(e,s,r),r.global)i?n[t]=e:oY(t,e);else{try{r.unsafe?n[t]&&(i=!0):delete n[t]}catch{}i?n[t]=e:AY.f(n,t,{value:e,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return n},kN={},lY=Math.ceil,cY=Math.floor,hY=Math.trunc||function(t){var e=+t;return(e>0?cY:lY)(e)},uY=hY,cb=function(n){var t=+n;return t!==t||t===0?0:uY(t)},fY=cb,dY=Math.max,gY=Math.min,pY=function(n,t){var e=fY(n);return e<0?dY(e+t,0):gY(e,t)},mY=cb,vY=Math.min,bg=function(n){var t=mY(n);return t>0?vY(t,9007199254740991):0},wY=bg,qE=function(n){return wY(n.length)},yY=Wm,bY=pY,BY=qE,CY=function(n){return function(t,e,r){var i=yY(t),s=BY(i);if(s===0)return!n&&-1;var A=bY(r,s),a;if(n&&e!==e){for(;s>A;)if(a=i[A++],a!==a)return!0}else for(;s>A;A++)if((n||A in i)&&i[A]===e)return n||A||0;return!n&&-1}},ON={indexOf:CY(!1)},xY=di,YE=Fa,EY=Wm,SY=ON.indexOf,FY=GE,DN=xY([].push),RN=function(n,t){var e=EY(n),r=0,i=[],s;for(s in e)!YE(FY,s)&&YE(e,s)&&DN(i,s);for(;t.length>r;)YE(e,s=t[r++])&&(~SY(i,s)||DN(i,s));return i},JE=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],TY=RN,_Y=JE,IY=_Y.concat("length","prototype");kN.f=Object.getOwnPropertyNames||function(t){return TY(t,IY)};var HN={};HN.f=Object.getOwnPropertySymbols;var UY=Fu,LY=di,QY=kN,NY=HN,PY=vs,MY=LY([].concat),kY=UY("Reflect","ownKeys")||function(t){var e=QY.f(PY(t)),r=NY.f;return r?MY(e,r(t)):e},KN=Fa,OY=kY,DY=$m,RY=fl,HY=function(n,t,e){for(var r=OY(t),i=RY.f,s=DY.f,A=0;A<r.length;A++){var a=r[A];!KN(n,a)&&!(e&&KN(e,a))&&i(n,a,s(t,a))}},KY=fi,VY=Ui,GY=/#|\.prototype\./,Ym=function(n,t){var e=$Y[jY(n)];return e===zY?!0:e===WY?!1:VY(t)?KY(t):!!t},jY=Ym.normalize=function(n){return String(n).replace(GY,".").toLowerCase()},$Y=Ym.data={},WY=Ym.NATIVE="N",zY=Ym.POLYFILL="P",VN=Ym,hb=ti,XY=$m.f,qY=Xm,YY=Tu,JY=UE,ZY=HY,tJ=VN,ws=function(n,t){var e=n.target,r=n.global,i=n.stat,s,A,a,o,l,h;if(r?A=hb:i?A=hb[e]||JY(e,{}):A=hb[e]&&hb[e].prototype,A)for(a in t){if(l=t[a],n.dontCallGetSet?(h=XY(A,a),o=h&&h.value):o=A[a],s=tJ(r?a:e+(i?".":"#")+a,n.forced),!s&&o!==void 0){if(typeof l==typeof o)continue;ZY(l,o)}(n.sham||o&&o.sham)&&qY(l,"sham",!0),YY(A,a,l,n)}},Jm=ti,eJ=zm,rJ=Su,ub=function(n){return eJ.slice(0,n.length)===n},GN=function(){return ub("Bun/")?"BUN":ub("Cloudflare-Workers")?"CLOUDFLARE":ub("Deno/")?"DENO":ub("Node.js/")?"NODE":Jm.Bun&&typeof Bun.version=="string"?"BUN":Jm.Deno&&typeof Deno.version=="object"?"DENO":rJ(Jm.process)==="process"?"NODE":Jm.window&&Jm.document?"BROWSER":"REST"}(),iJ=GN,fb=iJ==="NODE",nJ=ti,sJ=nJ,AJ=di,aJ=ul,oJ=function(n,t,e){try{return AJ(aJ(Object.getOwnPropertyDescriptor(n,t)[e]))}catch{}},lJ=Rs,cJ=function(n){return lJ(n)||n===null},hJ=cJ,uJ=String,fJ=TypeError,dJ=function(n){if(hJ(n))return n;throw new fJ("Can't set "+uJ(n)+" as a prototype")},gJ=oJ,pJ=Rs,mJ=Ea,vJ=dJ,jN=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},e;try{e=gJ(Object.prototype,"__proto__","set"),e(t,[]),n=t instanceof Array}catch{}return function(i,s){return mJ(i),vJ(s),pJ(i)&&(n?e(i,s):i.__proto__=s),i}}():void 0),wJ=fl.f,yJ=Fa,bJ=fn,$N=bJ("toStringTag"),db=function(n,t,e){n&&!e&&(n=n.prototype),n&&!yJ(n,$N)&&wJ(n,$N,{configurable:!0,value:t})},WN=MN,BJ=fl,CJ=function(n,t,e){return e.get&&WN(e.get,t,{getter:!0}),e.set&&WN(e.set,t,{setter:!0}),BJ.f(n,t,e)},xJ=Fu,EJ=CJ,SJ=fn,FJ=xa,zN=SJ("species"),TJ=function(n){var t=xJ(n);FJ&&t&&!t[zN]&&EJ(t,zN,{configurable:!0,get:function(){return this}})},_J=Jy,IJ=TypeError,UJ=function(n,t){if(_J(t,n))return n;throw new IJ("Incorrect invocation")},LJ=fn,QJ=LJ("toStringTag"),XN={};XN[QJ]="z";var NJ=String(XN)==="[object z]",PJ=NJ,MJ=Ui,gb=Su,kJ=fn,OJ=kJ("toStringTag"),DJ=Object,RJ=gb(function(){return arguments}())==="Arguments",HJ=function(n,t){try{return n[t]}catch{}},ZE=PJ?gb:function(n){var t,e,r;return n===void 0?"Undefined":n===null?"Null":typeof(e=HJ(t=DJ(n),OJ))=="string"?e:RJ?gb(t):(r=gb(t))==="Object"&&MJ(t.callee)?"Arguments":r},KJ=di,VJ=fi,qN=Ui,GJ=ZE,jJ=Fu,$J=KE,YN=function(){},JN=jJ("Reflect","construct"),tS=/^\s*(?:class|function)\b/,WJ=KJ(tS.exec),zJ=!tS.test(YN),Zm=function(t){if(!qN(t))return!1;try{return JN(YN,[],t),!0}catch{return!1}},ZN=function(t){if(!qN(t))return!1;switch(GJ(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zJ||!!WJ(tS,$J(t))}catch{return!0}};ZN.sham=!0;var XJ=!JN||VJ(function(){var n;return Zm(Zm.call)||!Zm(Object)||!Zm(function(){n=!0})||n})?ZN:Zm,qJ=XJ,YJ=tb,JJ=TypeError,ZJ=function(n){if(qJ(n))return n;throw new JJ(YJ(n)+" is not a constructor")},tP=vs,tZ=ZJ,eZ=Yy,rZ=fn,iZ=rZ("species"),eP=function(n,t){var e=tP(n).constructor,r;return e===void 0||eZ(r=tP(e)[iZ])?t:tZ(r)},nZ=Xy,rP=Function.prototype,iP=rP.apply,nP=rP.call,sP=typeof Reflect=="object"&&Reflect.apply||(nZ?nP.bind(iP):function(){return nP.apply(iP,arguments)}),sZ=Su,AZ=di,pb=function(n){if(sZ(n)==="Function")return AZ(n)},AP=pb,aZ=ul,oZ=Xy,lZ=AP(AP.bind),eS=function(n,t){return aZ(n),t===void 0?n:oZ?lZ(n,t):function(){return n.apply(t,arguments)}},cZ=Fu,aP=cZ("document","documentElement"),hZ=di,uZ=hZ([].slice),fZ=TypeError,dZ=function(n,t){if(n<t)throw new fZ("Not enough arguments");return n},oP=zm,lP=/ipad|iphone|ipod/i.test(oP)&&/applewebkit/i.test(oP),oA=ti,gZ=sP,pZ=eS,cP=Ui,mZ=Fa,hP=fi,uP=aP,vZ=uZ,fP=rb,wZ=dZ,yZ=lP,bZ=fb,rS=oA.setImmediate,dP=oA.clearImmediate,BZ=oA.process,iS=oA.Dispatch,CZ=oA.Function,gP=oA.MessageChannel,xZ=oA.String,nS=0,tv={},pP="onreadystatechange",ev,_u,sS,AS;hP(function(){ev=oA.location});var aS=function(n){if(mZ(tv,n)){var t=tv[n];delete tv[n],t()}},oS=function(n){return function(){aS(n)}},mP=function(n){aS(n.data)},vP=function(n){oA.postMessage(xZ(n),ev.protocol+"//"+ev.host)};(!rS||!dP)&&(rS=function(t){wZ(arguments.length,1);var e=cP(t)?t:CZ(t),r=vZ(arguments,1);return tv[++nS]=function(){gZ(e,void 0,r)},_u(nS),nS},dP=function(t){delete tv[t]},bZ?_u=function(n){BZ.nextTick(oS(n))}:iS&&iS.now?_u=function(n){iS.now(oS(n))}:gP&&!yZ?(sS=new gP,AS=sS.port2,sS.port1.onmessage=mP,_u=pZ(AS.postMessage,AS)):oA.addEventListener&&cP(oA.postMessage)&&!oA.importScripts&&ev&&ev.protocol!=="file:"&&!hP(vP)?(_u=vP,oA.addEventListener("message",mP,!1)):pP in fP("script")?_u=function(n){uP.appendChild(fP("script"))[pP]=function(){uP.removeChild(this),aS(n)}}:_u=function(n){setTimeout(oS(n),0)});var wP={set:rS},yP=ti,EZ=xa,SZ=Object.getOwnPropertyDescriptor,FZ=function(n){if(!EZ)return yP[n];var t=SZ(yP,n);return t&&t.value},bP=function(){this.head=null,this.tail=null};bP.prototype={add:function(n){var t={item:n,next:null},e=this.tail;e?e.next=t:this.head=t,this.tail=t},get:function(){var n=this.head;if(n){var t=this.head=n.next;return t===null&&(this.tail=null),n.item}}};var BP=bP,TZ=zm,_Z=/ipad|iphone|ipod/i.test(TZ)&&typeof Pebble<"u",IZ=zm,UZ=/web0s(?!.*chrome)/i.test(IZ),Bg=ti,LZ=FZ,CP=eS,lS=wP.set,QZ=BP,NZ=lP,PZ=_Z,MZ=UZ,cS=fb,xP=Bg.MutationObserver||Bg.WebKitMutationObserver,EP=Bg.document,SP=Bg.process,mb=Bg.Promise,hS=LZ("queueMicrotask"),Cg,uS,fS,vb,FP;if(!hS){var wb=new QZ,yb=function(){var n,t;for(cS&&(n=SP.domain)&&n.exit();t=wb.get();)try{t()}catch(e){throw wb.head&&Cg(),e}n&&n.enter()};!NZ&&!cS&&!MZ&&xP&&EP?(uS=!0,fS=EP.createTextNode(""),new xP(yb).observe(fS,{characterData:!0}),Cg=function(){fS.data=uS=!uS}):!PZ&&mb&&mb.resolve?(vb=mb.resolve(void 0),vb.constructor=mb,FP=CP(vb.then,vb),Cg=function(){FP(yb)}):cS?Cg=function(){SP.nextTick(yb)}:(lS=CP(lS,Bg),Cg=function(){lS(yb)}),hS=function(n){wb.head||Cg(),wb.add(n)}}var kZ=hS,OZ=function(n,t){try{arguments.length===1?console.error(n):console.error(n,t)}catch{}},dS=function(n){try{return{error:!1,value:n()}}catch(t){return{error:!0,value:t}}},DZ=ti,bb=DZ.Promise,RZ=ti,rv=bb,HZ=Ui,KZ=VN,VZ=KE,GZ=fn,TP=GN,gS=FE;rv&&rv.prototype;var jZ=GZ("species"),pS=!1,_P=HZ(RZ.PromiseRejectionEvent),$Z=KZ("Promise",function(){var n=VZ(rv),t=n!==String(rv);if(!t&&gS===66)return!0;if(!gS||gS<51||!/native code/.test(n)){var e=new rv(function(s){s(1)}),r=function(s){s(function(){},function(){})},i=e.constructor={};if(i[jZ]=r,pS=e.then(function(){})instanceof r,!pS)return!0}return!t&&(TP==="BROWSER"||TP==="DENO")&&!_P}),iv={CONSTRUCTOR:$Z,REJECTION_EVENT:_P,SUBCLASSING:pS},xg={},IP=ul,WZ=TypeError,zZ=function(n){var t,e;this.promise=new n(function(r,i){if(t!==void 0||e!==void 0)throw new WZ("Bad Promise constructor");t=r,e=i}),this.resolve=IP(t),this.reject=IP(e)};xg.f=function(n){return new zZ(n)};var XZ=ws,Bb=fb,Wc=ti,qZ=sJ,Eg=_n,UP=Tu,LP=jN,YZ=db,JZ=TJ,ZZ=ul,Cb=Ui,ttt=Rs,ett=UJ,rtt=eP,QP=wP.set,mS=kZ,itt=OZ,ntt=dS,stt=BP,NP=ab,xb=bb,vS=iv,PP=xg,Eb="Promise",MP=vS.CONSTRUCTOR,Att=vS.REJECTION_EVENT,att=vS.SUBCLASSING,wS=NP.getterFor(Eb),ott=NP.set,Sg=xb&&xb.prototype,Iu=xb,Sb=Sg,kP=Wc.TypeError,yS=Wc.document,bS=Wc.process,BS=PP.f,ltt=BS,ctt=!!(yS&&yS.createEvent&&Wc.dispatchEvent),OP="unhandledrejection",htt="rejectionhandled",DP=0,RP=1,utt=2,CS=1,HP=2,Fb,KP,VP,GP,jP=function(n){var t;return ttt(n)&&Cb(t=n.then)?t:!1},$P=function(n,t){var e=t.value,r=t.state===RP,i=r?n.ok:n.fail,s=n.resolve,A=n.reject,a=n.domain,o,l,h;try{i?(r||(t.rejection===HP&&dtt(t),t.rejection=CS),i===!0?o=e:(a&&a.enter(),o=i(e),a&&(a.exit(),h=!0)),o===n.promise?A(new kP("Promise-chain cycle")):(l=jP(o))?Eg(l,o,s,A):s(o)):A(e)}catch(u){a&&!h&&a.exit(),A(u)}},WP=function(n,t){n.notified||(n.notified=!0,mS(function(){for(var e=n.reactions,r;r=e.get();)$P(r,n);n.notified=!1,t&&!n.rejection&&ftt(n)}))},zP=function(n,t,e){var r,i;ctt?(r=yS.createEvent("Event"),r.promise=t,r.reason=e,r.initEvent(n,!1,!0),Wc.dispatchEvent(r)):r={promise:t,reason:e},!Att&&(i=Wc["on"+n])?i(r):n===OP&&itt("Unhandled promise rejection",e)},ftt=function(n){Eg(QP,Wc,function(){var t=n.facade,e=n.value,r=XP(n),i;if(r&&(i=ntt(function(){Bb?bS.emit("unhandledRejection",e,t):zP(OP,t,e)}),n.rejection=Bb||XP(n)?HP:CS,i.error))throw i.value})},XP=function(n){return n.rejection!==CS&&!n.parent},dtt=function(n){Eg(QP,Wc,function(){var t=n.facade;Bb?bS.emit("rejectionHandled",t):zP(htt,t,n.value)})},Fg=function(n,t,e){return function(r){n(t,r,e)}},Tg=function(n,t,e){n.done||(n.done=!0,e&&(n=e),n.value=t,n.state=utt,WP(n,!0))},xS=function(n,t,e){if(!n.done){n.done=!0,e&&(n=e);try{if(n.facade===t)throw new kP("Promise can't be resolved itself");var r=jP(t);r?mS(function(){var i={done:!1};try{Eg(r,t,Fg(xS,i,n),Fg(Tg,i,n))}catch(s){Tg(i,s,n)}}):(n.value=t,n.state=RP,WP(n,!1))}catch(i){Tg({done:!1},i,n)}}};if(MP&&(Iu=function(t){ett(this,Sb),ZZ(t),Eg(Fb,this);var e=wS(this);try{t(Fg(xS,e),Fg(Tg,e))}catch(r){Tg(e,r)}},Sb=Iu.prototype,Fb=function(t){ott(this,{type:Eb,done:!1,notified:!1,parent:!1,reactions:new stt,rejection:!1,state:DP,value:null})},Fb.prototype=UP(Sb,"then",function(t,e){var r=wS(this),i=BS(rtt(this,Iu));return r.parent=!0,i.ok=Cb(t)?t:!0,i.fail=Cb(e)&&e,i.domain=Bb?bS.domain:void 0,r.state===DP?r.reactions.add(i):mS(function(){$P(i,r)}),i.promise}),KP=function(){var n=new Fb,t=wS(n);this.promise=n,this.resolve=Fg(xS,t),this.reject=Fg(Tg,t)},PP.f=BS=function(n){return n===Iu||n===VP?new KP(n):ltt(n)},Cb(xb)&&Sg!==Object.prototype)){GP=Sg.then,att||UP(Sg,"then",function(t,e){var r=this;return new Iu(function(i,s){Eg(GP,r,i,s)}).then(t,e)},{unsafe:!0});try{delete Sg.constructor}catch{}LP&&LP(Sg,Sb)}XZ({global:!0,constructor:!0,wrap:!0,forced:MP},{Promise:Iu}),VP=qZ.Promise,YZ(Iu,Eb,!1),JZ(Eb);var nv={},gtt=fn,ptt=nv,mtt=gtt("iterator"),vtt=Array.prototype,wtt=function(n){return n!==void 0&&(ptt.Array===n||vtt[mtt]===n)},ytt=ZE,qP=vg,btt=Yy,Btt=nv,Ctt=fn,xtt=Ctt("iterator"),YP=function(n){if(!btt(n))return qP(n,xtt)||qP(n,"@@iterator")||Btt[ytt(n)]},Ett=_n,Stt=ul,Ftt=vs,Ttt=tb,_tt=YP,Itt=TypeError,Utt=function(n,t){var e=arguments.length<2?_tt(n):t;if(Stt(e))return Ftt(Ett(e,n));throw new Itt(Ttt(n)+" is not iterable")},Ltt=_n,JP=vs,Qtt=vg,Ntt=function(n,t,e){var r,i;JP(n);try{if(r=Qtt(n,"return"),!r){if(t==="throw")throw e;return e}r=Ltt(r,n)}catch(s){i=!0,r=s}if(t==="throw")throw e;if(i)throw r;return JP(r),e},Ptt=eS,Mtt=_n,ktt=vs,Ott=tb,Dtt=wtt,Rtt=qE,ZP=Jy,Htt=Utt,Ktt=YP,tM=Ntt,Vtt=TypeError,Tb=function(n,t){this.stopped=n,this.result=t},eM=Tb.prototype,rM=function(n,t,e){var r=e&&e.that,i=!!(e&&e.AS_ENTRIES),s=!!(e&&e.IS_RECORD),A=!!(e&&e.IS_ITERATOR),a=!!(e&&e.INTERRUPTED),o=Ptt(t,r),l,h,u,d,f,p,m,y=function(E){var S=l;return l=void 0,S&&tM(S,"normal"),new Tb(!0,E)},w=function(E){return i?(ktt(E),a?o(E[0],E[1],y):o(E[0],E[1])):a?o(E,y):o(E)};if(s)l=n.iterator;else if(A)l=n;else{if(h=Ktt(n),!h)throw new Vtt(Ott(n)+" is not iterable");if(Dtt(h)){for(u=0,d=Rtt(n);d>u;u++)if(f=w(n[u]),f&&ZP(eM,f))return f;return new Tb(!1)}l=Htt(n,h)}for(p=s?n.next:l.next;!(m=Mtt(p,l)).done;){var B=m.value;try{f=w(B)}catch(E){if(l)tM(l,"throw",E);else throw E}if(typeof f=="object"&&f&&ZP(eM,f))return f}return new Tb(!1)},Gtt=fn,iM=Gtt("iterator"),nM=!1;try{var jtt=0,sM={next:function(){return{done:!!jtt++}},return:function(){nM=!0}};sM[iM]=function(){return this},Array.from(sM,function(){throw 2})}catch{}var $tt=function(n,t){try{if(!t&&!nM)return!1}catch{return!1}var e=!1;try{var r={};r[iM]=function(){return{next:function(){return{done:e=!0}}}},n(r)}catch{}return e},Wtt=bb,ztt=$tt,Xtt=iv.CONSTRUCTOR,AM=Xtt||!ztt(function(n){Wtt.all(n).then(void 0,function(){})}),qtt=ws,Ytt=_n,Jtt=ul,Ztt=xg,tet=dS,eet=rM,ret=AM;qtt({target:"Promise",stat:!0,forced:ret},{all:function(t){var e=this,r=Ztt.f(e),i=r.resolve,s=r.reject,A=tet(function(){var a=Jtt(e.resolve),o=[],l=0,h=1;eet(t,function(u){var d=l++,f=!1;h++,Ytt(a,e,u).then(function(p){f||(f=!0,o[d]=p,--h||i(o))},s)}),--h||i(o)});return A.error&&s(A.value),r.promise}});var iet=ws,net=iv.CONSTRUCTOR,ES=bb,set=Fu,Aet=Ui,aet=Tu,aM=ES&&ES.prototype;if(iet({target:"Promise",proto:!0,forced:net,real:!0},{catch:function(n){return this.then(void 0,n)}}),Aet(ES)){var oM=set("Promise").prototype.catch;aM.catch!==oM&&aet(aM,"catch",oM,{unsafe:!0})}var oet=ws,cet=_n,het=ul,uet=xg,fet=dS,det=rM,get=AM;oet({target:"Promise",stat:!0,forced:get},{race:function(t){var e=this,r=uet.f(e),i=r.reject,s=fet(function(){var A=het(e.resolve);det(t,function(a){cet(A,e,a).then(r.resolve,i)})});return s.error&&i(s.value),r.promise}});var pet=ws,met=xg,vet=iv.CONSTRUCTOR;pet({target:"Promise",stat:!0,forced:vet},{reject:function(t){var e=met.f(this),r=e.reject;return r(t),e.promise}});var wet=vs,yet=Rs,bet=xg,Bet=function(n,t){if(wet(n),yet(t)&&t.constructor===n)return t;var e=bet.f(n),r=e.resolve;return r(t),e.promise},Cet=ws,xet=Fu,Eet=iv.CONSTRUCTOR,Fet=Bet;xet("Promise"),Cet({target:"Promise",stat:!0,forced:Eet},{resolve:function(t){return Fet(this,t)}});function lM(n,t,e,r,i,s,A){try{var a=n[s](A),o=a.value}catch(l){return void e(l)}a.done?t(o):Promise.resolve(o).then(r,i)}function dl(n){return function(){var t=this,e=arguments;return new Promise(function(r,i){var s=n.apply(t,e);function A(o){lM(s,r,i,A,a,"next",o)}function a(o){lM(s,r,i,A,a,"throw",o)}A(void 0)})}}var Tet=ZE,_et=String,vo=function(n){if(Tet(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return _et(n)},Iet=vs,cM=function(){var n=Iet(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t},SS=fi,Uet=ti,FS=Uet.RegExp,TS=SS(function(){var n=FS("a","y");return n.lastIndex=2,n.exec("abcd")!==null});TS||SS(function(){return!FS("a","y").sticky});var Let=TS||SS(function(){var n=FS("^r","gy");return n.lastIndex=2,n.exec("str")!==null}),hM={BROKEN_CARET:Let,UNSUPPORTED_Y:TS},uM={},Qet=RN,Net=JE,Pet=Object.keys||function(t){return Qet(t,Net)},Met=xa,ket=EN,Oet=fl,Det=vs,Ret=Wm,Het=Pet;uM.f=Met&&!ket?Object.defineProperties:function(t,e){Det(t);for(var r=Ret(e),i=Het(e),s=i.length,A=0,a;s>A;)Oet.f(t,a=i[A++],r[a]);return t};var Ket=vs,Vet=uM,fM=JE,Get=GE,jet=aP,$et=rb,Wet=VE,dM=">",gM="<",_S="prototype",IS="script",pM=Wet("IE_PROTO"),US=function(){},mM=function(n){return gM+IS+dM+n+gM+"/"+IS+dM},vM=function(n){n.write(mM("")),n.close();var t=n.parentWindow.Object;return n=null,t},zet=function(){var n=$et("iframe"),t="java"+IS+":",e;return n.style.display="none",jet.appendChild(n),n.src=String(t),e=n.contentWindow.document,e.open(),e.write(mM("document.F=Object")),e.close(),e.F},_b,Ib=function(){try{_b=new ActiveXObject("htmlfile")}catch{}Ib=typeof document<"u"?document.domain&&_b?vM(_b):zet():vM(_b);for(var n=fM.length;n--;)delete Ib[_S][fM[n]];return Ib()};Get[pM]=!0;var LS=Object.create||function(t,e){var r;return t!==null?(US[_S]=Ket(t),r=new US,US[_S]=null,r[pM]=t):r=Ib(),e===void 0?r:Vet.f(r,e)},Xet=fi,qet=ti,Yet=qet.RegExp,Jet=Xet(function(){var n=Yet(".","s");return!(n.dotAll&&n.test(`
|
|
296
|
-
`)&&n.flags==="s")}),Zet=fi,trt=ti,ert=trt.RegExp,rrt=Zet(function(){var n=ert("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),_g=_n,Ub=di,irt=vo,nrt=cM,srt=hM,Art=QE,art=LS,ort=ab.get,lrt=Jet,crt=rrt,hrt=Art("native-string-replace",String.prototype.replace),Lb=RegExp.prototype.exec,QS=Lb,urt=Ub("".charAt),frt=Ub("".indexOf),drt=Ub("".replace),wM=Ub("".slice),NS=function(){var n=/a/,t=/b*/g;return _g(Lb,n,"a"),_g(Lb,t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),yM=srt.BROKEN_CARET,PS=/()??/.exec("")[1]!==void 0,grt=NS||PS||yM||lrt||crt,bM=function(n,t){for(var e=n.groups=art(null),r=0;r<t.length;r++){var i=t[r];e[i[0]]=n[i[1]]}};grt&&(QS=function(t){var e=this,r=ort(e),i=irt(t),s=r.raw,A,a,o;if(s)return s.lastIndex=e.lastIndex,A=_g(QS,s,i),e.lastIndex=s.lastIndex,A&&r.groups&&bM(A,r.groups),A;var l=r.groups,h=yM&&e.sticky,u=_g(nrt,e),d=e.source,f=0,p=i;if(h){u=drt(u,"y",""),frt(u,"g")===-1&&(u+="g"),p=wM(i,e.lastIndex);var m=e.lastIndex>0&&urt(i,e.lastIndex-1);e.lastIndex>0&&(!e.multiline||e.multiline&&m!==`
|
|
297
|
-
`&&m!=="\r"&&m!=="\u2028"&&m!=="\u2029")&&(d="(?: (?:"+d+"))",p=" "+p,f++),a=new RegExp("^(?:"+d+")",u)}PS&&(a=new RegExp("^"+d+"$(?!\\s)",u)),NS&&(o=e.lastIndex);var y=_g(Lb,h?a:e,p);return h?y?(y.input=i,y[0]=wM(y[0],f),y.index=e.lastIndex,e.lastIndex+=y[0].length):e.lastIndex=0:NS&&y&&(e.lastIndex=e.global?y.index+y[0].length:o),PS&&y&&y.length>1&&_g(hrt,y[0],a,function(){for(var w=1;w<arguments.length-2;w++)arguments[w]===void 0&&(y[w]=void 0)}),y&&l&&bM(y,l),y});var MS=QS,prt=ws,BM=MS;prt({target:"RegExp",proto:!0,forced:/./.exec!==BM},{exec:BM});var CM=_n,xM=Tu,mrt=MS,EM=fi,SM=fn,vrt=Xm,wrt=SM("species"),kS=RegExp.prototype,OS=function(n,t,e,r){var i=SM(n),s=!EM(function(){var l={};return l[i]=function(){return 7},""[n](l)!==7}),A=s&&!EM(function(){var l=!1,h=/a/;if(n==="split"){var u={};u[wrt]=function(){return h},h={constructor:u,flags:""},h[i]=/./[i]}return h.exec=function(){return l=!0,null},h[i](""),!l});if(!s||!A||e){var a=/./[i],o=t(i,""[n],function(l,h,u,d,f){var p=h.exec;return p===mrt||p===kS.exec?s&&!f?{done:!0,value:CM(a,h,u,d)}:{done:!0,value:CM(l,u,h,d)}:{done:!1}});xM(String.prototype,n,o[0]),xM(kS,i,o[1])}r&&vrt(kS[i],"sham",!0)},DS=di,yrt=cb,brt=vo,Brt=Ea,Crt=DS("".charAt),FM=DS("".charCodeAt),xrt=DS("".slice),Ert=function(n){return function(t,e){var r=brt(Brt(t)),i=yrt(e),s=r.length,A,a;return i<0||i>=s?n?"":void 0:(A=FM(r,i),A<55296||A>56319||i+1===s||(a=FM(r,i+1))<56320||a>57343?n?Crt(r,i):A:n?xrt(r,i,i+2):(A-55296<<10)+(a-56320)+65536)}},Srt={charAt:Ert(!0)},Frt=Srt.charAt,RS=function(n,t,e){return t+(e&&Frt(n,t).length||1)},Trt=ti,_rt=fi,TM=Trt.RegExp,Irt=!_rt(function(){var n=!0;try{TM(".","d")}catch{n=!1}var t={},e="",r=n?"dgimsy":"gimsy",i=function(o,l){Object.defineProperty(t,o,{get:function(){return e+=l,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};n&&(s.hasIndices="d");for(var A in s)i(A,s[A]);var a=Object.getOwnPropertyDescriptor(TM.prototype,"flags").get.call(t);return a!==r||e!==r}),Urt={correct:Irt},Lrt=_n,Qrt=Fa,Nrt=Jy,_M=Urt,Prt=cM,Mrt=RegExp.prototype,Qb=_M.correct?function(n){return n.flags}:function(n){return!_M.correct&&Nrt(Mrt,n)&&!Qrt(n,"flags")?Lrt(Prt,n):n.flags},IM=_n,krt=vs,Ort=Ui,Drt=Su,Rrt=MS,Hrt=TypeError,HS=function(n,t){var e=n.exec;if(Ort(e)){var r=IM(e,n,t);return r!==null&&krt(r),r}if(Drt(n)==="RegExp")return IM(Rrt,n,t);throw new Hrt("RegExp#exec called on incompatible receiver")},Krt=_n,Vrt=di,Grt=OS,jrt=vs,$rt=Rs,Wrt=bg,Nb=vo,zrt=Ea,Xrt=vg,qrt=RS,Yrt=Qb,UM=HS,KS=Vrt("".indexOf);Grt("match",function(n,t,e){return[function(i){var s=zrt(this),A=$rt(i)?Xrt(i,n):void 0;return A?Krt(A,i,s):new RegExp(i)[n](Nb(s))},function(r){var i=jrt(this),s=Nb(r),A=e(t,i,s);if(A.done)return A.value;var a=Nb(Yrt(i));if(!~KS(a,"g"))return UM(i,s);var o=!!~KS(a,"u")||!!~KS(a,"v");i.lastIndex=0;for(var l=[],h=0,u;(u=UM(i,s))!==null;){var d=Nb(u[0]);l[h]=d,d===""&&(i.lastIndex=qrt(s,Wrt(i.lastIndex),o)),h++}return h===0?null:l}]});var VS=di,Jrt=eb,Zrt=Math.floor,GS=VS("".charAt),tit=VS("".replace),jS=VS("".slice),eit=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,rit=/\$([$&'`]|\d{1,2})/g,iit=function(n,t,e,r,i,s){var A=e+n.length,a=r.length,o=rit;return i!==void 0&&(i=Jrt(i),o=eit),tit(s,o,function(l,h){var u;switch(GS(h,0)){case"$":return"$";case"&":return n;case"`":return jS(t,0,e);case"'":return jS(t,A);case"<":u=i[jS(h,1,-1)];break;default:var d=+h;if(d===0)return l;if(d>a){var f=Zrt(d/10);return f===0?l:f<=a?r[f-1]===void 0?GS(h,1):r[f-1]+GS(h,1):l}u=r[d-1]}return u===void 0?"":u})},nit=sP,LM=_n,Pb=di,sit=OS,Ait=fi,ait=vs,oit=Ui,lit=Rs,cit=cb,hit=bg,Uu=vo,uit=Ea,fit=RS,dit=vg,git=iit,pit=Qb,mit=HS,vit=fn,$S=vit("replace"),wit=Math.max,yit=Math.min,bit=Pb([].concat),WS=Pb([].push),Ig=Pb("".indexOf),QM=Pb("".slice),Bit=function(n){return n===void 0?n:String(n)},Cit=function(){return"a".replace(/./,"$0")==="$0"}(),NM=function(){return/./[$S]?/./[$S]("a","$0")==="":!1}(),xit=!Ait(function(){var n=/./;return n.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(n,"$<a>")!=="7"});sit("replace",function(n,t,e){var r=NM?"$":"$0";return[function(s,A){var a=uit(this),o=lit(s)?dit(s,$S):void 0;return o?LM(o,s,a,A):LM(t,Uu(a),s,A)},function(i,s){var A=ait(this),a=Uu(i),o=oit(s);o||(s=Uu(s));var l=Uu(pit(A));if(typeof s=="string"&&!~Ig(s,r)&&!~Ig(s,"$<")&&!~Ig(l,"y")){var h=e(t,A,a,s);if(h.done)return h.value}var u=!!~Ig(l,"g"),d;u&&(d=!!~Ig(l,"u")||!!~Ig(l,"v"),A.lastIndex=0);for(var f=[],p;p=mit(A,a),!(p===null||(WS(f,p),!u));){var m=Uu(p[0]);m===""&&(A.lastIndex=fit(a,hit(A.lastIndex),d))}for(var y="",w=0,B=0;B<f.length;B++){p=f[B];for(var E=Uu(p[0]),S=wit(yit(cit(p.index),a.length),0),_=[],L,k=1;k<p.length;k++)WS(_,Bit(p[k]));var H=p.groups;if(o){var Q=bit([E],_,S,a);H!==void 0&&WS(Q,H),L=Uu(nit(s,void 0,Q))}else L=git(E,a,S,_,H,s);S>=w&&(y+=QM(a,w,S)+L,w=S+E.length)}return y+QM(a,w)}]},!xit||!Cit||NM);var Eit=Rs,Sit=Su,Fit=fn,Tit=Fit("match"),_it=function(n){var t;return Eit(n)&&((t=n[Tit])!==void 0?!!t:Sit(n)==="RegExp")},Iit=_it,Uit=TypeError,zS=function(n){if(Iit(n))throw new Uit("The method doesn't accept regular expressions");return n},Lit=fn,Qit=Lit("match"),XS=function(n){var t=/./;try{"/./"[n](t)}catch{try{return t[Qit]=!1,"/./"[n](t)}catch{}}return!1},Nit=ws,Pit=pb,Mit=$m.f,kit=bg,PM=vo,Oit=zS,Dit=Ea,Rit=XS,Hit=Pit("".slice),Kit=Math.min,MM=Rit("startsWith"),Vit=!MM&&!!function(){var n=Mit(String.prototype,"startsWith");return n&&!n.writable}();Nit({target:"String",proto:!0,forced:!Vit&&!MM},{startsWith:function(t){var e=PM(Dit(this));Oit(t);var r=PM(t),i=kit(Kit(arguments.length>1?arguments[1]:void 0,e.length));return Hit(e,i,i+r.length)===r}});var Git=fn,jit=LS,$it=fl.f,qS=Git("unscopables"),YS=Array.prototype;YS[qS]===void 0&&$it(YS,qS,{configurable:!0,value:jit(null)});var Wit=function(n){YS[qS][n]=!0},zit=fi,Xit=!zit(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),qit=Fa,Yit=Ui,Jit=eb,Zit=VE,tnt=Xit,kM=Zit("IE_PROTO"),JS=Object,ent=JS.prototype,OM=tnt?JS.getPrototypeOf:function(n){var t=Jit(n);if(qit(t,kM))return t[kM];var e=t.constructor;return Yit(e)&&t instanceof e?e.prototype:t instanceof JS?ent:null},rnt=fi,int=Ui,nnt=Rs,DM=OM,snt=Tu,Ant=fn,ZS=Ant("iterator"),RM=!1,Lu,tF,eF;[].keys&&(eF=[].keys(),"next"in eF?(tF=DM(DM(eF)),tF!==Object.prototype&&(Lu=tF)):RM=!0);var ant=!nnt(Lu)||rnt(function(){var n={};return Lu[ZS].call(n)!==n});ant&&(Lu={}),int(Lu[ZS])||snt(Lu,ZS,function(){return this});var HM={IteratorPrototype:Lu,BUGGY_SAFARI_ITERATORS:RM},ont=HM.IteratorPrototype,lnt=LS,cnt=bE,hnt=db,unt=nv,fnt=function(){return this},dnt=function(n,t,e,r){var i=t+" Iterator";return n.prototype=lnt(ont,{next:cnt(+!r,e)}),hnt(n,i,!1),unt[i]=fnt,n},gnt=ws,pnt=_n,KM=nb,mnt=Ui,vnt=dnt,VM=OM,GM=jN,wnt=db,ynt=Xm,rF=Tu,bnt=fn,Bnt=nv,jM=HM,Cnt=KM.PROPER,xnt=KM.CONFIGURABLE,$M=jM.IteratorPrototype,Mb=jM.BUGGY_SAFARI_ITERATORS,sv=bnt("iterator"),WM="keys",Av="values",zM="entries",Ent=function(){return this},Snt=function(n,t,e,r,i,s,A){vnt(e,t,r);var a=function(w){if(w===i&&d)return d;if(!Mb&&w&&w in h)return h[w];switch(w){case WM:return function(){return new e(this,w)};case Av:return function(){return new e(this,w)};case zM:return function(){return new e(this,w)}}return function(){return new e(this)}},o=t+" Iterator",l=!1,h=n.prototype,u=h[sv]||h["@@iterator"]||i&&h[i],d=!Mb&&u||a(i),f=t==="Array"&&h.entries||u,p,m,y;if(f&&(p=VM(f.call(new n)),p!==Object.prototype&&p.next&&(VM(p)!==$M&&(GM?GM(p,$M):mnt(p[sv])||rF(p,sv,Ent)),wnt(p,o,!0))),Cnt&&i===Av&&u&&u.name!==Av&&(xnt?ynt(h,"name",Av):(l=!0,d=function(){return pnt(u,this)})),i)if(m={values:a(Av),keys:s?d:a(WM),entries:a(zM)},A)for(y in m)(Mb||l||!(y in h))&&rF(h,y,m[y]);else gnt({target:t,proto:!0,forced:Mb||l},m);return h[sv]!==d&&rF(h,sv,d,{name:i}),Bnt[t]=d,m},Fnt=function(n,t){return{value:n,done:t}},Tnt=Wm,iF=Wit,XM=nv,qM=ab,_nt=fl.f,Int=Snt,kb=Fnt,Unt=xa,YM="Array Iterator",Lnt=qM.set,Qnt=qM.getterFor(YM),Nnt=Int(Array,"Array",function(n,t){Lnt(this,{type:YM,target:Tnt(n),index:0,kind:t})},function(){var n=Qnt(this),t=n.target,e=n.index++;if(!t||e>=t.length)return n.target=null,kb(void 0,!0);switch(n.kind){case"keys":return kb(e,!1);case"values":return kb(t[e],!1)}return kb([e,t[e]],!1)},"values"),JM=XM.Arguments=XM.Array;if(iF("keys"),iF("values"),iF("entries"),Unt&&JM.name!=="values")try{_nt(JM,"name",{value:"values"})}catch{}var Pnt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Mnt=rb,nF=Mnt("span").classList,ZM=nF&&nF.constructor&&nF.constructor.prototype,knt=ZM===Object.prototype?void 0:ZM,tk=ti,ek=Pnt,Ont=knt,av=Nnt,rk=Xm,Dnt=db,Rnt=fn,sF=Rnt("iterator"),AF=av.values,ik=function(n,t){if(n){if(n[sF]!==AF)try{rk(n,sF,AF)}catch{n[sF]=AF}if(Dnt(n,t,!0),ek[t]){for(var e in av)if(n[e]!==av[e])try{rk(n,e,av[e])}catch{n[e]=av[e]}}}};for(var aF in ek)ik(tk[aF]&&tk[aF].prototype,aF);ik(Ont,"DOMTokenList");function Hnt(n,t){if(Ar(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var r=e.call(n,t);if(Ar(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function Knt(n){var t=Hnt(n,"string");return Ar(t)=="symbol"?t:t+""}function oF(n,t,e){return(t=Knt(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Vnt=ul,Gnt=eb,jnt=tN,$nt=qE,nk=TypeError,sk="Reduce of empty array with no initial value",Wnt=function(n){return function(t,e,r,i){var s=Gnt(t),A=jnt(s),a=$nt(s);if(Vnt(e),a===0&&r<2)throw new nk(sk);var o=n?a-1:0,l=n?-1:1;if(r<2)for(;;){if(o in A){i=A[o],o+=l;break}if(o+=l,n?o<0:a<=o)throw new nk(sk)}for(;n?o>=0:a>o;o+=l)o in A&&(i=e(i,A[o],o,s));return i}},znt={left:Wnt(!1)},Xnt=fi,Ak=function(n,t){var e=[][n];return!!e&&Xnt(function(){e.call(null,t||function(){return 1},1)})},qnt=ws,Ynt=znt.left,Jnt=Ak,ak=FE,Znt=fb,tst=!Znt&&ak>79&&ak<83,est=tst||!Jnt("reduce");qnt({target:"Array",proto:!0,forced:est},{reduce:function(t){var e=arguments.length;return Ynt(this,t,e,e>1?arguments[1]:void 0)}});var rst=ws,ist=pb,nst=$m.f,sst=bg,ok=vo,Ast=zS,ast=Ea,ost=XS,lst=ist("".slice),cst=Math.min,lk=ost("endsWith"),hst=!lk&&!!function(){var n=nst(String.prototype,"endsWith");return n&&!n.writable}();rst({target:"String",proto:!0,forced:!hst&&!lk},{endsWith:function(t){var e=ok(ast(this));Ast(t);var r=ok(t),i=arguments.length>1?arguments[1]:void 0,s=e.length,A=i===void 0?s:cst(sst(i),s);return lst(e,A-r.length,A)===r}});var lF=_n,cF=di,ust=OS,fst=vs,dst=Rs,gst=Ea,pst=eP,mst=RS,vst=bg,hF=vo,wst=vg,yst=Qb,ck=HS,bst=hM,Bst=fi,Ug=bst.UNSUPPORTED_Y,Cst=4294967295,xst=Math.min,uF=cF([].push),fF=cF("".slice),Ob=cF("".indexOf),Est=!Bst(function(){var n=/(?:)/,t=n.exec;n.exec=function(){return t.apply(this,arguments)};var e="ab".split(n);return e.length!==2||e[0]!=="a"||e[1]!=="b"}),hk="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;ust("split",function(n,t,e){var r="0".split(void 0,0).length?function(i,s){return i===void 0&&s===0?[]:lF(t,this,i,s)}:t;return[function(s,A){var a=gst(this),o=dst(s)?wst(s,n):void 0;return o?lF(o,s,a,A):lF(r,hF(a),s,A)},function(i,s){var A=fst(this),a=hF(i);if(!hk){var o=e(r,A,a,s,r!==t);if(o.done)return o.value}var l=pst(A,RegExp),h=hF(yst(A)),u=!!~Ob(h,"u")||!!~Ob(h,"v");Ug?~Ob(h,"g")||(h+="g"):~Ob(h,"y")||(h+="y");var d=new l(Ug?"^(?:"+A.source+")":A,h),f=s===void 0?Cst:s>>>0;if(f===0)return[];if(a.length===0)return ck(d,a)===null?[a]:[];for(var p=0,m=0,y=[];m<a.length;){d.lastIndex=Ug?0:m;var w=ck(d,Ug?fF(a,m):a),B;if(w===null||(B=xst(vst(d.lastIndex+(Ug?m:0)),a.length))===p)m=mst(a,m,u);else{if(uF(y,fF(a,p,m)),y.length===f)return y;for(var E=1;E<=w.length-1;E++)if(uF(y,w[E]),y.length===f)return y;m=p=B}}return uF(y,fF(a,p)),y}]},hk||!Est,Ug);var Db={exports:{}},ov={exports:{}};(function(){var n,t,e,r,i,s;typeof performance<"u"&&performance!==null&&performance.now?ov.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(ov.exports=function(){return(n()-i)/1e6},t=process.hrtime,n=function(){var A;return A=t(),A[0]*1e9+A[1]},r=n(),s=process.uptime()*1e9,i=r-s):Date.now?(ov.exports=function(){return Date.now()-e},e=Date.now()):(ov.exports=function(){return new Date().getTime()-e},e=new Date().getTime())}).call(Hd);for(var Sst=ov.exports,Fst=Sst,gl=typeof window>"u"?Hd:window,Rb=["moz","webkit"],Lg="AnimationFrame",Qg=gl["request"+Lg],lv=gl["cancel"+Lg]||gl["cancelRequest"+Lg],cv=0;!Qg&&cv<Rb.length;cv++)Qg=gl[Rb[cv]+"Request"+Lg],lv=gl[Rb[cv]+"Cancel"+Lg]||gl[Rb[cv]+"CancelRequest"+Lg];if(!Qg||!lv){var dF=0,uk=0,Qu=[],Tst=1e3/60;Qg=function(n){if(Qu.length===0){var t=Fst(),e=Math.max(0,Tst-(t-dF));dF=e+t,setTimeout(function(){var r=Qu.slice(0);Qu.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(dF)}catch(s){setTimeout(function(){throw s},0)}},Math.round(e))}return Qu.push({handle:++uk,callback:n,cancelled:!1}),uk},lv=function(n){for(var t=0;t<Qu.length;t++)Qu[t].handle===n&&(Qu[t].cancelled=!0)}}Db.exports=function(n){return Qg.call(gl,n)},Db.exports.cancel=function(){lv.apply(gl,arguments)},Db.exports.polyfill=function(n){n||(n=gl),n.requestAnimationFrame=Qg,n.cancelAnimationFrame=lv};var _st=Db.exports;const gF=V0(_st);var fk=`
|
|
298
|
-
\v\f\r \u2028\u2029\uFEFF`,Ist=di,Ust=Ea,Lst=vo,pF=fk,dk=Ist("".replace),Qst=RegExp("^["+pF+"]+"),Nst=RegExp("(^|[^"+pF+"])["+pF+"]+$"),Pst=function(n){return function(t){var e=Lst(Ust(t));return n&1&&(e=dk(e,Qst,"")),n&2&&(e=dk(e,Nst,"$1")),e}},Mst={trim:Pst(3)},kst=nb.PROPER,Ost=fi,gk=fk,pk="
",Dst=function(n){return Ost(function(){return!!gk[n]()||pk[n]()!==pk||kst&&gk[n].name!==n})},Rst=ws,Hst=Mst.trim,Kst=Dst;Rst({target:"String",proto:!0,forced:Kst("trim")},{trim:function(){return Hst(this)}});var Vst=function(n){this.ok=!1,this.alpha=1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n=n.replace(/ /g,""),n=n.toLowerCase();var t={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",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};n=t[n]||n;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseFloat(o[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],r=0;r<e.length;r++){var i=e[r].re,s=e[r].process,A=i.exec(n);if(A){var a=s(A);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),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.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+o+l+h},this.getHelpXML=function(){for(var o=new Array,l=0;l<e.length;l++)for(var h=e[l].example,u=0;u<h.length;u++)o[o.length]=h[u];for(var d in t)o[o.length]=d;var f=document.createElement("ul");f.setAttribute("id","rgbcolor-examples");for(var l=0;l<o.length;l++)try{var p=document.createElement("li"),m=new RGBColor(o[l]),y=document.createElement("div");y.style.cssText="margin: 3px; border: 1px solid black; background:"+m.toHex()+"; color:"+m.toHex(),y.appendChild(document.createTextNode("test"));var w=document.createTextNode(" "+o[l]+" -> "+m.toRGB()+" -> "+m.toHex());p.appendChild(y),p.appendChild(w),f.appendChild(p)}catch{}return f}};const mF=V0(Vst);var Gst=ws,jst=pb,$st=ON.indexOf,Wst=Ak,vF=jst([].indexOf),mk=!!vF&&1/vF([1],1,-0)<0,zst=mk||!Wst("indexOf");Gst({target:"Array",proto:!0,forced:zst},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return mk?vF(this,t,e)||0:$st(this,t,e)}});var Xst=ws,qst=di,Yst=zS,Jst=Ea,vk=vo,Zst=XS,tAt=qst("".indexOf);Xst({target:"String",proto:!0,forced:!Zst("includes")},{includes:function(t){return!!~tAt(vk(Jst(this)),vk(Yst(t)),arguments.length>1?arguments[1]:void 0)}});var eAt=Su,rAt=Array.isArray||function(t){return eAt(t)==="Array"},iAt=ws,nAt=di,sAt=rAt,AAt=nAt([].reverse),wk=[1,2];iAt({target:"Array",proto:!0,forced:String(wk)===String(wk.reverse())},{reverse:function(){return sAt(this)&&(this.length=this.length),AAt(this)}});/*! *****************************************************************************
|
|
299
|
-
Copyright (c) Microsoft Corporation.
|
|
300
|
-
|
|
301
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
302
|
-
purpose with or without fee is hereby granted.
|
|
303
|
-
|
|
304
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
305
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
306
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
307
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
308
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
309
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
310
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
311
|
-
***************************************************************************** */var yk=function(n,t){return(yk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])})(n,t)};function bk(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}yk(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function aAt(n){var t="";Array.isArray(n)||(n=[n]);for(var e=0;e<n.length;e++){var r=n[e];if(r.type===It.CLOSE_PATH)t+="z";else if(r.type===It.HORIZ_LINE_TO)t+=(r.relative?"h":"H")+r.x;else if(r.type===It.VERT_LINE_TO)t+=(r.relative?"v":"V")+r.y;else if(r.type===It.MOVE_TO)t+=(r.relative?"m":"M")+r.x+" "+r.y;else if(r.type===It.LINE_TO)t+=(r.relative?"l":"L")+r.x+" "+r.y;else if(r.type===It.CURVE_TO)t+=(r.relative?"c":"C")+r.x1+" "+r.y1+" "+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===It.SMOOTH_CURVE_TO)t+=(r.relative?"s":"S")+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===It.QUAD_TO)t+=(r.relative?"q":"Q")+r.x1+" "+r.y1+" "+r.x+" "+r.y;else if(r.type===It.SMOOTH_QUAD_TO)t+=(r.relative?"t":"T")+r.x+" "+r.y;else{if(r.type!==It.ARC)throw new Error('Unexpected command type "'+r.type+'" at index '+e+".");t+=(r.relative?"a":"A")+r.rX+" "+r.rY+" "+r.xRot+" "+ +r.lArcFlag+" "+ +r.sweepFlag+" "+r.x+" "+r.y}}return t}function wF(n,t){var e=n[0],r=n[1];return[e*Math.cos(t)-r*Math.sin(t),e*Math.sin(t)+r*Math.cos(t)]}function Ta(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=0;e<n.length;e++)if(typeof n[e]!="number")throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof n[e]+" == typeof "+n[e]);return!0}var zc=Math.PI;function yF(n,t,e){n.lArcFlag=n.lArcFlag===0?0:1,n.sweepFlag=n.sweepFlag===0?0:1;var r=n.rX,i=n.rY,s=n.x,A=n.y;r=Math.abs(n.rX),i=Math.abs(n.rY);var a=wF([(t-s)/2,(e-A)/2],-n.xRot/180*zc),o=a[0],l=a[1],h=Math.pow(o,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(i,2);1<h&&(r*=Math.sqrt(h),i*=Math.sqrt(h)),n.rX=r,n.rY=i;var u=Math.pow(r,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(o,2),d=(n.lArcFlag!==n.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-u)/u)),f=r*l/i*d,p=-i*o/r*d,m=wF([f,p],n.xRot/180*zc);n.cX=m[0]+(t+s)/2,n.cY=m[1]+(e+A)/2,n.phi1=Math.atan2((l-p)/i,(o-f)/r),n.phi2=Math.atan2((-l-p)/i,(-o-f)/r),n.sweepFlag===0&&n.phi2>n.phi1&&(n.phi2-=2*zc),n.sweepFlag===1&&n.phi2<n.phi1&&(n.phi2+=2*zc),n.phi1*=180/zc,n.phi2*=180/zc}function Bk(n,t,e){Ta(n,t,e);var r=n*n+t*t-e*e;if(0>r)return[];if(r===0)return[[n*e/(n*n+t*t),t*e/(n*n+t*t)]];var i=Math.sqrt(r);return[[(n*e+t*i)/(n*n+t*t),(t*e-n*i)/(n*n+t*t)],[(n*e-t*i)/(n*n+t*t),(t*e+n*i)/(n*n+t*t)]]}var Gi,pl=Math.PI/180;function Ck(n,t,e){return(1-e)*n+e*t}function xk(n,t,e,r){return n+Math.cos(r/180*zc)*t+Math.sin(r/180*zc)*e}function Ek(n,t,e,r){var i=1e-6,s=t-n,A=e-t,a=3*s+3*(r-e)-6*A,o=6*(A-s),l=3*s;return Math.abs(a)<i?[-l/o]:function(h,u,d){var f=h*h/4-u;if(f<-d)return[];if(f<=d)return[-h/2];var p=Math.sqrt(f);return[-h/2-p,-h/2+p]}(o/a,l/a,i)}function Sk(n,t,e,r,i){var s=1-i;return n*(s*s*s)+t*(3*s*s*i)+e*(3*s*i*i)+r*(i*i*i)}(function(n){function t(){return i(function(a,o,l){return a.relative&&(a.x1!==void 0&&(a.x1+=o),a.y1!==void 0&&(a.y1+=l),a.x2!==void 0&&(a.x2+=o),a.y2!==void 0&&(a.y2+=l),a.x!==void 0&&(a.x+=o),a.y!==void 0&&(a.y+=l),a.relative=!1),a})}function e(){var a=NaN,o=NaN,l=NaN,h=NaN;return i(function(u,d,f){return u.type&It.SMOOTH_CURVE_TO&&(u.type=It.CURVE_TO,a=isNaN(a)?d:a,o=isNaN(o)?f:o,u.x1=u.relative?d-a:2*d-a,u.y1=u.relative?f-o:2*f-o),u.type&It.CURVE_TO?(a=u.relative?d+u.x2:u.x2,o=u.relative?f+u.y2:u.y2):(a=NaN,o=NaN),u.type&It.SMOOTH_QUAD_TO&&(u.type=It.QUAD_TO,l=isNaN(l)?d:l,h=isNaN(h)?f:h,u.x1=u.relative?d-l:2*d-l,u.y1=u.relative?f-h:2*f-h),u.type&It.QUAD_TO?(l=u.relative?d+u.x1:u.x1,h=u.relative?f+u.y1:u.y1):(l=NaN,h=NaN),u})}function r(){var a=NaN,o=NaN;return i(function(l,h,u){if(l.type&It.SMOOTH_QUAD_TO&&(l.type=It.QUAD_TO,a=isNaN(a)?h:a,o=isNaN(o)?u:o,l.x1=l.relative?h-a:2*h-a,l.y1=l.relative?u-o:2*u-o),l.type&It.QUAD_TO){a=l.relative?h+l.x1:l.x1,o=l.relative?u+l.y1:l.y1;var d=l.x1,f=l.y1;l.type=It.CURVE_TO,l.x1=((l.relative?0:h)+2*d)/3,l.y1=((l.relative?0:u)+2*f)/3,l.x2=(l.x+2*d)/3,l.y2=(l.y+2*f)/3}else a=NaN,o=NaN;return l})}function i(a){var o=0,l=0,h=NaN,u=NaN;return function(d){if(isNaN(h)&&!(d.type&It.MOVE_TO))throw new Error("path must start with moveto");var f=a(d,o,l,h,u);return d.type&It.CLOSE_PATH&&(o=h,l=u),d.x!==void 0&&(o=d.relative?o+d.x:d.x),d.y!==void 0&&(l=d.relative?l+d.y:d.y),d.type&It.MOVE_TO&&(h=o,u=l),f}}function s(a,o,l,h,u,d){return Ta(a,o,l,h,u,d),i(function(f,p,m,y){var w=f.x1,B=f.x2,E=f.relative&&!isNaN(y),S=f.x!==void 0?f.x:E?0:p,_=f.y!==void 0?f.y:E?0:m;function L(M){return M*M}f.type&It.HORIZ_LINE_TO&&o!==0&&(f.type=It.LINE_TO,f.y=f.relative?0:m),f.type&It.VERT_LINE_TO&&l!==0&&(f.type=It.LINE_TO,f.x=f.relative?0:p),f.x!==void 0&&(f.x=f.x*a+_*l+(E?0:u)),f.y!==void 0&&(f.y=S*o+f.y*h+(E?0:d)),f.x1!==void 0&&(f.x1=f.x1*a+f.y1*l+(E?0:u)),f.y1!==void 0&&(f.y1=w*o+f.y1*h+(E?0:d)),f.x2!==void 0&&(f.x2=f.x2*a+f.y2*l+(E?0:u)),f.y2!==void 0&&(f.y2=B*o+f.y2*h+(E?0:d));var k=a*h-o*l;if(f.xRot!==void 0&&(a!==1||o!==0||l!==0||h!==1))if(k===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=It.LINE_TO;else{var H=f.xRot*Math.PI/180,Q=Math.sin(H),W=Math.cos(H),U=1/L(f.rX),D=1/L(f.rY),j=L(W)*U+L(Q)*D,V=2*Q*W*(U-D),st=L(Q)*U+L(W)*D,rt=j*h*h-V*o*h+st*o*o,it=V*(a*h+o*l)-2*(j*l*h+st*a*o),At=j*l*l-V*a*l+st*a*a,ut=(Math.atan2(it,rt-At)+Math.PI)%Math.PI/2,vt=Math.sin(ut),mt=Math.cos(ut);f.rX=Math.abs(k)/Math.sqrt(rt*L(mt)+it*vt*mt+At*L(vt)),f.rY=Math.abs(k)/Math.sqrt(rt*L(vt)-it*vt*mt+At*L(mt)),f.xRot=180*ut/Math.PI}return f.sweepFlag!==void 0&&0>k&&(f.sweepFlag=+!f.sweepFlag),f})}function A(){return function(a){var o={};for(var l in a)o[l]=a[l];return o}}n.ROUND=function(a){function o(l){return Math.round(l*a)/a}return a===void 0&&(a=1e13),Ta(a),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},n.TO_ABS=t,n.TO_REL=function(){return i(function(a,o,l){return a.relative||(a.x1!==void 0&&(a.x1-=o),a.y1!==void 0&&(a.y1-=l),a.x2!==void 0&&(a.x2-=o),a.y2!==void 0&&(a.y2-=l),a.x!==void 0&&(a.x-=o),a.y!==void 0&&(a.y-=l),a.relative=!0),a})},n.NORMALIZE_HVZ=function(a,o,l){return a===void 0&&(a=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),i(function(h,u,d,f,p){if(isNaN(f)&&!(h.type&It.MOVE_TO))throw new Error("path must start with moveto");return o&&h.type&It.HORIZ_LINE_TO&&(h.type=It.LINE_TO,h.y=h.relative?0:d),l&&h.type&It.VERT_LINE_TO&&(h.type=It.LINE_TO,h.x=h.relative?0:u),a&&h.type&It.CLOSE_PATH&&(h.type=It.LINE_TO,h.x=h.relative?f-u:f,h.y=h.relative?p-d:p),h.type&It.ARC&&(h.rX===0||h.rY===0)&&(h.type=It.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h})},n.NORMALIZE_ST=e,n.QT_TO_C=r,n.INFO=i,n.SANITIZE=function(a){a===void 0&&(a=0),Ta(a);var o=NaN,l=NaN,h=NaN,u=NaN;return i(function(d,f,p,m,y){var w=Math.abs,B=!1,E=0,S=0;if(d.type&It.SMOOTH_CURVE_TO&&(E=isNaN(o)?0:f-o,S=isNaN(l)?0:p-l),d.type&(It.CURVE_TO|It.SMOOTH_CURVE_TO)?(o=d.relative?f+d.x2:d.x2,l=d.relative?p+d.y2:d.y2):(o=NaN,l=NaN),d.type&It.SMOOTH_QUAD_TO?(h=isNaN(h)?f:2*f-h,u=isNaN(u)?p:2*p-u):d.type&It.QUAD_TO?(h=d.relative?f+d.x1:d.x1,u=d.relative?p+d.y1:d.y2):(h=NaN,u=NaN),d.type&It.LINE_COMMANDS||d.type&It.ARC&&(d.rX===0||d.rY===0||!d.lArcFlag)||d.type&It.CURVE_TO||d.type&It.SMOOTH_CURVE_TO||d.type&It.QUAD_TO||d.type&It.SMOOTH_QUAD_TO){var _=d.x===void 0?0:d.relative?d.x:d.x-f,L=d.y===void 0?0:d.relative?d.y:d.y-p;E=isNaN(h)?d.x1===void 0?E:d.relative?d.x:d.x1-f:h-f,S=isNaN(u)?d.y1===void 0?S:d.relative?d.y:d.y1-p:u-p;var k=d.x2===void 0?0:d.relative?d.x:d.x2-f,H=d.y2===void 0?0:d.relative?d.y:d.y2-p;w(_)<=a&&w(L)<=a&&w(E)<=a&&w(S)<=a&&w(k)<=a&&w(H)<=a&&(B=!0)}return d.type&It.CLOSE_PATH&&w(f-m)<=a&&w(p-y)<=a&&(B=!0),B?[]:d})},n.MATRIX=s,n.ROTATE=function(a,o,l){o===void 0&&(o=0),l===void 0&&(l=0),Ta(a,o,l);var h=Math.sin(a),u=Math.cos(a);return s(u,h,-h,u,o-o*u+l*h,l-o*h-l*u)},n.TRANSLATE=function(a,o){return o===void 0&&(o=0),Ta(a,o),s(1,0,0,1,a,o)},n.SCALE=function(a,o){return o===void 0&&(o=a),Ta(a,o),s(a,0,0,o,0,0)},n.SKEW_X=function(a){return Ta(a),s(1,0,Math.atan(a),1,0,0)},n.SKEW_Y=function(a){return Ta(a),s(1,Math.atan(a),0,1,0,0)},n.X_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),Ta(a),s(-1,0,0,1,a,0)},n.Y_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),Ta(a),s(1,0,0,-1,0,a)},n.A_TO_C=function(){return i(function(a,o,l){return It.ARC===a.type?function(h,u,d){var f,p,m,y;h.cX||yF(h,u,d);for(var w=Math.min(h.phi1,h.phi2),B=Math.max(h.phi1,h.phi2)-w,E=Math.ceil(B/90),S=new Array(E),_=u,L=d,k=0;k<E;k++){var H=Ck(h.phi1,h.phi2,k/E),Q=Ck(h.phi1,h.phi2,(k+1)/E),W=Q-H,U=4/3*Math.tan(W*pl/4),D=[Math.cos(H*pl)-U*Math.sin(H*pl),Math.sin(H*pl)+U*Math.cos(H*pl)],j=D[0],V=D[1],st=[Math.cos(Q*pl),Math.sin(Q*pl)],rt=st[0],it=st[1],At=[rt+U*Math.sin(Q*pl),it-U*Math.cos(Q*pl)],ut=At[0],vt=At[1];S[k]={relative:h.relative,type:It.CURVE_TO};var mt=function(M,$){var q=wF([M*h.rX,$*h.rY],h.xRot),tt=q[0],et=q[1];return[h.cX+tt,h.cY+et]};f=mt(j,V),S[k].x1=f[0],S[k].y1=f[1],p=mt(ut,vt),S[k].x2=p[0],S[k].y2=p[1],m=mt(rt,it),S[k].x=m[0],S[k].y=m[1],h.relative&&(S[k].x1-=_,S[k].y1-=L,S[k].x2-=_,S[k].y2-=L,S[k].x-=_,S[k].y-=L),_=(y=[S[k].x,S[k].y])[0],L=y[1]}return S}(a,a.relative?0:o,a.relative?0:l):a})},n.ANNOTATE_ARCS=function(){return i(function(a,o,l){return a.relative&&(o=0,l=0),It.ARC===a.type&&yF(a,o,l),a})},n.CLONE=A,n.CALCULATE_BOUNDS=function(){var a=function(d){var f={};for(var p in d)f[p]=d[p];return f},o=t(),l=r(),h=e(),u=i(function(d,f,p){var m=h(l(o(a(d))));function y(vt){vt>u.maxX&&(u.maxX=vt),vt<u.minX&&(u.minX=vt)}function w(vt){vt>u.maxY&&(u.maxY=vt),vt<u.minY&&(u.minY=vt)}if(m.type&It.DRAWING_COMMANDS&&(y(f),w(p)),m.type&It.HORIZ_LINE_TO&&y(m.x),m.type&It.VERT_LINE_TO&&w(m.y),m.type&It.LINE_TO&&(y(m.x),w(m.y)),m.type&It.CURVE_TO){y(m.x),w(m.y);for(var B=0,E=Ek(f,m.x1,m.x2,m.x);B<E.length;B++)0<(ut=E[B])&&1>ut&&y(Sk(f,m.x1,m.x2,m.x,ut));for(var S=0,_=Ek(p,m.y1,m.y2,m.y);S<_.length;S++)0<(ut=_[S])&&1>ut&&w(Sk(p,m.y1,m.y2,m.y,ut))}if(m.type&It.ARC){y(m.x),w(m.y),yF(m,f,p);for(var L=m.xRot/180*Math.PI,k=Math.cos(L)*m.rX,H=Math.sin(L)*m.rX,Q=-Math.sin(L)*m.rY,W=Math.cos(L)*m.rY,U=m.phi1<m.phi2?[m.phi1,m.phi2]:-180>m.phi2?[m.phi2+360,m.phi1+360]:[m.phi2,m.phi1],D=U[0],j=U[1],V=function(vt){var mt=vt[0],M=vt[1],$=180*Math.atan2(M,mt)/Math.PI;return $<D?$+360:$},st=0,rt=Bk(Q,-k,0).map(V);st<rt.length;st++)(ut=rt[st])>D&&ut<j&&y(xk(m.cX,k,Q,ut));for(var it=0,At=Bk(W,-H,0).map(V);it<At.length;it++){var ut;(ut=At[it])>D&&ut<j&&w(xk(m.cY,H,W,ut))}}return d});return u.minX=1/0,u.maxX=-1/0,u.minY=1/0,u.maxY=-1/0,u}})(Gi||(Gi={}));var _a,Fk=function(){function n(){}return n.prototype.round=function(t){return this.transform(Gi.ROUND(t))},n.prototype.toAbs=function(){return this.transform(Gi.TO_ABS())},n.prototype.toRel=function(){return this.transform(Gi.TO_REL())},n.prototype.normalizeHVZ=function(t,e,r){return this.transform(Gi.NORMALIZE_HVZ(t,e,r))},n.prototype.normalizeST=function(){return this.transform(Gi.NORMALIZE_ST())},n.prototype.qtToC=function(){return this.transform(Gi.QT_TO_C())},n.prototype.aToC=function(){return this.transform(Gi.A_TO_C())},n.prototype.sanitize=function(t){return this.transform(Gi.SANITIZE(t))},n.prototype.translate=function(t,e){return this.transform(Gi.TRANSLATE(t,e))},n.prototype.scale=function(t,e){return this.transform(Gi.SCALE(t,e))},n.prototype.rotate=function(t,e,r){return this.transform(Gi.ROTATE(t,e,r))},n.prototype.matrix=function(t,e,r,i,s,A){return this.transform(Gi.MATRIX(t,e,r,i,s,A))},n.prototype.skewX=function(t){return this.transform(Gi.SKEW_X(t))},n.prototype.skewY=function(t){return this.transform(Gi.SKEW_Y(t))},n.prototype.xSymmetry=function(t){return this.transform(Gi.X_AXIS_SYMMETRY(t))},n.prototype.ySymmetry=function(t){return this.transform(Gi.Y_AXIS_SYMMETRY(t))},n.prototype.annotateArcs=function(){return this.transform(Gi.ANNOTATE_ARCS())},n}(),oAt=function(n){return n===" "||n===" "||n==="\r"||n===`
|
|
312
|
-
`},Tk=function(n){return 48<=n.charCodeAt(0)&&n.charCodeAt(0)<=57},lAt=function(n){function t(){var e=n.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return bk(t,n),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,r){var i=this;r===void 0&&(r=[]);for(var s=function(u){r.push(u),i.curArgs.length=0,i.canParseCommandOrComma=!0},A=0;A<e.length;A++){var a=e[A],o=!(this.curCommandType!==It.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=Tk(a)&&(this.curNumber==="0"&&a==="0"||o);if(!Tk(a)||l)if(a!=="e"&&a!=="E")if(a!=="-"&&a!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(a!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+A);if(this.curCommandType===It.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+A+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+A+'"')}this.curArgs.push(h),this.curArgs.length===cAt[this.curCommandType]&&(It.HORIZ_LINE_TO===this.curCommandType?s({type:It.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):It.VERT_LINE_TO===this.curCommandType?s({type:It.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===It.MOVE_TO||this.curCommandType===It.LINE_TO||this.curCommandType===It.SMOOTH_QUAD_TO?(s({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),It.MOVE_TO===this.curCommandType&&(this.curCommandType=It.LINE_TO)):this.curCommandType===It.CURVE_TO?s({type:It.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===It.SMOOTH_CURVE_TO?s({type:It.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===It.QUAD_TO?s({type:It.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===It.ARC&&s({type:It.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!oAt(a))if(a===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(a!=="+"&&a!=="-"&&a!==".")if(l)this.curNumber=a,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+A+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+a+'" at index '+A+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,a!=="z"&&a!=="Z")if(a==="h"||a==="H")this.curCommandType=It.HORIZ_LINE_TO,this.curCommandRelative=a==="h";else if(a==="v"||a==="V")this.curCommandType=It.VERT_LINE_TO,this.curCommandRelative=a==="v";else if(a==="m"||a==="M")this.curCommandType=It.MOVE_TO,this.curCommandRelative=a==="m";else if(a==="l"||a==="L")this.curCommandType=It.LINE_TO,this.curCommandRelative=a==="l";else if(a==="c"||a==="C")this.curCommandType=It.CURVE_TO,this.curCommandRelative=a==="c";else if(a==="s"||a==="S")this.curCommandType=It.SMOOTH_CURVE_TO,this.curCommandRelative=a==="s";else if(a==="q"||a==="Q")this.curCommandType=It.QUAD_TO,this.curCommandRelative=a==="q";else if(a==="t"||a==="T")this.curCommandType=It.SMOOTH_QUAD_TO,this.curCommandRelative=a==="t";else{if(a!=="a"&&a!=="A")throw new SyntaxError('Unexpected character "'+a+'" at index '+A+".");this.curCommandType=It.ARC,this.curCommandRelative=a==="a"}else r.push({type:It.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=a,this.curNumberHasDecimal=a==="."}else this.curNumber+=a,this.curNumberHasDecimal=!0;else this.curNumber+=a;else this.curNumber+=a,this.curNumberHasExp=!0;else this.curNumber+=a,this.curNumberHasExpDigits=this.curNumberHasExp}return r},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(r,i){i===void 0&&(i=[]);for(var s=0,A=Object.getPrototypeOf(this).parse.call(this,r);s<A.length;s++){var a=A[s],o=e(a);Array.isArray(o)?i.push.apply(i,o):i.push(o)}return i}}})},t}(Fk),It=function(n){function t(e){var r=n.call(this)||this;return r.commands=typeof e=="string"?t.parse(e):e,r}return bk(t,n),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=Gi.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var r=[],i=0,s=this.commands;i<s.length;i++){var A=e(s[i]);Array.isArray(A)?r.push.apply(r,A):r.push(A)}return this.commands=r,this},t.encode=function(e){return aAt(e)},t.parse=function(e){var r=new lAt,i=[];return r.parse(e,i),r.finish(i),i},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t}(Fk),cAt=((_a={})[It.MOVE_TO]=2,_a[It.LINE_TO]=2,_a[It.HORIZ_LINE_TO]=1,_a[It.VERT_LINE_TO]=1,_a[It.CLOSE_PATH]=0,_a[It.QUAD_TO]=4,_a[It.SMOOTH_QUAD_TO]=2,_a[It.CURVE_TO]=6,_a[It.SMOOTH_CURVE_TO]=4,_a[It.ARC]=7,_a),hAt=nb.PROPER,uAt=Tu,fAt=vs,_k=vo,dAt=fi,gAt=Qb,bF="toString",Ik=RegExp.prototype,Uk=Ik[bF],pAt=dAt(function(){return Uk.call({source:"a",flags:"b"})!=="/a/b"}),mAt=hAt&&Uk.name!==bF;(pAt||mAt)&&uAt(Ik,bF,function(){var t=fAt(this),e=_k(t.source),r=_k(gAt(t));return"/"+e+"/"+r},{unsafe:!0});function Hb(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hb=function(t){return typeof t}:Hb=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hb(n)}function vAt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var wAt=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],yAt=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function bAt(n,t,e,r,i){if(typeof n=="string"&&(n=document.getElementById(n)),!n||Hb(n)!=="object"||!("getContext"in n))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=n.getContext("2d");try{return s.getImageData(t,e,r,i)}catch(A){throw new Error("unable to access image data: "+A)}}function BAt(n,t,e,r,i,s){if(!(isNaN(s)||s<1)){s|=0;var A=bAt(n,t,e,r,i);A=CAt(A,t,e,r,i,s),n.getContext("2d").putImageData(A,t,e)}}function CAt(n,t,e,r,i,s){for(var A=n.data,a=2*s+1,o=r-1,l=i-1,h=s+1,u=h*(h+1)/2,d=new Lk,f=d,p,m=1;m<a;m++)f=f.next=new Lk,m===h&&(p=f);f.next=d;for(var y=null,w=null,B=0,E=0,S=wAt[s],_=yAt[s],L=0;L<i;L++){f=d;for(var k=A[E],H=A[E+1],Q=A[E+2],W=A[E+3],U=0;U<h;U++)f.r=k,f.g=H,f.b=Q,f.a=W,f=f.next;for(var D=0,j=0,V=0,st=0,rt=h*k,it=h*H,At=h*Q,ut=h*W,vt=u*k,mt=u*H,M=u*Q,$=u*W,q=1;q<h;q++){var tt=E+((o<q?o:q)<<2),et=A[tt],ot=A[tt+1],dt=A[tt+2],wt=A[tt+3],yt=h-q;vt+=(f.r=et)*yt,mt+=(f.g=ot)*yt,M+=(f.b=dt)*yt,$+=(f.a=wt)*yt,D+=et,j+=ot,V+=dt,st+=wt,f=f.next}y=d,w=p;for(var St=0;St<r;St++){var Mt=$*S>>>_;if(A[E+3]=Mt,Mt!==0){var Pt=255/Mt;A[E]=(vt*S>>>_)*Pt,A[E+1]=(mt*S>>>_)*Pt,A[E+2]=(M*S>>>_)*Pt}else A[E]=A[E+1]=A[E+2]=0;vt-=rt,mt-=it,M-=At,$-=ut,rt-=y.r,it-=y.g,At-=y.b,ut-=y.a;var $t=St+s+1;$t=B+($t<o?$t:o)<<2,D+=y.r=A[$t],j+=y.g=A[$t+1],V+=y.b=A[$t+2],st+=y.a=A[$t+3],vt+=D,mt+=j,M+=V,$+=st,y=y.next;var z=w,Nt=z.r,ve=z.g,re=z.b,Tt=z.a;rt+=Nt,it+=ve,At+=re,ut+=Tt,D-=Nt,j-=ve,V-=re,st-=Tt,w=w.next,E+=4}B+=r}for(var ie=0;ie<r;ie++){E=ie<<2;var kt=A[E],qt=A[E+1],zt=A[E+2],we=A[E+3],Ne=h*kt,me=h*qt,Pe=h*zt,Ce=h*we,Vt=u*kt,ce=u*qt,Xt=u*zt,vr=u*we;f=d;for(var je=0;je<h;je++)f.r=kt,f.g=qt,f.b=zt,f.a=we,f=f.next;for(var xe=r,Ee=0,nr=0,ne=0,He=0,Ae=1;Ae<=s;Ae++){E=xe+ie<<2;var ge=h-Ae;Vt+=(f.r=kt=A[E])*ge,ce+=(f.g=qt=A[E+1])*ge,Xt+=(f.b=zt=A[E+2])*ge,vr+=(f.a=we=A[E+3])*ge,He+=kt,Ee+=qt,nr+=zt,ne+=we,f=f.next,Ae<l&&(xe+=r)}E=ie,y=d,w=p;for(var ar=0;ar<i;ar++){var fe=E<<2;A[fe+3]=we=vr*S>>>_,we>0?(we=255/we,A[fe]=(Vt*S>>>_)*we,A[fe+1]=(ce*S>>>_)*we,A[fe+2]=(Xt*S>>>_)*we):A[fe]=A[fe+1]=A[fe+2]=0,Vt-=Ne,ce-=me,Xt-=Pe,vr-=Ce,Ne-=y.r,me-=y.g,Pe-=y.b,Ce-=y.a,fe=ie+((fe=ar+h)<l?fe:l)*r<<2,Vt+=He+=y.r=A[fe],ce+=Ee+=y.g=A[fe+1],Xt+=nr+=y.b=A[fe+2],vr+=ne+=y.a=A[fe+3],y=y.next,Ne+=kt=w.r,me+=qt=w.g,Pe+=zt=w.b,Ce+=we=w.a,He-=kt,Ee-=qt,nr-=zt,ne-=we,w=w.next,E+=r}}return n}var Lk=function n(){vAt(this,n),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function xAt(){var{DOMParser:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:n,createCanvas(e,r){return new OffscreenCanvas(e,r)},createImage(e){return dl(function*(){var r=yield fetch(e),i=yield r.blob(),s=yield createImageBitmap(i);return s})()}};return(typeof DOMParser<"u"||typeof n>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function EAt(n){var{DOMParser:t,canvas:e,fetch:r}=n;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:r,createCanvas:e.createCanvas,createImage:e.loadImage}}var SAt=Object.freeze({__proto__:null,offscreen:xAt,node:EAt});function Nu(n){return n.replace(/(?!\u3000)\s+/gm," ")}function Qk(n){return n.replace(/^[\n \t]+/,"")}function Nk(n){return n.replace(/[\n \t]+$/,"")}function Hs(n){var t=(n||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}var FAt=/^[A-Z-]+$/;function Pk(n){return FAt.test(n)?n.toLowerCase():n}function BF(n){var t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(n)||[];return t[2]||t[3]||t[4]}function Mk(n){if(!n.startsWith("rgb"))return n;var t=3,e=n.replace(/\d+(\.\d+)?/g,(r,i)=>t--&&i?String(Math.round(parseFloat(r))):r);return e}var TAt=/(\[[^\]]+\])/g,_At=/(#[^\s+>~.[:]+)/g,IAt=/(\.[^\s+>~.[:]+)/g,UAt=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,LAt=/(:[\w-]+\([^)]*\))/gi,QAt=/(:[^\s+>~.[:]+)/g,NAt=/([^\s+>~.[:]+)/g;function Pu(n,t){var e=t.exec(n);return e?[n.replace(t," "),e.length]:[n,0]}function kk(n){var t=[0,0,0],e=n.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[e,r]=Pu(e,TAt),t[1]+=r,[e,r]=Pu(e,_At),t[0]+=r,[e,r]=Pu(e,IAt),t[1]+=r,[e,r]=Pu(e,UAt),t[2]+=r,[e,r]=Pu(e,LAt),t[1]+=r,[e,r]=Pu(e,QAt),t[1]+=r,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,r]=Pu(e,NAt),t[2]+=r,t.join("")}var Mu=1e-8;function CF(n){return Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2))}function Kb(n,t){return(n[0]*t[0]+n[1]*t[1])/(CF(n)*CF(t))}function xF(n,t){return(n[0]*t[1]<n[1]*t[0]?-1:1)*Math.acos(Kb(n,t))}function EF(n){return n*n*n}function SF(n){return 3*n*n*(1-n)}function FF(n){return 3*n*(1-n)*(1-n)}function TF(n){return(1-n)*(1-n)*(1-n)}function _F(n){return n*n}function IF(n){return 2*n*(1-n)}function UF(n){return(1-n)*(1-n)}class ue{constructor(t,e,r){this.document=t,this.name=e,this.value=r,this.isNormalizedColor=!1}static empty(t){return new ue(t,"EMPTY","")}split(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:e,name:r}=this;return Nu(this.getString()).trim().split(t).map(i=>new ue(e,r,i))}hasValue(t){var{value:e}=this;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){var{value:e}=this,r=typeof e=="string";return!r||!t?r:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var{value:e}=this,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=Mk(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[r,i]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:s}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(r);default:{var A=this.getNumber();return e&&A<1?A*s.computeSize(r):A}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var r=this.getDefinition();if(!r)return null;if(typeof r.createGradient=="function")return r.createGradient(this.document.ctx,t,e);if(typeof r.createPattern=="function"){if(r.getHrefAttribute().hasValue()){var i=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&r.getAttribute("patternTransform",!0).setValue(i.value)}return r.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?ue.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),r=e.length,i=0,s=0;s<r&&(e[s]===","&&i++,i!==3);s++);if(t.hasValue()&&this.isString()&&i!==3){var A=new mF(e);A.ok&&(A.alpha=t.getNumber(),e=A.toRGBA())}return new ue(this.document,this.name,e)}}ue.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class Ok{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class gi{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[r=e,i=e]=Hs(t);return new gi(r,i)}static parseScale(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=e,i=r]=Hs(t);return new gi(r,i)}static parsePath(t){for(var e=Hs(t),r=e.length,i=[],s=0;s<r;s+=2)i.push(new gi(e[s],e[s+1]));return i}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:r}=this,i=e*t[0]+r*t[2]+t[4],s=e*t[1]+r*t[3]+t[5];this.x=i,this.y=s}}class Dk{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:r}=this,i=t.ctx.canvas;i.onclick=e,i.onmousemove=r,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:r}=this,{style:i}=t.ctx.canvas;i&&(i.cursor=""),e.forEach((s,A)=>{for(var{run:a}=s,o=r[A];o;)a(o),o=o.parent}),this.events=[],this.eventElements=[]}}checkPath(t,e){if(!(!this.working||!e)){var{events:r,eventElements:i}=this;r.forEach((s,A)=>{var{x:a,y:o}=s;!i[A]&&e.isPointInPath&&e.isPointInPath(a,o)&&(i[A]=t)})}}checkBoundingBox(t,e){if(!(!this.working||!e)){var{events:r,eventElements:i}=this;r.forEach((s,A)=>{var{x:a,y:o}=s;!i[A]&&e.isPointInBox(a,o)&&(i[A]=t)})}}mapXY(t,e){for(var{window:r,ctx:i}=this.screen,s=new gi(t,e),A=i.canvas;A;)s.x-=A.offsetLeft,s.y-=A.offsetTop,A=A.offsetParent;return r.scrollX&&(s.x+=r.scrollX),r.scrollY&&(s.y+=r.scrollY),s}onClick(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:r,run(i){i.onClick&&i.onClick()}})}onMouseMove(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:r,run(i){i.onMouseMove&&i.onMouseMove()}})}}var Rk=typeof window<"u"?window:null,Hk=typeof fetch<"u"?fetch.bind(void 0):null;class hv{constructor(t){var{fetch:e=Hk,window:r=Rk}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Ok,this.mouse=new Dk(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:r,aspectRatio:i,width:s,desiredWidth:A,height:a,desiredHeight:o,minX:l=0,minY:h=0,refX:u,refY:d,clip:f=!1,clipX:p=0,clipY:m=0}=t,y=Nu(i).replace(/^defer\s/,""),[w,B]=y.split(" "),E=w||"xMidYMid",S=B||"meet",_=s/A,L=a/o,k=Math.min(_,L),H=Math.max(_,L),Q=A,W=o;S==="meet"&&(Q*=k,W*=k),S==="slice"&&(Q*=H,W*=H);var U=new ue(e,"refX",u),D=new ue(e,"refY",d),j=U.hasValue()&&D.hasValue();if(j&&r.translate(-k*U.getPixels("x"),-k*D.getPixels("y")),f){var V=k*p,st=k*m;r.beginPath(),r.moveTo(V,st),r.lineTo(s,st),r.lineTo(s,a),r.lineTo(V,a),r.closePath(),r.clip()}if(!j){var rt=S==="meet"&&k===L,it=S==="slice"&&H===L,At=S==="meet"&&k===_,ut=S==="slice"&&H===_;E.startsWith("xMid")&&(rt||it)&&r.translate(s/2-Q/2,0),E.endsWith("YMid")&&(At||ut)&&r.translate(0,a/2-W/2),E.startsWith("xMax")&&(rt||it)&&r.translate(s-Q,0),E.endsWith("YMax")&&(At||ut)&&r.translate(0,a-W)}switch(!0){case E==="none":r.scale(_,L);break;case S==="meet":r.scale(k,k);break;case S==="slice":r.scale(H,H);break}r.translate(-l,-h)}start(t){var{enableRedraw:e=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:s=!1,ignoreClear:A=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:h,offsetY:u}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:d,mouse:f}=this,p=1e3/d;if(this.frameDuration=p,this.readyPromise=new Promise(E=>{this.resolveReady=E}),this.isReady()&&this.render(t,s,A,o,l,h,u),!!e){var m=Date.now(),y=m,w=0,B=()=>{m=Date.now(),w=m-y,w>=p&&(y=m-w%p,this.shouldUpdate(i,a)&&(this.render(t,s,A,o,l,h,u),f.runEvents())),this.intervalId=gF(B)};r||f.start(),this.intervalId=gF(B)}}stop(){this.intervalId&&(gF.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:r}=this,i=this.animations.reduce((s,A)=>A.update(r)||s,!1);if(i)return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,r,i,s,A,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:l,viewPort:h,ctx:u,isFirstRender:d}=this,f=u.canvas;h.clear(),f.width&&f.height?h.setCurrent(f.width,f.height):h.setCurrent(o,l);var p=t.getStyle("width"),m=t.getStyle("height");!e&&(d||typeof i!="number"&&typeof s!="number")&&(p.hasValue()&&(f.width=p.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),m.hasValue()&&(f.height=m.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var y=f.clientWidth||f.width,w=f.clientHeight||f.height;if(e&&p.hasValue()&&m.hasValue()&&(y=p.getPixels("x"),w=m.getPixels("y")),h.setCurrent(y,w),typeof A=="number"&&t.getAttribute("x",!0).setValue(A),typeof a=="number"&&t.getAttribute("y",!0).setValue(a),typeof i=="number"||typeof s=="number"){var B=Hs(t.getAttribute("viewBox").getString()),E=0,S=0;if(typeof i=="number"){var _=t.getStyle("width");_.hasValue()?E=_.getPixels("x")/i:isNaN(B[2])||(E=B[2]/i)}if(typeof s=="number"){var L=t.getStyle("height");L.hasValue()?S=L.getPixels("y")/s:isNaN(B[3])||(S=B[3]/s)}E||(E=S),S||(S=E),t.getAttribute("width",!0).setValue(i),t.getAttribute("height",!0).setValue(s);var k=t.getStyle("transform",!0,!0);k.setValue("".concat(k.getString()," scale(").concat(1/E,", ").concat(1/S,")"))}r||u.clearRect(0,0,y,w),t.render(u),d&&(this.isFirstRender=!1)}}hv.defaultWindow=Rk,hv.defaultFetch=Hk;var{defaultFetch:PAt}=hv,MAt=typeof DOMParser<"u"?DOMParser:null;class Vb{constructor(){var{fetch:t=PAt,DOMParser:e=MAt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return dl(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return dl(function*(){var r=yield e.fetch(t),i=yield r.text();return e.parseFromString(i)})()}}class Kk{constructor(t,e){this.type="translate",this.point=null,this.point=gi.parse(e)}apply(t){var{x:e,y:r}=this.point;t.translate(e||0,r||0)}unapply(t){var{x:e,y:r}=this.point;t.translate(-1*e||0,-1*r||0)}applyToPoint(t){var{x:e,y:r}=this.point;t.applyTransform([1,0,0,1,e||0,r||0])}}class Vk{constructor(t,e,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Hs(e);this.angle=new ue(t,"angle",i[0]),this.originX=r[0],this.originY=r[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(t){var{cx:e,cy:r,originX:i,originY:s,angle:A}=this,a=e+i.getPixels("x"),o=r+s.getPixels("y");t.translate(a,o),t.rotate(A.getRadians()),t.translate(-a,-o)}unapply(t){var{cx:e,cy:r,originX:i,originY:s,angle:A}=this,a=e+i.getPixels("x"),o=r+s.getPixels("y");t.translate(a,o),t.rotate(-1*A.getRadians()),t.translate(-a,-o)}applyToPoint(t){var{cx:e,cy:r,angle:i}=this,s=i.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(s),Math.sin(s),-Math.sin(s),Math.cos(s),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}class Gk{constructor(t,e,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=gi.parseScale(e);(i.x===0||i.y===0)&&(i.x=Mu,i.y=Mu),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(t){var{scale:{x:e,y:r},originX:i,originY:s}=this,A=i.getPixels("x"),a=s.getPixels("y");t.translate(A,a),t.scale(e,r||e),t.translate(-A,-a)}unapply(t){var{scale:{x:e,y:r},originX:i,originY:s}=this,A=i.getPixels("x"),a=s.getPixels("y");t.translate(A,a),t.scale(1/e,1/r||e),t.translate(-A,-a)}applyToPoint(t){var{x:e,y:r}=this.scale;t.applyTransform([e||0,0,0,r||0,0,0])}}class LF{constructor(t,e,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Hs(e),this.originX=r[0],this.originY=r[1]}apply(t){var{originX:e,originY:r,matrix:i}=this,s=e.getPixels("x"),A=r.getPixels("y");t.translate(s,A),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),t.translate(-s,-A)}unapply(t){var{originX:e,originY:r,matrix:i}=this,s=i[0],A=i[2],a=i[4],o=i[1],l=i[3],h=i[5],u=0,d=0,f=1,p=1/(s*(l*f-h*d)-A*(o*f-h*u)+a*(o*d-l*u)),m=e.getPixels("x"),y=r.getPixels("y");t.translate(m,y),t.transform(p*(l*f-h*d),p*(h*u-o*f),p*(a*d-A*f),p*(s*f-a*u),p*(A*h-a*l),p*(a*o-s*h)),t.translate(-m,-y)}applyToPoint(t){t.applyTransform(this.matrix)}}class QF extends LF{constructor(t,e,r){super(t,e,r),this.type="skew",this.angle=null,this.angle=new ue(t,"angle",e)}}class jk extends QF{constructor(t,e,r){super(t,e,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class $k extends QF{constructor(t,e,r){super(t,e,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function kAt(n){return Nu(n).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function OAt(n){var[t,e]=n.split("(");return[t.trim(),e.trim().replace(")","")]}class Xc{constructor(t,e,r){this.document=t,this.transforms=[];var i=kAt(e);i.forEach(s=>{if(s!=="none"){var[A,a]=OAt(s),o=Xc.transformTypes[A];typeof o<"u"&&this.transforms.push(new o(this.document,a,r))}})}static fromElement(t,e){var r=e.getStyle("transform",!1,!0),[i,s=i]=e.getStyle("transform-origin",!1,!0).split(),A=[i,s];return r.hasValue()?new Xc(t,r.getString(),A):null}apply(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].apply(t)}unapply(t){for(var{transforms:e}=this,r=e.length,i=r-1;i>=0;i--)e[i].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].applyToPoint(t)}}Xc.transformTypes={translate:Kk,rotate:Vk,scale:Gk,matrix:LF,skewX:jk,skewY:$k};class Or{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=t,this.node=e,this.captureTextNodes=r,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!e||e.nodeType!==1)){if(Array.from(e.attributes).forEach(a=>{var o=Pk(a.nodeName);this.attributes[o]=new ue(t,o,a.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(a=>a.trim());i.forEach(a=>{if(a){var[o,l]=a.split(":").map(h=>h.trim());this.styles[o]=new ue(t,o,l)}})}var{definitions:s}=t,A=this.getAttribute("id");A.hasValue()&&(s[A.getString()]||(s[A.getString()]=this)),Array.from(e.childNodes).forEach(a=>{if(a.nodeType===1)this.addChild(a);else if(r&&(a.nodeType===3||a.nodeType===4)){var o=t.createTextNode(a);o.getText().length>0&&this.addChild(o)}})}}getAttribute(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[t];if(!r&&e){var i=new ue(this.document,t,"");return this.attributes[t]=i,i}return r||ue.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return ue.empty(this.document)}getStyle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[t];if(i)return i;var s=this.getAttribute(t);if(s!=null&&s.hasValue())return this.styles[t]=s,s;if(!r){var{parent:A}=this;if(A){var a=A.getStyle(t);if(a!=null&&a.hasValue())return a}}if(e){var o=new ue(this.document,t,"");return this.styles[t]=o,o}return i||ue.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Xc.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var i=r.getDefinition();i&&i.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){var e=t instanceof Or?t:this.document.createElement(t);e.parent=this,Or.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:r}=this;if(typeof r.matches=="function")return r.matches(t);var i=(e=r.getAttribute)===null||e===void 0?void 0:e.call(r,"class");return!i||i===""?!1:i.split(" ").some(s=>".".concat(s)===t)}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var r in t)if(!r.startsWith("@")&&this.matchesSelector(r)){var i=t[r],s=e[r];if(i)for(var A in i){var a=this.stylesSpecificity[A];typeof a>"u"&&(a="000"),s>=a&&(this.styles[A]=i[A],this.stylesSpecificity[A]=s)}}}removeStyles(t,e){var r=e.reduce((i,s)=>{var A=t.getStyle(s);if(!A.hasValue())return i;var a=A.getString();return A.setValue(""),[...i,[s,a]]},[]);return r}restoreStyles(t,e){e.forEach(r=>{var[i,s]=r;t.getStyle(i,!0).setValue(s)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}}Or.ignoreChildTypes=["title"];class Wk extends Or{constructor(t,e,r){super(t,e,r)}}function DAt(n){var t=n.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function RAt(n){return typeof process>"u"?n:n.trim().split(",").map(DAt).join(",")}function HAt(n){if(!n)return"";var t=n.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function KAt(n){if(!n)return"";var t=n.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}class Jn{constructor(t,e,r,i,s,A){var a=A?typeof A=="string"?Jn.parse(A):A:{};this.fontFamily=s||a.fontFamily,this.fontSize=i||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=r||a.fontWeight,this.fontVariant=e||a.fontVariant}static parse(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,r="",i="",s="",A="",a="",o=Nu(t).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(h=>{switch(!0){case(!l.fontStyle&&Jn.styles.includes(h)):h!=="inherit"&&(r=h),l.fontStyle=!0;break;case(!l.fontVariant&&Jn.variants.includes(h)):h!=="inherit"&&(i=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&Jn.weights.includes(h)):h!=="inherit"&&(s=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([A]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(a+=h)}}),new Jn(r,i,s,A,a,e)}toString(){return[HAt(this.fontStyle),this.fontVariant,KAt(this.fontWeight),this.fontSize,RAt(this.fontFamily)].join(" ").trim()}}Jn.styles="normal|italic|oblique|inherit",Jn.variants="normal|small-caps|inherit",Jn.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class WA{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=r,this.y2=i,this.addPoint(t,e),this.addPoint(r,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:r,x2:i,y2:s}=t;this.addPoint(e,r),this.addPoint(i,s)}}sumCubic(t,e,r,i,s){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*i+Math.pow(t,3)*s}bezierCurveAdd(t,e,r,i,s){var A=6*e-12*r+6*i,a=-3*e+9*r-9*i+3*s,o=3*r-3*e;if(a===0){if(A===0)return;var l=-o/A;0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,i,s)):this.addY(this.sumCubic(l,e,r,i,s)));return}var h=Math.pow(A,2)-4*o*a;if(!(h<0)){var u=(-A+Math.sqrt(h))/(2*a);0<u&&u<1&&(t?this.addX(this.sumCubic(u,e,r,i,s)):this.addY(this.sumCubic(u,e,r,i,s)));var d=(-A-Math.sqrt(h))/(2*a);0<d&&d<1&&(t?this.addX(this.sumCubic(d,e,r,i,s)):this.addY(this.sumCubic(d,e,r,i,s)))}}addBezierCurve(t,e,r,i,s,A,a,o){this.addPoint(t,e),this.addPoint(a,o),this.bezierCurveAdd(!0,t,r,s,a),this.bezierCurveAdd(!1,e,i,A,o)}addQuadraticCurve(t,e,r,i,s,A){var a=t+.6666666666666666*(r-t),o=e+2/3*(i-e),l=a+1/3*(s-t),h=o+1/3*(A-e);this.addBezierCurve(t,e,a,l,o,h,s,A)}isPointInBox(t,e){var{x1:r,y1:i,x2:s,y2:A}=this;return r<=t&&t<=s&&i<=e&&e<=A}}class Le extends It{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new gi(0,0),this.control=new gi(0,0),this.current=new gi(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",r=new gi(this.command[t],this.command[e]);return this.makeAbsolute(r)}getAsControlPoint(t,e){var r=this.getPoint(t,e);return this.control=r,r}getAsCurrentPoint(t,e){var r=this.getPoint(t,e);return this.current=r,r}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==It.CURVE_TO&&t!==It.SMOOTH_CURVE_TO&&t!==It.QUAD_TO&&t!==It.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:r},control:{x:i,y:s}}=this,A=new gi(2*e-i,2*r-s);return A}makeAbsolute(t){if(this.command.relative){var{x:e,y:r}=this.current;t.x+=e,t.y+=r}return t}addMarker(t,e,r){var{points:i,angles:s}=this;r&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=i[i.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,r=0;r<e;r++)if(!t[r]){for(var i=r+1;i<e;i++)if(t[i]){t[r]=t[i];break}}return t}}class qc extends Or{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){var r=this.getStyle("fill"),i=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),A=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var a=r.getFillStyleDefinition(this,i);a&&(t.fillStyle=a)}else if(r.hasValue()){r.getString()==="currentColor"&&r.setValue(this.getStyle("color").getColor());var o=r.getColor();o!=="inherit"&&(t.fillStyle=o==="none"?"rgba(0,0,0,0)":o)}if(i.hasValue()){var l=new ue(this.document,"fill",t.fillStyle).addOpacity(i).getColor();t.fillStyle=l}if(s.isUrlDefinition()){var h=s.getFillStyleDefinition(this,A);h&&(t.strokeStyle=h)}else if(s.hasValue()){s.getString()==="currentColor"&&s.setValue(this.getStyle("color").getColor());var u=s.getString();u!=="inherit"&&(t.strokeStyle=u==="none"?"rgba(0,0,0,0)":u)}if(A.hasValue()){var d=new ue(this.document,"stroke",t.strokeStyle).addOpacity(A).getString();t.strokeStyle=d}var f=this.getStyle("stroke-width");if(f.hasValue()){var p=f.getPixels();t.lineWidth=p||Mu}var m=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),w=this.getStyle("stroke-miterlimit"),B=this.getStyle("stroke-dasharray"),E=this.getStyle("stroke-dashoffset");if(m.hasValue()&&(t.lineCap=m.getString()),y.hasValue()&&(t.lineJoin=y.getString()),w.hasValue()&&(t.miterLimit=w.getNumber()),B.hasValue()&&B.getString()!=="none"){var S=Hs(B.getString());typeof t.setLineDash<"u"?t.setLineDash(S):typeof t.webkitLineDash<"u"?t.webkitLineDash=S:typeof t.mozDash<"u"&&!(S.length===1&&S[0]===0)&&(t.mozDash=S);var _=E.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=_:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=_:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=_)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){var L=this.getStyle("font"),k=this.getStyle("font-style"),H=this.getStyle("font-variant"),Q=this.getStyle("font-weight"),W=this.getStyle("font-size"),U=this.getStyle("font-family"),D=new Jn(k.getString(),H.getString(),Q.getString(),W.hasValue()?"".concat(W.getPixels(!0),"px"):"",U.getString(),Jn.parse(L.getString(),t.font));k.setValue(D.fontStyle),H.setValue(D.fontVariant),Q.setValue(D.fontWeight),W.setValue(D.fontSize),U.setValue(D.fontFamily),t.font=D.toString(),W.isPixels()&&(this.document.emSize=W.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}}class hr extends qc{constructor(t,e,r){super(t,e,r),this.type="path",this.pathParser=null,this.pathParser=new Le(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,r=new WA;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Le.MOVE_TO:this.pathM(t,r);break;case Le.LINE_TO:this.pathL(t,r);break;case Le.HORIZ_LINE_TO:this.pathH(t,r);break;case Le.VERT_LINE_TO:this.pathV(t,r);break;case Le.CURVE_TO:this.pathC(t,r);break;case Le.SMOOTH_CURVE_TO:this.pathS(t,r);break;case Le.QUAD_TO:this.pathQ(t,r);break;case Le.SMOOTH_QUAD_TO:this.pathT(t,r);break;case Le.ARC:this.pathA(t,r);break;case Le.CLOSE_PATH:this.pathZ(t,r);break}return r}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),r=t.getMarkerAngles(),i=e.map((s,A)=>[s,r[A]]);return i}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var i=r.length-1,s=this.getStyle("marker-start"),A=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(s.isUrlDefinition()){var o=s.getDefinition(),[l,h]=r[0];o.render(t,l,h)}if(A.isUrlDefinition())for(var u=A.getDefinition(),d=1;d<i;d++){var[f,p]=r[d];u.render(t,f,p)}if(a.isUrlDefinition()){var m=a.getDefinition(),[y,w]=r[i];m.render(t,y,w)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:r}=this,{point:i}=hr.pathM(r),{x:s,y:A}=i;r.addMarker(i),e.addPoint(s,A),t&&t.moveTo(s,A)}static pathL(t){var{current:e}=t,r=t.getAsCurrentPoint();return{current:e,point:r}}pathL(t,e){var{pathParser:r}=this,{current:i,point:s}=hr.pathL(r),{x:A,y:a}=s;r.addMarker(s,i),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathH(t){var{current:e,command:r}=t,i=new gi((r.relative?e.x:0)+r.x,e.y);return t.current=i,{current:e,point:i}}pathH(t,e){var{pathParser:r}=this,{current:i,point:s}=hr.pathH(r),{x:A,y:a}=s;r.addMarker(s,i),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathV(t){var{current:e,command:r}=t,i=new gi(e.x,(r.relative?e.y:0)+r.y);return t.current=i,{current:e,point:i}}pathV(t,e){var{pathParser:r}=this,{current:i,point:s}=hr.pathV(r),{x:A,y:a}=s;r.addMarker(s,i),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathC(t){var{current:e}=t,r=t.getPoint("x1","y1"),i=t.getAsControlPoint("x2","y2"),s=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:i,currentPoint:s}}pathC(t,e){var{pathParser:r}=this,{current:i,point:s,controlPoint:A,currentPoint:a}=hr.pathC(r);r.addMarker(a,A,s),e.addBezierCurve(i.x,i.y,s.x,s.y,A.x,A.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,A.x,A.y,a.x,a.y)}static pathS(t){var{current:e}=t,r=t.getReflectedControlPoint(),i=t.getAsControlPoint("x2","y2"),s=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:i,currentPoint:s}}pathS(t,e){var{pathParser:r}=this,{current:i,point:s,controlPoint:A,currentPoint:a}=hr.pathS(r);r.addMarker(a,A,s),e.addBezierCurve(i.x,i.y,s.x,s.y,A.x,A.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,A.x,A.y,a.x,a.y)}static pathQ(t){var{current:e}=t,r=t.getAsControlPoint("x1","y1"),i=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:i}}pathQ(t,e){var{pathParser:r}=this,{current:i,controlPoint:s,currentPoint:A}=hr.pathQ(r);r.addMarker(A,s,s),e.addQuadraticCurve(i.x,i.y,s.x,s.y,A.x,A.y),t&&t.quadraticCurveTo(s.x,s.y,A.x,A.y)}static pathT(t){var{current:e}=t,r=t.getReflectedControlPoint();t.control=r;var i=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:i}}pathT(t,e){var{pathParser:r}=this,{current:i,controlPoint:s,currentPoint:A}=hr.pathT(r);r.addMarker(A,s,s),e.addQuadraticCurve(i.x,i.y,s.x,s.y,A.x,A.y),t&&t.quadraticCurveTo(s.x,s.y,A.x,A.y)}static pathA(t){var{current:e,command:r}=t,{rX:i,rY:s,xRot:A,lArcFlag:a,sweepFlag:o}=r,l=A*(Math.PI/180),h=t.getAsCurrentPoint(),u=new gi(Math.cos(l)*(e.x-h.x)/2+Math.sin(l)*(e.y-h.y)/2,-Math.sin(l)*(e.x-h.x)/2+Math.cos(l)*(e.y-h.y)/2),d=Math.pow(u.x,2)/Math.pow(i,2)+Math.pow(u.y,2)/Math.pow(s,2);d>1&&(i*=Math.sqrt(d),s*=Math.sqrt(d));var f=(a===o?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(s,2)-Math.pow(i,2)*Math.pow(u.y,2)-Math.pow(s,2)*Math.pow(u.x,2))/(Math.pow(i,2)*Math.pow(u.y,2)+Math.pow(s,2)*Math.pow(u.x,2)));isNaN(f)&&(f=0);var p=new gi(f*i*u.y/s,f*-s*u.x/i),m=new gi((e.x+h.x)/2+Math.cos(l)*p.x-Math.sin(l)*p.y,(e.y+h.y)/2+Math.sin(l)*p.x+Math.cos(l)*p.y),y=xF([1,0],[(u.x-p.x)/i,(u.y-p.y)/s]),w=[(u.x-p.x)/i,(u.y-p.y)/s],B=[(-u.x-p.x)/i,(-u.y-p.y)/s],E=xF(w,B);return Kb(w,B)<=-1&&(E=Math.PI),Kb(w,B)>=1&&(E=0),{currentPoint:h,rX:i,rY:s,sweepFlag:o,xAxisRotation:l,centp:m,a1:y,ad:E}}pathA(t,e){var{pathParser:r}=this,{currentPoint:i,rX:s,rY:A,sweepFlag:a,xAxisRotation:o,centp:l,a1:h,ad:u}=hr.pathA(r),d=1-a?1:-1,f=h+d*(u/2),p=new gi(l.x+s*Math.cos(f),l.y+A*Math.sin(f));if(r.addMarkerAngle(p,f-d*Math.PI/2),r.addMarkerAngle(i,f-d*Math.PI),e.addPoint(i.x,i.y),t&&!isNaN(h)&&!isNaN(u)){var m=s>A?s:A,y=s>A?1:s/A,w=s>A?A/s:1;t.translate(l.x,l.y),t.rotate(o),t.scale(y,w),t.arc(0,0,m,h,h+u,!!(1-a)),t.scale(1/y,1/w),t.rotate(-o),t.translate(-l.x,-l.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){hr.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}class NF extends hr{constructor(t,e,r){super(t,e,r),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class ml extends qc{constructor(t,e,r){super(t,e,new.target===ml?!0:r),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach((r,i)=>{var s=this.getChildBoundingBox(t,this,this,i);e?e.addBoundingBox(s):e=s}),e}getFontSize(){var{document:t,parent:e}=this,r=Jn.parse(t.ctx.font).fontSize,i=e.getStyle("font-size").getNumber(r);return i}getTElementBoundingBox(t){var e=this.getFontSize();return new WA(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,r){var i=e[r],s=null;if(t.isArabic){var A=e.length,a=e[r-1],o=e[r+1],l="isolated";if((r===0||a===" ")&&r<A-1&&o!==" "&&(l="terminal"),r>0&&a!==" "&&r<A-1&&o!==" "&&(l="medial"),r>0&&a!==" "&&(r===A-1||o===" ")&&(l="initial"),typeof t.glyphs[i]<"u"){var h=t.glyphs[i];s=h instanceof NF?h:h[l]}}else s=t.glyphs[i];return s||(s=t.missingGlyph),s}getText(){return""}getTextFromNode(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),i=r.indexOf(e),s=r.length-1,A=Nu(e.textContent||"");return i===0&&(A=Qk(A)),i===s&&(A=Nk(A)),A}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((r,i)=>{this.renderChild(t,this,this,i)});var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){var{document:e,parent:r}=this,i=this.getText(),s=r.getStyle("font-family").getDefinition();if(s){for(var{unitsPerEm:A}=s.fontFace,a=Jn.parse(e.ctx.font),o=r.getStyle("font-size").getNumber(a.fontSize),l=r.getStyle("font-style").getString(a.fontStyle),h=o/A,u=s.isRTL?i.split("").reverse().join(""):i,d=Hs(r.getAttribute("dx").getString()),f=u.length,p=0;p<f;p++){var m=this.getGlyph(s,u,p);t.translate(this.x,this.y),t.scale(h,-h);var y=t.lineWidth;t.lineWidth=t.lineWidth*A/o,l==="italic"&&t.transform(1,0,.4,1,0,0),m.render(t),l==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=y,t.scale(1/h,-1/h),t.translate(-this.x,-this.y),this.x+=o*(m.horizAdvX||s.horizAdvX)/A,typeof d[p]<"u"&&!isNaN(d[p])&&(this.x+=d[p])}return}var{x:w,y:B}=this;t.fillStyle&&t.fillText(i,w,B),t.strokeStyle&&t.strokeText(i,w,B)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r=!1,i=0;e==="start"&&!r||e==="end"&&r?i=t.x-this.minX:e==="end"&&!r||e==="start"&&r?i=t.x-this.maxX:i=t.x-(this.minX+this.maxX)/2;for(var s=this.textChunkStart;s<this.leafTexts.length;s++)this.leafTexts[s].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach((e,r)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,r,i){var s=r.children[i];s.children.length>0?s.children.forEach((A,a)=>{e.adjustChildCoordinatesRecursiveCore(t,e,s,a)}):this.adjustChildCoordinates(t,e,r,i)}adjustChildCoordinates(t,e,r,i){var s=r.children[i];if(typeof s.measureText!="function")return s;t.save(),s.setContext(t,!0);var A=s.getAttribute("x"),a=s.getAttribute("y"),o=s.getAttribute("dx"),l=s.getAttribute("dy"),h=s.getStyle("font-family").getDefinition(),u=!!h&&h.isRTL;i===0&&(A.hasValue()||A.setValue(s.getInheritedAttribute("x")),a.hasValue()||a.setValue(s.getInheritedAttribute("y")),o.hasValue()||o.setValue(s.getInheritedAttribute("dx")),l.hasValue()||l.setValue(s.getInheritedAttribute("dy")));var d=s.measureText(t);return u&&(e.x-=d),A.hasValue()?(e.applyAnchoring(),s.x=A.getPixels("x"),o.hasValue()&&(s.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),s.x=e.x),e.x=s.x,u||(e.x+=d),a.hasValue()?(s.y=a.getPixels("y"),l.hasValue()&&(s.y+=l.getPixels("y"))):(l.hasValue()&&(e.y+=l.getPixels("y")),s.y=e.y),e.y=s.y,e.leafTexts.push(s),e.minX=Math.min(e.minX,s.x,s.x+d),e.maxX=Math.max(e.maxX,s.x,s.x+d),s.clearContext(t),t.restore(),s}getChildBoundingBox(t,e,r,i){var s=r.children[i];if(typeof s.getBoundingBox!="function")return null;var A=s.getBoundingBox(t);return A?(s.children.forEach((a,o)=>{var l=e.getChildBoundingBox(t,e,s,o);A.addBoundingBox(l)}),A):null}renderChild(t,e,r,i){var s=r.children[i];s.render(t),s.children.forEach((A,a)=>{e.renderChild(t,e,s,a)})}measureText(t){var{measureCache:e}=this;if(~e)return e;var r=this.getText(),i=this.measureTargetText(t,r);return this.measureCache=i,i}measureTargetText(t,e){if(!e.length)return 0;var{parent:r}=this,i=r.getStyle("font-family").getDefinition();if(i){for(var s=this.getFontSize(),A=i.isRTL?e.split("").reverse().join(""):e,a=Hs(r.getAttribute("dx").getString()),o=A.length,l=0,h=0;h<o;h++){var u=this.getGlyph(i,A,h);l+=(u.horizAdvX||i.horizAdvX)*s/i.fontFace.unitsPerEm,typeof a[h]<"u"&&!isNaN(a[h])&&(l+=a[h])}return l}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);var{width:d}=t.measureText(e);return this.clearContext(t),t.restore(),d}getInheritedAttribute(t){for(var e=this;e instanceof ml&&e.isFirstChild();){var r=e.parent.getAttribute(t);if(r.hasValue(!0))return r.getValue("0");e=e.parent}return null}}class uv extends ml{constructor(t,e,r){super(t,e,new.target===uv?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class VAt extends uv{constructor(){super(...arguments),this.type="textNode"}}class Ng extends qc{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:r}=this,{screen:i,window:s}=r,A=t.canvas;if(i.setDefaults(t),A.style&&typeof t.font<"u"&&s&&typeof s.getComputedStyle<"u"){t.font=s.getComputedStyle(A).getPropertyValue("font");var a=new ue(r,"fontSize",Jn.parse(t.font).fontSize);a.hasValue()&&(r.rootEmSize=a.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:l}=i.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),u=this.getAttribute("refY"),d=this.getAttribute("viewBox"),f=d.hasValue()?Hs(d.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",m=0,y=0,w=0,B=0;f&&(m=f[0],y=f[1]),this.root||(o=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(w=m,B=y,m=0,y=0)),i.viewPort.setCurrent(o,l),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),f&&(o=f[2],l=f[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:o,height:i.viewPort.height,desiredHeight:l,minX:m,minY:y,refX:h.getValue(),refY:u.getValue(),clip:p,clipX:w,clipY:B}),f&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(o,l))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),s=this.getAttribute("height",!0),A=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=i.getNumber(0),l=s.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(t),s.setValue(e),A.hasValue()||A.setValue("0 0 ".concat(o||t," ").concat(l||e)),a.hasValue()){var u=this.getStyle("width"),d=this.getStyle("height");u.hasValue()&&u.setValue("".concat(t,"px")),d.hasValue()&&d.setValue("".concat(e,"px"))}}}class PF extends hr{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),A=this.getAttribute("rx"),a=this.getAttribute("ry"),o=A.getPixels("x"),l=a.getPixels("y");if(A.hasValue()&&!a.hasValue()&&(l=o),a.hasValue()&&!A.hasValue()&&(o=l),o=Math.min(o,i/2),l=Math.min(l,s/2),t){var h=4*((Math.sqrt(2)-1)/3);t.beginPath(),s>0&&i>0&&(t.moveTo(e+o,r),t.lineTo(e+i-o,r),t.bezierCurveTo(e+i-o+h*o,r,e+i,r+l-h*l,e+i,r+l),t.lineTo(e+i,r+s-l),t.bezierCurveTo(e+i,r+s-l+h*l,e+i-o+h*o,r+s,e+i-o,r+s),t.lineTo(e+o,r+s),t.bezierCurveTo(e+o-h*o,r+s,e,r+s-l+h*l,e,r+s-l),t.lineTo(e,r+l),t.bezierCurveTo(e,r+l-h*l,e+o-h*o,r,e+o,r),t.closePath())}return new WA(e,r,e+i,r+s)}getMarkers(){return null}}class zk extends hr{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return t&&i>0&&(t.beginPath(),t.arc(e,r,i,0,Math.PI*2,!1),t.closePath()),new WA(e-i,r-i,e+i,r+i)}getMarkers(){return null}}class Xk extends hr{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=4*((Math.sqrt(2)-1)/3),r=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),A=this.getAttribute("cy").getPixels("y");return t&&r>0&&i>0&&(t.beginPath(),t.moveTo(s+r,A),t.bezierCurveTo(s+r,A+e*i,s+e*r,A+i,s,A+i),t.bezierCurveTo(s-e*r,A+i,s-r,A+e*i,s-r,A),t.bezierCurveTo(s-r,A-e*i,s-e*r,A-i,s,A-i),t.bezierCurveTo(s+e*r,A-i,s+r,A-e*i,s+r,A),t.closePath()),new WA(s-r,A-i,s+r,A+i)}getMarkers(){return null}}class qk extends hr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new gi(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new gi(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:r},{x:i,y:s}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,r),t.lineTo(i,s)),new WA(e,r,i,s)}getMarkers(){var[t,e]=this.getPoints(),r=t.angleTo(e);return[[t,r],[e,r]]}}class MF extends hr{constructor(t,e,r){super(t,e,r),this.type="polyline",this.points=[],this.points=gi.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:r,y:i}]=e,s=new WA(r,i);return t&&(t.beginPath(),t.moveTo(r,i)),e.forEach(A=>{var{x:a,y:o}=A;s.addPoint(a,o),t&&t.lineTo(a,o)}),s}getMarkers(){var{points:t}=this,e=t.length-1,r=[];return t.forEach((i,s)=>{s!==e&&r.push([i,i.angleTo(t[s+1])])}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}class Yk extends MF{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:r,y:i}]=this.points;return t&&(t.lineTo(r,i),t.closePath()),e}}class Jk extends Or{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,r){var i=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),A=new Ng(this.document,null);A.attributes.viewBox=new ue(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.width=new ue(this.document,"width","".concat(i,"px")),A.attributes.height=new ue(this.document,"height","".concat(s,"px")),A.attributes.transform=new ue(this.document,"transform",this.getAttribute("patternTransform").getValue()),A.children=this.children;var a=this.document.createCanvas(i,s),o=a.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&o.translate(l.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var u=-1;u<=1;u++)for(var d=-1;d<=1;d++)o.save(),A.attributes.x=new ue(this.document,"x",u*a.width),A.attributes.y=new ue(this.document,"y",d*a.height),A.render(o),o.restore();var f=t.createPattern(a,"repeat");return f}}class Zk extends Or{constructor(){super(...arguments),this.type="marker"}render(t,e,r){if(e){var{x:i,y:s}=e,A=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(i,s),A==="auto"&&t.rotate(r),a==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new Ng(this.document,null);o.type=this.type,o.attributes.viewBox=new ue(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new ue(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new ue(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new ue(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new ue(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new ue(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new ue(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new ue(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),a==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),A==="auto"&&t.rotate(-r),t.translate(-i,-s)}}}class tO extends Or{constructor(){super(...arguments),this.type="defs"}render(){}}class Gb extends qc{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new WA;return this.children.forEach(r=>{e.addBoundingBox(r.getBoundingBox(t))}),e}}class kF extends Or{constructor(t,e,r){super(t,e,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:s}=this;s.forEach(A=>{A.type==="stop"&&i.push(A)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,r){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:s}=i,A=this.getGradient(t,e);if(!A)return this.addParentOpacity(r,s[s.length-1].color);if(s.forEach(y=>{A.addColorStop(y.offset,this.addParentOpacity(r,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:a}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:l}=a.screen,[h]=l.viewPorts,u=new PF(a,null);u.attributes.x=new ue(a,"x",-o/3),u.attributes.y=new ue(a,"y",-o/3),u.attributes.width=new ue(a,"width",o),u.attributes.height=new ue(a,"height",o);var d=new Gb(a,null);d.attributes.transform=new ue(a,"transform",this.getAttribute("gradientTransform").getValue()),d.children=[u];var f=new Ng(a,null);f.attributes.x=new ue(a,"x",0),f.attributes.y=new ue(a,"y",0),f.attributes.width=new ue(a,"width",h.width),f.attributes.height=new ue(a,"height",h.height),f.children=[d];var p=a.createCanvas(h.width,h.height),m=p.getContext("2d");return m.fillStyle=A,f.render(m),m.createPattern(p,"no-repeat")}return A}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){if(t.hasValue()){var r=new ue(this.document,"color",e);return r.addOpacity(t).getColor()}return e}}class eO extends kF{constructor(t,e,r){super(t,e,r),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",i=r?e.getBoundingBox(t):null;if(r&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var s=r?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),A=r?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=r?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=r?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===a&&A===o?null:t.createLinearGradient(s,A,a,o)}}class rO extends kF{constructor(t,e,r){super(t,e,r),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",i=e.getBoundingBox(t);if(r&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var s=r?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),A=r?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=s,o=A;this.getAttribute("fx").hasValue()&&(a=r?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=r?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,o,h,s,A,l)}}class iO extends Or{constructor(t,e,r){super(t,e,r),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),s=this.getStyle("stop-opacity"),A=this.getStyle("stop-color",!0);A.getString()===""&&A.setValue("#000"),s.hasValue()&&(A=A.addOpacity(s)),this.offset=i,this.color=A.getColor()}}class jb extends Or{constructor(t,e,r){super(t,e,r),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new ue(t,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:r,to:i}=this.getProgress(),s=r.getNumber()+(i.getNumber()-r.getNumber())*e;return t==="%"&&(s*=100),"".concat(s).concat(t)}update(t){var{parent:e}=this,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;var s=!1;if(this.begin<this.duration){var A=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var o=a.getString();A="".concat(o,"(").concat(A,")")}r.setValue(A),s=!0}return s}getProgress(){var{document:t,values:e}=this,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var i=r.progress*(e.getValue().length-1),s=Math.floor(i),A=Math.ceil(i);r.from=new ue(t,"from",parseFloat(e.getValue()[s])),r.to=new ue(t,"to",parseFloat(e.getValue()[A])),r.progress=(i-s)/(A-s)}else r.from=this.from,r.to=this.to;return r}}class nO extends jb{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),i=new mF(e.getColor()),s=new mF(r.getColor());if(i.ok&&s.ok){var A=i.r+(s.r-i.r)*t,a=i.g+(s.g-i.g)*t,o=i.b+(s.b-i.b)*t;return"rgb(".concat(Math.floor(A),", ").concat(Math.floor(a),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class sO extends jb{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),i=Hs(e.getString()),s=Hs(r.getString()),A=i.map((a,o)=>{var l=s[o];return a+(l-a)*t}).join(" ");return A}}class AO extends Or{constructor(t,e,r){super(t,e,r),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=t,{children:s}=this;for(var A of s)switch(A.type){case"font-face":{this.fontFace=A;var a=A.getStyle("font-family");a.hasValue()&&(i[a.getString()]=this);break}case"missing-glyph":this.missingGlyph=A;break;case"glyph":{var o=A;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[o.unicode]>"u"&&(this.glyphs[o.unicode]=Object.create(null)),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o;break}}}render(){}}class aO extends Or{constructor(t,e,r){super(t,e,r),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class oO extends hr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class lO extends ml{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}class cO extends ml{constructor(t,e,r){super(t,e,r),this.type="a";var{childNodes:i}=e,s=i[0],A=i.length>0&&Array.from(i).every(a=>a.nodeType===3);this.hasText=A,this.text=A?this.getTextFromNode(s):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:r,y:i}=this,{mouse:s}=e.screen,A=new ue(e,"fontSize",Jn.parse(e.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new WA(r,i-A.getPixels("y"),r+this.measureText(t),i))}else if(this.children.length>0){var a=new Gb(this.document,null);a.children=this.children,a.parent=this,a.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}}function hO(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function $b(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?hO(Object(e),!0).forEach(function(r){oF(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):hO(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}class uO extends ml{constructor(t,e,r){super(t,e,r),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var i=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(i)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach(r=>{var{type:i,points:s}=r;switch(i){case Le.LINE_TO:t&&t.lineTo(s[0],s[1]);break;case Le.MOVE_TO:t&&t.moveTo(s[0],s[1]);break;case Le.CURVE_TO:t&&t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case Le.QUAD_TO:t&&t.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case Le.ARC:{var[A,a,o,l,h,u,d,f]=s,p=o>l?o:l,m=o>l?1:o/l,y=o>l?l/o:1;t&&(t.translate(A,a),t.rotate(d),t.scale(m,y),t.arc(0,0,p,h,h+u,!!(1-f)),t.scale(1/m,1/y),t.rotate(-d),t.translate(-A,-a));break}case Le.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),{glyphInfo:i}=this,s=t.fillStyle;e==="underline"&&t.beginPath(),i.forEach((A,a)=>{var{p0:o,p1:l,rotation:h,text:u}=A;t.save(),t.translate(o.x,o.y),t.rotate(h),t.fillStyle&&t.fillText(u,0,0),t.strokeStyle&&t.strokeText(u,0,0),t.restore(),e==="underline"&&(a===0&&t.moveTo(o.x,o.y+r/8),t.lineTo(l.x,l.y+r/5))}),e==="underline"&&(t.lineWidth=r/20,t.strokeStyle=s,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,r,i,s,A,a,o,l){var h=A,u=this.measureText(t,o);o===" "&&e==="justify"&&r<i&&(u+=(i-r)/s),l>-1&&(h+=this.getLetterSpacingAt(l));var d=this.textHeight/20,f=this.getEquidistantPointOnPath(h,d,0),p=this.getEquidistantPointOnPath(h+u,d,0),m={p0:f,p1:p},y=f&&p?Math.atan2(p.y-f.y,p.x-f.x):0;if(a){var w=Math.cos(Math.PI/2+y)*a,B=Math.cos(-y)*a;m.p0=$b($b({},f),{},{x:f.x+w,y:f.y+B}),m.p1=$b($b({},p),{},{x:p.x+w,y:p.y+B})}return h+=u,{offset:h,segment:m,rotation:y}}measureText(t,e){var{measuresCache:r}=this,i=e||this.getText();if(r.has(i))return r.get(i);var s=this.measureTargetText(t,i);return r.set(i,s),s}setTextData(t){if(!this.glyphInfo){var e=this.getText(),r=e.split(""),i=e.split(" ").length-1,s=this.parent.getAttribute("dx").split().map(S=>S.getPixels("x")),A=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),h=0;!o.hasValue()||o.getValue()==="inherit"?h=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(h=o.getPixels());var u=[],d=e.length;this.letterSpacingCache=u;for(var f=0;f<d;f++)u.push(typeof s[f]<"u"?s[f]:h);var p=u.reduce((S,_,L)=>L===0?0:S+_||0,0),m=this.measureText(t),y=Math.max(m+p,0);this.textWidth=m,this.textHeight=this.getFontSize(),this.glyphInfo=[];var w=this.getPathLength(),B=this.getStyle("startOffset").getNumber(0)*w,E=0;(a==="middle"||a==="center")&&(E=-y/2),(a==="end"||a==="right")&&(E=-y),E+=B,r.forEach((S,_)=>{var{offset:L,segment:k,rotation:H}=this.findSegmentToFitChar(t,a,y,w,i,E,A,S,_);E=L,!(!k.p0||!k.p1)&&this.glyphInfo.push({text:r[_],p0:k.p0,p1:k.p1,rotation:H})})}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:r}=t;for(r.reset();!r.isEnd();){var{current:i}=r,s=i?i.x:0,A=i?i.y:0,a=r.next(),o=a.type,l=[];switch(a.type){case Le.MOVE_TO:this.pathM(r,l);break;case Le.LINE_TO:o=this.pathL(r,l);break;case Le.HORIZ_LINE_TO:o=this.pathH(r,l);break;case Le.VERT_LINE_TO:o=this.pathV(r,l);break;case Le.CURVE_TO:this.pathC(r,l);break;case Le.SMOOTH_CURVE_TO:o=this.pathS(r,l);break;case Le.QUAD_TO:this.pathQ(r,l);break;case Le.SMOOTH_QUAD_TO:o=this.pathT(r,l);break;case Le.ARC:l=this.pathA(r);break;case Le.CLOSE_PATH:hr.pathZ(r);break}a.type!==Le.CLOSE_PATH?e.push({type:o,points:l,start:{x:s,y:A},pathLength:this.calcLength(s,A,o,l)}):e.push({type:Le.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:r,y:i}=hr.pathM(t).point;e.push(r,i)}pathL(t,e){var{x:r,y:i}=hr.pathL(t).point;return e.push(r,i),Le.LINE_TO}pathH(t,e){var{x:r,y:i}=hr.pathH(t).point;return e.push(r,i),Le.LINE_TO}pathV(t,e){var{x:r,y:i}=hr.pathV(t).point;return e.push(r,i),Le.LINE_TO}pathC(t,e){var{point:r,controlPoint:i,currentPoint:s}=hr.pathC(t);e.push(r.x,r.y,i.x,i.y,s.x,s.y)}pathS(t,e){var{point:r,controlPoint:i,currentPoint:s}=hr.pathS(t);return e.push(r.x,r.y,i.x,i.y,s.x,s.y),Le.CURVE_TO}pathQ(t,e){var{controlPoint:r,currentPoint:i}=hr.pathQ(t);e.push(r.x,r.y,i.x,i.y)}pathT(t,e){var{controlPoint:r,currentPoint:i}=hr.pathT(t);return e.push(r.x,r.y,i.x,i.y),Le.QUAD_TO}pathA(t){var{rX:e,rY:r,sweepFlag:i,xAxisRotation:s,centp:A,a1:a,ad:o}=hr.pathA(t);return i===0&&o>0&&(o-=2*Math.PI),i===1&&o<0&&(o+=2*Math.PI),[A.x,A.y,e,r,a,o,s,i]}calcLength(t,e,r,i){var s=0,A=null,a=null,o=0;switch(r){case Le.LINE_TO:return this.getLineLength(t,e,i[0],i[1]);case Le.CURVE_TO:for(s=0,A=this.getPointOnCubicBezier(0,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return s;case Le.QUAD_TO:for(s=0,A=this.getPointOnQuadraticBezier(0,t,e,i[0],i[1],i[2],i[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,t,e,i[0],i[1],i[2],i[3]),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return s;case Le.ARC:{s=0;var l=i[4],h=i[5],u=i[4]+h,d=Math.PI/180;if(Math.abs(l-u)<d&&(d=Math.abs(l-u)),A=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),h<0)for(o=l-d;o>u;o-=d)a=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],o,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;else for(o=l+d;o<u;o+=d)a=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],o,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return a=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),s}}return 0}getPointOnLine(t,e,r,i,s){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,o=(s-r)/(i-e+Mu),l=Math.sqrt(t*t/(1+o*o));i<e&&(l*=-1);var h=o*l,u=null;if(i===e)u={x:A,y:a+h};else if((a-r)/(A-e+Mu)===o)u={x:A+l,y:a+h};else{var d=0,f=0,p=this.getLineLength(e,r,i,s);if(p<Mu)return null;var m=(A-e)*(i-e)+(a-r)*(s-r);m/=p*p,d=e+m*(i-e),f=r+m*(s-r);var y=this.getLineLength(A,a,d,f),w=Math.sqrt(t*t-y*y);l=Math.sqrt(w*w/(1+o*o)),i<e&&(l*=-1),h=o*l,u={x:d+l,y:f+h}}return u}getPointOnPath(t){var e=this.getPathLength(),r=0,i=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:s}=this;for(var A of s){if(A&&(A.pathLength<5e-5||r+A.pathLength+5e-5<t)){r+=A.pathLength;continue}var a=t-r,o=0;switch(A.type){case Le.LINE_TO:i=this.getPointOnLine(a,A.start.x,A.start.y,A.points[0],A.points[1],A.start.x,A.start.y);break;case Le.ARC:{var l=A.points[4],h=A.points[5],u=A.points[4]+h;if(o=l+a/A.pathLength*h,h<0&&o<u||h>=0&&o>u)break;i=this.getPointOnEllipticalArc(A.points[0],A.points[1],A.points[2],A.points[3],o,A.points[6]);break}case Le.CURVE_TO:o=a/A.pathLength,o>1&&(o=1),i=this.getPointOnCubicBezier(o,A.start.x,A.start.y,A.points[0],A.points[1],A.points[2],A.points[3],A.points[4],A.points[5]);break;case Le.QUAD_TO:o=a/A.pathLength,o>1&&(o=1),i=this.getPointOnQuadraticBezier(o,A.start.x,A.start.y,A.points[0],A.points[1],A.points[2],A.points[3]);break}if(i)return i;break}return null}getLineLength(t,e,r,i){return Math.sqrt((r-t)*(r-t)+(i-e)*(i-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,r,i,s,A,a,o,l){var h=o*EF(t)+A*SF(t)+i*FF(t)+e*TF(t),u=l*EF(t)+a*SF(t)+s*FF(t)+r*TF(t);return{x:h,y:u}}getPointOnQuadraticBezier(t,e,r,i,s,A,a){var o=A*_F(t)+i*IF(t)+e*UF(t),l=a*_F(t)+s*IF(t)+r*UF(t);return{x:o,y:l}}getPointOnEllipticalArc(t,e,r,i,s,A){var a=Math.cos(A),o=Math.sin(A),l={x:r*Math.cos(s),y:i*Math.sin(s)};return{x:t+(l.x*a-l.y*o),y:e+(l.x*o+l.y*a)}}buildEquidistantCache(t,e){var r=this.getPathLength(),i=e||.25,s=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==i){this.equidistantCache={step:s,precision:i,points:[]};for(var A=0,a=0;a<=r;a+=i){var o=this.getPointOnPath(a),l=this.getPointOnPath(a+i);!o||!l||(A+=this.getLineLength(o.x,o.y,l.x,l.y),A>=s&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:a}),A-=s))}}}getEquidistantPointOnPath(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var i=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var GAt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class fO extends qc{constructor(t,e,r){super(t,e,r),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var s=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);t.images.push(this),s?this.loadSvg(i):this.loadImage(i),this.isSvg=s}}loadImage(t){var e=this;return dl(function*(){try{var r=yield e.document.createImage(t);e.image=r}catch(i){console.error('Error while loading image "'.concat(t,'":'),i)}e.loaded=!0})()}loadSvg(t){var e=this;return dl(function*(){var r=GAt.exec(t);if(r){var i=r[5];r[4]==="base64"?e.image=atob(i):e.image=decodeURIComponent(i)}else try{var s=yield e.document.fetch(t),A=yield s.text();e.image=A}catch(a){console.error('Error while loading image "'.concat(t,'":'),a)}e.loaded=!0})()}renderChildren(t){var{document:e,image:r,loaded:i}=this,s=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!i||!r||!a||!o)){if(t.save(),t.translate(s,A),this.isSvg){var l=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o});l.document.documentElement.parent=this,l.render()}else{var h=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:h.width,height:o,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&t.drawImage(h,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new WA(t,e,t+r,e+i)}}class dO extends qc{constructor(){super(...arguments),this.type="symbol"}render(t){}}class gO{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var r=this;return dl(function*(){try{var{document:i}=r,s=yield i.canvg.parser.load(e),A=s.getElementsByTagName("font");Array.from(A).forEach(a=>{var o=i.createElement(a);i.definitions[t]=o})}catch(a){console.error('Error while loading font "'.concat(e,'":'),a)}r.loaded=!0})()}}class OF extends Or{constructor(t,e,r){super(t,e,r),this.type="style";var i=Nu(Array.from(e.childNodes).map(A=>A.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),s=i.split("}");s.forEach(A=>{var a=A.trim();if(a){var o=a.split("{"),l=o[0].split(","),h=o[1].split(";");l.forEach(u=>{var d=u.trim();if(d){var f=t.styles[d]||{};if(h.forEach(y=>{var w=y.indexOf(":"),B=y.substr(0,w).trim(),E=y.substr(w+1,y.length-w).trim();B&&E&&(f[B]=new ue(t,B,E))}),t.styles[d]=f,t.stylesSpecificity[d]=kk(d),d==="@font-face"){var p=f["font-family"].getString().replace(/"|'/g,""),m=f.src.getString().split(",");m.forEach(y=>{if(y.indexOf('format("svg")')>0){var w=BF(y);w&&new gO(t).load(p,w)}})}}})}})}}OF.parseExternalUrl=BF;class pO extends qc{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),r=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),r.hasValue()&&t.translate(0,r.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:r}=this;if(r){var i=r;if(r.type==="symbol"&&(i=new Ng(e,null),i.attributes.viewBox=new ue(e,"viewBox",r.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new ue(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new ue(e,"overflow",r.getAttribute("overflow").getString()),i.children=r.children,r.styles.opacity=new ue(e,"opacity",this.calculateOpacity())),i.type==="svg"){var s=this.getStyle("width",!1,!0),A=this.getStyle("height",!1,!0);s.hasValue()&&(i.attributes.width=new ue(e,"width",s.getString())),A.hasValue()&&(i.attributes.height=new ue(e,"height",A.getString()))}var a=i.parent;i.parent=this,i.render(t),i.parent=a}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return Xc.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function Wb(n,t,e,r,i,s){return n[e*r*4+t*4+s]}function zb(n,t,e,r,i,s,A){n[e*r*4+t*4+s]=A}function ji(n,t,e){var r=n[t];return r*e}function vl(n,t,e,r){return t+Math.cos(n)*e+Math.sin(n)*r}class DF extends Or{constructor(t,e,r){super(t,e,r),this.type="feColorMatrix";var i=Hs(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var s=i[0];i=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var A=i[0]*Math.PI/180;i=[vl(A,.213,.787,-.213),vl(A,.715,-.715,-.715),vl(A,.072,-.072,.928),0,0,vl(A,.213,-.213,.143),vl(A,.715,.285,.14),vl(A,.072,-.072,-.283),0,0,vl(A,.213,-.213,-.787),vl(A,.715,-.715,.715),vl(A,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,r,i,s){for(var{includeOpacity:A,matrix:a}=this,o=t.getImageData(0,0,i,s),l=0;l<s;l++)for(var h=0;h<i;h++){var u=Wb(o.data,h,l,i,s,0),d=Wb(o.data,h,l,i,s,1),f=Wb(o.data,h,l,i,s,2),p=Wb(o.data,h,l,i,s,3),m=ji(a,0,u)+ji(a,1,d)+ji(a,2,f)+ji(a,3,p)+ji(a,4,1),y=ji(a,5,u)+ji(a,6,d)+ji(a,7,f)+ji(a,8,p)+ji(a,9,1),w=ji(a,10,u)+ji(a,11,d)+ji(a,12,f)+ji(a,13,p)+ji(a,14,1),B=ji(a,15,u)+ji(a,16,d)+ji(a,17,f)+ji(a,18,p)+ji(a,19,1);A&&(m=0,y=0,w=0,B*=p/255),zb(o.data,h,l,i,s,0,m),zb(o.data,h,l,i,s,1,y),zb(o.data,h,l,i,s,2,w),zb(o.data,h,l,i,s,3,B)}t.clearRect(0,0,i,s),t.putImageData(o,0,0)}}class fv extends Or{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:r}=this,i=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!A&&!a){var o=new WA;this.children.forEach(p=>{o.addBoundingBox(p.getBoundingBox(t))}),i=Math.floor(o.x1),s=Math.floor(o.y1),A=Math.floor(o.width),a=Math.floor(o.height)}var l=this.removeStyles(e,fv.ignoreStyles),h=r.createCanvas(i+A,s+a),u=h.getContext("2d");r.screen.setDefaults(u),this.renderChildren(u),new DF(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(u,0,0,i+A,s+a);var d=r.createCanvas(i+A,s+a),f=d.getContext("2d");r.screen.setDefaults(f),e.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=u.createPattern(h,"no-repeat"),f.fillRect(0,0,i+A,s+a),t.fillStyle=f.createPattern(d,"no-repeat"),t.fillRect(0,0,i+A,s+a),this.restoreStyles(e,l)}render(t){}}fv.ignoreStyles=["mask","transform","clip-path"];var mO=()=>{};class vO extends Or{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,r=Reflect.getPrototypeOf(t),{beginPath:i,closePath:s}=t;r&&(r.beginPath=mO,r.closePath=mO),Reflect.apply(i,t,[]),this.children.forEach(A=>{if(!(typeof A.path>"u")){var a=typeof A.elementTransform<"u"?A.elementTransform():null;a||(a=Xc.fromElement(e,A)),a&&a.apply(t),A.path(t),r&&(r.closePath=s),a&&a.unapply(t)}}),Reflect.apply(s,t,[]),t.clip(),r&&(r.beginPath=i,r.closePath=s)}render(t){}}class dv extends Or{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:r,children:i}=this,s=e.getBoundingBox(t);if(s){var A=0,a=0;i.forEach(w=>{var B=w.extraFilterDistance||0;A=Math.max(A,B),a=Math.max(a,B)});var o=Math.floor(s.width),l=Math.floor(s.height),h=o+2*A,u=l+2*a;if(!(h<1||u<1)){var d=Math.floor(s.x),f=Math.floor(s.y),p=this.removeStyles(e,dv.ignoreStyles),m=r.createCanvas(h,u),y=m.getContext("2d");r.screen.setDefaults(y),y.translate(-d+A,-f+a),e.render(y),i.forEach(w=>{typeof w.apply=="function"&&w.apply(y,0,0,h,u)}),t.drawImage(m,0,0,h,u,d-A,f-a,h,u),this.restoreStyles(e,p)}}}render(t){}}dv.ignoreStyles=["filter","transform","clip-path"];class wO extends Or{constructor(t,e,r){super(t,e,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,r,i,s){}}class yO extends Or{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,r,i,s){}}class bO extends Or{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,r,i,s){}}class BO extends Or{constructor(t,e,r){super(t,e,r),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,r,i,s){var{document:A,blurRadius:a}=this,o=A.window?A.window.document.body:null,l=t.canvas;l.id=A.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),BAt(l,e,r,i,s,a),o&&o.removeChild(l)}}class CO extends Or{constructor(){super(...arguments),this.type="title"}}class xO extends Or{constructor(){super(...arguments),this.type="desc"}}var jAt={svg:Ng,rect:PF,circle:zk,ellipse:Xk,line:qk,polyline:MF,polygon:Yk,path:hr,pattern:Jk,marker:Zk,defs:tO,linearGradient:eO,radialGradient:rO,stop:iO,animate:jb,animateColor:nO,animateTransform:sO,font:AO,"font-face":aO,"missing-glyph":oO,glyph:NF,text:ml,tspan:uv,tref:lO,a:cO,textPath:uO,image:fO,g:Gb,symbol:dO,style:OF,use:pO,mask:fv,clipPath:vO,filter:dv,feDropShadow:wO,feMorphology:yO,feComposite:bO,feColorMatrix:DF,feGaussianBlur:BO,title:CO,desc:xO};function EO(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function $At(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?EO(Object(e),!0).forEach(function(r){oF(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):EO(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function WAt(n,t){var e=document.createElement("canvas");return e.width=n,e.height=t,e}function zAt(n){return RF.apply(this,arguments)}function RF(){return RF=dl(function*(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((r,i)=>{e.onload=()=>{r(e)},e.onerror=(s,A,a,o,l)=>{i(l)},e.src=n})}),RF.apply(this,arguments)}class wl{constructor(t){var{rootEmSize:e=12,emSize:r=12,createCanvas:i=wl.createCanvas,createImage:s=wl.createImage,anonymousCrossOrigin:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=t,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=r,this.createCanvas=i,this.createImage=this.bindCreateImage(s,A),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return typeof e=="boolean"?(r,i)=>t(r,typeof i=="boolean"?i:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),r=wl.elementTypes[e];return typeof r<"u"?new r(this,t):new Wk(this,t)}createTextNode(t){return new VAt(this,t)}setViewBox(t){this.screen.setViewBox($At({document:this},t))}}wl.createCanvas=WAt,wl.createImage=zAt,wl.elementTypes=jAt;function SO(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function ku(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?SO(Object(e),!0).forEach(function(r){oF(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):SO(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}class Ou{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Vb(r),this.screen=new hv(t,r),this.options=r;var i=new wl(this,r),s=i.createDocumentElement(e);this.document=i,this.documentElement=s}static from(t,e){var r=arguments;return dl(function*(){var i=r.length>2&&r[2]!==void 0?r[2]:{},s=new Vb(i),A=yield s.parse(e);return new Ou(t,A,i)})()}static fromString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new Vb(r),s=i.parseFromString(e);return new Ou(t,s,r)}fork(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ou.from(t,e,ku(ku({},this.options),r))}forkString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ou.fromString(t,e,ku(ku({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return dl(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:{};e.start(ku({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},r)),yield e.ready(),e.stop()})()}start(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:e,screen:r,options:i}=this;r.start(e,ku(ku({enableRedraw:!0},i),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,r)}}const XAt=Object.freeze(Object.defineProperty({__proto__:null,AElement:cO,AnimateColorElement:nO,AnimateElement:jb,AnimateTransformElement:sO,BoundingBox:WA,CB1:EF,CB2:SF,CB3:FF,CB4:TF,Canvg:Ou,CircleElement:zk,ClipPathElement:vO,DefsElement:tO,DescElement:xO,Document:wl,Element:Or,EllipseElement:Xk,FeColorMatrixElement:DF,FeCompositeElement:bO,FeDropShadowElement:wO,FeGaussianBlurElement:BO,FeMorphologyElement:yO,FilterElement:dv,Font:Jn,FontElement:AO,FontFaceElement:aO,GElement:Gb,GlyphElement:NF,GradientElement:kF,ImageElement:fO,LineElement:qk,LinearGradientElement:eO,MarkerElement:Zk,MaskElement:fv,Matrix:LF,MissingGlyphElement:oO,Mouse:Dk,PSEUDO_ZERO:Mu,Parser:Vb,PathElement:hr,PathParser:Le,PatternElement:Jk,Point:gi,PolygonElement:Yk,PolylineElement:MF,Property:ue,QB1:_F,QB2:IF,QB3:UF,RadialGradientElement:rO,RectElement:PF,RenderedElement:qc,Rotate:Vk,SVGElement:Ng,SVGFontLoader:gO,Scale:Gk,Screen:hv,Skew:QF,SkewX:jk,SkewY:$k,StopElement:iO,StyleElement:OF,SymbolElement:dO,TRefElement:lO,TSpanElement:uv,TextElement:ml,TextPathElement:uO,TitleElement:CO,Transform:Xc,Translate:Kk,UnknownElement:Wk,UseElement:pO,ViewPort:Ok,compressSpaces:Nu,default:Ou,getSelectorSpecificity:kk,normalizeAttributeName:Pk,normalizeColor:Mk,parseExternalUrl:BF,presets:SAt,toNumbers:Hs,trimLeft:Qk,trimRight:Nk,vectorMagnitude:CF,vectorsAngle:xF,vectorsRatio:Kb},Symbol.toStringTag,{value:"Module"}));class qAt{constructor(){this.name="PdfPlugin",this.version="1.0.0",this.description="PDF export (cpdf) and import (ipdf) commands",this.registeredCommands=[]}onLoad(t,e){const r=Ye.AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME;e.addCommand(r,"cpdf","cpdf",new fU),e.addCommand(r,"ipdf","ipdf",new S3),this.registeredCommands.push({group:r,name:"cpdf"},{group:r,name:"ipdf"})}onUnload(t,e){for(const r of this.registeredCommands)e.removeCmd(r.group,r.name);this.registeredCommands=[]}}const YAt=Object.freeze(Object.defineProperty({__proto__:null,AcApPdfPlugin:qAt},Symbol.toStringTag,{value:"Module"}));_e.AcApConvertToPdfCmd=fU,_e.AcApImportPdfCmd=S3,_e.AcApPdfConvertor=uU,_e.AcApPdfImportConvertor=E3,_e.PDF_PLUGIN_NAME=F3,_e.PDF_PLUGIN_TRIGGERS=T3,_e.createPdfPlugin=_3,_e.registerLazyPdfPlugin=R9,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|