rebill-web-components-sdk 1.8.5 → 1.8.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.
Files changed (54) hide show
  1. package/dist/cjs/apm-checkout_16.cjs.entry.js +1 -1
  2. package/dist/cjs/{get-payment-method-display-name-oo6lOpoC.js → get-payment-method-display-name-C6mdzTEs.js} +86 -86
  3. package/dist/cjs/{get-payment-method-display-name-oo6lOpoC.js.map → get-payment-method-display-name-C6mdzTEs.js.map} +1 -1
  4. package/dist/cjs/{index-N1yCtvXq.js → index-DLv8bgA4.js} +3 -3
  5. package/dist/cjs/{index-N1yCtvXq.js.map → index-DLv8bgA4.js.map} +1 -1
  6. package/dist/cjs/{jspdf.es.min-BW0eLZgN.js → jspdf.es.min-CV0yEJ9o.js} +4 -4
  7. package/dist/cjs/{jspdf.es.min-BW0eLZgN.js.map → jspdf.es.min-CV0yEJ9o.js.map} +1 -1
  8. package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
  9. package/dist/cjs/renewal-success-page_2.cjs.entry.js +1 -1
  10. package/dist/collection/utils/pdf-generator.js +1 -1
  11. package/dist/collection/utils/pdf-generator.js.map +1 -1
  12. package/dist/collection/utils/receipt-Cardtemplate.js +81 -81
  13. package/dist/collection/utils/receipt-Cardtemplate.js.map +1 -1
  14. package/dist/components/apm-checkout.js +1 -1
  15. package/dist/components/{p-LFMU1iYh.js → p-1tbGUoeo.js} +4 -4
  16. package/dist/components/{p-LFMU1iYh.js.map → p-1tbGUoeo.js.map} +1 -1
  17. package/dist/components/{p-CMnoxL8G.js → p-BnidisYn.js} +3 -3
  18. package/dist/components/{p-CMnoxL8G.js.map → p-BnidisYn.js.map} +1 -1
  19. package/dist/components/{p-fwl9Z4PT.js → p-C1THyrZh.js} +3 -3
  20. package/dist/components/{p-fwl9Z4PT.js.map → p-C1THyrZh.js.map} +1 -1
  21. package/dist/components/{p-BBEMTBwW.js → p-C69QonMT.js} +3 -3
  22. package/dist/components/{p-BBEMTBwW.js.map → p-C69QonMT.js.map} +1 -1
  23. package/dist/components/{p-ByJrcRsN.js → p-DZI13wtJ.js} +3 -3
  24. package/dist/components/{p-ByJrcRsN.js.map → p-DZI13wtJ.js.map} +1 -1
  25. package/dist/components/{p-tWMR1_gF.js → p-fStqPH4y.js} +86 -86
  26. package/dist/components/p-fStqPH4y.js.map +1 -0
  27. package/dist/components/rebill-checkout.js +2 -2
  28. package/dist/components/rebill-renewal.js +2 -2
  29. package/dist/components/renewal-success-page.js +1 -1
  30. package/dist/components/success-page.js +1 -1
  31. package/dist/esm/apm-checkout_16.entry.js +1 -1
  32. package/dist/esm/{get-payment-method-display-name-Dj7gQJ-R.js → get-payment-method-display-name-B59DbHr6.js} +86 -86
  33. package/dist/esm/{get-payment-method-display-name-Dj7gQJ-R.js.map → get-payment-method-display-name-B59DbHr6.js.map} +1 -1
  34. package/dist/esm/{index-wfvNOgYw.js → index-DtxAsmPA.js} +3 -3
  35. package/dist/esm/{index-wfvNOgYw.js.map → index-DtxAsmPA.js.map} +1 -1
  36. package/dist/esm/{jspdf.es.min-ssPVxe3c.js → jspdf.es.min-APwmCmmv.js} +4 -4
  37. package/dist/esm/{jspdf.es.min-ssPVxe3c.js.map → jspdf.es.min-APwmCmmv.js.map} +1 -1
  38. package/dist/esm/otp-component_7.entry.js +1 -1
  39. package/dist/esm/renewal-success-page_2.entry.js +1 -1
  40. package/dist/rebill-web-components-sdk/{p-6762520a.entry.js → p-07de4442.entry.js} +2 -2
  41. package/dist/rebill-web-components-sdk/{p-DeorBmj5.js → p-2D2ZgtY0.js} +2 -2
  42. package/dist/rebill-web-components-sdk/{p-DeorBmj5.js.map → p-2D2ZgtY0.js.map} +1 -1
  43. package/dist/rebill-web-components-sdk/{p-075927af.entry.js → p-4e35c3c8.entry.js} +2 -2
  44. package/dist/rebill-web-components-sdk/{p-BldcNI96.js → p-D5uLuMja.js} +9 -9
  45. package/dist/rebill-web-components-sdk/{p-BldcNI96.js.map → p-D5uLuMja.js.map} +1 -1
  46. package/dist/rebill-web-components-sdk/{p-6b756131.entry.js → p-ce0793c8.entry.js} +2 -2
  47. package/dist/rebill-web-components-sdk/{p-BWqURJ0r.js → p-ymT8AXMV.js} +5 -5
  48. package/dist/rebill-web-components-sdk/{p-BWqURJ0r.js.map → p-ymT8AXMV.js.map} +1 -1
  49. package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/components/p-tWMR1_gF.js.map +0 -1
  52. /package/dist/rebill-web-components-sdk/{p-6762520a.entry.js.map → p-07de4442.entry.js.map} +0 -0
  53. /package/dist/rebill-web-components-sdk/{p-075927af.entry.js.map → p-4e35c3c8.entry.js.map} +0 -0
  54. /package/dist/rebill-web-components-sdk/{p-6b756131.entry.js.map → p-ce0793c8.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=Uint8Array,e=Uint16Array,n=Int32Array;var i=new r([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]);var s=new r([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]);var o=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);var a=function(t,r){var i=new e(31);for(var s=0;s<31;++s){i[s]=r+=1<<t[s-1]}var o=new n(i[30]);for(var s=1;s<30;++s){for(var a=i[s];a<i[s+1];++a){o[a]=a-i[s]<<5|s}}return{b:i,r:o}};var u=a(i,2),f=u.b,c=u.r;f[28]=258,c[258]=28;var h=a(s,0),l=h.r;var v=new e(32768);for(var d=0;d<32768;++d){var w=(d&43690)>>1|(d&21845)<<1;w=(w&52428)>>2|(w&13107)<<2;w=(w&61680)>>4|(w&3855)<<4;v[d]=((w&65280)>>8|(w&255)<<8)>>1}var m=function(t,r,n){var i=t.length;var s=0;var o=new e(r);for(;s<i;++s){if(t[s])++o[t[s]-1]}var a=new e(r);for(s=1;s<r;++s){a[s]=a[s-1]+o[s-1]<<1}var u;if(n){u=new e(1<<r);var f=15-r;for(s=0;s<i;++s){if(t[s]){var c=s<<4|t[s];var h=r-t[s];var l=a[t[s]-1]++<<h;for(var d=l|(1<<h)-1;l<=d;++l){u[v[l]>>f]=c}}}}else{u=new e(i);for(s=0;s<i;++s){if(t[s]){u[s]=v[a[t[s]-1]++]>>15-t[s]}}}return u};var b=new r(288);for(var d=0;d<144;++d)b[d]=8;for(var d=144;d<256;++d)b[d]=9;for(var d=256;d<280;++d)b[d]=7;for(var d=280;d<288;++d)b[d]=8;var p=new r(32);for(var d=0;d<32;++d)p[d]=5;var N=m(b,9,0);var L=m(p,5,0);var A=function(t){return(t+7)/8|0};var g=function(t,e,n){if(n==null||n>t.length)n=t.length;return new r(t.subarray(e,n))};var y=function(t,r,e){e<<=r&7;var n=r/8|0;t[n]|=e;t[n+1]|=e>>8};var k=function(t,r,e){e<<=r&7;var n=r/8|0;t[n]|=e;t[n+1]|=e>>8;t[n+2]|=e>>16};var S=function(t,n){var i=[];for(var s=0;s<t.length;++s){if(t[s])i.push({s,f:t[s]})}var o=i.length;var a=i.slice();if(!o)return{t:I,l:0};if(o==1){var u=new r(i[0].s+1);u[i[0].s]=1;return{t:u,l:1}}i.sort((function(t,r){return t.f-r.f}));i.push({s:-1,f:25001});var f=i[0],c=i[1],h=0,l=1,v=2;i[0]={s:-1,f:f.f+c.f,l:f,r:c};while(l!=o-1){f=i[i[h].f<i[v].f?h++:v++];c=i[h!=l&&i[h].f<i[v].f?h++:v++];i[l++]={s:-1,f:f.f+c.f,l:f,r:c}}var d=a[0].s;for(var s=1;s<o;++s){if(a[s].s>d)d=a[s].s}var w=new e(d+1);var m=x(i[l-1],w,0);if(m>n){var s=0,b=0;var p=m-n,N=1<<p;a.sort((function(t,r){return w[r.s]-w[t.s]||t.f-r.f}));for(;s<o;++s){var L=a[s].s;if(w[L]>n){b+=N-(1<<m-w[L]);w[L]=n}else break}b>>=p;while(b>0){var A=a[s].s;if(w[A]<n)b-=1<<n-w[A]++-1;else++s}for(;s>=0&&b;--s){var g=a[s].s;if(w[g]==n){--w[g];++b}}m=n}return{t:new r(w),l:m}};var x=function(t,r,e){return t.s==-1?Math.max(x(t.l,r,e+1),x(t.r,r,e+1)):r[t.s]=e};var q=function(t){var r=t.length;while(r&&!t[--r]);var n=new e(++r);var i=0,s=t[0],o=1;var a=function(t){n[i++]=t};for(var u=1;u<=r;++u){if(t[u]==s&&u!=r)++o;else{if(!s&&o>2){for(;o>138;o-=138)a(32754);if(o>2){a(o>10?o-11<<5|28690:o-3<<5|12305);o=0}}else if(o>3){a(s),--o;for(;o>6;o-=6)a(8304);if(o>2)a(o-3<<5|8208),o=0}while(o--)a(s);o=1;s=t[u]}}return{c:n.subarray(0,i),n:r}};var E=function(t,r){var e=0;for(var n=0;n<r.length;++n)e+=t[n]*r[n];return e};var M=function(t,r,e){var n=e.length;var i=A(r+2);t[i]=n&255;t[i+1]=n>>8;t[i+2]=t[i]^255;t[i+3]=t[i+1]^255;for(var s=0;s<n;++s)t[i+s+4]=e[s];return(i+4+n)*8};var j=function(t,r,n,a,u,f,c,h,l,v,d){y(r,d++,n);++u[256];var w=S(u,15),A=w.t,g=w.l;var x=S(f,15),j=x.t,R=x.l;var I=q(A),O=I.c,B=I.n;var P=q(j),F=P.c,T=P.n;var C=new e(19);for(var D=0;D<O.length;++D)++C[O[D]&31];for(var D=0;D<F.length;++D)++C[F[D]&31];var z=S(C,7),U=z.t,_=z.l;var V=19;for(;V>4&&!U[o[V-1]];--V);var W=v+5<<3;var H=E(u,b)+E(f,p)+c;var G=E(u,A)+E(f,j)+c+14+3*V+E(C,U)+2*C[16]+3*C[17]+7*C[18];if(l>=0&&W<=H&&W<=G)return M(r,d,t.subarray(l,l+v));var J,Z,K,Y;y(r,d,1+(G<H)),d+=2;if(G<H){J=m(A,g,0),Z=A,K=m(j,R,0),Y=j;var $=m(U,_,0);y(r,d,B-257);y(r,d+5,T-1);y(r,d+10,V-4);d+=14;for(var D=0;D<V;++D)y(r,d+3*D,U[o[D]]);d+=3*V;var X=[O,F];for(var Q=0;Q<2;++Q){var tt=X[Q];for(var D=0;D<tt.length;++D){var rt=tt[D]&31;y(r,d,$[rt]),d+=U[rt];if(rt>15)y(r,d,tt[D]>>5&127),d+=tt[D]>>12}}}else{J=N,Z=b,K=L,Y=p}for(var D=0;D<h;++D){var et=a[D];if(et>255){var rt=et>>18&31;k(r,d,J[rt+257]),d+=Z[rt+257];if(rt>7)y(r,d,et>>23&31),d+=i[rt];var nt=et&31;k(r,d,K[nt]),d+=Y[nt];if(nt>3)k(r,d,et>>5&8191),d+=s[nt]}else{k(r,d,J[et]),d+=Z[et]}}k(r,d,J[256]);return d+Z[256]};var R=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]);var I=new r(0);var O=function(t,o,a,u,f,h){var v=h.z||t.length;var d=new r(u+v+5*(1+Math.ceil(v/7e3))+f);var w=d.subarray(u,d.length-f);var m=h.l;var b=(h.r||0)&7;if(o){if(b)w[0]=h.r>>3;var p=R[o-1];var N=p>>13,L=p&8191;var y=(1<<a)-1;var k=h.p||new e(32768),S=h.h||new e(y+1);var x=Math.ceil(a/3),q=2*x;var E=function(r){return(t[r]^t[r+1]<<x^t[r+2]<<q)&y};var I=new n(25e3);var O=new e(288),B=new e(32);var P=0,F=0,T=h.i||0,C=0,D=h.w||0,z=0;for(;T+2<v;++T){var U=E(T);var _=T&32767,V=S[U];k[_]=V;S[U]=_;if(D<=T){var W=v-T;if((P>7e3||C>24576)&&(W>423||!m)){b=j(t,w,0,I,O,B,F,C,z,T-z,b);C=P=F=0,z=T;for(var H=0;H<286;++H)O[H]=0;for(var H=0;H<30;++H)B[H]=0}var G=2,J=0,Z=L,K=_-V&32767;if(W>2&&U==E(T-K)){var Y=Math.min(N,W)-1;var $=Math.min(32767,T);var X=Math.min(258,W);while(K<=$&&--Z&&_!=V){if(t[T+G]==t[T+G-K]){var Q=0;for(;Q<X&&t[T+Q]==t[T+Q-K];++Q);if(Q>G){G=Q,J=K;if(Q>Y)break;var tt=Math.min(K,Q-2);var rt=0;for(var H=0;H<tt;++H){var et=T-K+H&32767;var nt=k[et];var it=et-nt&32767;if(it>rt)rt=it,V=et}}}_=V,V=k[_];K+=_-V&32767}}if(J){I[C++]=268435456|c[G]<<18|l[J];var st=c[G]&31,ot=l[J]&31;F+=i[st]+s[ot];++O[257+st];++B[ot];D=T+G;++P}else{I[C++]=t[T];++O[t[T]]}}}for(T=Math.max(T,D);T<v;++T){I[C++]=t[T];++O[t[T]]}b=j(t,w,m,I,O,B,F,C,z,T-z,b);if(!m){h.r=b&7|w[b/8|0]<<3;b-=7;h.h=S,h.p=k,h.i=T,h.w=D}}else{for(var T=h.w||0;T<v+m;T+=65535){var at=T+65535;if(at>=v){w[b/8|0]=m;at=v}b=M(w,b+1,t.subarray(T,at))}h.i=v}return g(d,0,u+A(b)+f)};var B=function(){var t=1,r=0;return{p:function(e){var n=t,i=r;var s=e.length|0;for(var o=0;o!=s;){var a=Math.min(o+2655,s);for(;o<a;++o)i+=n+=e[o];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}t=n,r=i},d:function(){t%=65521,r%=65521;return(t&255)<<24|(t&65280)<<8|(r&255)<<8|r>>8}}};var P=function(t,e,n,i,s){if(!s){s={l:1};if(e.dictionary){var o=e.dictionary.subarray(-32768);var a=new r(o.length+t.length);a.set(o);a.set(t,o.length);t=a;s.w=o.length}}return O(t,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,i,s)};var F=function(t,r,e){for(;e;++r)t[r]=e,e>>>=8};var T=function(t,r){var e=r.level,n=e==0?0:e<6?1:e==9?3:2;t[0]=120,t[1]=n<<6|(r.dictionary&&32);t[1]|=31-(t[0]<<8|t[1])%31;if(r.dictionary){var i=B();i.p(r.dictionary);F(t,2,i.d())}};function C(t,r){if(!r)r={};var e=B();e.p(t);var n=P(t,r,r.dictionary?6:2,4);return T(n,r),F(n,n.length-4,e.d()),n}var D=typeof TextDecoder!="undefined"&&new TextDecoder;try{D.decode(I,{stream:true})}catch(t){}function z(t){if(Array.isArray(t))return t}function U(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,s,o,a=[],u=true,f=false;try{if(s=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=false}else for(;!(u=(n=s.call(e)).done)&&(a.push(n.value),a.length!==r);u=true);}catch(t){f=true,i=t}finally{try{if(!u&&null!=e["return"]&&(o=e["return"](),Object(o)!==o))return}finally{if(f)throw i}}return a}}function _(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function V(t,r){if(t){if("string"==typeof t)return _(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_(t,r):void 0}}function W(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(t,r){return z(t)||U(t,r)||V(t,r)||W()}var G=Object.freeze({__proto__:null,default:H});function J(t,r="utf8"){const e=new TextDecoder(r);return e.decode(t)}const Z=new TextEncoder;function K(t){return Z.encode(t)}const Y=1024*8;const $=(()=>{const t=new Uint8Array(4);const r=new Uint32Array(t.buffer);return!((r[0]=1)&t[0])})();const X={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 Q{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=Y,r={}){let e=false;if(typeof t==="number"){t=new ArrayBuffer(t)}else{e=true;this.lastWrittenByte=t.byteLength}const n=r.offset?r.offset>>>0:0;const i=t.byteLength-n;let s=n;if(ArrayBuffer.isView(t)||t instanceof Q){if(t.byteLength!==t.buffer.byteLength){s=t.byteOffset+n}t=t.buffer}if(e){this.lastWrittenByte=i}else{this.lastWrittenByte=0}this.buffer=t;this.length=i;this.byteLength=i;this.byteOffset=s;this.offset=0;this.littleEndian=true;this._data=new DataView(this.buffer,s,i);this._mark=0;this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){this.littleEndian=true;return this}isBigEndian(){return!this.littleEndian}setBigEndian(){this.littleEndian=false;return this}skip(t=1){this.offset+=t;return this}back(t=1){this.offset-=t;return this}seek(t){this.offset=t;return this}mark(){this._mark=this.offset;return this}reset(){this.offset=this._mark;return this}pushMark(){this._marks.push(this.offset);return this}popMark(){const t=this._marks.pop();if(t===undefined){throw new Error("Mark stack empty")}this.seek(t);return this}rewind(){this.offset=0;return this}ensureAvailable(t=1){if(!this.available(t)){const r=this.offset+t;const e=r*2;const n=new Uint8Array(e);n.set(new Uint8Array(this.buffer));this.buffer=n.buffer;this.length=e;this.byteLength=e;this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,r){const e=X[r].BYTES_PER_ELEMENT*t;const n=this.byteOffset+this.offset;const i=this.buffer.slice(n,n+e);if(this.littleEndian===$&&r!=="uint8"&&r!=="int8"){const t=new Uint8Array(this.buffer.slice(n,n+e));t.reverse();const i=new X[r](t.buffer);this.offset+=e;i.reverse();return i}const s=new X[r](i);this.offset+=e;return s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);this.offset+=2;return t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);this.offset+=2;return t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);this.offset+=4;return t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);this.offset+=4;return t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);this.offset+=4;return t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);this.offset+=8;return t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);this.offset+=8;return t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);this.offset+=8;return t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let e=0;e<t;e++){r+=this.readChar()}return r}readUtf8(t=1){return J(this.readBytes(t))}decodeText(t=1,r="utf8"){return J(this.readBytes(t),r)}writeBoolean(t){this.writeUint8(t?255:0);return this}writeInt8(t){this.ensureAvailable(1);this._data.setInt8(this.offset++,t);this._updateLastWrittenByte();return this}writeUint8(t){this.ensureAvailable(1);this._data.setUint8(this.offset++,t);this._updateLastWrittenByte();return this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++){this._data.setUint8(this.offset++,t[r])}this._updateLastWrittenByte();return this}writeInt16(t){this.ensureAvailable(2);this._data.setInt16(this.offset,t,this.littleEndian);this.offset+=2;this._updateLastWrittenByte();return this}writeUint16(t){this.ensureAvailable(2);this._data.setUint16(this.offset,t,this.littleEndian);this.offset+=2;this._updateLastWrittenByte();return this}writeInt32(t){this.ensureAvailable(4);this._data.setInt32(this.offset,t,this.littleEndian);this.offset+=4;this._updateLastWrittenByte();return this}writeUint32(t){this.ensureAvailable(4);this._data.setUint32(this.offset,t,this.littleEndian);this.offset+=4;this._updateLastWrittenByte();return this}writeFloat32(t){this.ensureAvailable(4);this._data.setFloat32(this.offset,t,this.littleEndian);this.offset+=4;this._updateLastWrittenByte();return this}writeFloat64(t){this.ensureAvailable(8);this._data.setFloat64(this.offset,t,this.littleEndian);this.offset+=8;this._updateLastWrittenByte();return this}writeBigInt64(t){this.ensureAvailable(8);this._data.setBigInt64(this.offset,t,this.littleEndian);this.offset+=8;this._updateLastWrittenByte();return this}writeBigUint64(t){this.ensureAvailable(8);this._data.setBigUint64(this.offset,t,this.littleEndian);this.offset+=8;this._updateLastWrittenByte();return this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++){this.writeUint8(t.charCodeAt(r))}return this}writeUtf8(t){return this.writeBytes(K(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){if(this.offset>this.lastWrittenByte){this.lastWrittenByte=this.offset}}}function tt(t){let r=t.length;while(--r>=0){t[r]=0}}const rt=3;const et=258;const nt=29;const it=256;const st=it+1+nt;const ot=30;const at=512;const ut=new Array((st+2)*2);tt(ut);const ft=new Array(ot*2);tt(ft);const ct=new Array(at);tt(ct);const ht=new Array(et-rt+1);tt(ht);const lt=new Array(nt);tt(lt);const vt=new Array(ot);tt(vt);const dt=(t,r,e,n)=>{let i=t&65535|0,s=t>>>16&65535|0,o=0;while(e!==0){o=e>2e3?2e3:e;e-=o;do{i=i+r[n++]|0;s=s+i|0}while(--o);i%=65521;s%=65521}return i|s<<16|0};var wt=dt;const mt=()=>{let t,r=[];for(var e=0;e<256;e++){t=e;for(var n=0;n<8;n++){t=t&1?3988292384^t>>>1:t>>>1}r[e]=t}return r};const bt=new Uint32Array(mt());const pt=(t,r,e,n)=>{const i=bt;const s=n+e;t^=-1;for(let e=n;e<s;e++){t=t>>>8^i[(t^r[e])&255]}return t^-1};var Nt=pt;var Lt={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"};var At={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 gt=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);var yt=function(t){const r=Array.prototype.slice.call(arguments,1);while(r.length){const e=r.shift();if(!e){continue}if(typeof e!=="object"){throw new TypeError(e+"must be non-object")}for(const r in e){if(gt(e,r)){t[r]=e[r]}}}return t};var kt=t=>{let r=0;for(let e=0,n=t.length;e<n;e++){r+=t[e].length}const e=new Uint8Array(r);for(let r=0,n=0,i=t.length;r<i;r++){let i=t[r];e.set(i,n);n+=i.length}return e};var St={assign:yt,flattenChunks:kt};let xt=true;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){xt=false}const qt=new Uint8Array(256);for(let t=0;t<256;t++){qt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1}qt[254]=qt[254]=1;var Et=t=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode){return(new TextEncoder).encode(t)}let r,e,n,i,s,o=t.length,a=0;for(i=0;i<o;i++){e=t.charCodeAt(i);if((e&64512)===55296&&i+1<o){n=t.charCodeAt(i+1);if((n&64512)===56320){e=65536+(e-55296<<10)+(n-56320);i++}}a+=e<128?1:e<2048?2:e<65536?3:4}r=new Uint8Array(a);for(s=0,i=0;s<a;i++){e=t.charCodeAt(i);if((e&64512)===55296&&i+1<o){n=t.charCodeAt(i+1);if((n&64512)===56320){e=65536+(e-55296<<10)+(n-56320);i++}}if(e<128){r[s++]=e}else if(e<2048){r[s++]=192|e>>>6;r[s++]=128|e&63}else if(e<65536){r[s++]=224|e>>>12;r[s++]=128|e>>>6&63;r[s++]=128|e&63}else{r[s++]=240|e>>>18;r[s++]=128|e>>>12&63;r[s++]=128|e>>>6&63;r[s++]=128|e&63}}return r};const Mt=(t,r)=>{if(r<65534){if(t.subarray&&xt){return String.fromCharCode.apply(null,t.length===r?t:t.subarray(0,r))}}let e="";for(let n=0;n<r;n++){e+=String.fromCharCode(t[n])}return e};var jt=(t,r)=>{const e=r||t.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode){return(new TextDecoder).decode(t.subarray(0,r))}let n,i;const s=new Array(e*2);for(i=0,n=0;n<e;){let r=t[n++];if(r<128){s[i++]=r;continue}let o=qt[r];if(o>4){s[i++]=65533;n+=o-1;continue}r&=o===2?31:o===3?15:7;while(o>1&&n<e){r=r<<6|t[n++]&63;o--}if(o>1){s[i++]=65533;continue}if(r<65536){s[i++]=r}else{r-=65536;s[i++]=55296|r>>10&1023;s[i++]=56320|r&1023}}return Mt(s,i)};var Rt=(t,r)=>{r=r||t.length;if(r>t.length){r=t.length}let e=r-1;while(e>=0&&(t[e]&192)===128){e--}if(e<0){return r}if(e===0){return r}return e+qt[t[e]]>r?e:r};var It={string2buf:Et,buf2string:jt,utf8border:Rt};function Ot(){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 Bt=Ot;const Pt=16209;const Ft=16191;var Tt=function t(r,e){let n;let i;let s;let o;let a;let u;let f;let c;let h;let l;let v;let d;let w;let m;let b;let p;let N;let L;let A;let g;let y;let k;let S,x;const q=r.state;n=r.next_in;S=r.input;i=n+(r.avail_in-5);s=r.next_out;x=r.output;o=s-(e-r.avail_out);a=s+(r.avail_out-257);u=q.dmax;f=q.wsize;c=q.whave;h=q.wnext;l=q.window;v=q.hold;d=q.bits;w=q.lencode;m=q.distcode;b=(1<<q.lenbits)-1;p=(1<<q.distbits)-1;t:do{if(d<15){v+=S[n++]<<d;d+=8;v+=S[n++]<<d;d+=8}N=w[v&b];r:for(;;){L=N>>>24;v>>>=L;d-=L;L=N>>>16&255;if(L===0){x[s++]=N&65535}else if(L&16){A=N&65535;L&=15;if(L){if(d<L){v+=S[n++]<<d;d+=8}A+=v&(1<<L)-1;v>>>=L;d-=L}if(d<15){v+=S[n++]<<d;d+=8;v+=S[n++]<<d;d+=8}N=m[v&p];e:for(;;){L=N>>>24;v>>>=L;d-=L;L=N>>>16&255;if(L&16){g=N&65535;L&=15;if(d<L){v+=S[n++]<<d;d+=8;if(d<L){v+=S[n++]<<d;d+=8}}g+=v&(1<<L)-1;if(g>u){r.msg="invalid distance too far back";q.mode=Pt;break t}v>>>=L;d-=L;L=s-o;if(g>L){L=g-L;if(L>c){if(q.sane){r.msg="invalid distance too far back";q.mode=Pt;break t}}y=0;k=l;if(h===0){y+=f-L;if(L<A){A-=L;do{x[s++]=l[y++]}while(--L);y=s-g;k=x}}else if(h<L){y+=f+h-L;L-=h;if(L<A){A-=L;do{x[s++]=l[y++]}while(--L);y=0;if(h<A){L=h;A-=L;do{x[s++]=l[y++]}while(--L);y=s-g;k=x}}}else{y+=h-L;if(L<A){A-=L;do{x[s++]=l[y++]}while(--L);y=s-g;k=x}}while(A>2){x[s++]=k[y++];x[s++]=k[y++];x[s++]=k[y++];A-=3}if(A){x[s++]=k[y++];if(A>1){x[s++]=k[y++]}}}else{y=s-g;do{x[s++]=x[y++];x[s++]=x[y++];x[s++]=x[y++];A-=3}while(A>2);if(A){x[s++]=x[y++];if(A>1){x[s++]=x[y++]}}}}else if((L&64)===0){N=m[(N&65535)+(v&(1<<L)-1)];continue e}else{r.msg="invalid distance code";q.mode=Pt;break t}break}}else if((L&64)===0){N=w[(N&65535)+(v&(1<<L)-1)];continue r}else if(L&32){q.mode=Ft;break t}else{r.msg="invalid literal/length code";q.mode=Pt;break t}break}}while(n<i&&s<a);A=d>>3;n-=A;d-=A<<3;v&=(1<<d)-1;r.next_in=n;r.next_out=s;r.avail_in=n<i?5+(i-n):5-(n-i);r.avail_out=s<a?257+(a-s):257-(s-a);q.hold=v;q.bits=d;return};const Ct=15;const Dt=852;const zt=592;const Ut=0;const _t=1;const Vt=2;const Wt=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]);const Ht=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]);const Gt=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]);const Jt=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]);const Zt=(t,r,e,n,i,s,o,a)=>{const u=a.bits;let f=0;let c=0;let h=0,l=0;let v=0;let d=0;let w=0;let m=0;let b=0;let p=0;let N;let L;let A;let g;let y;let k=null;let S;const x=new Uint16Array(Ct+1);const q=new Uint16Array(Ct+1);let E=null;let M,j,R;for(f=0;f<=Ct;f++){x[f]=0}for(c=0;c<n;c++){x[r[e+c]]++}v=u;for(l=Ct;l>=1;l--){if(x[l]!==0){break}}if(v>l){v=l}if(l===0){i[s++]=1<<24|64<<16|0;i[s++]=1<<24|64<<16|0;a.bits=1;return 0}for(h=1;h<l;h++){if(x[h]!==0){break}}if(v<h){v=h}m=1;for(f=1;f<=Ct;f++){m<<=1;m-=x[f];if(m<0){return-1}}if(m>0&&(t===Ut||l!==1)){return-1}q[1]=0;for(f=1;f<Ct;f++){q[f+1]=q[f]+x[f]}for(c=0;c<n;c++){if(r[e+c]!==0){o[q[r[e+c]]++]=c}}if(t===Ut){k=E=o;S=20}else if(t===_t){k=Wt;E=Ht;S=257}else{k=Gt;E=Jt;S=0}p=0;c=0;f=h;y=s;d=v;w=0;A=-1;b=1<<v;g=b-1;if(t===_t&&b>Dt||t===Vt&&b>zt){return 1}for(;;){M=f-w;if(o[c]+1<S){j=0;R=o[c]}else if(o[c]>=S){j=E[o[c]-S];R=k[o[c]-S]}else{j=32+64;R=0}N=1<<f-w;L=1<<d;h=L;do{L-=N;i[y+(p>>w)+L]=M<<24|j<<16|R|0}while(L!==0);N=1<<f-1;while(p&N){N>>=1}if(N!==0){p&=N-1;p+=N}else{p=0}c++;if(--x[f]===0){if(f===l){break}f=r[e+o[c]]}if(f>v&&(p&g)!==A){if(w===0){w=v}y+=h;d=f-w;m=1<<d;while(d+w<l){m-=x[d+w];if(m<=0){break}d++;m<<=1}b+=1<<d;if(t===_t&&b>Dt||t===Vt&&b>zt){return 1}A=p&g;i[A]=v<<24|d<<16|y-s|0}}if(p!==0){i[y+p]=f-w<<24|64<<16|0}a.bits=v;return 0};var Kt=Zt;const Yt=0;const $t=1;const Xt=2;const{Z_FINISH:Qt,Z_BLOCK:tr,Z_TREES:rr,Z_OK:er,Z_STREAM_END:nr,Z_NEED_DICT:ir,Z_STREAM_ERROR:sr,Z_DATA_ERROR:or,Z_MEM_ERROR:ar,Z_BUF_ERROR:ur,Z_DEFLATED:fr}=At;const cr=16180;const hr=16181;const lr=16182;const vr=16183;const dr=16184;const wr=16185;const mr=16186;const br=16187;const pr=16188;const Nr=16189;const Lr=16190;const Ar=16191;const gr=16192;const yr=16193;const kr=16194;const Sr=16195;const xr=16196;const qr=16197;const Er=16198;const Mr=16199;const jr=16200;const Rr=16201;const Ir=16202;const Or=16203;const Br=16204;const Pr=16205;const Fr=16206;const Tr=16207;const Cr=16208;const Dr=16209;const zr=16210;const Ur=16211;const _r=852;const Vr=592;const Wr=15;const Hr=Wr;const Gr=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function Jr(){this.strm=null;this.mode=0;this.last=false;this.wrap=0;this.havedict=false;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 Zr=t=>{if(!t){return 1}const r=t.state;if(!r||r.strm!==t||r.mode<cr||r.mode>Ur){return 1}return 0};const Kr=t=>{if(Zr(t)){return sr}const r=t.state;t.total_in=t.total_out=r.total=0;t.msg="";if(r.wrap){t.adler=r.wrap&1}r.mode=cr;r.last=0;r.havedict=0;r.flags=-1;r.dmax=32768;r.head=null;r.hold=0;r.bits=0;r.lencode=r.lendyn=new Int32Array(_r);r.distcode=r.distdyn=new Int32Array(Vr);r.sane=1;r.back=-1;return er};const Yr=t=>{if(Zr(t)){return sr}const r=t.state;r.wsize=0;r.whave=0;r.wnext=0;return Kr(t)};const $r=(t,r)=>{let e;if(Zr(t)){return sr}const n=t.state;if(r<0){e=0;r=-r}else{e=(r>>4)+5;if(r<48){r&=15}}if(r&&(r<8||r>15)){return sr}if(n.window!==null&&n.wbits!==r){n.window=null}n.wrap=e;n.wbits=r;return Yr(t)};const Xr=(t,r)=>{if(!t){return sr}const e=new Jr;t.state=e;e.strm=t;e.window=null;e.mode=cr;const n=$r(t,r);if(n!==er){t.state=null}return n};const Qr=t=>Xr(t,Hr);let te=true;let re,ee;const ne=t=>{if(te){re=new Int32Array(512);ee=new Int32Array(32);let r=0;while(r<144){t.lens[r++]=8}while(r<256){t.lens[r++]=9}while(r<280){t.lens[r++]=7}while(r<288){t.lens[r++]=8}Kt($t,t.lens,0,288,re,0,t.work,{bits:9});r=0;while(r<32){t.lens[r++]=5}Kt(Xt,t.lens,0,32,ee,0,t.work,{bits:5});te=false}t.lencode=re;t.lenbits=9;t.distcode=ee;t.distbits=5};const ie=(t,r,e,n)=>{let i;const s=t.state;if(s.window===null){s.wsize=1<<s.wbits;s.wnext=0;s.whave=0;s.window=new Uint8Array(s.wsize)}if(n>=s.wsize){s.window.set(r.subarray(e-s.wsize,e),0);s.wnext=0;s.whave=s.wsize}else{i=s.wsize-s.wnext;if(i>n){i=n}s.window.set(r.subarray(e-n,e-n+i),s.wnext);n-=i;if(n){s.window.set(r.subarray(e-n,e),0);s.wnext=n;s.whave=s.wsize}else{s.wnext+=i;if(s.wnext===s.wsize){s.wnext=0}if(s.whave<s.wsize){s.whave+=i}}}return 0};const se=(t,r)=>{let e;let n,i;let s;let o;let a,u;let f;let c;let h,l;let v;let d;let w;let m=0;let b,p,N;let L,A,g;let y;let k;const S=new Uint8Array(4);let x;let q;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Zr(t)||!t.output||!t.input&&t.avail_in!==0){return sr}e=t.state;if(e.mode===Ar){e.mode=gr}o=t.next_out;i=t.output;u=t.avail_out;s=t.next_in;n=t.input;a=t.avail_in;f=e.hold;c=e.bits;h=a;l=u;k=er;t:for(;;){switch(e.mode){case cr:if(e.wrap===0){e.mode=gr;break}while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.wrap&2&&f===35615){if(e.wbits===0){e.wbits=15}e.check=0;S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0);f=0;c=0;e.mode=hr;break}if(e.head){e.head.done=false}if(!(e.wrap&1)||(((f&255)<<8)+(f>>8))%31){t.msg="incorrect header check";e.mode=Dr;break}if((f&15)!==fr){t.msg="unknown compression method";e.mode=Dr;break}f>>>=4;c-=4;y=(f&15)+8;if(e.wbits===0){e.wbits=y}if(y>15||y>e.wbits){t.msg="invalid window size";e.mode=Dr;break}e.dmax=1<<e.wbits;e.flags=0;t.adler=e.check=1;e.mode=f&512?Nr:Ar;f=0;c=0;break;case hr:while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.flags=f;if((e.flags&255)!==fr){t.msg="unknown compression method";e.mode=Dr;break}if(e.flags&57344){t.msg="unknown header flags set";e.mode=Dr;break}if(e.head){e.head.text=f>>8&1}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0)}f=0;c=0;e.mode=lr;case lr:while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.head){e.head.time=f}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;S[2]=f>>>16&255;S[3]=f>>>24&255;e.check=Nt(e.check,S,4,0)}f=0;c=0;e.mode=vr;case vr:while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.head){e.head.xflags=f&255;e.head.os=f>>8}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0)}f=0;c=0;e.mode=dr;case dr:if(e.flags&1024){while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.length=f;if(e.head){e.head.extra_len=f}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0)}f=0;c=0}else if(e.head){e.head.extra=null}e.mode=wr;case wr:if(e.flags&1024){v=e.length;if(v>a){v=a}if(v){if(e.head){y=e.head.extra_len-e.length;if(!e.head.extra){e.head.extra=new Uint8Array(e.head.extra_len)}e.head.extra.set(n.subarray(s,s+v),y)}if(e.flags&512&&e.wrap&4){e.check=Nt(e.check,n,v,s)}a-=v;s+=v;e.length-=v}if(e.length){break t}}e.length=0;e.mode=mr;case mr:if(e.flags&2048){if(a===0){break t}v=0;do{y=n[s+v++];if(e.head&&y&&e.length<65536){e.head.name+=String.fromCharCode(y)}}while(y&&v<a);if(e.flags&512&&e.wrap&4){e.check=Nt(e.check,n,v,s)}a-=v;s+=v;if(y){break t}}else if(e.head){e.head.name=null}e.length=0;e.mode=br;case br:if(e.flags&4096){if(a===0){break t}v=0;do{y=n[s+v++];if(e.head&&y&&e.length<65536){e.head.comment+=String.fromCharCode(y)}}while(y&&v<a);if(e.flags&512&&e.wrap&4){e.check=Nt(e.check,n,v,s)}a-=v;s+=v;if(y){break t}}else if(e.head){e.head.comment=null}e.mode=pr;case pr:if(e.flags&512){while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.wrap&4&&f!==(e.check&65535)){t.msg="header crc mismatch";e.mode=Dr;break}f=0;c=0}if(e.head){e.head.hcrc=e.flags>>9&1;e.head.done=true}t.adler=e.check=0;e.mode=Ar;break;case Nr:while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}t.adler=e.check=Gr(f);f=0;c=0;e.mode=Lr;case Lr:if(e.havedict===0){t.next_out=o;t.avail_out=u;t.next_in=s;t.avail_in=a;e.hold=f;e.bits=c;return ir}t.adler=e.check=1;e.mode=Ar;case Ar:if(r===tr||r===rr){break t}case gr:if(e.last){f>>>=c&7;c-=c&7;e.mode=Fr;break}while(c<3){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.last=f&1;f>>>=1;c-=1;switch(f&3){case 0:e.mode=yr;break;case 1:ne(e);e.mode=Mr;if(r===rr){f>>>=2;c-=2;break t}break;case 2:e.mode=xr;break;case 3:t.msg="invalid block type";e.mode=Dr}f>>>=2;c-=2;break;case yr:f>>>=c&7;c-=c&7;while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if((f&65535)!==(f>>>16^65535)){t.msg="invalid stored block lengths";e.mode=Dr;break}e.length=f&65535;f=0;c=0;e.mode=kr;if(r===rr){break t}case kr:e.mode=Sr;case Sr:v=e.length;if(v){if(v>a){v=a}if(v>u){v=u}if(v===0){break t}i.set(n.subarray(s,s+v),o);a-=v;s+=v;u-=v;o+=v;e.length-=v;break}e.mode=Ar;break;case xr:while(c<14){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.nlen=(f&31)+257;f>>>=5;c-=5;e.ndist=(f&31)+1;f>>>=5;c-=5;e.ncode=(f&15)+4;f>>>=4;c-=4;if(e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols";e.mode=Dr;break}e.have=0;e.mode=qr;case qr:while(e.have<e.ncode){while(c<3){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.lens[E[e.have++]]=f&7;f>>>=3;c-=3}while(e.have<19){e.lens[E[e.have++]]=0}e.lencode=e.lendyn;e.lenbits=7;x={bits:e.lenbits};k=Kt(Yt,e.lens,0,19,e.lencode,0,e.work,x);e.lenbits=x.bits;if(k){t.msg="invalid code lengths set";e.mode=Dr;break}e.have=0;e.mode=Er;case Er:while(e.have<e.nlen+e.ndist){for(;;){m=e.lencode[f&(1<<e.lenbits)-1];b=m>>>24;p=m>>>16&255;N=m&65535;if(b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(N<16){f>>>=b;c-=b;e.lens[e.have++]=N}else{if(N===16){q=b+2;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=b;c-=b;if(e.have===0){t.msg="invalid bit length repeat";e.mode=Dr;break}y=e.lens[e.have-1];v=3+(f&3);f>>>=2;c-=2}else if(N===17){q=b+3;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=b;c-=b;y=0;v=3+(f&7);f>>>=3;c-=3}else{q=b+7;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=b;c-=b;y=0;v=11+(f&127);f>>>=7;c-=7}if(e.have+v>e.nlen+e.ndist){t.msg="invalid bit length repeat";e.mode=Dr;break}while(v--){e.lens[e.have++]=y}}}if(e.mode===Dr){break}if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block";e.mode=Dr;break}e.lenbits=9;x={bits:e.lenbits};k=Kt($t,e.lens,0,e.nlen,e.lencode,0,e.work,x);e.lenbits=x.bits;if(k){t.msg="invalid literal/lengths set";e.mode=Dr;break}e.distbits=6;e.distcode=e.distdyn;x={bits:e.distbits};k=Kt(Xt,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,x);e.distbits=x.bits;if(k){t.msg="invalid distances set";e.mode=Dr;break}e.mode=Mr;if(r===rr){break t}case Mr:e.mode=jr;case jr:if(a>=6&&u>=258){t.next_out=o;t.avail_out=u;t.next_in=s;t.avail_in=a;e.hold=f;e.bits=c;Tt(t,l);o=t.next_out;i=t.output;u=t.avail_out;s=t.next_in;n=t.input;a=t.avail_in;f=e.hold;c=e.bits;if(e.mode===Ar){e.back=-1}break}e.back=0;for(;;){m=e.lencode[f&(1<<e.lenbits)-1];b=m>>>24;p=m>>>16&255;N=m&65535;if(b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(p&&(p&240)===0){L=b;A=p;g=N;for(;;){m=e.lencode[g+((f&(1<<L+A)-1)>>L)];b=m>>>24;p=m>>>16&255;N=m&65535;if(L+b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=L;c-=L;e.back+=L}f>>>=b;c-=b;e.back+=b;e.length=N;if(p===0){e.mode=Pr;break}if(p&32){e.back=-1;e.mode=Ar;break}if(p&64){t.msg="invalid literal/length code";e.mode=Dr;break}e.extra=p&15;e.mode=Rr;case Rr:if(e.extra){q=e.extra;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.length+=f&(1<<e.extra)-1;f>>>=e.extra;c-=e.extra;e.back+=e.extra}e.was=e.length;e.mode=Ir;case Ir:for(;;){m=e.distcode[f&(1<<e.distbits)-1];b=m>>>24;p=m>>>16&255;N=m&65535;if(b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if((p&240)===0){L=b;A=p;g=N;for(;;){m=e.distcode[g+((f&(1<<L+A)-1)>>L)];b=m>>>24;p=m>>>16&255;N=m&65535;if(L+b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=L;c-=L;e.back+=L}f>>>=b;c-=b;e.back+=b;if(p&64){t.msg="invalid distance code";e.mode=Dr;break}e.offset=N;e.extra=p&15;e.mode=Or;case Or:if(e.extra){q=e.extra;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.offset+=f&(1<<e.extra)-1;f>>>=e.extra;c-=e.extra;e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back";e.mode=Dr;break}e.mode=Br;case Br:if(u===0){break t}v=l-u;if(e.offset>v){v=e.offset-v;if(v>e.whave){if(e.sane){t.msg="invalid distance too far back";e.mode=Dr;break}}if(v>e.wnext){v-=e.wnext;d=e.wsize-v}else{d=e.wnext-v}if(v>e.length){v=e.length}w=e.window}else{w=i;d=o-e.offset;v=e.length}if(v>u){v=u}u-=v;e.length-=v;do{i[o++]=w[d++]}while(--v);if(e.length===0){e.mode=jr}break;case Pr:if(u===0){break t}i[o++]=e.length;u--;e.mode=jr;break;case Fr:if(e.wrap){while(c<32){if(a===0){break t}a--;f|=n[s++]<<c;c+=8}l-=u;t.total_out+=l;e.total+=l;if(e.wrap&4&&l){t.adler=e.check=e.flags?Nt(e.check,i,l,o-l):wt(e.check,i,l,o-l)}l=u;if(e.wrap&4&&(e.flags?f:Gr(f))!==e.check){t.msg="incorrect data check";e.mode=Dr;break}f=0;c=0}e.mode=Tr;case Tr:if(e.wrap&&e.flags){while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.wrap&4&&f!==(e.total&4294967295)){t.msg="incorrect length check";e.mode=Dr;break}f=0;c=0}e.mode=Cr;case Cr:k=nr;break t;case Dr:k=or;break t;case zr:return ar;case Ur:default:return sr}}t.next_out=o;t.avail_out=u;t.next_in=s;t.avail_in=a;e.hold=f;e.bits=c;if(e.wsize||l!==t.avail_out&&e.mode<Dr&&(e.mode<Fr||r!==Qt)){if(ie(t,t.output,t.next_out,l-t.avail_out));}h-=t.avail_in;l-=t.avail_out;t.total_in+=h;t.total_out+=l;e.total+=l;if(e.wrap&4&&l){t.adler=e.check=e.flags?Nt(e.check,i,l,t.next_out-l):wt(e.check,i,l,t.next_out-l)}t.data_type=e.bits+(e.last?64:0)+(e.mode===Ar?128:0)+(e.mode===Mr||e.mode===kr?256:0);if((h===0&&l===0||r===Qt)&&k===er){k=ur}return k};const oe=t=>{if(Zr(t)){return sr}let r=t.state;if(r.window){r.window=null}t.state=null;return er};const ae=(t,r)=>{if(Zr(t)){return sr}const e=t.state;if((e.wrap&2)===0){return sr}e.head=r;r.done=false;return er};const ue=(t,r)=>{const e=r.length;let n;let i;let s;if(Zr(t)){return sr}n=t.state;if(n.wrap!==0&&n.mode!==Lr){return sr}if(n.mode===Lr){i=1;i=wt(i,r,e,0);if(i!==n.check){return or}}s=ie(t,r,e,e);if(s){n.mode=zr;return ar}n.havedict=1;return er};var fe=Yr;var ce=$r;var he=Kr;var le=Qr;var ve=Xr;var de=se;var we=oe;var me=ae;var be=ue;var pe="pako inflate (from Nodeca project)";var Ne={inflateReset:fe,inflateReset2:ce,inflateResetKeep:he,inflateInit:le,inflateInit2:ve,inflate:de,inflateEnd:we,inflateGetHeader:me,inflateSetDictionary:be,inflateInfo:pe};function Le(){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=false}var Ae=Le;const ge=Object.prototype.toString;const{Z_NO_FLUSH:ye,Z_FINISH:ke,Z_OK:Se,Z_STREAM_END:xe,Z_NEED_DICT:qe,Z_STREAM_ERROR:Ee,Z_DATA_ERROR:Me,Z_MEM_ERROR:je}=At;function Re(t){this.options=St.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const r=this.options;if(r.raw&&r.windowBits>=0&&r.windowBits<16){r.windowBits=-r.windowBits;if(r.windowBits===0){r.windowBits=-15}}if(r.windowBits>=0&&r.windowBits<16&&!(t&&t.windowBits)){r.windowBits+=32}if(r.windowBits>15&&r.windowBits<48){if((r.windowBits&15)===0){r.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new Bt;this.strm.avail_out=0;let e=Ne.inflateInit2(this.strm,r.windowBits);if(e!==Se){throw new Error(Lt[e])}this.header=new Ae;Ne.inflateGetHeader(this.strm,this.header);if(r.dictionary){if(typeof r.dictionary==="string"){r.dictionary=It.string2buf(r.dictionary)}else if(ge.call(r.dictionary)==="[object ArrayBuffer]"){r.dictionary=new Uint8Array(r.dictionary)}if(r.raw){e=Ne.inflateSetDictionary(this.strm,r.dictionary);if(e!==Se){throw new Error(Lt[e])}}}}Re.prototype.push=function(t,r){const e=this.strm;const n=this.options.chunkSize;const i=this.options.dictionary;let s,o,a;if(this.ended)return false;if(r===~~r)o=r;else o=r===true?ke:ye;if(ge.call(t)==="[object ArrayBuffer]"){e.input=new Uint8Array(t)}else{e.input=t}e.next_in=0;e.avail_in=e.input.length;for(;;){if(e.avail_out===0){e.output=new Uint8Array(n);e.next_out=0;e.avail_out=n}s=Ne.inflate(e,o);if(s===qe&&i){s=Ne.inflateSetDictionary(e,i);if(s===Se){s=Ne.inflate(e,o)}else if(s===Me){s=qe}}while(e.avail_in>0&&s===xe&&e.state.wrap>0&&t[e.next_in]!==0){Ne.inflateReset(e);s=Ne.inflate(e,o)}switch(s){case Ee:case Me:case qe:case je:this.onEnd(s);this.ended=true;return false}a=e.avail_out;if(e.next_out){if(e.avail_out===0||s===xe){if(this.options.to==="string"){let t=It.utf8border(e.output,e.next_out);let r=e.next_out-t;let i=It.buf2string(e.output,t);e.next_out=r;e.avail_out=n-r;if(r)e.output.set(e.output.subarray(t,t+r),0);this.onData(i)}else{this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out))}}}if(s===Se&&a===0)continue;if(s===xe){s=Ne.inflateEnd(this.strm);this.onEnd(s);this.ended=true;return true}if(e.avail_in===0)break}return true};Re.prototype.onData=function(t){this.chunks.push(t)};Re.prototype.onEnd=function(t){if(t===Se){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=St.flattenChunks(this.chunks)}}this.chunks=[];this.err=t;this.msg=this.strm.msg};function Ie(t,r){const e=new Re(r);e.push(t);if(e.err)throw e.msg||Lt[e.err];return e.result}var Oe=Re;var Be=Ie;var Pe={Inflate:Oe,inflate:Be};const{Inflate:Fe,inflate:Te}=Pe;var Ce=Fe;var De=Te;const ze=[];for(let t=0;t<256;t++){let r=t;for(let t=0;t<8;t++){if(r&1){r=3988292384^r>>>1}else{r=r>>>1}}ze[t]=r}const Ue=4294967295;function _e(t,r,e){let n=t;for(let t=0;t<e;t++){n=ze[(n^r[t])&255]^n>>>8}return n}function Ve(t,r){return(_e(Ue,t,r)^Ue)>>>0}function We(t,r,e){const n=t.readUint32();const i=Ve(new Uint8Array(t.buffer,t.byteOffset+t.offset-r-4,r),r);if(i!==n){throw new Error(`CRC mismatch for chunk ${e}. Expected ${n}, found ${i}`)}}function He(t,r,e){for(let n=0;n<e;n++){r[n]=t[n]}}function Ge(t,r,e,n){let i=0;for(;i<n;i++){r[i]=t[i]}for(;i<e;i++){r[i]=t[i]+r[i-n]&255}}function Je(t,r,e,n){let i=0;if(e.length===0){for(;i<n;i++){r[i]=t[i]}}else{for(;i<n;i++){r[i]=t[i]+e[i]&255}}}function Ze(t,r,e,n,i){let s=0;if(e.length===0){for(;s<i;s++){r[s]=t[s]}for(;s<n;s++){r[s]=t[s]+(r[s-i]>>1)&255}}else{for(;s<i;s++){r[s]=t[s]+(e[s]>>1)&255}for(;s<n;s++){r[s]=t[s]+(r[s-i]+e[s]>>1)&255}}}function Ke(t,r,e,n,i){let s=0;if(e.length===0){for(;s<i;s++){r[s]=t[s]}for(;s<n;s++){r[s]=t[s]+r[s-i]&255}}else{for(;s<i;s++){r[s]=t[s]+e[s]&255}for(;s<n;s++){r[s]=t[s]+Ye(r[s-i],e[s],e[s-i])&255}}}function Ye(t,r,e){const n=t+r-e;const i=Math.abs(n-t);const s=Math.abs(n-r);const o=Math.abs(n-e);if(i<=s&&i<=o)return t;else if(s<=o)return r;else return e}function $e(t,r,e,n,i,s){switch(t){case 0:He(r,e,i);break;case 1:Ge(r,e,i,s);break;case 2:Je(r,e,n,i);break;case 3:Ze(r,e,n,i,s);break;case 4:Ke(r,e,n,i,s);break;default:throw new Error(`Unsupported filter: ${t}`)}}const Xe=new Uint16Array([255]);const Qe=new Uint8Array(Xe.buffer);const tn=Qe[0]===255;function rn(t){const{data:r,width:e,height:n,channels:i,depth:s}=t;const o=[{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}];const a=Math.ceil(s/8)*i;const u=new Uint8Array(n*e*a);let f=0;for(let t=0;t<7;t++){const i=o[t];const s=Math.ceil((e-i.x)/i.xStep);const c=Math.ceil((n-i.y)/i.yStep);if(s<=0||c<=0)continue;const h=s*a;const l=new Uint8Array(h);for(let t=0;t<c;t++){const o=r[f++];const c=r.subarray(f,f+h);f+=h;const v=new Uint8Array(h);$e(o,c,v,l,h,a);l.set(v);for(let r=0;r<s;r++){const s=i.x+r*i.xStep;const o=i.y+t*i.yStep;if(s>=e||o>=n)continue;for(let t=0;t<a;t++){u[(o*e+s)*a+t]=v[r*a+t]}}}}if(s===16){const t=new Uint16Array(u.buffer);if(tn){for(let r=0;r<t.length;r++){t[r]=en(t[r])}}return t}else{return u}}function en(t){return(t&255)<<8|t>>8&255}const nn=new Uint16Array([255]);const sn=new Uint8Array(nn.buffer);const on=sn[0]===255;const an=new Uint8Array(0);function un(t){const{data:r,width:e,height:n,channels:i,depth:s}=t;const o=Math.ceil(s/8)*i;const a=Math.ceil(s/8*i*e);const u=new Uint8Array(n*a);let f=an;let c=0;let h;let l;for(let t=0;t<n;t++){h=r.subarray(c+1,c+1+a);l=u.subarray(t*a,(t+1)*a);switch(r[c]){case 0:He(h,l,a);break;case 1:Ge(h,l,a,o);break;case 2:Je(h,l,f,a);break;case 3:Ze(h,l,f,a,o);break;case 4:Ke(h,l,f,a,o);break;default:throw new Error(`Unsupported filter: ${r[c]}`)}f=l;c+=a+1}if(s===16){const t=new Uint16Array(u.buffer);if(on){for(let r=0;r<t.length;r++){t[r]=fn(t[r])}}return t}else{return u}}function fn(t){return(t&255)<<8|t>>8&255}const cn=Uint8Array.of(137,80,78,71,13,10,26,10);function hn(t){if(!ln(t.readBytes(cn.length))){throw new Error("wrong PNG signature")}}function ln(t){if(t.length<cn.length){return false}for(let r=0;r<cn.length;r++){if(t[r]!==cn[r]){return false}}return true}const vn="tEXt";const dn=0;const wn=new TextDecoder("latin1");function mn(t){pn(t);if(t.length===0||t.length>79){throw new Error("keyword length must be between 1 and 79")}}const bn=/^[\u0000-\u00FF]*$/;function pn(t){if(!bn.test(t)){throw new Error("invalid latin1 text")}}function Nn(t,r,e){const n=Ln(r);t[n]=An(r,e-n.length-1)}function Ln(t){t.mark();while(t.readByte()!==dn){}const r=t.offset;t.reset();const e=wn.decode(t.readBytes(r-t.offset-1));t.skip(1);mn(e);return e}function An(t,r){return wn.decode(t.readBytes(r))}const gn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6};const yn={UNKNOWN:-1,DEFLATE:0};const kn={UNKNOWN:-1,ADAPTIVE:0};const Sn={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1};const xn={NONE:0,BACKGROUND:1,PREVIOUS:2};const qn={SOURCE:0,OVER:1};class En extends Q{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,r={}){super(t);const{checkCrc:e=false}=r;this._checkCrc=e;this._inflator=new Ce;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=false;this._hasPalette=false;this._palette=[];this._hasTransparency=false;this._transparency=new Uint16Array(0);this._compressionMethod=yn.UNKNOWN;this._filterMethod=kn.UNKNOWN;this._interlaceMethod=Sn.UNKNOWN;this._colorType=gn.UNKNOWN;this._isAnimated=false;this._numberOfFrames=1;this._numberOfPlays=0;this._frames=[];this._writingDataChunks=false;this.setBigEndian()}decode(){hn(this);while(!this._end){const t=this.readUint32();const r=this.readChars(4);this.decodeChunk(t,r)}this.decodeImage();return this._png}decodeApng(){hn(this);while(!this._end){const t=this.readUint32();const r=this.readChars(4);this.decodeApngChunk(t,r)}this.decodeApngImage();return this._apng}decodeChunk(t,r){const e=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=true;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case vn:Nn(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-e!==t){throw new Error(`Length mismatch while decoding chunk ${r}`)}if(this._checkCrc){We(this,t+4,r)}else{this.skip(4)}}decodeApngChunk(t,r){const e=this.offset;if(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks){this.pushDataToFrame()}switch(r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,r);this.offset=e+t;break}if(this.offset-e!==t){throw new Error(`Length mismatch while decoding chunk ${r}`)}if(this._checkCrc){We(this,t+4,r)}else{this.skip(4)}}decodeIHDR(){const t=this._png;t.width=this.readUint32();t.height=this.readUint32();t.depth=Mn(this.readUint8());const r=this.readUint8();this._colorType=r;let e;switch(r){case gn.GREYSCALE:e=1;break;case gn.TRUECOLOUR:e=3;break;case gn.INDEXED_COLOUR:e=1;break;case gn.GREYSCALE_ALPHA:e=2;break;case gn.TRUECOLOUR_ALPHA:e=4;break;case gn.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}this._png.channels=e;this._compressionMethod=this.readUint8();if(this._compressionMethod!==yn.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=true}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0){throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`)}const r=t/3;this._hasPalette=true;const e=[];this._palette=e;for(let t=0;t<r;t++){e.push([this.readUint8(),this.readUint8(),this.readUint8()])}}decodeIDAT(t){this._writingDataChunks=true;const r=t;const e=this.offset+this.byteOffset;this._inflator.push(new Uint8Array(this.buffer,e,r));if(this._inflator.err){throw new Error(`Error while decompressing the data: ${this._inflator.err}`)}this.skip(t)}decodeFDAT(t){this._writingDataChunks=true;let r=t;let e=this.offset+this.byteOffset;e+=4;r-=4;this._inflator.push(new Uint8Array(this.buffer,e,r));if(this._inflator.err){throw new Error(`Error while decompressing the data: ${this._inflator.err}`)}this.skip(t)}decodetRNS(t){switch(this._colorType){case gn.GREYSCALE:case gn.TRUECOLOUR:{if(t%2!==0){throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`)}if(t/2>this._png.width*this._png.height){throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`)}this._hasTransparency=true;this._transparency=new Uint16Array(t/2);for(let r=0;r<t/2;r++){this._transparency[r]=this.readUint16()}break}case gn.INDEXED_COLOUR:{if(t>this._palette.length){throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`)}let r=0;for(;r<t;r++){const t=this.readByte();this._palette[r].push(t)}for(;r<this._palette.length;r++){this._palette[r].push(255)}break}case gn.UNKNOWN:case gn.GREYSCALE_ALPHA:case gn.TRUECOLOUR_ALPHA:default:{throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}}decodeiCCP(t){const r=Ln(this);const e=this.readUint8();if(e!==yn.DEFLATE){throw new Error(`Unsupported iCCP compression method: ${e}`)}const n=this.readBytes(t-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:De(n)}}decodepHYs(){const t=this.readUint32();const r=this.readUint32();const e=this.readByte();this._png.resolution={x:t,y:r,unit:e}}decodeApngImage(){this._apng.width=this._png.width;this._apng.height=this._png.height;this._apng.channels=this._png.channels;this._apng.depth=this._png.depth;this._apng.numberOfFrames=this._numberOfFrames;this._apng.numberOfPlays=this._numberOfPlays;this._apng.text=this._png.text;this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const r={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)};const e=this._frames.at(t);if(e){e.data=un({data:e.data,width:e.width,height:e.height,channels:this._apng.channels,depth:this._apng.depth});if(this._hasPalette){this._apng.palette=this._palette}if(this._hasTransparency){this._apng.transparency=this._transparency}if(t===0||e.xOffset===0&&e.yOffset===0&&e.width===this._png.width&&e.height===this._png.height){r.data=e.data}else{const n=this._apng.frames.at(t-1);this.disposeFrame(e,n,r);this.addFrameDataToCanvas(r,e)}this._apng.frames.push(r)}}return this._apng}disposeFrame(t,r,e){switch(t.disposeOp){case xn.NONE:break;case xn.BACKGROUND:for(let r=0;r<this._png.height;r++){for(let n=0;n<this._png.width;n++){const i=(r*t.width+n)*this._png.channels;for(let t=0;t<this._png.channels;t++){e.data[i+t]=0}}}break;case xn.PREVIOUS:e.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,r){const e=1<<this._png.depth;const n=(t,e)=>{const n=((t+r.yOffset)*this._png.width+r.xOffset+e)*this._png.channels;const i=(t*r.width+e)*this._png.channels;return{index:n,frameIndex:i}};switch(r.blendOp){case qn.SOURCE:for(let e=0;e<r.height;e++){for(let i=0;i<r.width;i++){const{index:s,frameIndex:o}=n(e,i);for(let e=0;e<this._png.channels;e++){t.data[s+e]=r.data[o+e]}}}break;case qn.OVER:for(let i=0;i<r.height;i++){for(let s=0;s<r.width;s++){const{index:o,frameIndex:a}=n(i,s);for(let n=0;n<this._png.channels;n++){const i=r.data[a+this._png.channels-1]/e;const s=n%(this._png.channels-1)===0?1:r.data[a+n];const u=Math.floor(i*s+(1-i)*t.data[o+n]);t.data[o+n]+=u}}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err){throw new Error(`Error while decompressing the data: ${this._inflator.err}`)}const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==kn.ADAPTIVE){throw new Error(`Filter method ${this._filterMethod} not supported`)}if(this._interlaceMethod===Sn.NO_INTERLACE){this._png.data=un({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}else if(this._interlaceMethod===Sn.ADAM7){this._png.data=rn({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}else{throw new Error(`Interlace method ${this._interlaceMethod} not supported`)}if(this._hasPalette){this._png.palette=this._palette}if(this._hasTransparency){this._png.transparency=this._transparency}}pushDataToFrame(){const t=this._inflator.result;const r=this._frames.at(-1);if(r){r.data=t}else{this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:xn.NONE,blendOp:qn.SOURCE,data:t})}this._inflator=new Ce;this._writingDataChunks=false}}function Mn(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16){throw new Error(`invalid bit depth: ${t}`)}return t}var jn;(function(t){t[t["UNKNOWN"]=0]="UNKNOWN";t[t["METRE"]=1]="METRE"})(jn||(jn={}));function Rn(t,r){const e=new En(t,r);return e.decode()}
1
+ function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}var r=Uint8Array,e=Uint16Array,n=Int32Array;var i=new r([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]);var s=new r([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]);var o=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);var a=function(t,r){var i=new e(31);for(var s=0;s<31;++s){i[s]=r+=1<<t[s-1]}var o=new n(i[30]);for(var s=1;s<30;++s){for(var a=i[s];a<i[s+1];++a){o[a]=a-i[s]<<5|s}}return{b:i,r:o}};var u=a(i,2),f=u.b,c=u.r;f[28]=258,c[258]=28;var h=a(s,0),l=h.r;var v=new e(32768);for(var d=0;d<32768;++d){var w=(d&43690)>>1|(d&21845)<<1;w=(w&52428)>>2|(w&13107)<<2;w=(w&61680)>>4|(w&3855)<<4;v[d]=((w&65280)>>8|(w&255)<<8)>>1}var m=function(t,r,n){var i=t.length;var s=0;var o=new e(r);for(;s<i;++s){if(t[s])++o[t[s]-1]}var a=new e(r);for(s=1;s<r;++s){a[s]=a[s-1]+o[s-1]<<1}var u;if(n){u=new e(1<<r);var f=15-r;for(s=0;s<i;++s){if(t[s]){var c=s<<4|t[s];var h=r-t[s];var l=a[t[s]-1]++<<h;for(var d=l|(1<<h)-1;l<=d;++l){u[v[l]>>f]=c}}}}else{u=new e(i);for(s=0;s<i;++s){if(t[s]){u[s]=v[a[t[s]-1]++]>>15-t[s]}}}return u};var b=new r(288);for(var d=0;d<144;++d)b[d]=8;for(var d=144;d<256;++d)b[d]=9;for(var d=256;d<280;++d)b[d]=7;for(var d=280;d<288;++d)b[d]=8;var p=new r(32);for(var d=0;d<32;++d)p[d]=5;var N=m(b,9,0);var L=m(p,5,0);var A=function(t){return(t+7)/8|0};var g=function(t,e,n){if(n==null||n>t.length)n=t.length;return new r(t.subarray(e,n))};var y=function(t,r,e){e<<=r&7;var n=r/8|0;t[n]|=e;t[n+1]|=e>>8};var k=function(t,r,e){e<<=r&7;var n=r/8|0;t[n]|=e;t[n+1]|=e>>8;t[n+2]|=e>>16};var S=function(t,n){var i=[];for(var s=0;s<t.length;++s){if(t[s])i.push({s,f:t[s]})}var o=i.length;var a=i.slice();if(!o)return{t:I,l:0};if(o==1){var u=new r(i[0].s+1);u[i[0].s]=1;return{t:u,l:1}}i.sort((function(t,r){return t.f-r.f}));i.push({s:-1,f:25001});var f=i[0],c=i[1],h=0,l=1,v=2;i[0]={s:-1,f:f.f+c.f,l:f,r:c};while(l!=o-1){f=i[i[h].f<i[v].f?h++:v++];c=i[h!=l&&i[h].f<i[v].f?h++:v++];i[l++]={s:-1,f:f.f+c.f,l:f,r:c}}var d=a[0].s;for(var s=1;s<o;++s){if(a[s].s>d)d=a[s].s}var w=new e(d+1);var m=x(i[l-1],w,0);if(m>n){var s=0,b=0;var p=m-n,N=1<<p;a.sort((function(t,r){return w[r.s]-w[t.s]||t.f-r.f}));for(;s<o;++s){var L=a[s].s;if(w[L]>n){b+=N-(1<<m-w[L]);w[L]=n}else break}b>>=p;while(b>0){var A=a[s].s;if(w[A]<n)b-=1<<n-w[A]++-1;else++s}for(;s>=0&&b;--s){var g=a[s].s;if(w[g]==n){--w[g];++b}}m=n}return{t:new r(w),l:m}};var x=function(t,r,e){return t.s==-1?Math.max(x(t.l,r,e+1),x(t.r,r,e+1)):r[t.s]=e};var q=function(t){var r=t.length;while(r&&!t[--r]);var n=new e(++r);var i=0,s=t[0],o=1;var a=function(t){n[i++]=t};for(var u=1;u<=r;++u){if(t[u]==s&&u!=r)++o;else{if(!s&&o>2){for(;o>138;o-=138)a(32754);if(o>2){a(o>10?o-11<<5|28690:o-3<<5|12305);o=0}}else if(o>3){a(s),--o;for(;o>6;o-=6)a(8304);if(o>2)a(o-3<<5|8208),o=0}while(o--)a(s);o=1;s=t[u]}}return{c:n.subarray(0,i),n:r}};var E=function(t,r){var e=0;for(var n=0;n<r.length;++n)e+=t[n]*r[n];return e};var M=function(t,r,e){var n=e.length;var i=A(r+2);t[i]=n&255;t[i+1]=n>>8;t[i+2]=t[i]^255;t[i+3]=t[i+1]^255;for(var s=0;s<n;++s)t[i+s+4]=e[s];return(i+4+n)*8};var j=function(t,r,n,a,u,f,c,h,l,v,d){y(r,d++,n);++u[256];var w=S(u,15),A=w.t,g=w.l;var x=S(f,15),j=x.t,R=x.l;var I=q(A),O=I.c,B=I.n;var P=q(j),F=P.c,T=P.n;var C=new e(19);for(var D=0;D<O.length;++D)++C[O[D]&31];for(var D=0;D<F.length;++D)++C[F[D]&31];var z=S(C,7),U=z.t,_=z.l;var V=19;for(;V>4&&!U[o[V-1]];--V);var W=v+5<<3;var H=E(u,b)+E(f,p)+c;var G=E(u,A)+E(f,j)+c+14+3*V+E(C,U)+2*C[16]+3*C[17]+7*C[18];if(l>=0&&W<=H&&W<=G)return M(r,d,t.subarray(l,l+v));var Z,J,K,Y;y(r,d,1+(G<H)),d+=2;if(G<H){Z=m(A,g,0),J=A,K=m(j,R,0),Y=j;var $=m(U,_,0);y(r,d,B-257);y(r,d+5,T-1);y(r,d+10,V-4);d+=14;for(var D=0;D<V;++D)y(r,d+3*D,U[o[D]]);d+=3*V;var X=[O,F];for(var Q=0;Q<2;++Q){var tt=X[Q];for(var D=0;D<tt.length;++D){var rt=tt[D]&31;y(r,d,$[rt]),d+=U[rt];if(rt>15)y(r,d,tt[D]>>5&127),d+=tt[D]>>12}}}else{Z=N,J=b,K=L,Y=p}for(var D=0;D<h;++D){var et=a[D];if(et>255){var rt=et>>18&31;k(r,d,Z[rt+257]),d+=J[rt+257];if(rt>7)y(r,d,et>>23&31),d+=i[rt];var nt=et&31;k(r,d,K[nt]),d+=Y[nt];if(nt>3)k(r,d,et>>5&8191),d+=s[nt]}else{k(r,d,Z[et]),d+=J[et]}}k(r,d,Z[256]);return d+J[256]};var R=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]);var I=new r(0);var O=function(t,o,a,u,f,h){var v=h.z||t.length;var d=new r(u+v+5*(1+Math.ceil(v/7e3))+f);var w=d.subarray(u,d.length-f);var m=h.l;var b=(h.r||0)&7;if(o){if(b)w[0]=h.r>>3;var p=R[o-1];var N=p>>13,L=p&8191;var y=(1<<a)-1;var k=h.p||new e(32768),S=h.h||new e(y+1);var x=Math.ceil(a/3),q=2*x;var E=function(r){return(t[r]^t[r+1]<<x^t[r+2]<<q)&y};var I=new n(25e3);var O=new e(288),B=new e(32);var P=0,F=0,T=h.i||0,C=0,D=h.w||0,z=0;for(;T+2<v;++T){var U=E(T);var _=T&32767,V=S[U];k[_]=V;S[U]=_;if(D<=T){var W=v-T;if((P>7e3||C>24576)&&(W>423||!m)){b=j(t,w,0,I,O,B,F,C,z,T-z,b);C=P=F=0,z=T;for(var H=0;H<286;++H)O[H]=0;for(var H=0;H<30;++H)B[H]=0}var G=2,Z=0,J=L,K=_-V&32767;if(W>2&&U==E(T-K)){var Y=Math.min(N,W)-1;var $=Math.min(32767,T);var X=Math.min(258,W);while(K<=$&&--J&&_!=V){if(t[T+G]==t[T+G-K]){var Q=0;for(;Q<X&&t[T+Q]==t[T+Q-K];++Q);if(Q>G){G=Q,Z=K;if(Q>Y)break;var tt=Math.min(K,Q-2);var rt=0;for(var H=0;H<tt;++H){var et=T-K+H&32767;var nt=k[et];var it=et-nt&32767;if(it>rt)rt=it,V=et}}}_=V,V=k[_];K+=_-V&32767}}if(Z){I[C++]=268435456|c[G]<<18|l[Z];var st=c[G]&31,ot=l[Z]&31;F+=i[st]+s[ot];++O[257+st];++B[ot];D=T+G;++P}else{I[C++]=t[T];++O[t[T]]}}}for(T=Math.max(T,D);T<v;++T){I[C++]=t[T];++O[t[T]]}b=j(t,w,m,I,O,B,F,C,z,T-z,b);if(!m){h.r=b&7|w[b/8|0]<<3;b-=7;h.h=S,h.p=k,h.i=T,h.w=D}}else{for(var T=h.w||0;T<v+m;T+=65535){var at=T+65535;if(at>=v){w[b/8|0]=m;at=v}b=M(w,b+1,t.subarray(T,at))}h.i=v}return g(d,0,u+A(b)+f)};var B=function(){var t=1,r=0;return{p:function(e){var n=t,i=r;var s=e.length|0;for(var o=0;o!=s;){var a=Math.min(o+2655,s);for(;o<a;++o)i+=n+=e[o];n=(n&65535)+15*(n>>16),i=(i&65535)+15*(i>>16)}t=n,r=i},d:function(){t%=65521,r%=65521;return(t&255)<<24|(t&65280)<<8|(r&255)<<8|r>>8}}};var P=function(t,e,n,i,s){if(!s){s={l:1};if(e.dictionary){var o=e.dictionary.subarray(-32768);var a=new r(o.length+t.length);a.set(o);a.set(t,o.length);t=a;s.w=o.length}}return O(t,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,i,s)};var F=function(t,r,e){for(;e;++r)t[r]=e,e>>>=8};var T=function(t,r){var e=r.level,n=e==0?0:e<6?1:e==9?3:2;t[0]=120,t[1]=n<<6|(r.dictionary&&32);t[1]|=31-(t[0]<<8|t[1])%31;if(r.dictionary){var i=B();i.p(r.dictionary);F(t,2,i.d())}};function C(t,r){if(!r)r={};var e=B();e.p(t);var n=P(t,r,r.dictionary?6:2,4);return T(n,r),F(n,n.length-4,e.d()),n}var D=typeof TextDecoder!="undefined"&&new TextDecoder;try{D.decode(I,{stream:true})}catch(t){}function z(t){if(Array.isArray(t))return t}function U(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,s,o,a=[],u=true,f=false;try{if(s=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;u=false}else for(;!(u=(n=s.call(e)).done)&&(a.push(n.value),a.length!==r);u=true);}catch(t){f=true,i=t}finally{try{if(!u&&null!=e["return"]&&(o=e["return"](),Object(o)!==o))return}finally{if(f)throw i}}return a}}function _(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function V(t,r){if(t){if("string"==typeof t)return _(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_(t,r):void 0}}function W(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(t,r){return z(t)||U(t,r)||V(t,r)||W()}var G=Object.freeze({__proto__:null,default:H});function Z(t,r="utf8"){const e=new TextDecoder(r);return e.decode(t)}const J=new TextEncoder;function K(t){return J.encode(t)}const Y=1024*8;const $=(()=>{const t=new Uint8Array(4);const r=new Uint32Array(t.buffer);return!((r[0]=1)&t[0])})();const X={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 Q{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=Y,r={}){let e=false;if(typeof t==="number"){t=new ArrayBuffer(t)}else{e=true;this.lastWrittenByte=t.byteLength}const n=r.offset?r.offset>>>0:0;const i=t.byteLength-n;let s=n;if(ArrayBuffer.isView(t)||t instanceof Q){if(t.byteLength!==t.buffer.byteLength){s=t.byteOffset+n}t=t.buffer}if(e){this.lastWrittenByte=i}else{this.lastWrittenByte=0}this.buffer=t;this.length=i;this.byteLength=i;this.byteOffset=s;this.offset=0;this.littleEndian=true;this._data=new DataView(this.buffer,s,i);this._mark=0;this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){this.littleEndian=true;return this}isBigEndian(){return!this.littleEndian}setBigEndian(){this.littleEndian=false;return this}skip(t=1){this.offset+=t;return this}back(t=1){this.offset-=t;return this}seek(t){this.offset=t;return this}mark(){this._mark=this.offset;return this}reset(){this.offset=this._mark;return this}pushMark(){this._marks.push(this.offset);return this}popMark(){const t=this._marks.pop();if(t===undefined){throw new Error("Mark stack empty")}this.seek(t);return this}rewind(){this.offset=0;return this}ensureAvailable(t=1){if(!this.available(t)){const r=this.offset+t;const e=r*2;const n=new Uint8Array(e);n.set(new Uint8Array(this.buffer));this.buffer=n.buffer;this.length=e;this.byteLength=e;this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,r){const e=X[r].BYTES_PER_ELEMENT*t;const n=this.byteOffset+this.offset;const i=this.buffer.slice(n,n+e);if(this.littleEndian===$&&r!=="uint8"&&r!=="int8"){const t=new Uint8Array(this.buffer.slice(n,n+e));t.reverse();const i=new X[r](t.buffer);this.offset+=e;i.reverse();return i}const s=new X[r](i);this.offset+=e;return s}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);this.offset+=2;return t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);this.offset+=2;return t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);this.offset+=4;return t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);this.offset+=4;return t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);this.offset+=4;return t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);this.offset+=8;return t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);this.offset+=8;return t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);this.offset+=8;return t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let r="";for(let e=0;e<t;e++){r+=this.readChar()}return r}readUtf8(t=1){return Z(this.readBytes(t))}decodeText(t=1,r="utf8"){return Z(this.readBytes(t),r)}writeBoolean(t){this.writeUint8(t?255:0);return this}writeInt8(t){this.ensureAvailable(1);this._data.setInt8(this.offset++,t);this._updateLastWrittenByte();return this}writeUint8(t){this.ensureAvailable(1);this._data.setUint8(this.offset++,t);this._updateLastWrittenByte();return this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let r=0;r<t.length;r++){this._data.setUint8(this.offset++,t[r])}this._updateLastWrittenByte();return this}writeInt16(t){this.ensureAvailable(2);this._data.setInt16(this.offset,t,this.littleEndian);this.offset+=2;this._updateLastWrittenByte();return this}writeUint16(t){this.ensureAvailable(2);this._data.setUint16(this.offset,t,this.littleEndian);this.offset+=2;this._updateLastWrittenByte();return this}writeInt32(t){this.ensureAvailable(4);this._data.setInt32(this.offset,t,this.littleEndian);this.offset+=4;this._updateLastWrittenByte();return this}writeUint32(t){this.ensureAvailable(4);this._data.setUint32(this.offset,t,this.littleEndian);this.offset+=4;this._updateLastWrittenByte();return this}writeFloat32(t){this.ensureAvailable(4);this._data.setFloat32(this.offset,t,this.littleEndian);this.offset+=4;this._updateLastWrittenByte();return this}writeFloat64(t){this.ensureAvailable(8);this._data.setFloat64(this.offset,t,this.littleEndian);this.offset+=8;this._updateLastWrittenByte();return this}writeBigInt64(t){this.ensureAvailable(8);this._data.setBigInt64(this.offset,t,this.littleEndian);this.offset+=8;this._updateLastWrittenByte();return this}writeBigUint64(t){this.ensureAvailable(8);this._data.setBigUint64(this.offset,t,this.littleEndian);this.offset+=8;this._updateLastWrittenByte();return this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let r=0;r<t.length;r++){this.writeUint8(t.charCodeAt(r))}return this}writeUtf8(t){return this.writeBytes(K(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){if(this.offset>this.lastWrittenByte){this.lastWrittenByte=this.offset}}}function tt(t){let r=t.length;while(--r>=0){t[r]=0}}const rt=3;const et=258;const nt=29;const it=256;const st=it+1+nt;const ot=30;const at=512;const ut=new Array((st+2)*2);tt(ut);const ft=new Array(ot*2);tt(ft);const ct=new Array(at);tt(ct);const ht=new Array(et-rt+1);tt(ht);const lt=new Array(nt);tt(lt);const vt=new Array(ot);tt(vt);const dt=(t,r,e,n)=>{let i=t&65535|0,s=t>>>16&65535|0,o=0;while(e!==0){o=e>2e3?2e3:e;e-=o;do{i=i+r[n++]|0;s=s+i|0}while(--o);i%=65521;s%=65521}return i|s<<16|0};var wt=dt;const mt=()=>{let t,r=[];for(var e=0;e<256;e++){t=e;for(var n=0;n<8;n++){t=t&1?3988292384^t>>>1:t>>>1}r[e]=t}return r};const bt=new Uint32Array(mt());const pt=(t,r,e,n)=>{const i=bt;const s=n+e;t^=-1;for(let e=n;e<s;e++){t=t>>>8^i[(t^r[e])&255]}return t^-1};var Nt=pt;var Lt={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"};var At={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 gt=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);var yt=function(t){const r=Array.prototype.slice.call(arguments,1);while(r.length){const e=r.shift();if(!e){continue}if(typeof e!=="object"){throw new TypeError(e+"must be non-object")}for(const r in e){if(gt(e,r)){t[r]=e[r]}}}return t};var kt=t=>{let r=0;for(let e=0,n=t.length;e<n;e++){r+=t[e].length}const e=new Uint8Array(r);for(let r=0,n=0,i=t.length;r<i;r++){let i=t[r];e.set(i,n);n+=i.length}return e};var St={assign:yt,flattenChunks:kt};let xt=true;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){xt=false}const qt=new Uint8Array(256);for(let t=0;t<256;t++){qt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1}qt[254]=qt[254]=1;var Et=t=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode){return(new TextEncoder).encode(t)}let r,e,n,i,s,o=t.length,a=0;for(i=0;i<o;i++){e=t.charCodeAt(i);if((e&64512)===55296&&i+1<o){n=t.charCodeAt(i+1);if((n&64512)===56320){e=65536+(e-55296<<10)+(n-56320);i++}}a+=e<128?1:e<2048?2:e<65536?3:4}r=new Uint8Array(a);for(s=0,i=0;s<a;i++){e=t.charCodeAt(i);if((e&64512)===55296&&i+1<o){n=t.charCodeAt(i+1);if((n&64512)===56320){e=65536+(e-55296<<10)+(n-56320);i++}}if(e<128){r[s++]=e}else if(e<2048){r[s++]=192|e>>>6;r[s++]=128|e&63}else if(e<65536){r[s++]=224|e>>>12;r[s++]=128|e>>>6&63;r[s++]=128|e&63}else{r[s++]=240|e>>>18;r[s++]=128|e>>>12&63;r[s++]=128|e>>>6&63;r[s++]=128|e&63}}return r};const Mt=(t,r)=>{if(r<65534){if(t.subarray&&xt){return String.fromCharCode.apply(null,t.length===r?t:t.subarray(0,r))}}let e="";for(let n=0;n<r;n++){e+=String.fromCharCode(t[n])}return e};var jt=(t,r)=>{const e=r||t.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode){return(new TextDecoder).decode(t.subarray(0,r))}let n,i;const s=new Array(e*2);for(i=0,n=0;n<e;){let r=t[n++];if(r<128){s[i++]=r;continue}let o=qt[r];if(o>4){s[i++]=65533;n+=o-1;continue}r&=o===2?31:o===3?15:7;while(o>1&&n<e){r=r<<6|t[n++]&63;o--}if(o>1){s[i++]=65533;continue}if(r<65536){s[i++]=r}else{r-=65536;s[i++]=55296|r>>10&1023;s[i++]=56320|r&1023}}return Mt(s,i)};var Rt=(t,r)=>{r=r||t.length;if(r>t.length){r=t.length}let e=r-1;while(e>=0&&(t[e]&192)===128){e--}if(e<0){return r}if(e===0){return r}return e+qt[t[e]]>r?e:r};var It={string2buf:Et,buf2string:jt,utf8border:Rt};function Ot(){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 Bt=Ot;const Pt=16209;const Ft=16191;var Tt=function t(r,e){let n;let i;let s;let o;let a;let u;let f;let c;let h;let l;let v;let d;let w;let m;let b;let p;let N;let L;let A;let g;let y;let k;let S,x;const q=r.state;n=r.next_in;S=r.input;i=n+(r.avail_in-5);s=r.next_out;x=r.output;o=s-(e-r.avail_out);a=s+(r.avail_out-257);u=q.dmax;f=q.wsize;c=q.whave;h=q.wnext;l=q.window;v=q.hold;d=q.bits;w=q.lencode;m=q.distcode;b=(1<<q.lenbits)-1;p=(1<<q.distbits)-1;t:do{if(d<15){v+=S[n++]<<d;d+=8;v+=S[n++]<<d;d+=8}N=w[v&b];r:for(;;){L=N>>>24;v>>>=L;d-=L;L=N>>>16&255;if(L===0){x[s++]=N&65535}else if(L&16){A=N&65535;L&=15;if(L){if(d<L){v+=S[n++]<<d;d+=8}A+=v&(1<<L)-1;v>>>=L;d-=L}if(d<15){v+=S[n++]<<d;d+=8;v+=S[n++]<<d;d+=8}N=m[v&p];e:for(;;){L=N>>>24;v>>>=L;d-=L;L=N>>>16&255;if(L&16){g=N&65535;L&=15;if(d<L){v+=S[n++]<<d;d+=8;if(d<L){v+=S[n++]<<d;d+=8}}g+=v&(1<<L)-1;if(g>u){r.msg="invalid distance too far back";q.mode=Pt;break t}v>>>=L;d-=L;L=s-o;if(g>L){L=g-L;if(L>c){if(q.sane){r.msg="invalid distance too far back";q.mode=Pt;break t}}y=0;k=l;if(h===0){y+=f-L;if(L<A){A-=L;do{x[s++]=l[y++]}while(--L);y=s-g;k=x}}else if(h<L){y+=f+h-L;L-=h;if(L<A){A-=L;do{x[s++]=l[y++]}while(--L);y=0;if(h<A){L=h;A-=L;do{x[s++]=l[y++]}while(--L);y=s-g;k=x}}}else{y+=h-L;if(L<A){A-=L;do{x[s++]=l[y++]}while(--L);y=s-g;k=x}}while(A>2){x[s++]=k[y++];x[s++]=k[y++];x[s++]=k[y++];A-=3}if(A){x[s++]=k[y++];if(A>1){x[s++]=k[y++]}}}else{y=s-g;do{x[s++]=x[y++];x[s++]=x[y++];x[s++]=x[y++];A-=3}while(A>2);if(A){x[s++]=x[y++];if(A>1){x[s++]=x[y++]}}}}else if((L&64)===0){N=m[(N&65535)+(v&(1<<L)-1)];continue e}else{r.msg="invalid distance code";q.mode=Pt;break t}break}}else if((L&64)===0){N=w[(N&65535)+(v&(1<<L)-1)];continue r}else if(L&32){q.mode=Ft;break t}else{r.msg="invalid literal/length code";q.mode=Pt;break t}break}}while(n<i&&s<a);A=d>>3;n-=A;d-=A<<3;v&=(1<<d)-1;r.next_in=n;r.next_out=s;r.avail_in=n<i?5+(i-n):5-(n-i);r.avail_out=s<a?257+(a-s):257-(s-a);q.hold=v;q.bits=d;return};const Ct=15;const Dt=852;const zt=592;const Ut=0;const _t=1;const Vt=2;const Wt=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]);const Ht=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]);const Gt=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]);const Zt=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]);const Jt=(t,r,e,n,i,s,o,a)=>{const u=a.bits;let f=0;let c=0;let h=0,l=0;let v=0;let d=0;let w=0;let m=0;let b=0;let p=0;let N;let L;let A;let g;let y;let k=null;let S;const x=new Uint16Array(Ct+1);const q=new Uint16Array(Ct+1);let E=null;let M,j,R;for(f=0;f<=Ct;f++){x[f]=0}for(c=0;c<n;c++){x[r[e+c]]++}v=u;for(l=Ct;l>=1;l--){if(x[l]!==0){break}}if(v>l){v=l}if(l===0){i[s++]=1<<24|64<<16|0;i[s++]=1<<24|64<<16|0;a.bits=1;return 0}for(h=1;h<l;h++){if(x[h]!==0){break}}if(v<h){v=h}m=1;for(f=1;f<=Ct;f++){m<<=1;m-=x[f];if(m<0){return-1}}if(m>0&&(t===Ut||l!==1)){return-1}q[1]=0;for(f=1;f<Ct;f++){q[f+1]=q[f]+x[f]}for(c=0;c<n;c++){if(r[e+c]!==0){o[q[r[e+c]]++]=c}}if(t===Ut){k=E=o;S=20}else if(t===_t){k=Wt;E=Ht;S=257}else{k=Gt;E=Zt;S=0}p=0;c=0;f=h;y=s;d=v;w=0;A=-1;b=1<<v;g=b-1;if(t===_t&&b>Dt||t===Vt&&b>zt){return 1}for(;;){M=f-w;if(o[c]+1<S){j=0;R=o[c]}else if(o[c]>=S){j=E[o[c]-S];R=k[o[c]-S]}else{j=32+64;R=0}N=1<<f-w;L=1<<d;h=L;do{L-=N;i[y+(p>>w)+L]=M<<24|j<<16|R|0}while(L!==0);N=1<<f-1;while(p&N){N>>=1}if(N!==0){p&=N-1;p+=N}else{p=0}c++;if(--x[f]===0){if(f===l){break}f=r[e+o[c]]}if(f>v&&(p&g)!==A){if(w===0){w=v}y+=h;d=f-w;m=1<<d;while(d+w<l){m-=x[d+w];if(m<=0){break}d++;m<<=1}b+=1<<d;if(t===_t&&b>Dt||t===Vt&&b>zt){return 1}A=p&g;i[A]=v<<24|d<<16|y-s|0}}if(p!==0){i[y+p]=f-w<<24|64<<16|0}a.bits=v;return 0};var Kt=Jt;const Yt=0;const $t=1;const Xt=2;const{Z_FINISH:Qt,Z_BLOCK:tr,Z_TREES:rr,Z_OK:er,Z_STREAM_END:nr,Z_NEED_DICT:ir,Z_STREAM_ERROR:sr,Z_DATA_ERROR:or,Z_MEM_ERROR:ar,Z_BUF_ERROR:ur,Z_DEFLATED:fr}=At;const cr=16180;const hr=16181;const lr=16182;const vr=16183;const dr=16184;const wr=16185;const mr=16186;const br=16187;const pr=16188;const Nr=16189;const Lr=16190;const Ar=16191;const gr=16192;const yr=16193;const kr=16194;const Sr=16195;const xr=16196;const qr=16197;const Er=16198;const Mr=16199;const jr=16200;const Rr=16201;const Ir=16202;const Or=16203;const Br=16204;const Pr=16205;const Fr=16206;const Tr=16207;const Cr=16208;const Dr=16209;const zr=16210;const Ur=16211;const _r=852;const Vr=592;const Wr=15;const Hr=Wr;const Gr=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function Zr(){this.strm=null;this.mode=0;this.last=false;this.wrap=0;this.havedict=false;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 Jr=t=>{if(!t){return 1}const r=t.state;if(!r||r.strm!==t||r.mode<cr||r.mode>Ur){return 1}return 0};const Kr=t=>{if(Jr(t)){return sr}const r=t.state;t.total_in=t.total_out=r.total=0;t.msg="";if(r.wrap){t.adler=r.wrap&1}r.mode=cr;r.last=0;r.havedict=0;r.flags=-1;r.dmax=32768;r.head=null;r.hold=0;r.bits=0;r.lencode=r.lendyn=new Int32Array(_r);r.distcode=r.distdyn=new Int32Array(Vr);r.sane=1;r.back=-1;return er};const Yr=t=>{if(Jr(t)){return sr}const r=t.state;r.wsize=0;r.whave=0;r.wnext=0;return Kr(t)};const $r=(t,r)=>{let e;if(Jr(t)){return sr}const n=t.state;if(r<0){e=0;r=-r}else{e=(r>>4)+5;if(r<48){r&=15}}if(r&&(r<8||r>15)){return sr}if(n.window!==null&&n.wbits!==r){n.window=null}n.wrap=e;n.wbits=r;return Yr(t)};const Xr=(t,r)=>{if(!t){return sr}const e=new Zr;t.state=e;e.strm=t;e.window=null;e.mode=cr;const n=$r(t,r);if(n!==er){t.state=null}return n};const Qr=t=>Xr(t,Hr);let te=true;let re,ee;const ne=t=>{if(te){re=new Int32Array(512);ee=new Int32Array(32);let r=0;while(r<144){t.lens[r++]=8}while(r<256){t.lens[r++]=9}while(r<280){t.lens[r++]=7}while(r<288){t.lens[r++]=8}Kt($t,t.lens,0,288,re,0,t.work,{bits:9});r=0;while(r<32){t.lens[r++]=5}Kt(Xt,t.lens,0,32,ee,0,t.work,{bits:5});te=false}t.lencode=re;t.lenbits=9;t.distcode=ee;t.distbits=5};const ie=(t,r,e,n)=>{let i;const s=t.state;if(s.window===null){s.wsize=1<<s.wbits;s.wnext=0;s.whave=0;s.window=new Uint8Array(s.wsize)}if(n>=s.wsize){s.window.set(r.subarray(e-s.wsize,e),0);s.wnext=0;s.whave=s.wsize}else{i=s.wsize-s.wnext;if(i>n){i=n}s.window.set(r.subarray(e-n,e-n+i),s.wnext);n-=i;if(n){s.window.set(r.subarray(e-n,e),0);s.wnext=n;s.whave=s.wsize}else{s.wnext+=i;if(s.wnext===s.wsize){s.wnext=0}if(s.whave<s.wsize){s.whave+=i}}}return 0};const se=(t,r)=>{let e;let n,i;let s;let o;let a,u;let f;let c;let h,l;let v;let d;let w;let m=0;let b,p,N;let L,A,g;let y;let k;const S=new Uint8Array(4);let x;let q;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Jr(t)||!t.output||!t.input&&t.avail_in!==0){return sr}e=t.state;if(e.mode===Ar){e.mode=gr}o=t.next_out;i=t.output;u=t.avail_out;s=t.next_in;n=t.input;a=t.avail_in;f=e.hold;c=e.bits;h=a;l=u;k=er;t:for(;;){switch(e.mode){case cr:if(e.wrap===0){e.mode=gr;break}while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.wrap&2&&f===35615){if(e.wbits===0){e.wbits=15}e.check=0;S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0);f=0;c=0;e.mode=hr;break}if(e.head){e.head.done=false}if(!(e.wrap&1)||(((f&255)<<8)+(f>>8))%31){t.msg="incorrect header check";e.mode=Dr;break}if((f&15)!==fr){t.msg="unknown compression method";e.mode=Dr;break}f>>>=4;c-=4;y=(f&15)+8;if(e.wbits===0){e.wbits=y}if(y>15||y>e.wbits){t.msg="invalid window size";e.mode=Dr;break}e.dmax=1<<e.wbits;e.flags=0;t.adler=e.check=1;e.mode=f&512?Nr:Ar;f=0;c=0;break;case hr:while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.flags=f;if((e.flags&255)!==fr){t.msg="unknown compression method";e.mode=Dr;break}if(e.flags&57344){t.msg="unknown header flags set";e.mode=Dr;break}if(e.head){e.head.text=f>>8&1}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0)}f=0;c=0;e.mode=lr;case lr:while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.head){e.head.time=f}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;S[2]=f>>>16&255;S[3]=f>>>24&255;e.check=Nt(e.check,S,4,0)}f=0;c=0;e.mode=vr;case vr:while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.head){e.head.xflags=f&255;e.head.os=f>>8}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0)}f=0;c=0;e.mode=dr;case dr:if(e.flags&1024){while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.length=f;if(e.head){e.head.extra_len=f}if(e.flags&512&&e.wrap&4){S[0]=f&255;S[1]=f>>>8&255;e.check=Nt(e.check,S,2,0)}f=0;c=0}else if(e.head){e.head.extra=null}e.mode=wr;case wr:if(e.flags&1024){v=e.length;if(v>a){v=a}if(v){if(e.head){y=e.head.extra_len-e.length;if(!e.head.extra){e.head.extra=new Uint8Array(e.head.extra_len)}e.head.extra.set(n.subarray(s,s+v),y)}if(e.flags&512&&e.wrap&4){e.check=Nt(e.check,n,v,s)}a-=v;s+=v;e.length-=v}if(e.length){break t}}e.length=0;e.mode=mr;case mr:if(e.flags&2048){if(a===0){break t}v=0;do{y=n[s+v++];if(e.head&&y&&e.length<65536){e.head.name+=String.fromCharCode(y)}}while(y&&v<a);if(e.flags&512&&e.wrap&4){e.check=Nt(e.check,n,v,s)}a-=v;s+=v;if(y){break t}}else if(e.head){e.head.name=null}e.length=0;e.mode=br;case br:if(e.flags&4096){if(a===0){break t}v=0;do{y=n[s+v++];if(e.head&&y&&e.length<65536){e.head.comment+=String.fromCharCode(y)}}while(y&&v<a);if(e.flags&512&&e.wrap&4){e.check=Nt(e.check,n,v,s)}a-=v;s+=v;if(y){break t}}else if(e.head){e.head.comment=null}e.mode=pr;case pr:if(e.flags&512){while(c<16){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.wrap&4&&f!==(e.check&65535)){t.msg="header crc mismatch";e.mode=Dr;break}f=0;c=0}if(e.head){e.head.hcrc=e.flags>>9&1;e.head.done=true}t.adler=e.check=0;e.mode=Ar;break;case Nr:while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}t.adler=e.check=Gr(f);f=0;c=0;e.mode=Lr;case Lr:if(e.havedict===0){t.next_out=o;t.avail_out=u;t.next_in=s;t.avail_in=a;e.hold=f;e.bits=c;return ir}t.adler=e.check=1;e.mode=Ar;case Ar:if(r===tr||r===rr){break t}case gr:if(e.last){f>>>=c&7;c-=c&7;e.mode=Fr;break}while(c<3){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.last=f&1;f>>>=1;c-=1;switch(f&3){case 0:e.mode=yr;break;case 1:ne(e);e.mode=Mr;if(r===rr){f>>>=2;c-=2;break t}break;case 2:e.mode=xr;break;case 3:t.msg="invalid block type";e.mode=Dr}f>>>=2;c-=2;break;case yr:f>>>=c&7;c-=c&7;while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if((f&65535)!==(f>>>16^65535)){t.msg="invalid stored block lengths";e.mode=Dr;break}e.length=f&65535;f=0;c=0;e.mode=kr;if(r===rr){break t}case kr:e.mode=Sr;case Sr:v=e.length;if(v){if(v>a){v=a}if(v>u){v=u}if(v===0){break t}i.set(n.subarray(s,s+v),o);a-=v;s+=v;u-=v;o+=v;e.length-=v;break}e.mode=Ar;break;case xr:while(c<14){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.nlen=(f&31)+257;f>>>=5;c-=5;e.ndist=(f&31)+1;f>>>=5;c-=5;e.ncode=(f&15)+4;f>>>=4;c-=4;if(e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols";e.mode=Dr;break}e.have=0;e.mode=qr;case qr:while(e.have<e.ncode){while(c<3){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.lens[E[e.have++]]=f&7;f>>>=3;c-=3}while(e.have<19){e.lens[E[e.have++]]=0}e.lencode=e.lendyn;e.lenbits=7;x={bits:e.lenbits};k=Kt(Yt,e.lens,0,19,e.lencode,0,e.work,x);e.lenbits=x.bits;if(k){t.msg="invalid code lengths set";e.mode=Dr;break}e.have=0;e.mode=Er;case Er:while(e.have<e.nlen+e.ndist){for(;;){m=e.lencode[f&(1<<e.lenbits)-1];b=m>>>24;p=m>>>16&255;N=m&65535;if(b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(N<16){f>>>=b;c-=b;e.lens[e.have++]=N}else{if(N===16){q=b+2;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=b;c-=b;if(e.have===0){t.msg="invalid bit length repeat";e.mode=Dr;break}y=e.lens[e.have-1];v=3+(f&3);f>>>=2;c-=2}else if(N===17){q=b+3;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=b;c-=b;y=0;v=3+(f&7);f>>>=3;c-=3}else{q=b+7;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=b;c-=b;y=0;v=11+(f&127);f>>>=7;c-=7}if(e.have+v>e.nlen+e.ndist){t.msg="invalid bit length repeat";e.mode=Dr;break}while(v--){e.lens[e.have++]=y}}}if(e.mode===Dr){break}if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block";e.mode=Dr;break}e.lenbits=9;x={bits:e.lenbits};k=Kt($t,e.lens,0,e.nlen,e.lencode,0,e.work,x);e.lenbits=x.bits;if(k){t.msg="invalid literal/lengths set";e.mode=Dr;break}e.distbits=6;e.distcode=e.distdyn;x={bits:e.distbits};k=Kt(Xt,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,x);e.distbits=x.bits;if(k){t.msg="invalid distances set";e.mode=Dr;break}e.mode=Mr;if(r===rr){break t}case Mr:e.mode=jr;case jr:if(a>=6&&u>=258){t.next_out=o;t.avail_out=u;t.next_in=s;t.avail_in=a;e.hold=f;e.bits=c;Tt(t,l);o=t.next_out;i=t.output;u=t.avail_out;s=t.next_in;n=t.input;a=t.avail_in;f=e.hold;c=e.bits;if(e.mode===Ar){e.back=-1}break}e.back=0;for(;;){m=e.lencode[f&(1<<e.lenbits)-1];b=m>>>24;p=m>>>16&255;N=m&65535;if(b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(p&&(p&240)===0){L=b;A=p;g=N;for(;;){m=e.lencode[g+((f&(1<<L+A)-1)>>L)];b=m>>>24;p=m>>>16&255;N=m&65535;if(L+b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=L;c-=L;e.back+=L}f>>>=b;c-=b;e.back+=b;e.length=N;if(p===0){e.mode=Pr;break}if(p&32){e.back=-1;e.mode=Ar;break}if(p&64){t.msg="invalid literal/length code";e.mode=Dr;break}e.extra=p&15;e.mode=Rr;case Rr:if(e.extra){q=e.extra;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.length+=f&(1<<e.extra)-1;f>>>=e.extra;c-=e.extra;e.back+=e.extra}e.was=e.length;e.mode=Ir;case Ir:for(;;){m=e.distcode[f&(1<<e.distbits)-1];b=m>>>24;p=m>>>16&255;N=m&65535;if(b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if((p&240)===0){L=b;A=p;g=N;for(;;){m=e.distcode[g+((f&(1<<L+A)-1)>>L)];b=m>>>24;p=m>>>16&255;N=m&65535;if(L+b<=c){break}if(a===0){break t}a--;f+=n[s++]<<c;c+=8}f>>>=L;c-=L;e.back+=L}f>>>=b;c-=b;e.back+=b;if(p&64){t.msg="invalid distance code";e.mode=Dr;break}e.offset=N;e.extra=p&15;e.mode=Or;case Or:if(e.extra){q=e.extra;while(c<q){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}e.offset+=f&(1<<e.extra)-1;f>>>=e.extra;c-=e.extra;e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back";e.mode=Dr;break}e.mode=Br;case Br:if(u===0){break t}v=l-u;if(e.offset>v){v=e.offset-v;if(v>e.whave){if(e.sane){t.msg="invalid distance too far back";e.mode=Dr;break}}if(v>e.wnext){v-=e.wnext;d=e.wsize-v}else{d=e.wnext-v}if(v>e.length){v=e.length}w=e.window}else{w=i;d=o-e.offset;v=e.length}if(v>u){v=u}u-=v;e.length-=v;do{i[o++]=w[d++]}while(--v);if(e.length===0){e.mode=jr}break;case Pr:if(u===0){break t}i[o++]=e.length;u--;e.mode=jr;break;case Fr:if(e.wrap){while(c<32){if(a===0){break t}a--;f|=n[s++]<<c;c+=8}l-=u;t.total_out+=l;e.total+=l;if(e.wrap&4&&l){t.adler=e.check=e.flags?Nt(e.check,i,l,o-l):wt(e.check,i,l,o-l)}l=u;if(e.wrap&4&&(e.flags?f:Gr(f))!==e.check){t.msg="incorrect data check";e.mode=Dr;break}f=0;c=0}e.mode=Tr;case Tr:if(e.wrap&&e.flags){while(c<32){if(a===0){break t}a--;f+=n[s++]<<c;c+=8}if(e.wrap&4&&f!==(e.total&4294967295)){t.msg="incorrect length check";e.mode=Dr;break}f=0;c=0}e.mode=Cr;case Cr:k=nr;break t;case Dr:k=or;break t;case zr:return ar;case Ur:default:return sr}}t.next_out=o;t.avail_out=u;t.next_in=s;t.avail_in=a;e.hold=f;e.bits=c;if(e.wsize||l!==t.avail_out&&e.mode<Dr&&(e.mode<Fr||r!==Qt)){if(ie(t,t.output,t.next_out,l-t.avail_out));}h-=t.avail_in;l-=t.avail_out;t.total_in+=h;t.total_out+=l;e.total+=l;if(e.wrap&4&&l){t.adler=e.check=e.flags?Nt(e.check,i,l,t.next_out-l):wt(e.check,i,l,t.next_out-l)}t.data_type=e.bits+(e.last?64:0)+(e.mode===Ar?128:0)+(e.mode===Mr||e.mode===kr?256:0);if((h===0&&l===0||r===Qt)&&k===er){k=ur}return k};const oe=t=>{if(Jr(t)){return sr}let r=t.state;if(r.window){r.window=null}t.state=null;return er};const ae=(t,r)=>{if(Jr(t)){return sr}const e=t.state;if((e.wrap&2)===0){return sr}e.head=r;r.done=false;return er};const ue=(t,r)=>{const e=r.length;let n;let i;let s;if(Jr(t)){return sr}n=t.state;if(n.wrap!==0&&n.mode!==Lr){return sr}if(n.mode===Lr){i=1;i=wt(i,r,e,0);if(i!==n.check){return or}}s=ie(t,r,e,e);if(s){n.mode=zr;return ar}n.havedict=1;return er};var fe=Yr;var ce=$r;var he=Kr;var le=Qr;var ve=Xr;var de=se;var we=oe;var me=ae;var be=ue;var pe="pako inflate (from Nodeca project)";var Ne={inflateReset:fe,inflateReset2:ce,inflateResetKeep:he,inflateInit:le,inflateInit2:ve,inflate:de,inflateEnd:we,inflateGetHeader:me,inflateSetDictionary:be,inflateInfo:pe};function Le(){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=false}var Ae=Le;const ge=Object.prototype.toString;const{Z_NO_FLUSH:ye,Z_FINISH:ke,Z_OK:Se,Z_STREAM_END:xe,Z_NEED_DICT:qe,Z_STREAM_ERROR:Ee,Z_DATA_ERROR:Me,Z_MEM_ERROR:je}=At;function Re(t){this.options=St.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const r=this.options;if(r.raw&&r.windowBits>=0&&r.windowBits<16){r.windowBits=-r.windowBits;if(r.windowBits===0){r.windowBits=-15}}if(r.windowBits>=0&&r.windowBits<16&&!(t&&t.windowBits)){r.windowBits+=32}if(r.windowBits>15&&r.windowBits<48){if((r.windowBits&15)===0){r.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new Bt;this.strm.avail_out=0;let e=Ne.inflateInit2(this.strm,r.windowBits);if(e!==Se){throw new Error(Lt[e])}this.header=new Ae;Ne.inflateGetHeader(this.strm,this.header);if(r.dictionary){if(typeof r.dictionary==="string"){r.dictionary=It.string2buf(r.dictionary)}else if(ge.call(r.dictionary)==="[object ArrayBuffer]"){r.dictionary=new Uint8Array(r.dictionary)}if(r.raw){e=Ne.inflateSetDictionary(this.strm,r.dictionary);if(e!==Se){throw new Error(Lt[e])}}}}Re.prototype.push=function(t,r){const e=this.strm;const n=this.options.chunkSize;const i=this.options.dictionary;let s,o,a;if(this.ended)return false;if(r===~~r)o=r;else o=r===true?ke:ye;if(ge.call(t)==="[object ArrayBuffer]"){e.input=new Uint8Array(t)}else{e.input=t}e.next_in=0;e.avail_in=e.input.length;for(;;){if(e.avail_out===0){e.output=new Uint8Array(n);e.next_out=0;e.avail_out=n}s=Ne.inflate(e,o);if(s===qe&&i){s=Ne.inflateSetDictionary(e,i);if(s===Se){s=Ne.inflate(e,o)}else if(s===Me){s=qe}}while(e.avail_in>0&&s===xe&&e.state.wrap>0&&t[e.next_in]!==0){Ne.inflateReset(e);s=Ne.inflate(e,o)}switch(s){case Ee:case Me:case qe:case je:this.onEnd(s);this.ended=true;return false}a=e.avail_out;if(e.next_out){if(e.avail_out===0||s===xe){if(this.options.to==="string"){let t=It.utf8border(e.output,e.next_out);let r=e.next_out-t;let i=It.buf2string(e.output,t);e.next_out=r;e.avail_out=n-r;if(r)e.output.set(e.output.subarray(t,t+r),0);this.onData(i)}else{this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out))}}}if(s===Se&&a===0)continue;if(s===xe){s=Ne.inflateEnd(this.strm);this.onEnd(s);this.ended=true;return true}if(e.avail_in===0)break}return true};Re.prototype.onData=function(t){this.chunks.push(t)};Re.prototype.onEnd=function(t){if(t===Se){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=St.flattenChunks(this.chunks)}}this.chunks=[];this.err=t;this.msg=this.strm.msg};function Ie(t,r){const e=new Re(r);e.push(t);if(e.err)throw e.msg||Lt[e.err];return e.result}var Oe=Re;var Be=Ie;var Pe={Inflate:Oe,inflate:Be};const{Inflate:Fe,inflate:Te}=Pe;var Ce=Fe;var De=Te;const ze=[];for(let t=0;t<256;t++){let r=t;for(let t=0;t<8;t++){if(r&1){r=3988292384^r>>>1}else{r=r>>>1}}ze[t]=r}const Ue=4294967295;function _e(t,r,e){let n=t;for(let t=0;t<e;t++){n=ze[(n^r[t])&255]^n>>>8}return n}function Ve(t,r){return(_e(Ue,t,r)^Ue)>>>0}function We(t,r,e){const n=t.readUint32();const i=Ve(new Uint8Array(t.buffer,t.byteOffset+t.offset-r-4,r),r);if(i!==n){throw new Error(`CRC mismatch for chunk ${e}. Expected ${n}, found ${i}`)}}function He(t,r,e){for(let n=0;n<e;n++){r[n]=t[n]}}function Ge(t,r,e,n){let i=0;for(;i<n;i++){r[i]=t[i]}for(;i<e;i++){r[i]=t[i]+r[i-n]&255}}function Ze(t,r,e,n){let i=0;if(e.length===0){for(;i<n;i++){r[i]=t[i]}}else{for(;i<n;i++){r[i]=t[i]+e[i]&255}}}function Je(t,r,e,n,i){let s=0;if(e.length===0){for(;s<i;s++){r[s]=t[s]}for(;s<n;s++){r[s]=t[s]+(r[s-i]>>1)&255}}else{for(;s<i;s++){r[s]=t[s]+(e[s]>>1)&255}for(;s<n;s++){r[s]=t[s]+(r[s-i]+e[s]>>1)&255}}}function Ke(t,r,e,n,i){let s=0;if(e.length===0){for(;s<i;s++){r[s]=t[s]}for(;s<n;s++){r[s]=t[s]+r[s-i]&255}}else{for(;s<i;s++){r[s]=t[s]+e[s]&255}for(;s<n;s++){r[s]=t[s]+Ye(r[s-i],e[s],e[s-i])&255}}}function Ye(t,r,e){const n=t+r-e;const i=Math.abs(n-t);const s=Math.abs(n-r);const o=Math.abs(n-e);if(i<=s&&i<=o)return t;else if(s<=o)return r;else return e}function $e(t,r,e,n,i,s){switch(t){case 0:He(r,e,i);break;case 1:Ge(r,e,i,s);break;case 2:Ze(r,e,n,i);break;case 3:Je(r,e,n,i,s);break;case 4:Ke(r,e,n,i,s);break;default:throw new Error(`Unsupported filter: ${t}`)}}const Xe=new Uint16Array([255]);const Qe=new Uint8Array(Xe.buffer);const tn=Qe[0]===255;function rn(t){const{data:r,width:e,height:n,channels:i,depth:s}=t;const o=[{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}];const a=Math.ceil(s/8)*i;const u=new Uint8Array(n*e*a);let f=0;for(let t=0;t<7;t++){const i=o[t];const s=Math.ceil((e-i.x)/i.xStep);const c=Math.ceil((n-i.y)/i.yStep);if(s<=0||c<=0)continue;const h=s*a;const l=new Uint8Array(h);for(let t=0;t<c;t++){const o=r[f++];const c=r.subarray(f,f+h);f+=h;const v=new Uint8Array(h);$e(o,c,v,l,h,a);l.set(v);for(let r=0;r<s;r++){const s=i.x+r*i.xStep;const o=i.y+t*i.yStep;if(s>=e||o>=n)continue;for(let t=0;t<a;t++){u[(o*e+s)*a+t]=v[r*a+t]}}}}if(s===16){const t=new Uint16Array(u.buffer);if(tn){for(let r=0;r<t.length;r++){t[r]=en(t[r])}}return t}else{return u}}function en(t){return(t&255)<<8|t>>8&255}const nn=new Uint16Array([255]);const sn=new Uint8Array(nn.buffer);const on=sn[0]===255;const an=new Uint8Array(0);function un(t){const{data:r,width:e,height:n,channels:i,depth:s}=t;const o=Math.ceil(s/8)*i;const a=Math.ceil(s/8*i*e);const u=new Uint8Array(n*a);let f=an;let c=0;let h;let l;for(let t=0;t<n;t++){h=r.subarray(c+1,c+1+a);l=u.subarray(t*a,(t+1)*a);switch(r[c]){case 0:He(h,l,a);break;case 1:Ge(h,l,a,o);break;case 2:Ze(h,l,f,a);break;case 3:Je(h,l,f,a,o);break;case 4:Ke(h,l,f,a,o);break;default:throw new Error(`Unsupported filter: ${r[c]}`)}f=l;c+=a+1}if(s===16){const t=new Uint16Array(u.buffer);if(on){for(let r=0;r<t.length;r++){t[r]=fn(t[r])}}return t}else{return u}}function fn(t){return(t&255)<<8|t>>8&255}const cn=Uint8Array.of(137,80,78,71,13,10,26,10);function hn(t){if(!ln(t.readBytes(cn.length))){throw new Error("wrong PNG signature")}}function ln(t){if(t.length<cn.length){return false}for(let r=0;r<cn.length;r++){if(t[r]!==cn[r]){return false}}return true}const vn="tEXt";const dn=0;const wn=new TextDecoder("latin1");function mn(t){pn(t);if(t.length===0||t.length>79){throw new Error("keyword length must be between 1 and 79")}}const bn=/^[\u0000-\u00FF]*$/;function pn(t){if(!bn.test(t)){throw new Error("invalid latin1 text")}}function Nn(t,r,e){const n=Ln(r);t[n]=An(r,e-n.length-1)}function Ln(t){t.mark();while(t.readByte()!==dn){}const r=t.offset;t.reset();const e=wn.decode(t.readBytes(r-t.offset-1));t.skip(1);mn(e);return e}function An(t,r){return wn.decode(t.readBytes(r))}const gn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6};const yn={UNKNOWN:-1,DEFLATE:0};const kn={UNKNOWN:-1,ADAPTIVE:0};const Sn={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1};const xn={NONE:0,BACKGROUND:1,PREVIOUS:2};const qn={SOURCE:0,OVER:1};class En extends Q{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,r={}){super(t);const{checkCrc:e=false}=r;this._checkCrc=e;this._inflator=new Ce;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=false;this._hasPalette=false;this._palette=[];this._hasTransparency=false;this._transparency=new Uint16Array(0);this._compressionMethod=yn.UNKNOWN;this._filterMethod=kn.UNKNOWN;this._interlaceMethod=Sn.UNKNOWN;this._colorType=gn.UNKNOWN;this._isAnimated=false;this._numberOfFrames=1;this._numberOfPlays=0;this._frames=[];this._writingDataChunks=false;this.setBigEndian()}decode(){hn(this);while(!this._end){const t=this.readUint32();const r=this.readChars(4);this.decodeChunk(t,r)}this.decodeImage();return this._png}decodeApng(){hn(this);while(!this._end){const t=this.readUint32();const r=this.readChars(4);this.decodeApngChunk(t,r)}this.decodeApngImage();return this._apng}decodeChunk(t,r){const e=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=true;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case vn:Nn(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-e!==t){throw new Error(`Length mismatch while decoding chunk ${r}`)}if(this._checkCrc){We(this,t+4,r)}else{this.skip(4)}}decodeApngChunk(t,r){const e=this.offset;if(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks){this.pushDataToFrame()}switch(r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,r);this.offset=e+t;break}if(this.offset-e!==t){throw new Error(`Length mismatch while decoding chunk ${r}`)}if(this._checkCrc){We(this,t+4,r)}else{this.skip(4)}}decodeIHDR(){const t=this._png;t.width=this.readUint32();t.height=this.readUint32();t.depth=Mn(this.readUint8());const r=this.readUint8();this._colorType=r;let e;switch(r){case gn.GREYSCALE:e=1;break;case gn.TRUECOLOUR:e=3;break;case gn.INDEXED_COLOUR:e=1;break;case gn.GREYSCALE_ALPHA:e=2;break;case gn.TRUECOLOUR_ALPHA:e=4;break;case gn.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}this._png.channels=e;this._compressionMethod=this.readUint8();if(this._compressionMethod!==yn.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=true}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0){throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`)}const r=t/3;this._hasPalette=true;const e=[];this._palette=e;for(let t=0;t<r;t++){e.push([this.readUint8(),this.readUint8(),this.readUint8()])}}decodeIDAT(t){this._writingDataChunks=true;const r=t;const e=this.offset+this.byteOffset;this._inflator.push(new Uint8Array(this.buffer,e,r));if(this._inflator.err){throw new Error(`Error while decompressing the data: ${this._inflator.err}`)}this.skip(t)}decodeFDAT(t){this._writingDataChunks=true;let r=t;let e=this.offset+this.byteOffset;e+=4;r-=4;this._inflator.push(new Uint8Array(this.buffer,e,r));if(this._inflator.err){throw new Error(`Error while decompressing the data: ${this._inflator.err}`)}this.skip(t)}decodetRNS(t){switch(this._colorType){case gn.GREYSCALE:case gn.TRUECOLOUR:{if(t%2!==0){throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`)}if(t/2>this._png.width*this._png.height){throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`)}this._hasTransparency=true;this._transparency=new Uint16Array(t/2);for(let r=0;r<t/2;r++){this._transparency[r]=this.readUint16()}break}case gn.INDEXED_COLOUR:{if(t>this._palette.length){throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`)}let r=0;for(;r<t;r++){const t=this.readByte();this._palette[r].push(t)}for(;r<this._palette.length;r++){this._palette[r].push(255)}break}case gn.UNKNOWN:case gn.GREYSCALE_ALPHA:case gn.TRUECOLOUR_ALPHA:default:{throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}}decodeiCCP(t){const r=Ln(this);const e=this.readUint8();if(e!==yn.DEFLATE){throw new Error(`Unsupported iCCP compression method: ${e}`)}const n=this.readBytes(t-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:De(n)}}decodepHYs(){const t=this.readUint32();const r=this.readUint32();const e=this.readByte();this._png.resolution={x:t,y:r,unit:e}}decodeApngImage(){this._apng.width=this._png.width;this._apng.height=this._png.height;this._apng.channels=this._png.channels;this._apng.depth=this._png.depth;this._apng.numberOfFrames=this._numberOfFrames;this._apng.numberOfPlays=this._numberOfPlays;this._apng.text=this._png.text;this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const r={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)};const e=this._frames.at(t);if(e){e.data=un({data:e.data,width:e.width,height:e.height,channels:this._apng.channels,depth:this._apng.depth});if(this._hasPalette){this._apng.palette=this._palette}if(this._hasTransparency){this._apng.transparency=this._transparency}if(t===0||e.xOffset===0&&e.yOffset===0&&e.width===this._png.width&&e.height===this._png.height){r.data=e.data}else{const n=this._apng.frames.at(t-1);this.disposeFrame(e,n,r);this.addFrameDataToCanvas(r,e)}this._apng.frames.push(r)}}return this._apng}disposeFrame(t,r,e){switch(t.disposeOp){case xn.NONE:break;case xn.BACKGROUND:for(let r=0;r<this._png.height;r++){for(let n=0;n<this._png.width;n++){const i=(r*t.width+n)*this._png.channels;for(let t=0;t<this._png.channels;t++){e.data[i+t]=0}}}break;case xn.PREVIOUS:e.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,r){const e=1<<this._png.depth;const n=(t,e)=>{const n=((t+r.yOffset)*this._png.width+r.xOffset+e)*this._png.channels;const i=(t*r.width+e)*this._png.channels;return{index:n,frameIndex:i}};switch(r.blendOp){case qn.SOURCE:for(let e=0;e<r.height;e++){for(let i=0;i<r.width;i++){const{index:s,frameIndex:o}=n(e,i);for(let e=0;e<this._png.channels;e++){t.data[s+e]=r.data[o+e]}}}break;case qn.OVER:for(let i=0;i<r.height;i++){for(let s=0;s<r.width;s++){const{index:o,frameIndex:a}=n(i,s);for(let n=0;n<this._png.channels;n++){const i=r.data[a+this._png.channels-1]/e;const s=n%(this._png.channels-1)===0?1:r.data[a+n];const u=Math.floor(i*s+(1-i)*t.data[o+n]);t.data[o+n]+=u}}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err){throw new Error(`Error while decompressing the data: ${this._inflator.err}`)}const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==kn.ADAPTIVE){throw new Error(`Filter method ${this._filterMethod} not supported`)}if(this._interlaceMethod===Sn.NO_INTERLACE){this._png.data=un({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}else if(this._interlaceMethod===Sn.ADAM7){this._png.data=rn({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}else{throw new Error(`Interlace method ${this._interlaceMethod} not supported`)}if(this._hasPalette){this._png.palette=this._palette}if(this._hasTransparency){this._png.transparency=this._transparency}}pushDataToFrame(){const t=this._inflator.result;const r=this._frames.at(-1);if(r){r.data=t}else{this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:xn.NONE,blendOp:qn.SOURCE,data:t})}this._inflator=new Ce;this._writingDataChunks=false}}function Mn(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16){throw new Error(`invalid bit depth: ${t}`)}return t}var jn;(function(t){t[t["UNKNOWN"]=0]="UNKNOWN";t[t["METRE"]=1]="METRE"})(jn||(jn={}));function Rn(t,r){const e=new En(t,r);return e.decode()}
2
2
  /** @license
3
3
  *
4
4
  * jsPDF - PDF Document creation from JavaScript
@@ -62,7 +62,7 @@ function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"sym
62
62
  * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
63
63
  *
64
64
  * Modified by: Owen Leong
65
- */function _n(t,r){var e=t[0],n=t[1],i=t[2],s=t[3];e=Wn(e,n,i,s,r[0],7,-680876936),s=Wn(s,e,n,i,r[1],12,-389564586),i=Wn(i,s,e,n,r[2],17,606105819),n=Wn(n,i,s,e,r[3],22,-1044525330),e=Wn(e,n,i,s,r[4],7,-176418897),s=Wn(s,e,n,i,r[5],12,1200080426),i=Wn(i,s,e,n,r[6],17,-1473231341),n=Wn(n,i,s,e,r[7],22,-45705983),e=Wn(e,n,i,s,r[8],7,1770035416),s=Wn(s,e,n,i,r[9],12,-1958414417),i=Wn(i,s,e,n,r[10],17,-42063),n=Wn(n,i,s,e,r[11],22,-1990404162),e=Wn(e,n,i,s,r[12],7,1804603682),s=Wn(s,e,n,i,r[13],12,-40341101),i=Wn(i,s,e,n,r[14],17,-1502002290),e=Hn(e,n=Wn(n,i,s,e,r[15],22,1236535329),i,s,r[1],5,-165796510),s=Hn(s,e,n,i,r[6],9,-1069501632),i=Hn(i,s,e,n,r[11],14,643717713),n=Hn(n,i,s,e,r[0],20,-373897302),e=Hn(e,n,i,s,r[5],5,-701558691),s=Hn(s,e,n,i,r[10],9,38016083),i=Hn(i,s,e,n,r[15],14,-660478335),n=Hn(n,i,s,e,r[4],20,-405537848),e=Hn(e,n,i,s,r[9],5,568446438),s=Hn(s,e,n,i,r[14],9,-1019803690),i=Hn(i,s,e,n,r[3],14,-187363961),n=Hn(n,i,s,e,r[8],20,1163531501),e=Hn(e,n,i,s,r[13],5,-1444681467),s=Hn(s,e,n,i,r[2],9,-51403784),i=Hn(i,s,e,n,r[7],14,1735328473),e=Gn(e,n=Hn(n,i,s,e,r[12],20,-1926607734),i,s,r[5],4,-378558),s=Gn(s,e,n,i,r[8],11,-2022574463),i=Gn(i,s,e,n,r[11],16,1839030562),n=Gn(n,i,s,e,r[14],23,-35309556),e=Gn(e,n,i,s,r[1],4,-1530992060),s=Gn(s,e,n,i,r[4],11,1272893353),i=Gn(i,s,e,n,r[7],16,-155497632),n=Gn(n,i,s,e,r[10],23,-1094730640),e=Gn(e,n,i,s,r[13],4,681279174),s=Gn(s,e,n,i,r[0],11,-358537222),i=Gn(i,s,e,n,r[3],16,-722521979),n=Gn(n,i,s,e,r[6],23,76029189),e=Gn(e,n,i,s,r[9],4,-640364487),s=Gn(s,e,n,i,r[12],11,-421815835),i=Gn(i,s,e,n,r[15],16,530742520),e=Jn(e,n=Gn(n,i,s,e,r[2],23,-995338651),i,s,r[0],6,-198630844),s=Jn(s,e,n,i,r[7],10,1126891415),i=Jn(i,s,e,n,r[14],15,-1416354905),n=Jn(n,i,s,e,r[5],21,-57434055),e=Jn(e,n,i,s,r[12],6,1700485571),s=Jn(s,e,n,i,r[3],10,-1894986606),i=Jn(i,s,e,n,r[10],15,-1051523),n=Jn(n,i,s,e,r[1],21,-2054922799),e=Jn(e,n,i,s,r[8],6,1873313359),s=Jn(s,e,n,i,r[15],10,-30611744),i=Jn(i,s,e,n,r[6],15,-1560198380),n=Jn(n,i,s,e,r[13],21,1309151649),e=Jn(e,n,i,s,r[4],6,-145523070),s=Jn(s,e,n,i,r[11],10,-1120210379),i=Jn(i,s,e,n,r[2],15,718787259),n=Jn(n,i,s,e,r[9],21,-343485551),t[0]=ri(e,t[0]),t[1]=ri(n,t[1]),t[2]=ri(i,t[2]),t[3]=ri(s,t[3])}function Vn(t,r,e,n,i,s){return r=ri(ri(r,t),ri(n,s)),ri(r<<i|r>>>32-i,e)}function Wn(t,r,e,n,i,s,o){return Vn(r&e|~r&n,t,r,i,s,o)}function Hn(t,r,e,n,i,s,o){return Vn(r&n|e&~n,t,r,i,s,o)}function Gn(t,r,e,n,i,s,o){return Vn(r^e^n,t,r,i,s,o)}function Jn(t,r,e,n,i,s,o){return Vn(e^(r|~n),t,r,i,s,o)}function Zn(t){var r,e=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=t.length;r+=64)_n(n,Kn(t.substring(r-64,r)));t=t.substring(r-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<t.length;r++)i[r>>2]|=t.charCodeAt(r)<<(r%4<<3);if(i[r>>2]|=128<<(r%4<<3),r>55)for(_n(n,i),r=0;r<16;r++)i[r]=0;return i[14]=8*e,_n(n,i),n}function Kn(t){var r,e=[];for(r=0;r<64;r+=4)e[r>>2]=t.charCodeAt(r)+(t.charCodeAt(r+1)<<8)+(t.charCodeAt(r+2)<<16)+(t.charCodeAt(r+3)<<24);return e}var Yn="0123456789abcdef".split("");function $n(t){for(var r="",e=0;e<4;e++)r+=Yn[t>>8*e+4&15]+Yn[t>>8*e&15];return r}function Xn(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Qn(t){return Zn(t).map(Xn).join("")}var ti="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var r=0;r<t.length;r++)t[r]=$n(t[r]);return t.join("")}(Zn("hello"));function ri(t,r){if(ti){var e=(65535&t)+(65535&r);return(t>>16)+(r>>16)+(e>>16)<<16|65535&e}return t+r&4294967295}
65
+ */function _n(t,r){var e=t[0],n=t[1],i=t[2],s=t[3];e=Wn(e,n,i,s,r[0],7,-680876936),s=Wn(s,e,n,i,r[1],12,-389564586),i=Wn(i,s,e,n,r[2],17,606105819),n=Wn(n,i,s,e,r[3],22,-1044525330),e=Wn(e,n,i,s,r[4],7,-176418897),s=Wn(s,e,n,i,r[5],12,1200080426),i=Wn(i,s,e,n,r[6],17,-1473231341),n=Wn(n,i,s,e,r[7],22,-45705983),e=Wn(e,n,i,s,r[8],7,1770035416),s=Wn(s,e,n,i,r[9],12,-1958414417),i=Wn(i,s,e,n,r[10],17,-42063),n=Wn(n,i,s,e,r[11],22,-1990404162),e=Wn(e,n,i,s,r[12],7,1804603682),s=Wn(s,e,n,i,r[13],12,-40341101),i=Wn(i,s,e,n,r[14],17,-1502002290),e=Hn(e,n=Wn(n,i,s,e,r[15],22,1236535329),i,s,r[1],5,-165796510),s=Hn(s,e,n,i,r[6],9,-1069501632),i=Hn(i,s,e,n,r[11],14,643717713),n=Hn(n,i,s,e,r[0],20,-373897302),e=Hn(e,n,i,s,r[5],5,-701558691),s=Hn(s,e,n,i,r[10],9,38016083),i=Hn(i,s,e,n,r[15],14,-660478335),n=Hn(n,i,s,e,r[4],20,-405537848),e=Hn(e,n,i,s,r[9],5,568446438),s=Hn(s,e,n,i,r[14],9,-1019803690),i=Hn(i,s,e,n,r[3],14,-187363961),n=Hn(n,i,s,e,r[8],20,1163531501),e=Hn(e,n,i,s,r[13],5,-1444681467),s=Hn(s,e,n,i,r[2],9,-51403784),i=Hn(i,s,e,n,r[7],14,1735328473),e=Gn(e,n=Hn(n,i,s,e,r[12],20,-1926607734),i,s,r[5],4,-378558),s=Gn(s,e,n,i,r[8],11,-2022574463),i=Gn(i,s,e,n,r[11],16,1839030562),n=Gn(n,i,s,e,r[14],23,-35309556),e=Gn(e,n,i,s,r[1],4,-1530992060),s=Gn(s,e,n,i,r[4],11,1272893353),i=Gn(i,s,e,n,r[7],16,-155497632),n=Gn(n,i,s,e,r[10],23,-1094730640),e=Gn(e,n,i,s,r[13],4,681279174),s=Gn(s,e,n,i,r[0],11,-358537222),i=Gn(i,s,e,n,r[3],16,-722521979),n=Gn(n,i,s,e,r[6],23,76029189),e=Gn(e,n,i,s,r[9],4,-640364487),s=Gn(s,e,n,i,r[12],11,-421815835),i=Gn(i,s,e,n,r[15],16,530742520),e=Zn(e,n=Gn(n,i,s,e,r[2],23,-995338651),i,s,r[0],6,-198630844),s=Zn(s,e,n,i,r[7],10,1126891415),i=Zn(i,s,e,n,r[14],15,-1416354905),n=Zn(n,i,s,e,r[5],21,-57434055),e=Zn(e,n,i,s,r[12],6,1700485571),s=Zn(s,e,n,i,r[3],10,-1894986606),i=Zn(i,s,e,n,r[10],15,-1051523),n=Zn(n,i,s,e,r[1],21,-2054922799),e=Zn(e,n,i,s,r[8],6,1873313359),s=Zn(s,e,n,i,r[15],10,-30611744),i=Zn(i,s,e,n,r[6],15,-1560198380),n=Zn(n,i,s,e,r[13],21,1309151649),e=Zn(e,n,i,s,r[4],6,-145523070),s=Zn(s,e,n,i,r[11],10,-1120210379),i=Zn(i,s,e,n,r[2],15,718787259),n=Zn(n,i,s,e,r[9],21,-343485551),t[0]=ri(e,t[0]),t[1]=ri(n,t[1]),t[2]=ri(i,t[2]),t[3]=ri(s,t[3])}function Vn(t,r,e,n,i,s){return r=ri(ri(r,t),ri(n,s)),ri(r<<i|r>>>32-i,e)}function Wn(t,r,e,n,i,s,o){return Vn(r&e|~r&n,t,r,i,s,o)}function Hn(t,r,e,n,i,s,o){return Vn(r&n|e&~n,t,r,i,s,o)}function Gn(t,r,e,n,i,s,o){return Vn(r^e^n,t,r,i,s,o)}function Zn(t,r,e,n,i,s,o){return Vn(e^(r|~n),t,r,i,s,o)}function Jn(t){var r,e=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=t.length;r+=64)_n(n,Kn(t.substring(r-64,r)));t=t.substring(r-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<t.length;r++)i[r>>2]|=t.charCodeAt(r)<<(r%4<<3);if(i[r>>2]|=128<<(r%4<<3),r>55)for(_n(n,i),r=0;r<16;r++)i[r]=0;return i[14]=8*e,_n(n,i),n}function Kn(t){var r,e=[];for(r=0;r<64;r+=4)e[r>>2]=t.charCodeAt(r)+(t.charCodeAt(r+1)<<8)+(t.charCodeAt(r+2)<<16)+(t.charCodeAt(r+3)<<24);return e}var Yn="0123456789abcdef".split("");function $n(t){for(var r="",e=0;e<4;e++)r+=Yn[t>>8*e+4&15]+Yn[t>>8*e&15];return r}function Xn(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Qn(t){return Jn(t).map(Xn).join("")}var ti="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var r=0;r<t.length;r++)t[r]=$n(t[r]);return t.join("")}(Jn("hello"));function ri(t,r){if(ti){var e=(65535&t)+(65535&r);return(t>>16)+(r>>16)+(e>>16)<<16|65535&e}return t+r&4294967295}
66
66
  /**
67
67
  * @license
68
68
  * FPDF is released under a permissive license: there is no usage restriction.
@@ -81,7 +81,7 @@ function t(r){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"sym
81
81
  * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
82
82
  * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
83
83
  * http://www.fpdf.org/en/script/script37.php
84
- */var ni={print:4,modify:8,copy:16,"annot-forms":32};function ii(t,r,e,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==ni.perm)throw new Error("Invalid permission: "+t);i+=ni[t]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var s=(r+this.padding).substr(0,32),o=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,o),this.P=-(1+(255^i)),this.encryptionKey=Qn(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=ei(this.encryptionKey,this.padding)}function si(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var r="",e=t.length,n=0;n<e;n++){var i=t.charCodeAt(n);r+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):t[n]}return r}function oi(r){if("object"!==t(r))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,n){if(n=n||false,"string"!=typeof t||"function"!=typeof r||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[r,!!n],i},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],0===Object.keys(e[r]).length&&delete e[r],true;return false},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var s in e[t]){var o=e[t][s];try{o[0].apply(r,n)}catch(t){In.console&&Bn.error("jsPDF PubSub Error",t.message,t)}o[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function ai(t){if(!(this instanceof ai))return new ai(t);var r="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&r.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function ui(t,r){this.gState=t,this.matrix=r,this.id="",this.objectNumber=-1}function fi(t,r,e,n,i){if(!(this instanceof fi))return new fi(t,r,e,n,i);this.type="axial"===t?2:3,this.coords=r,this.colors=e,ui.call(this,n,i)}function ci(t,r,e,n,i){if(!(this instanceof ci))return new ci(t,r,e,n,i);this.boundingBox=t,this.xStep=r,this.yStep=e,this.stream="",this.cloneIndex=0,ui.call(this,n,i)}function hi(r){var e,n="string"==typeof arguments[0]?arguments[0]:"p",i=arguments[1],s=arguments[2],o=arguments[3],a=[],u=1,f=16,c="S",h=null;"object"===t(r=r||{})&&(n=r.orientation,i=r.unit||i,s=r.format||s,o=r.compress||r.compressPdf||o,null!==(h=r.encryption||null)&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),u="number"==typeof r.userUnit?Math.abs(r.userUnit):1,void 0!==r.precision&&(e=r.precision),void 0!==r.floatPrecision&&(f=r.floatPrecision),c=r.defaultPathOperation||"S"),a=r.filters||(true===o?["FlateEncode"]:a),i=i||"mm",n=(""+(n||"P")).toLowerCase();var l=r.putOnlyUsedFonts||false,v={},d={internal:{},__private__:{}};d.__private__.PubSub=oi;var w="1.3",m=d.__private__.getPdfVersion=function(){return w};d.__private__.setPdfVersion=function(t){w=t};var b={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return b};var p=d.__private__.getPageFormat=function(t){return b[t]};s=s||"a4";var N="compat",L="advanced",A=N;function g(){this.saveGraphicsState(),X(new It(vt,0,0,-vt,0,ve()*vt).toString()+" cm"),this.setFontSize(this.getFontSize()/vt),c="n",A=L}function y(){this.restoreGraphicsState(),c="S",A=N}var k=d.__private__.combineFontStyleAndFontWeight=function(t,r){if("bold"==t&&"normal"==r||"bold"==t&&400==r||"normal"==t&&"italic"==r||"bold"==t&&"italic"==r)throw new Error("Invalid Combination of fontweight and fontstyle");return r&&(t=400==r||"normal"===r?"italic"===t?"italic":"normal":700!=r&&"bold"!==r||"normal"!==t?(700==r?"bold":r)+""+t:"bold"),t};d.advancedAPI=function(t){var r=A===N;return r&&g.call(this),"function"!=typeof t||(t(this),r&&y.call(this)),this},d.compatAPI=function(t){var r=A===L;return r&&y.call(this),"function"!=typeof t||(t(this),r&&g.call(this)),this},d.isAdvancedAPI=function(){return A===L};var S,x=function(t){if(A!==L)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},q=d.roundToPrecision=d.__private__.roundToPrecision=function(t,r){var n=e||r;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};S=d.hpf=d.__private__.hpf="number"==typeof f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return q(t,f)}:"smart"===f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return q(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return q(t,16)};var E=d.f2=d.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return q(t,2)},M=d.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return q(t,3)},j=d.scale=d.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return A===N?t*vt:A===L?t:void 0},R=function(t){return j(function(t){return A===N?ve()-t:A===L?t:void 0}(t))};d.__private__.setPrecision=d.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var I,O="00000000000000000000000000000000",B=d.__private__.getFileId=function(){return O},P=d.__private__.setFileId=function(t){return O=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():O.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==h&&(Nr=new ii(h.userPermissions,h.userPassword,h.ownerPassword,O)),O};d.setFileId=function(t){return P(t),this},d.getFileId=function(){return B()};var F=d.__private__.convertDateToPDFDate=function(t){var r=t.getTimezoneOffset(),e=r<0?"+":"-",n=Math.floor(Math.abs(r/60)),i=Math.abs(r%60),s=[e,U(n),"'",U(i),"'"].join("");return["D:",t.getFullYear(),U(t.getMonth()+1),U(t.getDate()),U(t.getHours()),U(t.getMinutes()),U(t.getSeconds()),s].join("")},T=d.__private__.convertPDFDateToDate=function(t){var r=parseInt(t.substr(2,4),10),e=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(r,e,n,i,s,o,0)},C=d.__private__.setCreationDate=function(t){var r;if(void 0===t&&(t=new Date),t instanceof Date)r=F(t);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(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");r=t}return I=r},D=d.__private__.getCreationDate=function(t){var r=I;return"jsDate"===t&&(r=T(I)),r};d.setCreationDate=function(t){return C(t),this},d.getCreationDate=function(t){return D(t)};var z,U=d.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},_=d.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},V=0,W=[],H=[],G=0,J=[],Z=[],K=false,Y=H;d.__private__.setCustomOutputDestination=function(t){K=true,Y=t};var $=function(t){K||(Y=t)};d.__private__.resetCustomOutputDestination=function(){K=false,Y=H};var X=d.__private__.out=function(t){return t=t.toString(),G+=t.length+1,Y.push(t),Y},Q=d.__private__.write=function(t){return X(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},tt=d.__private__.getArrayBuffer=function(t){for(var r=t.length,e=new ArrayBuffer(r),n=new Uint8Array(e);r--;)n[r]=t.charCodeAt(r);return e},rt=[["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]];d.__private__.getStandardFonts=function(){return rt};var et=r.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(t){return et=A===L?t/vt:t,this};var nt,it=d.__private__.getFontSize=d.getFontSize=function(){return A===N?et:et*vt},st=r.R2L||false;d.__private__.setR2L=d.setR2L=function(t){return st=t,this},d.__private__.getR2L=d.getR2L=function(){return st};var ot,at=d.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))nt=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');nt=t}else nt=parseInt(t,10)};d.__private__.getZoomMode=function(){return nt};var ut,ft=d.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ot=t};d.__private__.getPageMode=function(){return ot};var ct=d.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');ut=t};d.__private__.getLayoutMode=function(){return ut},d.__private__.setDisplayMode=d.setDisplayMode=function(t,r,e){return at(t),ct(r),ft(e),this};var ht={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(t){if(-1===Object.keys(ht).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ht[t]},d.__private__.getDocumentProperties=function(){return ht},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(t){for(var r in ht)ht.hasOwnProperty(r)&&t[r]&&(ht[r]=t[r]);return this},d.__private__.setDocumentProperty=function(t,r){if(-1===Object.keys(ht).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ht[t]=r};var lt,vt,dt,wt,mt,bt={},pt={},Nt=[],Lt={},At={},gt={},yt={},kt=null,St=0,xt=[],qt=new oi(d),Et=r.hotfixes||[],Mt={},jt={},Rt=[],It=function t(r,e,n,i,s,o){if(!(this instanceof t))return new t(r,e,n,i,s,o);isNaN(r)&&(r=1),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(s)&&(s=0),isNaN(o)&&(o=0),this._matrix=[r,e,n,i,s,o]};Object.defineProperty(It.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(It.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(It.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(It.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(It.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(It.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(It.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(It.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(It.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(It.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(It.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(It.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(It.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(It.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(It.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(It.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),It.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(S).join(t)},It.prototype.multiply=function(t){var r=t.sx*this.sx+t.shy*this.shx,e=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,s=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new It(r,e,n,i,s,o)},It.prototype.decompose=function(){var t=this.sx,r=this.shy,e=this.shx,n=this.sy,i=this.tx,s=this.ty,o=Math.sqrt(t*t+r*r),a=(t/=o)*e+(r/=o)*n;e-=t*a,n-=r*a;var u=Math.sqrt(e*e+n*n);return a/=u,t*(n/=u)<r*(e/=u)&&(t=-t,r=-r,a=-a,o=-o),{scale:new It(o,0,0,u,0,0),translate:new It(1,0,0,1,i,s),rotate:new It(t,r,-r,t,0,0),skew:new It(1,0,a,1,0,0)}},It.prototype.toString=function(t){return this.join(" ")},It.prototype.inversed=function(){var t=this.sx,r=this.shy,e=this.shx,n=this.sy,i=this.tx,s=this.ty,o=1/(t*n-r*e),a=n*o,u=-r*o,f=-e*o,c=t*o;return new It(a,u,f,c,-a*i-f*s,-u*i-c*s)},It.prototype.applyToPoint=function(t){var r=t.x*this.sx+t.y*this.shx+this.tx,e=t.x*this.shy+t.y*this.sy+this.ty;return new ee(r,e)},It.prototype.applyToRectangle=function(t){var r=this.applyToPoint(t),e=this.applyToPoint(new ee(t.x+t.w,t.y+t.h));return new ne(r.x,r.y,e.x-r.x,e.y-r.y)},It.prototype.clone=function(){var t=this.sx,r=this.shy,e=this.shx,n=this.sy,i=this.tx,s=this.ty;return new It(t,r,e,n,i,s)},d.Matrix=It;var Ot=d.matrixMult=function(t,r){return r.multiply(t)},Bt=new It(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=Bt;var Pt=function(t,r){if(!At[t]){var e=(r instanceof fi?"Sh":"P")+(Object.keys(Lt).length+1).toString(10);r.id=e,At[t]=e,Lt[e]=r,qt.publish("addPattern",r)}};d.ShadingPattern=fi,d.TilingPattern=ci,d.addShadingPattern=function(t,r){return x("addShadingPattern()"),Pt(t,r),this},d.beginTilingPattern=function(t){x("beginTilingPattern()"),se(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},d.endTilingPattern=function(t,r){x("endTilingPattern()"),r.stream=Z[z].join("\n"),Pt(t,r),qt.publish("endTilingPattern",r),Rt.pop().restore()};var Ft,Tt=d.__private__.newObject=function(){var t=Ct();return Dt(t,true),t},Ct=d.__private__.newObjectDeferred=function(){return V++,W[V]=function(){return G},V},Dt=function(t,r){return r="boolean"==typeof r&&r,W[t]=G,r&&X(t+" 0 obj"),t},zt=d.__private__.newAdditionalObject=function(){var t={objId:Ct(),content:""};return J.push(t),t},Ut=Ct(),_t=Ct(),Vt=d.__private__.decodeColorString=function(t){var r=t.split(" ");if(2!==r.length||"g"!==r[1]&&"G"!==r[1])5!==r.length||"k"!==r[4]&&"K"!==r[4]||(r=[(1-r[0])*(1-r[3]),(1-r[1])*(1-r[3]),(1-r[2])*(1-r[3]),"r"]);else{var e=parseFloat(r[0]);r=[e,e,e,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(r[i])).toString(16)).slice(-2);return n},Wt=d.__private__.encodeColorString=function(r){var e;"string"==typeof r&&(r={ch1:r});var n=r.ch1,i=r.ch2,s=r.ch3,o=r.ch4,a="draw"===r.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var u=new Dn(n);if(u.ok)n=u.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var f=parseInt(n.substr(1),16);n=f>>16&255,i=f>>8&255,s=255&f}if(void 0===i||void 0===o&&n===i&&i===s)e="string"==typeof n?n+" "+a[0]:2===r.precision?E(n/255)+" "+a[0]:M(n/255)+" "+a[0];else if(void 0===o||"object"===t(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",a[1]].join(" ");e="string"==typeof n?[n,i,s,a[1]].join(" "):2===r.precision?[E(n/255),E(i/255),E(s/255),a[1]].join(" "):[M(n/255),M(i/255),M(s/255),a[1]].join(" ")}else e="string"==typeof n?[n,i,s,o,a[2]].join(" "):2===r.precision?[E(n),E(i),E(s),E(o),a[2]].join(" "):[M(n),M(i),M(s),M(o),a[2]].join(" ");return e},Ht=d.__private__.getFilters=function(){return a},Gt=d.__private__.putStream=function(t){var r=(t=t||{}).data||"",e=t.filters||Ht(),n=t.alreadyAppliedFilters||[],i=t.addLength1||false,s=r.length,o=t.objectId,a=function(t){return t};if(null!==h&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==h&&(a=Nr.encryptor(o,0));var u={};true===e&&(e=["FlateEncode"]);var f=t.additionalKeyValues||[],c=(u=void 0!==hi.API.processDataByFilters?hi.API.processDataByFilters(r,e):{data:r,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(f.push({key:"Length",value:u.data.length}),true===i&&f.push({key:"Length1",value:s})),0!=c.length)if(c.split("/").length-1==1)f.push({key:"Filter",value:c});else{f.push({key:"Filter",value:"["+c+"]"});for(var l=0;l<f.length;l+=1)if("DecodeParms"===f[l].key){for(var v=[],d=0;d<u.reverseChain.split("/").length-1;d+=1)v.push("null");v.push(f[l].value),f[l].value="["+v.join(" ")+"]"}}X("<<");for(var w=0;w<f.length;w++)X("/"+f[w].key+" "+f[w].value);X(">>"),0!==u.data.length&&(X("stream"),X(a(u.data)),X("endstream"))},Jt=d.__private__.putPage=function(t){var r=t.number,e=t.data,n=t.objId,i=t.contentsObjId;Dt(n,true),X("<</Type /Page"),X("/Parent "+t.rootDictionaryObjId+" 0 R"),X("/Resources "+t.resourceDictionaryObjId+" 0 R"),X("/MediaBox ["+parseFloat(S(t.mediaBox.bottomLeftX))+" "+parseFloat(S(t.mediaBox.bottomLeftY))+" "+S(t.mediaBox.topRightX)+" "+S(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&X("/CropBox ["+S(t.cropBox.bottomLeftX)+" "+S(t.cropBox.bottomLeftY)+" "+S(t.cropBox.topRightX)+" "+S(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&X("/BleedBox ["+S(t.bleedBox.bottomLeftX)+" "+S(t.bleedBox.bottomLeftY)+" "+S(t.bleedBox.topRightX)+" "+S(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&X("/TrimBox ["+S(t.trimBox.bottomLeftX)+" "+S(t.trimBox.bottomLeftY)+" "+S(t.trimBox.topRightX)+" "+S(t.trimBox.topRightY)+"]"),null!==t.artBox&&X("/ArtBox ["+S(t.artBox.bottomLeftX)+" "+S(t.artBox.bottomLeftY)+" "+S(t.artBox.topRightX)+" "+S(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&X("/UserUnit "+t.userUnit),qt.publish("putPage",{objId:n,pageContext:xt[r],pageNumber:r,page:e}),X("/Contents "+i+" 0 R"),X(">>"),X("endobj");var s=e.join("\n");return A===L&&(s+="\nQ"),Dt(i,true),Gt({data:s,filters:Ht(),objectId:i}),X("endobj"),n},Zt=d.__private__.putPages=function(){var t,r,e=[];for(t=1;t<=St;t++)xt[t].objId=Ct(),xt[t].contentsObjId=Ct();for(t=1;t<=St;t++)e.push(Jt({number:t,data:Z[t],objId:xt[t].objId,contentsObjId:xt[t].contentsObjId,mediaBox:xt[t].mediaBox,cropBox:xt[t].cropBox,bleedBox:xt[t].bleedBox,trimBox:xt[t].trimBox,artBox:xt[t].artBox,userUnit:xt[t].userUnit,rootDictionaryObjId:Ut,resourceDictionaryObjId:_t}));Dt(Ut,true),X("<</Type /Pages");var n="/Kids [";for(r=0;r<St;r++)n+=e[r]+" 0 R ";X(n+"]"),X("/Count "+St),X(">>"),X("endobj"),qt.publish("postPutPages")},Kt=function(t){qt.publish("putFont",{font:t,out:X,newObject:Tt,putStream:Gt}),true!==t.isAlreadyPutted&&(t.objectNumber=Tt(),X("<<"),X("/Type /Font"),X("/BaseFont /"+si(t.postScriptName)),X("/Subtype /Type1"),"string"==typeof t.encoding&&X("/Encoding /"+t.encoding),X("/FirstChar 32"),X("/LastChar 255"),X(">>"),X("endobj"))},Yt=function(t){t.objectNumber=Tt();var r=[];r.push({key:"Type",value:"/XObject"}),r.push({key:"Subtype",value:"/Form"}),r.push({key:"BBox",value:"["+[S(t.x),S(t.y),S(t.x+t.width),S(t.y+t.height)].join(" ")+"]"}),r.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var e=t.pages[1].join("\n");Gt({data:e,additionalKeyValues:r,objectId:t.objectNumber}),X("endobj")},$t=function(t,r){r||(r=21);var e=Tt(),n=function(t,r){var e,n=[],i=1/(r-1);for(e=0;e<1;e+=i)n.push(e);if(n.push(1),0!=t[0].offset){var s={offset:0,color:t[0].color};t.unshift(s)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var a="",u=0,f=0;f<n.length;f++){for(e=n[f];e>t[u+1].offset;)u++;var c=t[u].offset,h=(e-c)/(t[u+1].offset-c),l=t[u].color,v=t[u+1].color;a+=_(Math.round((1-h)*l[0]+h*v[0]).toString(16))+_(Math.round((1-h)*l[1]+h*v[1]).toString(16))+_(Math.round((1-h)*l[2]+h*v[2]).toString(16))}return a.trim()}(t.colors,r),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+r+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Gt({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:e}),X("endobj"),t.objectNumber=Tt(),X("<< /ShadingType "+t.type),X("/ColorSpace /DeviceRGB");var s="/Coords ["+S(parseFloat(t.coords[0]))+" "+S(parseFloat(t.coords[1]))+" ";2===t.type?s+=S(parseFloat(t.coords[2]))+" "+S(parseFloat(t.coords[3])):s+=S(parseFloat(t.coords[2]))+" "+S(parseFloat(t.coords[3]))+" "+S(parseFloat(t.coords[4]))+" "+S(parseFloat(t.coords[5])),X(s+="]"),t.matrix&&X("/Matrix ["+t.matrix.toString()+"]"),X("/Function "+e+" 0 R"),X("/Extend [true true]"),X(">>"),X("endobj")},Xt=function(t,r){var e=Ct(),n=Tt();r.push({resourcesOid:e,objectOid:n}),t.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(S).join(" ")+"]"}),i.push({key:"XStep",value:S(t.xStep)}),i.push({key:"YStep",value:S(t.yStep)}),i.push({key:"Resources",value:e+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),Gt({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),X("endobj")},Qt=function(t){for(var r in t.objectNumber=Tt(),X("<<"),t)switch(r){case"opacity":X("/ca "+E(t[r]));break;case"stroke-opacity":X("/CA "+E(t[r]))}X(">>"),X("endobj")},tr=function(t){Dt(t.resourcesOid,true),X("<<"),X("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in X("/Font <<"),bt)bt.hasOwnProperty(t)&&(false===l||true===l&&v.hasOwnProperty(t))&&X("/"+t+" "+bt[t].objectNumber+" 0 R");X(">>")}(),function(){if(Object.keys(Lt).length>0){for(var t in X("/Shading <<"),Lt)Lt.hasOwnProperty(t)&&Lt[t]instanceof fi&&Lt[t].objectNumber>=0&&X("/"+t+" "+Lt[t].objectNumber+" 0 R");qt.publish("putShadingPatternDict"),X(">>")}}(),function(t){if(Object.keys(Lt).length>0){for(var r in X("/Pattern <<"),Lt)Lt.hasOwnProperty(r)&&Lt[r]instanceof d.TilingPattern&&Lt[r].objectNumber>=0&&Lt[r].objectNumber<t&&X("/"+r+" "+Lt[r].objectNumber+" 0 R");qt.publish("putTilingPatternDict"),X(">>")}}(t.objectOid),function(){if(Object.keys(gt).length>0){var t;for(t in X("/ExtGState <<"),gt)gt.hasOwnProperty(t)&&gt[t].objectNumber>=0&&X("/"+t+" "+gt[t].objectNumber+" 0 R");qt.publish("putGStateDict"),X(">>")}}(),function(){for(var t in X("/XObject <<"),Mt)Mt.hasOwnProperty(t)&&Mt[t].objectNumber>=0&&X("/"+t+" "+Mt[t].objectNumber+" 0 R");qt.publish("putXobjectDict"),X(">>")}(),X(">>"),X("endobj")},rr=function(t){pt[t.fontName]=pt[t.fontName]||{},pt[t.fontName][t.fontStyle]=t.id},er=function(t,r,e,n,i){var s={id:"F"+(Object.keys(bt).length+1).toString(10),postScriptName:t,fontName:r,fontStyle:e,encoding:n,isStandardFont:i||false,metadata:{}};return qt.publish("addFont",{font:s,instance:this}),bt[s.id]=s,rr(s),s.id},nr=d.__private__.pdfEscape=d.pdfEscape=function(t,r){return function(t,r){var e,n,i,s,o,a,u,f,c;if(i=(r=r||{}).sourceEncoding||"Unicode",o=r.outputEncoding,(r.autoencode||o)&&bt[lt].metadata&&bt[lt].metadata[i]&&bt[lt].metadata[i].encoding&&(s=bt[lt].metadata[i].encoding,!o&&bt[lt].encoding&&(o=bt[lt].encoding),!o&&s.codePages&&(o=s.codePages[0]),"string"==typeof o&&(o=s[o]),o)){for(u=false,a=[],e=0,n=t.length;e<n;e++)(f=o[t.charCodeAt(e)])?a.push(String.fromCharCode(f)):a.push(t[e]),a[e].charCodeAt(0)>>8&&(u=true);t=a.join("")}for(e=t.length;void 0===u&&0!==e;)t.charCodeAt(e-1)>>8&&(u=true),e--;if(!u)return t;for(a=r.noBOM?[]:[254,255],e=0,n=t.length;e<n;e++){if((c=(f=t.charCodeAt(e))>>8)>>8)throw new Error("Character at position "+e+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(c),a.push(f-(c<<8))}return String.fromCharCode.apply(void 0,a)}(t,r).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ir=d.__private__.beginPage=function(t){Z[++St]=[],xt[St]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},ar(St),$(Z[z])},sr=function(t,r){var e,i,o;switch(n=r||n,"string"==typeof t&&(e=p(t.toLowerCase()),Array.isArray(e)&&(i=e[0],o=e[1])),Array.isArray(t)&&(i=t[0]*vt,o=t[1]*vt),isNaN(i)&&(i=s[0],o=s[1]),(i>14400||o>14400)&&(Bn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),o=Math.min(14400,o)),s=[i,o],n.substr(0,1)){case"l":o>i&&(s=[o,i]);break;case"p":i>o&&(s=[o,i])}ir(s),Dr(Tr),X(Jr),0!==Qr&&X(Qr+" J"),0!==te&&X(te+" j"),qt.publish("addPage",{pageNumber:St})},or=function(t){t>0&&t<=St&&(Z.splice(t,1),xt.splice(t,1),St--,z>St&&(z=St),this.setPage(z))},ar=function(t){t>0&&t<=St&&(z=t)},ur=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return Z.length-1},fr=function(t,r,e){var n,i=void 0;return e=e||{},t=void 0!==t?t:bt[lt].fontName,r=void 0!==r?r:bt[lt].fontStyle,n=t.toLowerCase(),void 0!==pt[n]&&void 0!==pt[n][r]?i=pt[n][r]:void 0!==pt[t]&&void 0!==pt[t][r]?i=pt[t][r]:false===e.disableWarning&&Bn.warn("Unable to look up font label for font '"+t+"', '"+r+"'. Refer to getFontList() for available fonts."),i||e.noFallback||null==(i=pt.times[r])&&(i=pt.times.normal),i},cr=d.__private__.putInfo=function(){var t=Tt(),r=function(t){return t};for(var e in null!==h&&(r=Nr.encryptor(t,0)),X("<<"),X("/Producer ("+nr(r("jsPDF "+hi.version))+")"),ht)ht.hasOwnProperty(e)&&ht[e]&&X("/"+e.substr(0,1).toUpperCase()+e.substr(1)+" ("+nr(r(ht[e]))+")");X("/CreationDate ("+nr(r(I))+")"),X(">>"),X("endobj")},hr=d.__private__.putCatalog=function(t){var r=(t=t||{}).rootDictionaryObjId||Ut;switch(Tt(),X("<<"),X("/Type /Catalog"),X("/Pages "+r+" 0 R"),nt||(nt="fullwidth"),nt){case"fullwidth":X("/OpenAction [3 0 R /FitH null]");break;case"fullheight":X("/OpenAction [3 0 R /FitV null]");break;case"fullpage":X("/OpenAction [3 0 R /Fit]");break;case"original":X("/OpenAction [3 0 R /XYZ null null 1]");break;default:var e=""+nt;"%"===e.substr(e.length-1)&&(nt=parseInt(nt)/100),"number"==typeof nt&&X("/OpenAction [3 0 R /XYZ null null "+E(nt)+"]")}switch(ut||(ut="continuous"),ut){case"continuous":X("/PageLayout /OneColumn");break;case"single":X("/PageLayout /SinglePage");break;case"two":case"twoleft":X("/PageLayout /TwoColumnLeft");break;case"tworight":X("/PageLayout /TwoColumnRight")}ot&&X("/PageMode /"+ot),qt.publish("putCatalog"),X(">>"),X("endobj")},lr=d.__private__.putTrailer=function(){X("trailer"),X("<<"),X("/Size "+(V+1)),X("/Root "+V+" 0 R"),X("/Info "+(V-1)+" 0 R"),null!==h&&X("/Encrypt "+Nr.oid+" 0 R"),X("/ID [ <"+O+"> <"+O+"> ]"),X(">>")},vr=d.__private__.putHeader=function(){X("%PDF-"+w),X("%ºß¬à")},dr=d.__private__.putXRef=function(){var t="0000000000";X("xref"),X("0 "+(V+1)),X("0000000000 65535 f ");for(var r=1;r<=V;r++)"function"==typeof W[r]?X((t+W[r]()).slice(-10)+" 00000 n "):void 0!==W[r]?X((t+W[r]).slice(-10)+" 00000 n "):X("0000000000 00000 n ")},wr=d.__private__.buildDocument=function(){var t;V=0,G=0,H=[],W=[],J=[],Ut=Ct(),_t=Ct(),$(H),qt.publish("buildDocument"),vr(),Zt(),function(){qt.publish("putAdditionalObjects");for(var t=0;t<J.length;t++){var r=J[t];Dt(r.objId,true),X(r.content),X("endobj")}qt.publish("postPutAdditionalObjects")}(),t=[],function(){for(var t in bt)bt.hasOwnProperty(t)&&(false===l||true===l&&v.hasOwnProperty(t))&&Kt(bt[t])}(),function(){var t;for(t in gt)gt.hasOwnProperty(t)&&Qt(gt[t])}(),function(){for(var t in Mt)Mt.hasOwnProperty(t)&&Yt(Mt[t])}(),function(t){var r;for(r in Lt)Lt.hasOwnProperty(r)&&(Lt[r]instanceof fi?$t(Lt[r]):Lt[r]instanceof ci&&Xt(Lt[r],t))}(t),qt.publish("putResources"),t.forEach(tr),tr({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),qt.publish("postPutResources"),null!==h&&(Nr.oid=Tt(),X("<<"),X("/Filter /Standard"),X("/V "+Nr.v),X("/R "+Nr.r),X("/U <"+Nr.toHexString(Nr.U)+">"),X("/O <"+Nr.toHexString(Nr.O)+">"),X("/P "+Nr.P),X(">>"),X("endobj")),cr(),hr();var r=G;return dr(),lr(),X("startxref"),X(""+r),X("%%EOF"),$(Z[z]),H.join("\n")},mr=d.__private__.getBlob=function(t){return new Blob([tt(t)],{type:"application/pdf"})},br=d.output=d.__private__.output=(Ft=function(t,r){switch("string"==typeof(r=r||{})?r={filename:r}:r.filename=r.filename||"generated.pdf",t){case void 0:return wr();case"save":d.save(r.filename);break;case"arraybuffer":return tt(wr());case"blob":return mr(wr());case"bloburi":case"bloburl":if(void 0!==In.URL&&"function"==typeof In.URL.createObjectURL)return In.URL&&In.URL.createObjectURL(mr(wr()))||void 0;Bn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var e="",n=wr();try{e=Un(n)}catch(t){e=Un(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+r.filename+";base64,"+e;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(In)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",s=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';r.pdfObjectUrl&&(i=r.pdfObjectUrl,s="");var o='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+i+'"'+s+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(r)+");<\/script></body></html>",a=In.open();return null!==a&&a.document.write(o),a}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(In)){var u='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(r.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+r.filename+'" width="500px" height="400px" /></body></html>',f=In.open();if(null!==f){f.document.write(u);var c=this;f.document.documentElement.querySelector("#pdfViewer").onload=function(){f.document.title=r.filename,f.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(c.output("bloburl"))}}return f}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(In))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var h='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",r)+'"></iframe></body></html>',l=In.open();if(null!==l&&(l.document.write(h),l.document.title=r.filename),l||"undefined"==typeof safari)return l;break;case"datauri":case"dataurl":return In.document.location.href=this.output("datauristring",r);default:return null}},Ft.foo=function(){try{return Ft.apply(this,arguments)}catch(e){var t=e.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var r="Error in function "+t.split("\n")[0].split("<")[0]+": "+e.message;if(!In.console)throw new Error(r);In.console.error(r,e),In.alert&&alert(r)}},Ft.foo.bar=Ft,Ft.foo),pr=function(t){return true===Array.isArray(Et)&&Et.indexOf(t)>-1};switch(i){case"pt":vt=1;break;case"mm":vt=72/25.4;break;case"cm":vt=72/2.54;break;case"in":vt=72;break;case"px":vt=1==pr("px_scaling")?.75:96/72;break;case"pc":case"em":vt=12;break;case"ex":vt=6;break;default:if("number"!=typeof i)throw new Error("Invalid unit: "+i);vt=i}var Nr=null;C(),P();var Lr=d.__private__.getPageInfo=d.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:xt[t].objId,pageNumber:t,pageContext:xt[t]}},Ar=d.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var r in xt)if(xt[r].objId===t)break;return Lr(r)},gr=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:xt[z].objId,pageNumber:z,pageContext:xt[z]}};d.addPage=function(){return sr.apply(this,arguments),this},d.setPage=function(){return ar.apply(this,arguments),$.call(this,Z[z]),this},d.insertPage=function(t){return this.addPage(),this.movePage(z,t),this},d.movePage=function(t,r){var e,n;if(t>r){e=Z[t],n=xt[t];for(var i=t;i>r;i--)Z[i]=Z[i-1],xt[i]=xt[i-1];Z[r]=e,xt[r]=n,this.setPage(r)}else if(t<r){e=Z[t],n=xt[t];for(var s=t;s<r;s++)Z[s]=Z[s+1],xt[s]=xt[s+1];Z[r]=e,xt[r]=n,this.setPage(r)}return this},d.deletePage=function(){return or.apply(this,arguments),this},d.__private__.text=d.text=function(r,e,n,i,s){var o,a,u,f,c,h,l,d,w,m=(i=i||{}).scope||this;if("number"==typeof r&&"number"==typeof e&&("string"==typeof n||Array.isArray(n))){var b=n;n=e,e=r,r=b}if(arguments[3]instanceof It==0?(u=arguments[4],f=arguments[5],"object"===t(l=arguments[3])&&null!==l||("string"==typeof u&&(f=u,u=null),"string"==typeof l&&(f=l,l=null),"number"==typeof l&&(u=l,l=null),i={flags:l,angle:u,align:f})):(x("The transform parameter of text() with a Matrix value"),w=s),isNaN(e)||isNaN(n)||null==r)throw new Error("Invalid arguments passed to jsPDF.text");if(0===r.length)return m;var p,N="",g="number"==typeof i.lineHeightFactor?i.lineHeightFactor:Fr,y=m.internal.scaleFactor;function k(t){return t=t.split("\t").join(Array(i.TabLen||9).join(" ")),nr(t,l)}function q(t){for(var r,e=t.concat(),n=[],i=e.length;i--;)"string"==typeof(r=e.shift())?n.push(r):Array.isArray(t)&&(1===r.length||void 0===r[1]&&void 0===r[2])?n.push(r[0]):n.push([r[0],r[1],r[2]]);return n}function E(t,r){var e;if("string"==typeof t)e=r(t)[0];else if(Array.isArray(t)){for(var n,i,s=t.concat(),o=[],a=s.length;a--;)"string"==typeof(n=s.shift())?o.push(r(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(i=r(n[0],n[1],n[2]),o.push([i[0],i[1],i[2]]));e=o}return e}var M=false,R=true;if("string"==typeof r)M=true;else if(Array.isArray(r)){var I=r.concat();a=[];for(var O,B=I.length;B--;)("string"!=typeof(O=I.shift())||Array.isArray(O)&&"string"!=typeof O[0])&&(R=false);M=R}if(false===M)throw new Error('Type of text must be string or Array. "'+r+'" is not recognized.');"string"==typeof r&&(r=r.match(/[\r?\n]/)?r.split(/\r\n|\r|\n/g):[r]);var P=et/m.internal.scaleFactor,F=P*(g-1);switch(i.baseline){case"bottom":n-=F;break;case"top":n+=P-F;break;case"hanging":n+=P-2*F;break;case"middle":n+=P/2-F}if((h=i.maxWidth||0)>0&&("string"==typeof r?r=m.splitTextToSize(r,h):"[object Array]"===Object.prototype.toString.call(r)&&(r=r.reduce((function(t,r){return t.concat(m.splitTextToSize(r,h))}),[]))),o={text:r,x:e,y:n,options:i,mutex:{pdfEscape:nr,activeFontKey:lt,fonts:bt,activeFontSize:et}},qt.publish("preProcessText",o),r=o.text,u=(i=o.options).angle,w instanceof It==0&&u&&"number"==typeof u){u*=Math.PI/180,0===i.rotationDirection&&(u=-u),A===L&&(u=-u);var T=Math.cos(u),C=Math.sin(u);w=new It(T,C,-C,T,0,0)}else u&&u instanceof It&&(w=u);A!==L||w||(w=Bt),void 0!==(c=i.charSpace||$r)&&(N+=S(j(c))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=i.horizontalScale)&&(N+=S(100*d)+" Tz\n");var D=-1,z=void 0!==i.renderingMode?i.renderingMode:i.stroke,U=m.internal.getCurrentPageInfo().pageContext;switch(z){case 0:case false:case"fill":D=0;break;case 1:case true:case"stroke":D=1;break;case 2:case"fillThenStroke":D=2;break;case 3:case"invisible":D=3;break;case 4:case"fillAndAddForClipping":D=4;break;case 5:case"strokeAndAddPathForClipping":D=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":D=6;break;case 7:case"addToPathForClipping":D=7}var _=void 0!==U.usedRenderingMode?U.usedRenderingMode:-1;-1!==D?N+=D+" Tr\n":-1!==_&&(N+="0 Tr\n"),-1!==D&&(U.usedRenderingMode=D),f=i.align||"left";var V,W=et*g,H=m.internal.pageSize.getWidth(),G=bt[lt];c=i.charSpace||$r,h=i.maxWidth||0,l=Object.assign({autoencode:true,noBOM:true},i.flags);var J=[],Z=function(t){return m.getStringUnitWidth(t,{font:G,charSpace:c,fontSize:et,doKerning:false})*et/y};if("[object Array]"===Object.prototype.toString.call(r)){var K;a=q(r),"left"!==f&&(V=a.map(Z));var Y,$=0;if("right"===f){e-=V[0],r=[],B=a.length;for(var Q=0;Q<B;Q++)0===Q?(Y=Vr(e),K=Wr(n)):(Y=j($-V[Q]),K=-W),r.push([a[Q],Y,K]),$=V[Q]}else if("center"===f){e-=V[0]/2,r=[],B=a.length;for(var tt=0;tt<B;tt++)0===tt?(Y=Vr(e),K=Wr(n)):(Y=j(($-V[tt])/2),K=-W),r.push([a[tt],Y,K]),$=V[tt]}else if("left"===f){r=[],B=a.length;for(var rt=0;rt<B;rt++)r.push(a[rt])}else if("justify"===f&&"Identity-H"===G.encoding){r=[],B=a.length,h=0!==h?h:H;for(var nt=0,it=0;it<B;it++)if(K=0===it?Wr(n):-W,Y=0===it?Vr(e):nt,it<B-1){var ot=j((h-V[it])/(a[it].split(" ").length-1)),at=a[it].split(" ");r.push([at[0]+" ",Y,K]),nt=0;for(var ut=1;ut<at.length;ut++){var ft=(Z(at[ut-1]+" "+at[ut])-Z(at[ut]))*y+ot;ut==at.length-1?r.push([at[ut],ft,0]):r.push([at[ut]+" ",ft,0]),nt-=ft}}else r.push([a[it],Y,K]);r.push(["",nt,0])}else{if("justify"!==f)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(r=[],B=a.length,h=0!==h?h:H,it=0;it<B;it++){K=0===it?Wr(n):-W,Y=0===it?Vr(e):0;var ct=a[it].split(" ").length-1,ht=ct>0?(h-V[it])/ct:0;it<B-1?J.push(S(j(ht))):J.push(0),r.push([a[it],Y,K])}}}true===("boolean"==typeof i.R2L?i.R2L:st)&&(r=E(r,(function(t,r,e){return[t.split("").reverse().join(""),r,e]}))),o={text:r,x:e,y:n,options:i,mutex:{pdfEscape:nr,activeFontKey:lt,fonts:bt,activeFontSize:et}},qt.publish("postProcessText",o),r=o.text,p=o.mutex.isHex||false;var vt=bt[lt].encoding;"WinAnsiEncoding"!==vt&&"StandardEncoding"!==vt||(r=E(r,(function(t,r,e){return[k(t),r,e]}))),a=q(r),r=[];for(var dt,wt,mt,pt=Array.isArray(a[0])?1:0,Nt="",Lt=function(t,r,e){var n="";return e instanceof It?(e="number"==typeof i.angle?Ot(e,new It(1,0,0,1,t,r)):Ot(new It(1,0,0,1,t,r),e),A===L&&(e=Ot(new It(1,0,0,-1,0,0),e)),n=e.join(" ")+" Tm\n"):n=S(t)+" "+S(r)+" Td\n",n},At=0;At<a.length;At++){switch(Nt="",pt){case 1:mt=(p?"<":"(")+a[At][0]+(p?">":")"),dt=parseFloat(a[At][1]),wt=parseFloat(a[At][2]);break;case 0:mt=(p?"<":"(")+a[At]+(p?">":")"),dt=Vr(e),wt=Wr(n)}void 0!==J&&void 0!==J[At]&&(Nt=J[At]+" Tw\n"),0===At?r.push(Nt+Lt(dt,wt,w)+mt):0===pt?r.push(Nt+mt):1===pt&&r.push(Nt+Lt(dt,wt,w)+mt)}r=0===pt?r.join(" Tj\nT* "):r.join(" Tj\n"),r+=" Tj\n";var gt="BT\n/";return gt+=lt+" "+et+" Tf\n",gt+=S(et*g)+" TL\n",gt+=Kr+"\n",gt+=N,gt+=r,X(gt+="ET"),v[lt]=true,m};var yr=d.__private__.clip=d.clip=function(t){return X("evenodd"===t?"W*":"W"),this};d.clipEvenOdd=function(){return yr("evenodd")},d.__private__.discardPath=d.discardPath=function(){return X("n"),this};var kr=d.__private__.isValidStyle=function(t){var r=false;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(r=true),r};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(t){return kr(t)&&(c=t),this};var Sr=d.__private__.getStyle=d.getStyle=function(t){var r=c;switch(t){case"D":case"S":r="S";break;case"F":r="f";break;case"FD":case"DF":r="B";break;case"f":case"f*":case"B":case"B*":r=t}return r},xr=d.close=function(){return X("h"),this};d.stroke=function(){return X("S"),this},d.fill=function(t){return qr("f",t),this},d.fillEvenOdd=function(t){return qr("f*",t),this},d.fillStroke=function(t){return qr("B",t),this},d.fillStrokeEvenOdd=function(t){return qr("B*",t),this};var qr=function(r,e){"object"===t(e)?jr(e,r):X(r)},Er=function(t){null===t||A===L&&void 0===t||(t=Sr(t),X(t))};function Mr(t,r,e,n,i){var s=new ci(r||this.boundingBox,e||this.xStep,n||this.yStep,this.gState,i||this.matrix);s.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Pt(o,s),s}var jr=function(t,r){var e=At[t.key],n=Lt[e];if(n instanceof fi)X("q"),X(Rr(r)),n.gState&&d.setGState(n.gState),X(t.matrix.toString()+" cm"),X("/"+e+" sh"),X("Q");else if(n instanceof ci){var i=new It(1,0,0,-1,0,ve());t.matrix&&(i=i.multiply(t.matrix||Bt),e=Mr.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),X("q"),X("/Pattern cs"),X("/"+e+" scn"),n.gState&&d.setGState(n.gState),X(r),X("Q")}},Rr=function(t){switch(t){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"}},Ir=d.moveTo=function(t,r){return X(S(j(t))+" "+S(R(r))+" m"),this},Or=d.lineTo=function(t,r){return X(S(j(t))+" "+S(R(r))+" l"),this},Br=d.curveTo=function(t,r,e,n,i,s){return X([S(j(t)),S(R(r)),S(j(e)),S(R(n)),S(j(i)),S(R(s)),"c"].join(" ")),this};d.__private__.line=d.line=function(t,r,e,n,i){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||!kr(i))throw new Error("Invalid arguments passed to jsPDF.line");return A===N?this.lines([[e-t,n-r]],t,r,[1,1],i||"S"):this.lines([[e-t,n-r]],t,r,[1,1]).stroke()},d.__private__.lines=d.lines=function(t,r,e,n,i,s){var o,a,u,f,c,h,l,v,d,w,m,b;if("number"==typeof t&&(b=e,e=r,r=t,t=b),n=n||[1,1],s=s||false,isNaN(r)||isNaN(e)||!Array.isArray(t)||!Array.isArray(n)||!kr(i)||"boolean"!=typeof s)throw new Error("Invalid arguments passed to jsPDF.lines");for(Ir(r,e),o=n[0],a=n[1],f=t.length,w=r,m=e,u=0;u<f;u++)2===(c=t[u]).length?(w=c[0]*o+w,m=c[1]*a+m,Or(w,m)):(h=c[0]*o+w,l=c[1]*a+m,v=c[2]*o+w,d=c[3]*a+m,w=c[4]*o+w,m=c[5]*a+m,Br(h,l,v,d,w,m));return s&&xr(),Er(i),this},d.path=function(t){for(var r=0;r<t.length;r++){var e=t[r],n=e.c;switch(e.op){case"m":Ir(n[0],n[1]);break;case"l":Or(n[0],n[1]);break;case"c":Br.apply(this,n);break;case"h":xr()}}return this},d.__private__.rect=d.rect=function(t,r,e,n,i){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||!kr(i))throw new Error("Invalid arguments passed to jsPDF.rect");return A===N&&(n=-n),X([S(j(t)),S(R(r)),S(j(e)),S(j(n)),"re"].join(" ")),Er(i),this},d.__private__.triangle=d.triangle=function(t,r,e,n,i,s,o){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(s)||!kr(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[e-t,n-r],[i-e,s-n],[t-i,r-s]],t,r,[1,1],o,true),this},d.__private__.roundedRect=d.roundedRect=function(t,r,e,n,i,s,o){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(s)||!kr(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var a=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*e),s=Math.min(s,.5*n),this.lines([[e-2*i,0],[i*a,0,i,s-s*a,i,s],[0,n-2*s],[0,s*a,-i*a,s,-i,s],[2*i-e,0],[-i*a,0,-i,-s*a,-i,-s],[0,2*s-n],[0,-s*a,i*a,-s,i,-s]],t+i,r,[1,1],o,true),this},d.__private__.ellipse=d.ellipse=function(t,r,e,n,i){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||!kr(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var s=4/3*(Math.SQRT2-1)*e,o=4/3*(Math.SQRT2-1)*n;return Ir(t+e,r),Br(t+e,r-o,t+s,r-n,t,r-n),Br(t-s,r-n,t-e,r-o,t-e,r),Br(t-e,r+o,t-s,r+n,t,r+n),Br(t+s,r+n,t+e,r+o,t+e,r),Er(i),this},d.__private__.circle=d.circle=function(t,r,e,n){if(isNaN(t)||isNaN(r)||isNaN(e)||!kr(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,r,e,e,n)},d.setFont=function(t,r,e){return e&&(r=k(r,e)),lt=fr(t,r,{disableWarning:false}),this};var Pr=d.__private__.getFont=d.getFont=function(){return bt[fr.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var t,r,e={};for(t in pt)if(pt.hasOwnProperty(t))for(r in e[t]=[],pt[t])pt[t].hasOwnProperty(r)&&e[t].push(r);return e},d.addFont=function(t,r,e,n,i){var s=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==s.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==s.indexOf(arguments[3])&&(e=k(e,n)),er.call(this,t,r,e,i=i||"Identity-H")};var Fr,Tr=r.lineWidth||.200025,Cr=d.__private__.getLineWidth=d.getLineWidth=function(){return Tr},Dr=d.__private__.setLineWidth=d.setLineWidth=function(t){return Tr=t,X(S(j(t))+" w"),this};d.__private__.setLineDash=hi.API.setLineDash=hi.API.setLineDashPattern=function(t,r){if(t=t||[],r=r||0,isNaN(r)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map((function(t){return S(j(t))})).join(" "),r=S(j(r)),X("["+t+"] "+r+" d"),this};var zr=d.__private__.getLineHeight=d.getLineHeight=function(){return et*Fr};d.__private__.getLineHeight=d.getLineHeight=function(){return et*Fr};var Ur=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Fr=t),this},_r=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Fr};Ur(r.lineHeight);var Vr=d.__private__.getHorizontalCoordinate=function(t){return j(t)},Wr=d.__private__.getVerticalCoordinate=function(t){return A===L?t:xt[z].mediaBox.topRightY-xt[z].mediaBox.bottomLeftY-j(t)},Hr=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(t){return S(Vr(t))},Gr=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(t){return S(Wr(t))},Jr=r.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Vt(Jr)},d.__private__.setStrokeColor=d.setDrawColor=function(t,r,e,n){return Jr=Wt({ch1:t,ch2:r,ch3:e,ch4:n,pdfColorType:"draw",precision:2}),X(Jr),this};var Zr=r.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Vt(Zr)},d.__private__.setFillColor=d.setFillColor=function(t,r,e,n){return Zr=Wt({ch1:t,ch2:r,ch3:e,ch4:n,pdfColorType:"fill",precision:2}),X(Zr),this};var Kr=r.textColor||"0 g",Yr=d.__private__.getTextColor=d.getTextColor=function(){return Vt(Kr)};d.__private__.setTextColor=d.setTextColor=function(t,r,e,n){return Kr=Wt({ch1:t,ch2:r,ch3:e,ch4:n,pdfColorType:"text",precision:3}),this};var $r=r.charSpace,Xr=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat($r||0)};d.__private__.setCharSpace=d.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return $r=t,this};var Qr=0;d.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},d.__private__.setLineCap=d.setLineCap=function(t){var r=d.CapJoinStyles[t];if(void 0===r)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qr=r,X(r+" J"),this};var te=0;d.__private__.setLineJoin=d.setLineJoin=function(t){var r=d.CapJoinStyles[t];if(void 0===r)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return te=r,X(r+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return X(S(j(t))+" M"),this},d.GState=ai,d.setGState=function(t){(t="string"==typeof t?gt[yt[t]]:re(null,t)).equals(kt)||(X("/"+t.id+" gs"),kt=t)};var re=function(t,r){if(!t||!yt[t]){var e=false;for(var n in gt)if(gt.hasOwnProperty(n)&&gt[n].equals(r)){e=true;break}if(e)r=gt[n];else{var i="GS"+(Object.keys(gt).length+1).toString(10);gt[i]=r,r.id=i}return t&&(yt[t]=r.id),qt.publish("addGState",r),r}};d.addGState=function(t,r){return re(t,r),this},d.saveGraphicsState=function(){return X("q"),Nt.push({key:lt,size:et,color:Kr}),this},d.restoreGraphicsState=function(){X("Q");var t=Nt.pop();return lt=t.key,et=t.size,Kr=t.color,kt=null,this},d.setCurrentTransformationMatrix=function(t){return X(t.toString()+" cm"),this},d.comment=function(t){return X("#"+t),this};var ee=function(t,r){var e=t||0;Object.defineProperty(this,"x",{enumerable:true,get:function(){return e},set:function(t){isNaN(t)||(e=parseFloat(t))}});var n=r||0;Object.defineProperty(this,"y",{enumerable:true,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:true,get:function(){return i},set:function(t){i=t.toString()}}),this},ne=function(t,r,e,n){ee.call(this,t,r),this.type="rect";var i=e||0;Object.defineProperty(this,"w",{enumerable:true,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var s=n||0;return Object.defineProperty(this,"h",{enumerable:true,get:function(){return s},set:function(t){isNaN(t)||(s=parseFloat(t))}}),this},ie=function(){this.page=St,this.currentPage=z,this.pages=Z.slice(0),this.pagesContext=xt.slice(0),this.x=dt,this.y=wt,this.matrix=mt,this.width=ae(z),this.height=fe(z),this.outputDestination=Y,this.id="",this.objectNumber=-1};ie.prototype.restore=function(){St=this.page,z=this.currentPage,xt=this.pagesContext,Z=this.pages,dt=this.x,wt=this.y,mt=this.matrix,ue(z,this.width),ce(z,this.height),Y=this.outputDestination};var se=function(t,r,e,n,i){Rt.push(new ie),St=z=0,Z=[],dt=t,wt=r,mt=i,ir([e,n])};for(var oe in d.beginFormObject=function(t,r,e,n,i){return se(t,r,e,n,i),this},d.endFormObject=function(t){return function(t){if(jt[t])Rt.pop().restore();else{var r=new ie,e="Xo"+(Object.keys(Mt).length+1).toString(10);r.id=e,jt[t]=e,Mt[e]=r,qt.publish("addFormObject",r),Rt.pop().restore()}}(t),this},d.doFormObject=function(t,r){var e=Mt[jt[t]];return X("q"),X(r.toString()+" cm"),X("/"+e.id+" Do"),X("Q"),this},d.getFormObject=function(t){var r=Mt[jt[t]];return{x:r.x,y:r.y,width:r.width,height:r.height,matrix:r.matrix}},d.save=function(t,r){return t=t||"generated.pdf",(r=r||{}).returnPromise=r.returnPromise||false,false===r.returnPromise?(Cn(mr(wr()),t),"function"==typeof Cn.unload&&In.setTimeout&&setTimeout(Cn.unload,911),this):new Promise((function(r,e){try{var n=Cn(mr(wr()),t);"function"==typeof Cn.unload&&In.setTimeout&&setTimeout(Cn.unload,911),r(n)}catch(t){e(t.message)}}))},hi.API)hi.API.hasOwnProperty(oe)&&("events"===oe&&hi.API.events.length?function(t,r){var e,n,i;for(i=r.length-1;-1!==i;i--)e=r[i][0],n=r[i][1],t.subscribe.apply(t,[e].concat("function"==typeof n?[n]:n))}(qt,hi.API.events):d[oe]=hi.API[oe]);function ae(t){return xt[t].mediaBox.topRightX-xt[t].mediaBox.bottomLeftX}function ue(t,r){xt[t].mediaBox.topRightX=r+xt[t].mediaBox.bottomLeftX}function fe(t){return xt[t].mediaBox.topRightY-xt[t].mediaBox.bottomLeftY}function ce(t,r){xt[t].mediaBox.topRightY=r+xt[t].mediaBox.bottomLeftY}var he=d.getPageWidth=function(t){return ae(t=t||z)/vt},le=d.setPageWidth=function(t,r){ue(t,r*vt)},ve=d.getPageHeight=function(t){return fe(t=t||z)/vt},de=d.setPageHeight=function(t,r){ce(t,r*vt)};return d.internal={pdfEscape:nr,getStyle:Sr,getFont:Pr,getFontSize:it,getCharSpace:Xr,getTextColor:Yr,getLineHeight:zr,getLineHeightFactor:_r,getLineWidth:Cr,write:Q,getHorizontalCoordinate:Vr,getVerticalCoordinate:Wr,getCoordinateString:Hr,getVerticalCoordinateString:Gr,collections:{},newObject:Tt,newAdditionalObject:zt,newObjectDeferred:Ct,newObjectDeferredBegin:Dt,getFilters:Ht,putStream:Gt,events:qt,scaleFactor:vt,pageSize:{getWidth:function(){return he(z)},setWidth:function(t){le(z,t)},getHeight:function(){return ve(z)},setHeight:function(t){de(z,t)}},encryptionOptions:h,encryption:Nr,getEncryptor:function(t){return null!==h?Nr.encryptor(t,0):function(t){return t}},output:br,getNumberOfPages:ur,pages:Z,out:X,f2:E,f3:M,getPageInfo:Lr,getPageInfoByObjId:Ar,getCurrentPageInfo:gr,getPDFVersion:m,Point:ee,Rectangle:ne,Matrix:It,hasHotfix:pr},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return he(z)},set:function(t){le(z,t)},enumerable:true,configurable:true}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return ve(z)},set:function(t){de(z,t)},enumerable:true,configurable:true}),function(t){for(var r=0,e=rt.length;r<e;r++){var n=er.call(this,t[r][0],t[r][1],t[r][2],rt[r][3],true);false===l&&(v[n]=true);var i=t[r][0].split("-");rr({id:n,fontName:i[0],fontStyle:i[1]||""})}qt.publish("addFonts",{fonts:bt,dictionary:pt})}.call(d,rt),lt="F1",sr(s,n),qt.publish("initialized"),d}ii.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},ii.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},ii.prototype.hexToBytes=function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(String.fromCharCode(parseInt(t.substr(e,2),16)));return r.join("")},ii.prototype.processOwnerPassword=function(t,r){return ei(Qn(r).substr(0,5),t)},ii.prototype.encryptor=function(t,r){var e=Qn(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&r,r>>8&255)).substr(0,10);return function(t){return ei(e,t)}},ai.prototype.equals=function(r){var e,n="id,objectNumber,equals";if(!r||t(r)!==t(this))return false;var i=0;for(e in this)if(!(n.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e))return false;if(this[e]!==r[e])return false;i++}for(e in r)r.hasOwnProperty(e)&&n.indexOf(e)<0&&i--;return 0===i},hi.API={events:[]},hi.version="3.0.3";var li=hi.API,vi=1,di=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},wi=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},mi=function(t){return t.toFixed(2)},bi=function(t){return t.toFixed(5)};li.__acroform__={};var pi=function(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t},Ni=function(t){return t*vi},Li=function(t){var r=new Ti,e=$i.internal.getHeight(t)||0,n=$i.internal.getWidth(t)||0;return r.BBox=[0,0,Number(mi(n)),Number(mi(e))],r},Ai=li.__acroform__.setBit=function(t,r){if(t=t||0,r=r||0,isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<r},gi=li.__acroform__.clearBit=function(t,r){if(t=t||0,r=r||0,isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<r)},yi=li.__acroform__.getBit=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<r?1:0},ki=li.__acroform__.getBitForPdf=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return yi(t,r-1)},Si=li.__acroform__.setBitForPdf=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Ai(t,r-1)},xi=li.__acroform__.clearBitForPdf=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return gi(t,r-1)},qi=li.__acroform__.calculateCoordinates=function(t,r){var e=r.internal.getHorizontalCoordinate,n=r.internal.getVerticalCoordinate,i=t[0],s=t[1],o=t[2],a=t[3],u={};return u.lowerLeft_X=e(i)||0,u.lowerLeft_Y=n(s+a)||0,u.upperRight_X=e(i+o)||0,u.upperRight_Y=n(s)||0,[Number(mi(u.lowerLeft_X)),Number(mi(u.lowerLeft_Y)),Number(mi(u.upperRight_X)),Number(mi(u.upperRight_Y))]},Ei=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var r=[],e=t._V||t.DV,n=Mi(t,e),i=t.scope.internal.getFont(t.fontName,t.fontStyle).id;r.push("/Tx BMC"),r.push("q"),r.push("BT"),r.push(t.scope.__private__.encodeColorString(t.color)),r.push("/"+i+" "+mi(n.fontSize)+" Tf"),r.push("1 0 0 1 0 0 Tm"),r.push(n.text),r.push("ET"),r.push("Q"),r.push("EMC");var s=Li(t);return s.scope=t.scope,s.stream=r.join("\n"),s}},Mi=function(t,r){var e=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},i=(r=")"==(r="("==r.substr(0,1)?r.substr(1):r).substr(r.length-1)?r.substr(0,r.length-1):r).split(" ");i=t.multiline?i.map((function(t){return t.split("\n")})):i.map((function(t){return[t]}));var s=e,o=$i.internal.getHeight(t)||0;o=o<0?-o:o;var a=$i.internal.getWidth(t)||0;a=a<0?-a:a;var u=function(r,e,n){if(r+1<i.length){var s=e+" "+i[r+1][0];return ji(s,t,n).width<=a-4}return false};s++;t:for(;s>0;){r="",s--;var f,c,h=ji("3",t,s).height,l=t.multiline?o-s:(o-h)/2,v=l+=2,d=0,w=0,m=0;if(s<=0){r="(...) Tj\n",r+="% Width of Text: "+ji(r,t,s=12).width+", FieldWidth:"+a+"\n";break}for(var b="",p=0,N=0;N<i.length;N++)if(i.hasOwnProperty(N)){var L=false;if(1!==i[N].length&&m!==i[N].length-1){if((h+2)*(p+2)+2>o)continue t;b+=i[N][m],L=true,w=N,N--}else{b=" "==(b+=i[N][m]+" ").substr(b.length-1)?b.substr(0,b.length-1):b;var A=parseInt(N),g=u(A,b,s),y=N>=i.length-1;if(g&&!y){b+=" ",m=0;continue}if(g||y){if(y)w=A;else if(t.multiline&&(h+2)*(p+2)+2>o)continue t}else{if(!t.multiline)continue t;if((h+2)*(p+2)+2>o)continue t;w=A}}for(var k="",S=d;S<=w;S++){var x=i[S];if(t.multiline){if(S===w){k+=x[m]+" ",m=(m+1)%x.length;continue}if(S===d){k+=x[x.length-1]+" ";continue}}k+=x[0]+" "}switch(k=" "==k.substr(k.length-1)?k.substr(0,k.length-1):k,c=ji(k,t,s).width,t.textAlign){case"right":f=a-c-2;break;case"center":f=(a-c)/2;break;default:f=2}r+=mi(f)+" "+mi(v)+" Td\n",r+="("+di(k)+") Tj\n",r+=-mi(f)+" 0 Td\n",v=-(s+2),c=0,d=L?w:w+1,p++,b=""}break}return n.text=r,n.fontSize=s,n},ji=function(t,r,e){var n=r.scope.internal.getFont(r.fontName,r.fontStyle),i=r.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:r.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:i}},Ri={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:false,internal:null,isInitialized:false},Ii=function(t,r){var e={type:"reference",object:t};void 0===r.internal.getPageInfo(t.page).pageContext.annotations.find((function(t){return t.type===e.type&&t.object===e.object}))&&r.internal.getPageInfo(t.page).pageContext.annotations.push(e)},Oi=function(r,e){if(e.scope=r,void 0!==r.internal&&(void 0===r.internal.acroformPlugin||false===r.internal.acroformPlugin.isInitialized)){if(Di.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(Ri)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");vi=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new Ci,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",(function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=true}(r)})),r.internal.events.subscribe("buildDocument",(function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in r)if(r.hasOwnProperty(e)){var n=r[e];n.objId=void 0,n.hasAnnotation&&Ii(n,t)}}(r)})),r.internal.events.subscribe("putCatalog",(function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(r)})),r.internal.events.subscribe("postPutPages",(function(e){!function(r,e){var n=!r;for(var i in r||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,true),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(i)){var s=r[i],o=[],a=s.Rect;if(s.Rect&&(s.Rect=qi(s.Rect,e)),e.internal.newObjectDeferredBegin(s.objId,true),s.DA=$i.createDefaultAppearanceStream(s),"object"===t(s)&&"function"==typeof s.getKeyValueListForStream&&(o=s.getKeyValueListForStream()),s.Rect=a,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=Ei(s);o.push({key:"AP",value:"<</N "+u+">>"}),e.internal.acroformPlugin.xForms.push(u)}if(s.appearanceStreamContent){var f="";for(var c in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(c)){var h=s.appearanceStreamContent[c];if(f+="/"+c+" ",f+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var i in h)if(h.hasOwnProperty(i)){var l=h[i];"function"==typeof l&&(l=l.call(e,s)),f+="/"+i+" "+l+" ",e.internal.acroformPlugin.xForms.indexOf(l)>=0||e.internal.acroformPlugin.xForms.push(l)}}else"function"==typeof(l=h)&&(l=l.call(e,s)),f+="/"+i+" "+l,e.internal.acroformPlugin.xForms.indexOf(l)>=0||e.internal.acroformPlugin.xForms.push(l);f+=">>"}o.push({key:"AP",value:"<<\n"+f+">>"})}e.internal.putStream({additionalKeyValues:o,objectId:s.objId}),e.internal.out("endobj")}n&&function(r,e){for(var n in r)if(r.hasOwnProperty(n)){var i=n,s=r[n];e.internal.newObjectDeferredBegin(s.objId,true),"object"===t(s)&&"function"==typeof s.putStream&&s.putStream(),delete r[i]}}(e.internal.acroformPlugin.xForms,e)}(e,r)})),r.internal.acroformPlugin.isInitialized=true}},Bi=li.__acroform__.arrayToPdfArray=function(r,e,n){var i=function(t){return t};if(Array.isArray(r)){for(var s="[",o=0;o<r.length;o++)switch(0!==o&&(s+=" "),t(r[o])){case"boolean":case"number":case"object":s+=r[o].toString();break;case"string":"/"!==r[o].substr(0,1)?(void 0!==e&&n&&(i=n.internal.getEncryptor(e)),s+="("+di(i(r[o].toString()))+")"):s+=r[o].toString()}return s+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Pi=function(t,r,e){var n=function(t){return t};return void 0!==r&&e&&(n=e.internal.getEncryptor(r)),(t=t||"").toString(),"("+di(n(t))+")"},Fi=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:true})};Fi.prototype.toString=function(){return this.objId+" 0 R"},Fi.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Fi.prototype.getKeyValueListForStream=function(){var t=[],r=Object.getOwnPropertyNames(this).filter((function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)}));for(var e in r)if(false===Object.getOwnPropertyDescriptor(this,r[e]).configurable){var n=r[e],i=this[n];i&&(Array.isArray(i)?t.push({key:n,value:Bi(i,this.objId,this.scope)}):i instanceof Fi?(i.scope=this.scope,t.push({key:n,value:i.objId+" 0 R"})):"function"!=typeof i&&t.push({key:n,value:i}))}return t};var Ti=function(){Fi.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:false,writable:true}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:false,writable:true}),Object.defineProperty(this,"FormType",{value:1,configurable:false,writable:true});var t,r=[];Object.defineProperty(this,"BBox",{configurable:false,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:false,writable:true}),Object.defineProperty(this,"stream",{enumerable:false,configurable:true,set:function(r){t=r.trim()},get:function(){return t||null}})};pi(Ti,Fi);var Ci=function(){Fi.call(this);var t,r=[];Object.defineProperty(this,"Kids",{enumerable:false,configurable:true,get:function(){return r.length>0?r:void 0}}),Object.defineProperty(this,"Fields",{enumerable:false,configurable:false,get:function(){return r}}),Object.defineProperty(this,"DA",{enumerable:false,configurable:false,get:function(){if(t){var r=function(t){return t};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+di(r(t))+")"}},set:function(r){t=r}})};pi(Ci,Fi);var Di=function t(){Fi.call(this);var r=4;Object.defineProperty(this,"F",{enumerable:false,configurable:false,get:function(){return r},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');r=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:true,configurable:true,get:function(){return Boolean(ki(r,3))},set:function(t){true===Boolean(t)?this.F=Si(r,3):this.F=xi(r,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:false,configurable:false,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');e=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:false,configurable:false,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var i="";Object.defineProperty(this,"FT",{enumerable:true,configurable:false,get:function(){return i},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:true,configurable:false,get:function(){if(!s||s.length<1){if(this instanceof Ji)return;s="FieldObject"+t.FieldNum++}var r=function(t){return t};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+di(r(s))+")"},set:function(t){s=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:true,enumerable:true,get:function(){return s},set:function(t){s=t}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:true,configurable:true,get:function(){return o},set:function(t){o=t}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:true,configurable:true,get:function(){return a},set:function(t){a=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:true,configurable:true,get:function(){return u},set:function(t){u=t}});var f=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:true,configurable:true,get:function(){return void 0===f?50/vi:f},set:function(t){f=t}});var c="black";Object.defineProperty(this,"color",{enumerable:true,configurable:true,get:function(){return c},set:function(t){c=t}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:true,configurable:false,get:function(){if(!(!h||this instanceof Ji||this instanceof Ki))return Pi(h,this.objId,this.scope)},set:function(t){t=t.toString(),h=t}});var l=null;Object.defineProperty(this,"DV",{enumerable:false,configurable:false,get:function(){if(l)return this instanceof Wi==0?Pi(l,this.objId,this.scope):l},set:function(t){t=t.toString(),l=this instanceof Wi==0?"("===t.substr(0,1)?wi(t.substr(1,t.length-2)):wi(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:true,configurable:true,get:function(){return this instanceof Wi==1?wi(l.substr(1,l.length-1)):l},set:function(t){t=t.toString(),l=this instanceof Wi==1?"/"+t:t}});var v=null;Object.defineProperty(this,"_V",{enumerable:false,configurable:false,get:function(){if(v)return v},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:false,configurable:false,get:function(){if(v)return this instanceof Wi==0?Pi(v,this.objId,this.scope):v},set:function(t){t=t.toString(),v=this instanceof Wi==0?"("===t.substr(0,1)?wi(t.substr(1,t.length-2)):wi(t):t}}),Object.defineProperty(this,"value",{enumerable:true,configurable:true,get:function(){return this instanceof Wi==1?wi(v.substr(1,v.length-1)):v},set:function(t){t=t.toString(),v=this instanceof Wi==1?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:true,configurable:true,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:true,configurable:false,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:true,configurable:false,get:function(){return this.hasAnnotation?"/Widget":null}});var d,w=false;Object.defineProperty(this,"hasAppearanceStream",{enumerable:true,configurable:true,get:function(){return w},set:function(t){t=Boolean(t),w=t}}),Object.defineProperty(this,"page",{enumerable:true,configurable:true,get:function(){if(d)return d},set:function(t){d=t}}),Object.defineProperty(this,"readOnly",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,1))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,1):this.Ff=xi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,2))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,2):this.Ff=xi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,3))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,3):this.Ff=xi(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:true,configurable:false,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:true,enumerable:true,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})};pi(Di,Fi);var zi=function(){Di.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:true,configurable:false,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"topIndex",{enumerable:true,configurable:true,get:function(){return t},set:function(r){t=r}});var r=[];Object.defineProperty(this,"Opt",{enumerable:true,configurable:false,get:function(){return Bi(r,this.objId,this.scope)},set:function(t){var e,n;n=[],"string"==typeof(e=t)&&(n=function(t,r,e){e||(e=1);for(var n,i=[];n=r.exec(t);)i.push(n[e]);return i}(e,/\((.*?)\)/g)),r=n}}),this.getOptions=function(){return r},this.setOptions=function(t){r=t,this.sort&&r.sort()},this.addOption=function(t){t=(t=t||"").toString(),r.push(t),this.sort&&r.sort()},this.removeOption=function(t,e){for(e=e||false,t=(t=t||"").toString();-1!==r.indexOf(t)&&(r.splice(r.indexOf(t),1),false!==e););},Object.defineProperty(this,"combo",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,18))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,18):this.Ff=xi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,19))},set:function(t){true===this.combo&&(true===Boolean(t)?this.Ff=Si(this.Ff,19):this.Ff=xi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,20))},set:function(t){true===Boolean(t)?(this.Ff=Si(this.Ff,20),r.sort()):this.Ff=xi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,22))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,22):this.Ff=xi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,23))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,23):this.Ff=xi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,27))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,27):this.Ff=xi(this.Ff,27)}}),this.hasAppearanceStream=false};pi(zi,Di);var Ui=function(){zi.call(this),this.fontName="helvetica",this.combo=false};pi(Ui,zi);var _i=function(){Ui.call(this),this.combo=true};pi(_i,Ui);var Vi=function(){_i.call(this),this.edit=true};pi(Vi,_i);var Wi=function(){Di.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,15))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,15):this.Ff=xi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,16))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,16):this.Ff=xi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,17))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,17):this.Ff=xi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,26))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,26):this.Ff=xi(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:false,configurable:false,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(e).length){var r,n=[];for(r in n.push("<<"),e)n.push("/"+r+" ("+di(t(e[r]))+")");return n.push(">>"),n.join("\n")}},set:function(r){"object"===t(r)&&(e=r)}}),Object.defineProperty(this,"caption",{enumerable:true,configurable:true,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:false,configurable:false,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:true,configurable:true,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}})};pi(Wi,Di);var Hi=function(){Wi.call(this),this.pushButton=true};pi(Hi,Wi);var Gi=function(){Wi.call(this),this.radio=true,this.pushButton=false;var t=[];Object.defineProperty(this,"Kids",{enumerable:true,configurable:false,get:function(){return t},set:function(r){t=void 0!==r?r:[]}})};pi(Gi,Wi);var Ji=function(){var r,e;Di.call(this),Object.defineProperty(this,"Parent",{enumerable:false,configurable:false,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"optionName",{enumerable:false,configurable:true,get:function(){return e},set:function(t){e=t}});var n,i={};Object.defineProperty(this,"MK",{enumerable:false,configurable:false,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var r,e=[];for(r in e.push("<<"),i)e.push("/"+r+" ("+di(t(i[r]))+")");return e.push(">>"),e.join("\n")},set:function(r){"object"===t(r)&&(i=r)}}),Object.defineProperty(this,"caption",{enumerable:true,configurable:true,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:false,configurable:false,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"appearanceState",{enumerable:true,configurable:true,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=$i.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};pi(Ji,Di),Gi.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var r in this.Kids)if(this.Kids.hasOwnProperty(r)){var e=this.Kids[r];e.appearanceStreamContent=t.createAppearanceStream(e.optionName),e.caption=t.getCA()}},Gi.prototype.createOption=function(t){var r=new Ji;return r.Parent=this,r.optionName=t,this.Kids.push(r),Xi.call(this.scope,r),r};var Zi=function(){Wi.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=$i.CheckBox.createAppearanceStream()};pi(Zi,Wi);var Ki=function(){Di.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,13))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,13):this.Ff=xi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,21))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,21):this.Ff=xi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,23))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,23):this.Ff=xi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,24))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,24):this.Ff=xi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,25))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,25):this.Ff=xi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,26))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,26):this.Ff=xi(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:true,configurable:false,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"maxLength",{enumerable:true,configurable:true,get:function(){return t},set:function(r){Number.isInteger(r)&&(t=r)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:true,configurable:true,get:function(){return this.V||this.DV}})};pi(Ki,Di);var Yi=function(){Ki.call(this),Object.defineProperty(this,"password",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,14))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,14):this.Ff=xi(this.Ff,14)}}),this.password=true};pi(Yi,Ki);var $i={CheckBox:{createAppearanceStream:function(){return{N:{On:$i.CheckBox.YesNormal},D:{On:$i.CheckBox.YesPushDown,Off:$i.CheckBox.OffPushDown}}},YesPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),s=Mi(t,t.caption);return e.push("0.749023 g"),e.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+n+" "+mi(s.fontSize)+" Tf "+i),e.push("BT"),e.push(s.text),e.push("ET"),e.push("Q"),e.push("EMC"),r.stream=e.join("\n"),r},YesNormal:function(t){var r=Li(t);r.scope=t.scope;var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=[],s=$i.internal.getHeight(t),o=$i.internal.getWidth(t),a=Mi(t,t.caption);return i.push("1 g"),i.push("0 0 "+mi(o)+" "+mi(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+mi(o-1)+" "+mi(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+e+" "+mi(a.fontSize)+" Tf "+n),i.push(a.text),i.push("ET"),i.push("Q"),r.stream=i.join("\n"),r},OffPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),e.push("f"),r.stream=e.join("\n"),r}},RadioButton:{Circle:{createAppearanceStream:function(t){var r={D:{Off:$i.RadioButton.Circle.OffPushDown},N:{}};return r.N[t]=$i.RadioButton.Circle.YesNormal,r.D[t]=$i.RadioButton.Circle.YesPushDown,r},getCA:function(){return"l"},YesNormal:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.getWidth(t)<=$i.internal.getHeight(t)?$i.internal.getWidth(t)/4:$i.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=$i.internal.Bezier_C,s=Number((n*i).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),e.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),e.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),e.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),e.push("f"),e.push("Q"),r.stream=e.join("\n"),r},YesPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.getWidth(t)<=$i.internal.getHeight(t)?$i.internal.getWidth(t)/4:$i.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*$i.internal.Bezier_C).toFixed(5)),o=Number((n*$i.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/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 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),e.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),e.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),e.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),e.push("f"),e.push("Q"),r.stream=e.join("\n"),r},OffPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.getWidth(t)<=$i.internal.getHeight(t)?$i.internal.getWidth(t)/4:$i.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*$i.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/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"),r.stream=e.join("\n"),r}},Cross:{createAppearanceStream:function(t){var r={D:{Off:$i.RadioButton.Cross.OffPushDown},N:{}};return r.N[t]=$i.RadioButton.Cross.YesNormal,r.D[t]=$i.RadioButton.Cross.YesPushDown,r},getCA:function(){return"8"},YesNormal:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+mi($i.internal.getWidth(t)-2)+" "+mi($i.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(mi(n.x1.x)+" "+mi(n.x1.y)+" m"),e.push(mi(n.x2.x)+" "+mi(n.x2.y)+" l"),e.push(mi(n.x4.x)+" "+mi(n.x4.y)+" m"),e.push(mi(n.x3.x)+" "+mi(n.x3.y)+" l"),e.push("s"),e.push("Q"),r.stream=e.join("\n"),r},YesPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=$i.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+mi($i.internal.getWidth(t)-2)+" "+mi($i.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(mi(e.x1.x)+" "+mi(e.x1.y)+" m"),n.push(mi(e.x2.x)+" "+mi(e.x2.y)+" l"),n.push(mi(e.x4.x)+" "+mi(e.x4.y)+" m"),n.push(mi(e.x3.x)+" "+mi(e.x3.y)+" l"),n.push("s"),n.push("Q"),r.stream=n.join("\n"),r},OffPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),e.push("f"),r.stream=e.join("\n"),r}}},createDefaultAppearanceStream:function(t){var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+r+" "+t.fontSize+" Tf "+e}};$i.internal={Bezier_C:.551915024494,calculateCross:function(t){var r=$i.internal.getWidth(t),e=$i.internal.getHeight(t),n=Math.min(r,e);return{x1:{x:(r-n)/2,y:(e-n)/2+n},x2:{x:(r-n)/2+n,y:(e-n)/2},x3:{x:(r-n)/2,y:(e-n)/2},x4:{x:(r-n)/2+n,y:(e-n)/2+n}}}},$i.internal.getWidth=function(r){var e=0;return"object"===t(r)&&(e=Ni(r.Rect[2])),e},$i.internal.getHeight=function(r){var e=0;return"object"===t(r)&&(e=Ni(r.Rect[3])),e};var Xi=li.addField=function(t){if(Oi(this,t),!(t instanceof Di))throw new Error("Invalid argument passed to jsPDF.addField.");var r;return(r=t).scope.internal.acroformPlugin.printedOut&&(r.scope.internal.acroformPlugin.printedOut=false,r.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};li.AcroFormChoiceField=zi,li.AcroFormListBox=Ui,li.AcroFormComboBox=_i,li.AcroFormEditBox=Vi,li.AcroFormButton=Wi,li.AcroFormPushButton=Hi,li.AcroFormRadioButton=Gi,li.AcroFormCheckBox=Zi,li.AcroFormTextField=Ki,li.AcroFormPasswordField=Yi,li.AcroFormAppearance=$i,li.AcroForm={ChoiceField:zi,ListBox:Ui,ComboBox:_i,EditBox:Vi,Button:Wi,PushButton:Hi,RadioButton:Gi,CheckBox:Zi,TextField:Ki,PasswordField:Yi,Appearance:$i},hi.AcroForm={ChoiceField:zi,ListBox:Ui,ComboBox:_i,EditBox:Vi,Button:Wi,PushButton:Hi,RadioButton:Gi,CheckBox:Zi,TextField:Ki,PasswordField:Yi,Appearance:$i};function Qi(t){return t.reduce((function(t,r,e){return t[r]=e,t}),{})}!function(r){var e="addImage_";r.__addimage__={};var n="UNKNOWN",i={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},s=r.__addimage__.getImageFileTypeByImageData=function(t,r){var e,s,o,a,u,f=n;if("RGBA"===(r=r||n)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(y(t))for(u in i)for(o=i[u],e=0;e<o.length;e+=1){for(a=true,s=0;s<o[e].length;s+=1)if(void 0!==o[e][s]&&o[e][s]!==t[s]){a=false;break}if(true===a){f=u;break}}else for(u in i)for(o=i[u],e=0;e<o.length;e+=1){for(a=true,s=0;s<o[e].length;s+=1)if(void 0!==o[e][s]&&o[e][s]!==t.charCodeAt(s)){a=false;break}if(true===a){f=u;break}}return f===n&&r!==n&&(f=r),f},o=function t(r){for(var e=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);r.objectId=this.internal.newObject();var s=[];if(s.push({key:"Type",value:"/XObject"}),s.push({key:"Subtype",value:"/Image"}),s.push({key:"Width",value:r.width}),s.push({key:"Height",value:r.height}),r.colorSpace===p.INDEXED?s.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(r.palette.length/3-1)+" "+("sMask"in r&&void 0!==r.sMask?r.objectId+2:r.objectId+1)+" 0 R]"}):(s.push({key:"ColorSpace",value:"/"+r.colorSpace}),r.colorSpace===p.DEVICE_CMYK&&s.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),s.push({key:"BitsPerComponent",value:r.bitsPerComponent}),"decodeParameters"in r&&void 0!==r.decodeParameters&&s.push({key:"DecodeParms",value:"<<"+r.decodeParameters+">>"}),"transparency"in r&&Array.isArray(r.transparency)&&r.transparency.length>0){for(var o="",a=0,u=r.transparency.length;a<u;a++)o+=r.transparency[a]+" "+r.transparency[a]+" ";s.push({key:"Mask",value:"["+o+"]"})}void 0!==r.sMask&&s.push({key:"SMask",value:r.objectId+1+" 0 R"});var f=void 0!==r.filter?["/"+r.filter]:void 0;if(n({data:r.data,additionalKeyValues:s,alreadyAppliedFilters:f,objectId:r.objectId}),e("endobj"),"sMask"in r&&void 0!==r.sMask){var c,h=null!==(c=r.sMaskBitsPerComponent)&&void 0!==c?c:r.bitsPerComponent,l={width:r.width,height:r.height,colorSpace:"DeviceGray",bitsPerComponent:h,data:r.sMask};"filter"in r&&(l.decodeParameters="/Predictor ".concat(r.predictor," /Colors 1 /BitsPerComponent ").concat(h," /Columns ").concat(r.width),l.filter=r.filter),t.call(this,l)}if(r.colorSpace===p.INDEXED){var v=this.internal.newObject();n({data:S(new Uint8Array(r.palette)),objectId:v}),e("endobj")}},a=function(){var t=this.internal.collections[e+"images"];for(var r in t)o.call(this,t[r])},u=function(){var t,r=this.internal.collections[e+"images"],n=this.internal.write;for(var i in r)n("/I"+(t=r[i]).index,t.objectId,"0","R")},f=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",u))},c=function(){var t=this.internal.collections[e+"images"];return f.call(this),t},h=function(){return Object.keys(this.internal.collections[e+"images"]).length},l=function(t){return"function"==typeof r["process"+t.toUpperCase()]},v=function(r){return"object"===t(r)&&1===r.nodeType},d=function(t,e){if("IMG"===t.nodeName&&t.hasAttribute("src")){var n=""+t.getAttribute("src");if(0===n.indexOf("data:image/"))return zn(unescape(n).split("base64,").pop());var i=r.loadFile(n,true);if(void 0!==i)return i}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var s;switch(e){case"PNG":s="image/png";break;case"WEBP":s="image/webp";break;default:s="image/jpeg"}return zn(t.toDataURL(s,1).split("base64,").pop())}},w=function(t){var r=this.internal.collections[e+"images"];if(r)for(var n in r)if(t===r[n].alias)return r[n]},m=function(t,r,e){return t||r||(t=-96,r=-96),t<0&&(t=-1*e.width*72/t/this.internal.scaleFactor),r<0&&(r=-1*e.height*72/r/this.internal.scaleFactor),0===t&&(t=r*e.width/e.height),0===r&&(r=t*e.height/e.width),[t,r]},b=function(t,r,e,n,i,s){var o=m.call(this,e,n,i),a=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,f=c.call(this);if(e=o[0],n=o[1],f[i.index]=i,s){s*=Math.PI/180;var h=Math.cos(s),l=Math.sin(s),v=function(t){return t.toFixed(4)},d=[v(h),v(l),v(-1*l),v(h),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,a(t),u(r+n),"cm"].join(" ")),this.internal.write(d.join(" ")),this.internal.write([a(e),"0","0",a(n),"0","0","cm"].join(" "))):this.internal.write([a(e),"0","0",a(n),a(t),u(r+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},p=r.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"};r.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 N=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},L=r.__addimage__.sHashCode=function(t){var r,e,n=0;if("string"==typeof t)for(e=t.length,r=0;r<e;r++)n=(n<<5)-n+t.charCodeAt(r),n|=0;else if(y(t))for(e=t.byteLength/2,r=0;r<e;r++)n=(n<<5)-n+t[r],n|=0;return n},A=r.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var r=true;return 0===t.length&&(r=false),t.length%4!=0&&(r=false),false===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(r=false),false===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(r=false),r},g=r.__addimage__.extractImageFromDataUrl=function(t){if(null==t)return null;if(!(t=t.trim()).startsWith("data:"))return null;var r=t.indexOf(",");return r<0?null:t.substring(0,r).trim().endsWith("base64")?t.substring(r+1):null};r.__addimage__.isArrayBuffer=function(t){return t instanceof ArrayBuffer};var y=r.__addimage__.isArrayBufferView=function(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array},k=r.__addimage__.binaryStringToUint8Array=function(t){for(var r=t.length,e=new Uint8Array(r),n=0;n<r;n++)e[n]=t.charCodeAt(n);return e},S=r.__addimage__.arrayBufferToBinaryString=function(t){for(var r="",e=y(t)?t:new Uint8Array(t),n=0;n<e.length;n+=8192)r+=String.fromCharCode.apply(null,e.subarray(n,n+8192));return r};r.addImage=function(){var r,e,i,s,o,a,u,c,h;if("number"==typeof arguments[1]?(e=n,i=arguments[1],s=arguments[2],o=arguments[3],a=arguments[4],u=arguments[5],c=arguments[6],h=arguments[7]):(e=arguments[1],i=arguments[2],s=arguments[3],o=arguments[4],a=arguments[5],u=arguments[6],c=arguments[7],h=arguments[8]),"object"===t(r=arguments[0])&&!v(r)&&"imageData"in r){var l=r;r=l.imageData,e=l.format||e||n,i=l.x||i||0,s=l.y||s||0,o=l.w||l.width||o,a=l.h||l.height||a,u=l.alias||u,c=l.compression||c,h=l.rotation||l.angle||h}var d=this.internal.getFilters();if(void 0===c&&-1!==d.indexOf("FlateEncode")&&(c="SLOW"),isNaN(i)||isNaN(s))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var w=x.call(this,r,e,u,c);return b.call(this,i,s,o,a,w,h),this};var x=function(t,e,i,o){var a,u,f;if("string"==typeof t&&s(t)===n){t=unescape(t);var c=q(t,false);(""!==c||void 0!==(c=r.loadFile(t,true)))&&(t=c)}if(v(t)&&(t=d(t,e)),e=s(t,e),!l(e))throw new Error("addImage does not support files of type '"+e+"', please ensure that a plugin for '"+e+"' support is added.");if((null==(f=i)||0===f.length)&&(i=function(t){return"string"==typeof t||y(t)?L(t):y(t.data)?L(t.data):null}(t)),(a=w.call(this,i))||(t instanceof Uint8Array||"RGBA"===e||(u=t,t=k(t)),a=this["process"+e.toUpperCase()](t,h.call(this),i,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in r.image_compression?t:N.NONE}(o),u)),!a)throw new Error("An unknown error occurred whilst processing the image.");return a},q=r.__addimage__.convertBase64ToBinaryString=function(t,r){r="boolean"!=typeof r||r;var e,n="";if("string"==typeof t){var i;e=null!==(i=g(t))&&void 0!==i?i:t;try{n=zn(e)}catch(t){if(r)throw A(e)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};r.getImageProperties=function(t){var e,i,o="";if(v(t)&&(t=d(t)),"string"==typeof t&&s(t)===n&&(""===(o=q(t,false))&&(o=r.loadFile(t)||""),t=o),i=s(t),!l(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if(t instanceof Uint8Array||(t=k(t)),!(e=this["process"+i.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return e.fileType=i,e}}(hi.API),
84
+ */var ni={print:4,modify:8,copy:16,"annot-forms":32};function ii(t,r,e,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==ni.perm)throw new Error("Invalid permission: "+t);i+=ni[t]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var s=(r+this.padding).substr(0,32),o=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,o),this.P=-(1+(255^i)),this.encryptionKey=Qn(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=ei(this.encryptionKey,this.padding)}function si(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var r="",e=t.length,n=0;n<e;n++){var i=t.charCodeAt(n);r+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):t[n]}return r}function oi(r){if("object"!==t(r))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,n){if(n=n||false,"string"!=typeof t||"function"!=typeof r||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[r,!!n],i},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],0===Object.keys(e[r]).length&&delete e[r],true;return false},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var s in e[t]){var o=e[t][s];try{o[0].apply(r,n)}catch(t){In.console&&Bn.error("jsPDF PubSub Error",t.message,t)}o[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function ai(t){if(!(this instanceof ai))return new ai(t);var r="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&r.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function ui(t,r){this.gState=t,this.matrix=r,this.id="",this.objectNumber=-1}function fi(t,r,e,n,i){if(!(this instanceof fi))return new fi(t,r,e,n,i);this.type="axial"===t?2:3,this.coords=r,this.colors=e,ui.call(this,n,i)}function ci(t,r,e,n,i){if(!(this instanceof ci))return new ci(t,r,e,n,i);this.boundingBox=t,this.xStep=r,this.yStep=e,this.stream="",this.cloneIndex=0,ui.call(this,n,i)}function hi(r){var e,n="string"==typeof arguments[0]?arguments[0]:"p",i=arguments[1],s=arguments[2],o=arguments[3],a=[],u=1,f=16,c="S",h=null;"object"===t(r=r||{})&&(n=r.orientation,i=r.unit||i,s=r.format||s,o=r.compress||r.compressPdf||o,null!==(h=r.encryption||null)&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),u="number"==typeof r.userUnit?Math.abs(r.userUnit):1,void 0!==r.precision&&(e=r.precision),void 0!==r.floatPrecision&&(f=r.floatPrecision),c=r.defaultPathOperation||"S"),a=r.filters||(true===o?["FlateEncode"]:a),i=i||"mm",n=(""+(n||"P")).toLowerCase();var l=r.putOnlyUsedFonts||false,v={},d={internal:{},__private__:{}};d.__private__.PubSub=oi;var w="1.3",m=d.__private__.getPdfVersion=function(){return w};d.__private__.setPdfVersion=function(t){w=t};var b={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return b};var p=d.__private__.getPageFormat=function(t){return b[t]};s=s||"a4";var N="compat",L="advanced",A=N;function g(){this.saveGraphicsState(),X(new It(vt,0,0,-vt,0,ve()*vt).toString()+" cm"),this.setFontSize(this.getFontSize()/vt),c="n",A=L}function y(){this.restoreGraphicsState(),c="S",A=N}var k=d.__private__.combineFontStyleAndFontWeight=function(t,r){if("bold"==t&&"normal"==r||"bold"==t&&400==r||"normal"==t&&"italic"==r||"bold"==t&&"italic"==r)throw new Error("Invalid Combination of fontweight and fontstyle");return r&&(t=400==r||"normal"===r?"italic"===t?"italic":"normal":700!=r&&"bold"!==r||"normal"!==t?(700==r?"bold":r)+""+t:"bold"),t};d.advancedAPI=function(t){var r=A===N;return r&&g.call(this),"function"!=typeof t||(t(this),r&&y.call(this)),this},d.compatAPI=function(t){var r=A===L;return r&&y.call(this),"function"!=typeof t||(t(this),r&&g.call(this)),this},d.isAdvancedAPI=function(){return A===L};var S,x=function(t){if(A!==L)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},q=d.roundToPrecision=d.__private__.roundToPrecision=function(t,r){var n=e||r;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};S=d.hpf=d.__private__.hpf="number"==typeof f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return q(t,f)}:"smart"===f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return q(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return q(t,16)};var E=d.f2=d.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return q(t,2)},M=d.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return q(t,3)},j=d.scale=d.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return A===N?t*vt:A===L?t:void 0},R=function(t){return j(function(t){return A===N?ve()-t:A===L?t:void 0}(t))};d.__private__.setPrecision=d.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var I,O="00000000000000000000000000000000",B=d.__private__.getFileId=function(){return O},P=d.__private__.setFileId=function(t){return O=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():O.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==h&&(Nr=new ii(h.userPermissions,h.userPassword,h.ownerPassword,O)),O};d.setFileId=function(t){return P(t),this},d.getFileId=function(){return B()};var F=d.__private__.convertDateToPDFDate=function(t){var r=t.getTimezoneOffset(),e=r<0?"+":"-",n=Math.floor(Math.abs(r/60)),i=Math.abs(r%60),s=[e,U(n),"'",U(i),"'"].join("");return["D:",t.getFullYear(),U(t.getMonth()+1),U(t.getDate()),U(t.getHours()),U(t.getMinutes()),U(t.getSeconds()),s].join("")},T=d.__private__.convertPDFDateToDate=function(t){var r=parseInt(t.substr(2,4),10),e=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),s=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(r,e,n,i,s,o,0)},C=d.__private__.setCreationDate=function(t){var r;if(void 0===t&&(t=new Date),t instanceof Date)r=F(t);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(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");r=t}return I=r},D=d.__private__.getCreationDate=function(t){var r=I;return"jsDate"===t&&(r=T(I)),r};d.setCreationDate=function(t){return C(t),this},d.getCreationDate=function(t){return D(t)};var z,U=d.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},_=d.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},V=0,W=[],H=[],G=0,Z=[],J=[],K=false,Y=H;d.__private__.setCustomOutputDestination=function(t){K=true,Y=t};var $=function(t){K||(Y=t)};d.__private__.resetCustomOutputDestination=function(){K=false,Y=H};var X=d.__private__.out=function(t){return t=t.toString(),G+=t.length+1,Y.push(t),Y},Q=d.__private__.write=function(t){return X(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},tt=d.__private__.getArrayBuffer=function(t){for(var r=t.length,e=new ArrayBuffer(r),n=new Uint8Array(e);r--;)n[r]=t.charCodeAt(r);return e},rt=[["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]];d.__private__.getStandardFonts=function(){return rt};var et=r.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(t){return et=A===L?t/vt:t,this};var nt,it=d.__private__.getFontSize=d.getFontSize=function(){return A===N?et:et*vt},st=r.R2L||false;d.__private__.setR2L=d.setR2L=function(t){return st=t,this},d.__private__.getR2L=d.getR2L=function(){return st};var ot,at=d.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))nt=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');nt=t}else nt=parseInt(t,10)};d.__private__.getZoomMode=function(){return nt};var ut,ft=d.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ot=t};d.__private__.getPageMode=function(){return ot};var ct=d.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');ut=t};d.__private__.getLayoutMode=function(){return ut},d.__private__.setDisplayMode=d.setDisplayMode=function(t,r,e){return at(t),ct(r),ft(e),this};var ht={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(t){if(-1===Object.keys(ht).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ht[t]},d.__private__.getDocumentProperties=function(){return ht},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(t){for(var r in ht)ht.hasOwnProperty(r)&&t[r]&&(ht[r]=t[r]);return this},d.__private__.setDocumentProperty=function(t,r){if(-1===Object.keys(ht).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ht[t]=r};var lt,vt,dt,wt,mt,bt={},pt={},Nt=[],Lt={},At={},gt={},yt={},kt=null,St=0,xt=[],qt=new oi(d),Et=r.hotfixes||[],Mt={},jt={},Rt=[],It=function t(r,e,n,i,s,o){if(!(this instanceof t))return new t(r,e,n,i,s,o);isNaN(r)&&(r=1),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(s)&&(s=0),isNaN(o)&&(o=0),this._matrix=[r,e,n,i,s,o]};Object.defineProperty(It.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(It.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(It.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(It.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(It.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(It.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(It.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(It.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(It.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(It.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(It.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(It.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(It.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(It.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(It.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(It.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),It.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(S).join(t)},It.prototype.multiply=function(t){var r=t.sx*this.sx+t.shy*this.shx,e=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,s=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new It(r,e,n,i,s,o)},It.prototype.decompose=function(){var t=this.sx,r=this.shy,e=this.shx,n=this.sy,i=this.tx,s=this.ty,o=Math.sqrt(t*t+r*r),a=(t/=o)*e+(r/=o)*n;e-=t*a,n-=r*a;var u=Math.sqrt(e*e+n*n);return a/=u,t*(n/=u)<r*(e/=u)&&(t=-t,r=-r,a=-a,o=-o),{scale:new It(o,0,0,u,0,0),translate:new It(1,0,0,1,i,s),rotate:new It(t,r,-r,t,0,0),skew:new It(1,0,a,1,0,0)}},It.prototype.toString=function(t){return this.join(" ")},It.prototype.inversed=function(){var t=this.sx,r=this.shy,e=this.shx,n=this.sy,i=this.tx,s=this.ty,o=1/(t*n-r*e),a=n*o,u=-r*o,f=-e*o,c=t*o;return new It(a,u,f,c,-a*i-f*s,-u*i-c*s)},It.prototype.applyToPoint=function(t){var r=t.x*this.sx+t.y*this.shx+this.tx,e=t.x*this.shy+t.y*this.sy+this.ty;return new ee(r,e)},It.prototype.applyToRectangle=function(t){var r=this.applyToPoint(t),e=this.applyToPoint(new ee(t.x+t.w,t.y+t.h));return new ne(r.x,r.y,e.x-r.x,e.y-r.y)},It.prototype.clone=function(){var t=this.sx,r=this.shy,e=this.shx,n=this.sy,i=this.tx,s=this.ty;return new It(t,r,e,n,i,s)},d.Matrix=It;var Ot=d.matrixMult=function(t,r){return r.multiply(t)},Bt=new It(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=Bt;var Pt=function(t,r){if(!At[t]){var e=(r instanceof fi?"Sh":"P")+(Object.keys(Lt).length+1).toString(10);r.id=e,At[t]=e,Lt[e]=r,qt.publish("addPattern",r)}};d.ShadingPattern=fi,d.TilingPattern=ci,d.addShadingPattern=function(t,r){return x("addShadingPattern()"),Pt(t,r),this},d.beginTilingPattern=function(t){x("beginTilingPattern()"),se(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},d.endTilingPattern=function(t,r){x("endTilingPattern()"),r.stream=J[z].join("\n"),Pt(t,r),qt.publish("endTilingPattern",r),Rt.pop().restore()};var Ft,Tt=d.__private__.newObject=function(){var t=Ct();return Dt(t,true),t},Ct=d.__private__.newObjectDeferred=function(){return V++,W[V]=function(){return G},V},Dt=function(t,r){return r="boolean"==typeof r&&r,W[t]=G,r&&X(t+" 0 obj"),t},zt=d.__private__.newAdditionalObject=function(){var t={objId:Ct(),content:""};return Z.push(t),t},Ut=Ct(),_t=Ct(),Vt=d.__private__.decodeColorString=function(t){var r=t.split(" ");if(2!==r.length||"g"!==r[1]&&"G"!==r[1])5!==r.length||"k"!==r[4]&&"K"!==r[4]||(r=[(1-r[0])*(1-r[3]),(1-r[1])*(1-r[3]),(1-r[2])*(1-r[3]),"r"]);else{var e=parseFloat(r[0]);r=[e,e,e,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(r[i])).toString(16)).slice(-2);return n},Wt=d.__private__.encodeColorString=function(r){var e;"string"==typeof r&&(r={ch1:r});var n=r.ch1,i=r.ch2,s=r.ch3,o=r.ch4,a="draw"===r.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var u=new Dn(n);if(u.ok)n=u.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var f=parseInt(n.substr(1),16);n=f>>16&255,i=f>>8&255,s=255&f}if(void 0===i||void 0===o&&n===i&&i===s)e="string"==typeof n?n+" "+a[0]:2===r.precision?E(n/255)+" "+a[0]:M(n/255)+" "+a[0];else if(void 0===o||"object"===t(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",a[1]].join(" ");e="string"==typeof n?[n,i,s,a[1]].join(" "):2===r.precision?[E(n/255),E(i/255),E(s/255),a[1]].join(" "):[M(n/255),M(i/255),M(s/255),a[1]].join(" ")}else e="string"==typeof n?[n,i,s,o,a[2]].join(" "):2===r.precision?[E(n),E(i),E(s),E(o),a[2]].join(" "):[M(n),M(i),M(s),M(o),a[2]].join(" ");return e},Ht=d.__private__.getFilters=function(){return a},Gt=d.__private__.putStream=function(t){var r=(t=t||{}).data||"",e=t.filters||Ht(),n=t.alreadyAppliedFilters||[],i=t.addLength1||false,s=r.length,o=t.objectId,a=function(t){return t};if(null!==h&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==h&&(a=Nr.encryptor(o,0));var u={};true===e&&(e=["FlateEncode"]);var f=t.additionalKeyValues||[],c=(u=void 0!==hi.API.processDataByFilters?hi.API.processDataByFilters(r,e):{data:r,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(f.push({key:"Length",value:u.data.length}),true===i&&f.push({key:"Length1",value:s})),0!=c.length)if(c.split("/").length-1==1)f.push({key:"Filter",value:c});else{f.push({key:"Filter",value:"["+c+"]"});for(var l=0;l<f.length;l+=1)if("DecodeParms"===f[l].key){for(var v=[],d=0;d<u.reverseChain.split("/").length-1;d+=1)v.push("null");v.push(f[l].value),f[l].value="["+v.join(" ")+"]"}}X("<<");for(var w=0;w<f.length;w++)X("/"+f[w].key+" "+f[w].value);X(">>"),0!==u.data.length&&(X("stream"),X(a(u.data)),X("endstream"))},Zt=d.__private__.putPage=function(t){var r=t.number,e=t.data,n=t.objId,i=t.contentsObjId;Dt(n,true),X("<</Type /Page"),X("/Parent "+t.rootDictionaryObjId+" 0 R"),X("/Resources "+t.resourceDictionaryObjId+" 0 R"),X("/MediaBox ["+parseFloat(S(t.mediaBox.bottomLeftX))+" "+parseFloat(S(t.mediaBox.bottomLeftY))+" "+S(t.mediaBox.topRightX)+" "+S(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&X("/CropBox ["+S(t.cropBox.bottomLeftX)+" "+S(t.cropBox.bottomLeftY)+" "+S(t.cropBox.topRightX)+" "+S(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&X("/BleedBox ["+S(t.bleedBox.bottomLeftX)+" "+S(t.bleedBox.bottomLeftY)+" "+S(t.bleedBox.topRightX)+" "+S(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&X("/TrimBox ["+S(t.trimBox.bottomLeftX)+" "+S(t.trimBox.bottomLeftY)+" "+S(t.trimBox.topRightX)+" "+S(t.trimBox.topRightY)+"]"),null!==t.artBox&&X("/ArtBox ["+S(t.artBox.bottomLeftX)+" "+S(t.artBox.bottomLeftY)+" "+S(t.artBox.topRightX)+" "+S(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&X("/UserUnit "+t.userUnit),qt.publish("putPage",{objId:n,pageContext:xt[r],pageNumber:r,page:e}),X("/Contents "+i+" 0 R"),X(">>"),X("endobj");var s=e.join("\n");return A===L&&(s+="\nQ"),Dt(i,true),Gt({data:s,filters:Ht(),objectId:i}),X("endobj"),n},Jt=d.__private__.putPages=function(){var t,r,e=[];for(t=1;t<=St;t++)xt[t].objId=Ct(),xt[t].contentsObjId=Ct();for(t=1;t<=St;t++)e.push(Zt({number:t,data:J[t],objId:xt[t].objId,contentsObjId:xt[t].contentsObjId,mediaBox:xt[t].mediaBox,cropBox:xt[t].cropBox,bleedBox:xt[t].bleedBox,trimBox:xt[t].trimBox,artBox:xt[t].artBox,userUnit:xt[t].userUnit,rootDictionaryObjId:Ut,resourceDictionaryObjId:_t}));Dt(Ut,true),X("<</Type /Pages");var n="/Kids [";for(r=0;r<St;r++)n+=e[r]+" 0 R ";X(n+"]"),X("/Count "+St),X(">>"),X("endobj"),qt.publish("postPutPages")},Kt=function(t){qt.publish("putFont",{font:t,out:X,newObject:Tt,putStream:Gt}),true!==t.isAlreadyPutted&&(t.objectNumber=Tt(),X("<<"),X("/Type /Font"),X("/BaseFont /"+si(t.postScriptName)),X("/Subtype /Type1"),"string"==typeof t.encoding&&X("/Encoding /"+t.encoding),X("/FirstChar 32"),X("/LastChar 255"),X(">>"),X("endobj"))},Yt=function(t){t.objectNumber=Tt();var r=[];r.push({key:"Type",value:"/XObject"}),r.push({key:"Subtype",value:"/Form"}),r.push({key:"BBox",value:"["+[S(t.x),S(t.y),S(t.x+t.width),S(t.y+t.height)].join(" ")+"]"}),r.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var e=t.pages[1].join("\n");Gt({data:e,additionalKeyValues:r,objectId:t.objectNumber}),X("endobj")},$t=function(t,r){r||(r=21);var e=Tt(),n=function(t,r){var e,n=[],i=1/(r-1);for(e=0;e<1;e+=i)n.push(e);if(n.push(1),0!=t[0].offset){var s={offset:0,color:t[0].color};t.unshift(s)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var a="",u=0,f=0;f<n.length;f++){for(e=n[f];e>t[u+1].offset;)u++;var c=t[u].offset,h=(e-c)/(t[u+1].offset-c),l=t[u].color,v=t[u+1].color;a+=_(Math.round((1-h)*l[0]+h*v[0]).toString(16))+_(Math.round((1-h)*l[1]+h*v[1]).toString(16))+_(Math.round((1-h)*l[2]+h*v[2]).toString(16))}return a.trim()}(t.colors,r),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+r+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Gt({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:e}),X("endobj"),t.objectNumber=Tt(),X("<< /ShadingType "+t.type),X("/ColorSpace /DeviceRGB");var s="/Coords ["+S(parseFloat(t.coords[0]))+" "+S(parseFloat(t.coords[1]))+" ";2===t.type?s+=S(parseFloat(t.coords[2]))+" "+S(parseFloat(t.coords[3])):s+=S(parseFloat(t.coords[2]))+" "+S(parseFloat(t.coords[3]))+" "+S(parseFloat(t.coords[4]))+" "+S(parseFloat(t.coords[5])),X(s+="]"),t.matrix&&X("/Matrix ["+t.matrix.toString()+"]"),X("/Function "+e+" 0 R"),X("/Extend [true true]"),X(">>"),X("endobj")},Xt=function(t,r){var e=Ct(),n=Tt();r.push({resourcesOid:e,objectOid:n}),t.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(S).join(" ")+"]"}),i.push({key:"XStep",value:S(t.xStep)}),i.push({key:"YStep",value:S(t.yStep)}),i.push({key:"Resources",value:e+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),Gt({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),X("endobj")},Qt=function(t){for(var r in t.objectNumber=Tt(),X("<<"),t)switch(r){case"opacity":X("/ca "+E(t[r]));break;case"stroke-opacity":X("/CA "+E(t[r]))}X(">>"),X("endobj")},tr=function(t){Dt(t.resourcesOid,true),X("<<"),X("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in X("/Font <<"),bt)bt.hasOwnProperty(t)&&(false===l||true===l&&v.hasOwnProperty(t))&&X("/"+t+" "+bt[t].objectNumber+" 0 R");X(">>")}(),function(){if(Object.keys(Lt).length>0){for(var t in X("/Shading <<"),Lt)Lt.hasOwnProperty(t)&&Lt[t]instanceof fi&&Lt[t].objectNumber>=0&&X("/"+t+" "+Lt[t].objectNumber+" 0 R");qt.publish("putShadingPatternDict"),X(">>")}}(),function(t){if(Object.keys(Lt).length>0){for(var r in X("/Pattern <<"),Lt)Lt.hasOwnProperty(r)&&Lt[r]instanceof d.TilingPattern&&Lt[r].objectNumber>=0&&Lt[r].objectNumber<t&&X("/"+r+" "+Lt[r].objectNumber+" 0 R");qt.publish("putTilingPatternDict"),X(">>")}}(t.objectOid),function(){if(Object.keys(gt).length>0){var t;for(t in X("/ExtGState <<"),gt)gt.hasOwnProperty(t)&&gt[t].objectNumber>=0&&X("/"+t+" "+gt[t].objectNumber+" 0 R");qt.publish("putGStateDict"),X(">>")}}(),function(){for(var t in X("/XObject <<"),Mt)Mt.hasOwnProperty(t)&&Mt[t].objectNumber>=0&&X("/"+t+" "+Mt[t].objectNumber+" 0 R");qt.publish("putXobjectDict"),X(">>")}(),X(">>"),X("endobj")},rr=function(t){pt[t.fontName]=pt[t.fontName]||{},pt[t.fontName][t.fontStyle]=t.id},er=function(t,r,e,n,i){var s={id:"F"+(Object.keys(bt).length+1).toString(10),postScriptName:t,fontName:r,fontStyle:e,encoding:n,isStandardFont:i||false,metadata:{}};return qt.publish("addFont",{font:s,instance:this}),bt[s.id]=s,rr(s),s.id},nr=d.__private__.pdfEscape=d.pdfEscape=function(t,r){return function(t,r){var e,n,i,s,o,a,u,f,c;if(i=(r=r||{}).sourceEncoding||"Unicode",o=r.outputEncoding,(r.autoencode||o)&&bt[lt].metadata&&bt[lt].metadata[i]&&bt[lt].metadata[i].encoding&&(s=bt[lt].metadata[i].encoding,!o&&bt[lt].encoding&&(o=bt[lt].encoding),!o&&s.codePages&&(o=s.codePages[0]),"string"==typeof o&&(o=s[o]),o)){for(u=false,a=[],e=0,n=t.length;e<n;e++)(f=o[t.charCodeAt(e)])?a.push(String.fromCharCode(f)):a.push(t[e]),a[e].charCodeAt(0)>>8&&(u=true);t=a.join("")}for(e=t.length;void 0===u&&0!==e;)t.charCodeAt(e-1)>>8&&(u=true),e--;if(!u)return t;for(a=r.noBOM?[]:[254,255],e=0,n=t.length;e<n;e++){if((c=(f=t.charCodeAt(e))>>8)>>8)throw new Error("Character at position "+e+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(c),a.push(f-(c<<8))}return String.fromCharCode.apply(void 0,a)}(t,r).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ir=d.__private__.beginPage=function(t){J[++St]=[],xt[St]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},ar(St),$(J[z])},sr=function(t,r){var e,i,o;switch(n=r||n,"string"==typeof t&&(e=p(t.toLowerCase()),Array.isArray(e)&&(i=e[0],o=e[1])),Array.isArray(t)&&(i=t[0]*vt,o=t[1]*vt),isNaN(i)&&(i=s[0],o=s[1]),(i>14400||o>14400)&&(Bn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),o=Math.min(14400,o)),s=[i,o],n.substr(0,1)){case"l":o>i&&(s=[o,i]);break;case"p":i>o&&(s=[o,i])}ir(s),Dr(Tr),X(Zr),0!==Qr&&X(Qr+" J"),0!==te&&X(te+" j"),qt.publish("addPage",{pageNumber:St})},or=function(t){t>0&&t<=St&&(J.splice(t,1),xt.splice(t,1),St--,z>St&&(z=St),this.setPage(z))},ar=function(t){t>0&&t<=St&&(z=t)},ur=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return J.length-1},fr=function(t,r,e){var n,i=void 0;return e=e||{},t=void 0!==t?t:bt[lt].fontName,r=void 0!==r?r:bt[lt].fontStyle,n=t.toLowerCase(),void 0!==pt[n]&&void 0!==pt[n][r]?i=pt[n][r]:void 0!==pt[t]&&void 0!==pt[t][r]?i=pt[t][r]:false===e.disableWarning&&Bn.warn("Unable to look up font label for font '"+t+"', '"+r+"'. Refer to getFontList() for available fonts."),i||e.noFallback||null==(i=pt.times[r])&&(i=pt.times.normal),i},cr=d.__private__.putInfo=function(){var t=Tt(),r=function(t){return t};for(var e in null!==h&&(r=Nr.encryptor(t,0)),X("<<"),X("/Producer ("+nr(r("jsPDF "+hi.version))+")"),ht)ht.hasOwnProperty(e)&&ht[e]&&X("/"+e.substr(0,1).toUpperCase()+e.substr(1)+" ("+nr(r(ht[e]))+")");X("/CreationDate ("+nr(r(I))+")"),X(">>"),X("endobj")},hr=d.__private__.putCatalog=function(t){var r=(t=t||{}).rootDictionaryObjId||Ut;switch(Tt(),X("<<"),X("/Type /Catalog"),X("/Pages "+r+" 0 R"),nt||(nt="fullwidth"),nt){case"fullwidth":X("/OpenAction [3 0 R /FitH null]");break;case"fullheight":X("/OpenAction [3 0 R /FitV null]");break;case"fullpage":X("/OpenAction [3 0 R /Fit]");break;case"original":X("/OpenAction [3 0 R /XYZ null null 1]");break;default:var e=""+nt;"%"===e.substr(e.length-1)&&(nt=parseInt(nt)/100),"number"==typeof nt&&X("/OpenAction [3 0 R /XYZ null null "+E(nt)+"]")}switch(ut||(ut="continuous"),ut){case"continuous":X("/PageLayout /OneColumn");break;case"single":X("/PageLayout /SinglePage");break;case"two":case"twoleft":X("/PageLayout /TwoColumnLeft");break;case"tworight":X("/PageLayout /TwoColumnRight")}ot&&X("/PageMode /"+ot),qt.publish("putCatalog"),X(">>"),X("endobj")},lr=d.__private__.putTrailer=function(){X("trailer"),X("<<"),X("/Size "+(V+1)),X("/Root "+V+" 0 R"),X("/Info "+(V-1)+" 0 R"),null!==h&&X("/Encrypt "+Nr.oid+" 0 R"),X("/ID [ <"+O+"> <"+O+"> ]"),X(">>")},vr=d.__private__.putHeader=function(){X("%PDF-"+w),X("%ºß¬à")},dr=d.__private__.putXRef=function(){var t="0000000000";X("xref"),X("0 "+(V+1)),X("0000000000 65535 f ");for(var r=1;r<=V;r++)"function"==typeof W[r]?X((t+W[r]()).slice(-10)+" 00000 n "):void 0!==W[r]?X((t+W[r]).slice(-10)+" 00000 n "):X("0000000000 00000 n ")},wr=d.__private__.buildDocument=function(){var t;V=0,G=0,H=[],W=[],Z=[],Ut=Ct(),_t=Ct(),$(H),qt.publish("buildDocument"),vr(),Jt(),function(){qt.publish("putAdditionalObjects");for(var t=0;t<Z.length;t++){var r=Z[t];Dt(r.objId,true),X(r.content),X("endobj")}qt.publish("postPutAdditionalObjects")}(),t=[],function(){for(var t in bt)bt.hasOwnProperty(t)&&(false===l||true===l&&v.hasOwnProperty(t))&&Kt(bt[t])}(),function(){var t;for(t in gt)gt.hasOwnProperty(t)&&Qt(gt[t])}(),function(){for(var t in Mt)Mt.hasOwnProperty(t)&&Yt(Mt[t])}(),function(t){var r;for(r in Lt)Lt.hasOwnProperty(r)&&(Lt[r]instanceof fi?$t(Lt[r]):Lt[r]instanceof ci&&Xt(Lt[r],t))}(t),qt.publish("putResources"),t.forEach(tr),tr({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),qt.publish("postPutResources"),null!==h&&(Nr.oid=Tt(),X("<<"),X("/Filter /Standard"),X("/V "+Nr.v),X("/R "+Nr.r),X("/U <"+Nr.toHexString(Nr.U)+">"),X("/O <"+Nr.toHexString(Nr.O)+">"),X("/P "+Nr.P),X(">>"),X("endobj")),cr(),hr();var r=G;return dr(),lr(),X("startxref"),X(""+r),X("%%EOF"),$(J[z]),H.join("\n")},mr=d.__private__.getBlob=function(t){return new Blob([tt(t)],{type:"application/pdf"})},br=d.output=d.__private__.output=(Ft=function(t,r){switch("string"==typeof(r=r||{})?r={filename:r}:r.filename=r.filename||"generated.pdf",t){case void 0:return wr();case"save":d.save(r.filename);break;case"arraybuffer":return tt(wr());case"blob":return mr(wr());case"bloburi":case"bloburl":if(void 0!==In.URL&&"function"==typeof In.URL.createObjectURL)return In.URL&&In.URL.createObjectURL(mr(wr()))||void 0;Bn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var e="",n=wr();try{e=Un(n)}catch(t){e=Un(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+r.filename+";base64,"+e;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(In)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",s=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';r.pdfObjectUrl&&(i=r.pdfObjectUrl,s="");var o='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+i+'"'+s+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(r)+");<\/script></body></html>",a=In.open();return null!==a&&a.document.write(o),a}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(In)){var u='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(r.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+r.filename+'" width="500px" height="400px" /></body></html>',f=In.open();if(null!==f){f.document.write(u);var c=this;f.document.documentElement.querySelector("#pdfViewer").onload=function(){f.document.title=r.filename,f.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(c.output("bloburl"))}}return f}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(In))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var h='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",r)+'"></iframe></body></html>',l=In.open();if(null!==l&&(l.document.write(h),l.document.title=r.filename),l||"undefined"==typeof safari)return l;break;case"datauri":case"dataurl":return In.document.location.href=this.output("datauristring",r);default:return null}},Ft.foo=function(){try{return Ft.apply(this,arguments)}catch(e){var t=e.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var r="Error in function "+t.split("\n")[0].split("<")[0]+": "+e.message;if(!In.console)throw new Error(r);In.console.error(r,e),In.alert&&alert(r)}},Ft.foo.bar=Ft,Ft.foo),pr=function(t){return true===Array.isArray(Et)&&Et.indexOf(t)>-1};switch(i){case"pt":vt=1;break;case"mm":vt=72/25.4;break;case"cm":vt=72/2.54;break;case"in":vt=72;break;case"px":vt=1==pr("px_scaling")?.75:96/72;break;case"pc":case"em":vt=12;break;case"ex":vt=6;break;default:if("number"!=typeof i)throw new Error("Invalid unit: "+i);vt=i}var Nr=null;C(),P();var Lr=d.__private__.getPageInfo=d.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:xt[t].objId,pageNumber:t,pageContext:xt[t]}},Ar=d.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var r in xt)if(xt[r].objId===t)break;return Lr(r)},gr=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:xt[z].objId,pageNumber:z,pageContext:xt[z]}};d.addPage=function(){return sr.apply(this,arguments),this},d.setPage=function(){return ar.apply(this,arguments),$.call(this,J[z]),this},d.insertPage=function(t){return this.addPage(),this.movePage(z,t),this},d.movePage=function(t,r){var e,n;if(t>r){e=J[t],n=xt[t];for(var i=t;i>r;i--)J[i]=J[i-1],xt[i]=xt[i-1];J[r]=e,xt[r]=n,this.setPage(r)}else if(t<r){e=J[t],n=xt[t];for(var s=t;s<r;s++)J[s]=J[s+1],xt[s]=xt[s+1];J[r]=e,xt[r]=n,this.setPage(r)}return this},d.deletePage=function(){return or.apply(this,arguments),this},d.__private__.text=d.text=function(r,e,n,i,s){var o,a,u,f,c,h,l,d,w,m=(i=i||{}).scope||this;if("number"==typeof r&&"number"==typeof e&&("string"==typeof n||Array.isArray(n))){var b=n;n=e,e=r,r=b}if(arguments[3]instanceof It==0?(u=arguments[4],f=arguments[5],"object"===t(l=arguments[3])&&null!==l||("string"==typeof u&&(f=u,u=null),"string"==typeof l&&(f=l,l=null),"number"==typeof l&&(u=l,l=null),i={flags:l,angle:u,align:f})):(x("The transform parameter of text() with a Matrix value"),w=s),isNaN(e)||isNaN(n)||null==r)throw new Error("Invalid arguments passed to jsPDF.text");if(0===r.length)return m;var p,N="",g="number"==typeof i.lineHeightFactor?i.lineHeightFactor:Fr,y=m.internal.scaleFactor;function k(t){return t=t.split("\t").join(Array(i.TabLen||9).join(" ")),nr(t,l)}function q(t){for(var r,e=t.concat(),n=[],i=e.length;i--;)"string"==typeof(r=e.shift())?n.push(r):Array.isArray(t)&&(1===r.length||void 0===r[1]&&void 0===r[2])?n.push(r[0]):n.push([r[0],r[1],r[2]]);return n}function E(t,r){var e;if("string"==typeof t)e=r(t)[0];else if(Array.isArray(t)){for(var n,i,s=t.concat(),o=[],a=s.length;a--;)"string"==typeof(n=s.shift())?o.push(r(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(i=r(n[0],n[1],n[2]),o.push([i[0],i[1],i[2]]));e=o}return e}var M=false,R=true;if("string"==typeof r)M=true;else if(Array.isArray(r)){var I=r.concat();a=[];for(var O,B=I.length;B--;)("string"!=typeof(O=I.shift())||Array.isArray(O)&&"string"!=typeof O[0])&&(R=false);M=R}if(false===M)throw new Error('Type of text must be string or Array. "'+r+'" is not recognized.');"string"==typeof r&&(r=r.match(/[\r?\n]/)?r.split(/\r\n|\r|\n/g):[r]);var P=et/m.internal.scaleFactor,F=P*(g-1);switch(i.baseline){case"bottom":n-=F;break;case"top":n+=P-F;break;case"hanging":n+=P-2*F;break;case"middle":n+=P/2-F}if((h=i.maxWidth||0)>0&&("string"==typeof r?r=m.splitTextToSize(r,h):"[object Array]"===Object.prototype.toString.call(r)&&(r=r.reduce((function(t,r){return t.concat(m.splitTextToSize(r,h))}),[]))),o={text:r,x:e,y:n,options:i,mutex:{pdfEscape:nr,activeFontKey:lt,fonts:bt,activeFontSize:et}},qt.publish("preProcessText",o),r=o.text,u=(i=o.options).angle,w instanceof It==0&&u&&"number"==typeof u){u*=Math.PI/180,0===i.rotationDirection&&(u=-u),A===L&&(u=-u);var T=Math.cos(u),C=Math.sin(u);w=new It(T,C,-C,T,0,0)}else u&&u instanceof It&&(w=u);A!==L||w||(w=Bt),void 0!==(c=i.charSpace||$r)&&(N+=S(j(c))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=i.horizontalScale)&&(N+=S(100*d)+" Tz\n");var D=-1,z=void 0!==i.renderingMode?i.renderingMode:i.stroke,U=m.internal.getCurrentPageInfo().pageContext;switch(z){case 0:case false:case"fill":D=0;break;case 1:case true:case"stroke":D=1;break;case 2:case"fillThenStroke":D=2;break;case 3:case"invisible":D=3;break;case 4:case"fillAndAddForClipping":D=4;break;case 5:case"strokeAndAddPathForClipping":D=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":D=6;break;case 7:case"addToPathForClipping":D=7}var _=void 0!==U.usedRenderingMode?U.usedRenderingMode:-1;-1!==D?N+=D+" Tr\n":-1!==_&&(N+="0 Tr\n"),-1!==D&&(U.usedRenderingMode=D),f=i.align||"left";var V,W=et*g,H=m.internal.pageSize.getWidth(),G=bt[lt];c=i.charSpace||$r,h=i.maxWidth||0,l=Object.assign({autoencode:true,noBOM:true},i.flags);var Z=[],J=function(t){return m.getStringUnitWidth(t,{font:G,charSpace:c,fontSize:et,doKerning:false})*et/y};if("[object Array]"===Object.prototype.toString.call(r)){var K;a=q(r),"left"!==f&&(V=a.map(J));var Y,$=0;if("right"===f){e-=V[0],r=[],B=a.length;for(var Q=0;Q<B;Q++)0===Q?(Y=Vr(e),K=Wr(n)):(Y=j($-V[Q]),K=-W),r.push([a[Q],Y,K]),$=V[Q]}else if("center"===f){e-=V[0]/2,r=[],B=a.length;for(var tt=0;tt<B;tt++)0===tt?(Y=Vr(e),K=Wr(n)):(Y=j(($-V[tt])/2),K=-W),r.push([a[tt],Y,K]),$=V[tt]}else if("left"===f){r=[],B=a.length;for(var rt=0;rt<B;rt++)r.push(a[rt])}else if("justify"===f&&"Identity-H"===G.encoding){r=[],B=a.length,h=0!==h?h:H;for(var nt=0,it=0;it<B;it++)if(K=0===it?Wr(n):-W,Y=0===it?Vr(e):nt,it<B-1){var ot=j((h-V[it])/(a[it].split(" ").length-1)),at=a[it].split(" ");r.push([at[0]+" ",Y,K]),nt=0;for(var ut=1;ut<at.length;ut++){var ft=(J(at[ut-1]+" "+at[ut])-J(at[ut]))*y+ot;ut==at.length-1?r.push([at[ut],ft,0]):r.push([at[ut]+" ",ft,0]),nt-=ft}}else r.push([a[it],Y,K]);r.push(["",nt,0])}else{if("justify"!==f)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(r=[],B=a.length,h=0!==h?h:H,it=0;it<B;it++){K=0===it?Wr(n):-W,Y=0===it?Vr(e):0;var ct=a[it].split(" ").length-1,ht=ct>0?(h-V[it])/ct:0;it<B-1?Z.push(S(j(ht))):Z.push(0),r.push([a[it],Y,K])}}}true===("boolean"==typeof i.R2L?i.R2L:st)&&(r=E(r,(function(t,r,e){return[t.split("").reverse().join(""),r,e]}))),o={text:r,x:e,y:n,options:i,mutex:{pdfEscape:nr,activeFontKey:lt,fonts:bt,activeFontSize:et}},qt.publish("postProcessText",o),r=o.text,p=o.mutex.isHex||false;var vt=bt[lt].encoding;"WinAnsiEncoding"!==vt&&"StandardEncoding"!==vt||(r=E(r,(function(t,r,e){return[k(t),r,e]}))),a=q(r),r=[];for(var dt,wt,mt,pt=Array.isArray(a[0])?1:0,Nt="",Lt=function(t,r,e){var n="";return e instanceof It?(e="number"==typeof i.angle?Ot(e,new It(1,0,0,1,t,r)):Ot(new It(1,0,0,1,t,r),e),A===L&&(e=Ot(new It(1,0,0,-1,0,0),e)),n=e.join(" ")+" Tm\n"):n=S(t)+" "+S(r)+" Td\n",n},At=0;At<a.length;At++){switch(Nt="",pt){case 1:mt=(p?"<":"(")+a[At][0]+(p?">":")"),dt=parseFloat(a[At][1]),wt=parseFloat(a[At][2]);break;case 0:mt=(p?"<":"(")+a[At]+(p?">":")"),dt=Vr(e),wt=Wr(n)}void 0!==Z&&void 0!==Z[At]&&(Nt=Z[At]+" Tw\n"),0===At?r.push(Nt+Lt(dt,wt,w)+mt):0===pt?r.push(Nt+mt):1===pt&&r.push(Nt+Lt(dt,wt,w)+mt)}r=0===pt?r.join(" Tj\nT* "):r.join(" Tj\n"),r+=" Tj\n";var gt="BT\n/";return gt+=lt+" "+et+" Tf\n",gt+=S(et*g)+" TL\n",gt+=Kr+"\n",gt+=N,gt+=r,X(gt+="ET"),v[lt]=true,m};var yr=d.__private__.clip=d.clip=function(t){return X("evenodd"===t?"W*":"W"),this};d.clipEvenOdd=function(){return yr("evenodd")},d.__private__.discardPath=d.discardPath=function(){return X("n"),this};var kr=d.__private__.isValidStyle=function(t){var r=false;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(r=true),r};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(t){return kr(t)&&(c=t),this};var Sr=d.__private__.getStyle=d.getStyle=function(t){var r=c;switch(t){case"D":case"S":r="S";break;case"F":r="f";break;case"FD":case"DF":r="B";break;case"f":case"f*":case"B":case"B*":r=t}return r},xr=d.close=function(){return X("h"),this};d.stroke=function(){return X("S"),this},d.fill=function(t){return qr("f",t),this},d.fillEvenOdd=function(t){return qr("f*",t),this},d.fillStroke=function(t){return qr("B",t),this},d.fillStrokeEvenOdd=function(t){return qr("B*",t),this};var qr=function(r,e){"object"===t(e)?jr(e,r):X(r)},Er=function(t){null===t||A===L&&void 0===t||(t=Sr(t),X(t))};function Mr(t,r,e,n,i){var s=new ci(r||this.boundingBox,e||this.xStep,n||this.yStep,this.gState,i||this.matrix);s.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Pt(o,s),s}var jr=function(t,r){var e=At[t.key],n=Lt[e];if(n instanceof fi)X("q"),X(Rr(r)),n.gState&&d.setGState(n.gState),X(t.matrix.toString()+" cm"),X("/"+e+" sh"),X("Q");else if(n instanceof ci){var i=new It(1,0,0,-1,0,ve());t.matrix&&(i=i.multiply(t.matrix||Bt),e=Mr.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),X("q"),X("/Pattern cs"),X("/"+e+" scn"),n.gState&&d.setGState(n.gState),X(r),X("Q")}},Rr=function(t){switch(t){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"}},Ir=d.moveTo=function(t,r){return X(S(j(t))+" "+S(R(r))+" m"),this},Or=d.lineTo=function(t,r){return X(S(j(t))+" "+S(R(r))+" l"),this},Br=d.curveTo=function(t,r,e,n,i,s){return X([S(j(t)),S(R(r)),S(j(e)),S(R(n)),S(j(i)),S(R(s)),"c"].join(" ")),this};d.__private__.line=d.line=function(t,r,e,n,i){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||!kr(i))throw new Error("Invalid arguments passed to jsPDF.line");return A===N?this.lines([[e-t,n-r]],t,r,[1,1],i||"S"):this.lines([[e-t,n-r]],t,r,[1,1]).stroke()},d.__private__.lines=d.lines=function(t,r,e,n,i,s){var o,a,u,f,c,h,l,v,d,w,m,b;if("number"==typeof t&&(b=e,e=r,r=t,t=b),n=n||[1,1],s=s||false,isNaN(r)||isNaN(e)||!Array.isArray(t)||!Array.isArray(n)||!kr(i)||"boolean"!=typeof s)throw new Error("Invalid arguments passed to jsPDF.lines");for(Ir(r,e),o=n[0],a=n[1],f=t.length,w=r,m=e,u=0;u<f;u++)2===(c=t[u]).length?(w=c[0]*o+w,m=c[1]*a+m,Or(w,m)):(h=c[0]*o+w,l=c[1]*a+m,v=c[2]*o+w,d=c[3]*a+m,w=c[4]*o+w,m=c[5]*a+m,Br(h,l,v,d,w,m));return s&&xr(),Er(i),this},d.path=function(t){for(var r=0;r<t.length;r++){var e=t[r],n=e.c;switch(e.op){case"m":Ir(n[0],n[1]);break;case"l":Or(n[0],n[1]);break;case"c":Br.apply(this,n);break;case"h":xr()}}return this},d.__private__.rect=d.rect=function(t,r,e,n,i){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||!kr(i))throw new Error("Invalid arguments passed to jsPDF.rect");return A===N&&(n=-n),X([S(j(t)),S(R(r)),S(j(e)),S(j(n)),"re"].join(" ")),Er(i),this},d.__private__.triangle=d.triangle=function(t,r,e,n,i,s,o){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(s)||!kr(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[e-t,n-r],[i-e,s-n],[t-i,r-s]],t,r,[1,1],o,true),this},d.__private__.roundedRect=d.roundedRect=function(t,r,e,n,i,s,o){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(s)||!kr(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var a=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*e),s=Math.min(s,.5*n),this.lines([[e-2*i,0],[i*a,0,i,s-s*a,i,s],[0,n-2*s],[0,s*a,-i*a,s,-i,s],[2*i-e,0],[-i*a,0,-i,-s*a,-i,-s],[0,2*s-n],[0,-s*a,i*a,-s,i,-s]],t+i,r,[1,1],o,true),this},d.__private__.ellipse=d.ellipse=function(t,r,e,n,i){if(isNaN(t)||isNaN(r)||isNaN(e)||isNaN(n)||!kr(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var s=4/3*(Math.SQRT2-1)*e,o=4/3*(Math.SQRT2-1)*n;return Ir(t+e,r),Br(t+e,r-o,t+s,r-n,t,r-n),Br(t-s,r-n,t-e,r-o,t-e,r),Br(t-e,r+o,t-s,r+n,t,r+n),Br(t+s,r+n,t+e,r+o,t+e,r),Er(i),this},d.__private__.circle=d.circle=function(t,r,e,n){if(isNaN(t)||isNaN(r)||isNaN(e)||!kr(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,r,e,e,n)},d.setFont=function(t,r,e){return e&&(r=k(r,e)),lt=fr(t,r,{disableWarning:false}),this};var Pr=d.__private__.getFont=d.getFont=function(){return bt[fr.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var t,r,e={};for(t in pt)if(pt.hasOwnProperty(t))for(r in e[t]=[],pt[t])pt[t].hasOwnProperty(r)&&e[t].push(r);return e},d.addFont=function(t,r,e,n,i){var s=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==s.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==s.indexOf(arguments[3])&&(e=k(e,n)),er.call(this,t,r,e,i=i||"Identity-H")};var Fr,Tr=r.lineWidth||.200025,Cr=d.__private__.getLineWidth=d.getLineWidth=function(){return Tr},Dr=d.__private__.setLineWidth=d.setLineWidth=function(t){return Tr=t,X(S(j(t))+" w"),this};d.__private__.setLineDash=hi.API.setLineDash=hi.API.setLineDashPattern=function(t,r){if(t=t||[],r=r||0,isNaN(r)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map((function(t){return S(j(t))})).join(" "),r=S(j(r)),X("["+t+"] "+r+" d"),this};var zr=d.__private__.getLineHeight=d.getLineHeight=function(){return et*Fr};d.__private__.getLineHeight=d.getLineHeight=function(){return et*Fr};var Ur=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Fr=t),this},_r=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Fr};Ur(r.lineHeight);var Vr=d.__private__.getHorizontalCoordinate=function(t){return j(t)},Wr=d.__private__.getVerticalCoordinate=function(t){return A===L?t:xt[z].mediaBox.topRightY-xt[z].mediaBox.bottomLeftY-j(t)},Hr=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(t){return S(Vr(t))},Gr=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(t){return S(Wr(t))},Zr=r.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return Vt(Zr)},d.__private__.setStrokeColor=d.setDrawColor=function(t,r,e,n){return Zr=Wt({ch1:t,ch2:r,ch3:e,ch4:n,pdfColorType:"draw",precision:2}),X(Zr),this};var Jr=r.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return Vt(Jr)},d.__private__.setFillColor=d.setFillColor=function(t,r,e,n){return Jr=Wt({ch1:t,ch2:r,ch3:e,ch4:n,pdfColorType:"fill",precision:2}),X(Jr),this};var Kr=r.textColor||"0 g",Yr=d.__private__.getTextColor=d.getTextColor=function(){return Vt(Kr)};d.__private__.setTextColor=d.setTextColor=function(t,r,e,n){return Kr=Wt({ch1:t,ch2:r,ch3:e,ch4:n,pdfColorType:"text",precision:3}),this};var $r=r.charSpace,Xr=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat($r||0)};d.__private__.setCharSpace=d.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return $r=t,this};var Qr=0;d.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},d.__private__.setLineCap=d.setLineCap=function(t){var r=d.CapJoinStyles[t];if(void 0===r)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qr=r,X(r+" J"),this};var te=0;d.__private__.setLineJoin=d.setLineJoin=function(t){var r=d.CapJoinStyles[t];if(void 0===r)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return te=r,X(r+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return X(S(j(t))+" M"),this},d.GState=ai,d.setGState=function(t){(t="string"==typeof t?gt[yt[t]]:re(null,t)).equals(kt)||(X("/"+t.id+" gs"),kt=t)};var re=function(t,r){if(!t||!yt[t]){var e=false;for(var n in gt)if(gt.hasOwnProperty(n)&&gt[n].equals(r)){e=true;break}if(e)r=gt[n];else{var i="GS"+(Object.keys(gt).length+1).toString(10);gt[i]=r,r.id=i}return t&&(yt[t]=r.id),qt.publish("addGState",r),r}};d.addGState=function(t,r){return re(t,r),this},d.saveGraphicsState=function(){return X("q"),Nt.push({key:lt,size:et,color:Kr}),this},d.restoreGraphicsState=function(){X("Q");var t=Nt.pop();return lt=t.key,et=t.size,Kr=t.color,kt=null,this},d.setCurrentTransformationMatrix=function(t){return X(t.toString()+" cm"),this},d.comment=function(t){return X("#"+t),this};var ee=function(t,r){var e=t||0;Object.defineProperty(this,"x",{enumerable:true,get:function(){return e},set:function(t){isNaN(t)||(e=parseFloat(t))}});var n=r||0;Object.defineProperty(this,"y",{enumerable:true,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:true,get:function(){return i},set:function(t){i=t.toString()}}),this},ne=function(t,r,e,n){ee.call(this,t,r),this.type="rect";var i=e||0;Object.defineProperty(this,"w",{enumerable:true,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var s=n||0;return Object.defineProperty(this,"h",{enumerable:true,get:function(){return s},set:function(t){isNaN(t)||(s=parseFloat(t))}}),this},ie=function(){this.page=St,this.currentPage=z,this.pages=J.slice(0),this.pagesContext=xt.slice(0),this.x=dt,this.y=wt,this.matrix=mt,this.width=ae(z),this.height=fe(z),this.outputDestination=Y,this.id="",this.objectNumber=-1};ie.prototype.restore=function(){St=this.page,z=this.currentPage,xt=this.pagesContext,J=this.pages,dt=this.x,wt=this.y,mt=this.matrix,ue(z,this.width),ce(z,this.height),Y=this.outputDestination};var se=function(t,r,e,n,i){Rt.push(new ie),St=z=0,J=[],dt=t,wt=r,mt=i,ir([e,n])};for(var oe in d.beginFormObject=function(t,r,e,n,i){return se(t,r,e,n,i),this},d.endFormObject=function(t){return function(t){if(jt[t])Rt.pop().restore();else{var r=new ie,e="Xo"+(Object.keys(Mt).length+1).toString(10);r.id=e,jt[t]=e,Mt[e]=r,qt.publish("addFormObject",r),Rt.pop().restore()}}(t),this},d.doFormObject=function(t,r){var e=Mt[jt[t]];return X("q"),X(r.toString()+" cm"),X("/"+e.id+" Do"),X("Q"),this},d.getFormObject=function(t){var r=Mt[jt[t]];return{x:r.x,y:r.y,width:r.width,height:r.height,matrix:r.matrix}},d.save=function(t,r){return t=t||"generated.pdf",(r=r||{}).returnPromise=r.returnPromise||false,false===r.returnPromise?(Cn(mr(wr()),t),"function"==typeof Cn.unload&&In.setTimeout&&setTimeout(Cn.unload,911),this):new Promise((function(r,e){try{var n=Cn(mr(wr()),t);"function"==typeof Cn.unload&&In.setTimeout&&setTimeout(Cn.unload,911),r(n)}catch(t){e(t.message)}}))},hi.API)hi.API.hasOwnProperty(oe)&&("events"===oe&&hi.API.events.length?function(t,r){var e,n,i;for(i=r.length-1;-1!==i;i--)e=r[i][0],n=r[i][1],t.subscribe.apply(t,[e].concat("function"==typeof n?[n]:n))}(qt,hi.API.events):d[oe]=hi.API[oe]);function ae(t){return xt[t].mediaBox.topRightX-xt[t].mediaBox.bottomLeftX}function ue(t,r){xt[t].mediaBox.topRightX=r+xt[t].mediaBox.bottomLeftX}function fe(t){return xt[t].mediaBox.topRightY-xt[t].mediaBox.bottomLeftY}function ce(t,r){xt[t].mediaBox.topRightY=r+xt[t].mediaBox.bottomLeftY}var he=d.getPageWidth=function(t){return ae(t=t||z)/vt},le=d.setPageWidth=function(t,r){ue(t,r*vt)},ve=d.getPageHeight=function(t){return fe(t=t||z)/vt},de=d.setPageHeight=function(t,r){ce(t,r*vt)};return d.internal={pdfEscape:nr,getStyle:Sr,getFont:Pr,getFontSize:it,getCharSpace:Xr,getTextColor:Yr,getLineHeight:zr,getLineHeightFactor:_r,getLineWidth:Cr,write:Q,getHorizontalCoordinate:Vr,getVerticalCoordinate:Wr,getCoordinateString:Hr,getVerticalCoordinateString:Gr,collections:{},newObject:Tt,newAdditionalObject:zt,newObjectDeferred:Ct,newObjectDeferredBegin:Dt,getFilters:Ht,putStream:Gt,events:qt,scaleFactor:vt,pageSize:{getWidth:function(){return he(z)},setWidth:function(t){le(z,t)},getHeight:function(){return ve(z)},setHeight:function(t){de(z,t)}},encryptionOptions:h,encryption:Nr,getEncryptor:function(t){return null!==h?Nr.encryptor(t,0):function(t){return t}},output:br,getNumberOfPages:ur,pages:J,out:X,f2:E,f3:M,getPageInfo:Lr,getPageInfoByObjId:Ar,getCurrentPageInfo:gr,getPDFVersion:m,Point:ee,Rectangle:ne,Matrix:It,hasHotfix:pr},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return he(z)},set:function(t){le(z,t)},enumerable:true,configurable:true}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return ve(z)},set:function(t){de(z,t)},enumerable:true,configurable:true}),function(t){for(var r=0,e=rt.length;r<e;r++){var n=er.call(this,t[r][0],t[r][1],t[r][2],rt[r][3],true);false===l&&(v[n]=true);var i=t[r][0].split("-");rr({id:n,fontName:i[0],fontStyle:i[1]||""})}qt.publish("addFonts",{fonts:bt,dictionary:pt})}.call(d,rt),lt="F1",sr(s,n),qt.publish("initialized"),d}ii.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},ii.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},ii.prototype.hexToBytes=function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(String.fromCharCode(parseInt(t.substr(e,2),16)));return r.join("")},ii.prototype.processOwnerPassword=function(t,r){return ei(Qn(r).substr(0,5),t)},ii.prototype.encryptor=function(t,r){var e=Qn(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&r,r>>8&255)).substr(0,10);return function(t){return ei(e,t)}},ai.prototype.equals=function(r){var e,n="id,objectNumber,equals";if(!r||t(r)!==t(this))return false;var i=0;for(e in this)if(!(n.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e))return false;if(this[e]!==r[e])return false;i++}for(e in r)r.hasOwnProperty(e)&&n.indexOf(e)<0&&i--;return 0===i},hi.API={events:[]},hi.version="3.0.3";var li=hi.API,vi=1,di=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},wi=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},mi=function(t){return t.toFixed(2)},bi=function(t){return t.toFixed(5)};li.__acroform__={};var pi=function(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t},Ni=function(t){return t*vi},Li=function(t){var r=new Ti,e=$i.internal.getHeight(t)||0,n=$i.internal.getWidth(t)||0;return r.BBox=[0,0,Number(mi(n)),Number(mi(e))],r},Ai=li.__acroform__.setBit=function(t,r){if(t=t||0,r=r||0,isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<r},gi=li.__acroform__.clearBit=function(t,r){if(t=t||0,r=r||0,isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<r)},yi=li.__acroform__.getBit=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<r?1:0},ki=li.__acroform__.getBitForPdf=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return yi(t,r-1)},Si=li.__acroform__.setBitForPdf=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Ai(t,r-1)},xi=li.__acroform__.clearBitForPdf=function(t,r){if(isNaN(t)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return gi(t,r-1)},qi=li.__acroform__.calculateCoordinates=function(t,r){var e=r.internal.getHorizontalCoordinate,n=r.internal.getVerticalCoordinate,i=t[0],s=t[1],o=t[2],a=t[3],u={};return u.lowerLeft_X=e(i)||0,u.lowerLeft_Y=n(s+a)||0,u.upperRight_X=e(i+o)||0,u.upperRight_Y=n(s)||0,[Number(mi(u.lowerLeft_X)),Number(mi(u.lowerLeft_Y)),Number(mi(u.upperRight_X)),Number(mi(u.upperRight_Y))]},Ei=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var r=[],e=t._V||t.DV,n=Mi(t,e),i=t.scope.internal.getFont(t.fontName,t.fontStyle).id;r.push("/Tx BMC"),r.push("q"),r.push("BT"),r.push(t.scope.__private__.encodeColorString(t.color)),r.push("/"+i+" "+mi(n.fontSize)+" Tf"),r.push("1 0 0 1 0 0 Tm"),r.push(n.text),r.push("ET"),r.push("Q"),r.push("EMC");var s=Li(t);return s.scope=t.scope,s.stream=r.join("\n"),s}},Mi=function(t,r){var e=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},i=(r=")"==(r="("==r.substr(0,1)?r.substr(1):r).substr(r.length-1)?r.substr(0,r.length-1):r).split(" ");i=t.multiline?i.map((function(t){return t.split("\n")})):i.map((function(t){return[t]}));var s=e,o=$i.internal.getHeight(t)||0;o=o<0?-o:o;var a=$i.internal.getWidth(t)||0;a=a<0?-a:a;var u=function(r,e,n){if(r+1<i.length){var s=e+" "+i[r+1][0];return ji(s,t,n).width<=a-4}return false};s++;t:for(;s>0;){r="",s--;var f,c,h=ji("3",t,s).height,l=t.multiline?o-s:(o-h)/2,v=l+=2,d=0,w=0,m=0;if(s<=0){r="(...) Tj\n",r+="% Width of Text: "+ji(r,t,s=12).width+", FieldWidth:"+a+"\n";break}for(var b="",p=0,N=0;N<i.length;N++)if(i.hasOwnProperty(N)){var L=false;if(1!==i[N].length&&m!==i[N].length-1){if((h+2)*(p+2)+2>o)continue t;b+=i[N][m],L=true,w=N,N--}else{b=" "==(b+=i[N][m]+" ").substr(b.length-1)?b.substr(0,b.length-1):b;var A=parseInt(N),g=u(A,b,s),y=N>=i.length-1;if(g&&!y){b+=" ",m=0;continue}if(g||y){if(y)w=A;else if(t.multiline&&(h+2)*(p+2)+2>o)continue t}else{if(!t.multiline)continue t;if((h+2)*(p+2)+2>o)continue t;w=A}}for(var k="",S=d;S<=w;S++){var x=i[S];if(t.multiline){if(S===w){k+=x[m]+" ",m=(m+1)%x.length;continue}if(S===d){k+=x[x.length-1]+" ";continue}}k+=x[0]+" "}switch(k=" "==k.substr(k.length-1)?k.substr(0,k.length-1):k,c=ji(k,t,s).width,t.textAlign){case"right":f=a-c-2;break;case"center":f=(a-c)/2;break;default:f=2}r+=mi(f)+" "+mi(v)+" Td\n",r+="("+di(k)+") Tj\n",r+=-mi(f)+" 0 Td\n",v=-(s+2),c=0,d=L?w:w+1,p++,b=""}break}return n.text=r,n.fontSize=s,n},ji=function(t,r,e){var n=r.scope.internal.getFont(r.fontName,r.fontStyle),i=r.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:r.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:i}},Ri={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:false,internal:null,isInitialized:false},Ii=function(t,r){var e={type:"reference",object:t};void 0===r.internal.getPageInfo(t.page).pageContext.annotations.find((function(t){return t.type===e.type&&t.object===e.object}))&&r.internal.getPageInfo(t.page).pageContext.annotations.push(e)},Oi=function(r,e){if(e.scope=r,void 0!==r.internal&&(void 0===r.internal.acroformPlugin||false===r.internal.acroformPlugin.isInitialized)){if(Di.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(Ri)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");vi=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new Ci,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",(function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=true}(r)})),r.internal.events.subscribe("buildDocument",(function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in r)if(r.hasOwnProperty(e)){var n=r[e];n.objId=void 0,n.hasAnnotation&&Ii(n,t)}}(r)})),r.internal.events.subscribe("putCatalog",(function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(r)})),r.internal.events.subscribe("postPutPages",(function(e){!function(r,e){var n=!r;for(var i in r||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,true),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(i)){var s=r[i],o=[],a=s.Rect;if(s.Rect&&(s.Rect=qi(s.Rect,e)),e.internal.newObjectDeferredBegin(s.objId,true),s.DA=$i.createDefaultAppearanceStream(s),"object"===t(s)&&"function"==typeof s.getKeyValueListForStream&&(o=s.getKeyValueListForStream()),s.Rect=a,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=Ei(s);o.push({key:"AP",value:"<</N "+u+">>"}),e.internal.acroformPlugin.xForms.push(u)}if(s.appearanceStreamContent){var f="";for(var c in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(c)){var h=s.appearanceStreamContent[c];if(f+="/"+c+" ",f+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var i in h)if(h.hasOwnProperty(i)){var l=h[i];"function"==typeof l&&(l=l.call(e,s)),f+="/"+i+" "+l+" ",e.internal.acroformPlugin.xForms.indexOf(l)>=0||e.internal.acroformPlugin.xForms.push(l)}}else"function"==typeof(l=h)&&(l=l.call(e,s)),f+="/"+i+" "+l,e.internal.acroformPlugin.xForms.indexOf(l)>=0||e.internal.acroformPlugin.xForms.push(l);f+=">>"}o.push({key:"AP",value:"<<\n"+f+">>"})}e.internal.putStream({additionalKeyValues:o,objectId:s.objId}),e.internal.out("endobj")}n&&function(r,e){for(var n in r)if(r.hasOwnProperty(n)){var i=n,s=r[n];e.internal.newObjectDeferredBegin(s.objId,true),"object"===t(s)&&"function"==typeof s.putStream&&s.putStream(),delete r[i]}}(e.internal.acroformPlugin.xForms,e)}(e,r)})),r.internal.acroformPlugin.isInitialized=true}},Bi=li.__acroform__.arrayToPdfArray=function(r,e,n){var i=function(t){return t};if(Array.isArray(r)){for(var s="[",o=0;o<r.length;o++)switch(0!==o&&(s+=" "),t(r[o])){case"boolean":case"number":case"object":s+=r[o].toString();break;case"string":"/"!==r[o].substr(0,1)?(void 0!==e&&n&&(i=n.internal.getEncryptor(e)),s+="("+di(i(r[o].toString()))+")"):s+=r[o].toString()}return s+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Pi=function(t,r,e){var n=function(t){return t};return void 0!==r&&e&&(n=e.internal.getEncryptor(r)),(t=t||"").toString(),"("+di(n(t))+")"},Fi=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:true})};Fi.prototype.toString=function(){return this.objId+" 0 R"},Fi.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Fi.prototype.getKeyValueListForStream=function(){var t=[],r=Object.getOwnPropertyNames(this).filter((function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)}));for(var e in r)if(false===Object.getOwnPropertyDescriptor(this,r[e]).configurable){var n=r[e],i=this[n];i&&(Array.isArray(i)?t.push({key:n,value:Bi(i,this.objId,this.scope)}):i instanceof Fi?(i.scope=this.scope,t.push({key:n,value:i.objId+" 0 R"})):"function"!=typeof i&&t.push({key:n,value:i}))}return t};var Ti=function(){Fi.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:false,writable:true}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:false,writable:true}),Object.defineProperty(this,"FormType",{value:1,configurable:false,writable:true});var t,r=[];Object.defineProperty(this,"BBox",{configurable:false,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:false,writable:true}),Object.defineProperty(this,"stream",{enumerable:false,configurable:true,set:function(r){t=r.trim()},get:function(){return t||null}})};pi(Ti,Fi);var Ci=function(){Fi.call(this);var t,r=[];Object.defineProperty(this,"Kids",{enumerable:false,configurable:true,get:function(){return r.length>0?r:void 0}}),Object.defineProperty(this,"Fields",{enumerable:false,configurable:false,get:function(){return r}}),Object.defineProperty(this,"DA",{enumerable:false,configurable:false,get:function(){if(t){var r=function(t){return t};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+di(r(t))+")"}},set:function(r){t=r}})};pi(Ci,Fi);var Di=function t(){Fi.call(this);var r=4;Object.defineProperty(this,"F",{enumerable:false,configurable:false,get:function(){return r},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');r=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:true,configurable:true,get:function(){return Boolean(ki(r,3))},set:function(t){true===Boolean(t)?this.F=Si(r,3):this.F=xi(r,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:false,configurable:false,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');e=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:false,configurable:false,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:true,configurable:true,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var i="";Object.defineProperty(this,"FT",{enumerable:true,configurable:false,get:function(){return i},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:true,configurable:false,get:function(){if(!s||s.length<1){if(this instanceof Zi)return;s="FieldObject"+t.FieldNum++}var r=function(t){return t};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+di(r(s))+")"},set:function(t){s=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:true,enumerable:true,get:function(){return s},set:function(t){s=t}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:true,configurable:true,get:function(){return o},set:function(t){o=t}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:true,configurable:true,get:function(){return a},set:function(t){a=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:true,configurable:true,get:function(){return u},set:function(t){u=t}});var f=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:true,configurable:true,get:function(){return void 0===f?50/vi:f},set:function(t){f=t}});var c="black";Object.defineProperty(this,"color",{enumerable:true,configurable:true,get:function(){return c},set:function(t){c=t}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:true,configurable:false,get:function(){if(!(!h||this instanceof Zi||this instanceof Ki))return Pi(h,this.objId,this.scope)},set:function(t){t=t.toString(),h=t}});var l=null;Object.defineProperty(this,"DV",{enumerable:false,configurable:false,get:function(){if(l)return this instanceof Wi==0?Pi(l,this.objId,this.scope):l},set:function(t){t=t.toString(),l=this instanceof Wi==0?"("===t.substr(0,1)?wi(t.substr(1,t.length-2)):wi(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:true,configurable:true,get:function(){return this instanceof Wi==1?wi(l.substr(1,l.length-1)):l},set:function(t){t=t.toString(),l=this instanceof Wi==1?"/"+t:t}});var v=null;Object.defineProperty(this,"_V",{enumerable:false,configurable:false,get:function(){if(v)return v},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:false,configurable:false,get:function(){if(v)return this instanceof Wi==0?Pi(v,this.objId,this.scope):v},set:function(t){t=t.toString(),v=this instanceof Wi==0?"("===t.substr(0,1)?wi(t.substr(1,t.length-2)):wi(t):t}}),Object.defineProperty(this,"value",{enumerable:true,configurable:true,get:function(){return this instanceof Wi==1?wi(v.substr(1,v.length-1)):v},set:function(t){t=t.toString(),v=this instanceof Wi==1?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:true,configurable:true,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:true,configurable:false,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:true,configurable:false,get:function(){return this.hasAnnotation?"/Widget":null}});var d,w=false;Object.defineProperty(this,"hasAppearanceStream",{enumerable:true,configurable:true,get:function(){return w},set:function(t){t=Boolean(t),w=t}}),Object.defineProperty(this,"page",{enumerable:true,configurable:true,get:function(){if(d)return d},set:function(t){d=t}}),Object.defineProperty(this,"readOnly",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,1))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,1):this.Ff=xi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,2))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,2):this.Ff=xi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,3))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,3):this.Ff=xi(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:true,configurable:false,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:true,enumerable:true,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})};pi(Di,Fi);var zi=function(){Di.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:true,configurable:false,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"topIndex",{enumerable:true,configurable:true,get:function(){return t},set:function(r){t=r}});var r=[];Object.defineProperty(this,"Opt",{enumerable:true,configurable:false,get:function(){return Bi(r,this.objId,this.scope)},set:function(t){var e,n;n=[],"string"==typeof(e=t)&&(n=function(t,r,e){e||(e=1);for(var n,i=[];n=r.exec(t);)i.push(n[e]);return i}(e,/\((.*?)\)/g)),r=n}}),this.getOptions=function(){return r},this.setOptions=function(t){r=t,this.sort&&r.sort()},this.addOption=function(t){t=(t=t||"").toString(),r.push(t),this.sort&&r.sort()},this.removeOption=function(t,e){for(e=e||false,t=(t=t||"").toString();-1!==r.indexOf(t)&&(r.splice(r.indexOf(t),1),false!==e););},Object.defineProperty(this,"combo",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,18))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,18):this.Ff=xi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,19))},set:function(t){true===this.combo&&(true===Boolean(t)?this.Ff=Si(this.Ff,19):this.Ff=xi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,20))},set:function(t){true===Boolean(t)?(this.Ff=Si(this.Ff,20),r.sort()):this.Ff=xi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,22))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,22):this.Ff=xi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,23))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,23):this.Ff=xi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,27))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,27):this.Ff=xi(this.Ff,27)}}),this.hasAppearanceStream=false};pi(zi,Di);var Ui=function(){zi.call(this),this.fontName="helvetica",this.combo=false};pi(Ui,zi);var _i=function(){Ui.call(this),this.combo=true};pi(_i,Ui);var Vi=function(){_i.call(this),this.edit=true};pi(Vi,_i);var Wi=function(){Di.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,15))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,15):this.Ff=xi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,16))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,16):this.Ff=xi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,17))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,17):this.Ff=xi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,26))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,26):this.Ff=xi(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:false,configurable:false,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(e).length){var r,n=[];for(r in n.push("<<"),e)n.push("/"+r+" ("+di(t(e[r]))+")");return n.push(">>"),n.join("\n")}},set:function(r){"object"===t(r)&&(e=r)}}),Object.defineProperty(this,"caption",{enumerable:true,configurable:true,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:false,configurable:false,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:true,configurable:true,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}})};pi(Wi,Di);var Hi=function(){Wi.call(this),this.pushButton=true};pi(Hi,Wi);var Gi=function(){Wi.call(this),this.radio=true,this.pushButton=false;var t=[];Object.defineProperty(this,"Kids",{enumerable:true,configurable:false,get:function(){return t},set:function(r){t=void 0!==r?r:[]}})};pi(Gi,Wi);var Zi=function(){var r,e;Di.call(this),Object.defineProperty(this,"Parent",{enumerable:false,configurable:false,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"optionName",{enumerable:false,configurable:true,get:function(){return e},set:function(t){e=t}});var n,i={};Object.defineProperty(this,"MK",{enumerable:false,configurable:false,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var r,e=[];for(r in e.push("<<"),i)e.push("/"+r+" ("+di(t(i[r]))+")");return e.push(">>"),e.join("\n")},set:function(r){"object"===t(r)&&(i=r)}}),Object.defineProperty(this,"caption",{enumerable:true,configurable:true,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:false,configurable:false,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"appearanceState",{enumerable:true,configurable:true,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=$i.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};pi(Zi,Di),Gi.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var r in this.Kids)if(this.Kids.hasOwnProperty(r)){var e=this.Kids[r];e.appearanceStreamContent=t.createAppearanceStream(e.optionName),e.caption=t.getCA()}},Gi.prototype.createOption=function(t){var r=new Zi;return r.Parent=this,r.optionName=t,this.Kids.push(r),Xi.call(this.scope,r),r};var Ji=function(){Wi.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=$i.CheckBox.createAppearanceStream()};pi(Ji,Wi);var Ki=function(){Di.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,13))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,13):this.Ff=xi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,21))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,21):this.Ff=xi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,23))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,23):this.Ff=xi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,24))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,24):this.Ff=xi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,25))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,25):this.Ff=xi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,26))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,26):this.Ff=xi(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:true,configurable:false,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"maxLength",{enumerable:true,configurable:true,get:function(){return t},set:function(r){Number.isInteger(r)&&(t=r)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:true,configurable:true,get:function(){return this.V||this.DV}})};pi(Ki,Di);var Yi=function(){Ki.call(this),Object.defineProperty(this,"password",{enumerable:true,configurable:true,get:function(){return Boolean(ki(this.Ff,14))},set:function(t){true===Boolean(t)?this.Ff=Si(this.Ff,14):this.Ff=xi(this.Ff,14)}}),this.password=true};pi(Yi,Ki);var $i={CheckBox:{createAppearanceStream:function(){return{N:{On:$i.CheckBox.YesNormal},D:{On:$i.CheckBox.YesPushDown,Off:$i.CheckBox.OffPushDown}}},YesPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),s=Mi(t,t.caption);return e.push("0.749023 g"),e.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+n+" "+mi(s.fontSize)+" Tf "+i),e.push("BT"),e.push(s.text),e.push("ET"),e.push("Q"),e.push("EMC"),r.stream=e.join("\n"),r},YesNormal:function(t){var r=Li(t);r.scope=t.scope;var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=[],s=$i.internal.getHeight(t),o=$i.internal.getWidth(t),a=Mi(t,t.caption);return i.push("1 g"),i.push("0 0 "+mi(o)+" "+mi(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+mi(o-1)+" "+mi(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+e+" "+mi(a.fontSize)+" Tf "+n),i.push(a.text),i.push("ET"),i.push("Q"),r.stream=i.join("\n"),r},OffPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),e.push("f"),r.stream=e.join("\n"),r}},RadioButton:{Circle:{createAppearanceStream:function(t){var r={D:{Off:$i.RadioButton.Circle.OffPushDown},N:{}};return r.N[t]=$i.RadioButton.Circle.YesNormal,r.D[t]=$i.RadioButton.Circle.YesPushDown,r},getCA:function(){return"l"},YesNormal:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.getWidth(t)<=$i.internal.getHeight(t)?$i.internal.getWidth(t)/4:$i.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=$i.internal.Bezier_C,s=Number((n*i).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),e.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),e.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),e.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),e.push("f"),e.push("Q"),r.stream=e.join("\n"),r},YesPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.getWidth(t)<=$i.internal.getHeight(t)?$i.internal.getWidth(t)/4:$i.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*$i.internal.Bezier_C).toFixed(5)),o=Number((n*$i.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/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 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),e.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),e.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),e.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),e.push("f"),e.push("Q"),r.stream=e.join("\n"),r},OffPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.getWidth(t)<=$i.internal.getHeight(t)?$i.internal.getWidth(t)/4:$i.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*$i.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+bi($i.internal.getWidth(t)/2)+" "+bi($i.internal.getHeight(t)/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"),r.stream=e.join("\n"),r}},Cross:{createAppearanceStream:function(t){var r={D:{Off:$i.RadioButton.Cross.OffPushDown},N:{}};return r.N[t]=$i.RadioButton.Cross.YesNormal,r.D[t]=$i.RadioButton.Cross.YesPushDown,r},getCA:function(){return"8"},YesNormal:function(t){var r=Li(t);r.scope=t.scope;var e=[],n=$i.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+mi($i.internal.getWidth(t)-2)+" "+mi($i.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(mi(n.x1.x)+" "+mi(n.x1.y)+" m"),e.push(mi(n.x2.x)+" "+mi(n.x2.y)+" l"),e.push(mi(n.x4.x)+" "+mi(n.x4.y)+" m"),e.push(mi(n.x3.x)+" "+mi(n.x3.y)+" l"),e.push("s"),e.push("Q"),r.stream=e.join("\n"),r},YesPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=$i.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+mi($i.internal.getWidth(t)-2)+" "+mi($i.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(mi(e.x1.x)+" "+mi(e.x1.y)+" m"),n.push(mi(e.x2.x)+" "+mi(e.x2.y)+" l"),n.push(mi(e.x4.x)+" "+mi(e.x4.y)+" m"),n.push(mi(e.x3.x)+" "+mi(e.x3.y)+" l"),n.push("s"),n.push("Q"),r.stream=n.join("\n"),r},OffPushDown:function(t){var r=Li(t);r.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+mi($i.internal.getWidth(t))+" "+mi($i.internal.getHeight(t))+" re"),e.push("f"),r.stream=e.join("\n"),r}}},createDefaultAppearanceStream:function(t){var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+r+" "+t.fontSize+" Tf "+e}};$i.internal={Bezier_C:.551915024494,calculateCross:function(t){var r=$i.internal.getWidth(t),e=$i.internal.getHeight(t),n=Math.min(r,e);return{x1:{x:(r-n)/2,y:(e-n)/2+n},x2:{x:(r-n)/2+n,y:(e-n)/2},x3:{x:(r-n)/2,y:(e-n)/2},x4:{x:(r-n)/2+n,y:(e-n)/2+n}}}},$i.internal.getWidth=function(r){var e=0;return"object"===t(r)&&(e=Ni(r.Rect[2])),e},$i.internal.getHeight=function(r){var e=0;return"object"===t(r)&&(e=Ni(r.Rect[3])),e};var Xi=li.addField=function(t){if(Oi(this,t),!(t instanceof Di))throw new Error("Invalid argument passed to jsPDF.addField.");var r;return(r=t).scope.internal.acroformPlugin.printedOut&&(r.scope.internal.acroformPlugin.printedOut=false,r.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};li.AcroFormChoiceField=zi,li.AcroFormListBox=Ui,li.AcroFormComboBox=_i,li.AcroFormEditBox=Vi,li.AcroFormButton=Wi,li.AcroFormPushButton=Hi,li.AcroFormRadioButton=Gi,li.AcroFormCheckBox=Ji,li.AcroFormTextField=Ki,li.AcroFormPasswordField=Yi,li.AcroFormAppearance=$i,li.AcroForm={ChoiceField:zi,ListBox:Ui,ComboBox:_i,EditBox:Vi,Button:Wi,PushButton:Hi,RadioButton:Gi,CheckBox:Ji,TextField:Ki,PasswordField:Yi,Appearance:$i},hi.AcroForm={ChoiceField:zi,ListBox:Ui,ComboBox:_i,EditBox:Vi,Button:Wi,PushButton:Hi,RadioButton:Gi,CheckBox:Ji,TextField:Ki,PasswordField:Yi,Appearance:$i};function Qi(t){return t.reduce((function(t,r,e){return t[r]=e,t}),{})}!function(r){var e="addImage_";r.__addimage__={};var n="UNKNOWN",i={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},s=r.__addimage__.getImageFileTypeByImageData=function(t,r){var e,s,o,a,u,f=n;if("RGBA"===(r=r||n)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(y(t))for(u in i)for(o=i[u],e=0;e<o.length;e+=1){for(a=true,s=0;s<o[e].length;s+=1)if(void 0!==o[e][s]&&o[e][s]!==t[s]){a=false;break}if(true===a){f=u;break}}else for(u in i)for(o=i[u],e=0;e<o.length;e+=1){for(a=true,s=0;s<o[e].length;s+=1)if(void 0!==o[e][s]&&o[e][s]!==t.charCodeAt(s)){a=false;break}if(true===a){f=u;break}}return f===n&&r!==n&&(f=r),f},o=function t(r){for(var e=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);r.objectId=this.internal.newObject();var s=[];if(s.push({key:"Type",value:"/XObject"}),s.push({key:"Subtype",value:"/Image"}),s.push({key:"Width",value:r.width}),s.push({key:"Height",value:r.height}),r.colorSpace===p.INDEXED?s.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(r.palette.length/3-1)+" "+("sMask"in r&&void 0!==r.sMask?r.objectId+2:r.objectId+1)+" 0 R]"}):(s.push({key:"ColorSpace",value:"/"+r.colorSpace}),r.colorSpace===p.DEVICE_CMYK&&s.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),s.push({key:"BitsPerComponent",value:r.bitsPerComponent}),"decodeParameters"in r&&void 0!==r.decodeParameters&&s.push({key:"DecodeParms",value:"<<"+r.decodeParameters+">>"}),"transparency"in r&&Array.isArray(r.transparency)&&r.transparency.length>0){for(var o="",a=0,u=r.transparency.length;a<u;a++)o+=r.transparency[a]+" "+r.transparency[a]+" ";s.push({key:"Mask",value:"["+o+"]"})}void 0!==r.sMask&&s.push({key:"SMask",value:r.objectId+1+" 0 R"});var f=void 0!==r.filter?["/"+r.filter]:void 0;if(n({data:r.data,additionalKeyValues:s,alreadyAppliedFilters:f,objectId:r.objectId}),e("endobj"),"sMask"in r&&void 0!==r.sMask){var c,h=null!==(c=r.sMaskBitsPerComponent)&&void 0!==c?c:r.bitsPerComponent,l={width:r.width,height:r.height,colorSpace:"DeviceGray",bitsPerComponent:h,data:r.sMask};"filter"in r&&(l.decodeParameters="/Predictor ".concat(r.predictor," /Colors 1 /BitsPerComponent ").concat(h," /Columns ").concat(r.width),l.filter=r.filter),t.call(this,l)}if(r.colorSpace===p.INDEXED){var v=this.internal.newObject();n({data:S(new Uint8Array(r.palette)),objectId:v}),e("endobj")}},a=function(){var t=this.internal.collections[e+"images"];for(var r in t)o.call(this,t[r])},u=function(){var t,r=this.internal.collections[e+"images"],n=this.internal.write;for(var i in r)n("/I"+(t=r[i]).index,t.objectId,"0","R")},f=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",u))},c=function(){var t=this.internal.collections[e+"images"];return f.call(this),t},h=function(){return Object.keys(this.internal.collections[e+"images"]).length},l=function(t){return"function"==typeof r["process"+t.toUpperCase()]},v=function(r){return"object"===t(r)&&1===r.nodeType},d=function(t,e){if("IMG"===t.nodeName&&t.hasAttribute("src")){var n=""+t.getAttribute("src");if(0===n.indexOf("data:image/"))return zn(unescape(n).split("base64,").pop());var i=r.loadFile(n,true);if(void 0!==i)return i}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var s;switch(e){case"PNG":s="image/png";break;case"WEBP":s="image/webp";break;default:s="image/jpeg"}return zn(t.toDataURL(s,1).split("base64,").pop())}},w=function(t){var r=this.internal.collections[e+"images"];if(r)for(var n in r)if(t===r[n].alias)return r[n]},m=function(t,r,e){return t||r||(t=-96,r=-96),t<0&&(t=-1*e.width*72/t/this.internal.scaleFactor),r<0&&(r=-1*e.height*72/r/this.internal.scaleFactor),0===t&&(t=r*e.width/e.height),0===r&&(r=t*e.height/e.width),[t,r]},b=function(t,r,e,n,i,s){var o=m.call(this,e,n,i),a=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,f=c.call(this);if(e=o[0],n=o[1],f[i.index]=i,s){s*=Math.PI/180;var h=Math.cos(s),l=Math.sin(s),v=function(t){return t.toFixed(4)},d=[v(h),v(l),v(-1*l),v(h),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,a(t),u(r+n),"cm"].join(" ")),this.internal.write(d.join(" ")),this.internal.write([a(e),"0","0",a(n),"0","0","cm"].join(" "))):this.internal.write([a(e),"0","0",a(n),a(t),u(r+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},p=r.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"};r.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 N=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},L=r.__addimage__.sHashCode=function(t){var r,e,n=0;if("string"==typeof t)for(e=t.length,r=0;r<e;r++)n=(n<<5)-n+t.charCodeAt(r),n|=0;else if(y(t))for(e=t.byteLength/2,r=0;r<e;r++)n=(n<<5)-n+t[r],n|=0;return n},A=r.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var r=true;return 0===t.length&&(r=false),t.length%4!=0&&(r=false),false===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(r=false),false===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(r=false),r},g=r.__addimage__.extractImageFromDataUrl=function(t){if(null==t)return null;if(!(t=t.trim()).startsWith("data:"))return null;var r=t.indexOf(",");return r<0?null:t.substring(0,r).trim().endsWith("base64")?t.substring(r+1):null};r.__addimage__.isArrayBuffer=function(t){return t instanceof ArrayBuffer};var y=r.__addimage__.isArrayBufferView=function(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array},k=r.__addimage__.binaryStringToUint8Array=function(t){for(var r=t.length,e=new Uint8Array(r),n=0;n<r;n++)e[n]=t.charCodeAt(n);return e},S=r.__addimage__.arrayBufferToBinaryString=function(t){for(var r="",e=y(t)?t:new Uint8Array(t),n=0;n<e.length;n+=8192)r+=String.fromCharCode.apply(null,e.subarray(n,n+8192));return r};r.addImage=function(){var r,e,i,s,o,a,u,c,h;if("number"==typeof arguments[1]?(e=n,i=arguments[1],s=arguments[2],o=arguments[3],a=arguments[4],u=arguments[5],c=arguments[6],h=arguments[7]):(e=arguments[1],i=arguments[2],s=arguments[3],o=arguments[4],a=arguments[5],u=arguments[6],c=arguments[7],h=arguments[8]),"object"===t(r=arguments[0])&&!v(r)&&"imageData"in r){var l=r;r=l.imageData,e=l.format||e||n,i=l.x||i||0,s=l.y||s||0,o=l.w||l.width||o,a=l.h||l.height||a,u=l.alias||u,c=l.compression||c,h=l.rotation||l.angle||h}var d=this.internal.getFilters();if(void 0===c&&-1!==d.indexOf("FlateEncode")&&(c="SLOW"),isNaN(i)||isNaN(s))throw new Error("Invalid coordinates passed to jsPDF.addImage");f.call(this);var w=x.call(this,r,e,u,c);return b.call(this,i,s,o,a,w,h),this};var x=function(t,e,i,o){var a,u,f;if("string"==typeof t&&s(t)===n){t=unescape(t);var c=q(t,false);(""!==c||void 0!==(c=r.loadFile(t,true)))&&(t=c)}if(v(t)&&(t=d(t,e)),e=s(t,e),!l(e))throw new Error("addImage does not support files of type '"+e+"', please ensure that a plugin for '"+e+"' support is added.");if((null==(f=i)||0===f.length)&&(i=function(t){return"string"==typeof t||y(t)?L(t):y(t.data)?L(t.data):null}(t)),(a=w.call(this,i))||(t instanceof Uint8Array||"RGBA"===e||(u=t,t=k(t)),a=this["process"+e.toUpperCase()](t,h.call(this),i,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in r.image_compression?t:N.NONE}(o),u)),!a)throw new Error("An unknown error occurred whilst processing the image.");return a},q=r.__addimage__.convertBase64ToBinaryString=function(t,r){r="boolean"!=typeof r||r;var e,n="";if("string"==typeof t){var i;e=null!==(i=g(t))&&void 0!==i?i:t;try{n=zn(e)}catch(t){if(r)throw A(e)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};r.getImageProperties=function(t){var e,i,o="";if(v(t)&&(t=d(t)),"string"==typeof t&&s(t)===n&&(""===(o=q(t,false))&&(o=r.loadFile(t)||""),t=o),i=s(t),!l(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if(t instanceof Uint8Array||(t=k(t)),!(e=this["process"+i.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return e.fileType=i,e}}(hi.API),
85
85
  /**
86
86
  * @license
87
87
  * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
@@ -164,14 +164,14 @@ function(t){var r={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[6515
164
164
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
165
165
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
166
166
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167
- */function Ps(t){var r,e,n,i,s,o=Math.floor,a=new Array(64),u=new Array(64),f=new Array(64),c=new Array(64),h=new Array(65535),l=new Array(65535),v=new Array(64),d=new Array(64),w=[],m=0,b=7,p=new Array(64),N=new Array(64),L=new Array(64),A=new Array(256),g=new Array(2048),y=[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],k=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],x=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],q=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],R=[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 I(t,r){for(var e=0,n=0,i=new Array,s=1;s<=16;s++){for(var o=1;o<=t[s];o++)i[r[n]]=[],i[r[n]][0]=e,i[r[n]][1]=s,n++,e++;e*=2}return i}function O(t){for(var r=t[0],e=t[1]-1;e>=0;)r&1<<e&&(m|=1<<b),e--,--b<0&&(255==m?(B(255),B(0)):B(m),b=7,m=0)}function B(t){w.push(t)}function P(t){B(t>>8&255),B(255&t)}function F(t,r,e,n,i){for(var s,o=i[0],a=i[240],u=function(t,r){var e,n,i,s,o,a,u,f,c,h,l=0;for(c=0;c<8;++c){e=t[l],n=t[l+1],i=t[l+2],s=t[l+3],o=t[l+4],a=t[l+5],u=t[l+6];var d=e+(f=t[l+7]),w=e-f,m=n+u,b=n-u,p=i+a,N=i-a,L=s+o,A=s-o,g=d+L,y=d-L,k=m+p,S=m-p;t[l]=g+k,t[l+4]=g-k;var x=.707106781*(S+y);t[l+2]=y+x,t[l+6]=y-x;var q=.382683433*((g=A+N)-(S=b+w)),E=.5411961*g+q,M=1.306562965*S+q,j=.707106781*(k=N+b),R=w+j,I=w-j;t[l+5]=I+E,t[l+3]=I-E,t[l+1]=R+M,t[l+7]=R-M,l+=8}for(l=0,c=0;c<8;++c){e=t[l],n=t[l+8],i=t[l+16],s=t[l+24],o=t[l+32],a=t[l+40],u=t[l+48];var O=e+(f=t[l+56]),B=e-f,P=n+u,F=n-u,T=i+a,C=i-a,D=s+o,z=s-o,U=O+D,_=O-D,V=P+T,W=P-T;t[l]=U+V,t[l+32]=U-V;var H=.707106781*(W+_);t[l+16]=_+H,t[l+48]=_-H;var G=.382683433*((U=z+C)-(W=F+B)),J=.5411961*U+G,Z=1.306562965*W+G,K=.707106781*(V=C+F),Y=B+K,$=B-K;t[l+40]=$+J,t[l+24]=$-J,t[l+8]=Y+Z,t[l+56]=Y-Z,l++}for(c=0;c<64;++c)h=t[c]*r[c],v[c]=h>0?h+.5|0:h-.5|0;return v}(t,r),f=0;f<64;++f)d[y[f]]=u[f];var c=d[0]-e;e=d[0],0==c?O(n[0]):(O(n[l[s=32767+c]]),O(h[s]));for(var w=63;w>0&&0==d[w];)w--;if(0==w)return O(o),e;for(var m,b=1;b<=w;){for(var p=b;0==d[b]&&b<=w;)++b;var N=b-p;if(N>=16){m=N>>4;for(var L=1;L<=m;++L)O(a);N&=15}s=32767+d[b],O(i[(N<<4)+l[s]]),O(h[s]),b++}return 63!=w&&O(o),e}function T(t){t=Math.min(Math.max(t,1),100),s!=t&&(function(t){for(var r=[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],e=0;e<64;e++){var n=o((r[e]*t+50)/100);n=Math.min(Math.max(n,1),255),a[y[e]]=n}for(var i=[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],s=0;s<64;s++){var h=o((i[s]*t+50)/100);h=Math.min(Math.max(h,1),255),u[y[s]]=h}for(var l=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],v=0,d=0;d<8;d++)for(var w=0;w<8;w++)f[v]=1/(a[y[v]]*l[d]*l[w]*8),c[v]=1/(u[y[v]]*l[d]*l[w]*8),v++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),s=t)}this.encode=function(t,s){s&&T(s),w=new Array,m=0,b=7,P(65496),P(65504),P(16),B(74),B(70),B(73),B(70),B(0),B(1),B(1),B(0),P(1),P(1),B(0),B(0),function(){P(65499),P(132),B(0);for(var t=0;t<64;t++)B(a[t]);B(1);for(var r=0;r<64;r++)B(u[r])}(),function(t,r){P(65472),P(17),B(8),P(r),P(t),B(3),B(1),B(17),B(0),B(2),B(17),B(1),B(3),B(17),B(1)}(t.width,t.height),function(){P(65476),P(418),B(0);for(var t=0;t<16;t++)B(k[t+1]);for(var r=0;r<=11;r++)B(S[r]);B(16);for(var e=0;e<16;e++)B(x[e+1]);for(var n=0;n<=161;n++)B(q[n]);B(1);for(var i=0;i<16;i++)B(E[i+1]);for(var s=0;s<=11;s++)B(M[s]);B(17);for(var o=0;o<16;o++)B(j[o+1]);for(var a=0;a<=161;a++)B(R[a])}(),P(65498),P(12),B(3),B(1),B(0),B(2),B(17),B(3),B(17),B(0),B(63),B(0);var o=0,h=0,l=0;m=0,b=7,this.encode.displayName="_encode_";for(var v,d,A,y,I,C,D,z,U,_=t.data,V=t.width,W=t.height,H=4*V,G=0;G<W;){for(v=0;v<H;){for(I=H*G+v,D=-1,z=0,U=0;U<64;U++)C=I+(z=U>>3)*H+(D=4*(7&U)),G+z>=W&&(C-=H*(G+1+z-W)),v+D>=H&&(C-=v+D-H+4),d=_[C++],A=_[C++],y=_[C++],p[U]=(g[d]+g[A+256|0]+g[y+512|0]>>16)-128,N[U]=(g[d+768|0]+g[A+1024|0]+g[y+1280|0]>>16)-128,L[U]=(g[d+1280|0]+g[A+1536|0]+g[y+1792|0]>>16)-128;o=F(p,f,o,r,n),h=F(N,c,h,e,i),l=F(L,c,l,e,i),v+=32}G+=8}if(b>=0){var J=[];J[1]=b+1,J[0]=(1<<b+1)-1,O(J)}return P(65497),new Uint8Array(w)},t=t||50,function(){for(var t=String.fromCharCode,r=0;r<256;r++)A[r]=t(r)}(),r=I(k,S),e=I(E,M),n=I(x,q),i=I(j,R),function(){for(var t=1,r=2,e=1;e<=15;e++){for(var n=t;n<r;n++)l[32767+n]=e,h[32767+n]=[],h[32767+n][1]=e,h[32767+n][0]=n;for(var i=-(r-1);i<=-t;i++)l[32767+i]=e,h[32767+i]=[],h[32767+i][1]=e,h[32767+i][0]=r-1+i;t<<=1,r<<=1}}(),function(){for(var t=0;t<256;t++)g[t]=19595*t,g[t+256|0]=38470*t,g[t+512|0]=7471*t+32768,g[t+768|0]=-11059*t,g[t+1024|0]=-21709*t,g[t+1280|0]=32768*t+8421375,g[t+1536|0]=-27439*t,g[t+1792|0]=-5329*t}(),T(t)
167
+ */function Ps(t){var r,e,n,i,s,o=Math.floor,a=new Array(64),u=new Array(64),f=new Array(64),c=new Array(64),h=new Array(65535),l=new Array(65535),v=new Array(64),d=new Array(64),w=[],m=0,b=7,p=new Array(64),N=new Array(64),L=new Array(64),A=new Array(256),g=new Array(2048),y=[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],k=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],x=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],q=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],j=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],R=[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 I(t,r){for(var e=0,n=0,i=new Array,s=1;s<=16;s++){for(var o=1;o<=t[s];o++)i[r[n]]=[],i[r[n]][0]=e,i[r[n]][1]=s,n++,e++;e*=2}return i}function O(t){for(var r=t[0],e=t[1]-1;e>=0;)r&1<<e&&(m|=1<<b),e--,--b<0&&(255==m?(B(255),B(0)):B(m),b=7,m=0)}function B(t){w.push(t)}function P(t){B(t>>8&255),B(255&t)}function F(t,r,e,n,i){for(var s,o=i[0],a=i[240],u=function(t,r){var e,n,i,s,o,a,u,f,c,h,l=0;for(c=0;c<8;++c){e=t[l],n=t[l+1],i=t[l+2],s=t[l+3],o=t[l+4],a=t[l+5],u=t[l+6];var d=e+(f=t[l+7]),w=e-f,m=n+u,b=n-u,p=i+a,N=i-a,L=s+o,A=s-o,g=d+L,y=d-L,k=m+p,S=m-p;t[l]=g+k,t[l+4]=g-k;var x=.707106781*(S+y);t[l+2]=y+x,t[l+6]=y-x;var q=.382683433*((g=A+N)-(S=b+w)),E=.5411961*g+q,M=1.306562965*S+q,j=.707106781*(k=N+b),R=w+j,I=w-j;t[l+5]=I+E,t[l+3]=I-E,t[l+1]=R+M,t[l+7]=R-M,l+=8}for(l=0,c=0;c<8;++c){e=t[l],n=t[l+8],i=t[l+16],s=t[l+24],o=t[l+32],a=t[l+40],u=t[l+48];var O=e+(f=t[l+56]),B=e-f,P=n+u,F=n-u,T=i+a,C=i-a,D=s+o,z=s-o,U=O+D,_=O-D,V=P+T,W=P-T;t[l]=U+V,t[l+32]=U-V;var H=.707106781*(W+_);t[l+16]=_+H,t[l+48]=_-H;var G=.382683433*((U=z+C)-(W=F+B)),Z=.5411961*U+G,J=1.306562965*W+G,K=.707106781*(V=C+F),Y=B+K,$=B-K;t[l+40]=$+Z,t[l+24]=$-Z,t[l+8]=Y+J,t[l+56]=Y-J,l++}for(c=0;c<64;++c)h=t[c]*r[c],v[c]=h>0?h+.5|0:h-.5|0;return v}(t,r),f=0;f<64;++f)d[y[f]]=u[f];var c=d[0]-e;e=d[0],0==c?O(n[0]):(O(n[l[s=32767+c]]),O(h[s]));for(var w=63;w>0&&0==d[w];)w--;if(0==w)return O(o),e;for(var m,b=1;b<=w;){for(var p=b;0==d[b]&&b<=w;)++b;var N=b-p;if(N>=16){m=N>>4;for(var L=1;L<=m;++L)O(a);N&=15}s=32767+d[b],O(i[(N<<4)+l[s]]),O(h[s]),b++}return 63!=w&&O(o),e}function T(t){t=Math.min(Math.max(t,1),100),s!=t&&(function(t){for(var r=[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],e=0;e<64;e++){var n=o((r[e]*t+50)/100);n=Math.min(Math.max(n,1),255),a[y[e]]=n}for(var i=[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],s=0;s<64;s++){var h=o((i[s]*t+50)/100);h=Math.min(Math.max(h,1),255),u[y[s]]=h}for(var l=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],v=0,d=0;d<8;d++)for(var w=0;w<8;w++)f[v]=1/(a[y[v]]*l[d]*l[w]*8),c[v]=1/(u[y[v]]*l[d]*l[w]*8),v++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),s=t)}this.encode=function(t,s){s&&T(s),w=new Array,m=0,b=7,P(65496),P(65504),P(16),B(74),B(70),B(73),B(70),B(0),B(1),B(1),B(0),P(1),P(1),B(0),B(0),function(){P(65499),P(132),B(0);for(var t=0;t<64;t++)B(a[t]);B(1);for(var r=0;r<64;r++)B(u[r])}(),function(t,r){P(65472),P(17),B(8),P(r),P(t),B(3),B(1),B(17),B(0),B(2),B(17),B(1),B(3),B(17),B(1)}(t.width,t.height),function(){P(65476),P(418),B(0);for(var t=0;t<16;t++)B(k[t+1]);for(var r=0;r<=11;r++)B(S[r]);B(16);for(var e=0;e<16;e++)B(x[e+1]);for(var n=0;n<=161;n++)B(q[n]);B(1);for(var i=0;i<16;i++)B(E[i+1]);for(var s=0;s<=11;s++)B(M[s]);B(17);for(var o=0;o<16;o++)B(j[o+1]);for(var a=0;a<=161;a++)B(R[a])}(),P(65498),P(12),B(3),B(1),B(0),B(2),B(17),B(3),B(17),B(0),B(63),B(0);var o=0,h=0,l=0;m=0,b=7,this.encode.displayName="_encode_";for(var v,d,A,y,I,C,D,z,U,_=t.data,V=t.width,W=t.height,H=4*V,G=0;G<W;){for(v=0;v<H;){for(I=H*G+v,D=-1,z=0,U=0;U<64;U++)C=I+(z=U>>3)*H+(D=4*(7&U)),G+z>=W&&(C-=H*(G+1+z-W)),v+D>=H&&(C-=v+D-H+4),d=_[C++],A=_[C++],y=_[C++],p[U]=(g[d]+g[A+256|0]+g[y+512|0]>>16)-128,N[U]=(g[d+768|0]+g[A+1024|0]+g[y+1280|0]>>16)-128,L[U]=(g[d+1280|0]+g[A+1536|0]+g[y+1792|0]>>16)-128;o=F(p,f,o,r,n),h=F(N,c,h,e,i),l=F(L,c,l,e,i),v+=32}G+=8}if(b>=0){var Z=[];Z[1]=b+1,Z[0]=(1<<b+1)-1,O(Z)}return P(65497),new Uint8Array(w)},t=t||50,function(){for(var t=String.fromCharCode,r=0;r<256;r++)A[r]=t(r)}(),r=I(k,S),e=I(E,M),n=I(x,q),i=I(j,R),function(){for(var t=1,r=2,e=1;e<=15;e++){for(var n=t;n<r;n++)l[32767+n]=e,h[32767+n]=[],h[32767+n][1]=e,h[32767+n][0]=n;for(var i=-(r-1);i<=-t;i++)l[32767+i]=e,h[32767+i]=[],h[32767+i][1]=e,h[32767+i][0]=r-1+i;t<<=1,r<<=1}}(),function(){for(var t=0;t<256;t++)g[t]=19595*t,g[t+256|0]=38470*t,g[t+512|0]=7471*t+32768,g[t+768|0]=-11059*t,g[t+1024|0]=-21709*t,g[t+1280|0]=32768*t+8421375,g[t+1536|0]=-27439*t,g[t+1792|0]=-5329*t}(),T(t)
168
168
  /**
169
169
  * @license
170
170
  * Copyright (c) 2017 Aras Abbasi
171
171
  *
172
172
  * Licensed under the MIT License.
173
173
  * http://opensource.org/licenses/mit-license
174
- */}function Fs(t,r){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!r,this.bottom_up=true,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Ts(t){function r(t){if(!t)throw Error("assert :P")}function e(t,r,e){for(var n=0;4>n;n++)if(t[r+n]!=e.charCodeAt(n))return true;return false}function n(t,r,e,n,i){for(var s=0;s<i;s++)t[r+s]=e[n+s]}function i(t,r,e,n){for(var i=0;i<n;i++)t[r+i]=e}function s(t){return new Int32Array(t)}function o(t,r){for(var e=[],n=0;n<t;n++)e.push(new r);return e}function a(t,r){var e=[];return function t(e,n,i){for(var s=i[n],o=0;o<s&&(e.push(i.length>n+1?[]:new r),!(i.length<n+1));o++)t(e[o],n+1,i)}(e,0,t),e}var u=function(){var t=this;function u(t,r){for(var e=1<<r-1>>>0;t&e;)e>>>=1;return e?(t&e-1)+e:t}function f(t,e,n,i,s){r(!(i%n));do{t[e+(i-=n)]=s}while(0<i)}function c(t,e,n,i,o){if(r(2328>=o),512>=o)var a=s(512);else if(null==(a=s(o)))return 0;return function(t,e,n,i,o,a){var c,l,v=e,d=1<<n,w=s(16),m=s(16);for(r(0!=o),r(null!=i),r(null!=t),r(0<n),l=0;l<o;++l){if(15<i[l])return 0;++w[i[l]]}if(w[0]==o)return 0;for(m[1]=0,c=1;15>c;++c){if(w[c]>1<<c)return 0;m[c+1]=m[c]+w[c]}for(l=0;l<o;++l)c=i[l],0<i[l]&&(a[m[c]++]=l);if(1==m[15])return(i=new h).g=0,i.value=a[0],f(t,v,1,d,i),d;var b,p=-1,N=d-1,L=0,A=1,g=1,y=1<<n;for(l=0,c=1,o=2;c<=n;++c,o<<=1){if(A+=g<<=1,0>(g-=w[c]))return 0;for(;0<w[c];--w[c])(i=new h).g=c,i.value=a[l++],f(t,v+L,o,y,i),L=u(L,c)}for(c=n+1,o=2;15>=c;++c,o<<=1){if(A+=g<<=1,0>(g-=w[c]))return 0;for(;0<w[c];--w[c]){if(i=new h,(L&N)!=p){for(v+=y,b=1<<(p=c)-n;15>p&&!(0>=(b-=w[p]));)++p,b<<=1;d+=y=1<<(b=p-n),t[e+(p=L&N)].g=b+n,t[e+p].value=v-e-p}i.g=c-n,i.value=a[l++],f(t,v+(L>>n),o,y,i),L=u(L,c)}}return A!=2*m[15]-1?0:d}(t,e,n,i,o,a)}function h(){this.value=this.g=0}function l(){this.value=this.g=0}function v(){this.G=o(5,h),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Te,l)}function d(t,e,n,i){r(null!=t),r(null!=e),r(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=e,t.pa=n,t.Jd=e,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,x(t)}function w(t,r){for(var e=0;0<r--;)e|=E(t,128)<<r;return e}function m(t,r){var e=w(t,r);return q(t)?-e:e}function b(t,e,n,i){var s,o=0;for(r(null!=t),r(null!=e),r(4294967288>i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4<i&&(i=4),s=0;s<i;++s)o+=e[n+s]<<8*s;t.Ra=o,t.bb=i,t.oa=e,t.pa=n}function p(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<ze-8>>>0,++t.bb,t.u-=8;y(t)&&(t.h=1,t.u=0)}function N(t,e){if(r(0<=e),!t.h&&e<=De){var n=g(t)&Ce[e];return t.u+=e,p(t),n}return t.h=1,t.u=0}function L(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function A(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function g(t){return t.Ra>>>(t.u&ze-1)>>>0}function y(t){return r(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>ze}function k(t,r){t.u=r,t.h=y(t)}function S(t){t.u>=Ue&&(r(t.u>=Ue),p(t))}function x(t){r(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(r(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function q(t){return w(t,1)}function E(t,r){var e=t.Ca;0>t.b&&x(t);var n=t.b,i=e*r>>>8,s=(t.I>>>n>i)+0;for(s?(e-=i,t.I-=i+1<<n>>>0):e=i+1,n=e,i=0;256<=n;)i+=8,n>>=8;return n=7^i+_e[n],t.b-=n,t.Ca=(e<<n)-1,s}function M(t,r,e){t[r+0]=e>>24&255,t[r+1]=e>>16&255,t[r+2]=e>>8&255,t[r+3]=255&e}function j(t,r){return t[r+0]|t[r+1]<<8}function R(t,r){return j(t,r)|t[r+2]<<16}function I(t,r){return j(t,r)|j(t,r+2)<<16}function O(t,e){var n=1<<e;return r(null!=t),r(0<e),t.X=s(n),null==t.X?0:(t.Mb=32-e,t.Xa=e,1)}function B(t,e){r(null!=t),r(null!=e),r(t.Xa==e.Xa),n(e.X,0,t.X,0,1<<e.Xa)}function P(){this.X=[],this.Xa=this.Mb=0}function F(t,e,n,i){r(null!=n),r(null!=i);var s=n[0],o=i[0];return 0==s&&(s=(t*o+e/2)/e),0==o&&(o=(e*s+t/2)/t),0>=s||0>=o?0:(n[0]=s,i[0]=o,1)}function T(t,r){return t+(1<<r)-1>>>r}function C(t,r){return((4278255360&t)+(4278255360&r)>>>0&4278255360)+((16711935&t)+(16711935&r)>>>0&16711935)>>>0}function D(r,e){t[e]=function(e,n,i,s,o,a,u){var f;for(f=0;f<o;++f){var c=t[r](a[u+f-1],i,s+f);a[u+f]=C(e[n+f],c)}}}function z(){this.ud=this.hd=this.jd=0}function U(t,r){return((4278124286&(t^r))>>>1)+(t&r)>>>0}function _(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function V(t,r){return _(t+(t-r+.5>>1))}function W(t,r,e){return Math.abs(r-e)-Math.abs(t-e)}function H(t,r,e,n,i,s,o){for(n=s[o-1],e=0;e<i;++e)s[o+e]=n=C(t[r+e],n)}function G(t,r,e,n,i){var s;for(s=0;s<e;++s){var o=t[r+s],a=o>>8&255,u=16711935&(u=(u=16711935&o)+((a<<16)+a));n[i+s]=(4278255360&o)+u>>>0}}function J(t,r){r.jd=255&t,r.hd=t>>8&255,r.ud=t>>16&255}function Z(t,r,e,n,i,s){var o;for(o=0;o<n;++o){var a=r[e+o],u=a>>>8,f=a,c=255&(c=(c=a>>>16)+((t.jd<<24>>24)*(u<<24>>24)>>>5));f=255&(f=(f+=(t.hd<<24>>24)*(u<<24>>24)>>>5)+((t.ud<<24>>24)*(c<<24>>24)>>>5)),i[s+o]=(4278255360&a)+(c<<16)+f}}function K(r,e,n,i,s){t[e]=function(t,r,e,n,o,a,u,f,c){for(n=u;n<f;++n)for(u=0;u<c;++u)o[a++]=s(e[i(t[r++])])},t[r]=function(r,e,o,a,u,f,c){var h=8>>r.b,l=r.Ea,v=r.K[0],d=r.w;if(8>h)for(r=(1<<r.b)-1,d=(1<<h)-1;e<o;++e){var w,m=0;for(w=0;w<l;++w)w&r||(m=i(a[u++])),f[c++]=s(v[m&d]),m>>=h}else t["VP8LMapColor"+n](a,u,v,d,f,c,e,o,l)}}function Y(t,r,e,n,i){for(e=r+e;r<e;){var s=t[r++];n[i++]=s>>16&255,n[i++]=s>>8&255,n[i++]=255&s}}function $(t,r,e,n,i){for(e=r+e;r<e;){var s=t[r++];n[i++]=s>>16&255,n[i++]=s>>8&255,n[i++]=255&s,n[i++]=s>>24&255}}function X(t,r,e,n,i){for(e=r+e;r<e;){var s=(o=t[r++])>>16&240|o>>12&15,o=240&o|o>>28&15;n[i++]=s,n[i++]=o}}function Q(t,r,e,n,i){for(e=r+e;r<e;){var s=(o=t[r++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[i++]=s,n[i++]=o}}function tt(t,r,e,n,i){for(e=r+e;r<e;){var s=t[r++];n[i++]=255&s,n[i++]=s>>8&255,n[i++]=s>>16&255}}function rt(t,r,e,i,s,o){if(0==o)for(e=r+e;r<e;)M(i,((o=t[r++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),s+=32;else n(i,s,t,r,e)}function et(r,e){t[e][0]=t[r+"0"],t[e][1]=t[r+"1"],t[e][2]=t[r+"2"],t[e][3]=t[r+"3"],t[e][4]=t[r+"4"],t[e][5]=t[r+"5"],t[e][6]=t[r+"6"],t[e][7]=t[r+"7"],t[e][8]=t[r+"8"],t[e][9]=t[r+"9"],t[e][10]=t[r+"10"],t[e][11]=t[r+"11"],t[e][12]=t[r+"12"],t[e][13]=t[r+"13"],t[e][14]=t[r+"0"],t[e][15]=t[r+"0"]}function nt(t){return t==_n||t==Vn||t==Wn||t==Hn}function it(){this.eb=[],this.size=this.A=this.fb=0}function st(){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 ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new st,this.sd=null}function at(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ut(){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 ft(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ct(t,r){var e=t.T,i=r.ba.f.RGBA,s=i.eb,o=i.fb+t.ka*i.A,a=mi[r.ba.S],u=t.y,f=t.O,c=t.f,h=t.N,l=t.ea,v=t.W,d=r.cc,w=r.dc,m=r.Mc,b=r.Nc,p=t.ka,N=t.ka+t.T,L=t.U,A=L+1>>1;for(0==p?a(u,f,null,null,c,h,l,v,c,h,l,v,s,o,null,null,L):(a(r.ec,r.fc,u,f,d,w,m,b,c,h,l,v,s,o-i.A,s,o,L),++e);p+2<N;p+=2)d=c,w=h,m=l,b=v,h+=t.Rc,v+=t.Rc,o+=2*i.A,a(u,(f+=2*t.fa)-t.fa,u,f,d,w,m,b,c,h,l,v,s,o-i.A,s,o,L);return f+=t.fa,t.j+N<t.o?(n(r.ec,r.fc,u,f,L),n(r.cc,r.dc,c,h,A),n(r.Mc,r.Nc,l,v,A),e--):1&N||a(u,f,null,null,c,h,l,v,c,h,l,v,s,o+i.A,null,null,L),e}function ht(t,e,n){var i=t.F,s=[t.J];if(null!=i){var o=t.U,a=e.ba.S,u=a==Dn||a==Wn;e=e.ba.f.RGBA;var f=[0],c=t.ka;f[0]=t.T,t.Kb&&(0==c?--f[0]:(--c,s[0]-=t.width),t.j+t.ka+t.T==t.o&&(f[0]=t.o-t.j-c));var h=e.eb;c=e.fb+c*e.A,t=kn(i,s[0],t.width,o,f,h,c+(u?0:3),e.A),r(n==f),t&&nt(a)&&gn(h,c,u,o,f,e.A)}return 0}function lt(t){var r=t.ma,e=r.ba.S,n=11>e,i=e==Fn||e==Cn||e==Dn||e==zn||12==e||nt(e);if(r.memory=null,r.Ib=null,r.Jb=null,r.Nd=null,!Be(r.Oa,t,i?11:12))return 0;if(i&&nt(e)&&be(),t.da)alert("todo:use_scaling");else{if(n){if(r.Ib=ft,t.Kb){if(e=t.U+1>>1,r.memory=s(t.U+2*e),null==r.memory)return 0;r.ec=r.memory,r.fc=0,r.cc=r.ec,r.dc=r.fc+t.U,r.Mc=r.cc,r.Nc=r.dc+e,r.Ib=ct,be()}}else alert("todo:EmitYUV");i&&(r.Jb=ht,n&&we())}if(n&&!Mi){for(t=0;256>t;++t)ji[t]=89858*(t-128)+Si>>ki,Oi[t]=-22014*(t-128)+Si,Ii[t]=-45773*(t-128),Ri[t]=113618*(t-128)+Si>>ki;for(t=xi;t<qi;++t)r=76283*(t-16)+Si>>ki,Bi[t-xi]=Ht(r,255),Pi[t-xi]=Ht(r+8>>4,15);Mi=1}return 1}function vt(t){var e=t.ma,n=t.U,i=t.T;return r(!(1&t.ka)),0>=n||0>=i?0:(n=e.Ib(t,e),null!=e.Jb&&e.Jb(t,e,n),e.Dc+=n,1)}function dt(t){t.ma.memory=null}function wt(t,r,e,n){return 47!=N(t,8)?0:(r[0]=N(t,14)+1,e[0]=N(t,14)+1,n[0]=N(t,1),0!=N(t,3)?0:!t.h)}function mt(t,r){if(4>t)return t+1;var e=t-2>>1;return(2+(1&t)<<e)+N(r,e)+1}function bt(t,r){return 120<r?r-120:1<=(e=((e=$n[r-1])>>4)*t+(8-(15&e)))?e:1;var e}function pt(t,r,e){var n=g(e),i=t[r+=255&n].g-8;return 0<i&&(k(e,e.u+8),n=g(e),r+=t[r].value,r+=n&(1<<i)-1),k(e,e.u+t[r].g),t[r].value}function Nt(t,e,n){return n.g+=t.g,n.value+=t.value<<e>>>0,r(8>=n.g),t.g}function Lt(t,e,n){var i=t.xc;return r((e=0==i?0:t.vc[t.md*(n>>i)+(e>>i)])<t.Wb),t.Ya[e]}function At(t,e,i,s){var o=t.ab,a=t.c*e,u=t.C;e=u+e;var f=i,c=s;for(s=t.Ta,i=t.Ua;0<o--;){var h=t.gc[o],l=u,v=e,d=f,w=c,m=(c=s,f=i,h.Ea);switch(r(l<v),r(v<=h.nc),h.hc){case 2:He(d,w,(v-l)*m,c,f);break;case 0:var b=l,p=v,N=c,L=f,A=(x=h).Ea;0==b&&(Ve(d,w,null,null,1,N,L),H(d,w+1,0,0,A-1,N,L+1),w+=A,L+=A,++b);for(var g=1<<x.b,y=g-1,k=T(A,x.b),S=x.K,x=x.w+(b>>x.b)*k;b<p;){var q=S,E=x,M=1;for(We(d,w,N,L-A,1,N,L);M<A;){var j=(M&~y)+g;j>A&&(j=A),(0,Ye[q[E++]>>8&15])(d,w+ +M,N,L+M-A,j-M,N,L+M),M=j}w+=A,L+=A,++b&y||(x+=k)}v!=h.nc&&n(c,f-m,c,f+(v-l-1)*m,m);break;case 1:for(m=d,p=w,A=(d=h.Ea)-(L=d&~(N=(w=1<<h.b)-1)),b=T(d,h.b),g=h.K,h=h.w+(l>>h.b)*b;l<v;){for(y=g,k=h,S=new z,x=p+L,q=p+d;p<x;)J(y[k++],S),$e(S,m,p,w,c,f),p+=w,f+=w;p<q&&(J(y[k++],S),$e(S,m,p,A,c,f),p+=A,f+=A),++l&N||(h+=b)}break;case 3:if(d==c&&w==f&&0<h.b){for(p=c,d=m=f+(v-l)*m-(L=(v-l)*T(h.Ea,h.b)),w=c,N=f,b=[],L=(A=L)-1;0<=L;--L)b[L]=w[N+L];for(L=A-1;0<=L;--L)p[d+L]=b[L];Ge(h,l,v,c,m,c,f)}else Ge(h,l,v,d,w,c,f)}f=s,c=i}c!=i&&n(s,i,f,c,a)}function gt(t,e){var n=t.V,i=t.Ba+t.c*t.C,s=e-t.C;if(r(e<=t.l.o),r(16>=s),0<s){var o=t.l,a=t.Ta,u=t.Ua,f=o.width;if(At(t,s,n,i),s=u=[u],r((n=t.C)<(i=e)),r(o.v<o.va),i>o.o&&(i=o.o),n<o.j){var c=o.j-n;n=o.j,s[0]+=c*f}if(n>=i?n=0:(s[0]+=4*o.v,o.ka=n-o.j,o.U=o.va-o.v,o.T=i-n,n=1),n){if(u=u[0],11>(n=t.ca).S){var h=n.f.RGBA,l=(i=n.S,s=o.U,o=o.T,c=h.eb,h.A),v=o;for(h=h.fb+t.Ma*h.A;0<v--;){var d=a,w=u,m=s,b=c,p=h;switch(i){case Pn:Xe(d,w,m,b,p);break;case Fn:Qe(d,w,m,b,p);break;case _n:Qe(d,w,m,b,p),gn(b,p,0,m,1,0);break;case Tn:en(d,w,m,b,p);break;case Cn:rt(d,w,m,b,p,1);break;case Vn:rt(d,w,m,b,p,1),gn(b,p,0,m,1,0);break;case Dn:rt(d,w,m,b,p,0);break;case Wn:rt(d,w,m,b,p,0),gn(b,p,1,m,1,0);break;case zn:tn(d,w,m,b,p);break;case Hn:tn(d,w,m,b,p),yn(b,p,m,1,0);break;case Un:rn(d,w,m,b,p);break;default:r(0)}u+=f,h+=l}t.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");r(t.Ma<=n.height)}}t.C=e,r(t.C<=t.i)}function yt(t){var r;if(0<t.ua)return 0;for(r=0;r<t.Wb;++r){var e=t.Ya[r].G,n=t.Ya[r].H;if(0<e[1][n[1]+0].g||0<e[2][n[2]+0].g||0<e[3][n[3]+0].g)return 0}return 1}function kt(t,e,n,i,s,o){if(0!=t.Z){var a=t.qd,u=t.rd;for(r(null!=wi[t.Z]);e<n;++e)wi[t.Z](a,u,i,s,i,s,o),a=i,u=s,s+=o;t.qd=a,t.rd=u}}function St(t,e){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;if(i=t.C<i?i:t.C,r(e<=t.l.o),e>i){var s=t.l.width,o=n.ca,a=n.tb+s*i,u=t.V,f=t.Ba+t.c*i,c=t.gc;r(1==t.ab),r(3==c[0].hc),Ze(c[0],i,e,u,f,o,a),kt(n,i,e,o,a,s)}t.C=t.Ma=e}function xt(t,e,n,i,s,o,a){var u=t.$/i,f=t.$%i,c=t.m,h=t.s,l=n+t.$,v=l;s=n+i*s;var d=n+i*o,w=280+h.ua,m=t.Pb?u:16777216,b=0<h.ua?h.Wa:null,p=h.wc,N=l<d?Lt(h,f,u):null;r(t.C<o),r(d<=s);var L=false;t:for(;;){for(;L||l<d;){var A=0;if(u>=m){var x=l-n;r((m=t).Pb),m.wd=m.m,m.xd=x,0<m.s.ua&&B(m.s.Wa,m.s.vb),m=u+Qn}if(f&p||(N=Lt(h,f,u)),r(null!=N),N.Qb&&(e[l]=N.qb,L=true),!L)if(S(c),N.jc){A=c,x=e;var q=l,E=N.pd[g(A)&Te-1];r(N.jc),256>E.g?(k(A,A.u+E.g),x[q]=E.value,A=0):(k(A,A.u+E.g-256),r(256<=E.value),A=E.value),0==A&&(L=true)}else A=pt(N.G[0],N.H[0],c);if(c.h)break;if(L||256>A){if(!L)if(N.nd)e[l]=(N.qb|A<<8)>>>0;else{if(S(c),L=pt(N.G[1],N.H[1],c),S(c),x=pt(N.G[2],N.H[2],c),q=pt(N.G[3],N.H[3],c),c.h)break;e[l]=(q<<24|L<<16|A<<8|x)>>>0}if(L=false,++l,++f>=i&&(f=0,++u,null!=a&&u<=o&&!(u%16)&&a(t,u),null!=b))for(;v<l;)A=e[v++],b.X[(506832829*A&4294967295)>>>b.Mb]=A}else if(280>A){if(A=mt(A-256,c),x=pt(N.G[4],N.H[4],c),S(c),x=bt(i,x=mt(x,c)),c.h)break;if(l-n<x||s-l<A)break t;for(q=0;q<A;++q)e[l+q]=e[l+q-x];for(l+=A,f+=A;f>=i;)f-=i,++u,null!=a&&u<=o&&!(u%16)&&a(t,u);if(r(l<=s),f&p&&(N=Lt(h,f,u)),null!=b)for(;v<l;)A=e[v++],b.X[(506832829*A&4294967295)>>>b.Mb]=A}else{if(!(A<w))break t;for(L=A-280,r(null!=b);v<l;)A=e[v++],b.X[(506832829*A&4294967295)>>>b.Mb]=A;A=l,r(!(L>>>(x=b).Xa)),e[A]=x.X[L],L=true}L||r(c.h==y(c))}if(t.Pb&&c.h&&l<s)r(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&B(t.s.vb,t.s.Wa);else{if(c.h)break t;null!=a&&a(t,u>o?o:u),t.a=0,t.$=l-n}return 1}return t.a=3,0}function qt(t){r(null!=t),t.vc=null,t.yc=null,t.Ya=null;var e=t.Wa;null!=e&&(e.X=null),t.vb=null,r(null!=t)}function Et(){var r=new se;return null==r?null:(r.a=0,r.xb=di,et("Predictor","VP8LPredictors"),et("Predictor","VP8LPredictors_C"),et("PredictorAdd","VP8LPredictorsAdd"),et("PredictorAdd","VP8LPredictorsAdd_C"),He=G,$e=Z,Xe=Y,Qe=$,tn=X,rn=Q,en=tt,t.VP8LMapColor32b=Je,t.VP8LMapColor8b=Ke,r)}function Mt(t,e,n,a,u){var f=1,l=[t],d=[e],w=a.m,m=a.s,b=null,p=0;t:for(;;){if(n)for(;f&&N(w,1);){var L=l,A=d,y=a,x=1,q=y.m,E=y.gc[y.ab],M=N(q,2);if(y.Oc&1<<M)f=0;else{switch(y.Oc|=1<<M,E.hc=M,E.Ea=L[0],E.nc=A[0],E.K=[null],++y.ab,r(4>=y.ab),M){case 0:case 1:E.b=N(q,3)+2,x=Mt(T(E.Ea,E.b),T(E.nc,E.b),0,y,E.K),E.K=E.K[0];break;case 3:var j,R=N(q,8)+1,I=16<R?0:4<R?1:2<R?2:3;if(L[0]=T(E.Ea,I),E.b=I,j=x=Mt(R,1,0,y,E.K)){var B,P=R,F=E,D=1<<(8>>F.b),z=s(D);if(null==z)j=0;else{var U=F.K[0],_=F.w;for(z[0]=F.K[0][0],B=1;B<1*P;++B)z[B]=C(U[_+B],z[B-1]);for(;B<4*D;++B)z[B]=0;F.K[0]=null,F.K[0]=z,j=1}}x=j;break;case 2:break;default:r(0)}f=x}}if(l=l[0],d=d[0],f&&N(w,1)&&!(f=1<=(p=N(w,4))&&11>=p)){a.a=3;break t}var V;if(V=f)r:{var W,H,G,J=a,Z=l,K=d,Y=p,$=n,X=J.m,Q=J.s,tt=[null],rt=1,et=0,nt=Xn[Y];e:for(;;){if($&&N(X,1)){var it=N(X,3)+2,st=T(Z,it),ot=T(K,it),at=st*ot;if(!Mt(st,ot,0,J,tt))break e;for(tt=tt[0],Q.xc=it,W=0;W<at;++W){var ut=tt[W]>>8&65535;tt[W]=ut,ut>=rt&&(rt=ut+1)}}if(X.h)break e;for(H=0;5>H;++H){var ft=Zn[H];!H&&0<Y&&(ft+=1<<Y),et<ft&&(et=ft)}var ct=o(rt*nt,h),ht=rt,lt=o(ht,v);if(null==lt)var vt=null;else r(65536>=ht),vt=lt;var dt=s(et);if(null==vt||null==dt||null==ct){J.a=1;break e}var wt=ct;for(W=G=0;W<rt;++W){var mt=vt[W],bt=mt.G,pt=mt.H,Lt=0,At=1,gt=0;for(H=0;5>H;++H){ft=Zn[H],bt[H]=wt,pt[H]=G,!H&&0<Y&&(ft+=1<<Y);n:{var yt,kt=ft,St=J,Et=dt,jt=wt,Rt=G,It=0,Ot=St.m,Bt=N(Ot,1);if(i(Et,0,0,kt),Bt){var Pt=N(Ot,1)+1,Ft=N(Ot,1),Tt=N(Ot,0==Ft?1:8);Et[Tt]=1,2==Pt&&(Et[Tt=N(Ot,8)]=1);var Ct=1}else{var Dt=s(19),zt=N(Ot,4)+4;if(19<zt){St.a=3;var Ut=0;break n}for(yt=0;yt<zt;++yt)Dt[Yn[yt]]=N(Ot,3);var _t=void 0,Vt=void 0,Wt=St,Ht=Dt,Gt=kt,Jt=Et,Zt=0,Kt=Wt.m,Yt=8,$t=o(128,h);i:for(;c($t,0,7,Ht,19);){if(N(Kt,1)){var Xt=2+2*N(Kt,3);if((_t=2+N(Kt,Xt))>Gt)break i}else _t=Gt;for(Vt=0;Vt<Gt&&_t--;){S(Kt);var Qt=$t[0+(127&g(Kt))];k(Kt,Kt.u+Qt.g);var tr=Qt.value;if(16>tr)Jt[Vt++]=tr,0!=tr&&(Yt=tr);else{var rr=16==tr,er=tr-16,nr=Jn[er],ir=N(Kt,Gn[er])+nr;if(Vt+ir>Gt)break i;for(var sr=rr?Yt:0;0<ir--;)Jt[Vt++]=sr}}Zt=1;break i}Zt||(Wt.a=3),Ct=Zt}(Ct=Ct&&!Ot.h)&&(It=c(jt,Rt,8,Et,kt)),Ct&&0!=It?Ut=It:(St.a=3,Ut=0)}if(0==Ut)break e;if(At&&1==Kn[H]&&(At=0==wt[G].g),Lt+=wt[G].g,G+=Ut,3>=H){var or,ar=dt[0];for(or=1;or<ft;++or)dt[or]>ar&&(ar=dt[or]);gt+=ar}}if(mt.nd=At,mt.Qb=0,At&&(mt.qb=(bt[3][pt[3]+0].value<<24|bt[1][pt[1]+0].value<<16|bt[2][pt[2]+0].value)>>>0,0==Lt&&256>bt[0][pt[0]+0].value&&(mt.Qb=1,mt.qb+=bt[0][pt[0]+0].value<<8)),mt.jc=!mt.Qb&&6>gt,mt.jc){var ur,fr=mt;for(ur=0;ur<Te;++ur){var cr=ur,hr=fr.pd[cr],lr=fr.G[0][fr.H[0]+cr];256<=lr.value?(hr.g=lr.g+256,hr.value=lr.value):(hr.g=0,hr.value=0,cr>>=Nt(lr,8,hr),cr>>=Nt(fr.G[1][fr.H[1]+cr],16,hr),cr>>=Nt(fr.G[2][fr.H[2]+cr],0,hr),Nt(fr.G[3][fr.H[3]+cr],24,hr))}}}Q.vc=tt,Q.Wb=rt,Q.Ya=vt,Q.yc=ct,V=1;break r}V=0}if(!(f=V)){a.a=3;break t}if(0<p){if(m.ua=1<<p,!O(m.Wa,p)){a.a=1,f=0;break t}}else m.ua=0;var vr=a,dr=l,wr=d,mr=vr.s,br=mr.xc;if(vr.c=dr,vr.i=wr,mr.md=T(dr,br),mr.wc=0==br?-1:(1<<br)-1,n){a.xb=vi;break t}if(null==(b=s(l*d))){a.a=1,f=0;break t}f=(f=xt(a,b,0,l,d,d,null))&&!w.h;break t}return f?(null!=u?u[0]=b:(r(null==b),r(n)),a.$=0,n||qt(m)):qt(m),f}function jt(t,e){var n=t.c*t.i,i=n+e+16*e;return r(t.c<=e),t.V=s(i),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+e,1)}function Rt(t,e){var n=t.C,i=e-n,s=t.V,o=t.Ba+t.c*n;for(r(e<=t.l.o);0<i;){var a=16<i?16:i,u=t.l.ma,f=t.l.width,c=f*a,h=u.ca,l=u.tb+f*n,v=t.Ta,d=t.Ua;At(t,a,s,o),Sn(v,d,h,l,c),kt(u,n,n+a,h,l,f),i-=a,s+=a*t.c,n+=a}r(n==e),t.C=t.Ma=e}function It(){this.ub=this.yd=this.td=this.Rb=0}function Ot(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Bt(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Pt(){this.Yb=function(){var t=[];return function t(r,e,n){for(var i=n[e],s=0;s<i&&(r.push(n.length>e+1?[]:0),!(n.length<e+1));s++)t(r[s],e+1,n)}(t,0,[3,11]),t}()}function Ft(){this.jb=s(3),this.Wc=a([4,8],Pt),this.Xc=a([4,17],Pt)}function Tt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Ct(){this.ld=this.La=this.dd=this.tc=0}function Dt(){this.Na=this.la=0}function zt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ut(){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 _t(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ct),this.Y=0,this.ya=Array(new Ut),this.aa=0,this.l=new Gt}function Vt(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Wt(){this.cb=this.a=0,this.sc="",this.m=new L,this.Od=new It,this.Kc=new Ot,this.ed=new Tt,this.Qa=new Bt,this.Ic=this.$c=this.Aa=0,this.D=new _t,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,L),this.ia=0,this.pb=o(4,zt),this.Pa=new Ft,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Vt),this.Hd=0,this.rb=Array(new Dt),this.sb=0,this.wa=Array(new Ct),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 Ut),this.L=this.aa=0,this.gd=a([4,2],Ct),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 Ht(t,r){return 0>t?0:t>r?r:t}function Gt(){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 Jt(){var t=new Wt;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,ei||(ei=$t)),t}function Zt(t,r,e){return 0==t.a&&(t.a=r,t.sc=e,t.cb=0),0}function Kt(t,r,e){return 3<=e&&157==t[r+0]&&1==t[r+1]&&42==t[r+2]}function Yt(t,e){if(null==t)return 0;if(t.a=0,t.sc="OK",null==e)return Zt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=e.data,s=e.w,o=e.ha;if(4>o)return Zt(t,7,"Truncated header.");var a=n[s+0]|n[s+1]<<8|n[s+2]<<16,u=t.Od;if(u.Rb=!(1&a),u.td=a>>1&7,u.yd=a>>4&1,u.ub=a>>5,3<u.td)return Zt(t,3,"Incorrect keyframe parameters.");if(!u.yd)return Zt(t,4,"Frame not displayable.");s+=3,o-=3;var f=t.Kc;if(u.Rb){if(7>o)return Zt(t,7,"cannot parse picture header");if(!Kt(n,s,o))return Zt(t,3,"Bad code word");f.c=16383&(n[s+4]<<8|n[s+3]),f.Td=n[s+4]>>6,f.i=16383&(n[s+6]<<8|n[s+5]),f.Ud=n[s+6]>>6,s+=7,o-=7,t.za=f.c+15>>4,t.Ub=f.i+15>>4,e.width=f.c,e.height=f.i,e.Da=0,e.j=0,e.v=0,e.va=e.width,e.o=e.height,e.da=0,e.ib=e.width,e.hb=e.height,e.U=e.width,e.T=e.height,i((a=t.Pa).jb,0,255,a.jb.length),r(null!=(a=t.Qa)),a.Cb=0,a.Bb=0,a.Fb=1,i(a.Zb,0,0,a.Zb.length),i(a.Lb,0,0,a.Lb)}if(u.ub>o)return Zt(t,7,"bad partition length");d(a=t.m,n,s,u.ub),s+=u.ub,o-=u.ub,u.Rb&&(f.Ld=q(a),f.Kd=q(a)),f=t.Qa;var c,h=t.Pa;if(r(null!=a),r(null!=f),f.Cb=q(a),f.Cb){if(f.Bb=q(a),q(a)){for(f.Fb=q(a),c=0;4>c;++c)f.Zb[c]=q(a)?m(a,7):0;for(c=0;4>c;++c)f.Lb[c]=q(a)?m(a,6):0}if(f.Bb)for(c=0;3>c;++c)h.jb[c]=q(a)?w(a,8):255}else f.Bb=0;if(a.Ka)return Zt(t,3,"cannot parse segment header");if((f=t.ed).zd=q(a),f.Tb=w(a,6),f.wb=w(a,3),f.Pc=q(a),f.Pc&&q(a)){for(h=0;4>h;++h)q(a)&&(f.vd[h]=m(a,6));for(h=0;4>h;++h)q(a)&&(f.od[h]=m(a,6))}if(t.L=0==f.Tb?0:f.zd?1:2,a.Ka)return Zt(t,3,"cannot parse filter header");var l=o;if(o=c=s,s=c+l,f=l,t.Xb=(1<<w(t.m,2))-1,l<3*(h=t.Xb))n=7;else{for(c+=3*h,f-=3*h,l=0;l<h;++l){var v=n[o+0]|n[o+1]<<8|n[o+2]<<16;v>f&&(v=f),d(t.Jc[+l],n,c,v),c+=v,f-=v,o+=3}d(t.Jc[+h],n,c,f),n=c<s?0:5}if(0!=n)return Zt(t,n,"cannot parse partitions");for(n=w(c=t.m,7),o=q(c)?m(c,4):0,s=q(c)?m(c,4):0,f=q(c)?m(c,4):0,h=q(c)?m(c,4):0,c=q(c)?m(c,4):0,l=t.Qa,v=0;4>v;++v){if(l.Cb){var b=l.Zb[v];l.Fb||(b+=n)}else{if(0<v){t.pb[v]=t.pb[0];continue}b=n}var p=t.pb[v];p.Sc[0]=ti[Ht(b+o,127)],p.Sc[1]=ri[Ht(b+0,127)],p.Eb[0]=2*ti[Ht(b+s,127)],p.Eb[1]=101581*ri[Ht(b+f,127)]>>16,8>p.Eb[1]&&(p.Eb[1]=8),p.Qc[0]=ti[Ht(b+h,117)],p.Qc[1]=ri[Ht(b+c,127)],p.lc=b+c}if(!u.Rb)return Zt(t,4,"Not a key frame.");for(q(a),u=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(s=0;3>s;++s)for(f=0;11>f;++f)h=E(a,ui[n][o][s][f])?w(a,8):oi[n][o][s][f],u.Wc[n][o].Yb[s][f]=h;for(o=0;17>o;++o)u.Xc[n][o]=u.Wc[n][fi[o]]}return t.kc=q(a),t.kc&&(t.Bd=w(a,8)),t.cb=1}function $t(t,r,e,n,i,s,o){var a=r[i].Yb[e];for(e=0;16>i;++i){if(!E(t,a[e+0]))return i;for(;!E(t,a[e+1]);)if(a=r[++i].Yb[0],e=0,16==i)return 16;var u=r[i+1].Yb;if(E(t,a[e+2])){var f=t,c=0;if(E(f,(l=a)[(h=e)+3]))if(E(f,l[h+6])){for(a=0,h=2*(c=E(f,l[h+8]))+(l=E(f,l[h+9+c])),c=0,l=ni[h];l[a];++a)c+=c+E(f,l[a]);c+=3+(8<<h)}else E(f,l[h+7])?(c=7+2*E(f,165),c+=E(f,145)):c=5+E(f,159);else c=E(f,l[h+4])?3+E(f,l[h+5]):2;a=u[2]}else c=1,a=u[1];u=o+ii[i],0>(f=t).b&&x(f);var h,l=f.b,v=(h=f.Ca>>1)-(f.I>>l)>>31;--f.b,f.Ca+=v,f.Ca|=1,f.I-=(h+1&v)<<l,s[u]=((c^v)-v)*n[(0<i)+0]}return 16}function Xt(t){var r=t.rb[t.sb-1];r.la=0,r.Na=0,i(t.zc,0,0,t.zc.length),t.ja=0}function Qt(t,r,e,n,i){i=t[r+e+32*n]+(i>>3),t[r+e+32*n]=-256&i?0>i?0:255:i}function tr(t,r,e,n,i,s){Qt(t,r,0,e,n+i),Qt(t,r,1,e,n+s),Qt(t,r,2,e,n-s),Qt(t,r,3,e,n-i)}function rr(t){return(20091*t>>16)+t}function er(t,r,e,n){var i,o=0,a=s(16);for(i=0;4>i;++i){var u=t[r+0]+t[r+8],f=t[r+0]-t[r+8],c=(35468*t[r+4]>>16)-rr(t[r+12]),h=rr(t[r+4])+(35468*t[r+12]>>16);a[o+0]=u+h,a[o+1]=f+c,a[o+2]=f-c,a[o+3]=u-h,o+=4,r++}for(i=o=0;4>i;++i)u=(t=a[o+0]+4)+a[o+8],f=t-a[o+8],c=(35468*a[o+4]>>16)-rr(a[o+12]),Qt(e,n,0,0,u+(h=rr(a[o+4])+(35468*a[o+12]>>16))),Qt(e,n,1,0,f+c),Qt(e,n,2,0,f-c),Qt(e,n,3,0,u-h),o++,n+=32}function nr(t,r,e,n){var i=t[r+0]+4,s=35468*t[r+4]>>16,o=rr(t[r+4]),a=35468*t[r+1]>>16;tr(e,n,0,i+o,t=rr(t[r+1]),a),tr(e,n,1,i+s,t,a),tr(e,n,2,i-s,t,a),tr(e,n,3,i-o,t,a)}function ir(t,r,e,n,i){er(t,r,e,n),i&&er(t,r+16,e,n+4)}function sr(t,r,e,n){sn(t,r+0,e,n,1),sn(t,r+32,e,n+128,1)}function or(t,r,e,n){var i;for(t=t[r+0]+4,i=0;4>i;++i)for(r=0;4>r;++r)Qt(e,n,r,i,t)}function ar(t,r,e,n){t[r+0]&&un(t,r+0,e,n),t[r+16]&&un(t,r+16,e,n+4),t[r+32]&&un(t,r+32,e,n+128),t[r+48]&&un(t,r+48,e,n+128+4)}function ur(t,r,e,n){var i,o=s(16);for(i=0;4>i;++i){var a=t[r+0+i]+t[r+12+i],u=t[r+4+i]+t[r+8+i],f=t[r+4+i]-t[r+8+i],c=t[r+0+i]-t[r+12+i];o[0+i]=a+u,o[8+i]=a-u,o[4+i]=c+f,o[12+i]=c-f}for(i=0;4>i;++i)a=(t=o[0+4*i]+3)+o[3+4*i],u=o[1+4*i]+o[2+4*i],f=o[1+4*i]-o[2+4*i],c=t-o[3+4*i],e[n+0]=a+u>>3,e[n+16]=c+f>>3,e[n+32]=a-u>>3,e[n+48]=c-f>>3,n+=64}function fr(t,r,e){var n,i=r-32,s=On,o=255-t[i-1];for(n=0;n<e;++n){var a,u=s,f=o+t[r-1];for(a=0;a<e;++a)t[r+a]=u[f+t[i+a]];r+=32}}function cr(t,r){fr(t,r,4)}function hr(t,r){fr(t,r,8)}function lr(t,r){fr(t,r,16)}function vr(t,r){var e;for(e=0;16>e;++e)n(t,r+32*e,t,r-32,16)}function dr(t,r){var e;for(e=16;0<e;--e)i(t,r,t[r-1],16),r+=32}function wr(t,r,e){var n;for(n=0;16>n;++n)i(r,e+32*n,t,16)}function mr(t,r){var e,n=16;for(e=0;16>e;++e)n+=t[r-1+32*e]+t[r+e-32];wr(n>>5,t,r)}function br(t,r){var e,n=8;for(e=0;16>e;++e)n+=t[r-1+32*e];wr(n>>4,t,r)}function pr(t,r){var e,n=8;for(e=0;16>e;++e)n+=t[r+e-32];wr(n>>4,t,r)}function Nr(t,r){wr(128,t,r)}function Lr(t,r,e){return t+2*r+e+2>>2}function Ar(t,r){var e,i=r-32;for(i=new Uint8Array([Lr(t[i-1],t[i+0],t[i+1]),Lr(t[i+0],t[i+1],t[i+2]),Lr(t[i+1],t[i+2],t[i+3]),Lr(t[i+2],t[i+3],t[i+4])]),e=0;4>e;++e)n(t,r+32*e,i,0,i.length)}function gr(t,r){var e=t[r-1],n=t[r-1+32],i=t[r-1+64],s=t[r-1+96];M(t,r+0,16843009*Lr(t[r-1-32],e,n)),M(t,r+32,16843009*Lr(e,n,i)),M(t,r+64,16843009*Lr(n,i,s)),M(t,r+96,16843009*Lr(i,s,s))}function yr(t,r){var e,n=4;for(e=0;4>e;++e)n+=t[r+e-32]+t[r-1+32*e];for(n>>=3,e=0;4>e;++e)i(t,r+32*e,n,4)}function kr(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1-32],o=t[r+0-32],a=t[r+1-32],u=t[r+2-32],f=t[r+3-32];t[r+0+96]=Lr(n,i,t[r-1+96]),t[r+1+96]=t[r+0+64]=Lr(e,n,i),t[r+2+96]=t[r+1+64]=t[r+0+32]=Lr(s,e,n),t[r+3+96]=t[r+2+64]=t[r+1+32]=t[r+0+0]=Lr(o,s,e),t[r+3+64]=t[r+2+32]=t[r+1+0]=Lr(a,o,s),t[r+3+32]=t[r+2+0]=Lr(u,a,o),t[r+3+0]=Lr(f,u,a)}function Sr(t,r){var e=t[r+1-32],n=t[r+2-32],i=t[r+3-32],s=t[r+4-32],o=t[r+5-32],a=t[r+6-32],u=t[r+7-32];t[r+0+0]=Lr(t[r+0-32],e,n),t[r+1+0]=t[r+0+32]=Lr(e,n,i),t[r+2+0]=t[r+1+32]=t[r+0+64]=Lr(n,i,s),t[r+3+0]=t[r+2+32]=t[r+1+64]=t[r+0+96]=Lr(i,s,o),t[r+3+32]=t[r+2+64]=t[r+1+96]=Lr(s,o,a),t[r+3+64]=t[r+2+96]=Lr(o,a,u),t[r+3+96]=Lr(a,u,u)}function xr(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1-32],o=t[r+0-32],a=t[r+1-32],u=t[r+2-32],f=t[r+3-32];t[r+0+0]=t[r+1+64]=s+o+1>>1,t[r+1+0]=t[r+2+64]=o+a+1>>1,t[r+2+0]=t[r+3+64]=a+u+1>>1,t[r+3+0]=u+f+1>>1,t[r+0+96]=Lr(i,n,e),t[r+0+64]=Lr(n,e,s),t[r+0+32]=t[r+1+96]=Lr(e,s,o),t[r+1+32]=t[r+2+96]=Lr(s,o,a),t[r+2+32]=t[r+3+96]=Lr(o,a,u),t[r+3+32]=Lr(a,u,f)}function qr(t,r){var e=t[r+0-32],n=t[r+1-32],i=t[r+2-32],s=t[r+3-32],o=t[r+4-32],a=t[r+5-32],u=t[r+6-32],f=t[r+7-32];t[r+0+0]=e+n+1>>1,t[r+1+0]=t[r+0+64]=n+i+1>>1,t[r+2+0]=t[r+1+64]=i+s+1>>1,t[r+3+0]=t[r+2+64]=s+o+1>>1,t[r+0+32]=Lr(e,n,i),t[r+1+32]=t[r+0+96]=Lr(n,i,s),t[r+2+32]=t[r+1+96]=Lr(i,s,o),t[r+3+32]=t[r+2+96]=Lr(s,o,a),t[r+3+64]=Lr(o,a,u),t[r+3+96]=Lr(a,u,f)}function Er(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1+96];t[r+0+0]=e+n+1>>1,t[r+2+0]=t[r+0+32]=n+i+1>>1,t[r+2+32]=t[r+0+64]=i+s+1>>1,t[r+1+0]=Lr(e,n,i),t[r+3+0]=t[r+1+32]=Lr(n,i,s),t[r+3+32]=t[r+1+64]=Lr(i,s,s),t[r+3+64]=t[r+2+64]=t[r+0+96]=t[r+1+96]=t[r+2+96]=t[r+3+96]=s}function Mr(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1+96],o=t[r-1-32],a=t[r+0-32],u=t[r+1-32],f=t[r+2-32];t[r+0+0]=t[r+2+32]=e+o+1>>1,t[r+0+32]=t[r+2+64]=n+e+1>>1,t[r+0+64]=t[r+2+96]=i+n+1>>1,t[r+0+96]=s+i+1>>1,t[r+3+0]=Lr(a,u,f),t[r+2+0]=Lr(o,a,u),t[r+1+0]=t[r+3+32]=Lr(e,o,a),t[r+1+32]=t[r+3+64]=Lr(n,e,o),t[r+1+64]=t[r+3+96]=Lr(i,n,e),t[r+1+96]=Lr(s,i,n)}function jr(t,r){var e;for(e=0;8>e;++e)n(t,r+32*e,t,r-32,8)}function Rr(t,r){var e;for(e=0;8>e;++e)i(t,r,t[r-1],8),r+=32}function Ir(t,r,e){var n;for(n=0;8>n;++n)i(r,e+32*n,t,8)}function Or(t,r){var e,n=8;for(e=0;8>e;++e)n+=t[r+e-32]+t[r-1+32*e];Ir(n>>4,t,r)}function Br(t,r){var e,n=4;for(e=0;8>e;++e)n+=t[r+e-32];Ir(n>>3,t,r)}function Pr(t,r){var e,n=4;for(e=0;8>e;++e)n+=t[r-1+32*e];Ir(n>>3,t,r)}function Fr(t,r){Ir(128,t,r)}function Tr(t,r,e){var n=t[r-e],i=t[r+0],s=3*(i-n)+Rn[1020+t[r-2*e]-t[r+e]],o=In[112+(s+4>>3)];t[r-e]=On[255+n+In[112+(s+3>>3)]],t[r+0]=On[255+i-o]}function Cr(t,r,e,n){var i=t[r+0],s=t[r+e];return Bn[255+t[r-2*e]-t[r-e]]>n||Bn[255+s-i]>n}function Dr(t,r,e,n){return 4*Bn[255+t[r-e]-t[r+0]]+Bn[255+t[r-2*e]-t[r+e]]<=n}function zr(t,r,e,n,i){var s=t[r-3*e],o=t[r-2*e],a=t[r-e],u=t[r+0],f=t[r+e],c=t[r+2*e],h=t[r+3*e];return 4*Bn[255+a-u]+Bn[255+o-f]>n?0:Bn[255+t[r-4*e]-s]<=i&&Bn[255+s-o]<=i&&Bn[255+o-a]<=i&&Bn[255+h-c]<=i&&Bn[255+c-f]<=i&&Bn[255+f-u]<=i}function Ur(t,r,e,n){var i=2*n+1;for(n=0;16>n;++n)Dr(t,r+n,e,i)&&Tr(t,r+n,e)}function _r(t,r,e,n){var i=2*n+1;for(n=0;16>n;++n)Dr(t,r+n*e,1,i)&&Tr(t,r+n*e,1)}function Vr(t,r,e,n){var i;for(i=3;0<i;--i)Ur(t,r+=4*e,e,n)}function Wr(t,r,e,n){var i;for(i=3;0<i;--i)_r(t,r+=4,e,n)}function Hr(t,r,e,n,i,s,o,a){for(s=2*s+1;0<i--;){if(zr(t,r,e,s,o))if(Cr(t,r,e,a))Tr(t,r,e);else{var u=t,f=r,c=e,h=u[f-2*c],l=u[f-c],v=u[f+0],d=u[f+c],w=u[f+2*c],m=27*(p=Rn[1020+3*(v-l)+Rn[1020+h-d]])+63>>7,b=18*p+63>>7,p=9*p+63>>7;u[f-3*c]=On[255+u[f-3*c]+p],u[f-2*c]=On[255+h+b],u[f-c]=On[255+l+m],u[f+0]=On[255+v-m],u[f+c]=On[255+d-b],u[f+2*c]=On[255+w-p]}r+=n}}function Gr(t,r,e,n,i,s,o,a){for(s=2*s+1;0<i--;){if(zr(t,r,e,s,o))if(Cr(t,r,e,a))Tr(t,r,e);else{var u=t,f=r,c=e,h=u[f-c],l=u[f+0],v=u[f+c],d=In[112+(4+(w=3*(l-h))>>3)],w=In[112+(w+3>>3)],m=d+1>>1;u[f-2*c]=On[255+u[f-2*c]+m],u[f-c]=On[255+h+w],u[f+0]=On[255+l-d],u[f+c]=On[255+v-m]}r+=n}}function Jr(t,r,e,n,i,s){Hr(t,r,e,1,16,n,i,s)}function Zr(t,r,e,n,i,s){Hr(t,r,1,e,16,n,i,s)}function Kr(t,r,e,n,i,s){var o;for(o=3;0<o;--o)Gr(t,r+=4*e,e,1,16,n,i,s)}function Yr(t,r,e,n,i,s){var o;for(o=3;0<o;--o)Gr(t,r+=4,1,e,16,n,i,s)}function $r(t,r,e,n,i,s,o,a){Hr(t,r,i,1,8,s,o,a),Hr(e,n,i,1,8,s,o,a)}function Xr(t,r,e,n,i,s,o,a){Hr(t,r,1,i,8,s,o,a),Hr(e,n,1,i,8,s,o,a)}function Qr(t,r,e,n,i,s,o,a){Gr(t,r+4*i,i,1,8,s,o,a),Gr(e,n+4*i,i,1,8,s,o,a)}function te(t,r,e,n,i,s,o,a){Gr(t,r+4,1,i,8,s,o,a),Gr(e,n+4,1,i,8,s,o,a)}function re(){this.ba=new ot,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ee(){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 ne(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ie(){this.ua=0,this.Wa=new P,this.vb=new P,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new v,this.yc=new h}function se(){this.xb=this.a=0,this.l=new Gt,this.ca=new ot,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new A,this.Pb=0,this.wd=new A,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ie,this.ab=0,this.gc=o(4,ne),this.Oc=0}function oe(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ae(t,r,e,n,i,s,o){for(t=null==t?0:t[r+0],r=0;r<o;++r)i[s+r]=t+e[n+r]&255,t=i[s+r]}function ue(t,r,e,n,i,s,o){var a;if(null==t)ae(null,null,e,n,i,s,o);else for(a=0;a<o;++a)i[s+a]=t[r+a]+e[n+a]&255}function fe(t,r,e,n,i,s,o){if(null==t)ae(null,null,e,n,i,s,o);else{var a,u=t[r+0],f=u,c=u;for(a=0;a<o;++a)f=c+(u=t[r+a])-f,c=e[n+a]+(-256&f?0>f?0:255:f)&255,f=u,i[s+a]=c}}function ce(t,e,i,o){var a=e.width,u=e.o;if(r(null!=t&&null!=e),0>i||0>=o||i+o>u)return null;if(!t.Cc){if(null==t.ga){var f;if(t.ga=new oe,(f=null==t.ga)||(f=e.width*e.o,r(0==t.Gb.length),t.Gb=s(f),t.Uc=0,null==t.Gb?f=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,f=1),f=!f),!f){f=t.ga;var c=t.Fa,h=t.P,l=t.qc,v=t.mb,d=t.nb,w=h+1,m=l-1,p=f.l;if(r(null!=c&&null!=v&&null!=e),wi[0]=null,wi[1]=ae,wi[2]=ue,wi[3]=fe,f.ca=v,f.tb=d,f.c=e.width,f.i=e.height,r(0<f.c&&0<f.i),1>=l)e=0;else if(f.$a=3&c[h+0],f.Z=c[h+0]>>2&3,f.Lc=c[h+0]>>4&3,h=c[h+0]>>6&3,0>f.$a||1<f.$a||4<=f.Z||1<f.Lc||h)e=0;else if(p.put=vt,p.ac=lt,p.bc=dt,p.ma=f,p.width=e.width,p.height=e.height,p.Da=e.Da,p.v=e.v,p.va=e.va,p.j=e.j,p.o=e.o,f.$a)t:{r(1==f.$a),e=Et();r:for(;;){if(null==e){e=0;break t}if(r(null!=f),f.mc=e,e.c=f.c,e.i=f.i,e.l=f.l,e.l.ma=f,e.l.width=f.c,e.l.height=f.i,e.a=0,b(e.m,c,w,m),!Mt(f.c,f.i,1,e,null))break r;if(1==e.ab&&3==e.gc[0].hc&&yt(e.s)?(f.ic=1,c=e.c*e.i,e.Ta=null,e.Ua=0,e.V=s(c),e.Ba=0,null==e.V?(e.a=1,e=0):e=1):(f.ic=0,e=jt(e,f.c)),!e)break r;e=1;break t}f.mc=null,e=0}else e=m>=f.c*f.i;f=!e}if(f)return null;1!=t.ga.Lc?t.Ga=0:o=u-i}r(null!=t.ga),r(i+o<=u);t:{if(e=(c=t.ga).c,u=c.l.o,0==c.$a){if(w=t.rc,m=t.Vc,p=t.Fa,h=t.P+1+i*e,l=t.mb,v=t.nb+i*e,r(h<=t.P+t.qc),0!=c.Z)for(r(null!=wi[c.Z]),f=0;f<o;++f)wi[c.Z](w,m,p,h,l,v,e),w=l,m=v,v+=e,h+=e;else for(f=0;f<o;++f)n(l,v,p,h,e),w=l,m=v,v+=e,h+=e;t.rc=w,t.Vc=m}else{if(r(null!=c.mc),e=i+o,r(null!=(f=c.mc)),r(e<=f.i),f.C>=e)e=1;else if(c.ic||we(),c.ic){c=f.V,w=f.Ba,m=f.c;var N=f.i,L=(p=1,h=f.$/m,l=f.$%m,v=f.m,d=f.s,f.$),A=m*N,g=m*e,k=d.wc,x=L<g?Lt(d,l,h):null;r(L<=A),r(e<=N),r(yt(d));r:for(;;){for(;!v.h&&L<g;){if(l&k||(x=Lt(d,l,h)),r(null!=x),S(v),256>(N=pt(x.G[0],x.H[0],v)))c[w+L]=N,++L,++l>=m&&(l=0,++h<=e&&!(h%16)&&St(f,h));else{if(!(280>N)){p=0;break r}N=mt(N-256,v);var q,E=pt(x.G[4],x.H[4],v);if(S(v),!(L>=(E=bt(m,E=mt(E,v)))&&A-L>=N)){p=0;break r}for(q=0;q<N;++q)c[w+L+q]=c[w+L+q-E];for(L+=N,l+=N;l>=m;)l-=m,++h<=e&&!(h%16)&&St(f,h);L<g&&l&k&&(x=Lt(d,l,h))}r(v.h==y(v))}St(f,h>e?e:h);break r}!p||v.h&&L<A?(p=0,f.a=v.h?5:3):f.$=L,e=p}else e=xt(f,f.V,f.Ba,f.c,f.i,e,Rt);if(!e){o=0;break t}}i+o>=u&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+i*a}function he(t,r,e,n,i,s){for(;0<i--;){var o,a=t,u=r+(e?1:0),f=t,c=r+(e?0:3);for(o=0;o<n;++o){var h=f[c+4*o];255!=h&&(h*=32897,a[u+4*o+0]=a[u+4*o+0]*h>>23,a[u+4*o+1]=a[u+4*o+1]*h>>23,a[u+4*o+2]=a[u+4*o+2]*h>>23)}r+=s}}function le(t,r,e,n,i){for(;0<n--;){var s;for(s=0;s<e;++s){var o=t[r+2*s+0],a=15&(f=t[r+2*s+1]),u=4369*a,f=(240&f|f>>4)*u>>16;t[r+2*s+0]=(240&o|o>>4)*u>>16&240|(15&o|o<<4)*u>>16>>4&15,t[r+2*s+1]=240&f|a}r+=i}}function ve(t,r,e,n,i,s,o,a){var u,f,c=255;for(f=0;f<i;++f){for(u=0;u<n;++u){var h=t[r+u];s[o+4*u]=h,c&=h}r+=e,o+=a}return 255!=c}function de(t,r,e,n,i){var s;for(s=0;s<i;++s)e[n+s]=t[r+s]>>8}function we(){gn=he,yn=le,kn=ve,Sn=de}function me(e,n,i){t[e]=function(t,e,s,o,a,u,f,c,h,l,v,d,w,m,b,p,N){var L,A=N-1>>1,g=a[u+0]|f[c+0]<<16,y=h[l+0]|v[d+0]<<16;r(null!=t);var k=3*g+y+131074>>2;for(n(t[e+0],255&k,k>>16,w,m),null!=s&&(k=3*y+g+131074>>2,n(s[o+0],255&k,k>>16,b,p)),L=1;L<=A;++L){var S=a[u+L]|f[c+L]<<16,x=h[l+L]|v[d+L]<<16,q=g+S+y+x+524296,E=q+2*(S+y)>>3;k=E+g>>1,g=(q=q+2*(g+x)>>3)+S>>1,n(t[e+2*L-1],255&k,k>>16,w,m+(2*L-1)*i),n(t[e+2*L-0],255&g,g>>16,w,m+(2*L-0)*i),null!=s&&(k=q+y>>1,g=E+x>>1,n(s[o+2*L-1],255&k,k>>16,b,p+(2*L-1)*i),n(s[o+2*L+0],255&g,g>>16,b,p+(2*L+0)*i)),g=S,y=x}1&N||(k=3*g+y+131074>>2,n(t[e+N-1],255&k,k>>16,w,m+(N-1)*i),null!=s&&(k=3*y+g+131074>>2,n(s[o+N-1],255&k,k>>16,b,p+(N-1)*i)))}}function be(){mi[Pn]=bi,mi[Fn]=Ni,mi[Tn]=pi,mi[Cn]=Li,mi[Dn]=Ai,mi[zn]=gi,mi[Un]=yi,mi[_n]=Ni,mi[Vn]=Li,mi[Wn]=Ai,mi[Hn]=gi}function pe(t){return t&-16384?0>t?0:255:t>>Ei}function Ne(t,r){return pe((19077*t>>8)+(26149*r>>8)-14234)}function Le(t,r,e){return pe((19077*t>>8)-(6419*r>>8)-(13320*e>>8)+8708)}function Ae(t,r){return pe((19077*t>>8)+(33050*r>>8)-17685)}function ge(t,r,e,n,i){n[i+0]=Ne(t,e),n[i+1]=Le(t,r,e),n[i+2]=Ae(t,r)}function ye(t,r,e,n,i){n[i+0]=Ae(t,r),n[i+1]=Le(t,r,e),n[i+2]=Ne(t,e)}function ke(t,r,e,n,i){var s=Le(t,r,e);r=s<<3&224|Ae(t,r)>>3,n[i+0]=248&Ne(t,e)|s>>5,n[i+1]=r}function Se(t,r,e,n,i){var s=240&Ae(t,r)|15;n[i+0]=240&Ne(t,e)|Le(t,r,e)>>4,n[i+1]=s}function xe(t,r,e,n,i){n[i+0]=255,ge(t,r,e,n,i+1)}function qe(t,r,e,n,i){ye(t,r,e,n,i),n[i+3]=255}function Ee(t,r,e,n,i){ge(t,r,e,n,i),n[i+3]=255}function Ht(t,r){return 0>t?0:t>r?r:t}function Me(r,e,n){t[r]=function(t,r,i,s,o,a,u,f,c){for(var h=f+(-2&c)*n;f!=h;)e(t[r+0],i[s+0],o[a+0],u,f),e(t[r+1],i[s+0],o[a+0],u,f+n),r+=2,++s,++a,f+=2*n;1&c&&e(t[r+0],i[s+0],o[a+0],u,f)}}function je(t,r,e){return 0==e?0==t?0==r?6:5:0==r?4:0:e}function Re(t,r,e,n,i){switch(t>>>30){case 3:sn(r,e,n,i,0);break;case 2:on(r,e,n,i);break;case 1:un(r,e,n,i)}}function Ie(t,r){var e,s,o=r.M,a=r.Nb,u=t.oc,f=t.pc+40,c=t.oc,h=t.pc+584,l=t.oc,v=t.pc+600;for(e=0;16>e;++e)u[f+32*e-1]=129;for(e=0;8>e;++e)c[h+32*e-1]=129,l[v+32*e-1]=129;for(0<o?u[f-1-32]=c[h-1-32]=l[v-1-32]=129:(i(u,f-32-1,127,21),i(c,h-32-1,127,9),i(l,v-32-1,127,9)),s=0;s<t.za;++s){var d=r.ya[r.aa+s];if(0<s){for(e=-1;16>e;++e)n(u,f+32*e-4,u,f+32*e+12,4);for(e=-1;8>e;++e)n(c,h+32*e-4,c,h+32*e+4,4),n(l,v+32*e-4,l,v+32*e+4,4)}var w=t.Gd,m=t.Hd+s,b=d.ad,p=d.Hc;if(0<o&&(n(u,f-32,w[m].y,0,16),n(c,h-32,w[m].f,0,8),n(l,v-32,w[m].ea,0,8)),d.Za){var N=u,L=f-32+16;for(0<o&&(s>=t.za-1?i(N,L,w[m].y[15],4):n(N,L,w[m+1].y,0,4)),e=0;4>e;e++)N[L+128+e]=N[L+256+e]=N[L+384+e]=N[L+0+e];for(e=0;16>e;++e,p<<=2)N=u,L=f+Fi[e],hi[d.Ob[e]](N,L),Re(p,b,16*+e,N,L)}else if(N=je(s,o,d.Ob[0]),ci[N](u,f),0!=p)for(e=0;16>e;++e,p<<=2)Re(p,b,16*+e,u,f+Fi[e]);for(e=d.Gc,N=je(s,o,d.Dd),li[N](c,h),li[N](l,v),p=b,N=c,L=h,255&(d=0|e)&&(170&d?an(p,256,N,L):fn(p,256,N,L)),d=l,p=v,255&(e>>=8)&&(170&e?an(b,320,d,p):fn(b,320,d,p)),o<t.Ub-1&&(n(w[m].y,0,u,f+480,16),n(w[m].f,0,c,h+224,8),n(w[m].ea,0,l,v+224,8)),e=8*a*t.B,w=t.sa,m=t.ta+16*s+16*a*t.R,b=t.qa,d=t.ra+8*s+e,p=t.Ha,N=t.Ia+8*s+e,e=0;16>e;++e)n(w,m+e*t.R,u,f+32*e,16);for(e=0;8>e;++e)n(b,d+e*t.B,c,h+32*e,8),n(p,N+e*t.B,l,v+32*e,8)}}function Oe(t,n,i,s,o,a,u,f,c){var h=[0],l=[0],v=0,d=null!=c?c.kd:0,w=null!=c?c:new ee;if(null==t||12>i)return 7;w.data=t,w.w=n,w.ha=i,n=[n],i=[i],w.gb=[w.gb];t:{var m=n,p=i,N=w.gb;if(r(null!=t),r(null!=p),r(null!=N),N[0]=0,12<=p[0]&&!e(t,m[0],"RIFF")){if(e(t,m[0]+8,"WEBP")){N=3;break t}var L=I(t,m[0]+4);if(12>L||4294967286<L){N=3;break t}if(d&&L>p[0]-8){N=7;break t}N[0]=L,m[0]+=12,p[0]-=12}N=0}if(0!=N)return N;for(L=0<w.gb[0],i=i[0];;){t:{var g=t;p=n,N=i;var y=h,k=l,S=m=[0];if((E=v=[v])[0]=0,8>N[0])N=7;else{if(!e(g,p[0],"VP8X")){if(10!=I(g,p[0]+4)){N=3;break t}if(18>N[0]){N=7;break t}var x=I(g,p[0]+8),q=1+R(g,p[0]+12);if(2147483648<=q*(g=1+R(g,p[0]+15))){N=3;break t}null!=S&&(S[0]=x),null!=y&&(y[0]=q),null!=k&&(k[0]=g),p[0]+=18,N[0]-=18,E[0]=1}N=0}}if(v=v[0],m=m[0],0!=N)return N;if(p=!!(2&m),!L&&v)return 3;if(null!=a&&(a[0]=!!(16&m)),null!=u&&(u[0]=p),null!=f&&(f[0]=0),u=h[0],m=l[0],v&&p&&null==c){N=0;break}if(4>i){N=7;break}if(L&&v||!L&&!v&&!e(t,n[0],"ALPH")){i=[i],w.na=[w.na],w.P=[w.P],w.Sa=[w.Sa];t:{x=t,N=n,L=i;var E=w.gb;y=w.na,k=w.P,S=w.Sa,q=22,r(null!=x),r(null!=L),g=N[0];var M=L[0];for(r(null!=y),r(null!=S),y[0]=null,k[0]=null,S[0]=0;;){if(N[0]=g,L[0]=M,8>M){N=7;break t}var j=I(x,g+4);if(4294967286<j){N=3;break t}var O=8+j+1&-2;if(q+=O,0<E&&q>E){N=3;break t}if(!e(x,g,"VP8 ")||!e(x,g,"VP8L")){N=0;break t}if(M[0]<O){N=7;break t}e(x,g,"ALPH")||(y[0]=x,k[0]=g+8,S[0]=j),g+=O,M-=O}}if(i=i[0],w.na=w.na[0],w.P=w.P[0],w.Sa=w.Sa[0],0!=N)break}i=[i],w.Ja=[w.Ja],w.xa=[w.xa];t:if(E=t,N=n,L=i,y=w.gb[0],k=w.Ja,S=w.xa,x=N[0],g=!e(E,x,"VP8 "),q=!e(E,x,"VP8L"),r(null!=E),r(null!=L),r(null!=k),r(null!=S),8>L[0])N=7;else{if(g||q){if(E=I(E,x+4),12<=y&&E>y-12){N=3;break t}if(d&&E>L[0]-8){N=7;break t}k[0]=E,N[0]+=8,L[0]-=8,S[0]=q}else S[0]=5<=L[0]&&47==E[x+0]&&!(E[x+4]>>5),k[0]=L[0];N=0}if(i=i[0],w.Ja=w.Ja[0],w.xa=w.xa[0],n=n[0],0!=N)break;if(4294967286<w.Ja)return 3;if(null==f||p||(f[0]=w.xa?2:1),u=[u],m=[m],w.xa){if(5>i){N=7;break}f=u,d=m,p=a,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(L=[0],E=[0],y=[0],b(k=new A,t,n,i),wt(k,L,E,y)?(null!=f&&(f[0]=L[0]),null!=d&&(d[0]=E[0]),null!=p&&(p[0]=y[0]),t=1):t=0):t=0}else{if(10>i){N=7;break}f=m,null==t||10>i||!Kt(t,n+3,i-3)?t=0:(d=t[n+0]|t[n+1]<<8|t[n+2]<<16,p=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&d||3<(d>>1&7)||!(d>>4&1)||d>>5>=w.Ja||!p||!t?t=0:(u&&(u[0]=p),f&&(f[0]=t),t=1))}if(!t)return 3;if(u=u[0],m=m[0],v&&(h[0]!=u||l[0]!=m))return 3;null!=c&&(c[0]=w,c.offset=n-c.w,r(4294967286>n-c.w),r(c.offset==c.ha-i));break}return 0==N||7==N&&v&&null==c?(null!=a&&(a[0]|=null!=w.na&&0<w.na.length),null!=s&&(s[0]=u),null!=o&&(o[0]=m),0):N}function Be(t,r,e){var n=r.width,i=r.height,s=0,o=0,a=n,u=i;if(r.Da=null!=t&&0<t.Da,r.Da&&(a=t.cd,u=t.bd,s=t.v,o=t.j,11>e||(s&=-2,o&=-2),0>s||0>o||0>=a||0>=u||s+a>n||o+u>i))return 0;if(r.v=s,r.j=o,r.va=s+a,r.o=o+u,r.U=a,r.T=u,r.da=null!=t&&0<t.da,r.da){if(!F(a,u,e=[t.ib],s=[t.hb]))return 0;r.ib=e[0],r.hb=s[0]}return r.ob=null!=t&&t.ob,r.Kb=null==t||!t.Sd,r.da&&(r.ob=r.ib<3*n/4&&r.hb<3*i/4,r.Kb=0),1}function Pe(t){if(null==t)return 2;if(11>t.S){var r=t.f.RGBA;r.fb+=(t.height-1)*r.A,r.A=-r.A}else r=t.f.kb,t=t.height,r.O+=(t-1)*r.fa,r.fa=-r.fa,r.N+=(t-1>>1)*r.Ab,r.Ab=-r.Ab,r.W+=(t-1>>1)*r.Db,r.Db=-r.Db,null!=r.F&&(r.J+=(t-1)*r.lb,r.lb=-r.lb);return 0}function Fe(t,r,e,n){if(null==n||0>=t||0>=r)return 2;if(null!=e){if(e.Da){var i=e.cd,o=e.bd,a=-2&e.v,u=-2&e.j;if(0>a||0>u||0>=i||0>=o||a+i>t||u+o>r)return 2;t=i,r=o}if(e.da){if(!F(t,r,i=[e.ib],o=[e.hb]))return 2;t=i[0],r=o[0]}}n.width=t,n.height=r;t:{var f=n.width,c=n.height;if(t=n.S,0>=f||0>=c||!(t>=Pn&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){a=o=i=r=0;var h=(u=f*zi[t])*c;if(11>t||(o=(c+1)/2*(r=(f+1)/2),12==t&&(a=(i=f)*c)),null==(c=s(h+2*o+a))){t=1;break t}n.sd=c,11>t?((f=n.f.RGBA).eb=c,f.fb=0,f.A=u,f.size=h):((f=n.f.kb).y=c,f.O=0,f.fa=u,f.Fd=h,f.f=c,f.N=0+h,f.Ab=r,f.Cd=o,f.ea=c,f.W=0+h+o,f.Db=r,f.Ed=o,12==t&&(f.F=c,f.J=0+h+2*o),f.Tc=a,f.lb=i)}if(r=1,i=n.S,o=n.width,a=n.height,i>=Pn&&13>i)if(11>i)t=n.f.RGBA,r&=(u=Math.abs(t.A))*(a-1)+o<=t.size,r&=u>=o*zi[i],r&=null!=t.eb;else{t=n.f.kb,u=(o+1)/2,h=(a+1)/2,f=Math.abs(t.fa),c=Math.abs(t.Ab);var l=Math.abs(t.Db),v=Math.abs(t.lb),d=v*(a-1)+o;r&=f*(a-1)+o<=t.Fd,r&=c*(h-1)+u<=t.Cd,r=(r&=l*(h-1)+u<=t.Ed)&f>=o&c>=u&l>=u,r&=null!=t.y,r&=null!=t.f,r&=null!=t.ea,12==i&&(r&=v>=o,r&=d<=t.Tc,r&=null!=t.F)}else r=0;t=r?0:2}}return 0!=t||null!=e&&e.fd&&(t=Pe(n)),t}var Te=64,Ce=[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],De=24,ze=32,Ue=8,_e=[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];D("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,r,e){return r[e+0]},t.Predictor3=function(t,r,e){return r[e+1]},t.Predictor4=function(t,r,e){return r[e-1]},t.Predictor5=function(t,r,e){return U(U(t,r[e+1]),r[e+0])},t.Predictor6=function(t,r,e){return U(t,r[e-1])},t.Predictor7=function(t,r,e){return U(t,r[e+0])},t.Predictor8=function(t,r,e){return U(r[e-1],r[e+0])},t.Predictor9=function(t,r,e){return U(r[e+0],r[e+1])},t.Predictor10=function(t,r,e){return U(U(t,r[e-1]),U(r[e+0],r[e+1]))},t.Predictor11=function(t,r,e){var n=r[e+0];return 0>=W(n>>24&255,t>>24&255,(r=r[e-1])>>24&255)+W(n>>16&255,t>>16&255,r>>16&255)+W(n>>8&255,t>>8&255,r>>8&255)+W(255&n,255&t,255&r)?n:t},t.Predictor12=function(t,r,e){var n=r[e+0];return(_((t>>24&255)+(n>>24&255)-((r=r[e-1])>>24&255))<<24|_((t>>16&255)+(n>>16&255)-(r>>16&255))<<16|_((t>>8&255)+(n>>8&255)-(r>>8&255))<<8|_((255&t)+(255&n)-(255&r)))>>>0},t.Predictor13=function(t,r,e){var n=r[e-1];return(V((t=U(t,r[e+0]))>>24&255,n>>24&255)<<24|V(t>>16&255,n>>16&255)<<16|V(t>>8&255,n>>8&255)<<8|V(255&t,255&n))>>>0};var Ve=t.PredictorAdd0;t.PredictorAdd1=H,D("Predictor2","PredictorAdd2"),D("Predictor3","PredictorAdd3"),D("Predictor4","PredictorAdd4"),D("Predictor5","PredictorAdd5"),D("Predictor6","PredictorAdd6"),D("Predictor7","PredictorAdd7"),D("Predictor8","PredictorAdd8"),D("Predictor9","PredictorAdd9"),D("Predictor10","PredictorAdd10"),D("Predictor11","PredictorAdd11"),D("Predictor12","PredictorAdd12"),D("Predictor13","PredictorAdd13");var We=t.PredictorAdd2;K("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),K("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var He,Ge=t.ColorIndexInverseTransform,Je=t.MapARGB,Ze=t.VP8LColorIndexInverseTransformAlpha,Ke=t.MapAlpha,Ye=t.VP8LPredictorsAdd=[];Ye.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var $e,Xe,Qe,tn,rn,en,nn,sn,on,an,un,fn,cn,hn,ln,vn,dn,wn,mn,bn,pn,Nn,Ln,An,gn,yn,kn,Sn,xn=s(511),qn=s(2041),En=s(225),Mn=s(767),jn=0,Rn=qn,In=En,On=Mn,Bn=xn,Pn=0,Fn=1,Tn=2,Cn=3,Dn=4,zn=5,Un=6,_n=7,Vn=8,Wn=9,Hn=10,Gn=[2,3,7],Jn=[3,3,11],Zn=[280,256,256,256,40],Kn=[0,1,1,1,0],Yn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],$n=[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],Xn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qn=8,ti=[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],ri=[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],ei=null,ni=[[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]],ii=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],si=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],oi=[[[[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]]]],ai=[[[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]]],ui=[[[[255,255,255,255,255,255,255,255,255,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]]]],fi=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ci=[],hi=[],li=[],vi=1,di=2,wi=[],mi=[];me("UpsampleRgbLinePair",ge,3),me("UpsampleBgrLinePair",ye,3),me("UpsampleRgbaLinePair",Ee,4),me("UpsampleBgraLinePair",qe,4),me("UpsampleArgbLinePair",xe,4),me("UpsampleRgba4444LinePair",Se,2),me("UpsampleRgb565LinePair",ke,2);var bi=t.UpsampleRgbLinePair,pi=t.UpsampleBgrLinePair,Ni=t.UpsampleRgbaLinePair,Li=t.UpsampleBgraLinePair,Ai=t.UpsampleArgbLinePair,gi=t.UpsampleRgba4444LinePair,yi=t.UpsampleRgb565LinePair,ki=16,Si=1<<ki-1,xi=-227,qi=482,Ei=6,Mi=0,ji=s(256),Ri=s(256),Ii=s(256),Oi=s(256),Bi=s(qi-xi),Pi=s(qi-xi);Me("YuvToRgbRow",ge,3),Me("YuvToBgrRow",ye,3),Me("YuvToRgbaRow",Ee,4),Me("YuvToBgraRow",qe,4),Me("YuvToArgbRow",xe,4),Me("YuvToRgba4444Row",Se,2),Me("YuvToRgb565Row",ke,2);var Fi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ti=[0,2,8],Ci=[8,7,6,4,4,2,2,2,1,1,1,1],Di=1;this.WebPDecodeRGBA=function(t,e,a,u,f){var c=Fn,h=new re,l=new ot;h.ba=l,l.S=c,l.width=[l.width],l.height=[l.height];var v=l.width,d=l.height,w=new at;if(null==w||null==t)var m=2;else r(null!=w),m=Oe(t,e,a,w.width,w.height,w.Pd,w.Qd,w.format,null);if(0!=m?v=0:(null!=v&&(v[0]=w.width[0]),null!=d&&(d[0]=w.height[0]),v=1),v){l.width=l.width[0],l.height=l.height[0],null!=u&&(u[0]=l.width),null!=f&&(f[0]=l.height);t:{if(u=new Gt,(f=new ee).data=t,f.w=e,f.ha=a,f.kd=1,e=[0],r(null!=f),(0==(t=Oe(f.data,f.w,f.ha,null,null,null,e,null,f))||7==t)&&e[0]&&(t=4),0==(e=t)){if(r(null!=h),u.data=f.data,u.w=f.w+f.offset,u.ha=f.ha-f.offset,u.put=vt,u.ac=lt,u.bc=dt,u.ma=h,f.xa){if(null==(t=Et())){h=1;break t}if(function(t,e){var n=[0],i=[0],s=[0];r:for(;;){if(null==t)return 0;if(null==e)return t.a=2,0;if(t.l=e,t.a=0,b(t.m,e.data,e.w,e.ha),!wt(t.m,n,i,s)){t.a=3;break r}if(t.xb=di,e.width=n[0],e.height=i[0],!Mt(n[0],i[0],1,t,null))break r;return 1}return r(0!=t.a),0}(t,u)){if(u=0==(e=Fe(u.width,u.height,h.Oa,h.ba))){r:{u=t;e:for(;;){if(null==u){u=0;break r}if(r(null!=u.s.yc),r(null!=u.s.Ya),r(0<u.s.Wb),r(null!=(a=u.l)),r(null!=(f=a.ma)),0!=u.xb){if(u.ca=f.ba,u.tb=f.tb,r(null!=u.ca),!Be(f.Oa,a,Cn)){u.a=2;break e}if(!jt(u,a.width))break e;if(a.da)break e;if((a.da||nt(u.ca.S))&&we(),11>u.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=u.ca.f.kb.F&&we()),u.Pb&&0<u.s.ua&&null==u.s.vb.X&&!O(u.s.vb,u.s.Wa.Xa)){u.a=1;break e}u.xb=0}if(!xt(u,u.V,u.Ba,u.c,u.i,a.o,gt))break e;f.Dc=u.Ma,u=1;break r}r(0!=u.a),u=0}u=!u}u&&(e=t.a)}else e=t.a}else{if(null==(t=new Jt)){h=1;break t}if(t.Fa=f.na,t.P=f.P,t.qc=f.Sa,Yt(t,u)){if(0==(e=Fe(u.width,u.height,h.Oa,h.ba))){if(t.Aa=0,a=h.Oa,r(null!=(f=t)),null!=a){if(0<(v=0>(v=a.Md)?0:100<v?255:255*v/100)){for(d=w=0;4>d;++d)12>(m=f.pb[d]).lc&&(m.ia=v*Ci[0>m.lc?0:m.lc]>>3),w|=m.ia;w&&(alert("todo:VP8InitRandom"),f.ia=1)}f.Ga=a.Id,100<f.Ga?f.Ga=100:0>f.Ga&&(f.Ga=0)}(function(t,e){if(null==t)return 0;if(null==e)return Zt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Yt(t,e))return 0;if(r(t.cb),null==e.ac||e.ac(e)){e.ob&&(t.L=0);var a=Ti[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=e.v-a>>4,t.zb=e.j-a>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=e.o+15+a>>4,t.Hb=e.va+15+a>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var u=t.ed;for(a=0;4>a;++a){var f;if(t.Qa.Cb){var c=t.Qa.Lb[a];t.Qa.Fb||(c+=u.Tb)}else c=u.Tb;for(f=0;1>=f;++f){var h=t.gd[a][f],l=c;if(u.Pc&&(l+=u.vd[0],f&&(l+=u.od[0])),0<(l=0>l?0:63<l?63:l)){var v=l;0<u.wb&&(v=4<u.wb?v>>2:v>>1)>9-u.wb&&(v=9-u.wb),1>v&&(v=1),h.dd=v,h.tc=2*l+v,h.ld=40<=l?2:15<=l?1:0}else h.tc=0;h.La=f}}}a=0}else Zt(t,6,"Frame setup failed"),a=t.a;if(a=0==a){if(a){t.$c=0,0<t.Aa||(t.Ic=Di);r:{a=t.Ic,u=4*(v=t.za);var d=32*v,w=v+1,m=0<t.L?v*(0<t.Aa?2:1):0,b=(2==t.Aa?2:1)*v;if((h=u+832+(f=3*(16*a+Ti[t.L])/2*d)+(c=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=h)a=0;else{if(h>t.Vb){if(t.Vb=0,t.Ec=s(h),t.Fc=0,null==t.Ec){a=Zt(t,1,"no memory during frame initialization.");break r}t.Vb=h}h=t.Ec,l=t.Fc,t.Ac=h,t.Bc=l,l+=u,t.Gd=o(d,Vt),t.Hd=0,t.rb=o(w+1,Dt),t.sb=1,t.wa=m?o(m,Ct):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=v),r(true),t.oc=h,t.pc=l,l+=832,t.ya=o(b,Ut),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=v),t.R=16*v,t.B=8*v,v=(d=Ti[t.L])*t.R,d=d/2*t.B,t.sa=h,t.ta=l+v,t.qa=t.sa,t.ra=t.ta+16*a*t.R+d,t.Ha=t.qa,t.Ia=t.ra+8*a*t.B+d,t.$c=0,l+=f,t.mb=c?h:null,t.nb=c?l:null,r(l+c<=t.Fc+t.Vb),Xt(t),i(t.Ac,t.Bc,0,u),a=1}}if(a){if(e.ka=0,e.y=t.sa,e.O=t.ta,e.f=t.qa,e.N=t.ra,e.ea=t.Ha,e.Vd=t.Ia,e.fa=t.R,e.Rc=t.B,e.F=null,e.J=0,!jn){for(a=-255;255>=a;++a)xn[255+a]=0>a?-a:a;for(a=-1020;1020>=a;++a)qn[1020+a]=-128>a?-128:127<a?127:a;for(a=-112;112>=a;++a)En[112+a]=-16>a?-16:15<a?15:a;for(a=-255;510>=a;++a)Mn[255+a]=0>a?0:255<a?255:a;jn=1}nn=ur,sn=ir,an=sr,un=or,fn=ar,on=nr,cn=Jr,hn=Zr,ln=$r,vn=Xr,dn=Kr,wn=Yr,mn=Qr,bn=te,pn=Ur,Nn=_r,Ln=Vr,An=Wr,hi[0]=yr,hi[1]=cr,hi[2]=Ar,hi[3]=gr,hi[4]=kr,hi[5]=xr,hi[6]=Sr,hi[7]=qr,hi[8]=Mr,hi[9]=Er,ci[0]=mr,ci[1]=lr,ci[2]=vr,ci[3]=dr,ci[4]=br,ci[5]=pr,ci[6]=Nr,li[0]=Or,li[1]=hr,li[2]=jr,li[3]=Rr,li[4]=Pr,li[5]=Br,li[6]=Fr,a=1}else a=0}a&&(a=function(t,e){for(t.M=0;t.M<t.Va;++t.M){var o,a=t.Jc[t.M&t.Xb],u=t.m,f=t;for(o=0;o<f.za;++o){var c=u,h=f,l=h.Ac,v=h.Bc+4*o,d=h.zc,w=h.ya[h.aa+o];if(h.Qa.Bb?w.$b=E(c,h.Pa.jb[0])?2+E(c,h.Pa.jb[2]):E(c,h.Pa.jb[1]):w.$b=0,h.kc&&(w.Ad=E(c,h.Bd)),w.Za=!E(c,145)+0,w.Za){var m=w.Ob,b=0;for(h=0;4>h;++h){var p,N=d[0+h];for(p=0;4>p;++p){N=ai[l[v+p]][N];for(var L=si[E(c,N[0])];0<L;)L=si[2*L+E(c,N[L])];N=-L,l[v+p]=N}n(m,b,l,v,4),b+=4,d[0+h]=N}}else N=E(c,156)?E(c,128)?1:3:E(c,163)?2:0,w.Ob[0]=N,i(l,v,N,4),i(d,0,N,4);w.Dd=E(c,142)?E(c,114)?E(c,183)?1:3:2:0}if(f.m.Ka)return Zt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(f=a,c=(u=t).rb[u.sb-1],l=u.rb[u.sb+u.ja],o=u.ya[u.aa+u.ja],v=u.kc?o.Ad:0)c.la=l.la=0,o.Za||(c.Na=l.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var A,g;if(c=l,l=f,v=u.Pa.Xc,d=u.ya[u.aa+u.ja],w=u.pb[d.$b],h=d.ad,m=0,b=u.rb[u.sb-1],N=p=0,i(h,m,0,384),d.Za)var y=0,k=v[3];else{L=s(16);var S=c.Na+b.Na;if(S=ei(l,v[1],S,w.Eb,0,L,0),c.Na=b.Na=(0<S)+0,1<S)nn(L,0,h,m);else{var x=L[0]+3>>3;for(L=0;256>L;L+=16)h[m+L]=x}y=1,k=v[0]}var q=15&c.la,M=15&b.la;for(L=0;4>L;++L){var j=1&M;for(x=g=0;4>x;++x)q=q>>1|(j=(S=ei(l,k,S=j+(1&q),w.Sc,y,h,m))>y)<<7,g=g<<2|(3<S?3:1<S?2:0!=h[m+0]),m+=16;q>>=4,M=M>>1|j<<7,p=(p<<8|g)>>>0}for(k=q,y=M>>4,A=0;4>A;A+=2){for(g=0,q=c.la>>4+A,M=b.la>>4+A,L=0;2>L;++L){for(j=1&M,x=0;2>x;++x)S=j+(1&q),q=q>>1|(j=0<(S=ei(l,v[2],S,w.Qc,0,h,m)))<<3,g=g<<2|(3<S?3:1<S?2:0!=h[m+0]),m+=16;q>>=2,M=M>>1|j<<5}N|=g<<4*A,k|=q<<4<<A,y|=(240&M)<<A}c.la=k,b.la=y,d.Hc=p,d.Gc=N,d.ia=43690&N?0:w.ia,v=!(p|N)}if(0<u.L&&(u.wa[u.Y+u.ja]=u.gd[o.$b][o.Za],u.wa[u.Y+u.ja].La|=!v),f.Ka)return Zt(t,7,"Premature end-of-file encountered.")}if(Xt(t),u=e,f=1,o=(a=t).D,c=0<a.L&&a.M>=a.zb&&a.M<=a.Va,0==a.Aa)r:{if(o.M=a.M,o.uc=c,Ie(a,o),f=1,o=(g=a.D).Nb,c=(N=Ti[a.L])*a.R,l=N/2*a.B,L=16*o*a.R,x=8*o*a.B,v=a.sa,d=a.ta-c+L,w=a.qa,h=a.ra-l+x,m=a.Ha,b=a.Ia-l+x,M=0==(q=g.M),p=q>=a.Va-1,2==a.Aa&&Ie(a,g),g.uc)for(j=(S=a).D.M,r(S.D.uc),g=S.yb;g<S.Hb;++g){y=g,k=j;var R=(I=(U=S).D).Nb;A=U.R;var I=I.wa[I.Y+y],O=U.sa,B=U.ta+16*R*A+16*y,P=I.dd,F=I.tc;if(0!=F)if(r(3<=F),1==U.L)0<y&&Nn(O,B,A,F+4),I.La&&An(O,B,A,F),0<k&&pn(O,B,A,F+4),I.La&&Ln(O,B,A,F);else{var T=U.B,C=U.qa,D=U.ra+8*R*T+8*y,z=U.Ha,U=U.Ia+8*R*T+8*y;R=I.ld,0<y&&(hn(O,B,A,F+4,P,R),vn(C,D,z,U,T,F+4,P,R)),I.La&&(wn(O,B,A,F,P,R),bn(C,D,z,U,T,F,P,R)),0<k&&(cn(O,B,A,F+4,P,R),ln(C,D,z,U,T,F+4,P,R)),I.La&&(dn(O,B,A,F,P,R),mn(C,D,z,U,T,F,P,R))}}if(a.ia&&alert("todo:DitherRow"),null!=u.put){if(g=16*q,q=16*(q+1),M?(u.y=a.sa,u.O=a.ta+L,u.f=a.qa,u.N=a.ra+x,u.ea=a.Ha,u.W=a.Ia+x):(g-=N,u.y=v,u.O=d,u.f=w,u.N=h,u.ea=m,u.W=b),p||(q-=N),q>u.o&&(q=u.o),u.F=null,u.J=null,null!=a.Fa&&0<a.Fa.length&&g<q&&(u.J=ce(a,u,g,q-g),u.F=a.mb,null==u.F&&0==u.F.length)){f=Zt(a,3,"Could not decode alpha data.");break r}g<u.j&&(N=u.j-g,g=u.j,r(!(1&N)),u.O+=a.R*N,u.N+=a.B*(N>>1),u.W+=a.B*(N>>1),null!=u.F&&(u.J+=u.width*N)),g<q&&(u.O+=u.v,u.N+=u.v>>1,u.W+=u.v>>1,null!=u.F&&(u.J+=u.v),u.ka=g-u.j,u.U=u.va-u.v,u.T=q-g,f=u.put(u))}o+1!=a.Ic||p||(n(a.sa,a.ta-c,v,d+16*a.R,c),n(a.qa,a.ra-l,w,h+8*a.B,l),n(a.Ha,a.Ia-l,m,b+8*a.B,l))}if(!f)return Zt(t,6,"Output aborted.")}return 1}(t,e)),null!=e.bc&&e.bc(e),a&=1}return a?(t.cb=0,a):0})(t,u)||(e=t.a)}}else e=t.a}0==e&&null!=h.Oa&&h.Oa.fd&&(e=Pe(h.ba))}h=e}c=0!=h?null:11>c?l.f.RGBA.eb:l.f.kb.y}else c=null;return c};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function f(t,r){for(var e="",n=0;n<4;n++)e+=String.fromCharCode(t[r++]);return e}function c(t,r){return t[r+0]|t[r+1]<<8}function h(t,r){return(t[r+0]|t[r+1]<<8|t[r+2]<<16)>>>0}function l(t,r){return(t[r+0]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}new u;var v=[0],d=[0],w=[],m=new u,b=t,p=function(t,r){var e={},n=0,i=false,s=0,o=0;if(e.frames=[],!
174
+ */}function Fs(t,r){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!r,this.bottom_up=true,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Ts(t){function r(t){if(!t)throw Error("assert :P")}function e(t,r,e){for(var n=0;4>n;n++)if(t[r+n]!=e.charCodeAt(n))return true;return false}function n(t,r,e,n,i){for(var s=0;s<i;s++)t[r+s]=e[n+s]}function i(t,r,e,n){for(var i=0;i<n;i++)t[r+i]=e}function s(t){return new Int32Array(t)}function o(t,r){for(var e=[],n=0;n<t;n++)e.push(new r);return e}function a(t,r){var e=[];return function t(e,n,i){for(var s=i[n],o=0;o<s&&(e.push(i.length>n+1?[]:new r),!(i.length<n+1));o++)t(e[o],n+1,i)}(e,0,t),e}var u=function(){var t=this;function u(t,r){for(var e=1<<r-1>>>0;t&e;)e>>>=1;return e?(t&e-1)+e:t}function f(t,e,n,i,s){r(!(i%n));do{t[e+(i-=n)]=s}while(0<i)}function c(t,e,n,i,o){if(r(2328>=o),512>=o)var a=s(512);else if(null==(a=s(o)))return 0;return function(t,e,n,i,o,a){var c,l,v=e,d=1<<n,w=s(16),m=s(16);for(r(0!=o),r(null!=i),r(null!=t),r(0<n),l=0;l<o;++l){if(15<i[l])return 0;++w[i[l]]}if(w[0]==o)return 0;for(m[1]=0,c=1;15>c;++c){if(w[c]>1<<c)return 0;m[c+1]=m[c]+w[c]}for(l=0;l<o;++l)c=i[l],0<i[l]&&(a[m[c]++]=l);if(1==m[15])return(i=new h).g=0,i.value=a[0],f(t,v,1,d,i),d;var b,p=-1,N=d-1,L=0,A=1,g=1,y=1<<n;for(l=0,c=1,o=2;c<=n;++c,o<<=1){if(A+=g<<=1,0>(g-=w[c]))return 0;for(;0<w[c];--w[c])(i=new h).g=c,i.value=a[l++],f(t,v+L,o,y,i),L=u(L,c)}for(c=n+1,o=2;15>=c;++c,o<<=1){if(A+=g<<=1,0>(g-=w[c]))return 0;for(;0<w[c];--w[c]){if(i=new h,(L&N)!=p){for(v+=y,b=1<<(p=c)-n;15>p&&!(0>=(b-=w[p]));)++p,b<<=1;d+=y=1<<(b=p-n),t[e+(p=L&N)].g=b+n,t[e+p].value=v-e-p}i.g=c-n,i.value=a[l++],f(t,v+(L>>n),o,y,i),L=u(L,c)}}return A!=2*m[15]-1?0:d}(t,e,n,i,o,a)}function h(){this.value=this.g=0}function l(){this.value=this.g=0}function v(){this.G=o(5,h),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Te,l)}function d(t,e,n,i){r(null!=t),r(null!=e),r(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=e,t.pa=n,t.Jd=e,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,x(t)}function w(t,r){for(var e=0;0<r--;)e|=E(t,128)<<r;return e}function m(t,r){var e=w(t,r);return q(t)?-e:e}function b(t,e,n,i){var s,o=0;for(r(null!=t),r(null!=e),r(4294967288>i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4<i&&(i=4),s=0;s<i;++s)o+=e[n+s]<<8*s;t.Ra=o,t.bb=i,t.oa=e,t.pa=n}function p(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<ze-8>>>0,++t.bb,t.u-=8;y(t)&&(t.h=1,t.u=0)}function N(t,e){if(r(0<=e),!t.h&&e<=De){var n=g(t)&Ce[e];return t.u+=e,p(t),n}return t.h=1,t.u=0}function L(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function A(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function g(t){return t.Ra>>>(t.u&ze-1)>>>0}function y(t){return r(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>ze}function k(t,r){t.u=r,t.h=y(t)}function S(t){t.u>=Ue&&(r(t.u>=Ue),p(t))}function x(t){r(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(r(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function q(t){return w(t,1)}function E(t,r){var e=t.Ca;0>t.b&&x(t);var n=t.b,i=e*r>>>8,s=(t.I>>>n>i)+0;for(s?(e-=i,t.I-=i+1<<n>>>0):e=i+1,n=e,i=0;256<=n;)i+=8,n>>=8;return n=7^i+_e[n],t.b-=n,t.Ca=(e<<n)-1,s}function M(t,r,e){t[r+0]=e>>24&255,t[r+1]=e>>16&255,t[r+2]=e>>8&255,t[r+3]=255&e}function j(t,r){return t[r+0]|t[r+1]<<8}function R(t,r){return j(t,r)|t[r+2]<<16}function I(t,r){return j(t,r)|j(t,r+2)<<16}function O(t,e){var n=1<<e;return r(null!=t),r(0<e),t.X=s(n),null==t.X?0:(t.Mb=32-e,t.Xa=e,1)}function B(t,e){r(null!=t),r(null!=e),r(t.Xa==e.Xa),n(e.X,0,t.X,0,1<<e.Xa)}function P(){this.X=[],this.Xa=this.Mb=0}function F(t,e,n,i){r(null!=n),r(null!=i);var s=n[0],o=i[0];return 0==s&&(s=(t*o+e/2)/e),0==o&&(o=(e*s+t/2)/t),0>=s||0>=o?0:(n[0]=s,i[0]=o,1)}function T(t,r){return t+(1<<r)-1>>>r}function C(t,r){return((4278255360&t)+(4278255360&r)>>>0&4278255360)+((16711935&t)+(16711935&r)>>>0&16711935)>>>0}function D(r,e){t[e]=function(e,n,i,s,o,a,u){var f;for(f=0;f<o;++f){var c=t[r](a[u+f-1],i,s+f);a[u+f]=C(e[n+f],c)}}}function z(){this.ud=this.hd=this.jd=0}function U(t,r){return((4278124286&(t^r))>>>1)+(t&r)>>>0}function _(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function V(t,r){return _(t+(t-r+.5>>1))}function W(t,r,e){return Math.abs(r-e)-Math.abs(t-e)}function H(t,r,e,n,i,s,o){for(n=s[o-1],e=0;e<i;++e)s[o+e]=n=C(t[r+e],n)}function G(t,r,e,n,i){var s;for(s=0;s<e;++s){var o=t[r+s],a=o>>8&255,u=16711935&(u=(u=16711935&o)+((a<<16)+a));n[i+s]=(4278255360&o)+u>>>0}}function Z(t,r){r.jd=255&t,r.hd=t>>8&255,r.ud=t>>16&255}function J(t,r,e,n,i,s){var o;for(o=0;o<n;++o){var a=r[e+o],u=a>>>8,f=a,c=255&(c=(c=a>>>16)+((t.jd<<24>>24)*(u<<24>>24)>>>5));f=255&(f=(f+=(t.hd<<24>>24)*(u<<24>>24)>>>5)+((t.ud<<24>>24)*(c<<24>>24)>>>5)),i[s+o]=(4278255360&a)+(c<<16)+f}}function K(r,e,n,i,s){t[e]=function(t,r,e,n,o,a,u,f,c){for(n=u;n<f;++n)for(u=0;u<c;++u)o[a++]=s(e[i(t[r++])])},t[r]=function(r,e,o,a,u,f,c){var h=8>>r.b,l=r.Ea,v=r.K[0],d=r.w;if(8>h)for(r=(1<<r.b)-1,d=(1<<h)-1;e<o;++e){var w,m=0;for(w=0;w<l;++w)w&r||(m=i(a[u++])),f[c++]=s(v[m&d]),m>>=h}else t["VP8LMapColor"+n](a,u,v,d,f,c,e,o,l)}}function Y(t,r,e,n,i){for(e=r+e;r<e;){var s=t[r++];n[i++]=s>>16&255,n[i++]=s>>8&255,n[i++]=255&s}}function $(t,r,e,n,i){for(e=r+e;r<e;){var s=t[r++];n[i++]=s>>16&255,n[i++]=s>>8&255,n[i++]=255&s,n[i++]=s>>24&255}}function X(t,r,e,n,i){for(e=r+e;r<e;){var s=(o=t[r++])>>16&240|o>>12&15,o=240&o|o>>28&15;n[i++]=s,n[i++]=o}}function Q(t,r,e,n,i){for(e=r+e;r<e;){var s=(o=t[r++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[i++]=s,n[i++]=o}}function tt(t,r,e,n,i){for(e=r+e;r<e;){var s=t[r++];n[i++]=255&s,n[i++]=s>>8&255,n[i++]=s>>16&255}}function rt(t,r,e,i,s,o){if(0==o)for(e=r+e;r<e;)M(i,((o=t[r++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),s+=32;else n(i,s,t,r,e)}function et(r,e){t[e][0]=t[r+"0"],t[e][1]=t[r+"1"],t[e][2]=t[r+"2"],t[e][3]=t[r+"3"],t[e][4]=t[r+"4"],t[e][5]=t[r+"5"],t[e][6]=t[r+"6"],t[e][7]=t[r+"7"],t[e][8]=t[r+"8"],t[e][9]=t[r+"9"],t[e][10]=t[r+"10"],t[e][11]=t[r+"11"],t[e][12]=t[r+"12"],t[e][13]=t[r+"13"],t[e][14]=t[r+"0"],t[e][15]=t[r+"0"]}function nt(t){return t==_n||t==Vn||t==Wn||t==Hn}function it(){this.eb=[],this.size=this.A=this.fb=0}function st(){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 ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new st,this.sd=null}function at(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ut(){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 ft(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ct(t,r){var e=t.T,i=r.ba.f.RGBA,s=i.eb,o=i.fb+t.ka*i.A,a=mi[r.ba.S],u=t.y,f=t.O,c=t.f,h=t.N,l=t.ea,v=t.W,d=r.cc,w=r.dc,m=r.Mc,b=r.Nc,p=t.ka,N=t.ka+t.T,L=t.U,A=L+1>>1;for(0==p?a(u,f,null,null,c,h,l,v,c,h,l,v,s,o,null,null,L):(a(r.ec,r.fc,u,f,d,w,m,b,c,h,l,v,s,o-i.A,s,o,L),++e);p+2<N;p+=2)d=c,w=h,m=l,b=v,h+=t.Rc,v+=t.Rc,o+=2*i.A,a(u,(f+=2*t.fa)-t.fa,u,f,d,w,m,b,c,h,l,v,s,o-i.A,s,o,L);return f+=t.fa,t.j+N<t.o?(n(r.ec,r.fc,u,f,L),n(r.cc,r.dc,c,h,A),n(r.Mc,r.Nc,l,v,A),e--):1&N||a(u,f,null,null,c,h,l,v,c,h,l,v,s,o+i.A,null,null,L),e}function ht(t,e,n){var i=t.F,s=[t.J];if(null!=i){var o=t.U,a=e.ba.S,u=a==Dn||a==Wn;e=e.ba.f.RGBA;var f=[0],c=t.ka;f[0]=t.T,t.Kb&&(0==c?--f[0]:(--c,s[0]-=t.width),t.j+t.ka+t.T==t.o&&(f[0]=t.o-t.j-c));var h=e.eb;c=e.fb+c*e.A,t=kn(i,s[0],t.width,o,f,h,c+(u?0:3),e.A),r(n==f),t&&nt(a)&&gn(h,c,u,o,f,e.A)}return 0}function lt(t){var r=t.ma,e=r.ba.S,n=11>e,i=e==Fn||e==Cn||e==Dn||e==zn||12==e||nt(e);if(r.memory=null,r.Ib=null,r.Jb=null,r.Nd=null,!Be(r.Oa,t,i?11:12))return 0;if(i&&nt(e)&&be(),t.da)alert("todo:use_scaling");else{if(n){if(r.Ib=ft,t.Kb){if(e=t.U+1>>1,r.memory=s(t.U+2*e),null==r.memory)return 0;r.ec=r.memory,r.fc=0,r.cc=r.ec,r.dc=r.fc+t.U,r.Mc=r.cc,r.Nc=r.dc+e,r.Ib=ct,be()}}else alert("todo:EmitYUV");i&&(r.Jb=ht,n&&we())}if(n&&!Mi){for(t=0;256>t;++t)ji[t]=89858*(t-128)+Si>>ki,Oi[t]=-22014*(t-128)+Si,Ii[t]=-45773*(t-128),Ri[t]=113618*(t-128)+Si>>ki;for(t=xi;t<qi;++t)r=76283*(t-16)+Si>>ki,Bi[t-xi]=Ht(r,255),Pi[t-xi]=Ht(r+8>>4,15);Mi=1}return 1}function vt(t){var e=t.ma,n=t.U,i=t.T;return r(!(1&t.ka)),0>=n||0>=i?0:(n=e.Ib(t,e),null!=e.Jb&&e.Jb(t,e,n),e.Dc+=n,1)}function dt(t){t.ma.memory=null}function wt(t,r,e,n){return 47!=N(t,8)?0:(r[0]=N(t,14)+1,e[0]=N(t,14)+1,n[0]=N(t,1),0!=N(t,3)?0:!t.h)}function mt(t,r){if(4>t)return t+1;var e=t-2>>1;return(2+(1&t)<<e)+N(r,e)+1}function bt(t,r){return 120<r?r-120:1<=(e=((e=$n[r-1])>>4)*t+(8-(15&e)))?e:1;var e}function pt(t,r,e){var n=g(e),i=t[r+=255&n].g-8;return 0<i&&(k(e,e.u+8),n=g(e),r+=t[r].value,r+=n&(1<<i)-1),k(e,e.u+t[r].g),t[r].value}function Nt(t,e,n){return n.g+=t.g,n.value+=t.value<<e>>>0,r(8>=n.g),t.g}function Lt(t,e,n){var i=t.xc;return r((e=0==i?0:t.vc[t.md*(n>>i)+(e>>i)])<t.Wb),t.Ya[e]}function At(t,e,i,s){var o=t.ab,a=t.c*e,u=t.C;e=u+e;var f=i,c=s;for(s=t.Ta,i=t.Ua;0<o--;){var h=t.gc[o],l=u,v=e,d=f,w=c,m=(c=s,f=i,h.Ea);switch(r(l<v),r(v<=h.nc),h.hc){case 2:He(d,w,(v-l)*m,c,f);break;case 0:var b=l,p=v,N=c,L=f,A=(x=h).Ea;0==b&&(Ve(d,w,null,null,1,N,L),H(d,w+1,0,0,A-1,N,L+1),w+=A,L+=A,++b);for(var g=1<<x.b,y=g-1,k=T(A,x.b),S=x.K,x=x.w+(b>>x.b)*k;b<p;){var q=S,E=x,M=1;for(We(d,w,N,L-A,1,N,L);M<A;){var j=(M&~y)+g;j>A&&(j=A),(0,Ye[q[E++]>>8&15])(d,w+ +M,N,L+M-A,j-M,N,L+M),M=j}w+=A,L+=A,++b&y||(x+=k)}v!=h.nc&&n(c,f-m,c,f+(v-l-1)*m,m);break;case 1:for(m=d,p=w,A=(d=h.Ea)-(L=d&~(N=(w=1<<h.b)-1)),b=T(d,h.b),g=h.K,h=h.w+(l>>h.b)*b;l<v;){for(y=g,k=h,S=new z,x=p+L,q=p+d;p<x;)Z(y[k++],S),$e(S,m,p,w,c,f),p+=w,f+=w;p<q&&(Z(y[k++],S),$e(S,m,p,A,c,f),p+=A,f+=A),++l&N||(h+=b)}break;case 3:if(d==c&&w==f&&0<h.b){for(p=c,d=m=f+(v-l)*m-(L=(v-l)*T(h.Ea,h.b)),w=c,N=f,b=[],L=(A=L)-1;0<=L;--L)b[L]=w[N+L];for(L=A-1;0<=L;--L)p[d+L]=b[L];Ge(h,l,v,c,m,c,f)}else Ge(h,l,v,d,w,c,f)}f=s,c=i}c!=i&&n(s,i,f,c,a)}function gt(t,e){var n=t.V,i=t.Ba+t.c*t.C,s=e-t.C;if(r(e<=t.l.o),r(16>=s),0<s){var o=t.l,a=t.Ta,u=t.Ua,f=o.width;if(At(t,s,n,i),s=u=[u],r((n=t.C)<(i=e)),r(o.v<o.va),i>o.o&&(i=o.o),n<o.j){var c=o.j-n;n=o.j,s[0]+=c*f}if(n>=i?n=0:(s[0]+=4*o.v,o.ka=n-o.j,o.U=o.va-o.v,o.T=i-n,n=1),n){if(u=u[0],11>(n=t.ca).S){var h=n.f.RGBA,l=(i=n.S,s=o.U,o=o.T,c=h.eb,h.A),v=o;for(h=h.fb+t.Ma*h.A;0<v--;){var d=a,w=u,m=s,b=c,p=h;switch(i){case Pn:Xe(d,w,m,b,p);break;case Fn:Qe(d,w,m,b,p);break;case _n:Qe(d,w,m,b,p),gn(b,p,0,m,1,0);break;case Tn:en(d,w,m,b,p);break;case Cn:rt(d,w,m,b,p,1);break;case Vn:rt(d,w,m,b,p,1),gn(b,p,0,m,1,0);break;case Dn:rt(d,w,m,b,p,0);break;case Wn:rt(d,w,m,b,p,0),gn(b,p,1,m,1,0);break;case zn:tn(d,w,m,b,p);break;case Hn:tn(d,w,m,b,p),yn(b,p,m,1,0);break;case Un:rn(d,w,m,b,p);break;default:r(0)}u+=f,h+=l}t.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");r(t.Ma<=n.height)}}t.C=e,r(t.C<=t.i)}function yt(t){var r;if(0<t.ua)return 0;for(r=0;r<t.Wb;++r){var e=t.Ya[r].G,n=t.Ya[r].H;if(0<e[1][n[1]+0].g||0<e[2][n[2]+0].g||0<e[3][n[3]+0].g)return 0}return 1}function kt(t,e,n,i,s,o){if(0!=t.Z){var a=t.qd,u=t.rd;for(r(null!=wi[t.Z]);e<n;++e)wi[t.Z](a,u,i,s,i,s,o),a=i,u=s,s+=o;t.qd=a,t.rd=u}}function St(t,e){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;if(i=t.C<i?i:t.C,r(e<=t.l.o),e>i){var s=t.l.width,o=n.ca,a=n.tb+s*i,u=t.V,f=t.Ba+t.c*i,c=t.gc;r(1==t.ab),r(3==c[0].hc),Je(c[0],i,e,u,f,o,a),kt(n,i,e,o,a,s)}t.C=t.Ma=e}function xt(t,e,n,i,s,o,a){var u=t.$/i,f=t.$%i,c=t.m,h=t.s,l=n+t.$,v=l;s=n+i*s;var d=n+i*o,w=280+h.ua,m=t.Pb?u:16777216,b=0<h.ua?h.Wa:null,p=h.wc,N=l<d?Lt(h,f,u):null;r(t.C<o),r(d<=s);var L=false;t:for(;;){for(;L||l<d;){var A=0;if(u>=m){var x=l-n;r((m=t).Pb),m.wd=m.m,m.xd=x,0<m.s.ua&&B(m.s.Wa,m.s.vb),m=u+Qn}if(f&p||(N=Lt(h,f,u)),r(null!=N),N.Qb&&(e[l]=N.qb,L=true),!L)if(S(c),N.jc){A=c,x=e;var q=l,E=N.pd[g(A)&Te-1];r(N.jc),256>E.g?(k(A,A.u+E.g),x[q]=E.value,A=0):(k(A,A.u+E.g-256),r(256<=E.value),A=E.value),0==A&&(L=true)}else A=pt(N.G[0],N.H[0],c);if(c.h)break;if(L||256>A){if(!L)if(N.nd)e[l]=(N.qb|A<<8)>>>0;else{if(S(c),L=pt(N.G[1],N.H[1],c),S(c),x=pt(N.G[2],N.H[2],c),q=pt(N.G[3],N.H[3],c),c.h)break;e[l]=(q<<24|L<<16|A<<8|x)>>>0}if(L=false,++l,++f>=i&&(f=0,++u,null!=a&&u<=o&&!(u%16)&&a(t,u),null!=b))for(;v<l;)A=e[v++],b.X[(506832829*A&4294967295)>>>b.Mb]=A}else if(280>A){if(A=mt(A-256,c),x=pt(N.G[4],N.H[4],c),S(c),x=bt(i,x=mt(x,c)),c.h)break;if(l-n<x||s-l<A)break t;for(q=0;q<A;++q)e[l+q]=e[l+q-x];for(l+=A,f+=A;f>=i;)f-=i,++u,null!=a&&u<=o&&!(u%16)&&a(t,u);if(r(l<=s),f&p&&(N=Lt(h,f,u)),null!=b)for(;v<l;)A=e[v++],b.X[(506832829*A&4294967295)>>>b.Mb]=A}else{if(!(A<w))break t;for(L=A-280,r(null!=b);v<l;)A=e[v++],b.X[(506832829*A&4294967295)>>>b.Mb]=A;A=l,r(!(L>>>(x=b).Xa)),e[A]=x.X[L],L=true}L||r(c.h==y(c))}if(t.Pb&&c.h&&l<s)r(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&B(t.s.vb,t.s.Wa);else{if(c.h)break t;null!=a&&a(t,u>o?o:u),t.a=0,t.$=l-n}return 1}return t.a=3,0}function qt(t){r(null!=t),t.vc=null,t.yc=null,t.Ya=null;var e=t.Wa;null!=e&&(e.X=null),t.vb=null,r(null!=t)}function Et(){var r=new se;return null==r?null:(r.a=0,r.xb=di,et("Predictor","VP8LPredictors"),et("Predictor","VP8LPredictors_C"),et("PredictorAdd","VP8LPredictorsAdd"),et("PredictorAdd","VP8LPredictorsAdd_C"),He=G,$e=J,Xe=Y,Qe=$,tn=X,rn=Q,en=tt,t.VP8LMapColor32b=Ze,t.VP8LMapColor8b=Ke,r)}function Mt(t,e,n,a,u){var f=1,l=[t],d=[e],w=a.m,m=a.s,b=null,p=0;t:for(;;){if(n)for(;f&&N(w,1);){var L=l,A=d,y=a,x=1,q=y.m,E=y.gc[y.ab],M=N(q,2);if(y.Oc&1<<M)f=0;else{switch(y.Oc|=1<<M,E.hc=M,E.Ea=L[0],E.nc=A[0],E.K=[null],++y.ab,r(4>=y.ab),M){case 0:case 1:E.b=N(q,3)+2,x=Mt(T(E.Ea,E.b),T(E.nc,E.b),0,y,E.K),E.K=E.K[0];break;case 3:var j,R=N(q,8)+1,I=16<R?0:4<R?1:2<R?2:3;if(L[0]=T(E.Ea,I),E.b=I,j=x=Mt(R,1,0,y,E.K)){var B,P=R,F=E,D=1<<(8>>F.b),z=s(D);if(null==z)j=0;else{var U=F.K[0],_=F.w;for(z[0]=F.K[0][0],B=1;B<1*P;++B)z[B]=C(U[_+B],z[B-1]);for(;B<4*D;++B)z[B]=0;F.K[0]=null,F.K[0]=z,j=1}}x=j;break;case 2:break;default:r(0)}f=x}}if(l=l[0],d=d[0],f&&N(w,1)&&!(f=1<=(p=N(w,4))&&11>=p)){a.a=3;break t}var V;if(V=f)r:{var W,H,G,Z=a,J=l,K=d,Y=p,$=n,X=Z.m,Q=Z.s,tt=[null],rt=1,et=0,nt=Xn[Y];e:for(;;){if($&&N(X,1)){var it=N(X,3)+2,st=T(J,it),ot=T(K,it),at=st*ot;if(!Mt(st,ot,0,Z,tt))break e;for(tt=tt[0],Q.xc=it,W=0;W<at;++W){var ut=tt[W]>>8&65535;tt[W]=ut,ut>=rt&&(rt=ut+1)}}if(X.h)break e;for(H=0;5>H;++H){var ft=Jn[H];!H&&0<Y&&(ft+=1<<Y),et<ft&&(et=ft)}var ct=o(rt*nt,h),ht=rt,lt=o(ht,v);if(null==lt)var vt=null;else r(65536>=ht),vt=lt;var dt=s(et);if(null==vt||null==dt||null==ct){Z.a=1;break e}var wt=ct;for(W=G=0;W<rt;++W){var mt=vt[W],bt=mt.G,pt=mt.H,Lt=0,At=1,gt=0;for(H=0;5>H;++H){ft=Jn[H],bt[H]=wt,pt[H]=G,!H&&0<Y&&(ft+=1<<Y);n:{var yt,kt=ft,St=Z,Et=dt,jt=wt,Rt=G,It=0,Ot=St.m,Bt=N(Ot,1);if(i(Et,0,0,kt),Bt){var Pt=N(Ot,1)+1,Ft=N(Ot,1),Tt=N(Ot,0==Ft?1:8);Et[Tt]=1,2==Pt&&(Et[Tt=N(Ot,8)]=1);var Ct=1}else{var Dt=s(19),zt=N(Ot,4)+4;if(19<zt){St.a=3;var Ut=0;break n}for(yt=0;yt<zt;++yt)Dt[Yn[yt]]=N(Ot,3);var _t=void 0,Vt=void 0,Wt=St,Ht=Dt,Gt=kt,Zt=Et,Jt=0,Kt=Wt.m,Yt=8,$t=o(128,h);i:for(;c($t,0,7,Ht,19);){if(N(Kt,1)){var Xt=2+2*N(Kt,3);if((_t=2+N(Kt,Xt))>Gt)break i}else _t=Gt;for(Vt=0;Vt<Gt&&_t--;){S(Kt);var Qt=$t[0+(127&g(Kt))];k(Kt,Kt.u+Qt.g);var tr=Qt.value;if(16>tr)Zt[Vt++]=tr,0!=tr&&(Yt=tr);else{var rr=16==tr,er=tr-16,nr=Zn[er],ir=N(Kt,Gn[er])+nr;if(Vt+ir>Gt)break i;for(var sr=rr?Yt:0;0<ir--;)Zt[Vt++]=sr}}Jt=1;break i}Jt||(Wt.a=3),Ct=Jt}(Ct=Ct&&!Ot.h)&&(It=c(jt,Rt,8,Et,kt)),Ct&&0!=It?Ut=It:(St.a=3,Ut=0)}if(0==Ut)break e;if(At&&1==Kn[H]&&(At=0==wt[G].g),Lt+=wt[G].g,G+=Ut,3>=H){var or,ar=dt[0];for(or=1;or<ft;++or)dt[or]>ar&&(ar=dt[or]);gt+=ar}}if(mt.nd=At,mt.Qb=0,At&&(mt.qb=(bt[3][pt[3]+0].value<<24|bt[1][pt[1]+0].value<<16|bt[2][pt[2]+0].value)>>>0,0==Lt&&256>bt[0][pt[0]+0].value&&(mt.Qb=1,mt.qb+=bt[0][pt[0]+0].value<<8)),mt.jc=!mt.Qb&&6>gt,mt.jc){var ur,fr=mt;for(ur=0;ur<Te;++ur){var cr=ur,hr=fr.pd[cr],lr=fr.G[0][fr.H[0]+cr];256<=lr.value?(hr.g=lr.g+256,hr.value=lr.value):(hr.g=0,hr.value=0,cr>>=Nt(lr,8,hr),cr>>=Nt(fr.G[1][fr.H[1]+cr],16,hr),cr>>=Nt(fr.G[2][fr.H[2]+cr],0,hr),Nt(fr.G[3][fr.H[3]+cr],24,hr))}}}Q.vc=tt,Q.Wb=rt,Q.Ya=vt,Q.yc=ct,V=1;break r}V=0}if(!(f=V)){a.a=3;break t}if(0<p){if(m.ua=1<<p,!O(m.Wa,p)){a.a=1,f=0;break t}}else m.ua=0;var vr=a,dr=l,wr=d,mr=vr.s,br=mr.xc;if(vr.c=dr,vr.i=wr,mr.md=T(dr,br),mr.wc=0==br?-1:(1<<br)-1,n){a.xb=vi;break t}if(null==(b=s(l*d))){a.a=1,f=0;break t}f=(f=xt(a,b,0,l,d,d,null))&&!w.h;break t}return f?(null!=u?u[0]=b:(r(null==b),r(n)),a.$=0,n||qt(m)):qt(m),f}function jt(t,e){var n=t.c*t.i,i=n+e+16*e;return r(t.c<=e),t.V=s(i),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+e,1)}function Rt(t,e){var n=t.C,i=e-n,s=t.V,o=t.Ba+t.c*n;for(r(e<=t.l.o);0<i;){var a=16<i?16:i,u=t.l.ma,f=t.l.width,c=f*a,h=u.ca,l=u.tb+f*n,v=t.Ta,d=t.Ua;At(t,a,s,o),Sn(v,d,h,l,c),kt(u,n,n+a,h,l,f),i-=a,s+=a*t.c,n+=a}r(n==e),t.C=t.Ma=e}function It(){this.ub=this.yd=this.td=this.Rb=0}function Ot(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Bt(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Pt(){this.Yb=function(){var t=[];return function t(r,e,n){for(var i=n[e],s=0;s<i&&(r.push(n.length>e+1?[]:0),!(n.length<e+1));s++)t(r[s],e+1,n)}(t,0,[3,11]),t}()}function Ft(){this.jb=s(3),this.Wc=a([4,8],Pt),this.Xc=a([4,17],Pt)}function Tt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Ct(){this.ld=this.La=this.dd=this.tc=0}function Dt(){this.Na=this.la=0}function zt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ut(){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 _t(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ct),this.Y=0,this.ya=Array(new Ut),this.aa=0,this.l=new Gt}function Vt(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Wt(){this.cb=this.a=0,this.sc="",this.m=new L,this.Od=new It,this.Kc=new Ot,this.ed=new Tt,this.Qa=new Bt,this.Ic=this.$c=this.Aa=0,this.D=new _t,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,L),this.ia=0,this.pb=o(4,zt),this.Pa=new Ft,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Vt),this.Hd=0,this.rb=Array(new Dt),this.sb=0,this.wa=Array(new Ct),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 Ut),this.L=this.aa=0,this.gd=a([4,2],Ct),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 Ht(t,r){return 0>t?0:t>r?r:t}function Gt(){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 Zt(){var t=new Wt;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,ei||(ei=$t)),t}function Jt(t,r,e){return 0==t.a&&(t.a=r,t.sc=e,t.cb=0),0}function Kt(t,r,e){return 3<=e&&157==t[r+0]&&1==t[r+1]&&42==t[r+2]}function Yt(t,e){if(null==t)return 0;if(t.a=0,t.sc="OK",null==e)return Jt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=e.data,s=e.w,o=e.ha;if(4>o)return Jt(t,7,"Truncated header.");var a=n[s+0]|n[s+1]<<8|n[s+2]<<16,u=t.Od;if(u.Rb=!(1&a),u.td=a>>1&7,u.yd=a>>4&1,u.ub=a>>5,3<u.td)return Jt(t,3,"Incorrect keyframe parameters.");if(!u.yd)return Jt(t,4,"Frame not displayable.");s+=3,o-=3;var f=t.Kc;if(u.Rb){if(7>o)return Jt(t,7,"cannot parse picture header");if(!Kt(n,s,o))return Jt(t,3,"Bad code word");f.c=16383&(n[s+4]<<8|n[s+3]),f.Td=n[s+4]>>6,f.i=16383&(n[s+6]<<8|n[s+5]),f.Ud=n[s+6]>>6,s+=7,o-=7,t.za=f.c+15>>4,t.Ub=f.i+15>>4,e.width=f.c,e.height=f.i,e.Da=0,e.j=0,e.v=0,e.va=e.width,e.o=e.height,e.da=0,e.ib=e.width,e.hb=e.height,e.U=e.width,e.T=e.height,i((a=t.Pa).jb,0,255,a.jb.length),r(null!=(a=t.Qa)),a.Cb=0,a.Bb=0,a.Fb=1,i(a.Zb,0,0,a.Zb.length),i(a.Lb,0,0,a.Lb)}if(u.ub>o)return Jt(t,7,"bad partition length");d(a=t.m,n,s,u.ub),s+=u.ub,o-=u.ub,u.Rb&&(f.Ld=q(a),f.Kd=q(a)),f=t.Qa;var c,h=t.Pa;if(r(null!=a),r(null!=f),f.Cb=q(a),f.Cb){if(f.Bb=q(a),q(a)){for(f.Fb=q(a),c=0;4>c;++c)f.Zb[c]=q(a)?m(a,7):0;for(c=0;4>c;++c)f.Lb[c]=q(a)?m(a,6):0}if(f.Bb)for(c=0;3>c;++c)h.jb[c]=q(a)?w(a,8):255}else f.Bb=0;if(a.Ka)return Jt(t,3,"cannot parse segment header");if((f=t.ed).zd=q(a),f.Tb=w(a,6),f.wb=w(a,3),f.Pc=q(a),f.Pc&&q(a)){for(h=0;4>h;++h)q(a)&&(f.vd[h]=m(a,6));for(h=0;4>h;++h)q(a)&&(f.od[h]=m(a,6))}if(t.L=0==f.Tb?0:f.zd?1:2,a.Ka)return Jt(t,3,"cannot parse filter header");var l=o;if(o=c=s,s=c+l,f=l,t.Xb=(1<<w(t.m,2))-1,l<3*(h=t.Xb))n=7;else{for(c+=3*h,f-=3*h,l=0;l<h;++l){var v=n[o+0]|n[o+1]<<8|n[o+2]<<16;v>f&&(v=f),d(t.Jc[+l],n,c,v),c+=v,f-=v,o+=3}d(t.Jc[+h],n,c,f),n=c<s?0:5}if(0!=n)return Jt(t,n,"cannot parse partitions");for(n=w(c=t.m,7),o=q(c)?m(c,4):0,s=q(c)?m(c,4):0,f=q(c)?m(c,4):0,h=q(c)?m(c,4):0,c=q(c)?m(c,4):0,l=t.Qa,v=0;4>v;++v){if(l.Cb){var b=l.Zb[v];l.Fb||(b+=n)}else{if(0<v){t.pb[v]=t.pb[0];continue}b=n}var p=t.pb[v];p.Sc[0]=ti[Ht(b+o,127)],p.Sc[1]=ri[Ht(b+0,127)],p.Eb[0]=2*ti[Ht(b+s,127)],p.Eb[1]=101581*ri[Ht(b+f,127)]>>16,8>p.Eb[1]&&(p.Eb[1]=8),p.Qc[0]=ti[Ht(b+h,117)],p.Qc[1]=ri[Ht(b+c,127)],p.lc=b+c}if(!u.Rb)return Jt(t,4,"Not a key frame.");for(q(a),u=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(s=0;3>s;++s)for(f=0;11>f;++f)h=E(a,ui[n][o][s][f])?w(a,8):oi[n][o][s][f],u.Wc[n][o].Yb[s][f]=h;for(o=0;17>o;++o)u.Xc[n][o]=u.Wc[n][fi[o]]}return t.kc=q(a),t.kc&&(t.Bd=w(a,8)),t.cb=1}function $t(t,r,e,n,i,s,o){var a=r[i].Yb[e];for(e=0;16>i;++i){if(!E(t,a[e+0]))return i;for(;!E(t,a[e+1]);)if(a=r[++i].Yb[0],e=0,16==i)return 16;var u=r[i+1].Yb;if(E(t,a[e+2])){var f=t,c=0;if(E(f,(l=a)[(h=e)+3]))if(E(f,l[h+6])){for(a=0,h=2*(c=E(f,l[h+8]))+(l=E(f,l[h+9+c])),c=0,l=ni[h];l[a];++a)c+=c+E(f,l[a]);c+=3+(8<<h)}else E(f,l[h+7])?(c=7+2*E(f,165),c+=E(f,145)):c=5+E(f,159);else c=E(f,l[h+4])?3+E(f,l[h+5]):2;a=u[2]}else c=1,a=u[1];u=o+ii[i],0>(f=t).b&&x(f);var h,l=f.b,v=(h=f.Ca>>1)-(f.I>>l)>>31;--f.b,f.Ca+=v,f.Ca|=1,f.I-=(h+1&v)<<l,s[u]=((c^v)-v)*n[(0<i)+0]}return 16}function Xt(t){var r=t.rb[t.sb-1];r.la=0,r.Na=0,i(t.zc,0,0,t.zc.length),t.ja=0}function Qt(t,r,e,n,i){i=t[r+e+32*n]+(i>>3),t[r+e+32*n]=-256&i?0>i?0:255:i}function tr(t,r,e,n,i,s){Qt(t,r,0,e,n+i),Qt(t,r,1,e,n+s),Qt(t,r,2,e,n-s),Qt(t,r,3,e,n-i)}function rr(t){return(20091*t>>16)+t}function er(t,r,e,n){var i,o=0,a=s(16);for(i=0;4>i;++i){var u=t[r+0]+t[r+8],f=t[r+0]-t[r+8],c=(35468*t[r+4]>>16)-rr(t[r+12]),h=rr(t[r+4])+(35468*t[r+12]>>16);a[o+0]=u+h,a[o+1]=f+c,a[o+2]=f-c,a[o+3]=u-h,o+=4,r++}for(i=o=0;4>i;++i)u=(t=a[o+0]+4)+a[o+8],f=t-a[o+8],c=(35468*a[o+4]>>16)-rr(a[o+12]),Qt(e,n,0,0,u+(h=rr(a[o+4])+(35468*a[o+12]>>16))),Qt(e,n,1,0,f+c),Qt(e,n,2,0,f-c),Qt(e,n,3,0,u-h),o++,n+=32}function nr(t,r,e,n){var i=t[r+0]+4,s=35468*t[r+4]>>16,o=rr(t[r+4]),a=35468*t[r+1]>>16;tr(e,n,0,i+o,t=rr(t[r+1]),a),tr(e,n,1,i+s,t,a),tr(e,n,2,i-s,t,a),tr(e,n,3,i-o,t,a)}function ir(t,r,e,n,i){er(t,r,e,n),i&&er(t,r+16,e,n+4)}function sr(t,r,e,n){sn(t,r+0,e,n,1),sn(t,r+32,e,n+128,1)}function or(t,r,e,n){var i;for(t=t[r+0]+4,i=0;4>i;++i)for(r=0;4>r;++r)Qt(e,n,r,i,t)}function ar(t,r,e,n){t[r+0]&&un(t,r+0,e,n),t[r+16]&&un(t,r+16,e,n+4),t[r+32]&&un(t,r+32,e,n+128),t[r+48]&&un(t,r+48,e,n+128+4)}function ur(t,r,e,n){var i,o=s(16);for(i=0;4>i;++i){var a=t[r+0+i]+t[r+12+i],u=t[r+4+i]+t[r+8+i],f=t[r+4+i]-t[r+8+i],c=t[r+0+i]-t[r+12+i];o[0+i]=a+u,o[8+i]=a-u,o[4+i]=c+f,o[12+i]=c-f}for(i=0;4>i;++i)a=(t=o[0+4*i]+3)+o[3+4*i],u=o[1+4*i]+o[2+4*i],f=o[1+4*i]-o[2+4*i],c=t-o[3+4*i],e[n+0]=a+u>>3,e[n+16]=c+f>>3,e[n+32]=a-u>>3,e[n+48]=c-f>>3,n+=64}function fr(t,r,e){var n,i=r-32,s=On,o=255-t[i-1];for(n=0;n<e;++n){var a,u=s,f=o+t[r-1];for(a=0;a<e;++a)t[r+a]=u[f+t[i+a]];r+=32}}function cr(t,r){fr(t,r,4)}function hr(t,r){fr(t,r,8)}function lr(t,r){fr(t,r,16)}function vr(t,r){var e;for(e=0;16>e;++e)n(t,r+32*e,t,r-32,16)}function dr(t,r){var e;for(e=16;0<e;--e)i(t,r,t[r-1],16),r+=32}function wr(t,r,e){var n;for(n=0;16>n;++n)i(r,e+32*n,t,16)}function mr(t,r){var e,n=16;for(e=0;16>e;++e)n+=t[r-1+32*e]+t[r+e-32];wr(n>>5,t,r)}function br(t,r){var e,n=8;for(e=0;16>e;++e)n+=t[r-1+32*e];wr(n>>4,t,r)}function pr(t,r){var e,n=8;for(e=0;16>e;++e)n+=t[r+e-32];wr(n>>4,t,r)}function Nr(t,r){wr(128,t,r)}function Lr(t,r,e){return t+2*r+e+2>>2}function Ar(t,r){var e,i=r-32;for(i=new Uint8Array([Lr(t[i-1],t[i+0],t[i+1]),Lr(t[i+0],t[i+1],t[i+2]),Lr(t[i+1],t[i+2],t[i+3]),Lr(t[i+2],t[i+3],t[i+4])]),e=0;4>e;++e)n(t,r+32*e,i,0,i.length)}function gr(t,r){var e=t[r-1],n=t[r-1+32],i=t[r-1+64],s=t[r-1+96];M(t,r+0,16843009*Lr(t[r-1-32],e,n)),M(t,r+32,16843009*Lr(e,n,i)),M(t,r+64,16843009*Lr(n,i,s)),M(t,r+96,16843009*Lr(i,s,s))}function yr(t,r){var e,n=4;for(e=0;4>e;++e)n+=t[r+e-32]+t[r-1+32*e];for(n>>=3,e=0;4>e;++e)i(t,r+32*e,n,4)}function kr(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1-32],o=t[r+0-32],a=t[r+1-32],u=t[r+2-32],f=t[r+3-32];t[r+0+96]=Lr(n,i,t[r-1+96]),t[r+1+96]=t[r+0+64]=Lr(e,n,i),t[r+2+96]=t[r+1+64]=t[r+0+32]=Lr(s,e,n),t[r+3+96]=t[r+2+64]=t[r+1+32]=t[r+0+0]=Lr(o,s,e),t[r+3+64]=t[r+2+32]=t[r+1+0]=Lr(a,o,s),t[r+3+32]=t[r+2+0]=Lr(u,a,o),t[r+3+0]=Lr(f,u,a)}function Sr(t,r){var e=t[r+1-32],n=t[r+2-32],i=t[r+3-32],s=t[r+4-32],o=t[r+5-32],a=t[r+6-32],u=t[r+7-32];t[r+0+0]=Lr(t[r+0-32],e,n),t[r+1+0]=t[r+0+32]=Lr(e,n,i),t[r+2+0]=t[r+1+32]=t[r+0+64]=Lr(n,i,s),t[r+3+0]=t[r+2+32]=t[r+1+64]=t[r+0+96]=Lr(i,s,o),t[r+3+32]=t[r+2+64]=t[r+1+96]=Lr(s,o,a),t[r+3+64]=t[r+2+96]=Lr(o,a,u),t[r+3+96]=Lr(a,u,u)}function xr(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1-32],o=t[r+0-32],a=t[r+1-32],u=t[r+2-32],f=t[r+3-32];t[r+0+0]=t[r+1+64]=s+o+1>>1,t[r+1+0]=t[r+2+64]=o+a+1>>1,t[r+2+0]=t[r+3+64]=a+u+1>>1,t[r+3+0]=u+f+1>>1,t[r+0+96]=Lr(i,n,e),t[r+0+64]=Lr(n,e,s),t[r+0+32]=t[r+1+96]=Lr(e,s,o),t[r+1+32]=t[r+2+96]=Lr(s,o,a),t[r+2+32]=t[r+3+96]=Lr(o,a,u),t[r+3+32]=Lr(a,u,f)}function qr(t,r){var e=t[r+0-32],n=t[r+1-32],i=t[r+2-32],s=t[r+3-32],o=t[r+4-32],a=t[r+5-32],u=t[r+6-32],f=t[r+7-32];t[r+0+0]=e+n+1>>1,t[r+1+0]=t[r+0+64]=n+i+1>>1,t[r+2+0]=t[r+1+64]=i+s+1>>1,t[r+3+0]=t[r+2+64]=s+o+1>>1,t[r+0+32]=Lr(e,n,i),t[r+1+32]=t[r+0+96]=Lr(n,i,s),t[r+2+32]=t[r+1+96]=Lr(i,s,o),t[r+3+32]=t[r+2+96]=Lr(s,o,a),t[r+3+64]=Lr(o,a,u),t[r+3+96]=Lr(a,u,f)}function Er(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1+96];t[r+0+0]=e+n+1>>1,t[r+2+0]=t[r+0+32]=n+i+1>>1,t[r+2+32]=t[r+0+64]=i+s+1>>1,t[r+1+0]=Lr(e,n,i),t[r+3+0]=t[r+1+32]=Lr(n,i,s),t[r+3+32]=t[r+1+64]=Lr(i,s,s),t[r+3+64]=t[r+2+64]=t[r+0+96]=t[r+1+96]=t[r+2+96]=t[r+3+96]=s}function Mr(t,r){var e=t[r-1+0],n=t[r-1+32],i=t[r-1+64],s=t[r-1+96],o=t[r-1-32],a=t[r+0-32],u=t[r+1-32],f=t[r+2-32];t[r+0+0]=t[r+2+32]=e+o+1>>1,t[r+0+32]=t[r+2+64]=n+e+1>>1,t[r+0+64]=t[r+2+96]=i+n+1>>1,t[r+0+96]=s+i+1>>1,t[r+3+0]=Lr(a,u,f),t[r+2+0]=Lr(o,a,u),t[r+1+0]=t[r+3+32]=Lr(e,o,a),t[r+1+32]=t[r+3+64]=Lr(n,e,o),t[r+1+64]=t[r+3+96]=Lr(i,n,e),t[r+1+96]=Lr(s,i,n)}function jr(t,r){var e;for(e=0;8>e;++e)n(t,r+32*e,t,r-32,8)}function Rr(t,r){var e;for(e=0;8>e;++e)i(t,r,t[r-1],8),r+=32}function Ir(t,r,e){var n;for(n=0;8>n;++n)i(r,e+32*n,t,8)}function Or(t,r){var e,n=8;for(e=0;8>e;++e)n+=t[r+e-32]+t[r-1+32*e];Ir(n>>4,t,r)}function Br(t,r){var e,n=4;for(e=0;8>e;++e)n+=t[r+e-32];Ir(n>>3,t,r)}function Pr(t,r){var e,n=4;for(e=0;8>e;++e)n+=t[r-1+32*e];Ir(n>>3,t,r)}function Fr(t,r){Ir(128,t,r)}function Tr(t,r,e){var n=t[r-e],i=t[r+0],s=3*(i-n)+Rn[1020+t[r-2*e]-t[r+e]],o=In[112+(s+4>>3)];t[r-e]=On[255+n+In[112+(s+3>>3)]],t[r+0]=On[255+i-o]}function Cr(t,r,e,n){var i=t[r+0],s=t[r+e];return Bn[255+t[r-2*e]-t[r-e]]>n||Bn[255+s-i]>n}function Dr(t,r,e,n){return 4*Bn[255+t[r-e]-t[r+0]]+Bn[255+t[r-2*e]-t[r+e]]<=n}function zr(t,r,e,n,i){var s=t[r-3*e],o=t[r-2*e],a=t[r-e],u=t[r+0],f=t[r+e],c=t[r+2*e],h=t[r+3*e];return 4*Bn[255+a-u]+Bn[255+o-f]>n?0:Bn[255+t[r-4*e]-s]<=i&&Bn[255+s-o]<=i&&Bn[255+o-a]<=i&&Bn[255+h-c]<=i&&Bn[255+c-f]<=i&&Bn[255+f-u]<=i}function Ur(t,r,e,n){var i=2*n+1;for(n=0;16>n;++n)Dr(t,r+n,e,i)&&Tr(t,r+n,e)}function _r(t,r,e,n){var i=2*n+1;for(n=0;16>n;++n)Dr(t,r+n*e,1,i)&&Tr(t,r+n*e,1)}function Vr(t,r,e,n){var i;for(i=3;0<i;--i)Ur(t,r+=4*e,e,n)}function Wr(t,r,e,n){var i;for(i=3;0<i;--i)_r(t,r+=4,e,n)}function Hr(t,r,e,n,i,s,o,a){for(s=2*s+1;0<i--;){if(zr(t,r,e,s,o))if(Cr(t,r,e,a))Tr(t,r,e);else{var u=t,f=r,c=e,h=u[f-2*c],l=u[f-c],v=u[f+0],d=u[f+c],w=u[f+2*c],m=27*(p=Rn[1020+3*(v-l)+Rn[1020+h-d]])+63>>7,b=18*p+63>>7,p=9*p+63>>7;u[f-3*c]=On[255+u[f-3*c]+p],u[f-2*c]=On[255+h+b],u[f-c]=On[255+l+m],u[f+0]=On[255+v-m],u[f+c]=On[255+d-b],u[f+2*c]=On[255+w-p]}r+=n}}function Gr(t,r,e,n,i,s,o,a){for(s=2*s+1;0<i--;){if(zr(t,r,e,s,o))if(Cr(t,r,e,a))Tr(t,r,e);else{var u=t,f=r,c=e,h=u[f-c],l=u[f+0],v=u[f+c],d=In[112+(4+(w=3*(l-h))>>3)],w=In[112+(w+3>>3)],m=d+1>>1;u[f-2*c]=On[255+u[f-2*c]+m],u[f-c]=On[255+h+w],u[f+0]=On[255+l-d],u[f+c]=On[255+v-m]}r+=n}}function Zr(t,r,e,n,i,s){Hr(t,r,e,1,16,n,i,s)}function Jr(t,r,e,n,i,s){Hr(t,r,1,e,16,n,i,s)}function Kr(t,r,e,n,i,s){var o;for(o=3;0<o;--o)Gr(t,r+=4*e,e,1,16,n,i,s)}function Yr(t,r,e,n,i,s){var o;for(o=3;0<o;--o)Gr(t,r+=4,1,e,16,n,i,s)}function $r(t,r,e,n,i,s,o,a){Hr(t,r,i,1,8,s,o,a),Hr(e,n,i,1,8,s,o,a)}function Xr(t,r,e,n,i,s,o,a){Hr(t,r,1,i,8,s,o,a),Hr(e,n,1,i,8,s,o,a)}function Qr(t,r,e,n,i,s,o,a){Gr(t,r+4*i,i,1,8,s,o,a),Gr(e,n+4*i,i,1,8,s,o,a)}function te(t,r,e,n,i,s,o,a){Gr(t,r+4,1,i,8,s,o,a),Gr(e,n+4,1,i,8,s,o,a)}function re(){this.ba=new ot,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ee(){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 ne(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ie(){this.ua=0,this.Wa=new P,this.vb=new P,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new v,this.yc=new h}function se(){this.xb=this.a=0,this.l=new Gt,this.ca=new ot,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new A,this.Pb=0,this.wd=new A,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ie,this.ab=0,this.gc=o(4,ne),this.Oc=0}function oe(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ae(t,r,e,n,i,s,o){for(t=null==t?0:t[r+0],r=0;r<o;++r)i[s+r]=t+e[n+r]&255,t=i[s+r]}function ue(t,r,e,n,i,s,o){var a;if(null==t)ae(null,null,e,n,i,s,o);else for(a=0;a<o;++a)i[s+a]=t[r+a]+e[n+a]&255}function fe(t,r,e,n,i,s,o){if(null==t)ae(null,null,e,n,i,s,o);else{var a,u=t[r+0],f=u,c=u;for(a=0;a<o;++a)f=c+(u=t[r+a])-f,c=e[n+a]+(-256&f?0>f?0:255:f)&255,f=u,i[s+a]=c}}function ce(t,e,i,o){var a=e.width,u=e.o;if(r(null!=t&&null!=e),0>i||0>=o||i+o>u)return null;if(!t.Cc){if(null==t.ga){var f;if(t.ga=new oe,(f=null==t.ga)||(f=e.width*e.o,r(0==t.Gb.length),t.Gb=s(f),t.Uc=0,null==t.Gb?f=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,f=1),f=!f),!f){f=t.ga;var c=t.Fa,h=t.P,l=t.qc,v=t.mb,d=t.nb,w=h+1,m=l-1,p=f.l;if(r(null!=c&&null!=v&&null!=e),wi[0]=null,wi[1]=ae,wi[2]=ue,wi[3]=fe,f.ca=v,f.tb=d,f.c=e.width,f.i=e.height,r(0<f.c&&0<f.i),1>=l)e=0;else if(f.$a=3&c[h+0],f.Z=c[h+0]>>2&3,f.Lc=c[h+0]>>4&3,h=c[h+0]>>6&3,0>f.$a||1<f.$a||4<=f.Z||1<f.Lc||h)e=0;else if(p.put=vt,p.ac=lt,p.bc=dt,p.ma=f,p.width=e.width,p.height=e.height,p.Da=e.Da,p.v=e.v,p.va=e.va,p.j=e.j,p.o=e.o,f.$a)t:{r(1==f.$a),e=Et();r:for(;;){if(null==e){e=0;break t}if(r(null!=f),f.mc=e,e.c=f.c,e.i=f.i,e.l=f.l,e.l.ma=f,e.l.width=f.c,e.l.height=f.i,e.a=0,b(e.m,c,w,m),!Mt(f.c,f.i,1,e,null))break r;if(1==e.ab&&3==e.gc[0].hc&&yt(e.s)?(f.ic=1,c=e.c*e.i,e.Ta=null,e.Ua=0,e.V=s(c),e.Ba=0,null==e.V?(e.a=1,e=0):e=1):(f.ic=0,e=jt(e,f.c)),!e)break r;e=1;break t}f.mc=null,e=0}else e=m>=f.c*f.i;f=!e}if(f)return null;1!=t.ga.Lc?t.Ga=0:o=u-i}r(null!=t.ga),r(i+o<=u);t:{if(e=(c=t.ga).c,u=c.l.o,0==c.$a){if(w=t.rc,m=t.Vc,p=t.Fa,h=t.P+1+i*e,l=t.mb,v=t.nb+i*e,r(h<=t.P+t.qc),0!=c.Z)for(r(null!=wi[c.Z]),f=0;f<o;++f)wi[c.Z](w,m,p,h,l,v,e),w=l,m=v,v+=e,h+=e;else for(f=0;f<o;++f)n(l,v,p,h,e),w=l,m=v,v+=e,h+=e;t.rc=w,t.Vc=m}else{if(r(null!=c.mc),e=i+o,r(null!=(f=c.mc)),r(e<=f.i),f.C>=e)e=1;else if(c.ic||we(),c.ic){c=f.V,w=f.Ba,m=f.c;var N=f.i,L=(p=1,h=f.$/m,l=f.$%m,v=f.m,d=f.s,f.$),A=m*N,g=m*e,k=d.wc,x=L<g?Lt(d,l,h):null;r(L<=A),r(e<=N),r(yt(d));r:for(;;){for(;!v.h&&L<g;){if(l&k||(x=Lt(d,l,h)),r(null!=x),S(v),256>(N=pt(x.G[0],x.H[0],v)))c[w+L]=N,++L,++l>=m&&(l=0,++h<=e&&!(h%16)&&St(f,h));else{if(!(280>N)){p=0;break r}N=mt(N-256,v);var q,E=pt(x.G[4],x.H[4],v);if(S(v),!(L>=(E=bt(m,E=mt(E,v)))&&A-L>=N)){p=0;break r}for(q=0;q<N;++q)c[w+L+q]=c[w+L+q-E];for(L+=N,l+=N;l>=m;)l-=m,++h<=e&&!(h%16)&&St(f,h);L<g&&l&k&&(x=Lt(d,l,h))}r(v.h==y(v))}St(f,h>e?e:h);break r}!p||v.h&&L<A?(p=0,f.a=v.h?5:3):f.$=L,e=p}else e=xt(f,f.V,f.Ba,f.c,f.i,e,Rt);if(!e){o=0;break t}}i+o>=u&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+i*a}function he(t,r,e,n,i,s){for(;0<i--;){var o,a=t,u=r+(e?1:0),f=t,c=r+(e?0:3);for(o=0;o<n;++o){var h=f[c+4*o];255!=h&&(h*=32897,a[u+4*o+0]=a[u+4*o+0]*h>>23,a[u+4*o+1]=a[u+4*o+1]*h>>23,a[u+4*o+2]=a[u+4*o+2]*h>>23)}r+=s}}function le(t,r,e,n,i){for(;0<n--;){var s;for(s=0;s<e;++s){var o=t[r+2*s+0],a=15&(f=t[r+2*s+1]),u=4369*a,f=(240&f|f>>4)*u>>16;t[r+2*s+0]=(240&o|o>>4)*u>>16&240|(15&o|o<<4)*u>>16>>4&15,t[r+2*s+1]=240&f|a}r+=i}}function ve(t,r,e,n,i,s,o,a){var u,f,c=255;for(f=0;f<i;++f){for(u=0;u<n;++u){var h=t[r+u];s[o+4*u]=h,c&=h}r+=e,o+=a}return 255!=c}function de(t,r,e,n,i){var s;for(s=0;s<i;++s)e[n+s]=t[r+s]>>8}function we(){gn=he,yn=le,kn=ve,Sn=de}function me(e,n,i){t[e]=function(t,e,s,o,a,u,f,c,h,l,v,d,w,m,b,p,N){var L,A=N-1>>1,g=a[u+0]|f[c+0]<<16,y=h[l+0]|v[d+0]<<16;r(null!=t);var k=3*g+y+131074>>2;for(n(t[e+0],255&k,k>>16,w,m),null!=s&&(k=3*y+g+131074>>2,n(s[o+0],255&k,k>>16,b,p)),L=1;L<=A;++L){var S=a[u+L]|f[c+L]<<16,x=h[l+L]|v[d+L]<<16,q=g+S+y+x+524296,E=q+2*(S+y)>>3;k=E+g>>1,g=(q=q+2*(g+x)>>3)+S>>1,n(t[e+2*L-1],255&k,k>>16,w,m+(2*L-1)*i),n(t[e+2*L-0],255&g,g>>16,w,m+(2*L-0)*i),null!=s&&(k=q+y>>1,g=E+x>>1,n(s[o+2*L-1],255&k,k>>16,b,p+(2*L-1)*i),n(s[o+2*L+0],255&g,g>>16,b,p+(2*L+0)*i)),g=S,y=x}1&N||(k=3*g+y+131074>>2,n(t[e+N-1],255&k,k>>16,w,m+(N-1)*i),null!=s&&(k=3*y+g+131074>>2,n(s[o+N-1],255&k,k>>16,b,p+(N-1)*i)))}}function be(){mi[Pn]=bi,mi[Fn]=Ni,mi[Tn]=pi,mi[Cn]=Li,mi[Dn]=Ai,mi[zn]=gi,mi[Un]=yi,mi[_n]=Ni,mi[Vn]=Li,mi[Wn]=Ai,mi[Hn]=gi}function pe(t){return t&-16384?0>t?0:255:t>>Ei}function Ne(t,r){return pe((19077*t>>8)+(26149*r>>8)-14234)}function Le(t,r,e){return pe((19077*t>>8)-(6419*r>>8)-(13320*e>>8)+8708)}function Ae(t,r){return pe((19077*t>>8)+(33050*r>>8)-17685)}function ge(t,r,e,n,i){n[i+0]=Ne(t,e),n[i+1]=Le(t,r,e),n[i+2]=Ae(t,r)}function ye(t,r,e,n,i){n[i+0]=Ae(t,r),n[i+1]=Le(t,r,e),n[i+2]=Ne(t,e)}function ke(t,r,e,n,i){var s=Le(t,r,e);r=s<<3&224|Ae(t,r)>>3,n[i+0]=248&Ne(t,e)|s>>5,n[i+1]=r}function Se(t,r,e,n,i){var s=240&Ae(t,r)|15;n[i+0]=240&Ne(t,e)|Le(t,r,e)>>4,n[i+1]=s}function xe(t,r,e,n,i){n[i+0]=255,ge(t,r,e,n,i+1)}function qe(t,r,e,n,i){ye(t,r,e,n,i),n[i+3]=255}function Ee(t,r,e,n,i){ge(t,r,e,n,i),n[i+3]=255}function Ht(t,r){return 0>t?0:t>r?r:t}function Me(r,e,n){t[r]=function(t,r,i,s,o,a,u,f,c){for(var h=f+(-2&c)*n;f!=h;)e(t[r+0],i[s+0],o[a+0],u,f),e(t[r+1],i[s+0],o[a+0],u,f+n),r+=2,++s,++a,f+=2*n;1&c&&e(t[r+0],i[s+0],o[a+0],u,f)}}function je(t,r,e){return 0==e?0==t?0==r?6:5:0==r?4:0:e}function Re(t,r,e,n,i){switch(t>>>30){case 3:sn(r,e,n,i,0);break;case 2:on(r,e,n,i);break;case 1:un(r,e,n,i)}}function Ie(t,r){var e,s,o=r.M,a=r.Nb,u=t.oc,f=t.pc+40,c=t.oc,h=t.pc+584,l=t.oc,v=t.pc+600;for(e=0;16>e;++e)u[f+32*e-1]=129;for(e=0;8>e;++e)c[h+32*e-1]=129,l[v+32*e-1]=129;for(0<o?u[f-1-32]=c[h-1-32]=l[v-1-32]=129:(i(u,f-32-1,127,21),i(c,h-32-1,127,9),i(l,v-32-1,127,9)),s=0;s<t.za;++s){var d=r.ya[r.aa+s];if(0<s){for(e=-1;16>e;++e)n(u,f+32*e-4,u,f+32*e+12,4);for(e=-1;8>e;++e)n(c,h+32*e-4,c,h+32*e+4,4),n(l,v+32*e-4,l,v+32*e+4,4)}var w=t.Gd,m=t.Hd+s,b=d.ad,p=d.Hc;if(0<o&&(n(u,f-32,w[m].y,0,16),n(c,h-32,w[m].f,0,8),n(l,v-32,w[m].ea,0,8)),d.Za){var N=u,L=f-32+16;for(0<o&&(s>=t.za-1?i(N,L,w[m].y[15],4):n(N,L,w[m+1].y,0,4)),e=0;4>e;e++)N[L+128+e]=N[L+256+e]=N[L+384+e]=N[L+0+e];for(e=0;16>e;++e,p<<=2)N=u,L=f+Fi[e],hi[d.Ob[e]](N,L),Re(p,b,16*+e,N,L)}else if(N=je(s,o,d.Ob[0]),ci[N](u,f),0!=p)for(e=0;16>e;++e,p<<=2)Re(p,b,16*+e,u,f+Fi[e]);for(e=d.Gc,N=je(s,o,d.Dd),li[N](c,h),li[N](l,v),p=b,N=c,L=h,255&(d=0|e)&&(170&d?an(p,256,N,L):fn(p,256,N,L)),d=l,p=v,255&(e>>=8)&&(170&e?an(b,320,d,p):fn(b,320,d,p)),o<t.Ub-1&&(n(w[m].y,0,u,f+480,16),n(w[m].f,0,c,h+224,8),n(w[m].ea,0,l,v+224,8)),e=8*a*t.B,w=t.sa,m=t.ta+16*s+16*a*t.R,b=t.qa,d=t.ra+8*s+e,p=t.Ha,N=t.Ia+8*s+e,e=0;16>e;++e)n(w,m+e*t.R,u,f+32*e,16);for(e=0;8>e;++e)n(b,d+e*t.B,c,h+32*e,8),n(p,N+e*t.B,l,v+32*e,8)}}function Oe(t,n,i,s,o,a,u,f,c){var h=[0],l=[0],v=0,d=null!=c?c.kd:0,w=null!=c?c:new ee;if(null==t||12>i)return 7;w.data=t,w.w=n,w.ha=i,n=[n],i=[i],w.gb=[w.gb];t:{var m=n,p=i,N=w.gb;if(r(null!=t),r(null!=p),r(null!=N),N[0]=0,12<=p[0]&&!e(t,m[0],"RIFF")){if(e(t,m[0]+8,"WEBP")){N=3;break t}var L=I(t,m[0]+4);if(12>L||4294967286<L){N=3;break t}if(d&&L>p[0]-8){N=7;break t}N[0]=L,m[0]+=12,p[0]-=12}N=0}if(0!=N)return N;for(L=0<w.gb[0],i=i[0];;){t:{var g=t;p=n,N=i;var y=h,k=l,S=m=[0];if((E=v=[v])[0]=0,8>N[0])N=7;else{if(!e(g,p[0],"VP8X")){if(10!=I(g,p[0]+4)){N=3;break t}if(18>N[0]){N=7;break t}var x=I(g,p[0]+8),q=1+R(g,p[0]+12);if(2147483648<=q*(g=1+R(g,p[0]+15))){N=3;break t}null!=S&&(S[0]=x),null!=y&&(y[0]=q),null!=k&&(k[0]=g),p[0]+=18,N[0]-=18,E[0]=1}N=0}}if(v=v[0],m=m[0],0!=N)return N;if(p=!!(2&m),!L&&v)return 3;if(null!=a&&(a[0]=!!(16&m)),null!=u&&(u[0]=p),null!=f&&(f[0]=0),u=h[0],m=l[0],v&&p&&null==c){N=0;break}if(4>i){N=7;break}if(L&&v||!L&&!v&&!e(t,n[0],"ALPH")){i=[i],w.na=[w.na],w.P=[w.P],w.Sa=[w.Sa];t:{x=t,N=n,L=i;var E=w.gb;y=w.na,k=w.P,S=w.Sa,q=22,r(null!=x),r(null!=L),g=N[0];var M=L[0];for(r(null!=y),r(null!=S),y[0]=null,k[0]=null,S[0]=0;;){if(N[0]=g,L[0]=M,8>M){N=7;break t}var j=I(x,g+4);if(4294967286<j){N=3;break t}var O=8+j+1&-2;if(q+=O,0<E&&q>E){N=3;break t}if(!e(x,g,"VP8 ")||!e(x,g,"VP8L")){N=0;break t}if(M[0]<O){N=7;break t}e(x,g,"ALPH")||(y[0]=x,k[0]=g+8,S[0]=j),g+=O,M-=O}}if(i=i[0],w.na=w.na[0],w.P=w.P[0],w.Sa=w.Sa[0],0!=N)break}i=[i],w.Ja=[w.Ja],w.xa=[w.xa];t:if(E=t,N=n,L=i,y=w.gb[0],k=w.Ja,S=w.xa,x=N[0],g=!e(E,x,"VP8 "),q=!e(E,x,"VP8L"),r(null!=E),r(null!=L),r(null!=k),r(null!=S),8>L[0])N=7;else{if(g||q){if(E=I(E,x+4),12<=y&&E>y-12){N=3;break t}if(d&&E>L[0]-8){N=7;break t}k[0]=E,N[0]+=8,L[0]-=8,S[0]=q}else S[0]=5<=L[0]&&47==E[x+0]&&!(E[x+4]>>5),k[0]=L[0];N=0}if(i=i[0],w.Ja=w.Ja[0],w.xa=w.xa[0],n=n[0],0!=N)break;if(4294967286<w.Ja)return 3;if(null==f||p||(f[0]=w.xa?2:1),u=[u],m=[m],w.xa){if(5>i){N=7;break}f=u,d=m,p=a,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(L=[0],E=[0],y=[0],b(k=new A,t,n,i),wt(k,L,E,y)?(null!=f&&(f[0]=L[0]),null!=d&&(d[0]=E[0]),null!=p&&(p[0]=y[0]),t=1):t=0):t=0}else{if(10>i){N=7;break}f=m,null==t||10>i||!Kt(t,n+3,i-3)?t=0:(d=t[n+0]|t[n+1]<<8|t[n+2]<<16,p=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&d||3<(d>>1&7)||!(d>>4&1)||d>>5>=w.Ja||!p||!t?t=0:(u&&(u[0]=p),f&&(f[0]=t),t=1))}if(!t)return 3;if(u=u[0],m=m[0],v&&(h[0]!=u||l[0]!=m))return 3;null!=c&&(c[0]=w,c.offset=n-c.w,r(4294967286>n-c.w),r(c.offset==c.ha-i));break}return 0==N||7==N&&v&&null==c?(null!=a&&(a[0]|=null!=w.na&&0<w.na.length),null!=s&&(s[0]=u),null!=o&&(o[0]=m),0):N}function Be(t,r,e){var n=r.width,i=r.height,s=0,o=0,a=n,u=i;if(r.Da=null!=t&&0<t.Da,r.Da&&(a=t.cd,u=t.bd,s=t.v,o=t.j,11>e||(s&=-2,o&=-2),0>s||0>o||0>=a||0>=u||s+a>n||o+u>i))return 0;if(r.v=s,r.j=o,r.va=s+a,r.o=o+u,r.U=a,r.T=u,r.da=null!=t&&0<t.da,r.da){if(!F(a,u,e=[t.ib],s=[t.hb]))return 0;r.ib=e[0],r.hb=s[0]}return r.ob=null!=t&&t.ob,r.Kb=null==t||!t.Sd,r.da&&(r.ob=r.ib<3*n/4&&r.hb<3*i/4,r.Kb=0),1}function Pe(t){if(null==t)return 2;if(11>t.S){var r=t.f.RGBA;r.fb+=(t.height-1)*r.A,r.A=-r.A}else r=t.f.kb,t=t.height,r.O+=(t-1)*r.fa,r.fa=-r.fa,r.N+=(t-1>>1)*r.Ab,r.Ab=-r.Ab,r.W+=(t-1>>1)*r.Db,r.Db=-r.Db,null!=r.F&&(r.J+=(t-1)*r.lb,r.lb=-r.lb);return 0}function Fe(t,r,e,n){if(null==n||0>=t||0>=r)return 2;if(null!=e){if(e.Da){var i=e.cd,o=e.bd,a=-2&e.v,u=-2&e.j;if(0>a||0>u||0>=i||0>=o||a+i>t||u+o>r)return 2;t=i,r=o}if(e.da){if(!F(t,r,i=[e.ib],o=[e.hb]))return 2;t=i[0],r=o[0]}}n.width=t,n.height=r;t:{var f=n.width,c=n.height;if(t=n.S,0>=f||0>=c||!(t>=Pn&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){a=o=i=r=0;var h=(u=f*zi[t])*c;if(11>t||(o=(c+1)/2*(r=(f+1)/2),12==t&&(a=(i=f)*c)),null==(c=s(h+2*o+a))){t=1;break t}n.sd=c,11>t?((f=n.f.RGBA).eb=c,f.fb=0,f.A=u,f.size=h):((f=n.f.kb).y=c,f.O=0,f.fa=u,f.Fd=h,f.f=c,f.N=0+h,f.Ab=r,f.Cd=o,f.ea=c,f.W=0+h+o,f.Db=r,f.Ed=o,12==t&&(f.F=c,f.J=0+h+2*o),f.Tc=a,f.lb=i)}if(r=1,i=n.S,o=n.width,a=n.height,i>=Pn&&13>i)if(11>i)t=n.f.RGBA,r&=(u=Math.abs(t.A))*(a-1)+o<=t.size,r&=u>=o*zi[i],r&=null!=t.eb;else{t=n.f.kb,u=(o+1)/2,h=(a+1)/2,f=Math.abs(t.fa),c=Math.abs(t.Ab);var l=Math.abs(t.Db),v=Math.abs(t.lb),d=v*(a-1)+o;r&=f*(a-1)+o<=t.Fd,r&=c*(h-1)+u<=t.Cd,r=(r&=l*(h-1)+u<=t.Ed)&f>=o&c>=u&l>=u,r&=null!=t.y,r&=null!=t.f,r&=null!=t.ea,12==i&&(r&=v>=o,r&=d<=t.Tc,r&=null!=t.F)}else r=0;t=r?0:2}}return 0!=t||null!=e&&e.fd&&(t=Pe(n)),t}var Te=64,Ce=[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],De=24,ze=32,Ue=8,_e=[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];D("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,r,e){return r[e+0]},t.Predictor3=function(t,r,e){return r[e+1]},t.Predictor4=function(t,r,e){return r[e-1]},t.Predictor5=function(t,r,e){return U(U(t,r[e+1]),r[e+0])},t.Predictor6=function(t,r,e){return U(t,r[e-1])},t.Predictor7=function(t,r,e){return U(t,r[e+0])},t.Predictor8=function(t,r,e){return U(r[e-1],r[e+0])},t.Predictor9=function(t,r,e){return U(r[e+0],r[e+1])},t.Predictor10=function(t,r,e){return U(U(t,r[e-1]),U(r[e+0],r[e+1]))},t.Predictor11=function(t,r,e){var n=r[e+0];return 0>=W(n>>24&255,t>>24&255,(r=r[e-1])>>24&255)+W(n>>16&255,t>>16&255,r>>16&255)+W(n>>8&255,t>>8&255,r>>8&255)+W(255&n,255&t,255&r)?n:t},t.Predictor12=function(t,r,e){var n=r[e+0];return(_((t>>24&255)+(n>>24&255)-((r=r[e-1])>>24&255))<<24|_((t>>16&255)+(n>>16&255)-(r>>16&255))<<16|_((t>>8&255)+(n>>8&255)-(r>>8&255))<<8|_((255&t)+(255&n)-(255&r)))>>>0},t.Predictor13=function(t,r,e){var n=r[e-1];return(V((t=U(t,r[e+0]))>>24&255,n>>24&255)<<24|V(t>>16&255,n>>16&255)<<16|V(t>>8&255,n>>8&255)<<8|V(255&t,255&n))>>>0};var Ve=t.PredictorAdd0;t.PredictorAdd1=H,D("Predictor2","PredictorAdd2"),D("Predictor3","PredictorAdd3"),D("Predictor4","PredictorAdd4"),D("Predictor5","PredictorAdd5"),D("Predictor6","PredictorAdd6"),D("Predictor7","PredictorAdd7"),D("Predictor8","PredictorAdd8"),D("Predictor9","PredictorAdd9"),D("Predictor10","PredictorAdd10"),D("Predictor11","PredictorAdd11"),D("Predictor12","PredictorAdd12"),D("Predictor13","PredictorAdd13");var We=t.PredictorAdd2;K("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),K("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var He,Ge=t.ColorIndexInverseTransform,Ze=t.MapARGB,Je=t.VP8LColorIndexInverseTransformAlpha,Ke=t.MapAlpha,Ye=t.VP8LPredictorsAdd=[];Ye.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var $e,Xe,Qe,tn,rn,en,nn,sn,on,an,un,fn,cn,hn,ln,vn,dn,wn,mn,bn,pn,Nn,Ln,An,gn,yn,kn,Sn,xn=s(511),qn=s(2041),En=s(225),Mn=s(767),jn=0,Rn=qn,In=En,On=Mn,Bn=xn,Pn=0,Fn=1,Tn=2,Cn=3,Dn=4,zn=5,Un=6,_n=7,Vn=8,Wn=9,Hn=10,Gn=[2,3,7],Zn=[3,3,11],Jn=[280,256,256,256,40],Kn=[0,1,1,1,0],Yn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],$n=[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],Xn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qn=8,ti=[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],ri=[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],ei=null,ni=[[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]],ii=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],si=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],oi=[[[[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]]]],ai=[[[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]]],ui=[[[[255,255,255,255,255,255,255,255,255,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]]]],fi=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ci=[],hi=[],li=[],vi=1,di=2,wi=[],mi=[];me("UpsampleRgbLinePair",ge,3),me("UpsampleBgrLinePair",ye,3),me("UpsampleRgbaLinePair",Ee,4),me("UpsampleBgraLinePair",qe,4),me("UpsampleArgbLinePair",xe,4),me("UpsampleRgba4444LinePair",Se,2),me("UpsampleRgb565LinePair",ke,2);var bi=t.UpsampleRgbLinePair,pi=t.UpsampleBgrLinePair,Ni=t.UpsampleRgbaLinePair,Li=t.UpsampleBgraLinePair,Ai=t.UpsampleArgbLinePair,gi=t.UpsampleRgba4444LinePair,yi=t.UpsampleRgb565LinePair,ki=16,Si=1<<ki-1,xi=-227,qi=482,Ei=6,Mi=0,ji=s(256),Ri=s(256),Ii=s(256),Oi=s(256),Bi=s(qi-xi),Pi=s(qi-xi);Me("YuvToRgbRow",ge,3),Me("YuvToBgrRow",ye,3),Me("YuvToRgbaRow",Ee,4),Me("YuvToBgraRow",qe,4),Me("YuvToArgbRow",xe,4),Me("YuvToRgba4444Row",Se,2),Me("YuvToRgb565Row",ke,2);var Fi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ti=[0,2,8],Ci=[8,7,6,4,4,2,2,2,1,1,1,1],Di=1;this.WebPDecodeRGBA=function(t,e,a,u,f){var c=Fn,h=new re,l=new ot;h.ba=l,l.S=c,l.width=[l.width],l.height=[l.height];var v=l.width,d=l.height,w=new at;if(null==w||null==t)var m=2;else r(null!=w),m=Oe(t,e,a,w.width,w.height,w.Pd,w.Qd,w.format,null);if(0!=m?v=0:(null!=v&&(v[0]=w.width[0]),null!=d&&(d[0]=w.height[0]),v=1),v){l.width=l.width[0],l.height=l.height[0],null!=u&&(u[0]=l.width),null!=f&&(f[0]=l.height);t:{if(u=new Gt,(f=new ee).data=t,f.w=e,f.ha=a,f.kd=1,e=[0],r(null!=f),(0==(t=Oe(f.data,f.w,f.ha,null,null,null,e,null,f))||7==t)&&e[0]&&(t=4),0==(e=t)){if(r(null!=h),u.data=f.data,u.w=f.w+f.offset,u.ha=f.ha-f.offset,u.put=vt,u.ac=lt,u.bc=dt,u.ma=h,f.xa){if(null==(t=Et())){h=1;break t}if(function(t,e){var n=[0],i=[0],s=[0];r:for(;;){if(null==t)return 0;if(null==e)return t.a=2,0;if(t.l=e,t.a=0,b(t.m,e.data,e.w,e.ha),!wt(t.m,n,i,s)){t.a=3;break r}if(t.xb=di,e.width=n[0],e.height=i[0],!Mt(n[0],i[0],1,t,null))break r;return 1}return r(0!=t.a),0}(t,u)){if(u=0==(e=Fe(u.width,u.height,h.Oa,h.ba))){r:{u=t;e:for(;;){if(null==u){u=0;break r}if(r(null!=u.s.yc),r(null!=u.s.Ya),r(0<u.s.Wb),r(null!=(a=u.l)),r(null!=(f=a.ma)),0!=u.xb){if(u.ca=f.ba,u.tb=f.tb,r(null!=u.ca),!Be(f.Oa,a,Cn)){u.a=2;break e}if(!jt(u,a.width))break e;if(a.da)break e;if((a.da||nt(u.ca.S))&&we(),11>u.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=u.ca.f.kb.F&&we()),u.Pb&&0<u.s.ua&&null==u.s.vb.X&&!O(u.s.vb,u.s.Wa.Xa)){u.a=1;break e}u.xb=0}if(!xt(u,u.V,u.Ba,u.c,u.i,a.o,gt))break e;f.Dc=u.Ma,u=1;break r}r(0!=u.a),u=0}u=!u}u&&(e=t.a)}else e=t.a}else{if(null==(t=new Zt)){h=1;break t}if(t.Fa=f.na,t.P=f.P,t.qc=f.Sa,Yt(t,u)){if(0==(e=Fe(u.width,u.height,h.Oa,h.ba))){if(t.Aa=0,a=h.Oa,r(null!=(f=t)),null!=a){if(0<(v=0>(v=a.Md)?0:100<v?255:255*v/100)){for(d=w=0;4>d;++d)12>(m=f.pb[d]).lc&&(m.ia=v*Ci[0>m.lc?0:m.lc]>>3),w|=m.ia;w&&(alert("todo:VP8InitRandom"),f.ia=1)}f.Ga=a.Id,100<f.Ga?f.Ga=100:0>f.Ga&&(f.Ga=0)}(function(t,e){if(null==t)return 0;if(null==e)return Jt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Yt(t,e))return 0;if(r(t.cb),null==e.ac||e.ac(e)){e.ob&&(t.L=0);var a=Ti[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=e.v-a>>4,t.zb=e.j-a>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=e.o+15+a>>4,t.Hb=e.va+15+a>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var u=t.ed;for(a=0;4>a;++a){var f;if(t.Qa.Cb){var c=t.Qa.Lb[a];t.Qa.Fb||(c+=u.Tb)}else c=u.Tb;for(f=0;1>=f;++f){var h=t.gd[a][f],l=c;if(u.Pc&&(l+=u.vd[0],f&&(l+=u.od[0])),0<(l=0>l?0:63<l?63:l)){var v=l;0<u.wb&&(v=4<u.wb?v>>2:v>>1)>9-u.wb&&(v=9-u.wb),1>v&&(v=1),h.dd=v,h.tc=2*l+v,h.ld=40<=l?2:15<=l?1:0}else h.tc=0;h.La=f}}}a=0}else Jt(t,6,"Frame setup failed"),a=t.a;if(a=0==a){if(a){t.$c=0,0<t.Aa||(t.Ic=Di);r:{a=t.Ic,u=4*(v=t.za);var d=32*v,w=v+1,m=0<t.L?v*(0<t.Aa?2:1):0,b=(2==t.Aa?2:1)*v;if((h=u+832+(f=3*(16*a+Ti[t.L])/2*d)+(c=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=h)a=0;else{if(h>t.Vb){if(t.Vb=0,t.Ec=s(h),t.Fc=0,null==t.Ec){a=Jt(t,1,"no memory during frame initialization.");break r}t.Vb=h}h=t.Ec,l=t.Fc,t.Ac=h,t.Bc=l,l+=u,t.Gd=o(d,Vt),t.Hd=0,t.rb=o(w+1,Dt),t.sb=1,t.wa=m?o(m,Ct):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=v),r(true),t.oc=h,t.pc=l,l+=832,t.ya=o(b,Ut),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=v),t.R=16*v,t.B=8*v,v=(d=Ti[t.L])*t.R,d=d/2*t.B,t.sa=h,t.ta=l+v,t.qa=t.sa,t.ra=t.ta+16*a*t.R+d,t.Ha=t.qa,t.Ia=t.ra+8*a*t.B+d,t.$c=0,l+=f,t.mb=c?h:null,t.nb=c?l:null,r(l+c<=t.Fc+t.Vb),Xt(t),i(t.Ac,t.Bc,0,u),a=1}}if(a){if(e.ka=0,e.y=t.sa,e.O=t.ta,e.f=t.qa,e.N=t.ra,e.ea=t.Ha,e.Vd=t.Ia,e.fa=t.R,e.Rc=t.B,e.F=null,e.J=0,!jn){for(a=-255;255>=a;++a)xn[255+a]=0>a?-a:a;for(a=-1020;1020>=a;++a)qn[1020+a]=-128>a?-128:127<a?127:a;for(a=-112;112>=a;++a)En[112+a]=-16>a?-16:15<a?15:a;for(a=-255;510>=a;++a)Mn[255+a]=0>a?0:255<a?255:a;jn=1}nn=ur,sn=ir,an=sr,un=or,fn=ar,on=nr,cn=Zr,hn=Jr,ln=$r,vn=Xr,dn=Kr,wn=Yr,mn=Qr,bn=te,pn=Ur,Nn=_r,Ln=Vr,An=Wr,hi[0]=yr,hi[1]=cr,hi[2]=Ar,hi[3]=gr,hi[4]=kr,hi[5]=xr,hi[6]=Sr,hi[7]=qr,hi[8]=Mr,hi[9]=Er,ci[0]=mr,ci[1]=lr,ci[2]=vr,ci[3]=dr,ci[4]=br,ci[5]=pr,ci[6]=Nr,li[0]=Or,li[1]=hr,li[2]=jr,li[3]=Rr,li[4]=Pr,li[5]=Br,li[6]=Fr,a=1}else a=0}a&&(a=function(t,e){for(t.M=0;t.M<t.Va;++t.M){var o,a=t.Jc[t.M&t.Xb],u=t.m,f=t;for(o=0;o<f.za;++o){var c=u,h=f,l=h.Ac,v=h.Bc+4*o,d=h.zc,w=h.ya[h.aa+o];if(h.Qa.Bb?w.$b=E(c,h.Pa.jb[0])?2+E(c,h.Pa.jb[2]):E(c,h.Pa.jb[1]):w.$b=0,h.kc&&(w.Ad=E(c,h.Bd)),w.Za=!E(c,145)+0,w.Za){var m=w.Ob,b=0;for(h=0;4>h;++h){var p,N=d[0+h];for(p=0;4>p;++p){N=ai[l[v+p]][N];for(var L=si[E(c,N[0])];0<L;)L=si[2*L+E(c,N[L])];N=-L,l[v+p]=N}n(m,b,l,v,4),b+=4,d[0+h]=N}}else N=E(c,156)?E(c,128)?1:3:E(c,163)?2:0,w.Ob[0]=N,i(l,v,N,4),i(d,0,N,4);w.Dd=E(c,142)?E(c,114)?E(c,183)?1:3:2:0}if(f.m.Ka)return Jt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(f=a,c=(u=t).rb[u.sb-1],l=u.rb[u.sb+u.ja],o=u.ya[u.aa+u.ja],v=u.kc?o.Ad:0)c.la=l.la=0,o.Za||(c.Na=l.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var A,g;if(c=l,l=f,v=u.Pa.Xc,d=u.ya[u.aa+u.ja],w=u.pb[d.$b],h=d.ad,m=0,b=u.rb[u.sb-1],N=p=0,i(h,m,0,384),d.Za)var y=0,k=v[3];else{L=s(16);var S=c.Na+b.Na;if(S=ei(l,v[1],S,w.Eb,0,L,0),c.Na=b.Na=(0<S)+0,1<S)nn(L,0,h,m);else{var x=L[0]+3>>3;for(L=0;256>L;L+=16)h[m+L]=x}y=1,k=v[0]}var q=15&c.la,M=15&b.la;for(L=0;4>L;++L){var j=1&M;for(x=g=0;4>x;++x)q=q>>1|(j=(S=ei(l,k,S=j+(1&q),w.Sc,y,h,m))>y)<<7,g=g<<2|(3<S?3:1<S?2:0!=h[m+0]),m+=16;q>>=4,M=M>>1|j<<7,p=(p<<8|g)>>>0}for(k=q,y=M>>4,A=0;4>A;A+=2){for(g=0,q=c.la>>4+A,M=b.la>>4+A,L=0;2>L;++L){for(j=1&M,x=0;2>x;++x)S=j+(1&q),q=q>>1|(j=0<(S=ei(l,v[2],S,w.Qc,0,h,m)))<<3,g=g<<2|(3<S?3:1<S?2:0!=h[m+0]),m+=16;q>>=2,M=M>>1|j<<5}N|=g<<4*A,k|=q<<4<<A,y|=(240&M)<<A}c.la=k,b.la=y,d.Hc=p,d.Gc=N,d.ia=43690&N?0:w.ia,v=!(p|N)}if(0<u.L&&(u.wa[u.Y+u.ja]=u.gd[o.$b][o.Za],u.wa[u.Y+u.ja].La|=!v),f.Ka)return Jt(t,7,"Premature end-of-file encountered.")}if(Xt(t),u=e,f=1,o=(a=t).D,c=0<a.L&&a.M>=a.zb&&a.M<=a.Va,0==a.Aa)r:{if(o.M=a.M,o.uc=c,Ie(a,o),f=1,o=(g=a.D).Nb,c=(N=Ti[a.L])*a.R,l=N/2*a.B,L=16*o*a.R,x=8*o*a.B,v=a.sa,d=a.ta-c+L,w=a.qa,h=a.ra-l+x,m=a.Ha,b=a.Ia-l+x,M=0==(q=g.M),p=q>=a.Va-1,2==a.Aa&&Ie(a,g),g.uc)for(j=(S=a).D.M,r(S.D.uc),g=S.yb;g<S.Hb;++g){y=g,k=j;var R=(I=(U=S).D).Nb;A=U.R;var I=I.wa[I.Y+y],O=U.sa,B=U.ta+16*R*A+16*y,P=I.dd,F=I.tc;if(0!=F)if(r(3<=F),1==U.L)0<y&&Nn(O,B,A,F+4),I.La&&An(O,B,A,F),0<k&&pn(O,B,A,F+4),I.La&&Ln(O,B,A,F);else{var T=U.B,C=U.qa,D=U.ra+8*R*T+8*y,z=U.Ha,U=U.Ia+8*R*T+8*y;R=I.ld,0<y&&(hn(O,B,A,F+4,P,R),vn(C,D,z,U,T,F+4,P,R)),I.La&&(wn(O,B,A,F,P,R),bn(C,D,z,U,T,F,P,R)),0<k&&(cn(O,B,A,F+4,P,R),ln(C,D,z,U,T,F+4,P,R)),I.La&&(dn(O,B,A,F,P,R),mn(C,D,z,U,T,F,P,R))}}if(a.ia&&alert("todo:DitherRow"),null!=u.put){if(g=16*q,q=16*(q+1),M?(u.y=a.sa,u.O=a.ta+L,u.f=a.qa,u.N=a.ra+x,u.ea=a.Ha,u.W=a.Ia+x):(g-=N,u.y=v,u.O=d,u.f=w,u.N=h,u.ea=m,u.W=b),p||(q-=N),q>u.o&&(q=u.o),u.F=null,u.J=null,null!=a.Fa&&0<a.Fa.length&&g<q&&(u.J=ce(a,u,g,q-g),u.F=a.mb,null==u.F&&0==u.F.length)){f=Jt(a,3,"Could not decode alpha data.");break r}g<u.j&&(N=u.j-g,g=u.j,r(!(1&N)),u.O+=a.R*N,u.N+=a.B*(N>>1),u.W+=a.B*(N>>1),null!=u.F&&(u.J+=u.width*N)),g<q&&(u.O+=u.v,u.N+=u.v>>1,u.W+=u.v>>1,null!=u.F&&(u.J+=u.v),u.ka=g-u.j,u.U=u.va-u.v,u.T=q-g,f=u.put(u))}o+1!=a.Ic||p||(n(a.sa,a.ta-c,v,d+16*a.R,c),n(a.qa,a.ra-l,w,h+8*a.B,l),n(a.Ha,a.Ia-l,m,b+8*a.B,l))}if(!f)return Jt(t,6,"Output aborted.")}return 1}(t,e)),null!=e.bc&&e.bc(e),a&=1}return a?(t.cb=0,a):0})(t,u)||(e=t.a)}}else e=t.a}0==e&&null!=h.Oa&&h.Oa.fd&&(e=Pe(h.ba))}h=e}c=0!=h?null:11>c?l.f.RGBA.eb:l.f.kb.y}else c=null;return c};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function f(t,r){for(var e="",n=0;n<4;n++)e+=String.fromCharCode(t[r++]);return e}function c(t,r){return t[r+0]|t[r+1]<<8}function h(t,r){return(t[r+0]|t[r+1]<<8|t[r+2]<<16)>>>0}function l(t,r){return(t[r+0]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}new u;var v=[0],d=[0],w=[],m=new u,b=t,p=function(t,r){var e={},n=0,i=false,s=0,o=0;if(e.frames=[],!
175
175
  /** @license
176
176
  * Copyright (c) 2017 Dominik Homberger
177
177
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -198,7 +198,7 @@ function(t){var r=function(t){var r,e,n,i,s,o,a,u,f,c;for(e=[],n=0,i=(t+=r="\0\0
198
198
  * Licensed under the MIT License.
199
199
  * http://opensource.org/licenses/mit-license
200
200
  */
201
- function(t){t.loadFile=function(t,r,e){return function(t,r,e){r=false!==r,e="function"==typeof e?e:function(){};var n=void 0;try{n=function(t,r,e){var n=new XMLHttpRequest,i=0,s=function(t){var r=t.length,e=[],n=String.fromCharCode;for(i=0;i<r;i+=1)e.push(n(255&t.charCodeAt(i)));return e.join("")};if(n.open("GET",t,!r),n.overrideMimeType("text/plain; charset=x-user-defined"),false===r&&(n.onload=function(){200===n.status?e(s(this.responseText)):e(void 0)}),n.send(null),r&&200===n.status)return s(n.responseText)}(t,r,e)}catch(t){}return n}(t,r,e)},t.loadImageFile=t.loadFile}(hi.API),function(r){function e(){return(In.html2canvas?Promise.resolve(In.html2canvas):import("./p-DeorBmj5.js").then((function(t){return t.h}))).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function n(){return(In.DOMPurify?Promise.resolve(In.DOMPurify):import("./p-Bjem63qI.js")).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var i=function(r){var e=t(r);return"undefined"===e?"undefined":"string"===e||r instanceof String?"string":"number"===e||r instanceof Number?"number":"function"===e||r instanceof Function?"function":r&&r.constructor===Array?"array":r&&1===r.nodeType?"element":"object"===e?"object":"unknown"},s=function(t,r){var e=document.createElement(t);for(var n in r.className&&(e.className=r.className),r.innerHTML&&r.dompurify&&(e.innerHTML=r.dompurify.sanitize(r.innerHTML)),r.style)e.style[n]=r.style[n];return e},o=function t(r,e){for(var n=3===r.nodeType?document.createTextNode(r.nodeValue):r.cloneNode(false),i=r.firstChild;i;i=i.nextSibling)true!==e&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(t(i,e));return 1===r.nodeType&&("CANVAS"===r.nodeName?(n.width=r.width,n.height=r.height,n.getContext("2d").drawImage(r,0,0)):"TEXTAREA"!==r.nodeName&&"SELECT"!==r.nodeName||(n.value=r.value),n.addEventListener("load",(function(){n.scrollTop=r.scrollTop,n.scrollLeft=r.scrollLeft}),true)),n},a=function t(r){var e=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),e);return(n=n.setProgress(1,t,1,[t])).set(r)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(t,r){return t.__proto__=r||a.prototype,t},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:true,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(t,r){return this.then((function(){switch(r=r||function(t){switch(i(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t),r){case"string":return this.then(n).then((function(r){return this.set({src:s("div",{innerHTML:t,dompurify:r})})}));case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}}))},a.prototype.to=function(t){switch(t){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 t={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},r=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===r.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(r),this.prop.container.firstChild.appendChild(s("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"}))},a.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var r=Object.assign({},this.opt.html2canvas);return delete r.onrendered,t(this.prop.container,r)})).then((function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},a.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var r=this.opt.jsPDF,e=this.opt.fontFaces,n="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,i=Object.assign({async:true,allowTaint:true,scale:n,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:true,proxy:null,removeContainer:true,foreignObjectRendering:false,useCORS:false},this.opt.html2canvas);if(delete i.onrendered,r.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,r.context2d.posX=this.opt.x,r.context2d.posY=this.opt.y,r.context2d.margin=this.opt.margin,r.context2d.fontFaces=e,e)for(var s=0;s<e.length;++s){var o=e[s],a=o.src.find((function(t){return"truetype"===t.format}));a&&r.addFont(a.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,r.context2d.save(true),t(this.prop.container,i)})).then((function(t){this.opt.jsPDF.context2d.restore(true),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t}))},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(t,r,e){return"img"===(e=e||"pdf").toLowerCase()||"image"===e.toLowerCase()?this.outputImg(t,r):this.outputPdf(t,r)},a.prototype.outputPdf=function(t,r){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,r)}))},a.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(t){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 "'+t+'" is not supported.'}}))},a.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}: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(t){if("object"!==i(t))return this;var r=Object.keys(t||{}).map((function(r){if(r in a.template.prop)return function(){this.prop[r]=t[r]};switch(r){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[r]=t[r]}}}),this);return this.then((function(){return this.thenList(r)}))},a.prototype.get=function(t,r){return this.then((function(){var e=t in a.template.prop?this.prop[t]:this.opt[t];return r?r(e):e}))},a.prototype.setMargin=function(t){return this.then((function(){switch(i(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t})).then(this.setPageSize)},a.prototype.setPageSize=function(t){function r(t,r){return Math.floor(t*r/72*96)}return this.then((function(){(t=t||hi.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:r(t.inner.width,t.k),height:r(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t}))},a.prototype.setProgress=function(t,r,e,n){return null!=t&&(this.progress.val=t),null!=r&&(this.progress.state=r),null!=e&&(this.progress.n=e),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(t,r,e,n){return this.setProgress(t?this.progress.val+t:null,r||null,e?this.progress.n+e:null,n?this.progress.stack.concat(n):null)},a.prototype.then=function(t,r){var e=this;return this.thenCore(t,r,(function(t,r){return e.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,(function(r){return e.updateProgress(null,t),r})).then(t,r).then((function(t){return e.updateProgress(1),t}))}))},a.prototype.thenCore=function(t,r,e){e=e||Promise.prototype.then;var n=this;t&&(t=t.bind(n)),r&&(r=r.bind(n));var i=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?n:a.convert(Object.assign({},n),Promise.prototype),s=e.call(i,t,r);return a.convert(s,n.__proto__)},a.prototype.thenExternal=function(t,r){return Promise.prototype.then.call(this,t,r)},a.prototype.thenList=function(t){var r=this;return t.forEach((function(t){r=r.thenCore(t)})),r},a.prototype.catch=function(t){t&&(t=t.bind(this));var r=Promise.prototype.catch.call(this,t);return a.convert(r,this)},a.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},a.prototype.error=function(t){return this.then((function(){throw new Error(t)}))},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,hi.getPageSize=function(r,e,n){if("object"===t(r)){var i=r;r=i.orientation,e=i.unit||e,n=i.format||n}e=e||"mm",n=n||"a4",r=(""+(r||"P")).toLowerCase();var s,o=(""+n).toLowerCase(),a={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(e){case"pt":s=1;break;case"mm":s=72/25.4;break;case"cm":s=72/2.54;break;case"in":s=72;break;case"px":s=.75;break;case"pc":case"em":s=12;break;case"ex":s=6;break;default:throw"Invalid unit: "+e}var u,f=0,c=0;if(a.hasOwnProperty(o))f=a[o][1]/s,c=a[o][0]/s;else try{f=n[1],c=n[0]}catch(t){throw new Error("Invalid format: "+n)}if("p"===r||"portrait"===r)r="p",c>f&&(u=c,c=f,f=u);else{if("l"!==r&&"landscape"!==r)throw"Invalid orientation: "+r;r="l",f>c&&(u=c,c=f,f=u)}return{width:c,height:f,unit:e,k:s,orientation:r}},r.html=function(t,r){(r=r||{}).callback=r.callback||function(){},r.html2canvas=r.html2canvas||{},r.html2canvas.canvas=r.html2canvas.canvas||this.canvas,r.jsPDF=r.jsPDF||this,r.fontFaces=r.fontFaces?r.fontFaces.map(ss):null;var e=new a(r);return r.worker?e:e.from(t).doCallback()}}(hi.API),hi.API.addJS=function(t){return ws=t,this.internal.events.subscribe("postPutResources",(function(){vs=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(vs+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),ds=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+ws+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==vs&&void 0!==ds&&this.internal.out("/Names <</JavaScript "+vs+" 0 R>>")})),this
201
+ function(t){t.loadFile=function(t,r,e){return function(t,r,e){r=false!==r,e="function"==typeof e?e:function(){};var n=void 0;try{n=function(t,r,e){var n=new XMLHttpRequest,i=0,s=function(t){var r=t.length,e=[],n=String.fromCharCode;for(i=0;i<r;i+=1)e.push(n(255&t.charCodeAt(i)));return e.join("")};if(n.open("GET",t,!r),n.overrideMimeType("text/plain; charset=x-user-defined"),false===r&&(n.onload=function(){200===n.status?e(s(this.responseText)):e(void 0)}),n.send(null),r&&200===n.status)return s(n.responseText)}(t,r,e)}catch(t){}return n}(t,r,e)},t.loadImageFile=t.loadFile}(hi.API),function(r){function e(){return(In.html2canvas?Promise.resolve(In.html2canvas):import("./p-2D2ZgtY0.js").then((function(t){return t.h}))).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function n(){return(In.DOMPurify?Promise.resolve(In.DOMPurify):import("./p-Bjem63qI.js")).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var i=function(r){var e=t(r);return"undefined"===e?"undefined":"string"===e||r instanceof String?"string":"number"===e||r instanceof Number?"number":"function"===e||r instanceof Function?"function":r&&r.constructor===Array?"array":r&&1===r.nodeType?"element":"object"===e?"object":"unknown"},s=function(t,r){var e=document.createElement(t);for(var n in r.className&&(e.className=r.className),r.innerHTML&&r.dompurify&&(e.innerHTML=r.dompurify.sanitize(r.innerHTML)),r.style)e.style[n]=r.style[n];return e},o=function t(r,e){for(var n=3===r.nodeType?document.createTextNode(r.nodeValue):r.cloneNode(false),i=r.firstChild;i;i=i.nextSibling)true!==e&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(t(i,e));return 1===r.nodeType&&("CANVAS"===r.nodeName?(n.width=r.width,n.height=r.height,n.getContext("2d").drawImage(r,0,0)):"TEXTAREA"!==r.nodeName&&"SELECT"!==r.nodeName||(n.value=r.value),n.addEventListener("load",(function(){n.scrollTop=r.scrollTop,n.scrollLeft=r.scrollLeft}),true)),n},a=function t(r){var e=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),e);return(n=n.setProgress(1,t,1,[t])).set(r)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(t,r){return t.__proto__=r||a.prototype,t},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:true,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(t,r){return this.then((function(){switch(r=r||function(t){switch(i(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t),r){case"string":return this.then(n).then((function(r){return this.set({src:s("div",{innerHTML:t,dompurify:r})})}));case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}}))},a.prototype.to=function(t){switch(t){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 t={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},r=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===r.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(r),this.prop.container.firstChild.appendChild(s("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"}))},a.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var r=Object.assign({},this.opt.html2canvas);return delete r.onrendered,t(this.prop.container,r)})).then((function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},a.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var r=this.opt.jsPDF,e=this.opt.fontFaces,n="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,i=Object.assign({async:true,allowTaint:true,scale:n,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:true,proxy:null,removeContainer:true,foreignObjectRendering:false,useCORS:false},this.opt.html2canvas);if(delete i.onrendered,r.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,r.context2d.posX=this.opt.x,r.context2d.posY=this.opt.y,r.context2d.margin=this.opt.margin,r.context2d.fontFaces=e,e)for(var s=0;s<e.length;++s){var o=e[s],a=o.src.find((function(t){return"truetype"===t.format}));a&&r.addFont(a.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,r.context2d.save(true),t(this.prop.container,i)})).then((function(t){this.opt.jsPDF.context2d.restore(true),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t}))},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(t,r,e){return"img"===(e=e||"pdf").toLowerCase()||"image"===e.toLowerCase()?this.outputImg(t,r):this.outputPdf(t,r)},a.prototype.outputPdf=function(t,r){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,r)}))},a.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(t){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 "'+t+'" is not supported.'}}))},a.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}: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(t){if("object"!==i(t))return this;var r=Object.keys(t||{}).map((function(r){if(r in a.template.prop)return function(){this.prop[r]=t[r]};switch(r){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[r]=t[r]}}}),this);return this.then((function(){return this.thenList(r)}))},a.prototype.get=function(t,r){return this.then((function(){var e=t in a.template.prop?this.prop[t]:this.opt[t];return r?r(e):e}))},a.prototype.setMargin=function(t){return this.then((function(){switch(i(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t})).then(this.setPageSize)},a.prototype.setPageSize=function(t){function r(t,r){return Math.floor(t*r/72*96)}return this.then((function(){(t=t||hi.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:r(t.inner.width,t.k),height:r(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t}))},a.prototype.setProgress=function(t,r,e,n){return null!=t&&(this.progress.val=t),null!=r&&(this.progress.state=r),null!=e&&(this.progress.n=e),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(t,r,e,n){return this.setProgress(t?this.progress.val+t:null,r||null,e?this.progress.n+e:null,n?this.progress.stack.concat(n):null)},a.prototype.then=function(t,r){var e=this;return this.thenCore(t,r,(function(t,r){return e.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,(function(r){return e.updateProgress(null,t),r})).then(t,r).then((function(t){return e.updateProgress(1),t}))}))},a.prototype.thenCore=function(t,r,e){e=e||Promise.prototype.then;var n=this;t&&(t=t.bind(n)),r&&(r=r.bind(n));var i=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?n:a.convert(Object.assign({},n),Promise.prototype),s=e.call(i,t,r);return a.convert(s,n.__proto__)},a.prototype.thenExternal=function(t,r){return Promise.prototype.then.call(this,t,r)},a.prototype.thenList=function(t){var r=this;return t.forEach((function(t){r=r.thenCore(t)})),r},a.prototype.catch=function(t){t&&(t=t.bind(this));var r=Promise.prototype.catch.call(this,t);return a.convert(r,this)},a.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},a.prototype.error=function(t){return this.then((function(){throw new Error(t)}))},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,hi.getPageSize=function(r,e,n){if("object"===t(r)){var i=r;r=i.orientation,e=i.unit||e,n=i.format||n}e=e||"mm",n=n||"a4",r=(""+(r||"P")).toLowerCase();var s,o=(""+n).toLowerCase(),a={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(e){case"pt":s=1;break;case"mm":s=72/25.4;break;case"cm":s=72/2.54;break;case"in":s=72;break;case"px":s=.75;break;case"pc":case"em":s=12;break;case"ex":s=6;break;default:throw"Invalid unit: "+e}var u,f=0,c=0;if(a.hasOwnProperty(o))f=a[o][1]/s,c=a[o][0]/s;else try{f=n[1],c=n[0]}catch(t){throw new Error("Invalid format: "+n)}if("p"===r||"portrait"===r)r="p",c>f&&(u=c,c=f,f=u);else{if("l"!==r&&"landscape"!==r)throw"Invalid orientation: "+r;r="l",f>c&&(u=c,c=f,f=u)}return{width:c,height:f,unit:e,k:s,orientation:r}},r.html=function(t,r){(r=r||{}).callback=r.callback||function(){},r.html2canvas=r.html2canvas||{},r.html2canvas.canvas=r.html2canvas.canvas||this.canvas,r.jsPDF=r.jsPDF||this,r.fontFaces=r.fontFaces?r.fontFaces.map(ss):null;var e=new a(r);return r.worker?e:e.from(t).doCallback()}}(hi.API),hi.API.addJS=function(t){return ws=t,this.internal.events.subscribe("postPutResources",(function(){vs=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(vs+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),ds=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+ws+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==vs&&void 0!==ds&&this.internal.out("/Names <</JavaScript "+vs+" 0 R>>")})),this
202
202
  /**
203
203
  * @license
204
204
  * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
@@ -234,7 +234,7 @@ function(t){t.processWEBP=function(r,e,n,i){var s=new Ts(r),o=s.width,a=s.height
234
234
  * Licensed under the MIT License.
235
235
  * http://opensource.org/licenses/mit-license
236
236
  */
237
- function(t){var r=function(t){for(var r=t.length,e=new Uint8Array(r),n=0;n<r;n++)e[n]=t.charCodeAt(n);return e};t.API.events.push(["addFont",function(e){var n=void 0,i=e.font,s=e.instance;if(!i.isStandardFont){if(void 0===s)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(n=false===s.existsFileInVFS(i.postScriptName)?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(e,n){n=/^\x00\x01\x00\x00/.test(n)?r(n):r(zn(n)),e.metadata=t.API.TTFFont.open(n),e.metadata.Unicode=e.metadata.Unicode||{encoding:{},kerning:{},widths:[]},e.metadata.glyIdsUsed=[0]}(i,n)}}])}(hi),hi.API.addSvgAsImage=function(t,r,e,n,i,s,o,a){if(isNaN(r)||isNaN(e))throw Bn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw Bn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=i;var f=u.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,u.width,u.height);var c={ignoreMouse:true,ignoreAnimation:true,ignoreDimensions:true},h=this;return(In.canvg?Promise.resolve(In.canvg):import("./p-BWqURJ0r.js").then((function(t){return t.i}))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t})).then((function(r){return r.fromString(f,t,c)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(c)})).then((function(){h.addImage(u.toDataURL("image/jpeg",1),r,e,n,i,o,a)}))},hi.API.putTotalPages=function(t){var r,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(r=new RegExp(t,"g"),e=this.internal.getNumberOfPages()):(r=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(r,e);return this},hi.API.viewerPreferences=function(r,e){var n;r=r||{},e=e||false;var i,s,o,a={HideToolbar:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},HideMenubar:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},HideWindowUI:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},FitWindow:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},CenterWindow:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},DisplayDocTitle:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:false,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:false,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:false,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:false,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:false,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:false,valueSet:null,pdfVersion:1.7}},u=Object.keys(a),f=[],c=0,h=0,l=0;function v(t,r){var e,n=false;for(e=0;e<t.length;e+=1)t[e]===r&&(n=true);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=false),n=this.internal.viewerpreferences.configuration,"reset"===r||true===e){var d=u.length;for(l=0;l<d;l+=1)n[u[l]].value=n[u[l]].defaultValue,n[u[l]].explicitSet=false}if("object"===t(r))for(s in r)if(o=r[s],v(u,s)&&void 0!==o){if("boolean"===n[s].type&&"boolean"==typeof o)n[s].value=o;else if("name"===n[s].type&&v(n[s].valueSet,o))n[s].value=o;else if("integer"===n[s].type&&Number.isInteger(o))n[s].value=o;else if("array"===n[s].type){for(c=0;c<o.length;c+=1)if(i=true,1===o[c].length&&"number"==typeof o[c][0])f.push(String(o[c]-1));else if(o[c].length>1){for(h=0;h<o[c].length;h+=1)"number"!=typeof o[c][h]&&(i=false);true===i&&f.push([o[c][0]-1,o[c][1]-1].join(" "))}n[s].value="["+f.join(" ")+"]"}else n[s].value=n[s].defaultValue;n[s].explicitSet=true}return false===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,r=[];for(t in n)true===n[t].explicitSet&&("name"===n[t].type?r.push("/"+t+" /"+n[t].value):r.push("/"+t+" "+n[t].value));0!==r.length&&this.internal.write("/ViewerPreferences\n<<\n"+r.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=true),this.internal.viewerpreferences.configuration=n,this
237
+ function(t){var r=function(t){for(var r=t.length,e=new Uint8Array(r),n=0;n<r;n++)e[n]=t.charCodeAt(n);return e};t.API.events.push(["addFont",function(e){var n=void 0,i=e.font,s=e.instance;if(!i.isStandardFont){if(void 0===s)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(n=false===s.existsFileInVFS(i.postScriptName)?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(e,n){n=/^\x00\x01\x00\x00/.test(n)?r(n):r(zn(n)),e.metadata=t.API.TTFFont.open(n),e.metadata.Unicode=e.metadata.Unicode||{encoding:{},kerning:{},widths:[]},e.metadata.glyIdsUsed=[0]}(i,n)}}])}(hi),hi.API.addSvgAsImage=function(t,r,e,n,i,s,o,a){if(isNaN(r)||isNaN(e))throw Bn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw Bn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=i;var f=u.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,u.width,u.height);var c={ignoreMouse:true,ignoreAnimation:true,ignoreDimensions:true},h=this;return(In.canvg?Promise.resolve(In.canvg):import("./p-ymT8AXMV.js").then((function(t){return t.i}))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t})).then((function(r){return r.fromString(f,t,c)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(c)})).then((function(){h.addImage(u.toDataURL("image/jpeg",1),r,e,n,i,o,a)}))},hi.API.putTotalPages=function(t){var r,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(r=new RegExp(t,"g"),e=this.internal.getNumberOfPages()):(r=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(r,e);return this},hi.API.viewerPreferences=function(r,e){var n;r=r||{},e=e||false;var i,s,o,a={HideToolbar:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},HideMenubar:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},HideWindowUI:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},FitWindow:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},CenterWindow:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},DisplayDocTitle:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:false,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:false,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:false,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:false,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:false,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:false,valueSet:null,pdfVersion:1.7}},u=Object.keys(a),f=[],c=0,h=0,l=0;function v(t,r){var e,n=false;for(e=0;e<t.length;e+=1)t[e]===r&&(n=true);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=false),n=this.internal.viewerpreferences.configuration,"reset"===r||true===e){var d=u.length;for(l=0;l<d;l+=1)n[u[l]].value=n[u[l]].defaultValue,n[u[l]].explicitSet=false}if("object"===t(r))for(s in r)if(o=r[s],v(u,s)&&void 0!==o){if("boolean"===n[s].type&&"boolean"==typeof o)n[s].value=o;else if("name"===n[s].type&&v(n[s].valueSet,o))n[s].value=o;else if("integer"===n[s].type&&Number.isInteger(o))n[s].value=o;else if("array"===n[s].type){for(c=0;c<o.length;c+=1)if(i=true,1===o[c].length&&"number"==typeof o[c][0])f.push(String(o[c]-1));else if(o[c].length>1){for(h=0;h<o[c].length;h+=1)"number"!=typeof o[c][h]&&(i=false);true===i&&f.push([o[c][0]-1,o[c][1]-1].join(" "))}n[s].value="["+f.join(" ")+"]"}else n[s].value=n[s].defaultValue;n[s].explicitSet=true}return false===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,r=[];for(t in n)true===n[t].explicitSet&&("name"===n[t].type?r.push("/"+t+" /"+n[t].value):r.push("/"+t+" "+n[t].value));0!==r.length&&this.internal.write("/ViewerPreferences\n<<\n"+r.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=true),this.internal.viewerpreferences.configuration=n,this
238
238
  /** ====================================================================
239
239
  * @license
240
240
  * jsPDF XMP metadata plugin
@@ -273,5 +273,5 @@ function(t){var r=function(){return void 0===this.internal.vFS&&(this.internal.v
273
273
  * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
274
274
  * MIT License
275
275
  */
276
- function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var e,n,i,s,o,a,u,f=r,c=[[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]],h=[[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]],l={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},d=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],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)$/),m=false,b=0;this.__bidiEngine__={};var p=function(t){var r=t.charCodeAt(),e=r>>8,n=v[e];return void 0!==n?f[256*n+(255&r)]:252===e||253===e?"AL":w.test(e)?"L":8===e?"R":"N"},N=function(t){for(var r,e=0;e<t.length;e++){if("L"===(r=p(t.charAt(e))))return false;if("R"===r)return true}return false},L=function(t,r,o,a){var u,f,c,h,l=r[a];switch(l){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=false;break;case"N":case"AN":break;case"EN":m&&(l="AN");break;case"AL":m=true,l="R";break;case"WS":case"BN":l="N";break;case"CS":a<1||a+1>=r.length||"EN"!==(u=o[a-1])&&"AN"!==u||"EN"!==(f=r[a+1])&&"AN"!==f?l="N":m&&(f="AN"),l=f===u?f:"N";break;case"ES":l="EN"===(u=a>0?o[a-1]:"B")&&a+1<r.length&&"EN"===r[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===o[a-1]){l="EN";break}if(m){l="N";break}for(c=a+1,h=r.length;c<h&&"ET"===r[c];)c++;l=c<h&&"EN"===r[c]?"EN":"N";break;case"NSM":if(i&&!s){for(h=r.length,c=a+1;c<h&&"NSM"===r[c];)c++;if(c<h){var v=t[a],d=v>=1425&&v<=2303||64286===v;if(u=r[c],d&&("R"===u||"AL"===u)){l="R";break}}}l=a<1||"B"===(u=r[a-1])?"N":o[a-1];break;case"B":m=false,e=true,l=b;break;case"S":n=true,l="N"}return l},A=function(t,r,e){var n=t.split("");return e&&g(n,e,{hiLevel:b}),n.reverse(),r&&r.reverse(),n.join("")},g=function(t,r,i){var s,o,a,u,f,v=-1,d=t.length,w=0,N=[],A=b?h:c,g=[];for(m=false,e=false,n=false,o=0;o<d;o++)g[o]=p(t[o]);for(a=0;a<d;a++){if(f=w,N[a]=L(t,g,N,a),s=240&(w=A[f][l[N[a]]]),w&=15,r[a]=u=A[w][5],s>0)if(16===s){for(o=v;o<a;o++)r[o]=1;v=-1}else v=-1;if(A[w][6])-1===v&&(v=a);else if(v>-1){for(o=v;o<a;o++)r[o]=u;v=-1}"B"===g[a]&&(r[a]=0),i.hiLevel|=u}n&&function(t,r,e){for(var n=0;n<e;n++)if("S"===t[n]){r[n]=b;for(var i=n-1;i>=0&&"WS"===t[i];i--)r[i]=b}}(g,r,d)},y=function(t,r,n,i,s){if(!(s.hiLevel<t)){if(1===t&&1===b&&!e)return r.reverse(),void(n&&n.reverse());for(var o,a,u,f,c=r.length,h=0;h<c;){if(i[h]>=t){for(u=h+1;u<c&&i[u]>=t;)u++;for(f=h,a=u-1;f<a;f++,a--)o=r[f],r[f]=r[a],r[a]=o,n&&(o=n[f],n[f]=n[a],n[a]=o);h=u}h++}}},k=function(t,r,e){var n=t.split(""),i={hiLevel:b};return e||(e=[]),g(n,e,i),function(t,r,e){if(0!==e.hiLevel&&u)for(var n,i=0;i<t.length;i++)1===r[i]&&(n=d.indexOf(t[i]))>=0&&(t[i]=d[n+1])}(n,e,i),y(2,n,r,e,i),y(1,n,r,e,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,r,e){if(function(t,r){if(r)for(var e=0;e<t.length;e++)r[e]=e;void 0===s&&(s=N(t)),void 0===a&&(a=N(t))}(t,r),i||!o||a)if(i&&o&&s^a)b=s?1:0,t=A(t,r,e);else if(!i&&o&&a)b=s?1:0,t=k(t,r,e),t=A(t,r);else if(!i||s||o||a){if(i&&!o&&s^a)t=A(t,r),s?(b=0,t=k(t,r,e)):(b=1,t=k(t,r,e),t=A(t,r));else if(i&&s&&!o&&a)b=1,t=k(t,r,e),t=A(t,r);else if(!i&&!o&&s^a){var n=u;s?(b=1,t=k(t,r,e),b=0,u=false,t=k(t,r,e),u=n):(b=0,t=k(t,r,e),t=A(t,r),b=1,u=false,t=k(t,r,e),u=n,t=A(t,r))}}else b=0,t=k(t,r,e);else b=s?1:0,t=k(t,r,e);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,s=t.isInputRtl,a=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var r=["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 t.__bidiEngine__({isInputVisual:true});t.API.events.push(["postProcessText",function(t){var r=t.text;var n=t.options||{};var i=[];if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,e.setOptions(n),"[object Array]"===Object.prototype.toString.call(r)){var s=0;for(i=[],s=0;s<r.length;s+=1)"[object Array]"===Object.prototype.toString.call(r[s])?i.push([e.doBidiReorder(r[s][0]),r[s][1],r[s][2]]):i.push([e.doBidiReorder(r[s])]);t.text=i}else t.text=e.doBidiReorder(r);e.setOptions({isInputVisual:true})}])}(hi),hi.API.TTFFont=function(){function t(t){var r;if(this.rawData=t,r=this.contents=new Ds(t),this.contents.pos=4,"ttcf"===r.readString(4))throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new io(this),this.registerTTF()}return t.open=function(r){return new t(r)},t.prototype.parse=function(){return this.directory=new zs(this.contents),this.head=new Vs(this),this.name=new Ys(this),this.cmap=new Hs(this),this.toUnicode={},this.hhea=new Gs(this),this.maxp=new $s(this),this.hmtx=new Xs(this),this.post=new Zs(this),this.os2=new Js(this),this.loca=new no(this),this.glyf=new to(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]},t.prototype.registerTTF=function(){var t,r,e,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var r,e,n,i;for(i=[],r=0,e=(n=this.bbox).length;r<e;r++)t=n[r],i.push(Math.round(t*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(e=255&(n=this.post.italic_angle),32768&(r=n>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+e)):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=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var r;return(null!=(r=this.cmap.unicode)?r.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},t.prototype.widthOfString=function(t,r,e){var n,i,s,o;for(s=0,i=0,o=(t=""+t).length;0<=o?i<o:i>o;i=0<=o?++i:--i)n=t.charCodeAt(i),s+=this.widthOfGlyph(this.characterToGlyph(n))+e*(1e3/r)||0;return s*(r/1e3)},t.prototype.lineHeight=function(t,r){var e;return null==r&&(r=false),e=r?this.lineGap:0,(this.ascender+e-this.decender)/1e3*t},t}();var Cs,Ds=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var r,e;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e[r]=String.fromCharCode(this.readByte());return e.join("")},t.prototype.writeString=function(t){var r,e,n;for(n=[],r=0,e=t.length;0<=e?r<e:r>e;r=0<=e?++r:--r)n.push(this.writeByte(t.charCodeAt(r)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,r,e,n,i,s,o,a;return t=this.readByte(),r=this.readByte(),e=this.readByte(),n=this.readByte(),i=this.readByte(),s=this.readByte(),o=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^e)+4294967296*(255^n)+16777216*(255^i)+65536*(255^s)+256*(255^o)+(255^a)+1):72057594037927940*t+281474976710656*r+1099511627776*e+4294967296*n+16777216*i+65536*s+256*o+a},t.prototype.writeLongLong=function(t){var r,e;return r=Math.floor(t/4294967296),e=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var r,e;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r.push(this.readByte());return r},t.prototype.write=function(t){var r,e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],i.push(this.writeByte(r));return i},t}(),zs=function(){var t;function r(t){var r,e,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},e=0,n=this.tableCount;0<=n?e<n:e>n;e=0<=n?++e:--e)r={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[r.tag]=r}return r.prototype.encode=function(r){var e,n,i,s,o,a,u,f,c,h,l,v,d;for(d in l=Object.keys(r).length,a=Math.log(2),c=16*Math.floor(Math.log(l)/a),s=Math.floor(c/a),f=16*l-c,(n=new Ds).writeInt(this.scalarType),n.writeShort(l),n.writeShort(c),n.writeShort(s),n.writeShort(f),i=16*l,u=n.pos+i,o=null,v=[],r)for(h=r[d],n.writeString(d),n.writeInt(t(h)),n.writeInt(u),n.writeInt(h.length),v=v.concat(h),"head"===d&&(o=u),u+=h.length;u%4;)v.push(0),u++;return n.write(v),e=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(e),n.data},t=function(t){var r,e,n,i;for(t=Qs.call(t);t.length%4;)t.push(0);for(n=new Ds(t),e=0,r=0,i=t.length;r<i;r=r+=4)e+=n.readUInt32();return 4294967295&e},r}(),Us={}.hasOwnProperty,_s=function(t,r){for(var e in r)Us.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t};Cs=function(){function t(t){var r;this.file=t,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Vs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="head",t.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()},t.prototype.encode=function(t){var r;return(r=new Ds).writeInt(this.version),r.writeInt(this.revision),r.writeInt(this.checkSumAdjustment),r.writeInt(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.writeLongLong(this.created),r.writeLongLong(this.modified),r.writeShort(this.xMin),r.writeShort(this.yMin),r.writeShort(this.xMax),r.writeShort(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort(this.fontDirectionHint),r.writeShort(t),r.writeShort(this.glyphDataFormat),r.data},t}(),Ws=function(){function t(t,r){var e,n,i,s,o,a,u,f,c,h,l,v,d,w,m,b,p;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=r+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(l=t.readUInt16(),h=l/2,t.pos+=6,i=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),t.pos+=2,d=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),u=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),f=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),n=(this.length-t.pos+this.offset)/2,o=function(){var r,e;for(e=[],a=r=0;0<=n?r<n:r>n;a=0<=n?++r:--r)e.push(t.readUInt16());return e}(),a=m=0,p=i.length;m<p;a=++m)for(w=i[a],e=b=v=d[a];v<=w?b<=w:b>=w;e=v<=w?++b:--b)0===f[a]?s=e+u[a]:0!==(s=o[f[a]/2+(e-v)-(h-a)]||0)&&(s+=u[a]),this.codeMap[e]=65535&s}t.pos=c}return t.encode=function(t,r){var e,n,i,s,o,a,u,f,c,h,l,v,d,w,m,b,p,N,L,A,g,y,k,S,x,q,E,M,j,R,I,O,B,P,F,T,C,D,z,U,_,V,W,H,G,J;switch(M=new Ds,s=Object.keys(t).sort((function(t,r){return t-r})),r){case"macroman":for(d=0,w=function(){var t=[];for(v=0;v<256;++v)t.push(0);return t}(),b={0:0},i={},j=0,B=s.length;j<B;j++)null==b[W=t[n=s[j]]]&&(b[W]=++d),i[n]={old:t[n],new:b[t[n]]},w[n]=b[t[n]];return M.writeUInt16(1),M.writeUInt16(0),M.writeUInt32(12),M.writeUInt16(0),M.writeUInt16(262),M.writeUInt16(0),M.write(w),{charMap:i,subtable:M.data,maxGlyphID:d+1};case"unicode":for(q=[],c=[],p=0,b={},e={},m=u=null,R=0,P=s.length;R<P;R++)null==b[L=t[n=s[R]]]&&(b[L]=++p),e[n]={old:L,new:b[L]},o=b[L]-n,null!=m&&o===u||(m&&c.push(m),q.push(n),u=o),m=n;for(m&&c.push(m),c.push(65535),q.push(65535),S=2*(k=q.length),y=2*Math.pow(Math.log(k)/Math.LN2,2),h=Math.log(y/2)/Math.LN2,g=2*k-y,a=[],A=[],l=[],v=I=0,F=q.length;I<F;v=++I){if(x=q[v],f=c[v],65535===x){a.push(0),A.push(0);break}if(x-(E=e[x].new)>=32768)for(a.push(0),A.push(2*(l.length+k-v)),n=O=x;x<=f?O<=f:O>=f;n=x<=f?++O:--O)l.push(e[n].new);else a.push(E-x),A.push(0)}for(M.writeUInt16(3),M.writeUInt16(1),M.writeUInt32(12),M.writeUInt16(4),M.writeUInt16(16+8*k+2*l.length),M.writeUInt16(0),M.writeUInt16(S),M.writeUInt16(y),M.writeUInt16(h),M.writeUInt16(g),_=0,T=c.length;_<T;_++)n=c[_],M.writeUInt16(n);for(M.writeUInt16(0),V=0,C=q.length;V<C;V++)n=q[V],M.writeUInt16(n);for(H=0,D=a.length;H<D;H++)o=a[H],M.writeUInt16(o);for(G=0,z=A.length;G<z;G++)N=A[G],M.writeUInt16(N);for(J=0,U=l.length;J<U;J++)d=l[J],M.writeUInt16(d);return{charMap:e,subtable:M.data,maxGlyphID:p+1}}},t}(),Hs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="cmap",t.prototype.parse=function(t){var r,e,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,e=0;0<=n?e<n:e>n;e=0<=n?++e:--e)r=new Ws(t,this.offset),this.tables.push(r),r.isUnicode&&null==this.unicode&&(this.unicode=r);return true},t.encode=function(t,r){var e,n;return null==r&&(r="macroman"),e=Ws.encode(t,r),(n=new Ds).writeUInt16(0),n.writeUInt16(1),e.table=n.data.concat(e.subtable),e},t}(),Gs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="hhea",t.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()},t}(),Js=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var r,e;for(e=[],r=0;r<10;++r)e.push(t.readByte());return e}(),this.charRange=function(){var r,e;for(e=[],r=0;r<4;++r)e.push(t.readInt());return e}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var r,e;for(e=[],r=0;r<2;r=++r)e.push(t.readInt());return e}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),Zs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="post",t.prototype.parse=function(t){var r,e,n;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 i;for(e=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)r=t.readByte(),n.push(this.names.push(t.readString(r)));return n;case 151552:return e=t.readUInt16(),this.offsets=t.read(e);case 262144:return this.map=function(){var r,e,n;for(n=[],i=r=0,e=this.file.maxp.numGlyphs;0<=e?r<e:r>e;i=0<=e?++r:--r)n.push(t.readUInt32());return n}.call(this)}},t}(),Ks=function(t,r){this.raw=t,this.length=t.length,this.platformID=r.platformID,this.encodingID=r.encodingID,this.languageID=r.languageID},Ys=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="name",t.prototype.parse=function(t){var r,e,n,i,s,o,a,u,f,c,h;for(t.pos=this.offset,t.readShort(),r=t.readShort(),o=t.readShort(),e=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)e.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(a={},i=f=0,c=e.length;f<c;i=++f)n=e[i],t.pos=n.offset,u=t.readString(n.length),s=new Ks(u,n),null==a[h=n.nameID]&&(a[h]=[]),a[n.nameID].push(s);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),$s=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="maxp",t.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()},t}(),Xs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="hmtx",t.prototype.parse=function(t){var r,e,n,i,s,o,a;for(t.pos=this.offset,this.metrics=[],r=0,o=this.file.hhea.numberOfMetrics;0<=o?r<o:r>o;r=0<=o?++r:--r)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var e,i;for(i=[],r=e=0;0<=n?e<n:e>n;r=0<=n?++e:--e)i.push(t.readInt16());return i}(),this.widths=function(){var t,r,e,n;for(n=[],t=0,r=(e=this.metrics).length;t<r;t++)i=e[t],n.push(i.advance);return n}.call(this),e=this.widths[this.widths.length-1],a=[],r=s=0;0<=n?s<n:s>n;r=0<=n?++s:--s)a.push(this.widths.push(e));return a},t.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]}},t}(),Qs=[].slice,to=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var r,e,n,i,s,o,a,u,f,c;return t in this.cache?this.cache[t]:(i=this.file.loca,r=this.file.contents,e=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(r.pos=this.offset+e,s=(o=new Ds(r.read(n))).readShort(),u=o.readShort(),c=o.readShort(),a=o.readShort(),f=o.readShort(),this.cache[t]=-1===s?new eo(o,u,c,a,f):new ro(o,s,u,c,a,f),this.cache[t]))},t.prototype.encode=function(t,r,e){var n,i,s,o,a;for(s=[],i=[],o=0,a=r.length;o<a;o++)n=t[r[o]],i.push(s.length),n&&(s=s.concat(n.encode(e)));return i.push(s.length),{table:s,offsets:i}},t}(),ro=function(){function t(t,r,e,n,i,s){this.raw=t,this.numberOfContours=r,this.xMin=e,this.yMin=n,this.xMax=i,this.yMax=s,this.compound=false}return t.prototype.encode=function(){return this.raw.data},t}(),eo=function(){function t(t,r,e,n,i){var s,o;for(this.raw=t,this.xMin=r,this.yMin=e,this.xMax=n,this.yMax=i,this.compound=true,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;o=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&o;)s.pos+=1&o?4:2,128&o?s.pos+=8:64&o?s.pos+=4:8&o&&(s.pos+=2)}return t.prototype.encode=function(){var t,r,e;for(r=new Ds(Qs.call(this.raw.data)),t=0,e=this.glyphIDs.length;t<e;++t)r.pos=this.glyphOffsets[t];return r.data},t}(),no=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="loca",t.prototype.parse=function(t){var r,e;return t.pos=this.offset,r=this.file.head.indexToLocFormat,this.offsets=0===r?function(){var r,n;for(n=[],e=0,r=this.length;e<r;e+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var r,n;for(n=[],e=0,r=this.length;e<r;e+=4)n.push(t.readUInt32());return n}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,r){for(var e=new Uint32Array(this.offsets.length),n=0,i=0,s=0;s<e.length;++s)if(e[s]=n,i<r.length&&r[i]==s){++i,e[s]=n;var o=this.offsets[s],a=this.offsets[s+1]-o;a>0&&(n+=a)}for(var u=new Array(4*e.length),f=0;f<e.length;++f)u[4*f+3]=255&e[f],u[4*f+2]=(65280&e[f])>>8,u[4*f+1]=(16711680&e[f])>>16,u[4*f]=(4278190080&e[f])>>24;return u},t}(),io=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,r,e,n,i;for(r in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)e=i[r],t[r]=n[e];return t},t.prototype.glyphsFor=function(t){var r,e,n,i,s,o,a;for(n={},s=0,o=t.length;s<o;s++)n[i=t[s]]=this.font.glyf.glyphFor(i);for(i in r=[],n)(null!=(e=n[i])?e.compound:void 0)&&r.push.apply(r,e.glyphIDs);if(r.length>0)for(i in a=this.glyphsFor(r))e=a[i],n[i]=e;return n},t.prototype.encode=function(t,r){var e,n,i,s,o,a,u,f,c,h,l,v,d,w,m;for(n in e=Hs.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(t),l={0:0},m=e.charMap)l[(a=m[n]).old]=a.new;for(v in h=e.maxGlyphID,s)v in l||(l[v]=h++);return f=function(t){var r,e;for(r in e={},t)e[t[r]]=r;return e}(l),c=Object.keys(f).sort((function(t,r){return t-r})),d=function(){var t,r,e;for(e=[],t=0,r=c.length;t<r;t++)o=c[t],e.push(f[o]);return e}(),i=this.font.glyf.encode(s,d,l),u=this.font.loca.encode(i.offsets,d),w={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(w["OS/2"]=this.font.os2.raw()),this.font.directory.encode(w)},t}();hi.API.PDFObject=function(){var t;function r(){}return t=function(t,r){return(Array(r+1).join("0")+t).slice(-r)},r.convert=function(e){var n,i,s,o;if(Array.isArray(e))return"["+function(){var t,i,s;for(s=[],t=0,i=e.length;t<i;t++)n=e[t],s.push(r.convert(n));return s}().join(" ")+"]";if("string"==typeof e)return"/"+e;if(null!=e?e.isString:void 0)return"("+e+")";if(e instanceof Date)return"(D:"+t(e.getUTCFullYear(),4)+t(e.getUTCMonth(),2)+t(e.getUTCDate(),2)+t(e.getUTCHours(),2)+t(e.getUTCMinutes(),2)+t(e.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(e)){for(i in s=["<<"],e)o=e[i],s.push("/"+i+" "+r.convert(o));return s.push(">>"),s.join("\n")}return""+e},r}();var so=Object.freeze({__proto__:null,AcroFormAppearance:$i,AcroFormButton:Wi,AcroFormCheckBox:Zi,AcroFormChoiceField:zi,AcroFormComboBox:_i,AcroFormEditBox:Vi,AcroFormListBox:Ui,AcroFormPasswordField:Yi,AcroFormPushButton:Hi,AcroFormRadioButton:Gi,AcroFormTextField:Ki,GState:ai,ShadingPattern:fi,TilingPattern:ci,default:hi,jsPDF:hi});export{t as _,_ as a,V as b,so as j,G as s};
277
- //# sourceMappingURL=p-BldcNI96.js.map
276
+ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var e,n,i,s,o,a,u,f=r,c=[[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]],h=[[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]],l={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},d=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],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)$/),m=false,b=0;this.__bidiEngine__={};var p=function(t){var r=t.charCodeAt(),e=r>>8,n=v[e];return void 0!==n?f[256*n+(255&r)]:252===e||253===e?"AL":w.test(e)?"L":8===e?"R":"N"},N=function(t){for(var r,e=0;e<t.length;e++){if("L"===(r=p(t.charAt(e))))return false;if("R"===r)return true}return false},L=function(t,r,o,a){var u,f,c,h,l=r[a];switch(l){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=false;break;case"N":case"AN":break;case"EN":m&&(l="AN");break;case"AL":m=true,l="R";break;case"WS":case"BN":l="N";break;case"CS":a<1||a+1>=r.length||"EN"!==(u=o[a-1])&&"AN"!==u||"EN"!==(f=r[a+1])&&"AN"!==f?l="N":m&&(f="AN"),l=f===u?f:"N";break;case"ES":l="EN"===(u=a>0?o[a-1]:"B")&&a+1<r.length&&"EN"===r[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===o[a-1]){l="EN";break}if(m){l="N";break}for(c=a+1,h=r.length;c<h&&"ET"===r[c];)c++;l=c<h&&"EN"===r[c]?"EN":"N";break;case"NSM":if(i&&!s){for(h=r.length,c=a+1;c<h&&"NSM"===r[c];)c++;if(c<h){var v=t[a],d=v>=1425&&v<=2303||64286===v;if(u=r[c],d&&("R"===u||"AL"===u)){l="R";break}}}l=a<1||"B"===(u=r[a-1])?"N":o[a-1];break;case"B":m=false,e=true,l=b;break;case"S":n=true,l="N"}return l},A=function(t,r,e){var n=t.split("");return e&&g(n,e,{hiLevel:b}),n.reverse(),r&&r.reverse(),n.join("")},g=function(t,r,i){var s,o,a,u,f,v=-1,d=t.length,w=0,N=[],A=b?h:c,g=[];for(m=false,e=false,n=false,o=0;o<d;o++)g[o]=p(t[o]);for(a=0;a<d;a++){if(f=w,N[a]=L(t,g,N,a),s=240&(w=A[f][l[N[a]]]),w&=15,r[a]=u=A[w][5],s>0)if(16===s){for(o=v;o<a;o++)r[o]=1;v=-1}else v=-1;if(A[w][6])-1===v&&(v=a);else if(v>-1){for(o=v;o<a;o++)r[o]=u;v=-1}"B"===g[a]&&(r[a]=0),i.hiLevel|=u}n&&function(t,r,e){for(var n=0;n<e;n++)if("S"===t[n]){r[n]=b;for(var i=n-1;i>=0&&"WS"===t[i];i--)r[i]=b}}(g,r,d)},y=function(t,r,n,i,s){if(!(s.hiLevel<t)){if(1===t&&1===b&&!e)return r.reverse(),void(n&&n.reverse());for(var o,a,u,f,c=r.length,h=0;h<c;){if(i[h]>=t){for(u=h+1;u<c&&i[u]>=t;)u++;for(f=h,a=u-1;f<a;f++,a--)o=r[f],r[f]=r[a],r[a]=o,n&&(o=n[f],n[f]=n[a],n[a]=o);h=u}h++}}},k=function(t,r,e){var n=t.split(""),i={hiLevel:b};return e||(e=[]),g(n,e,i),function(t,r,e){if(0!==e.hiLevel&&u)for(var n,i=0;i<t.length;i++)1===r[i]&&(n=d.indexOf(t[i]))>=0&&(t[i]=d[n+1])}(n,e,i),y(2,n,r,e,i),y(1,n,r,e,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,r,e){if(function(t,r){if(r)for(var e=0;e<t.length;e++)r[e]=e;void 0===s&&(s=N(t)),void 0===a&&(a=N(t))}(t,r),i||!o||a)if(i&&o&&s^a)b=s?1:0,t=A(t,r,e);else if(!i&&o&&a)b=s?1:0,t=k(t,r,e),t=A(t,r);else if(!i||s||o||a){if(i&&!o&&s^a)t=A(t,r),s?(b=0,t=k(t,r,e)):(b=1,t=k(t,r,e),t=A(t,r));else if(i&&s&&!o&&a)b=1,t=k(t,r,e),t=A(t,r);else if(!i&&!o&&s^a){var n=u;s?(b=1,t=k(t,r,e),b=0,u=false,t=k(t,r,e),u=n):(b=0,t=k(t,r,e),t=A(t,r),b=1,u=false,t=k(t,r,e),u=n,t=A(t,r))}}else b=0,t=k(t,r,e);else b=s?1:0,t=k(t,r,e);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,s=t.isInputRtl,a=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var r=["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 t.__bidiEngine__({isInputVisual:true});t.API.events.push(["postProcessText",function(t){var r=t.text;var n=t.options||{};var i=[];if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,e.setOptions(n),"[object Array]"===Object.prototype.toString.call(r)){var s=0;for(i=[],s=0;s<r.length;s+=1)"[object Array]"===Object.prototype.toString.call(r[s])?i.push([e.doBidiReorder(r[s][0]),r[s][1],r[s][2]]):i.push([e.doBidiReorder(r[s])]);t.text=i}else t.text=e.doBidiReorder(r);e.setOptions({isInputVisual:true})}])}(hi),hi.API.TTFFont=function(){function t(t){var r;if(this.rawData=t,r=this.contents=new Ds(t),this.contents.pos=4,"ttcf"===r.readString(4))throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new io(this),this.registerTTF()}return t.open=function(r){return new t(r)},t.prototype.parse=function(){return this.directory=new zs(this.contents),this.head=new Vs(this),this.name=new Ys(this),this.cmap=new Hs(this),this.toUnicode={},this.hhea=new Gs(this),this.maxp=new $s(this),this.hmtx=new Xs(this),this.post=new Js(this),this.os2=new Zs(this),this.loca=new no(this),this.glyf=new to(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]},t.prototype.registerTTF=function(){var t,r,e,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var r,e,n,i;for(i=[],r=0,e=(n=this.bbox).length;r<e;r++)t=n[r],i.push(Math.round(t*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(e=255&(n=this.post.italic_angle),32768&(r=n>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+e)):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=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var r;return(null!=(r=this.cmap.unicode)?r.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},t.prototype.widthOfString=function(t,r,e){var n,i,s,o;for(s=0,i=0,o=(t=""+t).length;0<=o?i<o:i>o;i=0<=o?++i:--i)n=t.charCodeAt(i),s+=this.widthOfGlyph(this.characterToGlyph(n))+e*(1e3/r)||0;return s*(r/1e3)},t.prototype.lineHeight=function(t,r){var e;return null==r&&(r=false),e=r?this.lineGap:0,(this.ascender+e-this.decender)/1e3*t},t}();var Cs,Ds=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var r,e;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e[r]=String.fromCharCode(this.readByte());return e.join("")},t.prototype.writeString=function(t){var r,e,n;for(n=[],r=0,e=t.length;0<=e?r<e:r>e;r=0<=e?++r:--r)n.push(this.writeByte(t.charCodeAt(r)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,r,e,n,i,s,o,a;return t=this.readByte(),r=this.readByte(),e=this.readByte(),n=this.readByte(),i=this.readByte(),s=this.readByte(),o=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^e)+4294967296*(255^n)+16777216*(255^i)+65536*(255^s)+256*(255^o)+(255^a)+1):72057594037927940*t+281474976710656*r+1099511627776*e+4294967296*n+16777216*i+65536*s+256*o+a},t.prototype.writeLongLong=function(t){var r,e;return r=Math.floor(t/4294967296),e=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var r,e;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r.push(this.readByte());return r},t.prototype.write=function(t){var r,e,n,i;for(i=[],e=0,n=t.length;e<n;e++)r=t[e],i.push(this.writeByte(r));return i},t}(),zs=function(){var t;function r(t){var r,e,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},e=0,n=this.tableCount;0<=n?e<n:e>n;e=0<=n?++e:--e)r={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[r.tag]=r}return r.prototype.encode=function(r){var e,n,i,s,o,a,u,f,c,h,l,v,d;for(d in l=Object.keys(r).length,a=Math.log(2),c=16*Math.floor(Math.log(l)/a),s=Math.floor(c/a),f=16*l-c,(n=new Ds).writeInt(this.scalarType),n.writeShort(l),n.writeShort(c),n.writeShort(s),n.writeShort(f),i=16*l,u=n.pos+i,o=null,v=[],r)for(h=r[d],n.writeString(d),n.writeInt(t(h)),n.writeInt(u),n.writeInt(h.length),v=v.concat(h),"head"===d&&(o=u),u+=h.length;u%4;)v.push(0),u++;return n.write(v),e=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(e),n.data},t=function(t){var r,e,n,i;for(t=Qs.call(t);t.length%4;)t.push(0);for(n=new Ds(t),e=0,r=0,i=t.length;r<i;r=r+=4)e+=n.readUInt32();return 4294967295&e},r}(),Us={}.hasOwnProperty,_s=function(t,r){for(var e in r)Us.call(r,e)&&(t[e]=r[e]);function n(){this.constructor=t}return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t};Cs=function(){function t(t){var r;this.file=t,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Vs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="head",t.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()},t.prototype.encode=function(t){var r;return(r=new Ds).writeInt(this.version),r.writeInt(this.revision),r.writeInt(this.checkSumAdjustment),r.writeInt(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.writeLongLong(this.created),r.writeLongLong(this.modified),r.writeShort(this.xMin),r.writeShort(this.yMin),r.writeShort(this.xMax),r.writeShort(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort(this.fontDirectionHint),r.writeShort(t),r.writeShort(this.glyphDataFormat),r.data},t}(),Ws=function(){function t(t,r){var e,n,i,s,o,a,u,f,c,h,l,v,d,w,m,b,p;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=r+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(l=t.readUInt16(),h=l/2,t.pos+=6,i=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),t.pos+=2,d=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),u=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),f=function(){var r,e;for(e=[],a=r=0;0<=h?r<h:r>h;a=0<=h?++r:--r)e.push(t.readUInt16());return e}(),n=(this.length-t.pos+this.offset)/2,o=function(){var r,e;for(e=[],a=r=0;0<=n?r<n:r>n;a=0<=n?++r:--r)e.push(t.readUInt16());return e}(),a=m=0,p=i.length;m<p;a=++m)for(w=i[a],e=b=v=d[a];v<=w?b<=w:b>=w;e=v<=w?++b:--b)0===f[a]?s=e+u[a]:0!==(s=o[f[a]/2+(e-v)-(h-a)]||0)&&(s+=u[a]),this.codeMap[e]=65535&s}t.pos=c}return t.encode=function(t,r){var e,n,i,s,o,a,u,f,c,h,l,v,d,w,m,b,p,N,L,A,g,y,k,S,x,q,E,M,j,R,I,O,B,P,F,T,C,D,z,U,_,V,W,H,G,Z;switch(M=new Ds,s=Object.keys(t).sort((function(t,r){return t-r})),r){case"macroman":for(d=0,w=function(){var t=[];for(v=0;v<256;++v)t.push(0);return t}(),b={0:0},i={},j=0,B=s.length;j<B;j++)null==b[W=t[n=s[j]]]&&(b[W]=++d),i[n]={old:t[n],new:b[t[n]]},w[n]=b[t[n]];return M.writeUInt16(1),M.writeUInt16(0),M.writeUInt32(12),M.writeUInt16(0),M.writeUInt16(262),M.writeUInt16(0),M.write(w),{charMap:i,subtable:M.data,maxGlyphID:d+1};case"unicode":for(q=[],c=[],p=0,b={},e={},m=u=null,R=0,P=s.length;R<P;R++)null==b[L=t[n=s[R]]]&&(b[L]=++p),e[n]={old:L,new:b[L]},o=b[L]-n,null!=m&&o===u||(m&&c.push(m),q.push(n),u=o),m=n;for(m&&c.push(m),c.push(65535),q.push(65535),S=2*(k=q.length),y=2*Math.pow(Math.log(k)/Math.LN2,2),h=Math.log(y/2)/Math.LN2,g=2*k-y,a=[],A=[],l=[],v=I=0,F=q.length;I<F;v=++I){if(x=q[v],f=c[v],65535===x){a.push(0),A.push(0);break}if(x-(E=e[x].new)>=32768)for(a.push(0),A.push(2*(l.length+k-v)),n=O=x;x<=f?O<=f:O>=f;n=x<=f?++O:--O)l.push(e[n].new);else a.push(E-x),A.push(0)}for(M.writeUInt16(3),M.writeUInt16(1),M.writeUInt32(12),M.writeUInt16(4),M.writeUInt16(16+8*k+2*l.length),M.writeUInt16(0),M.writeUInt16(S),M.writeUInt16(y),M.writeUInt16(h),M.writeUInt16(g),_=0,T=c.length;_<T;_++)n=c[_],M.writeUInt16(n);for(M.writeUInt16(0),V=0,C=q.length;V<C;V++)n=q[V],M.writeUInt16(n);for(H=0,D=a.length;H<D;H++)o=a[H],M.writeUInt16(o);for(G=0,z=A.length;G<z;G++)N=A[G],M.writeUInt16(N);for(Z=0,U=l.length;Z<U;Z++)d=l[Z],M.writeUInt16(d);return{charMap:e,subtable:M.data,maxGlyphID:p+1}}},t}(),Hs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="cmap",t.prototype.parse=function(t){var r,e,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,e=0;0<=n?e<n:e>n;e=0<=n?++e:--e)r=new Ws(t,this.offset),this.tables.push(r),r.isUnicode&&null==this.unicode&&(this.unicode=r);return true},t.encode=function(t,r){var e,n;return null==r&&(r="macroman"),e=Ws.encode(t,r),(n=new Ds).writeUInt16(0),n.writeUInt16(1),e.table=n.data.concat(e.subtable),e},t}(),Gs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="hhea",t.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()},t}(),Zs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var r,e;for(e=[],r=0;r<10;++r)e.push(t.readByte());return e}(),this.charRange=function(){var r,e;for(e=[],r=0;r<4;++r)e.push(t.readInt());return e}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var r,e;for(e=[],r=0;r<2;r=++r)e.push(t.readInt());return e}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),Js=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="post",t.prototype.parse=function(t){var r,e,n;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 i;for(e=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)r=t.readByte(),n.push(this.names.push(t.readString(r)));return n;case 151552:return e=t.readUInt16(),this.offsets=t.read(e);case 262144:return this.map=function(){var r,e,n;for(n=[],i=r=0,e=this.file.maxp.numGlyphs;0<=e?r<e:r>e;i=0<=e?++r:--r)n.push(t.readUInt32());return n}.call(this)}},t}(),Ks=function(t,r){this.raw=t,this.length=t.length,this.platformID=r.platformID,this.encodingID=r.encodingID,this.languageID=r.languageID},Ys=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="name",t.prototype.parse=function(t){var r,e,n,i,s,o,a,u,f,c,h;for(t.pos=this.offset,t.readShort(),r=t.readShort(),o=t.readShort(),e=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)e.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(a={},i=f=0,c=e.length;f<c;i=++f)n=e[i],t.pos=n.offset,u=t.readString(n.length),s=new Ks(u,n),null==a[h=n.nameID]&&(a[h]=[]),a[n.nameID].push(s);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),$s=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="maxp",t.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()},t}(),Xs=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="hmtx",t.prototype.parse=function(t){var r,e,n,i,s,o,a;for(t.pos=this.offset,this.metrics=[],r=0,o=this.file.hhea.numberOfMetrics;0<=o?r<o:r>o;r=0<=o?++r:--r)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var e,i;for(i=[],r=e=0;0<=n?e<n:e>n;r=0<=n?++e:--e)i.push(t.readInt16());return i}(),this.widths=function(){var t,r,e,n;for(n=[],t=0,r=(e=this.metrics).length;t<r;t++)i=e[t],n.push(i.advance);return n}.call(this),e=this.widths[this.widths.length-1],a=[],r=s=0;0<=n?s<n:s>n;r=0<=n?++s:--s)a.push(this.widths.push(e));return a},t.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]}},t}(),Qs=[].slice,to=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var r,e,n,i,s,o,a,u,f,c;return t in this.cache?this.cache[t]:(i=this.file.loca,r=this.file.contents,e=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(r.pos=this.offset+e,s=(o=new Ds(r.read(n))).readShort(),u=o.readShort(),c=o.readShort(),a=o.readShort(),f=o.readShort(),this.cache[t]=-1===s?new eo(o,u,c,a,f):new ro(o,s,u,c,a,f),this.cache[t]))},t.prototype.encode=function(t,r,e){var n,i,s,o,a;for(s=[],i=[],o=0,a=r.length;o<a;o++)n=t[r[o]],i.push(s.length),n&&(s=s.concat(n.encode(e)));return i.push(s.length),{table:s,offsets:i}},t}(),ro=function(){function t(t,r,e,n,i,s){this.raw=t,this.numberOfContours=r,this.xMin=e,this.yMin=n,this.xMax=i,this.yMax=s,this.compound=false}return t.prototype.encode=function(){return this.raw.data},t}(),eo=function(){function t(t,r,e,n,i){var s,o;for(this.raw=t,this.xMin=r,this.yMin=e,this.xMax=n,this.yMax=i,this.compound=true,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;o=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&o;)s.pos+=1&o?4:2,128&o?s.pos+=8:64&o?s.pos+=4:8&o&&(s.pos+=2)}return t.prototype.encode=function(){var t,r,e;for(r=new Ds(Qs.call(this.raw.data)),t=0,e=this.glyphIDs.length;t<e;++t)r.pos=this.glyphOffsets[t];return r.data},t}(),no=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return _s(t,Cs),t.prototype.tag="loca",t.prototype.parse=function(t){var r,e;return t.pos=this.offset,r=this.file.head.indexToLocFormat,this.offsets=0===r?function(){var r,n;for(n=[],e=0,r=this.length;e<r;e+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var r,n;for(n=[],e=0,r=this.length;e<r;e+=4)n.push(t.readUInt32());return n}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,r){for(var e=new Uint32Array(this.offsets.length),n=0,i=0,s=0;s<e.length;++s)if(e[s]=n,i<r.length&&r[i]==s){++i,e[s]=n;var o=this.offsets[s],a=this.offsets[s+1]-o;a>0&&(n+=a)}for(var u=new Array(4*e.length),f=0;f<e.length;++f)u[4*f+3]=255&e[f],u[4*f+2]=(65280&e[f])>>8,u[4*f+1]=(16711680&e[f])>>16,u[4*f]=(4278190080&e[f])>>24;return u},t}(),io=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,r,e,n,i;for(r in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)e=i[r],t[r]=n[e];return t},t.prototype.glyphsFor=function(t){var r,e,n,i,s,o,a;for(n={},s=0,o=t.length;s<o;s++)n[i=t[s]]=this.font.glyf.glyphFor(i);for(i in r=[],n)(null!=(e=n[i])?e.compound:void 0)&&r.push.apply(r,e.glyphIDs);if(r.length>0)for(i in a=this.glyphsFor(r))e=a[i],n[i]=e;return n},t.prototype.encode=function(t,r){var e,n,i,s,o,a,u,f,c,h,l,v,d,w,m;for(n in e=Hs.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(t),l={0:0},m=e.charMap)l[(a=m[n]).old]=a.new;for(v in h=e.maxGlyphID,s)v in l||(l[v]=h++);return f=function(t){var r,e;for(r in e={},t)e[t[r]]=r;return e}(l),c=Object.keys(f).sort((function(t,r){return t-r})),d=function(){var t,r,e;for(e=[],t=0,r=c.length;t<r;t++)o=c[t],e.push(f[o]);return e}(),i=this.font.glyf.encode(s,d,l),u=this.font.loca.encode(i.offsets,d),w={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(w["OS/2"]=this.font.os2.raw()),this.font.directory.encode(w)},t}();hi.API.PDFObject=function(){var t;function r(){}return t=function(t,r){return(Array(r+1).join("0")+t).slice(-r)},r.convert=function(e){var n,i,s,o;if(Array.isArray(e))return"["+function(){var t,i,s;for(s=[],t=0,i=e.length;t<i;t++)n=e[t],s.push(r.convert(n));return s}().join(" ")+"]";if("string"==typeof e)return"/"+e;if(null!=e?e.isString:void 0)return"("+e+")";if(e instanceof Date)return"(D:"+t(e.getUTCFullYear(),4)+t(e.getUTCMonth(),2)+t(e.getUTCDate(),2)+t(e.getUTCHours(),2)+t(e.getUTCMinutes(),2)+t(e.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(e)){for(i in s=["<<"],e)o=e[i],s.push("/"+i+" "+r.convert(o));return s.push(">>"),s.join("\n")}return""+e},r}();var so=Object.freeze({__proto__:null,AcroFormAppearance:$i,AcroFormButton:Wi,AcroFormCheckBox:Ji,AcroFormChoiceField:zi,AcroFormComboBox:_i,AcroFormEditBox:Vi,AcroFormListBox:Ui,AcroFormPasswordField:Yi,AcroFormPushButton:Hi,AcroFormRadioButton:Gi,AcroFormTextField:Ki,GState:ai,ShadingPattern:fi,TilingPattern:ci,default:hi,jsPDF:hi});export{t as _,_ as a,V as b,so as j,G as s};
277
+ //# sourceMappingURL=p-D5uLuMja.js.map