@blockcerts/blockcerts-verifier 1.59.0 → 1.59.2

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.
Files changed (33) hide show
  1. package/bundle-stats.html +1 -1
  2. package/dist/{EcdsaSecp256k1Signature2019-XwuS-fWx-n_8xXj1H.js → EcdsaSecp256k1Signature2019-XwuS-fWx-7dFfMy74.js} +1 -1
  3. package/dist/{Ed25519Signature2020-IJ4ybcbU-ii2PjWjh.js → Ed25519Signature2020-IJ4ybcbU--hEL5-Pa.js} +1 -1
  4. package/dist/{HashlinkVerifier-wyKYZ83G-aKb9h_9G.js → HashlinkVerifier-wyKYZ83G-bzhltPG4.js} +1 -1
  5. package/dist/{MerkleProof2017-MZJbBTpc-NVfw6WgB.js → MerkleProof2017-MZJbBTpc-0GcGcIV-.js} +1 -1
  6. package/dist/{MerkleProof2017-Ub6_JUVj-Z6jluDo2.js → MerkleProof2017-Ub6_JUVj-x8awkeml.js} +1 -1
  7. package/dist/{MerkleProof2019-QUwyEIHd-9hBGmPq_.js → MerkleProof2019-QUwyEIHd-iYt21yPG.js} +1 -1
  8. package/dist/{checkRevocationStatusList2021-d1qO1xnj-AIMXIqnZ.js → checkRevocationStatusList2021-d1qO1xnj-DH6pO-9Q.js} +1 -1
  9. package/dist/{controlVerificationMethod-6GJtYmqY-VwQyuM5o.js → controlVerificationMethod-6GJtYmqY-Ivo3O8nb.js} +1 -1
  10. package/dist/{did-key-common.esm-Fyh_U6fK-6hhnSYH5.js → did-key-common.esm-Fyh_U6fK-cOLlHenk.js} +1 -1
  11. package/dist/{did-key-ed25519.esm-1lIlZtof-q2UR_X9G.js → did-key-ed25519.esm-1lIlZtof-Grj-JpU9.js} +1 -1
  12. package/dist/did-key-secp256k1.esm-hA8kGTM0-G8ct6CwH.js +1 -0
  13. package/dist/{downloadPDF-6pZYEy3P.js → downloadPDF--IVgfc2I.js} +3 -3
  14. package/dist/{elliptic-il_lPAr--BGmaMzNc.js → elliptic-il_lPAr--VPyWJbY1.js} +1 -1
  15. package/dist/{ensureNotRevoked-2QGGtBqy-U5ByLE-t.js → ensureNotRevoked-2QGGtBqy-t8Yk4QI-.js} +1 -1
  16. package/dist/ensureNotRevoked-gui-UMnE-kFmYZEJe.js +1 -0
  17. package/dist/{ensureValidIssuingKey-zZEv5-cH-oM__XftS.js → ensureValidIssuingKey-zZEv5-cH-UoJe_Wnf.js} +1 -1
  18. package/dist/{index-MC635rre-r3wKwiyR.js → index-MC635rre-_DW5MUyk.js} +2 -2
  19. package/dist/{index-WX6J-tsk.js → index-UlvMASNZ.js} +1 -1
  20. package/dist/index-xsnp_Fid-o1HUYRUQ.js +1 -0
  21. package/dist/{index.es-NoR6QQLP.js → index.es-dEKcVerc.js} +1 -1
  22. package/dist/{jsonld-CXlzLf4P-Wh4x173W.js → jsonld-CXlzLf4P-ioHKtwiZ.js} +6 -6
  23. package/dist/{jsonld-signatures-ooFWZVS--VI8BZQOv.js → jsonld-signatures-ooFWZVS--ThP8ltUY.js} +5 -5
  24. package/dist/main.js +103 -103
  25. package/dist/{purify-05qYXQpp.js → purify-GC91XaSq.js} +1 -1
  26. package/dist/{sha256-wKeS8_4l-o9J6pXuo.js → sha256-wKeS8_4l-9eo2gOQb.js} +1 -1
  27. package/dist/{x25519-NtRELWAG-TIgip27e.js → x25519-NtRELWAG-2RynHlmX.js} +1 -1
  28. package/package.json +1 -1
  29. package/scripts/automated-update-blockcerts.org.sh +7 -1
  30. package/dist/did-key-secp256k1.esm-hA8kGTM0-5bW-jZai.js +0 -1
  31. package/dist/ensureNotRevoked-gui-UMnE-9nObicUP.js +0 -1
  32. package/dist/index-F1HqK0qm.js +0 -1
  33. package/dist/index-xsnp_Fid-LwXIiw03.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as A,M as t,N as e,O as r,P as n}from"./main.js";function i(A,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(A)}function o(A){const{offsetWidth:t,offsetHeight:e}=A;return{width:t,height:e}}function s(A){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},s(A)}var a=Uint8Array,c=Uint16Array,u=Uint32Array,l=new a([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]),h=new a([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]),f=new a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),B=function(A,t){for(var e=new c(31),r=0;r<31;++r)e[r]=t+=1<<A[r-1];var n=new u(e[30]);for(r=1;r<30;++r)for(var i=e[r];i<e[r+1];++i)n[i]=i-e[r]<<5|r;return[e,n]},d=B(l,2),g=d[0],p=d[1];g[28]=258,p[258]=28;for(var w=B(h,0),m=w[0],Q=w[1],C=new c(32768),v=0;v<32768;++v){var F=(43690&v)>>>1|(21845&v)<<1;F=(61680&(F=(52428&F)>>>2|(13107&F)<<2))>>>4|(3855&F)<<4,C[v]=((65280&F)>>>8|(255&F)<<8)>>>1}var y=function(A,t,e){for(var r=A.length,n=0,i=new c(t);n<r;++n)++i[A[n]-1];var o,s=new c(t);for(n=0;n<t;++n)s[n]=s[n-1]+i[n-1]<<1;if(e){o=new c(1<<t);var a=15-t;for(n=0;n<r;++n)if(A[n])for(var u=n<<4|A[n],l=t-A[n],h=s[A[n]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)o[C[h]>>>a]=u}else for(o=new c(r),n=0;n<r;++n)o[n]=C[s[A[n]-1]++]>>>15-A[n];return o},b=new a(288);for(v=0;v<144;++v)b[v]=8;for(v=144;v<256;++v)b[v]=9;for(v=256;v<280;++v)b[v]=7;for(v=280;v<288;++v)b[v]=8;var U=new a(32);for(v=0;v<32;++v)U[v]=5;var L=y(b,9,0),I=y(b,9,1),E=y(U,5,0),x=y(U,5,1),H=function(A){for(var t=A[0],e=1;e<A.length;++e)A[e]>t&&(t=A[e]);return t},N=function(A,t,e){var r=t/8>>0;return(A[r]|A[r+1]<<8)>>>(7&t)&e},S=function(A,t){var e=t/8>>0;return(A[e]|A[e+1]<<8|A[e+2]<<16)>>>(7&t)},P=function(A){return(A/8>>0)+(7&A&&1)},D=function(A,t,e){(null==t||t<0)&&(t=0),(null==e||e>A.length)&&(e=A.length);var r=new(A instanceof c?c:A instanceof u?u:a)(e-t);return r.set(A.subarray(t,e)),r},k=function(A,t,e){e<<=7&t;var r=t/8>>0;A[r]|=e,A[r+1]|=e>>>8},_=function(A,t,e){e<<=7&t;var r=t/8>>0;A[r]|=e,A[r+1]|=e>>>8,A[r+2]|=e>>>16},M=function(A,t){for(var e=[],r=0;r<A.length;++r)A[r]&&e.push({s:r,f:A[r]});var n=e.length,i=e.slice();if(!n)return[new a(0),0];if(1==n){var o=new a(e[0].s+1);return o[e[0].s]=1,[o,1]}e.sort((function(A,t){return A.f-t.f})),e.push({s:-1,f:25001});var s=e[0],u=e[1],l=0,h=1,f=2;for(e[0]={s:-1,f:s.f+u.f,l:s,r:u};h!=n-1;)s=e[e[l].f<e[f].f?l++:f++],u=e[l!=h&&e[l].f<e[f].f?l++:f++],e[h++]={s:-1,f:s.f+u.f,l:s,r:u};var B=i[0].s;for(r=1;r<n;++r)i[r].s>B&&(B=i[r].s);var d=new c(B+1),g=O(e[h-1],d,0);if(g>t){r=0;var p=0,w=g-t,m=1<<w;for(i.sort((function(A,t){return d[t.s]-d[A.s]||A.f-t.f}));r<n;++r){var Q=i[r].s;if(!(d[Q]>t))break;p+=m-(1<<g-d[Q]),d[Q]=t}for(p>>>=w;p>0;){var C=i[r].s;d[C]<t?p-=1<<t-d[C]++-1:++r}for(;r>=0&&p;--r){var v=i[r].s;d[v]==t&&(--d[v],++p)}g=t}return[new a(d),g]},O=function(A,t,e){return-1==A.s?Math.max(O(A.l,t,e+1),O(A.r,t,e+1)):t[A.s]=e},K=function(A){for(var t=A.length;t&&!A[--t];);for(var e=new c(++t),r=0,n=A[0],i=1,o=function(A){e[r++]=A},s=1;s<=t;++s)if(A[s]==n&&s!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(n),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(n);i=1,n=A[s]}return[e.subarray(0,r),t]},T=function(A,t){for(var e=0,r=0;r<t.length;++r)e+=A[r]*t[r];return e},R=function(A,t,e){var r=e.length,n=P(t+2);A[n]=255&r,A[n+1]=r>>>8,A[n+2]=255^A[n],A[n+3]=255^A[n+1];for(var i=0;i<r;++i)A[n+i+4]=e[i];return 8*(n+4+r)},j=function(A,t,e,r,n,i,o,s,a,u,B){k(t,B++,e),++n[256];for(var d=M(n,15),g=d[0],p=d[1],w=M(i,15),m=w[0],Q=w[1],C=K(g),v=C[0],F=C[1],I=K(m),x=I[0],H=I[1],N=new c(19),S=0;S<v.length;++S)N[31&v[S]]++;for(S=0;S<x.length;++S)N[31&x[S]]++;for(var P=M(N,7),D=P[0],O=P[1],j=19;j>4&&!D[f[j-1]];--j);var G,V,q,X,J=u+5<<3,W=T(n,b)+T(i,U)+o,z=T(n,g)+T(i,m)+o+14+3*j+T(N,D)+(2*N[16]+3*N[17]+7*N[18]);if(J<=W&&J<=z)return R(t,B,A.subarray(a,a+u));if(k(t,B,1+(z<W)),B+=2,z<W){G=y(g,p,0),V=g,q=y(m,Q,0),X=m;var Y=y(D,O,0);k(t,B,F-257),k(t,B+5,H-1),k(t,B+10,j-4),B+=14;for(S=0;S<j;++S)k(t,B+3*S,D[f[S]]);B+=3*j;for(var Z=[v,x],$=0;$<2;++$){var AA=Z[$];for(S=0;S<AA.length;++S){var tA=31&AA[S];k(t,B,Y[tA]),B+=D[tA],tA>15&&(k(t,B,AA[S]>>>5&127),B+=AA[S]>>>12)}}}else G=L,V=b,q=E,X=U;for(S=0;S<s;++S)if(r[S]>255){tA=r[S]>>>18&31;_(t,B,G[tA+257]),B+=V[tA+257],tA>7&&(k(t,B,r[S]>>>23&31),B+=l[tA]);var eA=31&r[S];_(t,B,q[eA]),B+=X[eA],eA>3&&(_(t,B,r[S]>>>5&8191),B+=h[eA])}else _(t,B,G[r[S]]),B+=V[r[S]];return _(t,B,G[256]),B+V[256]},G=new u([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V=new a(0),q=function(A,t,e,r,n){return function(A,t,e,r,n,i){var o=A.length,s=new a(r+o+5*(1+Math.floor(o/7e3))+n),f=s.subarray(r,s.length-n),B=0;if(!t||o<8)for(var d=0;d<=o;d+=65535){var g=d+65535;g<o?B=R(f,B,A.subarray(d,g)):(f[d]=i,B=R(f,B,A.subarray(d,o)))}else{for(var w=G[t-1],m=w>>>13,C=8191&w,v=(1<<e)-1,F=new c(32768),y=new c(v+1),b=Math.ceil(e/3),U=2*b,L=function(t){return(A[t]^A[t+1]<<b^A[t+2]<<U)&v},I=new u(25e3),E=new c(288),x=new c(32),H=0,N=0,S=(d=0,0),k=0,_=0;d<o;++d){var M=L(d),O=32767&d,K=y[M];if(F[O]=K,y[M]=O,k<=d){var T=o-d;if((H>7e3||S>24576)&&T>423){B=j(A,f,0,I,E,x,N,S,_,d-_,B),S=H=N=0,_=d;for(var q=0;q<286;++q)E[q]=0;for(q=0;q<30;++q)x[q]=0}var X=2,J=0,W=C,z=O-K&32767;if(T>2&&M==L(d-z))for(var Y=Math.min(m,T)-1,Z=Math.min(32767,d),$=Math.min(258,T);z<=Z&&--W&&O!=K;){if(A[d+X]==A[d+X-z]){for(var AA=0;AA<$&&A[d+AA]==A[d+AA-z];++AA);if(AA>X){if(X=AA,J=z,AA>Y)break;var tA=Math.min(z,AA-2),eA=0;for(q=0;q<tA;++q){var rA=d-z+q+32768&32767,nA=rA-F[rA]+32768&32767;nA>eA&&(eA=nA,K=rA)}}}z+=(O=K)-(K=F[O])+32768&32767}if(J){I[S++]=268435456|p[X]<<18|Q[J];var iA=31&p[X],oA=31&Q[J];N+=l[iA]+h[oA],++E[257+iA],++x[oA],k=d+X,++H}else I[S++]=A[d],++E[A[d]]}}B=j(A,f,i,I,E,x,N,S,_,d-_,B),i||(B=R(f,B,V))}return D(s,0,r+P(B)+n)}(A,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(A.length)))):12+t.mem,e,r,!n)};function X(A,t){void 0===t&&(t={});var e=function(){var A=1,t=0;return{p:function(e){for(var r=A,n=t,i=e.length,o=0;o!=i;){for(var s=Math.min(o+5552,i);o<s;++o)n+=r+=e[o];r%=65521,n%=65521}A=r,t=n},d:function(){return(A>>>8<<16|(255&t)<<8|t>>>8)+2*((255&A)<<23)}}}();e.p(A);var r=q(A,t,2,4);return function(A,t){var e=t.level,r=0==e?0:e<6?1:9==e?3:2;A[0]=120,A[1]=r<<6|(r?32-2*r:1)}(r,t),function(A,t,e){for(;e;++t)A[t]=e,e>>>=8}(r,r.length-4,e.d()),r}function J(A,t){return function(A,t,e){var r=A.length,n=!t||e,i=!e||e.i;e||(e={}),t||(t=new a(3*r));var o=function(A){var e=t.length;if(A>e){var r=new a(Math.max(2*e,A));r.set(t),t=r}},s=e.f||0,c=e.p||0,u=e.b||0,B=e.l,d=e.d,p=e.m,w=e.n,Q=8*r;do{if(!B){e.f=s=N(A,c,1);var C=N(A,c+1,3);if(c+=3,!C){var v=A[(T=P(c)+4)-4]|A[T-3]<<8,F=T+v;if(F>r){if(i)throw"unexpected EOF";break}n&&o(u+v),t.set(A.subarray(T,F),u),e.b=u+=v,e.p=c=8*F;continue}if(1==C)B=I,d=x,p=9,w=5;else{if(2!=C)throw"invalid block type";var b=N(A,c,31)+257,U=N(A,c+10,15)+4,L=b+N(A,c+5,31)+1;c+=14;for(var E=new a(L),k=new a(19),_=0;_<U;++_)k[f[_]]=N(A,c+3*_,7);c+=3*U;var M=H(k),O=(1<<M)-1;if(!i&&c+L*(M+7)>Q)break;var K=y(k,M,1);for(_=0;_<L;){var T,R=K[N(A,c,O)];if(c+=15&R,(T=R>>>4)<16)E[_++]=T;else{var j=0,G=0;for(16==T?(G=3+N(A,c,3),c+=2,j=E[_-1]):17==T?(G=3+N(A,c,7),c+=3):18==T&&(G=11+N(A,c,127),c+=7);G--;)E[_++]=j}}var V=E.subarray(0,b),q=E.subarray(b);p=H(V),w=H(q),B=y(V,p,1),d=y(q,w,1)}if(c>Q)throw"unexpected EOF"}n&&o(u+131072);for(var X=(1<<p)-1,J=(1<<w)-1,W=p+w+18;i||c+W<Q;){var z=(j=B[S(A,c)&X])>>>4;if((c+=15&j)>Q)throw"unexpected EOF";if(!j)throw"invalid length/literal";if(z<256)t[u++]=z;else{if(256==z){B=null;break}var Y=z-254;if(z>264){var Z=l[_=z-257];Y=N(A,c,(1<<Z)-1)+g[_],c+=Z}var $=d[S(A,c)&J],AA=$>>>4;if(!$)throw"invalid distance";if(c+=15&$,q=m[AA],AA>3&&(Z=h[AA],q+=S(A,c)&(1<<Z)-1,c+=Z),c>Q)throw"unexpected EOF";n&&o(u+131072);for(var tA=u+Y;u<tA;u+=4)t[u]=t[u-q],t[u+1]=t[u+1-q],t[u+2]=t[u+2-q],t[u+3]=t[u+3-q];u=tA}}e.l=B,e.p=c,e.b=u,B&&(s=1,e.m=p,e.d=d,e.n=w)}while(!s);return u==t.length?t:D(t,0,u)}((function(A){if(8!=(15&A[0])||A[0]>>>4>7||(A[0]<<8|A[1])%31)throw"invalid zlib data";if(32&A[1])throw"invalid zlib data: preset dictionaries not supported"}(A),A.subarray(2,-4)),t)}
1
+ import{_ as A,G as t,H as e,I as r,J as n}from"./main.js";function i(A,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(A)}function o(A){const{offsetWidth:t,offsetHeight:e}=A;return{width:t,height:e}}function s(A){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},s(A)}var a=Uint8Array,c=Uint16Array,u=Uint32Array,l=new a([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]),h=new a([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]),f=new a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),B=function(A,t){for(var e=new c(31),r=0;r<31;++r)e[r]=t+=1<<A[r-1];var n=new u(e[30]);for(r=1;r<30;++r)for(var i=e[r];i<e[r+1];++i)n[i]=i-e[r]<<5|r;return[e,n]},d=B(l,2),g=d[0],p=d[1];g[28]=258,p[258]=28;for(var w=B(h,0),m=w[0],Q=w[1],C=new c(32768),v=0;v<32768;++v){var F=(43690&v)>>>1|(21845&v)<<1;F=(61680&(F=(52428&F)>>>2|(13107&F)<<2))>>>4|(3855&F)<<4,C[v]=((65280&F)>>>8|(255&F)<<8)>>>1}var y=function(A,t,e){for(var r=A.length,n=0,i=new c(t);n<r;++n)++i[A[n]-1];var o,s=new c(t);for(n=0;n<t;++n)s[n]=s[n-1]+i[n-1]<<1;if(e){o=new c(1<<t);var a=15-t;for(n=0;n<r;++n)if(A[n])for(var u=n<<4|A[n],l=t-A[n],h=s[A[n]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)o[C[h]>>>a]=u}else for(o=new c(r),n=0;n<r;++n)o[n]=C[s[A[n]-1]++]>>>15-A[n];return o},b=new a(288);for(v=0;v<144;++v)b[v]=8;for(v=144;v<256;++v)b[v]=9;for(v=256;v<280;++v)b[v]=7;for(v=280;v<288;++v)b[v]=8;var U=new a(32);for(v=0;v<32;++v)U[v]=5;var L=y(b,9,0),I=y(b,9,1),E=y(U,5,0),x=y(U,5,1),H=function(A){for(var t=A[0],e=1;e<A.length;++e)A[e]>t&&(t=A[e]);return t},N=function(A,t,e){var r=t/8>>0;return(A[r]|A[r+1]<<8)>>>(7&t)&e},S=function(A,t){var e=t/8>>0;return(A[e]|A[e+1]<<8|A[e+2]<<16)>>>(7&t)},P=function(A){return(A/8>>0)+(7&A&&1)},D=function(A,t,e){(null==t||t<0)&&(t=0),(null==e||e>A.length)&&(e=A.length);var r=new(A instanceof c?c:A instanceof u?u:a)(e-t);return r.set(A.subarray(t,e)),r},k=function(A,t,e){e<<=7&t;var r=t/8>>0;A[r]|=e,A[r+1]|=e>>>8},_=function(A,t,e){e<<=7&t;var r=t/8>>0;A[r]|=e,A[r+1]|=e>>>8,A[r+2]|=e>>>16},M=function(A,t){for(var e=[],r=0;r<A.length;++r)A[r]&&e.push({s:r,f:A[r]});var n=e.length,i=e.slice();if(!n)return[new a(0),0];if(1==n){var o=new a(e[0].s+1);return o[e[0].s]=1,[o,1]}e.sort((function(A,t){return A.f-t.f})),e.push({s:-1,f:25001});var s=e[0],u=e[1],l=0,h=1,f=2;for(e[0]={s:-1,f:s.f+u.f,l:s,r:u};h!=n-1;)s=e[e[l].f<e[f].f?l++:f++],u=e[l!=h&&e[l].f<e[f].f?l++:f++],e[h++]={s:-1,f:s.f+u.f,l:s,r:u};var B=i[0].s;for(r=1;r<n;++r)i[r].s>B&&(B=i[r].s);var d=new c(B+1),g=O(e[h-1],d,0);if(g>t){r=0;var p=0,w=g-t,m=1<<w;for(i.sort((function(A,t){return d[t.s]-d[A.s]||A.f-t.f}));r<n;++r){var Q=i[r].s;if(!(d[Q]>t))break;p+=m-(1<<g-d[Q]),d[Q]=t}for(p>>>=w;p>0;){var C=i[r].s;d[C]<t?p-=1<<t-d[C]++-1:++r}for(;r>=0&&p;--r){var v=i[r].s;d[v]==t&&(--d[v],++p)}g=t}return[new a(d),g]},O=function(A,t,e){return-1==A.s?Math.max(O(A.l,t,e+1),O(A.r,t,e+1)):t[A.s]=e},K=function(A){for(var t=A.length;t&&!A[--t];);for(var e=new c(++t),r=0,n=A[0],i=1,o=function(A){e[r++]=A},s=1;s<=t;++s)if(A[s]==n&&s!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(n),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(n);i=1,n=A[s]}return[e.subarray(0,r),t]},T=function(A,t){for(var e=0,r=0;r<t.length;++r)e+=A[r]*t[r];return e},R=function(A,t,e){var r=e.length,n=P(t+2);A[n]=255&r,A[n+1]=r>>>8,A[n+2]=255^A[n],A[n+3]=255^A[n+1];for(var i=0;i<r;++i)A[n+i+4]=e[i];return 8*(n+4+r)},j=function(A,t,e,r,n,i,o,s,a,u,B){k(t,B++,e),++n[256];for(var d=M(n,15),g=d[0],p=d[1],w=M(i,15),m=w[0],Q=w[1],C=K(g),v=C[0],F=C[1],I=K(m),x=I[0],H=I[1],N=new c(19),S=0;S<v.length;++S)N[31&v[S]]++;for(S=0;S<x.length;++S)N[31&x[S]]++;for(var P=M(N,7),D=P[0],O=P[1],j=19;j>4&&!D[f[j-1]];--j);var G,V,q,X,J=u+5<<3,W=T(n,b)+T(i,U)+o,z=T(n,g)+T(i,m)+o+14+3*j+T(N,D)+(2*N[16]+3*N[17]+7*N[18]);if(J<=W&&J<=z)return R(t,B,A.subarray(a,a+u));if(k(t,B,1+(z<W)),B+=2,z<W){G=y(g,p,0),V=g,q=y(m,Q,0),X=m;var Y=y(D,O,0);k(t,B,F-257),k(t,B+5,H-1),k(t,B+10,j-4),B+=14;for(S=0;S<j;++S)k(t,B+3*S,D[f[S]]);B+=3*j;for(var Z=[v,x],$=0;$<2;++$){var AA=Z[$];for(S=0;S<AA.length;++S){var tA=31&AA[S];k(t,B,Y[tA]),B+=D[tA],tA>15&&(k(t,B,AA[S]>>>5&127),B+=AA[S]>>>12)}}}else G=L,V=b,q=E,X=U;for(S=0;S<s;++S)if(r[S]>255){tA=r[S]>>>18&31;_(t,B,G[tA+257]),B+=V[tA+257],tA>7&&(k(t,B,r[S]>>>23&31),B+=l[tA]);var eA=31&r[S];_(t,B,q[eA]),B+=X[eA],eA>3&&(_(t,B,r[S]>>>5&8191),B+=h[eA])}else _(t,B,G[r[S]]),B+=V[r[S]];return _(t,B,G[256]),B+V[256]},G=new u([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V=new a(0),q=function(A,t,e,r,n){return function(A,t,e,r,n,i){var o=A.length,s=new a(r+o+5*(1+Math.floor(o/7e3))+n),f=s.subarray(r,s.length-n),B=0;if(!t||o<8)for(var d=0;d<=o;d+=65535){var g=d+65535;g<o?B=R(f,B,A.subarray(d,g)):(f[d]=i,B=R(f,B,A.subarray(d,o)))}else{for(var w=G[t-1],m=w>>>13,C=8191&w,v=(1<<e)-1,F=new c(32768),y=new c(v+1),b=Math.ceil(e/3),U=2*b,L=function(t){return(A[t]^A[t+1]<<b^A[t+2]<<U)&v},I=new u(25e3),E=new c(288),x=new c(32),H=0,N=0,S=(d=0,0),k=0,_=0;d<o;++d){var M=L(d),O=32767&d,K=y[M];if(F[O]=K,y[M]=O,k<=d){var T=o-d;if((H>7e3||S>24576)&&T>423){B=j(A,f,0,I,E,x,N,S,_,d-_,B),S=H=N=0,_=d;for(var q=0;q<286;++q)E[q]=0;for(q=0;q<30;++q)x[q]=0}var X=2,J=0,W=C,z=O-K&32767;if(T>2&&M==L(d-z))for(var Y=Math.min(m,T)-1,Z=Math.min(32767,d),$=Math.min(258,T);z<=Z&&--W&&O!=K;){if(A[d+X]==A[d+X-z]){for(var AA=0;AA<$&&A[d+AA]==A[d+AA-z];++AA);if(AA>X){if(X=AA,J=z,AA>Y)break;var tA=Math.min(z,AA-2),eA=0;for(q=0;q<tA;++q){var rA=d-z+q+32768&32767,nA=rA-F[rA]+32768&32767;nA>eA&&(eA=nA,K=rA)}}}z+=(O=K)-(K=F[O])+32768&32767}if(J){I[S++]=268435456|p[X]<<18|Q[J];var iA=31&p[X],oA=31&Q[J];N+=l[iA]+h[oA],++E[257+iA],++x[oA],k=d+X,++H}else I[S++]=A[d],++E[A[d]]}}B=j(A,f,i,I,E,x,N,S,_,d-_,B),i||(B=R(f,B,V))}return D(s,0,r+P(B)+n)}(A,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(A.length)))):12+t.mem,e,r,!n)};function X(A,t){void 0===t&&(t={});var e=function(){var A=1,t=0;return{p:function(e){for(var r=A,n=t,i=e.length,o=0;o!=i;){for(var s=Math.min(o+5552,i);o<s;++o)n+=r+=e[o];r%=65521,n%=65521}A=r,t=n},d:function(){return(A>>>8<<16|(255&t)<<8|t>>>8)+2*((255&A)<<23)}}}();e.p(A);var r=q(A,t,2,4);return function(A,t){var e=t.level,r=0==e?0:e<6?1:9==e?3:2;A[0]=120,A[1]=r<<6|(r?32-2*r:1)}(r,t),function(A,t,e){for(;e;++t)A[t]=e,e>>>=8}(r,r.length-4,e.d()),r}function J(A,t){return function(A,t,e){var r=A.length,n=!t||e,i=!e||e.i;e||(e={}),t||(t=new a(3*r));var o=function(A){var e=t.length;if(A>e){var r=new a(Math.max(2*e,A));r.set(t),t=r}},s=e.f||0,c=e.p||0,u=e.b||0,B=e.l,d=e.d,p=e.m,w=e.n,Q=8*r;do{if(!B){e.f=s=N(A,c,1);var C=N(A,c+1,3);if(c+=3,!C){var v=A[(T=P(c)+4)-4]|A[T-3]<<8,F=T+v;if(F>r){if(i)throw"unexpected EOF";break}n&&o(u+v),t.set(A.subarray(T,F),u),e.b=u+=v,e.p=c=8*F;continue}if(1==C)B=I,d=x,p=9,w=5;else{if(2!=C)throw"invalid block type";var b=N(A,c,31)+257,U=N(A,c+10,15)+4,L=b+N(A,c+5,31)+1;c+=14;for(var E=new a(L),k=new a(19),_=0;_<U;++_)k[f[_]]=N(A,c+3*_,7);c+=3*U;var M=H(k),O=(1<<M)-1;if(!i&&c+L*(M+7)>Q)break;var K=y(k,M,1);for(_=0;_<L;){var T,R=K[N(A,c,O)];if(c+=15&R,(T=R>>>4)<16)E[_++]=T;else{var j=0,G=0;for(16==T?(G=3+N(A,c,3),c+=2,j=E[_-1]):17==T?(G=3+N(A,c,7),c+=3):18==T&&(G=11+N(A,c,127),c+=7);G--;)E[_++]=j}}var V=E.subarray(0,b),q=E.subarray(b);p=H(V),w=H(q),B=y(V,p,1),d=y(q,w,1)}if(c>Q)throw"unexpected EOF"}n&&o(u+131072);for(var X=(1<<p)-1,J=(1<<w)-1,W=p+w+18;i||c+W<Q;){var z=(j=B[S(A,c)&X])>>>4;if((c+=15&j)>Q)throw"unexpected EOF";if(!j)throw"invalid length/literal";if(z<256)t[u++]=z;else{if(256==z){B=null;break}var Y=z-254;if(z>264){var Z=l[_=z-257];Y=N(A,c,(1<<Z)-1)+g[_],c+=Z}var $=d[S(A,c)&J],AA=$>>>4;if(!$)throw"invalid distance";if(c+=15&$,q=m[AA],AA>3&&(Z=h[AA],q+=S(A,c)&(1<<Z)-1,c+=Z),c>Q)throw"unexpected EOF";n&&o(u+131072);for(var tA=u+Y;u<tA;u+=4)t[u]=t[u-q],t[u+1]=t[u+1-q],t[u+2]=t[u+2-q],t[u+3]=t[u+3-q];u=tA}}e.l=B,e.p=c,e.b=u,B&&(s=1,e.m=p,e.d=d,e.n=w)}while(!s);return u==t.length?t:D(t,0,u)}((function(A){if(8!=(15&A[0])||A[0]>>>4>7||(A[0]<<8|A[1])%31)throw"invalid zlib data";if(32&A[1])throw"invalid zlib data: preset dictionaries not supported"}(A),A.subarray(2,-4)),t)}
2
2
  /** @license
3
3
  *
4
4
  * jsPDF - PDF Document creation from JavaScript
@@ -123,7 +123,7 @@ function(A){var t=function(A){var t,e,r,n,i,o,s,a,c,u;for(e=[],r=0,n=(A+=t="\0\0
123
123
  * Licensed under the MIT License.
124
124
  * http://opensource.org/licenses/mit-license
125
125
  */
126
- function(A){A.loadFile=function(A,t,e){return function(A,t,e){t=!1!==t,e="function"==typeof e?e:function(){};var r=void 0;try{r=function(A,t,e){var r=new XMLHttpRequest,n=0,i=function(A){var t=A.length,e=[],r=String.fromCharCode;for(n=0;n<t;n+=1)e.push(r(255&A.charCodeAt(n)));return e.join("")};if(r.open("GET",A,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){200===r.status?e(i(this.responseText)):e(void 0)}),r.send(null),t&&200===r.status)return i(r.responseText)}(A,t,e)}catch(A){}return r}(A,t,e)},A.loadImageFile=A.loadFile}(IA.API),function(A){function t(){return(W.html2canvas?Promise.resolve(W.html2canvas):Promise.resolve().then((function(){return me}))).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(W.DOMPurify?Promise.resolve(W.DOMPurify):import("./purify-05qYXQpp.js").then((function(A){return A.p}))).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 t=s(A);return"undefined"===t?"undefined":"string"===t||A instanceof String?"string":"number"===t||A instanceof Number?"number":"function"===t||A instanceof Function?"function":A&&A.constructor===Array?"array":A&&1===A.nodeType?"element":"object"===t?"object":"unknown"},n=function(A,t){var e=document.createElement(A);for(var r in t.className&&(e.className=t.className),t.innerHTML&&t.dompurify&&(e.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)e.style[r]=t.style[r];return e},i=function A(t){var e=Object.assign(A.convert(Promise.resolve()),JSON.parse(JSON.stringify(A.template))),r=A.convert(Promise.resolve(),e);return(r=r.setProgress(1,A,1,[A])).set(t)};(i.prototype=Object.create(Promise.prototype)).constructor=i,i.convert=function(A,t){return A.__proto__=t||i.prototype,A},i.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"}},i.prototype.from=function(A,t){return this.then((function(){switch(t=t||function(A){switch(r(A)){case"string":return"string";case"element":return"canvas"===A.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(A)){case"string":return this.then(e).then((function(t){return this.set({src:n("div",{innerHTML:A,dompurify:t})})}));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.")}}))},i.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.")}},i.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:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||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},t=function A(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;n=n.nextSibling)!0!==e&&1===n.nodeType&&"SCRIPT"===n.nodeName||r.appendChild(A(n,e));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",(function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft}),!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(A.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:A}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(n("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"}))},i.prototype.toCanvas=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then(t).then((function(A){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,A(this.prop.container,t)})).then((function(A){(this.opt.html2canvas.onrendered||function(){})(A),this.prop.canvas=A,document.body.removeChild(this.prop.overlay)}))},i.prototype.toContext2d=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then(t).then((function(A){var t=this.opt.jsPDF,e=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,n=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete n.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=e,e)for(var i=0;i<e.length;++i){var o=e[i],s=o.src.find((function(A){return"truetype"===A.format}));s&&t.addFont(s.url,o.ref.name,o.ref.style)}return n.windowHeight=n.windowHeight||0,n.windowHeight=0==n.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):n.windowHeight,t.context2d.save(!0),A(this.prop.container,n)})).then((function(A){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(A),this.prop.canvas=A,document.body.removeChild(this.prop.overlay)}))},i.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}))},i.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},i.prototype.output=function(A,t,e){return"img"===(e=e||"pdf").toLowerCase()||"image"===e.toLowerCase()?this.outputImg(A,t):this.outputPdf(A,t)},i.prototype.outputPdf=function(A,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(A,t)}))},i.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.'}}))},i.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)}))},i.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},i.prototype.set=function(A){if("object"!==r(A))return this;var t=Object.keys(A||{}).map((function(t){if(t in i.template.prop)return function(){this.prop[t]=A[t]};switch(t){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[t]=A[t]}}}),this);return this.then((function(){return this.thenList(t)}))},i.prototype.get=function(A,t){return this.then((function(){var e=A in i.template.prop?this.prop[A]:this.opt[A];return t?t(e):e}))},i.prototype.setMargin=function(A){return this.then((function(){switch(r(A)){case"number":A=[A,A,A,A];case"array":if(2===A.length&&(A=[A[0],A[1],A[0],A[1]]),4===A.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=A})).then(this.setPageSize)},i.prototype.setPageSize=function(A){function t(A,t){return Math.floor(A*t/72*96)}return this.then((function(){(A=A||IA.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:t(A.inner.width,A.k),height:t(A.inner.height,A.k)},A.inner.ratio=A.inner.height/A.inner.width),this.prop.pageSize=A}))},i.prototype.setProgress=function(A,t,e,r){return null!=A&&(this.progress.val=A),null!=t&&(this.progress.state=t),null!=e&&(this.progress.n=e),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},i.prototype.updateProgress=function(A,t,e,r){return this.setProgress(A?this.progress.val+A:null,t||null,e?this.progress.n+e:null,r?this.progress.stack.concat(r):null)},i.prototype.then=function(A,t){var e=this;return this.thenCore(A,t,(function(A,t){return e.updateProgress(null,null,1,[A]),Promise.prototype.then.call(this,(function(t){return e.updateProgress(null,A),t})).then(A,t).then((function(A){return e.updateProgress(1),A}))}))},i.prototype.thenCore=function(A,t,e){e=e||Promise.prototype.then,A&&(A=A.bind(this)),t&&(t=t.bind(this));var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:i.convert(Object.assign({},this),Promise.prototype),n=e.call(r,A,t);return i.convert(n,this.__proto__)},i.prototype.thenExternal=function(A,t){return Promise.prototype.then.call(this,A,t)},i.prototype.thenList=function(A){var t=this;return A.forEach((function(A){t=t.thenCore(A)})),t},i.prototype.catch=function(A){A&&(A=A.bind(this));var t=Promise.prototype.catch.call(this,A);return i.convert(t,this)},i.prototype.catchExternal=function(A){return Promise.prototype.catch.call(this,A)},i.prototype.error=function(A){return this.then((function(){throw new Error(A)}))},i.prototype.using=i.prototype.set,i.prototype.saveAs=i.prototype.save,i.prototype.export=i.prototype.output,i.prototype.run=i.prototype.then,IA.getPageSize=function(A,t,e){if("object"===s(A)){var r=A;A=r.orientation,t=r.unit||t,e=r.format||e}t=t||"mm",e=e||"a4",A=(""+(A||"P")).toLowerCase();var n,i=(""+e).toLowerCase(),o={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(t){case"pt":n=1;break;case"mm":n=72/25.4;break;case"cm":n=72/2.54;break;case"in":n=72;break;case"px":n=.75;break;case"pc":case"em":n=12;break;case"ex":n=6;break;default:throw"Invalid unit: "+t}var a,c=0,u=0;if(o.hasOwnProperty(i))c=o[i][1]/n,u=o[i][0]/n;else try{c=e[1],u=e[0]}catch(A){throw new Error("Invalid format: "+e)}if("p"===A||"portrait"===A)A="p",u>c&&(a=u,u=c,c=a);else{if("l"!==A&&"landscape"!==A)throw"Invalid orientation: "+A;A="l",c>u&&(a=u,u=c,c=a)}return{width:u,height:c,unit:t,k:n,orientation:A}},A.html=function(A,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(yt):null;var e=new i(t);return t.worker?e:e.from(A).doCallback()}}(IA.API),IA.API.addJS=function(A){return Pt=A,this.internal.events.subscribe("postPutResources",(function(){Nt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Nt+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),St=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Pt+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Nt&&void 0!==St&&this.internal.out("/Names <</JavaScript "+Nt+" 0 R>>")})),this
126
+ function(A){A.loadFile=function(A,t,e){return function(A,t,e){t=!1!==t,e="function"==typeof e?e:function(){};var r=void 0;try{r=function(A,t,e){var r=new XMLHttpRequest,n=0,i=function(A){var t=A.length,e=[],r=String.fromCharCode;for(n=0;n<t;n+=1)e.push(r(255&A.charCodeAt(n)));return e.join("")};if(r.open("GET",A,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){200===r.status?e(i(this.responseText)):e(void 0)}),r.send(null),t&&200===r.status)return i(r.responseText)}(A,t,e)}catch(A){}return r}(A,t,e)},A.loadImageFile=A.loadFile}(IA.API),function(A){function t(){return(W.html2canvas?Promise.resolve(W.html2canvas):Promise.resolve().then((function(){return me}))).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(W.DOMPurify?Promise.resolve(W.DOMPurify):import("./purify-GC91XaSq.js").then((function(A){return A.p}))).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 t=s(A);return"undefined"===t?"undefined":"string"===t||A instanceof String?"string":"number"===t||A instanceof Number?"number":"function"===t||A instanceof Function?"function":A&&A.constructor===Array?"array":A&&1===A.nodeType?"element":"object"===t?"object":"unknown"},n=function(A,t){var e=document.createElement(A);for(var r in t.className&&(e.className=t.className),t.innerHTML&&t.dompurify&&(e.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)e.style[r]=t.style[r];return e},i=function A(t){var e=Object.assign(A.convert(Promise.resolve()),JSON.parse(JSON.stringify(A.template))),r=A.convert(Promise.resolve(),e);return(r=r.setProgress(1,A,1,[A])).set(t)};(i.prototype=Object.create(Promise.prototype)).constructor=i,i.convert=function(A,t){return A.__proto__=t||i.prototype,A},i.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"}},i.prototype.from=function(A,t){return this.then((function(){switch(t=t||function(A){switch(r(A)){case"string":return"string";case"element":return"canvas"===A.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(A)){case"string":return this.then(e).then((function(t){return this.set({src:n("div",{innerHTML:A,dompurify:t})})}));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.")}}))},i.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.")}},i.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:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||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},t=function A(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;n=n.nextSibling)!0!==e&&1===n.nodeType&&"SCRIPT"===n.nodeName||r.appendChild(A(n,e));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",(function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft}),!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(A.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:A}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(n("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"}))},i.prototype.toCanvas=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then(t).then((function(A){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,A(this.prop.container,t)})).then((function(A){(this.opt.html2canvas.onrendered||function(){})(A),this.prop.canvas=A,document.body.removeChild(this.prop.overlay)}))},i.prototype.toContext2d=function(){var A=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(A).then(t).then((function(A){var t=this.opt.jsPDF,e=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,n=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete n.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=e,e)for(var i=0;i<e.length;++i){var o=e[i],s=o.src.find((function(A){return"truetype"===A.format}));s&&t.addFont(s.url,o.ref.name,o.ref.style)}return n.windowHeight=n.windowHeight||0,n.windowHeight=0==n.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):n.windowHeight,t.context2d.save(!0),A(this.prop.container,n)})).then((function(A){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(A),this.prop.canvas=A,document.body.removeChild(this.prop.overlay)}))},i.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}))},i.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},i.prototype.output=function(A,t,e){return"img"===(e=e||"pdf").toLowerCase()||"image"===e.toLowerCase()?this.outputImg(A,t):this.outputPdf(A,t)},i.prototype.outputPdf=function(A,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(A,t)}))},i.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.'}}))},i.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)}))},i.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},i.prototype.set=function(A){if("object"!==r(A))return this;var t=Object.keys(A||{}).map((function(t){if(t in i.template.prop)return function(){this.prop[t]=A[t]};switch(t){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[t]=A[t]}}}),this);return this.then((function(){return this.thenList(t)}))},i.prototype.get=function(A,t){return this.then((function(){var e=A in i.template.prop?this.prop[A]:this.opt[A];return t?t(e):e}))},i.prototype.setMargin=function(A){return this.then((function(){switch(r(A)){case"number":A=[A,A,A,A];case"array":if(2===A.length&&(A=[A[0],A[1],A[0],A[1]]),4===A.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=A})).then(this.setPageSize)},i.prototype.setPageSize=function(A){function t(A,t){return Math.floor(A*t/72*96)}return this.then((function(){(A=A||IA.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:t(A.inner.width,A.k),height:t(A.inner.height,A.k)},A.inner.ratio=A.inner.height/A.inner.width),this.prop.pageSize=A}))},i.prototype.setProgress=function(A,t,e,r){return null!=A&&(this.progress.val=A),null!=t&&(this.progress.state=t),null!=e&&(this.progress.n=e),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},i.prototype.updateProgress=function(A,t,e,r){return this.setProgress(A?this.progress.val+A:null,t||null,e?this.progress.n+e:null,r?this.progress.stack.concat(r):null)},i.prototype.then=function(A,t){var e=this;return this.thenCore(A,t,(function(A,t){return e.updateProgress(null,null,1,[A]),Promise.prototype.then.call(this,(function(t){return e.updateProgress(null,A),t})).then(A,t).then((function(A){return e.updateProgress(1),A}))}))},i.prototype.thenCore=function(A,t,e){e=e||Promise.prototype.then,A&&(A=A.bind(this)),t&&(t=t.bind(this));var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:i.convert(Object.assign({},this),Promise.prototype),n=e.call(r,A,t);return i.convert(n,this.__proto__)},i.prototype.thenExternal=function(A,t){return Promise.prototype.then.call(this,A,t)},i.prototype.thenList=function(A){var t=this;return A.forEach((function(A){t=t.thenCore(A)})),t},i.prototype.catch=function(A){A&&(A=A.bind(this));var t=Promise.prototype.catch.call(this,A);return i.convert(t,this)},i.prototype.catchExternal=function(A){return Promise.prototype.catch.call(this,A)},i.prototype.error=function(A){return this.then((function(){throw new Error(A)}))},i.prototype.using=i.prototype.set,i.prototype.saveAs=i.prototype.save,i.prototype.export=i.prototype.output,i.prototype.run=i.prototype.then,IA.getPageSize=function(A,t,e){if("object"===s(A)){var r=A;A=r.orientation,t=r.unit||t,e=r.format||e}t=t||"mm",e=e||"a4",A=(""+(A||"P")).toLowerCase();var n,i=(""+e).toLowerCase(),o={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(t){case"pt":n=1;break;case"mm":n=72/25.4;break;case"cm":n=72/2.54;break;case"in":n=72;break;case"px":n=.75;break;case"pc":case"em":n=12;break;case"ex":n=6;break;default:throw"Invalid unit: "+t}var a,c=0,u=0;if(o.hasOwnProperty(i))c=o[i][1]/n,u=o[i][0]/n;else try{c=e[1],u=e[0]}catch(A){throw new Error("Invalid format: "+e)}if("p"===A||"portrait"===A)A="p",u>c&&(a=u,u=c,c=a);else{if("l"!==A&&"landscape"!==A)throw"Invalid orientation: "+A;A="l",c>u&&(a=u,u=c,c=a)}return{width:u,height:c,unit:t,k:n,orientation:A}},A.html=function(A,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(yt):null;var e=new i(t);return t.worker?e:e.from(A).doCallback()}}(IA.API),IA.API.addJS=function(A){return Pt=A,this.internal.events.subscribe("postPutResources",(function(){Nt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Nt+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),St=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Pt+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Nt&&void 0!==St&&this.internal.out("/Names <</JavaScript "+Nt+" 0 R>>")})),this
127
127
  /**
128
128
  * @license
129
129
  * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
@@ -284,7 +284,7 @@ function(A){var t=function(A){for(var t=A.length,e=new Uint8Array(t),r=0;r<t;r++
284
284
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
285
285
  * ====================================================================
286
286
  */
287
- function(A){function t(){return(W.canvg?Promise.resolve(W.canvg):import("./index.es-NoR6QQLP.js")).catch((function(A){return Promise.reject(new Error("Could not load canvg: "+A))})).then((function(A){return A.default?A.default:A}))}IA.API.addSvgAsImage=function(A,e,r,n,i,o,s,a){if(isNaN(e)||isNaN(r))throw Y.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw Y.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=n,c.height=i;var u=c.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,c.width,c.height);var l={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return t().then((function(t){return t.fromString(u,A,l)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(A){return A.render(l)})).then((function(){h.addImage(c.toDataURL("image/jpeg",1),e,r,n,i,s,a)}))}}(),IA.API.putTotalPages=function(A){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(A,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(A,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var n=0;n<this.internal.pages[r].length;n++)this.internal.pages[r][n]=this.internal.pages[r][n].replace(t,e);return this},IA.API.viewerPreferences=function(A,t){var e;A=A||{},t=t||!1;var r,n,i,o={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(o),c=[],u=0,l=0,h=0;function f(A,t){var e,r=!1;for(e=0;e<A.length;e+=1)A[e]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,"reset"===A||!0===t){var B=a.length;for(h=0;h<B;h+=1)e[a[h]].value=e[a[h]].defaultValue,e[a[h]].explicitSet=!1}if("object"===s(A))for(n in A)if(i=A[n],f(a,n)&&void 0!==i){if("boolean"===e[n].type&&"boolean"==typeof i)e[n].value=i;else if("name"===e[n].type&&f(e[n].valueSet,i))e[n].value=i;else if("integer"===e[n].type&&Number.isInteger(i))e[n].value=i;else if("array"===e[n].type){for(u=0;u<i.length;u+=1)if(r=!0,1===i[u].length&&"number"==typeof i[u][0])c.push(String(i[u]-1));else if(i[u].length>1){for(l=0;l<i[u].length;l+=1)"number"!=typeof i[u][l]&&(r=!1);!0===r&&c.push([i[u][0]-1,i[u][1]-1].join(" "))}e[n].value="["+c.join(" ")+"]"}else e[n].value=e[n].defaultValue;e[n].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var A,t=[];for(A in e)!0===e[A].explicitSet&&("name"===e[A].type?t.push("/"+A+" /"+e[A].value):t.push("/"+A+" "+e[A].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this
287
+ function(A){function t(){return(W.canvg?Promise.resolve(W.canvg):import("./index.es-dEKcVerc.js")).catch((function(A){return Promise.reject(new Error("Could not load canvg: "+A))})).then((function(A){return A.default?A.default:A}))}IA.API.addSvgAsImage=function(A,e,r,n,i,o,s,a){if(isNaN(e)||isNaN(r))throw Y.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw Y.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=n,c.height=i;var u=c.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,c.width,c.height);var l={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return t().then((function(t){return t.fromString(u,A,l)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(A){return A.render(l)})).then((function(){h.addImage(c.toDataURL("image/jpeg",1),e,r,n,i,s,a)}))}}(),IA.API.putTotalPages=function(A){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(A,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(A,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var n=0;n<this.internal.pages[r].length;n++)this.internal.pages[r][n]=this.internal.pages[r][n].replace(t,e);return this},IA.API.viewerPreferences=function(A,t){var e;A=A||{},t=t||!1;var r,n,i,o={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(o),c=[],u=0,l=0,h=0;function f(A,t){var e,r=!1;for(e=0;e<A.length;e+=1)A[e]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,"reset"===A||!0===t){var B=a.length;for(h=0;h<B;h+=1)e[a[h]].value=e[a[h]].defaultValue,e[a[h]].explicitSet=!1}if("object"===s(A))for(n in A)if(i=A[n],f(a,n)&&void 0!==i){if("boolean"===e[n].type&&"boolean"==typeof i)e[n].value=i;else if("name"===e[n].type&&f(e[n].valueSet,i))e[n].value=i;else if("integer"===e[n].type&&Number.isInteger(i))e[n].value=i;else if("array"===e[n].type){for(u=0;u<i.length;u+=1)if(r=!0,1===i[u].length&&"number"==typeof i[u][0])c.push(String(i[u]-1));else if(i[u].length>1){for(l=0;l<i[u].length;l+=1)"number"!=typeof i[u][l]&&(r=!1);!0===r&&c.push([i[u][0]-1,i[u][1]-1].join(" "))}e[n].value="["+c.join(" ")+"]"}else e[n].value=e[n].defaultValue;e[n].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var A,t=[];for(A in e)!0===e[A].explicitSet&&("name"===e[A].type?t.push("/"+A+" /"+e[A].value):t.push("/"+A+" "+e[A].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this
288
288
  /** ====================================================================
289
289
  * @license
290
290
  * jsPDF XMP metadata plugin