@mlightcad/cad-pdf-plugin 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +11 -4
- package/dist/cad-pdf-plugin-register.js +16 -0
- package/dist/cad-pdf-plugin-register.umd.cjs +1 -0
- package/dist/cad-pdf-plugin.js +42180 -0
- package/dist/cad-pdf-plugin.umd.cjs +312 -0
- package/lib/createPdfPlugin.d.ts +8 -0
- package/lib/createPdfPlugin.d.ts.map +1 -0
- package/lib/createPdfPlugin.js +50 -0
- package/lib/createPdfPlugin.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/{registerLazyPdfPlugin.d.ts → register.d.ts} +3 -8
- package/lib/register.d.ts.map +1 -0
- package/lib/{registerLazyPdfPlugin.js → register.js} +15 -21
- package/lib/register.js.map +1 -0
- package/package.json +24 -11
- package/dist/AcApPdfPlugin-CXWCd8bg.js +0 -34
- package/dist/html2canvas.esm-d2sM-0Wm.js +0 -4870
- package/dist/index-DNe5YnrC.js +0 -30983
- package/dist/index.es-DxTvd7sT.js +0 -5645
- package/dist/index.js +0 -11
- package/dist/index.umd.cjs +0 -312
- package/dist/purify.es-CxNDhYDZ.js +0 -663
- package/lib/registerLazyPdfPlugin.d.ts.map +0 -1
- package/lib/registerLazyPdfPlugin.js.map +0 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";var P6=Object.defineProperty;var oI=n=>{throw TypeError(n)};var M6=(n,t,e)=>t in n?P6(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var ct=(n,t,e)=>M6(n,typeof t!="symbol"?t+"":t,e),A5=(n,t,e)=>t.has(n)||oI("Cannot "+e);var c=(n,t,e)=>(A5(n,t,"read from private field"),e?e.call(n):t.get(n)),T=(n,t,e)=>t.has(n)?oI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),C=(n,t,e,r)=>(A5(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),_=(n,t,e)=>(A5(n,t,"access private method"),e);var Hi=(n,t,e,r)=>({set _(i){C(n,t,i,e)},get _(){return c(n,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const uv=require("@mlightcad/cad-simple-viewer"),lI=require("@mlightcad/cad-svg-plugin"),Mc=require("@mlightcad/data-model"),PQ=require("./cad-pdf-plugin-register.umd.cjs");var a5=typeof document<"u"?document.currentScript:null;function sr(n){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(n)}var Ka=Uint8Array,_A=Uint16Array,YF=Int32Array,JF=new Ka([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]),ZF=new Ka([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]),cI=new Ka([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),MQ=function(n,t){for(var e=new _A(31),r=0;r<31;++r)e[r]=t+=1<<n[r-1];for(var i=new YF(e[30]),r=1;r<30;++r)for(var s=e[r];s<e[r+1];++s)i[s]=s-e[r]<<5|r;return{b:e,r:i}},kQ=MQ(JF,2),k6=kQ.b,oE=kQ.r;k6[28]=258,oE[258]=28;var O6=MQ(ZF,0),hI=O6.r,lE=new _A(32768);for(var zr=0;zr<32768;++zr){var kc=(zr&43690)>>1|(zr&21845)<<1;kc=(kc&52428)>>2|(kc&13107)<<2,kc=(kc&61680)>>4|(kc&3855)<<4,lE[zr]=((kc&65280)>>8|(kc&255)<<8)>>1}var qm=function(n,t,e){for(var r=n.length,i=0,s=new _A(t);i<r;++i)n[i]&&++s[n[i]-1];var A=new _A(t);for(i=1;i<t;++i)A[i]=A[i-1]+s[i-1]<<1;var a;if(e){a=new _A(1<<t);var o=15-t;for(i=0;i<r;++i)if(n[i])for(var l=i<<4|n[i],h=t-n[i],u=A[n[i]-1]++<<h,d=u|(1<<h)-1;u<=d;++u)a[lE[u]>>o]=l}else for(a=new _A(r),i=0;i<r;++i)n[i]&&(a[i]=lE[A[n[i]-1]++]>>15-n[i]);return a},dd=new Ka(288);for(var zr=0;zr<144;++zr)dd[zr]=8;for(var zr=144;zr<256;++zr)dd[zr]=9;for(var zr=256;zr<280;++zr)dd[zr]=7;for(var zr=280;zr<288;++zr)dd[zr]=8;var Cb=new Ka(32);for(var zr=0;zr<32;++zr)Cb[zr]=5;var D6=qm(dd,9,0),R6=qm(Cb,5,0),OQ=function(n){return(n+7)/8|0},H6=function(n,t,e){return(e==null||e>n.length)&&(e=n.length),new Ka(n.subarray(t,e))},al=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8},J0=function(n,t,e){e<<=t&7;var r=t/8|0;n[r]|=e,n[r+1]|=e>>8,n[r+2]|=e>>16},o5=function(n,t){for(var e=[],r=0;r<n.length;++r)n[r]&&e.push({s:r,f:n[r]});var i=e.length,s=e.slice();if(!i)return{t:RQ,l:0};if(i==1){var A=new Ka(e[0].s+1);return A[e[0].s]=1,{t:A,l:1}}e.sort(function(I,L){return I.f-L.f}),e.push({s:-1,f:25001});var a=e[0],o=e[1],l=0,h=1,u=2;for(e[0]={s:-1,f:a.f+o.f,l:a,r:o};h!=i-1;)a=e[e[l].f<e[u].f?l++:u++],o=e[l!=h&&e[l].f<e[u].f?l++:u++],e[h++]={s:-1,f:a.f+o.f,l:a,r:o};for(var d=s[0].s,r=1;r<i;++r)s[r].s>d&&(d=s[r].s);var f=new _A(d+1),p=cE(e[h-1],f,0);if(p>t){var r=0,m=0,y=p-t,w=1<<y;for(s.sort(function(L,k){return f[k.s]-f[L.s]||L.f-k.f});r<i;++r){var B=s[r].s;if(f[B]>t)m+=w-(1<<p-f[B]),f[B]=t;else break}for(m>>=y;m>0;){var E=s[r].s;f[E]<t?m-=1<<t-f[E]++-1:++r}for(;r>=0&&m;--r){var S=s[r].s;f[S]==t&&(--f[S],++m)}p=t}return{t:new Ka(f),l:p}},cE=function(n,t,e){return n.s==-1?Math.max(cE(n.l,t,e+1),cE(n.r,t,e+1)):t[n.s]=e},uI=function(n){for(var t=n.length;t&&!n[--t];);for(var e=new _A(++t),r=0,i=n[0],s=1,A=function(o){e[r++]=o},a=1;a<=t;++a)if(n[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)A(32754);s>2&&(A(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(A(i),--s;s>6;s-=6)A(8304);s>2&&(A(s-3<<5|8208),s=0)}for(;s--;)A(i);s=1,i=n[a]}return{c:e.subarray(0,r),n:t}},Z0=function(n,t){for(var e=0,r=0;r<t.length;++r)e+=n[r]*t[r];return e},DQ=function(n,t,e){var r=e.length,i=OQ(t+2);n[i]=r&255,n[i+1]=r>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var s=0;s<r;++s)n[i+s+4]=e[s];return(i+4+r)*8},fI=function(n,t,e,r,i,s,A,a,o,l,h){al(t,h++,e),++i[256];for(var u=o5(i,15),d=u.t,f=u.l,p=o5(s,15),m=p.t,y=p.l,w=uI(d),B=w.c,E=w.n,S=uI(m),I=S.c,L=S.n,k=new _A(19),H=0;H<B.length;++H)++k[B[H]&31];for(var H=0;H<I.length;++H)++k[I[H]&31];for(var Q=o5(k,7),W=Q.t,U=Q.l,D=19;D>4&&!W[cI[D-1]];--D);var j=l+5<<3,V=Z0(i,dd)+Z0(s,Cb)+A,st=Z0(i,d)+Z0(s,m)+A+14+3*D+Z0(k,W)+2*k[16]+3*k[17]+7*k[18];if(o>=0&&j<=V&&j<=st)return DQ(t,h,n.subarray(o,o+l));var rt,it,At,ut;if(al(t,h,1+(st<V)),h+=2,st<V){rt=qm(d,f,0),it=d,At=qm(m,y,0),ut=m;var vt=qm(W,U,0);al(t,h,E-257),al(t,h+5,L-1),al(t,h+10,D-4),h+=14;for(var H=0;H<D;++H)al(t,h+3*H,W[cI[H]]);h+=3*D;for(var mt=[B,I],M=0;M<2;++M)for(var $=mt[M],H=0;H<$.length;++H){var q=$[H]&31;al(t,h,vt[q]),h+=W[q],q>15&&(al(t,h,$[H]>>5&127),h+=$[H]>>12)}}else rt=D6,it=dd,At=R6,ut=Cb;for(var H=0;H<a;++H){var tt=r[H];if(tt>255){var q=tt>>18&31;J0(t,h,rt[q+257]),h+=it[q+257],q>7&&(al(t,h,tt>>23&31),h+=JF[q]);var et=tt&31;J0(t,h,At[et]),h+=ut[et],et>3&&(J0(t,h,tt>>5&8191),h+=ZF[et])}else J0(t,h,rt[tt]),h+=it[tt]}return J0(t,h,rt[256]),h+it[256]},K6=new YF([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),RQ=new Ka(0),V6=function(n,t,e,r,i,s){var A=s.z||n.length,a=new Ka(r+A+5*(1+Math.ceil(A/7e3))+i),o=a.subarray(r,a.length-i),l=s.l,h=(s.r||0)&7;if(t){h&&(o[0]=s.r>>3);for(var u=K6[t-1],d=u>>13,f=u&8191,p=(1<<e)-1,m=s.p||new _A(32768),y=s.h||new _A(p+1),w=Math.ceil(e/3),B=2*w,E=function(jt){return(n[jt]^n[jt+1]<<w^n[jt+2]<<B)&p},S=new YF(25e3),I=new _A(288),L=new _A(32),k=0,H=0,Q=s.i||0,W=0,U=s.w||0,D=0;Q+2<A;++Q){var j=E(Q),V=Q&32767,st=y[j];if(m[V]=st,y[j]=V,U<=Q){var rt=A-Q;if((k>7e3||W>24576)&&(rt>423||!l)){h=fI(n,o,0,S,I,L,H,W,D,Q-D,h),W=k=H=0,D=Q;for(var it=0;it<286;++it)I[it]=0;for(var it=0;it<30;++it)L[it]=0}var At=2,ut=0,vt=f,mt=V-st&32767;if(rt>2&&j==E(Q-mt))for(var M=Math.min(d,rt)-1,$=Math.min(32767,Q),q=Math.min(258,rt);mt<=$&&--vt&&V!=st;){if(n[Q+At]==n[Q+At-mt]){for(var tt=0;tt<q&&n[Q+tt]==n[Q+tt-mt];++tt);if(tt>At){if(At=tt,ut=mt,tt>M)break;for(var et=Math.min(mt,tt-2),ot=0,it=0;it<et;++it){var dt=Q-mt+it&32767,wt=m[dt],yt=dt-wt&32767;yt>ot&&(ot=yt,st=dt)}}}V=st,st=m[V],mt+=V-st&32767}if(ut){S[W++]=268435456|oE[At]<<18|hI[ut];var St=oE[At]&31,Mt=hI[ut]&31;H+=JF[St]+ZF[Mt],++I[257+St],++L[Mt],U=Q+At,++k}else S[W++]=n[Q],++I[n[Q]]}}for(Q=Math.max(Q,U);Q<A;++Q)S[W++]=n[Q],++I[n[Q]];h=fI(n,o,l,S,I,L,H,W,D,Q-D,h),l||(s.r=h&7|o[h/8|0]<<3,h-=7,s.h=y,s.p=m,s.i=Q,s.w=U)}else{for(var Q=s.w||0;Q<A+l;Q+=65535){var Pt=Q+65535;Pt>=A&&(o[h/8|0]=l,Pt=A),h=DQ(o,h+1,n.subarray(Q,Pt))}s.i=A}return H6(a,0,r+OQ(h)+i)},HQ=function(){var n=1,t=0;return{p:function(e){for(var r=n,i=t,s=e.length|0,A=0;A!=s;){for(var a=Math.min(A+2655,s);A<a;++A)i+=r+=e[A];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}n=r,t=i},d:function(){return n%=65521,t%=65521,(n&255)<<24|(n&65280)<<8|(t&255)<<8|t>>8}}},G6=function(n,t,e,r,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),A=new Ka(s.length+n.length);A.set(s),A.set(n,s.length),n=A,i.w=s.length}return V6(n,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+t.mem,e,r,i)},KQ=function(n,t,e){for(;e;++t)n[t]=e,e>>>=8},j6=function(n,t){var e=t.level,r=e==0?0:e<6?1:e==9?3:2;if(n[0]=120,n[1]=r<<6|(t.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,t.dictionary){var i=HQ();i.p(t.dictionary),KQ(n,2,i.d())}};function hE(n,t){t||(t={});var e=HQ();e.p(n);var r=G6(n,t,t.dictionary?6:2,4);return j6(r,t),KQ(r,r.length-4,e.d()),r}var $6=typeof TextDecoder<"u"&&new TextDecoder,W6=0;try{$6.decode(RQ,{stream:!0}),W6=1}catch{}function z6(n){if(Array.isArray(n))return n}function X6(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,i,s,A,a=[],o=!0,l=!1;try{if(s=(e=e.call(n)).next,t!==0)for(;!(o=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(h){l=!0,i=h}finally{try{if(!o&&e.return!=null&&(A=e.return(),Object(A)!==A))return}finally{if(l)throw i}}return a}}function dI(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function q6(n,t){if(n){if(typeof n=="string")return dI(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?dI(n,t):void 0}}function Y6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gI(n,t){return z6(n)||X6(n,t)||q6(n,t)||Y6()}function pI(n,t="utf8"){return new TextDecoder(t).decode(n)}const J6=new TextEncoder;function Z6(n){return J6.encode(n)}const tH=1024*8,eH=(()=>{const n=new Uint8Array(4),t=new Uint32Array(n.buffer);return!((t[0]=1)&n[0])})(),l5={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 t4{constructor(t=tH,e={}){ct(this,"buffer");ct(this,"byteLength");ct(this,"byteOffset");ct(this,"length");ct(this,"offset");ct(this,"lastWrittenByte");ct(this,"littleEndian");ct(this,"_data");ct(this,"_mark");ct(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const i=e.offset?e.offset>>>0:0,s=t.byteLength-i;let A=i;(ArrayBuffer.isView(t)||t instanceof t4)&&(t.byteLength!==t.buffer.byteLength&&(A=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=A,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,A,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const r=l5[e].BYTES_PER_ELEMENT*t,i=this.byteOffset+this.offset,s=this.buffer.slice(i,i+r);if(this.littleEndian===eH&&e!=="uint8"&&e!=="int8"){const a=new Uint8Array(this.buffer.slice(i,i+r));a.reverse();const o=new l5[e](a.buffer);return this.offset+=r,o.reverse(),o}const A=new l5[e](s);return this.offset+=r,A}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let r=0;r<t;r++)e+=this.readChar();return e}readUtf8(t=1){return pI(this.readBytes(t))}decodeText(t=1,e="utf8"){return pI(this.readBytes(t),e)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let e=0;e<t.length;e++)this._data.setUint8(this.offset++,t[e]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let e=0;e<t.length;e++)this.writeUint8(t.charCodeAt(e));return this}writeUtf8(t){return this.writeBytes(Z6(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function E0(n){let t=n.length;for(;--t>=0;)n[t]=0}const rH=3,iH=258,VQ=29,nH=256,sH=nH+1+VQ,GQ=30,AH=512,aH=new Array((sH+2)*2);E0(aH);const oH=new Array(GQ*2);E0(oH);const lH=new Array(AH);E0(lH);const cH=new Array(iH-rH+1);E0(cH);const hH=new Array(VQ);E0(hH);const uH=new Array(GQ);E0(uH);const fH=(n,t,e,r)=>{let i=n&65535|0,s=n>>>16&65535|0,A=0;for(;e!==0;){A=e>2e3?2e3:e,e-=A;do i=i+t[r++]|0,s=s+i|0;while(--A);i%=65521,s%=65521}return i|s<<16|0};var uE=fH;const dH=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},gH=new Uint32Array(dH()),pH=(n,t,e,r)=>{const i=gH,s=r+e;n^=-1;for(let A=r;A<s;A++)n=n>>>8^i[(n^t[A])&255];return n^-1};var so=pH,fE={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"},jQ={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 mH=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var vH=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const r in e)mH(e,r)&&(n[r]=e[r])}}return n},wH=n=>{let t=0;for(let r=0,i=n.length;r<i;r++)t+=n[r].length;const e=new Uint8Array(t);for(let r=0,i=0,s=n.length;r<s;r++){let A=n[r];e.set(A,i),i+=A.length}return e},$Q={assign:vH,flattenChunks:wH};let WQ=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{WQ=!1}const fv=new Uint8Array(256);for(let n=0;n<256;n++)fv[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;fv[254]=fv[254]=1;var yH=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,r,i,s,A=n.length,a=0;for(i=0;i<A;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<A&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),a+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(a),s=0,i=0;s<a;i++)e=n.charCodeAt(i),(e&64512)===55296&&i+1<A&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const bH=(n,t)=>{if(t<65534&&n.subarray&&WQ)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let r=0;r<t;r++)e+=String.fromCharCode(n[r]);return e};var BH=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let r,i;const s=new Array(e*2);for(i=0,r=0;r<e;){let A=n[r++];if(A<128){s[i++]=A;continue}let a=fv[A];if(a>4){s[i++]=65533,r+=a-1;continue}for(A&=a===2?31:a===3?15:7;a>1&&r<e;)A=A<<6|n[r++]&63,a--;if(a>1){s[i++]=65533;continue}A<65536?s[i++]=A:(A-=65536,s[i++]=55296|A>>10&1023,s[i++]=56320|A&1023)}return bH(s,i)},CH=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+fv[n[e]]>t?e:t},dE={string2buf:yH,buf2string:BH,utf8border:CH};function xH(){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 EH=xH;const u2=16209,SH=16191;var FH=function(t,e){let r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,I,L,k,H,Q,W;const U=t.state;r=t.next_in,Q=t.input,i=r+(t.avail_in-5),s=t.next_out,W=t.output,A=s-(e-t.avail_out),a=s+(t.avail_out-257),o=U.dmax,l=U.wsize,h=U.whave,u=U.wnext,d=U.window,f=U.hold,p=U.bits,m=U.lencode,y=U.distcode,w=(1<<U.lenbits)-1,B=(1<<U.distbits)-1;t:do{p<15&&(f+=Q[r++]<<p,p+=8,f+=Q[r++]<<p,p+=8),E=m[f&w];e:for(;;){if(S=E>>>24,f>>>=S,p-=S,S=E>>>16&255,S===0)W[s++]=E&65535;else if(S&16){I=E&65535,S&=15,S&&(p<S&&(f+=Q[r++]<<p,p+=8),I+=f&(1<<S)-1,f>>>=S,p-=S),p<15&&(f+=Q[r++]<<p,p+=8,f+=Q[r++]<<p,p+=8),E=y[f&B];r:for(;;){if(S=E>>>24,f>>>=S,p-=S,S=E>>>16&255,S&16){if(L=E&65535,S&=15,p<S&&(f+=Q[r++]<<p,p+=8,p<S&&(f+=Q[r++]<<p,p+=8)),L+=f&(1<<S)-1,L>o){t.msg="invalid distance too far back",U.mode=u2;break t}if(f>>>=S,p-=S,S=s-A,L>S){if(S=L-S,S>h&&U.sane){t.msg="invalid distance too far back",U.mode=u2;break t}if(k=0,H=d,u===0){if(k+=l-S,S<I){I-=S;do W[s++]=d[k++];while(--S);k=s-L,H=W}}else if(u<S){if(k+=l+u-S,S-=u,S<I){I-=S;do W[s++]=d[k++];while(--S);if(k=0,u<I){S=u,I-=S;do W[s++]=d[k++];while(--S);k=s-L,H=W}}}else if(k+=u-S,S<I){I-=S;do W[s++]=d[k++];while(--S);k=s-L,H=W}for(;I>2;)W[s++]=H[k++],W[s++]=H[k++],W[s++]=H[k++],I-=3;I&&(W[s++]=H[k++],I>1&&(W[s++]=H[k++]))}else{k=s-L;do W[s++]=W[k++],W[s++]=W[k++],W[s++]=W[k++],I-=3;while(I>2);I&&(W[s++]=W[k++],I>1&&(W[s++]=W[k++]))}}else if(S&64){t.msg="invalid distance code",U.mode=u2;break t}else{E=y[(E&65535)+(f&(1<<S)-1)];continue r}break}}else if(S&64)if(S&32){U.mode=SH;break t}else{t.msg="invalid literal/length code",U.mode=u2;break t}else{E=m[(E&65535)+(f&(1<<S)-1)];continue e}break}}while(r<i&&s<a);I=p>>3,r-=I,p-=I<<3,f&=(1<<p)-1,t.next_in=r,t.next_out=s,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=s<a?257+(a-s):257-(s-a),U.hold=f,U.bits=p};const Wd=15,mI=852,vI=592,wI=0,c5=1,yI=2,TH=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]),IH=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]),_H=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]),UH=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]),LH=(n,t,e,r,i,s,A,a)=>{const o=a.bits;let l=0,h=0,u=0,d=0,f=0,p=0,m=0,y=0,w=0,B=0,E,S,I,L,k,H=null,Q;const W=new Uint16Array(Wd+1),U=new Uint16Array(Wd+1);let D=null,j,V,st;for(l=0;l<=Wd;l++)W[l]=0;for(h=0;h<r;h++)W[t[e+h]]++;for(f=o,d=Wd;d>=1&&W[d]===0;d--);if(f>d&&(f=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,a.bits=1,0;for(u=1;u<d&&W[u]===0;u++);for(f<u&&(f=u),y=1,l=1;l<=Wd;l++)if(y<<=1,y-=W[l],y<0)return-1;if(y>0&&(n===wI||d!==1))return-1;for(U[1]=0,l=1;l<Wd;l++)U[l+1]=U[l]+W[l];for(h=0;h<r;h++)t[e+h]!==0&&(A[U[t[e+h]]++]=h);if(n===wI?(H=D=A,Q=20):n===c5?(H=TH,D=IH,Q=257):(H=_H,D=UH,Q=0),B=0,h=0,l=u,k=s,p=f,m=0,I=-1,w=1<<f,L=w-1,n===c5&&w>mI||n===yI&&w>vI)return 1;for(;;){j=l-m,A[h]+1<Q?(V=0,st=A[h]):A[h]>=Q?(V=D[A[h]-Q],st=H[A[h]-Q]):(V=96,st=0),E=1<<l-m,S=1<<p,u=S;do S-=E,i[k+(B>>m)+S]=j<<24|V<<16|st|0;while(S!==0);for(E=1<<l-1;B&E;)E>>=1;if(E!==0?(B&=E-1,B+=E):B=0,h++,--W[l]===0){if(l===d)break;l=t[e+A[h]]}if(l>f&&(B&L)!==I){for(m===0&&(m=f),k+=u,p=l-m,y=1<<p;p+m<d&&(y-=W[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,n===c5&&w>mI||n===yI&&w>vI)return 1;I=B&L,i[I]=f<<24|p<<16|k-s|0}}return B!==0&&(i[k+B]=l-m<<24|64<<16|0),a.bits=f,0};var Ym=LH;const QH=0,zQ=1,XQ=2,{Z_FINISH:bI,Z_BLOCK:NH,Z_TREES:f2,Z_OK:gd,Z_STREAM_END:PH,Z_NEED_DICT:MH,Z_STREAM_ERROR:aa,Z_DATA_ERROR:qQ,Z_MEM_ERROR:YQ,Z_BUF_ERROR:kH,Z_DEFLATED:BI}=jQ,TB=16180,CI=16181,xI=16182,EI=16183,SI=16184,FI=16185,TI=16186,II=16187,_I=16188,UI=16189,xb=16190,ol=16191,h5=16192,LI=16193,u5=16194,QI=16195,NI=16196,PI=16197,MI=16198,d2=16199,g2=16200,kI=16201,OI=16202,DI=16203,RI=16204,HI=16205,f5=16206,KI=16207,VI=16208,Xr=16209,JQ=16210,ZQ=16211,OH=852,DH=592,RH=15,HH=RH,GI=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function KH(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const yd=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<TB||t.mode>ZQ?1:0},tN=n=>{if(yd(n))return aa;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=TB,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(OH),t.distcode=t.distdyn=new Int32Array(DH),t.sane=1,t.back=-1,gd},eN=n=>{if(yd(n))return aa;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,tN(n)},rN=(n,t)=>{let e;if(yd(n))return aa;const r=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?aa:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=e,r.wbits=t,eN(n))},iN=(n,t)=>{if(!n)return aa;const e=new KH;n.state=e,e.strm=n,e.window=null,e.mode=TB;const r=rN(n,t);return r!==gd&&(n.state=null),r},VH=n=>iN(n,HH);let jI=!0,d5,g5;const GH=n=>{if(jI){d5=new Int32Array(512),g5=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(Ym(zQ,n.lens,0,288,d5,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;Ym(XQ,n.lens,0,32,g5,0,n.work,{bits:5}),jI=!1}n.lencode=d5,n.lenbits=9,n.distcode=g5,n.distbits=5},nN=(n,t,e,r)=>{let i;const s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(e-r,e-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(e-r,e),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},jH=(n,t)=>{let e,r,i,s,A,a,o,l,h,u,d,f,p,m,y=0,w,B,E,S,I,L,k,H;const Q=new Uint8Array(4);let W,U;const D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yd(n)||!n.output||!n.input&&n.avail_in!==0)return aa;e=n.state,e.mode===ol&&(e.mode=h5),A=n.next_out,i=n.output,o=n.avail_out,s=n.next_in,r=n.input,a=n.avail_in,l=e.hold,h=e.bits,u=a,d=o,H=gd;t:for(;;)switch(e.mode){case TB:if(e.wrap===0){e.mode=h5;break}for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&2&&l===35615){e.wbits===0&&(e.wbits=15),e.check=0,Q[0]=l&255,Q[1]=l>>>8&255,e.check=so(e.check,Q,2,0),l=0,h=0,e.mode=CI;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((l&255)<<8)+(l>>8))%31){n.msg="incorrect header check",e.mode=Xr;break}if((l&15)!==BI){n.msg="unknown compression method",e.mode=Xr;break}if(l>>>=4,h-=4,k=(l&15)+8,e.wbits===0&&(e.wbits=k),k>15||k>e.wbits){n.msg="invalid window size",e.mode=Xr;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=l&512?UI:ol,l=0,h=0;break;case CI:for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.flags=l,(e.flags&255)!==BI){n.msg="unknown compression method",e.mode=Xr;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Xr;break}e.head&&(e.head.text=l>>8&1),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=so(e.check,Q,2,0)),l=0,h=0,e.mode=xI;case xI:for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.head&&(e.head.time=l),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,Q[2]=l>>>16&255,Q[3]=l>>>24&255,e.check=so(e.check,Q,4,0)),l=0,h=0,e.mode=EI;case EI:for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.head&&(e.head.xflags=l&255,e.head.os=l>>8),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=so(e.check,Q,2,0)),l=0,h=0,e.mode=SI;case SI:if(e.flags&1024){for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.length=l,e.head&&(e.head.extra_len=l),e.flags&512&&e.wrap&4&&(Q[0]=l&255,Q[1]=l>>>8&255,e.check=so(e.check,Q,2,0)),l=0,h=0}else e.head&&(e.head.extra=null);e.mode=FI;case FI:if(e.flags&1024&&(f=e.length,f>a&&(f=a),f&&(e.head&&(k=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(s,s+f),k)),e.flags&512&&e.wrap&4&&(e.check=so(e.check,r,f,s)),a-=f,s+=f,e.length-=f),e.length))break t;e.length=0,e.mode=TI;case TI:if(e.flags&2048){if(a===0)break t;f=0;do k=r[s+f++],e.head&&k&&e.length<65536&&(e.head.name+=String.fromCharCode(k));while(k&&f<a);if(e.flags&512&&e.wrap&4&&(e.check=so(e.check,r,f,s)),a-=f,s+=f,k)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=II;case II:if(e.flags&4096){if(a===0)break t;f=0;do k=r[s+f++],e.head&&k&&e.length<65536&&(e.head.comment+=String.fromCharCode(k));while(k&&f<a);if(e.flags&512&&e.wrap&4&&(e.check=so(e.check,r,f,s)),a-=f,s+=f,k)break t}else e.head&&(e.head.comment=null);e.mode=_I;case _I:if(e.flags&512){for(;h<16;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&4&&l!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Xr;break}l=0,h=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=ol;break;case UI:for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}n.adler=e.check=GI(l),l=0,h=0,e.mode=xb;case xb:if(e.havedict===0)return n.next_out=A,n.avail_out=o,n.next_in=s,n.avail_in=a,e.hold=l,e.bits=h,MH;n.adler=e.check=1,e.mode=ol;case ol:if(t===NH||t===f2)break t;case h5:if(e.last){l>>>=h&7,h-=h&7,e.mode=f5;break}for(;h<3;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}switch(e.last=l&1,l>>>=1,h-=1,l&3){case 0:e.mode=LI;break;case 1:if(GH(e),e.mode=d2,t===f2){l>>>=2,h-=2;break t}break;case 2:e.mode=NI;break;case 3:n.msg="invalid block type",e.mode=Xr}l>>>=2,h-=2;break;case LI:for(l>>>=h&7,h-=h&7;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if((l&65535)!==(l>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Xr;break}if(e.length=l&65535,l=0,h=0,e.mode=u5,t===f2)break t;case u5:e.mode=QI;case QI:if(f=e.length,f){if(f>a&&(f=a),f>o&&(f=o),f===0)break t;i.set(r.subarray(s,s+f),A),a-=f,s+=f,o-=f,A+=f,e.length-=f;break}e.mode=ol;break;case NI:for(;h<14;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.nlen=(l&31)+257,l>>>=5,h-=5,e.ndist=(l&31)+1,l>>>=5,h-=5,e.ncode=(l&15)+4,l>>>=4,h-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Xr;break}e.have=0,e.mode=PI;case PI:for(;e.have<e.ncode;){for(;h<3;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.lens[D[e.have++]]=l&7,l>>>=3,h-=3}for(;e.have<19;)e.lens[D[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,W={bits:e.lenbits},H=Ym(QH,e.lens,0,19,e.lencode,0,e.work,W),e.lenbits=W.bits,H){n.msg="invalid code lengths set",e.mode=Xr;break}e.have=0,e.mode=MI;case MI:for(;e.have<e.nlen+e.ndist;){for(;y=e.lencode[l&(1<<e.lenbits)-1],w=y>>>24,B=y>>>16&255,E=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(E<16)l>>>=w,h-=w,e.lens[e.have++]=E;else{if(E===16){for(U=w+2;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(l>>>=w,h-=w,e.have===0){n.msg="invalid bit length repeat",e.mode=Xr;break}k=e.lens[e.have-1],f=3+(l&3),l>>>=2,h-=2}else if(E===17){for(U=w+3;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=w,h-=w,k=0,f=3+(l&7),l>>>=3,h-=3}else{for(U=w+7;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=w,h-=w,k=0,f=11+(l&127),l>>>=7,h-=7}if(e.have+f>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Xr;break}for(;f--;)e.lens[e.have++]=k}}if(e.mode===Xr)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Xr;break}if(e.lenbits=9,W={bits:e.lenbits},H=Ym(zQ,e.lens,0,e.nlen,e.lencode,0,e.work,W),e.lenbits=W.bits,H){n.msg="invalid literal/lengths set",e.mode=Xr;break}if(e.distbits=6,e.distcode=e.distdyn,W={bits:e.distbits},H=Ym(XQ,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,W),e.distbits=W.bits,H){n.msg="invalid distances set",e.mode=Xr;break}if(e.mode=d2,t===f2)break t;case d2:e.mode=g2;case g2:if(a>=6&&o>=258){n.next_out=A,n.avail_out=o,n.next_in=s,n.avail_in=a,e.hold=l,e.bits=h,FH(n,d),A=n.next_out,i=n.output,o=n.avail_out,s=n.next_in,r=n.input,a=n.avail_in,l=e.hold,h=e.bits,e.mode===ol&&(e.back=-1);break}for(e.back=0;y=e.lencode[l&(1<<e.lenbits)-1],w=y>>>24,B=y>>>16&255,E=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(B&&!(B&240)){for(S=w,I=B,L=E;y=e.lencode[L+((l&(1<<S+I)-1)>>S)],w=y>>>24,B=y>>>16&255,E=y&65535,!(S+w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=S,h-=S,e.back+=S}if(l>>>=w,h-=w,e.back+=w,e.length=E,B===0){e.mode=HI;break}if(B&32){e.back=-1,e.mode=ol;break}if(B&64){n.msg="invalid literal/length code",e.mode=Xr;break}e.extra=B&15,e.mode=kI;case kI:if(e.extra){for(U=e.extra;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.length+=l&(1<<e.extra)-1,l>>>=e.extra,h-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=OI;case OI:for(;y=e.distcode[l&(1<<e.distbits)-1],w=y>>>24,B=y>>>16&255,E=y&65535,!(w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(!(B&240)){for(S=w,I=B,L=E;y=e.distcode[L+((l&(1<<S+I)-1)>>S)],w=y>>>24,B=y>>>16&255,E=y&65535,!(S+w<=h);){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}l>>>=S,h-=S,e.back+=S}if(l>>>=w,h-=w,e.back+=w,B&64){n.msg="invalid distance code",e.mode=Xr;break}e.offset=E,e.extra=B&15,e.mode=DI;case DI:if(e.extra){for(U=e.extra;h<U;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}e.offset+=l&(1<<e.extra)-1,l>>>=e.extra,h-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Xr;break}e.mode=RI;case RI:if(o===0)break t;if(f=d-o,e.offset>f){if(f=e.offset-f,f>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Xr;break}f>e.wnext?(f-=e.wnext,p=e.wsize-f):p=e.wnext-f,f>e.length&&(f=e.length),m=e.window}else m=i,p=A-e.offset,f=e.length;f>o&&(f=o),o-=f,e.length-=f;do i[A++]=m[p++];while(--f);e.length===0&&(e.mode=g2);break;case HI:if(o===0)break t;i[A++]=e.length,o--,e.mode=g2;break;case f5:if(e.wrap){for(;h<32;){if(a===0)break t;a--,l|=r[s++]<<h,h+=8}if(d-=o,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?so(e.check,i,d,A-d):uE(e.check,i,d,A-d)),d=o,e.wrap&4&&(e.flags?l:GI(l))!==e.check){n.msg="incorrect data check",e.mode=Xr;break}l=0,h=0}e.mode=KI;case KI:if(e.wrap&&e.flags){for(;h<32;){if(a===0)break t;a--,l+=r[s++]<<h,h+=8}if(e.wrap&4&&l!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Xr;break}l=0,h=0}e.mode=VI;case VI:H=PH;break t;case Xr:H=qQ;break t;case JQ:return YQ;case ZQ:default:return aa}return n.next_out=A,n.avail_out=o,n.next_in=s,n.avail_in=a,e.hold=l,e.bits=h,(e.wsize||d!==n.avail_out&&e.mode<Xr&&(e.mode<f5||t!==bI))&&nN(n,n.output,n.next_out,d-n.avail_out),u-=n.avail_in,d-=n.avail_out,n.total_in+=u,n.total_out+=d,e.total+=d,e.wrap&4&&d&&(n.adler=e.check=e.flags?so(e.check,i,d,n.next_out-d):uE(e.check,i,d,n.next_out-d)),n.data_type=e.bits+(e.last?64:0)+(e.mode===ol?128:0)+(e.mode===d2||e.mode===u5?256:0),(u===0&&d===0||t===bI)&&H===gd&&(H=kH),H},$H=n=>{if(yd(n))return aa;let t=n.state;return t.window&&(t.window=null),n.state=null,gd},WH=(n,t)=>{if(yd(n))return aa;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,gd):aa},zH=(n,t)=>{const e=t.length;let r,i,s;return yd(n)||(r=n.state,r.wrap!==0&&r.mode!==xb)?aa:r.mode===xb&&(i=1,i=uE(i,t,e,0),i!==r.check)?qQ:(s=nN(n,t,e,e),s?(r.mode=JQ,YQ):(r.havedict=1,gd))};var XH=eN,qH=rN,YH=tN,JH=VH,ZH=iN,t8=jH,e8=$H,r8=WH,i8=zH,n8="pako inflate (from Nodeca project)",vl={inflateReset:XH,inflateReset2:qH,inflateResetKeep:YH,inflateInit:JH,inflateInit2:ZH,inflate:t8,inflateEnd:e8,inflateGetHeader:r8,inflateSetDictionary:i8,inflateInfo:n8};function s8(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var A8=s8;const sN=Object.prototype.toString,{Z_NO_FLUSH:a8,Z_FINISH:o8,Z_OK:dv,Z_STREAM_END:p5,Z_NEED_DICT:m5,Z_STREAM_ERROR:l8,Z_DATA_ERROR:$I,Z_MEM_ERROR:c8}=jQ;function gw(n){this.options=$Q.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new EH,this.strm.avail_out=0;let e=vl.inflateInit2(this.strm,t.windowBits);if(e!==dv)throw new Error(fE[e]);if(this.header=new A8,vl.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=dE.string2buf(t.dictionary):sN.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=vl.inflateSetDictionary(this.strm,t.dictionary),e!==dv)))throw new Error(fE[e])}gw.prototype.push=function(n,t){const e=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,A,a;if(this.ended)return!1;for(t===~~t?A=t:A=t===!0?o8:a8,sN.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),s=vl.inflate(e,A),s===m5&&i&&(s=vl.inflateSetDictionary(e,i),s===dv?s=vl.inflate(e,A):s===$I&&(s=m5));e.avail_in>0&&s===p5&&e.state.wrap>0&&n[e.next_in]!==0;)vl.inflateReset(e),s=vl.inflate(e,A);switch(s){case l8:case $I:case m5:case c8:return this.onEnd(s),this.ended=!0,!1}if(a=e.avail_out,e.next_out&&(e.avail_out===0||s===p5))if(this.options.to==="string"){let o=dE.utf8border(e.output,e.next_out),l=e.next_out-o,h=dE.buf2string(e.output,o);e.next_out=l,e.avail_out=r-l,l&&e.output.set(e.output.subarray(o,o+l),0),this.onData(h)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===dv&&a===0)){if(s===p5)return s=vl.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};gw.prototype.onData=function(n){this.chunks.push(n)};gw.prototype.onEnd=function(n){n===dv&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=$Q.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function h8(n,t){const e=new gw(t);if(e.push(n),e.err)throw e.msg||fE[e.err];return e.result}var u8=gw,f8=h8,d8={Inflate:u8,inflate:f8};const{Inflate:g8,inflate:p8}=d8;var WI=g8,m8=p8;const AN=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t=t>>>1;AN[n]=t}const zI=4294967295;function v8(n,t,e){let r=n;for(let i=0;i<e;i++)r=AN[(r^t[i])&255]^r>>>8;return r}function w8(n,t){return(v8(zI,n,t)^zI)>>>0}function XI(n,t,e){const r=n.readUint32(),i=w8(new Uint8Array(n.buffer,n.byteOffset+n.offset-t-4,t),t);if(i!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${i}`)}function aN(n,t,e){for(let r=0;r<e;r++)t[r]=n[r]}function oN(n,t,e,r){let i=0;for(;i<r;i++)t[i]=n[i];for(;i<e;i++)t[i]=n[i]+t[i-r]&255}function lN(n,t,e,r){let i=0;if(e.length===0)for(;i<r;i++)t[i]=n[i];else for(;i<r;i++)t[i]=n[i]+e[i]&255}function cN(n,t,e,r,i){let s=0;if(e.length===0){for(;s<i;s++)t[s]=n[s];for(;s<r;s++)t[s]=n[s]+(t[s-i]>>1)&255}else{for(;s<i;s++)t[s]=n[s]+(e[s]>>1)&255;for(;s<r;s++)t[s]=n[s]+(t[s-i]+e[s]>>1)&255}}function hN(n,t,e,r,i){let s=0;if(e.length===0){for(;s<i;s++)t[s]=n[s];for(;s<r;s++)t[s]=n[s]+t[s-i]&255}else{for(;s<i;s++)t[s]=n[s]+e[s]&255;for(;s<r;s++)t[s]=n[s]+y8(t[s-i],e[s],e[s-i])&255}}function y8(n,t,e){const r=n+t-e,i=Math.abs(r-n),s=Math.abs(r-t),A=Math.abs(r-e);return i<=s&&i<=A?n:s<=A?t:e}function b8(n,t,e,r,i,s){switch(n){case 0:aN(t,e,i);break;case 1:oN(t,e,i,s);break;case 2:lN(t,e,r,i);break;case 3:cN(t,e,r,i,s);break;case 4:hN(t,e,r,i,s);break;default:throw new Error(`Unsupported filter: ${n}`)}}const B8=new Uint16Array([255]),C8=new Uint8Array(B8.buffer),x8=C8[0]===255;function E8(n){const{data:t,width:e,height:r,channels:i,depth:s}=n,A=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(s/8)*i,o=new Uint8Array(r*e*a);let l=0;for(let h=0;h<7;h++){const u=A[h],d=Math.ceil((e-u.x)/u.xStep),f=Math.ceil((r-u.y)/u.yStep);if(d<=0||f<=0)continue;const p=d*a,m=new Uint8Array(p);for(let y=0;y<f;y++){const w=t[l++],B=t.subarray(l,l+p);l+=p;const E=new Uint8Array(p);b8(w,B,E,m,p,a),m.set(E);for(let S=0;S<d;S++){const I=u.x+S*u.xStep,L=u.y+y*u.yStep;if(!(I>=e||L>=r))for(let k=0;k<a;k++)o[(L*e+I)*a+k]=E[S*a+k]}}}if(s===16){const h=new Uint16Array(o.buffer);if(x8)for(let u=0;u<h.length;u++)h[u]=S8(h[u]);return h}else return o}function S8(n){return(n&255)<<8|n>>8&255}const F8=new Uint16Array([255]),T8=new Uint8Array(F8.buffer),I8=T8[0]===255,_8=new Uint8Array(0);function qI(n){const{data:t,width:e,height:r,channels:i,depth:s}=n,A=Math.ceil(s/8)*i,a=Math.ceil(s/8*i*e),o=new Uint8Array(r*a);let l=_8,h=0,u,d;for(let f=0;f<r;f++){switch(u=t.subarray(h+1,h+1+a),d=o.subarray(f*a,(f+1)*a),t[h]){case 0:aN(u,d,a);break;case 1:oN(u,d,a,A);break;case 2:lN(u,d,l,a);break;case 3:cN(u,d,l,a,A);break;case 4:hN(u,d,l,a,A);break;default:throw new Error(`Unsupported filter: ${t[h]}`)}l=d,h+=a+1}if(s===16){const f=new Uint16Array(o.buffer);if(I8)for(let p=0;p<f.length;p++)f[p]=U8(f[p]);return f}else return o}function U8(n){return(n&255)<<8|n>>8&255}const by=Uint8Array.of(137,80,78,71,13,10,26,10);function YI(n){if(!L8(n.readBytes(by.length)))throw new Error("wrong PNG signature")}function L8(n){if(n.length<by.length)return!1;for(let t=0;t<by.length;t++)if(n[t]!==by[t])return!1;return!0}const Q8="tEXt",N8=0,uN=new TextDecoder("latin1");function P8(n){if(k8(n),n.length===0||n.length>79)throw new Error("keyword length must be between 1 and 79")}const M8=/^[\u0000-\u00FF]*$/;function k8(n){if(!M8.test(n))throw new Error("invalid latin1 text")}function O8(n,t,e){const r=fN(t);n[r]=D8(t,e-r.length-1)}function fN(n){for(n.mark();n.readByte()!==N8;);const t=n.offset;n.reset();const e=uN.decode(n.readBytes(t-n.offset-1));return n.skip(1),P8(e),e}function D8(n,t){return uN.decode(n.readBytes(t))}const sA={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},v5={UNKNOWN:-1,DEFLATE:0},JI={UNKNOWN:-1,ADAPTIVE:0},w5={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},p2={NONE:0,BACKGROUND:1,PREVIOUS:2},y5={SOURCE:0,OVER:1};class R8 extends t4{constructor(e,r={}){super(e);ct(this,"_checkCrc");ct(this,"_inflator");ct(this,"_png");ct(this,"_apng");ct(this,"_end");ct(this,"_hasPalette");ct(this,"_palette");ct(this,"_hasTransparency");ct(this,"_transparency");ct(this,"_compressionMethod");ct(this,"_filterMethod");ct(this,"_interlaceMethod");ct(this,"_colorType");ct(this,"_isAnimated");ct(this,"_numberOfFrames");ct(this,"_numberOfPlays");ct(this,"_frames");ct(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new WI,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=v5.UNKNOWN,this._filterMethod=JI.UNKNOWN,this._interlaceMethod=w5.UNKNOWN,this._colorType=sA.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(YI(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeChunk(e,r)}return this.decodeImage(),this._png}decodeApng(){for(YI(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(e,r)}return this.decodeApngImage(),this._apng}decodeChunk(e,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case Q8:O8(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-i!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?XI(this,e+4,r):this.skip(4)}decodeApngChunk(e,r){const i=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,r),this.offset=i+e;break}if(this.offset-i!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?XI(this,e+4,r):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=H8(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case sA.GREYSCALE:i=1;break;case sA.TRUECOLOUR:i=3;break;case sA.INDEXED_COLOUR:i=1;break;case sA.GREYSCALE_ALPHA:i=2;break;case sA.TRUECOLOUR_ALPHA:i=4;break;case sA.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==v5.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const r=e/3;this._hasPalette=!0;const i=[];this._palette=i;for(let s=0;s<r;s++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const r=e,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let r=e,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case sA.GREYSCALE:case sA.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let r=0;r<e/2;r++)this._transparency[r]=this.readUint16();break}case sA.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let r=0;for(;r<e;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case sA.UNKNOWN:case sA.GREYSCALE_ALPHA:case sA.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const r=fN(this),i=this.readUint8();if(i!==v5.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const s=this.readBytes(e-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:m8(s)}}decodepHYs(){const e=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:e,y:r,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const r={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(e);if(i){if(i.data=qI({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const s=this._apng.frames.at(e-1);this.disposeFrame(i,s,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(e,r,i){switch(e.disposeOp){case p2.NONE:break;case p2.BACKGROUND:for(let s=0;s<this._png.height;s++)for(let A=0;A<this._png.width;A++){const a=(s*e.width+A)*this._png.channels;for(let o=0;o<this._png.channels;o++)i.data[a+o]=0}break;case p2.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,r){const i=1<<this._png.depth,s=(A,a)=>{const o=((A+r.yOffset)*this._png.width+r.xOffset+a)*this._png.channels,l=(A*r.width+a)*this._png.channels;return{index:o,frameIndex:l}};switch(r.blendOp){case y5.SOURCE:for(let A=0;A<r.height;A++)for(let a=0;a<r.width;a++){const{index:o,frameIndex:l}=s(A,a);for(let h=0;h<this._png.channels;h++)e.data[o+h]=r.data[l+h]}break;case y5.OVER:for(let A=0;A<r.height;A++)for(let a=0;a<r.width;a++){const{index:o,frameIndex:l}=s(A,a);for(let h=0;h<this._png.channels;h++){const u=r.data[l+this._png.channels-1]/i,d=h%(this._png.channels-1)===0?1:r.data[l+h],f=Math.floor(u*d+(1-u)*e.data[o+h]);e.data[o+h]+=f}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==JI.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===w5.NO_INTERLACE)this._png.data=qI({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===w5.ADAM7)this._png.data=E8({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,r=this._frames.at(-1);r?r.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:p2.NONE,blendOp:y5.SOURCE,data:e}),this._inflator=new WI,this._writingDataChunks=!1}}function H8(n){if(n!==1&&n!==2&&n!==4&&n!==8&&n!==16)throw new Error(`invalid bit depth: ${n}`);return n}var ZI;(function(n){n[n.UNKNOWN=0]="UNKNOWN",n[n.METRE=1]="METRE"})(ZI||(ZI={}));function K8(n,t){return new R8(n,t).decode()}/** @license
|
|
3
|
+
*
|
|
4
|
+
* jsPDF - PDF Document creation from JavaScript
|
|
5
|
+
* Version 4.2.1 Built on 2026-03-17T11:11:27.057Z
|
|
6
|
+
* CommitID 00000000
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2010-2025 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
|
9
|
+
* 2015-2025 yWorks GmbH, http://www.yworks.com
|
|
10
|
+
* 2015-2025 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
|
|
11
|
+
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
|
|
12
|
+
* 2010 Aaron Spike, https://github.com/acspike
|
|
13
|
+
* 2012 Willow Systems Corporation, https://github.com/willowsystems
|
|
14
|
+
* 2012 Pablo Hess, https://github.com/pablohess
|
|
15
|
+
* 2012 Florian Jenett, https://github.com/fjenett
|
|
16
|
+
* 2013 Warren Weckesser, https://github.com/warrenweckesser
|
|
17
|
+
* 2013 Youssef Beddad, https://github.com/lifof
|
|
18
|
+
* 2013 Lee Driscoll, https://github.com/lsdriscoll
|
|
19
|
+
* 2013 Stefan Slonevskiy, https://github.com/stefslon
|
|
20
|
+
* 2013 Jeremy Morel, https://github.com/jmorel
|
|
21
|
+
* 2013 Christoph Hartmann, https://github.com/chris-rock
|
|
22
|
+
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
|
23
|
+
* 2014 James Makes, https://github.com/dollaruw
|
|
24
|
+
* 2014 Diego Casorran, https://github.com/diegocr
|
|
25
|
+
* 2014 Steven Spungin, https://github.com/Flamenco
|
|
26
|
+
* 2014 Kenneth Glassey, https://github.com/Gavvers
|
|
27
|
+
*
|
|
28
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
29
|
+
* a copy of this software and associated documentation files (the
|
|
30
|
+
* "Software"), to deal in the Software without restriction, including
|
|
31
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
32
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
33
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
34
|
+
* the following conditions:
|
|
35
|
+
*
|
|
36
|
+
* The above copyright notice and this permission notice shall be
|
|
37
|
+
* included in all copies or substantial portions of the Software.
|
|
38
|
+
*
|
|
39
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
40
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
41
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
42
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
43
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
44
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
45
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
46
|
+
*
|
|
47
|
+
* Contributor(s):
|
|
48
|
+
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
|
|
49
|
+
* kim3er, mfo, alnorth, Flamenco
|
|
50
|
+
*/var be=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function b5(){be.console&&typeof be.console.log=="function"&&be.console.log.apply(be.console,arguments)}var _r={log:b5,warn:function(n){be.console&&(typeof be.console.warn=="function"?be.console.warn.apply(be.console,arguments):b5.call(null,arguments))},error:function(n){be.console&&(typeof be.console.error=="function"?be.console.error.apply(be.console,arguments):b5(n))}};function B5(n,t,e){var r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){Tu(r.response,t,e)},r.onerror=function(){_r.error("could not download file")},r.send()}function t_(n){var t=new XMLHttpRequest;t.open("HEAD",n,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function m2(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(t)}}var Tu=be.saveAs||((typeof window>"u"?"undefined":sr(window))!=="object"||window!==be?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,t,e){var r=be.URL||be.webkitURL,i=document.createElement("a");t=t||n.name||"download",i.download=t,i.rel="noopener",typeof n=="string"?(i.href=n,i.origin!==location.origin?t_(i.href)?B5(n,t,e):m2(i,i.target="_blank"):m2(i)):(i.href=r.createObjectURL(n),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){m2(i)},0))}:"msSaveOrOpenBlob"in navigator?function(n,t,e){if(t=t||n.name||"download",typeof n=="string")if(t_(n))B5(n,t,e);else{var r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){m2(r)})}else navigator.msSaveOrOpenBlob(function(i,s){return s===void 0?s={autoBom:!1}:sr(s)!=="object"&&(_r.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(n,e),t)}:function(n,t,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return B5(n,t,e);var i=n.type==="application/octet-stream",s=/constructor/i.test(be.HTMLElement)||be.safari,A=/CriOS\/[\d]+/.test(navigator.userAgent);if((A||i&&s)&&(typeof FileReader>"u"?"undefined":sr(FileReader))==="object"){var a=new FileReader;a.onloadend=function(){var h=a.result;h=A?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=h:location=h,r=null},a.readAsDataURL(n)}else{var o=be.URL||be.webkitURL,l=o.createObjectURL(n);r?r.location=l:location.href=l,r=null,setTimeout(function(){o.revokeObjectURL(l)},4e4)}});/**
|
|
51
|
+
* A class to parse color values
|
|
52
|
+
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
53
|
+
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
54
|
+
* @license Use it if you like it
|
|
55
|
+
*/function dN(n){var t;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],r=0;r<e.length;r++){var i=e[r].re,s=e[r].process,A=i.exec(n);A&&(t=s(A),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),o=this.g.toString(16),l=this.b.toString(16);return a.length==1&&(a="0"+a),o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),"#"+a+o+l}}var By=be.atob.bind(be),e_=be.btoa.bind(be);/**
|
|
56
|
+
* @license
|
|
57
|
+
* Joseph Myers does not specify a particular license for his work.
|
|
58
|
+
*
|
|
59
|
+
* Author: Joseph Myers
|
|
60
|
+
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
61
|
+
*
|
|
62
|
+
* Modified by: Owen Leong
|
|
63
|
+
*/function C5(n,t){var e=n[0],r=n[1],i=n[2],s=n[3];e=Xn(e,r,i,s,t[0],7,-680876936),s=Xn(s,e,r,i,t[1],12,-389564586),i=Xn(i,s,e,r,t[2],17,606105819),r=Xn(r,i,s,e,t[3],22,-1044525330),e=Xn(e,r,i,s,t[4],7,-176418897),s=Xn(s,e,r,i,t[5],12,1200080426),i=Xn(i,s,e,r,t[6],17,-1473231341),r=Xn(r,i,s,e,t[7],22,-45705983),e=Xn(e,r,i,s,t[8],7,1770035416),s=Xn(s,e,r,i,t[9],12,-1958414417),i=Xn(i,s,e,r,t[10],17,-42063),r=Xn(r,i,s,e,t[11],22,-1990404162),e=Xn(e,r,i,s,t[12],7,1804603682),s=Xn(s,e,r,i,t[13],12,-40341101),i=Xn(i,s,e,r,t[14],17,-1502002290),e=qn(e,r=Xn(r,i,s,e,t[15],22,1236535329),i,s,t[1],5,-165796510),s=qn(s,e,r,i,t[6],9,-1069501632),i=qn(i,s,e,r,t[11],14,643717713),r=qn(r,i,s,e,t[0],20,-373897302),e=qn(e,r,i,s,t[5],5,-701558691),s=qn(s,e,r,i,t[10],9,38016083),i=qn(i,s,e,r,t[15],14,-660478335),r=qn(r,i,s,e,t[4],20,-405537848),e=qn(e,r,i,s,t[9],5,568446438),s=qn(s,e,r,i,t[14],9,-1019803690),i=qn(i,s,e,r,t[3],14,-187363961),r=qn(r,i,s,e,t[8],20,1163531501),e=qn(e,r,i,s,t[13],5,-1444681467),s=qn(s,e,r,i,t[2],9,-51403784),i=qn(i,s,e,r,t[7],14,1735328473),e=Yn(e,r=qn(r,i,s,e,t[12],20,-1926607734),i,s,t[5],4,-378558),s=Yn(s,e,r,i,t[8],11,-2022574463),i=Yn(i,s,e,r,t[11],16,1839030562),r=Yn(r,i,s,e,t[14],23,-35309556),e=Yn(e,r,i,s,t[1],4,-1530992060),s=Yn(s,e,r,i,t[4],11,1272893353),i=Yn(i,s,e,r,t[7],16,-155497632),r=Yn(r,i,s,e,t[10],23,-1094730640),e=Yn(e,r,i,s,t[13],4,681279174),s=Yn(s,e,r,i,t[0],11,-358537222),i=Yn(i,s,e,r,t[3],16,-722521979),r=Yn(r,i,s,e,t[6],23,76029189),e=Yn(e,r,i,s,t[9],4,-640364487),s=Yn(s,e,r,i,t[12],11,-421815835),i=Yn(i,s,e,r,t[15],16,530742520),e=Jn(e,r=Yn(r,i,s,e,t[2],23,-995338651),i,s,t[0],6,-198630844),s=Jn(s,e,r,i,t[7],10,1126891415),i=Jn(i,s,e,r,t[14],15,-1416354905),r=Jn(r,i,s,e,t[5],21,-57434055),e=Jn(e,r,i,s,t[12],6,1700485571),s=Jn(s,e,r,i,t[3],10,-1894986606),i=Jn(i,s,e,r,t[10],15,-1051523),r=Jn(r,i,s,e,t[1],21,-2054922799),e=Jn(e,r,i,s,t[8],6,1873313359),s=Jn(s,e,r,i,t[15],10,-30611744),i=Jn(i,s,e,r,t[6],15,-1560198380),r=Jn(r,i,s,e,t[13],21,1309151649),e=Jn(e,r,i,s,t[4],6,-145523070),s=Jn(s,e,r,i,t[11],10,-1120210379),i=Jn(i,s,e,r,t[2],15,718787259),r=Jn(r,i,s,e,t[9],21,-343485551),n[0]=Hh(e,n[0]),n[1]=Hh(r,n[1]),n[2]=Hh(i,n[2]),n[3]=Hh(s,n[3])}function IB(n,t,e,r,i,s){return t=Hh(Hh(t,n),Hh(r,s)),Hh(t<<i|t>>>32-i,e)}function Xn(n,t,e,r,i,s,A){return IB(t&e|~t&r,n,t,i,s,A)}function qn(n,t,e,r,i,s,A){return IB(t&r|e&~r,n,t,i,s,A)}function Yn(n,t,e,r,i,s,A){return IB(t^e^r,n,t,i,s,A)}function Jn(n,t,e,r,i,s,A){return IB(e^(t|~r),n,t,i,s,A)}function gN(n){var t,e=n.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=n.length;t+=64)C5(r,V8(n.substring(t-64,t)));n=n.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<n.length;t++)i[t>>2]|=n.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(C5(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*e,C5(r,i),r}function V8(n){var t,e=[];for(t=0;t<64;t+=4)e[t>>2]=n.charCodeAt(t)+(n.charCodeAt(t+1)<<8)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+3)<<24);return e}var r_="0123456789abcdef".split("");function G8(n){for(var t="",e=0;e<4;e++)t+=r_[n>>8*e+4&15]+r_[n>>8*e&15];return t}function j8(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function gE(n){return gN(n).map(j8).join("")}var $8=function(n){for(var t=0;t<n.length;t++)n[t]=G8(n[t]);return n.join("")}(gN("hello"))!="5d41402abc4b2a76b9719d911017c592";function Hh(n,t){if($8){var e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}return n+t&4294967295}/**
|
|
64
|
+
* @license
|
|
65
|
+
* FPDF is released under a permissive license: there is no usage restriction.
|
|
66
|
+
* You may embed it freely in your application (commercial or not), with or
|
|
67
|
+
* without modifications.
|
|
68
|
+
*
|
|
69
|
+
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
70
|
+
*/function pE(n,t){var e,r,i,s;if(n!==e){for(var A=(i=n,s=1+(256/n.length|0),new Array(s+1).join(i)),a=[],o=0;o<256;o++)a[o]=o;var l=0;for(o=0;o<256;o++){var h=a[o];l=(l+h+A.charCodeAt(o))%256,a[o]=a[l],a[l]=h}e=n,r=a}else a=r;var u=t.length,d=0,f=0,p="";for(o=0;o<u;o++)f=(f+(h=a[d=(d+1)%256]))%256,a[d]=a[f],a[f]=h,A=a[(a[d]+a[f])%256],p+=String.fromCharCode(t.charCodeAt(o)^A);return p}/**
|
|
71
|
+
* @license
|
|
72
|
+
* Licensed under the MIT License.
|
|
73
|
+
* http://opensource.org/licenses/mit-license
|
|
74
|
+
* Author: Owen Leong (@owenl131)
|
|
75
|
+
* Date: 15 Oct 2020
|
|
76
|
+
* References:
|
|
77
|
+
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
78
|
+
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
79
|
+
* http://www.fpdf.org/en/script/script37.php
|
|
80
|
+
*/var i_={print:4,modify:8,copy:16,"annot-forms":32};function ug(n,t,e,r){this.v=1,this.r=2;var i=192;n.forEach(function(a){if(i_.perm!==void 0)throw new Error("Invalid permission: "+a);i+=i_[a]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(t+this.padding).substr(0,32),A=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,A),this.P=-(1+(255^i)),this.encryptionKey=gE(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=pE(this.encryptionKey,this.padding)}function fg(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var t="",e=n.length,r=0;r<e;r++){var i=n.charCodeAt(r);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):n[r]}return t}function n_(n){if(sr(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,i){if(i=i||!1,typeof e!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var s=Math.random().toString(35);return t[e][s]=[r,!!i],s},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(e){if(t.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var s in t[e]){var A=t[e][s];try{A[0].apply(n,r)}catch(a){be.console&&_r.error("jsPDF PubSub Error",a.message,a)}A[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function pd(n){if(!(this instanceof pd))return new pd(n);var t="opacity,stroke-opacity".split(",");for(var e in n)n.hasOwnProperty(e)&&t.indexOf(e)>=0&&(this[e]=n[e]);this.id="",this.objectNumber=-1}function pN(n,t){this.gState=n,this.matrix=t,this.id="",this.objectNumber=-1}function jc(n,t,e,r,i){if(!(this instanceof jc))return new jc(n,t,e,r,i);this.type=n==="axial"?2:3,this.coords=t,this.colors=e,pN.call(this,r,i)}function ku(n,t,e,r,i){if(!(this instanceof ku))return new ku(n,t,e,r,i);this.boundingBox=n,this.xStep=t,this.yStep=e,this.stream="",this.cloneIndex=0,pN.call(this,r,i)}function le(n){var t,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],s=arguments[3],A=[],a=1,o=16,l="S",h=null;sr(n=n||{})==="object"&&(e=n.orientation,r=n.unit||r,i=n.format||i,s=n.compress||n.compressPdf||s,(h=n.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),a=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(t=n.precision),n.floatPrecision!==void 0&&(o=n.floatPrecision),l=n.defaultPathOperation||"S"),A=n.filters||(s===!0?["FlateEncode"]:A),r=r||"mm",e=(""+(e||"P")).toLowerCase();var u=n.putOnlyUsedFonts||!1,d={},f={internal:{},__private__:{}};f.__private__.PubSub=n_;var p="1.3",m=f.__private__.getPdfVersion=function(){return p};f.__private__.setPdfVersion=function(b){p=b};var y={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return y};var w=f.__private__.getPageFormat=function(b){return y[b]};i=i||"a4";var B="compat",E="advanced",S=B;function I(){this.saveGraphicsState(),z(new Ht(ce,0,0,-ce,0,lu()*ce).toString()+" cm"),this.setFontSize(this.getFontSize()/ce),l="n",S=E}function L(){this.restoreGraphicsState(),l="S",S=B}var k=f.__private__.combineFontStyleAndFontWeight=function(b,N){if(b=="bold"&&N=="normal"||b=="bold"&&N==400||b=="normal"&&N=="italic"||b=="bold"&&N=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return N&&(b=N==400||N==="normal"?b==="italic"?"italic":"normal":N!=700&&N!=="bold"||b!=="normal"?(N==700?"bold":N)+""+b:"bold"),b};f.advancedAPI=function(b){var N=S===B;return N&&I.call(this),typeof b!="function"||(b(this),N&&L.call(this)),this},f.compatAPI=function(b){var N=S===E;return N&&L.call(this),typeof b!="function"||(b(this),N&&I.call(this)),this},f.isAdvancedAPI=function(){return S===E};var H,Q=function(b){if(S!==E)throw new Error(b+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},W=f.roundToPrecision=f.__private__.roundToPrecision=function(b,N){var X=t||N;if(isNaN(b)||isNaN(X))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return b.toFixed(X).replace(/0+$/,"")};H=f.hpf=f.__private__.hpf=typeof o=="number"?function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return W(b,o)}:o==="smart"?function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return W(b,b>-1&&b<1?16:5)}:function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return W(b,16)};var U=f.f2=f.__private__.f2=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.f2");return W(b,2)},D=f.__private__.f3=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.f3");return W(b,3)},j=f.scale=f.__private__.scale=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.scale");return S===B?b*ce:S===E?b:void 0},V=function(b){return j(function(N){return S===B?lu()-N:S===E?N:void 0}(b))};f.__private__.setPrecision=f.setPrecision=function(b){typeof parseInt(b,10)=="number"&&(t=parseInt(b,10))};var st,rt="00000000000000000000000000000000",it=f.__private__.getFileId=function(){return rt},At=f.__private__.setFileId=function(b){return rt=b!==void 0&&/^[a-fA-F0-9]{32}$/.test(b)?b.toUpperCase():rt.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),h!==null&&(Bn=new ug(h.userPermissions,h.userPassword,h.ownerPassword,rt)),rt};f.setFileId=function(b){return At(b),this},f.getFileId=function(){return it()};var ut=f.__private__.convertDateToPDFDate=function(b){var N=b.getTimezoneOffset(),X=N<0?"+":"-",nt=Math.floor(Math.abs(N/60)),ht=Math.abs(N%60),bt=[X,q(nt),"'",q(ht),"'"].join("");return["D:",b.getFullYear(),q(b.getMonth()+1),q(b.getDate()),q(b.getHours()),q(b.getMinutes()),q(b.getSeconds()),bt].join("")},vt=f.__private__.convertPDFDateToDate=function(b){var N=parseInt(b.substr(2,4),10),X=parseInt(b.substr(6,2),10)-1,nt=parseInt(b.substr(8,2),10),ht=parseInt(b.substr(10,2),10),bt=parseInt(b.substr(12,2),10),Ft=parseInt(b.substr(14,2),10);return new Date(N,X,nt,ht,bt,Ft,0)},mt=f.__private__.setCreationDate=function(b){var N;if(b===void 0&&(b=new Date),b instanceof Date)N=ut(b);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(b))throw new Error("Invalid argument passed to jsPDF.setCreationDate");N=b}return st=N},M=f.__private__.getCreationDate=function(b){var N=st;return b==="jsDate"&&(N=vt(st)),N};f.setCreationDate=function(b){return mt(b),this},f.getCreationDate=function(b){return M(b)};var $,q=f.__private__.padd2=function(b){return("0"+parseInt(b)).slice(-2)},tt=f.__private__.padd2Hex=function(b){return("00"+(b=b.toString())).substr(b.length)},et=0,ot=[],dt=[],wt=0,yt=[],St=[],Mt=!1,Pt=dt;f.__private__.setCustomOutputDestination=function(b){Mt=!0,Pt=b};var jt=function(b){Mt||(Pt=b)};f.__private__.resetCustomOutputDestination=function(){Mt=!1,Pt=dt};var z=f.__private__.out=function(b){return b=b.toString(),wt+=b.length+1,Pt.push(b),Pt},Nt=f.__private__.write=function(b){return z(arguments.length===1?b.toString():Array.prototype.join.call(arguments," "))},ve=f.__private__.getArrayBuffer=function(b){for(var N=b.length,X=new ArrayBuffer(N),nt=new Uint8Array(X);N--;)nt[N]=b.charCodeAt(N);return X},re=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return re};var Tt=n.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(b){return Tt=S===E?b/ce:b,this};var ie,kt=f.__private__.getFontSize=f.getFontSize=function(){return S===B?Tt:Tt*ce},qt=n.R2L||!1;f.__private__.setR2L=f.setR2L=function(b){return qt=b,this},f.__private__.getR2L=f.getR2L=function(){return qt};var Wt,we=f.__private__.setZoomMode=function(b){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(b))ie=b;else if(isNaN(b)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(b)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+b+'" is not recognized.');ie=b}else ie=parseInt(b,10)};f.__private__.getZoomMode=function(){return ie};var Ie,me=f.__private__.setPageMode=function(b){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(b)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+b+'" is not recognized.');Wt=b};f.__private__.getPageMode=function(){return Wt};var _e=f.__private__.setLayoutMode=function(b){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(b)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+b+'" is not recognized.');Ie=b};f.__private__.getLayoutMode=function(){return Ie},f.__private__.setDisplayMode=f.setDisplayMode=function(b,N,X){return we(b),_e(N),me(X),this};var Be={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(b){if(Object.keys(Be).indexOf(b)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Be[b]},f.__private__.getDocumentProperties=function(){return Be},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(b){for(var N in Be)Be.hasOwnProperty(N)&&b[N]&&(Be[N]=b[N]);return this},f.__private__.setDocumentProperty=function(b,N){if(Object.keys(Be).indexOf(b)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Be[b]=N};var Vt,ce,Xt,fr,Ge,Ce={},xe={},tr=[],ne={},ke={},Ae={},ge={},nr=null,fe=0,de=[],Ye=new n_(f),Wo=n.hotfixes||[],oi={},ca={},NA=[],Ht=function b(N,X,nt,ht,bt,Ft){if(!(this instanceof b))return new b(N,X,nt,ht,bt,Ft);isNaN(N)&&(N=1),isNaN(X)&&(X=0),isNaN(nt)&&(nt=0),isNaN(ht)&&(ht=1),isNaN(bt)&&(bt=0),isNaN(Ft)&&(Ft=0),this._matrix=[N,X,nt,ht,bt,Ft]};Object.defineProperty(Ht.prototype,"sx",{get:function(){return this._matrix[0]},set:function(b){this._matrix[0]=b}}),Object.defineProperty(Ht.prototype,"shy",{get:function(){return this._matrix[1]},set:function(b){this._matrix[1]=b}}),Object.defineProperty(Ht.prototype,"shx",{get:function(){return this._matrix[2]},set:function(b){this._matrix[2]=b}}),Object.defineProperty(Ht.prototype,"sy",{get:function(){return this._matrix[3]},set:function(b){this._matrix[3]=b}}),Object.defineProperty(Ht.prototype,"tx",{get:function(){return this._matrix[4]},set:function(b){this._matrix[4]=b}}),Object.defineProperty(Ht.prototype,"ty",{get:function(){return this._matrix[5]},set:function(b){this._matrix[5]=b}}),Object.defineProperty(Ht.prototype,"a",{get:function(){return this._matrix[0]},set:function(b){this._matrix[0]=b}}),Object.defineProperty(Ht.prototype,"b",{get:function(){return this._matrix[1]},set:function(b){this._matrix[1]=b}}),Object.defineProperty(Ht.prototype,"c",{get:function(){return this._matrix[2]},set:function(b){this._matrix[2]=b}}),Object.defineProperty(Ht.prototype,"d",{get:function(){return this._matrix[3]},set:function(b){this._matrix[3]=b}}),Object.defineProperty(Ht.prototype,"e",{get:function(){return this._matrix[4]},set:function(b){this._matrix[4]=b}}),Object.defineProperty(Ht.prototype,"f",{get:function(){return this._matrix[5]},set:function(b){this._matrix[5]=b}}),Object.defineProperty(Ht.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ht.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ht.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ht.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ht.prototype.join=function(b){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(H).join(b)},Ht.prototype.multiply=function(b){var N=b.sx*this.sx+b.shy*this.shx,X=b.sx*this.shy+b.shy*this.sy,nt=b.shx*this.sx+b.sy*this.shx,ht=b.shx*this.shy+b.sy*this.sy,bt=b.tx*this.sx+b.ty*this.shx+this.tx,Ft=b.tx*this.shy+b.ty*this.sy+this.ty;return new Ht(N,X,nt,ht,bt,Ft)},Ht.prototype.decompose=function(){var b=this.sx,N=this.shy,X=this.shx,nt=this.sy,ht=this.tx,bt=this.ty,Ft=Math.sqrt(b*b+N*N),se=(b/=Ft)*X+(N/=Ft)*nt;X-=b*se,nt-=N*se;var te=Math.sqrt(X*X+nt*nt);return se/=te,b*(nt/=te)<N*(X/=te)&&(b=-b,N=-N,se=-se,Ft=-Ft),{scale:new Ht(Ft,0,0,te,0,0),translate:new Ht(1,0,0,1,ht,bt),rotate:new Ht(b,N,-N,b,0,0),skew:new Ht(1,0,se,1,0,0)}},Ht.prototype.toString=function(b){return this.join(" ")},Ht.prototype.inversed=function(){var b=this.sx,N=this.shy,X=this.shx,nt=this.sy,ht=this.tx,bt=this.ty,Ft=1/(b*nt-N*X),se=nt*Ft,te=-N*Ft,Se=-X*Ft,Ue=b*Ft;return new Ht(se,te,Se,Ue,-se*ht-Se*bt,-te*ht-Ue*bt)},Ht.prototype.applyToPoint=function(b){var N=b.x*this.sx+b.y*this.shx+this.tx,X=b.x*this.shy+b.y*this.sy+this.ty;return new ou(N,X)},Ht.prototype.applyToRectangle=function(b){var N=this.applyToPoint(b),X=this.applyToPoint(new ou(b.x+b.w,b.y+b.h));return new k0(N.x,N.y,X.x-N.x,X.y-N.y)},Ht.prototype.clone=function(){var b=this.sx,N=this.shy,X=this.shx,nt=this.sy,ht=this.tx,bt=this.ty;return new Ht(b,N,X,nt,ht,bt)},f.Matrix=Ht;var Hn=f.matrixMult=function(b,N){return N.multiply(b)},ha=new Ht(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=ha;var hs=function(b,N){if(!ke[b]){var X=(N instanceof jc?"Sh":"P")+(Object.keys(ne).length+1).toString(10);N.id=X,ke[b]=X,ne[X]=N,Ye.publish("addPattern",N)}};f.ShadingPattern=jc,f.TilingPattern=ku,f.addShadingPattern=function(b,N){return Q("addShadingPattern()"),hs(b,N),this},f.beginTilingPattern=function(b){Q("beginTilingPattern()"),O0(b.boundingBox[0],b.boundingBox[1],b.boundingBox[2]-b.boundingBox[0],b.boundingBox[3]-b.boundingBox[1],b.matrix)},f.endTilingPattern=function(b,N){Q("endTilingPattern()"),N.stream=St[$].join(`
|
|
81
|
+
`),hs(b,N),Ye.publish("endTilingPattern",N),NA.pop().restore()};var Kn,Hr=f.__private__.newObject=function(){var b=bi();return Xi(b,!0),b},bi=f.__private__.newObjectDeferred=function(){return et++,ot[et]=function(){return wt},et},Xi=function(b,N){return N=typeof N=="boolean"&&N,ot[b]=wt,N&&z(b+" 0 obj"),b},qi=f.__private__.newAdditionalObject=function(){var b={objId:bi(),content:""};return yt.push(b),b},Vn=bi(),Qs=bi(),qs=f.__private__.decodeColorString=function(b){var N=b.split(" ");if(N.length!==2||N[1]!=="g"&&N[1]!=="G")N.length!==5||N[4]!=="k"&&N[4]!=="K"||(N=[(1-N[0])*(1-N[3]),(1-N[1])*(1-N[3]),(1-N[2])*(1-N[3]),"r"]);else{var X=parseFloat(N[0]);N=[X,X,X,"r"]}for(var nt="#",ht=0;ht<3;ht++)nt+=("0"+Math.floor(255*parseFloat(N[ht])).toString(16)).slice(-2);return nt},Ns=f.__private__.encodeColorString=function(b){var N;typeof b=="string"&&(b={ch1:b});var X=b.ch1,nt=b.ch2,ht=b.ch3,bt=b.ch4,Ft=b.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof X=="string"&&X.charAt(0)!=="#"){var se=new dN(X);if(se.ok)X=se.toHex();else if(!/^\d*\.?\d*$/.test(X))throw new Error('Invalid color "'+X+'" passed to jsPDF.encodeColorString.')}if(typeof X=="string"&&/^#[0-9A-Fa-f]{3}$/.test(X)&&(X="#"+X[1]+X[1]+X[2]+X[2]+X[3]+X[3]),typeof X=="string"&&/^#[0-9A-Fa-f]{6}$/.test(X)){var te=parseInt(X.substr(1),16);X=te>>16&255,nt=te>>8&255,ht=255&te}if(nt===void 0||bt===void 0&&X===nt&&nt===ht)N=typeof X=="string"?X+" "+Ft[0]:b.precision===2?U(X/255)+" "+Ft[0]:D(X/255)+" "+Ft[0];else if(bt===void 0||sr(bt)==="object"){if(bt&&!isNaN(bt.a)&&bt.a===0)return["1.","1.","1.",Ft[1]].join(" ");N=typeof X=="string"?[X,nt,ht,Ft[1]].join(" "):b.precision===2?[U(X/255),U(nt/255),U(ht/255),Ft[1]].join(" "):[D(X/255),D(nt/255),D(ht/255),Ft[1]].join(" ")}else N=typeof X=="string"?[X,nt,ht,bt,Ft[2]].join(" "):b.precision===2?[U(X),U(nt),U(ht),U(bt),Ft[2]].join(" "):[D(X),D(nt),D(ht),D(bt),Ft[2]].join(" ");return N},Gn=f.__private__.getFilters=function(){return A},an=f.__private__.putStream=function(b){var N=(b=b||{}).data||"",X=b.filters||Gn(),nt=b.alreadyAppliedFilters||[],ht=b.addLength1||!1,bt=N.length,Ft=b.objectId,se=function(Kr){return Kr};if(h!==null&&Ft===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(se=Bn.encryptor(Ft,0));var te={};X===!0&&(X=["FlateEncode"]);var Se=b.additionalKeyValues||[],Ue=(te=le.API.processDataByFilters!==void 0?le.API.processDataByFilters(N,X):{data:N,reverseChain:[]}).reverseChain+(Array.isArray(nt)?nt.join(" "):nt.toString());if(te.data.length!==0&&(Se.push({key:"Length",value:te.data.length}),ht===!0&&Se.push({key:"Length1",value:bt})),Ue.length!=0)if(Ue.split("/").length-1==1)Se.push({key:"Filter",value:Ue});else{Se.push({key:"Filter",value:"["+Ue+"]"});for(var Je=0;Je<Se.length;Je+=1)if(Se[Je].key==="DecodeParms"){for(var Di=[],Tr=0;Tr<te.reverseChain.split("/").length-1;Tr+=1)Di.push("null");Di.push(Se[Je].value),Se[Je].value="["+Di.join(" ")+"]"}}z("<<");for(var wr=0;wr<Se.length;wr++)z("/"+Se[wr].key+" "+Se[wr].value);z(">>"),te.data.length!==0&&(z("stream"),z(se(te.data)),z("endstream"))},PA=f.__private__.putPage=function(b){var N=b.number,X=b.data,nt=b.objId,ht=b.contentsObjId;Xi(nt,!0),z("<</Type /Page"),z("/Parent "+b.rootDictionaryObjId+" 0 R"),z("/Resources "+b.resourceDictionaryObjId+" 0 R"),z("/MediaBox ["+parseFloat(H(b.mediaBox.bottomLeftX))+" "+parseFloat(H(b.mediaBox.bottomLeftY))+" "+H(b.mediaBox.topRightX)+" "+H(b.mediaBox.topRightY)+"]"),b.cropBox!==null&&z("/CropBox ["+H(b.cropBox.bottomLeftX)+" "+H(b.cropBox.bottomLeftY)+" "+H(b.cropBox.topRightX)+" "+H(b.cropBox.topRightY)+"]"),b.bleedBox!==null&&z("/BleedBox ["+H(b.bleedBox.bottomLeftX)+" "+H(b.bleedBox.bottomLeftY)+" "+H(b.bleedBox.topRightX)+" "+H(b.bleedBox.topRightY)+"]"),b.trimBox!==null&&z("/TrimBox ["+H(b.trimBox.bottomLeftX)+" "+H(b.trimBox.bottomLeftY)+" "+H(b.trimBox.topRightX)+" "+H(b.trimBox.topRightY)+"]"),b.artBox!==null&&z("/ArtBox ["+H(b.artBox.bottomLeftX)+" "+H(b.artBox.bottomLeftY)+" "+H(b.artBox.topRightX)+" "+H(b.artBox.topRightY)+"]"),typeof b.userUnit=="number"&&b.userUnit!==1&&z("/UserUnit "+b.userUnit),Ye.publish("putPage",{objId:nt,pageContext:de[N],pageNumber:N,page:X}),z("/Contents "+ht+" 0 R"),z(">>"),z("endobj");var bt=X.join(`
|
|
82
|
+
`);return S===E&&(bt+=`
|
|
83
|
+
Q`),Xi(ht,!0),an({data:bt,filters:Gn(),objectId:ht}),z("endobj"),nt},Oi=f.__private__.putPages=function(){var b,N,X=[];for(b=1;b<=fe;b++)de[b].objId=bi(),de[b].contentsObjId=bi();for(b=1;b<=fe;b++)X.push(PA({number:b,data:St[b],objId:de[b].objId,contentsObjId:de[b].contentsObjId,mediaBox:de[b].mediaBox,cropBox:de[b].cropBox,bleedBox:de[b].bleedBox,trimBox:de[b].trimBox,artBox:de[b].artBox,userUnit:de[b].userUnit,rootDictionaryObjId:Vn,resourceDictionaryObjId:Qs}));Xi(Vn,!0),z("<</Type /Pages");var nt="/Kids [";for(N=0;N<fe;N++)nt+=X[N]+" 0 R ";z(nt+"]"),z("/Count "+fe),z(">>"),z("endobj"),Ye.publish("postPutPages")},Ja=function(b){Ye.publish("putFont",{font:b,out:z,newObject:Hr,putStream:an}),b.isAlreadyPutted!==!0&&(b.objectNumber=Hr(),z("<<"),z("/Type /Font"),z("/BaseFont /"+fg(b.postScriptName)),z("/Subtype /Type1"),typeof b.encoding=="string"&&z("/Encoding /"+b.encoding),z("/FirstChar 32"),z("/LastChar 255"),z(">>"),z("endobj"))},zo=function(b){b.objectNumber=Hr();var N=[];N.push({key:"Type",value:"/XObject"}),N.push({key:"Subtype",value:"/Form"}),N.push({key:"BBox",value:"["+[H(b.x),H(b.y),H(b.x+b.width),H(b.y+b.height)].join(" ")+"]"}),N.push({key:"Matrix",value:"["+b.matrix.toString()+"]"});var X=b.pages[1].join(`
|
|
84
|
+
`);an({data:X,additionalKeyValues:N,objectId:b.objectNumber}),z("endobj")},bc=function(b,N){N||(N=21);var X=Hr(),nt=function(Ft,se){var te,Se=[],Ue=1/(se-1);for(te=0;te<1;te+=Ue)Se.push(te);if(Se.push(1),Ft[0].offset!=0){var Je={offset:0,color:Ft[0].color};Ft.unshift(Je)}if(Ft[Ft.length-1].offset!=1){var Di={offset:1,color:Ft[Ft.length-1].color};Ft.push(Di)}for(var Tr="",wr=0,Kr=0;Kr<Se.length;Kr++){for(te=Se[Kr];te>Ft[wr+1].offset;)wr++;var ei=Ft[wr].offset,ri=(te-ei)/(Ft[wr+1].offset-ei),jn=Ft[wr].color,el=Ft[wr+1].color;Tr+=tt(Math.round((1-ri)*jn[0]+ri*el[0]).toString(16))+tt(Math.round((1-ri)*jn[1]+ri*el[1]).toString(16))+tt(Math.round((1-ri)*jn[2]+ri*el[2]).toString(16))}return Tr.trim()}(b.colors,N),ht=[];ht.push({key:"FunctionType",value:"0"}),ht.push({key:"Domain",value:"[0.0 1.0]"}),ht.push({key:"Size",value:"["+N+"]"}),ht.push({key:"BitsPerSample",value:"8"}),ht.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ht.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),an({data:nt,additionalKeyValues:ht,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:X}),z("endobj"),b.objectNumber=Hr(),z("<< /ShadingType "+b.type),z("/ColorSpace /DeviceRGB");var bt="/Coords ["+H(parseFloat(b.coords[0]))+" "+H(parseFloat(b.coords[1]))+" ";b.type===2?bt+=H(parseFloat(b.coords[2]))+" "+H(parseFloat(b.coords[3])):bt+=H(parseFloat(b.coords[2]))+" "+H(parseFloat(b.coords[3]))+" "+H(parseFloat(b.coords[4]))+" "+H(parseFloat(b.coords[5])),z(bt+="]"),b.matrix&&z("/Matrix ["+b.matrix.toString()+"]"),z("/Function "+X+" 0 R"),z("/Extend [true true]"),z(">>"),z("endobj")},Xo=function(b,N){var X=bi(),nt=Hr();N.push({resourcesOid:X,objectOid:nt}),b.objectNumber=nt;var ht=[];ht.push({key:"Type",value:"/Pattern"}),ht.push({key:"PatternType",value:"1"}),ht.push({key:"PaintType",value:"1"}),ht.push({key:"TilingType",value:"1"}),ht.push({key:"BBox",value:"["+b.boundingBox.map(H).join(" ")+"]"}),ht.push({key:"XStep",value:H(b.xStep)}),ht.push({key:"YStep",value:H(b.yStep)}),ht.push({key:"Resources",value:X+" 0 R"}),b.matrix&&ht.push({key:"Matrix",value:"["+b.matrix.toString()+"]"}),an({data:b.stream,additionalKeyValues:ht,objectId:b.objectNumber}),z("endobj")},Td=function(b){for(var N in b.objectNumber=Hr(),z("<<"),b)switch(N){case"opacity":z("/ca "+U(b[N]));break;case"stroke-opacity":z("/CA "+U(b[N]))}z(">>"),z("endobj")},Za=function(b){Xi(b.resourcesOid,!0),z("<<"),z("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var N in z("/Font <<"),Ce)Ce.hasOwnProperty(N)&&(u===!1||u===!0&&d.hasOwnProperty(N))&&z("/"+N+" "+Ce[N].objectNumber+" 0 R");z(">>")}(),function(){if(Object.keys(ne).length>0){for(var N in z("/Shading <<"),ne)ne.hasOwnProperty(N)&&ne[N]instanceof jc&&ne[N].objectNumber>=0&&z("/"+N+" "+ne[N].objectNumber+" 0 R");Ye.publish("putShadingPatternDict"),z(">>")}}(),function(N){if(Object.keys(ne).length>0){for(var X in z("/Pattern <<"),ne)ne.hasOwnProperty(X)&&ne[X]instanceof f.TilingPattern&&ne[X].objectNumber>=0&&ne[X].objectNumber<N&&z("/"+X+" "+ne[X].objectNumber+" 0 R");Ye.publish("putTilingPatternDict"),z(">>")}}(b.objectOid),function(){if(Object.keys(Ae).length>0){var N;for(N in z("/ExtGState <<"),Ae)Ae.hasOwnProperty(N)&&Ae[N].objectNumber>=0&&z("/"+N+" "+Ae[N].objectNumber+" 0 R");Ye.publish("putGStateDict"),z(">>")}}(),function(){for(var N in z("/XObject <<"),oi)oi.hasOwnProperty(N)&&oi[N].objectNumber>=0&&z("/"+N+" "+oi[N].objectNumber+" 0 R");Ye.publish("putXobjectDict"),z(">>")}(),z(">>"),z("endobj")},ua=function(b){xe[b.fontName]=xe[b.fontName]||{},xe[b.fontName][b.fontStyle]=b.id},Jt=function(b,N,X,nt,ht){var bt={id:"F"+(Object.keys(Ce).length+1).toString(10),postScriptName:b,fontName:N,fontStyle:X,encoding:nt,isStandardFont:ht||!1,metadata:{}};return Ye.publish("addFont",{font:bt,instance:this}),Ce[bt.id]=bt,ua(bt),bt.id},Z=f.__private__.pdfEscape=f.pdfEscape=function(b,N){return function(X,nt){var ht,bt,Ft,se,te,Se,Ue,Je,Di;if(Ft=(nt=nt||{}).sourceEncoding||"Unicode",te=nt.outputEncoding,(nt.autoencode||te)&&Ce[Vt].metadata&&Ce[Vt].metadata[Ft]&&Ce[Vt].metadata[Ft].encoding&&(se=Ce[Vt].metadata[Ft].encoding,!te&&Ce[Vt].encoding&&(te=Ce[Vt].encoding),!te&&se.codePages&&(te=se.codePages[0]),typeof te=="string"&&(te=se[te]),te)){for(Ue=!1,Se=[],ht=0,bt=X.length;ht<bt;ht++)(Je=te[X.charCodeAt(ht)])?Se.push(String.fromCharCode(Je)):Se.push(X[ht]),Se[ht].charCodeAt(0)>>8&&(Ue=!0);X=Se.join("")}for(ht=X.length;Ue===void 0&&ht!==0;)X.charCodeAt(ht-1)>>8&&(Ue=!0),ht--;if(!Ue)return X;for(Se=nt.noBOM?[]:[254,255],ht=0,bt=X.length;ht<bt;ht++){if((Di=(Je=X.charCodeAt(ht))>>8)>>8)throw new Error("Character at position "+ht+" of string '"+X+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Se.push(Di),Se.push(Je-(Di<<8))}return String.fromCharCode.apply(void 0,Se)}(b,N).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},xt=f.__private__.beginPage=function(b){St[++fe]=[],de[fe]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(b[0]),topRightY:Number(b[1])}},Oe(fe),jt(St[$])},Rt=function(b,N){var X,nt,ht;switch(e=N||e,typeof b=="string"&&(X=w(b.toLowerCase()),Array.isArray(X)&&(nt=X[0],ht=X[1])),Array.isArray(b)&&(nt=b[0]*ce,ht=b[1]*ce),isNaN(nt)&&(nt=i[0],ht=i[1]),(nt>14400||ht>14400)&&(_r.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),nt=Math.min(14400,nt),ht=Math.min(14400,ht)),i=[nt,ht],e.substr(0,1)){case"l":ht>nt&&(i=[ht,nt]);break;case"p":nt>ht&&(i=[ht,nt])}xt(i),PC(ye),z(Qd),P0!==0&&z(P0+" J"),xc!==0&&z(xc+" j"),Ye.publish("addPage",{pageNumber:fe})},We=function(b){b>0&&b<=fe&&(St.splice(b,1),de.splice(b,1),fe--,$>fe&&($=fe),this.setPage($))},Oe=function(b){b>0&&b<=fe&&($=b)},ar=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return St.length-1},bn=function(b,N,X){var nt,ht=void 0;return X=X||{},b=b!==void 0?b:Ce[Vt].fontName,N=N!==void 0?N:Ce[Vt].fontStyle,nt=b.toLowerCase(),xe[nt]!==void 0&&xe[nt][N]!==void 0?ht=xe[nt][N]:xe[b]!==void 0&&xe[b][N]!==void 0?ht=xe[b][N]:X.disableWarning===!1&&_r.warn("Unable to look up font label for font '"+b+"', '"+N+"'. Refer to getFontList() for available fonts."),ht||X.noFallback||(ht=xe.times[N])==null&&(ht=xe.times.normal),ht},Bi=f.__private__.putInfo=function(){var b=Hr(),N=function(nt){return nt};for(var X in h!==null&&(N=Bn.encryptor(b,0)),z("<<"),z("/Producer ("+Z(N("jsPDF "+le.version))+")"),Be)Be.hasOwnProperty(X)&&Be[X]&&z("/"+X.substr(0,1).toUpperCase()+X.substr(1)+" ("+Z(N(Be[X]))+")");z("/CreationDate ("+Z(N(st))+")"),z(">>"),z("endobj")},on=f.__private__.putCatalog=function(b){var N=(b=b||{}).rootDictionaryObjId||Vn;switch(Hr(),z("<<"),z("/Type /Catalog"),z("/Pages "+N+" 0 R"),ie||(ie="fullwidth"),ie){case"fullwidth":z("/OpenAction [3 0 R /FitH null]");break;case"fullheight":z("/OpenAction [3 0 R /FitV null]");break;case"fullpage":z("/OpenAction [3 0 R /Fit]");break;case"original":z("/OpenAction [3 0 R /XYZ null null 1]");break;default:var X=""+ie;X.substr(X.length-1)==="%"&&(ie=parseInt(ie)/100),typeof ie=="number"&&z("/OpenAction [3 0 R /XYZ null null "+U(ie)+"]")}switch(Ie||(Ie="continuous"),Ie){case"continuous":z("/PageLayout /OneColumn");break;case"single":z("/PageLayout /SinglePage");break;case"two":case"twoleft":z("/PageLayout /TwoColumnLeft");break;case"tworight":z("/PageLayout /TwoColumnRight")}Wt&&z("/PageMode /"+Wt),Ye.publish("putCatalog"),z(">>"),z("endobj")},su=f.__private__.putTrailer=function(){z("trailer"),z("<<"),z("/Size "+(et+1)),z("/Root "+et+" 0 R"),z("/Info "+(et-1)+" 0 R"),h!==null&&z("/Encrypt "+Bn.oid+" 0 R"),z("/ID [ <"+rt+"> <"+rt+"> ]"),z(">>")},je=f.__private__.putHeader=function(){z("%PDF-"+p),z("%ºß¬à")},Au=f.__private__.putXRef=function(){var b="0000000000";z("xref"),z("0 "+(et+1)),z("0000000000 65535 f ");for(var N=1;N<=et;N++)typeof ot[N]=="function"?z((b+ot[N]()).slice(-10)+" 00000 n "):ot[N]!==void 0?z((b+ot[N]).slice(-10)+" 00000 n "):z("0000000000 00000 n ")},Ys=f.__private__.buildDocument=function(){var b;et=0,wt=0,dt=[],ot=[],yt=[],Vn=bi(),Qs=bi(),jt(dt),Ye.publish("buildDocument"),je(),Oi(),function(){Ye.publish("putAdditionalObjects");for(var X=0;X<yt.length;X++){var nt=yt[X];Xi(nt.objId,!0),z(nt.content),z("endobj")}Ye.publish("postPutAdditionalObjects")}(),b=[],function(){for(var X in Ce)Ce.hasOwnProperty(X)&&(u===!1||u===!0&&d.hasOwnProperty(X))&&Ja(Ce[X])}(),function(){var X;for(X in Ae)Ae.hasOwnProperty(X)&&Td(Ae[X])}(),function(){for(var X in oi)oi.hasOwnProperty(X)&&zo(oi[X])}(),function(X){var nt;for(nt in ne)ne.hasOwnProperty(nt)&&(ne[nt]instanceof jc?bc(ne[nt]):ne[nt]instanceof ku&&Xo(ne[nt],X))}(b),Ye.publish("putResources"),b.forEach(Za),Za({resourcesOid:Qs,objectOid:Number.MAX_SAFE_INTEGER}),Ye.publish("postPutResources"),h!==null&&(Bn.oid=Hr(),z("<<"),z("/Filter /Standard"),z("/V "+Bn.v),z("/R "+Bn.r),z("/U <"+Bn.toHexString(Bn.U)+">"),z("/O <"+Bn.toHexString(Bn.O)+">"),z("/P "+Bn.P),z(">>"),z("endobj")),Bi(),on();var N=wt;return Au(),su(),z("startxref"),z(""+N),z("%%EOF"),jt(St[$]),dt.join(`
|
|
85
|
+
`)},Id=f.__private__.getBlob=function(b){return new Blob([ve(b)],{type:"application/pdf"})},L0=function(b){for(;b.firstChild;)b.removeChild(b.firstChild)},Js=function(b){var N,X=b.document,nt=X.documentElement,ht=X.head,bt=X.body;return ht||(ht=X.createElement("head"),nt.appendChild(ht)),bt||(bt=X.createElement("body"),nt.appendChild(bt)),L0(ht),L0(bt),(N=X.createElement("style")).appendChild(X.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),ht.appendChild(N),{document:X,body:bt}},_d=f.output=f.__private__.output=(Kn=function(b,N){switch(typeof(N=N||{})=="string"?N={filename:N}:N.filename=N.filename||"generated.pdf",b){case void 0:return Ys();case"save":f.save(N.filename);break;case"arraybuffer":return ve(Ys());case"blob":return Id(Ys());case"bloburi":case"bloburl":if(be.URL!==void 0&&typeof be.URL.createObjectURL=="function")return be.URL&&be.URL.createObjectURL(Id(Ys()))||void 0;_r.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var X="",nt=Ys();try{X=e_(nt)}catch{X=e_(unescape(encodeURIComponent(nt)))}return"data:application/pdf;filename="+encodeURIComponent(N.filename)+";base64,"+X;case"pdfobjectnewwindow":if(Object.prototype.toString.call(be)==="[object Window]"){var ht="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",bt=!N.pdfObjectUrl;bt||(ht=N.pdfObjectUrl);var Ft=be.open();if(Ft!==null){var se=Js(Ft),te=se.document.createElement("script"),Se=this;te.src=ht,bt&&(te.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",te.crossOrigin="anonymous"),te.onload=function(){Ft.PDFObject.embed(Se.output("dataurlstring"),N)},se.body.appendChild(te)}return Ft}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(be)==="[object Window]"){var Ue=N.pdfJsUrl||"examples/PDF.js/web/viewer.html",Je=be.open();if(Je!==null){var Di=Js(Je),Tr=Di.document.createElement("iframe"),wr=Ue.indexOf("?")===-1?"?":"&";Se=this,Tr.id="pdfViewer",Tr.width="500px",Tr.height="400px",Tr.src=Ue+wr+"file=&downloadName="+encodeURIComponent(N.filename),Tr.onload=function(){Je.document.title=N.filename,Tr.contentWindow.PDFViewerApplication.open(Se.output("bloburl"))},Di.body.appendChild(Tr)}return Je}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(be)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Kr=be.open();if(Kr!==null){var ei=Js(Kr),ri=ei.document.createElement("iframe");ri.src=this.output("datauristring",N),ei.body.appendChild(ri),Kr.document.title=N.filename}if(Kr||typeof safari>"u")return Kr;break;case"datauri":case"dataurl":return be.document.location.href=this.output("datauristring",N);default:return null}},Kn.foo=function(){try{return Kn.apply(this,arguments)}catch(X){var b=X.stack||"";~b.indexOf(" at ")&&(b=b.split(" at ")[1]);var N="Error in function "+b.split(`
|
|
86
|
+
`)[0].split("<")[0]+": "+X.message;if(!be.console)throw new Error(N);be.console.error(N,X),be.alert&&alert(N)}},Kn.foo.bar=Kn,Kn.foo),qo=function(b){return Array.isArray(Wo)===!0&&Wo.indexOf(b)>-1};switch(r){case"pt":ce=1;break;case"mm":ce=72/25.4;break;case"cm":ce=72/2.54;break;case"in":ce=72;break;case"px":ce=qo("px_scaling")==1?.75:96/72;break;case"pc":case"em":ce=12;break;case"ex":ce=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ce=r}var Bn=null;mt(),At();var Dw=f.__private__.getPageInfo=f.getPageInfo=function(b){if(isNaN(b)||b%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:de[b].objId,pageNumber:b,pageContext:de[b]}},FC=f.__private__.getPageInfoByObjId=function(b){if(isNaN(b)||b%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var N in de)if(de[N].objId===b)break;return Dw(N)},TC=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:de[$].objId,pageNumber:$,pageContext:de[$]}};f.addPage=function(){return Rt.apply(this,arguments),this},f.setPage=function(){return Oe.apply(this,arguments),jt.call(this,St[$]),this},f.insertPage=function(b){return this.addPage(),this.movePage($,b),this},f.movePage=function(b,N){var X,nt;if(b>N){X=St[b],nt=de[b];for(var ht=b;ht>N;ht--)St[ht]=St[ht-1],de[ht]=de[ht-1];St[N]=X,de[N]=nt,this.setPage(N)}else if(b<N){X=St[b],nt=de[b];for(var bt=b;bt<N;bt++)St[bt]=St[bt+1],de[bt]=de[bt+1];St[N]=X,de[N]=nt,this.setPage(N)}return this},f.deletePage=function(){return We.apply(this,arguments),this},f.__private__.text=f.text=function(b,N,X,nt,ht){var bt,Ft,se,te,Se,Ue,Je,Di,Tr,wr=(nt=nt||{}).scope||this;if(typeof b=="number"&&typeof N=="number"&&(typeof X=="string"||Array.isArray(X))){var Kr=X;X=N,N=b,b=Kr}if(arguments[3]instanceof Ht==0?(se=arguments[4],te=arguments[5],sr(Je=arguments[3])==="object"&&Je!==null||(typeof se=="string"&&(te=se,se=null),typeof Je=="string"&&(te=Je,Je=null),typeof Je=="number"&&(se=Je,Je=null),nt={flags:Je,angle:se,align:te})):(Q("The transform parameter of text() with a Matrix value"),Tr=ht),isNaN(N)||isNaN(X)||b==null)throw new Error("Invalid arguments passed to jsPDF.text");if(b.length===0)return wr;var ei,ri="",jn=typeof nt.lineHeightFactor=="number"?nt.lineHeightFactor:au,el=wr.internal.scaleFactor;function D0(Nr){return Nr=Nr.split(" ").join(Array(nt.TabLen||9).join(" ")),Z(Nr,Je)}function cu(Nr){for(var Pr,Ci=Nr.concat(),Yi=[],il=Ci.length;il--;)typeof(Pr=Ci.shift())=="string"?Yi.push(Pr):Array.isArray(Nr)&&(Pr.length===1||Pr[1]===void 0&&Pr[2]===void 0)?Yi.push(Pr[0]):Yi.push([Pr[0],Pr[1],Pr[2]]);return Yi}function hu(Nr,Pr){var Ci;if(typeof Nr=="string")Ci=Pr(Nr)[0];else if(Array.isArray(Nr)){for(var Yi,il,j0=Nr.concat(),jd=[],Xw=j0.length;Xw--;)typeof(Yi=j0.shift())=="string"?jd.push(Pr(Yi)[0]):Array.isArray(Yi)&&typeof Yi[0]=="string"&&(il=Pr(Yi[0],Yi[1],Yi[2]),jd.push([il[0],il[1],il[2]]));Ci=jd}return Ci}var Ec=!1,uu=!0;if(typeof b=="string")Ec=!0;else if(Array.isArray(b)){var kd=b.concat();Ft=[];for(var Od,$n=kd.length;$n--;)(typeof(Od=kd.shift())!="string"||Array.isArray(Od)&&typeof Od[0]!="string")&&(uu=!1);Ec=uu}if(Ec===!1)throw new Error('Type of text must be string or Array. "'+b+'" is not recognized.');typeof b=="string"&&(b=b.match(/[\r?\n]/)?b.split(/\r\n|\r|\n/g):[b]);var fu=Tt/wr.internal.scaleFactor,du=fu*(jn-1);switch(nt.baseline){case"bottom":X-=du;break;case"top":X+=fu-du;break;case"hanging":X+=fu-2*du;break;case"middle":X+=fu/2-du}if((Ue=nt.maxWidth||0)>0&&(typeof b=="string"?b=wr.splitTextToSize(b,Ue):Object.prototype.toString.call(b)==="[object Array]"&&(b=b.reduce(function(Nr,Pr){return Nr.concat(wr.splitTextToSize(Pr,Ue))},[]))),bt={text:b,x:N,y:X,options:nt,mutex:{pdfEscape:Z,activeFontKey:Vt,fonts:Ce,activeFontSize:Tt}},Ye.publish("preProcessText",bt),b=bt.text,se=(nt=bt.options).angle,Tr instanceof Ht==0&&se&&typeof se=="number"){se*=Math.PI/180,nt.rotationDirection===0&&(se=-se),S===E&&(se=-se);var R0=Math.cos(se),ro=Math.sin(se);Tr=new Ht(R0,ro,-ro,R0,0,0)}else se&&se instanceof Ht&&(Tr=se);S!==E||Tr||(Tr=ha),(Se=nt.charSpace||Nd)!==void 0&&(ri+=H(j(Se))+` Tc
|
|
87
|
+
`,this.setCharSpace(this.getCharSpace()||0)),(Di=nt.horizontalScale)!==void 0&&(ri+=H(100*Di)+` Tz
|
|
88
|
+
`),nt.lang;var us=-1,Ww=nt.renderingMode!==void 0?nt.renderingMode:nt.stroke,Dd=wr.internal.getCurrentPageInfo().pageContext;switch(Ww){case 0:case!1:case"fill":us=0;break;case 1:case!0:case"stroke":us=1;break;case 2:case"fillThenStroke":us=2;break;case 3:case"invisible":us=3;break;case 4:case"fillAndAddForClipping":us=4;break;case 5:case"strokeAndAddPathForClipping":us=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":us=6;break;case 7:case"addToPathForClipping":us=7}var zw=Dd.usedRenderingMode!==void 0?Dd.usedRenderingMode:-1;us!==-1?ri+=us+` Tr
|
|
89
|
+
`:zw!==-1&&(ri+=`0 Tr
|
|
90
|
+
`),us!==-1&&(Dd.usedRenderingMode=us),te=nt.align||"left";var MA,gu=Tt*jn,H0=wr.internal.pageSize.getWidth(),Rd=Ce[Vt];Se=nt.charSpace||Nd,Ue=nt.maxWidth||0,Je=Object.assign({autoencode:!0,noBOM:!0},nt.flags);var pu=[],K0=function(Nr){return wr.getStringUnitWidth(Nr,{font:Rd,charSpace:Se,fontSize:Tt,doKerning:!1})*Tt/el};if(Object.prototype.toString.call(b)==="[object Array]"){var fs;Ft=cu(b),te!=="left"&&(MA=Ft.map(K0));var Ps,Hd=0;if(te==="right"){N-=MA[0],b=[],$n=Ft.length;for(var Sc=0;Sc<$n;Sc++)Sc===0?(Ps=Yo(N),fs=Jo(X)):(Ps=j(Hd-MA[Sc]),fs=-gu),b.push([Ft[Sc],Ps,fs]),Hd=MA[Sc]}else if(te==="center"){N-=MA[0]/2,b=[],$n=Ft.length;for(var Fc=0;Fc<$n;Fc++)Fc===0?(Ps=Yo(N),fs=Jo(X)):(Ps=j((Hd-MA[Fc])/2),fs=-gu),b.push([Ft[Fc],Ps,fs]),Hd=MA[Fc]}else if(te==="left"){b=[],$n=Ft.length;for(var Kd=0;Kd<$n;Kd++)b.push(Ft[Kd])}else if(te==="justify"&&Rd.encoding==="Identity-H"){b=[],$n=Ft.length,Ue=Ue!==0?Ue:H0;for(var mu=0,Ri=0;Ri<$n;Ri++)if(fs=Ri===0?Jo(X):-gu,Ps=Ri===0?Yo(N):mu,Ri<$n-1){var VC=j((Ue-MA[Ri])/(Ft[Ri].split(" ").length-1)),io=Ft[Ri].split(" ");b.push([io[0]+" ",Ps,fs]),mu=0;for(var fa=1;fa<io.length;fa++){var vu=(K0(io[fa-1]+" "+io[fa])-K0(io[fa]))*el+VC;fa==io.length-1?b.push([io[fa],vu,0]):b.push([io[fa]+" ",vu,0]),mu-=vu}}else b.push([Ft[Ri],Ps,fs]);b.push(["",mu,0])}else{if(te!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(b=[],$n=Ft.length,Ue=Ue!==0?Ue:H0,Ri=0;Ri<$n;Ri++){fs=Ri===0?Jo(X):-gu,Ps=Ri===0?Yo(N):0;var V0=Ft[Ri].split(" ").length-1,G0=V0>0?(Ue-MA[Ri])/V0:0;Ri<$n-1?pu.push(H(j(G0))):pu.push(0),b.push([Ft[Ri],Ps,fs])}}}(typeof nt.R2L=="boolean"?nt.R2L:qt)===!0&&(b=hu(b,function(Nr,Pr,Ci){return[Nr.split("").reverse().join(""),Pr,Ci]})),bt={text:b,x:N,y:X,options:nt,mutex:{pdfEscape:Z,activeFontKey:Vt,fonts:Ce,activeFontSize:Tt}},Ye.publish("postProcessText",bt),b=bt.text,ei=bt.mutex.isHex||!1;var Vd=Ce[Vt].encoding;Vd!=="WinAnsiEncoding"&&Vd!=="StandardEncoding"||(b=hu(b,function(Nr,Pr,Ci){return[D0(Nr),Pr,Ci]})),Ft=cu(b),b=[];for(var wu,yu,Tc,rl=Array.isArray(Ft[0])?1:0,Ic="",Gd=function(Nr,Pr,Ci){var Yi="";return Ci instanceof Ht?(Ci=typeof nt.angle=="number"?Hn(Ci,new Ht(1,0,0,1,Nr,Pr)):Hn(new Ht(1,0,0,1,Nr,Pr),Ci),S===E&&(Ci=Hn(new Ht(1,0,0,-1,0,0),Ci)),Yi=Ci.join(" ")+` Tm
|
|
91
|
+
`):Yi=H(Nr)+" "+H(Pr)+` Td
|
|
92
|
+
`,Yi},Wn=0;Wn<Ft.length;Wn++){switch(Ic="",rl){case 1:Tc=(ei?"<":"(")+Ft[Wn][0]+(ei?">":")"),wu=parseFloat(Ft[Wn][1]),yu=parseFloat(Ft[Wn][2]);break;case 0:Tc=(ei?"<":"(")+Ft[Wn]+(ei?">":")"),wu=Yo(N),yu=Jo(X)}pu!==void 0&&pu[Wn]!==void 0&&(Ic=pu[Wn]+` Tw
|
|
93
|
+
`),Wn===0?b.push(Ic+Gd(wu,yu,Tr)+Tc):rl===0?b.push(Ic+Tc):rl===1&&b.push(Ic+Gd(wu,yu,Tr)+Tc)}b=rl===0?b.join(` Tj
|
|
94
|
+
T* `):b.join(` Tj
|
|
95
|
+
`),b+=` Tj
|
|
96
|
+
`;var no=`BT
|
|
97
|
+
/`;return no+=Vt+" "+Tt+` Tf
|
|
98
|
+
`,no+=H(Tt*jn)+` TL
|
|
99
|
+
`,no+=eo+`
|
|
100
|
+
`,no+=ri,no+=b,z(no+="ET"),d[Vt]=!0,wr};var IC=f.__private__.clip=f.clip=function(b){return z(b==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return IC("evenodd")},f.__private__.discardPath=f.discardPath=function(){return z("n"),this};var to=f.__private__.isValidStyle=function(b){var N=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(b)!==-1&&(N=!0),N};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(b){return to(b)&&(l=b),this};var Rw=f.__private__.getStyle=f.getStyle=function(b){var N=l;switch(b){case"D":case"S":N="S";break;case"F":N="f";break;case"FD":case"DF":N="B";break;case"f":case"f*":case"B":case"B*":N=b}return N},Ud=f.close=function(){return z("h"),this};f.stroke=function(){return z("S"),this},f.fill=function(b){return Ld("f",b),this},f.fillEvenOdd=function(b){return Ld("f*",b),this},f.fillStroke=function(b){return Ld("B",b),this},f.fillStrokeEvenOdd=function(b){return Ld("B*",b),this};var Ld=function(b,N){sr(N)==="object"?UC(N,b):z(b)},Q0=function(b){b===null||S===E&&b===void 0||(b=Rw(b),z(b))};function _C(b,N,X,nt,ht){var bt=new ku(N||this.boundingBox,X||this.xStep,nt||this.yStep,this.gState,ht||this.matrix);bt.stream=this.stream;var Ft=b+"$$"+this.cloneIndex+++"$$";return hs(Ft,bt),bt}var UC=function(b,N){var X=ke[b.key],nt=ne[X];if(nt instanceof jc)z("q"),z(LC(N)),nt.gState&&f.setGState(nt.gState),z(b.matrix.toString()+" cm"),z("/"+X+" sh"),z("Q");else if(nt instanceof ku){var ht=new Ht(1,0,0,-1,0,lu());b.matrix&&(ht=ht.multiply(b.matrix||ha),X=_C.call(nt,b.key,b.boundingBox,b.xStep,b.yStep,ht).id),z("q"),z("/Pattern cs"),z("/"+X+" scn"),nt.gState&&f.setGState(nt.gState),z(N),z("Q")}},LC=function(b){switch(b){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Bc=f.moveTo=function(b,N){return z(H(j(b))+" "+H(V(N))+" m"),this},Hw=f.lineTo=function(b,N){return z(H(j(b))+" "+H(V(N))+" l"),this},Cc=f.curveTo=function(b,N,X,nt,ht,bt){return z([H(j(b)),H(V(N)),H(j(X)),H(V(nt)),H(j(ht)),H(V(bt)),"c"].join(" ")),this};f.__private__.line=f.line=function(b,N,X,nt,ht){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||!to(ht))throw new Error("Invalid arguments passed to jsPDF.line");return S===B?this.lines([[X-b,nt-N]],b,N,[1,1],ht||"S"):this.lines([[X-b,nt-N]],b,N,[1,1]).stroke()},f.__private__.lines=f.lines=function(b,N,X,nt,ht,bt){var Ft,se,te,Se,Ue,Je,Di,Tr,wr,Kr,ei,ri;if(typeof b=="number"&&(ri=X,X=N,N=b,b=ri),nt=nt||[1,1],bt=bt||!1,isNaN(N)||isNaN(X)||!Array.isArray(b)||!Array.isArray(nt)||!to(ht)||typeof bt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Bc(N,X),Ft=nt[0],se=nt[1],Se=b.length,Kr=N,ei=X,te=0;te<Se;te++)(Ue=b[te]).length===2?(Kr=Ue[0]*Ft+Kr,ei=Ue[1]*se+ei,Hw(Kr,ei)):(Je=Ue[0]*Ft+Kr,Di=Ue[1]*se+ei,Tr=Ue[2]*Ft+Kr,wr=Ue[3]*se+ei,Kr=Ue[4]*Ft+Kr,ei=Ue[5]*se+ei,Cc(Je,Di,Tr,wr,Kr,ei));return bt&&Ud(),Q0(ht),this},f.path=function(b){for(var N=0;N<b.length;N++){var X=b[N],nt=X.c;switch(X.op){case"m":Bc(nt[0],nt[1]);break;case"l":Hw(nt[0],nt[1]);break;case"c":Cc.apply(this,nt);break;case"h":Ud()}}return this},f.__private__.rect=f.rect=function(b,N,X,nt,ht){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||!to(ht))throw new Error("Invalid arguments passed to jsPDF.rect");return S===B&&(nt=-nt),z([H(j(b)),H(V(N)),H(j(X)),H(j(nt)),"re"].join(" ")),Q0(ht),this},f.__private__.triangle=f.triangle=function(b,N,X,nt,ht,bt,Ft){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||isNaN(ht)||isNaN(bt)||!to(Ft))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[X-b,nt-N],[ht-X,bt-nt],[b-ht,N-bt]],b,N,[1,1],Ft,!0),this},f.__private__.roundedRect=f.roundedRect=function(b,N,X,nt,ht,bt,Ft){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||isNaN(ht)||isNaN(bt)||!to(Ft))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var se=4/3*(Math.SQRT2-1);return ht=Math.min(ht,.5*X),bt=Math.min(bt,.5*nt),this.lines([[X-2*ht,0],[ht*se,0,ht,bt-bt*se,ht,bt],[0,nt-2*bt],[0,bt*se,-ht*se,bt,-ht,bt],[2*ht-X,0],[-ht*se,0,-ht,-bt*se,-ht,-bt],[0,2*bt-nt],[0,-bt*se,ht*se,-bt,ht,-bt]],b+ht,N,[1,1],Ft,!0),this},f.__private__.ellipse=f.ellipse=function(b,N,X,nt,ht){if(isNaN(b)||isNaN(N)||isNaN(X)||isNaN(nt)||!to(ht))throw new Error("Invalid arguments passed to jsPDF.ellipse");var bt=4/3*(Math.SQRT2-1)*X,Ft=4/3*(Math.SQRT2-1)*nt;return Bc(b+X,N),Cc(b+X,N-Ft,b+bt,N-nt,b,N-nt),Cc(b-bt,N-nt,b-X,N-Ft,b-X,N),Cc(b-X,N+Ft,b-bt,N+nt,b,N+nt),Cc(b+bt,N+nt,b+X,N+Ft,b+X,N),Q0(ht),this},f.__private__.circle=f.circle=function(b,N,X,nt){if(isNaN(b)||isNaN(N)||isNaN(X)||!to(nt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(b,N,X,X,nt)},f.setFont=function(b,N,X){return X&&(N=k(N,X)),Vt=bn(b,N,{disableWarning:!1}),this};var QC=f.__private__.getFont=f.getFont=function(){return Ce[bn.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var b,N,X={};for(b in xe)if(xe.hasOwnProperty(b))for(N in X[b]=[],xe[b])xe[b].hasOwnProperty(N)&&X[b].push(N);return X},f.addFont=function(b,N,X,nt,ht){var bt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&bt.indexOf(arguments[3])!==-1?ht=arguments[3]:arguments[3]&&bt.indexOf(arguments[3])==-1&&(X=k(X,nt)),Jt.call(this,b,N,X,ht=ht||"Identity-H")};var au,ye=n.lineWidth||.200025,NC=f.__private__.getLineWidth=f.getLineWidth=function(){return ye},PC=f.__private__.setLineWidth=f.setLineWidth=function(b){return ye=b,z(H(j(b))+" w"),this};f.__private__.setLineDash=le.API.setLineDash=le.API.setLineDashPattern=function(b,N){if(b=b||[],N=N||0,isNaN(N)||!Array.isArray(b))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return b=b.map(function(X){return H(j(X))}).join(" "),N=H(j(N)),z("["+b+"] "+N+" d"),this};var MC=f.__private__.getLineHeight=f.getLineHeight=function(){return Tt*au};f.__private__.getLineHeight=f.getLineHeight=function(){return Tt*au};var kC=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(b){return typeof(b=b||1.15)=="number"&&(au=b),this},OC=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return au};kC(n.lineHeight);var Yo=f.__private__.getHorizontalCoordinate=function(b){return j(b)},Jo=f.__private__.getVerticalCoordinate=function(b){return S===E?b:de[$].mediaBox.topRightY-de[$].mediaBox.bottomLeftY-j(b)},DC=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(b){return H(Yo(b))},RC=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(b){return H(Jo(b))},Qd=n.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return qs(Qd)},f.__private__.setStrokeColor=f.setDrawColor=function(b,N,X,nt){return Qd=Ns({ch1:b,ch2:N,ch3:X,ch4:nt,pdfColorType:"draw",precision:2}),z(Qd),this};var N0=n.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return qs(N0)},f.__private__.setFillColor=f.setFillColor=function(b,N,X,nt){return N0=Ns({ch1:b,ch2:N,ch3:X,ch4:nt,pdfColorType:"fill",precision:2}),z(N0),this};var eo=n.textColor||"0 g",HC=f.__private__.getTextColor=f.getTextColor=function(){return qs(eo)};f.__private__.setTextColor=f.setTextColor=function(b,N,X,nt){return eo=Ns({ch1:b,ch2:N,ch3:X,ch4:nt,pdfColorType:"text",precision:3}),this};var Nd=n.charSpace,KC=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(Nd||0)};f.__private__.setCharSpace=f.setCharSpace=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Nd=b,this};var P0=0;f.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},f.__private__.setLineCap=f.setLineCap=function(b){var N=f.CapJoinStyles[b];if(N===void 0)throw new Error("Line cap style of '"+b+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return P0=N,z(N+" J"),this};var xc=0;f.__private__.setLineJoin=f.setLineJoin=function(b){var N=f.CapJoinStyles[b];if(N===void 0)throw new Error("Line join style of '"+b+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return xc=N,z(N+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(b){if(b=b||0,isNaN(b))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return z(H(j(b))+" M"),this},f.GState=pd,f.setGState=function(b){(b=typeof b=="string"?Ae[ge[b]]:M0(null,b)).equals(nr)||(z("/"+b.id+" gs"),nr=b)};var M0=function(b,N){if(!b||!ge[b]){var X=!1;for(var nt in Ae)if(Ae.hasOwnProperty(nt)&&Ae[nt].equals(N)){X=!0;break}if(X)N=Ae[nt];else{var ht="GS"+(Object.keys(Ae).length+1).toString(10);Ae[ht]=N,N.id=ht}return b&&(ge[b]=N.id),Ye.publish("addGState",N),N}};f.addGState=function(b,N){return M0(b,N),this},f.saveGraphicsState=function(){return z("q"),tr.push({key:Vt,size:Tt,color:eo}),this},f.restoreGraphicsState=function(){z("Q");var b=tr.pop();return Vt=b.key,Tt=b.size,eo=b.color,nr=null,this},f.setCurrentTransformationMatrix=function(b){return z(b.toString()+" cm"),this},f.comment=function(b){return z("#"+b),this};var ou=function(b,N){var X=b||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return X},set:function(bt){isNaN(bt)||(X=parseFloat(bt))}});var nt=N||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return nt},set:function(bt){isNaN(bt)||(nt=parseFloat(bt))}});var ht="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return ht},set:function(bt){ht=bt.toString()}}),this},k0=function(b,N,X,nt){ou.call(this,b,N),this.type="rect";var ht=X||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return ht},set:function(Ft){isNaN(Ft)||(ht=parseFloat(Ft))}});var bt=nt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return bt},set:function(Ft){isNaN(Ft)||(bt=parseFloat(Ft))}}),this},Pd=function(){this.page=fe,this.currentPage=$,this.pages=St.slice(0),this.pagesContext=de.slice(0),this.x=Xt,this.y=fr,this.matrix=Ge,this.width=Kw($),this.height=tl($),this.outputDestination=Pt,this.id="",this.objectNumber=-1};Pd.prototype.restore=function(){fe=this.page,$=this.currentPage,de=this.pagesContext,St=this.pages,Xt=this.x,fr=this.y,Ge=this.matrix,Zo($,this.width),Vw($,this.height),Pt=this.outputDestination};var O0=function(b,N,X,nt,ht){NA.push(new Pd),fe=$=0,St=[],Xt=b,fr=N,Ge=ht,xt([X,nt])};for(var Md in f.beginFormObject=function(b,N,X,nt,ht){return O0(b,N,X,nt,ht),this},f.endFormObject=function(b){return function(N){if(ca[N])NA.pop().restore();else{var X=new Pd,nt="Xo"+(Object.keys(oi).length+1).toString(10);X.id=nt,ca[N]=nt,oi[nt]=X,Ye.publish("addFormObject",X),NA.pop().restore()}}(b),this},f.doFormObject=function(b,N){var X=oi[ca[b]];return z("q"),z(N.toString()+" cm"),z("/"+X.id+" Do"),z("Q"),this},f.getFormObject=function(b){var N=oi[ca[b]];return{x:N.x,y:N.y,width:N.width,height:N.height,matrix:N.matrix}},f.save=function(b,N){return b=b||"generated.pdf",(N=N||{}).returnPromise=N.returnPromise||!1,N.returnPromise===!1?(Tu(Id(Ys()),b),typeof Tu.unload=="function"&&be.setTimeout&&setTimeout(Tu.unload,911),this):new Promise(function(X,nt){try{var ht=Tu(Id(Ys()),b);typeof Tu.unload=="function"&&be.setTimeout&&setTimeout(Tu.unload,911),X(ht)}catch(bt){nt(bt.message)}})},le.API)le.API.hasOwnProperty(Md)&&(Md==="events"&&le.API.events.length?function(b,N){var X,nt,ht;for(ht=N.length-1;ht!==-1;ht--)X=N[ht][0],nt=N[ht][1],b.subscribe.apply(b,[X].concat(typeof nt=="function"?[nt]:nt))}(Ye,le.API.events):f[Md]=le.API[Md]);function Kw(b){return de[b].mediaBox.topRightX-de[b].mediaBox.bottomLeftX}function Zo(b,N){de[b].mediaBox.topRightX=N+de[b].mediaBox.bottomLeftX}function tl(b){return de[b].mediaBox.topRightY-de[b].mediaBox.bottomLeftY}function Vw(b,N){de[b].mediaBox.topRightY=N+de[b].mediaBox.bottomLeftY}var Gw=f.getPageWidth=function(b){return Kw(b=b||$)/ce},jw=f.setPageWidth=function(b,N){Zo(b,N*ce)},lu=f.getPageHeight=function(b){return tl(b=b||$)/ce},$w=f.setPageHeight=function(b,N){Vw(b,N*ce)};return f.internal={pdfEscape:Z,getStyle:Rw,getFont:QC,getFontSize:kt,getCharSpace:KC,getTextColor:HC,getLineHeight:MC,getLineHeightFactor:OC,getLineWidth:NC,write:Nt,getHorizontalCoordinate:Yo,getVerticalCoordinate:Jo,getCoordinateString:DC,getVerticalCoordinateString:RC,collections:{},newObject:Hr,newAdditionalObject:qi,newObjectDeferred:bi,newObjectDeferredBegin:Xi,getFilters:Gn,putStream:an,events:Ye,scaleFactor:ce,pageSize:{getWidth:function(){return Gw($)},setWidth:function(b){jw($,b)},getHeight:function(){return lu($)},setHeight:function(b){$w($,b)}},encryptionOptions:h,encryption:Bn,getEncryptor:function(b){return h!==null?Bn.encryptor(b,0):function(N){return N}},output:_d,getNumberOfPages:ar,get pages(){return St},out:z,f2:U,f3:D,getPageInfo:Dw,getPageInfoByObjId:FC,getCurrentPageInfo:TC,getPDFVersion:m,Point:ou,Rectangle:k0,Matrix:Ht,hasHotfix:qo},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return Gw($)},set:function(b){jw($,b)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return lu($)},set:function(b){$w($,b)},enumerable:!0,configurable:!0}),(function(b){for(var N=0,X=re.length;N<X;N++){var nt=Jt.call(this,b[N][0],b[N][1],b[N][2],re[N][3],!0);u===!1&&(d[nt]=!0);var ht=b[N][0].split("-");ua({id:nt,fontName:ht[0],fontStyle:ht[1]||""})}Ye.publish("addFonts",{fonts:Ce,dictionary:xe})}).call(f,re),Vt="F1",Rt(i,e),Ye.publish("initialized"),f}ug.prototype.lsbFirstWord=function(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)},ug.prototype.toHexString=function(n){return n.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ug.prototype.hexToBytes=function(n){for(var t=[],e=0;e<n.length;e+=2)t.push(String.fromCharCode(parseInt(n.substr(e,2),16)));return t.join("")},ug.prototype.processOwnerPassword=function(n,t){return pE(gE(t).substr(0,5),n)},ug.prototype.encryptor=function(n,t){var e=gE(this.encryptionKey+String.fromCharCode(255&n,n>>8&255,n>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return pE(e,r)}},pd.prototype.equals=function(n){var t,e="id,objectNumber,equals";if(!n||sr(n)!==sr(this))return!1;var r=0;for(t in this)if(!(e.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!n.hasOwnProperty(t)||this[t]!==n[t])return!1;r++}for(t in n)n.hasOwnProperty(t)&&e.indexOf(t)<0&&r--;return r===0},le.API={events:[]},le.version="4.2.1";var mi=le.API,e4=1,bd=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},zd=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},md=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(e.length===1?"0"+e:e)})},Te=function(n){return n.toFixed(2)},Oc=function(n){return n.toFixed(5)};mi.__acroform__={};var zs=function(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n},s_=function(n){return n*e4},ho=function(n){var t=new vN,e=Zt.internal.getHeight(n)||0,r=Zt.internal.getWidth(n)||0;return t.BBox=[0,0,Number(Te(r)),Number(Te(e))],t},W8=mi.__acroform__.setBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<<t},z8=mi.__acroform__.clearBit=function(n,t){if(n=n||0,t=t||0,isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return n&~(1<<t)},X8=mi.__acroform__.getBit=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return n&1<<t?1:0},Qi=mi.__acroform__.getBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return X8(n,t-1)},Ni=mi.__acroform__.setBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return W8(n,t-1)},Pi=mi.__acroform__.clearBitForPdf=function(n,t){if(isNaN(n)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return z8(n,t-1)},q8=mi.__acroform__.calculateCoordinates=function(n,t){var e=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=n[0],s=n[1],A=n[2],a=n[3],o={};return o.lowerLeft_X=e(i)||0,o.lowerLeft_Y=r(s+a)||0,o.upperRight_X=e(i+A)||0,o.upperRight_Y=r(s)||0,[Number(Te(o.lowerLeft_X)),Number(Te(o.lowerLeft_Y)),Number(Te(o.upperRight_X)),Number(Te(o.upperRight_Y))]},Y8=function(n){if(n.appearanceStreamContent)return n.appearanceStreamContent;if(n.V||n.DV){var t=[],e=n._V||n.DV,r=mE(n,e),i=n.scope.internal.getFont(n.fontName,n.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(n.scope.__private__.encodeColorString(n.color)),t.push("/"+i+" "+Te(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var s=ho(n);return s.scope=n.scope,s.stream=t.join(`
|
|
101
|
+
`),s}},mE=function(n,t){var e=n.fontSize===0?n.maxFontSize:n.fontSize,r={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=n.multiline?i.map(function(U){return U.split(`
|
|
102
|
+
`)}):i.map(function(U){return[U]});var s=e,A=Zt.internal.getHeight(n)||0;A=A<0?-A:A;var a=Zt.internal.getWidth(n)||0;a=a<0?-a:a;var o=function(U,D,j){if(U+1<i.length){var V=D+" "+i[U+1][0];return v2(V,n,j).width<=a-4}return!1};s++;t:for(;s>0;){t="",s--;var l,h,u=v2("3",n,s).height,d=n.multiline?A-s:(A-u)/2,f=d+=2,p=0,m=0,y=0;if(s<=0){t=`(...) Tj
|
|
103
|
+
`,t+="% Width of Text: "+v2(t,n,s=12).width+", FieldWidth:"+a+`
|
|
104
|
+
`;break}for(var w="",B=0,E=0;E<i.length;E++)if(i.hasOwnProperty(E)){var S=!1;if(i[E].length!==1&&y!==i[E].length-1){if((u+2)*(B+2)+2>A)continue t;w+=i[E][y],S=!0,m=E,E--}else{w=(w+=i[E][y]+" ").substr(w.length-1)==" "?w.substr(0,w.length-1):w;var I=parseInt(E),L=o(I,w,s),k=E>=i.length-1;if(L&&!k){w+=" ",y=0;continue}if(L||k){if(k)m=I;else if(n.multiline&&(u+2)*(B+2)+2>A)continue t}else{if(!n.multiline||(u+2)*(B+2)+2>A)continue t;m=I}}for(var H="",Q=p;Q<=m;Q++){var W=i[Q];if(n.multiline){if(Q===m){H+=W[y]+" ",y=(y+1)%W.length;continue}if(Q===p){H+=W[W.length-1]+" ";continue}}H+=W[0]+" "}switch(H=H.substr(H.length-1)==" "?H.substr(0,H.length-1):H,h=v2(H,n,s).width,n.textAlign){case"right":l=a-h-2;break;case"center":l=(a-h)/2;break;default:l=2}t+=Te(l)+" "+Te(f)+` Td
|
|
105
|
+
`,t+="("+bd(H)+`) Tj
|
|
106
|
+
`,t+=-Te(l)+` 0 Td
|
|
107
|
+
`,f=-(s+2),h=0,p=S?m:m+1,B++,w=""}break}return r.text=t,r.fontSize=s,r},v2=function(n,t,e){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(n,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:i}},J8={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Z8=function(n,t){var e={type:"reference",object:n};t.internal.getPageInfo(n.page).pageContext.annotations.find(function(r){return r.type===e.type&&r.object===e.object})===void 0&&t.internal.getPageInfo(n.page).pageContext.annotations.push(e)},t7=function(n,t){if(t.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if($a.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(J8)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");e4=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new wN,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];s.objId=void 0,s.hasAnnotation&&Z8(s,e)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(e){(function(r,i){var s=!r;for(var A in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(A)){var a=r[A],o=[],l=a.Rect;if(a.Rect&&(a.Rect=q8(a.Rect,i)),i.internal.newObjectDeferredBegin(a.objId,!0),a.DA=Zt.createDefaultAppearanceStream(a),sr(a)==="object"&&typeof a.getKeyValueListForStream=="function"&&(o=a.getKeyValueListForStream()),a.Rect=l,a.hasAppearanceStream&&!a.appearanceStreamContent){var h=Y8(a);o.push({key:"AP",value:"<</N "+h+">>"}),i.internal.acroformPlugin.xForms.push(h)}if(a.appearanceStreamContent){var u="";for(var d in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(d)){var f=a.appearanceStreamContent[d];if(u+="/"+d+" ",u+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var A in f)if(f.hasOwnProperty(A)){var p=f[A];typeof p=="function"&&(p=p.call(i,a)),u+="/"+A+" "+p+" ",i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p)}}else typeof(p=f)=="function"&&(p=p.call(i,a)),u+="/"+A+" "+p,i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p);u+=">>"}o.push({key:"AP",value:`<<
|
|
108
|
+
`+u+">>"})}i.internal.putStream({additionalKeyValues:o,objectId:a.objId}),i.internal.out("endobj")}s&&function(m,y){for(var w in m)if(m.hasOwnProperty(w)){var B=w,E=m[w];y.internal.newObjectDeferredBegin(E.objId,!0),sr(E)==="object"&&typeof E.putStream=="function"&&E.putStream(),delete m[B]}}(i.internal.acroformPlugin.xForms,i)})(e,n)}),n.internal.acroformPlugin.isInitialized=!0}},mN=mi.__acroform__.arrayToPdfArray=function(n,t,e){var r=function(A){return A};if(Array.isArray(n)){for(var i="[",s=0;s<n.length;s++)switch(s!==0&&(i+=" "),sr(n[s])){case"boolean":case"number":case"object":i+=n[s].toString();break;case"string":n[s].substr(0,1)==="/"?i+="/"+md(n[s].substr(1)):(t!==void 0&&e&&(r=e.internal.getEncryptor(t)),i+="("+bd(r(n[s].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},x5=function(n,t,e){var r=function(i){return i};return t!==void 0&&e&&(r=e.internal.getEncryptor(t)),(n=n||"").toString(),"("+bd(r(n))+")"},Ro=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(n){this._objId=n}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Ro.prototype.toString=function(){return this.objId+" 0 R"},Ro.prototype.putStream=function(){var n=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:n,objectId:this.objId}),this.scope.internal.out("endobj")},Ro.prototype.getKeyValueListForStream=function(){var n=[],t=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var e in t)if(Object.getOwnPropertyDescriptor(this,t[e]).configurable===!1){var r=t[e],i=this[r];i&&(Array.isArray(i)?n.push({key:r,value:mN(i,this.objId,this.scope)}):i instanceof Ro?(i.scope=this.scope,n.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&n.push({key:r,value:i}))}return n};var vN=function(){Ro.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var n,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){n=e.trim()},get:function(){return n||null}})};zs(vN,Ro);var wN=function(){Ro.call(this);var n,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(n){var e=function(r){return r};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+bd(e(n))+")"}},set:function(e){n=e}})};zs(wN,Ro);var $a=function n(){Ro.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute F supplied.');t=w}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Qi(t,3)},set:function(w){w?this.F=Ni(t,3):this.F=Pi(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute Ff supplied.');e=w}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(w){r=w!==void 0?w:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(w){r[0]=w}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(w){r[1]=w}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(w){r[2]=w}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(w){r[3]=w}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(w){switch(w){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=w;break;default:throw new Error('Invalid value "'+w+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof Eb)return;s="FieldObject"+n.FieldNum++}var w=function(B){return B};return this.scope&&(w=this.scope.internal.getEncryptor(this.objId)),"("+bd(w(s))+")"},set:function(w){s=w.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(w){s=w}});var A="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return A},set:function(w){A=w}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(w){a=w}});var o=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return o},set:function(w){o=w}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/e4:l},set:function(w){l=w}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(w){h=w}});var u="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!u||this instanceof Eb||this instanceof cd))return x5(u,this.objId,this.scope)},set:function(w){w=w.toString(),u=w}});var d=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof wn==0?x5(d,this.objId,this.scope):d},set:function(w){w=w.toString(),d=this instanceof wn==0?w.substr(0,1)==="("?zd(w.substr(1,w.length-2)):zd(w):w}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof wn==1?zd(d.substr(1,d.length-1)):d},set:function(w){w=w.toString(),d=this instanceof wn==1?"/"+md(w):w}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(w){this.V=w}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof wn==0?x5(f,this.objId,this.scope):f},set:function(w){w=w.toString(),f=this instanceof wn==0?w.substr(0,1)==="("?zd(w.substr(1,w.length-2)):zd(w):w}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof wn==1?zd(f.substr(1,f.length-1)):f},set:function(w){w=w.toString(),f=this instanceof wn==1?"/"+md(w):w}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(w){w=!!w,m=w}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(w){p=w}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,1)},set:function(w){w?this.Ff=Ni(this.Ff,1):this.Ff=Pi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,2)},set:function(w){w?this.Ff=Ni(this.Ff,2):this.Ff=Pi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,3)},set:function(w){w?this.Ff=Ni(this.Ff,3):this.Ff=Pi(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(w){if([0,1,2].indexOf(w)===-1)throw new Error('Invalid value "'+w+'" for attribute Q supplied.');y=w}}),Object.defineProperty(this,"textAlign",{get:function(){var w;switch(y){case 0:default:w="left";break;case 1:w="center";break;case 2:w="right"}return w},configurable:!0,enumerable:!0,set:function(w){switch(w){case"right":case 2:y=2;break;case"center":case 1:y=1;break;default:y=0}}})};zs($a,Ro);var Pg=function(){$a.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){n=e}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return mN(t,this.objId,this.scope)},set:function(e){var r,i;i=[],typeof(r=e)=="string"&&(i=function(s,A,a){a||(a=1);for(var o,l=[];o=A.exec(s);)l.push(o[a]);return l}(r,/\((.*?)\)/g)),t=i}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,18)},set:function(e){e?this.Ff=Ni(this.Ff,18):this.Ff=Pi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,19)},set:function(e){this.combo===!0&&(e?this.Ff=Ni(this.Ff,19):this.Ff=Pi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,20)},set:function(e){e?(this.Ff=Ni(this.Ff,20),t.sort()):this.Ff=Pi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,22)},set:function(e){e?this.Ff=Ni(this.Ff,22):this.Ff=Pi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,23)},set:function(e){e?this.Ff=Ni(this.Ff,23):this.Ff=Pi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,27)},set:function(e){e?this.Ff=Ni(this.Ff,27):this.Ff=Pi(this.Ff,27)}}),this.hasAppearanceStream=!1};zs(Pg,$a);var Mg=function(){Pg.call(this),this.fontName="helvetica",this.combo=!1};zs(Mg,Pg);var kg=function(){Mg.call(this),this.combo=!0};zs(kg,Mg);var Cy=function(){kg.call(this),this.edit=!0};zs(Cy,kg);var wn=function(){$a.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,15)},set:function(e){e?this.Ff=Ni(this.Ff,15):this.Ff=Pi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,16)},set:function(e){e?this.Ff=Ni(this.Ff,16):this.Ff=Pi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,17)},set:function(e){e?this.Ff=Ni(this.Ff,17):this.Ff=Pi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,26)},set:function(e){e?this.Ff=Ni(this.Ff,26):this.Ff=Pi(this.Ff,26)}});var n,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(s){return s};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,i=[];for(r in i.push("<<"),t)i.push("/"+r+" ("+bd(e(t[r]))+")");return i.push(">>"),i.join(`
|
|
109
|
+
`)}},set:function(e){sr(e)==="object"&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){typeof e=="string"&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var r=e==null?"":e.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),n="/"+md(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+md(e)}})};zs(wn,$a);var xy=function(){wn.call(this),this.pushButton=!0};zs(xy,wn);var Og=function(){wn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t!==void 0?t:[]}})};zs(Og,wn);var Eb=function(){var n,t;$a.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){n=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(a){return a};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var s,A=[];for(s in A.push("<<"),r)A.push("/"+s+" ("+bd(i(r[s]))+")");return A.push(">>"),A.join(`
|
|
110
|
+
`)},set:function(i){sr(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){var s=i==null?"":i.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+md(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(i){var s=i==null?"":i.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+md(s)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Zt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};zs(Eb,$a),Og.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var e=this.Kids[t];e.appearanceStreamContent=n.createAppearanceStream(e.optionName),e.caption=n.getCA()}},Og.prototype.createOption=function(n){var t=new Eb;return t.Parent=this,t.optionName=n,this.Kids.push(t),e7.call(this.scope,t),t};var Ey=function(){wn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Zt.CheckBox.createAppearanceStream()};zs(Ey,wn);var cd=function(){$a.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,13)},set:function(t){t?this.Ff=Ni(this.Ff,13):this.Ff=Pi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,21)},set:function(t){t?this.Ff=Ni(this.Ff,21):this.Ff=Pi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,23)},set:function(t){t?this.Ff=Ni(this.Ff,23):this.Ff=Pi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,24)},set:function(t){t?this.Ff=Ni(this.Ff,24):this.Ff=Pi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,25)},set:function(t){t?this.Ff=Ni(this.Ff,25):this.Ff=Pi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,26)},set:function(t){t?this.Ff=Ni(this.Ff,26):this.Ff=Pi(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){Number.isInteger(t)&&(n=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};zs(cd,$a);var Sy=function(){cd.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Qi(this.Ff,14)},set:function(n){n?this.Ff=Ni(this.Ff,14):this.Ff=Pi(this.Ff,14)}}),this.password=!0};zs(Sy,cd);var Zt={CheckBox:{createAppearanceStream:function(){return{N:{On:Zt.CheckBox.YesNormal},D:{On:Zt.CheckBox.YesPushDown,Off:Zt.CheckBox.OffPushDown}}},YesPushDown:function(n){var t=ho(n);t.scope=n.scope;var e=[],r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,i=n.scope.__private__.encodeColorString(n.color),s=mE(n,n.caption);return e.push("0.749023 g"),e.push("0 0 "+Te(Zt.internal.getWidth(n))+" "+Te(Zt.internal.getHeight(n))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+Te(s.fontSize)+" Tf "+i),e.push("BT"),e.push(s.text),e.push("ET"),e.push("Q"),e.push("EMC"),t.stream=e.join(`
|
|
111
|
+
`),t},YesNormal:function(n){var t=ho(n);t.scope=n.scope;var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,r=n.scope.__private__.encodeColorString(n.color),i=[],s=Zt.internal.getHeight(n),A=Zt.internal.getWidth(n),a=mE(n,n.caption);return i.push("1 g"),i.push("0 0 "+Te(A)+" "+Te(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Te(A-1)+" "+Te(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+e+" "+Te(a.fontSize)+" Tf "+r),i.push(a.text),i.push("ET"),i.push("Q"),t.stream=i.join(`
|
|
112
|
+
`),t},OffPushDown:function(n){var t=ho(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Te(Zt.internal.getWidth(n))+" "+Te(Zt.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(`
|
|
113
|
+
`),t}},RadioButton:{Circle:{createAppearanceStream:function(n){var t={D:{Off:Zt.RadioButton.Circle.OffPushDown},N:{}};return t.N[n]=Zt.RadioButton.Circle.YesNormal,t.D[n]=Zt.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(n){var t=ho(n);t.scope=n.scope;var e=[],r=Zt.internal.getWidth(n)<=Zt.internal.getHeight(n)?Zt.internal.getWidth(n)/4:Zt.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Zt.internal.Bezier_C,s=Number((r*i).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+Oc(Zt.internal.getWidth(n)/2)+" "+Oc(Zt.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+s+" "+s+" "+r+" 0 "+r+" c"),e.push("-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c"),e.push("-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c"),e.push(s+" -"+r+" "+r+" -"+s+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
114
|
+
`),t},YesPushDown:function(n){var t=ho(n);t.scope=n.scope;var e=[],r=Zt.internal.getWidth(n)<=Zt.internal.getHeight(n)?Zt.internal.getWidth(n)/4:Zt.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*Zt.internal.Bezier_C).toFixed(5)),A=Number((r*Zt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Oc(Zt.internal.getWidth(n)/2)+" "+Oc(Zt.internal.getHeight(n)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),e.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),e.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),e.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+Oc(Zt.internal.getWidth(n)/2)+" "+Oc(Zt.internal.getHeight(n)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+A+" "+A+" "+r+" 0 "+r+" c"),e.push("-"+A+" "+r+" -"+r+" "+A+" -"+r+" 0 c"),e.push("-"+r+" -"+A+" -"+A+" -"+r+" 0 -"+r+" c"),e.push(A+" -"+r+" "+r+" -"+A+" "+r+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
115
|
+
`),t},OffPushDown:function(n){var t=ho(n);t.scope=n.scope;var e=[],r=Zt.internal.getWidth(n)<=Zt.internal.getHeight(n)?Zt.internal.getWidth(n)/4:Zt.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*Zt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+Oc(Zt.internal.getWidth(n)/2)+" "+Oc(Zt.internal.getHeight(n)/2)+" cm"),e.push(i+" 0 m"),e.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),e.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),e.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),e.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),e.push("f"),e.push("Q"),t.stream=e.join(`
|
|
116
|
+
`),t}},Cross:{createAppearanceStream:function(n){var t={D:{Off:Zt.RadioButton.Cross.OffPushDown},N:{}};return t.N[n]=Zt.RadioButton.Cross.YesNormal,t.D[n]=Zt.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(n){var t=ho(n);t.scope=n.scope;var e=[],r=Zt.internal.calculateCross(n);return e.push("q"),e.push("1 1 "+Te(Zt.internal.getWidth(n)-2)+" "+Te(Zt.internal.getHeight(n)-2)+" re"),e.push("W"),e.push("n"),e.push(Te(r.x1.x)+" "+Te(r.x1.y)+" m"),e.push(Te(r.x2.x)+" "+Te(r.x2.y)+" l"),e.push(Te(r.x4.x)+" "+Te(r.x4.y)+" m"),e.push(Te(r.x3.x)+" "+Te(r.x3.y)+" l"),e.push("s"),e.push("Q"),t.stream=e.join(`
|
|
117
|
+
`),t},YesPushDown:function(n){var t=ho(n);t.scope=n.scope;var e=Zt.internal.calculateCross(n),r=[];return r.push("0.749023 g"),r.push("0 0 "+Te(Zt.internal.getWidth(n))+" "+Te(Zt.internal.getHeight(n))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Te(Zt.internal.getWidth(n)-2)+" "+Te(Zt.internal.getHeight(n)-2)+" re"),r.push("W"),r.push("n"),r.push(Te(e.x1.x)+" "+Te(e.x1.y)+" m"),r.push(Te(e.x2.x)+" "+Te(e.x2.y)+" l"),r.push(Te(e.x4.x)+" "+Te(e.x4.y)+" m"),r.push(Te(e.x3.x)+" "+Te(e.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
|
|
118
|
+
`),t},OffPushDown:function(n){var t=ho(n);t.scope=n.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+Te(Zt.internal.getWidth(n))+" "+Te(Zt.internal.getHeight(n))+" re"),e.push("f"),t.stream=e.join(`
|
|
119
|
+
`),t}}},createDefaultAppearanceStream:function(n){var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,e=n.scope.__private__.encodeColorString(n.color);return"/"+t+" "+n.fontSize+" Tf "+e}};Zt.internal={Bezier_C:.551915024494,calculateCross:function(n){var t=Zt.internal.getWidth(n),e=Zt.internal.getHeight(n),r=Math.min(t,e);return{x1:{x:(t-r)/2,y:(e-r)/2+r},x2:{x:(t-r)/2+r,y:(e-r)/2},x3:{x:(t-r)/2,y:(e-r)/2},x4:{x:(t-r)/2+r,y:(e-r)/2+r}}}},Zt.internal.getWidth=function(n){var t=0;return sr(n)==="object"&&(t=s_(n.Rect[2])),t},Zt.internal.getHeight=function(n){var t=0;return sr(n)==="object"&&(t=s_(n.Rect[3])),t};var e7=mi.addField=function(n){if(t7(this,n),!(n instanceof $a))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=n).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};mi.AcroFormChoiceField=Pg,mi.AcroFormListBox=Mg,mi.AcroFormComboBox=kg,mi.AcroFormEditBox=Cy,mi.AcroFormButton=wn,mi.AcroFormPushButton=xy,mi.AcroFormRadioButton=Og,mi.AcroFormCheckBox=Ey,mi.AcroFormTextField=cd,mi.AcroFormPasswordField=Sy,mi.AcroFormAppearance=Zt,mi.AcroForm={ChoiceField:Pg,ListBox:Mg,ComboBox:kg,EditBox:Cy,Button:wn,PushButton:xy,RadioButton:Og,CheckBox:Ey,TextField:cd,PasswordField:Sy,Appearance:Zt},le.AcroForm={ChoiceField:Pg,ListBox:Mg,ComboBox:kg,EditBox:Cy,Button:wn,PushButton:xy,RadioButton:Og,CheckBox:Ey,TextField:cd,PasswordField:Sy,Appearance:Zt};le.AcroForm;function yN(n){return n.reduce(function(t,e,r){return t[e]=r,t},{})}(function(n){var t="addImage_";n.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=n.__addimage__.getImageFileTypeByImageData=function(U,D){var j,V,st,rt,it,At=e;if((D=D||e)==="RGBA"||U.data!==void 0&&U.data instanceof Uint8ClampedArray&&"height"in U&&"width"in U)return"RGBA";if(L(U))for(it in r)for(st=r[it],j=0;j<st.length;j+=1){for(rt=!0,V=0;V<st[j].length;V+=1)if(st[j][V]!==void 0&&st[j][V]!==U[V]){rt=!1;break}if(rt===!0){At=it;break}}else for(it in r)for(st=r[it],j=0;j<st.length;j+=1){for(rt=!0,V=0;V<st[j].length;V+=1)if(st[j][V]!==void 0&&st[j][V]!==U.charCodeAt(V)){rt=!1;break}if(rt===!0){At=it;break}}return At===e&&D!==e&&(At=D),At},s=function U(D){for(var j=this.internal.write,V=this.internal.putStream,st=(0,this.internal.getFilters)();st.indexOf("FlateEncode")!==-1;)st.splice(st.indexOf("FlateEncode"),1);D.objectId=this.internal.newObject();var rt=[];if(rt.push({key:"Type",value:"/XObject"}),rt.push({key:"Subtype",value:"/Image"}),rt.push({key:"Width",value:D.width}),rt.push({key:"Height",value:D.height}),D.colorSpace===w.INDEXED?rt.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(D.palette.length/3-1)+" "+("sMask"in D&&D.sMask!==void 0?D.objectId+2:D.objectId+1)+" 0 R]"}):(rt.push({key:"ColorSpace",value:"/"+D.colorSpace}),D.colorSpace===w.DEVICE_CMYK&&rt.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),rt.push({key:"BitsPerComponent",value:D.bitsPerComponent}),"decodeParameters"in D&&D.decodeParameters!==void 0&&rt.push({key:"DecodeParms",value:"<<"+D.decodeParameters+">>"}),"transparency"in D&&Array.isArray(D.transparency)&&D.transparency.length>0){for(var it="",At=0,ut=D.transparency.length;At<ut;At++)it+=D.transparency[At]+" "+D.transparency[At]+" ";rt.push({key:"Mask",value:"["+it+"]"})}D.sMask!==void 0&&rt.push({key:"SMask",value:D.objectId+1+" 0 R"});var vt=D.filter!==void 0?["/"+D.filter]:void 0;if(V({data:D.data,additionalKeyValues:rt,alreadyAppliedFilters:vt,objectId:D.objectId}),j("endobj"),"sMask"in D&&D.sMask!==void 0){var mt,M=(mt=D.sMaskBitsPerComponent)!==null&&mt!==void 0?mt:D.bitsPerComponent,$={width:D.width,height:D.height,colorSpace:"DeviceGray",bitsPerComponent:M,data:D.sMask};"filter"in D&&($.decodeParameters="/Predictor ".concat(D.predictor," /Colors 1 /BitsPerComponent ").concat(M," /Columns ").concat(D.width),$.filter=D.filter),U.call(this,$)}if(D.colorSpace===w.INDEXED){var q=this.internal.newObject();V({data:H(new Uint8Array(D.palette)),objectId:q}),j("endobj")}},A=function(){var U=this.internal.collections[t+"images"];for(var D in U)s.call(this,U[D])},a=function(){var U,D=this.internal.collections[t+"images"],j=this.internal.write;for(var V in D)j("/I"+(U=D[V]).index,U.objectId,"0","R")},o=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",A),this.internal.events.subscribe("putXobjectDict",a))},l=function(){var U=this.internal.collections[t+"images"];return o.call(this),U},h=function(){return Object.keys(this.internal.collections[t+"images"]).length},u=function(U){return typeof n["process"+U.toUpperCase()]=="function"},d=function(U){return sr(U)==="object"&&U.nodeType===1},f=function(U,D){if(U.nodeName==="IMG"&&U.hasAttribute("src")){var j=""+U.getAttribute("src");if(j.indexOf("data:image/")===0)return By(unescape(j).split("base64,").pop());var V=n.loadFile(j,!0);if(V!==void 0)return V}if(U.nodeName==="CANVAS"){if(U.width===0||U.height===0)throw new Error("Given canvas must have data. Canvas width: "+U.width+", height: "+U.height);var st;switch(D){case"PNG":st="image/png";break;case"WEBP":st="image/webp";break;default:st="image/jpeg"}return By(U.toDataURL(st,1).split("base64,").pop())}},p=function(U){var D=this.internal.collections[t+"images"];if(D){for(var j in D)if(U===D[j].alias)return D[j]}},m=function(U,D,j){return U||D||(U=-96,D=-96),U<0&&(U=-1*j.width*72/U/this.internal.scaleFactor),D<0&&(D=-1*j.height*72/D/this.internal.scaleFactor),U===0&&(U=D*j.width/j.height),D===0&&(D=U*j.height/j.width),[U,D]},y=function(U,D,j,V,st,rt){var it=m.call(this,j,V,st),At=this.internal.getCoordinateString,ut=this.internal.getVerticalCoordinateString,vt=l.call(this);if(j=it[0],V=it[1],vt[st.index]=st,rt){rt*=Math.PI/180;var mt=Math.cos(rt),M=Math.sin(rt),$=function(tt){return tt.toFixed(4)},q=[$(mt),$(M),$(-1*M),$(mt),0,0,"cm"]}this.internal.write("q"),rt?(this.internal.write([1,"0","0",1,At(U),ut(D+V),"cm"].join(" ")),this.internal.write(q.join(" ")),this.internal.write([At(j),"0","0",At(V),"0","0","cm"].join(" "))):this.internal.write([At(j),"0","0",At(V),At(U),ut(D+V),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+st.index+" Do"),this.internal.write("Q")},w=n.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};n.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var B=n.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},E=n.__addimage__.sHashCode=function(U){var D,j,V=0;if(typeof U=="string")for(j=U.length,D=0;D<j;D++)V=(V<<5)-V+U.charCodeAt(D),V|=0;else if(L(U))for(j=U.byteLength/2,D=0;D<j;D++)V=(V<<5)-V+U[D],V|=0;return V},S=n.__addimage__.validateStringAsBase64=function(U){(U=U||"").toString().trim();var D=!0;return U.length===0&&(D=!1),U.length%4!=0&&(D=!1),/^[A-Za-z0-9+/]+$/.test(U.substr(0,U.length-2))===!1&&(D=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(U.substr(-2))===!1&&(D=!1),D},I=n.__addimage__.extractImageFromDataUrl=function(U){if(U==null||!(U=U.trim()).startsWith("data:"))return null;var D=U.indexOf(",");return D<0?null:U.substring(0,D).trim().endsWith("base64")?U.substring(D+1):null};n.__addimage__.isArrayBuffer=function(U){return U instanceof ArrayBuffer};var L=n.__addimage__.isArrayBufferView=function(U){return U instanceof Int8Array||U instanceof Uint8Array||U instanceof Uint8ClampedArray||U instanceof Int16Array||U instanceof Uint16Array||U instanceof Int32Array||U instanceof Uint32Array||U instanceof Float32Array||U instanceof Float64Array},k=n.__addimage__.binaryStringToUint8Array=function(U){for(var D=U.length,j=new Uint8Array(D),V=0;V<D;V++)j[V]=U.charCodeAt(V);return j},H=n.__addimage__.arrayBufferToBinaryString=function(U){for(var D="",j=L(U)?U:new Uint8Array(U),V=0;V<j.length;V+=8192)D+=String.fromCharCode.apply(null,j.subarray(V,V+8192));return D};n.addImage=function(){var U,D,j,V,st,rt,it,At,ut;if(typeof arguments[1]=="number"?(D=e,j=arguments[1],V=arguments[2],st=arguments[3],rt=arguments[4],it=arguments[5],At=arguments[6],ut=arguments[7]):(D=arguments[1],j=arguments[2],V=arguments[3],st=arguments[4],rt=arguments[5],it=arguments[6],At=arguments[7],ut=arguments[8]),sr(U=arguments[0])==="object"&&!d(U)&&"imageData"in U){var vt=U;U=vt.imageData,D=vt.format||D||e,j=vt.x||j||0,V=vt.y||V||0,st=vt.w||vt.width||st,rt=vt.h||vt.height||rt,it=vt.alias||it,At=vt.compression||At,ut=vt.rotation||vt.angle||ut}var mt=this.internal.getFilters();if(At===void 0&&mt.indexOf("FlateEncode")!==-1&&(At="SLOW"),isNaN(j)||isNaN(V))throw new Error("Invalid coordinates passed to jsPDF.addImage");o.call(this);var M=Q.call(this,U,D,it,At);return y.call(this,j,V,st,rt,M,ut),this};var Q=function(U,D,j,V){var st,rt,it;if(typeof U=="string"&&i(U)===e){U=unescape(U);var At=W(U,!1);(At!==""||(At=n.loadFile(U,!0))!==void 0)&&(U=At)}if(d(U)&&(U=f(U,D)),D=i(U,D),!u(D))throw new Error("addImage does not support files of type '"+D+"', please ensure that a plugin for '"+D+"' support is added.");if(((it=j)==null||it.length===0)&&(j=function(ut){return typeof ut=="string"||L(ut)?E(ut):L(ut.data)?E(ut.data):null}(U)),(st=p.call(this,j))||(U instanceof Uint8Array||D==="RGBA"||(rt=U,U=k(U)),st=this["process"+D.toUpperCase()](U,h.call(this),j,function(ut){return ut&&typeof ut=="string"&&(ut=ut.toUpperCase()),ut in n.image_compression?ut:B.NONE}(V),rt)),!st)throw new Error("An unknown error occurred whilst processing the image.");return st},W=n.__addimage__.convertBase64ToBinaryString=function(U,D){D=typeof D!="boolean"||D;var j,V="";if(typeof U=="string"){var st;j=(st=I(U))!==null&&st!==void 0?st:U;try{V=By(j)}catch(rt){if(D)throw S(j)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+rt.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return V};n.getImageProperties=function(U){var D,j,V="";if(d(U)&&(U=f(U)),typeof U=="string"&&i(U)===e&&((V=W(U,!1))===""&&(V=n.loadFile(U)||""),U=V),j=i(U),!u(j))throw new Error("addImage does not support files of type '"+j+"', please ensure that a plugin for '"+j+"' support is added.");if(U instanceof Uint8Array||(U=k(U)),!(D=this["process"+j.toUpperCase()](U)))throw new Error("An unknown error occurred whilst processing the image");return D.fileType=j,D}})(le.API),function(n){var t=function(e){if(e!==void 0&&e!="")return!0};le.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),n.events.push(["putPage",function(e){for(var r,i,s,A=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,h=!1,u=0;u<l.length&&!h;u++)switch((r=l[u]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var d=0;d<l.length;d++){r=l[d];var f=this.internal.pdfEscape,p=this.internal.getEncryptor(e.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var m=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),w=this.internal.getEncryptor(m.objId),B=r.title||"Note";s="<</Type /Annot /Subtype /Text "+(i="/Rect ["+A(r.bounds.x)+" "+a(r.bounds.y+r.bounds.h)+" "+A(r.bounds.x+r.bounds.w)+" "+a(r.bounds.y)+"] ")+"/Contents ("+f(w(r.contents))+")",s+=" /Popup "+y.objId+" 0 R",s+=" /P "+o.objId+" 0 R",s+=" /T ("+f(w(B))+") >>",m.content=s;var E=m.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+A(r.bounds.x+30)+" "+a(r.bounds.y+r.bounds.h)+" "+A(r.bounds.x+r.bounds.w+30)+" "+a(r.bounds.y)+"] ")+" /Parent "+E,r.open&&(s+=" /Open true"),s+=" >>",y.content=s,this.internal.write(m.objId,"0 R",y.objId,"0 R");break;case"freetext":i="/Rect ["+A(r.bounds.x)+" "+a(r.bounds.y)+" "+A(r.bounds.x+r.bounds.w)+" "+a(r.bounds.y+r.bounds.h)+"] ";var S="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");s="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+f(p(r.contents))+")",s+=" /DS("+f(p(S))+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(r.options.name){var I=this.annotations._nameMap[r.options.name];r.options.pageNumber=I.page,r.options.top=I.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",s="",r.options.url)s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+f(p(r.options.url))+") >>";else if(r.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,s+=" /FitV "+r.options.left+"]";break;default:var L=a(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),s+=" /XYZ "+r.options.left+" "+L+" "+r.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),n.createAnnotation=function(e){var r=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":r.pageContext.annotations.push(e)}},n.link=function(e,r,i,s,A){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:l(r),w:o(e+i),h:l(r+s)},options:A,type:"link"})},n.textWithLink=function(e,r,i,s){var A,a,o=this.getTextWidth(e),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){a=s.maxWidth;var h=this.splitTextToSize(e,a).length;A=Math.ceil(l*h)}else a=o,A=l;return this.text(e,r,i,s),i+=.2*l,s.align==="center"&&(r-=o/2),s.align==="right"&&(r-=o),this.link(r,i-l,a,A,s),o},n.getTextWidth=function(e){var r=this.internal.getFontSize();return this.getStringUnitWidth(e)*r/this.internal.scaleFactor}}(le.API),function(n){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},e={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];n.__arabicParser__={};var s=n.__arabicParser__.isInArabicSubstitutionA=function(m){return t[m.charCodeAt(0)]!==void 0},A=n.__arabicParser__.isArabicLetter=function(m){return typeof m=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(m)},a=n.__arabicParser__.isArabicEndLetter=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length<=2},o=n.__arabicParser__.isArabicAlfLetter=function(m){return A(m)&&i.indexOf(m.charCodeAt(0))>=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=1};var l=n.__arabicParser__.arabicLetterHasFinalForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length>=3};var h=n.__arabicParser__.arabicLetterHasMedialForm=function(m){return A(m)&&s(m)&&t[m.charCodeAt(0)].length==4},u=n.__arabicParser__.resolveLigatures=function(m){var y=0,w=e,B="",E=0;for(y=0;y<m.length;y+=1)w[m.charCodeAt(y)]!==void 0?(E++,typeof(w=w[m.charCodeAt(y)])=="number"&&(B+=String.fromCharCode(w),w=e,E=0),y===m.length-1&&(w=e,B+=m.charAt(y-(E-1)),y-=E-1,E=0)):(w=e,B+=m.charAt(y-E),y-=E,E=0);return B};n.__arabicParser__.isArabicDiacritic=function(m){return m!==void 0&&r[m.charCodeAt(0)]!==void 0};var d=n.__arabicParser__.getCorrectForm=function(m,y,w){return A(m)?s(m)===!1?-1:!l(m)||!A(y)&&!A(w)||!A(w)&&a(y)||a(m)&&!A(y)||a(m)&&o(y)||a(m)&&a(y)?0:h(m)&&A(y)&&!a(y)&&A(w)&&l(w)?3:a(m)||!A(w)?1:2:-1},f=function(m){var y=0,w=0,B=0,E="",S="",I="",L=(m=m||"").split("\\s+"),k=[];for(y=0;y<L.length;y+=1){for(k.push(""),w=0;w<L[y].length;w+=1)E=L[y][w],S=L[y][w-1],I=L[y][w+1],A(E)?(B=d(E,S,I),k[y]+=B!==-1?String.fromCharCode(t[E.charCodeAt(0)][B]):E):k[y]+=E;k[y]=u(k[y])}return k.join(" ")},p=n.__arabicParser__.processArabic=n.processArabic=function(){var m,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,w=[];if(Array.isArray(y)){var B=0;for(w=[],B=0;B<y.length;B+=1)Array.isArray(y[B])?w.push([f(y[B][0]),y[B][1],y[B][2]]):w.push([f(y[B])]);m=w}else m=f(y);return typeof arguments[0]=="string"?m:(arguments[0].text=m,arguments[0])};n.events.push(["preProcessText",p])}(le.API),le.API.autoPrint=function(n){var t;return(n=n||{}).variant=n.variant||"non-conform",n.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},function(n){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(a){e=a}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(a){r=isNaN(a)||Number.isInteger(a)===!1||a<0?150:a,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(a){i=isNaN(a)||Number.isInteger(a)===!1||a<0?300:a,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(a){s=a}});var A={};Object.defineProperty(this,"style",{get:function(){return A},set:function(a){A=a}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,r){var i;if((e=e||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(le.API),function(n){var t={left:0,top:0,bottom:0,right:0},e=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(m){o=m}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(m){l=m}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(m){h=m}});var u=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return u},set:function(m){u=m}});var d=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return d},set:function(m){d=m}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(m){f=m}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(m){p=m}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(o){return r.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},n.getTextDimensions=function(o,l){r.call(this);var h=(l=l||{}).fontSize||this.getFontSize(),u=l.font||this.getFont(),d=l.scaleFactor||this.internal.scaleFactor,f=0,p=0,m=0,y=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var w=l.maxWidth;w>0?typeof o=="string"?o=this.splitTextToSize(o,w):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(E,S){return E.concat(y.splitTextToSize(S,w))},[])):o=Array.isArray(o)?o:[o];for(var B=0;B<o.length;B++)f<(m=this.getStringUnitWidth(o[B],{font:u})*h)&&(f=m);return f!==0&&(p=o.length),{w:f/=d,h:Math.max((p*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/d,0)}},n.cellAddPage=function(){r.call(this),this.addPage();var o=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var A=n.cell=function(){var o;o=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var l=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,u=this.internal.__cell__.margins||t,d=this.internal.__cell__.tableHeaderRow,f=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===o.lineNumber?(o.x=(l.x||0)+(l.width||0),o.y=l.y||0):l.y+l.height+o.height+u.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=u.top,f&&d&&(this.printHeaderRow(o.lineNumber,!0),o.y+=d[0].height)):o.y=l.y+l.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,e===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-h,o.y+h,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+h,{align:"center",baseline:"top",maxWidth:o.width-h-h}):this.text(o.text,o.x+h,o.y+h,{align:"left",baseline:"top",maxWidth:o.width-h-h})),this.internal.__cell__.lastCell=o,this};n.table=function(o,l,h,u,d){if(r.call(this),!h)throw new Error("No data for PDF table.");var f,p,m,y,w=[],B=[],E=[],S={},I={},L=[],k=[],H=(d=d||{}).autoSize||!1,Q=d.printHeaders!==!1,W=d.css&&d.css["font-size"]!==void 0?16*d.css["font-size"]:d.fontSize||12,U=d.margins||Object.assign({width:this.getPageWidth()},t),D=typeof d.padding=="number"?d.padding:3,j=d.headerBackgroundColor||"#c8c8c8",V=d.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=Q,this.internal.__cell__.margins=U,this.internal.__cell__.table_font_size=W,this.internal.__cell__.padding=D,this.internal.__cell__.headerBackgroundColor=j,this.internal.__cell__.headerTextColor=V,this.setFontSize(W),u==null)B=w=Object.keys(h[0]),E=w.map(function(){return"left"});else if(Array.isArray(u)&&sr(u[0])==="object")for(w=u.map(function(vt){return vt.name}),B=u.map(function(vt){return vt.prompt||vt.name||""}),E=u.map(function(vt){return vt.align||"left"}),f=0;f<u.length;f+=1)I[u[f].name]=.7499990551181103*u[f].width;else Array.isArray(u)&&typeof u[0]=="string"&&(B=w=u,E=w.map(function(){return"left"}));if(H||Array.isArray(u)&&typeof u[0]=="string")for(f=0;f<w.length;f+=1){for(S[y=w[f]]=h.map(function(vt){return vt[y]}),this.setFont(void 0,"bold"),L.push(this.getTextDimensions(B[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=S[y],this.setFont(void 0,"normal"),m=0;m<p.length;m+=1)L.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);I[y]=Math.max.apply(null,L)+D+D,L=[]}if(Q){var st={};for(f=0;f<w.length;f+=1)st[w[f]]={},st[w[f]].text=B[f],st[w[f]].align=E[f];var rt=a.call(this,st,I);k=w.map(function(vt){return new s(o,l,I[vt],rt,st[vt].text,void 0,st[vt].align)}),this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}var it=u.reduce(function(vt,mt){return vt[mt.name]=mt.align,vt},{});for(f=0;f<h.length;f+=1){"rowStart"in d&&d.rowStart instanceof Function&&d.rowStart({row:f,data:h[f]},this);var At=a.call(this,h[f],I);for(m=0;m<w.length;m+=1){var ut=h[f][w[m]];"cellStart"in d&&d.cellStart instanceof Function&&d.cellStart({row:f,col:m,data:ut},this),A.call(this,new s(o,l,I[w[m]],At,ut,f+2,it[w[m]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=l,this};var a=function(o,l){var h=this.internal.__cell__.padding,u=this.internal.__cell__.table_font_size,d=this.internal.scaleFactor;return Object.keys(o).map(function(f){var p=o[f];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,l[f]-h-h)},this).map(function(f){return this.getLineHeightFactor()*f.length*u/d+h+h},this).reduce(function(f,p){return Math.max(f,p)},0)};n.setTableHeaderRow=function(o){r.call(this),this.internal.__cell__.tableHeaderRow=o},n.printHeaderRow=function(o,l){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(e=!0,typeof this.internal.__cell__.headerFunction=="function"){var u=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(u[0],u[1],u[2],u[3],void 0,-1)}this.setFont(void 0,"bold");for(var d=[],f=0;f<this.internal.__cell__.tableHeaderRow.length;f+=1){h=this.internal.__cell__.tableHeaderRow[f].clone(),l&&(h.y=this.internal.__cell__.margins.top||0,d.push(h)),h.lineNumber=o;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),A.call(this,h),this.setTextColor(p)}d.length>0&&this.setTableHeaderRow(d),this.setFont(void 0,"normal"),e=!1}}(le.API);var bN={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},BN=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],vE=yN(BN),CN=[100,200,300,400,500,600,700,800,900],r7=yN(CN);function E5(n){var t=n.family.replace(/"|'/g,"").toLowerCase(),e=function(s){return bN[s=s||"normal"]?s:"normal"}(n.style),r=function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400}(n.weight),i=function(s){return typeof vE[s=s||"normal"]=="number"?s:"normal"}(n.stretch);return{family:t,style:e,weight:r,stretch:i,src:n.src||[],ref:n.ref||{name:t,style:[i,e,r].join(" ")}}}function A_(n,t,e,r){var i;for(i=e;i>=0&&i<t.length;i+=r)if(n[t[i]])return n[t[i]];for(i=e;i>=0&&i<t.length;i-=r)if(n[t[i]])return n[t[i]]}var i7={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},a_={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function o_(n){return[n.stretch,n.style,n.weight,n.family].join(" ")}function l_(n){return n.trimLeft()}function n7(n,t){for(var e=0;e<n.length;){if(n.charAt(e)===t)return[n.substring(0,e),n.substring(e+1)];e+=1}return null}function s7(n){var t=n.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],n.substring(t[0].length)]}var Xd,w2,c_,h_,u_,S5=["times"];function f_(n,t,e,r,i){var s=4,A=g_;switch(i){case le.API.image_compression.FAST:s=1,A=d_;break;case le.API.image_compression.MEDIUM:s=6,A=p_;break;case le.API.image_compression.SLOW:s=9,A=m_}n=function(o,l,h,u){for(var d,f=o.length/l,p=new Uint8Array(o.length+f),m=[A7,d_,g_,p_,m_],y=0;y<f;y+=1){var w=y*l,B=o.subarray(w,w+l);if(u)p.set(u(B,h,d),w+y);else{for(var E=m.length,S=[],I=0;I<E;I+=1)S[I]=m[I](B,h,d);var L=o7(S.concat());p.set(S[L],w+y)}d=B}return p}(n,t,Math.ceil(e*r/8),A);var a=hE(n,{level:s});return le.API.__addimage__.arrayBufferToBinaryString(a)}function A7(n){var t=Array.apply([],n);return t.unshift(0),t}function d_(n,t){var e=n.length,r=[];r[0]=1;for(var i=0;i<e;i+=1){var s=n[i-t]||0;r[i+1]=n[i]-s+256&255}return r}function g_(n,t,e){var r=n.length,i=[];i[0]=2;for(var s=0;s<r;s+=1){var A=e&&e[s]||0;i[s+1]=n[s]-A+256&255}return i}function p_(n,t,e){var r=n.length,i=[];i[0]=3;for(var s=0;s<r;s+=1){var A=n[s-t]||0,a=e&&e[s]||0;i[s+1]=n[s]+256-(A+a>>>1)&255}return i}function m_(n,t,e){var r=n.length,i=[];i[0]=4;for(var s=0;s<r;s+=1){var A=a7(n[s-t]||0,e&&e[s]||0,e&&e[s-t]||0);i[s+1]=n[s]-A+256&255}return i}function a7(n,t,e){if(n===t&&t===e)return n;var r=Math.abs(t-e),i=Math.abs(n-e),s=Math.abs(n+t-e-e);return r<=i&&r<=s?n:i<=s?t:e}function o7(n){var t=n.map(function(e){return e.reduce(function(r,i){return r+Math.abs(i)},0)});return t.indexOf(Math.min.apply(null,t))}function F5(n,t,e){var r=t*e,i=Math.floor(r/8),s=16-(r-8*i+e),A=(1<<e)-1;return xN(n,i)>>s&A}function v_(n,t,e,r){var i=e*r,s=Math.floor(i/8),A=16-(i-8*s+r),a=(1<<r)-1,o=(t&a)<<A;(function(l,h,u){if(h+1<l.byteLength)l.setUint16(h,u,!1);else{var d=u>>8&255;l.setUint8(h,d)}})(n,s,xN(n,s)&~(a<<A)&65535|o)}function xN(n,t){return t+1<n.byteLength?n.getUint16(t,!1):n.getUint8(t)<<8}function l7(n){var t=0;if(n[t++]!==71||n[t++]!==73||n[t++]!==70||n[t++]!==56||(n[t++]+1&253)!=56||n[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var e=n[t++]|n[t++]<<8,r=n[t++]|n[t++]<<8,i=n[t++],s=i>>7,A=1<<1+(7&i);n[t++],n[t++];var a=null,o=null;s&&(a=t,o=A,t+=3*A);var l=!0,h=[],u=0,d=null,f=0,p=null;for(this.width=e,this.height=r;l&&t<n.length;)switch(n[t++]){case 33:switch(n[t++]){case 255:if(n[t]!==11||n[t+1]==78&&n[t+2]==69&&n[t+3]==84&&n[t+4]==83&&n[t+5]==67&&n[t+6]==65&&n[t+7]==80&&n[t+8]==69&&n[t+9]==50&&n[t+10]==46&&n[t+11]==48&&n[t+12]==3&&n[t+13]==1&&n[t+16]==0)t+=14,p=n[t++]|n[t++]<<8,t++;else for(t+=12;;){if(!((U=n[t++])>=0))throw Error("Invalid block size");if(U===0)break;t+=U}break;case 249:if(n[t++]!==4||n[t+4]!==0)throw new Error("Invalid graphics extension block.");var m=n[t++];u=n[t++]|n[t++]<<8,d=n[t++],1&m||(d=null),f=m>>2&7,t++;break;case 254:for(;;){if(!((U=n[t++])>=0))throw Error("Invalid block size");if(U===0)break;t+=U}break;default:throw new Error("Unknown graphic control label: 0x"+n[t-1].toString(16))}break;case 44:var y=n[t++]|n[t++]<<8,w=n[t++]|n[t++]<<8,B=n[t++]|n[t++]<<8,E=n[t++]|n[t++]<<8,S=n[t++],I=S>>6&1,L=1<<1+(7&S),k=a,H=o,Q=!1;S>>7&&(Q=!0,k=t,H=L,t+=3*L);var W=t;for(t++;;){var U;if(!((U=n[t++])>=0))throw Error("Invalid block size");if(U===0)break;t+=U}h.push({x:y,y:w,width:B,height:E,has_local_palette:Q,palette_offset:k,palette_size:H,data_offset:W,data_length:t-W,transparent_index:d,interlaced:!!I,delay:u,disposal:f});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+n[t-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return p},this.frameInfo=function(D){if(D<0||D>=h.length)throw new Error("Frame index out of range.");return h[D]},this.decodeAndBlitFrameBGRA=function(D,j){var V=this.frameInfo(D),st=V.width*V.height;if(st>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var rt=new Uint8Array(st);w_(n,V.data_offset,rt,st);var it=V.palette_offset,At=V.transparent_index;At===null&&(At=256);var ut=V.width,vt=e-ut,mt=ut,M=4*(V.y*e+V.x),$=4*((V.y+V.height)*e+V.x),q=M,tt=4*vt;V.interlaced===!0&&(tt+=4*e*7);for(var et=8,ot=0,dt=rt.length;ot<dt;++ot){var wt=rt[ot];if(mt===0&&(mt=ut,(q+=tt)>=$&&(tt=4*vt+4*e*(et-1),q=M+(ut+vt)*(et<<1),et>>=1)),wt===At)q+=4;else{var yt=n[it+3*wt],St=n[it+3*wt+1],Mt=n[it+3*wt+2];j[q++]=Mt,j[q++]=St,j[q++]=yt,j[q++]=255}--mt}},this.decodeAndBlitFrameRGBA=function(D,j){var V=this.frameInfo(D),st=V.width*V.height;if(st>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var rt=new Uint8Array(st);w_(n,V.data_offset,rt,st);var it=V.palette_offset,At=V.transparent_index;At===null&&(At=256);var ut=V.width,vt=e-ut,mt=ut,M=4*(V.y*e+V.x),$=4*((V.y+V.height)*e+V.x),q=M,tt=4*vt;V.interlaced===!0&&(tt+=4*e*7);for(var et=8,ot=0,dt=rt.length;ot<dt;++ot){var wt=rt[ot];if(mt===0&&(mt=ut,(q+=tt)>=$&&(tt=4*vt+4*e*(et-1),q=M+(ut+vt)*(et<<1),et>>=1)),wt===At)q+=4;else{var yt=n[it+3*wt],St=n[it+3*wt+1],Mt=n[it+3*wt+2];j[q++]=yt,j[q++]=St,j[q++]=Mt,j[q++]=255}--mt}}}function w_(n,t,e,r){for(var i=n[t++],s=1<<i,A=s+1,a=A+1,o=i+1,l=(1<<o)-1,h=0,u=0,d=0,f=n[t++],p=new Int32Array(4096),m=null;;){for(;h<16&&f!==0;)u|=n[t++]<<h,h+=8,f===1?f=n[t++]:--f;if(h<o)break;var y=u&l;if(u>>=o,h-=o,y!==s){if(y===A)break;for(var w=y<a?y:m,B=0,E=w;E>s;)E=p[E]>>8,++B;var S=E;if(d+B+(w!==y?1:0)>r)return void _r.log("Warning, gif stream longer than expected.");e[d++]=S;var I=d+=B;for(w!==y&&(e[d++]=S),E=w;B--;)E=p[E],e[--I]=255&E,E>>=8;m!==null&&a<4096&&(p[a++]=m<<8|S,a>=l+1&&o<12&&(++o,l=l<<1|1)),m=y}else a=A+1,l=(1<<(o=i+1))-1,m=null}return d!==r&&_r.log("Warning, gif stream shorter than expected."),e}/**
|
|
120
|
+
* @license
|
|
121
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
122
|
+
All rights reserved.
|
|
123
|
+
|
|
124
|
+
Redistribution and use in source and binary forms, with or without
|
|
125
|
+
modification, are permitted provided that the following conditions are
|
|
126
|
+
met:
|
|
127
|
+
|
|
128
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
129
|
+
this list of conditions and the following disclaimer.
|
|
130
|
+
|
|
131
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
132
|
+
notice, this list of conditions and the following disclaimer in the
|
|
133
|
+
documentation and/or other materials provided with the distribution.
|
|
134
|
+
|
|
135
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
136
|
+
contributors may be used to endorse or promote products derived from
|
|
137
|
+
this software without specific prior written permission.
|
|
138
|
+
|
|
139
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
140
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
141
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
142
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
143
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
144
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
145
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
146
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
147
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
148
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
149
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
150
|
+
*/function T5(n){var t,e,r,i,s,A=Math.floor,a=new Array(64),o=new Array(64),l=new Array(64),h=new Array(64),u=new Array(65535),d=new Array(65535),f=new Array(64),p=new Array(64),m=[],y=0,w=7,B=new Array(64),E=new Array(64),S=new Array(64),I=new Array(256),L=new Array(2048),k=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],H=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Q=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],U=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],D=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],st=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function rt(M,$){for(var q=0,tt=0,et=new Array,ot=1;ot<=16;ot++){for(var dt=1;dt<=M[ot];dt++)et[$[tt]]=[],et[$[tt]][0]=q,et[$[tt]][1]=ot,tt++,q++;q*=2}return et}function it(M){for(var $=M[0],q=M[1]-1;q>=0;)$&1<<q&&(y|=1<<w),q--,--w<0&&(y==255?(At(255),At(0)):At(y),w=7,y=0)}function At(M){m.push(M)}function ut(M){At(M>>8&255),At(255&M)}function vt(M,$,q,tt,et){for(var ot,dt=et[0],wt=et[240],yt=function(Tt,ie){var kt,qt,Wt,we,Ie,me,_e,Be,Vt,ce,Xt=0;for(Vt=0;Vt<8;++Vt){kt=Tt[Xt],qt=Tt[Xt+1],Wt=Tt[Xt+2],we=Tt[Xt+3],Ie=Tt[Xt+4],me=Tt[Xt+5],_e=Tt[Xt+6];var fr=kt+(Be=Tt[Xt+7]),Ge=kt-Be,Ce=qt+_e,xe=qt-_e,tr=Wt+me,ne=Wt-me,ke=we+Ie,Ae=we-Ie,ge=fr+ke,nr=fr-ke,fe=Ce+tr,de=Ce-tr;Tt[Xt]=ge+fe,Tt[Xt+4]=ge-fe;var Ye=.707106781*(de+nr);Tt[Xt+2]=nr+Ye,Tt[Xt+6]=nr-Ye;var Wo=.382683433*((ge=Ae+ne)-(de=xe+Ge)),oi=.5411961*ge+Wo,ca=1.306562965*de+Wo,NA=.707106781*(fe=ne+xe),Ht=Ge+NA,Hn=Ge-NA;Tt[Xt+5]=Hn+oi,Tt[Xt+3]=Hn-oi,Tt[Xt+1]=Ht+ca,Tt[Xt+7]=Ht-ca,Xt+=8}for(Xt=0,Vt=0;Vt<8;++Vt){kt=Tt[Xt],qt=Tt[Xt+8],Wt=Tt[Xt+16],we=Tt[Xt+24],Ie=Tt[Xt+32],me=Tt[Xt+40],_e=Tt[Xt+48];var ha=kt+(Be=Tt[Xt+56]),hs=kt-Be,Kn=qt+_e,Hr=qt-_e,bi=Wt+me,Xi=Wt-me,qi=we+Ie,Vn=we-Ie,Qs=ha+qi,qs=ha-qi,Ns=Kn+bi,Gn=Kn-bi;Tt[Xt]=Qs+Ns,Tt[Xt+32]=Qs-Ns;var an=.707106781*(Gn+qs);Tt[Xt+16]=qs+an,Tt[Xt+48]=qs-an;var PA=.382683433*((Qs=Vn+Xi)-(Gn=Hr+hs)),Oi=.5411961*Qs+PA,Ja=1.306562965*Gn+PA,zo=.707106781*(Ns=Xi+Hr),bc=hs+zo,Xo=hs-zo;Tt[Xt+40]=Xo+Oi,Tt[Xt+24]=Xo-Oi,Tt[Xt+8]=bc+Ja,Tt[Xt+56]=bc-Ja,Xt++}for(Vt=0;Vt<64;++Vt)ce=Tt[Vt]*ie[Vt],f[Vt]=ce>0?ce+.5|0:ce-.5|0;return f}(M,$),St=0;St<64;++St)p[k[St]]=yt[St];var Mt=p[0]-q;q=p[0],Mt==0?it(tt[0]):(it(tt[d[ot=32767+Mt]]),it(u[ot]));for(var Pt=63;Pt>0&&p[Pt]==0;)Pt--;if(Pt==0)return it(dt),q;for(var jt,z=1;z<=Pt;){for(var Nt=z;p[z]==0&&z<=Pt;)++z;var ve=z-Nt;if(ve>=16){jt=ve>>4;for(var re=1;re<=jt;++re)it(wt);ve&=15}ot=32767+p[z],it(et[(ve<<4)+d[ot]]),it(u[ot]),z++}return Pt!=63&&it(dt),q}function mt(M){M=Math.min(Math.max(M,1),100),s!=M&&(function($){for(var q=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],tt=0;tt<64;tt++){var et=A((q[tt]*$+50)/100);et=Math.min(Math.max(et,1),255),a[k[tt]]=et}for(var ot=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],dt=0;dt<64;dt++){var wt=A((ot[dt]*$+50)/100);wt=Math.min(Math.max(wt,1),255),o[k[dt]]=wt}for(var yt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],St=0,Mt=0;Mt<8;Mt++)for(var Pt=0;Pt<8;Pt++)l[St]=1/(a[k[St]]*yt[Mt]*yt[Pt]*8),h[St]=1/(o[k[St]]*yt[Mt]*yt[Pt]*8),St++}(M<50?Math.floor(5e3/M):Math.floor(200-2*M)),s=M)}this.encode=function(M,$){$&&mt($),m=new Array,y=0,w=7,ut(65496),ut(65504),ut(16),At(74),At(70),At(73),At(70),At(0),At(1),At(1),At(0),ut(1),ut(1),At(0),At(0),function(){ut(65499),ut(132),At(0);for(var qt=0;qt<64;qt++)At(a[qt]);At(1);for(var Wt=0;Wt<64;Wt++)At(o[Wt])}(),function(qt,Wt){ut(65472),ut(17),At(8),ut(Wt),ut(qt),At(3),At(1),At(17),At(0),At(2),At(17),At(1),At(3),At(17),At(1)}(M.width,M.height),function(){ut(65476),ut(418),At(0);for(var qt=0;qt<16;qt++)At(H[qt+1]);for(var Wt=0;Wt<=11;Wt++)At(Q[Wt]);At(16);for(var we=0;we<16;we++)At(W[we+1]);for(var Ie=0;Ie<=161;Ie++)At(U[Ie]);At(1);for(var me=0;me<16;me++)At(D[me+1]);for(var _e=0;_e<=11;_e++)At(j[_e]);At(17);for(var Be=0;Be<16;Be++)At(V[Be+1]);for(var Vt=0;Vt<=161;Vt++)At(st[Vt])}(),ut(65498),ut(12),At(3),At(1),At(0),At(2),At(17),At(3),At(17),At(0),At(63),At(0);var q=0,tt=0,et=0;y=0,w=7,this.encode.displayName="_encode_";for(var ot,dt,wt,yt,St,Mt,Pt,jt,z,Nt=M.data,ve=M.width,re=M.height,Tt=4*ve,ie=0;ie<re;){for(ot=0;ot<Tt;){for(St=Tt*ie+ot,Pt=-1,jt=0,z=0;z<64;z++)Mt=St+(jt=z>>3)*Tt+(Pt=4*(7&z)),ie+jt>=re&&(Mt-=Tt*(ie+1+jt-re)),ot+Pt>=Tt&&(Mt-=ot+Pt-Tt+4),dt=Nt[Mt++],wt=Nt[Mt++],yt=Nt[Mt++],B[z]=(L[dt]+L[wt+256|0]+L[yt+512|0]>>16)-128,E[z]=(L[dt+768|0]+L[wt+1024|0]+L[yt+1280|0]>>16)-128,S[z]=(L[dt+1280|0]+L[wt+1536|0]+L[yt+1792|0]>>16)-128;q=vt(B,l,q,t,r),tt=vt(E,h,tt,e,i),et=vt(S,h,et,e,i),ot+=32}ie+=8}if(w>=0){var kt=[];kt[1]=w+1,kt[0]=(1<<w+1)-1,it(kt)}return ut(65497),new Uint8Array(m)},n=n||50,function(){for(var M=String.fromCharCode,$=0;$<256;$++)I[$]=M($)}(),t=rt(H,Q),e=rt(D,j),r=rt(W,U),i=rt(V,st),function(){for(var M=1,$=2,q=1;q<=15;q++){for(var tt=M;tt<$;tt++)d[32767+tt]=q,u[32767+tt]=[],u[32767+tt][1]=q,u[32767+tt][0]=tt;for(var et=-($-1);et<=-M;et++)d[32767+et]=q,u[32767+et]=[],u[32767+et][1]=q,u[32767+et][0]=$-1+et;M<<=1,$<<=1}}(),function(){for(var M=0;M<256;M++)L[M]=19595*M,L[M+256|0]=38470*M,L[M+512|0]=7471*M+32768,L[M+768|0]=-11059*M,L[M+1024|0]=-21709*M,L[M+1280|0]=32768*M+8421375,L[M+1536|0]=-27439*M,L[M+1792|0]=-5329*M}(),mt(n)}/**
|
|
151
|
+
* @license
|
|
152
|
+
* Copyright (c) 2017 Aras Abbasi
|
|
153
|
+
*
|
|
154
|
+
* Licensed under the MIT License.
|
|
155
|
+
* http://opensource.org/licenses/mit-license
|
|
156
|
+
*/function ma(n,t){if(this.pos=0,this.buffer=n,this.datav=new DataView(n.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function y_(n){function t(Q){if(!Q)throw Error("assert :P")}function e(Q,W,U){for(var D=0;4>D;D++)if(Q[W+D]!=U.charCodeAt(D))return!0;return!1}function r(Q,W,U,D,j){for(var V=0;V<j;V++)Q[W+V]=U[D+V]}function i(Q,W,U,D){for(var j=0;j<D;j++)Q[W+j]=U}function s(Q){return new Int32Array(Q)}function A(Q,W){for(var U=[],D=0;D<Q;D++)U.push(new W);return U}function a(Q,W){var U=[];return function D(j,V,st){for(var rt=st[V],it=0;it<rt&&(j.push(st.length>V+1?[]:new W),!(st.length<V+1));it++)D(j[it],V+1,st)}(U,0,Q),U}var o=function(){var Q=this;function W(g,v){for(var x=1<<v-1>>>0;g&x;)x>>>=1;return x?(g&x-1)+x:g}function U(g,v,x,F,P){t(!(F%x));do g[v+(F-=x)]=P;while(0<F)}function D(g,v,x,F,P){if(t(2328>=P),512>=P)var O=s(512);else if((O=s(P))==null)return 0;return function(R,K,G,Y,at,pt){var J,lt,ft=K,Bt=1<<G,gt=s(16),Ct=s(16);for(t(at!=0),t(Y!=null),t(R!=null),t(0<G),lt=0;lt<at;++lt){if(15<Y[lt])return 0;++gt[Y[lt]]}if(gt[0]==at)return 0;for(Ct[1]=0,J=1;15>J;++J){if(gt[J]>1<<J)return 0;Ct[J+1]=Ct[J]+gt[J]}for(lt=0;lt<at;++lt)J=Y[lt],0<Y[lt]&&(pt[Ct[J]++]=lt);if(Ct[15]==1)return(Y=new j).g=0,Y.value=pt[0],U(R,ft,1,Bt,Y),Bt;var Et,Ut=-1,It=Bt-1,he=0,Yt=1,De=1,ae=1<<G;for(lt=0,J=1,at=2;J<=G;++J,at<<=1){if(Yt+=De<<=1,0>(De-=gt[J]))return 0;for(;0<gt[J];--gt[J])(Y=new j).g=J,Y.value=pt[lt++],U(R,ft+he,at,ae,Y),he=W(he,J)}for(J=G+1,at=2;15>=J;++J,at<<=1){if(Yt+=De<<=1,0>(De-=gt[J]))return 0;for(;0<gt[J];--gt[J]){if(Y=new j,(he&It)!=Ut){for(ft+=ae,Et=1<<(Ut=J)-G;15>Ut&&!(0>=(Et-=gt[Ut]));)++Ut,Et<<=1;Bt+=ae=1<<(Et=Ut-G),R[K+(Ut=he&It)].g=Et+G,R[K+Ut].value=ft-K-Ut}Y.g=J-G,Y.value=pt[lt++],U(R,ft+(he>>G),at,ae,Y),he=W(he,J)}}return Yt!=2*Ct[15]-1?0:Bt}(g,v,x,F,P,O)}function j(){this.value=this.g=0}function V(){this.value=this.g=0}function st(){this.G=A(5,j),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=A(Rd,V)}function rt(g,v,x,F){t(g!=null),t(v!=null),t(2147483648>F),g.Ca=254,g.I=0,g.b=-8,g.Ka=0,g.oa=v,g.pa=x,g.Jd=v,g.Yc=x+F,g.Zc=4<=F?x+F-4+1:x,dt(g)}function it(g,v){for(var x=0;0<v--;)x|=yt(g,128)<<v;return x}function At(g,v){var x=it(g,v);return wt(g)?-x:x}function ut(g,v,x,F){var P,O=0;for(t(g!=null),t(v!=null),t(4294967288>F),g.Sb=F,g.Ra=0,g.u=0,g.h=0,4<F&&(F=4),P=0;P<F;++P)O+=v[x+P]<<8*P;g.Ra=O,g.bb=F,g.oa=v,g.pa=x}function vt(g){for(;8<=g.u&&g.bb<g.Sb;)g.Ra>>>=8,g.Ra+=g.oa[g.pa+g.bb]<<fs-8>>>0,++g.bb,g.u-=8;tt(g)&&(g.h=1,g.u=0)}function mt(g,v){if(t(0<=v),!g.h&&v<=K0){var x=q(g)&pu[v];return g.u+=v,vt(g),x}return g.h=1,g.u=0}function M(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function $(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function q(g){return g.Ra>>>(g.u&fs-1)>>>0}function tt(g){return t(g.bb<=g.Sb),g.h||g.bb==g.Sb&&g.u>fs}function et(g,v){g.u=v,g.h=tt(g)}function ot(g){g.u>=Ps&&(t(g.u>=Ps),vt(g))}function dt(g){t(g!=null&&g.oa!=null),g.pa<g.Zc?(g.I=(g.oa[g.pa++]|g.I<<8)>>>0,g.b+=8):(t(g!=null&&g.oa!=null),g.pa<g.Yc?(g.b+=8,g.I=g.oa[g.pa++]|g.I<<8):g.Ka?g.b=0:(g.I<<=8,g.b+=8,g.Ka=1))}function wt(g){return it(g,1)}function yt(g,v){var x=g.Ca;0>g.b&&dt(g);var F=g.b,P=x*v>>>8,O=(g.I>>>F>P)+0;for(O?(x-=P,g.I-=P+1<<F>>>0):x=P+1,F=x,P=0;256<=F;)P+=8,F>>=8;return F=7^P+Hd[F],g.b-=F,g.Ca=(x<<F)-1,O}function St(g,v,x){g[v+0]=x>>24&255,g[v+1]=x>>16&255,g[v+2]=x>>8&255,g[v+3]=255&x}function Mt(g,v){return g[v+0]|g[v+1]<<8}function Pt(g,v){return Mt(g,v)|g[v+2]<<16}function jt(g,v){return Mt(g,v)|Mt(g,v+2)<<16}function z(g,v){var x=1<<v;return t(g!=null),t(0<v),g.X=s(x),g.X==null?0:(g.Mb=32-v,g.Xa=v,1)}function Nt(g,v){t(g!=null),t(v!=null),t(g.Xa==v.Xa),r(v.X,0,g.X,0,1<<v.Xa)}function ve(){this.X=[],this.Xa=this.Mb=0}function re(g,v,x,F){t(x!=null),t(F!=null);var P=x[0],O=F[0];return P==0&&(P=(g*O+v/2)/v),O==0&&(O=(v*P+g/2)/g),0>=P||0>=O?0:(x[0]=P,F[0]=O,1)}function Tt(g,v){return g+(1<<v)-1>>>v}function ie(g,v){return((4278255360&g)+(4278255360&v)>>>0&4278255360)+((16711935&g)+(16711935&v)>>>0&16711935)>>>0}function kt(g,v){Q[v]=function(x,F,P,O,R,K,G){var Y;for(Y=0;Y<R;++Y){var at=Q[g](K[G+Y-1],P,O+Y);K[G+Y]=ie(x[F+Y],at)}}}function qt(){this.ud=this.hd=this.jd=0}function Wt(g,v){return((4278124286&(g^v))>>>1)+(g&v)>>>0}function we(g){return 0<=g&&256>g?g:0>g?0:255<g?255:void 0}function Ie(g,v){return we(g+(g-v+.5>>1))}function me(g,v,x){return Math.abs(v-x)-Math.abs(g-x)}function _e(g,v,x,F,P,O,R){for(F=O[R-1],x=0;x<P;++x)O[R+x]=F=ie(g[v+x],F)}function Be(g,v,x,F,P){var O;for(O=0;O<x;++O){var R=g[v+O],K=R>>8&255,G=16711935&(G=(G=16711935&R)+((K<<16)+K));F[P+O]=(4278255360&R)+G>>>0}}function Vt(g,v){v.jd=255&g,v.hd=g>>8&255,v.ud=g>>16&255}function ce(g,v,x,F,P,O){var R;for(R=0;R<F;++R){var K=v[x+R],G=K>>>8,Y=K,at=255&(at=(at=K>>>16)+((g.jd<<24>>24)*(G<<24>>24)>>>5));Y=255&(Y=(Y+=(g.hd<<24>>24)*(G<<24>>24)>>>5)+((g.ud<<24>>24)*(at<<24>>24)>>>5)),P[O+R]=(4278255360&K)+(at<<16)+Y}}function Xt(g,v,x,F,P){Q[v]=function(O,R,K,G,Y,at,pt,J,lt){for(G=pt;G<J;++G)for(pt=0;pt<lt;++pt)Y[at++]=P(K[F(O[R++])])},Q[g]=function(O,R,K,G,Y,at,pt){var J=8>>O.b,lt=O.Ea,ft=O.K[0],Bt=O.w;if(8>J)for(O=(1<<O.b)-1,Bt=(1<<J)-1;R<K;++R){var gt,Ct=0;for(gt=0;gt<lt;++gt)gt&O||(Ct=F(G[Y++])),at[pt++]=P(ft[Ct&Bt]),Ct>>=J}else Q["VP8LMapColor"+x](G,Y,ft,Bt,at,pt,R,K,lt)}}function fr(g,v,x,F,P){for(x=v+x;v<x;){var O=g[v++];F[P++]=O>>16&255,F[P++]=O>>8&255,F[P++]=255&O}}function Ge(g,v,x,F,P){for(x=v+x;v<x;){var O=g[v++];F[P++]=O>>16&255,F[P++]=O>>8&255,F[P++]=255&O,F[P++]=O>>24&255}}function Ce(g,v,x,F,P){for(x=v+x;v<x;){var O=(R=g[v++])>>16&240|R>>12&15,R=240&R|R>>28&15;F[P++]=O,F[P++]=R}}function xe(g,v,x,F,P){for(x=v+x;v<x;){var O=(R=g[v++])>>16&248|R>>13&7,R=R>>5&224|R>>3&31;F[P++]=O,F[P++]=R}}function tr(g,v,x,F,P){for(x=v+x;v<x;){var O=g[v++];F[P++]=255&O,F[P++]=O>>8&255,F[P++]=O>>16&255}}function ne(g,v,x,F,P,O){if(O==0)for(x=v+x;v<x;)St(F,((O=g[v++])[0]>>24|O[1]>>8&65280|O[2]<<8&16711680|O[3]<<24)>>>0),P+=32;else r(F,P,g,v,x)}function ke(g,v){Q[v][0]=Q[g+"0"],Q[v][1]=Q[g+"1"],Q[v][2]=Q[g+"2"],Q[v][3]=Q[g+"3"],Q[v][4]=Q[g+"4"],Q[v][5]=Q[g+"5"],Q[v][6]=Q[g+"6"],Q[v][7]=Q[g+"7"],Q[v][8]=Q[g+"8"],Q[v][9]=Q[g+"9"],Q[v][10]=Q[g+"10"],Q[v][11]=Q[g+"11"],Q[v][12]=Q[g+"12"],Q[v][13]=Q[g+"13"],Q[v][14]=Q[g+"0"],Q[v][15]=Q[g+"0"]}function Ae(g){return g==$C||g==WC||g==e2||g==zC}function ge(){this.eb=[],this.size=this.A=this.fb=0}function nr(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function fe(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ge,this.f.kb=new nr,this.sd=null}function de(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ye(){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 Wo(g){return alert("todo:WebPSamplerProcessPlane"),g.T}function oi(g,v){var x=g.T,F=v.ba.f.RGBA,P=F.eb,O=F.fb+g.ka*F.A,R=OA[v.ba.S],K=g.y,G=g.O,Y=g.f,at=g.N,pt=g.ea,J=g.W,lt=v.cc,ft=v.dc,Bt=v.Mc,gt=v.Nc,Ct=g.ka,Et=g.ka+g.T,Ut=g.U,It=Ut+1>>1;for(Ct==0?R(K,G,null,null,Y,at,pt,J,Y,at,pt,J,P,O,null,null,Ut):(R(v.ec,v.fc,K,G,lt,ft,Bt,gt,Y,at,pt,J,P,O-F.A,P,O,Ut),++x);Ct+2<Et;Ct+=2)lt=Y,ft=at,Bt=pt,gt=J,at+=g.Rc,J+=g.Rc,O+=2*F.A,R(K,(G+=2*g.fa)-g.fa,K,G,lt,ft,Bt,gt,Y,at,pt,J,P,O-F.A,P,O,Ut);return G+=g.fa,g.j+Et<g.o?(r(v.ec,v.fc,K,G,Ut),r(v.cc,v.dc,Y,at,It),r(v.Mc,v.Nc,pt,J,It),x--):1&Et||R(K,G,null,null,Y,at,pt,J,Y,at,pt,J,P,O+F.A,null,null,Ut),x}function ca(g,v,x){var F=g.F,P=[g.J];if(F!=null){var O=g.U,R=v.ba.S,K=R==t2||R==e2;v=v.ba.f.RGBA;var G=[0],Y=g.ka;G[0]=g.T,g.Kb&&(Y==0?--G[0]:(--Y,P[0]-=g.width),g.j+g.ka+g.T==g.o&&(G[0]=g.o-g.j-Y));var at=v.eb;Y=v.fb+Y*v.A,g=LT(F,P[0],g.width,O,G,at,Y+(K?0:3),v.A),t(x==G),g&&Ae(R)&&$0(at,Y,K,O,G,v.A)}return 0}function NA(g){var v=g.ma,x=v.ba.S,F=11>x,P=x==Jw||x==Zw||x==t2||x==jC||x==12||Ae(x);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!MA(v.Oa,g,P?11:12))return 0;if(P&&Ae(x)&&el(),g.da)alert("todo:use_scaling");else{if(F){if(v.Ib=Wo,g.Kb){if(x=g.U+1>>1,v.memory=s(g.U+2*x),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+g.U,v.Mc=v.cc,v.Nc=v.dc+x,v.Ib=oi,el()}}else alert("todo:EmitYUV");P&&(v.Jb=ca,F&&ri())}if(F&&!zT){for(g=0;256>g;++g)p6[g]=89858*(g-128)+i2>>r2,w6[g]=-22014*(g-128)+i2,v6[g]=-45773*(g-128),m6[g]=113618*(g-128)+i2>>r2;for(g=z0;g<YC;++g)v=76283*(g-16)+i2>>r2,y6[g-z0]=Bi(v,255),b6[g-z0]=Bi(v+8>>4,15);zT=1}return 1}function Ht(g){var v=g.ma,x=g.U,F=g.T;return t(!(1&g.ka)),0>=x||0>=F?0:(x=v.Ib(g,v),v.Jb!=null&&v.Jb(g,v,x),v.Dc+=x,1)}function Hn(g){g.ma.memory=null}function ha(g,v,x,F){return mt(g,8)!=47?0:(v[0]=mt(g,14)+1,x[0]=mt(g,14)+1,F[0]=mt(g,1),mt(g,3)!=0?0:!g.h)}function hs(g,v){if(4>g)return g+1;var x=g-2>>1;return(2+(1&g)<<x)+mt(v,x)+1}function Kn(g,v){return 120<v?v-120:1<=(x=((x=r6[v-1])>>4)*g+(8-(15&x)))?x:1;var x}function Hr(g,v,x){var F=q(x),P=g[v+=255&F].g-8;return 0<P&&(et(x,x.u+8),F=q(x),v+=g[v].value,v+=F&(1<<P)-1),et(x,x.u+g[v].g),g[v].value}function bi(g,v,x){return x.g+=g.g,x.value+=g.value<<v>>>0,t(8>=x.g),g.g}function Xi(g,v,x){var F=g.xc;return t((v=F==0?0:g.vc[g.md*(x>>F)+(v>>F)])<g.Wb),g.Ya[v]}function qi(g,v,x,F){var P=g.ab,O=g.c*v,R=g.C;v=R+v;var K=x,G=F;for(F=g.Ta,x=g.Ua;0<P--;){var Y=g.gc[P],at=R,pt=v,J=K,lt=G,ft=(G=F,K=x,Y.Ea);switch(t(at<pt),t(pt<=Y.nc),Y.hc){case 2:Kd(J,lt,(pt-at)*ft,G,K);break;case 0:var Bt=at,gt=pt,Ct=G,Et=K,Ut=(ae=Y).Ea;Bt==0&&(Sc(J,lt,null,null,1,Ct,Et),_e(J,lt+1,0,0,Ut-1,Ct,Et+1),lt+=Ut,Et+=Ut,++Bt);for(var It=1<<ae.b,he=It-1,Yt=Tt(Ut,ae.b),De=ae.K,ae=ae.w+(Bt>>ae.b)*Yt;Bt<gt;){var qe=De,Ji=ae,Re=1;for(Fc(J,lt,Ct,Et-Ut,1,Ct,Et);Re<Ut;){var oe=(Re&~he)+It;oe>Ut&&(oe=Ut),(0,fa[qe[Ji++]>>8&15])(J,lt+ +Re,Ct,Et+Re-Ut,oe-Re,Ct,Et+Re),Re=oe}lt+=Ut,Et+=Ut,++Bt&he||(ae+=Yt)}pt!=Y.nc&&r(G,K-ft,G,K+(pt-at-1)*ft,ft);break;case 1:for(ft=J,gt=lt,Ut=(J=Y.Ea)-(Et=J&~(Ct=(lt=1<<Y.b)-1)),Bt=Tt(J,Y.b),It=Y.K,Y=Y.w+(at>>Y.b)*Bt;at<pt;){for(he=It,Yt=Y,De=new qt,ae=gt+Et,qe=gt+J;gt<ae;)Vt(he[Yt++],De),vu(De,ft,gt,lt,G,K),gt+=lt,K+=lt;gt<qe&&(Vt(he[Yt++],De),vu(De,ft,gt,Ut,G,K),gt+=Ut,K+=Ut),++at&Ct||(Y+=Bt)}break;case 3:if(J==G&<==K&&0<Y.b){for(gt=G,J=ft=K+(pt-at)*ft-(Et=(pt-at)*Tt(Y.Ea,Y.b)),lt=G,Ct=K,Bt=[],Et=(Ut=Et)-1;0<=Et;--Et)Bt[Et]=lt[Ct+Et];for(Et=Ut-1;0<=Et;--Et)gt[J+Et]=Bt[Et];mu(Y,at,pt,G,ft,G,K)}else mu(Y,at,pt,J,lt,G,K)}K=F,G=x}G!=x&&r(F,x,K,G,O)}function Vn(g,v){var x=g.V,F=g.Ba+g.c*g.C,P=v-g.C;if(t(v<=g.l.o),t(16>=P),0<P){var O=g.l,R=g.Ta,K=g.Ua,G=O.width;if(qi(g,P,x,F),P=K=[K],t((x=g.C)<(F=v)),t(O.v<O.va),F>O.o&&(F=O.o),x<O.j){var Y=O.j-x;x=O.j,P[0]+=Y*G}if(x>=F?x=0:(P[0]+=4*O.v,O.ka=x-O.j,O.U=O.va-O.v,O.T=F-x,x=1),x){if(K=K[0],11>(x=g.ca).S){var at=x.f.RGBA,pt=(F=x.S,P=O.U,O=O.T,Y=at.eb,at.A),J=O;for(at=at.fb+g.Ma*at.A;0<J--;){var lt=R,ft=K,Bt=P,gt=Y,Ct=at;switch(F){case Yw:V0(lt,ft,Bt,gt,Ct);break;case Jw:G0(lt,ft,Bt,gt,Ct);break;case $C:G0(lt,ft,Bt,gt,Ct),$0(gt,Ct,0,Bt,1,0);break;case DT:yu(lt,ft,Bt,gt,Ct);break;case Zw:ne(lt,ft,Bt,gt,Ct,1);break;case WC:ne(lt,ft,Bt,gt,Ct,1),$0(gt,Ct,0,Bt,1,0);break;case t2:ne(lt,ft,Bt,gt,Ct,0);break;case e2:ne(lt,ft,Bt,gt,Ct,0),$0(gt,Ct,1,Bt,1,0);break;case jC:Vd(lt,ft,Bt,gt,Ct);break;case zC:Vd(lt,ft,Bt,gt,Ct),UT(gt,Ct,Bt,1,0);break;case RT:wu(lt,ft,Bt,gt,Ct);break;default:t(0)}K+=G,at+=pt}g.Ma+=O}else alert("todo:EmitRescaledRowsYUVA");t(g.Ma<=x.height)}}g.C=v,t(g.C<=g.i)}function Qs(g){var v;if(0<g.ua)return 0;for(v=0;v<g.Wb;++v){var x=g.Ya[v].G,F=g.Ya[v].H;if(0<x[1][F[1]+0].g||0<x[2][F[2]+0].g||0<x[3][F[3]+0].g)return 0}return 1}function qs(g,v,x,F,P,O){if(g.Z!=0){var R=g.qd,K=g.rd;for(t(Uc[g.Z]!=null);v<x;++v)Uc[g.Z](R,K,F,P,F,P,O),R=F,K=P,P+=O;g.qd=R,g.rd=K}}function Ns(g,v){var x=g.l.ma,F=x.Z==0||x.Z==1?g.l.j:g.C;if(F=g.C<F?F:g.C,t(v<=g.l.o),v>F){var P=g.l.width,O=x.ca,R=x.tb+P*F,K=g.V,G=g.Ba+g.c*F,Y=g.gc;t(g.ab==1),t(Y[0].hc==3),VC(Y[0],F,v,K,G,O,R),qs(x,F,v,O,R,P)}g.C=g.Ma=v}function Gn(g,v,x,F,P,O,R){var K=g.$/F,G=g.$%F,Y=g.m,at=g.s,pt=x+g.$,J=pt;P=x+F*P;var lt=x+F*O,ft=280+at.ua,Bt=g.Pb?K:16777216,gt=0<at.ua?at.Wa:null,Ct=at.wc,Et=pt<lt?Xi(at,G,K):null;t(g.C<O),t(lt<=P);var Ut=!1;t:for(;;){for(;Ut||pt<lt;){var It=0;if(K>=Bt){var he=pt-x;t((Bt=g).Pb),Bt.wd=Bt.m,Bt.xd=he,0<Bt.s.ua&&Nt(Bt.s.Wa,Bt.s.vb),Bt=K+n6}if(G&Ct||(Et=Xi(at,G,K)),t(Et!=null),Et.Qb&&(v[pt]=Et.qb,Ut=!0),!Ut)if(ot(Y),Et.jc){It=Y,he=v;var Yt=pt,De=Et.pd[q(It)&Rd-1];t(Et.jc),256>De.g?(et(It,It.u+De.g),he[Yt]=De.value,It=0):(et(It,It.u+De.g-256),t(256<=De.value),It=De.value),It==0&&(Ut=!0)}else It=Hr(Et.G[0],Et.H[0],Y);if(Y.h)break;if(Ut||256>It){if(!Ut)if(Et.nd)v[pt]=(Et.qb|It<<8)>>>0;else{if(ot(Y),Ut=Hr(Et.G[1],Et.H[1],Y),ot(Y),he=Hr(Et.G[2],Et.H[2],Y),Yt=Hr(Et.G[3],Et.H[3],Y),Y.h)break;v[pt]=(Yt<<24|Ut<<16|It<<8|he)>>>0}if(Ut=!1,++pt,++G>=F&&(G=0,++K,R!=null&&K<=O&&!(K%16)&&R(g,K),gt!=null))for(;J<pt;)It=v[J++],gt.X[(506832829*It&4294967295)>>>gt.Mb]=It}else if(280>It){if(It=hs(It-256,Y),he=Hr(Et.G[4],Et.H[4],Y),ot(Y),he=Kn(F,he=hs(he,Y)),Y.h)break;if(pt-x<he||P-pt<It)break t;for(Yt=0;Yt<It;++Yt)v[pt+Yt]=v[pt+Yt-he];for(pt+=It,G+=It;G>=F;)G-=F,++K,R!=null&&K<=O&&!(K%16)&&R(g,K);if(t(pt<=P),G&Ct&&(Et=Xi(at,G,K)),gt!=null)for(;J<pt;)It=v[J++],gt.X[(506832829*It&4294967295)>>>gt.Mb]=It}else{if(!(It<ft))break t;for(Ut=It-280,t(gt!=null);J<pt;)It=v[J++],gt.X[(506832829*It&4294967295)>>>gt.Mb]=It;It=pt,t(!(Ut>>>(he=gt).Xa)),v[It]=he.X[Ut],Ut=!0}Ut||t(Y.h==tt(Y))}if(g.Pb&&Y.h&&pt<P)t(g.m.h),g.a=5,g.m=g.wd,g.$=g.xd,0<g.s.ua&&Nt(g.s.vb,g.s.Wa);else{if(Y.h)break t;R!=null&&R(g,K>O?O:K),g.a=0,g.$=pt-x}return 1}return g.a=3,0}function an(g){t(g!=null),g.vc=null,g.yc=null,g.Ya=null;var v=g.Wa;v!=null&&(v.X=null),g.vb=null,t(g!=null)}function PA(){var g=new se;return g==null?null:(g.a=0,g.xb=VT,ke("Predictor","VP8LPredictors"),ke("Predictor","VP8LPredictors_C"),ke("PredictorAdd","VP8LPredictorsAdd"),ke("PredictorAdd","VP8LPredictorsAdd_C"),Kd=Be,vu=ce,V0=fr,G0=Ge,Vd=Ce,wu=xe,yu=tr,Q.VP8LMapColor32b=Ri,Q.VP8LMapColor8b=io,g)}function Oi(g,v,x,F,P){var O=1,R=[g],K=[v],G=F.m,Y=F.s,at=null,pt=0;t:for(;;){if(x)for(;O&&mt(G,1);){var J=R,lt=K,ft=F,Bt=1,gt=ft.m,Ct=ft.gc[ft.ab],Et=mt(gt,2);if(ft.Oc&1<<Et)O=0;else{switch(ft.Oc|=1<<Et,Ct.hc=Et,Ct.Ea=J[0],Ct.nc=lt[0],Ct.K=[null],++ft.ab,t(4>=ft.ab),Et){case 0:case 1:Ct.b=mt(gt,3)+2,Bt=Oi(Tt(Ct.Ea,Ct.b),Tt(Ct.nc,Ct.b),0,ft,Ct.K),Ct.K=Ct.K[0];break;case 3:var Ut,It=mt(gt,8)+1,he=16<It?0:4<It?1:2<It?2:3;if(J[0]=Tt(Ct.Ea,he),Ct.b=he,Ut=Bt=Oi(It,1,0,ft,Ct.K)){var Yt,De=It,ae=Ct,qe=1<<(8>>ae.b),Ji=s(qe);if(Ji==null)Ut=0;else{var Re=ae.K[0],oe=ae.w;for(Ji[0]=ae.K[0][0],Yt=1;Yt<1*De;++Yt)Ji[Yt]=ie(Re[oe+Yt],Ji[Yt-1]);for(;Yt<4*qe;++Yt)Ji[Yt]=0;ae.K[0]=null,ae.K[0]=Ji,Ut=1}}Bt=Ut;break;case 2:break;default:t(0)}O=Bt}}if(R=R[0],K=K[0],O&&mt(G,1)&&!(O=1<=(pt=mt(G,4))&&11>=pt)){F.a=3;break t}var Ot;if(Ot=O)e:{var xi,Le,Ze,Vr=F,Cn=R,ds=K,li=pt,zn=x,gs=Vr.m,Zi=Vr.s,er=[null],dr=1,ci=0,gr=i6[li];r:for(;;){if(zn&&mt(gs,1)){var xn=mt(gs,3)+2,ga=Tt(Cn,xn),Ei=Tt(ds,xn),Ms=ga*Ei;if(!Oi(ga,Ei,0,Vr,er))break r;for(er=er[0],Zi.xc=xn,xi=0;xi<Ms;++xi){var Ir=er[xi]>>8&65535;er[xi]=Ir,Ir>=dr&&(dr=Ir+1)}}if(gs.h)break r;for(Le=0;5>Le;++Le){var tn=HT[Le];!Le&&0<li&&(tn+=1<<li),ci<tn&&(ci=tn)}var tA=A(dr*gr,j),ps=dr,eA=A(ps,st);if(eA==null)var rA=null;else t(65536>=ps),rA=eA;var ks=s(ci);if(rA==null||ks==null||tA==null){Vr.a=1;break r}var iA=tA;for(xi=Ze=0;xi<dr;++xi){var Mr=rA[xi],nA=Mr.G,pa=Mr.H,bu=0,sl=1,En=0;for(Le=0;5>Le;++Le){tn=HT[Le],nA[Le]=iA,pa[Le]=Ze,!Le&&0<li&&(tn+=1<<li);n:{var s2,JC=tn,A2=Vr,X0=ks,x6=iA,E6=Ze,ZC=0,Lc=A2.m,S6=mt(Lc,1);if(i(X0,0,0,JC),S6){var F6=mt(Lc,1)+1,T6=mt(Lc,1),YT=mt(Lc,T6==0?1:8);X0[YT]=1,F6==2&&(X0[YT=mt(Lc,8)]=1);var a2=1}else{var JT=s(19),ZT=mt(Lc,4)+4;if(19<ZT){A2.a=3;var o2=0;break n}for(s2=0;s2<ZT;++s2)JT[e6[s2]]=mt(Lc,3);var t5=void 0,q0=void 0,tI=A2,I6=JT,l2=JC,eI=X0,e5=0,Qc=tI.m,rI=8,iI=A(128,j);i:for(;D(iI,0,7,I6,19);){if(mt(Qc,1)){var _6=2+2*mt(Qc,3);if((t5=2+mt(Qc,_6))>l2)break i}else t5=l2;for(q0=0;q0<l2&&t5--;){ot(Qc);var nI=iI[0+(127&q(Qc))];et(Qc,Qc.u+nI.g);var $d=nI.value;if(16>$d)eI[q0++]=$d,$d!=0&&(rI=$d);else{var U6=$d==16,sI=$d-16,L6=ZR[sI],AI=mt(Qc,JR[sI])+L6;if(q0+AI>l2)break i;for(var Q6=U6?rI:0;0<AI--;)eI[q0++]=Q6}}e5=1;break i}e5||(tI.a=3),a2=e5}(a2=a2&&!Lc.h)&&(ZC=D(x6,E6,8,X0,JC)),a2&&ZC!=0?o2=ZC:(A2.a=3,o2=0)}if(o2==0)break r;if(sl&&t6[Le]==1&&(sl=iA[Ze].g==0),bu+=iA[Ze].g,Ze+=o2,3>=Le){var Y0,r5=ks[0];for(Y0=1;Y0<tn;++Y0)ks[Y0]>r5&&(r5=ks[Y0]);En+=r5}}if(Mr.nd=sl,Mr.Qb=0,sl&&(Mr.qb=(nA[3][pa[3]+0].value<<24|nA[1][pa[1]+0].value<<16|nA[2][pa[2]+0].value)>>>0,bu==0&&256>nA[0][pa[0]+0].value&&(Mr.Qb=1,Mr.qb+=nA[0][pa[0]+0].value<<8)),Mr.jc=!Mr.Qb&&6>En,Mr.jc){var c2,Al=Mr;for(c2=0;c2<Rd;++c2){var Nc=c2,Pc=Al.pd[Nc],h2=Al.G[0][Al.H[0]+Nc];256<=h2.value?(Pc.g=h2.g+256,Pc.value=h2.value):(Pc.g=0,Pc.value=0,Nc>>=bi(h2,8,Pc),Nc>>=bi(Al.G[1][Al.H[1]+Nc],16,Pc),Nc>>=bi(Al.G[2][Al.H[2]+Nc],0,Pc),bi(Al.G[3][Al.H[3]+Nc],24,Pc))}}}Zi.vc=er,Zi.Wb=dr,Zi.Ya=rA,Zi.yc=tA,Ot=1;break e}Ot=0}if(!(O=Ot)){F.a=3;break t}if(0<pt){if(Y.ua=1<<pt,!z(Y.Wa,pt)){F.a=1,O=0;break t}}else Y.ua=0;var i5=F,aI=R,N6=K,n5=i5.s,s5=n5.xc;if(i5.c=aI,i5.i=N6,n5.md=Tt(aI,s5),n5.wc=s5==0?-1:(1<<s5)-1,x){F.xb=h6;break t}if((at=s(R*K))==null){F.a=1,O=0;break t}O=(O=Gn(F,at,0,R,K,K,null))&&!G.h;break t}return O?(P!=null?P[0]=at:(t(at==null),t(x)),F.$=0,x||an(Y)):an(Y),O}function Ja(g,v){var x=g.c*g.i,F=x+v+16*v;return t(g.c<=v),g.V=s(F),g.V==null?(g.Ta=null,g.Ua=0,g.a=1,0):(g.Ta=g.V,g.Ua=g.Ba+x+v,1)}function zo(g,v){var x=g.C,F=v-x,P=g.V,O=g.Ba+g.c*x;for(t(v<=g.l.o);0<F;){var R=16<F?16:F,K=g.l.ma,G=g.l.width,Y=G*R,at=K.ca,pt=K.tb+G*x,J=g.Ta,lt=g.Ua;qi(g,R,P,O),QT(J,lt,at,pt,Y),qs(K,x,x+R,at,pt,G),F-=R,P+=R*g.c,x+=R}t(x==v),g.C=g.Ma=v}function bc(){this.ub=this.yd=this.td=this.Rb=0}function Xo(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Td(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Za(){this.Yb=function(){var g=[];return function v(x,F,P){for(var O=P[F],R=0;R<O&&(x.push(P.length>F+1?[]:0),!(P.length<F+1));R++)v(x[R],F+1,P)}(g,0,[3,11]),g}()}function ua(){this.jb=s(3),this.Wc=a([4,8],Za),this.Xc=a([4,17],Za)}function Jt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Z(){this.ld=this.La=this.dd=this.tc=0}function xt(){this.Na=this.la=0}function Rt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function We(){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 Oe(){this.uc=this.M=this.Nb=0,this.wa=Array(new Z),this.Y=0,this.ya=Array(new We),this.aa=0,this.l=new on}function ar(){this.y=s(16),this.f=s(8),this.ea=s(8)}function bn(){this.cb=this.a=0,this.sc="",this.m=new M,this.Od=new bc,this.Kc=new Xo,this.ed=new Jt,this.Qa=new Td,this.Ic=this.$c=this.Aa=0,this.D=new Oe,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=A(8,M),this.ia=0,this.pb=A(4,Rt),this.Pa=new ua,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ar),this.Hd=0,this.rb=Array(new xt),this.sb=0,this.wa=Array(new Z),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new We),this.L=this.aa=0,this.gd=a([4,2],Z),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Bi(g,v){return 0>g?0:g>v?v:g}function on(){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 su(){var g=new bn;return g!=null&&(g.a=0,g.sc="OK",g.cb=0,g.Xb=0,W0||(W0=Id)),g}function je(g,v,x){return g.a==0&&(g.a=v,g.sc=x,g.cb=0),0}function Au(g,v,x){return 3<=x&&g[v+0]==157&&g[v+1]==1&&g[v+2]==42}function Ys(g,v){if(g==null)return 0;if(g.a=0,g.sc="OK",v==null)return je(g,2,"null VP8Io passed to VP8GetHeaders()");var x=v.data,F=v.w,P=v.ha;if(4>P)return je(g,7,"Truncated header.");var O=x[F+0]|x[F+1]<<8|x[F+2]<<16,R=g.Od;if(R.Rb=!(1&O),R.td=O>>1&7,R.yd=O>>4&1,R.ub=O>>5,3<R.td)return je(g,3,"Incorrect keyframe parameters.");if(!R.yd)return je(g,4,"Frame not displayable.");F+=3,P-=3;var K=g.Kc;if(R.Rb){if(7>P)return je(g,7,"cannot parse picture header");if(!Au(x,F,P))return je(g,3,"Bad code word");K.c=16383&(x[F+4]<<8|x[F+3]),K.Td=x[F+4]>>6,K.i=16383&(x[F+6]<<8|x[F+5]),K.Ud=x[F+6]>>6,F+=7,P-=7,g.za=K.c+15>>4,g.Ub=K.i+15>>4,v.width=K.c,v.height=K.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,i((O=g.Pa).jb,0,255,O.jb.length),t((O=g.Qa)!=null),O.Cb=0,O.Bb=0,O.Fb=1,i(O.Zb,0,0,O.Zb.length),i(O.Lb,0,0,O.Lb)}if(R.ub>P)return je(g,7,"bad partition length");rt(O=g.m,x,F,R.ub),F+=R.ub,P-=R.ub,R.Rb&&(K.Ld=wt(O),K.Kd=wt(O)),K=g.Qa;var G,Y=g.Pa;if(t(O!=null),t(K!=null),K.Cb=wt(O),K.Cb){if(K.Bb=wt(O),wt(O)){for(K.Fb=wt(O),G=0;4>G;++G)K.Zb[G]=wt(O)?At(O,7):0;for(G=0;4>G;++G)K.Lb[G]=wt(O)?At(O,6):0}if(K.Bb)for(G=0;3>G;++G)Y.jb[G]=wt(O)?it(O,8):255}else K.Bb=0;if(O.Ka)return je(g,3,"cannot parse segment header");if((K=g.ed).zd=wt(O),K.Tb=it(O,6),K.wb=it(O,3),K.Pc=wt(O),K.Pc&&wt(O)){for(Y=0;4>Y;++Y)wt(O)&&(K.vd[Y]=At(O,6));for(Y=0;4>Y;++Y)wt(O)&&(K.od[Y]=At(O,6))}if(g.L=K.Tb==0?0:K.zd?1:2,O.Ka)return je(g,3,"cannot parse filter header");var at=P;if(P=G=F,F=G+at,K=at,g.Xb=(1<<it(g.m,2))-1,at<3*(Y=g.Xb))x=7;else{for(G+=3*Y,K-=3*Y,at=0;at<Y;++at){var pt=x[P+0]|x[P+1]<<8|x[P+2]<<16;pt>K&&(pt=K),rt(g.Jc[+at],x,G,pt),G+=pt,K-=pt,P+=3}rt(g.Jc[+Y],x,G,K),x=G<F?0:5}if(x!=0)return je(g,x,"cannot parse partitions");for(x=it(G=g.m,7),P=wt(G)?At(G,4):0,F=wt(G)?At(G,4):0,K=wt(G)?At(G,4):0,Y=wt(G)?At(G,4):0,G=wt(G)?At(G,4):0,at=g.Qa,pt=0;4>pt;++pt){if(at.Cb){var J=at.Zb[pt];at.Fb||(J+=x)}else{if(0<pt){g.pb[pt]=g.pb[0];continue}J=x}var lt=g.pb[pt];lt.Sc[0]=XC[Bi(J+P,127)],lt.Sc[1]=qC[Bi(J+0,127)],lt.Eb[0]=2*XC[Bi(J+F,127)],lt.Eb[1]=101581*qC[Bi(J+K,127)]>>16,8>lt.Eb[1]&&(lt.Eb[1]=8),lt.Qc[0]=XC[Bi(J+Y,117)],lt.Qc[1]=qC[Bi(J+G,127)],lt.lc=J+G}if(!R.Rb)return je(g,4,"Not a key frame.");for(wt(O),R=g.Pa,x=0;4>x;++x){for(P=0;8>P;++P)for(F=0;3>F;++F)for(K=0;11>K;++K)Y=yt(O,l6[x][P][F][K])?it(O,8):a6[x][P][F][K],R.Wc[x][P].Yb[F][K]=Y;for(P=0;17>P;++P)R.Xc[x][P]=R.Wc[x][c6[P]]}return g.kc=wt(O),g.kc&&(g.Bd=it(O,8)),g.cb=1}function Id(g,v,x,F,P,O,R){var K=v[P].Yb[x];for(x=0;16>P;++P){if(!yt(g,K[x+0]))return P;for(;!yt(g,K[x+1]);)if(K=v[++P].Yb[0],x=0,P==16)return 16;var G=v[P+1].Yb;if(yt(g,K[x+2])){var Y=g,at=0;if(yt(Y,(J=K)[(pt=x)+3]))if(yt(Y,J[pt+6])){for(K=0,pt=2*(at=yt(Y,J[pt+8]))+(J=yt(Y,J[pt+9+at])),at=0,J=s6[pt];J[K];++K)at+=at+yt(Y,J[K]);at+=3+(8<<pt)}else yt(Y,J[pt+7])?(at=7+2*yt(Y,165),at+=yt(Y,145)):at=5+yt(Y,159);else at=yt(Y,J[pt+4])?3+yt(Y,J[pt+5]):2;K=G[2]}else at=1,K=G[1];G=R+A6[P],0>(Y=g).b&&dt(Y);var pt,J=Y.b,lt=(pt=Y.Ca>>1)-(Y.I>>J)>>31;--Y.b,Y.Ca+=lt,Y.Ca|=1,Y.I-=(pt+1<)<<J,O[G]=((at^lt)-lt)*F[(0<P)+0]}return 16}function L0(g){var v=g.rb[g.sb-1];v.la=0,v.Na=0,i(g.zc,0,0,g.zc.length),g.ja=0}function Js(g,v,x,F,P){P=g[v+x+32*F]+(P>>3),g[v+x+32*F]=-256&P?0>P?0:255:P}function _d(g,v,x,F,P,O){Js(g,v,0,x,F+P),Js(g,v,1,x,F+O),Js(g,v,2,x,F-O),Js(g,v,3,x,F-P)}function qo(g){return(20091*g>>16)+g}function Bn(g,v,x,F){var P,O=0,R=s(16);for(P=0;4>P;++P){var K=g[v+0]+g[v+8],G=g[v+0]-g[v+8],Y=(35468*g[v+4]>>16)-qo(g[v+12]),at=qo(g[v+4])+(35468*g[v+12]>>16);R[O+0]=K+at,R[O+1]=G+Y,R[O+2]=G-Y,R[O+3]=K-at,O+=4,v++}for(P=O=0;4>P;++P)K=(g=R[O+0]+4)+R[O+8],G=g-R[O+8],Y=(35468*R[O+4]>>16)-qo(R[O+12]),Js(x,F,0,0,K+(at=qo(R[O+4])+(35468*R[O+12]>>16))),Js(x,F,1,0,G+Y),Js(x,F,2,0,G-Y),Js(x,F,3,0,K-at),O++,F+=32}function Dw(g,v,x,F){var P=g[v+0]+4,O=35468*g[v+4]>>16,R=qo(g[v+4]),K=35468*g[v+1]>>16;_d(x,F,0,P+R,g=qo(g[v+1]),K),_d(x,F,1,P+O,g,K),_d(x,F,2,P-O,g,K),_d(x,F,3,P-R,g,K)}function FC(g,v,x,F,P){Bn(g,v,x,F),P&&Bn(g,v+16,x,F+4)}function TC(g,v,x,F){rl(g,v+0,x,F,1),rl(g,v+32,x,F+128,1)}function IC(g,v,x,F){var P;for(g=g[v+0]+4,P=0;4>P;++P)for(v=0;4>v;++v)Js(x,F,v,P,g)}function to(g,v,x,F){g[v+0]&&Wn(g,v+0,x,F),g[v+16]&&Wn(g,v+16,x,F+4),g[v+32]&&Wn(g,v+32,x,F+128),g[v+48]&&Wn(g,v+48,x,F+128+4)}function Rw(g,v,x,F){var P,O=s(16);for(P=0;4>P;++P){var R=g[v+0+P]+g[v+12+P],K=g[v+4+P]+g[v+8+P],G=g[v+4+P]-g[v+8+P],Y=g[v+0+P]-g[v+12+P];O[0+P]=R+K,O[8+P]=R-K,O[4+P]=Y+G,O[12+P]=Y-G}for(P=0;4>P;++P)R=(g=O[0+4*P]+3)+O[3+4*P],K=O[1+4*P]+O[2+4*P],G=O[1+4*P]-O[2+4*P],Y=g-O[3+4*P],x[F+0]=R+K>>3,x[F+16]=Y+G>>3,x[F+32]=R-K>>3,x[F+48]=Y-G>>3,F+=64}function Ud(g,v,x){var F,P=v-32,O=Zs,R=255-g[P-1];for(F=0;F<x;++F){var K,G=O,Y=R+g[v-1];for(K=0;K<x;++K)g[v+K]=G[Y+g[P+K]];v+=32}}function Ld(g,v){Ud(g,v,4)}function Q0(g,v){Ud(g,v,8)}function _C(g,v){Ud(g,v,16)}function UC(g,v){var x;for(x=0;16>x;++x)r(g,v+32*x,g,v-32,16)}function LC(g,v){var x;for(x=16;0<x;--x)i(g,v,g[v-1],16),v+=32}function Bc(g,v,x){var F;for(F=0;16>F;++F)i(v,x+32*F,g,16)}function Hw(g,v){var x,F=16;for(x=0;16>x;++x)F+=g[v-1+32*x]+g[v+x-32];Bc(F>>5,g,v)}function Cc(g,v){var x,F=8;for(x=0;16>x;++x)F+=g[v-1+32*x];Bc(F>>4,g,v)}function QC(g,v){var x,F=8;for(x=0;16>x;++x)F+=g[v+x-32];Bc(F>>4,g,v)}function au(g,v){Bc(128,g,v)}function ye(g,v,x){return g+2*v+x+2>>2}function NC(g,v){var x,F=v-32;for(F=new Uint8Array([ye(g[F-1],g[F+0],g[F+1]),ye(g[F+0],g[F+1],g[F+2]),ye(g[F+1],g[F+2],g[F+3]),ye(g[F+2],g[F+3],g[F+4])]),x=0;4>x;++x)r(g,v+32*x,F,0,F.length)}function PC(g,v){var x=g[v-1],F=g[v-1+32],P=g[v-1+64],O=g[v-1+96];St(g,v+0,16843009*ye(g[v-1-32],x,F)),St(g,v+32,16843009*ye(x,F,P)),St(g,v+64,16843009*ye(F,P,O)),St(g,v+96,16843009*ye(P,O,O))}function MC(g,v){var x,F=4;for(x=0;4>x;++x)F+=g[v+x-32]+g[v-1+32*x];for(F>>=3,x=0;4>x;++x)i(g,v+32*x,F,4)}function kC(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1-32],R=g[v+0-32],K=g[v+1-32],G=g[v+2-32],Y=g[v+3-32];g[v+0+96]=ye(F,P,g[v-1+96]),g[v+1+96]=g[v+0+64]=ye(x,F,P),g[v+2+96]=g[v+1+64]=g[v+0+32]=ye(O,x,F),g[v+3+96]=g[v+2+64]=g[v+1+32]=g[v+0+0]=ye(R,O,x),g[v+3+64]=g[v+2+32]=g[v+1+0]=ye(K,R,O),g[v+3+32]=g[v+2+0]=ye(G,K,R),g[v+3+0]=ye(Y,G,K)}function OC(g,v){var x=g[v+1-32],F=g[v+2-32],P=g[v+3-32],O=g[v+4-32],R=g[v+5-32],K=g[v+6-32],G=g[v+7-32];g[v+0+0]=ye(g[v+0-32],x,F),g[v+1+0]=g[v+0+32]=ye(x,F,P),g[v+2+0]=g[v+1+32]=g[v+0+64]=ye(F,P,O),g[v+3+0]=g[v+2+32]=g[v+1+64]=g[v+0+96]=ye(P,O,R),g[v+3+32]=g[v+2+64]=g[v+1+96]=ye(O,R,K),g[v+3+64]=g[v+2+96]=ye(R,K,G),g[v+3+96]=ye(K,G,G)}function Yo(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1-32],R=g[v+0-32],K=g[v+1-32],G=g[v+2-32],Y=g[v+3-32];g[v+0+0]=g[v+1+64]=O+R+1>>1,g[v+1+0]=g[v+2+64]=R+K+1>>1,g[v+2+0]=g[v+3+64]=K+G+1>>1,g[v+3+0]=G+Y+1>>1,g[v+0+96]=ye(P,F,x),g[v+0+64]=ye(F,x,O),g[v+0+32]=g[v+1+96]=ye(x,O,R),g[v+1+32]=g[v+2+96]=ye(O,R,K),g[v+2+32]=g[v+3+96]=ye(R,K,G),g[v+3+32]=ye(K,G,Y)}function Jo(g,v){var x=g[v+0-32],F=g[v+1-32],P=g[v+2-32],O=g[v+3-32],R=g[v+4-32],K=g[v+5-32],G=g[v+6-32],Y=g[v+7-32];g[v+0+0]=x+F+1>>1,g[v+1+0]=g[v+0+64]=F+P+1>>1,g[v+2+0]=g[v+1+64]=P+O+1>>1,g[v+3+0]=g[v+2+64]=O+R+1>>1,g[v+0+32]=ye(x,F,P),g[v+1+32]=g[v+0+96]=ye(F,P,O),g[v+2+32]=g[v+1+96]=ye(P,O,R),g[v+3+32]=g[v+2+96]=ye(O,R,K),g[v+3+64]=ye(R,K,G),g[v+3+96]=ye(K,G,Y)}function DC(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1+96];g[v+0+0]=x+F+1>>1,g[v+2+0]=g[v+0+32]=F+P+1>>1,g[v+2+32]=g[v+0+64]=P+O+1>>1,g[v+1+0]=ye(x,F,P),g[v+3+0]=g[v+1+32]=ye(F,P,O),g[v+3+32]=g[v+1+64]=ye(P,O,O),g[v+3+64]=g[v+2+64]=g[v+0+96]=g[v+1+96]=g[v+2+96]=g[v+3+96]=O}function RC(g,v){var x=g[v-1+0],F=g[v-1+32],P=g[v-1+64],O=g[v-1+96],R=g[v-1-32],K=g[v+0-32],G=g[v+1-32],Y=g[v+2-32];g[v+0+0]=g[v+2+32]=x+R+1>>1,g[v+0+32]=g[v+2+64]=F+x+1>>1,g[v+0+64]=g[v+2+96]=P+F+1>>1,g[v+0+96]=O+P+1>>1,g[v+3+0]=ye(K,G,Y),g[v+2+0]=ye(R,K,G),g[v+1+0]=g[v+3+32]=ye(x,R,K),g[v+1+32]=g[v+3+64]=ye(F,x,R),g[v+1+64]=g[v+3+96]=ye(P,F,x),g[v+1+96]=ye(O,P,F)}function Qd(g,v){var x;for(x=0;8>x;++x)r(g,v+32*x,g,v-32,8)}function N0(g,v){var x;for(x=0;8>x;++x)i(g,v,g[v-1],8),v+=32}function eo(g,v,x){var F;for(F=0;8>F;++F)i(v,x+32*F,g,8)}function HC(g,v){var x,F=8;for(x=0;8>x;++x)F+=g[v+x-32]+g[v-1+32*x];eo(F>>4,g,v)}function Nd(g,v){var x,F=4;for(x=0;8>x;++x)F+=g[v+x-32];eo(F>>3,g,v)}function KC(g,v){var x,F=4;for(x=0;8>x;++x)F+=g[v-1+32*x];eo(F>>3,g,v)}function P0(g,v){eo(128,g,v)}function xc(g,v,x){var F=g[v-x],P=g[v+0],O=3*(P-F)+GC[1020+g[v-2*x]-g[v+x]],R=qw[112+(O+4>>3)];g[v-x]=Zs[255+F+qw[112+(O+3>>3)]],g[v+0]=Zs[255+P-R]}function M0(g,v,x,F){var P=g[v+0],O=g[v+x];return kA[255+g[v-2*x]-g[v-x]]>F||kA[255+O-P]>F}function ou(g,v,x,F){return 4*kA[255+g[v-x]-g[v+0]]+kA[255+g[v-2*x]-g[v+x]]<=F}function k0(g,v,x,F,P){var O=g[v-3*x],R=g[v-2*x],K=g[v-x],G=g[v+0],Y=g[v+x],at=g[v+2*x],pt=g[v+3*x];return 4*kA[255+K-G]+kA[255+R-Y]>F?0:kA[255+g[v-4*x]-O]<=P&&kA[255+O-R]<=P&&kA[255+R-K]<=P&&kA[255+pt-at]<=P&&kA[255+at-Y]<=P&&kA[255+Y-G]<=P}function Pd(g,v,x,F){var P=2*F+1;for(F=0;16>F;++F)ou(g,v+F,x,P)&&xc(g,v+F,x)}function O0(g,v,x,F){var P=2*F+1;for(F=0;16>F;++F)ou(g,v+F*x,1,P)&&xc(g,v+F*x,1)}function Md(g,v,x,F){var P;for(P=3;0<P;--P)Pd(g,v+=4*x,x,F)}function Kw(g,v,x,F){var P;for(P=3;0<P;--P)O0(g,v+=4,x,F)}function Zo(g,v,x,F,P,O,R,K){for(O=2*O+1;0<P--;){if(k0(g,v,x,O,R))if(M0(g,v,x,K))xc(g,v,x);else{var G=g,Y=v,at=x,pt=G[Y-2*at],J=G[Y-at],lt=G[Y+0],ft=G[Y+at],Bt=G[Y+2*at],gt=27*(Et=GC[1020+3*(lt-J)+GC[1020+pt-ft]])+63>>7,Ct=18*Et+63>>7,Et=9*Et+63>>7;G[Y-3*at]=Zs[255+G[Y-3*at]+Et],G[Y-2*at]=Zs[255+pt+Ct],G[Y-at]=Zs[255+J+gt],G[Y+0]=Zs[255+lt-gt],G[Y+at]=Zs[255+ft-Ct],G[Y+2*at]=Zs[255+Bt-Et]}v+=F}}function tl(g,v,x,F,P,O,R,K){for(O=2*O+1;0<P--;){if(k0(g,v,x,O,R))if(M0(g,v,x,K))xc(g,v,x);else{var G=g,Y=v,at=x,pt=G[Y-at],J=G[Y+0],lt=G[Y+at],ft=qw[112+(4+(Bt=3*(J-pt))>>3)],Bt=qw[112+(Bt+3>>3)],gt=ft+1>>1;G[Y-2*at]=Zs[255+G[Y-2*at]+gt],G[Y-at]=Zs[255+pt+Bt],G[Y+0]=Zs[255+J-ft],G[Y+at]=Zs[255+lt-gt]}v+=F}}function Vw(g,v,x,F,P,O){Zo(g,v,x,1,16,F,P,O)}function Gw(g,v,x,F,P,O){Zo(g,v,1,x,16,F,P,O)}function jw(g,v,x,F,P,O){var R;for(R=3;0<R;--R)tl(g,v+=4*x,x,1,16,F,P,O)}function lu(g,v,x,F,P,O){var R;for(R=3;0<R;--R)tl(g,v+=4,1,x,16,F,P,O)}function $w(g,v,x,F,P,O,R,K){Zo(g,v,P,1,8,O,R,K),Zo(x,F,P,1,8,O,R,K)}function b(g,v,x,F,P,O,R,K){Zo(g,v,1,P,8,O,R,K),Zo(x,F,1,P,8,O,R,K)}function N(g,v,x,F,P,O,R,K){tl(g,v+4*P,P,1,8,O,R,K),tl(x,F+4*P,P,1,8,O,R,K)}function X(g,v,x,F,P,O,R,K){tl(g,v+4,1,P,8,O,R,K),tl(x,F+4,1,P,8,O,R,K)}function nt(){this.ba=new fe,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ye,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ht(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function bt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ft(){this.ua=0,this.Wa=new ve,this.vb=new ve,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new st,this.yc=new j}function se(){this.xb=this.a=0,this.l=new on,this.ca=new fe,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new $,this.Pb=0,this.wd=new $,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ft,this.ab=0,this.gc=A(4,bt),this.Oc=0}function te(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new on,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Se(g,v,x,F,P,O,R){for(g=g==null?0:g[v+0],v=0;v<R;++v)P[O+v]=g+x[F+v]&255,g=P[O+v]}function Ue(g,v,x,F,P,O,R){var K;if(g==null)Se(null,null,x,F,P,O,R);else for(K=0;K<R;++K)P[O+K]=g[v+K]+x[F+K]&255}function Je(g,v,x,F,P,O,R){if(g==null)Se(null,null,x,F,P,O,R);else{var K,G=g[v+0],Y=G,at=G;for(K=0;K<R;++K)Y=at+(G=g[v+K])-Y,at=x[F+K]+(-256&Y?0>Y?0:255:Y)&255,Y=G,P[O+K]=at}}function Di(g,v,x,F){var P=v.width,O=v.o;if(t(g!=null&&v!=null),0>x||0>=F||x+F>O)return null;if(!g.Cc){if(g.ga==null){var R;if(g.ga=new te,(R=g.ga==null)||(R=v.width*v.o,t(g.Gb.length==0),g.Gb=s(R),g.Uc=0,g.Gb==null?R=0:(g.mb=g.Gb,g.nb=g.Uc,g.rc=null,R=1),R=!R),!R){R=g.ga;var K=g.Fa,G=g.P,Y=g.qc,at=g.mb,pt=g.nb,J=G+1,lt=Y-1,ft=R.l;if(t(K!=null&&at!=null&&v!=null),Uc[0]=null,Uc[1]=Se,Uc[2]=Ue,Uc[3]=Je,R.ca=at,R.tb=pt,R.c=v.width,R.i=v.height,t(0<R.c&&0<R.i),1>=Y)v=0;else if(R.$a=3&K[G+0],R.Z=K[G+0]>>2&3,R.Lc=K[G+0]>>4&3,G=K[G+0]>>6&3,0>R.$a||1<R.$a||4<=R.Z||1<R.Lc||G)v=0;else if(ft.put=Ht,ft.ac=NA,ft.bc=Hn,ft.ma=R,ft.width=v.width,ft.height=v.height,ft.Da=v.Da,ft.v=v.v,ft.va=v.va,ft.j=v.j,ft.o=v.o,R.$a)t:{t(R.$a==1),v=PA();e:for(;;){if(v==null){v=0;break t}if(t(R!=null),R.mc=v,v.c=R.c,v.i=R.i,v.l=R.l,v.l.ma=R,v.l.width=R.c,v.l.height=R.i,v.a=0,ut(v.m,K,J,lt),!Oi(R.c,R.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&Qs(v.s)?(R.ic=1,K=v.c*v.i,v.Ta=null,v.Ua=0,v.V=s(K),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(R.ic=0,v=Ja(v,R.c)),!v))break e;v=1;break t}R.mc=null,v=0}else v=lt>=R.c*R.i;R=!v}if(R)return null;g.ga.Lc!=1?g.Ga=0:F=O-x}t(g.ga!=null),t(x+F<=O);t:{if(v=(K=g.ga).c,O=K.l.o,K.$a==0){if(J=g.rc,lt=g.Vc,ft=g.Fa,G=g.P+1+x*v,Y=g.mb,at=g.nb+x*v,t(G<=g.P+g.qc),K.Z!=0)for(t(Uc[K.Z]!=null),R=0;R<F;++R)Uc[K.Z](J,lt,ft,G,Y,at,v),J=Y,lt=at,at+=v,G+=v;else for(R=0;R<F;++R)r(Y,at,ft,G,v),J=Y,lt=at,at+=v,G+=v;g.rc=J,g.Vc=lt}else{if(t(K.mc!=null),v=x+F,t((R=K.mc)!=null),t(v<=R.i),R.C>=v)v=1;else if(K.ic||ri(),K.ic){K=R.V,J=R.Ba,lt=R.c;var Bt=R.i,gt=(ft=1,G=R.$/lt,Y=R.$%lt,at=R.m,pt=R.s,R.$),Ct=lt*Bt,Et=lt*v,Ut=pt.wc,It=gt<Et?Xi(pt,Y,G):null;t(gt<=Ct),t(v<=Bt),t(Qs(pt));e:for(;;){for(;!at.h&><Et;){if(Y&Ut||(It=Xi(pt,Y,G)),t(It!=null),ot(at),256>(Bt=Hr(It.G[0],It.H[0],at)))K[J+gt]=Bt,++gt,++Y>=lt&&(Y=0,++G<=v&&!(G%16)&&Ns(R,G));else{if(!(280>Bt)){ft=0;break e}Bt=hs(Bt-256,at);var he,Yt=Hr(It.G[4],It.H[4],at);if(ot(at),!(gt>=(Yt=Kn(lt,Yt=hs(Yt,at)))&&Ct-gt>=Bt)){ft=0;break e}for(he=0;he<Bt;++he)K[J+gt+he]=K[J+gt+he-Yt];for(gt+=Bt,Y+=Bt;Y>=lt;)Y-=lt,++G<=v&&!(G%16)&&Ns(R,G);gt<Et&&Y&Ut&&(It=Xi(pt,Y,G))}t(at.h==tt(at))}Ns(R,G>v?v:G);break e}!ft||at.h&><Ct?(ft=0,R.a=at.h?5:3):R.$=gt,v=ft}else v=Gn(R,R.V,R.Ba,R.c,R.i,v,zo);if(!v){F=0;break t}}x+F>=O&&(g.Cc=1),F=1}if(!F)return null;if(g.Cc&&((F=g.ga)!=null&&(F.mc=null),g.ga=null,0<g.Ga))return alert("todo:WebPDequantizeLevels"),null}return g.nb+x*P}function Tr(g,v,x,F,P,O){for(;0<P--;){var R,K=g,G=v+(x?1:0),Y=g,at=v+(x?0:3);for(R=0;R<F;++R){var pt=Y[at+4*R];pt!=255&&(pt*=32897,K[G+4*R+0]=K[G+4*R+0]*pt>>23,K[G+4*R+1]=K[G+4*R+1]*pt>>23,K[G+4*R+2]=K[G+4*R+2]*pt>>23)}v+=O}}function wr(g,v,x,F,P){for(;0<F--;){var O;for(O=0;O<x;++O){var R=g[v+2*O+0],K=15&(Y=g[v+2*O+1]),G=4369*K,Y=(240&Y|Y>>4)*G>>16;g[v+2*O+0]=(240&R|R>>4)*G>>16&240|(15&R|R<<4)*G>>16>>4&15,g[v+2*O+1]=240&Y|K}v+=P}}function Kr(g,v,x,F,P,O,R,K){var G,Y,at=255;for(Y=0;Y<P;++Y){for(G=0;G<F;++G){var pt=g[v+G];O[R+4*G]=pt,at&=pt}v+=x,R+=K}return at!=255}function ei(g,v,x,F,P){var O;for(O=0;O<P;++O)x[F+O]=g[v+O]>>8}function ri(){$0=Tr,UT=wr,LT=Kr,QT=ei}function jn(g,v,x){Q[g]=function(F,P,O,R,K,G,Y,at,pt,J,lt,ft,Bt,gt,Ct,Et,Ut){var It,he=Ut-1>>1,Yt=K[G+0]|Y[at+0]<<16,De=pt[J+0]|lt[ft+0]<<16;t(F!=null);var ae=3*Yt+De+131074>>2;for(v(F[P+0],255&ae,ae>>16,Bt,gt),O!=null&&(ae=3*De+Yt+131074>>2,v(O[R+0],255&ae,ae>>16,Ct,Et)),It=1;It<=he;++It){var qe=K[G+It]|Y[at+It]<<16,Ji=pt[J+It]|lt[ft+It]<<16,Re=Yt+qe+De+Ji+524296,oe=Re+2*(qe+De)>>3;ae=oe+Yt>>1,Yt=(Re=Re+2*(Yt+Ji)>>3)+qe>>1,v(F[P+2*It-1],255&ae,ae>>16,Bt,gt+(2*It-1)*x),v(F[P+2*It-0],255&Yt,Yt>>16,Bt,gt+(2*It-0)*x),O!=null&&(ae=Re+De>>1,Yt=oe+Ji>>1,v(O[R+2*It-1],255&ae,ae>>16,Ct,Et+(2*It-1)*x),v(O[R+2*It+0],255&Yt,Yt>>16,Ct,Et+(2*It+0)*x)),Yt=qe,De=Ji}1&Ut||(ae=3*Yt+De+131074>>2,v(F[P+Ut-1],255&ae,ae>>16,Bt,gt+(Ut-1)*x),O!=null&&(ae=3*De+Yt+131074>>2,v(O[R+Ut-1],255&ae,ae>>16,Ct,Et+(Ut-1)*x)))}}function el(){OA[Yw]=u6,OA[Jw]=GT,OA[DT]=f6,OA[Zw]=jT,OA[t2]=$T,OA[jC]=WT,OA[RT]=d6,OA[$C]=GT,OA[WC]=jT,OA[e2]=$T,OA[zC]=WT}function D0(g){return g&-16384?0>g?0:255:g>>g6}function cu(g,v){return D0((19077*g>>8)+(26149*v>>8)-14234)}function hu(g,v,x){return D0((19077*g>>8)-(6419*v>>8)-(13320*x>>8)+8708)}function Ec(g,v){return D0((19077*g>>8)+(33050*v>>8)-17685)}function uu(g,v,x,F,P){F[P+0]=cu(g,x),F[P+1]=hu(g,v,x),F[P+2]=Ec(g,v)}function kd(g,v,x,F,P){F[P+0]=Ec(g,v),F[P+1]=hu(g,v,x),F[P+2]=cu(g,x)}function Od(g,v,x,F,P){var O=hu(g,v,x);v=O<<3&224|Ec(g,v)>>3,F[P+0]=248&cu(g,x)|O>>5,F[P+1]=v}function $n(g,v,x,F,P){var O=240&Ec(g,v)|15;F[P+0]=240&cu(g,x)|hu(g,v,x)>>4,F[P+1]=O}function fu(g,v,x,F,P){F[P+0]=255,uu(g,v,x,F,P+1)}function du(g,v,x,F,P){kd(g,v,x,F,P),F[P+3]=255}function R0(g,v,x,F,P){uu(g,v,x,F,P),F[P+3]=255}function ro(g,v,x){Q[g]=function(F,P,O,R,K,G,Y,at,pt){for(var J=at+(-2&pt)*x;at!=J;)v(F[P+0],O[R+0],K[G+0],Y,at),v(F[P+1],O[R+0],K[G+0],Y,at+x),P+=2,++R,++G,at+=2*x;1&pt&&v(F[P+0],O[R+0],K[G+0],Y,at)}}function us(g,v,x){return x==0?g==0?v==0?6:5:v==0?4:0:x}function Ww(g,v,x,F,P){switch(g>>>30){case 3:rl(v,x,F,P,0);break;case 2:Ic(v,x,F,P);break;case 1:Wn(v,x,F,P)}}function Dd(g,v){var x,F,P=v.M,O=v.Nb,R=g.oc,K=g.pc+40,G=g.oc,Y=g.pc+584,at=g.oc,pt=g.pc+600;for(x=0;16>x;++x)R[K+32*x-1]=129;for(x=0;8>x;++x)G[Y+32*x-1]=129,at[pt+32*x-1]=129;for(0<P?R[K-1-32]=G[Y-1-32]=at[pt-1-32]=129:(i(R,K-32-1,127,21),i(G,Y-32-1,127,9),i(at,pt-32-1,127,9)),F=0;F<g.za;++F){var J=v.ya[v.aa+F];if(0<F){for(x=-1;16>x;++x)r(R,K+32*x-4,R,K+32*x+12,4);for(x=-1;8>x;++x)r(G,Y+32*x-4,G,Y+32*x+4,4),r(at,pt+32*x-4,at,pt+32*x+4,4)}var lt=g.Gd,ft=g.Hd+F,Bt=J.ad,gt=J.Hc;if(0<P&&(r(R,K-32,lt[ft].y,0,16),r(G,Y-32,lt[ft].f,0,8),r(at,pt-32,lt[ft].ea,0,8)),J.Za){var Ct=R,Et=K-32+16;for(0<P&&(F>=g.za-1?i(Ct,Et,lt[ft].y[15],4):r(Ct,Et,lt[ft+1].y,0,4)),x=0;4>x;x++)Ct[Et+128+x]=Ct[Et+256+x]=Ct[Et+384+x]=Ct[Et+0+x];for(x=0;16>x;++x,gt<<=2)Ct=R,Et=K+XT[x],da[J.Ob[x]](Ct,Et),Ww(gt,Bt,16*+x,Ct,Et)}else if(Ct=us(F,P,J.Ob[0]),_c[Ct](R,K),gt!=0)for(x=0;16>x;++x,gt<<=2)Ww(gt,Bt,16*+x,R,K+XT[x]);for(x=J.Gc,Ct=us(F,P,J.Dd),nl[Ct](G,Y),nl[Ct](at,pt),gt=Bt,Ct=G,Et=Y,255&(J=0|x)&&(170&J?Gd(gt,256,Ct,Et):no(gt,256,Ct,Et)),J=at,gt=pt,255&(x>>=8)&&(170&x?Gd(Bt,320,J,gt):no(Bt,320,J,gt)),P<g.Ub-1&&(r(lt[ft].y,0,R,K+480,16),r(lt[ft].f,0,G,Y+224,8),r(lt[ft].ea,0,at,pt+224,8)),x=8*O*g.B,lt=g.sa,ft=g.ta+16*F+16*O*g.R,Bt=g.qa,J=g.ra+8*F+x,gt=g.Ha,Ct=g.Ia+8*F+x,x=0;16>x;++x)r(lt,ft+x*g.R,R,K+32*x,16);for(x=0;8>x;++x)r(Bt,J+x*g.B,G,Y+32*x,8),r(gt,Ct+x*g.B,at,pt+32*x,8)}}function zw(g,v,x,F,P,O,R,K,G){var Y=[0],at=[0],pt=0,J=G!=null?G.kd:0,lt=G??new ht;if(g==null||12>x)return 7;lt.data=g,lt.w=v,lt.ha=x,v=[v],x=[x],lt.gb=[lt.gb];t:{var ft=v,Bt=x,gt=lt.gb;if(t(g!=null),t(Bt!=null),t(gt!=null),gt[0]=0,12<=Bt[0]&&!e(g,ft[0],"RIFF")){if(e(g,ft[0]+8,"WEBP")){gt=3;break t}var Ct=jt(g,ft[0]+4);if(12>Ct||4294967286<Ct){gt=3;break t}if(J&&Ct>Bt[0]-8){gt=7;break t}gt[0]=Ct,ft[0]+=12,Bt[0]-=12}gt=0}if(gt!=0)return gt;for(Ct=0<lt.gb[0],x=x[0];;){t:{var Et=g;Bt=v,gt=x;var Ut=Y,It=at,he=ft=[0];if((ae=pt=[pt])[0]=0,8>gt[0])gt=7;else{if(!e(Et,Bt[0],"VP8X")){if(jt(Et,Bt[0]+4)!=10){gt=3;break t}if(18>gt[0]){gt=7;break t}var Yt=jt(Et,Bt[0]+8),De=1+Pt(Et,Bt[0]+12);if(2147483648<=De*(Et=1+Pt(Et,Bt[0]+15))){gt=3;break t}he!=null&&(he[0]=Yt),Ut!=null&&(Ut[0]=De),It!=null&&(It[0]=Et),Bt[0]+=18,gt[0]-=18,ae[0]=1}gt=0}}if(pt=pt[0],ft=ft[0],gt!=0)return gt;if(Bt=!!(2&ft),!Ct&&pt)return 3;if(O!=null&&(O[0]=!!(16&ft)),R!=null&&(R[0]=Bt),K!=null&&(K[0]=0),R=Y[0],ft=at[0],pt&&Bt&&G==null){gt=0;break}if(4>x){gt=7;break}if(Ct&&pt||!Ct&&!pt&&!e(g,v[0],"ALPH")){x=[x],lt.na=[lt.na],lt.P=[lt.P],lt.Sa=[lt.Sa];t:{Yt=g,gt=v,Ct=x;var ae=lt.gb;Ut=lt.na,It=lt.P,he=lt.Sa,De=22,t(Yt!=null),t(Ct!=null),Et=gt[0];var qe=Ct[0];for(t(Ut!=null),t(he!=null),Ut[0]=null,It[0]=null,he[0]=0;;){if(gt[0]=Et,Ct[0]=qe,8>qe){gt=7;break t}var Ji=jt(Yt,Et+4);if(4294967286<Ji){gt=3;break t}var Re=8+Ji+1&-2;if(De+=Re,0<ae&&De>ae){gt=3;break t}if(!e(Yt,Et,"VP8 ")||!e(Yt,Et,"VP8L")){gt=0;break t}if(qe[0]<Re){gt=7;break t}e(Yt,Et,"ALPH")||(Ut[0]=Yt,It[0]=Et+8,he[0]=Ji),Et+=Re,qe-=Re}}if(x=x[0],lt.na=lt.na[0],lt.P=lt.P[0],lt.Sa=lt.Sa[0],gt!=0)break}x=[x],lt.Ja=[lt.Ja],lt.xa=[lt.xa];t:if(ae=g,gt=v,Ct=x,Ut=lt.gb[0],It=lt.Ja,he=lt.xa,Yt=gt[0],Et=!e(ae,Yt,"VP8 "),De=!e(ae,Yt,"VP8L"),t(ae!=null),t(Ct!=null),t(It!=null),t(he!=null),8>Ct[0])gt=7;else{if(Et||De){if(ae=jt(ae,Yt+4),12<=Ut&&ae>Ut-12){gt=3;break t}if(J&&ae>Ct[0]-8){gt=7;break t}It[0]=ae,gt[0]+=8,Ct[0]-=8,he[0]=De}else he[0]=5<=Ct[0]&&ae[Yt+0]==47&&!(ae[Yt+4]>>5),It[0]=Ct[0];gt=0}if(x=x[0],lt.Ja=lt.Ja[0],lt.xa=lt.xa[0],v=v[0],gt!=0)break;if(4294967286<lt.Ja)return 3;if(K==null||Bt||(K[0]=lt.xa?2:1),R=[R],ft=[ft],lt.xa){if(5>x){gt=7;break}K=R,J=ft,Bt=O,g==null||5>x?g=0:5<=x&&g[v+0]==47&&!(g[v+4]>>5)?(Ct=[0],ae=[0],Ut=[0],ut(It=new $,g,v,x),ha(It,Ct,ae,Ut)?(K!=null&&(K[0]=Ct[0]),J!=null&&(J[0]=ae[0]),Bt!=null&&(Bt[0]=Ut[0]),g=1):g=0):g=0}else{if(10>x){gt=7;break}K=ft,g==null||10>x||!Au(g,v+3,x-3)?g=0:(J=g[v+0]|g[v+1]<<8|g[v+2]<<16,Bt=16383&(g[v+7]<<8|g[v+6]),g=16383&(g[v+9]<<8|g[v+8]),1&J||3<(J>>1&7)||!(J>>4&1)||J>>5>=lt.Ja||!Bt||!g?g=0:(R&&(R[0]=Bt),K&&(K[0]=g),g=1))}if(!g||(R=R[0],ft=ft[0],pt&&(Y[0]!=R||at[0]!=ft)))return 3;G!=null&&(G[0]=lt,G.offset=v-G.w,t(4294967286>v-G.w),t(G.offset==G.ha-x));break}return gt==0||gt==7&&pt&&G==null?(O!=null&&(O[0]|=lt.na!=null&&0<lt.na.length),F!=null&&(F[0]=R),P!=null&&(P[0]=ft),0):gt}function MA(g,v,x){var F=v.width,P=v.height,O=0,R=0,K=F,G=P;if(v.Da=g!=null&&0<g.Da,v.Da&&(K=g.cd,G=g.bd,O=g.v,R=g.j,11>x||(O&=-2,R&=-2),0>O||0>R||0>=K||0>=G||O+K>F||R+G>P))return 0;if(v.v=O,v.j=R,v.va=O+K,v.o=R+G,v.U=K,v.T=G,v.da=g!=null&&0<g.da,v.da){if(!re(K,G,x=[g.ib],O=[g.hb]))return 0;v.ib=x[0],v.hb=O[0]}return v.ob=g!=null&&g.ob,v.Kb=g==null||!g.Sd,v.da&&(v.ob=v.ib<3*F/4&&v.hb<3*P/4,v.Kb=0),1}function gu(g){if(g==null)return 2;if(11>g.S){var v=g.f.RGBA;v.fb+=(g.height-1)*v.A,v.A=-v.A}else v=g.f.kb,g=g.height,v.O+=(g-1)*v.fa,v.fa=-v.fa,v.N+=(g-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(g-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(g-1)*v.lb,v.lb=-v.lb);return 0}function H0(g,v,x,F){if(F==null||0>=g||0>=v)return 2;if(x!=null){if(x.Da){var P=x.cd,O=x.bd,R=-2&x.v,K=-2&x.j;if(0>R||0>K||0>=P||0>=O||R+P>g||K+O>v)return 2;g=P,v=O}if(x.da){if(!re(g,v,P=[x.ib],O=[x.hb]))return 2;g=P[0],v=O[0]}}F.width=g,F.height=v;t:{var G=F.width,Y=F.height;if(g=F.S,0>=G||0>=Y||!(g>=Yw&&13>g))g=2;else{if(0>=F.Rd&&F.sd==null){R=O=P=v=0;var at=(K=G*qT[g])*Y;if(11>g||(O=(Y+1)/2*(v=(G+1)/2),g==12&&(R=(P=G)*Y)),(Y=s(at+2*O+R))==null){g=1;break t}F.sd=Y,11>g?((G=F.f.RGBA).eb=Y,G.fb=0,G.A=K,G.size=at):((G=F.f.kb).y=Y,G.O=0,G.fa=K,G.Fd=at,G.f=Y,G.N=0+at,G.Ab=v,G.Cd=O,G.ea=Y,G.W=0+at+O,G.Db=v,G.Ed=O,g==12&&(G.F=Y,G.J=0+at+2*O),G.Tc=R,G.lb=P)}if(v=1,P=F.S,O=F.width,R=F.height,P>=Yw&&13>P)if(11>P)g=F.f.RGBA,v&=(K=Math.abs(g.A))*(R-1)+O<=g.size,v&=K>=O*qT[P],v&=g.eb!=null;else{g=F.f.kb,K=(O+1)/2,at=(R+1)/2,G=Math.abs(g.fa),Y=Math.abs(g.Ab);var pt=Math.abs(g.Db),J=Math.abs(g.lb),lt=J*(R-1)+O;v&=G*(R-1)+O<=g.Fd,v&=Y*(at-1)+K<=g.Cd,v=(v&=pt*(at-1)+K<=g.Ed)&G>=O&Y>=K&pt>=K,v&=g.y!=null,v&=g.f!=null,v&=g.ea!=null,P==12&&(v&=J>=O,v&=lt<=g.Tc,v&=g.F!=null)}else v=0;g=v?0:2}}return g!=0||x!=null&&x.fd&&(g=gu(F)),g}var Rd=64,pu=[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],K0=24,fs=32,Ps=8,Hd=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];kt("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(g){return g},Q.Predictor2=function(g,v,x){return v[x+0]},Q.Predictor3=function(g,v,x){return v[x+1]},Q.Predictor4=function(g,v,x){return v[x-1]},Q.Predictor5=function(g,v,x){return Wt(Wt(g,v[x+1]),v[x+0])},Q.Predictor6=function(g,v,x){return Wt(g,v[x-1])},Q.Predictor7=function(g,v,x){return Wt(g,v[x+0])},Q.Predictor8=function(g,v,x){return Wt(v[x-1],v[x+0])},Q.Predictor9=function(g,v,x){return Wt(v[x+0],v[x+1])},Q.Predictor10=function(g,v,x){return Wt(Wt(g,v[x-1]),Wt(v[x+0],v[x+1]))},Q.Predictor11=function(g,v,x){var F=v[x+0];return 0>=me(F>>24&255,g>>24&255,(v=v[x-1])>>24&255)+me(F>>16&255,g>>16&255,v>>16&255)+me(F>>8&255,g>>8&255,v>>8&255)+me(255&F,255&g,255&v)?F:g},Q.Predictor12=function(g,v,x){var F=v[x+0];return(we((g>>24&255)+(F>>24&255)-((v=v[x-1])>>24&255))<<24|we((g>>16&255)+(F>>16&255)-(v>>16&255))<<16|we((g>>8&255)+(F>>8&255)-(v>>8&255))<<8|we((255&g)+(255&F)-(255&v)))>>>0},Q.Predictor13=function(g,v,x){var F=v[x-1];return(Ie((g=Wt(g,v[x+0]))>>24&255,F>>24&255)<<24|Ie(g>>16&255,F>>16&255)<<16|Ie(g>>8&255,F>>8&255)<<8|Ie(255&g,255&F))>>>0};var Sc=Q.PredictorAdd0;Q.PredictorAdd1=_e,kt("Predictor2","PredictorAdd2"),kt("Predictor3","PredictorAdd3"),kt("Predictor4","PredictorAdd4"),kt("Predictor5","PredictorAdd5"),kt("Predictor6","PredictorAdd6"),kt("Predictor7","PredictorAdd7"),kt("Predictor8","PredictorAdd8"),kt("Predictor9","PredictorAdd9"),kt("Predictor10","PredictorAdd10"),kt("Predictor11","PredictorAdd11"),kt("Predictor12","PredictorAdd12"),kt("Predictor13","PredictorAdd13");var Fc=Q.PredictorAdd2;Xt("ColorIndexInverseTransform","MapARGB","32b",function(g){return g>>8&255},function(g){return g}),Xt("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(g){return g},function(g){return g>>8&255});var Kd,mu=Q.ColorIndexInverseTransform,Ri=Q.MapARGB,VC=Q.VP8LColorIndexInverseTransformAlpha,io=Q.MapAlpha,fa=Q.VP8LPredictorsAdd=[];fa.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var vu,V0,G0,Vd,wu,yu,Tc,rl,Ic,Gd,Wn,no,Nr,Pr,Ci,Yi,il,j0,jd,Xw,FT,TT,IT,_T,$0,UT,LT,QT,NT=s(511),PT=s(2041),MT=s(225),kT=s(767),OT=0,GC=PT,qw=MT,Zs=kT,kA=NT,Yw=0,Jw=1,DT=2,Zw=3,t2=4,jC=5,RT=6,$C=7,WC=8,e2=9,zC=10,JR=[2,3,7],ZR=[3,3,11],HT=[280,256,256,256,40],t6=[0,1,1,1,0],e6=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],r6=[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],i6=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],n6=8,XC=[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],qC=[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],W0=null,s6=[[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]],A6=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],KT=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],a6=[[[[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]]]],o6=[[[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]]],l6=[[[[255,255,255,255,255,255,255,255,255,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]]]],c6=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],_c=[],da=[],nl=[],h6=1,VT=2,Uc=[],OA=[];jn("UpsampleRgbLinePair",uu,3),jn("UpsampleBgrLinePair",kd,3),jn("UpsampleRgbaLinePair",R0,4),jn("UpsampleBgraLinePair",du,4),jn("UpsampleArgbLinePair",fu,4),jn("UpsampleRgba4444LinePair",$n,2),jn("UpsampleRgb565LinePair",Od,2);var u6=Q.UpsampleRgbLinePair,f6=Q.UpsampleBgrLinePair,GT=Q.UpsampleRgbaLinePair,jT=Q.UpsampleBgraLinePair,$T=Q.UpsampleArgbLinePair,WT=Q.UpsampleRgba4444LinePair,d6=Q.UpsampleRgb565LinePair,r2=16,i2=1<<r2-1,z0=-227,YC=482,g6=6,zT=0,p6=s(256),m6=s(256),v6=s(256),w6=s(256),y6=s(YC-z0),b6=s(YC-z0);ro("YuvToRgbRow",uu,3),ro("YuvToBgrRow",kd,3),ro("YuvToRgbaRow",R0,4),ro("YuvToBgraRow",du,4),ro("YuvToArgbRow",fu,4),ro("YuvToRgba4444Row",$n,2),ro("YuvToRgb565Row",Od,2);var XT=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],n2=[0,2,8],B6=[8,7,6,4,4,2,2,2,1,1,1,1],C6=1;this.WebPDecodeRGBA=function(g,v,x,F,P){var O=Jw,R=new nt,K=new fe;R.ba=K,K.S=O,K.width=[K.width],K.height=[K.height];var G=K.width,Y=K.height,at=new de;if(at==null||g==null)var pt=2;else t(at!=null),pt=zw(g,v,x,at.width,at.height,at.Pd,at.Qd,at.format,null);if(pt!=0?G=0:(G!=null&&(G[0]=at.width[0]),Y!=null&&(Y[0]=at.height[0]),G=1),G){K.width=K.width[0],K.height=K.height[0],F!=null&&(F[0]=K.width),P!=null&&(P[0]=K.height);t:{if(F=new on,(P=new ht).data=g,P.w=v,P.ha=x,P.kd=1,v=[0],t(P!=null),((g=zw(P.data,P.w,P.ha,null,null,null,v,null,P))==0||g==7)&&v[0]&&(g=4),(v=g)==0){if(t(R!=null),F.data=P.data,F.w=P.w+P.offset,F.ha=P.ha-P.offset,F.put=Ht,F.ac=NA,F.bc=Hn,F.ma=R,P.xa){if((g=PA())==null){R=1;break t}if(function(J,lt){var ft=[0],Bt=[0],gt=[0];e:for(;;){if(J==null)return 0;if(lt==null)return J.a=2,0;if(J.l=lt,J.a=0,ut(J.m,lt.data,lt.w,lt.ha),!ha(J.m,ft,Bt,gt)){J.a=3;break e}if(J.xb=VT,lt.width=ft[0],lt.height=Bt[0],!Oi(ft[0],Bt[0],1,J,null))break e;return 1}return t(J.a!=0),0}(g,F)){if(F=(v=H0(F.width,F.height,R.Oa,R.ba))==0){e:{F=g;r:for(;;){if(F==null){F=0;break e}if(t(F.s.yc!=null),t(F.s.Ya!=null),t(0<F.s.Wb),t((x=F.l)!=null),t((P=x.ma)!=null),F.xb!=0){if(F.ca=P.ba,F.tb=P.tb,t(F.ca!=null),!MA(P.Oa,x,Zw)){F.a=2;break r}if(!Ja(F,x.width)||x.da)break r;if((x.da||Ae(F.ca.S))&&ri(),11>F.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),F.ca.f.kb.F!=null&&ri()),F.Pb&&0<F.s.ua&&F.s.vb.X==null&&!z(F.s.vb,F.s.Wa.Xa)){F.a=1;break r}F.xb=0}if(!Gn(F,F.V,F.Ba,F.c,F.i,x.o,Vn))break r;P.Dc=F.Ma,F=1;break e}t(F.a!=0),F=0}F=!F}F&&(v=g.a)}else v=g.a}else{if((g=new su)==null){R=1;break t}if(g.Fa=P.na,g.P=P.P,g.qc=P.Sa,Ys(g,F)){if((v=H0(F.width,F.height,R.Oa,R.ba))==0){if(g.Aa=0,x=R.Oa,t((P=g)!=null),x!=null){if(0<(G=0>(G=x.Md)?0:100<G?255:255*G/100)){for(Y=at=0;4>Y;++Y)12>(pt=P.pb[Y]).lc&&(pt.ia=G*B6[0>pt.lc?0:pt.lc]>>3),at|=pt.ia;at&&(alert("todo:VP8InitRandom"),P.ia=1)}P.Ga=x.Id,100<P.Ga?P.Ga=100:0>P.Ga&&(P.Ga=0)}(function(J,lt){if(J==null)return 0;if(lt==null)return je(J,2,"NULL VP8Io parameter in VP8Decode().");if(!J.cb&&!Ys(J,lt))return 0;if(t(J.cb),lt.ac==null||lt.ac(lt)){lt.ob&&(J.L=0);var ft=n2[J.L];if(J.L==2?(J.yb=0,J.zb=0):(J.yb=lt.v-ft>>4,J.zb=lt.j-ft>>4,0>J.yb&&(J.yb=0),0>J.zb&&(J.zb=0)),J.Va=lt.o+15+ft>>4,J.Hb=lt.va+15+ft>>4,J.Hb>J.za&&(J.Hb=J.za),J.Va>J.Ub&&(J.Va=J.Ub),0<J.L){var Bt=J.ed;for(ft=0;4>ft;++ft){var gt;if(J.Qa.Cb){var Ct=J.Qa.Lb[ft];J.Qa.Fb||(Ct+=Bt.Tb)}else Ct=Bt.Tb;for(gt=0;1>=gt;++gt){var Et=J.gd[ft][gt],Ut=Ct;if(Bt.Pc&&(Ut+=Bt.vd[0],gt&&(Ut+=Bt.od[0])),0<(Ut=0>Ut?0:63<Ut?63:Ut)){var It=Ut;0<Bt.wb&&(It=4<Bt.wb?It>>2:It>>1)>9-Bt.wb&&(It=9-Bt.wb),1>It&&(It=1),Et.dd=It,Et.tc=2*Ut+It,Et.ld=40<=Ut?2:15<=Ut?1:0}else Et.tc=0;Et.La=gt}}}ft=0}else je(J,6,"Frame setup failed"),ft=J.a;if(ft=ft==0){if(ft){J.$c=0,0<J.Aa||(J.Ic=C6);e:{ft=J.Ic,Bt=4*(It=J.za);var he=32*It,Yt=It+1,De=0<J.L?It*(0<J.Aa?2:1):0,ae=(J.Aa==2?2:1)*It;if((Et=Bt+832+(gt=3*(16*ft+n2[J.L])/2*he)+(Ct=J.Fa!=null&&0<J.Fa.length?J.Kc.c*J.Kc.i:0))!=Et)ft=0;else{if(Et>J.Vb){if(J.Vb=0,J.Ec=s(Et),J.Fc=0,J.Ec==null){ft=je(J,1,"no memory during frame initialization.");break e}J.Vb=Et}Et=J.Ec,Ut=J.Fc,J.Ac=Et,J.Bc=Ut,Ut+=Bt,J.Gd=A(he,ar),J.Hd=0,J.rb=A(Yt+1,xt),J.sb=1,J.wa=De?A(De,Z):null,J.Y=0,J.D.Nb=0,J.D.wa=J.wa,J.D.Y=J.Y,0<J.Aa&&(J.D.Y+=It),t(!0),J.oc=Et,J.pc=Ut,Ut+=832,J.ya=A(ae,We),J.aa=0,J.D.ya=J.ya,J.D.aa=J.aa,J.Aa==2&&(J.D.aa+=It),J.R=16*It,J.B=8*It,It=(he=n2[J.L])*J.R,he=he/2*J.B,J.sa=Et,J.ta=Ut+It,J.qa=J.sa,J.ra=J.ta+16*ft*J.R+he,J.Ha=J.qa,J.Ia=J.ra+8*ft*J.B+he,J.$c=0,Ut+=gt,J.mb=Ct?Et:null,J.nb=Ct?Ut:null,t(Ut+Ct<=J.Fc+J.Vb),L0(J),i(J.Ac,J.Bc,0,Bt),ft=1}}if(ft){if(lt.ka=0,lt.y=J.sa,lt.O=J.ta,lt.f=J.qa,lt.N=J.ra,lt.ea=J.Ha,lt.Vd=J.Ia,lt.fa=J.R,lt.Rc=J.B,lt.F=null,lt.J=0,!OT){for(ft=-255;255>=ft;++ft)NT[255+ft]=0>ft?-ft:ft;for(ft=-1020;1020>=ft;++ft)PT[1020+ft]=-128>ft?-128:127<ft?127:ft;for(ft=-112;112>=ft;++ft)MT[112+ft]=-16>ft?-16:15<ft?15:ft;for(ft=-255;510>=ft;++ft)kT[255+ft]=0>ft?0:255<ft?255:ft;OT=1}Tc=Rw,rl=FC,Gd=TC,Wn=IC,no=to,Ic=Dw,Nr=Vw,Pr=Gw,Ci=$w,Yi=b,il=jw,j0=lu,jd=N,Xw=X,FT=Pd,TT=O0,IT=Md,_T=Kw,da[0]=MC,da[1]=Ld,da[2]=NC,da[3]=PC,da[4]=kC,da[5]=Yo,da[6]=OC,da[7]=Jo,da[8]=RC,da[9]=DC,_c[0]=Hw,_c[1]=_C,_c[2]=UC,_c[3]=LC,_c[4]=Cc,_c[5]=QC,_c[6]=au,nl[0]=HC,nl[1]=Q0,nl[2]=Qd,nl[3]=N0,nl[4]=KC,nl[5]=Nd,nl[6]=P0,ft=1}else ft=0}ft&&(ft=function(qe,Ji){for(qe.M=0;qe.M<qe.Va;++qe.M){var Re,oe=qe.Jc[qe.M&qe.Xb],Ot=qe.m,xi=qe;for(Re=0;Re<xi.za;++Re){var Le=Ot,Ze=xi,Vr=Ze.Ac,Cn=Ze.Bc+4*Re,ds=Ze.zc,li=Ze.ya[Ze.aa+Re];if(Ze.Qa.Bb?li.$b=yt(Le,Ze.Pa.jb[0])?2+yt(Le,Ze.Pa.jb[2]):yt(Le,Ze.Pa.jb[1]):li.$b=0,Ze.kc&&(li.Ad=yt(Le,Ze.Bd)),li.Za=!yt(Le,145)+0,li.Za){var zn=li.Ob,gs=0;for(Ze=0;4>Ze;++Ze){var Zi,er=ds[0+Ze];for(Zi=0;4>Zi;++Zi){er=o6[Vr[Cn+Zi]][er];for(var dr=KT[yt(Le,er[0])];0<dr;)dr=KT[2*dr+yt(Le,er[dr])];er=-dr,Vr[Cn+Zi]=er}r(zn,gs,Vr,Cn,4),gs+=4,ds[0+Ze]=er}}else er=yt(Le,156)?yt(Le,128)?1:3:yt(Le,163)?2:0,li.Ob[0]=er,i(Vr,Cn,er,4),i(ds,0,er,4);li.Dd=yt(Le,142)?yt(Le,114)?yt(Le,183)?1:3:2:0}if(xi.m.Ka)return je(qe,7,"Premature end-of-partition0 encountered.");for(;qe.ja<qe.za;++qe.ja){if(xi=oe,Le=(Ot=qe).rb[Ot.sb-1],Vr=Ot.rb[Ot.sb+Ot.ja],Re=Ot.ya[Ot.aa+Ot.ja],Cn=Ot.kc?Re.Ad:0)Le.la=Vr.la=0,Re.Za||(Le.Na=Vr.Na=0),Re.Hc=0,Re.Gc=0,Re.ia=0;else{var ci,gr;if(Le=Vr,Vr=xi,Cn=Ot.Pa.Xc,ds=Ot.ya[Ot.aa+Ot.ja],li=Ot.pb[ds.$b],Ze=ds.ad,zn=0,gs=Ot.rb[Ot.sb-1],er=Zi=0,i(Ze,zn,0,384),ds.Za)var xn=0,ga=Cn[3];else{dr=s(16);var Ei=Le.Na+gs.Na;if(Ei=W0(Vr,Cn[1],Ei,li.Eb,0,dr,0),Le.Na=gs.Na=(0<Ei)+0,1<Ei)Tc(dr,0,Ze,zn);else{var Ms=dr[0]+3>>3;for(dr=0;256>dr;dr+=16)Ze[zn+dr]=Ms}xn=1,ga=Cn[0]}var Ir=15&Le.la,tn=15&gs.la;for(dr=0;4>dr;++dr){var tA=1&tn;for(Ms=gr=0;4>Ms;++Ms)Ir=Ir>>1|(tA=(Ei=W0(Vr,ga,Ei=tA+(1&Ir),li.Sc,xn,Ze,zn))>xn)<<7,gr=gr<<2|(3<Ei?3:1<Ei?2:Ze[zn+0]!=0),zn+=16;Ir>>=4,tn=tn>>1|tA<<7,Zi=(Zi<<8|gr)>>>0}for(ga=Ir,xn=tn>>4,ci=0;4>ci;ci+=2){for(gr=0,Ir=Le.la>>4+ci,tn=gs.la>>4+ci,dr=0;2>dr;++dr){for(tA=1&tn,Ms=0;2>Ms;++Ms)Ei=tA+(1&Ir),Ir=Ir>>1|(tA=0<(Ei=W0(Vr,Cn[2],Ei,li.Qc,0,Ze,zn)))<<3,gr=gr<<2|(3<Ei?3:1<Ei?2:Ze[zn+0]!=0),zn+=16;Ir>>=2,tn=tn>>1|tA<<5}er|=gr<<4*ci,ga|=Ir<<4<<ci,xn|=(240&tn)<<ci}Le.la=ga,gs.la=xn,ds.Hc=Zi,ds.Gc=er,ds.ia=43690&er?0:li.ia,Cn=!(Zi|er)}if(0<Ot.L&&(Ot.wa[Ot.Y+Ot.ja]=Ot.gd[Re.$b][Re.Za],Ot.wa[Ot.Y+Ot.ja].La|=!Cn),xi.Ka)return je(qe,7,"Premature end-of-file encountered.")}if(L0(qe),Ot=Ji,xi=1,Re=(oe=qe).D,Le=0<oe.L&&oe.M>=oe.zb&&oe.M<=oe.Va,oe.Aa==0)e:{if(Re.M=oe.M,Re.uc=Le,Dd(oe,Re),xi=1,Re=(gr=oe.D).Nb,Le=(er=n2[oe.L])*oe.R,Vr=er/2*oe.B,dr=16*Re*oe.R,Ms=8*Re*oe.B,Cn=oe.sa,ds=oe.ta-Le+dr,li=oe.qa,Ze=oe.ra-Vr+Ms,zn=oe.Ha,gs=oe.Ia-Vr+Ms,tn=(Ir=gr.M)==0,Zi=Ir>=oe.Va-1,oe.Aa==2&&Dd(oe,gr),gr.uc)for(tA=(Ei=oe).D.M,t(Ei.D.uc),gr=Ei.yb;gr<Ei.Hb;++gr){xn=gr,ga=tA;var ps=(eA=(En=Ei).D).Nb;ci=En.R;var eA=eA.wa[eA.Y+xn],rA=En.sa,ks=En.ta+16*ps*ci+16*xn,iA=eA.dd,Mr=eA.tc;if(Mr!=0)if(t(3<=Mr),En.L==1)0<xn&&TT(rA,ks,ci,Mr+4),eA.La&&_T(rA,ks,ci,Mr),0<ga&&FT(rA,ks,ci,Mr+4),eA.La&&IT(rA,ks,ci,Mr);else{var nA=En.B,pa=En.qa,bu=En.ra+8*ps*nA+8*xn,sl=En.Ha,En=En.Ia+8*ps*nA+8*xn;ps=eA.ld,0<xn&&(Pr(rA,ks,ci,Mr+4,iA,ps),Yi(pa,bu,sl,En,nA,Mr+4,iA,ps)),eA.La&&(j0(rA,ks,ci,Mr,iA,ps),Xw(pa,bu,sl,En,nA,Mr,iA,ps)),0<ga&&(Nr(rA,ks,ci,Mr+4,iA,ps),Ci(pa,bu,sl,En,nA,Mr+4,iA,ps)),eA.La&&(il(rA,ks,ci,Mr,iA,ps),jd(pa,bu,sl,En,nA,Mr,iA,ps))}}if(oe.ia&&alert("todo:DitherRow"),Ot.put!=null){if(gr=16*Ir,Ir=16*(Ir+1),tn?(Ot.y=oe.sa,Ot.O=oe.ta+dr,Ot.f=oe.qa,Ot.N=oe.ra+Ms,Ot.ea=oe.Ha,Ot.W=oe.Ia+Ms):(gr-=er,Ot.y=Cn,Ot.O=ds,Ot.f=li,Ot.N=Ze,Ot.ea=zn,Ot.W=gs),Zi||(Ir-=er),Ir>Ot.o&&(Ir=Ot.o),Ot.F=null,Ot.J=null,oe.Fa!=null&&0<oe.Fa.length&&gr<Ir&&(Ot.J=Di(oe,Ot,gr,Ir-gr),Ot.F=oe.mb,Ot.F==null&&Ot.F.length==0)){xi=je(oe,3,"Could not decode alpha data.");break e}gr<Ot.j&&(er=Ot.j-gr,gr=Ot.j,t(!(1&er)),Ot.O+=oe.R*er,Ot.N+=oe.B*(er>>1),Ot.W+=oe.B*(er>>1),Ot.F!=null&&(Ot.J+=Ot.width*er)),gr<Ir&&(Ot.O+=Ot.v,Ot.N+=Ot.v>>1,Ot.W+=Ot.v>>1,Ot.F!=null&&(Ot.J+=Ot.v),Ot.ka=gr-Ot.j,Ot.U=Ot.va-Ot.v,Ot.T=Ir-gr,xi=Ot.put(Ot))}Re+1!=oe.Ic||Zi||(r(oe.sa,oe.ta-Le,Cn,ds+16*oe.R,Le),r(oe.qa,oe.ra-Vr,li,Ze+8*oe.B,Vr),r(oe.Ha,oe.Ia-Vr,zn,gs+8*oe.B,Vr))}if(!xi)return je(qe,6,"Output aborted.")}return 1}(J,lt)),lt.bc!=null&<.bc(lt),ft&=1}return ft?(J.cb=0,ft):0})(g,F)||(v=g.a)}}else v=g.a}v==0&&R.Oa!=null&&R.Oa.fd&&(v=gu(R.ba))}R=v}O=R!=0?null:11>O?K.f.RGBA.eb:K.f.kb.y}else O=null;return O};var qT=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(Q,W){for(var U="",D=0;D<4;D++)U+=String.fromCharCode(Q[W++]);return U}function h(Q,W){return Q[W+0]|Q[W+1]<<8}function u(Q,W){return(Q[W+0]|Q[W+1]<<8|Q[W+2]<<16)>>>0}function d(Q,W){return(Q[W+0]|Q[W+1]<<8|Q[W+2]<<16|Q[W+3]<<24)>>>0}new o;var f=[0],p=[0],m=[],y=new o,w=n,B=function(Q,W){var U={},D=0,j=!1,V=0,st=0;if(U.frames=[],!function(M,$){for(var q=0;q<4;q++)if(M[$+q]!="RIFF".charCodeAt(q))return!0;return!1}(Q,W)){for(d(Q,W+=4),W+=8;W<Q.length;){var rt=l(Q,W),it=d(Q,W+=4);W+=4;var At=it+(1&it);switch(rt){case"VP8 ":case"VP8L":U.frames[D]===void 0&&(U.frames[D]={}),(mt=U.frames[D]).src_off=j?st:W-8,mt.src_size=V+it+8,D++,j&&(j=!1,V=0,st=0);break;case"VP8X":(mt=U.header={}).feature_flags=Q[W];var ut=W+4;mt.canvas_width=1+u(Q,ut),ut+=3,mt.canvas_height=1+u(Q,ut),ut+=3;break;case"ALPH":j=!0,V=At+8,st=W-8;break;case"ANIM":(mt=U.header).bgcolor=d(Q,W),ut=W+4,mt.loop_count=h(Q,ut),ut+=2;break;case"ANMF":var vt,mt;(mt=U.frames[D]={}).offset_x=2*u(Q,W),W+=3,mt.offset_y=2*u(Q,W),W+=3,mt.width=1+u(Q,W),W+=3,mt.height=1+u(Q,W),W+=3,mt.duration=u(Q,W),W+=3,vt=Q[W++],mt.dispose=1&vt,mt.blend=vt>>1&1}rt!="ANMF"&&(W+=At)}return U}}(w,0);B.response=w,B.rgbaoutput=!0,B.dataurl=!1;var E=B.header?B.header:null,S=B.frames?B.frames:null;if(E){E.loop_counter=E.loop_count,f=[E.canvas_height],p=[E.canvas_width];for(var I=0;I<S.length&&S[I].blend!=0;I++);}var L=S[0],k=y.WebPDecodeRGBA(w,L.src_off,L.src_size,p,f);L.rgba=k,L.imgwidth=p[0],L.imgheight=f[0];for(var H=0;H<p[0]*f[0]*4;H++)m[H]=k[H];return this.width=p,this.height=f,this.data=m,this}/** ====================================================================
|
|
157
|
+
* @license
|
|
158
|
+
* jsPDF XMP metadata plugin
|
|
159
|
+
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|
160
|
+
*
|
|
161
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
162
|
+
* a copy of this software and associated documentation files (the
|
|
163
|
+
* "Software"), to deal in the Software without restriction, including
|
|
164
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
165
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
166
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
167
|
+
* the following conditions:
|
|
168
|
+
*
|
|
169
|
+
* The above copyright notice and this permission notice shall be
|
|
170
|
+
* included in all copies or substantial portions of the Software.
|
|
171
|
+
*
|
|
172
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
173
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
174
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
175
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
176
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
177
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
178
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
179
|
+
* ====================================================================
|
|
180
|
+
*/function c7(){var n,t=this.internal.__metadata__.metadata,e=unescape(encodeURIComponent(t));n=this.internal.__metadata__.rawXml?e:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function h7(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var t,e,r,i,s,A,a,o,l,h=function(M){return M=M||{},this.isStrokeTransparent=M.isStrokeTransparent||!1,this.strokeOpacity=M.strokeOpacity||1,this.strokeStyle=M.strokeStyle||"#000000",this.fillStyle=M.fillStyle||"#000000",this.isFillTransparent=M.isFillTransparent||!1,this.fillOpacity=M.fillOpacity||1,this.font=M.font||"10px sans-serif",this.textBaseline=M.textBaseline||"alphabetic",this.textAlign=M.textAlign||"left",this.lineWidth=M.lineWidth||1,this.lineJoin=M.lineJoin||"miter",this.lineCap=M.lineCap||"butt",this.path=M.path||[],this.transform=M.transform!==void 0?M.transform.clone():new o,this.globalCompositeOperation=M.globalCompositeOperation||"normal",this.globalAlpha=M.globalAlpha||1,this.clip_path=M.clip_path||[],this.currentPoint=M.currentPoint||new A,this.miterLimit=M.miterLimit||10,this.lastPoint=M.lastPoint||new A,this.lineDashOffset=M.lineDashOffset||0,this.lineDash=M.lineDash||[],this.margin=M.margin||[0,0,0,0],this.prevPageLastElemOffset=M.prevPageLastElemOffset||0,this.ignoreClearRect=typeof M.ignoreClearRect!="boolean"||M.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new u(this),t=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,A=this.internal.Point,a=this.internal.Rectangle,o=this.internal.Matrix,l=new h}]);var u=function(M){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var $=M;Object.defineProperty(this,"pdf",{get:function(){return $}});var q=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return q},set:function(z){q=!!z}});var tt=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return tt},set:function(z){tt=!!z}});var et=0;Object.defineProperty(this,"posX",{get:function(){return et},set:function(z){isNaN(z)||(et=z)}});var ot=0;Object.defineProperty(this,"posY",{get:function(){return ot},set:function(z){isNaN(z)||(ot=z)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(z){var Nt;typeof z=="number"?Nt=[z,z,z,z]:((Nt=new Array(4))[0]=z[0],Nt[1]=z.length>=2?z[1]:Nt[0],Nt[2]=z.length>=3?z[2]:Nt[0],Nt[3]=z.length>=4?z[3]:Nt[1]),l.margin=Nt}});var dt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return dt},set:function(z){dt=z}});var wt=0;Object.defineProperty(this,"lastBreak",{get:function(){return wt},set:function(z){wt=z}});var yt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return yt},set:function(z){yt=z}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(z){z instanceof h&&(l=z)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(z){l.path=z}});var St=[];Object.defineProperty(this,"ctxStack",{get:function(){return St},set:function(z){St=z}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(z){var Nt;Nt=d(z),this.ctx.fillStyle=Nt.style,this.ctx.isFillTransparent=Nt.a===0,this.ctx.fillOpacity=Nt.a,this.pdf.setFillColor(Nt.r,Nt.g,Nt.b,{a:Nt.a}),this.pdf.setTextColor(Nt.r,Nt.g,Nt.b,{a:Nt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(z){var Nt=d(z);this.ctx.strokeStyle=Nt.style,this.ctx.isStrokeTransparent=Nt.a===0,this.ctx.strokeOpacity=Nt.a,Nt.a===0?this.pdf.setDrawColor(255,255,255):(Nt.a,this.pdf.setDrawColor(Nt.r,Nt.g,Nt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(z){["butt","round","square"].indexOf(z)!==-1&&(this.ctx.lineCap=z,this.pdf.setLineCap(z))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(z){isNaN(z)||(this.ctx.lineWidth=z,this.pdf.setLineWidth(z))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(z){["bevel","round","miter"].indexOf(z)!==-1&&(this.ctx.lineJoin=z,this.pdf.setLineJoin(z))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(z){isNaN(z)||(this.ctx.miterLimit=z,this.pdf.setMiterLimit(z))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(z){this.ctx.textBaseline=z}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(z){["right","end","center","left","start"].indexOf(z)!==-1&&(this.ctx.textAlign=z)}});var Mt=null,Pt=null,jt=null;Object.defineProperty(this,"fontFaces",{get:function(){return jt},set:function(z){Mt=null,Pt=null,jt=z}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(z){var Nt;if(this.ctx.font=z,(Nt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(z))!==null){var ve=Nt[1];Nt[2];var re=Nt[3],Tt=Nt[4];Nt[5];var ie=Nt[6],kt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Tt)[2];Tt=Math.floor(kt==="px"?parseFloat(Tt)*this.pdf.internal.scaleFactor:kt==="em"?parseFloat(Tt)*this.pdf.getFontSize():parseFloat(Tt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Tt);var qt=function(Xt){var fr,Ge,Ce=[],xe=Xt.trim();if(xe==="")return S5;if(xe in a_)return[a_[xe]];for(;xe!=="";){switch(Ge=null,fr=(xe=l_(xe)).charAt(0)){case'"':case"'":Ge=n7(xe.substring(1),fr);break;default:Ge=s7(xe)}if(Ge===null||(Ce.push(Ge[0]),(xe=l_(Ge[1]))!==""&&xe.charAt(0)!==","))return S5;xe=xe.replace(/^,/,"")}return Ce}(ie);if(this.fontFaces){var Wt=function(Xt,fr){var Ge=Xt.getFontList(),Ce=JSON.stringify(Ge);if(Mt===null||Pt!==Ce){var xe=function(tr){var ne=[];return Object.keys(tr).forEach(function(ke){tr[ke].forEach(function(Ae){var ge=null;switch(Ae){case"bold":ge={family:ke,weight:"bold"};break;case"italic":ge={family:ke,style:"italic"};break;case"bolditalic":ge={family:ke,weight:"bold",style:"italic"};break;case"":case"normal":ge={family:ke}}ge!==null&&(ge.ref={name:ke,style:Ae},ne.push(ge))})}),ne}(Ge);Mt=function(tr){for(var ne={},ke=0;ke<tr.length;++ke){var Ae=E5(tr[ke]),ge=Ae.family,nr=Ae.stretch,fe=Ae.style,de=Ae.weight;ne[ge]=ne[ge]||{},ne[ge][nr]=ne[ge][nr]||{},ne[ge][nr][fe]=ne[ge][nr][fe]||{},ne[ge][nr][fe][de]=Ae}return ne}(xe.concat(fr)),Pt=Ce}return Mt}(this.pdf,this.fontFaces),we=qt.map(function(Xt){return{family:Xt,stretch:"normal",weight:re,style:ve}}),Ie=function(Xt,fr,Ge){for(var Ce=(Ge=Ge||{}).defaultFontFamily||"times",xe=Object.assign({},i7,Ge.genericFontFamilies||{}),tr=null,ne=null,ke=0;ke<fr.length;++ke)if(xe[(tr=E5(fr[ke])).family]&&(tr.family=xe[tr.family]),Xt.hasOwnProperty(tr.family)){ne=Xt[tr.family];break}if(!(ne=ne||Xt[Ce]))throw new Error("Could not find a font-family for the rule '"+o_(tr)+"' and default family '"+Ce+"'.");if(ne=function(Ae,ge){if(ge[Ae])return ge[Ae];var nr=vE[Ae],fe=nr<=vE.normal?-1:1,de=A_(ge,BN,nr,fe);if(!de)throw new Error("Could not find a matching font-stretch value for "+Ae);return de}(tr.stretch,ne),ne=function(Ae,ge){if(ge[Ae])return ge[Ae];for(var nr=bN[Ae],fe=0;fe<nr.length;++fe)if(ge[nr[fe]])return ge[nr[fe]];throw new Error("Could not find a matching font-style for "+Ae)}(tr.style,ne),!(ne=function(Ae,ge){if(ge[Ae])return ge[Ae];if(Ae===400&&ge[500])return ge[500];if(Ae===500&&ge[400])return ge[400];var nr=r7[Ae],fe=A_(ge,CN,nr,Ae<400?-1:1);if(!fe)throw new Error("Could not find a matching font-weight for value "+Ae);return fe}(tr.weight,ne)))throw new Error("Failed to resolve a font for the rule '"+o_(tr)+"'.");return ne}(Wt,we);this.pdf.setFont(Ie.ref.name,Ie.ref.style)}else{var me="";(re==="bold"||parseInt(re,10)>=700||ve==="bold")&&(me="bold"),ve==="italic"&&(me+="italic"),me.length===0&&(me="normal");for(var _e="",Be={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Vt=0;Vt<qt.length;Vt++){if(this.pdf.internal.getFont(qt[Vt],me,{noFallback:!0,disableWarning:!0})!==void 0){_e=qt[Vt];break}if(me==="bolditalic"&&this.pdf.internal.getFont(qt[Vt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)_e=qt[Vt],me="bold";else if(this.pdf.internal.getFont(qt[Vt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){_e=qt[Vt],me="normal";break}}if(_e===""){for(var ce=0;ce<qt.length;ce++)if(Be[qt[ce]]){_e=Be[qt[ce]];break}}_e=_e===""?"Times":_e,this.pdf.setFont(_e,me)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(z){this.ctx.globalCompositeOperation=z}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(z){this.ctx.globalAlpha=z}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(z){this.ctx.lineDashOffset=z,mt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(z){this.ctx.lineDash=z,mt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(z){this.ctx.ignoreClearRect=!!z}})};u.prototype.setLineDash=function(M){this.lineDash=M},u.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},u.prototype.fill=function(){S.call(this,"fill",!1)},u.prototype.stroke=function(){S.call(this,"stroke",!1)},u.prototype.beginPath=function(){this.path=[{type:"begin"}]},u.prototype.moveTo=function(M,$){if(isNaN(M)||isNaN($))throw _r.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var q=this.ctx.transform.applyToPoint(new A(M,$));this.path.push({type:"mt",x:q.x,y:q.y}),this.ctx.lastPoint=new A(M,$)},u.prototype.closePath=function(){var M=new A(0,0),$=0;for($=this.path.length-1;$!==-1;$--)if(this.path[$].type==="begin"&&sr(this.path[$+1])==="object"&&typeof this.path[$+1].x=="number"){M=new A(this.path[$+1].x,this.path[$+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new A(M.x,M.y)},u.prototype.lineTo=function(M,$){if(isNaN(M)||isNaN($))throw _r.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var q=this.ctx.transform.applyToPoint(new A(M,$));this.path.push({type:"lt",x:q.x,y:q.y}),this.ctx.lastPoint=new A(q.x,q.y)},u.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),S.call(this,null,!0)},u.prototype.quadraticCurveTo=function(M,$,q,tt){if(isNaN(q)||isNaN(tt)||isNaN(M)||isNaN($))throw _r.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var et=this.ctx.transform.applyToPoint(new A(q,tt)),ot=this.ctx.transform.applyToPoint(new A(M,$));this.path.push({type:"qct",x1:ot.x,y1:ot.y,x:et.x,y:et.y}),this.ctx.lastPoint=new A(et.x,et.y)},u.prototype.bezierCurveTo=function(M,$,q,tt,et,ot){if(isNaN(et)||isNaN(ot)||isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw _r.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var dt=this.ctx.transform.applyToPoint(new A(et,ot)),wt=this.ctx.transform.applyToPoint(new A(M,$)),yt=this.ctx.transform.applyToPoint(new A(q,tt));this.path.push({type:"bct",x1:wt.x,y1:wt.y,x2:yt.x,y2:yt.y,x:dt.x,y:dt.y}),this.ctx.lastPoint=new A(dt.x,dt.y)},u.prototype.arc=function(M,$,q,tt,et,ot){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt)||isNaN(et))throw _r.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ot=!!ot,!this.ctx.transform.isIdentity){var dt=this.ctx.transform.applyToPoint(new A(M,$));M=dt.x,$=dt.y;var wt=this.ctx.transform.applyToPoint(new A(0,q)),yt=this.ctx.transform.applyToPoint(new A(0,0));q=Math.sqrt(Math.pow(wt.x-yt.x,2)+Math.pow(wt.y-yt.y,2))}Math.abs(et-tt)>=2*Math.PI&&(tt=0,et=2*Math.PI),this.path.push({type:"arc",x:M,y:$,radius:q,startAngle:tt,endAngle:et,counterclockwise:ot})},u.prototype.arcTo=function(M,$,q,tt,et){throw new Error("arcTo not implemented.")},u.prototype.rect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw _r.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(M,$),this.lineTo(M+q,$),this.lineTo(M+q,$+tt),this.lineTo(M,$+tt),this.lineTo(M,$),this.lineTo(M+q,$),this.lineTo(M,$)},u.prototype.fillRect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw _r.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var et={};this.lineCap!=="butt"&&(et.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(et.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(M,$,q,tt),this.fill(),et.hasOwnProperty("lineCap")&&(this.lineCap=et.lineCap),et.hasOwnProperty("lineJoin")&&(this.lineJoin=et.lineJoin)}},u.prototype.strokeRect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw _r.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(M,$,q,tt),this.stroke())},u.prototype.clearRect=function(M,$,q,tt){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt))throw _r.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(M,$,q,tt))},u.prototype.save=function(M){M=typeof M!="boolean"||M;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,q=0;q<this.pdf.internal.getNumberOfPages();q++)this.pdf.setPage(q+1),this.pdf.internal.out("q");if(this.pdf.setPage($),M){this.ctx.fontSize=this.pdf.internal.getFontSize();var tt=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=tt}},u.prototype.restore=function(M){M=typeof M!="boolean"||M;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,q=0;q<this.pdf.internal.getNumberOfPages();q++)this.pdf.setPage(q+1),this.pdf.internal.out("Q");this.pdf.setPage($),M&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},u.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(M){var $,q,tt,et;if(M.isCanvasGradient===!0&&(M=M.getColor()),!M)return{r:0,g:0,b:0,a:0,style:M};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(M))$=0,q=0,tt=0,et=0;else{var ot=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(M);if(ot!==null)$=parseInt(ot[1]),q=parseInt(ot[2]),tt=parseInt(ot[3]),et=1;else if((ot=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(M))!==null)$=parseInt(ot[1]),q=parseInt(ot[2]),tt=parseInt(ot[3]),et=parseFloat(ot[4]);else{if(et=1,typeof M=="string"&&M.charAt(0)!=="#"){var dt=new dN(M);M=dt.ok?dt.toHex():"#000000"}M.length===4?($=M.substring(1,2),$+=$,q=M.substring(2,3),q+=q,tt=M.substring(3,4),tt+=tt):($=M.substring(1,3),q=M.substring(3,5),tt=M.substring(5,7)),$=parseInt($,16),q=parseInt(q,16),tt=parseInt(tt,16)}}return{r:$,g:q,b:tt,a:et,style:M}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};u.prototype.fillText=function(M,$,q,tt){if(isNaN($)||isNaN(q)||typeof M!="string")throw _r.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(tt=isNaN(tt)?void 0:tt,!f.call(this)){var et=At(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;D.call(this,{text:M,x:$,y:q,scale:ot,angle:et,align:this.textAlign,maxWidth:tt})}},u.prototype.strokeText=function(M,$,q,tt){if(isNaN($)||isNaN(q)||typeof M!="string")throw _r.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){tt=isNaN(tt)?void 0:tt;var et=At(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;D.call(this,{text:M,x:$,y:q,scale:ot,renderingMode:"stroke",angle:et,align:this.textAlign,maxWidth:tt})}},u.prototype.measureText=function(M){if(typeof M!="string")throw _r.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var $=this.pdf,q=this.pdf.internal.scaleFactor,tt=$.internal.getFontSize(),et=$.getStringUnitWidth(M)*tt/$.internal.scaleFactor;return new function(ot){var dt=(ot=ot||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return dt}}),this}({width:et*=Math.round(96*q/72*1e4)/1e4})},u.prototype.scale=function(M,$){if(isNaN(M)||isNaN($))throw _r.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var q=new o(M,0,0,$,0,0);this.ctx.transform=this.ctx.transform.multiply(q)},u.prototype.rotate=function(M){if(isNaN(M))throw _r.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var $=new o(Math.cos(M),Math.sin(M),-Math.sin(M),Math.cos(M),0,0);this.ctx.transform=this.ctx.transform.multiply($)},u.prototype.translate=function(M,$){if(isNaN(M)||isNaN($))throw _r.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var q=new o(1,0,0,1,M,$);this.ctx.transform=this.ctx.transform.multiply(q)},u.prototype.transform=function(M,$,q,tt,et,ot){if(isNaN(M)||isNaN($)||isNaN(q)||isNaN(tt)||isNaN(et)||isNaN(ot))throw _r.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var dt=new o(M,$,q,tt,et,ot);this.ctx.transform=this.ctx.transform.multiply(dt)},u.prototype.setTransform=function(M,$,q,tt,et,ot){M=isNaN(M)?1:M,$=isNaN($)?0:$,q=isNaN(q)?0:q,tt=isNaN(tt)?1:tt,et=isNaN(et)?0:et,ot=isNaN(ot)?0:ot,this.ctx.transform=new o(M,$,q,tt,et,ot)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};u.prototype.drawImage=function(M,$,q,tt,et,ot,dt,wt,yt){var St=this.pdf.getImageProperties(M),Mt=1,Pt=1,jt=1,z=1;tt!==void 0&&wt!==void 0&&(jt=wt/tt,z=yt/et,Mt=St.width/tt*wt/tt,Pt=St.height/et*yt/et),ot===void 0&&(ot=$,dt=q,$=0,q=0),tt!==void 0&&wt===void 0&&(wt=tt,yt=et),tt===void 0&&wt===void 0&&(wt=St.width,yt=St.height);var Nt=this.ctx.transform.decompose(),ve=At(Nt.rotate.shx),re=new o,Tt=(re=(re=(re=re.multiply(Nt.translate)).multiply(Nt.skew)).multiply(Nt.scale)).applyToRectangle(new a(ot-$*jt,dt-q*z,tt*Mt,et*Pt));if(this.autoPaging){for(var ie,kt=y.call(this,Tt),qt=[],Wt=0;Wt<kt.length;Wt+=1)qt.indexOf(kt[Wt])===-1&&qt.push(kt[Wt]);E(qt);for(var we=qt[0],Ie=qt[qt.length-1],me=we;me<Ie+1;me++){this.pdf.setPage(me);var _e=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Be=me===1?this.posY+this.margin[0]:this.margin[0],Vt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ce=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Xt=me===1?0:Vt+(me-2)*ce;if(this.ctx.clip_path.length!==0){var fr=this.path;ie=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(ie,this.posX+this.margin[3],-Xt+Be+this.ctx.prevPageLastElemOffset),I.call(this,"fill",!0),this.path=fr}var Ge=JSON.parse(JSON.stringify(Tt));Ge=B([Ge],this.posX+this.margin[3],-Xt+Be+this.ctx.prevPageLastElemOffset)[0];var Ce=(me>we||me<Ie)&&m.call(this);Ce&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_e,ce,null).clip().discardPath()),this.pdf.addImage(M,"JPEG",Ge.x,Ge.y,Ge.w,Ge.h,null,null,ve),Ce&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(M,"JPEG",Tt.x,Tt.y,Tt.w,Tt.h,null,null,ve)};var y=function(M,$,q){var tt=[];$=$||this.pdf.internal.pageSize.width,q=q||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var et=this.posY+this.ctx.prevPageLastElemOffset;switch(M.type){default:case"mt":case"lt":tt.push(Math.floor((M.y+et)/q)+1);break;case"arc":tt.push(Math.floor((M.y+et-M.radius)/q)+1),tt.push(Math.floor((M.y+et+M.radius)/q)+1);break;case"qct":var ot=ut(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x,M.y);tt.push(Math.floor((ot.y+et)/q)+1),tt.push(Math.floor((ot.y+ot.h+et)/q)+1);break;case"bct":var dt=vt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x2,M.y2,M.x,M.y);tt.push(Math.floor((dt.y+et)/q)+1),tt.push(Math.floor((dt.y+dt.h+et)/q)+1);break;case"rect":tt.push(Math.floor((M.y+et)/q)+1),tt.push(Math.floor((M.y+M.h+et)/q)+1)}for(var wt=0;wt<tt.length;wt+=1)for(;this.pdf.internal.getNumberOfPages()<tt[wt];)w.call(this);return tt},w=function(){var M=this.fillStyle,$=this.strokeStyle,q=this.font,tt=this.lineCap,et=this.lineWidth,ot=this.lineJoin;this.pdf.addPage(),this.fillStyle=M,this.strokeStyle=$,this.font=q,this.lineCap=tt,this.lineWidth=et,this.lineJoin=ot},B=function(M,$,q){for(var tt=0;tt<M.length;tt++)switch(M[tt].type){case"bct":M[tt].x2+=$,M[tt].y2+=q;case"qct":M[tt].x1+=$,M[tt].y1+=q;default:M[tt].x+=$,M[tt].y+=q}return M},E=function(M){return M.sort(function($,q){return $-q})},S=function(M,$){var q=this.fillStyle,tt=this.strokeStyle,et=this.lineCap,ot=this.lineWidth,dt=Math.abs(ot*this.ctx.transform.scaleX),wt=this.lineJoin;if(this.autoPaging){for(var yt,St,Mt=JSON.parse(JSON.stringify(this.path)),Pt=JSON.parse(JSON.stringify(this.path)),jt=[],z=0;z<Pt.length;z++)if(Pt[z].x!==void 0)for(var Nt=y.call(this,Pt[z]),ve=0;ve<Nt.length;ve+=1)jt.indexOf(Nt[ve])===-1&&jt.push(Nt[ve]);for(var re=0;re<jt.length;re++)for(;this.pdf.internal.getNumberOfPages()<jt[re];)w.call(this);E(jt);for(var Tt=jt[0],ie=jt[jt.length-1],kt=Tt;kt<ie+1;kt++){this.pdf.setPage(kt),this.fillStyle=q,this.strokeStyle=tt,this.lineCap=et,this.lineWidth=dt,this.lineJoin=wt;var qt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Wt=kt===1?this.posY+this.margin[0]:this.margin[0],we=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ie=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],me=kt===1?0:we+(kt-2)*Ie;if(this.ctx.clip_path.length!==0){var _e=this.path;yt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(yt,this.posX+this.margin[3],-me+Wt+this.ctx.prevPageLastElemOffset),I.call(this,M,!0),this.path=_e}if(St=JSON.parse(JSON.stringify(Mt)),this.path=B(St,this.posX+this.margin[3],-me+Wt+this.ctx.prevPageLastElemOffset),$===!1||kt===0){var Be=(kt>Tt||kt<ie)&&m.call(this);Be&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qt,Ie,null).clip().discardPath()),I.call(this,M,$),Be&&this.pdf.restoreGraphicsState()}this.lineWidth=ot}this.path=Mt}else this.lineWidth=dt,I.call(this,M,$),this.lineWidth=ot},I=function(M,$){if((M!=="stroke"||$||!p.call(this))&&(M==="stroke"||$||!f.call(this))){for(var q,tt,et=[],ot=this.path,dt=0;dt<ot.length;dt++){var wt=ot[dt];switch(wt.type){case"begin":et.push({begin:!0});break;case"close":et.push({close:!0});break;case"mt":et.push({start:wt,deltas:[],abs:[]});break;case"lt":var yt=et.length;if(ot[dt-1]&&!isNaN(ot[dt-1].x)&&(q=[wt.x-ot[dt-1].x,wt.y-ot[dt-1].y],yt>0)){for(;yt>=0;yt--)if(et[yt-1].close!==!0&&et[yt-1].begin!==!0){et[yt-1].deltas.push(q),et[yt-1].abs.push(wt);break}}break;case"bct":q=[wt.x1-ot[dt-1].x,wt.y1-ot[dt-1].y,wt.x2-ot[dt-1].x,wt.y2-ot[dt-1].y,wt.x-ot[dt-1].x,wt.y-ot[dt-1].y],et[et.length-1].deltas.push(q);break;case"qct":var St=ot[dt-1].x+2/3*(wt.x1-ot[dt-1].x),Mt=ot[dt-1].y+2/3*(wt.y1-ot[dt-1].y),Pt=wt.x+2/3*(wt.x1-wt.x),jt=wt.y+2/3*(wt.y1-wt.y),z=wt.x,Nt=wt.y;q=[St-ot[dt-1].x,Mt-ot[dt-1].y,Pt-ot[dt-1].x,jt-ot[dt-1].y,z-ot[dt-1].x,Nt-ot[dt-1].y],et[et.length-1].deltas.push(q);break;case"arc":et.push({deltas:[],abs:[],arc:!0}),Array.isArray(et[et.length-1].abs)&&et[et.length-1].abs.push(wt)}}tt=$?null:M==="stroke"?"stroke":"fill";for(var ve=!1,re=0;re<et.length;re++)if(et[re].arc)for(var Tt=et[re].abs,ie=0;ie<Tt.length;ie++){var kt=Tt[ie];kt.type==="arc"?H.call(this,kt.x,kt.y,kt.radius,kt.startAngle,kt.endAngle,kt.counterclockwise,void 0,$,!ve):j.call(this,kt.x,kt.y),ve=!0}else if(et[re].close===!0)this.pdf.internal.out("h"),ve=!1;else if(et[re].begin!==!0){var qt=et[re].start.x,Wt=et[re].start.y;V.call(this,et[re].deltas,qt,Wt),ve=!0}tt&&Q.call(this,tt),$&&W.call(this)}},L=function(M){var $=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,q=$*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return M-q;case"top":return M+$-q;case"hanging":return M+$-2*q;case"middle":return M+$/2-q;default:return M}},k=function(M){return M+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};u.prototype.createLinearGradient=function(){var M=function(){};return M.colorStops=[],M.addColorStop=function($,q){this.colorStops.push([$,q])},M.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},M.isCanvasGradient=!0,M},u.prototype.createPattern=function(){return this.createLinearGradient()},u.prototype.createRadialGradient=function(){return this.createLinearGradient()};var H=function(M,$,q,tt,et,ot,dt,wt,yt){for(var St=rt.call(this,q,tt,et,ot),Mt=0;Mt<St.length;Mt++){var Pt=St[Mt];Mt===0&&(yt?U.call(this,Pt.x1+M,Pt.y1+$):j.call(this,Pt.x1+M,Pt.y1+$)),st.call(this,M,$,Pt.x2,Pt.y2,Pt.x3,Pt.y3,Pt.x4,Pt.y4)}wt?W.call(this):Q.call(this,dt)},Q=function(M){switch(M){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},W=function(){this.pdf.clip(),this.pdf.discardPath()},U=function(M,$){this.pdf.internal.out(e(M)+" "+r($)+" m")},D=function(M){var $;switch(M.align){case"right":case"end":$="right";break;case"center":$="center";break;default:$="left"}var q,tt,et,ot=this.pdf.getTextDimensions(M.text),dt=L.call(this,M.y),wt=k.call(this,dt)-ot.h,yt=this.ctx.transform.applyToPoint(new A(M.x,dt));if(this.autoPaging){var St=this.ctx.transform.decompose(),Mt=new o;Mt=(Mt=(Mt=Mt.multiply(St.translate)).multiply(St.skew)).multiply(St.scale);for(var Pt=this.ctx.transform.applyToRectangle(new a(M.x,dt,ot.w,ot.h)),jt=Mt.applyToRectangle(new a(M.x,wt,ot.w,ot.h)),z=y.call(this,jt),Nt=[],ve=0;ve<z.length;ve+=1)Nt.indexOf(z[ve])===-1&&Nt.push(z[ve]);E(Nt);for(var re=Nt[0],Tt=Nt[Nt.length-1],ie=re;ie<Tt+1;ie++){this.pdf.setPage(ie);var kt=ie===1?this.posY+this.margin[0]:this.margin[0],qt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Wt=this.pdf.internal.pageSize.height-this.margin[2],we=Wt-this.margin[0],Ie=this.pdf.internal.pageSize.width-this.margin[1],me=Ie-this.margin[3],_e=ie===1?0:qt+(ie-2)*we;if(this.ctx.clip_path.length!==0){var Be=this.path;q=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(q,this.posX+this.margin[3],-1*_e+kt),I.call(this,"fill",!0),this.path=Be}var Vt=B([JSON.parse(JSON.stringify(jt))],this.posX+this.margin[3],-_e+kt+this.ctx.prevPageLastElemOffset)[0];M.scale>=.01&&(tt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(tt*M.scale),et=this.lineWidth,this.lineWidth=et*M.scale);var ce=this.autoPaging!=="text";if(ce||Vt.y+Vt.h<=Wt){if(ce||Vt.y>=kt&&Vt.x<=Ie){var Xt=ce?M.text:this.pdf.splitTextToSize(M.text,M.maxWidth||Ie-Vt.x)[0],fr=B([JSON.parse(JSON.stringify(Pt))],this.posX+this.margin[3],-_e+kt+this.ctx.prevPageLastElemOffset)[0],Ge=ce&&(ie>re||ie<Tt)&&m.call(this);Ge&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],me,we,null).clip().discardPath()),this.pdf.text(Xt,fr.x,fr.y,{angle:M.angle,align:$,renderingMode:M.renderingMode}),Ge&&this.pdf.restoreGraphicsState()}}else Vt.y<Wt&&(this.ctx.prevPageLastElemOffset+=Wt-Vt.y);M.scale>=.01&&(this.pdf.setFontSize(tt),this.lineWidth=et)}}else M.scale>=.01&&(tt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(tt*M.scale),et=this.lineWidth,this.lineWidth=et*M.scale),this.pdf.text(M.text,yt.x+this.posX,yt.y+this.posY,{angle:M.angle,align:$,renderingMode:M.renderingMode,maxWidth:M.maxWidth}),M.scale>=.01&&(this.pdf.setFontSize(tt),this.lineWidth=et)},j=function(M,$,q,tt){q=q||0,tt=tt||0,this.pdf.internal.out(e(M+q)+" "+r($+tt)+" l")},V=function(M,$,q){return this.pdf.lines(M,$,q,null,null)},st=function(M,$,q,tt,et,ot,dt,wt){this.pdf.internal.out([t(i(q+M)),t(s(tt+$)),t(i(et+M)),t(s(ot+$)),t(i(dt+M)),t(s(wt+$)),"c"].join(" "))},rt=function(M,$,q,tt){for(var et=2*Math.PI,ot=Math.PI/2;$>q;)$-=et;var dt=Math.abs(q-$);dt<et&&tt&&(dt=et-dt);for(var wt=[],yt=tt?-1:1,St=$;dt>1e-5;){var Mt=St+yt*Math.min(dt,ot);wt.push(it.call(this,M,St,Mt)),dt-=Math.abs(Mt-St),St=Mt}return wt},it=function(M,$,q){var tt=(q-$)/2,et=M*Math.cos(tt),ot=M*Math.sin(tt),dt=et,wt=-ot,yt=dt*dt+wt*wt,St=yt+dt*et+wt*ot,Mt=4/3*(Math.sqrt(2*yt*St)-St)/(dt*ot-wt*et),Pt=dt-Mt*wt,jt=wt+Mt*dt,z=Pt,Nt=-jt,ve=tt+$,re=Math.cos(ve),Tt=Math.sin(ve);return{x1:M*Math.cos($),y1:M*Math.sin($),x2:Pt*re-jt*Tt,y2:Pt*Tt+jt*re,x3:z*re-Nt*Tt,y3:z*Tt+Nt*re,x4:M*Math.cos(q),y4:M*Math.sin(q)}},At=function(M){return 180*M/Math.PI},ut=function(M,$,q,tt,et,ot){var dt=M+.5*(q-M),wt=$+.5*(tt-$),yt=et+.5*(q-et),St=ot+.5*(tt-ot),Mt=Math.min(M,et,dt,yt),Pt=Math.max(M,et,dt,yt),jt=Math.min($,ot,wt,St),z=Math.max($,ot,wt,St);return new a(Mt,jt,Pt-Mt,z-jt)},vt=function(M,$,q,tt,et,ot,dt,wt){var yt,St,Mt,Pt,jt,z,Nt,ve,re,Tt,ie,kt,qt,Wt,we=q-M,Ie=tt-$,me=et-q,_e=ot-tt,Be=dt-et,Vt=wt-ot;for(St=0;St<41;St++)re=(Nt=(Mt=M+(yt=St/40)*we)+yt*((jt=q+yt*me)-Mt))+yt*(jt+yt*(et+yt*Be-jt)-Nt),Tt=(ve=(Pt=$+yt*Ie)+yt*((z=tt+yt*_e)-Pt))+yt*(z+yt*(ot+yt*Vt-z)-ve),St==0?(ie=re,kt=Tt,qt=re,Wt=Tt):(ie=Math.min(ie,re),kt=Math.min(kt,Tt),qt=Math.max(qt,re),Wt=Math.max(Wt,Tt));return new a(Math.round(ie),Math.round(kt),Math.round(qt-ie),Math.round(Wt-kt))},mt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var M,$,q=(M=this.ctx.lineDash,$=this.ctx.lineDashOffset,JSON.stringify({lineDash:M,lineDashOffset:$}));this.prevLineDash!==q&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=q)}}})(le.API),function(n){var t=function(A){var a,o,l,h,u,d,f,p,m,y;for(o=[],l=0,h=(A+=a="\0\0\0\0".slice(A.length%4||4)).length;h>l;l+=4)(u=(A.charCodeAt(l)<<24)+(A.charCodeAt(l+1)<<16)+(A.charCodeAt(l+2)<<8)+A.charCodeAt(l+3))!==0?(d=(u=((u=((u=((u=(u-(y=u%85))/85)-(m=u%85))/85)-(p=u%85))/85)-(f=u%85))/85)%85,o.push(d+33,f+33,p+33,m+33,y+33)):o.push(122);return function(w,B){for(var E=B;E>0;E--)w.pop()}(o,a.length),String.fromCharCode.apply(String,o)+"~>"},e=function(A){var a,o,l,h,u,d=String,f="length",p=255,m="charCodeAt",y="slice",w="replace";for(A[y](-2),A=A[y](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),l=[],h=0,u=(A+=a="uuuuu"[y](A[f]%5||5))[f];u>h;h+=5)o=52200625*(A[m](h)-33)+614125*(A[m](h+1)-33)+7225*(A[m](h+2)-33)+85*(A[m](h+3)-33)+(A[m](h+4)-33),l.push(p&o>>24,p&o>>16,p&o>>8,p&o);return function(B,E){for(var S=E;S>0;S--)B.pop()}(l,a[f]),d.fromCharCode.apply(d,l)},r=function(A){return A.split("").map(function(a){return("0"+a.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(A){var a=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((A=A.replace(/\s/g,"")).indexOf(">")!==-1&&(A=A.substr(0,A.indexOf(">"))),A.length%2&&(A+="0"),a.test(A)===!1)return"";for(var o="",l=0;l<A.length;l+=2)o+=String.fromCharCode("0x"+(A[l]+A[l+1]));return o},s=function(A){for(var a=new Uint8Array(A.length),o=A.length;o--;)a[o]=A.charCodeAt(o);return(a=hE(a)).reduce(function(l,h){return l+String.fromCharCode(h)},"")};n.processDataByFilters=function(A,a){var o=0,l=A||"",h=[];for(typeof(a=a||[])=="string"&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":l=e(l),h.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=t(l),h.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=i(l),h.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=r(l),h.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=s(l),h.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:l,reverseChain:h.reverse().join(" ")}}}(le.API),function(n){n.loadFile=function(t,e,r){return function(i,s,A){s=s!==!1,A=typeof A=="function"?A:function(){};var a=void 0;try{a=function(o,l,h){var u=new XMLHttpRequest,d=0,f=function(p){var m=p.length,y=[],w=String.fromCharCode;for(d=0;d<m;d+=1)y.push(w(255&p.charCodeAt(d)));return y.join("")};if(u.open("GET",o,!l),u.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(u.onload=function(){u.status===200?h(f(this.responseText)):h(void 0)}),u.send(null),l&&u.status===200)return f(u.responseText)}(i,s,A)}catch{}return a}(t,e,r)},n.allowFsRead=void 0,n.loadImageFile=n.loadFile}(le.API),function(n){function t(){return(be.html2canvas?Promise.resolve(be.html2canvas):Promise.resolve().then(()=>rX)).catch(function(a){return Promise.reject(new Error("Could not load html2canvas: "+a))}).then(function(a){return a.default?a.default:a})}function e(){return(be.DOMPurify?Promise.resolve(be.DOMPurify):Promise.resolve().then(()=>NX)).catch(function(a){return Promise.reject(new Error("Could not load dompurify: "+a))}).then(function(a){return a.default?a.default:a})}var r=function(a){var o=sr(a);return o==="undefined"?"undefined":o==="string"||a instanceof String?"string":o==="number"||a instanceof Number?"number":o==="function"||a instanceof Function?"function":a&&a.constructor===Array?"array":a&&a.nodeType===1?"element":o==="object"?"object":"unknown"},i=function(a,o){var l=document.createElement(a);for(var h in o.className&&(l.className=o.className),o.innerHTML&&o.dompurify&&(l.innerHTML=o.dompurify.sanitize(o.innerHTML)),o.style)l.style[h]=o.style[h];return l},s=function a(o,l){for(var h=o.nodeType===3?document.createTextNode(o.nodeValue):o.cloneNode(!1),u=o.firstChild;u;u=u.nextSibling)l!==!0&&u.nodeType===1&&u.nodeName==="SCRIPT"||h.appendChild(a(u,l));return o.nodeType===1&&(o.nodeName==="CANVAS"?(h.width=o.width,h.height=o.height,h.getContext("2d").drawImage(o,0,0)):o.nodeName!=="TEXTAREA"&&o.nodeName!=="SELECT"||(h.value=o.value),h.addEventListener("load",function(){h.scrollTop=o.scrollTop,h.scrollLeft=o.scrollLeft},!0)),h},A=function a(o){var l=Object.assign(a.convert(Promise.resolve()),JSON.parse(JSON.stringify(a.template))),h=a.convert(Promise.resolve(),l);return(h=h.setProgress(1,a,1,[a])).set(o)};(A.prototype=Object.create(Promise.prototype)).constructor=A,A.convert=function(a,o){return a.__proto__=o||A.prototype,a},A.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},A.prototype.from=function(a,o){return this.then(function(){switch(o=o||function(l){switch(r(l)){case"string":return"string";case"element":return l.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(a),o){case"string":return this.then(e).then(function(l){return this.set({src:i("div",{innerHTML:a,dompurify:l})})});case"element":return this.set({src:a});case"canvas":return this.set({canvas:a});case"img":return this.set({img:a});default:return this.error("Unknown source type.")}})},A.prototype.to=function(a){switch(a){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},A.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var a={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},o=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);o.tagName==="BODY"&&(a.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:a}),this.prop.container.appendChild(o),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},A.prototype.toCanvas=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(o){var l=Object.assign({},this.opt.html2canvas);return delete l.onrendered,o(this.prop.container,l)}).then(function(o){(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},A.prototype.toContext2d=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(t).then(function(o){var l=this.opt.jsPDF,h=this.opt.fontFaces,u=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,d=Object.assign({async:!0,allowTaint:!0,scale:u,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete d.onrendered,l.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,l.context2d.posX=this.opt.x,l.context2d.posY=this.opt.y,l.context2d.margin=this.opt.margin,l.context2d.fontFaces=h,h)for(var f=0;f<h.length;++f){var p=h[f],m=p.src.find(function(y){return y.format==="truetype"});m&&l.addFont(m.url,p.ref.name,p.ref.style)}return d.windowHeight=d.windowHeight||0,d.windowHeight=d.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):d.windowHeight,l.context2d.save(!0),o(this.prop.container,d)}).then(function(o){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},A.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var a=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=a})},A.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},A.prototype.output=function(a,o,l){return(l=l||"pdf").toLowerCase()==="img"||l.toLowerCase()==="image"?this.outputImg(a,o):this.outputPdf(a,o)},A.prototype.outputPdf=function(a,o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(a,o)})},A.prototype.outputImg=function(a){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(a){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+a+'" is not supported.'}})},A.prototype.save=function(a){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(a?{filename:a}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},A.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},A.prototype.set=function(a){if(r(a)!=="object")return this;var o=Object.keys(a||{}).map(function(l){if(l in A.template.prop)return function(){this.prop[l]=a[l]};switch(l){case"margin":return this.setMargin.bind(this,a.margin);case"jsPDF":return function(){return this.opt.jsPDF=a.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,a.pageSize);default:return function(){this.opt[l]=a[l]}}},this);return this.then(function(){return this.thenList(o)})},A.prototype.get=function(a,o){return this.then(function(){var l=a in A.template.prop?this.prop[a]:this.opt[a];return o?o(l):l})},A.prototype.setMargin=function(a){return this.then(function(){switch(r(a)){case"number":a=[a,a,a,a];case"array":if(a.length===2&&(a=[a[0],a[1],a[0],a[1]]),a.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=a}).then(this.setPageSize)},A.prototype.setPageSize=function(a){function o(l,h){return Math.floor(l*h/72*96)}return this.then(function(){(a=a||le.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(a.inner={width:a.width-this.opt.margin[1]-this.opt.margin[3],height:a.height-this.opt.margin[0]-this.opt.margin[2]},a.inner.px={width:o(a.inner.width,a.k),height:o(a.inner.height,a.k)},a.inner.ratio=a.inner.height/a.inner.width),this.prop.pageSize=a})},A.prototype.setProgress=function(a,o,l,h){return a!=null&&(this.progress.val=a),o!=null&&(this.progress.state=o),l!=null&&(this.progress.n=l),h!=null&&(this.progress.stack=h),this.progress.ratio=this.progress.val/this.progress.state,this},A.prototype.updateProgress=function(a,o,l,h){return this.setProgress(a?this.progress.val+a:null,o||null,l?this.progress.n+l:null,h?this.progress.stack.concat(h):null)},A.prototype.then=function(a,o){var l=this;return this.thenCore(a,o,function(h,u){return l.updateProgress(null,null,1,[h]),Promise.prototype.then.call(this,function(d){return l.updateProgress(null,h),d}).then(h,u).then(function(d){return l.updateProgress(1),d})})},A.prototype.thenCore=function(a,o,l){l=l||Promise.prototype.then;var h=this;a&&(a=a.bind(h)),o&&(o=o.bind(h));var u=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?h:A.convert(Object.assign({},h),Promise.prototype),d=l.call(u,a,o);return A.convert(d,h.__proto__)},A.prototype.thenExternal=function(a,o){return Promise.prototype.then.call(this,a,o)},A.prototype.thenList=function(a){var o=this;return a.forEach(function(l){o=o.thenCore(l)}),o},A.prototype.catch=function(a){a&&(a=a.bind(this));var o=Promise.prototype.catch.call(this,a);return A.convert(o,this)},A.prototype.catchExternal=function(a){return Promise.prototype.catch.call(this,a)},A.prototype.error=function(a){return this.then(function(){throw new Error(a)})},A.prototype.using=A.prototype.set,A.prototype.saveAs=A.prototype.save,A.prototype.export=A.prototype.output,A.prototype.run=A.prototype.then,le.getPageSize=function(a,o,l){if(sr(a)==="object"){var h=a;a=h.orientation,o=h.unit||o,l=h.format||l}o=o||"mm",l=l||"a4",a=(""+(a||"P")).toLowerCase();var u,d=(""+l).toLowerCase(),f={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(o){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+o}var p,m=0,y=0;if(f.hasOwnProperty(d))m=f[d][1]/u,y=f[d][0]/u;else try{m=l[1],y=l[0]}catch{throw new Error("Invalid format: "+l)}if(a==="p"||a==="portrait")a="p",y>m&&(p=y,y=m,m=p);else{if(a!=="l"&&a!=="landscape")throw"Invalid orientation: "+a;a="l",m>y&&(p=y,y=m,m=p)}return{width:y,height:m,unit:o,k:u,orientation:a}},n.html=function(a,o){(o=o||{}).callback=o.callback||function(){},o.html2canvas=o.html2canvas||{},o.html2canvas.canvas=o.html2canvas.canvas||this.canvas,o.jsPDF=o.jsPDF||this,o.fontFaces=o.fontFaces?o.fontFaces.map(E5):null;var l=new A(o);return o.worker?l:l.from(a).doCallback()}}(le.API),le.API.addJS=function(n){var t,e,r=function(i){for(var s="",A=0;A<i.length;A++){var a=i[A];if(a==="("||a===")"){for(var o=0,l=A-1;l>=0&&i[l]==="\\";l--)o++;s+=o%2==0?"\\"+a:a}else s+=a}return s}(n);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&e!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},function(n){var t;n.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=e.outline.render().split(/\r\n/),s=0;s<i.length;s++){var A=i[s],a=r.exec(A);if(a!=null){var o=a[1];e.internal.newObjectDeferredBegin(o,!1)}e.internal.write(A)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,h=[];for(s=0;s<l;s++){var u=e.internal.newObject();h.push(u);var d=e.internal.getPageInfo(s+1);e.internal.write("<< /D["+d.objId+" 0 R /XYZ null null null]>> endobj")}var f=e.internal.newObject();for(e.internal.write("<< /Names [ "),s=0;s<h.length;s++)e.internal.write("(page_"+(s+1)+")"+h[s]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+f+" 0 R"),e.internal.write(">>","endobj")}}]),n.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),n.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(r,i,s){var A={title:i,options:s,children:[]};return r==null&&(r=this.root),r.children.push(A),A},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(r){r.id=e.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},e.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},e.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<r.children.length;s++){var A=r.children[s];this.objStart(A),this.line("/Title "+this.makeString(A.title)),this.line("/Parent "+this.makeRef(r)),s>0&&this.line("/Prev "+this.makeRef(r.children[s-1])),s<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[s+1])),A.children.length>0&&(this.line("/First "+this.makeRef(A.children[0])),this.line("/Last "+this.makeRef(A.children[A.children.length-1])));var a=this.count=this.count_r({count:0},A);if(a>0&&this.line("/Count "+a),A.options&&A.options.pageNumber){var o=e.internal.getPageInfo(A.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var l=0;l<r.children.length;l++)this.renderItems(r.children[l])},e.outline.line=function(r){this.ctx.val+=r+`\r
|
|
181
|
+
`},e.outline.makeRef=function(r){return r.id+" 0 R"},e.outline.makeString=function(r){return"("+e.internal.pdfEscape(r)+")"},e.outline.objStart=function(r){this.ctx.val+=`\r
|
|
182
|
+
`+r.id+` 0 obj\r
|
|
183
|
+
<<\r
|
|
184
|
+
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
185
|
+
endobj\r
|
|
186
|
+
`},e.outline.count_r=function(r,i){for(var s=0;s<i.children.length;s++)r.count++,this.count_r(r,i.children[s]);return r.count}}])}(le.API),function(n){var t=[192,193,194,195,196,197,198,199];n.processJPEG=function(e,r,i,s,A,a){var o,l=this.decode.DCT_DECODE,h=null;if(typeof e=="string"||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=A||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,o=function(u){for(var d,f=256*u.charCodeAt(4)+u.charCodeAt(5),p=u.length,m={width:0,height:0,numcomponents:1},y=4;y<p;y+=2){if(y+=f,t.indexOf(u.charCodeAt(y+1))!==-1){d=256*u.charCodeAt(y+5)+u.charCodeAt(y+6),m={width:256*u.charCodeAt(y+7)+u.charCodeAt(y+8),height:d,numcomponents:u.charCodeAt(y+9)};break}f=256*u.charCodeAt(y+2)+u.charCodeAt(y+3)}return m}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),o.numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}h={data:e,width:o.width,height:o.height,colorSpace:a,bitsPerComponent:8,filter:l,index:r,alias:i}}return h}}(le.API),le.API.processPNG=function(n,t,e,r){if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){var i,s=K8(n,{checkCrc:!0}),A=s.width,a=s.height,o=s.channels,l=s.palette,h=s.depth;i=l&&o===1?function(H){for(var Q=H.width,W=H.height,U=H.data,D=H.palette,j=H.depth,V=!1,st=[],rt=[],it=void 0,At=!1,ut=0,vt=0;vt<D.length;vt++){var mt=gI(D[vt],4),M=mt[0],$=mt[1],q=mt[2],tt=mt[3];st.push(M,$,q),tt!=null&&(tt===0?(ut++,rt.length<1&&rt.push(vt)):tt<255&&(At=!0))}if(At||ut>1){V=!0,rt=void 0;var et=Q*W;it=new Uint8Array(et);for(var ot=new DataView(U.buffer),dt=0;dt<et;dt++){var wt=F5(ot,dt,j),yt=gI(D[wt],4)[3];it[dt]=yt}}else ut===0&&(rt=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:V?8:void 0,colorBytes:U,alphaBytes:it,needSMask:V,palette:st,mask:rt}}(s):o===2||o===4?function(H){for(var Q=H.data,W=H.width,U=H.height,D=H.channels,j=H.depth,V=D===2?"DeviceGray":"DeviceRGB",st=D-1,rt=W*U,it=st,At=rt*it,ut=1*rt,vt=Math.ceil(At*j/8),mt=Math.ceil(ut*j/8),M=new Uint8Array(vt),$=new Uint8Array(mt),q=new DataView(Q.buffer),tt=new DataView(M.buffer),et=new DataView($.buffer),ot=!1,dt=0;dt<rt;dt++){for(var wt=dt*D,yt=0;yt<it;yt++)v_(tt,F5(q,wt+yt,j),dt*it+yt,j);var St=F5(q,wt+it,j);St<(1<<j)-1&&(ot=!0),v_(et,St,1*dt,j)}return{colorSpace:V,colorsPerPixel:st,sMaskBitsPerComponent:ot?j:void 0,colorBytes:M,alphaBytes:$,needSMask:ot}}(s):function(H){var Q=H.data,W=H.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:W,colorsPerPixel:W==="DeviceGray"?1:3,colorBytes:Q instanceof Uint16Array?function(U){for(var D=U.length,j=new Uint8Array(2*D),V=new DataView(j.buffer,j.byteOffset,j.byteLength),st=0;st<D;st++)V.setUint16(2*st,U[st],!1);return j}(Q):Q,needSMask:!1}}(s);var u,d,f,p=i,m=p.colorSpace,y=p.colorsPerPixel,w=p.sMaskBitsPerComponent,B=p.colorBytes,E=p.alphaBytes,S=p.needSMask,I=p.palette,L=p.mask,k=null;return r!==le.API.image_compression.NONE&&typeof hE=="function"?(k=function(H){var Q;switch(H){case le.API.image_compression.FAST:Q=11;break;case le.API.image_compression.MEDIUM:Q=13;break;case le.API.image_compression.SLOW:Q=14;break;default:Q=12}return Q}(r),u=this.decode.FLATE_DECODE,d="/Predictor ".concat(k," /Colors ").concat(y," /BitsPerComponent ").concat(h," /Columns ").concat(A),n=f_(B,Math.ceil(A*y*h/8),y,h,r),S&&(f=f_(E,Math.ceil(A*w/8),1,w,r))):(u=void 0,d=void 0,n=B,S&&(f=E)),(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:e,data:n,index:t,filter:u,decodeParameters:d,transparency:L,palette:I,sMask:f,predictor:k,width:A,height:a,bitsPerComponent:h,sMaskBitsPerComponent:w,colorSpace:m}}},function(n){n.processGIF89A=function(t,e,r,i){var s=new l7(t),A=s.width,a=s.height,o=[];s.decodeAndBlitFrameRGBA(0,o);var l={data:o,width:A,height:a},h=new T5(100).encode(l,100);return n.processJPEG.call(this,h,e,r,i)},n.processGIF87A=n.processGIF89A}(le.API),ma.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var n=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(n);for(var t=0;t<n;t++){var e=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:e,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},ma.prototype.parseBGR=function(){this.pos=this.offset;var n="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[n]()}catch(e){_r.log("bit decode error:"+e)}},ma.prototype.bit1=function(){var n,t=Math.ceil(this.width/8),e=t%4;for(n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<t;i++)for(var s=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+8*i*4,a=0;a<8&&8*i+a<this.width;a++){var o=this.palette[s>>7-a&1];this.data[A+4*a]=o.blue,this.data[A+4*a+1]=o.green,this.data[A+4*a+2]=o.red,this.data[A+4*a+3]=255}e!==0&&(this.pos+=4-e)}},ma.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),t=n%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<n;i++){var s=this.datav.getUint8(this.pos++,!0),A=r*this.width*4+2*i*4,a=s>>4,o=15&s,l=this.palette[a];if(this.data[A]=l.blue,this.data[A+1]=l.green,this.data[A+2]=l.red,this.data[A+3]=255,2*i+1>=this.width)break;l=this.palette[o],this.data[A+4]=l.blue,this.data[A+4+1]=l.green,this.data[A+4+2]=l.red,this.data[A+4+3]=255}t!==0&&(this.pos+=4-t)}},ma.prototype.bit8=function(){for(var n=this.width%4,t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;if(i<this.palette.length){var A=this.palette[i];this.data[s]=A.red,this.data[s+1]=A.green,this.data[s+2]=A.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}n!==0&&(this.pos+=4-n)}},ma.prototype.bit15=function(){for(var n=this.width%3,t=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var A=(s&t)/t*255|0,a=(s>>5&t)/t*255|0,o=(s>>10&t)/t*255|0,l=s>>15?255:0,h=r*this.width*4+4*i;this.data[h]=o,this.data[h+1]=a,this.data[h+2]=A,this.data[h+3]=l}this.pos+=n}},ma.prototype.bit16=function(){for(var n=this.width%3,t=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var A=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(A&t)/t*255|0,o=(A>>5&e)/e*255|0,l=(A>>11)/t*255|0,h=i*this.width*4+4*s;this.data[h]=l,this.data[h+1]=o,this.data[h+2]=a,this.data[h+3]=255}this.pos+=n}},ma.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),A=t*this.width*4+4*e;this.data[A]=s,this.data[A+1]=i,this.data[A+2]=r,this.data[A+3]=255}this.pos+=this.width%4}},ma.prototype.bit32=function(){for(var n=this.height-1;n>=0;n--)for(var t=this.bottom_up?n:this.height-1-n,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*e;this.data[a]=s,this.data[a+1]=i,this.data[a+2]=r,this.data[a+3]=A}},ma.prototype.getData=function(){return this.data},function(n){n.processBMP=function(t,e,r,i){var s=new ma(t,!1),A=s.width,a=s.height,o={data:s.getData(),width:A,height:a},l=new T5(100).encode(o,100);return n.processJPEG.call(this,l,e,r,i)}}(le.API),y_.prototype.getData=function(){return this.data},function(n){n.processWEBP=function(t,e,r,i){var s=new y_(t),A=s.width,a=s.height,o={data:s.getData(),width:A,height:a},l=new T5(100).encode(o,100);return n.processJPEG.call(this,l,e,r,i)}}(le.API),le.API.processRGBA=function(n,t,e){for(var r=n.data,i=r.length,s=new Uint8Array(i/4*3),A=new Uint8Array(i/4),a=0,o=0,l=0;l<i;l+=4){var h=r[l],u=r[l+1],d=r[l+2],f=r[l+3];s[a++]=h,s[a++]=u,s[a++]=d,A[o++]=f}var p=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(A),data:p,index:t,alias:e,colorSpace:"DeviceRGB",bitsPerComponent:8,width:n.width,height:n.height}},le.API.setLanguage=function(n){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[n]!==void 0&&(this.internal.languageSettings.languageCode=n,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Xd=le.API,w2=Xd.getCharWidthsArray=function(n,t){var e,r,i=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),A=t.charSpace||this.internal.getCharSpace(),a=t.widths?t.widths:i.metadata.Unicode.widths,o=a.fof?a.fof:1,l=t.kerning?t.kerning:i.metadata.Unicode.kerning,h=l.fof?l.fof:1,u=t.doKerning!==!1,d=0,f=n.length,p=0,m=a[0]||o,y=[];for(e=0;e<f;e++)r=n.charCodeAt(e),typeof i.metadata.widthOfString=="function"?y.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+A*(1e3/s)||0)/1e3):(d=u&&sr(l[r])==="object"&&!isNaN(parseInt(l[r][p],10))?l[r][p]/h:0,y.push((a[r]||m)/o+d)),p=r;return y},c_=Xd.getStringUnitWidth=function(n,t){var e=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return Xd.processArabic&&(n=Xd.processArabic(n)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(n,e,i)/e:w2.apply(this,arguments).reduce(function(s,A){return s+A},0)},h_=function(n,t,e,r){for(var i=[],s=0,A=n.length,a=0;s!==A&&a+t[s]<e;)a+=t[s],s++;i.push(n.slice(0,s));var o=s;for(a=0;s!==A;)a+t[s]>r&&(i.push(n.slice(o,s)),a=0,o=s),a+=t[s],s++;return o!==s&&i.push(n.slice(o,s)),i},u_=function(n,t,e){e||(e={});var r,i,s,A,a,o,l,h=[],u=[h],d=e.textIndent||0,f=0,p=0,m=n.split(" "),y=w2.apply(this,[" ",e])[0];if(o=e.lineIndent===-1?m[0].length+2:e.lineIndent||0){var w=Array(o).join(" "),B=[];m.map(function(S){(S=S.split(/\s*\n/)).length>1?B=B.concat(S.map(function(I,L){return(L&&I.length?`
|
|
187
|
+
`:"")+I})):B.push(S[0])}),m=B,o=c_.apply(this,[w,e])}for(s=0,A=m.length;s<A;s++){var E=0;if(r=m[s],o&&r[0]==`
|
|
188
|
+
`&&(r=r.substr(1),E=1),d+f+(p=(i=w2.apply(this,[r,e])).reduce(function(S,I){return S+I},0))>t||E){if(p>t){for(a=h_.apply(this,[r,i,t-(d+f),t]),h.push(a.shift()),h=[a.pop()];a.length;)u.push([a.shift()]);p=i.slice(r.length-(h[0]?h[0].length:0)).reduce(function(S,I){return S+I},0)}else h=[r];u.push(h),d=p+o,f=y}else h.push(r),d+=f+p,f=y}return l=o?function(S,I){return(I?w:"")+S.join(" ")}:function(S){return S.join(" ")},u.map(l)},Xd.splitTextToSize=function(n,t,e){var r,i=(e=e||{}).fontSize||this.internal.getFontSize(),s=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var u=this.internal.getFont(h.fontName,h.fontStyle),d="Unicode";return u.metadata[d]?{widths:u.metadata[d].widths||{0:1},kerning:u.metadata[d].kerning||{}}:{font:u.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,e);r=Array.isArray(n)?n:String(n).split(/\r?\n/);var A=1*this.internal.scaleFactor*t/i;s.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/i:0,s.lineIndent=e.lineIndent;var a,o,l=[];for(a=0,o=r.length;a<o;a++)l=l.concat(u_.apply(this,[r[a],A,s]));return l},function(n){n.__fontmetrics__=n.__fontmetrics__||{};for(var t="0123456789abcdef",e="klmnopqrstuvwxyz",r={},i={},s=0;s<16;s++)r[e[s]]=t[s],i[t[s]]=e[s];var A=function(d){return"0x"+parseInt(d,10).toString(16)},a=n.__fontmetrics__.compress=function(d){var f,p,m,y,w=["{"];for(var B in d){if(f=d[B],isNaN(parseInt(B,10))?p="'"+B+"'":(B=parseInt(B,10),p=(p=A(B).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof f=="number")f<0?(m=A(f).slice(3),y="-"):(m=A(f).slice(2),y=""),m=y+m.slice(0,-1)+i[m.slice(-1)];else{if(sr(f)!=="object")throw new Error("Don't know what to do with value type "+sr(f)+".");m=a(f)}w.push(p+m)}return w.push("}"),w.join("")},o=n.__fontmetrics__.uncompress=function(d){if(typeof d!="string")throw new Error("Invalid argument passed to uncompress.");for(var f,p,m,y,w={},B=1,E=w,S=[],I="",L="",k=d.length-1,H=1;H<k;H+=1)(y=d[H])=="'"?f?(m=f.join(""),f=void 0):f=[]:f?f.push(y):y=="{"?(S.push([E,m]),E={},m=void 0):y=="}"?((p=S.pop())[0][p[1]]=E,m=void 0,E=p[0]):y=="-"?B=-1:m===void 0?r.hasOwnProperty(y)?(I+=r[y],m=parseInt(I,16)*B,B=1,I=""):I+=y:r.hasOwnProperty(y)?(L+=r[y],E[m]=parseInt(L,16)*B,B=1,m=void 0,L=""):L+=y;return w},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:o("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":o("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":o("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:o("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:o("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":o("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":o("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};n.events.push(["addFont",function(d){var f=d.font,p=u.Unicode[f.postScriptName];p&&(f.metadata.Unicode={},f.metadata.Unicode.widths=p.widths,f.metadata.Unicode.kerning=p.kerning);var m=h.Unicode[f.postScriptName];m&&(f.metadata.Unicode.encoding=m,f.encoding=m.codePages[0])}])}(le.API),function(n){var t=function(e){for(var r=e.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=e.charCodeAt(s);return i};n.API.events.push(["addFont",function(e){var r=void 0,i=e.font,s=e.instance;if(!i.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=s.existsFileInVFS(i.postScriptName)===!1?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(A,a){a=/^\x00\x01\x00\x00/.test(a)?t(a):t(By(a)),A.metadata=n.API.TTFFont.open(a),A.metadata.Unicode=A.metadata.Unicode||{encoding:{},kerning:{},widths:[]},A.metadata.glyIdsUsed=[0]})(i,r)}}])}(le),le.API.addSvgAsImage=function(n,t,e,r,i,s,A,a){if(isNaN(t)||isNaN(e))throw _r.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw _r.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var o=document.createElement("canvas");o.width=r,o.height=i;var l=o.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,o.width,o.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},u=this;return(be.canvg?Promise.resolve(be.canvg):Promise.resolve().then(()=>Dat)).catch(function(d){return Promise.reject(new Error("Could not load canvg: "+d))}).then(function(d){return d.default?d.default:d}).then(function(d){return d.fromString(l,n,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(d){return d.render(h)}).then(function(){u.addImage(o.toDataURL("image/jpeg",1),t,e,r,i,A,a)})},le.API.putTotalPages=function(n){var t,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(n,"g"),e=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,e);return this},le.API.viewerPreferences=function(n,t){var e;n=n||{},t=t||!1;var r,i,s,A={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(A),o=[],l=0,h=0,u=0;function d(p,m){var y,w=!1;for(y=0;y<p.length;y+=1)p[y]===m&&(w=!0);return w}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(A)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,n==="reset"||t===!0){var f=a.length;for(u=0;u<f;u+=1)e[a[u]].value=e[a[u]].defaultValue,e[a[u]].explicitSet=!1}if(sr(n)==="object"){for(i in n)if(s=n[i],d(a,i)&&s!==void 0){if(e[i].type==="boolean"&&typeof s=="boolean")e[i].value=s;else if(e[i].type==="name"&&d(e[i].valueSet,s))e[i].value=s;else if(e[i].type==="integer"&&Number.isInteger(s))e[i].value=s;else if(e[i].type==="array"){for(l=0;l<s.length;l+=1)if(r=!0,s[l].length===1&&typeof s[l][0]=="number")o.push(String(s[l]-1));else if(s[l].length>1){for(h=0;h<s[l].length;h+=1)typeof s[l][h]!="number"&&(r=!1);r===!0&&o.push([s[l][0]-1,s[l][1]-1].join(" "))}e[i].value="["+o.join(" ")+"]"}else e[i].value=e[i].defaultValue;e[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,m=[];for(p in e)e[p].explicitSet===!0&&(e[p].type==="name"?m.push("/"+p+" /"+e[p].value):m.push("/"+p+" "+e[p].value));m.length!==0&&this.internal.write(`/ViewerPreferences
|
|
189
|
+
<<
|
|
190
|
+
`+m.join(`
|
|
191
|
+
`)+`
|
|
192
|
+
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this},le.API.addMetadata=function(n,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",h7),this.internal.events.subscribe("postPutResources",c7)),this},function(n){var t=n.API,e=t.pdfEscape16=function(s,A){for(var a,o=A.metadata.Unicode.widths,l=["","0","00","000","0000"],h=[""],u=0,d=s.length;u<d;++u){if(a=A.metadata.characterToGlyph(s.charCodeAt(u)),A.metadata.glyIdsUsed.push(a),A.metadata.toUnicode[a]=s.charCodeAt(u),o.indexOf(a)==-1&&(o.push(a),o.push([parseInt(A.metadata.widthOfGlyph(a),10)])),a=="0")return h.join("");a=a.toString(16),h.push(l[4-a.length],a)}return h.join("")},r=function(s){var A,a,o,l,h,u,d;for(h=`/CIDInit /ProcSet findresource begin
|
|
193
|
+
12 dict begin
|
|
194
|
+
begincmap
|
|
195
|
+
/CIDSystemInfo <<
|
|
196
|
+
/Registry (Adobe)
|
|
197
|
+
/Ordering (UCS)
|
|
198
|
+
/Supplement 0
|
|
199
|
+
>> def
|
|
200
|
+
/CMapName /Adobe-Identity-UCS def
|
|
201
|
+
/CMapType 2 def
|
|
202
|
+
1 begincodespacerange
|
|
203
|
+
<0000><ffff>
|
|
204
|
+
endcodespacerange`,o=[],u=0,d=(a=Object.keys(s).sort(function(f,p){return f-p})).length;u<d;u++)A=a[u],o.length>=100&&(h+=`
|
|
205
|
+
`+o.length+` beginbfchar
|
|
206
|
+
`+o.join(`
|
|
207
|
+
`)+`
|
|
208
|
+
endbfchar`,o=[]),s[A]!==void 0&&s[A]!==null&&typeof s[A].toString=="function"&&(l=("0000"+s[A].toString(16)).slice(-4),A=("0000"+(+A).toString(16)).slice(-4),o.push("<"+A+"><"+l+">"));return o.length&&(h+=`
|
|
209
|
+
`+o.length+` beginbfchar
|
|
210
|
+
`+o.join(`
|
|
211
|
+
`)+`
|
|
212
|
+
endbfchar
|
|
213
|
+
`),h+`endcmap
|
|
214
|
+
CMapName currentdict /CMap defineresource pop
|
|
215
|
+
end
|
|
216
|
+
end`};t.events.push(["putFont",function(s){(function(A){var a=A.font,o=A.out,l=A.newObject,h=A.putStream;if(a.metadata instanceof n.API.TTFFont&&a.encoding==="Identity-H"){for(var u=a.metadata.Unicode.widths,d=a.metadata.subset.encode(a.metadata.glyIdsUsed,1),f="",p=0;p<d.length;p++)f+=String.fromCharCode(d[p]);var m=l();h({data:f,addLength1:!0,objectId:m}),o("endobj");var y=l();h({data:r(a.metadata.toUnicode),addLength1:!0,objectId:y}),o("endobj");var w=l();o("<<"),o("/Type /FontDescriptor"),o("/FontName /"+fg(a.fontName)),o("/FontFile2 "+m+" 0 R"),o("/FontBBox "+n.API.PDFObject.convert(a.metadata.bbox)),o("/Flags "+a.metadata.flags),o("/StemV "+a.metadata.stemV),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o(">>"),o("endobj");var B=l();o("<<"),o("/Type /Font"),o("/BaseFont /"+fg(a.fontName)),o("/FontDescriptor "+w+" 0 R"),o("/W "+n.API.PDFObject.convert(u)),o("/CIDToGIDMap /Identity"),o("/DW 1000"),o("/Subtype /CIDFontType2"),o("/CIDSystemInfo"),o("<<"),o("/Supplement 0"),o("/Registry (Adobe)"),o("/Ordering ("+a.encoding+")"),o(">>"),o(">>"),o("endobj"),a.objectNumber=l(),o("<<"),o("/Type /Font"),o("/Subtype /Type0"),o("/ToUnicode "+y+" 0 R"),o("/BaseFont /"+fg(a.fontName)),o("/Encoding /"+a.encoding),o("/DescendantFonts ["+B+" 0 R]"),o(">>"),o("endobj"),a.isAlreadyPutted=!0}})(s)}]),t.events.push(["putFont",function(s){(function(A){var a=A.font,o=A.out,l=A.newObject,h=A.putStream;if(a.metadata instanceof n.API.TTFFont&&a.encoding==="WinAnsiEncoding"){for(var u=a.metadata.rawData,d="",f=0;f<u.length;f++)d+=String.fromCharCode(u[f]);var p=l();h({data:d,addLength1:!0,objectId:p}),o("endobj");var m=l();h({data:r(a.metadata.toUnicode),addLength1:!0,objectId:m}),o("endobj");var y=l();o("<<"),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o("/StemV "+a.metadata.stemV),o("/Type /FontDescriptor"),o("/FontFile2 "+p+" 0 R"),o("/Flags 96"),o("/FontBBox "+n.API.PDFObject.convert(a.metadata.bbox)),o("/FontName /"+fg(a.fontName)),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o(">>"),o("endobj"),a.objectNumber=l();for(var w=0;w<a.metadata.hmtx.widths.length;w++)a.metadata.hmtx.widths[w]=parseInt(a.metadata.hmtx.widths[w]*(1e3/a.metadata.head.unitsPerEm));o("<</Subtype/TrueType/Type/Font/ToUnicode "+m+" 0 R/BaseFont/"+fg(a.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+a.encoding+" /FirstChar 29 /LastChar 255 /Widths "+n.API.PDFObject.convert(a.metadata.hmtx.widths)+">>"),o("endobj"),a.isAlreadyPutted=!0}})(s)}]);var i=function(s){var A,a=s.text||"",o=s.x,l=s.y,h=s.options||{},u=s.mutex||{},d=u.pdfEscape,f=u.activeFontKey,p=u.fonts,m=f,y="",w=0,B="",E=p[m].encoding;if(p[m].encoding!=="Identity-H")return{text:a,x:o,y:l,options:h,mutex:u};for(B=a,m=f,Array.isArray(a)&&(B=a[0]),w=0;w<B.length;w+=1)p[m].metadata.hasOwnProperty("cmap")&&(A=p[m].metadata.cmap.unicode.codeMap[B[w].charCodeAt(0)]),A||B[w].charCodeAt(0)<256&&p[m].metadata.hasOwnProperty("Unicode")?y+=B[w]:y+="";var S="";return parseInt(m.slice(1))<14||E==="WinAnsiEncoding"?S=d(y,m).split("").map(function(I){return I.charCodeAt(0).toString(16)}).join(""):E==="Identity-H"&&(S=e(y,p[m])),u.isHex=!0,{text:S,x:o,y:l,options:h,mutex:u}};t.events.push(["postProcessText",function(s){var A=s.text||"",a=[],o={text:A,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(A)){var l=0;for(l=0;l<A.length;l+=1)Array.isArray(A[l])&&A[l].length===3?a.push([i(Object.assign({},o,{text:A[l][0]})).text,A[l][1],A[l][2]]):a.push(i(Object.assign({},o,{text:A[l]})).text);s.text=a}else s.text=i(Object.assign({},o,{text:A})).text}])}(le),function(n){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};n.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},n.addFileToVFS=function(e,r){return t.call(this),this.internal.vFS[e]=r,this},n.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0?this.internal.vFS[e]:null}}(le.API),function(n){n.__bidiEngine__=n.prototype.__bidiEngine__=function(r){var i,s,A,a,o,l,h,u=t,d=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),B=!1,E=0;this.__bidiEngine__={};var S=function(U){var D=U.charCodeAt(),j=D>>8,V=m[j];return V!==void 0?u[256*V+(255&D)]:j===252||j===253?"AL":w.test(j)?"L":j===8?"R":"N"},I=function(U){for(var D,j=0;j<U.length;j++){if((D=S(U.charAt(j)))==="L")return!1;if(D==="R")return!0}return!1},L=function(U,D,j,V){var st,rt,it,At,ut=D[V];switch(ut){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":B=!1;break;case"N":case"AN":break;case"EN":B&&(ut="AN");break;case"AL":B=!0,ut="R";break;case"WS":case"BN":ut="N";break;case"CS":V<1||V+1>=D.length||(st=j[V-1])!=="EN"&&st!=="AN"||(rt=D[V+1])!=="EN"&&rt!=="AN"?ut="N":B&&(rt="AN"),ut=rt===st?rt:"N";break;case"ES":ut=(st=V>0?j[V-1]:"B")==="EN"&&V+1<D.length&&D[V+1]==="EN"?"EN":"N";break;case"ET":if(V>0&&j[V-1]==="EN"){ut="EN";break}if(B){ut="N";break}for(it=V+1,At=D.length;it<At&&D[it]==="ET";)it++;ut=it<At&&D[it]==="EN"?"EN":"N";break;case"NSM":if(A&&!a){for(At=D.length,it=V+1;it<At&&D[it]==="NSM";)it++;if(it<At){var vt=U[V],mt=vt>=1425&&vt<=2303||vt===64286;if(st=D[it],mt&&(st==="R"||st==="AL")){ut="R";break}}}ut=V<1||(st=D[V-1])==="B"?"N":j[V-1];break;case"B":B=!1,i=!0,ut=E;break;case"S":s=!0,ut="N"}return ut},k=function(U,D,j){var V=U.split("");return j&&H(V,j,{hiLevel:E}),V.reverse(),D&&D.reverse(),V.join("")},H=function(U,D,j){var V,st,rt,it,At,ut=-1,vt=U.length,mt=0,M=[],$=E?f:d,q=[];for(B=!1,i=!1,s=!1,st=0;st<vt;st++)q[st]=S(U[st]);for(rt=0;rt<vt;rt++){if(At=mt,M[rt]=L(U,q,M,rt),V=240&(mt=$[At][p[M[rt]]]),mt&=15,D[rt]=it=$[mt][5],V>0)if(V===16){for(st=ut;st<rt;st++)D[st]=1;ut=-1}else ut=-1;if($[mt][6])ut===-1&&(ut=rt);else if(ut>-1){for(st=ut;st<rt;st++)D[st]=it;ut=-1}q[rt]==="B"&&(D[rt]=0),j.hiLevel|=it}s&&function(tt,et,ot){for(var dt=0;dt<ot;dt++)if(tt[dt]==="S"){et[dt]=E;for(var wt=dt-1;wt>=0&&tt[wt]==="WS";wt--)et[wt]=E}}(q,D,vt)},Q=function(U,D,j,V,st){if(!(st.hiLevel<U)){if(U===1&&E===1&&!i)return D.reverse(),void(j&&j.reverse());for(var rt,it,At,ut,vt=D.length,mt=0;mt<vt;){if(V[mt]>=U){for(At=mt+1;At<vt&&V[At]>=U;)At++;for(ut=mt,it=At-1;ut<it;ut++,it--)rt=D[ut],D[ut]=D[it],D[it]=rt,j&&(rt=j[ut],j[ut]=j[it],j[it]=rt);mt=At}mt++}}},W=function(U,D,j){var V=U.split(""),st={hiLevel:E};return j||(j=[]),H(V,j,st),function(rt,it,At){if(At.hiLevel!==0&&h)for(var ut,vt=0;vt<rt.length;vt++)it[vt]===1&&(ut=y.indexOf(rt[vt]))>=0&&(rt[vt]=y[ut+1])}(V,j,st),Q(2,V,D,j,st),Q(1,V,D,j,st),V.join("")};return this.__bidiEngine__.doBidiReorder=function(U,D,j){if(function(st,rt){if(rt)for(var it=0;it<st.length;it++)rt[it]=it;a===void 0&&(a=I(st)),l===void 0&&(l=I(st))}(U,D),A||!o||l)if(A&&o&&a^l)E=a?1:0,U=k(U,D,j);else if(!A&&o&&l)E=a?1:0,U=W(U,D,j),U=k(U,D);else if(!A||a||o||l){if(A&&!o&&a^l)U=k(U,D),a?(E=0,U=W(U,D,j)):(E=1,U=W(U,D,j),U=k(U,D));else if(A&&a&&!o&&l)E=1,U=W(U,D,j),U=k(U,D);else if(!A&&!o&&a^l){var V=h;a?(E=1,U=W(U,D,j),E=0,h=!1,U=W(U,D,j),h=V):(E=0,U=W(U,D,j),U=k(U,D),E=1,h=!1,U=W(U,D,j),h=V,U=k(U,D))}}else E=0,U=W(U,D,j);else E=a?1:0,U=W(U,D,j);return U},this.__bidiEngine__.setOptions=function(U){U&&(A=U.isInputVisual,o=U.isOutputVisual,a=U.isInputRtl,l=U.isOutputRtl,h=U.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new n.__bidiEngine__({isInputVisual:!0});n.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var s=r.options||{};r.mutex,s.lang;var A=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,e.setOptions(s),Object.prototype.toString.call(i)==="[object Array]"){var a=0;for(A=[],a=0;a<i.length;a+=1)Object.prototype.toString.call(i[a])==="[object Array]"?A.push([e.doBidiReorder(i[a][0]),i[a][1],i[a][2]]):A.push([e.doBidiReorder(i[a])]);r.text=A}else r.text=e.doBidiReorder(i);e.setOptions({isInputVisual:!0})}])}(le),le.API.TTFFont=function(){function n(t){var e;if(this.rawData=t,e=this.contents=new Wh(t),this.contents.pos=4,e.readString(4)==="ttcf")throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new S7(this),this.registerTTF()}return n.open=function(t){return new n(t)},n.prototype.parse=function(){return this.directory=new u7(this.contents),this.head=new d7(this),this.name=new w7(this),this.cmap=new EN(this),this.toUnicode={},this.hhea=new g7(this),this.maxp=new y7(this),this.hmtx=new b7(this),this.post=new m7(this),this.os2=new p7(this),this.loca=new E7(this),this.glyf=new B7(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},n.prototype.registerTTF=function(){var t,e,r,i,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var A,a,o,l;for(l=[],A=0,a=(o=this.bbox).length;A<a;A++)t=o[A],l.push(Math.round(t*this.scaleFactor));return l}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(e=i>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},n.prototype.characterToGlyph=function(t){var e;return((e=this.cmap.unicode)!=null?e.codeMap[t]:void 0)||0},n.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},n.prototype.widthOfString=function(t,e,r){var i,s,A,a;for(A=0,s=0,a=(t=""+t).length;0<=a?s<a:s>a;s=0<=a?++s:--s)i=t.charCodeAt(s),A+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/e)||0;return A*(e/1e3)},n.prototype.lineHeight=function(t,e){var r;return e==null&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},n}();var Wa,Wh=function(){function n(t){this.data=t??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(t){return this.data[this.pos++]=t},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},n.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},n.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},n.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},n.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(t){var e,r,i;for(i=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)i.push(this.writeByte(t.charCodeAt(e)));return i},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(t){return this.writeInt16(t)},n.prototype.readLongLong=function(){var t,e,r,i,s,A,a,o;return t=this.readByte(),e=this.readByte(),r=this.readByte(),i=this.readByte(),s=this.readByte(),A=this.readByte(),a=this.readByte(),o=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^s)+65536*(255^A)+256*(255^a)+(255^o)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*i+16777216*s+65536*A+256*a+o},n.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(t){return this.writeInt32(t)},n.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},n.prototype.write=function(t){var e,r,i,s;for(s=[],r=0,i=t.length;r<i;r++)e=t[r],s.push(this.writeByte(e));return s},n}(),u7=function(){var n;function t(e){var r,i,s;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},i=0,s=this.tableCount;0<=s?i<s:i>s;i=0<=s?++i:--i)r={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(e){var r,i,s,A,a,o,l,h,u,d,f,p,m;for(m in f=Object.keys(e).length,o=Math.log(2),u=16*Math.floor(Math.log(f)/o),A=Math.floor(u/o),h=16*f-u,(i=new Wh).writeInt(this.scalarType),i.writeShort(f),i.writeShort(u),i.writeShort(A),i.writeShort(h),s=16*f,l=i.pos+s,a=null,p=[],e)for(d=e[m],i.writeString(m),i.writeInt(n(d)),i.writeInt(l),i.writeInt(d.length),p=p.concat(d),m==="head"&&(a=l),l+=d.length;l%4;)p.push(0),l++;return i.write(p),r=2981146554-n(i.data),i.pos=a+8,i.writeUInt32(r),i.data},n=function(e){var r,i,s,A;for(e=SN.call(e);e.length%4;)e.push(0);for(s=new Wh(e),i=0,r=0,A=e.length;r<A;r=r+=4)i+=s.readUInt32();return 4294967295&i},t}(),f7={}.hasOwnProperty,Vo=function(n,t){for(var e in t)f7.call(t,e)&&(n[e]=t[e]);function r(){this.constructor=n}return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};Wa=function(){function n(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return n.prototype.parse=function(){},n.prototype.encode=function(){},n.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},n}();var d7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="head",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},n.prototype.encode=function(t){var e;return(e=new Wh).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},n}(),b_=function(){function n(t,e){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),u=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(o=0;o<256;++o)this.codeMap[o]=t.readByte();break;case 4:for(f=t.readUInt16(),d=f/2,t.pos+=6,s=function(){var S,I;for(I=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)I.push(t.readUInt16());return I}(),t.pos+=2,m=function(){var S,I;for(I=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)I.push(t.readUInt16());return I}(),l=function(){var S,I;for(I=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)I.push(t.readUInt16());return I}(),h=function(){var S,I;for(I=[],o=S=0;0<=d?S<d:S>d;o=0<=d?++S:--S)I.push(t.readUInt16());return I}(),i=(this.length-t.pos+this.offset)/2,a=function(){var S,I;for(I=[],o=S=0;0<=i?S<i:S>i;o=0<=i?++S:--S)I.push(t.readUInt16());return I}(),o=w=0,E=s.length;w<E;o=++w)for(y=s[o],r=B=p=m[o];p<=y?B<=y:B>=y;r=p<=y?++B:--B)h[o]===0?A=r+l[o]:(A=a[h[o]/2+(r-p)-(d-o)]||0)!==0&&(A+=l[o]),this.codeMap[r]=65535&A}t.pos=u}return n.encode=function(t,e){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,I,L,k,H,Q,W,U,D,j,V,st,rt,it,At,ut,vt,mt,M,$,q,tt,et,ot,dt,wt,yt,St,Mt;switch(V=new Wh,A=Object.keys(t).sort(function(Pt,jt){return Pt-jt}),e){case"macroman":for(m=0,y=function(){var Pt=[];for(p=0;p<256;++p)Pt.push(0);return Pt}(),B={0:0},s={},st=0,ut=A.length;st<ut;st++)B[wt=t[i=A[st]]]==null&&(B[wt]=++m),s[i]={old:t[i],new:B[t[i]]},y[i]=B[t[i]];return V.writeUInt16(1),V.writeUInt16(0),V.writeUInt32(12),V.writeUInt16(0),V.writeUInt16(262),V.writeUInt16(0),V.write(y),{charMap:s,subtable:V.data,maxGlyphID:m+1};case"unicode":for(D=[],u=[],E=0,B={},r={},w=l=null,rt=0,vt=A.length;rt<vt;rt++)B[I=t[i=A[rt]]]==null&&(B[I]=++E),r[i]={old:I,new:B[I]},a=B[I]-i,w!=null&&a===l||(w&&u.push(w),D.push(i),l=a),w=i;for(w&&u.push(w),u.push(65535),D.push(65535),W=2*(Q=D.length),H=2*Math.pow(Math.log(Q)/Math.LN2,2),d=Math.log(H/2)/Math.LN2,k=2*Q-H,o=[],L=[],f=[],p=it=0,mt=D.length;it<mt;p=++it){if(U=D[p],h=u[p],U===65535){o.push(0),L.push(0);break}if(U-(j=r[U].new)>=32768)for(o.push(0),L.push(2*(f.length+Q-p)),i=At=U;U<=h?At<=h:At>=h;i=U<=h?++At:--At)f.push(r[i].new);else o.push(j-U),L.push(0)}for(V.writeUInt16(3),V.writeUInt16(1),V.writeUInt32(12),V.writeUInt16(4),V.writeUInt16(16+8*Q+2*f.length),V.writeUInt16(0),V.writeUInt16(W),V.writeUInt16(H),V.writeUInt16(d),V.writeUInt16(k),ot=0,M=u.length;ot<M;ot++)i=u[ot],V.writeUInt16(i);for(V.writeUInt16(0),dt=0,$=D.length;dt<$;dt++)i=D[dt],V.writeUInt16(i);for(yt=0,q=o.length;yt<q;yt++)a=o[yt],V.writeUInt16(a);for(St=0,tt=L.length;St<tt;St++)S=L[St],V.writeUInt16(S);for(Mt=0,et=f.length;Mt<et;Mt++)m=f[Mt],V.writeUInt16(m);return{charMap:r,subtable:V.data,maxGlyphID:E+1}}},n}(),EN=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="cmap",n.prototype.parse=function(t){var e,r,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)e=new b_(t,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},n.encode=function(t,e){var r,i;return e==null&&(e="macroman"),r=b_.encode(t,e),(i=new Wh).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},n}(),g7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="hhea",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},n}(),p7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="OS/2",n.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},n}(),m7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="post",n.prototype.parse=function(t){var e,r,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(r=t.readUInt16(),this.glyphNameIndex=[],s=0;0<=r?s<r:s>r;s=0<=r?++s:--s)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)e=t.readByte(),i.push(this.names.push(t.readString(e)));return i;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var A,a,o;for(o=[],s=A=0,a=this.file.maxp.numGlyphs;0<=a?A<a:A>a;s=0<=a?++A:--A)o.push(t.readUInt32());return o}).call(this)}},n}(),v7=function(n,t){this.raw=n,this.length=n.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},w7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="name",n.prototype.parse=function(t){var e,r,i,s,A,a,o,l,h,u,d;for(t.pos=this.offset,t.readShort(),e=t.readShort(),a=t.readShort(),r=[],s=0;0<=e?s<e:s>e;s=0<=e?++s:--s)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+a+t.readShort()});for(o={},s=h=0,u=r.length;h<u;s=++h)i=r[s],t.pos=i.offset,l=t.readString(i.length),A=new v7(l,i),o[d=i.nameID]==null&&(o[d]=[]),o[i.nameID].push(A);this.strings=o,this.copyright=o[0],this.fontFamily=o[1],this.fontSubfamily=o[2],this.uniqueSubfamily=o[3],this.fontName=o[4],this.version=o[5];try{this.postscriptName=o[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=o[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=o[7],this.manufacturer=o[8],this.designer=o[9],this.description=o[10],this.vendorUrl=o[11],this.designerUrl=o[12],this.license=o[13],this.licenseUrl=o[14],this.preferredFamily=o[15],this.preferredSubfamily=o[17],this.compatibleFull=o[18],this.sampleText=o[19]},n}(),y7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="maxp",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},n}(),b7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="hmtx",n.prototype.parse=function(t){var e,r,i,s,A,a,o;for(t.pos=this.offset,this.metrics=[],e=0,a=this.file.hhea.numberOfMetrics;0<=a?e<a:e>a;e=0<=a?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var l,h;for(h=[],e=l=0;0<=i?l<i:l>i;e=0<=i?++l:--l)h.push(t.readInt16());return h}(),this.widths=(function(){var l,h,u,d;for(d=[],l=0,h=(u=this.metrics).length;l<h;l++)s=u[l],d.push(s.advance);return d}).call(this),r=this.widths[this.widths.length-1],o=[],e=A=0;0<=i?A<i:A>i;e=0<=i?++A:--A)o.push(this.widths.push(r));return o},n.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},n}(),SN=[].slice,B7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(t){var e,r,i,s,A,a,o,l,h,u;return t in this.cache?this.cache[t]:(s=this.file.loca,e=this.file.contents,r=s.indexOf(t),(i=s.lengthOf(t))===0?this.cache[t]=null:(e.pos=this.offset+r,A=(a=new Wh(e.read(i))).readShort(),l=a.readShort(),u=a.readShort(),o=a.readShort(),h=a.readShort(),this.cache[t]=A===-1?new x7(a,l,u,o,h):new C7(a,A,l,u,o,h),this.cache[t]))},n.prototype.encode=function(t,e,r){var i,s,A,a,o;for(A=[],s=[],a=0,o=e.length;a<o;a++)i=t[e[a]],s.push(A.length),i&&(A=A.concat(i.encode(r)));return s.push(A.length),{table:A,offsets:s}},n}(),C7=function(){function n(t,e,r,i,s,A){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=i,this.xMax=s,this.yMax=A,this.compound=!1}return n.prototype.encode=function(){return this.raw.data},n}(),x7=function(){function n(t,e,r,i,s){var A,a;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=i,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],A=this.raw;a=A.readShort(),this.glyphOffsets.push(A.pos),this.glyphIDs.push(A.readUInt16()),32&a;)A.pos+=1&a?4:2,128&a?A.pos+=8:64&a?A.pos+=4:8&a&&(A.pos+=2)}return n.prototype.encode=function(){var t,e,r;for(e=new Wh(SN.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},n}(),E7=function(){function n(){return n.__super__.constructor.apply(this,arguments)}return Vo(n,Wa),n.prototype.tag="loca",n.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=e===0?(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=2)s.push(2*t.readUInt16());return s}).call(this):(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=4)s.push(t.readUInt32());return s}).call(this)},n.prototype.indexOf=function(t){return this.offsets[t]},n.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},n.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),i=0,s=0,A=0;A<r.length;++A)if(r[A]=i,s<e.length&&e[s]==A){++s,r[A]=i;var a=this.offsets[A],o=this.offsets[A+1]-a;o>0&&(i+=o)}for(var l=new Array(4*r.length),h=0;h<r.length;++h)l[4*h+3]=255&r[h],l[4*h+2]=(65280&r[h])>>8,l[4*h+1]=(16711680&r[h])>>16,l[4*h]=(4278190080&r[h])>>24;return l},n}(),S7=function(){function n(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var t,e,r,i,s;for(e in i=this.font.cmap.tables[0].codeMap,t={},s=this.subset)r=s[e],t[e]=i[r];return t},n.prototype.glyphsFor=function(t){var e,r,i,s,A,a,o;for(i={},A=0,a=t.length;A<a;A++)i[s=t[A]]=this.font.glyf.glyphFor(s);for(s in e=[],i)(r=i[s])!=null&&r.compound&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(s in o=this.glyphsFor(e))r=o[s],i[s]=r;return i},n.prototype.encode=function(t,e){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w;for(i in r=EN.encode(this.generateCmap(),"unicode"),A=this.glyphsFor(t),f={0:0},w=r.charMap)f[(o=w[i]).old]=o.new;for(p in d=r.maxGlyphID,A)p in f||(f[p]=d++);return h=function(B){var E,S;for(E in S={},B)S[B[E]]=E;return S}(f),u=Object.keys(h).sort(function(B,E){return B-E}),m=function(){var B,E,S;for(S=[],B=0,E=u.length;B<E;B++)a=u[B],S.push(h[a]);return S}(),s=this.font.glyf.encode(A,m,f),l=this.font.loca.encode(s.offsets,m),y={cmap:this.font.cmap.raw(),glyf:s.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},n}();le.API.PDFObject=function(){var n;function t(){}return n=function(e,r){return(Array(r+1).join("0")+e).slice(-r)},t.convert=function(e){var r,i,s,A;if(Array.isArray(e))return"["+function(){var a,o,l;for(l=[],a=0,o=e.length;a<o;a++)r=e[a],l.push(t.convert(r));return l}().join(" ")+"]";if(typeof e=="string")return"/"+e;if(e!=null&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+n(e.getUTCFullYear(),4)+n(e.getUTCMonth(),2)+n(e.getUTCDate(),2)+n(e.getUTCHours(),2)+n(e.getUTCMinutes(),2)+n(e.getUTCSeconds(),2)+"Z)";if({}.toString.call(e)==="[object Object]"){for(i in s=["<<"],e)A=e[i],s.push("/"+i+" "+t.convert(A));return s.push(">>"),s.join(`
|
|
217
|
+
`)}return""+e},t}();var Fg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}/*! https://mths.be/cssesc v3.0.0 by @mathias */var F7={},T7=F7.hasOwnProperty,I7=function(t,e){if(!t)return e;var r={};for(var i in e)r[i]=T7.call(t,i)?t[i]:e[i];return r},_7=/[ -,\.\/:-@\[-\^`\{-~]/,U7=/[ -,\.\/:-@\[\]\^`\{-~]/,L7=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,r4=function n(t,e){e=I7(e,n.options),e.quotes!="single"&&e.quotes!="double"&&(e.quotes="single");for(var r=e.quotes=="double"?'"':"'",i=e.isIdentifier,s=t.charAt(0),A="",a=0,o=t.length;a<o;){var l=t.charAt(a++),h=l.charCodeAt(),u=void 0;if(h<32||h>126){if(h>=55296&&h<=56319&&a<o){var d=t.charCodeAt(a++);(d&64512)==56320?h=((h&1023)<<10)+(d&1023)+65536:a--}u="\\"+h.toString(16).toUpperCase()+" "}else e.escapeEverything?_7.test(l)?u="\\"+l:u="\\"+h.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?u="\\"+h.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&U7.test(l)?u="\\"+l:u=l;A+=u}return i&&(/^-[-\d]/.test(A)?A="\\-"+A.slice(1):/\d/.test(s)&&(A="\\3"+s+" "+A.slice(1))),A=A.replace(L7,function(f,p,m){return p&&p.length%2?f:(p||"")+m}),!i&&e.wrap?r+A+r:A};r4.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};r4.version="3.0.0";var Q7=r4;const FN=pw(Q7);var tm=0,I5=1,B_=2,y2=3,C_=4,x_=5,E_=6,_5=/[a-z0-9_-]/i,b2=/[\s\t]/,N7=function(n){for(var t=!0,e=tm,r="",i=0,s,A,a=[];;){if(A=n[i],e===tm){if(!A&&t)break;if(!A&&!t)throw new Error("Parse error");if(A==='"'||A==="'")s=A,e=I5,t=!1;else if(!b2.test(A))if(_5.test(A))e=y2,t=!1,i--;else throw new Error("Parse error")}else if(e===I5)if(A)A==="\\"?e=B_:A===s?(a.push(r),r="",e=C_):r+=A;else throw new Error("Parse Error");else if(e===B_)if(A===s||A==="\\")r+=A,e=I5;else throw new Error("Parse error");else if(e===y2)if(A)_5.test(A)?r+=A:A===","?(a.push(r),r="",e=tm):b2.test(A)?e=x_:A==="\\"&&(e=E_);else{a.push(r);break}else if(e===E_){if(/[0-9a-f]/i.test(A))throw new Error("Parse error");r+=A,e=y2}else if(e===x_)if(A){if(_5.test(A))r+=" "+A,e=y2;else if(A===",")a.push(r),r="",e=tm;else if(!b2.test(A))throw new Error("Parse error")}else{a.push(r);break}else if(e===C_)if(A){if(A===",")e=tm;else if(!b2.test(A))throw new Error("Parse error")}else break;i++}return a},P7=/[^a-z0-9_-]/i,M7=function(n,t){var e=t&&t.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Quote must be `'` or `\"`");for(var r=new RegExp(e,"g"),i=[],s=0;s<n.length;++s){var A=n[s];P7.test(A)&&(A=A.replace(/\\/g,"\\\\").replace(r,"\\"+e),A=e+A+e),i.push(A)}return i.join(", ")},k7={parse:N7,stringify:M7};const O7=pw(k7);var Fy={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},D7=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function R7(n){return n===10||n===13||n===8232||n===8233||n===32||n===9||n===11||n===12||n===160||n>=5760&&D7.indexOf(n)>=0}function H7(n){switch(n|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function K7(n){return(n|32)===97}function qd(n){return n>=48&&n<=57}function V7(n){return n>=48&&n<=57||n===43||n===45||n===46}function G7(n){this.index=0,this.path=n,this.max=n.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function Ty(n){for(;n.index<n.max&&R7(n.path.charCodeAt(n.index));)n.index++}function j7(n){var t=n.path.charCodeAt(n.index);if(t===48){n.param=0,n.index++;return}if(t===49){n.param=1,n.index++;return}n.err="SvgPath: arc flag can be 0 or 1 only (at pos "+n.index+")"}function $7(n){var t=n.index,e=t,r=n.max,i=!1,s=!1,A=!1,a=!1,o;if(e>=r){n.err="SvgPath: missed param (at pos "+e+")";return}if(o=n.path.charCodeAt(e),(o===43||o===45)&&(e++,o=e<r?n.path.charCodeAt(e):0),!qd(o)&&o!==46){n.err="SvgPath: param should start with 0..9 or `.` (at pos "+e+")";return}if(o!==46){if(i=o===48,e++,o=e<r?n.path.charCodeAt(e):0,i&&e<r&&o&&qd(o)){n.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;e<r&&qd(n.path.charCodeAt(e));)e++,s=!0;o=e<r?n.path.charCodeAt(e):0}if(o===46){for(a=!0,e++;qd(n.path.charCodeAt(e));)e++,A=!0;o=e<r?n.path.charCodeAt(e):0}if(o===101||o===69){if(a&&!s&&!A){n.err="SvgPath: invalid float exponent (at pos "+e+")";return}if(e++,o=e<r?n.path.charCodeAt(e):0,(o===43||o===45)&&e++,e<r&&qd(n.path.charCodeAt(e)))for(;e<r&&qd(n.path.charCodeAt(e));)e++;else{n.err="SvgPath: invalid float exponent (at pos "+e+")";return}}n.index=e,n.param=parseFloat(n.path.slice(t,e))+0}function U5(n){var t,e;t=n.path[n.segmentStart],e=t.toLowerCase();var r=n.data;if(e==="m"&&r.length>2&&(n.result.push([t,r[0],r[1]]),r=r.slice(2),e="l",t=t==="m"?"l":"L"),e==="r")n.result.push([t].concat(r));else for(;r.length>=Fy[e]&&(n.result.push([t].concat(r.splice(0,Fy[e]))),!!Fy[e]););}function W7(n){var t=n.max,e,r,i,s,A;if(n.segmentStart=n.index,e=n.path.charCodeAt(n.index),r=K7(e),!H7(e)){n.err="SvgPath: bad command "+n.path[n.index]+" (at pos "+n.index+")";return}if(s=Fy[n.path[n.index].toLowerCase()],n.index++,Ty(n),n.data=[],!s){U5(n);return}for(i=!1;;){for(A=s;A>0;A--){if(r&&(A===3||A===4)?j7(n):$7(n),n.err.length){U5(n);return}n.data.push(n.param),Ty(n),i=!1,n.index<t&&n.path.charCodeAt(n.index)===44&&(n.index++,Ty(n),i=!0)}if(!i&&(n.index>=n.max||!V7(n.path.charCodeAt(n.index))))break}U5(n)}var z7=function(t){var e=new G7(t),r=e.max;for(Ty(e);e.index<r&&!e.err.length;)W7(e);return e.result.length&&("mM".indexOf(e.result[0][0])<0?(e.err="SvgPath: string should start with `M` or `m`",e.result=[]):e.result[0][0]="M"),{err:e.err,segments:e.result}};function X7(n,t){return[n[0]*t[0]+n[2]*t[1],n[1]*t[0]+n[3]*t[1],n[0]*t[2]+n[2]*t[3],n[1]*t[2]+n[3]*t[3],n[0]*t[4]+n[2]*t[5]+n[4],n[1]*t[4]+n[3]*t[5]+n[5]]}function Va(){if(!(this instanceof Va))return new Va;this.queue=[],this.cache=null}Va.prototype.matrix=function(n){return n[0]===1&&n[1]===0&&n[2]===0&&n[3]===1&&n[4]===0&&n[5]===0?this:(this.cache=null,this.queue.push(n),this)};Va.prototype.translate=function(n,t){return(n!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,n,t])),this};Va.prototype.scale=function(n,t){return(n!==1||t!==1)&&(this.cache=null,this.queue.push([n,0,0,t,0,0])),this};Va.prototype.rotate=function(n,t,e){var r,i,s;return n!==0&&(this.translate(t,e),r=n*Math.PI/180,i=Math.cos(r),s=Math.sin(r),this.queue.push([i,s,-s,i,0,0]),this.cache=null,this.translate(-t,-e)),this};Va.prototype.skewX=function(n){return n!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(n*Math.PI/180),1,0,0])),this};Va.prototype.skewY=function(n){return n!==0&&(this.cache=null,this.queue.push([1,Math.tan(n*Math.PI/180),0,1,0,0])),this};Va.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var n=1;n<this.queue.length;n++)this.cache=X7(this.cache,this.queue[n]);return this.cache};Va.prototype.calc=function(n,t,e){var r;return this.queue.length?(this.cache||(this.cache=this.toArray()),r=this.cache,[n*r[0]+t*r[2]+(e?0:r[4]),n*r[1]+t*r[3]+(e?0:r[5])]):[n,t]};var TN=Va,q7=TN,Y7={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},J7=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,Z7=/[\s,]+/,tK=function(t){var e=new q7,r,i;return t.split(J7).forEach(function(s){if(s.length){if(typeof Y7[s]<"u"){r=s;return}switch(i=s.split(Z7).map(function(A){return+A||0}),r){case"matrix":i.length===6&&e.matrix(i);return;case"scale":i.length===1?e.scale(i[0],i[0]):i.length===2&&e.scale(i[0],i[1]);return;case"rotate":i.length===1?e.rotate(i[0],0,0):i.length===3&&e.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?e.translate(i[0],0):i.length===2&&e.translate(i[0],i[1]);return;case"skewX":i.length===1&&e.skewX(i[0]);return;case"skewY":i.length===1&&e.skewY(i[0]);return}}}),e},Jm=Math.PI*2;function S_(n,t,e,r){var i=n*r-t*e<0?-1:1,s=n*e+t*r;return s>1&&(s=1),s<-1&&(s=-1),i*Math.acos(s)}function eK(n,t,e,r,i,s,A,a,o,l){var h=l*(n-e)/2+o*(t-r)/2,u=-o*(n-e)/2+l*(t-r)/2,d=A*A,f=a*a,p=h*h,m=u*u,y=d*f-d*m-f*p;y<0&&(y=0),y/=d*m+f*p,y=Math.sqrt(y)*(i===s?-1:1);var w=y*A/a*u,B=y*-a/A*h,E=l*w-o*B+(n+e)/2,S=o*w+l*B+(t+r)/2,I=(h-w)/A,L=(u-B)/a,k=(-h-w)/A,H=(-u-B)/a,Q=S_(1,0,I,L),W=S_(I,L,k,H);return s===0&&W>0&&(W-=Jm),s===1&&W<0&&(W+=Jm),[E,S,Q,W]}function rK(n,t){var e=1.3333333333333333*Math.tan(t/4),r=Math.cos(n),i=Math.sin(n),s=Math.cos(n+t),A=Math.sin(n+t);return[r,i,r-i*e,i+r*e,s+A*e,A-s*e,s,A]}var iK=function(t,e,r,i,s,A,a,o,l){var h=Math.sin(l*Jm/360),u=Math.cos(l*Jm/360),d=u*(t-r)/2+h*(e-i)/2,f=-h*(t-r)/2+u*(e-i)/2;if(d===0&&f===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);var p=d*d/(a*a)+f*f/(o*o);p>1&&(a*=Math.sqrt(p),o*=Math.sqrt(p));var m=eK(t,e,r,i,s,A,a,o,h,u),y=[],w=m[2],B=m[3],E=Math.max(Math.ceil(Math.abs(B)/(Jm/4)),1);B/=E;for(var S=0;S<E;S++)y.push(rK(w,B)),w+=B;return y.map(function(I){for(var L=0;L<I.length;L+=2){var k=I[L+0],H=I[L+1];k*=a,H*=o;var Q=u*k-h*H,W=h*k+u*H;I[L+0]=Q+m[0],I[L+1]=W+m[1]}return I})},Zm=1e-10,F_=Math.PI/180;function gv(n,t,e){if(!(this instanceof gv))return new gv(n,t,e);this.rx=n,this.ry=t,this.ax=e}gv.prototype.transform=function(n){var t=Math.cos(this.ax*F_),e=Math.sin(this.ax*F_),r=[this.rx*(n[0]*t+n[2]*e),this.rx*(n[1]*t+n[3]*e),this.ry*(-n[0]*e+n[2]*t),this.ry*(-n[1]*e+n[3]*t)],i=r[0]*r[0]+r[2]*r[2],s=r[1]*r[1]+r[3]*r[3],A=((r[0]-r[3])*(r[0]-r[3])+(r[2]+r[1])*(r[2]+r[1]))*((r[0]+r[3])*(r[0]+r[3])+(r[2]-r[1])*(r[2]-r[1])),a=(i+s)/2;if(A<Zm*a)return this.rx=this.ry=Math.sqrt(a),this.ax=0,this;var o=r[0]*r[1]+r[2]*r[3];A=Math.sqrt(A);var l=a+A/2,h=a-A/2;return this.ax=Math.abs(o)<Zm&&Math.abs(l-s)<Zm?90:Math.atan(Math.abs(o)>Math.abs(l-s)?(l-i)/o:o/(l-s))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(l),this.ry=Math.sqrt(h)):(this.ax+=90,this.rx=Math.sqrt(h),this.ry=Math.sqrt(l)),this};gv.prototype.isDegenerate=function(){return this.rx<Zm*this.ry||this.ry<Zm*this.rx};var nK=gv,sK=z7,AK=tK,eu=TN,aK=iK,oK=nK;function Ai(n){if(!(this instanceof Ai))return new Ai(n);var t=sK(n);this.segments=t.segments,this.err=t.err,this.__stack=[]}Ai.from=function(n){if(typeof n=="string")return new Ai(n);if(n instanceof Ai){var t=new Ai("");return t.err=n.err,t.segments=n.segments.map(function(e){return e.slice()}),t.__stack=n.__stack.map(function(e){return eu().matrix(e.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+n)};Ai.prototype.__matrix=function(n){var t=this,e;n.queue.length&&this.iterate(function(r,i,s,A){var a,o,l,h;switch(r[0]){case"v":a=n.calc(0,r[1],!0),o=a[0]===0?["v",a[1]]:["l",a[0],a[1]];break;case"V":a=n.calc(s,r[1],!1),o=a[0]===n.calc(s,A,!1)[0]?["V",a[1]]:["L",a[0],a[1]];break;case"h":a=n.calc(r[1],0,!0),o=a[1]===0?["h",a[0]]:["l",a[0],a[1]];break;case"H":a=n.calc(r[1],A,!1),o=a[1]===n.calc(s,A,!1)[1]?["H",a[0]]:["L",a[0],a[1]];break;case"a":case"A":var u=n.toArray(),d=oK(r[1],r[2],r[3]).transform(u);if(u[0]*u[3]-u[1]*u[2]<0&&(r[5]=r[5]?"0":"1"),a=n.calc(r[6],r[7],r[0]==="a"),r[0]==="A"&&r[6]===s&&r[7]===A||r[0]==="a"&&r[6]===0&&r[7]===0){o=[r[0]==="a"?"l":"L",a[0],a[1]];break}d.isDegenerate()?o=[r[0]==="a"?"l":"L",a[0],a[1]]:o=[r[0],d.rx,d.ry,d.ax,r[4],r[5],a[0],a[1]];break;case"m":h=i>0,a=n.calc(r[1],r[2],h),o=["m",a[0],a[1]];break;default:for(l=r[0],o=[l],h=l.toLowerCase()===l,e=1;e<r.length;e+=2)a=n.calc(r[e],r[e+1],h),o.push(a[0],a[1])}t.segments[i]=o},!0)};Ai.prototype.__evaluateStack=function(){var n,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(n=eu(),t=this.__stack.length;--t>=0;)n.matrix(this.__stack[t].toArray());this.__matrix(n),this.__stack=[]}};Ai.prototype.toString=function(){var n="",t="",e=!1;this.__evaluateStack();for(var r=0,i=this.segments.length;r<i;r++){var s=this.segments[r],A=s[0];A!==t||A==="m"||A==="M"?(A==="m"&&t==="z"&&(n+=" "),n+=A,e=!1):e=!0;for(var a=1;a<s.length;a++){var o=s[a];a===1?e&&o>=0&&(n+=" "):o>=0&&(n+=" "),n+=o}t=A}return n};Ai.prototype.translate=function(n,t){return this.__stack.push(eu().translate(n,t||0)),this};Ai.prototype.scale=function(n,t){return this.__stack.push(eu().scale(n,!t&&t!==0?n:t)),this};Ai.prototype.rotate=function(n,t,e){return this.__stack.push(eu().rotate(n,t||0,e||0)),this};Ai.prototype.skewX=function(n){return this.__stack.push(eu().skewX(n)),this};Ai.prototype.skewY=function(n){return this.__stack.push(eu().skewY(n)),this};Ai.prototype.matrix=function(n){return this.__stack.push(eu().matrix(n)),this};Ai.prototype.transform=function(n){return n.trim()?(this.__stack.push(AK(n)),this):this};Ai.prototype.round=function(n){var t=0,e=0,r=0,i=0,s;return n=n||0,this.__evaluateStack(),this.segments.forEach(function(A){var a=A[0].toLowerCase()===A[0];switch(A[0]){case"H":case"h":a&&(A[1]+=r),r=A[1]-A[1].toFixed(n),A[1]=+A[1].toFixed(n);return;case"V":case"v":a&&(A[1]+=i),i=A[1]-A[1].toFixed(n),A[1]=+A[1].toFixed(n);return;case"Z":case"z":r=t,i=e;return;case"M":case"m":a&&(A[1]+=r,A[2]+=i),r=A[1]-A[1].toFixed(n),i=A[2]-A[2].toFixed(n),t=r,e=i,A[1]=+A[1].toFixed(n),A[2]=+A[2].toFixed(n);return;case"A":case"a":a&&(A[6]+=r,A[7]+=i),r=A[6]-A[6].toFixed(n),i=A[7]-A[7].toFixed(n),A[1]=+A[1].toFixed(n),A[2]=+A[2].toFixed(n),A[3]=+A[3].toFixed(n+2),A[6]=+A[6].toFixed(n),A[7]=+A[7].toFixed(n);return;default:s=A.length,a&&(A[s-2]+=r,A[s-1]+=i),r=A[s-2]-A[s-2].toFixed(n),i=A[s-1]-A[s-1].toFixed(n),A.forEach(function(o,l){l&&(A[l]=+A[l].toFixed(n))});return}}),this};Ai.prototype.iterate=function(n,t){var e=this.segments,r={},i=!1,s=0,A=0,a=0,o=0,l,h,u;if(t||this.__evaluateStack(),e.forEach(function(d,f){var p=n(d,f,s,A);Array.isArray(p)&&(r[f]=p,i=!0);var m=d[0]===d[0].toLowerCase();switch(d[0]){case"m":case"M":s=d[1]+(m?s:0),A=d[2]+(m?A:0),a=s,o=A;return;case"h":case"H":s=d[1]+(m?s:0);return;case"v":case"V":A=d[1]+(m?A:0);return;case"z":case"Z":s=a,A=o;return;default:s=d[d.length-2]+(m?s:0),A=d[d.length-1]+(m?A:0)}}),!i)return this;for(u=[],l=0;l<e.length;l++)if(typeof r[l]<"u")for(h=0;h<r[l].length;h++)u.push(r[l][h]);else u.push(e[l]);return this.segments=u,this};Ai.prototype.abs=function(){return this.iterate(function(n,t,e,r){var i=n[0],s=i.toUpperCase(),A;if(i!==s)switch(n[0]=s,i){case"v":n[1]+=r;return;case"a":n[6]+=e,n[7]+=r;return;default:for(A=1;A<n.length;A++)n[A]+=A%2?e:r}},!0),this};Ai.prototype.rel=function(){return this.iterate(function(n,t,e,r){var i=n[0],s=i.toLowerCase(),A;if(i!==s&&!(t===0&&i==="M"))switch(n[0]=s,i){case"V":n[1]-=r;return;case"A":n[6]-=e,n[7]-=r;return;default:for(A=1;A<n.length;A++)n[A]-=A%2?e:r}},!0),this};Ai.prototype.unarc=function(){return this.iterate(function(n,t,e,r){var i,s,A,a=[],o=n[0];return o!=="A"&&o!=="a"?null:(o==="a"?(s=e+n[6],A=r+n[7]):(s=n[6],A=n[7]),i=aK(e,r,s,A,n[4],n[5],n[1],n[2],n[3]),i.length===0?[[n[0]==="a"?"l":"L",n[6],n[7]]]:(i.forEach(function(l){a.push(["C",l[2],l[3],l[4],l[5],l[6],l[7]])}),a))}),this};Ai.prototype.unshort=function(){var n=this.segments,t,e,r,i,s;return this.iterate(function(A,a,o,l){var h=A[0],u=h.toUpperCase(),d;a&&(u==="T"?(d=h==="t",r=n[a-1],r[0]==="Q"?(t=r[1]-o,e=r[2]-l):r[0]==="q"?(t=r[1]-r[3],e=r[2]-r[4]):(t=0,e=0),i=-t,s=-e,d||(i+=o,s+=l),n[a]=[d?"q":"Q",i,s,A[1],A[2]]):u==="S"&&(d=h==="s",r=n[a-1],r[0]==="C"?(t=r[3]-o,e=r[4]-l):r[0]==="c"?(t=r[3]-r[5],e=r[4]-r[6]):(t=0,e=0),i=-t,s=-e,d||(i+=o,s+=l),n[a]=[d?"c":"C",i,s,A[1],A[2],A[3],A[4]]))}),this};var lK=Ai,cK=lK;const hK=pw(cK);var T_=function(n){var t=n,e,r={a:0,b:0,c:0},i=[],s=/(\[[^\]]+\])/g,A=/(#[^\#\s\+>~\.\[:\)]+)/g,a=/(\.[^\s\+>~\.\[:\)]+)/g,o=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,h=/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,u=/([^\s\+>~\.\[:]+)/g;return e=function(d,f){var p,m,y,w,B,E;if(d.test(t))for(p=t.match(d),m=0,y=p.length;m<y;m+=1)r[f]+=1,w=p[m],B=t.indexOf(w),E=w.length,i.push({selector:n.substr(B,E),type:f,index:B,length:E}),t=t.replace(w,Array(E+1).join(" "))},function(){var d=function(y){var w,B,E,S;if(y.test(t))for(w=t.match(y),B=0,E=w.length;B<E;B+=1)S=w[B],t=t.replace(S,Array(S.length+1).join("A"))},f=/\\[0-9A-Fa-f]{6}\s?/g,p=/\\[0-9A-Fa-f]{1,5}\s/g,m=/\\./g;d(f),d(p),d(m)}(),function(){var d=/{[^]*/gm,f,p,m,y;if(d.test(t))for(f=t.match(d),p=0,m=f.length;p<m;p+=1)y=f[p],t=t.replace(y,Array(y.length+1).join(" "))}(),e(s,"b"),e(A,"a"),e(a,"b"),e(o,"c"),e(l,"b"),e(h,"b"),t=t.replace(/[\*\s\+>~]/g," "),t=t.replace(/[#\.]/g," "),t=t.replace(/:not/g," "),t=t.replace(/:local/g," "),t=t.replace(/:global/g," "),t=t.replace(/[\(\)]/g," "),e(u,"c"),i.sort(function(d,f){return d.index-f.index}),{selector:n,specificity:"0,"+r.a.toString()+","+r.b.toString()+","+r.c.toString(),specificityArray:[0,r.a,r.b,r.c],parts:i}},uK=function(n,t){var e,r,i;if(typeof n=="string"){if(n.indexOf(",")!==-1)throw"Invalid CSS selector";e=T_(n).specificityArray}else if(Array.isArray(n)){if(n.filter(function(s){return typeof s=="number"}).length!==4)throw"Invalid specificity array";e=n}else throw"Invalid CSS selector or specificity array";if(typeof t=="string"){if(t.indexOf(",")!==-1)throw"Invalid CSS selector";r=T_(t).specificityArray}else if(Array.isArray(t)){if(t.filter(function(s){return typeof s=="number"}).length!==4)throw"Invalid specificity array";r=t}else throw"Invalid CSS selector or specificity array";for(i=0;i<4;i+=1){if(e[i]<r[i])return-1;if(e[i]>r[i])return 1}return 0},wE=function(n,t){return wE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},wE(n,t)};function Fr(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}wE(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Sb=function(){return Sb=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},Sb.apply(this,arguments)};function Lr(n,t,e,r){return new(e||(e=Promise))(function(i,s){function A(l){try{o(r.next(l))}catch(h){s(h)}}function a(l){try{o(r.throw(l))}catch(h){s(h)}}function o(l){var h;l.done?i(l.value):(h=l.value,h instanceof e?h:new e(function(u){u(h)})).then(A,a)}o((r=r.apply(n,t||[])).next())})}function Qr(n,t){var e,r,i,s,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(l){return function(h){if(e)throw new TypeError("Generator is already executing.");for(;A;)try{if(e=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return A.label++,{value:h[1],done:!1};case 5:A.label++,r=h[1],h=[0];continue;case 7:h=A.ops.pop(),A.trys.pop();continue;default:if(i=A.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){A=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){A.label=h[1];break}if(h[0]===6&&A.label<i[1]){A.label=i[1],i=h;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(h);break}i[2]&&A.ops.pop(),A.trys.pop();continue}h=t.call(n,A)}catch(u){h=[6,u],r=0}finally{e=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([o,l])}}}var ka=function(){function n(t){if(this.a=void 0,this.r=0,this.g=0,this.b=0,this.simpleColors={},this.colorDefs=[],this.ok=!1,t){for(var e in t.charAt(0)=="#"&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase(),this.simpleColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},this.simpleColors)t==e&&(t=this.simpleColors[e]);this.colorDefs=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^rgb\(([0-9.]+)%,\s*([0-9.]+)%,\s*([0-9.]+)%\)$/,example:["rgb(50.5%, 25.75%, 75.5%)","rgb(100%,0%,0%)"],process:function(o){return[Math.round(2.55*parseFloat(o[1])),Math.round(2.55*parseFloat(o[2])),Math.round(2.55*parseFloat(o[3]))]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}];for(var r=0;r<this.colorDefs.length;r++){var i=this.colorDefs[r].re,s=this.colorDefs[r].process,A=i.exec(t);if(A){var a=s(A);this.r=a[0],this.g=a[1],this.b=a[2],this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b}}return n.prototype.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},n.prototype.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+(this.a||"1")+")"},n.prototype.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return t.length==1&&(t="0"+t),e.length==1&&(e="0"+e),r.length==1&&(r="0"+r),"#"+t+e+r},n.prototype.getHelpXML=function(){for(var t=[],e=0;e<this.colorDefs.length;e++)for(var r=this.colorDefs[e].example,i=0;i<r.length;i++)t[t.length]=r[i];for(var s in this.simpleColors)t[t.length]=s;var A=document.createElement("ul");for(A.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var a=document.createElement("li"),o=new n(t[e]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex(),l.appendChild(document.createTextNode("test"));var h=document.createTextNode(" "+t[e]+" -> "+o.toRGB()+" -> "+o.toHex());a.appendChild(l),a.appendChild(h),A.appendChild(a)}catch{}return A},n}(),kn=function(){function n(t){this.color=t}return n.prototype.getFillData=function(t,e){return Lr(this,void 0,void 0,function(){return Qr(this,function(r){return[2,void 0]})})},n}(),p0=function(){function n(){this.xmlSpace="",this.whiteSpace="",this.fill=null,this.fillOpacity=1,this.fontFamily="",this.fontSize=16,this.fontStyle="",this.fontWeight="",this.opacity=1,this.stroke=null,this.strokeDasharray=null,this.strokeDashoffset=0,this.strokeLinecap="",this.strokeLinejoin="",this.strokeMiterlimit=4,this.strokeOpacity=1,this.strokeWidth=1,this.alignmentBaseline="",this.textAnchor="",this.visibility="",this.color=null,this.contextFill=null,this.contextStroke=null,this.fillRule=null}return n.prototype.clone=function(){var t=new n;return t.xmlSpace=this.xmlSpace,t.whiteSpace=this.whiteSpace,t.fill=this.fill,t.fillOpacity=this.fillOpacity,t.fontFamily=this.fontFamily,t.fontSize=this.fontSize,t.fontStyle=this.fontStyle,t.fontWeight=this.fontWeight,t.opacity=this.opacity,t.stroke=this.stroke,t.strokeDasharray=this.strokeDasharray,t.strokeDashoffset=this.strokeDashoffset,t.strokeLinecap=this.strokeLinecap,t.strokeLinejoin=this.strokeLinejoin,t.strokeMiterlimit=this.strokeMiterlimit,t.strokeOpacity=this.strokeOpacity,t.strokeWidth=this.strokeWidth,t.textAnchor=this.textAnchor,t.alignmentBaseline=this.alignmentBaseline,t.visibility=this.visibility,t.color=this.color,t.fillRule=this.fillRule,t.contextFill=this.contextFill,t.contextStroke=this.contextStroke,t},n.default=function(){var t=new n;return t.xmlSpace="default",t.whiteSpace="normal",t.fill=new kn(new ka("rgb(0, 0, 0)")),t.fillOpacity=1,t.fontFamily="times",t.fontSize=16,t.fontStyle="normal",t.fontWeight="normal",t.opacity=1,t.stroke=null,t.strokeDasharray=null,t.strokeDashoffset=0,t.strokeLinecap="butt",t.strokeLinejoin="miter",t.strokeMiterlimit=4,t.strokeOpacity=1,t.strokeWidth=1,t.alignmentBaseline="baseline",t.textAnchor="start",t.visibility="visible",t.color=new ka("rgb(0, 0, 0)"),t.fillRule="nonzero",t.contextFill=null,t.contextStroke=null,t},n.getContextColors=function(t,e){e===void 0&&(e=!1);var r={};return t.attributeState.contextFill&&(r.contextFill=t.attributeState.contextFill),t.attributeState.contextStroke&&(r.contextStroke=t.attributeState.contextStroke),e&&t.attributeState.color&&(r.color=t.attributeState.color),r},n}(),ru=function(){function n(t,e){var r,i,s;this.pdf=t,this.svg2pdfParameters=e.svg2pdfParameters,this.attributeState=e.attributeState?e.attributeState.clone():p0.default(),this.viewport=e.viewport,this.refsHandler=e.refsHandler,this.styleSheets=e.styleSheets,this.textMeasure=e.textMeasure,this.transform=(r=e.transform)!==null&&r!==void 0?r:this.pdf.unitMatrix,this.withinClipPath=(i=e.withinClipPath)!==null&&i!==void 0&&i,this.withinUse=(s=e.withinUse)!==null&&s!==void 0&&s}return n.prototype.clone=function(t){var e,r,i,s;return t===void 0&&(t={}),new n(this.pdf,{svg2pdfParameters:this.svg2pdfParameters,attributeState:t.attributeState?t.attributeState.clone():this.attributeState.clone(),viewport:(e=t.viewport)!==null&&e!==void 0?e:this.viewport,refsHandler:this.refsHandler,styleSheets:this.styleSheets,textMeasure:this.textMeasure,transform:(r=t.transform)!==null&&r!==void 0?r:this.transform,withinClipPath:(i=t.withinClipPath)!==null&&i!==void 0?i:this.withinClipPath,withinUse:(s=t.withinUse)!==null&&s!==void 0?s:this.withinUse})},n}(),IN=function(){function n(t){this.renderedElements={},this.idMap=t,this.idPrefix=String(n.instanceCounter++)}return n.prototype.getRendered=function(t,e,r){return Lr(this,void 0,void 0,function(){var i,s;return Qr(this,function(A){switch(A.label){case 0:return i=this.generateKey(t,e),this.renderedElements.hasOwnProperty(i)?[2,this.renderedElements[t]]:(s=this.get(t),this.renderedElements[i]=s,[4,r(s)]);case 1:return A.sent(),[2,s]}})})},n.prototype.get=function(t){return this.idMap[FN(t,{isIdentifier:!0})]},n.prototype.generateKey=function(t,e){var r="";return e&&(r=["color","contextFill","contextStroke"].map(function(i){var s,A;return(A=(s=e[i])===null||s===void 0?void 0:s.toRGBA())!==null&&A!==void 0?A:""}).join("|")),this.idPrefix+"|"+t+"|"+r},n.instanceCounter=0,n}();function I_(n,t){return Math.atan2(t[1]-n[1],t[0]-n[0])}var __=2/3;function U_(n,t){return[__*(t[0]-n[0])+n[0],__*(t[1]-n[1])+n[1]]}function mm(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]);return[n[0]/t,n[1]/t]}function Yd(n,t){return mm([t[0]-n[0],t[1]-n[1]])}function B2(n,t){return[n[0]+t[0],n[1]+t[1]]}function L5(n,t){var e=n[0],r=n[1];return[t.a*e+t.c*r+t.e,t.b*e+t.d*r+t.f]}var m0=function(){function n(){this.segments=[]}return n.prototype.moveTo=function(t,e){return this.segments.push(new cn(t,e)),this},n.prototype.lineTo=function(t,e){return this.segments.push(new $c(t,e)),this},n.prototype.curveTo=function(t,e,r,i,s,A){return this.segments.push(new ko(t,e,r,i,s,A)),this},n.prototype.close=function(){return this.segments.push(new yE),this},n.prototype.transform=function(t){this.segments.forEach(function(e){if(e instanceof cn||e instanceof $c||e instanceof ko){var r=L5([e.x,e.y],t);e.x=r[0],e.y=r[1]}if(e instanceof ko){var i=L5([e.x1,e.y1],t),s=L5([e.x2,e.y2],t);e.x1=i[0],e.y1=i[1],e.x2=s[0],e.y2=s[1]}})},n.prototype.draw=function(t){var e=t.pdf;this.segments.forEach(function(r){r instanceof cn?e.moveTo(r.x,r.y):r instanceof $c?e.lineTo(r.x,r.y):r instanceof ko?e.curveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y):e.close()})},n}(),cn=function(n,t){this.x=n,this.y=t},$c=function(n,t){this.x=n,this.y=t},ko=function(n,t,e,r,i,s){this.x1=n,this.y1=t,this.x2=e,this.y2=r,this.x=i,this.y=s},yE=function(){};function zh(n,t){return t.split(",").indexOf((n.nodeName||n.tagName).toLowerCase())>=0}function Lt(n,t,e,r){var i;r===void 0&&(r=e);var s=(i=n.style)===null||i===void 0?void 0:i.getPropertyValue(r);if(s)return s;var A=t.getPropertyValue(n,r);return A||n.hasAttribute(e)&&n.getAttribute(e)||void 0}function vc(n,t,e){if(Lt(n.element,e.styleSheets,"display")==="none")return!1;var r=t,i=Lt(n.element,e.styleSheets,"visibility");return i&&(r=i!=="hidden"),r}function iu(n,t,e){var r=vc(n,t,e);return n.element.childNodes.length!==0&&(n.children.forEach(function(i){i.isVisible(r,e)&&(r=!0)}),r)}var fK=function(){function n(){this.markers=[]}return n.prototype.addMarker=function(t){this.markers.push(t)},n.prototype.draw=function(t){return Lr(this,void 0,void 0,function(){var e,r,i,s,A,a,o,l;return Qr(this,function(h){switch(h.label){case 0:e=0,h.label=1;case 1:return e<this.markers.length?(r=this.markers[e],i=void 0,s=r.angle,A=r.anchor,a=Math.cos(s),o=Math.sin(s),i=t.pdf.Matrix(a,o,-o,a,A[0],A[1]),i=t.pdf.matrixMult(t.pdf.Matrix(t.attributeState.strokeWidth,0,0,t.attributeState.strokeWidth,0,0),i),i=t.pdf.matrixMult(i,t.transform),t.pdf.saveGraphicsState(),l=p0.getContextColors(t),[4,t.refsHandler.getRendered(r.id,l,function(u){return u.apply(t)})]):[3,4];case 2:h.sent(),t.pdf.doFormObject(t.refsHandler.generateKey(r.id,l),i),t.pdf.restoreGraphicsState(),h.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},n}(),Dc=function(n,t,e,r){r===void 0&&(r=!1),this.id=n,this.anchor=t,this.angle=e,this.isStartMarker=r},i4=/url\(["']?#([^"']+)["']?\)/,dK={bottom:"bottom","text-bottom":"bottom",top:"top","text-top":"top",hanging:"hanging",middle:"middle",central:"middle",center:"middle",mathematical:"middle",ideographic:"ideographic",alphabetic:"alphabetic",baseline:"alphabetic"},L_="http://www.w3.org/2000/svg";function wl(n,t){var e;return(e=n&&n.toString().match(/^([\-0-9.]+)em$/))?parseFloat(e[1])*t:(e=n&&n.toString().match(/^([\-0-9.]+)(px|)$/))?parseFloat(e[1]):0}function _N(n){return dK[n]||"alphabetic"}function ia(n){for(var t,e=[],r=/[+-]?(?:(?:\d+\.?\d*)|(?:\d*\.?\d+))(?:[eE][+-]?\d+)?/g;t=r.exec(n);)e.push(parseFloat(t[0]));return e}function Dg(n,t){if(n==="transparent"){var e=new ka("rgb(0,0,0)");return e.a=0,e}if(t&&n.toLowerCase()==="currentcolor")return t.color||new ka("rgb(0,0,0)");if(t&&n.toLowerCase()==="context-stroke")return t.contextStroke||new ka("rgb(0,0,0)");if(t&&n.toLowerCase()==="context-fill")return t.contextFill||new ka("rgb(0,0,0)");var r=/\s*rgba\(((?:[^,\)]*,){3}[^,\)]*)\)\s*/.exec(n);if(r){var i=ia(r[1]),s=new ka("rgb("+i.slice(0,3).join(",")+")");return s.a=i[3],s}return new ka(n)}var rc={"sans-serif":"helvetica",verdana:"helvetica",arial:"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",serif:"times",cursive:"times",fantasy:"times"},Q5,gK=(Q5=le.version.split("."),parseFloat(Q5[0])===2&&parseFloat(Q5[1])===3);function UN(n,t){return gK?t==400?n=="italic"?"italic":"normal":t==700&&n!=="italic"?"bold":n+""+t:t==400||t==="normal"?n==="italic"?"italic":"normal":t!=700&&t!=="bold"||n!=="normal"?(t==700?"bold":t)+""+n:"bold"}function n4(n,t){if(Lt(t.element,n.styleSheets,"display")==="none")return[0,0,0,0];var e=[];return t.children.forEach(function(r){var i=r.getBoundingBox(n);if(i[0]!==0||i[1]!==0||i[2]!==0||i[3]!==0){var s=r.computeNodeTransform(n);i[0]=i[0]*s.sx+s.tx,i[1]=i[1]*s.sy+s.ty,i[2]=i[2]*s.sx,i[3]=i[3]*s.sy,e=e.length===0?i:[Math.min(e[0],i[0]),Math.min(e[1],i[1]),Math.max(e[0]+e[2],i[0]+i[2])-Math.min(e[0],i[0]),Math.max(e[1]+e[3],i[1]+i[3])-Math.min(e[1],i[1])]}}),e.length===0?[0,0,0,0]:e}function mw(n,t){var e=parseFloat,r=e(n.getAttribute("x1"))||e(Lt(n,t.styleSheets,"x"))||e(Lt(n,t.styleSheets,"cx"))-e(Lt(n,t.styleSheets,"r"))||0,i=e(n.getAttribute("x2"))||r+e(Lt(n,t.styleSheets,"width"))||e(Lt(n,t.styleSheets,"cx"))+e(Lt(n,t.styleSheets,"r"))||0,s=e(n.getAttribute("y1"))||e(Lt(n,t.styleSheets,"y"))||e(Lt(n,t.styleSheets,"cy"))-e(Lt(n,t.styleSheets,"r"))||0,A=e(n.getAttribute("y2"))||s+e(Lt(n,t.styleSheets,"height"))||e(Lt(n,t.styleSheets,"cy"))+e(Lt(n,t.styleSheets,"r"))||0;return[Math.min(r,i),Math.min(s,A),Math.max(r,i)-Math.min(r,i),Math.max(s,A)-Math.min(s,A)]}function vw(n,t,e,r,i,s,A,a){a===void 0&&(a=!1);var o,l,h=t[0],u=t[1],d=t[2],f=t[3],p=i/d,m=s/f,y=n.getAttribute("preserveAspectRatio");if(y){var w=y.split(" ");w[0]==="defer"&&(w=w.slice(1)),o=w[0],l=w[1]||"meet"}else o="xMidYMid",l="meet";if(o!=="none"&&(l==="meet"?p=m=Math.min(p,m):l==="slice"&&(p=m=Math.max(p,m))),a)return A.pdf.Matrix(p,0,0,m,0,0);var B=e-h*p,E=r-u*m;o.indexOf("xMid")>=0?B+=(i-d*p)/2:o.indexOf("xMax")>=0&&(B+=i-d*p),o.indexOf("YMid")>=0?E+=(s-f*m)/2:o.indexOf("YMax")>=0&&(E+=s-f*m);var S=A.pdf.Matrix(1,0,0,1,B,E),I=A.pdf.Matrix(p,0,0,m,0,0);return A.pdf.matrixMult(I,S)}function _B(n,t){if(!n||n==="none")return t.pdf.unitMatrix;for(var e,r,i=/^[\s,]*matrix\(([^)]+)\)\s*/,s=/^[\s,]*translate\(([^)]+)\)\s*/,A=/^[\s,]*rotate\(([^)]+)\)\s*/,a=/^[\s,]*scale\(([^)]+)\)\s*/,o=/^[\s,]*skewX\(([^)]+)\)\s*/,l=/^[\s,]*skewY\(([^)]+)\)\s*/,h=t.pdf.unitMatrix;n.length>0&&n.length!==r;){r=n.length;var u=i.exec(n);if(u&&(e=ia(u[1]),h=t.pdf.matrixMult(t.pdf.Matrix(e[0],e[1],e[2],e[3],e[4],e[5]),h),n=n.substr(u[0].length)),u=A.exec(n)){e=ia(u[1]);var d=Math.PI*e[0]/180;if(h=t.pdf.matrixMult(t.pdf.Matrix(Math.cos(d),Math.sin(d),-Math.sin(d),Math.cos(d),0,0),h),e[1]||e[2]){var f=t.pdf.Matrix(1,0,0,1,e[1],e[2]),p=t.pdf.Matrix(1,0,0,1,-e[1],-e[2]);h=t.pdf.matrixMult(p,t.pdf.matrixMult(h,f))}n=n.substr(u[0].length)}(u=s.exec(n))&&(e=ia(u[1]),h=t.pdf.matrixMult(t.pdf.Matrix(1,0,0,1,e[0],e[1]||0),h),n=n.substr(u[0].length)),(u=a.exec(n))&&((e=ia(u[1]))[1]||(e[1]=e[0]),h=t.pdf.matrixMult(t.pdf.Matrix(e[0],0,0,e[1],0,0),h),n=n.substr(u[0].length)),(u=o.exec(n))&&(e=parseFloat(u[1]),e*=Math.PI/180,h=t.pdf.matrixMult(t.pdf.Matrix(1,0,Math.tan(e),1,0,0),h),n=n.substr(u[0].length)),(u=l.exec(n))&&(e=parseFloat(u[1]),e*=Math.PI/180,h=t.pdf.matrixMult(t.pdf.Matrix(1,Math.tan(e),0,1,0,0),h),n=n.substr(u[0].length))}return h}var s4=function(){function n(t,e){this.element=t,this.children=e,this.parent=null}return n.prototype.setParent=function(t){this.parent=t},n.prototype.getParent=function(){return this.parent},n.prototype.getBoundingBox=function(t){return Lt(this.element,t.styleSheets,"display")==="none"?[0,0,0,0]:this.getBoundingBoxCore(t)},n.prototype.computeNodeTransform=function(t){var e=this.computeNodeTransformCore(t),r=Lt(this.element,t.styleSheets,"transform");return r?t.pdf.matrixMult(e,_B(r,t)):e},n}(),ww=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.render=function(e){return Promise.resolve()},t.prototype.getBoundingBoxCore=function(e){return[]},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(s4),LN=function(n){function t(e,r,i){var s=n.call(this,r,i)||this;return s.pdfGradientType=e,s.contextColor=void 0,s}return Fr(t,n),t.prototype.apply=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a,o;return Qr(this,function(l){return(r=this.element.getAttribute("id"))?(i=this.getStops(e.styleSheets),s=0,A=!1,i.forEach(function(h){var u=h.opacity;u&&u!==1&&(s+=u,A=!0)}),A&&(a=new pd({opacity:s/i.length})),o=new jc(this.pdfGradientType,this.getCoordinates(),i,a),e.pdf.addShadingPattern(r,o),[2]):[2]})})},t.prototype.getStops=function(e){var r=this;if(this.stops)return this.stops;if(this.contextColor===void 0){this.contextColor=null;for(var i=this;i;){var s=Lt(i.element,e,"color");if(s){this.contextColor=Dg(s,null);break}i=i.getParent()}}var A=[];return this.children.forEach(function(a){if(a.element.tagName.toLowerCase()==="stop"){var o=Lt(a.element,e,"color"),l=Dg(Lt(a.element,e,"stop-color")||"",o?{color:Dg(o,null)}:{color:r.contextColor}),h=parseFloat(Lt(a.element,e,"stop-opacity")||"1");A.push({offset:t.parseGradientOffset(a.element.getAttribute("offset")||"0"),color:[l.r,l.g,l.b],opacity:h})}}),this.stops=A},t.prototype.getBoundingBoxCore=function(e){return mw(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return iu(this,e,r)},t.parseGradientOffset=function(e){var r=parseFloat(e);return!isNaN(r)&&e.indexOf("%")>=0?r/100:r},t}(ww),QN=function(n){function t(e,r){return n.call(this,"axial",e,r)||this}return Fr(t,n),t.prototype.getCoordinates=function(){return[parseFloat(this.element.getAttribute("x1")||"0"),parseFloat(this.element.getAttribute("y1")||"0"),parseFloat(this.element.getAttribute("x2")||"1"),parseFloat(this.element.getAttribute("y2")||"0")]},t}(LN),NN=function(n){function t(e,r){return n.call(this,"radial",e,r)||this}return Fr(t,n),t.prototype.getCoordinates=function(){var e=this.element.getAttribute("cx"),r=this.element.getAttribute("cy"),i=this.element.getAttribute("fx"),s=this.element.getAttribute("fy");return[parseFloat(i||e||"0.5"),parseFloat(s||r||"0.5"),0,parseFloat(e||"0.5"),parseFloat(r||"0.5"),parseFloat(this.element.getAttribute("r")||"0.5")]},t}(LN),pK=function(){function n(t,e){this.key=t,this.gradient=e}return n.prototype.getFillData=function(t,e){return Lr(this,void 0,void 0,function(){var r,i,s;return Qr(this,function(A){switch(A.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,function(a){return a.apply(new ru(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))})];case 1:return A.sent(),this.gradient.element.hasAttribute("gradientUnits")&&this.gradient.element.getAttribute("gradientUnits").toLowerCase()!=="objectboundingbox"?r=e.pdf.unitMatrix:(i=t.getBoundingBox(e),r=e.pdf.Matrix(i[2],0,0,i[3],i[0],i[1])),s=_B(Lt(this.gradient.element,e.styleSheets,"gradientTransform","transform"),e),[2,{key:this.key,matrix:e.pdf.matrixMult(s,r)}]}})})},n}(),PN=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.apply=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a;return Qr(this,function(o){switch(o.label){case 0:if(!(r=this.element.getAttribute("id")))return[2];i=this.getBoundingBox(e),s=new ku([i[0],i[1],i[0]+i[2],i[1]+i[3]],i[2],i[3]),e.pdf.beginTilingPattern(s),A=0,a=this.children,o.label=1;case 1:return A<a.length?[4,a[A].render(new ru(e.pdf,{attributeState:e.attributeState,refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return A++,[3,1];case 4:return e.pdf.endTilingPattern(r,s),[2]}})})},t.prototype.getBoundingBoxCore=function(e){return mw(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return iu(this,e,r)},t}(ww),mK=function(){function n(t,e){this.key=t,this.pattern=e}return n.prototype.getFillData=function(t,e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p;return Qr(this,function(m){switch(m.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,function(y){return y.apply(new ru(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))})];case 1:return m.sent(),r={key:this.key,boundingBox:void 0,xStep:0,yStep:0,matrix:void 0},s=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternUnits")&&this.pattern.element.getAttribute("patternUnits").toLowerCase()!=="objectboundingbox"||(i=t.getBoundingBox(e),s=e.pdf.Matrix(1,0,0,1,i[0],i[1]),a=this.pattern.getBoundingBox(e),o=a[0]*i[0]||0,l=a[1]*i[1]||0,h=a[2]*i[2]||0,u=a[3]*i[3]||0,r.boundingBox=[o,l,o+h,l+u],r.xStep=h,r.yStep=u),A=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternContentUnits")&&this.pattern.element.getAttribute("patternContentUnits").toLowerCase()==="objectboundingbox"&&(i||(i=t.getBoundingBox(e)),A=e.pdf.Matrix(i[2],0,0,i[3],0,0),a=r.boundingBox||this.pattern.getBoundingBox(e),o=a[0]/i[0]||0,l=a[1]/i[1]||0,h=a[2]/i[2]||0,u=a[3]/i[3]||0,r.boundingBox=[o,l,o+h,l+u],r.xStep=h,r.yStep=u),d=e.pdf.unitMatrix,(f=Lt(this.pattern.element,e.styleSheets,"patternTransform","transform"))&&(d=_B(f,e)),p=A,p=e.pdf.matrixMult(p,s),p=e.pdf.matrixMult(p,d),p=e.pdf.matrixMult(p,e.transform),r.matrix=p,[2,r]}})})},n}();function vK(n,t){var e=i4.exec(n);if(e){var r=e[1],i=t.refsHandler.get(r);return i&&(i instanceof QN||i instanceof NN)?function(A,a,o){var l=a.getStops(o.styleSheets);if(l.length===0)return null;if(l.length===1){var h=l[0].color,u=new ka;return u.ok=!0,u.r=h[0],u.g=h[1],u.b=h[2],u.a=l[0].opacity,new kn(u)}return new pK(A,a)}(r,i,t):i&&i instanceof PN?new mK(r,i):new kn(new ka("rgb(0, 0, 0)"))}var s=Dg(n,t.attributeState);return s.ok?new kn(s):null}function A4(n,t,e){var r=e||t.element,i=Lt(r,n.styleSheets,"color");if(i){var s=Dg(i,n.attributeState);s.ok?n.attributeState.color=s:n.attributeState.color=new ka("rgb(0,0,0)")}var A=Lt(r,n.styleSheets,"visibility");A&&(n.attributeState.visibility=A);var a=Lt(r,n.styleSheets,"fill");a&&(n.attributeState.fill=vK(a,n));var o=Lt(r,n.styleSheets,"fill-opacity");o&&(n.attributeState.fillOpacity=parseFloat(o));var l=Lt(r,n.styleSheets,"stroke-opacity");l&&(n.attributeState.strokeOpacity=parseFloat(l));var h=Lt(r,n.styleSheets,"opacity");h&&(n.attributeState.opacity=parseFloat(h));var u=Lt(r,n.styleSheets,"stroke-width");u!==void 0&&u!==""&&(n.attributeState.strokeWidth=Math.abs(parseFloat(u)));var d=Lt(r,n.styleSheets,"stroke");if(d)if(d==="none")n.attributeState.stroke=null;else{var f=Dg(d,n.attributeState);f.ok&&(n.attributeState.stroke=new kn(f))}d&&n.attributeState.stroke instanceof kn&&(n.attributeState.contextStroke=n.attributeState.stroke.color),a&&n.attributeState.fill instanceof kn&&(n.attributeState.contextFill=n.attributeState.fill.color);var p=Lt(r,n.styleSheets,"stroke-linecap");p&&(n.attributeState.strokeLinecap=p);var m=Lt(r,n.styleSheets,"stroke-linejoin");m&&(n.attributeState.strokeLinejoin=m);var y=Lt(r,n.styleSheets,"stroke-dasharray");if(y){var w=parseInt(Lt(r,n.styleSheets,"stroke-dashoffset")||"0");n.attributeState.strokeDasharray=ia(y),n.attributeState.strokeDashoffset=w}var B=Lt(r,n.styleSheets,"stroke-miterlimit");B!==void 0&&B!==""&&(n.attributeState.strokeMiterlimit=parseFloat(B));var E=r.getAttribute("xml:space");E&&(n.attributeState.xmlSpace=E);var S=Lt(r,n.styleSheets,"white-space");S&&(n.attributeState.whiteSpace=S);var I=Lt(r,n.styleSheets,"font-weight");I&&(n.attributeState.fontWeight=I);var L=Lt(r,n.styleSheets,"font-style");L&&(n.attributeState.fontStyle=L);var k=Lt(r,n.styleSheets,"font-family");if(k){var H=O7.parse(k);n.attributeState.fontFamily=function(st,rt,it){var At=UN(st.fontStyle,st.fontWeight),ut=it.pdf.getFontList(),vt="";return rt.some(function(mt){var M=ut[mt];return M&&M.indexOf(At)>=0?(vt=mt,!0):(mt=mt.toLowerCase(),!!rc.hasOwnProperty(mt)&&(vt=mt,!0))})||(vt="times"),vt}(n.attributeState,H,n)}var Q=Lt(r,n.styleSheets,"font-size");if(Q){var W=n.pdf.getFontSize();n.attributeState.fontSize=wl(Q,W)}var U=Lt(r,n.styleSheets,"vertical-align")||Lt(r,n.styleSheets,"alignment-baseline");if(U){var D=U.match(/(baseline|text-bottom|alphabetic|ideographic|middle|central|mathematical|text-top|bottom|center|top|hanging)/);D&&(n.attributeState.alignmentBaseline=D[0])}var j=Lt(r,n.styleSheets,"text-anchor");j&&(n.attributeState.textAnchor=j);var V=Lt(r,n.styleSheets,"fill-rule");V&&(n.attributeState.fillRule=V)}function a4(n,t,e){var r=1,i=1;r*=n.attributeState.fillOpacity,r*=n.attributeState.opacity,n.attributeState.fill instanceof kn&&n.attributeState.fill.color.a!==void 0&&(r*=n.attributeState.fill.color.a),i*=n.attributeState.strokeOpacity,i*=n.attributeState.opacity,n.attributeState.stroke instanceof kn&&n.attributeState.stroke.color.a!==void 0&&(i*=n.attributeState.stroke.color.a);var s,A,a=r<1,o=i<1;if(zh(e,"use")?(a=!0,o=!0,r*=n.attributeState.fill?1:0,i*=n.attributeState.stroke?1:0):n.withinUse&&(n.attributeState.fill!==t.attributeState.fill?(a=!0,r*=n.attributeState.fill?1:0):a&&!n.attributeState.fill&&(r=0),n.attributeState.stroke!==t.attributeState.stroke?(o=!0,i*=n.attributeState.stroke?1:0):o&&!n.attributeState.stroke&&(i=0)),a||o){var l={};a&&(l.opacity=r),o&&(l["stroke-opacity"]=i),n.pdf.setGState(new pd(l))}if(n.attributeState.fill&&n.attributeState.fill!==t.attributeState.fill&&n.attributeState.fill instanceof kn&&n.attributeState.fill.color.ok&&!zh(e,"text")&&n.pdf.setFillColor(n.attributeState.fill.color.r,n.attributeState.fill.color.g,n.attributeState.fill.color.b),n.attributeState.strokeWidth!==t.attributeState.strokeWidth&&n.pdf.setLineWidth(n.attributeState.strokeWidth),n.attributeState.stroke!==t.attributeState.stroke&&n.attributeState.stroke instanceof kn&&n.pdf.setDrawColor(n.attributeState.stroke.color.r,n.attributeState.stroke.color.g,n.attributeState.stroke.color.b),n.attributeState.strokeLinecap!==t.attributeState.strokeLinecap&&n.pdf.setLineCap(n.attributeState.strokeLinecap),n.attributeState.strokeLinejoin!==t.attributeState.strokeLinejoin&&n.pdf.setLineJoin(n.attributeState.strokeLinejoin),n.attributeState.strokeDasharray===t.attributeState.strokeDasharray&&n.attributeState.strokeDashoffset===t.attributeState.strokeDashoffset||!n.attributeState.strokeDasharray||n.pdf.setLineDashPattern(n.attributeState.strokeDasharray,n.attributeState.strokeDashoffset),n.attributeState.strokeMiterlimit!==t.attributeState.strokeMiterlimit&&n.pdf.setLineMiterLimit(n.attributeState.strokeMiterlimit),n.attributeState.fontFamily!==t.attributeState.fontFamily&&(s=rc.hasOwnProperty(n.attributeState.fontFamily)?rc[n.attributeState.fontFamily]:n.attributeState.fontFamily),n.attributeState.fill&&n.attributeState.fill!==t.attributeState.fill&&n.attributeState.fill instanceof kn&&n.attributeState.fill.color.ok){var h=n.attributeState.fill.color;n.pdf.setTextColor(h.r,h.g,h.b)}n.attributeState.fontWeight===t.attributeState.fontWeight&&n.attributeState.fontStyle===t.attributeState.fontStyle||(A=UN(n.attributeState.fontStyle,n.attributeState.fontWeight)),s===void 0&&A===void 0||(s===void 0&&(s=rc.hasOwnProperty(n.attributeState.fontFamily)?rc[n.attributeState.fontFamily]:n.attributeState.fontFamily),n.pdf.setFont(s,A)),n.attributeState.fontSize!==t.attributeState.fontSize&&n.pdf.setFontSize(n.attributeState.fontSize*n.pdf.internal.scaleFactor)}function MN(n,t,e){var r=i4.exec(n);if(r){var i=r[1];return e.refsHandler.get(i)||void 0}}function kN(n,t,e){return Lr(this,void 0,void 0,function(){var r,i;return Qr(this,function(s){switch(s.label){case 0:return r=e.clone(),t.element.hasAttribute("clipPathUnits")&&t.element.getAttribute("clipPathUnits").toLowerCase()==="objectboundingbox"&&(i=n.getBoundingBox(e),r.transform=e.pdf.matrixMult(e.pdf.Matrix(i[2],0,0,i[3],i[0],i[1]),e.transform)),[4,t.apply(r)];case 1:return s.sent(),[2]}})})}var ON=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.render=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A;return Qr(this,function(a){switch(a.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?((r=e.clone()).transform=r.pdf.matrixMult(this.computeNodeTransform(r),e.transform),A4(r,this),i=Lt(this.element,r.styleSheets,"clip-path"),(s=i&&i!=="none")?(A=MN(i,0,r))?A.isVisible(!0,r)?(r.pdf.saveGraphicsState(),[4,kN(this,A,r)]):[3,2]:[3,4]:[3,5]):[2];case 1:return a.sent(),[3,3];case 2:return[2];case 3:return[3,5];case 4:s=!1,a.label=5;case 5:return r.withinClipPath||r.pdf.saveGraphicsState(),a4(r,e,this.element),[4,this.renderCore(r)];case 6:return a.sent(),r.withinClipPath||r.pdf.restoreGraphicsState(),s&&r.pdf.restoreGraphicsState(),[2]}})})},t}(s4),UB=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t}(ON),yw=function(n){function t(e,r,i){var s=n.call(this,r,i)||this;return s.cachedPath=null,s.hasMarkers=e,s}return Fr(t,n),t.prototype.renderCore=function(e){return Lr(this,void 0,void 0,function(){var r;return Qr(this,function(i){switch(i.label){case 0:return(r=this.getCachedPath(e))===null||r.segments.length===0?[2]:(e.withinClipPath?r.transform(e.transform):e.pdf.setCurrentTransformationMatrix(e.transform),r.draw(e),[4,this.fillOrStroke(e)]);case 1:return i.sent(),this.hasMarkers?[4,this.drawMarkers(e,r)]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})},t.prototype.getCachedPath=function(e){return this.cachedPath||(this.cachedPath=this.getPath(e))},t.prototype.drawMarkers=function(e,r){return Lr(this,void 0,void 0,function(){return Qr(this,function(i){switch(i.label){case 0:return[4,this.getMarkers(r,e).draw(e.clone({transform:e.pdf.unitMatrix}))];case 1:return i.sent(),[2]}})})},t.prototype.fillOrStroke=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a;return Qr(this,function(o){switch(o.label){case 0:return e.withinClipPath?[2]:(r=e.attributeState.fill,i=e.attributeState.stroke&&e.attributeState.strokeWidth!==0,r?[4,r.getFillData(this,e)]:[3,2]);case 1:return A=o.sent(),[3,3];case 2:A=void 0,o.label=3;case 3:return s=A,a=e.attributeState.fillRule==="evenodd",r&&i||e.withinUse?a?e.pdf.fillStrokeEvenOdd(s):e.pdf.fillStroke(s):r?a?e.pdf.fillEvenOdd(s):e.pdf.fill(s):i?e.pdf.stroke():e.pdf.discardPath(),[2]}})})},t.prototype.getBoundingBoxCore=function(e){var r=this.getCachedPath(e);if(!r||!r.segments.length)return[0,0,0,0];for(var i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=0,l=0,h=0;h<r.segments.length;h++){var u=r.segments[h];(u instanceof cn||u instanceof $c||u instanceof ko)&&(o=u.x,l=u.y),u instanceof ko?(i=Math.min(i,o,u.x1,u.x2,u.x),A=Math.max(A,o,u.x1,u.x2,u.x),s=Math.min(s,l,u.y1,u.y2,u.y),a=Math.max(a,l,u.y1,u.y2,u.y)):(i=Math.min(i,o),A=Math.max(A,o),s=Math.min(s,l),a=Math.max(a,l))}return[i,s,A-i,a-s]},t.prototype.getMarkers=function(e,r){var i=Lt(this.element,r.styleSheets,"marker-start"),s=Lt(this.element,r.styleSheets,"marker-mid"),A=Lt(this.element,r.styleSheets,"marker-end"),a=new fK;if(i||s||A){A&&(A=N5(A)),i&&(i=N5(i)),s&&(s=N5(s));for(var o=e.segments,l=[1,0],h=void 0,u=!1,d=[1,0],f=!1,p=function(y){var w=o[y],B=i&&(y===1||!(o[y]instanceof cn)&&o[y-1]instanceof cn);B&&o.forEach(function(H,Q){if(!f&&H instanceof yE&&Q>y){var W=o[Q-1];f=(W instanceof cn||W instanceof $c||W instanceof ko)&&W}});var E=A&&(y===o.length-1||!(o[y]instanceof cn)&&o[y+1]instanceof cn),S=s&&y>0&&!(y===1&&o[y-1]instanceof cn),I=o[y-1]||null;if(I instanceof cn||I instanceof $c||I instanceof ko)if(w instanceof ko)B&&a.addMarker(new Dc(i,[I.x,I.y],I_(f?[f.x,f.y]:[I.x,I.y],[w.x1,w.y1]),!0)),E&&a.addMarker(new Dc(A,[w.x,w.y],I_([w.x2,w.y2],[w.x,w.y]))),S&&(h=Yd([I.x,I.y],[w.x1,w.y1]),h=I instanceof cn?h:mm(B2(l,h)),a.addMarker(new Dc(s,[I.x,I.y],Math.atan2(h[1],h[0])))),l=Yd([w.x2,w.y2],[w.x,w.y]);else if(w instanceof cn||w instanceof $c){if(h=Yd([I.x,I.y],[w.x,w.y]),B){var L=f?Yd([f.x,f.y],[w.x,w.y]):h;a.addMarker(new Dc(i,[I.x,I.y],Math.atan2(L[1],L[0]),!0))}E&&a.addMarker(new Dc(A,[w.x,w.y],Math.atan2(h[1],h[0]))),S&&(L=w instanceof cn?l:I instanceof cn?h:mm(B2(l,h)),a.addMarker(new Dc(s,[I.x,I.y],Math.atan2(L[1],L[0])))),l=h}else w instanceof yE&&(h=Yd([I.x,I.y],[u.x,u.y]),S&&(L=I instanceof cn?h:mm(B2(l,h)),a.addMarker(new Dc(s,[I.x,I.y],Math.atan2(L[1],L[0])))),E&&(L=mm(B2(h,d)),a.addMarker(new Dc(A,[u.x,u.y],Math.atan2(L[1],L[0])))),l=h);else{u=w instanceof cn&&w;var k=o[y+1];(k instanceof cn||k instanceof $c||k instanceof ko)&&(d=Yd([u.x,u.y],[k.x,k.y]))}},m=0;m<o.length;m++)p(m)}return a.markers.forEach(function(y){var w=r.refsHandler.get(y.id);if(w){var B=Lt(w.element,r.styleSheets,"orient");B!=null&&(y.isStartMarker&&B==="auto-start-reverse"&&(y.angle+=Math.PI),isNaN(Number(B))||(y.angle=parseFloat(B)/180*Math.PI))}}),a},t}(UB);function N5(n){var t=i4.exec(n);return t&&t[1]||void 0}var wK=function(n){function t(e,r){return n.call(this,!0,e,r)||this}return Fr(t,n),t.prototype.getPath=function(e){if(e.withinClipPath||e.attributeState.stroke===null)return null;var r=parseFloat(this.element.getAttribute("x1")||"0"),i=parseFloat(this.element.getAttribute("y1")||"0"),s=parseFloat(this.element.getAttribute("x2")||"0"),A=parseFloat(this.element.getAttribute("y2")||"0");return r||s||i||A?new m0().moveTo(r,i).lineTo(s,A):null},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t.prototype.fillOrStroke=function(e){return Lr(this,void 0,void 0,function(){return Qr(this,function(r){switch(r.label){case 0:return e.attributeState.fill=null,[4,n.prototype.fillOrStroke.call(this,e)];case 1:return r.sent(),[2]}})})},t}(yw),DN=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.apply=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a;return Qr(this,function(o){switch(o.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?((r=e.clone()).transform=r.pdf.unitMatrix,A4(r,this),i=Lt(this.element,r.styleSheets,"clip-path"),i&&i!=="none"&&(s=MN(i,0,r))?s.isVisible(!0,r)?[4,kN(this,s,r)]:[3,2]:[3,3]):[2];case 1:return o.sent(),[3,3];case 2:return[2];case 3:a4(r,e,this.element),A=0,a=this.children,o.label=4;case 4:return A<a.length?[4,a[A].render(r)]:[3,7];case 5:o.sent(),o.label=6;case 6:return A++,[3,4];case 7:return[2]}})})},t.prototype.getBoundingBoxCore=function(e){return n4(e,this)},t.prototype.isVisible=function(e,r){return iu(this,e,r)},t.prototype.computeNodeTransformCore=function(e){var r=parseFloat(Lt(this.element,e.styleSheets,"x")||"0"),i=parseFloat(Lt(this.element,e.styleSheets,"y")||"0"),s=this.element.getAttribute("viewBox");if(s){var A=ia(s),a=parseFloat(Lt(this.element,e.styleSheets,"width")||Lt(this.element.ownerSVGElement,e.styleSheets,"width")||s[2]),o=parseFloat(Lt(this.element,e.styleSheets,"height")||Lt(this.element.ownerSVGElement,e.styleSheets,"height")||s[3]);return vw(this.element,A,r,i,a,o,e)}return e.pdf.Matrix(1,0,0,1,r,i)},t}(ww),LB=function(n,t){this.width=n,this.height=t},yK=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.renderCore=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p,m;return Qr(this,function(y){switch(y.label){case 0:return r=parseFloat,(i=this.element.getAttribute("href")||this.element.getAttribute("xlink:href"))?(s=i.substring(1),A=e.refsHandler.get(s),a=zh(A.element,"symbol,svg")&&A.element.hasAttribute("viewBox"),o=r(Lt(this.element,e.styleSheets,"x")||"0"),l=r(Lt(this.element,e.styleSheets,"y")||"0"),h=void 0,u=void 0,a?(h=r(Lt(this.element,e.styleSheets,"width")||Lt(A.element,e.styleSheets,"width")||"0"),u=r(Lt(this.element,e.styleSheets,"height")||Lt(A.element,e.styleSheets,"height")||"0"),o+=r(Lt(A.element,e.styleSheets,"x")||"0"),l+=r(Lt(A.element,e.styleSheets,"y")||"0"),f=ia(A.element.getAttribute("viewBox")),d=vw(A.element,f,o,l,h,u,e)):d=e.pdf.Matrix(1,0,0,1,o,l),p=p0.getContextColors(e,!0),m=new ru(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,withinUse:!0,viewport:a?new LB(h,u):e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure,attributeState:Object.assign(p0.default(),p)}),[4,e.refsHandler.getRendered(s,p,function(w){return t.renderReferencedNode(w,s,m)})]):[2];case 1:return y.sent(),e.pdf.saveGraphicsState(),e.pdf.setCurrentTransformationMatrix(e.transform),a&&Lt(A.element,e.styleSheets,"overflow")!=="visible"&&(e.pdf.rect(o,l,h,u),e.pdf.clip().discardPath()),e.pdf.doFormObject(e.refsHandler.generateKey(s,p),d),e.pdf.restoreGraphicsState(),[2]}})})},t.renderReferencedNode=function(e,r,i){return Lr(this,void 0,void 0,function(){var s;return Qr(this,function(A){switch(A.label){case 0:return s=[(s=e.getBoundingBox(i))[0]-.5*s[2],s[1]-.5*s[3],2*s[2],2*s[3]],i.pdf.beginFormObject(s[0],s[1],s[2],s[3],i.pdf.unitMatrix),e instanceof DN?[4,e.apply(i)]:[3,2];case 1:return A.sent(),[3,4];case 2:return[4,e.render(i)];case 3:A.sent(),A.label=4;case 4:return i.pdf.endFormObject(i.refsHandler.generateKey(r,i.attributeState)),[2]}})})},t.prototype.getBoundingBoxCore=function(e){return mw(this.element,e)},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(UB),bK=function(n){function t(e,r){return n.call(this,!1,e,r)||this}return Fr(t,n),t.prototype.getPath=function(e){var r=parseFloat(Lt(this.element,e.styleSheets,"width")||"0"),i=parseFloat(Lt(this.element,e.styleSheets,"height")||"0");if(!isFinite(r)||r<=0||!isFinite(i)||i<=0)return null;var s=Lt(this.element,e.styleSheets,"rx"),A=Lt(this.element,e.styleSheets,"ry"),a=Math.min(parseFloat(s||A||"0"),.5*r),o=Math.min(parseFloat(A||s||"0"),.5*i),l=parseFloat(Lt(this.element,e.styleSheets,"x")||"0"),h=parseFloat(Lt(this.element,e.styleSheets,"y")||"0"),u=4/3*(Math.SQRT2-1);return a===0&&o===0?new m0().moveTo(l,h).lineTo(l+r,h).lineTo(l+r,h+i).lineTo(l,h+i).close():new m0().moveTo(l+=a,h).lineTo(l+=r-2*a,h).curveTo(l+a*u,h,l+a,h+(o-o*u),l+=a,h+=o).lineTo(l,h+=i-2*o).curveTo(l,h+o*u,l-a*u,h+o,l-=a,h+=o).lineTo(l+=2*a-r,h).curveTo(l-a*u,h,l-a,h-o*u,l-=a,h-=o).lineTo(l,h+=2*o-i).curveTo(l,h-o*u,l+a*u,h-o,l+=a,h-=o).close()},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t}(yw),RN=function(n){function t(e,r){return n.call(this,!1,e,r)||this}return Fr(t,n),t.prototype.getPath=function(e){var r=this.getRx(e),i=this.getRy(e);if(!isFinite(r)||i<=0||!isFinite(i)||i<=0)return null;var s=parseFloat(Lt(this.element,e.styleSheets,"cx")||"0"),A=parseFloat(Lt(this.element,e.styleSheets,"cy")||"0"),a=4/3*(Math.SQRT2-1)*r,o=4/3*(Math.SQRT2-1)*i;return new m0().moveTo(s+r,A).curveTo(s+r,A-o,s+a,A-i,s,A-i).curveTo(s-a,A-i,s-r,A-o,s-r,A).curveTo(s-r,A+o,s-a,A+i,s,A+i).curveTo(s+a,A+i,s+r,A+o,s+r,A)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t}(yw),BK=function(n){function t(e,r){return n.call(this,e,r)||this}return Fr(t,n),t.prototype.getRx=function(e){return parseFloat(Lt(this.element,e.styleSheets,"rx")||"0")},t.prototype.getRy=function(e){return parseFloat(Lt(this.element,e.styleSheets,"ry")||"0")},t}(RN);function HN(n){var t="invisible",e=n.stroke&&n.strokeWidth!==0,r=n.fill;return r&&e?t="fillThenStroke":r?t="fill":e&&(t="stroke"),t}function Q_(n){return n.replace(/[\n\r]/g,"")}function N_(n){return n.replace(/[\t]/g," ")}function P_(n){return n.replace(/ +/g," ")}function M_(n,t,e){switch(Lt(n,e.styleSheets,"text-transform")){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();default:return t}}var P5=function(){function n(t,e,r,i){this.textNode=t,this.texts=[],this.textNodes=[],this.contexts=[],this.textAnchor=e,this.originX=r,this.originY=i,this.textMeasures=[]}return n.prototype.setX=function(t){this.originX=t},n.prototype.setY=function(t){this.originY=t},n.prototype.add=function(t,e,r){this.texts.push(e),this.textNodes.push(t),this.contexts.push(r)},n.prototype.rightTrimText=function(){for(var t=this.texts.length-1;t>=0;t--)if(this.contexts[t].attributeState.xmlSpace==="preserve"||this.contexts[t].attributeState.whiteSpace==="pre"||(this.texts[t]=this.texts[t].replace(/\s+$/,"")),this.texts[t].match(/[^\s]/))return!1;return!0},n.prototype.measureText=function(t){for(var e=0;e<this.texts.length;e++)this.textMeasures.push({width:t.textMeasure.measureTextWidth(this.texts[e],this.contexts[e].attributeState),length:this.texts[e].length})},n.prototype.put=function(t,e){var r,i,s,A,a=[],o=[],l=[],h=this.originX,u=this.originY,d=h,f=h;for(r=0;r<this.textNodes.length;r++){i=this.textNodes[r],s=this.contexts[r],A=this.textMeasures[r]||{width:t.textMeasure.measureTextWidth(this.texts[r],this.contexts[r].attributeState),length:this.texts[r].length};var p=h,m=u;if(i.nodeName!=="#text"&&!a.includes(i)){a.push(i);var y=n.resolveRelativePositionAttribute(i,"dx");y!==null&&(p+=wl(y,s.attributeState.fontSize));var w=n.resolveRelativePositionAttribute(i,"dy");w!==null&&(m+=wl(w,s.attributeState.fontSize))}o[r]=p,l[r]=m,h=p+A.width+A.length*e,u=m,d=Math.min(d,p),f=Math.max(f,h)}var B=0;switch(this.textAnchor){case"start":B=0;break;case"middle":B=(f-d)/2;break;case"end":B=f-d}for(r=0;r<this.textNodes.length;r++)if(i=this.textNodes[r],s=this.contexts[r],i.nodeName==="#text"||s.attributeState.visibility!=="hidden"){t.pdf.saveGraphicsState(),a4(s,t,i);var E=s.attributeState.alignmentBaseline,S=HN(s.attributeState);t.pdf.text(this.texts[r],o[r]-B,l[r],{baseline:_N(E),angle:t.transform,renderingMode:S==="fill"?void 0:S,charSpace:e===0?void 0:e}),t.pdf.restoreGraphicsState()}return[h,u]},n.resolveRelativePositionAttribute=function(t,e){for(var r,i=t;i&&zh(i,"tspan");){if(i.hasAttribute(e))return i.getAttribute(e);if(((r=t.parentElement)===null||r===void 0?void 0:r.firstChild)!==t)break;i=i.parentElement}return null},n}(),CK=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.boundingBox=[],e}return Fr(t,n),t.prototype.processTSpans=function(e,r,i,s,A,a){for(var o=i.pdf.getFontSize(),l=i.attributeState.xmlSpace==="preserve"||i.attributeState.whiteSpace==="pre",h=!0,u=!1,d=0;d<r.childNodes.length;d++){var f=r.childNodes[d];if(f.textContent){var p=f.textContent;if(f.nodeName==="#text"){var m=Q_(p);m=N_(m),l||(m=P_(m),h&&m.match(/^\s/)&&(u=!0),m.match(/[^\s]/)&&(h=!1),a.prevText.match(/\s$/)&&(m=m.replace(/^\s+/,"")));var y=M_(r,m,i);A.add(r,y,i),a.prevText=p,a.prevContext=i}else if(!zh(f,"title")){if(zh(f,"tspan")){var w=f,B=w.getAttribute("x");if(B!==null){var E=wl(B,o);A=new P5(this,Lt(w,i.styleSheets,"text-anchor")||i.attributeState.textAnchor,E,0),s.push({type:"y",chunk:A})}var S=w.getAttribute("y");if(S!==null){var I=wl(S,o);A=new P5(this,Lt(w,i.styleSheets,"text-anchor")||i.attributeState.textAnchor,0,I),s.push({type:"x",chunk:A})}var L=i.clone();A4(L,e,w),this.processTSpans(e,w,L,s,A,a)}}}}return u},t.prototype.renderCore=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,I,L,k,H,Q;return Qr(this,function(W){if(e.pdf.saveGraphicsState(),r=0,i=0,s=1,A=e.pdf.getFontSize(),a=wl(this.element.getAttribute("x"),A),o=wl(this.element.getAttribute("y"),A),l=wl(this.element.getAttribute("dx"),A),h=wl(this.element.getAttribute("dy"),A),u=parseFloat(this.element.getAttribute("textLength")||"0"),d=e.attributeState.visibility,this.element.childElementCount===0)f=this.element.textContent||"",p=function(U,D){return U=N_(U=Q_(U)),D.xmlSpace==="preserve"||D.whiteSpace==="pre"||(U=P_(U=U.trim())),U}(f,e.attributeState),m=M_(this.element,p,e),r=e.textMeasure.getTextOffset(m,e.attributeState),u>0&&(y=e.textMeasure.measureTextWidth(m,e.attributeState),!(e.attributeState.xmlSpace==="preserve"||e.attributeState.whiteSpace==="pre")&&f.match(/^\s/)&&(s=0),i=(u-y)/(m.length-s)||0),d==="visible"&&(w=e.attributeState.alignmentBaseline,B=HN(e.attributeState),e.pdf.text(m,a+l-r,o+h,{baseline:_N(w),angle:e.transform,renderingMode:B==="fill"?void 0:B,charSpace:i===0?void 0:i}),this.boundingBox=[a+l-r,o+h+.1*A,e.textMeasure.measureTextWidth(m,e.attributeState),A]);else{for(E=[],S=new P5(this,e.attributeState.textAnchor,a+l,o+h),E.push({type:"",chunk:S}),I=this.processTSpans(this,this.element,e,E,S,{prevText:" ",prevContext:e}),s=I?0:1,L=!0,k=E.length-1;k>=0;k--)L&&(L=E[k].chunk.rightTrimText());u>0&&(H=0,Q=0,E.forEach(function(U){var D=U.chunk;D.measureText(e),D.textMeasures.forEach(function(j){var V=j.width,st=j.length;H+=V,Q+=st})}),i=(u-H)/(Q-s)),E.reduce(function(U,D){var j=D.type,V=D.chunk;return j==="x"?V.setX(U[0]):j==="y"&&V.setY(U[1]),V.put(e,i)},[0,0])}return e.pdf.restoreGraphicsState(),[2]})})},t.prototype.isVisible=function(e,r){return iu(this,e,r)},t.prototype.getBoundingBoxCore=function(e){return this.boundingBox.length>0?this.boundingBox:mw(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(UB),xK=function(n){function t(e,r){return n.call(this,!0,e,r)||this}return Fr(t,n),t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t.prototype.getPath=function(e){var r,i,s=new hK(Lt(this.element,e.styleSheets,"d")||"").unshort().unarc().abs(),A=new m0;return s.iterate(function(a){switch(a[0]){case"M":A.moveTo(a[1],a[2]);break;case"L":A.lineTo(a[1],a[2]);break;case"H":A.lineTo(a[1],i);break;case"V":A.lineTo(r,a[1]);break;case"C":A.curveTo(a[1],a[2],a[3],a[4],a[5],a[6]);break;case"Q":var o=U_([r,i],[a[1],a[2]]),l=U_([a[3],a[4]],[a[1],a[2]]);A.curveTo(o[0],o[1],l[0],l[1],a[3],a[4]);break;case"Z":A.close()}switch(a[0]){case"M":case"L":r=a[1],i=a[2];break;case"H":r=a[1];break;case"V":i=a[1];break;case"C":r=a[5],i=a[6];break;case"Q":r=a[3],i=a[4]}}),A},t}(yw),EK=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,((?:.|\s)*)$/i,SK=function(n){function t(e,r){var i=n.call(this,e,r)||this;return i.imageLoadingPromise=null,i.imageUrl=i.element.getAttribute("xlink:href")||i.element.getAttribute("href"),i.imageUrl&&(i.imageLoadingPromise=t.fetchImageData(i.imageUrl)),i}return Fr(t,n),t.prototype.renderCore=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S;return Qr(this,function(I){switch(I.label){case 0:return this.imageLoadingPromise?(e.pdf.setCurrentTransformationMatrix(e.transform),r=parseFloat(Lt(this.element,e.styleSheets,"width")||"0"),i=parseFloat(Lt(this.element,e.styleSheets,"height")||"0"),s=parseFloat(Lt(this.element,e.styleSheets,"x")||"0"),A=parseFloat(Lt(this.element,e.styleSheets,"y")||"0"),!isFinite(r)||r<=0||!isFinite(i)||i<=0?[2]:[4,this.imageLoadingPromise]):[2];case 1:return a=I.sent(),o=a.data,(l=a.format).indexOf("svg")!==0?[3,3]:(h=new DOMParser,u=h.parseFromString(o,"image/svg+xml").firstElementChild,(!(d=this.element.getAttribute("preserveAspectRatio"))||d.indexOf("defer")<0||!u.getAttribute("preserveAspectRatio"))&&u.setAttribute("preserveAspectRatio",d||""),u.setAttribute("x",String(s)),u.setAttribute("y",String(A)),u.setAttribute("width",String(r)),u.setAttribute("height",String(i)),[4,o4(u,f={}).render(new ru(e.pdf,{refsHandler:new IN(f),styleSheets:e.styleSheets,viewport:new LB(r,i),svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]);case 2:return I.sent(),[2];case 3:p="data:image/".concat(l,";base64,").concat(btoa(o)),I.label=4;case 4:return I.trys.push([4,6,,7]),[4,t.getImageDimensions(p)];case 5:return m=I.sent(),y=m[0],w=m[1],B=[0,0,y,w],E=vw(this.element,B,s,A,r,i,e),e.pdf.setCurrentTransformationMatrix(E),e.pdf.addImage(p,"",0,0,y,w),[3,7];case 6:return S=I.sent(),typeof console=="object"&&console.warn&&console.warn("Could not load image ".concat(this.imageUrl,`.
|
|
218
|
+
`).concat(S)),[3,7];case 7:return[2]}})})},t.prototype.getBoundingBoxCore=function(e){return mw(this.element,e)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t.fetchImageData=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a;return Qr(this,function(o){switch(o.label){case 0:if(!(s=e.match(EK)))return[3,1];if(A=s[2],(a=A.split("/"))[0]!=="image")throw new Error("Unsupported image URL: ".concat(e));return i=a[1],r=s[5],s[4]==="base64"?(r=r.replace(/\s/g,""),r=atob(r)):r=decodeURIComponent(r),[3,3];case 1:return[4,t.fetchImage(e)];case 2:r=o.sent(),i=e.substring(e.lastIndexOf(".")+1),o.label=3;case 3:return[2,{data:r,format:i}]}})})},t.fetchImage=function(e){return new Promise(function(r,i){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(){if(s.status!==200)throw new Error("Error ".concat(s.status,": Failed to load image '").concat(e,"'"));for(var A=new Uint8Array(s.response),a="",o=0;o<A.length;o++)a+=String.fromCharCode(A[o]);r(a)},s.onerror=i,s.onabort=i,s.send(null)})},t.getMimeType=function(e){switch(e=e.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";default:return"image/".concat(e)}},t.getImageDimensions=function(e){return new Promise(function(r,i){var s=new Image;s.onload=function(){r([s.width,s.height])},s.onerror=i,s.src=e})},t}(UB),KN=function(n){function t(e,r,i){var s=n.call(this,!0,r,i)||this;return s.closed=e,s}return Fr(t,n),t.prototype.getPath=function(e){if(!this.element.hasAttribute("points")||this.element.getAttribute("points")==="")return null;var r=t.parsePointsString(this.element.getAttribute("points")),i=new m0;if(r.length<1)return i;i.moveTo(r[0][0],r[0][1]);for(var s=1;s<r.length;s++)i.lineTo(r[s][0],r[s][1]);return this.closed&&i.close(),i},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.parsePointsString=function(e){for(var r=ia(e),i=[],s=0;s<r.length-1;s+=2){var A=r[s],a=r[s+1];i.push([A,a])}return i},t}(yw),FK=function(n){function t(e,r){return n.call(this,!0,e,r)||this}return Fr(t,n),t}(KN),TK=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.render=function(e){return Promise.resolve()},t.prototype.getBoundingBoxCore=function(e){return[0,0,0,0]},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t.prototype.isVisible=function(e,r){return vc(this,e,r)},t}(s4),IK=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.apply=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a,o;return Qr(this,function(l){switch(l.label){case 0:r=this.computeNodeTransform(e),i=this.getBoundingBox(e),e.pdf.beginFormObject(i[0],i[1],i[2],i[3],r),s=p0.getContextColors(e),function(h){var u=h.attributeState,d=h.pdf,f=1,p=1;f*=u.fillOpacity,f*=u.opacity,u.fill instanceof kn&&u.fill.color.a!==void 0&&(f*=u.fill.color.a),p*=u.strokeOpacity,p*=u.opacity,u.stroke instanceof kn&&u.stroke.color.a!==void 0&&(p*=u.stroke.color.a);var m,y={};if(y.opacity=f,y["stroke-opacity"]=p,d.setGState(new pd(y)),u.fill&&u.fill instanceof kn&&u.fill.color.ok?d.setFillColor(u.fill.color.r,u.fill.color.g,u.fill.color.b):d.setFillColor(0,0,0),d.setLineWidth(u.strokeWidth),u.stroke instanceof kn?d.setDrawColor(u.stroke.color.r,u.stroke.color.g,u.stroke.color.b):d.setDrawColor(0,0,0),d.setLineCap(u.strokeLinecap),d.setLineJoin(u.strokeLinejoin),u.strokeDasharray?d.setLineDashPattern(u.strokeDasharray,u.strokeDashoffset):d.setLineDashPattern([],0),d.setLineMiterLimit(u.strokeMiterlimit),m=rc.hasOwnProperty(u.fontFamily)?rc[u.fontFamily]:u.fontFamily,u.fill&&u.fill instanceof kn&&u.fill.color.ok){var w=u.fill.color;d.setTextColor(w.r,w.g,w.b)}else d.setTextColor(0,0,0);var B="";u.fontWeight==="bold"&&(B="bold"),u.fontStyle==="italic"&&(B+="italic"),B===""&&(B="normal"),m!==void 0||B!==void 0?(m===void 0&&(m=rc.hasOwnProperty(u.fontFamily)?rc[u.fontFamily]:u.fontFamily),d.setFont(m,B)):d.setFont("helvetica",B),d.setFontSize(u.fontSize*d.internal.scaleFactor)}(A=new ru(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure,attributeState:Object.assign(p0.default(),s)})),a=0,o=this.children,l.label=1;case 1:return a<o.length?[4,o[a].render(A)]:[3,4];case 2:l.sent(),l.label=3;case 3:return a++,[3,1];case 4:return e.pdf.endFormObject(A.refsHandler.generateKey(this.element.getAttribute("id"),s)),[2]}})})},t.prototype.getBoundingBoxCore=function(e){var r,i=this.element.getAttribute("viewBox");return i&&(r=ia(i)),[r&&r[0]||0,r&&r[1]||0,r&&r[2]||parseFloat(this.element.getAttribute("markerWidth")||"3"),r&&r[3]||parseFloat(this.element.getAttribute("markerHeight")||"3")]},t.prototype.computeNodeTransformCore=function(e){var r,i=parseFloat(this.element.getAttribute("refX")||"0"),s=parseFloat(this.element.getAttribute("refY")||"0"),A=this.element.getAttribute("viewBox");if(A){var a=ia(A);r=vw(this.element,a,0,0,parseFloat(this.element.getAttribute("markerWidth")||"3"),parseFloat(this.element.getAttribute("markerHeight")||"3"),e,!0),r=e.pdf.matrixMult(e.pdf.Matrix(1,0,0,1,-i,-s),r)}else r=e.pdf.Matrix(1,0,0,1,-i,-s);return r},t.prototype.isVisible=function(e,r){return iu(this,e,r)},t}(ww),_K=function(n){function t(e,r){return n.call(this,e,r)||this}return Fr(t,n),t.prototype.getR=function(e){var r;return(r=this.r)!==null&&r!==void 0?r:this.r=parseFloat(Lt(this.element,e.styleSheets,"r")||"0")},t.prototype.getRx=function(e){return this.getR(e)},t.prototype.getRy=function(e){return this.getR(e)},t}(RN),UK=function(n){function t(e,r){return n.call(this,!1,e,r)||this}return Fr(t,n),t}(KN),VN=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.renderCore=function(e){return Lr(this,void 0,void 0,function(){var r,i;return Qr(this,function(s){switch(s.label){case 0:r=0,i=this.children,s.label=1;case 1:return r<i.length?[4,i[r].render(e)]:[3,4];case 2:s.sent(),s.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},t.prototype.getBoundingBoxCore=function(e){return n4(e,this)},t}(ON),LK=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.isVisible=function(e,r){return iu(this,e,r)},t.prototype.render=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a;return Qr(this,function(o){switch(o.label){case 0:return this.isVisible(e.attributeState.visibility!=="hidden",e)?(r=this.getX(e),i=this.getY(e),s=this.getWidth(e),A=this.getHeight(e),e.pdf.saveGraphicsState(),a=e.transform,this.element.hasAttribute("transform")&&(a=e.pdf.matrixMult(_B(this.element.getAttribute("transform"),e),a)),e.pdf.setCurrentTransformationMatrix(a),e.withinUse||Lt(this.element,e.styleSheets,"overflow")==="visible"||e.pdf.rect(r,i,s,A).clip().discardPath(),[4,n.prototype.render.call(this,e.clone({transform:e.pdf.unitMatrix,viewport:e.withinUse?e.viewport:new LB(s,A)}))]):[2];case 1:return o.sent(),e.pdf.restoreGraphicsState(),[2]}})})},t.prototype.computeNodeTransform=function(e){return this.computeNodeTransformCore(e)},t.prototype.computeNodeTransformCore=function(e){if(e.withinUse)return e.pdf.unitMatrix;var r,i=this.getX(e),s=this.getY(e),A=this.getViewBox();if(A){var a=this.getWidth(e),o=this.getHeight(e);r=vw(this.element,A,i,s,a,o,e)}else r=e.pdf.Matrix(1,0,0,1,i,s);return r},t.prototype.getWidth=function(e){if(this.width!==void 0)return this.width;var r,i,s=e.svg2pdfParameters;if(this.isOutermostSvg(e))if(s.width!=null)r=s.width;else if(i=Lt(this.element,e.styleSheets,"width"))r=parseFloat(i);else{var A=this.getViewBox();if(A&&(s.height!=null||Lt(this.element,e.styleSheets,"height"))){var a=A[2]/A[3];r=this.getHeight(e)*a}else r=Math.min(300,e.viewport.width,2*e.viewport.height)}else r=(i=Lt(this.element,e.styleSheets,"width"))?parseFloat(i):e.viewport.width;return this.width=r},t.prototype.getHeight=function(e){if(this.height!==void 0)return this.height;var r,i,s=e.svg2pdfParameters;if(this.isOutermostSvg(e))if(s.height!=null)r=s.height;else if(i=Lt(this.element,e.styleSheets,"height"))r=parseFloat(i);else{var A=this.getViewBox();if(A){var a=A[2]/A[3];r=this.getWidth(e)/a}else r=Math.min(150,e.viewport.width/2,e.viewport.height)}else r=(i=Lt(this.element,e.styleSheets,"height"))?parseFloat(i):e.viewport.height;return this.height=r},t.prototype.getX=function(e){if(this.x!==void 0)return this.x;if(this.isOutermostSvg(e))return this.x=0;var r=Lt(this.element,e.styleSheets,"x");return this.x=r?parseFloat(r):0},t.prototype.getY=function(e){if(this.y!==void 0)return this.y;if(this.isOutermostSvg(e))return this.y=0;var r=Lt(this.element,e.styleSheets,"y");return this.y=r?parseFloat(r):0},t.prototype.getViewBox=function(){if(this.viewBox!==void 0)return this.viewBox;var e=this.element.getAttribute("viewBox");return this.viewBox=e?ia(e):void 0},t.prototype.isOutermostSvg=function(e){return e.svg2pdfParameters.element===this.element},t}(VN),GN=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.isVisible=function(e,r){return iu(this,e,r)},t.prototype.computeNodeTransformCore=function(e){return e.pdf.unitMatrix},t}(VN),QK=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.renderCore=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A;return Qr(this,function(a){switch(a.label){case 0:return[4,n.prototype.renderCore.call(this,e)];case 1:return a.sent(),(r=Lt(this.element,e.styleSheets,"href"))&&(i=this.getBoundingBox(e),s=e.pdf.internal.scaleFactor,A=e.pdf.internal.pageSize.getHeight(),e.pdf.link(s*(i[0]*e.transform.sx+e.transform.tx),A-s*(i[1]*e.transform.sy+e.transform.ty),s*i[2],s*i[3],{url:r})),[2]}})})},t}(GN),NK=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return Fr(t,n),t.prototype.apply=function(e){return Lr(this,void 0,void 0,function(){var r,i,s,A,a;return Qr(this,function(o){switch(o.label){case 0:if(!this.isVisible(!0,e))return[2];r=e.pdf.matrixMult(this.computeNodeTransform(e),e.transform),e.pdf.setCurrentTransformationMatrix(r),i=0,s=this.children,o.label=1;case 1:return i<s.length?[4,s[i].render(new ru(e.pdf,{refsHandler:e.refsHandler,styleSheets:e.styleSheets,viewport:e.viewport,withinClipPath:!0,svg2pdfParameters:e.svg2pdfParameters,textMeasure:e.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return i++,[3,1];case 4:return A=this.children.length>0&&!!Lt(this.children[0].element,e.styleSheets,"clip-rule"),a=A?this.getClipRuleAttr(this.children[0].element,e.styleSheets):this.getClipRuleAttr(this.element,e.styleSheets),e.pdf.clip(a).discardPath(),e.pdf.setCurrentTransformationMatrix(r.inversed()),[2]}})})},t.prototype.getBoundingBoxCore=function(e){return n4(e,this)},t.prototype.isVisible=function(e,r){return iu(this,e,r)},t.prototype.getClipRuleAttr=function(e,r){return Lt(e,r,"clip-rule")==="evenodd"?"evenodd":void 0},t}(ww);function o4(n,t){var e,r=[];switch(function(s,A){for(var a=[],o=0;o<s.childNodes.length;o++){var l=s.childNodes[o];l.nodeName.charAt(0)!=="#"&&a.push(l)}for(o=0;o<a.length;o++)A(o,a[o])}(n,function(s,A){return r.push(o4(A,t))}),n.tagName.toLowerCase()){case"a":e=new QK(n,r);break;case"g":e=new GN(n,r);break;case"circle":e=new _K(n,r);break;case"clippath":e=new NK(n,r);break;case"ellipse":e=new BK(n,r);break;case"lineargradient":e=new QN(n,r);break;case"image":e=new SK(n,r);break;case"line":e=new wK(n,r);break;case"marker":e=new IK(n,r);break;case"path":e=new xK(n,r);break;case"pattern":e=new PN(n,r);break;case"polygon":e=new FK(n,r);break;case"polyline":e=new UK(n,r);break;case"radialgradient":e=new NN(n,r);break;case"rect":e=new bK(n,r);break;case"svg":e=new LK(n,r);break;case"symbol":e=new DN(n,r);break;case"text":e=new CK(n,r);break;case"use":e=new yK(n,r);break;default:e=new TK(n,r)}if(t!=null&&e.element.hasAttribute("id")){var i=FN(e.element.id,{isIdentifier:!0});t[i]=t[i]||e}return e.children.forEach(function(s){return s.setParent(e)}),e}var PK=function(){function n(t,e){this.rootSvg=t,this.loadExternalSheets=e,this.styleSheets=[]}return n.prototype.load=function(){return Lr(this,void 0,void 0,function(){var t;return Qr(this,function(e){switch(e.label){case 0:return[4,this.collectStyleSheetTexts()];case 1:return t=e.sent(),this.parseCssSheets(t),[2]}})})},n.prototype.collectStyleSheetTexts=function(){return Lr(this,void 0,void 0,function(){var t,e,r,i,s;return Qr(this,function(A){switch(A.label){case 0:if(t=[],this.loadExternalSheets&&this.rootSvg.ownerDocument)for(i=0;i<this.rootSvg.ownerDocument.childNodes.length;i++)(e=this.rootSvg.ownerDocument.childNodes[i]).nodeName==="xml-stylesheet"&&typeof e.data=="string"&&t.push(n.loadSheet(e.data.match(/href=["'].*?["']/)[0].split("=")[1].slice(1,-1)));for(r=this.rootSvg.querySelectorAll("style,link"),i=0;i<r.length;i++)zh(s=r[i],"style")?t.push(s.textContent):this.loadExternalSheets&&zh(s,"link")&&s.getAttribute("rel")==="stylesheet"&&s.hasAttribute("href")&&t.push(n.loadSheet(s.getAttribute("href")));return[4,Promise.all(t)];case 1:return[2,A.sent().filter(function(a){return a!==null})]}})})},n.prototype.parseCssSheets=function(t){for(var e=document.implementation.createHTMLDocument(""),r=0,i=t;r<i.length;r++){var s=i[r],A=e.createElement("style");A.textContent=s,e.body.appendChild(A);var a=A.sheet;if(a instanceof CSSStyleSheet){for(var o=a.cssRules.length-1;o>=0;o--){var l=a.cssRules[o];if(l instanceof CSSStyleRule){var h=l;if(h.selectorText.indexOf(",")>=0){a.deleteRule(o);for(var u=h.cssText.substring(h.selectorText.length),d=n.splitSelectorAtCommas(h.selectorText),f=0;f<d.length;f++)a.insertRule(d[f]+u,o+f)}}else a.deleteRule(o)}this.styleSheets.push(a)}}},n.splitSelectorAtCommas=function(t){for(var e,r=/,|["']/g,i=/[^\\]["]/g,s=/[^\\][']/g,A=[],a="initial",o=-1,l=i,h=0;h<t.length;)switch(a){case"initial":r.lastIndex=h,(e=r.exec(t))?(e[0]===","?(A.push(t.substring(o+1,r.lastIndex-1).trim()),o=r.lastIndex-1):(a="withinQuotes",l=e[0]==='"'?i:s),h=r.lastIndex):(A.push(t.substring(o+1).trim()),h=t.length);break;case"withinQuotes":l.lastIndex=h,(e=l.exec(t))&&(h=l.lastIndex,a="initial")}return A},n.loadSheet=function(t){return new Promise(function(e,r){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="text",i.onload=function(){i.status!==200&&r(new Error("Error ".concat(i.status,": Failed to load '").concat(t,"'"))),e(i.responseText)},i.onerror=r,i.onabort=r,i.send(null)}).catch(function(){return null})},n.prototype.getPropertyValue=function(t,e){for(var r=[],i=0,s=this.styleSheets;i<s.length;i++)for(var A=s[i],a=0;a<A.cssRules.length;a++){var o=A.cssRules[a];o.style.getPropertyValue(e)&&t.matches(o.selectorText)&&r.push(o)}if(r.length!==0)return r.reduce(function(l,h){return d=h,((f=(u=l).style.getPropertyPriority(e))!==d.style.getPropertyPriority(e)?f==="important"?1:-1:uK(u.selectorText,d.selectorText))===1?l:h;var u,d,f}).style.getPropertyValue(e)||void 0},n}(),MK=function(){function n(){this.measureMethods={}}return n.prototype.getTextOffset=function(t,e){var r=e.textAnchor;if(r==="start")return 0;var i=this.measureTextWidth(t,e),s=0;switch(r){case"end":s=i;break;case"middle":s=i/2}return s},n.prototype.measureTextWidth=function(t,e){if(t.length===0)return 0;var r=e.fontFamily;return this.getMeasureFunction(r).call(this,t,e.fontFamily,e.fontSize+"px",e.fontStyle,e.fontWeight)},n.prototype.getMeasurementTextNode=function(){if(!this.textMeasuringTextElement){this.textMeasuringTextElement=document.createElementNS(L_,"text");var t=document.createElementNS(L_,"svg");t.appendChild(this.textMeasuringTextElement),t.style.setProperty("position","absolute"),t.style.setProperty("visibility","hidden"),document.body.appendChild(t)}return this.textMeasuringTextElement},n.prototype.canvasTextMeasure=function(t,e,r,i,s){var A=document.createElement("canvas").getContext("2d");return A!=null?(A.font=[i,s,r,e].join(" "),A.measureText(t).width):0},n.prototype.svgTextMeasure=function(t,e,r,i,s,A){A===void 0&&(A=this.getMeasurementTextNode());var a=A;return a.setAttribute("font-family",e),a.setAttribute("font-size",r),a.setAttribute("font-style",i),a.setAttribute("font-weight",s),a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.textContent=t,a.getBBox().width},n.prototype.getMeasureFunction=function(t){var e=this.measureMethods[t];if(!e){var r="16px",i="normal",s="normal",A=this.canvasTextMeasure(n.testString,t,r,i,s),a=this.svgTextMeasure(n.testString,t,r,i,s);e=Math.abs(A-a)<n.epsilon?this.canvasTextMeasure:this.svgTextMeasure,this.measureMethods[t]=e}return e},n.prototype.cleanupTextMeasuring=function(){if(this.textMeasuringTextElement){var t=this.textMeasuringTextElement.parentNode;t&&document.body.removeChild(t),this.textMeasuringTextElement=void 0}},n.testString=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!"$%&/()=?'\\+*-_.:,;^}][{#~|<>`,n.epsilon=.1,n}();function jN(n,t){return Lr(this,arguments,void 0,function(e,r,i){var s,A,a,o,l,h,u,d,f,p,m,y,w,B;return i===void 0&&(i={}),Qr(this,function(E){switch(E.label){case 0:return s=(y=i.x)!==null&&y!==void 0?y:0,A=(w=i.y)!==null&&w!==void 0?w:0,a=(B=i.loadExternalStyleSheets)!==null&&B!==void 0&&B,l=new IN(o={}),[4,(h=new PK(e,a)).load()];case 1:return E.sent(),u=new LB(r.internal.pageSize.getWidth(),r.internal.pageSize.getHeight()),d=Sb(Sb({},i),{element:e}),f=new MK,p=new ru(r,{refsHandler:l,styleSheets:h,viewport:u,svg2pdfParameters:d,textMeasure:f}),r.advancedAPI(),r.saveGraphicsState(),r.setCurrentTransformationMatrix(r.Matrix(1,0,0,1,s,A)),r.setLineWidth(p.attributeState.strokeWidth),m=p.attributeState.fill.color,r.setFillColor(m.r,m.g,m.b),r.setFont(p.attributeState.fontFamily),r.setFontSize(p.attributeState.fontSize*r.internal.scaleFactor),[4,o4(e,o).render(p)];case 2:return E.sent(),r.restoreGraphicsState(),r.compatAPI(),p.textMeasure.cleanupTextMeasuring(),[2,r]}})})}le.API.svg=function(n,t){return t===void 0&&(t={}),jN(n,this,t)};class $N{async convert(t){const e=await this.buildSvg(t),r=uv.resolveExportDownloadName(t.doc.fileName||t.doc.docTitle,"pdf");await this.downloadAsPdf(e,r)}async buildSvg(t){lI.AcSvgRenderer.prepareExport();const e=t.doc.database.tables.blockTable.modelSpace.newIterator(),r=new lI.AcSvgRenderer;this.configureRenderer(r,t);for(const i of e)i.worldDraw(r);return r.exportAsync()}configureRenderer(t,e){const r=e.doc.database;t.ltscale=r.ltscale,t.celtscale=r.celtscale,t.showLineWeight=!!r.lwdisplay,t.setFontMapping(uv.AcApSettingManager.instance.fontMapping);const i=e.view,s=(i==null?void 0:i.backgroundColor)??16777215;t.currentBackgroundColor=s,t.changeForeground(s===0?16777215:0)}async downloadAsPdf(t,e){var u;const s=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,A=(u=s.getAttribute("viewBox"))==null?void 0:u.split(" ").map(Number),a=A&&A.length===4?Math.abs(A[2]):297,o=A&&A.length===4?Math.abs(A[3]):210,l=a>=o?"landscape":"portrait",h=new le({orientation:l,unit:"mm",format:[a,o]});await jN(s,h,{x:0,y:0,width:a,height:o}),h.save(e)}}class WN extends uv.AcEdCommand{async execute(t){await new $N().convert(t)}}const FA=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),ic=[1/0,1/0,-1/0,-1/0],Ou=new Float32Array(ic),bE=[.001,0,0,.001,0,0],M5=1.35,SA={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ec={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},pv="pdfjs_internal_editor_",Ee={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},Pe={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,INK_COLOR_AND_OPACITY:24,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},zN={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},en={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},tv={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Fi={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},dg={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},bw={ERRORS:0,WARNINGS:1,INFOS:5},Oo={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},em={moveTo:0,lineTo:1,curveTo:2,quadraticCurveTo:3,closePath:4},XN={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let QB=bw.WARNINGS;function kK(n){Number.isInteger(n)&&(QB=n)}function OK(){return QB}function NB(n){QB>=bw.INFOS&&console.info(`Info: ${n}`)}function Me(n){QB>=bw.WARNINGS&&console.warn(`Warning: ${n}`)}function hr(n){throw new Error(n)}function si(n,t){n||hr(t)}function DK(n){switch(n==null?void 0:n.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function l4(n,t=null,e=null){if(!n)return null;if(e&&typeof n=="string"){if(e.addDefaultProtocol&&n.startsWith("www.")){const i=n.match(/\./g);(i==null?void 0:i.length)>=2&&(n=`http://${n}`)}if(e.tryConvertEncoding)try{n=VK(n)}catch{}}const r=t?URL.parse(n,t):URL.parse(n);return DK(r)?r:null}function c4(n,t,e=!1){const r=URL.parse(n);return r?(r.hash=t,r.href):e&&l4(n,"http://example.com")?n.split("#",1)[0]+`${t?`#${t}`:""}`:""}function BE(n){return n.substring(n.lastIndexOf("/")+1)}function Fe(n,t,e,r=!1){return Object.defineProperty(n,t,{value:e,enumerable:!r,configurable:!0,writable:!1}),e}const Bd=function(){function t(e,r){this.message=e,this.name=r}return t.prototype=new Error,t.constructor=t,t}();class k_ extends Bd{constructor(t,e){super(t,"PasswordException"),this.code=e}}class k5 extends Bd{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Fb extends Bd{constructor(t){super(t,"InvalidPDFException")}}class mv extends Bd{constructor(t,e,r){super(t,"ResponseException"),this.status=e,this.missing=r}}class RK extends Bd{constructor(t){super(t,"FormatError")}}class cc extends Bd{constructor(t){super(t,"AbortException")}}function HK(n){(typeof n!="object"||(n==null?void 0:n.length)===void 0)&&hr("Invalid argument for bytesToString");const t=n.length,e=8192;if(t<e)return String.fromCharCode.apply(null,n);const r=[];for(let i=0;i<t;i+=e){const s=Math.min(i+e,t),A=n.subarray(i,s);r.push(String.fromCharCode.apply(null,A))}return r.join("")}function PB(n){typeof n!="string"&&hr("Invalid argument for stringToBytes");const t=n.length,e=new Uint8Array(t);for(let r=0;r<t;++r)e[r]=n.charCodeAt(r)&255;return e}function KK(){const n=new Uint8Array(4);return n[0]=1,new Uint32Array(n.buffer,0,1)[0]===1}class Mi{static get isLittleEndian(){return Fe(this,"isLittleEndian",KK())}static get isOffscreenCanvasSupported(){return Fe(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return Fe(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get isFloat16ArraySupported(){return Fe(this,"isFloat16ArraySupported",typeof Float16Array<"u")}static get isSanitizerSupported(){return Fe(this,"isSanitizerSupported",typeof Sanitizer<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return Fe(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return Fe(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}static get isAlphaColorInputSupported(){return Fe(this,"isAlphaColorInputSupported",(()=>{if(typeof document>"u")return!1;const t=document.createElement("input");return t.type="color",t.setAttribute("alpha",""),t.value="#ff000080",t.value!=="#ff0000"})())}}var ac,Iy,CE;class Qt{static get hexNums(){return Fe(this,"hexNums",Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")))}static makeHexColor(t,e,r){return`#${this.hexNums[t]}${this.hexNums[e]}${this.hexNums[r]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let r;t[0]?(t[0]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[3],e[3]*=t[3]):(r=e[0],e[0]=e[1],e[1]=r,r=e[2],e[2]=e[3],e[3]=r,t[1]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,r=0){const i=t[r],s=t[r+1];t[r]=i*e[0]+s*e[2]+e[4],t[r+1]=i*e[1]+s*e[3]+e[5]}static applyTransformToBezier(t,e,r=0){const i=e[0],s=e[1],A=e[2],a=e[3],o=e[4],l=e[5];for(let h=0;h<6;h+=2){const u=t[r+h],d=t[r+h+1];t[r+h]=u*i+d*A+o,t[r+h+1]=u*s+d*a+l}}static applyInverseTransform(t,e){const r=t[0],i=t[1],s=e[0]*e[3]-e[1]*e[2];t[0]=(r*e[3]-i*e[2]+e[2]*e[5]-e[4]*e[3])/s,t[1]=(-r*e[1]+i*e[0]+e[4]*e[1]-e[5]*e[0])/s}static axialAlignedBoundingBox(t,e,r){const i=e[0],s=e[1],A=e[2],a=e[3],o=e[4],l=e[5],h=t[0],u=t[1],d=t[2],f=t[3];let p=i*h+o,m=p,y=i*d+o,w=y,B=a*u+l,E=B,S=a*f+l,I=S;if(s!==0||A!==0){const L=s*h,k=s*d,H=A*u,Q=A*f;p+=H,w+=H,y+=Q,m+=Q,B+=L,I+=L,S+=k,E+=k}r[0]=Math.min(r[0],p,y,m,w),r[1]=Math.min(r[1],B,S,E,I),r[2]=Math.max(r[2],p,y,m,w),r[3]=Math.max(r[3],B,S,E,I)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const r=t[0],i=t[1],s=t[2],A=t[3],a=r**2+i**2,o=r*s+i*A,l=s**2+A**2,h=(a+l)/2,u=Math.sqrt(h**2-(a*l-o**2));e[0]=Math.sqrt(h+u||1),e[1]=Math.sqrt(h-u||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>i)return null;const s=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),A=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return s>A?null:[r,s,i,A]}static pointBoundingBox(t,e,r){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}static rectBoundingBox(t,e,r,i,s){s[0]=Math.min(s[0],t,r),s[1]=Math.min(s[1],e,i),s[2]=Math.max(s[2],t,r),s[3]=Math.max(s[3],e,i)}static bezierBoundingBox(t,e,r,i,s,A,a,o,l){l[0]=Math.min(l[0],t,a),l[1]=Math.min(l[1],e,o),l[2]=Math.max(l[2],t,a),l[3]=Math.max(l[3],e,o),_(this,ac,CE).call(this,t,r,s,a,e,i,A,o,3*(-t+3*(r-s)+a),6*(t-2*r+s),3*(r-t),l),_(this,ac,CE).call(this,t,r,s,a,e,i,A,o,3*(-e+3*(i-A)+o),6*(e-2*i+A),3*(i-e),l)}}ac=new WeakSet,Iy=function(t,e,r,i,s,A,a,o,l,h){if(l<=0||l>=1)return;const u=1-l,d=l*l,f=d*l,p=u*(u*(u*t+3*l*e)+3*d*r)+f*i,m=u*(u*(u*s+3*l*A)+3*d*a)+f*o;h[0]=Math.min(h[0],p),h[1]=Math.min(h[1],m),h[2]=Math.max(h[2],p),h[3]=Math.max(h[3],m)},CE=function(t,e,r,i,s,A,a,o,l,h,u,d){if(Math.abs(l)<1e-12){Math.abs(h)>=1e-12&&_(this,ac,Iy).call(this,t,e,r,i,s,A,a,o,-u/h,d);return}const f=h**2-4*u*l;if(f<0)return;const p=Math.sqrt(f),m=2*l;_(this,ac,Iy).call(this,t,e,r,i,s,A,a,o,(-h+p)/m,d),_(this,ac,Iy).call(this,t,e,r,i,s,A,a,o,(-h-p)/m,d)},T(Qt,ac);function VK(n){return decodeURIComponent(escape(n))}let O5=null,O_=null;function qN(n){return O5||(O5=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,O_=new Map([["ſt","ſt"]])),n.replaceAll(O5,(t,e,r)=>e?e.normalize("NFKC"):O_.get(r))}function h4(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const n=new Uint8Array(32);return crypto.getRandomValues(n),HK(n)}const Tg="pdfjs_internal_id_";function GK(n,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[r,i,...s]=e;if(!n(r)&&!Number.isInteger(r)||!t(i))return!1;const A=s.length;let a=!0;switch(i.name){case"XYZ":if(A<2||A>3)return!1;break;case"Fit":case"FitB":return A===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(A>1)return!1;break;case"FitR":if(A!==4)return!1;a=!1;break;default:return!1}for(const o of s)if(!(typeof o=="number"||a&&o===null))return!1;return!0}const MB=()=>[],kB=()=>new Map,Tb=()=>Object.create(null);function Wr(n,t,e){return Math.min(Math.max(n,t),e)}class vv{static textContent(t){const e=[],r={items:e,styles:Object.create(null)};function i(s){var o;if(!s)return;let A=null;const a=s.name;if(a==="#text")A=s.value;else if(vv.shouldBuildText(a))(o=s==null?void 0:s.attributes)!=null&&o.textContent?A=s.attributes.textContent:s.value&&(A=s.value);else return;if(A!==null&&e.push({str:A}),!!s.children)for(const l of s.children)i(l)}return i(t),r}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}class u4{static setupStorage(t,e,r,i,s){const A=i.getValue(e,{value:null});switch(r.name){case"textarea":if(A.value!==null&&(t.textContent=A.value),s==="print")break;t.addEventListener("input",a=>{i.setValue(e,{value:a.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(A.value===r.attributes.xfaOn?t.setAttribute("checked",!0):A.value===r.attributes.xfaOff&&t.removeAttribute("checked"),s==="print")break;t.addEventListener("change",a=>{i.setValue(e,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})})}else{if(A.value!==null&&t.setAttribute("value",A.value),s==="print")break;t.addEventListener("input",a=>{i.setValue(e,{value:a.target.value})})}break;case"select":if(A.value!==null){t.setAttribute("value",A.value);for(const a of r.children)a.attributes.value===A.value?a.attributes.selected=!0:Object.hasOwn(a.attributes,"selected")&&delete a.attributes.selected}t.addEventListener("input",a=>{const o=a.target.options,l=o.selectedIndex===-1?"":o[o.selectedIndex].value;i.setValue(e,{value:l})});break}}static setAttributes({html:t,element:e,storage:r=null,intent:i,linkService:s}){const{attributes:A}=e,a=t instanceof HTMLAnchorElement;A.type==="radio"&&(A.name=`${A.name}-${i}`);for(const[o,l]of Object.entries(A))if(l!=null)switch(o){case"class":l.length&&t.setAttribute(o,l.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",l);break;case"style":Object.assign(t.style,l);break;case"textContent":t.textContent=l;break;default:(!a||o!=="href"&&o!=="newWindow")&&t.setAttribute(o,l)}a&&s.addLinkAttributes(t,A.href,A.newWindow),r&&A.dataId&&this.setupStorage(t,A.dataId,e,r)}static render(t){var u,d;const e=t.annotationStorage,r=t.linkService,i=t.xfaHtml,s=t.intent||"display",A=document.createElement(i.name);i.attributes&&this.setAttributes({html:A,element:i,intent:s,linkService:r});const a=s!=="richText",o=t.div;if(o.append(A),t.viewport){const f=`matrix(${t.viewport.transform.join(",")})`;o.style.transform=f}a&&o.setAttribute("class","xfaLayer xfaFont");const l=[];if(i.children.length===0){if(i.value){const f=document.createTextNode(i.value);A.append(f),a&&vv.shouldBuildText(i.name)&&l.push(f)}return{textDivs:l}}const h=[[i,-1,A]];for(;h.length>0;){const[f,p,m]=h.at(-1);if(p+1===f.children.length){h.pop();continue}const y=f.children[++h.at(-1)[1]];if(y===null)continue;const{name:w}=y;if(w==="#text"){const E=document.createTextNode(y.value);l.push(E),m.append(E);continue}const B=(u=y==null?void 0:y.attributes)!=null&&u.xmlns?document.createElementNS(y.attributes.xmlns,w):document.createElement(w);if(m.append(B),y.attributes&&this.setAttributes({html:B,element:y,storage:e,intent:s,linkService:r}),((d=y.children)==null?void 0:d.length)>0)h.push([y,-1,B]);else if(y.value){const E=document.createTextNode(y.value);a&&vv.shouldBuildText(w)&&l.push(E),B.append(E)}}for(const f of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))f.setAttribute("readOnly",!0);return{textDivs:l}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const fl="http://www.w3.org/2000/svg",Nu=class Nu{};ct(Nu,"CSS",96),ct(Nu,"PDF",72),ct(Nu,"PDF_TO_CSS_UNITS",Nu.CSS/Nu.PDF);let hc=Nu;async function OB(n,t="text"){if(ev(n,document.baseURI)){const e=await fetch(n);if(!e.ok)throw new Error(e.statusText);switch(t){case"blob":return e.blob();case"bytes":return e.bytes();case"json":return e.json()}return e.text()}return new Promise((e,r)=>{const i=new XMLHttpRequest;i.open("GET",n,!0),i.responseType=t==="bytes"?"arraybuffer":t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"bytes":e(new Uint8Array(i.response));return;case"blob":case"json":e(i.response);return}e(i.responseText);return}r(new Error(i.statusText))}},i.send(null)})}class Bw{constructor({viewBox:t,userUnit:e,scale:r,rotation:i,offsetX:s=0,offsetY:A=0,dontFlip:a=!1}){this.viewBox=t,this.userUnit=e,this.scale=r,this.rotation=i,this.offsetX=s,this.offsetY=A,r*=e;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let h,u,d,f;switch(i%=360,i<0&&(i+=360),i){case 180:h=-1,u=0,d=0,f=1;break;case 90:h=0,u=1,d=1,f=0;break;case 270:h=0,u=-1,d=-1,f=0;break;case 0:h=1,u=0,d=0,f=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(d=-d,f=-f);let p,m,y,w;h===0?(p=Math.abs(l-t[1])*r+s,m=Math.abs(o-t[0])*r+A,y=(t[3]-t[1])*r,w=(t[2]-t[0])*r):(p=Math.abs(o-t[0])*r+s,m=Math.abs(l-t[1])*r+A,y=(t[2]-t[0])*r,w=(t[3]-t[1])*r),this.transform=[h*r,u*r,d*r,f*r,p-h*r*o-d*r*l,m-u*r*o-f*r*l],this.width=y,this.height=w}get rawDims(){const t=this.viewBox;return Fe(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:s=!1}={}){return new Bw({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:r,offsetY:i,dontFlip:s})}convertToViewportPoint(t,e){const r=[t,e];return Qt.applyTransform(r,this.transform),r}convertToViewportRectangle(t){const e=[t[0],t[1]];Qt.applyTransform(e,this.transform);const r=[t[2],t[3]];return Qt.applyTransform(r,this.transform),[e[0],e[1],r[0],r[1]]}convertToPdfPoint(t,e){const r=[t,e];return Qt.applyInverseTransform(r,this.transform),r}}class DB extends Bd{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function Cw(n){const t=n.length;let e=0;for(;e<t&&n[e].trim()==="";)e++;return n.substring(e,e+5).toLowerCase()==="data:"}function RB(n){return typeof n=="string"&&/\.pdf$/i.test(n)}function YN(n){return[n]=n.split(/[#?]/,1),BE(n)}function JN(n,t="document.pdf"){if(typeof n!="string")return t;if(Cw(n))return Me('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const r=(a=>{try{return new URL(a)}catch{try{return new URL(decodeURIComponent(a))}catch{try{return new URL(a,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(a),"https://foo.bar")}catch{return null}}}}})(n);if(!r)return t;const i=a=>{try{let o=decodeURIComponent(a);return o.includes("/")&&(o=BE(o),/^\.pdf$/i.test(o))?a:o}catch{return a}},s=/\.pdf$/i,A=BE(r.pathname);if(s.test(A))return i(A);if(r.searchParams.size>0){const a=l=>[...l].findLast(h=>s.test(h)),o=a(r.searchParams.values())??a(r.searchParams.keys());if(o)return i(o)}if(r.hash){const o=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(r.hash);if(o)return i(o[0])}return t}var Wc;class D_{constructor(){T(this,Wc,new Map);ct(this,"times",[])}time(t){c(this,Wc).has(t)&&Me(`Timer is already running for ${t}`),c(this,Wc).set(t,Date.now())}timeEnd(t){c(this,Wc).has(t)||Me(`Timer has not been started for ${t}`),this.times.push({name:t,start:c(this,Wc).get(t),end:Date.now()}),c(this,Wc).delete(t)}toString(){const t=Math.max(...this.times.map(e=>e.name.length));return this.times.map(e=>`${e.name.padEnd(t)} ${e.end-e.start}ms
|
|
219
|
+
`).join("")}}Wc=new WeakMap;function ev(n,t){const e=t?URL.parse(n,t):URL.parse(n);return/https?:/.test((e==null?void 0:e.protocol)??"")}function QA(n){n.preventDefault()}function Zr(n){n.preventDefault(),n.stopPropagation()}function jK(n){console.log("Deprecated API usage: "+n)}var Uv;class wv{static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;c(this,Uv)||C(this,Uv,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=c(this,Uv).exec(t);if(!e)return null;const r=parseInt(e[1],10);let i=parseInt(e[2],10);i=i>=1&&i<=12?i-1:0;let s=parseInt(e[3],10);s=s>=1&&s<=31?s:1;let A=parseInt(e[4],10);A=A>=0&&A<=23?A:0;let a=parseInt(e[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(e[6],10);o=o>=0&&o<=59?o:0;const l=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,l==="-"?(A+=h,a+=u):l==="+"&&(A-=h,a-=u),new Date(Date.UTC(r,i,s,A,a,o))}}Uv=new WeakMap,T(wv,Uv);function ZN(n,{scale:t=1,rotation:e=0}){const{width:r,height:i}=n.attributes.style,s=[0,0,parseInt(r,10),parseInt(i,10)];return new Bw({viewBox:s,userUnit:1,scale:t,rotation:e})}function HB(n){if(n.startsWith("#")){const e=n.slice(1);return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length>=8?parseInt(e.slice(6,8),16)/255:1]}if(n.startsWith("rgb(")){const[e,r,i]=n.slice(4,-1).split(",").map(s=>parseInt(s,10));return[e,r,i,1]}if(n.startsWith("rgba(")){const e=n.slice(5,-1).split(",");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseFloat(e[3])]}const t=n.match(/^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+|none))?\)$/);return t?[Math.round(parseFloat(t[1])*255),Math.round(parseFloat(t[2])*255),Math.round(parseFloat(t[3])*255),t[4]!==void 0&&t[4]!=="none"?parseFloat(t[4]):1]:null}function S0(n){const t=HB(n);return t?t.slice(0,3):(Me(`Not a valid color format: "${n}"`),[0,0,0])}function $K(n){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const e of n.keys()){t.style.color=e;const r=window.getComputedStyle(t).color;n.set(e,S0(r))}t.remove()}function $r(n){const{a:t,b:e,c:r,d:i,e:s,f:A}=n.getTransform();return[t,e,r,i,s,A]}function Ao(n){const{a:t,b:e,c:r,d:i,e:s,f:A}=n.getTransform().invertSelf();return[t,e,r,i,s,A]}function Xh(n,t,e=!1,r=!0){if(t instanceof Bw){const{pageWidth:i,pageHeight:s}=t.rawDims,{style:A}=n,a=Mi.isCSSRoundSupported,o=`var(--total-scale-factor) * ${i}px`,l=`var(--total-scale-factor) * ${s}px`,h=a?`round(down, ${o}, var(--scale-round-x))`:`calc(${o})`,u=a?`round(down, ${l}, var(--scale-round-y))`:`calc(${l})`;!e||t.rotation%180===0?(A.width=h,A.height=u):(A.width=u,A.height=h)}r&&n.setAttribute("data-main-rotation",t.rotation)}class Ga{constructor(){const{pixelRatio:t}=Ga;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,r,i,s=-1){let A=1/0,a=1/0,o=1/0;r=Ga.capPixels(r,s),r>0&&(A=Math.sqrt(r/(t*e))),i!==-1&&(a=i/t,o=i/e);const l=Math.min(A,a,o);return this.sx>l||this.sy>l?(this.sx=l,this.sy=l,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const r=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,r):r}return t}}const Ib=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class WK{static get isDarkMode(){var t;return Fe(this,"isDarkMode",!!((t=window==null?void 0:window.matchMedia)!=null&&t.call(window,"(prefers-color-scheme: dark)").matches))}}class tP{static get commentForegroundColor(){const t=document.createElement("span");t.classList.add("comment","sidebar");const{style:e}=t;e.width=e.height="0",e.display="none",e.color="var(--comment-fg-color)",document.body.append(t);const{color:r}=window.getComputedStyle(t);return t.remove(),Fe(this,"commentForegroundColor",S0(r))}}function eP(n,t){t=Wr(t??1,0,1);const e=255*(1-t);return n.map(r=>Math.round(r*t+e))}function R_(n,t){const e=n[0]/255,r=n[1]/255,i=n[2]/255,s=Math.max(e,r,i),A=Math.min(e,r,i),a=(s+A)/2;if(s===A)t[0]=t[1]=0;else{const o=s-A;switch(t[1]=a<.5?o/(s+A):o/(2-s-A),s){case e:t[0]=((r-i)/o+(r<i?6:0))*60;break;case r:t[0]=((i-e)/o+2)*60;break;case i:t[0]=((e-r)/o+4)*60;break}}t[2]=a}function xE(n,t){const e=n[0],r=n[1],i=n[2],s=(1-Math.abs(2*i-1))*r,A=s*(1-Math.abs(e/60%2-1)),a=i-s/2;switch(Math.floor(e/60)){case 0:t[0]=s+a,t[1]=A+a,t[2]=a;break;case 1:t[0]=A+a,t[1]=s+a,t[2]=a;break;case 2:t[0]=a,t[1]=s+a,t[2]=A+a;break;case 3:t[0]=a,t[1]=A+a,t[2]=s+a;break;case 4:t[0]=A+a,t[1]=a,t[2]=s+a;break;case 5:case 6:t[0]=s+a,t[1]=a,t[2]=A+a;break}}function H_(n){return n<=.03928?n/12.92:((n+.055)/1.055)**2.4}function K_(n,t,e){xE(n,e),e.map(H_);const r=.2126*e[0]+.7152*e[1]+.0722*e[2];xE(t,e),e.map(H_);const i=.2126*e[0]+.7152*e[1]+.0722*e[2];return r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)}const V_=new Map;function rP(n,t){const e=n[0]+n[1]*256+n[2]*65536+t[0]*16777216+t[1]*4294967296+t[2]*1099511627776;let r=V_.get(e);if(r)return r;const i=new Float32Array(9),s=i.subarray(0,3),A=i.subarray(3,6);R_(n,A);const a=i.subarray(6,9);R_(t,a);const o=a[2]<.5,l=o?12:4.5;if(A[2]=o?Math.sqrt(A[2]):1-Math.sqrt(1-A[2]),K_(A,a,s)<l){let h,u;o?(h=A[2],u=1):(h=0,u=A[2]);const d=.005;for(;u-h>d;){const f=A[2]=(h+u)/2;o===K_(A,a,s)<l?h=f:u=f}A[2]=o?u:h}return xE(A,s),r=Qt.makeHexColor(Math.round(s[0]*255),Math.round(s[1]*255),Math.round(s[2]*255)),V_.set(e,r),r}function f4({html:n,dir:t,className:e},r){const i=document.createDocumentFragment();if(typeof n=="string"){const s=document.createElement("p");s.dir=t||"auto";const A=n.split(/(?:\r\n?|\n)/);for(let a=0,o=A.length;a<o;++a){const l=A[a];s.append(document.createTextNode(l)),a<o-1&&s.append(document.createElement("br"))}i.append(s)}else u4.render({xfaHtml:n,div:i,intent:"richText"});i.firstElementChild.classList.add("richText",e),r.append(i)}function iP(n){const t=new Path2D;if(!n)return t;for(let e=0,r=n.length;e<r;)switch(n[e++]){case em.moveTo:t.moveTo(n[e++],n[e++]);break;case em.lineTo:t.lineTo(n[e++],n[e++]);break;case em.curveTo:t.bezierCurveTo(n[e++],n[e++],n[e++],n[e++],n[e++],n[e++]);break;case em.quadraticCurveTo:t.quadraticCurveTo(n[e++],n[e++],n[e++],n[e++]);break;case em.closePath:t.closePath();break;default:Me(`Unrecognized drawing path operator: ${n[e-1]}`);break}return t}var zc,Xc,KA,VA,Lv,qc,Gg,jg,Qv,rB,nP,On,sP,AP,gg,vm;const pl=class pl{constructor(t){T(this,On);T(this,zc,null);T(this,Xc,null);T(this,KA);T(this,VA,null);T(this,Lv,null);T(this,qc,null);T(this,Gg,null);T(this,jg,null);C(this,KA,t),c(pl,Qv)||C(pl,Qv,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const t=C(this,zc,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=c(this,KA)._uiManager._signal;e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("contextmenu",QA,{signal:e}),t.addEventListener("pointerdown",_(pl,rB,nP),{signal:e}));const r=C(this,VA,document.createElement("div"));r.className="buttons",t.append(r);const i=c(this,KA).toolbarPosition;if(i){const{style:s}=t,A=c(this,KA)._uiManager.direction==="ltr"?1-i[0]:i[0];s.insetInlineEnd=`${100*A}%`,s.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return c(this,zc)}hide(){var t;c(this,zc).classList.add("hidden"),(t=c(this,Xc))==null||t.hideDropdown()}show(){var t,e;c(this,zc).classList.remove("hidden"),(t=c(this,Lv))==null||t.shown(),(e=c(this,qc))==null||e.shown()}addDeleteButton(){const{editorType:t,_uiManager:e}=c(this,KA),r=document.createElement("button");r.classList.add("basic","deleteButton"),r.tabIndex=0,r.setAttribute("data-l10n-id",c(pl,Qv)[t]),_(this,On,gg).call(this,r)&&r.addEventListener("click",i=>{e.delete()},{signal:e._signal}),c(this,VA).append(r)}async addAltText(t){const e=await t.render();_(this,On,gg).call(this,e),c(this,VA).append(e,c(this,On,vm)),C(this,Lv,t)}addComment(t,e=null){if(c(this,qc))return;const r=t.renderForToolbar();if(!r)return;_(this,On,gg).call(this,r);const i=C(this,Gg,c(this,On,vm));e?(c(this,VA).insertBefore(r,e),c(this,VA).insertBefore(i,e)):c(this,VA).append(r,i),C(this,qc,t),t.toolbar=this}addColorPicker(t){if(c(this,Xc))return;C(this,Xc,t);const e=t.renderButton();_(this,On,gg).call(this,e),c(this,VA).append(e,c(this,On,vm))}async addEditSignatureButton(t){const e=C(this,jg,await t.renderEditButton(c(this,KA)));_(this,On,gg).call(this,e),c(this,VA).append(e,c(this,On,vm))}removeButton(t){var e,r;switch(t){case"comment":(e=c(this,qc))==null||e.removeToolbarCommentButton(),C(this,qc,null),(r=c(this,Gg))==null||r.remove(),C(this,Gg,null);break}}async addButton(t,e){switch(t){case"colorPicker":e&&this.addColorPicker(e);break;case"altText":e&&await this.addAltText(e);break;case"editSignature":e&&await this.addEditSignatureButton(e);break;case"delete":this.addDeleteButton();break;case"comment":e&&this.addComment(e);break}}async addButtonBefore(t,e,r){if(!e&&t==="comment")return;const i=c(this,VA).querySelector(r);i&&t==="comment"&&this.addComment(e,i)}updateEditSignatureButton(t){c(this,jg)&&(c(this,jg).title=t)}remove(){var t;c(this,zc).remove(),(t=c(this,Xc))==null||t.destroy(),C(this,Xc,null)}};zc=new WeakMap,Xc=new WeakMap,KA=new WeakMap,VA=new WeakMap,Lv=new WeakMap,qc=new WeakMap,Gg=new WeakMap,jg=new WeakMap,Qv=new WeakMap,rB=new WeakSet,nP=function(t){t.stopPropagation()},On=new WeakSet,sP=function(t){c(this,KA)._focusEventsAllowed=!1,Zr(t)},AP=function(t){c(this,KA)._focusEventsAllowed=!0,Zr(t)},gg=function(t){const e=c(this,KA)._uiManager._signal;return!(e instanceof AbortSignal)||e.aborted?!1:(t.addEventListener("focusin",_(this,On,sP).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",_(this,On,AP).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",QA,{signal:e}),!0)},vm=function(){const t=document.createElement("div");return t.className="divider",t},T(pl,rB),T(pl,Qv,null);let EE=pl;var Nv,Hu,yl,gc,aP,oP,SE;class zK{constructor(t){T(this,gc);T(this,Nv,null);T(this,Hu,null);T(this,yl);C(this,yl,t)}show(t,e,r){const[i,s]=_(this,gc,oP).call(this,e,r),{style:A}=c(this,Hu)||C(this,Hu,_(this,gc,aP).call(this));t.append(c(this,Hu)),A.insetInlineEnd=`${100*i}%`,A.top=`calc(${100*s}% + var(--editor-toolbar-vert-offset))`}hide(){c(this,Hu).remove()}}Nv=new WeakMap,Hu=new WeakMap,yl=new WeakMap,gc=new WeakSet,aP=function(){const t=C(this,Hu,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar");const e=c(this,yl)._signal;e instanceof AbortSignal&&!e.aborted&&t.addEventListener("contextmenu",QA,{signal:e});const r=C(this,Nv,document.createElement("div"));return r.className="buttons",t.append(r),c(this,yl).hasCommentManager()&&_(this,gc,SE).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{c(this,yl).commentSelection("floating_button")}),_(this,gc,SE).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{c(this,yl).highlightSelection("floating_button")}),t},oP=function(t,e){let r=0,i=0;for(const s of t){const A=s.y+s.height;if(A<r)continue;const a=s.x+(e?s.width:0);if(A>r){i=a,r=A;continue}e?a>i&&(i=a):a<i&&(i=a)}return[e?1-i:i,r]},SE=function(t,e,r,i){const s=document.createElement("button");s.classList.add("basic",t),s.tabIndex=0,s.setAttribute("data-l10n-id",e);const A=document.createElement("span");s.append(A),A.className="visuallyHidden",A.setAttribute("data-l10n-id",r);const a=c(this,yl)._signal;a instanceof AbortSignal&&!a.aborted&&(s.addEventListener("contextmenu",QA,{signal:a}),s.addEventListener("click",i,{signal:a})),c(this,Nv).append(s)};function lP(n,t,e){for(const r of e)t.addEventListener(r,n[r].bind(n))}var Ku,Vu,$g,Gu;const yr=class yr{static initializeAndAddPointerId(t){(c(yr,Vu)||C(yr,Vu,new Set)).add(t)}static setPointer(t,e){c(yr,Ku)||C(yr,Ku,e),c(yr,Gu)??C(yr,Gu,t)}static setTimeStamp(t){C(yr,$g,t)}static isSamePointerId(t){return c(yr,Ku)===t}static isSamePointerIdOrRemove(t){var e;return c(yr,Ku)===t?!0:((e=c(yr,Vu))==null||e.delete(t),!1)}static isSamePointerType(t){return c(yr,Gu)===t}static isInitializedAndDifferentPointerType(t){return c(yr,Gu)!==null&&!yr.isSamePointerType(t)}static isSameTimeStamp(t){return c(yr,$g)===t}static isUsingMultiplePointers(){var t;return((t=c(yr,Vu))==null?void 0:t.size)>=1}static clearPointerType(){C(yr,Gu,null)}static clearPointerIds(){C(yr,Ku,NaN),C(yr,Vu,null)}static clearTimeStamp(){C(yr,$g,NaN)}};Ku=new WeakMap,Vu=new WeakMap,$g=new WeakMap,Gu=new WeakMap,T(yr,Ku,NaN),T(yr,Vu,null),T(yr,$g,NaN),T(yr,Gu,null);let rs=yr;var iB;class XK{constructor(){T(this,iB,0)}get id(){return`${pv}${Hi(this,iB)._++}`}}iB=new WeakMap;var Wg,Pv,is,zg,_y;const yT=class yT{constructor(){T(this,zg);T(this,Wg,h4());T(this,Pv,0);T(this,is,null)}static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',r=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=t;const s=i.decode().then(()=>(r.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(r.getImageData(0,0,1,1).data.buffer)[0]===0));return Fe(this,"_isSVGFittingCanvas",s)}async getFromFile(t){const{lastModified:e,name:r,size:i,type:s}=t;return _(this,zg,_y).call(this,`${e}_${r}_${i}_${s}`,t)}async getFromUrl(t){return _(this,zg,_y).call(this,t,t)}async getFromBlob(t,e){const r=await e;return _(this,zg,_y).call(this,t,r)}async getFromId(t){c(this,is)||C(this,is,new Map);const e=c(this,is).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:r}=e;return delete e.blobPromise,this.getFromBlob(e.id,r)}return this.getFromUrl(e.url)}getFromCanvas(t,e){c(this,is)||C(this,is,new Map);let r=c(this,is).get(t);if(r!=null&&r.bitmap)return r.refCounter+=1,r;const i=new OffscreenCanvas(e.width,e.height);return i.getContext("2d").drawImage(e,0,0),r={bitmap:i.transferToImageBitmap(),id:`image_${c(this,Wg)}_${Hi(this,Pv)._++}`,refCounter:1,isSvg:!1},c(this,is).set(t,r),c(this,is).set(r.id,r),r}getSvgUrl(t){const e=c(this,is).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var i;c(this,is)||C(this,is,new Map);const e=c(this,is).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;const{bitmap:r}=e;if(!e.url&&!e.file){const s=new OffscreenCanvas(r.width,r.height);s.getContext("bitmaprenderer").transferFromImageBitmap(r),e.blobPromise=s.convertToBlob()}(i=r.close)==null||i.call(r),e.bitmap=null}isValidId(t){return t.startsWith(`image_${c(this,Wg)}_`)}};Wg=new WeakMap,Pv=new WeakMap,is=new WeakMap,zg=new WeakSet,_y=async function(t,e){c(this,is)||C(this,is,new Map);let r=c(this,is).get(t);if(r===null)return null;if(r!=null&&r.bitmap)return r.refCounter+=1,r;try{r||(r={bitmap:null,id:`image_${c(this,Wg)}_${Hi(this,Pv)._++}`,refCounter:0,isSvg:!1});let i;if(typeof e=="string"?(r.url=e,i=await OB(e,"blob")):e instanceof File?i=r.file=e:e instanceof Blob&&(i=e),i.type==="image/svg+xml"){const s=yT._isSVGFittingCanvas,A=new FileReader,a=new Image,o=new Promise((l,h)=>{a.onload=()=>{r.bitmap=a,r.isSvg=!0,l()},A.onload=async()=>{const u=r.svgUrl=A.result;a.src=await s?`${u}#svgView(preserveAspectRatio(none))`:u},a.onerror=A.onerror=h});A.readAsDataURL(i),await o}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){Me(i),r=null}return c(this,is).set(t,r),r&&c(this,is).set(r.id,r),r};let FE=yT;var Ti,Yc,Mv,ii;class qK{constructor(t=128){T(this,Ti,[]);T(this,Yc,!1);T(this,Mv);T(this,ii,-1);C(this,Mv,t)}add({cmd:t,undo:e,post:r,mustExec:i,type:s=NaN,overwriteIfSameType:A=!1,keepUndo:a=!1}){if(i&&t(),c(this,Yc))return;const o={cmd:t,undo:e,post:r,type:s};if(c(this,ii)===-1){c(this,Ti).length>0&&(c(this,Ti).length=0),C(this,ii,0),c(this,Ti).push(o);return}if(A&&c(this,Ti)[c(this,ii)].type===s){a&&(o.undo=c(this,Ti)[c(this,ii)].undo),c(this,Ti)[c(this,ii)]=o;return}const l=c(this,ii)+1;l===c(this,Mv)?c(this,Ti).splice(0,1):(C(this,ii,l),l<c(this,Ti).length&&c(this,Ti).splice(l)),c(this,Ti).push(o)}undo(){if(c(this,ii)===-1)return;C(this,Yc,!0);const{undo:t,post:e}=c(this,Ti)[c(this,ii)];t(),e==null||e(),C(this,Yc,!1),C(this,ii,c(this,ii)-1)}redo(){if(c(this,ii)<c(this,Ti).length-1){C(this,ii,c(this,ii)+1),C(this,Yc,!0);const{cmd:t,post:e}=c(this,Ti)[c(this,ii)];t(),e==null||e(),C(this,Yc,!1)}}hasSomethingToUndo(){return c(this,ii)!==-1}hasSomethingToRedo(){return c(this,ii)<c(this,Ti).length-1}cleanType(t){if(c(this,ii)!==-1){for(let e=c(this,ii);e>=0;e--)if(c(this,Ti)[e].type!==t){c(this,Ti).splice(e+1,c(this,ii)-e),C(this,ii,e);return}c(this,Ti).length=0,C(this,ii,-1)}}destroy(){C(this,Ti,null)}}Ti=new WeakMap,Yc=new WeakMap,Mv=new WeakMap,ii=new WeakMap;var nB,cP;class xw{constructor(t){T(this,nB);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=Mi.platform;for(const[r,i,s={}]of t)for(const A of r){const a=A.startsWith("mac+");e&&a?(this.callbacks.set(A.slice(4),{callback:i,options:s}),this.allKeys.add(A.split("+").at(-1))):!e&&!a&&(this.callbacks.set(A,{callback:i,options:s}),this.allKeys.add(A.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const r=this.callbacks.get(_(this,nB,cP).call(this,e));if(!r)return;const{callback:i,options:{bubbles:s=!1,args:A=[],checker:a=null}}=r;a&&!a(t,e)||(i.bind(t,...A,e)(),s||Zr(e))}}nB=new WeakSet,cP=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e};const sB=class sB{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return $K(t),Fe(this,"_colors",t)}convert(t){const e=S0(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[r,i]of this._colors)if(i.every((s,A)=>s===e[A]))return sB._colorsMapping.get(r);return e}getHexCode(t){const e=this._colors.get(t);return e?Qt.makeHexColor(...e):t}};ct(sB,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let TE=sB;var Xg,lA,qg,fi,ni,Yg,Jg,ys,Zg,GA,hn,Jc,Zc,th,eh,go,jA,ju,kv,Ov,tp,Dv,po,rh,ep,ih,mo,AB,bl,rp,Rv,nh,$u,ip,sh,Hv,ji,pr,Bl,Ah,ah,Kv,np,Vv,oh,vo,Cl,Gv,jv,$A,Dt,Uy,IE,hP,uP,fP,wm,dP,gP,pP,_E,mP,vP,wP,yP,ms,dl,bP,BP,UE,CP,ym,LE;const Qg=class Qg{constructor(t,e,r,i,s,A,a,o,l,h,u,d,f,p,m,y){T(this,Dt);T(this,Xg,new AbortController);T(this,lA,null);T(this,qg,null);T(this,fi,new Map);T(this,ni,new Map);T(this,Yg,null);T(this,Jg,null);T(this,ys,null);T(this,Zg,null);T(this,GA,new qK);T(this,hn,null);T(this,Jc,null);T(this,Zc,null);T(this,th,0);T(this,eh,new Set);T(this,go,null);T(this,jA,null);T(this,ju,new Set);ct(this,"_editorUndoBar",null);T(this,kv,!1);T(this,Ov,!1);T(this,tp,!1);T(this,Dv,null);T(this,po,null);T(this,rh,null);T(this,ep,null);T(this,ih,!1);T(this,mo,null);T(this,AB,new XK);T(this,bl,!1);T(this,rp,!1);T(this,Rv,!1);T(this,nh,null);T(this,$u,null);T(this,ip,null);T(this,sh,null);T(this,Hv,null);T(this,ji,Ee.NONE);T(this,pr,new Set);T(this,Bl,null);T(this,Ah,null);T(this,ah,null);T(this,Kv,null);T(this,np,null);T(this,Vv,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});T(this,oh,[0,0]);T(this,vo,null);T(this,Cl,null);T(this,Gv,null);T(this,jv,null);T(this,$A,null);const w=this._signal=c(this,Xg).signal;C(this,Cl,t),C(this,Gv,e),C(this,jv,r),C(this,Jg,i),C(this,hn,s),C(this,Ah,A),C(this,np,o),this._eventBus=a,a._on("editingaction",this.onEditingAction.bind(this),{signal:w}),a._on("pagechanging",this.onPageChanging.bind(this),{signal:w}),a._on("scalechanging",this.onScaleChanging.bind(this),{signal:w}),a._on("rotationchanging",this.onRotationChanging.bind(this),{signal:w}),a._on("setpreference",this.onSetPreference.bind(this),{signal:w}),a._on("switchannotationeditorparams",B=>this.updateParams(B.type,B.value),{signal:w}),window.addEventListener("pointerdown",()=>{C(this,rp,!0)},{capture:!0,signal:w}),window.addEventListener("pointerup",()=>{C(this,rp,!1)},{capture:!0,signal:w}),window.addEventListener("beforeunload",_(this,Dt,hP).bind(this),{capture:!0,signal:w}),_(this,Dt,dP).call(this),_(this,Dt,yP).call(this),_(this,Dt,_E).call(this),C(this,ys,o.annotationStorage),C(this,Dv,o.filterFactory),C(this,ah,l),C(this,ep,h||null),C(this,kv,u),C(this,Ov,d),C(this,tp,f),C(this,Hv,p||null),this.viewParameters={realScale:hc.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=m||null,this._supportsPinchToZoom=y!==!1,s==null||s.setSidebarUiManager(this)}static get _keyboardManager(){const t=Qg.prototype,e=A=>c(A,Cl).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&A.hasSomethingToControl(),r=(A,{target:a})=>{if(a instanceof HTMLInputElement){const{type:o}=a;return o!=="text"&&o!=="number"}return!0},i=this.TRANSLATE_SMALL,s=this.TRANSLATE_BIG;return Fe(this,"_keyboardManager",new xw([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],t.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:r}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(A,{target:a})=>!(a instanceof HTMLButtonElement)&&c(A,Cl).contains(a)&&!A.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(A,{target:a})=>!(a instanceof HTMLButtonElement)&&c(A,Cl).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:e}]]))}destroy(){var t,e,r,i,s,A,a,o,l;(t=c(this,$A))==null||t.resolve(),C(this,$A,null),(e=c(this,Xg))==null||e.abort(),C(this,Xg,null),this._signal=null;for(const h of c(this,ni).values())h.destroy();c(this,ni).clear(),c(this,fi).clear(),c(this,ju).clear(),(r=c(this,sh))==null||r.clear(),C(this,lA,null),c(this,pr).clear(),c(this,GA).destroy(),(i=c(this,Jg))==null||i.destroy(),(s=c(this,hn))==null||s.destroy(),(A=c(this,Ah))==null||A.destroy(),(a=c(this,mo))==null||a.hide(),C(this,mo,null),(o=c(this,ip))==null||o.destroy(),C(this,ip,null),C(this,qg,null),c(this,po)&&(clearTimeout(c(this,po)),C(this,po,null)),c(this,vo)&&(clearTimeout(c(this,vo)),C(this,vo,null)),(l=this._editorUndoBar)==null||l.destroy(),C(this,np,null)}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return c(this,Hv)}get useNewAltTextFlow(){return c(this,Ov)}get useNewAltTextWhenAddingImage(){return c(this,tp)}get hcmFilter(){return Fe(this,"hcmFilter",c(this,ah)?c(this,Dv).addHCMFilter(c(this,ah).foreground,c(this,ah).background):"none")}get direction(){return Fe(this,"direction",getComputedStyle(c(this,Cl)).direction)}get _highlightColors(){return Fe(this,"_highlightColors",c(this,ep)?new Map(c(this,ep).split(",").map(t=>(t=t.split("=").map(e=>e.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return Fe(this,"highlightColors",null);const e=new Map,r=!!c(this,ah);for(const[i,s]of t){const A=i.endsWith("_HCM");if(r&&A){e.set(i.replace("_HCM",""),s);continue}!r&&!A&&e.set(i,s)}return Fe(this,"highlightColors",e)}get highlightColorNames(){return Fe(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const e=this.highlightColorNames.get(t);return this._highlightColors.get(e)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),C(this,Zc,t)}setMainHighlightColorPicker(t){C(this,ip,t)}editAltText(t,e=!1){var r;(r=c(this,Jg))==null||r.editAltText(this,t,e)}hasCommentManager(){return!!c(this,hn)}editComment(t,e,r,i){var s;(s=c(this,hn))==null||s.showDialog(this,t,e,r,i)}selectComment(t,e){const r=c(this,ni).get(t),i=r==null?void 0:r.getEditorByUID(e);i==null||i.toggleComment(!0,!0)}updateComment(t){var e;(e=c(this,hn))==null||e.updateComment(t.getData())}updatePopupColor(t){var e;(e=c(this,hn))==null||e.updatePopupColor(t)}removeComment(t){var e;(e=c(this,hn))==null||e.removeComments([t.uid])}deleteComment(t,e){const r=()=>{t.comment=e},i=()=>{var s;(s=this._editorUndoBar)==null||s.show(r,"comment"),this.toggleComment(null),t.comment=null};this.addCommands({cmd:i,undo:r,mustExec:!0})}toggleComment(t,e,r=void 0){var i;(i=c(this,hn))==null||i.toggleCommentPopup(t,e,r)}makeCommentColor(t,e){var r;return t&&((r=c(this,hn))==null?void 0:r.makeCommentColor(t,e))||null}getCommentDialogElement(){var t;return((t=c(this,hn))==null?void 0:t.dialogElement)||null}async waitForEditorsRendered(t){if(c(this,ni).has(t-1))return;const{resolve:e,promise:r}=Promise.withResolvers(),i=s=>{s.pageNumber===t&&(this._eventBus._off("editorsrendered",i),e())};this._eventBus.on("editorsrendered",i),await r}getSignature(t){var e;(e=c(this,Ah))==null||e.getSignature({uiManager:this,editor:t})}get signatureManager(){return c(this,Ah)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":C(this,tp,e);break}}onPageChanging({pageNumber:t}){C(this,th,t-1)}deletePage(t){for(const e of this.getEditors(t))e.remove();c(this,ni).delete(t),c(this,th)===t&&C(this,th,0)}focusMainContainer(){c(this,Cl).focus()}findParent(t,e){for(const r of c(this,ni).values()){const{x:i,y:s,width:A,height:a}=r.div.getBoundingClientRect();if(t>=i&&t<=i+A&&e>=s&&e<=s+a)return r}return null}disableUserSelect(t=!1){c(this,Gv).classList.toggle("noUserSelect",t)}addShouldRescale(t){c(this,ju).add(t)}removeShouldRescale(t){c(this,ju).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*hc.PDF_TO_CSS_UNITS;for(const r of c(this,ju))r.onScaleChanging();(e=c(this,Zc))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t="",e=!1){const r=document.getSelection();if(!r||r.isCollapsed)return;const{anchorNode:i,anchorOffset:s,focusNode:A,focusOffset:a}=r,o=r.toString(),h=_(this,Dt,Uy).call(this,r).closest(".textLayer"),u=this.getSelectionBoxes(h);if(!u)return;r.empty();const d=_(this,Dt,IE).call(this,h),f=c(this,ji)===Ee.NONE,p=()=>{const m=d==null?void 0:d.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:u,anchorNode:i,anchorOffset:s,focusNode:A,focusOffset:a,text:o});f&&this.showAllEditors("highlight",!0,!0),e&&(m==null||m.editComment())};if(f){this.switchToMode(Ee.HIGHLIGHT,p);return}p()}commentSelection(t=""){this.highlightSelection(t,!0)}getAndRemoveDataFromAnnotationStorage(t){if(!c(this,ys))return null;const e=`${pv}${t}`,r=c(this,ys).getRawValue(e);return r&&c(this,ys).remove(e),r}addToAnnotationStorage(t){!t.isEmpty()&&c(this,ys)&&!c(this,ys).has(t.id)&&c(this,ys).setValue(t.id,t)}a11yAlert(t,e=null){const r=c(this,jv);r&&(r.setAttribute("data-l10n-id",t),e?r.setAttribute("data-l10n-args",JSON.stringify(e)):r.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,c(this,ih)&&(C(this,ih,!1),_(this,Dt,wm).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of c(this,pr))if(e.div.contains(t)){C(this,$u,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!c(this,$u))return;const[t,e]=c(this,$u);C(this,$u,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){_(this,Dt,_E).call(this),this.setEditingState(!0)}removeEditListeners(){_(this,Dt,mP).call(this),this.setEditingState(!1)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const r of c(this,jA))if(r.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const r of c(this,jA))if(r.isHandlingMimeForPasting(e.type)){r.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var r;if(t.preventDefault(),(r=c(this,lA))==null||r.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of c(this,pr)){const s=i.serialize(!0);s&&e.push(s)}e.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:e}=t;for(const s of e.items)for(const A of c(this,jA))if(A.isHandlingMimeForPasting(s.type)){A.paste(s,this.currentLayer);return}let r=e.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(s){Me(`paste: "${s.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();const i=this.currentLayer;try{const s=[];for(const o of r){const l=await i.deserialize(o);if(!l)return;s.push(l)}const A=()=>{for(const o of s)_(this,Dt,UE).call(this,o);_(this,Dt,LE).call(this,s)},a=()=>{for(const o of s)o.remove()};this.addCommands({cmd:A,undo:a,mustExec:!0})}catch(s){Me(`paste: "${s.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),c(this,ji)!==Ee.NONE&&!this.isEditorHandlingKeyboard&&Qg._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,c(this,ih)&&(C(this,ih,!1),_(this,Dt,wm).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}updatePageIndex(t,e){for(const i of this.getEditors(t))i.pageIndex=e;const r=c(this,Yg).get(t);r&&(r.pageIndex=e,c(this,ni).set(e,r),c(this,bl)?r.enable():r.disable())}startUpdatePages(){C(this,Yg,new Map(c(this,ni))),c(this,ni).clear()}endUpdatePages(){C(this,Yg,null)}clonePage(t,e){for(const r of this.getEditors(t)){const i=r.serialize(r.mode!==Ee.HIGHLIGHT);i&&(i.pageIndex=e,i.id=this.getId(),i.isClone=!0,delete i.popupRef,c(this,ys).setValue(i.id,i))}}findClonesForPage(t){const e=[],{pageIndex:r}=t;for(const[i,s]of c(this,ys))s.pageIndex===r&&s.isClone&&(c(this,ys).remove(i),e.push(t.deserialize(s).then(A=>{A&&(A.isClone=!0,t.addOrRebuild(A))})));return Promise.all(e)}setEditingState(t){t?(_(this,Dt,gP).call(this),_(this,Dt,vP).call(this),_(this,Dt,ms).call(this,{isEditing:c(this,ji)!==Ee.NONE,isEmpty:_(this,Dt,ym).call(this),hasSomethingToUndo:c(this,GA).hasSomethingToUndo(),hasSomethingToRedo:c(this,GA).hasSomethingToRedo(),hasSelectedEditor:!1})):(_(this,Dt,pP).call(this),_(this,Dt,wP).call(this),_(this,Dt,ms).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!c(this,jA)){C(this,jA,t);for(const e of c(this,jA))_(this,Dt,dl).call(this,e.defaultPropertiesToUpdate)}}getId(){return c(this,AB).id}get currentLayer(){return c(this,ni).get(c(this,th))}getLayer(t){return c(this,ni).get(t)}get currentPageIndex(){return c(this,th)}addLayer(t){c(this,ni).set(t.pageIndex,t),c(this,bl)?t.enable():t.disable()}removeLayer(t){c(this,ni).delete(t.pageIndex)}async updateMode(t,e=null,r=!1,i=!1,s=!1,A=!1){var a,o,l,h,u,d;if(c(this,ji)!==t&&!(c(this,$A)&&(await c(this,$A).promise,!c(this,$A)))){if(C(this,$A,Promise.withResolvers()),(a=c(this,Zc))==null||a.commitOrRemove(),c(this,ji)===Ee.POPUP&&((o=c(this,hn))==null||o.hideSidebar()),(l=c(this,hn))==null||l.destroyPopup(),C(this,ji,t),t===Ee.NONE){this.setEditingState(!1),_(this,Dt,BP).call(this);for(const f of c(this,fi).values())f.hideStandaloneCommentButton();(h=this._editorUndoBar)==null||h.hide(),this.toggleComment(null),c(this,$A).resolve();return}for(const f of c(this,fi).values())f.addStandaloneCommentButton();t===Ee.SIGNATURE&&await((u=c(this,Ah))==null?void 0:u.loadSignatures()),r&&rs.clearPointerType(),this.setEditingState(!0),await _(this,Dt,bP).call(this),this.unselectAll();for(const f of c(this,ni).values())f.updateMode(t);if(t===Ee.POPUP){c(this,qg)||C(this,qg,await c(this,np).getAnnotationsByType(new Set(c(this,jA).map(m=>m._editorType))));const f=new Set,p=[];for(const m of c(this,fi).values()){const{annotationElementId:y,hasComment:w,deleted:B}=m;y&&f.add(y),w&&!B&&p.push(m.getData())}for(const m of c(this,qg)){const{id:y,popupRef:w,contentsObj:B}=m;w&&(B!=null&&B.str)&&!f.has(y)&&!c(this,eh).has(y)&&p.push(m)}(d=c(this,hn))==null||d.showSidebar(p)}if(!e){i&&this.addNewEditorFromKeyboard(),c(this,$A).resolve();return}for(const f of c(this,fi).values())f.uid===e?(this.setSelected(f),A?f.editComment():s?f.enterInEditMode():f.focus()):f.unselect();c(this,$A).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==c(this,ji)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,e){if(c(this,jA)){switch(t){case Pe.CREATE:this.currentLayer.addNewEditor(e);return;case Pe.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(c(this,Kv)||C(this,Kv,new Map)).set(t,e),this.showAllEditors("highlight",e);break}if(this.hasSelection)for(const r of c(this,pr))r.updateParams(t,e);else for(const r of c(this,jA))r.updateDefaultParams(t,e)}}showAllEditors(t,e,r=!1){var s;for(const A of c(this,fi).values())A.editorType===t&&A.show(e);(((s=c(this,Kv))==null?void 0:s.get(Pe.HIGHLIGHT_SHOW_ALL))??!0)!==e&&_(this,Dt,dl).call(this,[[Pe.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(c(this,Rv)!==t){C(this,Rv,t);for(const e of c(this,ni).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}*getEditors(t){for(const e of c(this,fi).values())e.pageIndex===t&&(yield e)}getEditor(t){return c(this,fi).get(t)}addEditor(t){c(this,fi).set(t.id,t)}removeEditor(t){var e,r;t.div.contains(document.activeElement)&&(c(this,po)&&clearTimeout(c(this,po)),C(this,po,setTimeout(()=>{this.focusMainContainer(),C(this,po,null)},0))),c(this,fi).delete(t.id),t.annotationElementId&&((e=c(this,sh))==null||e.delete(t.annotationElementId)),this.unselect(t),(!t.annotationElementId||!c(this,eh).has(t.annotationElementId))&&((r=c(this,ys))==null||r.remove(t.id))}addDeletedAnnotationElement(t){c(this,eh).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return c(this,eh).has(t)}removeDeletedAnnotationElement(t){c(this,eh).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){c(this,lA)!==t&&(C(this,lA,t),t&&_(this,Dt,dl).call(this,t.propertiesToUpdate))}updateUI(t){c(this,Dt,CP)===t&&_(this,Dt,dl).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){_(this,Dt,dl).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(c(this,pr).has(t)){c(this,pr).delete(t),t.unselect(),_(this,Dt,ms).call(this,{hasSelectedEditor:this.hasSelection});return}c(this,pr).add(t),t.select(),_(this,Dt,dl).call(this,t.propertiesToUpdate),_(this,Dt,ms).call(this,{hasSelectedEditor:!0})}setSelected(t){var e,r;this.updateToolbar({mode:t.mode,editId:t.uid}),(e=c(this,Zc))==null||e.commitOrRemove();for(const i of c(this,pr))i!==t&&i.unselect();(r=c(this,hn))==null||r.destroyPopup(),c(this,pr).clear(),c(this,pr).add(t),t.select(),_(this,Dt,dl).call(this,t.propertiesToUpdate),_(this,Dt,ms).call(this,{hasSelectedEditor:!0})}isSelected(t){return c(this,pr).has(t)}get firstSelectedEditor(){return c(this,pr).values().next().value}unselect(t){t.unselect(),c(this,pr).delete(t),_(this,Dt,ms).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return c(this,pr).size!==0}get isEnterHandled(){return c(this,pr).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;c(this,GA).undo(),_(this,Dt,ms).call(this,{hasSomethingToUndo:c(this,GA).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_(this,Dt,ym).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){c(this,GA).redo(),_(this,Dt,ms).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:c(this,GA).hasSomethingToRedo(),isEmpty:_(this,Dt,ym).call(this)})}addCommands(t){c(this,GA).add(t),_(this,Dt,ms).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_(this,Dt,ym).call(this)})}cleanUndoStack(t){c(this,GA).cleanType(t)}delete(){var s;this.commitOrRemove();const t=(s=this.currentLayer)==null?void 0:s.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...c(this,pr)],r=()=>{var A;(A=this._editorUndoBar)==null||A.show(i,e.length===1?e[0].editorType:e.length);for(const a of e)a.remove()},i=()=>{for(const A of e)_(this,Dt,UE).call(this,A)};this.addCommands({cmd:r,undo:i,mustExec:!0})}commitOrRemove(){var t;(t=c(this,lA))==null||t.commitOrRemove()}hasSomethingToControl(){return c(this,lA)||this.hasSelection}selectAll(){for(const t of c(this,pr))t.commit();_(this,Dt,LE).call(this,c(this,fi).values())}unselectAll(){var t,e;if(!(c(this,lA)&&(c(this,lA).commitOrRemove(),c(this,ji)!==Ee.NONE))&&!((t=c(this,Zc))!=null&&t.commitOrRemove())&&((e=c(this,hn))==null||e.destroyPopup(),!!this.hasSelection)){for(const r of c(this,pr))r.unselect();c(this,pr).clear(),_(this,Dt,ms).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;c(this,oh)[0]+=t,c(this,oh)[1]+=e;const[i,s]=c(this,oh),A=[...c(this,pr)],a=1e3;c(this,vo)&&clearTimeout(c(this,vo)),C(this,vo,setTimeout(()=>{C(this,vo,null),c(this,oh)[0]=c(this,oh)[1]=0,this.addCommands({cmd:()=>{for(const o of A)c(this,fi).has(o.id)&&(o.translateInPage(i,s),o.translationDone())},undo:()=>{for(const o of A)c(this,fi).has(o.id)&&(o.translateInPage(-i,-s),o.translationDone())},mustExec:!1})},a));for(const o of A)o.translateInPage(t,e),o.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),C(this,go,new Map);for(const t of c(this,pr))c(this,go).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!c(this,go))return!1;this.disableUserSelect(!1);const t=c(this,go);C(this,go,null);let e=!1;for(const[{x:i,y:s,pageIndex:A},a]of t)a.newX=i,a.newY=s,a.newPageIndex=A,e||(e=i!==a.savedX||s!==a.savedY||A!==a.savedPageIndex);if(!e)return!1;const r=(i,s,A,a)=>{if(c(this,fi).has(i.id)){const o=c(this,ni).get(a);o?i._setParentAndPosition(o,s,A):(i.pageIndex=a,i.x=s,i.y=A)}};return this.addCommands({cmd:()=>{for(const[i,{newX:s,newY:A,newPageIndex:a}]of t)r(i,s,A,a)},undo:()=>{for(const[i,{savedX:s,savedY:A,savedPageIndex:a}]of t)r(i,s,A,a)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(c(this,go))for(const r of c(this,go).keys())r.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||c(this,pr).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return c(this,lA)===t}getActive(){return c(this,lA)}getMode(){return c(this,ji)}isEditingMode(){return c(this,ji)!==Ee.NONE}get imageManager(){return Fe(this,"imageManager",new FE)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let l=0,h=e.rangeCount;l<h;l++)if(!t.contains(e.getRangeAt(l).commonAncestorContainer))return null;const{x:r,y:i,width:s,height:A}=t.getBoundingClientRect();let a;switch(t.getAttribute("data-main-rotation")){case"90":a=(l,h,u,d)=>({x:(h-i)/A,y:1-(l+u-r)/s,width:d/A,height:u/s});break;case"180":a=(l,h,u,d)=>({x:1-(l+u-r)/s,y:1-(h+d-i)/A,width:u/s,height:d/A});break;case"270":a=(l,h,u,d)=>({x:1-(h+d-i)/A,y:(l-r)/s,width:d/A,height:u/s});break;default:a=(l,h,u,d)=>({x:(l-r)/s,y:(h-i)/A,width:u/s,height:d/A});break}const o=[];for(let l=0,h=e.rangeCount;l<h;l++){const u=e.getRangeAt(l);if(!u.collapsed)for(const{x:d,y:f,width:p,height:m}of u.getClientRects())p===0||m===0||o.push(a(d,f,p,m))}return o.length===0?null:o}addChangedExistingAnnotation({annotationElementId:t,id:e}){(c(this,Zg)||C(this,Zg,new Map)).set(t,e)}removeChangedExistingAnnotation({annotationElementId:t}){var e;(e=c(this,Zg))==null||e.delete(t)}renderAnnotationElement(t){var i;const e=(i=c(this,Zg))==null?void 0:i.get(t.data.id);if(!e)return;const r=c(this,ys).getRawValue(e);r&&(c(this,ji)===Ee.NONE&&!r.hasBeenModified||r.renderAnnotationElement(t))}setMissingCanvas(t,e,r){var s;const i=(s=c(this,sh))==null?void 0:s.get(t);i&&(i.setCanvas(e,r),c(this,sh).delete(t))}addMissingCanvas(t,e){(c(this,sh)||C(this,sh,new Map)).set(t,e)}};Xg=new WeakMap,lA=new WeakMap,qg=new WeakMap,fi=new WeakMap,ni=new WeakMap,Yg=new WeakMap,Jg=new WeakMap,ys=new WeakMap,Zg=new WeakMap,GA=new WeakMap,hn=new WeakMap,Jc=new WeakMap,Zc=new WeakMap,th=new WeakMap,eh=new WeakMap,go=new WeakMap,jA=new WeakMap,ju=new WeakMap,kv=new WeakMap,Ov=new WeakMap,tp=new WeakMap,Dv=new WeakMap,po=new WeakMap,rh=new WeakMap,ep=new WeakMap,ih=new WeakMap,mo=new WeakMap,AB=new WeakMap,bl=new WeakMap,rp=new WeakMap,Rv=new WeakMap,nh=new WeakMap,$u=new WeakMap,ip=new WeakMap,sh=new WeakMap,Hv=new WeakMap,ji=new WeakMap,pr=new WeakMap,Bl=new WeakMap,Ah=new WeakMap,ah=new WeakMap,Kv=new WeakMap,np=new WeakMap,Vv=new WeakMap,oh=new WeakMap,vo=new WeakMap,Cl=new WeakMap,Gv=new WeakMap,jv=new WeakMap,$A=new WeakMap,Dt=new WeakSet,Uy=function({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t},IE=function(t){const{currentLayer:e}=this;if(e.hasTextLayer(t))return e;for(const r of c(this,ni).values())if(r.hasTextLayer(t))return r;return null},hP=function(t){var e;this.commitOrRemove(),(e=this.currentLayer)==null||e.endDrawingSession(!1)},uP=function(){const t=document.getSelection();if(!t||t.isCollapsed)return;const r=_(this,Dt,Uy).call(this,t).closest(".textLayer"),i=this.getSelectionBoxes(r);i&&(c(this,mo)||C(this,mo,new zK(this)),c(this,mo).show(r,i,this.direction==="ltr"))},fP=function(){var s,A,a;const t=document.getSelection();if(!t||t.isCollapsed){c(this,Bl)&&((s=c(this,mo))==null||s.hide(),C(this,Bl,null),_(this,Dt,ms).call(this,{hasSelectedText:!1}));return}const{anchorNode:e}=t;if(e===c(this,Bl))return;const i=_(this,Dt,Uy).call(this,t).closest(".textLayer");if(!i){c(this,Bl)&&((A=c(this,mo))==null||A.hide(),C(this,Bl,null),_(this,Dt,ms).call(this,{hasSelectedText:!1}));return}if((a=c(this,mo))==null||a.hide(),C(this,Bl,e),_(this,Dt,ms).call(this,{hasSelectedText:!0}),!(c(this,ji)!==Ee.HIGHLIGHT&&c(this,ji)!==Ee.NONE)&&(c(this,ji)===Ee.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),C(this,ih,this.isShiftKeyDown),!this.isShiftKeyDown)){const o=c(this,ji)===Ee.HIGHLIGHT?_(this,Dt,IE).call(this,i):null;if(o==null||o.toggleDrawing(),c(this,rp)){const l=new AbortController,h=this.combinedSignal(l),u=d=>{d.type==="pointerup"&&d.button!==0||(l.abort(),o==null||o.toggleDrawing(!0),d.type==="pointerup"&&_(this,Dt,wm).call(this,"main_toolbar"))};window.addEventListener("pointerup",u,{signal:h}),window.addEventListener("blur",u,{signal:h})}else o==null||o.toggleDrawing(!0),_(this,Dt,wm).call(this,"main_toolbar")}},wm=function(t=""){c(this,ji)===Ee.HIGHLIGHT?this.highlightSelection(t):c(this,kv)&&_(this,Dt,uP).call(this)},dP=function(){document.addEventListener("selectionchange",_(this,Dt,fP).bind(this),{signal:this._signal})},gP=function(){if(c(this,rh))return;C(this,rh,new AbortController);const t=this.combinedSignal(c(this,rh));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})},pP=function(){var t;(t=c(this,rh))==null||t.abort(),C(this,rh,null)},_E=function(){if(c(this,nh))return;C(this,nh,new AbortController);const t=this.combinedSignal(c(this,nh));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})},mP=function(){var t;(t=c(this,nh))==null||t.abort(),C(this,nh,null)},vP=function(){if(c(this,Jc))return;C(this,Jc,new AbortController);const t=this.combinedSignal(c(this,Jc));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})},wP=function(){var t;(t=c(this,Jc))==null||t.abort(),C(this,Jc,null)},yP=function(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})},ms=function(t){Object.entries(t).some(([r,i])=>c(this,Vv)[r]!==i)&&(this._eventBus.dispatch("editingstateschanged",{source:this,details:Object.assign(c(this,Vv),t)}),c(this,ji)===Ee.HIGHLIGHT&&t.hasSelectedEditor===!1&&_(this,Dt,dl).call(this,[[Pe.HIGHLIGHT_FREE,!0]]))},dl=function(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})},bP=async function(){if(!c(this,bl)){C(this,bl,!0);const t=[];for(const e of c(this,ni).values())t.push(e.enable());await Promise.all(t);for(const e of c(this,fi).values())e.enable()}},BP=function(){if(this.unselectAll(),c(this,bl)){C(this,bl,!1);for(const t of c(this,ni).values())t.disable();for(const t of c(this,fi).values())t.disable()}},UE=function(t){const e=c(this,ni).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))},CP=function(){let t=null;for(t of c(this,pr));return t},ym=function(){if(c(this,fi).size===0)return!0;if(c(this,fi).size===1)for(const t of c(this,fi).values())return t.isEmpty();return!1},LE=function(t){for(const e of c(this,pr))e.unselect();c(this,pr).clear();for(const e of t)e.isEmpty()||(c(this,pr).add(e),e.select());_(this,Dt,ms).call(this,{hasSelectedEditor:this.hasSelection})},ct(Qg,"TRANSLATE_SMALL",1),ct(Qg,"TRANSLATE_BIG",10);let qh=Qg;var un,wo,Ca,sp,yo,cA,Ap,bo,Rs,xl,Wu,Bo,lh,Ra,bm,Ly;const ws=class ws{constructor(t){T(this,Ra);T(this,un,null);T(this,wo,!1);T(this,Ca,null);T(this,sp,null);T(this,yo,null);T(this,cA,null);T(this,Ap,!1);T(this,bo,null);T(this,Rs,null);T(this,xl,null);T(this,Wu,null);T(this,Bo,!1);C(this,Rs,t),C(this,Bo,t._uiManager.useNewAltTextFlow),c(ws,lh)||C(ws,lh,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){ws._l10n??(ws._l10n=t)}async render(){const t=C(this,Ca,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=C(this,sp,document.createElement("span"));t.append(e),c(this,Bo)?(t.classList.add("new"),t.setAttribute("data-l10n-id",c(ws,lh).missing),e.setAttribute("data-l10n-id",c(ws,lh)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const r=c(this,Rs)._uiManager._signal;t.addEventListener("contextmenu",QA,{signal:r}),t.addEventListener("pointerdown",s=>s.stopPropagation(),{signal:r});const i=s=>{s.preventDefault(),c(this,Rs)._uiManager.editAltText(c(this,Rs)),c(this,Bo)&&c(this,Rs)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:c(this,Ra,bm)}})};return t.addEventListener("click",i,{capture:!0,signal:r}),t.addEventListener("keydown",s=>{s.target===t&&s.key==="Enter"&&(C(this,Ap,!0),i(s))},{signal:r}),await _(this,Ra,Ly).call(this),t}finish(){c(this,Ca)&&(c(this,Ca).focus({focusVisible:c(this,Ap)}),C(this,Ap,!1))}isEmpty(){return c(this,Bo)?c(this,un)===null:!c(this,un)&&!c(this,wo)}hasData(){return c(this,Bo)?c(this,un)!==null||!!c(this,xl):this.isEmpty()}get guessedText(){return c(this,xl)}async setGuessedText(t){c(this,un)===null&&(C(this,xl,t),C(this,Wu,await ws._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),_(this,Ra,Ly).call(this))}toggleAltTextBadge(t=!1){var e;if(!c(this,Bo)||c(this,un)){(e=c(this,bo))==null||e.remove(),C(this,bo,null);return}if(!c(this,bo)){const r=C(this,bo,document.createElement("div"));r.className="noAltTextBadge",c(this,Rs).div.append(r)}c(this,bo).classList.toggle("hidden",!t)}serialize(t){let e=c(this,un);return!t&&c(this,xl)===e&&(e=c(this,Wu)),{altText:e,decorative:c(this,wo),guessedText:c(this,xl),textWithDisclaimer:c(this,Wu)}}get data(){return{altText:c(this,un),decorative:c(this,wo)}}set data({altText:t,decorative:e,guessedText:r,textWithDisclaimer:i,cancel:s=!1}){r&&(C(this,xl,r),C(this,Wu,i)),!(c(this,un)===t&&c(this,wo)===e)&&(s||(C(this,un,t),C(this,wo,e)),_(this,Ra,Ly).call(this))}toggle(t=!1){c(this,Ca)&&(!t&&c(this,cA)&&(clearTimeout(c(this,cA)),C(this,cA,null)),c(this,Ca).disabled=!t)}shown(){c(this,Rs)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:c(this,Ra,bm)}})}destroy(){var t,e;(t=c(this,Ca))==null||t.remove(),C(this,Ca,null),C(this,sp,null),C(this,yo,null),(e=c(this,bo))==null||e.remove(),C(this,bo,null)}};un=new WeakMap,wo=new WeakMap,Ca=new WeakMap,sp=new WeakMap,yo=new WeakMap,cA=new WeakMap,Ap=new WeakMap,bo=new WeakMap,Rs=new WeakMap,xl=new WeakMap,Wu=new WeakMap,Bo=new WeakMap,lh=new WeakMap,Ra=new WeakSet,bm=function(){return c(this,un)&&"added"||c(this,un)===null&&this.guessedText&&"review"||"missing"},Ly=async function(){var i,s,A;const t=c(this,Ca);if(!t)return;if(c(this,Bo)){if(t.classList.toggle("done",!!c(this,un)),t.setAttribute("data-l10n-id",c(ws,lh)[c(this,Ra,bm)]),(i=c(this,sp))==null||i.setAttribute("data-l10n-id",c(ws,lh)[`${c(this,Ra,bm)}-label`]),!c(this,un)){(s=c(this,yo))==null||s.remove();return}}else{if(!c(this,un)&&!c(this,wo)){t.classList.remove("done"),(A=c(this,yo))==null||A.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=c(this,yo);if(!e){C(this,yo,e=document.createElement("span")),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${c(this,Rs).id}`;const a=100,o=c(this,Rs)._uiManager._signal;o.addEventListener("abort",()=>{clearTimeout(c(this,cA)),C(this,cA,null)},{once:!0}),t.addEventListener("mouseenter",()=>{C(this,cA,setTimeout(()=>{C(this,cA,null),c(this,yo).classList.add("show"),c(this,Rs)._reportTelemetry({action:"alt_text_tooltip"})},a))},{signal:o}),t.addEventListener("mouseleave",()=>{var l;c(this,cA)&&(clearTimeout(c(this,cA)),C(this,cA,null)),(l=c(this,yo))==null||l.classList.remove("show")},{signal:o})}c(this,wo)?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=c(this,un)),e.parentNode||t.append(e);const r=c(this,Rs).getElementForAltText();r==null||r.setAttribute("aria-describedby",e.id)},T(ws,lh,null),ct(ws,"_l10n",null);let _b=ws;var Tn,WA,zu,kr,$v,ch,zA,hh,uh,Xu,Wv,QE;class C2{constructor(t){T(this,Wv);T(this,Tn,null);T(this,WA,null);T(this,zu,!1);T(this,kr,null);T(this,$v,null);T(this,ch,null);T(this,zA,null);T(this,hh,null);T(this,uh,!1);T(this,Xu,null);C(this,kr,t)}renderForToolbar(){const t=C(this,WA,document.createElement("button"));return t.className="comment",_(this,Wv,QE).call(this,t,!1)}renderForStandalone(){const t=C(this,Tn,document.createElement("button"));t.className="annotationCommentButton";const e=c(this,kr).commentButtonPosition;if(e){const{style:r}=t;r.insetInlineEnd=`calc(${100*(c(this,kr)._uiManager.direction==="ltr"?1-e[0]:e[0])}% - var(--comment-button-dim))`,r.top=`calc(${100*e[1]}% - var(--comment-button-dim))`;const i=c(this,kr).commentButtonColor;i&&(r.backgroundColor=i)}return _(this,Wv,QE).call(this,t,!0)}focusButton(){setTimeout(()=>{var t;(t=c(this,Tn)??c(this,WA))==null||t.focus()},0)}onUpdatedColor(){if(!c(this,Tn))return;const t=c(this,kr).commentButtonColor;t&&(c(this,Tn).style.backgroundColor=t),c(this,kr)._uiManager.updatePopupColor(c(this,kr))}get commentButtonWidth(){var t;return(((t=c(this,Tn))==null?void 0:t.getBoundingClientRect().width)??0)/c(this,kr).parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(c(this,Xu))return c(this,Xu);if(!c(this,Tn))return null;const{x:t,y:e,height:r}=c(this,Tn).getBoundingClientRect(),{x:i,y:s,width:A,height:a}=c(this,kr).parent.boundingClientRect;return[(t-i)/A,(e+r-s)/a]}set commentPopupPositionInLayer(t){C(this,Xu,t)}hasDefaultPopupPosition(){return c(this,Xu)===null}removeStandaloneCommentButton(){var t;(t=c(this,Tn))==null||t.remove(),C(this,Tn,null)}removeToolbarCommentButton(){var t;(t=c(this,WA))==null||t.remove(),C(this,WA,null)}setCommentButtonStates({selected:t,hasPopup:e}){c(this,Tn)&&(c(this,Tn).classList.toggle("selected",t),c(this,Tn).ariaExpanded=e)}edit(t){const e=this.commentPopupPositionInLayer;let r,i;if(e)[r,i]=e;else{[r,i]=c(this,kr).commentButtonPosition;const{width:h,height:u,x:d,y:f}=c(this,kr);r=d+r*h,i=f+i*u}const s=c(this,kr).parent.boundingClientRect,{x:A,y:a,width:o,height:l}=s;c(this,kr)._uiManager.editComment(c(this,kr),A+r*o,a+i*l,{...t,parentDimensions:s})}finish(){c(this,WA)&&(c(this,WA).focus({focusVisible:c(this,zu)}),C(this,zu,!1))}isDeleted(){return c(this,uh)||c(this,zA)===""}isEmpty(){return c(this,zA)===null}hasBeenEdited(){return this.isDeleted()||c(this,zA)!==c(this,$v)}serialize(){return this.data}get data(){return{text:c(this,zA),richText:c(this,ch),date:c(this,hh),deleted:this.isDeleted()}}set data(t){if(t!==c(this,zA)&&C(this,ch,null),t===null){C(this,zA,""),C(this,uh,!0);return}C(this,zA,t),C(this,hh,new Date),C(this,uh,!1)}restoreData({text:t,richText:e,date:r}){C(this,zA,t),C(this,ch,e),C(this,hh,r),C(this,uh,!1)}setInitialText(t,e=null){C(this,$v,t),this.data=t,C(this,hh,null),C(this,ch,e)}shown(){}destroy(){var t,e;(t=c(this,WA))==null||t.remove(),C(this,WA,null),(e=c(this,Tn))==null||e.remove(),C(this,Tn,null),C(this,zA,""),C(this,ch,null),C(this,hh,null),C(this,kr,null),C(this,zu,!1),C(this,uh,!1)}}Tn=new WeakMap,WA=new WeakMap,zu=new WeakMap,kr=new WeakMap,$v=new WeakMap,ch=new WeakMap,zA=new WeakMap,hh=new WeakMap,uh=new WeakMap,Xu=new WeakMap,Wv=new WeakSet,QE=function(t,e){if(!c(this,kr)._uiManager.hasCommentManager())return null;t.tabIndex="0",t.ariaHasPopup="dialog",e?(t.ariaControls="commentPopup",t.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(t.ariaControlsElements=[c(this,kr)._uiManager.getCommentDialogElement()],t.setAttribute("data-l10n-id","pdfjs-editor-add-comment-button"));const r=c(this,kr)._uiManager._signal;if(!(r instanceof AbortSignal)||r.aborted)return t;t.addEventListener("contextmenu",QA,{signal:r}),e&&(t.addEventListener("focusin",s=>{c(this,kr)._focusEventsAllowed=!1,Zr(s)},{capture:!0,signal:r}),t.addEventListener("focusout",s=>{c(this,kr)._focusEventsAllowed=!0,Zr(s)},{capture:!0,signal:r})),t.addEventListener("pointerdown",s=>s.stopPropagation(),{signal:r});const i=s=>{s.preventDefault(),t===c(this,WA)?this.edit():c(this,kr).toggleComment(!0)};return t.addEventListener("click",i,{capture:!0,signal:r}),t.addEventListener("keydown",s=>{s.target===t&&s.key==="Enter"&&(C(this,zu,!0),i(s))},{signal:r}),t.addEventListener("pointerenter",()=>{c(this,kr).toggleComment(!1,!0)},{signal:r}),t.addEventListener("pointerleave",()=>{c(this,kr).toggleComment(!1,!1)},{signal:r}),t};var ap,qu,zv,Xv,qv,Yv,Jv,El,Yu,Sl,Ju,Fl,tu,xP,EP,SP;const bT=class bT{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:r=null,onPinchStart:i=null,onPinching:s=null,onPinchEnd:A=null,signal:a}){T(this,tu);T(this,ap);T(this,qu,!1);T(this,zv,null);T(this,Xv);T(this,qv);T(this,Yv);T(this,Jv);T(this,El,null);T(this,Yu);T(this,Sl,null);T(this,Ju);T(this,Fl,null);C(this,ap,t),C(this,zv,r),C(this,Xv,e),C(this,qv,i),C(this,Yv,s),C(this,Jv,A),C(this,Ju,new AbortController),C(this,Yu,AbortSignal.any([a,c(this,Ju).signal])),t.addEventListener("touchstart",_(this,tu,xP).bind(this),{passive:!1,signal:c(this,Yu)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Ga.pixelRatio}destroy(){var t,e;(t=c(this,Ju))==null||t.abort(),C(this,Ju,null),(e=c(this,El))==null||e.abort(),C(this,El,null)}};ap=new WeakMap,qu=new WeakMap,zv=new WeakMap,Xv=new WeakMap,qv=new WeakMap,Yv=new WeakMap,Jv=new WeakMap,El=new WeakMap,Yu=new WeakMap,Sl=new WeakMap,Ju=new WeakMap,Fl=new WeakMap,tu=new WeakSet,xP=function(t){var i,s,A;if((i=c(this,Xv))!=null&&i.call(this))return;if(t.touches.length===1){if(c(this,El))return;const a=C(this,El,new AbortController),o=AbortSignal.any([c(this,Yu),a.signal]),l=c(this,ap),h={capture:!0,signal:o,passive:!1},u=d=>{var f;d.pointerType==="touch"&&((f=c(this,El))==null||f.abort(),C(this,El,null))};l.addEventListener("pointerdown",d=>{d.pointerType==="touch"&&(Zr(d),u(d))},h),l.addEventListener("pointerup",u,h),l.addEventListener("pointercancel",u,h);return}if(!c(this,Fl)){C(this,Fl,new AbortController);const a=AbortSignal.any([c(this,Yu),c(this,Fl).signal]),o=c(this,ap),l={signal:a,capture:!1,passive:!1};o.addEventListener("touchmove",_(this,tu,EP).bind(this),l);const h=_(this,tu,SP).bind(this);o.addEventListener("touchend",h,l),o.addEventListener("touchcancel",h,l),l.capture=!0,o.addEventListener("pointerdown",Zr,l),o.addEventListener("pointermove",Zr,l),o.addEventListener("pointercancel",Zr,l),o.addEventListener("pointerup",Zr,l),(s=c(this,qv))==null||s.call(this)}if(Zr(t),t.touches.length!==2||(A=c(this,zv))!=null&&A.call(this)){C(this,Sl,null);return}let[e,r]=t.touches;e.identifier>r.identifier&&([e,r]=[r,e]),C(this,Sl,{touch0X:e.screenX,touch0Y:e.screenY,touch1X:r.screenX,touch1Y:r.screenY})},EP=function(t){var S;if(!c(this,Sl)||t.touches.length!==2)return;Zr(t);let[e,r]=t.touches;e.identifier>r.identifier&&([e,r]=[r,e]);const{screenX:i,screenY:s}=e,{screenX:A,screenY:a}=r,o=c(this,Sl),{touch0X:l,touch0Y:h,touch1X:u,touch1Y:d}=o,f=u-l,p=d-h,m=A-i,y=a-s,w=Math.hypot(m,y)||1,B=Math.hypot(f,p)||1;if(!c(this,qu)&&Math.abs(B-w)<=bT.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(o.touch0X=i,o.touch0Y=s,o.touch1X=A,o.touch1Y=a,!c(this,qu)){C(this,qu,!0);return}const E=[(i+A)/2,(s+a)/2];(S=c(this,Yv))==null||S.call(this,E,B,w)},SP=function(t){var e;t.touches.length>=2||(c(this,Fl)&&(c(this,Fl).abort(),C(this,Fl,null),(e=c(this,Jv))==null||e.call(this)),c(this,Sl)&&(Zr(t),C(this,Sl,null),C(this,qu,!1)))};let yv=bT;var Zu,xa,Yr,mr,Tl,op,fh,Zv,In,tf,Il,XA,dh,t1,ef,hA,e1,rf,_l,Co,lp,cp,qA,nf,r1,aB,pe,NE,i1,PE,Qy,FP,TP,ME,Ny,kE,IP,_P,UP,OE,LP,DE,QP,NP,PP,RE,Bm;const Qe=class Qe{constructor(t){T(this,pe);T(this,Zu,null);T(this,xa,null);T(this,Yr,null);T(this,mr,null);T(this,Tl,null);T(this,op,!1);T(this,fh,null);T(this,Zv,"");T(this,In,null);T(this,tf,null);T(this,Il,null);T(this,XA,null);T(this,dh,null);T(this,t1,"");T(this,ef,!1);T(this,hA,null);T(this,e1,!1);T(this,rf,!1);T(this,_l,!1);T(this,Co,null);T(this,lp,0);T(this,cp,0);T(this,qA,null);T(this,nf,null);ct(this,"isSelected",!1);ct(this,"_isCopy",!1);ct(this,"_editToolbar",null);ct(this,"_initialOptions",Object.create(null));ct(this,"_initialData",null);ct(this,"_isVisible",!0);ct(this,"_uiManager",null);ct(this,"_focusEventsAllowed",!0);T(this,r1,!1);T(this,aB,Qe._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null,this.creationDate=t.creationDate||new Date,this.modificationDate=t.modificationDate||null,this.canAddComment=!0;const{rotation:e,rawDims:{pageWidth:r,pageHeight:i,pageX:s,pageY:A}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[s,A];const[a,o]=this.parentDimensions;this.x=t.x/a,this.y=t.y/o,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=Qe.prototype._resizeWithKeyboard,e=qh.TRANSLATE_SMALL,r=qh.TRANSLATE_BIG;return Fe(this,"_resizerKeyboardManager",new xw([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,r]}],[["Escape","mac+Escape"],Qe.prototype._stopResizingWithKeyboard]]))}updatePageIndex(t){this.pageIndex=t}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return Fe(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new YK({id:t._uiManager.getId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){if(Qe._l10n??(Qe._l10n=t),Qe._l10nResizer||(Qe._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),Qe._borderLineWidth!==-1)return;const r=getComputedStyle(document.documentElement);Qe._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){hr("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return c(this,r1)}set _isDraggable(t){var e;C(this,r1,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=c(this,aB)}setParent(t){var e;t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):(_(this,pe,Bm).call(this),(e=c(this,XA))==null||e.remove(),C(this,XA,null)),this.parent=t}focusin(t){this._focusEventsAllowed&&(c(this,ef)?C(this,ef,!1):this.parent.setSelected(this))}focusout(t){var r;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(r=this.parent)!=null&&r.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,r,i){const[s,A]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(t+r)/s,this.y=(e+i)/A,this.fixAndSetPosition()}_moveAfterPaste(t,e){if(this.isClone){delete this.isClone;return}const[r,i]=this.parentDimensions;this.setAt(t*r,e*i,this.width*r,this.height*i),this._onTranslated()}translate(t,e){_(this,pe,NE).call(this,this.parentDimensions,t,e)}translateInPage(t,e){c(this,hA)||C(this,hA,[this.x,this.y,this.width,this.height]),_(this,pe,NE).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,e){c(this,hA)||C(this,hA,[this.x,this.y,this.width,this.height]);const{div:r,parentDimensions:[i,s]}=this;if(this.x+=t/i,this.y+=e/s,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:u,y:d}=this.div.getBoundingClientRect();this.parent.findNewParent(this,u,d)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:A,y:a}=this;const[o,l]=this.getBaseTranslation();A+=o,a+=l;const{style:h}=r;h.left=`${(100*A).toFixed(2)}%`,h.top=`${(100*a).toFixed(2)}%`,this._onTranslating(A,a),r.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!c(this,hA)&&(c(this,hA)[0]!==this.x||c(this,hA)[1]!==this.y)}get _hasBeenResized(){return!!c(this,hA)&&(c(this,hA)[2]!==this.width||c(this,hA)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:r}=Qe,i=r/t,s=r/e;switch(this.rotation){case 90:return[-i,s];case 180:return[i,s];case 270:return[i,-s];default:return[-i,-s]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[r,i]}=this;let{x:s,y:A,width:a,height:o}=this;if(a*=r,o*=i,s*=r,A*=i,this._mustFixPosition)switch(t){case 0:s=Wr(s,0,r-a),A=Wr(A,0,i-o);break;case 90:s=Wr(s,0,r-o),A=Wr(A,a,i);break;case 180:s=Wr(s,a,r),A=Wr(A,o,i);break;case 270:s=Wr(s,o,r),A=Wr(A,0,i-a);break}this.x=s/=r,this.y=A/=i;const[l,h]=this.getBaseTranslation();s+=l,A+=h,e.left=`${(100*s).toFixed(2)}%`,e.top=`${(100*A).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var r;return _(r=Qe,i1,PE).call(r,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var r;return _(r=Qe,i1,PE).call(r,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,r]}=this;return[e*t,r*t]}setDims(){const{div:{style:t},width:e,height:r}=this;t.width=`${(100*e).toFixed(2)}%`,t.height=`${(100*r).toFixed(2)}%`}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=c(this,Yr))==null||t.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||c(this,rf))return this._editToolbar;this._editToolbar=new EE(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[e,r]of t)await this._editToolbar.addButton(e,r);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){var t;(t=this._editToolbar)==null||t.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){var t;(t=this._editToolbar)==null||t.removeButton("comment")}removeEditToolbar(){var t,e;(t=this._editToolbar)==null||t.remove(),this._editToolbar=null,(e=c(this,Yr))==null||e.destroy()}addContainer(t){var r;const e=(r=this._editToolbar)==null?void 0:r.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return c(this,Yr)||(_b.initialize(Qe._l10n),C(this,Yr,new _b(this)),c(this,Zu)&&(c(this,Yr).data=c(this,Zu),C(this,Zu,null))),c(this,Yr)}get altTextData(){var t;return(t=c(this,Yr))==null?void 0:t.data}set altTextData(t){c(this,Yr)&&(c(this,Yr).data=t)}get guessedAltText(){var t;return(t=c(this,Yr))==null?void 0:t.guessedText}async setGuessedAltText(t){var e;await((e=c(this,Yr))==null?void 0:e.setGuessedText(t))}serializeAltText(t){var e;return(e=c(this,Yr))==null?void 0:e.serialize(t)}hasAltText(){return!!c(this,Yr)&&!c(this,Yr).isEmpty()}hasAltTextData(){var t;return((t=c(this,Yr))==null?void 0:t.hasData())??!1}focusCommentButton(){var t;(t=c(this,mr))==null||t.focusButton()}addCommentButton(){return this.canAddComment?c(this,mr)||C(this,mr,new C2(this)):null}addStandaloneCommentButton(){if(this._uiManager.hasCommentManager()){if(c(this,Tl)){this._uiManager.isEditingMode()&&c(this,Tl).classList.remove("hidden");return}this.hasComment&&(C(this,Tl,c(this,mr).renderForStandalone()),this.div.append(c(this,Tl)))}}removeStandaloneCommentButton(){c(this,mr).removeStandaloneCommentButton(),C(this,Tl,null)}hideStandaloneCommentButton(){var t;(t=c(this,Tl))==null||t.classList.add("hidden")}get comment(){if(!c(this,mr))return null;const{data:{richText:t,text:e,date:r,deleted:i}}=c(this,mr);return{text:e,richText:t,date:r,deleted:i,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(t){c(this,mr)||C(this,mr,new C2(this)),typeof t=="object"&&t!==null?c(this,mr).restoreData(t):c(this,mr).data=t,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:t,popupRef:e,richText:r}){if(!e||(c(this,mr)||C(this,mr,new C2(this)),c(this,mr).setInitialText(t,r),!this.annotationElementId))return;const i=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);i&&this.updateFromAnnotationLayer(i)}get hasEditedComment(){var t;return(t=c(this,mr))==null?void 0:t.hasBeenEdited()}get hasDeletedComment(){var t;return(t=c(this,mr))==null?void 0:t.isDeleted()}get hasComment(){return!!c(this,mr)&&!c(this,mr).isEmpty()&&!c(this,mr).isDeleted()}async editComment(t){c(this,mr)||C(this,mr,new C2(this)),c(this,mr).edit(t)}toggleComment(t,e=void 0){this.hasComment&&this._uiManager.toggleComment(this,t,e)}setSelectedCommentButton(t){c(this,mr).setSelectedButton(t)}addComment(t){if(this.hasEditedComment){const[,,,i]=t.rect,[s]=this.pageDimensions,[A]=this.pageTranslation,a=A+s+1,o=i-100,l=a+180;t.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[a,o,l,i]}}}updateFromAnnotationLayer({popup:{contents:t,deleted:e}}){c(this,mr).data=e?null:t}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){var A;const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=c(this,op)?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),_(this,pe,DE).call(this);const[e,r]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*r/e).toFixed(2)}%`,t.style.maxHeight=`${(100*e/r).toFixed(2)}%`);const[i,s]=this.getInitialTranslation();return this.translate(i,s),lP(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(c(this,nf)||C(this,nf,new yv({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:_(this,pe,IP).bind(this),onPinching:_(this,pe,_P).bind(this),onPinchEnd:_(this,pe,UP).bind(this),signal:this._uiManager._signal}))),this.addStandaloneCommentButton(),(A=this._uiManager._editorUndoBar)==null||A.hide(),t}pointerdown(t){const{isMac:e}=Mi.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(C(this,ef,!0),this._isDraggable){_(this,pe,LP).call(this,t);return}_(this,pe,OE).call(this,t)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){c(this,Co)&&clearTimeout(c(this,Co)),C(this,Co,setTimeout(()=>{var t;C(this,Co,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,r){t.changeParent(this),this.x=e,this.y=r,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,r=this.rotation){const i=this.parentScale,[s,A]=this.pageDimensions,[a,o]=this.pageTranslation,l=t/i,h=e/i,u=this.x*s,d=this.y*A,f=this.width*s,p=this.height*A;switch(r){case 0:return[u+l+a,A-d-h-p+o,u+l+f+a,A-d-h+o];case 90:return[u+h+a,A-d+l+o,u+h+p+a,A-d+l+f+o];case 180:return[u-l-f+a,A-d+h+o,u-l+a,A-d+h+p+o];case 270:return[u-h-p+a,A-d-l-f+o,u-h+a,A-d-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[r,i,s,A]=t,a=s-r,o=A-i;switch(this.rotation){case 0:return[r,e-A,a,o];case 90:return[r,e-i,o,a];case 180:return[s,e-i,a,o];case 270:return[s,e-A,o,a];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&Qe._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){var t;(t=c(this,mr))==null||t.onUpdatedColor()}getData(){const{comment:{text:t,color:e,date:r,opacity:i,deleted:s,richText:A},uid:a,pageIndex:o,creationDate:l,modificationDate:h}=this;return{id:a,pageIndex:o,rect:this.getPDFRect(),richText:A,contentsObj:{str:t},creationDate:l,modificationDate:r||h,popupRef:!s,color:e,opacity:i}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),C(this,rf,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),C(this,rf,!1),!0):!1}isInEditMode(){return c(this,rf)}shouldGetKeyboardEvents(){return c(this,_l)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:r,right:i}=this.getClientDimensions(),{innerHeight:s,innerWidth:A}=window;return e<A&&i>0&&t<s&&r>0}rebuild(){_(this,pe,DE).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){var r;return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:((r=this._initialData)==null?void 0:r.popupRef)||""}}static async deserialize(t,e,r){const i=new this.prototype.constructor({parent:e,id:r.getId(),uiManager:r,annotationElementId:t.annotationElementId,creationDate:t.creationDate,modificationDate:t.modificationDate});i.rotation=t.rotation,C(i,Zu,t.accessibilityData),i._isCopy=t.isCopy||!1;const[s,A]=i.pageDimensions,[a,o,l,h]=i.getRectInCurrentCoords(t.rect,A);return i.x=a/s,i.y=o/A,i.width=l/s,i.height=h/A,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e,r;if((t=c(this,dh))==null||t.abort(),C(this,dh,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.hideCommentPopup(),c(this,Co)&&(clearTimeout(c(this,Co)),C(this,Co,null)),_(this,pe,Bm).call(this),this.removeEditToolbar(),c(this,qA)){for(const i of c(this,qA).values())clearTimeout(i);C(this,qA,null)}this.parent=null,(e=c(this,nf))==null||e.destroy(),C(this,nf,null),(r=c(this,XA))==null||r.remove(),C(this,XA,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(_(this,pe,FP).call(this),c(this,In).classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){const{commentButtonPosition:[t,e]}=this,[r,i,s,A]=this.getPDFRect();return[Qe._round(r+(s-r)*t),Qe._round(i+(A-i)*(1-e))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return c(this,mr).commentPopupPositionInLayer}set commentPopupPosition(t){c(this,mr).commentPopupPositionInLayer=t}hasDefaultPopupPosition(){return c(this,mr).hasDefaultPopupPosition()}get commentButtonWidth(){return c(this,mr).commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(t){var e;(e=c(this,mr))==null||e.setCommentButtonStates(t)}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),C(this,Il,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=c(this,In).children;if(!c(this,xa)){C(this,xa,Array.from(e));const A=_(this,pe,QP).bind(this),a=_(this,pe,NP).bind(this),o=this._uiManager._signal;for(const l of c(this,xa)){const h=l.getAttribute("data-resizer-name");l.setAttribute("role","spinbutton"),l.addEventListener("keydown",A,{signal:o}),l.addEventListener("blur",a,{signal:o}),l.addEventListener("focus",_(this,pe,PP).bind(this,h),{signal:o}),l.setAttribute("data-l10n-id",Qe._l10nResizer[h])}}const r=c(this,xa)[0];let i=0;for(const A of e){if(A===r)break;i++}const s=(360-this.rotation+this.parentRotation)%360/90*(c(this,xa).length/4);if(s!==i){if(s<i)for(let a=0;a<i-s;a++)c(this,In).append(c(this,In).firstElementChild);else if(s>i)for(let a=0;a<s-i;a++)c(this,In).firstElementChild.before(c(this,In).lastElementChild);let A=0;for(const a of e){const l=c(this,xa)[A++].getAttribute("data-resizer-name");a.setAttribute("data-l10n-id",Qe._l10nResizer[l])}}_(this,pe,RE).call(this,0),C(this,_l,!0),c(this,In).firstElementChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(t,e){c(this,_l)&&_(this,pe,kE).call(this,c(this,t1),{deltaX:t,deltaY:e,fromKeyboard:!0})}_stopResizingWithKeyboard(){_(this,pe,Bm).call(this),this.div.focus()}select(){var t,e,r;if(this.isSelected&&this._editToolbar){this._editToolbar.show();return}if(this.isSelected=!0,this.makeResizable(),(t=this.div)==null||t.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var i,s;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((s=this._editToolbar)==null||s.show())});return}(e=this._editToolbar)==null||e.show(),(r=c(this,Yr))==null||r.toggleAltTextBadge(!1)}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>{var t;return(t=this.div)==null?void 0:t.focus({preventScroll:!0})},0)}unselect(){var t,e,r,i,s;this.isSelected&&(this.isSelected=!1,(t=c(this,In))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(r=this.div)!=null&&r.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(s=c(this,Yr))==null||s.toggleAltTextBadge(!0),this.hideCommentPopup())}hideCommentPopup(){this.hasComment&&this._uiManager.toggleComment(null)}updateParams(t,e){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){t.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.uid}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return c(this,e1)}set isEditing(t){C(this,e1,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){c(this,qA)||C(this,qA,new Map);const{action:r}=t;let i=c(this,qA).get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(t),c(this,qA).delete(r),c(this,qA).size===0&&C(this,qA,null)},Qe._telemetryTimeout),c(this,qA).set(r,i);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),C(this,op,!1)}disable(){this.div&&(this.div.tabIndex=-1),C(this,op,!0)}updateFakeAnnotationElement(t){if(!c(this,XA)&&!this.deleted){C(this,XA,t.addFakeAnnotation(this));return}if(this.deleted){c(this,XA).remove(),C(this,XA,null);return}(this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&c(this,XA).updateEdited({rect:this.getPDFRect(),popup:this.comment})}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const r=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),r.before(e)}return e}resetAnnotationElement(t){const{firstElementChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};Zu=new WeakMap,xa=new WeakMap,Yr=new WeakMap,mr=new WeakMap,Tl=new WeakMap,op=new WeakMap,fh=new WeakMap,Zv=new WeakMap,In=new WeakMap,tf=new WeakMap,Il=new WeakMap,XA=new WeakMap,dh=new WeakMap,t1=new WeakMap,ef=new WeakMap,hA=new WeakMap,e1=new WeakMap,rf=new WeakMap,_l=new WeakMap,Co=new WeakMap,lp=new WeakMap,cp=new WeakMap,qA=new WeakMap,nf=new WeakMap,r1=new WeakMap,aB=new WeakMap,pe=new WeakSet,NE=function([t,e],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/t,this.y+=i/e,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},i1=new WeakSet,PE=function(t,e,r){switch(r){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},Qy=function(t){switch(t){case 90:{const[e,r]=this.pageDimensions;return[0,-e/r,r/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,r]=this.pageDimensions;return[0,e/r,-r/e,0]}default:return[1,0,0,1]}},FP=function(){if(c(this,In))return;C(this,In,document.createElement("div")),c(this,In).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const r of t){const i=document.createElement("div");c(this,In).append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",_(this,pe,TP).bind(this,r),{signal:e}),i.addEventListener("contextmenu",QA,{signal:e}),i.tabIndex=-1}this.div.prepend(c(this,In))},TP=function(t,e){var h;e.preventDefault();const{isMac:r}=Mi.platform;if(e.button!==0||e.ctrlKey&&r)return;(h=c(this,Yr))==null||h.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,C(this,tf,[e.screenX,e.screenY]);const s=new AbortController,A=this._uiManager.combinedSignal(s);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",_(this,pe,kE).bind(this,t),{passive:!0,capture:!0,signal:A}),window.addEventListener("touchmove",Zr,{passive:!1,signal:A}),window.addEventListener("contextmenu",QA,{signal:A}),C(this,Il,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const a=this.parent.div.style.cursor,o=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const l=()=>{var u;s.abort(),this.parent.togglePointerEvents(!0),(u=c(this,Yr))==null||u.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=a,this.div.style.cursor=o,_(this,pe,Ny).call(this)};window.addEventListener("pointerup",l,{signal:A}),window.addEventListener("blur",l,{signal:A})},ME=function(t,e,r,i){this.width=r,this.height=i,this.x=t,this.y=e,this.setDims(),this.fixAndSetPosition(),this._onResized()},Ny=function(){if(!c(this,Il))return;const{savedX:t,savedY:e,savedWidth:r,savedHeight:i}=c(this,Il);C(this,Il,null);const s=this.x,A=this.y,a=this.width,o=this.height;s===t&&A===e&&a===r&&o===i||this.addCommands({cmd:_(this,pe,ME).bind(this,s,A,a,o),undo:_(this,pe,ME).bind(this,t,e,r,i),mustExec:!0})},kE=function(t,e){const[r,i]=this.parentDimensions,s=this.x,A=this.y,a=this.width,o=this.height,l=Qe.MIN_SIZE/r,h=Qe.MIN_SIZE/i,u=_(this,pe,Qy).call(this,this.rotation),d=(rt,it)=>[u[0]*rt+u[2]*it,u[1]*rt+u[3]*it],f=_(this,pe,Qy).call(this,360-this.rotation),p=(rt,it)=>[f[0]*rt+f[2]*it,f[1]*rt+f[3]*it];let m,y,w=!1,B=!1;switch(t){case"topLeft":w=!0,m=(rt,it)=>[0,0],y=(rt,it)=>[rt,it];break;case"topMiddle":m=(rt,it)=>[rt/2,0],y=(rt,it)=>[rt/2,it];break;case"topRight":w=!0,m=(rt,it)=>[rt,0],y=(rt,it)=>[0,it];break;case"middleRight":B=!0,m=(rt,it)=>[rt,it/2],y=(rt,it)=>[0,it/2];break;case"bottomRight":w=!0,m=(rt,it)=>[rt,it],y=(rt,it)=>[0,0];break;case"bottomMiddle":m=(rt,it)=>[rt/2,it],y=(rt,it)=>[rt/2,0];break;case"bottomLeft":w=!0,m=(rt,it)=>[0,it],y=(rt,it)=>[rt,0];break;case"middleLeft":B=!0,m=(rt,it)=>[0,it/2],y=(rt,it)=>[rt,it/2];break}const E=m(a,o),S=y(a,o);let I=d(...S);const L=Qe._round(s+I[0]),k=Qe._round(A+I[1]);let H=1,Q=1,W,U;if(e.fromKeyboard)({deltaX:W,deltaY:U}=e);else{const{screenX:rt,screenY:it}=e,[At,ut]=c(this,tf);[W,U]=this.screenToPageTranslation(rt-At,it-ut),c(this,tf)[0]=rt,c(this,tf)[1]=it}if([W,U]=p(W/r,U/i),w){const rt=Math.hypot(a,o);H=Q=Math.max(Math.min(Math.hypot(S[0]-E[0]-W,S[1]-E[1]-U)/rt,1/a,1/o),l/a,h/o)}else B?H=Wr(Math.abs(S[0]-E[0]-W),l,1)/a:Q=Wr(Math.abs(S[1]-E[1]-U),h,1)/o;const D=Qe._round(a*H),j=Qe._round(o*Q);I=d(...y(D,j));const V=L-I[0],st=k-I[1];c(this,hA)||C(this,hA,[this.x,this.y,this.width,this.height]),this.width=D,this.height=j,this.x=V,this.y=st,this.setDims(),this.fixAndSetPosition(),this._onResizing()},IP=function(){var t;C(this,Il,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(t=c(this,Yr))==null||t.toggle(!1),this.parent.togglePointerEvents(!1)},_P=function(t,e,r){let s=.7*(r/e)+1-.7;if(s===1)return;const A=_(this,pe,Qy).call(this,this.rotation),a=(L,k)=>[A[0]*L+A[2]*k,A[1]*L+A[3]*k],[o,l]=this.parentDimensions,h=this.x,u=this.y,d=this.width,f=this.height,p=Qe.MIN_SIZE/o,m=Qe.MIN_SIZE/l;s=Math.max(Math.min(s,1/d,1/f),p/d,m/f);const y=Qe._round(d*s),w=Qe._round(f*s);if(y===d&&w===f)return;c(this,hA)||C(this,hA,[h,u,d,f]);const B=a(d/2,f/2),E=Qe._round(h+B[0]),S=Qe._round(u+B[1]),I=a(y/2,w/2);this.x=E-I[0],this.y=S-I[1],this.width=y,this.height=w,this.setDims(),this.fixAndSetPosition(),this._onResizing()},UP=function(){var t;(t=c(this,Yr))==null||t.toggle(!0),this.parent.togglePointerEvents(!0),_(this,pe,Ny).call(this)},OE=function(t){const{isMac:e}=Mi.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},LP=function(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let r=!1;const i=new AbortController,s=this._uiManager.combinedSignal(i),A={capture:!0,passive:!1,signal:s},a=l=>{i.abort(),C(this,fh,null),C(this,ef,!1),this._uiManager.endDragSession()||_(this,pe,OE).call(this,l),r&&this._onStopDragging()};e&&(C(this,lp,t.clientX),C(this,cp,t.clientY),C(this,fh,t.pointerId),C(this,Zv,t.pointerType),window.addEventListener("pointermove",l=>{r||(r=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());const{clientX:h,clientY:u,pointerId:d}=l;if(d!==c(this,fh)){Zr(l);return}const[f,p]=this.screenToPageTranslation(h-c(this,lp),u-c(this,cp));C(this,lp,h),C(this,cp,u),this._uiManager.dragSelectedEditors(f,p)},A),window.addEventListener("touchmove",Zr,A),window.addEventListener("pointerdown",l=>{l.pointerType===c(this,Zv)&&(c(this,nf)||l.isPrimary)&&a(l),Zr(l)},A));const o=l=>{if(!c(this,fh)||c(this,fh)===l.pointerId){a(l);return}Zr(l)};window.addEventListener("pointerup",o,{signal:s}),window.addEventListener("blur",o,{signal:s})},DE=function(){if(c(this,dh)||!this.div)return;C(this,dh,new AbortController);const t=this._uiManager.combinedSignal(c(this,dh));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},QP=function(t){Qe._resizerKeyboardManager.exec(this,t)},NP=function(t){var e;c(this,_l)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==c(this,In)&&_(this,pe,Bm).call(this)},PP=function(t){C(this,t1,c(this,_l)?t:"")},RE=function(t){if(c(this,xa))for(const e of c(this,xa))e.tabIndex=t},Bm=function(){C(this,_l,!1),_(this,pe,RE).call(this,-1),_(this,pe,Ny).call(this)},T(Qe,i1),ct(Qe,"_l10n",null),ct(Qe,"_l10nResizer",null),ct(Qe,"_borderLineWidth",-1),ct(Qe,"_colorManager",new TE),ct(Qe,"_zIndex",1),ct(Qe,"_telemetryTimeout",1e3);let Dr=Qe;class YK extends Dr{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const G_=3285377520,DA=4294901760,ao=65535;class HE{constructor(t){this.h1=t?t&4294967295:G_,this.h2=t?t&4294967295:G_}update(t){let e,r;if(typeof t=="string"){e=new Uint8Array(t.length*2),r=0;for(let m=0,y=t.length;m<y;m++){const w=t.charCodeAt(m);w<=255?e[r++]=w:(e[r++]=w>>>8,e[r++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),r=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=r>>2,s=r-i*4,A=new Uint32Array(e.buffer,0,i);let a=0,o=0,l=this.h1,h=this.h2;const u=3432918353,d=461845907,f=u&ao,p=d&ao;for(let m=0;m<i;m++)m&1?(a=A[m],a=a*u&DA|a*f&ao,a=a<<15|a>>>17,a=a*d&DA|a*p&ao,l^=a,l=l<<13|l>>>19,l=l*5+3864292196):(o=A[m],o=o*u&DA|o*f&ao,o=o<<15|o>>>17,o=o*d&DA|o*p&ao,h^=o,h=h<<13|h>>>19,h=h*5+3864292196);switch(a=0,s){case 3:a^=e[i*4+2]<<16;case 2:a^=e[i*4+1]<<8;case 1:a^=e[i*4],a=a*u&DA|a*f&ao,a=a<<15|a>>>17,a=a*d&DA|a*p&ao,i&1?l^=a:h^=a}this.h1=l,this.h2=h}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&DA|t*36045&ao,e=e*4283543511&DA|((e<<16|t>>>16)*2950163797&DA)>>>16,t^=e>>>1,t=t*444984403&DA|t*60499&ao,e=e*3301882366&DA|((e<<16|t>>>16)*3120437893&DA)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const bv=Object.freeze({map:null,hash:"",transfer:void 0});var sf,Af,Ul,_n,oB,MP;class d4{constructor(){T(this,oB);T(this,sf,!1);T(this,Af,null);T(this,Ul,null);T(this,_n,new Map);ct(this,"onSetModified",null);ct(this,"onResetModified",null);ct(this,"onAnnotationEditor",null)}getValue(t,e){const r=c(this,_n).get(t);return r===void 0?e:Object.assign(e,r)}getRawValue(t){return c(this,_n).get(t)}remove(t){var r;const e=c(this,_n).get(t);e!==void 0&&(e instanceof Dr&&c(this,Ul).delete(e.annotationElementId),c(this,_n).delete(t),c(this,_n).size===0&&this.resetModified(),!c(this,_n).values().some(i=>i instanceof Dr)&&((r=this.onAnnotationEditor)==null||r.call(this,null)))}setValue(t,e){var s;const r=c(this,_n).get(t);let i=!1;if(r!==void 0)for(const[A,a]of Object.entries(e))r[A]!==a&&(i=!0,r[A]=a);else i=!0,c(this,_n).set(t,e);i&&_(this,oB,MP).call(this),e instanceof Dr&&((c(this,Ul)||C(this,Ul,new Map)).set(e.annotationElementId,e),(s=this.onAnnotationEditor)==null||s.call(this,e.constructor._type))}has(t){return c(this,_n).has(t)}get size(){return c(this,_n).size}resetModified(){var t;c(this,sf)&&(C(this,sf,!1),(t=this.onResetModified)==null||t.call(this))}get print(){return new kP(this)}get serializable(){if(c(this,_n).size===0)return bv;const t=new Map,e=new HE,r=[],i=Object.create(null);let s=!1;for(const[A,a]of c(this,_n)){const o=a instanceof Dr?a.serialize(!1,i):a;a.page&&(a.pageIndex=a.page._pageIndex,delete a.page),o&&(t.set(A,o),e.update(`${A}:${JSON.stringify(o)}`),s||(s=!!o.bitmap))}if(s)for(const A of t.values())A.bitmap&&r.push(A.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:r}:bv}get editorStats(){let t=null;const e=new Map;let r=0,i=0;for(const s of c(this,_n).values()){if(!(s instanceof Dr)){s.popup&&(s.popup.deleted?i+=1:r+=1);continue}s.isCommentDeleted?i+=1:s.hasEditedComment&&(r+=1);const A=s.telemetryFinalData;if(!A)continue;const{type:a}=A;e.has(a)||e.set(a,Object.getPrototypeOf(s).constructor),t||(t=Object.create(null));const o=t[a]||(t[a]=new Map);for(const[l,h]of Object.entries(A)){if(l==="type")continue;const u=o.getOrInsertComputed(l,kB);u.set(h,(u.get(h)??0)+1)}}if((i>0||r>0)&&(t||(t=Object.create(null)),t.comments={deleted:i,edited:r}),!t)return null;for(const[s,A]of e)t[s]=A.computeTelemetryFinalData(t[s]);return t}resetModifiedIds(){C(this,Af,null)}updateEditor(t,e){var i;const r=(i=c(this,Ul))==null?void 0:i.get(t);return r?(r.updateFromAnnotationLayer(e),!0):!1}getEditor(t){var e;return((e=c(this,Ul))==null?void 0:e.get(t))||null}get modifiedIds(){if(c(this,Af))return c(this,Af);const t=[];if(c(this,Ul))for(const r of c(this,Ul).values())r.serialize()&&t.push(r.annotationElementId);let e="";if(t.length){const r=new HE;r.update(t.join(",")),e=r.hexdigest()}return C(this,Af,{ids:new Set(t),hash:e})}[Symbol.iterator](){return c(this,_n).entries()}}sf=new WeakMap,Af=new WeakMap,Ul=new WeakMap,_n=new WeakMap,oB=new WeakSet,MP=function(){var t;c(this,sf)||(C(this,sf,!0),(t=this.onSetModified)==null||t.call(this))};var n1;class kP extends d4{constructor(e){super();T(this,n1,bv);const{serializable:r}=e;if(r===bv)return;const{map:i,hash:s,transfer:A}=r,a=structuredClone(i,A?{transfer:A}:null);C(this,n1,{map:a,hash:s,transfer:[]})}get print(){hr("Should not call PrintAnnotationStorage.print")}get serializable(){return c(this,n1)}get modifiedIds(){return Fe(this,"modifiedIds",{ids:new Set,hash:""})}}n1=new WeakMap;const Jd="__forcedDependency",{floor:j_,ceil:$_}=Math;function W_(n,t,e,r,i,s){n[t*4+0]=Math.min(n[t*4+0],e),n[t*4+1]=Math.min(n[t*4+1],r),n[t*4+2]=Math.max(n[t*4+2],i),n[t*4+3]=Math.max(n[t*4+3],s)}const KE=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];var hp,gh;class JK{constructor(t,e){T(this,hp);T(this,gh);C(this,hp,t),C(this,gh,e)}get length(){return c(this,hp).length}isEmpty(t){return c(this,hp)[t]===KE}minX(t){return c(this,gh)[t*4+0]/256}minY(t){return c(this,gh)[t*4+1]/256}maxX(t){return(c(this,gh)[t*4+2]+1)/256}maxY(t){return(c(this,gh)[t*4+3]+1)/256}}hp=new WeakMap,gh=new WeakMap;const z_=(n,t)=>n==null?void 0:n.getOrInsertComputed(t,()=>({dependencies:new Set,isRenderingOperation:!1}));var Ll,or,jr,af,of,lf,ns,s1,VE;class ZK{constructor(t,e){T(this,s1);T(this,Ll,[[1,0,0,1,0,0]]);T(this,or,[-1/0,-1/0,1/0,1/0]);T(this,jr,new Float64Array(ic));ct(this,"_pendingBBoxIdx",-1);T(this,af);T(this,of);T(this,lf);T(this,ns);ct(this,"_savesStack",[]);ct(this,"_markedContentStack",[]);C(this,af,t.width),C(this,of,t.height),_(this,s1,VE).call(this,e)}growOperationsCount(t){t>=c(this,ns).length&&_(this,s1,VE).call(this,t,c(this,ns))}get clipBox(){return c(this,or)}save(t){return C(this,or,{__proto__:c(this,or)}),this._savesStack.push(t),this}restore(t,e){const r=Object.getPrototypeOf(c(this,or));if(r===null)return this;C(this,or,r);const i=this._savesStack.pop();return i!==void 0&&(e==null||e(i,t),c(this,ns)[t]=c(this,ns)[i]),this}recordOpenMarker(t){return this._savesStack.push(t),this}getOpenMarker(){return this._savesStack.length===0?null:this._savesStack.at(-1)}recordCloseMarker(t,e){const r=this._savesStack.pop();return r!==void 0&&(e==null||e(r,t),c(this,ns)[t]=c(this,ns)[r]),this}beginMarkedContent(t){return this._markedContentStack.push(t),this}endMarkedContent(t,e){const r=this._markedContentStack.pop();return r!==void 0&&(e==null||e(r,t),c(this,ns)[t]=c(this,ns)[r]),this}pushBaseTransform(t){return c(this,Ll).push(Qt.multiplyByDOMMatrix(c(this,Ll).at(-1),t.getTransform())),this}popBaseTransform(){return c(this,Ll).length>1&&c(this,Ll).pop(),this}resetBBox(t){return this._pendingBBoxIdx!==t&&(this._pendingBBoxIdx=t,c(this,jr).set(ic,0)),this}recordClipBox(t,e,r,i,s,A){const a=Qt.multiplyByDOMMatrix(c(this,Ll).at(-1),e.getTransform()),o=ic.slice();Qt.axialAlignedBoundingBox([r,s,i,A],a,o);const l=Qt.intersect(c(this,or),o);return l?(c(this,or)[0]=l[0],c(this,or)[1]=l[1],c(this,or)[2]=l[2],c(this,or)[3]=l[3]):(c(this,or)[0]=c(this,or)[1]=1/0,c(this,or)[2]=c(this,or)[3]=-1/0),this}recordBBox(t,e,r,i,s,A){const a=c(this,or);if(a[0]===1/0)return this;const o=Qt.multiplyByDOMMatrix(c(this,Ll).at(-1),e.getTransform());if(a[0]===-1/0)return Qt.axialAlignedBoundingBox([r,s,i,A],o,c(this,jr)),this;const l=ic.slice();return Qt.axialAlignedBoundingBox([r,s,i,A],o,l),c(this,jr)[0]=Wr(l[0],a[0],c(this,jr)[0]),c(this,jr)[1]=Wr(l[1],a[1],c(this,jr)[1]),c(this,jr)[2]=Wr(l[2],c(this,jr)[2],a[2]),c(this,jr)[3]=Wr(l[3],c(this,jr)[3],a[3]),this}recordFullPageBBox(t){return c(this,jr)[0]=Math.max(0,c(this,or)[0]),c(this,jr)[1]=Math.max(0,c(this,or)[1]),c(this,jr)[2]=Math.min(c(this,af),c(this,or)[2]),c(this,jr)[3]=Math.min(c(this,of),c(this,or)[3]),this}recordOperation(t,e=!1,r){if(this._pendingBBoxIdx!==t)return this;const i=j_(c(this,jr)[0]*256/c(this,af)),s=j_(c(this,jr)[1]*256/c(this,of)),A=$_(c(this,jr)[2]*256/c(this,af)),a=$_(c(this,jr)[3]*256/c(this,of));if(W_(c(this,lf),t,i,s,A,a),r)for(const o of r)for(const l of o)l!==t&&W_(c(this,lf),l,i,s,A,a);return e||(this._pendingBBoxIdx=-1),this}bboxToClipBoxDropOperation(t){return this._pendingBBoxIdx===t&&(this._pendingBBoxIdx=-1,c(this,or)[0]=Math.max(c(this,or)[0],c(this,jr)[0]),c(this,or)[1]=Math.max(c(this,or)[1],c(this,jr)[1]),c(this,or)[2]=Math.min(c(this,or)[2],c(this,jr)[2]),c(this,or)[3]=Math.min(c(this,or)[3],c(this,jr)[3])),this}take(){return new JK(c(this,ns),c(this,lf))}takeDebugMetadata(){throw new Error("Unreachable")}recordSimpleData(t,e){return this}recordIncrementalData(t,e){return this}resetIncrementalData(t,e){return this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,r){return this}recordFutureForcedDependency(t,e){return this}inheritSimpleDataAsFutureForcedDependencies(t){return this}inheritPendingDependenciesAsFutureForcedDependencies(){return this}recordCharacterBBox(t,e,r,i=1,s=0,A=0,a){return this}getSimpleIndex(t){}recordDependencies(t,e){return this}recordNamedDependency(t,e){return this}recordShowTextOperation(t,e=!1){return this}}Ll=new WeakMap,or=new WeakMap,jr=new WeakMap,af=new WeakMap,of=new WeakMap,lf=new WeakMap,ns=new WeakMap,s1=new WeakSet,VE=function(t,e){const r=new ArrayBuffer(t*4);C(this,lf,new Uint8ClampedArray(r)),C(this,ns,new Uint32Array(r)),e&&e.length>0?(c(this,ns).set(e),c(this,ns).fill(KE,e.length)):c(this,ns).fill(KE)};var Hs,Ks,cf,Ea,up,ph,mh,br;class t9{constructor(t,e=!1){T(this,Hs,{__proto__:null});T(this,Ks,{__proto__:null,transform:[],moveText:[],sameLineText:[],[Jd]:[]});T(this,cf,new Map);T(this,Ea,new Set);T(this,up,new Map);T(this,ph);T(this,mh);T(this,br);C(this,br,t),e&&(C(this,ph,new Map),C(this,mh,(r,i)=>{z_(c(this,ph),i).dependencies.add(r)}))}get clipBox(){return c(this,br).clipBox}growOperationsCount(t){c(this,br).growOperationsCount(t)}save(t){return C(this,Hs,{__proto__:c(this,Hs)}),C(this,Ks,{__proto__:c(this,Ks),transform:{__proto__:c(this,Ks).transform},moveText:{__proto__:c(this,Ks).moveText},sameLineText:{__proto__:c(this,Ks).sameLineText},[Jd]:{__proto__:c(this,Ks)[Jd]}}),c(this,br).save(t),this}restore(t){c(this,br).restore(t,c(this,mh));const e=Object.getPrototypeOf(c(this,Hs));return e===null?this:(C(this,Hs,e),C(this,Ks,Object.getPrototypeOf(c(this,Ks))),this)}recordOpenMarker(t){return c(this,br).recordOpenMarker(t,c(this,mh)),this}getOpenMarker(){return c(this,br).getOpenMarker()}recordCloseMarker(t){return c(this,br).recordCloseMarker(t,c(this,mh)),this}beginMarkedContent(t){return c(this,br).beginMarkedContent(t),this}endMarkedContent(t){return c(this,br).endMarkedContent(t,c(this,mh)),this}pushBaseTransform(t){return c(this,br).pushBaseTransform(t),this}popBaseTransform(){return c(this,br).popBaseTransform(),this}recordSimpleData(t,e){return c(this,Hs)[t]=e,this}recordIncrementalData(t,e){return c(this,Ks)[t].push(e),this}resetIncrementalData(t,e){return c(this,Ks)[t].length=0,this}recordNamedData(t,e){return c(this,cf).set(t,e),this}recordSimpleDataFromNamed(t,e,r){c(this,Hs)[t]=c(this,cf).get(e)??r}recordFutureForcedDependency(t,e){return this.recordIncrementalData(Jd,e),this}inheritSimpleDataAsFutureForcedDependencies(t){for(const e of t)e in c(this,Hs)&&this.recordFutureForcedDependency(e,c(this,Hs)[e]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const t of c(this,Ea))this.recordFutureForcedDependency(Jd,t);return this}resetBBox(t){return c(this,br).resetBBox(t),this}recordClipBox(t,e,r,i,s,A){return c(this,br).recordClipBox(t,e,r,i,s,A),this}recordBBox(t,e,r,i,s,A){return c(this,br).recordBBox(t,e,r,i,s,A),this}recordCharacterBBox(t,e,r,i=1,s=0,A=0,a){const o=r.bbox;let l,h;if(o&&(l=o[2]!==o[0]&&o[3]!==o[1]&&c(this,up).get(r),l!==!1&&(h=[0,0,0,0],Qt.axialAlignedBoundingBox(o,r.fontMatrix,h),(i!==1||s!==0||A!==0)&&Qt.scaleMinMax([i,0,0,-i,s,A],h),l)))return this.recordBBox(t,e,h[0],h[2],h[1],h[3]);if(!a)return this.recordFullPageBBox(t);const u=a();return o&&h&&l===void 0&&(l=h[0]<=s-u.actualBoundingBoxLeft&&h[2]>=s+u.actualBoundingBoxRight&&h[1]<=A-u.actualBoundingBoxAscent&&h[3]>=A+u.actualBoundingBoxDescent,c(this,up).set(r,l),l)?this.recordBBox(t,e,h[0],h[2],h[1],h[3]):this.recordBBox(t,e,s-u.actualBoundingBoxLeft,s+u.actualBoundingBoxRight,A-u.actualBoundingBoxAscent,A+u.actualBoundingBoxDescent)}recordFullPageBBox(t){return c(this,br).recordFullPageBBox(t),this}getSimpleIndex(t){return c(this,Hs)[t]}recordDependencies(t,e){const r=c(this,Ea),i=c(this,Hs),s=c(this,Ks);for(const A of e)A in c(this,Hs)?r.add(i[A]):A in s&&s[A].forEach(r.add,r);return this}recordNamedDependency(t,e){return c(this,cf).has(e)&&c(this,Ea).add(c(this,cf).get(e)),this}recordOperation(t,e=!1){if(this.recordDependencies(t,[Jd]),c(this,ph)){const i=z_(c(this,ph),t),{dependencies:s}=i;c(this,Ea).forEach(s.add,s),c(this,br)._savesStack.forEach(s.add,s),c(this,br)._markedContentStack.forEach(s.add,s),s.delete(t),i.isRenderingOperation=!0}const r=!e&&t===c(this,br)._pendingBBoxIdx;return c(this,br).recordOperation(t,e,[c(this,Ea),c(this,br)._savesStack,c(this,br)._markedContentStack]),r&&c(this,Ea).clear(),this}recordShowTextOperation(t,e=!1){const r=Array.from(c(this,Ea));this.recordOperation(t,e),this.recordIncrementalData("sameLineText",t);for(const i of r)this.recordIncrementalData("sameLineText",i);return this}bboxToClipBoxDropOperation(t,e=!1){const r=!e&&t===c(this,br)._pendingBBoxIdx;return c(this,br).bboxToClipBoxDropOperation(t),r&&c(this,Ea).clear(),this}take(){return c(this,up).clear(),c(this,br).take()}takeDebugMetadata(){return c(this,ph)}}Hs=new WeakMap,Ks=new WeakMap,cf=new WeakMap,Ea=new WeakMap,up=new WeakMap,ph=new WeakMap,mh=new WeakMap,br=new WeakMap;var Br,di,Sa,fp,dp;const BT=class BT{constructor(t,e,r){T(this,Br);T(this,di);T(this,Sa);T(this,fp,0);T(this,dp,0);if(t instanceof BT&&c(t,Sa)===!!r)return t;C(this,Br,t),C(this,di,e),C(this,Sa,!!r)}get clipBox(){return c(this,Br).clipBox}growOperationsCount(){throw new Error("Unreachable")}save(t){return Hi(this,dp)._++,c(this,Br).save(c(this,di)),this}restore(t){return c(this,dp)>0&&(c(this,Br).restore(c(this,di)),Hi(this,dp)._--),this}recordOpenMarker(t){return Hi(this,fp)._++,this}getOpenMarker(){return c(this,fp)>0?c(this,di):c(this,Br).getOpenMarker()}recordCloseMarker(t){return Hi(this,fp)._--,this}beginMarkedContent(t){return this}endMarkedContent(t){return this}pushBaseTransform(t){return c(this,Br).pushBaseTransform(t),this}popBaseTransform(){return c(this,Br).popBaseTransform(),this}recordSimpleData(t,e){return c(this,Br).recordSimpleData(t,c(this,di)),this}recordIncrementalData(t,e){return c(this,Br).recordIncrementalData(t,c(this,di)),this}resetIncrementalData(t,e){return c(this,Br).resetIncrementalData(t,c(this,di)),this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,r){return c(this,Br).recordSimpleDataFromNamed(t,e,c(this,di)),this}recordFutureForcedDependency(t,e){return c(this,Br).recordFutureForcedDependency(t,c(this,di)),this}inheritSimpleDataAsFutureForcedDependencies(t){return c(this,Br).inheritSimpleDataAsFutureForcedDependencies(t),this}inheritPendingDependenciesAsFutureForcedDependencies(){return c(this,Br).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(t){return c(this,Sa)||c(this,Br).resetBBox(c(this,di)),this}recordClipBox(t,e,r,i,s,A){return c(this,Sa)||c(this,Br).recordClipBox(c(this,di),e,r,i,s,A),this}recordBBox(t,e,r,i,s,A){return c(this,Sa)||c(this,Br).recordBBox(c(this,di),e,r,i,s,A),this}recordCharacterBBox(t,e,r,i,s,A,a){return c(this,Sa)||c(this,Br).recordCharacterBBox(c(this,di),e,r,i,s,A,a),this}recordFullPageBBox(t){return c(this,Sa)||c(this,Br).recordFullPageBBox(c(this,di)),this}getSimpleIndex(t){return c(this,Br).getSimpleIndex(t)}recordDependencies(t,e){return c(this,Br).recordDependencies(c(this,di),e),this}recordNamedDependency(t,e){return c(this,Br).recordNamedDependency(c(this,di),e),this}recordOperation(t){return c(this,Br).recordOperation(c(this,di),!0),this}recordShowTextOperation(t){return c(this,Br).recordShowTextOperation(c(this,di),!0),this}bboxToClipBoxDropOperation(t){return c(this,Sa)||c(this,Br).bboxToClipBoxDropOperation(c(this,di),!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}};Br=new WeakMap,di=new WeakMap,Sa=new WeakMap,fp=new WeakMap,dp=new WeakMap;let Bv=BT;const RA={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["filter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],transform:["transform"],transformAndFill:["transform","fillColor"]};var hf,uf,ff,df,gf,A1;const cv=class cv{constructor(t){T(this,hf);T(this,uf);T(this,ff,4);T(this,df,0);T(this,gf,new(c(cv,A1))(c(this,ff)*6));C(this,hf,t.width),C(this,uf,t.height)}record(t,e,r,i){if(c(this,df)===c(this,ff)){C(this,ff,c(this,ff)*2);const a=new(c(cv,A1))(c(this,ff)*6);a.set(c(this,gf)),C(this,gf,a)}const s=Qt.domMatrixToTransform(t.getTransform());let A;if(i[0]!==1/0){const a=ic.slice();Qt.axialAlignedBoundingBox([0,-r,e,0],s,a);const o=Qt.intersect(i,a);if(!o)return;const[l,h,u,d]=o;if(l!==a[0]||h!==a[1]||u!==a[2]||d!==a[3]){const f=Math.atan2(s[1],s[0]),p=Math.abs(Math.sin(f)),m=Math.abs(Math.cos(f));if(p<1e-6||m<1e-6||Math.abs(p-m)<1e-6)A=[l,h,l,d,u,h];else{const y=u-l,w=d-h,B=p*p,E=m*m,S=m*p,I=E-B,L=(w*E-y*S)/I,k=(w*S-y*B)/I;A=[l+k,h,l,h+L,u,d-L]}}}A||(A=[0,-r,0,0,e,-r],Qt.applyTransform(A,s,0),Qt.applyTransform(A,s,2),Qt.applyTransform(A,s,4)),A[0]/=c(this,hf),A[1]/=c(this,uf),A[2]/=c(this,hf),A[3]/=c(this,uf),A[4]/=c(this,hf),A[5]/=c(this,uf),c(this,gf).set(A,c(this,df)*6),Hi(this,df)._++}take(){return c(this,gf).subarray(0,c(this,df)*6)}};hf=new WeakMap,uf=new WeakMap,ff=new WeakMap,df=new WeakMap,gf=new WeakMap,A1=new WeakMap,T(cv,A1,Mi.isFloat16ArraySupported?Float16Array:Float32Array);let GE=cv;var gp;class e9{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){T(this,gp,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),c(this,gp).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:e,_inspectFont:r}){if(!(!t||c(this,gp).has(t.loadedName))){if(si(!e,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:s,style:A}=t,a=new FontFace(i,s,A);this.addNativeFontFace(a);try{await a.load(),c(this,gp).add(i),r==null||r(t)}catch{Me(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(a)}return}hr("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const r=t.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw Me(`Failed to load font '${r.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(t,i)})}}get isFontLoadingAPISupported(){var e;const t=!!((e=this._document)!=null&&e.fonts);return Fe(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return Fe(this,"isSyncFontLoadingSupported",FA||Mi.platform.isFirefox)}_queueLoadingCallback(t){function e(){for(si(!i.done,"completeRequest() cannot be called twice."),i.done=!0;r.length>0&&r[0].done;){const s=r.shift();setTimeout(s.callback,0)}}const{loadingRequests:r}=this,i={done:!1,complete:e,callback:t};return r.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return Fe(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function r(I,L){return I.charCodeAt(L)<<24|I.charCodeAt(L+1)<<16|I.charCodeAt(L+2)<<8|I.charCodeAt(L+3)&255}function i(I){return String.fromCharCode(I>>24&255,I>>16&255,I>>8&255,I&255)}function s(I,L,k,H){const Q=I.substring(0,L),W=I.substring(L+k);return Q+H+W}let A,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function u(I,L){if(++h>30){Me("Load test font never loaded."),L();return}if(l.font="30px "+I,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){L();return}setTimeout(u.bind(null,I,L))}const d=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=s(f,976,d.length,d);const m=16,y=1482184792;let w=r(f,m);for(A=0,a=d.length-3;A<a;A+=4)w=w-y+r(d,A)|0;A<d.length&&(w=w-y+r(d+"XXX",A)|0),f=s(f,m,4,i(w));const B=`url(data:font/opentype;base64,${btoa(f)});`,E=`@font-face {font-family:"${d}";src:${B}}`;this.insertRule(E);const S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(const I of[t.loadedName,d]){const L=this._document.createElement("span");L.textContent="Hi",L.style.fontFamily=I,S.append(L)}this._document.body.append(S),u(d,()=>{S.remove(),e.complete()})}}gp=new WeakMap;var Cr;class r9{constructor(t,e=null,r,i){ct(this,"compiledGlyphs",Object.create(null));T(this,Cr);C(this,Cr,t),this._inspectFont=e,r&&(this.charProcOperatorList=r),i&&Object.assign(this,i)}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var r;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${this.data.toBase64()});`;let e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${t}}`}return(r=this._inspectFont)==null||r.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const r=this.loadedName+"_path_"+e;let i;try{i=t.get(r)}catch(A){Me(`getPathGenerator - ignoring character: "${A}".`)}const s=iP(i==null?void 0:i.path);return this.fontExtraProperties||t.delete(r),this.compiledGlyphs[e]=s}get black(){return c(this,Cr).black}get bold(){return c(this,Cr).bold}get disableFontFace(){return c(this,Cr).disableFontFace}set disableFontFace(t){Fe(this,"disableFontFace",!!t)}get fontExtraProperties(){return c(this,Cr).fontExtraProperties}get isInvalidPDFjsFont(){return c(this,Cr).isInvalidPDFjsFont}get isType3Font(){return c(this,Cr).isType3Font}get italic(){return c(this,Cr).italic}get missingFile(){return c(this,Cr).missingFile}get remeasure(){return c(this,Cr).remeasure}get vertical(){return c(this,Cr).vertical}get ascent(){return c(this,Cr).ascent}get defaultWidth(){return c(this,Cr).defaultWidth}get descent(){return c(this,Cr).descent}get bbox(){return c(this,Cr).bbox}get fontMatrix(){return c(this,Cr).fontMatrix}get fallbackName(){return c(this,Cr).fallbackName}get loadedName(){return c(this,Cr).loadedName}get mimetype(){return c(this,Cr).mimetype}get name(){return c(this,Cr).name}get data(){return c(this,Cr).data}clearData(){c(this,Cr).clearData()}get cssFontInfo(){return c(this,Cr).cssFontInfo}get systemFontInfo(){return c(this,Cr).systemFontInfo}get defaultVMetrics(){return c(this,Cr).defaultVMetrics}}Cr=new WeakMap;class OP{}ct(OP,"strings",["fontFamily","fontWeight","italicAngle"]);class DP{}ct(DP,"strings",["css","loadedName","baseFontName","src"]);const es=class es{};ct(es,"bools",["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"]),ct(es,"numbers",["ascent","defaultWidth","descent"]),ct(es,"strings",["fallbackName","loadedName","mimetype","name"]),ct(es,"OFFSET_NUMBERS",Math.ceil(es.bools.length*2/8)),ct(es,"OFFSET_BBOX",es.OFFSET_NUMBERS+es.numbers.length*8),ct(es,"OFFSET_FONT_MATRIX",es.OFFSET_BBOX+1+2*4),ct(es,"OFFSET_DEFAULT_VMETRICS",es.OFFSET_FONT_MATRIX+1+8*6),ct(es,"OFFSET_STRINGS",es.OFFSET_DEFAULT_VMETRICS+1+2*3);let aA=es;class Fs{}ct(Fs,"KIND",0),ct(Fs,"HAS_BBOX",1),ct(Fs,"HAS_BACKGROUND",2),ct(Fs,"SHADING_TYPE",3),ct(Fs,"N_COORD",4),ct(Fs,"N_COLOR",8),ct(Fs,"N_STOP",12),ct(Fs,"N_FIGURES",16);var a1,lB,pp,mp,Py;class i9{constructor(t){T(this,mp);T(this,a1);T(this,lB,new TextDecoder);T(this,pp);C(this,a1,t),C(this,pp,new DataView(t))}get fontFamily(){return _(this,mp,Py).call(this,0)}get fontWeight(){return _(this,mp,Py).call(this,1)}get italicAngle(){return _(this,mp,Py).call(this,2)}}a1=new WeakMap,lB=new WeakMap,pp=new WeakMap,mp=new WeakSet,Py=function(t){si(t<OP.strings.length,"Invalid string index");let e=0;for(let i=0;i<t;i++)e+=c(this,pp).getUint32(e)+4;const r=c(this,pp).getUint32(e);return c(this,lB).decode(new Uint8Array(c(this,a1),e+4,r))};var pf,vp,xo,mf,Cm;class n9{constructor(t){T(this,mf);T(this,pf);T(this,vp,new TextDecoder);T(this,xo);C(this,pf,t),C(this,xo,new DataView(t))}get guessFallback(){return c(this,xo).getUint8(0)!==0}get css(){return _(this,mf,Cm).call(this,0)}get loadedName(){return _(this,mf,Cm).call(this,1)}get baseFontName(){return _(this,mf,Cm).call(this,2)}get src(){return _(this,mf,Cm).call(this,3)}get style(){let t=1;t+=4+c(this,xo).getUint32(t);const e=c(this,xo).getUint32(t),r=c(this,vp).decode(new Uint8Array(c(this,pf),t+4,e));t+=4+e;const i=c(this,xo).getUint32(t),s=c(this,vp).decode(new Uint8Array(c(this,pf),t+4,i));return{style:r,weight:s}}}pf=new WeakMap,vp=new WeakMap,xo=new WeakMap,mf=new WeakSet,Cm=function(t){si(t<DP.strings.length,"Invalid string index");let e=5;for(let i=0;i<t;i++)e+=c(this,xo).getUint32(e)+4;const r=c(this,xo).getUint32(e);return c(this,vp).decode(new Uint8Array(c(this,pf),e+4,r))};var Fa,cB,Ii,vr,wa,My,ky,xm,jE;class s9{constructor({buffer:t,extra:e}){T(this,vr);T(this,Fa);T(this,cB,new TextDecoder);T(this,Ii);C(this,Fa,t),C(this,Ii,new DataView(t)),e&&Object.assign(this,e)}get black(){return _(this,vr,wa).call(this,0)}get bold(){return _(this,vr,wa).call(this,1)}get disableFontFace(){return _(this,vr,wa).call(this,2)}get fontExtraProperties(){return _(this,vr,wa).call(this,3)}get isInvalidPDFjsFont(){return _(this,vr,wa).call(this,4)}get isType3Font(){return _(this,vr,wa).call(this,5)}get italic(){return _(this,vr,wa).call(this,6)}get missingFile(){return _(this,vr,wa).call(this,7)}get remeasure(){return _(this,vr,wa).call(this,8)}get vertical(){return _(this,vr,wa).call(this,9)}get ascent(){return _(this,vr,My).call(this,0)}get defaultWidth(){return _(this,vr,My).call(this,1)}get descent(){return _(this,vr,My).call(this,2)}get bbox(){return _(this,vr,ky).call(this,aA.OFFSET_BBOX,4,"getInt16",2)}get fontMatrix(){return _(this,vr,ky).call(this,aA.OFFSET_FONT_MATRIX,6,"getFloat64",8)}get defaultVMetrics(){return _(this,vr,ky).call(this,aA.OFFSET_DEFAULT_VMETRICS,3,"getInt16",2)}get fallbackName(){return _(this,vr,xm).call(this,0)}get loadedName(){return _(this,vr,xm).call(this,1)}get mimetype(){return _(this,vr,xm).call(this,2)}get name(){return _(this,vr,xm).call(this,3)}get data(){const{offset:t,length:e}=_(this,vr,jE).call(this);return e===0?void 0:new Uint8Array(c(this,Fa),t+4,e)}clearData(){const{offset:t,length:e}=_(this,vr,jE).call(this);e!==0&&(c(this,Ii).setUint32(t,0),C(this,Fa,new Uint8Array(c(this,Fa),0,t+4).slice().buffer),C(this,Ii,new DataView(c(this,Fa))))}get cssFontInfo(){let t=aA.OFFSET_STRINGS;const e=c(this,Ii).getUint32(t);t+=4+e;const r=c(this,Ii).getUint32(t);t+=4+r;const i=c(this,Ii).getUint32(t);if(i===0)return null;const s=new Uint8Array(i);return s.set(new Uint8Array(c(this,Fa),t+4,i)),new i9(s.buffer)}get systemFontInfo(){let t=aA.OFFSET_STRINGS;const e=c(this,Ii).getUint32(t);t+=4+e;const r=c(this,Ii).getUint32(t);if(r===0)return null;const i=new Uint8Array(r);return i.set(new Uint8Array(c(this,Fa),t+4,r)),new n9(i.buffer)}}Fa=new WeakMap,cB=new WeakMap,Ii=new WeakMap,vr=new WeakSet,wa=function(t){si(t<aA.bools.length,"Invalid boolean index");const e=Math.floor(t/4),r=t*2%8,i=c(this,Ii).getUint8(e)>>r&3;return i===0?void 0:i===2},My=function(t){return si(t<aA.numbers.length,"Invalid number index"),c(this,Ii).getFloat64(aA.OFFSET_NUMBERS+t*8)},ky=function(t,e,r,i){const s=c(this,Ii).getUint8(t);if(s===0)return;si(s===e,"Invalid array length."),t+=1;const A=new Array(s);for(let a=0;a<s;a++)A[a]=c(this,Ii)[r](t,!0),t+=i;return A},xm=function(t){si(t<aA.strings.length,"Invalid string index");let e=aA.OFFSET_STRINGS+4;for(let i=0;i<t;i++)e+=c(this,Ii).getUint32(e)+4;const r=c(this,Ii).getUint32(e);return c(this,cB).decode(new Uint8Array(c(this,Fa),e+4,r))},jE=function(){let t=aA.OFFSET_STRINGS;const e=c(this,Ii).getUint32(t);t+=4+e;const r=c(this,Ii).getUint32(t);t+=4+r;const i=c(this,Ii).getUint32(t);t+=4+i;const s=c(this,Ii).getUint32(t);return{offset:t,length:s}};class A9{constructor(t){this.buffer=t,this.view=new DataView(t),this.data=new Uint8Array(t)}getIR(){const t=this.view,e=this.data[Fs.KIND],r=!!this.data[Fs.HAS_BBOX],i=!!this.data[Fs.HAS_BACKGROUND],s=t.getUint32(Fs.N_COORD,!0),A=t.getUint32(Fs.N_COLOR,!0),a=t.getUint32(Fs.N_STOP,!0);let o=20;const l=new Float32Array(this.buffer,o,s*2);o+=s*8;const h=new Uint8Array(this.buffer,o,A*4);o+=A*4;const u=[];for(let p=0;p<a;++p){const m=t.getFloat32(o,!0);o+=4;const y=t.getUint32(o,!0);o+=4,u.push([m,`#${y.toString(16).padStart(6,"0")}`])}let d=null;if(r){d=[];for(let p=0;p<4;++p)d.push(t.getFloat32(o,!0)),o+=4}let f=null;if(i&&(f=new Uint8Array(this.buffer,o,3),o+=3),e===1)return["RadialAxial","axial",d,u,Array.from(l.slice(0,2)),Array.from(l.slice(2,4)),null,null];if(e===2)return["RadialAxial","radial",d,u,[l[0],l[1]],[l[3],l[4]],l[2],l[5]];if(e===3){const p=this.data[Fs.SHADING_TYPE];let m=null;if(l.length>0){m=ic.slice();for(let y=0,w=l.length;y<w;y+=2)Qt.pointBoundingBox(l[y],l[y+1],m)}return["Mesh",p,l,h,s,m,d,f]}throw new Error(`Unsupported pattern kind: ${e}`)}}var wp;class a9{constructor(t){T(this,wp);C(this,wp,t)}get path(){return Mi.isFloat16ArraySupported?new Float16Array(c(this,wp)):new Float32Array(c(this,wp))}}wp=new WeakMap;function o9(n){if(n instanceof URL)return n;if(typeof n=="string"){if(FA){if(/^[a-z][a-z0-9\-+.]+:/i.test(n))return new URL(n);const e=process.getBuiltinModule("url");return new URL(e.pathToFileURL(n))}const t=URL.parse(n,window.location);if(t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function l9(n){if(FA&&typeof Buffer<"u"&&n instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength)return n;if(typeof n=="string")return PB(n);if(n instanceof ArrayBuffer||ArrayBuffer.isView(n)||typeof n=="object"&&!isNaN(n==null?void 0:n.length))return new Uint8Array(n);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function x2(n){if(typeof n!="string")return null;if(n.endsWith("/"))return n;throw new Error(`Invalid factory url: "${n}" must include trailing slash.`)}const $E=n=>typeof n=="object"&&Number.isInteger(n==null?void 0:n.num)&&n.num>=0&&Number.isInteger(n==null?void 0:n.gen)&&n.gen>=0,c9=n=>typeof n=="object"&&typeof(n==null?void 0:n.name)=="string",RP=GK.bind(null,$E,c9);var Ql,hB;class h9{constructor(){T(this,Ql,new Map);T(this,hB,Promise.resolve())}postMessage(t,e){const r={data:structuredClone(t,e?{transfer:e}:null)};c(this,hB).then(()=>{for(const[i]of c(this,Ql))i.call(this,r)})}addEventListener(t,e,r=null){let i=null;if((r==null?void 0:r.signal)instanceof AbortSignal){const{signal:s}=r;if(s.aborted){Me("LoopbackPort - cannot use an `aborted` signal.");return}const A=()=>this.removeEventListener(t,e);i=()=>s.removeEventListener("abort",A),s.addEventListener("abort",A)}c(this,Ql).set(e,i)}removeEventListener(t,e){const r=c(this,Ql).get(e);r==null||r(),c(this,Ql).delete(e)}terminate(){for(const[,t]of c(this,Ql))t==null||t();c(this,Ql).clear()}}Ql=new WeakMap,hB=new WeakMap;const E2={DATA:1,ERROR:2},Ki={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function X_(){}function Os(n){if(n instanceof cc||n instanceof Fb||n instanceof k_||n instanceof mv||n instanceof k5)return n;switch(n instanceof Error||typeof n=="object"&&n!==null||hr('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),n.name){case"AbortException":return new cc(n.message);case"InvalidPDFException":return new Fb(n.message);case"PasswordException":return new k_(n.message,n.code);case"ResponseException":return new mv(n.message,n.status,n.missing);case"UnknownErrorException":return new k5(n.message,n.details)}return new k5(n.message,n.toString())}var yp,Aa,HP,KP,VP,Oy;class Em{constructor(t,e,r){T(this,Aa);T(this,yp,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=r,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),r.addEventListener("message",_(this,Aa,HP).bind(this),{signal:c(this,yp).signal})}on(t,e){const r=this.actionHandler;if(r[t])throw new Error(`There is already an actionName called "${t}"`);r[t]=e}send(t,e,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},r)}sendWithPromise(t,e,r){const i=this.callbackId++,s=Promise.withResolvers();this.callbackCapabilities[i]=s;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},r)}catch(A){s.reject(A)}return s.promise}sendWithStream(t,e,r,i){const s=this.streamId++,A=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:l=>{const h=Promise.withResolvers();return this.streamControllers[s]={controller:l,startCall:h,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:A,targetName:a,action:t,streamId:s,data:e,desiredSize:l.desiredSize},i),h.promise},pull:l=>{const h=Promise.withResolvers();return this.streamControllers[s].pullCall=h,o.postMessage({sourceName:A,targetName:a,stream:Ki.PULL,streamId:s,desiredSize:l.desiredSize}),h.promise},cancel:l=>{si(l instanceof Error,"cancel must have a valid reason");const h=Promise.withResolvers();return this.streamControllers[s].cancelCall=h,this.streamControllers[s].isClosed=!0,o.postMessage({sourceName:A,targetName:a,stream:Ki.CANCEL,streamId:s,reason:Os(l)}),h.promise}},r)}destroy(){var t;(t=c(this,yp))==null||t.abort(),C(this,yp,null)}}yp=new WeakMap,Aa=new WeakSet,HP=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){_(this,Aa,VP).call(this,t);return}if(t.callback){const r=t.callbackId,i=this.callbackCapabilities[r];if(!i)throw new Error(`Cannot resolve callback ${r}`);if(delete this.callbackCapabilities[r],t.callback===E2.DATA)i.resolve(t.data);else if(t.callback===E2.ERROR)i.reject(Os(t.reason));else throw new Error("Unexpected callback case");return}const e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const r=this.sourceName,i=t.sourceName,s=this.comObj;Promise.try(e,t.data).then(function(A){s.postMessage({sourceName:r,targetName:i,callback:E2.DATA,callbackId:t.callbackId,data:A})},function(A){s.postMessage({sourceName:r,targetName:i,callback:E2.ERROR,callbackId:t.callbackId,reason:Os(A)})});return}if(t.streamId){_(this,Aa,KP).call(this,t);return}e(t.data)},KP=function(t){const e=t.streamId,r=this.sourceName,i=t.sourceName,s=this.comObj,A=this,a=this.actionHandler[t.action],o={enqueue(l,h=1,u){if(this.isCancelled)return;const d=this.desiredSize;this.desiredSize-=h,d>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),s.postMessage({sourceName:r,targetName:i,stream:Ki.ENQUEUE,streamId:e,chunk:l},u)},close(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:r,targetName:i,stream:Ki.CLOSE,streamId:e}),delete A.streamSinks[e])},error(l){si(l instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,s.postMessage({sourceName:r,targetName:i,stream:Ki.ERROR,streamId:e,reason:Os(l)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[e]=o,Promise.try(a,t.data,o).then(function(){s.postMessage({sourceName:r,targetName:i,stream:Ki.START_COMPLETE,streamId:e,success:!0})},function(l){s.postMessage({sourceName:r,targetName:i,stream:Ki.START_COMPLETE,streamId:e,reason:Os(l)})})},VP=function(t){const e=t.streamId,r=this.sourceName,i=t.sourceName,s=this.comObj,A=this.streamControllers[e],a=this.streamSinks[e];switch(t.stream){case Ki.START_COMPLETE:t.success?A.startCall.resolve():A.startCall.reject(Os(t.reason));break;case Ki.PULL_COMPLETE:t.success?A.pullCall.resolve():A.pullCall.reject(Os(t.reason));break;case Ki.PULL:if(!a){s.postMessage({sourceName:r,targetName:i,stream:Ki.PULL_COMPLETE,streamId:e,success:!0});break}a.desiredSize<=0&&t.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=t.desiredSize,Promise.try(a.onPull||X_).then(function(){s.postMessage({sourceName:r,targetName:i,stream:Ki.PULL_COMPLETE,streamId:e,success:!0})},function(l){s.postMessage({sourceName:r,targetName:i,stream:Ki.PULL_COMPLETE,streamId:e,reason:Os(l)})});break;case Ki.ENQUEUE:if(si(A,"enqueue should have stream controller"),A.isClosed)break;A.controller.enqueue(t.chunk);break;case Ki.CLOSE:if(si(A,"close should have stream controller"),A.isClosed)break;A.isClosed=!0,A.controller.close(),_(this,Aa,Oy).call(this,A,e);break;case Ki.ERROR:si(A,"error should have stream controller"),A.controller.error(Os(t.reason)),_(this,Aa,Oy).call(this,A,e);break;case Ki.CANCEL_COMPLETE:t.success?A.cancelCall.resolve():A.cancelCall.reject(Os(t.reason)),_(this,Aa,Oy).call(this,A,e);break;case Ki.CANCEL:if(!a)break;const o=Os(t.reason);Promise.try(a.onCancel||X_,o).then(function(){s.postMessage({sourceName:r,targetName:i,stream:Ki.CANCEL_COMPLETE,streamId:e,success:!0})},function(l){s.postMessage({sourceName:r,targetName:i,stream:Ki.CANCEL_COMPLETE,streamId:e,reason:Os(l)})}),a.sinkCapability.reject(o),a.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},Oy=async function(t,e){var r,i,s;await Promise.allSettled([(r=t.startCall)==null?void 0:r.promise,(i=t.pullCall)==null?void 0:i.promise,(s=t.cancelCall)==null?void 0:s.promise]),delete this.streamControllers[e]};var uB;class GP{constructor({cMapUrl:t=null,standardFontDataUrl:e=null,wasmUrl:r=null}){T(this,uB,Object.freeze({cMapUrl:"CMap",standardFontDataUrl:"font",wasmUrl:"wasm"}));this.cMapUrl=t,this.standardFontDataUrl=e,this.wasmUrl=r}async fetch({kind:t,filename:e}){switch(t){case"cMapUrl":case"standardFontDataUrl":case"wasmUrl":break;default:hr(`Not implemented: ${t}`)}const r=this[t];if(!r)throw new Error(`Ensure that the \`${t}\` API parameter is provided.`);const i=`${r}${e}`;return this._fetch(i,t).catch(s=>{throw new Error(`Unable to load ${c(this,uB)[t]} data at: ${i}`)})}async _fetch(t,e){hr("Abstract method `_fetch` called.")}}uB=new WeakMap;class q_ extends GP{async _fetch(t,e){const r=e==="cMapUrl"&&!t.endsWith(".bcmap")?"text":"bytes",i=await OB(t,r);return i instanceof Uint8Array?i:PB(i)}}var o1;class jP{constructor({enableHWA:t=!1}){T(this,o1,!1);C(this,o1,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(t,e);return{canvas:r,context:r.getContext("2d",{willReadFrequently:!c(this,o1)})}}reset({canvas:t},e,r){if(!t)throw new Error("Canvas is not specified");if(e<=0||r<=0)throw new Error("Invalid canvas size");t.width=e,t.height=r}destroy(t){const{canvas:e}=t;if(!e)throw new Error("Canvas is not specified");e.width=e.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){hr("Abstract method `_createCanvas` called.")}}o1=new WeakMap;class u9 extends jP{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const r=this._document.createElement("canvas");return r.width=t,r.height=e,r}}class $P{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,r,i,s){return"none"}destroy(t=!1){}}var vf,bp,Nl,Pl,ss,wf,yf,$t,Zn,Sm,pg,Dy,mg,WP,WE,vg,Fm,Tm,zE,Im;class f9 extends $P{constructor({docId:e,ownerDocument:r=globalThis.document}){super();T(this,$t);T(this,vf);T(this,bp);T(this,Nl);T(this,Pl);T(this,ss);T(this,wf);T(this,yf,0);C(this,Pl,e),C(this,ss,r)}addFilter(e){if(!e)return"none";let r=c(this,$t,Zn).get(e);if(r)return r;const[i,s,A]=_(this,$t,Dy).call(this,e),a=e.length===1?i:`${i}${s}${A}`;if(r=c(this,$t,Zn).get(a),r)return c(this,$t,Zn).set(e,r),r;const o=`g_${c(this,Pl)}_transfer_map_${Hi(this,yf)._++}`,l=_(this,$t,mg).call(this,o);c(this,$t,Zn).set(e,l),c(this,$t,Zn).set(a,l);const h=_(this,$t,vg).call(this,o);return _(this,$t,Tm).call(this,i,s,A,h),l}addHCMFilter(e,r){var p;const i=`${e}-${r}`,s="base";let A=c(this,$t,Sm).get(s);if((A==null?void 0:A.key)===i||(A?((p=A.filter)==null||p.remove(),A.key=i,A.url="none",A.filter=null):(A={key:i,url:"none",filter:null},c(this,$t,Sm).set(s,A)),!e||!r))return A.url;const a=_(this,$t,Im).call(this,e);e=Qt.makeHexColor(...a);const o=_(this,$t,Im).call(this,r);if(r=Qt.makeHexColor(...o),c(this,$t,pg).style.color="",e==="#000000"&&r==="#ffffff"||e===r)return A.url;const l=new Array(256);for(let m=0;m<=255;m++){const y=m/255;l[m]=y<=.03928?y/12.92:((y+.055)/1.055)**2.4}const h=l.join(","),u=`g_${c(this,Pl)}_hcm_filter`,d=A.filter=_(this,$t,vg).call(this,u);_(this,$t,Tm).call(this,h,h,h,d),_(this,$t,WE).call(this,d);const f=(m,y)=>{const w=a[m]/255,B=o[m]/255,E=new Array(y+1);for(let S=0;S<=y;S++)E[S]=w+S/y*(B-w);return E.join(",")};return _(this,$t,Tm).call(this,f(0,5),f(1,5),f(2,5),d),A.url=_(this,$t,mg).call(this,u),A.url}addAlphaFilter(e){let r=c(this,$t,Zn).get(e);if(r)return r;const[i]=_(this,$t,Dy).call(this,[e]),s=`alpha_${i}`;if(r=c(this,$t,Zn).get(s),r)return c(this,$t,Zn).set(e,r),r;const A=`g_${c(this,Pl)}_alpha_map_${Hi(this,yf)._++}`,a=_(this,$t,mg).call(this,A);c(this,$t,Zn).set(e,a),c(this,$t,Zn).set(s,a);const o=_(this,$t,vg).call(this,A);return _(this,$t,zE).call(this,i,o),a}addLuminosityFilter(e){let r=c(this,$t,Zn).get(e||"luminosity");if(r)return r;let i,s;if(e?([i]=_(this,$t,Dy).call(this,[e]),s=`luminosity_${i}`):s="luminosity",r=c(this,$t,Zn).get(s),r)return c(this,$t,Zn).set(e,r),r;const A=`g_${c(this,Pl)}_luminosity_map_${Hi(this,yf)._++}`,a=_(this,$t,mg).call(this,A);c(this,$t,Zn).set(e,a),c(this,$t,Zn).set(s,a);const o=_(this,$t,vg).call(this,A);return _(this,$t,WP).call(this,o),e&&_(this,$t,zE).call(this,i,o),a}addHighlightHCMFilter(e,r,i,s,A){var B;const a=`${r}-${i}-${s}-${A}`;let o=c(this,$t,Sm).get(e);if((o==null?void 0:o.key)===a||(o?((B=o.filter)==null||B.remove(),o.key=a,o.url="none",o.filter=null):(o={key:a,url:"none",filter:null},c(this,$t,Sm).set(e,o)),!r||!i))return o.url;const[l,h]=[r,i].map(_(this,$t,Im).bind(this));let u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),d=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),[f,p]=[s,A].map(_(this,$t,Im).bind(this));d<u&&([u,d,f,p]=[d,u,p,f]),c(this,$t,pg).style.color="";const m=(E,S,I)=>{const L=new Array(256),k=(d-u)/I,H=E/255,Q=(S-E)/(255*I);let W=0;for(let U=0;U<=I;U++){const D=Math.round(u+U*k),j=H+U*Q;for(let V=W;V<=D;V++)L[V]=j;W=D+1}for(let U=W;U<256;U++)L[U]=L[W-1];return L.join(",")},y=`g_${c(this,Pl)}_hcm_${e}_filter`,w=o.filter=_(this,$t,vg).call(this,y);return _(this,$t,WE).call(this,w),_(this,$t,Tm).call(this,m(f[0],p[0],5),m(f[1],p[1],5),m(f[2],p[2],5),w),o.url=_(this,$t,mg).call(this,y),o.url}destroy(e=!1){var r,i,s,A;e&&((r=c(this,wf))!=null&&r.size)||((i=c(this,Nl))==null||i.parentNode.parentNode.remove(),C(this,Nl,null),(s=c(this,bp))==null||s.clear(),C(this,bp,null),(A=c(this,wf))==null||A.clear(),C(this,wf,null),C(this,yf,0))}}vf=new WeakMap,bp=new WeakMap,Nl=new WeakMap,Pl=new WeakMap,ss=new WeakMap,wf=new WeakMap,yf=new WeakMap,$t=new WeakSet,Zn=function(){return c(this,bp)||C(this,bp,new Map)},Sm=function(){return c(this,wf)||C(this,wf,new Map)},pg=function(){if(!c(this,Nl)){const e=c(this,ss).createElement("div"),{style:r}=e;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const i=c(this,ss).createElementNS(fl,"svg");i.setAttribute("width",0),i.setAttribute("height",0),C(this,Nl,c(this,ss).createElementNS(fl,"defs")),e.append(i),i.append(c(this,Nl)),c(this,ss).body.append(e)}return c(this,Nl)},Dy=function(e){if(e.length===1){const l=e[0],h=new Array(256);for(let d=0;d<256;d++)h[d]=l[d]/255;const u=h.join(",");return[u,u,u]}const[r,i,s]=e,A=new Array(256),a=new Array(256),o=new Array(256);for(let l=0;l<256;l++)A[l]=r[l]/255,a[l]=i[l]/255,o[l]=s[l]/255;return[A.join(","),a.join(","),o.join(",")]},mg=function(e){if(c(this,vf)===void 0){C(this,vf,"");const r=c(this,ss).URL;r!==c(this,ss).baseURI&&(Cw(r)?Me('#createUrl: ignore "data:"-URL for performance reasons.'):C(this,vf,c4(r,"")))}return`url(${c(this,vf)}#${e})`},WP=function(e){const r=c(this,ss).createElementNS(fl,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(r)},WE=function(e){const r=c(this,ss).createElementNS(fl,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(r)},vg=function(e){const r=c(this,ss).createElementNS(fl,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",e),c(this,$t,pg).append(r),r},Fm=function(e,r,i){const s=c(this,ss).createElementNS(fl,r);s.setAttribute("type","discrete"),s.setAttribute("tableValues",i),e.append(s)},Tm=function(e,r,i,s){const A=c(this,ss).createElementNS(fl,"feComponentTransfer");s.append(A),_(this,$t,Fm).call(this,A,"feFuncR",e),_(this,$t,Fm).call(this,A,"feFuncG",r),_(this,$t,Fm).call(this,A,"feFuncB",i)},zE=function(e,r){const i=c(this,ss).createElementNS(fl,"feComponentTransfer");r.append(i),_(this,$t,Fm).call(this,i,"feFuncA",e)},Im=function(e){return c(this,$t,pg).style.color=e,S0(getComputedStyle(c(this,$t,pg)).getPropertyValue("color"))};FA&&Me("Please use the `legacy` build in Node.js environments.");async function d9(n){const e=await process.getBuiltinModule("fs/promises").readFile(n);return new Uint8Array(e)}class g9 extends $P{}class p9 extends jP{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(typeof document>"u"?require("url").pathToFileURL(__filename).href:a5&&a5.tagName.toUpperCase()==="SCRIPT"&&a5.src||new URL("cad-pdf-plugin.umd.cjs",document.baseURI).href)("@napi-rs/canvas").createCanvas(t,e)}}class m9 extends GP{async _fetch(t,e){return d9(t)}}const v9=`
|
|
220
|
+
struct Uniforms {
|
|
221
|
+
offsetX : f32,
|
|
222
|
+
offsetY : f32,
|
|
223
|
+
scaleX : f32,
|
|
224
|
+
scaleY : f32,
|
|
225
|
+
paddedWidth : f32,
|
|
226
|
+
paddedHeight : f32,
|
|
227
|
+
borderSize : f32,
|
|
228
|
+
_pad : f32,
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
@group(0) @binding(0) var<uniform> u : Uniforms;
|
|
232
|
+
|
|
233
|
+
struct VertexInput {
|
|
234
|
+
@location(0) position : vec2<f32>,
|
|
235
|
+
@location(1) color : vec4<f32>,
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
struct VertexOutput {
|
|
239
|
+
@builtin(position) position : vec4<f32>,
|
|
240
|
+
@location(0) color : vec3<f32>,
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
@vertex
|
|
244
|
+
fn vs_main(in : VertexInput) -> VertexOutput {
|
|
245
|
+
var out : VertexOutput;
|
|
246
|
+
let cx = (in.position.x + u.offsetX) * u.scaleX;
|
|
247
|
+
let cy = (in.position.y + u.offsetY) * u.scaleY;
|
|
248
|
+
out.position = vec4<f32>(
|
|
249
|
+
((cx + u.borderSize) / u.paddedWidth) * 2.0 - 1.0,
|
|
250
|
+
1.0 - ((cy + u.borderSize) / u.paddedHeight) * 2.0,
|
|
251
|
+
0.0,
|
|
252
|
+
1.0
|
|
253
|
+
);
|
|
254
|
+
out.color = in.color.rgb;
|
|
255
|
+
return out;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@fragment
|
|
259
|
+
fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
260
|
+
return vec4<f32>(in.color, 1.0);
|
|
261
|
+
}
|
|
262
|
+
`;var fB,Ml,bf,Bp,dB,zP;class w9{constructor(){T(this,dB);T(this,fB,null);T(this,Ml,null);T(this,bf,null);T(this,Bp,null)}init(){return c(this,fB)||C(this,fB,_(this,dB,zP).call(this))}get isReady(){return c(this,Ml)!==null}loadMeshShader(){if(!c(this,Ml)||c(this,bf))return;const t=c(this,Ml).createShaderModule({code:v9});C(this,bf,c(this,Ml).createRenderPipeline({layout:"auto",vertex:{module:t,entryPoint:"vs_main",buffers:[{arrayStride:2*4,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]},{arrayStride:4,attributes:[{shaderLocation:1,offset:0,format:"unorm8x4"}]}]},fragment:{module:t,entryPoint:"fs_main",targets:[{format:c(this,Bp)}]},primitive:{topology:"triangle-list"}}))}draw(t,e,r,i,s,A,a,o){this.loadMeshShader();const l=c(this,Ml),{offsetX:h,offsetY:u,scaleX:d,scaleY:f}=i,p=l.createBuffer({size:Math.max(t.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});t.byteLength>0&&l.queue.writeBuffer(p,0,t);const m=l.createBuffer({size:Math.max(e.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});e.byteLength>0&&l.queue.writeBuffer(m,0,e);const y=l.createBuffer({size:8*4,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST});l.queue.writeBuffer(y,0,new Float32Array([h,u,d,f,A,a,o,0]));const w=l.createBindGroup({layout:c(this,bf).getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:y}}]}),B=new OffscreenCanvas(A,a),E=B.getContext("webgpu");E.configure({device:l,format:c(this,Bp),alphaMode:s?"opaque":"premultiplied"});const S=s?{r:s[0]/255,g:s[1]/255,b:s[2]/255,a:1}:{r:0,g:0,b:0,a:0},I=l.createCommandEncoder(),L=I.beginRenderPass({colorAttachments:[{view:E.getCurrentTexture().createView(),clearValue:S,loadOp:"clear",storeOp:"store"}]});return r>0&&(L.setPipeline(c(this,bf)),L.setBindGroup(0,w),L.setVertexBuffer(0,p),L.setVertexBuffer(1,m),L.draw(r)),L.end(),l.queue.submit([I.finish()]),p.destroy(),m.destroy(),y.destroy(),B.transferToImageBitmap()}}fB=new WeakMap,Ml=new WeakMap,bf=new WeakMap,Bp=new WeakMap,dB=new WeakSet,zP=async function(){var t;if(!((t=globalThis.navigator)!=null&&t.gpu))return!1;try{const e=await navigator.gpu.requestAdapter();return e?(C(this,Bp,navigator.gpu.getPreferredCanvasFormat()),C(this,Ml,await e.requestDevice()),!0):!1}catch{return!1}};const KB=new w9;function y9(){return KB.init()}function b9(){return KB.isReady}function B9(){KB.loadMeshShader()}function C9(n,t,e,r,i,s,A,a){return KB.draw(n,t,e,r,i,s,A,a)}const Pn={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Ry(n,t){if(!t)return;const e=t[2]-t[0],r=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],e,r),n.clip(i)}class g4{isModifyingCurrentTransform(){return!1}getPattern(){hr("Abstract method `getPattern` called.")}}class x9 extends g4{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}isOriginBased(){return this._p0[0]===0&&this._p0[1]===0&&(!this.isRadial()||this._p1[0]===0&&this._p1[1]===0)}isRadial(){return this._type==="radial"}areConic(){if(!this.isRadial())return!1;const t=Math.hypot(this._p0[0]-this._p1[0],this._p0[1]-this._p1[1]);return t+this._r1>this._r0&&t+this._r0>this._r1}_createGradient(t,e=null){let r,i=this._p0,s=this._p1;if(e&&(i=i.slice(),s=s.slice(),Qt.applyTransform(i,e),Qt.applyTransform(s,e)),this._type==="axial")r=t.createLinearGradient(i[0],i[1],s[0],s[1]);else if(this._type==="radial"){let A=this._r0,a=this._r1;if(e){const o=new Float32Array(2);Qt.singularValueDecompose2dScale(e,o),A*=o[0],a*=o[0]}r=t.createRadialGradient(i[0],i[1],A,s[0],s[1],a)}for(const A of this._colorStops)r.addColorStop(A[0],A[1]);return r}_createReversedGradient(t,e=null){let r=this._p1,i=this._p0;e&&(r=r.slice(),i=i.slice(),Qt.applyTransform(r,e),Qt.applyTransform(i,e));let s=this._r1,A=this._r0;if(e){const l=new Float32Array(2);Qt.singularValueDecompose2dScale(e,l),s*=l[0],A*=l[0]}const a=t.createRadialGradient(r[0],r[1],s,i[0],i[1],A),o=this._colorStops.map(([l,h])=>[1-l,h]).reverse();for(const[l,h]of o)a.addColorStop(l,h);return a}getPattern(t,e,r,i){let s;if(i===Pn.STROKE||i===Pn.FILL){if(this.isOriginBased()){let d=Qt.transform(r,e.baseTransform);this.matrix&&(d=Qt.transform(d,this.matrix));const f=.001,p=Math.hypot(d[0],d[1]),m=Math.hypot(d[2],d[3]),y=(d[0]*d[2]+d[1]*d[3])/(p*m);if(Math.abs(y)<f)if(this.isRadial()){if(Math.abs(p-m)<f)return this._createGradient(t,d)}else return this._createGradient(t,d)}const A=e.current.getClippedPathBoundingBox(i,$r(t))||[0,0,0,0],a=Math.ceil(A[2]-A[0])||1,o=Math.ceil(A[3]-A[1])||1,l=e.canvasFactory.create(a,o),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-A[0],-A[1]),r=Qt.transform(r,[1,0,0,1,A[0],A[1]]),h.transform(...e.baseTransform),this.matrix&&h.transform(...this.matrix),Ry(h,this._bbox),this.areConic()&&(h.fillStyle=this._createReversedGradient(h),h.fill()),h.fillStyle=this._createGradient(h),h.fill(),s=t.createPattern(l.canvas,"no-repeat"),e.canvasFactory.destroy(l);const u=new DOMMatrix(r);s.setTransform(u)}else this.areConic()&&(t.save(),Ry(t,this._bbox),t.fillStyle=this._createReversedGradient(t),t.fillRect(-1e10,-1e10,2e10,2e10),t.restore()),Ry(t,this._bbox),s=this._createGradient(t);return s}}function E9(n,t,e,r,i,s,A,a){const o=t.coords,l=t.colors,h=n.data,u=n.width*4;let d;o[e*2+1]>o[r*2+1]&&(d=e,e=r,r=d,d=s,s=A,A=d),o[r*2+1]>o[i*2+1]&&(d=r,r=i,i=d,d=A,A=a,a=d),o[e*2+1]>o[r*2+1]&&(d=e,e=r,r=d,d=s,s=A,A=d);const f=(o[e*2]+t.offsetX)*t.scaleX,p=(o[e*2+1]+t.offsetY)*t.scaleY,m=(o[r*2]+t.offsetX)*t.scaleX,y=(o[r*2+1]+t.offsetY)*t.scaleY,w=(o[i*2]+t.offsetX)*t.scaleX,B=(o[i*2+1]+t.offsetY)*t.scaleY;if(p>=B)return;const E=l[s*4],S=l[s*4+1],I=l[s*4+2],L=l[A*4],k=l[A*4+1],H=l[A*4+2],Q=l[a*4],W=l[a*4+1],U=l[a*4+2],D=Math.round(p),j=Math.round(B);let V,st,rt,it,At,ut,vt,mt;for(let M=D;M<=j;M++){if(M<y){const ot=M<p?0:(p-M)/(p-y);V=f-(f-m)*ot,st=E-(E-L)*ot,rt=S-(S-k)*ot,it=I-(I-H)*ot}else{let ot;M>B?ot=1:y===B?ot=0:ot=(y-M)/(y-B),V=m-(m-w)*ot,st=L-(L-Q)*ot,rt=k-(k-W)*ot,it=H-(H-U)*ot}let $;M<p?$=0:M>B?$=1:$=(p-M)/(p-B),At=f-(f-w)*$,ut=E-(E-Q)*$,vt=S-(S-W)*$,mt=I-(I-U)*$;const q=Math.round(Math.min(V,At)),tt=Math.round(Math.max(V,At));let et=u*M+q*4;for(let ot=q;ot<=tt;ot++)$=(V-ot)/(V-At),$<0?$=0:$>1&&($=1),h[et++]=st-(st-ut)*$|0,h[et++]=rt-(rt-vt)*$|0,h[et++]=it-(it-mt)*$|0,h[et++]=255}}class S9 extends g4{constructor(t){super(),this._posData=t[2],this._colData=t[3],this._vertexCount=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null,B9()}_createMeshCanvas(t,e,r){const a=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-a,h=Math.ceil(this._bounds[3])-o,u=Math.min(Math.ceil(Math.abs(l*t[0]*1.1)),3e3)||1,d=Math.min(Math.ceil(Math.abs(h*t[1]*1.1)),3e3)||1,f=l?l/u:1,p=h?h/d:1,m={coords:this._posData,colors:this._colData,offsetX:-a,offsetY:-o,scaleX:1/f,scaleY:1/p},y=u+2*2,w=d+2*2,B=r.create(y,w);if(b9()&&this._vertexCount>48)B.context.drawImage(C9(this._posData,this._colData,this._vertexCount,m,e,y,w,2),0,0);else{const E=B.context.createImageData(u,d);if(e){const S=E.data;for(let I=0,L=S.length;I<L;I+=4)S[I]=e[0],S[I+1]=e[1],S[I+2]=e[2],S[I+3]=255}for(let S=0,I=this._vertexCount;S<I;S+=3)E9(E,m,S,S+1,S+2,S,S+1,S+2);B.context.putImageData(E,2,2)}return{canvas:B.canvas,offsetX:a-2*f,offsetY:o-2*p,scaleX:f,scaleY:p}}isModifyingCurrentTransform(){return!0}getPattern(t,e,r,i){Ry(t,this._bbox);const s=new Float32Array(2);if(i===Pn.SHADING)Qt.singularValueDecompose2dScale($r(t),s);else if(this.matrix){Qt.singularValueDecompose2dScale(this.matrix,s);const[o,l]=s;Qt.singularValueDecompose2dScale(e.baseTransform,s),s[0]*=o,s[1]*=l}else Qt.singularValueDecompose2dScale(e.baseTransform,s);const A=this._createMeshCanvas(s,i===Pn.SHADING?null:this._background,e.canvasFactory);i!==Pn.SHADING&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(A.offsetX,A.offsetY),t.scale(A.scaleX,A.scaleY);const a=t.createPattern(A.canvas,"no-repeat");return e.canvasFactory.destroy(A),a}}class F9 extends g4{getPattern(){return"hotpink"}}function T9(n){switch(n[0]){case"RadialAxial":return new x9(n);case"Mesh":return new S9(n);case"Dummy":return new F9}throw new Error(`Unknown IR type: ${n[0]}`)}const Y_={COLORED:1,UNCOLORED:2},gB=class gB{constructor(t,e,r,i){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.needsIsolation=t[9]??!0,this.ctx=e,this.canvasGraphicsFactory=r,this.baseTransform=i,this.patternBaseMatrix=this.matrix?Qt.transform(i,this.matrix):i}canSkipPatternCanvas([t,e,r,i]){const[s,A,a,o]=this.bbox,l=Math.abs(this.xstep),h=Math.abs(this.ystep);if(t>l+1e-6||e>h+1e-6)return null;const u=Math.floor((r-a)/l)+1,d=Math.ceil((r+t-s)/l)-1,f=Math.floor((i-o)/h)+1,p=Math.ceil((i+e-A)/h)-1;return d<=u&&p<=f?[u,f]:null}updatePatternDims(t,e){const r=Qt.inverseTransform(this.patternBaseMatrix),i=[t[0],t[1]],s=[t[2],t[3]];Qt.applyTransform(i,r),Qt.applyTransform(s,r),e[0]=Math.abs(s[0]-i[0]),e[1]=Math.abs(s[1]-i[1]),e[2]=Math.min(i[0],s[0]),e[3]=Math.min(i[1],s[1])}_renderTileCanvas(t,e,r,i){var d,f;const[s,A,a,o]=this.bbox,l=t.canvasFactory.create(r.size,i.size),h=l.context,u=this.canvasGraphicsFactory.createCanvasGraphics(h,e);return u.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(u,this.paintType,this.color),h.translate(-r.scale*s,-i.scale*A),u.transform(0,r.scale,0,0,i.scale,0,0),h.save(),(d=u.dependencyTracker)==null||d.save(),this.clipBbox(u,s,A,a,o),u.baseTransform=$r(u.ctx),u.executeOperatorList(this.operatorList),u.endDrawing(),(f=u.dependencyTracker)==null||f.restore(),h.restore(),l}_getCombinedScales(){const t=new Float32Array(2);Qt.singularValueDecompose2dScale(this.matrix,t);const[e,r]=t;return Qt.singularValueDecompose2dScale(this.baseTransform,t),[e*t[0],r*t[1]]}drawPattern(t,e,r=!1,[i,s],A){const[a,o,l,h]=this.bbox,u=t.dependencyTracker;if(u&&(t.dependencyTracker=new Bv(u,A)),t.save(),r?t.ctx.clip(e,"evenodd"):t.ctx.clip(e),t.ctx.setTransform(...this.patternBaseMatrix),t.ctx.translate(i*this.xstep,s*this.ystep),this.needsIsolation||t.ctx.globalAlpha!==1||t.ctx.globalCompositeOperation!=="source-over"||t.inSMaskMode){const d=l-a,f=h-o,[p,m]=this._getCombinedScales(),y=this.getSizeAndScale(d,this.ctx.canvas.width,p),w=this.getSizeAndScale(f,this.ctx.canvas.height,m),B=this._renderTileCanvas(t,A,y,w);t.ctx.drawImage(B.canvas,a,o,d,f),t.canvasFactory.destroy(B)}else this.setFillAndStrokeStyleToContext(t,this.paintType,this.color),this.clipBbox(t,a,o,l,h),t.baseTransformStack.push(t.baseTransform),t.baseTransform=$r(t.ctx),t.executeOperatorList(this.operatorList),t.baseTransform=t.baseTransformStack.pop();t.restore(),u&&(t.dependencyTracker=u)}createPatternCanvas(t,e){const[r,i,s,A]=this.bbox,a=s-r,o=A-i;let{xstep:l,ystep:h}=this;l=Math.abs(l),h=Math.abs(h),NB("TilingType: "+this.tilingType);const[u,d]=this._getCombinedScales();let f=a,p=o,m=!1,y=!1;Math.ceil(l*u)>=Math.ceil(a*u)?f=l:m=!0,Math.ceil(h*d)>=Math.ceil(o*d)?p=h:y=!0;const w=this.getSizeAndScale(f,this.ctx.canvas.width,u),B=this.getSizeAndScale(p,this.ctx.canvas.height,d),E=this._renderTileCanvas(t,e,w,B);if(m||y){const S=E.canvas;m&&(f=l),y&&(p=h);const I=this.getSizeAndScale(f,this.ctx.canvas.width,u),L=this.getSizeAndScale(p,this.ctx.canvas.height,d),k=I.size,H=L.size,Q=t.canvasFactory.create(k,H),W=Q.context,U=m?Math.floor(a/l):0,D=y?Math.floor(o/h):0;for(let j=0;j<=U;j++)for(let V=0;V<=D;V++)W.drawImage(S,k*j,H*V,k,H,0,0,k,H);return t.canvasFactory.destroy(E),{canvas:Q.canvas,canvasEntry:Q,scaleX:I.scale,scaleY:L.scale,offsetX:r,offsetY:i}}return{canvas:E.canvas,canvasEntry:E,scaleX:w.scale,scaleY:B.scale,offsetX:r,offsetY:i}}getSizeAndScale(t,e,r){const i=Math.max(gB.MAX_PATTERN_SIZE,e);let s=Math.ceil(t*r);return s>=i?s=i:r=s/t,{scale:r,size:s}}clipBbox(t,e,r,i,s){const A=i-e,a=s-r,o=new Path2D;o.rect(e,r,A,a),Qt.axialAlignedBoundingBox([e,r,i,s],$r(t.ctx),t.current.minMax),t.ctx.clip(o),t.current.updateClipFromPath()}setFillAndStrokeStyleToContext(t,e,r){const i=t.ctx,s=t.current;switch(s.patternFill=s.patternStroke=!1,e){case Y_.COLORED:const{fillStyle:A,strokeStyle:a}=this.ctx;i.fillStyle=s.fillColor=A,i.strokeStyle=s.strokeColor=a;break;case Y_.UNCOLORED:i.fillStyle=i.strokeStyle=r,s.fillColor=s.strokeColor=r;break;default:throw new RK(`Unsupported paint type: ${e}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,e,r,i,s){const A=i!==Pn.SHADING?Qt.transform(r,this.patternBaseMatrix):r,a=this.createPatternCanvas(e,s);let o=new DOMMatrix(A);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return e.canvasFactory.destroy(a.canvasEntry),l.setTransform(o),l}};ct(gB,"MAX_PATTERN_SIZE",3e3);let rv=gB;function I9({src:n,srcPos:t=0,dest:e,width:r,height:i,nonBlackColor:s=4294967295,inverseDecode:A=!1}){const a=Mi.isLittleEndian?4278190080:255,[o,l]=A?[s,a]:[a,s],h=r>>3,u=r&7,d=o^l,f=n.length;e=new Uint32Array(e.buffer);let p=0;for(let m=0;m<i;++m){for(const w=t+h;t<w;++t,p+=8){const B=n[t];e[p]=o^-(B>>7&1)&d,e[p+1]=o^-(B>>6&1)&d,e[p+2]=o^-(B>>5&1)&d,e[p+3]=o^-(B>>4&1)&d,e[p+4]=o^-(B>>3&1)&d,e[p+5]=o^-(B>>2&1)&d,e[p+6]=o^-(B>>1&1)&d,e[p+7]=o^-(B&1)&d}if(u===0)continue;const y=t<f?n[t++]:255;for(let w=0;w<u;++w,++p)e[p]=o^-(y>>7-w&1)&d}return{srcPos:t,destPos:p}}const J_=16,Z_=100,_9=15,tU=10,js=16,D5=new DOMMatrix,TA=new Float32Array(2);function U9(n,t){if(n._removeMirroring)throw new Error("Context is already forwarding operations.");n.__originalSave=n.save,n.__originalRestore=n.restore,n.__originalRotate=n.rotate,n.__originalScale=n.scale,n.__originalTranslate=n.translate,n.__originalTransform=n.transform,n.__originalSetTransform=n.setTransform,n.__originalResetTransform=n.resetTransform,n.__originalClip=n.clip,n.__originalMoveTo=n.moveTo,n.__originalLineTo=n.lineTo,n.__originalBezierCurveTo=n.bezierCurveTo,n.__originalRect=n.rect,n.__originalClosePath=n.closePath,n.__originalBeginPath=n.beginPath,n._removeMirroring=()=>{n.save=n.__originalSave,n.restore=n.__originalRestore,n.rotate=n.__originalRotate,n.scale=n.__originalScale,n.translate=n.__originalTranslate,n.transform=n.__originalTransform,n.setTransform=n.__originalSetTransform,n.resetTransform=n.__originalResetTransform,n.clip=n.__originalClip,n.moveTo=n.__originalMoveTo,n.lineTo=n.__originalLineTo,n.bezierCurveTo=n.__originalBezierCurveTo,n.rect=n.__originalRect,n.closePath=n.__originalClosePath,n.beginPath=n.__originalBeginPath,delete n._removeMirroring},n.save=function(){t.save(),this.__originalSave()},n.restore=function(){t.restore(),this.__originalRestore()},n.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},n.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},n.transform=function(e,r,i,s,A,a){t.transform(e,r,i,s,A,a),this.__originalTransform(e,r,i,s,A,a)},n.setTransform=function(e,r,i,s,A,a){r===void 0?(t.setTransform(e),this.__originalSetTransform(e)):(t.setTransform(e,r,i,s,A,a),this.__originalSetTransform(e,r,i,s,A,a))},n.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},n.rotate=function(e){t.rotate(e),this.__originalRotate(e)},n.clip=function(e){t.clip(e),this.__originalClip(e)},n.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},n.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},n.bezierCurveTo=function(e,r,i,s,A,a){t.bezierCurveTo(e,r,i,s,A,a),this.__originalBezierCurveTo(e,r,i,s,A,a)},n.rect=function(e,r,i,s){t.rect(e,r,i,s),this.__originalRect(e,r,i,s)},n.closePath=function(){t.closePath(),this.__originalClosePath()},n.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}function S2(n,t,e,r,i,s,A,a,o,l){const[h,u,d,f,p,m]=$r(n);if(u===0&&d===0){const B=A*h+p,E=Math.round(B),S=a*f+m,I=Math.round(S),L=(A+o)*h+p,k=Math.abs(Math.round(L)-E)||1,H=(a+l)*f+m,Q=Math.abs(Math.round(H)-I)||1;return n.setTransform(Math.sign(h),0,0,Math.sign(f),E,I),n.drawImage(t,e,r,i,s,0,0,k,Q),n.setTransform(h,u,d,f,p,m),[k,Q]}if(h===0&&f===0){const B=a*d+p,E=Math.round(B),S=A*u+m,I=Math.round(S),L=(a+l)*d+p,k=Math.abs(Math.round(L)-E)||1,H=(A+o)*u+m,Q=Math.abs(Math.round(H)-I)||1;return n.setTransform(0,Math.sign(u),Math.sign(d),0,E,I),n.drawImage(t,e,r,i,s,0,0,Q,k),n.setTransform(h,u,d,f,p,m),[Q,k]}n.drawImage(t,e,r,i,s,A,a,o,l);const y=Math.hypot(h,u),w=Math.hypot(d,f);return[y*o,w*l]}class eU{constructor(t,e){ct(this,"alphaIsShape",!1);ct(this,"fontSize",0);ct(this,"fontSizeScale",1);ct(this,"textMatrix",null);ct(this,"textMatrixScale",1);ct(this,"fontMatrix",bE);ct(this,"leading",0);ct(this,"x",0);ct(this,"y",0);ct(this,"lineX",0);ct(this,"lineY",0);ct(this,"charSpacing",0);ct(this,"wordSpacing",0);ct(this,"textHScale",1);ct(this,"textRenderingMode",en.FILL);ct(this,"textRise",0);ct(this,"fillColor","#000000");ct(this,"strokeColor","#000000");ct(this,"tilingPatternDims",null);ct(this,"patternFill",!1);ct(this,"patternStroke",!1);ct(this,"fillAlpha",1);ct(this,"strokeAlpha",1);ct(this,"lineWidth",1);ct(this,"activeSMask",null);ct(this,"transferMaps","none");ct(this,"minMax",Ou.slice());this.clipBox=new Float32Array([0,0,t,e])}clone(){var e;const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t.tilingPatternDims=(e=this.tilingPatternDims)==null?void 0:e.slice(),t}getPathBoundingBox(t=Pn.FILL,e=null){const r=this.minMax.slice();if(t===Pn.STROKE){e||hr("Stroke bounding box must include transform."),Qt.singularValueDecompose2dScale(e,TA);const i=TA[0]*this.lineWidth/2,s=TA[1]*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}updateClipFromPath(){const t=Qt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(Ou,0)}getClippedPathBoundingBox(t=Pn.FILL,e=null){return Qt.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function rU(n,t){if(t instanceof ImageData){n.putImageData(t,0,0);return}const e=t.height,r=t.width,i=e%js,s=(e-i)/js,A=i===0?s:s+1,a=n.createImageData(r,js);let o=0,l;const h=t.data,u=a.data;let d,f,p,m;if(t.kind===tv.GRAYSCALE_1BPP){const y=h.byteLength,w=new Uint32Array(u.buffer,0,u.byteLength>>2),B=w.length,E=r+7>>3,S=4294967295,I=Mi.isLittleEndian?4278190080:255;for(d=0;d<A;d++){for(p=d<s?js:i,l=0,f=0;f<p;f++){const L=y-o;let k=0;const H=L>E?r:L*8-7,Q=H&-8;let W=0,U=0;for(;k<Q;k+=8)U=h[o++],w[l++]=U&128?S:I,w[l++]=U&64?S:I,w[l++]=U&32?S:I,w[l++]=U&16?S:I,w[l++]=U&8?S:I,w[l++]=U&4?S:I,w[l++]=U&2?S:I,w[l++]=U&1?S:I;for(;k<H;k++)W===0&&(U=h[o++],W=128),w[l++]=U&W?S:I,W>>=1}for(;l<B;)w[l++]=0;n.putImageData(a,0,d*js)}}else if(t.kind===tv.RGBA_32BPP){for(f=0,m=r*js*4,d=0;d<s;d++)u.set(h.subarray(o,o+m)),o+=m,n.putImageData(a,0,f),f+=js;d<A&&(m=r*i*4,u.set(h.subarray(o,o+m)),n.putImageData(a,0,f))}else if(t.kind===tv.RGB_24BPP)for(p=js,m=r*p,d=0;d<A;d++){for(d>=s&&(p=i,m=r*p),l=0,f=m;f--;)u[l++]=h[o++],u[l++]=h[o++],u[l++]=h[o++],u[l++]=255;n.putImageData(a,0,d*js)}else throw new Error(`bad image kind: ${t.kind}`)}function iU(n,t){if(t.bitmap){n.drawImage(t.bitmap,0,0);return}const e=t.height,r=t.width,i=e%js,s=(e-i)/js,A=i===0?s:s+1,a=n.createImageData(r,js);let o=0;const l=t.data,h=a.data;for(let u=0;u<A;u++){const d=u<s?js:i;({srcPos:o}=I9({src:l,srcPos:o,dest:h,width:r,height:d,nonBlackColor:0})),n.putImageData(a,0,u*js)}}function rm(n,t){const e=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of e)n[r]!==void 0&&(t[r]=n[r]);n.setLineDash!==void 0&&(t.setLineDash(n.getLineDash()),t.lineDashOffset=n.lineDashOffset)}function F2(n){n.strokeStyle=n.fillStyle="#000000",n.fillRule="nonzero",n.globalAlpha=1,n.lineWidth=1,n.lineCap="butt",n.lineJoin="miter",n.miterLimit=10,n.globalCompositeOperation="source-over",n.font="10px sans-serif",n.setLineDash!==void 0&&(n.setLineDash([]),n.lineDashOffset=0);const{filter:t}=n;t!=="none"&&t!==""&&(n.filter="none")}function nU(n,t){if(t)return!0;Qt.singularValueDecompose2dScale(n,TA);const e=Math.fround(Ga.pixelRatio*hc.PDF_TO_CSS_UNITS);return TA[0]<=e&&TA[1]<=e}const L9=["butt","round","square"],Q9=["miter","round","bevel"],N9={},sU={};var ja,XE,qE,YE;const CT=class CT{constructor(t,e,r,i,s,{optionalContentConfig:A,markedContentStack:a=null},o,l,h,u){T(this,ja);this.ctx=t,this.current=new eU(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.commonObjs=e,this.objs=r,this.canvasFactory=i,this.filterFactory=s,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.tempSMask=null,this.smaskGroupCanvases=[],this.smaskPreparedEntry=null,this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=A,this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=h??null,this.imagesTracker=u??null}getObject(t,e,r=null){var i;return typeof e=="string"?((i=this.dependencyTracker)==null||i.recordNamedDependency(t,e),e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e)):r}beginDrawing({transform:t,viewport:e,transparency:r=!1,background:i=null}){const s=this.ctx.canvas.width,A=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,s,A),this.ctx.fillStyle=a,r){const o=this.transparentCanvasEntry=this.canvasFactory.create(s,A);this.compositeCtx=this.ctx,{canvas:this.transparentCanvas,context:this.ctx}=o,this.ctx.save(),this.ctx.transform(...$r(this.compositeCtx))}this.ctx.save(),F2(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[3]),this.ctx.transform(...e.transform),this.viewportScale=e.scale,this.baseTransform=$r(this.ctx)}executeOperatorList(t,e,r,i,s){var w;const A=t.argsArray,a=t.fnArray;let o=e||0;const l=A.length;if(l===o)return o;const h=l-o>tU&&typeof r=="function",u=h?Date.now()+_9:0;let d=0;const f=this.commonObjs,p=this.objs;let m,y;for(;;){if(i!==void 0){if(o===i.nextBreakPoint)return i.breakIt(o,r),o;if(i.shouldSkip(o)){if(++o===l)return o;continue}}if(!s||s(o))if(m=a[o],y=A[o]??null,m!==Oo.dependency)y===null?this[m](o):this[m](o,...y);else for(const B of y){(w=this.dependencyTracker)==null||w.recordNamedData(B,o);const E=B.startsWith("g_")?f:p;if(!E.has(B))return E.get(B,r),o}if(o++,o===l)return o;if(h&&++d>tU){if(Date.now()>u)return r(),o;d=0}}}endDrawing(){_(this,ja,XE).call(this);for(const t of this.smaskGroupCanvases)this.canvasFactory.destroy(t);this.smaskGroupCanvases.length=0,this._clearPreparedSMask(),this.tempSMask=null,this.smaskStack.length=0,this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),_(this,ja,qE).call(this)}_scaleImage(t,e){const r=t.width??t.displayWidth,i=t.height??t.displayHeight,s=Math.max(Math.hypot(e[0],e[1]),1),A=Math.max(Math.hypot(e[2],e[3]),1),a=[];let o=s,l=A,h=r,u=i;for(;o>2&&h>1||l>2&&u>1;){let w=h,B=u;o>2&&h>1&&(w=Math.ceil(h/2),o/=h/w),l>2&&u>1&&(B=Math.ceil(u/2),l/=u/B),a.push({newWidth:w,newHeight:B}),h=w,u=B}if(a.length===0)return{img:t,paintWidth:r,paintHeight:i,tmpCanvas:null};if(a.length===1){const{newWidth:w,newHeight:B}=a[0],E=this.canvasFactory.create(w,B);return E.context.drawImage(t,0,0,r,i,0,0,w,B),{img:E.canvas,paintWidth:w,paintHeight:B,tmpCanvas:E}}let d=this.canvasFactory.create(1,1),f=this.canvasFactory.create(1,1),p=r,m=i,y=t;for(const{newWidth:w,newHeight:B}of a)this.canvasFactory.reset(f,w,B),f.context.drawImage(y,0,0,p,m,0,0,w,B),[d,f]=[f,d],y=d.canvas,p=w,m=B;return this.canvasFactory.destroy(f),{img:d.canvas,paintWidth:p,paintHeight:m,tmpCanvas:d}}_createMaskCanvas(t,e){var U,D;const r=this.ctx,{width:i,height:s}=e,A=this.current.fillColor,a=this.current.patternFill,o=$r(r);let l,h,u,d;if((e.bitmap||e.data)&&e.count>1){const j=e.bitmap||e.data.buffer;h=JSON.stringify(a?o:[o.slice(0,4),A]),l=this._cachedBitmapsMap.getOrInsertComputed(j,kB);const V=l.get(h);if(V&&!a){const st=Math.round(Math.min(o[0],o[2])+o[4]),rt=Math.round(Math.min(o[1],o[3])+o[5]);return(U=this.dependencyTracker)==null||U.recordDependencies(t,RA.transformAndFill),{canvas:V,offsetX:st,offsetY:rt}}u=V}u||(d=this.canvasFactory.create(i,s),iU(d.context,e));let f=Qt.transform(o,[1/i,0,0,-1/s,0,0]);f=Qt.transform(f,[1,0,0,1,0,-s]);const p=Ou.slice();Qt.axialAlignedBoundingBox([0,0,i,s],f,p);const[m,y,w,B]=p,E=Math.round(w-m)||1,S=Math.round(B-y)||1,I=this.canvasFactory.create(E,S),L=I.context,k=m,H=y;L.translate(-k,-H),L.transform(...f);let Q=null;if(!u){const j=this._scaleImage(d.canvas,Ao(L));u=j.img,Q=j.tmpCanvas,u!==d.canvas&&(this.canvasFactory.destroy(d),d=null),l&&a&&(l.set(h,u),Q=null,d=null)}L.imageSmoothingEnabled=nU($r(L),e.interpolate),S2(L,u,0,0,u.width,u.height,0,0,i,s),Q&&this.canvasFactory.destroy(Q),d&&this.canvasFactory.destroy(d),L.globalCompositeOperation="source-in";const W=Qt.transform(Ao(L),[1,0,0,1,-k,-H]);return L.fillStyle=a?A.getPattern(r,this,W,Pn.FILL,t):A,L.fillRect(0,0,i,s),l&&!a&&l.set(h,I.canvas),(D=this.dependencyTracker)==null||D.recordDependencies(t,RA.transformAndFill),{canvas:I.canvas,canvasEntry:l&&!a?null:I,offsetX:Math.round(k),offsetY:Math.round(H)}}setLineWidth(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineWidth",t),e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineCap",t),this.ctx.lineCap=L9[e]}setLineJoin(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("lineJoin",t),this.ctx.lineJoin=Q9[e]}setMiterLimit(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("miterLimit",t),this.ctx.miterLimit=e}setDash(t,e,r){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("dash",t);const i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(e),i.lineDashOffset=r)}setRenderingIntent(t,e){}setFlatness(t,e){}setGState(t,e){var r,i,s,A,a;for(const[o,l]of e)switch(o){case"LW":this.setLineWidth(t,l);break;case"LC":this.setLineCap(t,l);break;case"LJ":this.setLineJoin(t,l);break;case"ML":this.setMiterLimit(t,l);break;case"D":this.setDash(t,l[0],l[1]);break;case"RI":this.setRenderingIntent(t,l);break;case"FL":this.setFlatness(t,l);break;case"Font":this.setFont(t,l[0],l[1]);break;case"CA":(r=this.dependencyTracker)==null||r.recordSimpleData("strokeAlpha",t),this.current.strokeAlpha=l;break;case"ca":(i=this.dependencyTracker)==null||i.recordSimpleData("fillAlpha",t),this.ctx.globalAlpha=this.current.fillAlpha=l;break;case"BM":(s=this.dependencyTracker)==null||s.recordSimpleData("globalCompositeOperation",t),this.ctx.globalCompositeOperation=l;break;case"SMask":(A=this.dependencyTracker)==null||A.recordSimpleData("SMask",t),this.current.activeSMask=l?this.tempSMask:null,this.current.activeSMask&&(this.current.activeSMask.blendMode=this.ctx.globalCompositeOperation),this.tempSMask=null,this.checkSMaskState(t);break;case"TR":(a=this.dependencyTracker)==null||a.recordSimpleData("filter",t),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l);break}}get inSMaskMode(){return!!this.suspendedCtx}_clearPreparedSMask(){this.smaskPreparedEntry&&(this.canvasFactory.destroy(this.smaskPreparedEntry),this.smaskPreparedEntry=null),this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0}_ensurePreparedSMask(t,e,r){t!==this.smaskPreparedFor&&(this._clearPreparedSMask(),this._prepareSMaskCanvas(t,e,r))}checkSMaskState(t){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode(t):!this.current.activeSMask&&e?this.endSMaskMode():this.current.activeSMask&&e&&this._ensurePreparedSMask(this.current.activeSMask,this.ctx.canvas.width,this.ctx.canvas.height)}_prepareSMaskCanvas(t,e,r){const{canvas:i,subtype:s,backdrop:A,transferMap:a}=t,o=s==="Luminosity"||s==="Alpha"&&a;if(!A&&!o){this.smaskPreparedFor=t;return}let l,h,u;if(A&&o){const d=this.canvasFactory.create(e,r),f=d.context;f.drawImage(i,t.offsetX,t.offsetY),f.globalCompositeOperation="destination-atop",f.fillStyle=A,f.fillRect(0,0,e,r),f.globalCompositeOperation="source-over",l=this.canvasFactory.create(e,r);const p=l.context;p.filter=s==="Alpha"?this.filterFactory.addAlphaFilter(a):this.filterFactory.addLuminosityFilter(a),p.drawImage(d.canvas,0,0),p.filter="none",this.canvasFactory.destroy(d),h=u=0}else if(o){l=this.canvasFactory.create(i.width,i.height);const d=l.context;d.filter=s==="Alpha"?this.filterFactory.addAlphaFilter(a):this.filterFactory.addLuminosityFilter(a),d.drawImage(i,0,0),d.filter="none",{offsetX:h,offsetY:u}=t}else{l=this.canvasFactory.create(e,r);const d=l.context;d.drawImage(i,t.offsetX,t.offsetY),d.globalCompositeOperation="destination-atop",d.fillStyle=A,d.fillRect(0,0,e,r),d.globalCompositeOperation="source-over",h=u=0}this.smaskPreparedEntry=l,this.smaskPreparedFor=t,this.smaskPreparedOffsetX=h,this.smaskPreparedOffsetY=u}beginSMaskMode(t){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const{width:e,height:r}=this.ctx.canvas,i=this.canvasFactory.create(e,r);this.smaskScratchCanvas=i,this.suspendedCtx=this.ctx;const s=this.ctx=i.context;s.setTransform(this.suspendedCtx.getTransform()),rm(this.suspendedCtx,s),U9(s,this.suspendedCtx),this._ensurePreparedSMask(this.current.activeSMask,e,r),this.setGState(t,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),rm(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null,this.canvasFactory.destroy(this.smaskScratchCanvas),this.smaskScratchCanvas=null,this._clearPreparedSMask()}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.ctx.restore()}composeSMask(t,e,r,i){const s=i[0],A=i[1],a=i[2]-s,o=i[3]-A;if(a===0||o===0)return;const l=this.smaskPreparedEntry;if(l){const h=s-this.smaskPreparedOffsetX,u=A-this.smaskPreparedOffsetY;r.save(),r.globalAlpha=1,r.setTransform(1,0,0,1,0,0);const d=new Path2D;d.rect(s,A,a,o),r.clip(d),r.globalCompositeOperation="destination-in",r.drawImage(l.canvas,h,u,a,o,s,A,a,o),r.restore()}else this.genericComposeSMask(e.context,r,a,o,s,A,e.offsetX,e.offsetY);t.save(),t.globalAlpha=1,t.globalCompositeOperation=e.blendMode||"source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(r.canvas,s,A,a,o,s,A,a,o),t.restore()}genericComposeSMask(t,e,r,i,s,A,a,o){const l=t.canvas,h=s-a,u=A-o;e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const d=new Path2D;d.rect(s,A,r,i),e.clip(d),e.globalCompositeOperation="destination-in",e.drawImage(l,h,u,r,i,s,A,r,i),e.restore()}save(t){var r;this.inSMaskMode&&rm(this.ctx,this.suspendedCtx),this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone(),(r=this.dependencyTracker)==null||r.save(t)}restore(t){var e;if((e=this.dependencyTracker)==null||e.restore(t),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&(rm(this.suspendedCtx,this.ctx),this.ctx.setTransform(this.suspendedCtx.getTransform())),this.checkSMaskState(t),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,e,r,i,s,A,a){var o;(o=this.dependencyTracker)==null||o.recordIncrementalData("transform",t),this.ctx.transform(e,r,i,s,A,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,r,i){let[s]=r;if(!i){s||(s=r[0]=new Path2D),e!==Oo.stroke&&e!==Oo.closeStroke&&(this.current.tilingPatternDims=null),this[e](t,s);return}if(this.dependencyTracker!==null){const a=e===Oo.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(t).recordBBox(t,this.ctx,i[0]-a,i[2]+a,i[1]-a,i[3]+a).recordDependencies(t,["transform"])}s instanceof Path2D||(s=r[0]=iP(s)),Qt.axialAlignedBoundingBox(i,$r(this.ctx),this.current.minMax);const A=this.current.tilingPatternDims;if(A&&e!==Oo.stroke&&e!==Oo.closeStroke&&this.current.fillColor instanceof rv){const a=Qt.intersect(this.current.clipBox,this.current.minMax);a?this.current.fillColor.updatePatternDims(a,A):this.current.tilingPatternDims=null}this[e](t,s),this._pathStartIdx=t}closePath(t){this.ctx.closePath()}stroke(t,e,r=!0){var A;const i=this.ctx,s=this.current.strokeColor;if(i.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof s=="object"&&(s!=null&&s.getPattern)){const a=s.isModifyingCurrentTransform()?i.getTransform():null;if(i.save(),i.strokeStyle=s.getPattern(i,this,Ao(i),Pn.STROKE,t),a){const o=new Path2D;o.addPath(e,i.getTransform().invertSelf().multiplySelf(a)),e=o}this.rescaleAndStroke(e,!1),i.restore()}else this.rescaleAndStroke(e,!0);(A=this.dependencyTracker)==null||A.recordDependencies(t,RA.stroke),r&&this.consumePath(t,e,this.current.getClippedPathBoundingBox(Pn.STROKE,$r(this.ctx))),i.globalAlpha=this.current.fillAlpha}closeStroke(t,e){this.stroke(t,e)}fill(t,e,r=!0){var l,h,u;const i=this.ctx,s=this.current.fillColor,A=this.current.patternFill;let a=!1;const o=this.current.getClippedPathBoundingBox();if((l=this.dependencyTracker)==null||l.recordDependencies(t,RA.fill),A){const d=this.current.tilingPatternDims,f=d&&s.canSkipPatternCanvas(d);if(f){s.drawPattern(this,e,this.pendingEOFill,f,t),this.pendingEOFill=!1,r&&this.consumePath(t,e,o),this.current.tilingPatternDims=null;return}const p=s.isModifyingCurrentTransform()?i.getTransform():null;if((h=this.dependencyTracker)==null||h.save(t),i.save(),i.fillStyle=s.getPattern(i,this,Ao(i),Pn.FILL,t),p){const m=new Path2D;m.addPath(e,i.getTransform().invertSelf().multiplySelf(p)),e=m}a=!0}this.contentVisible&&o!==null&&(this.pendingEOFill?(i.fill(e,"evenodd"),this.pendingEOFill=!1):i.fill(e)),a&&(i.restore(),(u=this.dependencyTracker)==null||u.restore(t)),r&&this.consumePath(t,e,o)}eoFill(t,e){this.pendingEOFill=!0,this.fill(t,e)}fillStroke(t,e){this.fill(t,e,!1),this.stroke(t,e,!1),this.consumePath(t,e)}eoFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}closeFillStroke(t,e){this.fillStroke(t,e)}closeEOFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}endPath(t,e){this.consumePath(t,e)}rawFillPath(t,e){var r;this.ctx.fill(e),(r=this.dependencyTracker)==null||r.recordDependencies(t,RA.rawFillPath).recordOperation(t)}clip(t){var e;(e=this.dependencyTracker)==null||e.recordFutureForcedDependency("clipMode",t),this.pendingClip=N9}eoClip(t){var e;(e=this.dependencyTracker)==null||e.recordFutureForcedDependency("clipMode",t),this.pendingClip=sU}beginText(t){var e;this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,(e=this.dependencyTracker)==null||e.recordOpenMarker(t).resetIncrementalData("sameLineText").resetIncrementalData("moveText",t)}endText(t){const e=this.pendingTextPaths,r=this.ctx;if(this.dependencyTracker){const{dependencyTracker:i}=this;e!==void 0&&i.recordFutureForcedDependency("textClip",i.getOpenMarker()).recordFutureForcedDependency("textClip",t),i.recordCloseMarker(t)}if(e!==void 0){const i=new Path2D,s=r.getTransform().invertSelf();for(const{transform:A,x:a,y:o,fontSize:l,path:h}of e)h&&i.addPath(h,new DOMMatrix(A).preMultiplySelf(s).translate(a,o).scale(l,-l));r.clip(i)}delete this.pendingTextPaths}setCharSpacing(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("charSpacing",t),this.current.charSpacing=e}setWordSpacing(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("wordSpacing",t),this.current.wordSpacing=e}setHScale(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("hScale",t),this.current.textHScale=e/100}setLeading(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("leading",t),this.current.leading=-e}setFont(t,e,r){var u,d;(u=this.dependencyTracker)==null||u.recordSimpleData("font",t).recordSimpleDataFromNamed("fontObj",e,t);const i=this.commonObjs.get(e),s=this.current;if(!i)throw new Error(`Can't find font for ${e}`);if(s.fontMatrix=i.fontMatrix||bE,(s.fontMatrix[0]===0||s.fontMatrix[3]===0)&&Me("Invalid font matrix for font "+e),r<0?(r=-r,s.fontDirection=-1):s.fontDirection=1,this.current.font=i,this.current.fontSize=r,i.isType3Font)return;const A=i.loadedName||"sans-serif",a=((d=i.systemFontInfo)==null?void 0:d.css)||`"${A}", ${i.fallbackName}`;let o="normal";i.black?o="900":i.bold&&(o="bold");const l=i.italic?"italic":"normal";let h=r;r<J_?h=J_:r>Z_&&(h=Z_),this.current.fontSizeScale=r/h,this.ctx.font=`${l} ${o} ${h}px ${a}`}setTextRenderingMode(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("textRenderingMode",t),this.current.textRenderingMode=e}setTextRise(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("textRise",t),this.current.textRise=e}moveText(t,e,r){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordIncrementalData("moveText",t),this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=r}setLeadingMoveText(t,e,r){this.setLeading(t,-r),this.moveText(t,e,r)}setTextMatrix(t,e){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordSimpleData("textMatrix",t);const{current:r}=this;r.textMatrix=e,r.textMatrixScale=Math.hypot(e[0],e[1]),r.x=r.lineX=0,r.y=r.lineY=0}nextLine(t){var e;this.moveText(t,0,this.current.leading),(e=this.dependencyTracker)==null||e.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??t)}paintChar(t,e,r,i,s,A){var w,B,E,S;const a=this.ctx,o=this.current,l=o.font,h=o.textRenderingMode,u=o.fontSize/o.fontSizeScale,d=h&en.FILL_STROKE_MASK,f=!!(h&en.ADD_TO_PATH_FLAG),p=o.patternFill&&!l.missingFile,m=o.patternStroke&&!l.missingFile;let y;if((l.disableFontFace||f||p||m)&&!l.missingFile&&(y=l.getPathGenerator(this.commonObjs,e)),y&&(l.disableFontFace||p||m)){a.save(),a.translate(r,i),a.scale(u,-u),(w=this.dependencyTracker)==null||w.recordCharacterBBox(t,a,l);let I;if(d===en.FILL||d===en.FILL_STROKE)if(s){I=a.getTransform(),a.setTransform(...s);const L=_(this,ja,YE).call(this,y,I,s);a.fill(L)}else a.fill(y);if(d===en.STROKE||d===en.FILL_STROKE)if(A){I||(I=a.getTransform()),a.setTransform(...A);const{a:L,b:k,c:H,d:Q}=I,W=Qt.inverseTransform(A),U=Qt.transform([L,k,H,Q,0,0],W);Qt.singularValueDecompose2dScale(U,TA),a.lineWidth*=Math.max(TA[0],TA[1])/u,a.stroke(_(this,ja,YE).call(this,y,I,A))}else a.lineWidth/=u,a.stroke(y);a.restore()}else(d===en.FILL||d===en.FILL_STROKE)&&(a.fillText(e,r,i),(B=this.dependencyTracker)==null||B.recordCharacterBBox(t,a,l,u,r,i,()=>a.measureText(e))),(d===en.STROKE||d===en.FILL_STROKE)&&(this.dependencyTracker&&((E=this.dependencyTracker)==null||E.recordCharacterBBox(t,a,l,u,r,i,()=>a.measureText(e)).recordDependencies(t,RA.stroke)),a.strokeText(e,r,i));f&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:$r(a),x:r,y:i,fontSize:u,path:y}),(S=this.dependencyTracker)==null||S.recordCharacterBBox(t,a,l,u,r,i))}get isFontSubpixelAAEnabled(){const t=this.canvasFactory.create(10,10),e=t.context;e.scale(1.5,1),e.fillText("I",0,10);const r=e.getImageData(0,0,10,10).data;this.canvasFactory.destroy(t);let i=!1;for(let s=3;s<r.length;s+=4)if(r[s]>0&&r[s]<255){i=!0;break}return Fe(this,"isFontSubpixelAAEnabled",i)}showText(t,e){var U,D,j,V;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(t,RA.showText).resetBBox(t),this.current.textRenderingMode&en.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",t).inheritPendingDependenciesAsFutureForcedDependencies());const r=this.current,i=r.font;if(i.isType3Font){this.showType3Text(t,e),(U=this.dependencyTracker)==null||U.recordShowTextOperation(t);return}const s=r.fontSize;if(s===0){(D=this.dependencyTracker)==null||D.recordOperation(t);return}const A=this.ctx,a=r.fontSizeScale,o=r.charSpacing,l=r.wordSpacing,h=r.fontDirection,u=r.textHScale*h,d=e.length,f=i.vertical,p=f?1:-1,m=i.defaultVMetrics,y=s*r.fontMatrix[0],w=r.textRenderingMode===en.FILL&&!i.disableFontFace&&!r.patternFill;A.save(),r.textMatrix&&A.transform(...r.textMatrix),A.translate(r.x,r.y+r.textRise),h>0?A.scale(u,-1):A.scale(u,1);let B,E;const S=r.textRenderingMode&en.FILL_STROKE_MASK,I=S===en.FILL||S===en.FILL_STROKE,L=S===en.STROKE||S===en.FILL_STROKE;let k=r.lineWidth;const H=r.textMatrixScale;if(H===0||k===0?L&&(k=this.getSinglePixelWidth()):k/=H,a!==1&&(A.scale(a,a),k/=a),A.lineWidth=k,I&&r.patternFill){A.save();const st=r.fillColor.getPattern(A,this,Ao(A),Pn.FILL,t);B=$r(A),A.restore(),A.fillStyle=st}if(L&&r.patternStroke){A.save();const st=r.strokeColor.getPattern(A,this,Ao(A),Pn.STROKE,t);E=$r(A),A.restore(),A.strokeStyle=st}if(i.isInvalidPDFjsFont){const st=[];let rt=0;for(const At of e)st.push(At.unicode),rt+=At.width;const it=st.join("");if(A.fillText(it,0,0),this.dependencyTracker!==null){const At=A.measureText(it);this.dependencyTracker.recordBBox(t,this.ctx,-At.actualBoundingBoxLeft,At.actualBoundingBoxRight,-At.actualBoundingBoxAscent,At.actualBoundingBoxDescent).recordShowTextOperation(t)}r.x+=rt*y*u,A.restore(),this.compose();return}let Q=0,W;for(W=0;W<d;++W){const st=e[W];if(typeof st=="number"){Q+=p*st*s/1e3;continue}let rt=!1;const it=(st.isSpace?l:0)+o,At=st.fontChar,ut=st.accent;let vt,mt,M=st.width;if(f){const tt=st.vmetric||m,et=-(st.vmetric?tt[1]:M*.5)*y,ot=tt[2]*y;M=tt?-tt[0]:M,vt=et/a,mt=(Q+ot)/a}else vt=Q/a,mt=0;let $;if(i.remeasure&&M>0){$=A.measureText(At);const tt=$.width*1e3/s*a;if(M<tt&&this.isFontSubpixelAAEnabled){const et=M/tt;rt=!0,A.save(),A.scale(et,1),vt/=et}else M!==tt&&(vt+=(M-tt)/2e3*s/a)}if(this.contentVisible&&(st.isInFont||i.missingFile)){if(w&&!ut)A.fillText(At,vt,mt),(j=this.dependencyTracker)==null||j.recordCharacterBBox(t,A,$?{bbox:null}:i,s/a,vt,mt,()=>$??A.measureText(At));else if(this.paintChar(t,At,vt,mt,B,E),ut){const tt=vt+s*ut.offset.x/a,et=mt-s*ut.offset.y/a;this.paintChar(t,ut.fontChar,tt,et,B,E)}}const q=f?M*y-it*h:M*y+it*h;Q+=q,rt&&A.restore()}f?r.y-=Q:r.x+=Q*u,A.restore(),this.compose(),(V=this.dependencyTracker)==null||V.recordShowTextOperation(t)}showType3Text(t,e){const r=this.ctx,i=this.current,s=i.font,A=i.fontSize,a=i.fontDirection,o=s.vertical?1:-1,l=i.charSpacing,h=i.wordSpacing,u=i.textHScale*a,d=i.fontMatrix||bE,f=e.length,p=i.textRenderingMode===en.INVISIBLE;let m,y,w,B;if(p||A===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,r.save(),i.textMatrix&&r.transform(...i.textMatrix),r.translate(i.x,i.y+i.textRise),r.scale(u,a);const E=this.dependencyTracker;for(this.dependencyTracker=E?new Bv(E,t):null,m=0;m<f;++m){if(y=e[m],typeof y=="number"){B=o*y*A/1e3,this.ctx.translate(B,0),i.x+=B*u;continue}const S=(y.isSpace?h:0)+l,I=s.charProcOperatorList[y.operatorListId];I?this.contentVisible&&(this.save(),r.scale(A,A),r.transform(...d),this.executeOperatorList(I),this.restore()):Me(`Type3 character "${y.operatorListId}" is not available.`);const L=[y.width,0];Qt.applyTransform(L,d),w=L[0]*A+S,r.translate(w,0),i.x+=w*u}r.restore(),E&&(this.dependencyTracker=E)}setCharWidth(t,e,r){}setCharWidthAndBounds(t,e,r,i,s,A,a){var l;const o=new Path2D;o.rect(i,s,A-i,a-s),this.ctx.clip(o),(l=this.dependencyTracker)==null||l.recordBBox(t,this.ctx,i,A,s,a).recordClipBox(t,this.ctx,i,A,s,a),this.endPath(t)}getColorN_Pattern(t,e){let r;if(e[0]==="TilingPattern"){const i=this.baseTransform||$r(this.ctx),s={createCanvasGraphics:(A,a)=>new CT(A,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new Bv(this.dependencyTracker,a,!0):null)};r=new rv(e,this.ctx,s,i)}else r=this._getPattern(t,e[1],e[2]);return r}setStrokeColorN(t,...e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("strokeColor",t),this.current.strokeColor=this.getColorN_Pattern(t,e),this.current.patternStroke=!0}setFillColorN(t,...e){var i;(i=this.dependencyTracker)==null||i.recordSimpleData("fillColor",t);const r=this.current.fillColor=this.getColorN_Pattern(t,e);this.current.patternFill=!0,this.current.tilingPatternDims=r instanceof rv?[0,0,0,0]:null}setStrokeRGBColor(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor=e,this.current.patternStroke=!1}setStrokeTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor=e,this.current.patternFill=!1,this.current.tilingPatternDims=null}setFillTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1,this.current.tilingPatternDims=null}_getPattern(t,e,r=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=T9(this.getObject(t,e)),this.cachedPatterns.set(e,i)),r&&(i.matrix=r),i}shadingFill(t,e){var A;if(!this.contentVisible)return;const r=this.ctx;this.save(t);const i=this._getPattern(t,e);r.fillStyle=i.getPattern(r,this,Ao(r),Pn.SHADING,t);const s=Ao(r);if(s){const{width:a,height:o}=r.canvas,l=Ou.slice();Qt.axialAlignedBoundingBox([0,0,a,o],s,l);const[h,u,d,f]=l;this.ctx.fillRect(h,u,d-h,f-u)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(A=this.dependencyTracker)==null||A.resetBBox(t).recordFullPageBBox(t).recordDependencies(t,RA.transform).recordDependencies(t,RA.fill).recordOperation(t),this.compose(this.current.getClippedPathBoundingBox()),this.restore(t)}beginInlineImage(){hr("Should not call beginInlineImage")}beginImageData(){hr("Should not call beginImageData")}paintFormXObjectBegin(t,e,r){var i;if(this.contentVisible&&(this.save(t),this.baseTransformStack.push(this.baseTransform),e&&this.transform(t,...e),this.baseTransform=$r(this.ctx),r)){Qt.axialAlignedBoundingBox(r,this.baseTransform,this.current.minMax);const[s,A,a,o]=r,l=new Path2D;l.rect(s,A,a-s,o-A),this.ctx.clip(l),(i=this.dependencyTracker)==null||i.recordClipBox(t,this.ctx,s,a,A,o),this.endPath(t)}}paintFormXObjectEnd(t){this.contentVisible&&(this.restore(t),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t,e){var p;if(!this.contentVisible)return;this.save(t);const{inSMaskMode:r}=this;r&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;if(e.isolated||NB("TODO: Support non-isolated groups."),e.knockout&&Me("Knockout groups not supported."),!e.needsIsolation&&i.globalAlpha===1&&i.globalCompositeOperation==="source-over"&&!r){if(e.bbox){let m=new Path2D;const[y,w,B,E]=e.bbox;if(m.rect(y,w,B-y,E-w),e.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(e.matrix)),m=S}i.clip(m)}this.groupStack.push(null),this.groupLevel++;return}const s=$r(i);e.matrix&&i.transform(...e.matrix);const A=[0,0,i.canvas.width,i.canvas.height];let a;e.bbox?(a=Ou.slice(),Qt.axialAlignedBoundingBox(e.bbox,$r(i),a),a=Qt.intersect(a,A)||[0,0,0,0]):a=A;const o=Math.floor(a[0]),l=Math.floor(a[1]),h=Math.max(Math.ceil(a[2])-o,1),u=Math.max(Math.ceil(a[3])-l,1);this.current.startNewPathAndClipBox([0,0,h,u]);const d=this.canvasFactory.create(h,u);e.smask&&this.smaskGroupCanvases.push(d);const f=d.context;if(f.translate(-o,-l),f.transform(...s),!e.isolated&&!e.smask&&r&&e.needsIsolation&&(f.save(),f.setTransform(1,0,0,1,0,0),f.drawImage(i.canvas,-o,-l),f.restore()),e.bbox){let m=new Path2D;const[y,w,B,E]=e.bbox;if(m.rect(y,w,B-y,E-w),e.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(e.matrix)),m=S}f.clip(m)}e.smask&&this.smaskStack.push({canvas:d.canvas,context:f,offsetX:o,offsetY:l,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null}),(!e.smask||this.dependencyTracker)&&(i.setTransform(1,0,0,1,0,0),i.translate(o,l),i.save()),rm(i,f),this.ctx=f,(p=this.dependencyTracker)==null||p.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(i),this.setGState(t,[["BM","source-over"],["ca",1],["CA",1],["TR",null]]),this.groupStack.push(i),this.groupLevel++}endGroup(t,e){var s;if(!this.contentVisible)return;this.groupLevel--;const r=this.ctx,i=this.groupStack.pop();if(i===null){this.restore(t);return}if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,(s=this.dependencyTracker)==null||s.popBaseTransform(),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(t),this.dependencyTracker&&(this.ctx.restore(),this.inSMaskMode&&this.ctx.setTransform(this.suspendedCtx.getTransform()));else{this.ctx.restore();const A=$r(this.ctx);this.restore(t),this.ctx.save(),this.ctx.setTransform(...A);const a=Ou.slice();Qt.axialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],A,a),this.ctx.drawImage(r.canvas,0,0),this.ctx.restore(),this.canvasFactory.destroy({canvas:r.canvas,context:r}),this.compose(a)}}beginAnnotation(t,e,r,i,s,A){if(_(this,ja,XE).call(this),F2(this.ctx),this.ctx.save(),this.save(t),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),r){const a=r[2]-r[0],o=r[3]-r[1];if(A&&this.annotationCanvasMap){i=i.slice(),i[4]-=r[0],i[5]-=r[1],r=r.slice(),r[0]=r[1]=0,r[2]=a,r[3]=o,Qt.singularValueDecompose2dScale($r(this.ctx),TA);const{viewportScale:l}=this,h=Math.ceil(a*this.outputScaleX*l),u=Math.ceil(o*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(h,u);const{canvas:d,context:f}=this.annotationCanvas;this.annotationCanvasMap.set(e,d),this.annotationCanvas.savedCtx=this.ctx,this.ctx=f,this.ctx.save(),this.ctx.setTransform(TA[0],0,0,-TA[1],0,o*TA[1]),F2(this.ctx)}else{F2(this.ctx),this.endPath(t);const l=new Path2D;l.rect(r[0],r[1],a,o),this.ctx.clip(l)}}this.current=new eU(this.ctx.canvas.width,this.ctx.canvas.height),this.baseTransformStack.push(this.baseTransform),this.transform(t,...i),this.transform(t,...s),this.baseTransform=$r(this.ctx)}endAnnotation(t){this.annotationCanvas&&(this.ctx.restore(),_(this,ja,qE).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.baseTransform=this.baseTransformStack.pop()}paintImageMaskXObject(t,e){var a;if(!this.contentVisible)return;const r=e.count;e=this.getObject(t,e.data,e),e.count=r;const i=this.ctx,s=this._createMaskCanvas(t,e),A=s.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(A,s.offsetX,s.offsetY),(a=this.dependencyTracker)==null||a.resetBBox(t).recordBBox(t,this.ctx,s.offsetX,s.offsetX+A.width,s.offsetY,s.offsetY+A.height).recordOperation(t),i.restore(),s.canvasEntry&&this.canvasFactory.destroy(s.canvasEntry),this.compose()}paintImageMaskXObjectRepeat(t,e,r,i=0,s=0,A,a){var u,d,f;if(!this.contentVisible)return;e=this.getObject(t,e.data,e);const o=this.ctx;o.save();const l=$r(o);o.transform(r,i,s,A,0,0);const h=this._createMaskCanvas(t,e);o.setTransform(1,0,0,1,h.offsetX-l[4],h.offsetY-l[5]),(u=this.dependencyTracker)==null||u.resetBBox(t);for(let p=0,m=a.length;p<m;p+=2){const y=Qt.transform(l,[r,i,s,A,a[p],a[p+1]]);o.drawImage(h.canvas,y[4],y[5]),(d=this.dependencyTracker)==null||d.recordBBox(t,this.ctx,y[4],y[4]+h.canvas.width,y[5],y[5]+h.canvas.height)}o.restore(),h.canvasEntry&&this.canvasFactory.destroy(h.canvasEntry),this.compose(),(f=this.dependencyTracker)==null||f.recordOperation(t)}paintImageMaskXObjectGroup(t,e){var A,a,o;if(!this.contentVisible)return;const r=this.ctx,i=this.current.fillColor,s=this.current.patternFill;(A=this.dependencyTracker)==null||A.resetBBox(t).recordDependencies(t,RA.transformAndFill);for(const l of e){const{data:h,width:u,height:d,transform:f}=l,p=this.canvasFactory.create(u,d),m=p.context;m.save();const y=this.getObject(t,h,l);iU(m,y),m.globalCompositeOperation="source-in",m.fillStyle=s?i.getPattern(m,this,Ao(r),Pn.FILL,t):i,m.fillRect(0,0,u,d),m.restore(),r.save(),r.transform(...f),r.scale(1,-1),S2(r,p.canvas,0,0,u,d,0,-1,1,1),this.canvasFactory.destroy(p),(a=this.dependencyTracker)==null||a.recordBBox(t,r,0,u,0,d),r.restore()}this.compose(),(o=this.dependencyTracker)==null||o.recordOperation(t)}paintImageXObject(t,e){if(!this.contentVisible)return;const r=this.getObject(t,e);if(!r){Me("Dependent image isn't ready yet");return}this.paintInlineImageXObject(t,r)}paintImageXObjectRepeat(t,e,r,i,s){if(!this.contentVisible)return;const A=this.getObject(t,e);if(!A){Me("Dependent image isn't ready yet");return}const a=A.width,o=A.height,l=[];for(let h=0,u=s.length;h<u;h+=2)l.push({transform:[r,0,0,i,s[h],s[h+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(t,A,l)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return{img:t.bitmap,canvasEntry:null};const{bitmap:e,width:r,height:i}=t,s=this.canvasFactory.create(r,i),A=s.context;return A.filter=this.current.transferMaps,A.drawImage(e,0,0),A.filter="none",{img:s.canvas,canvasEntry:s}}paintInlineImageXObject(t,e){var h;if(!this.contentVisible)return;const r=e.width,i=e.height,s=this.ctx;this.save(t);const{filter:A}=s;A!=="none"&&A!==""&&(s.filter="none"),s.scale(1/r,-1/i);let a,o=null;if(e.bitmap){const u=this.applyTransferMapsToBitmap(e);a=u.img,o=u.canvasEntry}else if(typeof HTMLElement=="function"&&e instanceof HTMLElement||!e.data)a=e;else{const u=this.canvasFactory.create(r,i);rU(u.context,e),a=this.applyTransferMapsToCanvas(u.context),o=u}const l=this._scaleImage(a,Ao(s));s.imageSmoothingEnabled=nU($r(s),e.interpolate),this.dependencyTracker&&(this.dependencyTracker.resetBBox(t).recordBBox(t,s,0,r,-i,0).recordDependencies(t,RA.imageXObject).recordOperation(t),(h=this.imagesTracker)==null||h.record(s,r,i,this.dependencyTracker.clipBox)),S2(s,l.img,0,0,l.paintWidth,l.paintHeight,0,-i,r,i),l.tmpCanvas&&this.canvasFactory.destroy(l.tmpCanvas),o&&this.canvasFactory.destroy(o),this.compose(),this.restore(t)}paintInlineImageXObjectGroup(t,e,r){var a,o,l;if(!this.contentVisible)return;const i=this.ctx;let s,A=null;if(e.bitmap)s=e.bitmap;else{const h=e.width,u=e.height,d=this.canvasFactory.create(h,u);rU(d.context,e),s=this.applyTransferMapsToCanvas(d.context),A=d}(a=this.dependencyTracker)==null||a.resetBBox(t);for(const h of r)i.save(),i.transform(...h.transform),i.scale(1,-1),S2(i,s,h.x,h.y,h.w,h.h,0,-1,1,1),(o=this.dependencyTracker)==null||o.recordBBox(t,i,0,1,-1,0),i.restore();A&&this.canvasFactory.destroy(A),(l=this.dependencyTracker)==null||l.recordOperation(t),this.compose()}paintSolidColorImageMask(t){var e;this.contentVisible&&((e=this.dependencyTracker)==null||e.resetBBox(t).recordBBox(t,this.ctx,0,1,0,1).recordDependencies(t,RA.fill).recordOperation(t),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t,e){}markPointProps(t,e,r){}beginMarkedContent(t,e){var r;(r=this.dependencyTracker)==null||r.beginMarkedContent(t),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e,r){var i;(i=this.dependencyTracker)==null||i.beginMarkedContent(t),e==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(t){var e;(e=this.dependencyTracker)==null||e.endMarkedContent(t),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(t){}endCompat(t){}consumePath(t,e,r){var A,a;const i=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(r);const s=this.ctx;this.pendingClip?(i||(this.pendingClip===sU?s.clip(e,"evenodd"):s.clip(e)),this.pendingClip=null,(A=this.dependencyTracker)==null||A.bboxToClipBoxDropOperation(t).recordFutureForcedDependency("clipPath",t)):(a=this.dependencyTracker)==null||a.recordOperation(t),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=$r(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const e=Math.abs(t[0]*t[3]-t[2]*t[1]),r=Math.hypot(t[0],t[2]),i=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:e,b:r,c:i,d:s}=this.ctx.getTransform();let A,a;if(r===0&&i===0){const o=Math.abs(e),l=Math.abs(s);if(o===l)if(t===0)A=a=1/o;else{const h=o*t;A=a=h<1?1/h:1}else if(t===0)A=1/o,a=1/l;else{const h=o*t,u=l*t;A=h<1?1/h:1,a=u<1?1/u:1}}else{const o=Math.abs(e*s-r*i),l=Math.hypot(e,r),h=Math.hypot(i,s);if(t===0)A=h/o,a=l/o;else{const u=t*o;A=h>u?h/u:1,a=l>u?l/u:1}}this._cachedScaleForStroking[0]=A,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(t,e){const{ctx:r,current:{lineWidth:i}}=this,[s,A]=this.getScaleForStroking();if(s===A){r.lineWidth=(i||1)*s,r.stroke(t);return}const a=r.getLineDash();e&&r.save(),r.scale(s,A),D5.a=1/s,D5.d=1/A;const o=new Path2D;if(o.addPath(t,D5),a.length>0){const l=Math.max(s,A);r.setLineDash(a.map(h=>h/l)),r.lineDashOffset/=l}r.lineWidth=i||1,r.stroke(o),e&&r.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};ja=new WeakSet,XE=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.canvasFactory.destroy(this.transparentCanvasEntry),this.transparentCanvas=null,this.transparentCanvasEntry=null)},qE=function(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}},YE=function(t,e,r){const i=new Path2D;return i.addPath(t,new DOMMatrix(r).invertSelf().multiplySelf(e)),i};let Rg=CT;for(const n in Oo)Rg.prototype[n]!==void 0&&(Rg.prototype[Oo[n]]=Rg.prototype[n]);var l1,c1;class VB{constructor(t,e,r){T(this,l1,null);T(this,c1,null);ct(this,"_fullReader",null);ct(this,"_rangeReaders",new Set);ct(this,"_source",null);this._source=t,C(this,l1,e),C(this,c1,r)}get _progressiveDataLength(){var t;return((t=this._fullReader)==null?void 0:t._loaded)??0}getFullReader(){return si(!this._fullReader,"BasePDFStream.getFullReader can only be called once."),this._fullReader=new(c(this,l1))(this)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const r=new(c(this,c1))(this,t,e);return this._rangeReaders.add(r),r}cancelAllRequests(t){var e;(e=this._fullReader)==null||e.cancel(t);for(const r of new Set(this._rangeReaders))r.cancel(t)}}l1=new WeakMap,c1=new WeakMap;class GB{constructor(t){ct(this,"onProgress",null);ct(this,"_contentLength",0);ct(this,"_filename",null);ct(this,"_headersCapability",Promise.withResolvers());ct(this,"_isRangeSupported",!1);ct(this,"_isStreamingSupported",!1);ct(this,"_loaded",0);ct(this,"_stream",null);this._stream=t}_callOnProgress(){var t;(t=this.onProgress)==null||t.call(this,{loaded:this._loaded,total:this._contentLength})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){hr("Abstract method `read` called")}cancel(t){hr("Abstract method `cancel` called")}}class jB{constructor(t,e,r){ct(this,"_stream",null);this._stream=t}async read(){hr("Abstract method `read` called")}cancel(t){hr("Abstract method `cancel` called")}}function P9(n){let t=!0,e=r("filename\\*","i").exec(n);if(e){e=e[1];let h=a(e);return h=unescape(h),h=o(h),h=l(h),s(h)}if(e=A(n),e){const h=l(e);return s(h)}if(e=r("filename","i").exec(n),e){e=e[1];let h=a(e);return h=l(h),s(h)}function r(h,u){return new RegExp("(?:^|;)\\s*"+h+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',u)}function i(h,u){if(h){if(!/^[\x00-\xFF]+$/.test(u))return u;try{const d=new TextDecoder(h,{fatal:!0}),f=PB(u);u=d.decode(f),t=!1}catch{}}return u}function s(h){return t&&/[\x80-\xff]/.test(h)&&(h=i("utf-8",h),t&&(h=i("iso-8859-1",h))),h}function A(h){const u=[];let d;const f=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(d=f.exec(h))!==null;){let[,m,y,w]=d;if(m=parseInt(m,10),m in u){if(m===0)break;continue}u[m]=[y,w]}const p=[];for(let m=0;m<u.length&&m in u;++m){let[y,w]=u[m];w=a(w),y&&(w=unescape(w),m===0&&(w=o(w))),p.push(w)}return p.join("")}function a(h){if(h.startsWith('"')){const u=h.slice(1).split('\\"');for(let d=0;d<u.length;++d){const f=u[d].indexOf('"');f!==-1&&(u[d]=u[d].slice(0,f),u.length=d+1),u[d]=u[d].replaceAll(/\\(.)/g,"$1")}h=u.join('"')}return h}function o(h){const u=h.indexOf("'");if(u===-1)return h;const d=h.slice(0,u),p=h.slice(u+1).replace(/^[^']*'/,"");return i(d,p)}function l(h){return!h.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(h)?h:h.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(u,d,f,p){if(f==="q"||f==="Q")return p=p.replaceAll("_"," "),p=p.replaceAll(/=([0-9a-fA-F]{2})/g,function(m,y){return String.fromCharCode(parseInt(y,16))}),i(d,p);try{p=atob(p)}catch{}return i(d,p)})}return""}function XP(n,t){const e=new Headers;if(!n||!t||typeof t!="object")return e;for(const r in t){const i=t[r];i!==void 0&&e.append(r,i)}return e}function $B(n){var t;return((t=URL.parse(n))==null?void 0:t.origin)??null}function qP({responseHeaders:n,isHttp:t,rangeChunkSize:e,disableRange:r}){const i={contentLength:0,isRangeSupported:!1},s=parseInt(n.get("Content-Length"),10);return!Number.isInteger(s)||(i.contentLength=s,s<=2*e)||r||!t||n.get("Accept-Ranges")!=="bytes"||(n.get("Content-Encoding")||"identity")==="identity"&&(i.isRangeSupported=!0),i}function YP(n){const t=n.get("Content-Disposition");if(t){let e=P9(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(RB(e))return e}return null}function WB(n,t){return new mv(`Unexpected server response (${n}) while retrieving PDF "${t.href}".`,n,n===404||n===0&&t.protocol==="file:")}function JP(n,t){if(n!==t)throw new Error(`Expected range response-origin "${n}" to match "${t}".`)}function ZP(n,t,e,r){return fetch(n,{method:"GET",headers:t,signal:r.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"})}function tM(n,t){if(n!==200&&n!==206)throw WB(n,t)}function zB(n){if(n instanceof Uint8Array)return n.buffer;if(n instanceof ArrayBuffer)return n;throw new Error(`getArrayBuffer - unexpected data: ${n}`)}class M9 extends VB{constructor(e){super(e,k9,O9);ct(this,"_responseOrigin",null);const{httpHeaders:r,url:i}=e;si(/https?:/.test(i.protocol),"PDFFetchStream only supports http(s):// URLs."),this.headers=XP(!0,r)}}class k9 extends GB{constructor(e){super(e);ct(this,"_abortController",new AbortController);ct(this,"_reader",null);const{disableRange:r,disableStream:i,rangeChunkSize:s,url:A,withCredentials:a}=e._source;this._isStreamingSupported=!i;const o=new Headers(e.headers);ZP(A,o,a,this._abortController).then(l=>{e._responseOrigin=$B(l.url),tM(l.status,A),this._reader=l.body.getReader();const h=l.headers,{contentLength:u,isRangeSupported:d}=qP({responseHeaders:h,isHttp:!0,rangeChunkSize:s,disableRange:r});this._contentLength=u,this._isRangeSupported=d,this._filename=YP(h),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new cc("Streaming is disabled.")),this._headersCapability.resolve()}).catch(this._headersCapability.reject)}async read(){await this._headersCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:(this._loaded+=e.byteLength,this._callOnProgress(),{value:zB(e),done:!1})}cancel(e){var r;(r=this._reader)==null||r.cancel(e),this._abortController.abort()}}class O9 extends jB{constructor(e,r,i){super(e,r,i);ct(this,"_abortController",new AbortController);ct(this,"_readCapability",Promise.withResolvers());ct(this,"_reader",null);const{url:s,withCredentials:A}=e._source,a=new Headers(e.headers);a.append("Range",`bytes=${r}-${i-1}`),ZP(s,a,A,this._abortController).then(o=>{const l=$B(o.url);JP(l,e._responseOrigin),tM(o.status,s),this._reader=o.body.getReader(),this._readCapability.resolve()}).catch(this._readCapability.reject)}async read(){await this._readCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:{value:zB(e),done:!1}}cancel(e){var r;(r=this._reader)==null||r.cancel(e),this._abortController.abort()}}function AU(n){return n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer}function XB(){for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}var pB,eM;class D9 extends VB{constructor(e){super(e,R9,H9);T(this,pB);ct(this,"_progressiveDone",!1);ct(this,"_queuedChunks",[]);const{pdfDataRangeTransport:r}=e,{initialData:i,progressiveDone:s}=r;if((i==null?void 0:i.length)>0){const a=AU(i);this._queuedChunks.push(a)}this._progressiveDone=s;const A=a=>{var o;switch(a.type){case"range":case"progressiveRead":_(this,pB,eM).call(this,a.begin,a.chunk);break;case"progressiveDone":(o=this._fullReader)==null||o.progressiveDone(),this._progressiveDone=!0;break}};r.transportReady(A)}getFullReader(){const e=super.getFullReader();return this._queuedChunks=null,e}getRangeReader(e,r){const i=super.getRangeReader(e,r);return i&&(i.onDone=()=>this._rangeReaders.delete(i),this._source.pdfDataRangeTransport.requestDataRange(e,r)),i}cancelAllRequests(e){super.cancelAllRequests(e),this._source.pdfDataRangeTransport.abort()}}pB=new WeakSet,eM=function(e,r){const i=AU(r);if(e===void 0)this._fullReader?this._fullReader._enqueue(i):this._queuedChunks.push(i);else{const s=this._rangeReaders.keys().find(A=>A._begin===e);si(s,"#onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."),s._enqueue(i)}};var h1;class R9 extends GB{constructor(e){super(e);T(this,h1,XB.bind(this));ct(this,"_done",!1);ct(this,"_queuedChunks",null);ct(this,"_requests",[]);const{pdfDataRangeTransport:r,disableRange:i,disableStream:s}=e._source,{length:A,contentDispositionFilename:a}=r;this._queuedChunks=e._queuedChunks||[];for(const l of this._queuedChunks)this._loaded+=l.byteLength;this._done=e._progressiveDone,this._contentLength=A,this._isStreamingSupported=!s,this._isRangeSupported=!i,RB(a)&&(this._filename=a),this._headersCapability.resolve();const o=this._loaded;Promise.resolve().then(()=>{o>0&&this._loaded===o&&this._callOnProgress()})}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength,this._callOnProgress())}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,c(this,h1).call(this)}progressiveDone(){this._done||(this._done=!0),this._queuedChunks.length===0&&c(this,h1).call(this)}}h1=new WeakMap;var u1;class H9 extends jB{constructor(e,r,i){super(e,r,i);T(this,u1,XB.bind(this));ct(this,"onDone",null);ct(this,"_begin",-1);ct(this,"_done",!1);ct(this,"_queuedChunk",null);ct(this,"_requests",[]);this._begin=r}_enqueue(e){var r;this._done||(this._requests.length===0?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),c(this,u1).call(this)),this._done=!0,(r=this.onDone)==null||r.call(this))}async read(){if(this._queuedChunk){const r=this._queuedChunk;return this._queuedChunk=null,{value:r,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){var r;this._done=!0,c(this,u1).call(this),(r=this.onDone)==null||r.call(this)}}u1=new WeakMap;const R5=200,aU=206;function K9(n){return typeof n!="string"?n:PB(n).buffer}var Eo,x0,rM,iM;class V9 extends VB{constructor(e){super(e,G9,j9);T(this,x0);T(this,Eo,new WeakMap);ct(this,"_responseOrigin",null);const{httpHeaders:r,url:i}=e;this.url=i,this.isHttp=/https?:/.test(i.protocol),this.headers=XP(this.isHttp,r)}_request(e){const r=new XMLHttpRequest,i={validateStatus:null,onHeadersReceived:e.onHeadersReceived,onDone:e.onDone,onError:e.onError,onProgress:e.onProgress};c(this,Eo).set(r,i),r.open("GET",this.url),r.withCredentials=this._source.withCredentials;for(const[s,A]of this.headers)r.setRequestHeader(s,A);return this.isHttp&&"begin"in e&&"end"in e?(r.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.validateStatus=s=>s===aU||s===R5):i.validateStatus=s=>s===R5,r.responseType="arraybuffer",si(e.onError,"Expected `onError` callback to be provided."),r.onerror=()=>e.onError(r.status),r.onreadystatechange=_(this,x0,iM).bind(this,r),r.onprogress=_(this,x0,rM).bind(this,r),r.send(null),r}_abortRequest(e){c(this,Eo).has(e)&&(c(this,Eo).delete(e),e.abort())}getRangeReader(e,r){const i=super.getRangeReader(e,r);return i&&(i.onClosed=()=>this._rangeReaders.delete(i)),i}}Eo=new WeakMap,x0=new WeakSet,rM=function(e,r){var s;const i=c(this,Eo).get(e);(s=i==null?void 0:i.onProgress)==null||s.call(i,r)},iM=function(e,r){const i=c(this,Eo).get(e);if(!i||(e.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),e.readyState!==4)||!c(this,Eo).has(e))return;if(c(this,Eo).delete(e),e.status===0&&this.isHttp){i.onError(e.status);return}const s=e.status||R5;if(!i.validateStatus(s)){i.onError(e.status);return}const A=K9(e.response);if(s===aU){const a=e.getResponseHeader("Content-Range");/bytes (\d+)-(\d+)\/(\d+)/.test(a)?i.onDone(A):(Me('Missing or invalid "Content-Range" header.'),i.onError(0))}else A?i.onDone(A):i.onError(e.status)};var f1,Ho,nM,sM,AM,aM;class G9 extends GB{constructor(e){super(e);T(this,Ho);T(this,f1,XB.bind(this));ct(this,"_cachedChunks",[]);ct(this,"_done",!1);ct(this,"_requests",[]);ct(this,"_storedError",null);this._fullRequestXhr=e._request({onHeadersReceived:_(this,Ho,nM).bind(this),onDone:_(this,Ho,sM).bind(this),onError:_(this,Ho,AM).bind(this),onProgress:_(this,Ho,aM).bind(this)})}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e),c(this,f1).call(this),this._stream._abortRequest(this._fullRequestXhr),this._fullRequestXhr=null}}f1=new WeakMap,Ho=new WeakSet,nM=function(){const e=this._stream,{disableRange:r,rangeChunkSize:i}=e._source,s=this._fullRequestXhr;e._responseOrigin=$B(s.responseURL);const A=s.getAllResponseHeaders(),a=new Headers(A?A.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(h=>{const[u,...d]=h.split(": ");return[u,d.join(": ")]}):[]),{contentLength:o,isRangeSupported:l}=qP({responseHeaders:a,isHttp:e.isHttp,rangeChunkSize:i,disableRange:r});this._contentLength=o,this._isRangeSupported=l,this._filename=YP(a),this._isRangeSupported&&e._abortRequest(s),this._headersCapability.resolve()},sM=function(e){this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._cachedChunks.push(e),this._done=!0,this._cachedChunks.length===0&&c(this,f1).call(this)},AM=function(e){this._storedError=WB(e,this._stream.url),this._headersCapability.reject(this._storedError);for(const r of this._requests)r.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0},aM=function(e){var r;(r=this.onProgress)==null||r.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})};var d1,pc,oM,lM,JE;class j9 extends jB{constructor(e,r,i){super(e,r,i);T(this,pc);T(this,d1,XB.bind(this));ct(this,"onClosed",null);ct(this,"_done",!1);ct(this,"_queuedChunk",null);ct(this,"_requests",[]);ct(this,"_storedError",null);this._requestXhr=e._request({begin:r,end:i,onHeadersReceived:_(this,pc,oM).bind(this),onDone:_(this,pc,lM).bind(this),onError:_(this,pc,JE).bind(this),onProgress:null})}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const r=this._queuedChunk;return this._queuedChunk=null,{value:r,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){var r;this._done=!0,c(this,d1).call(this),this._stream._abortRequest(this._requestXhr),(r=this.onClosed)==null||r.call(this)}}d1=new WeakMap,pc=new WeakSet,oM=function(){var r;const e=$B((r=this._requestXhr)==null?void 0:r.responseURL);try{JP(e,this._stream._responseOrigin)}catch(i){this._storedError=i,_(this,pc,JE).call(this,0)}},lM=function(e){var r;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0,c(this,d1).call(this),(r=this.onClosed)==null||r.call(this)},JE=function(e){this._storedError??(this._storedError=WB(e,this._stream.url));for(const r of this._requests)r.reject(this._storedError);this._requests.length=0,this._queuedChunk=null};function cM(n,t=null){const e=process.getBuiltinModule("fs"),{Readable:r}=process.getBuiltinModule("stream"),i=e.createReadStream(n,t);return r.toWeb(i)}class $9 extends VB{constructor(t){super(t,W9,z9);const{url:e}=t;si(e.protocol==="file:","PDFNodeStream only supports file:// URLs.")}}class W9 extends GB{constructor(e){super(e);ct(this,"_reader",null);const{disableRange:r,disableStream:i,rangeChunkSize:s,url:A}=e._source;this._isStreamingSupported=!i,process.getBuiltinModule("fs/promises").lstat(A).then(o=>{const l=cM(A);this._reader=l.getReader();const{size:h}=o;this._contentLength=h,this._isRangeSupported=!r&&h>2*s,!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new cc("Streaming is disabled.")),this._headersCapability.resolve()}).catch(o=>{o.code==="ENOENT"&&(o=WB(0,A)),this._headersCapability.reject(o)})}async read(){await this._headersCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:(this._loaded+=e.byteLength,this._callOnProgress(),{value:zB(e),done:!1})}cancel(e){var r;(r=this._reader)==null||r.cancel(e)}}class z9 extends jB{constructor(e,r,i){super(e,r,i);ct(this,"_readCapability",Promise.withResolvers());ct(this,"_reader",null);const{url:s}=e._source;try{const A=cM(s,{start:r,end:i-1});this._reader=A.getReader(),this._readCapability.resolve()}catch(A){this._readCapability.reject(A)}}async read(){await this._readCapability.promise;const{value:e,done:r}=await this._reader.read();return r?{value:e,done:r}:{value:zB(e),done:!1}}cancel(e){var r;(r=this._reader)==null||r.cancel(e)}}function X9(n){return ev(n)?M9:FA?$9:V9}var g1,p1;class Da{static get workerPort(){return c(this,g1)}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");C(this,g1,t)}static get workerSrc(){return c(this,p1)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");C(this,p1,t)}}g1=new WeakMap,p1=new WeakMap,T(Da,g1,null),T(Da,p1,"");var Cp,m1;class q9{constructor({parsedData:t,rawData:e}){T(this,Cp);T(this,m1);C(this,Cp,t),C(this,m1,e)}getRaw(){return c(this,m1)}get(t){return c(this,Cp).get(t)??null}[Symbol.iterator](){return c(this,Cp).entries()}}Cp=new WeakMap,m1=new WeakMap;const wg=Symbol("INTERNAL");var v1,w1,y1,xp;class Y9{constructor(t,{name:e,intent:r,usage:i,rbGroups:s}){T(this,v1,!1);T(this,w1,!1);T(this,y1,!1);T(this,xp,!0);C(this,v1,!!(t&SA.DISPLAY)),C(this,w1,!!(t&SA.PRINT)),this.name=e,this.intent=r,this.usage=i,this.rbGroups=s}get visible(){if(c(this,y1))return c(this,xp);if(!c(this,xp))return!1;const{print:t,view:e}=this.usage;return c(this,v1)?(e==null?void 0:e.viewState)!=="OFF":c(this,w1)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,r=!1){t!==wg&&hr("Internal method `_setVisible` called."),C(this,y1,r),C(this,xp,e)}}v1=new WeakMap,w1=new WeakMap,y1=new WeakMap,xp=new WeakMap;var vh,xr,Ep,Sp,b1,ZE;class J9{constructor(t,e=SA.DISPLAY){T(this,b1);T(this,vh,null);T(this,xr,new Map);T(this,Ep,null);T(this,Sp,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,C(this,Sp,t.order);for(const r of t.groups)c(this,xr).set(r.id,new Y9(e,r));if(t.baseState==="OFF")for(const r of c(this,xr).values())r._setVisible(wg,!1);for(const r of t.on)c(this,xr).get(r)._setVisible(wg,!0);for(const r of t.off)c(this,xr).get(r)._setVisible(wg,!1);C(this,Ep,this.getHash())}}isVisible(t){if(c(this,xr).size===0)return!0;if(!t)return NB("Optional content group not defined."),!0;if(t.type==="OCG")return c(this,xr).has(t.id)?c(this,xr).get(t.id).visible:(Me(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return _(this,b1,ZE).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!c(this,xr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(c(this,xr).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!c(this,xr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(!c(this,xr).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!c(this,xr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(!c(this,xr).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!c(this,xr).has(e))return Me(`Optional content group not found: ${e}`),!0;if(c(this,xr).get(e).visible)return!1}return!0}return Me(`Unknown optional content policy ${t.policy}.`),!0}return Me(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,r=!0){var s;const i=c(this,xr).get(t);if(!i){Me(`Optional content group not found: ${t}`);return}if(r&&e&&i.rbGroups.length)for(const A of i.rbGroups)for(const a of A)a!==t&&((s=c(this,xr).get(a))==null||s._setVisible(wg,!1,!0));i._setVisible(wg,!!e,!0),C(this,vh,null)}setOCGState({state:t,preserveRB:e}){let r;for(const i of t){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}const s=c(this,xr).get(i);if(s)switch(r){case"ON":this.setVisibility(i,!0,e);break;case"OFF":this.setVisibility(i,!1,e);break;case"Toggle":this.setVisibility(i,!s.visible,e);break}}C(this,vh,null)}get hasInitialVisibility(){return c(this,Ep)===null||this.getHash()===c(this,Ep)}getOrder(){return c(this,xr).size?c(this,Sp)?c(this,Sp).slice():[...c(this,xr).keys()]:null}getGroup(t){return c(this,xr).get(t)||null}getHash(){if(c(this,vh)!==null)return c(this,vh);const t=new HE;for(const[e,r]of c(this,xr))t.update(`${e}:${r.visible}`);return C(this,vh,t.hexdigest())}[Symbol.iterator](){return c(this,xr).entries()}}vh=new WeakMap,xr=new WeakMap,Ep=new WeakMap,Sp=new WeakMap,b1=new WeakSet,ZE=function(t){const e=t.length;if(e<2)return!0;const r=t[0];for(let i=1;i<e;i++){const s=t[i];let A;if(Array.isArray(s))A=_(this,b1,ZE).call(this,s);else if(c(this,xr).has(s))A=c(this,xr).get(s).visible;else return Me(`Optional content group not found: ${s}`),!0;switch(r){case"And":if(!A)return!1;break;case"Or":if(A)return!0;break;case"Not":return!A;default:return!0}}return r==="And"};var _i,Ta,Un,Bf,So,cs,_m,Um,Hy;class Z9{constructor(){T(this,cs);T(this,_i,null);T(this,Ta,null);T(this,Un,0);T(this,Bf,null);T(this,So,null)}get pagesNumber(){return c(this,Un)}set pagesNumber(t){c(this,Un)!==t&&(C(this,Un,t),C(this,_i,null),C(this,Ta,null))}movePages(t,e,r){_(this,cs,_m).call(this);const i=c(this,_i),s=_(this,cs,Um).call(this),A=e.length,a=new Uint32Array(A);let o=0;for(let d=0;d<A;d++){const f=e[d]-1;a[d]=i[f],f<r&&o++}const l=c(this,Un),h=l-A,u=Wr(r-o,0,h);for(let d=0,f=0;d<l;d++)t.has(d+1)||(i[f++]=i[d]);i.copyWithin(u+A,u,h),i.set(a,u),_(this,cs,Hy).call(this,s),i.every((d,f)=>d===f+1)&&C(this,_i,null)}deletePages(t){_(this,cs,_m).call(this);const e=c(this,_i),r=_(this,cs,Um).call(this);C(this,So,{pageNumberToId:e.slice(),pagesNumber:c(this,Un),prevPageNumbers:c(this,Ta).slice()});const i=c(this,Un)-t.length;C(this,Un,i);const s=C(this,_i,new Uint32Array(i));C(this,Ta,new Int32Array(i));let A=0,a=0;for(const o of t){const l=o-1;l!==A&&(s.set(e.subarray(A,l),a),a+=l-A),A=l+1}A<e.length&&s.set(e.subarray(A),a),_(this,cs,Hy).call(this,r,new Set(t))}cancelDelete(){c(this,So)&&(C(this,_i,c(this,So).pageNumberToId),C(this,Un,c(this,So).pagesNumber),C(this,Ta,c(this,So).prevPageNumbers),C(this,So,null))}cleanSavedData(){C(this,So,null)}copyPages(t){_(this,cs,_m).call(this),C(this,Bf,{pageNumbers:t,pageIds:t.map(e=>c(this,_i)[e-1])})}cancelCopy(){C(this,Bf,null)}pastePages(t){_(this,cs,_m).call(this);const e=c(this,_i),r=_(this,cs,Um).call(this),{pageNumbers:i,pageIds:s}=c(this,Bf),A=c(this,Un)+i.length;C(this,Un,A);const a=C(this,_i,new Uint32Array(A));C(this,Ta,new Int32Array(A)),a.set(e.subarray(0,t),0),a.set(s,t),a.set(e.subarray(t),t+i.length),_(this,cs,Hy).call(this,r,null,t,i),C(this,Bf,null)}hasBeenAltered(){return c(this,_i)!==null}getPageMappingForSaving(t=null){t??(t=_(this,cs,Um).call(this));let e=0;for(const i of t.values())e=Math.max(e,i.length);const r=new Array(e);for(let i=0;i<e;i++)r[i]={document:null,pageIndices:[],includePages:[]};for(const[i,s]of t)for(let A=0,a=s.length;A<a;A++)r[A].includePages.push([i-1,s[A]-1]);for(const{includePages:i,pageIndices:s}of r){i.sort((A,a)=>A[0]-a[0]);for(let A=0,a=i.length;A<a;A++)s.push(i[A][1]),i[A]=i[A][0]}return r}extractPages(t){t=Array.from(t).sort((r,i)=>r-i);const e=new Map;for(let r=0,i=t.length;r<i;r++){const s=this.getPageId(t[r]);e.getOrInsertComputed(s,MB).push(r+1)}return this.getPageMappingForSaving(e)}getPrevPageNumber(t){var e;return((e=c(this,Ta))==null?void 0:e[t-1])??0}getPageNumber(t){if(!c(this,_i))return t;const e=c(this,_i);for(let r=0,i=c(this,Un);r<i;r++)if(e[r]===t)return r+1;return 0}getPageId(t){var e;return((e=c(this,_i))==null?void 0:e[t-1])??t}getMapping(){var t;return(t=c(this,_i))==null?void 0:t.subarray(0,this.pagesNumber)}}_i=new WeakMap,Ta=new WeakMap,Un=new WeakMap,Bf=new WeakMap,So=new WeakMap,cs=new WeakSet,_m=function(){if(c(this,_i))return;const t=c(this,Un),e=C(this,_i,new Uint32Array(t));for(let r=0;r<t;r++)e[r]=r+1;C(this,Ta,new Int32Array(e))},Um=function(){const t=new Map,e=c(this,_i);for(let r=0,i=c(this,Un);r<i;r++){const s=e[r],A=t.get(s);A?A.push(r+1):t.set(s,[r+1])}return t},Hy=function(t,e=null,r=-1,i=null){const s=c(this,Ta),A=c(this,_i),a=r+((i==null?void 0:i.length)??0),o=new Map;for(let l=0,h=c(this,Un);l<h;l++){if(l>=r&&l<a){s[l]=-i[l-r];continue}const u=A[l],d=t.get(u);let f=o.get(u)||0;if(e&&d)for(;f<d.length&&e.has(d[f]);)f++;s[l]=d==null?void 0:d[f],o.set(u,f+1)}};const yg=Symbol("INITIAL_DATA"),oU=()=>({...Promise.withResolvers(),data:yg});var YA;class hM{constructor(){T(this,YA,new Map)}get(t,e=null){if(e){const i=c(this,YA).getOrInsertComputed(t,oU);return i.promise.then(()=>e(i.data)),null}const r=c(this,YA).get(t);if(!r||r.data===yg)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return r.data}has(t){const e=c(this,YA).get(t);return!!e&&e.data!==yg}delete(t){const e=c(this,YA).get(t);return!e||e.data===yg?!1:(c(this,YA).delete(t),!0)}resolve(t,e=null){const r=c(this,YA).getOrInsertComputed(t,oU);if(r.data!==yg)throw new Error(`Object already resolved ${t}.`);r.data=e,r.resolve()}clear(){var t;for(const{data:e}of c(this,YA).values())(t=e==null?void 0:e.bitmap)==null||t.close();c(this,YA).clear()}*[Symbol.iterator](){for(const[t,{data:e}]of c(this,YA))e!==yg&&(yield[t,e])}}YA=new WeakMap;const tV=1e5,lU=30;var NQ,wh,bs,B1,C1,Fp,Cf,kl,x1,E1,xf,S1,Tp,yh,Ip,F1,_p,Ef,T1,I1,Up,Sf,_1,Lp,Qp,mc,uM,fM,tS,LA,Ky,eS,dM,gM;const Fn=class Fn{constructor({textContentSource:t,images:e,container:r,viewport:i}){T(this,mc);T(this,wh,Promise.withResolvers());T(this,bs,null);T(this,B1,!1);T(this,C1,!!((NQ=globalThis.FontInspector)!=null&&NQ.enabled));T(this,Fp,null);T(this,Cf,null);T(this,kl,null);T(this,x1,0);T(this,E1,0);T(this,xf,null);T(this,S1,null);T(this,Tp,0);T(this,yh,0);T(this,Ip,Object.create(null));T(this,F1,[]);T(this,_p,null);T(this,Ef,[]);T(this,T1,new WeakMap);T(this,I1,null);var l;if(t instanceof ReadableStream)C(this,_p,t);else if(typeof t=="object")C(this,_p,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');C(this,bs,C(this,S1,r)),C(this,Fp,e),C(this,yh,i.scale*Ga.pixelRatio),C(this,Tp,i.rotation),C(this,kl,{div:null,properties:null,ctx:null});const{pageWidth:s,pageHeight:A,pageX:a,pageY:o}=i.rawDims;C(this,I1,[1,0,0,-1,-a,o+A]),C(this,E1,s),C(this,x1,A),_(l=Fn,LA,dM).call(l),r.style.setProperty("--min-font-size",c(Fn,Lp)),Xh(r,i),c(this,wh).promise.finally(()=>{c(Fn,Qp).delete(this),C(this,kl,null),C(this,Ip,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=Mi.platform;return Fe(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){c(this,Fp)&&c(this,bs).append(c(this,Fp).render());const t=()=>{c(this,xf).read().then(({value:e,done:r})=>{if(r){c(this,wh).resolve();return}c(this,Cf)??C(this,Cf,e.lang),Object.assign(c(this,Ip),e.styles),_(this,mc,uM).call(this,e.items),t()},c(this,wh).reject)};return C(this,xf,c(this,_p).getReader()),c(Fn,Qp).add(this),t(),c(this,wh).promise}update({viewport:t,onBefore:e=null}){var s;const r=t.scale*Ga.pixelRatio,i=t.rotation;if(i!==c(this,Tp)&&(e==null||e(),C(this,Tp,i),Xh(c(this,S1),{rotation:i})),r!==c(this,yh)){e==null||e(),C(this,yh,r);const A={div:null,properties:null,ctx:_(s=Fn,LA,Ky).call(s,c(this,Cf))};for(const a of c(this,Ef))A.properties=c(this,T1).get(a),A.div=a,_(this,mc,tS).call(this,A)}}cancel(){var e;const t=new cc("TextLayer task cancelled.");(e=c(this,xf))==null||e.cancel(t).catch(()=>{}),C(this,xf,null),c(this,wh).reject(t)}get textDivs(){return c(this,Ef)}get textContentItemsStr(){return c(this,F1)}static cleanup(){if(!(c(this,Qp).size>0)){c(this,Up).clear();for(const{canvas:t}of c(this,Sf).values())t.remove();c(this,Sf).clear()}}};wh=new WeakMap,bs=new WeakMap,B1=new WeakMap,C1=new WeakMap,Fp=new WeakMap,Cf=new WeakMap,kl=new WeakMap,x1=new WeakMap,E1=new WeakMap,xf=new WeakMap,S1=new WeakMap,Tp=new WeakMap,yh=new WeakMap,Ip=new WeakMap,F1=new WeakMap,_p=new WeakMap,Ef=new WeakMap,T1=new WeakMap,I1=new WeakMap,Up=new WeakMap,Sf=new WeakMap,_1=new WeakMap,Lp=new WeakMap,Qp=new WeakMap,mc=new WeakSet,uM=function(t){var i,s;if(c(this,B1))return;(s=c(this,kl)).ctx??(s.ctx=_(i=Fn,LA,Ky).call(i,c(this,Cf)));const e=c(this,Ef),r=c(this,F1);for(const A of t){if(e.length>tV){Me("Ignoring additional textDivs for performance reasons."),C(this,B1,!0);return}if(A.str===void 0){if(A.type==="beginMarkedContentProps"||A.type==="beginMarkedContent"){const a=c(this,bs);C(this,bs,document.createElement("span")),c(this,bs).classList.add("markedContent"),A.id&&c(this,bs).setAttribute("id",`${A.id}`),A.tag==="Artifact"&&(c(this,bs).ariaHidden=!0),a.append(c(this,bs))}else A.type==="endMarkedContent"&&C(this,bs,c(this,bs).parentNode);continue}r.push(A.str),_(this,mc,fM).call(this,A)}},fM=function(t){var p;const e=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};c(this,Ef).push(e);const i=Qt.transform(c(this,I1),t.transform);let s=Math.atan2(i[1],i[0]);const A=c(this,Ip)[t.fontName];A.vertical&&(s+=Math.PI/2);let a=c(this,C1)&&A.fontSubstitution||A.fontFamily;a=Fn.fontFamilyMap.get(a)||a;const o=Math.hypot(i[2],i[3]),l=o*_(p=Fn,LA,gM).call(p,a,A,c(this,Cf));let h,u;s===0?(h=i[4],u=i[5]-l):(h=i[4]+l*Math.sin(s),u=i[5]-l*Math.cos(s));const d=e.style;d.left=`${(100*h/c(this,E1)).toFixed(2)}%`,d.top=`${(100*u/c(this,x1)).toFixed(2)}%`,d.setProperty("--font-height",`${o.toFixed(2)}px`),d.fontFamily=a,r.fontSize=o,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,c(this,C1)&&(e.dataset.fontName=A.fontSubstitutionLoadedName||t.fontName),s!==0&&(r.angle=s*(180/Math.PI));let f=!1;if(t.str.length>1)f=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const m=Math.abs(t.transform[0]),y=Math.abs(t.transform[3]);m!==y&&Math.max(m,y)/Math.min(m,y)>1.5&&(f=!0)}if(f&&(r.canvasWidth=A.vertical?t.height:t.width),c(this,T1).set(e,r),c(this,kl).div=e,c(this,kl).properties=r,_(this,mc,tS).call(this,c(this,kl)),r.hasText&&c(this,bs).append(e),r.hasEOL){const m=document.createElement("br");m.setAttribute("role","presentation"),c(this,bs).append(m)}},tS=function(t){var A;const{div:e,properties:r,ctx:i}=t,{style:s}=e;if(r.canvasWidth!==0&&r.hasText){const{fontFamily:a}=s,{canvasWidth:o,fontSize:l}=r;_(A=Fn,LA,eS).call(A,i,l*c(this,yh),a);const{width:h}=i.measureText(e.textContent);h>0&&s.setProperty("--scale-x",o*c(this,yh)/h)}r.angle!==0&&s.setProperty("--rotate",`${r.angle}deg`)},LA=new WeakSet,Ky=function(t=null){let e=c(this,Sf).get(t||(t=""));if(!e){const r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=t,document.body.append(r),e=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),c(this,Sf).set(t,e),c(this,_1).set(e,{size:0,family:""})}return e},eS=function(t,e,r){const i=c(this,_1).get(t);e===i.size&&r===i.family||(t.font=`${e}px ${r}`,i.size=e,i.family=r)},dM=function(){if(c(this,Lp)!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),C(this,Lp,t.getBoundingClientRect().height),t.remove()},gM=function(t,e,r){const i=c(this,Up).get(t);if(i)return i;const s=_(this,LA,Ky).call(this,r);s.canvas.width=s.canvas.height=lU,_(this,LA,eS).call(this,s,lU,t);const A=s.measureText(""),a=A.fontBoundingBoxAscent,o=Math.abs(A.fontBoundingBoxDescent);s.canvas.width=s.canvas.height=0;let l=.8;return a?l=a/(a+o):(Mi.platform.isFirefox&&Me("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),e.ascent?l=e.ascent:e.descent&&(l=1+e.descent)),c(this,Up).set(t,l),l},T(Fn,LA),T(Fn,Up,new Map),T(Fn,Sf,new Map),T(Fn,_1,new WeakMap),T(Fn,Lp,null),T(Fn,Qp,new Set);let v0=Fn;const eV=100;function p4(n={}){typeof n=="string"||n instanceof URL?n={url:n}:(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});const t=new rS,{docId:e}=t,r=n.url?o9(n.url):null,i=n.data?l9(n.data):null,s=n.httpHeaders||null,A=n.withCredentials===!0,a=n.password??null,o=n.range instanceof m4?n.range:null,l=Number.isInteger(n.rangeChunkSize)&&n.rangeChunkSize>0?n.rangeChunkSize:2**16;let h=n.worker instanceof w0?n.worker:null;const u=n.verbosity,d=typeof n.docBaseUrl=="string"&&!Cw(n.docBaseUrl)?n.docBaseUrl:null,f=x2(n.cMapUrl),p=n.cMapPacked!==!1,m=x2(n.iccUrl),y=x2(n.standardFontDataUrl),w=x2(n.wasmUrl),B=n.stopAtErrors!==!0,E=Number.isInteger(n.maxImageSize)&&n.maxImageSize>-1?n.maxImageSize:-1,S=typeof n.isOffscreenCanvasSupported=="boolean"?n.isOffscreenCanvasSupported:!FA,I=typeof n.isImageDecoderSupported=="boolean"?n.isImageDecoderSupported:!FA&&(Mi.platform.isFirefox||!globalThis.chrome),L=Number.isInteger(n.canvasMaxAreaInBytes)?n.canvasMaxAreaInBytes:-1,k=typeof n.disableFontFace=="boolean"?n.disableFontFace:FA,H=n.fontExtraProperties===!0,Q=n.enableXfa===!0,W=n.ownerDocument||globalThis.document,U=n.disableRange===!0,D=n.disableStream===!0,j=n.disableAutoFetch===!0,V=n.pdfBug===!0,st=n.CanvasFactory||(FA?p9:u9),rt=n.FilterFactory||(FA?g9:f9),it=n.BinaryDataFactory||(FA?m9:q_),At=n.enableHWA===!0,vt=n.enableWebGPU===!0?y9():Promise.resolve(!1),mt=n.useWasm!==!1,M=n.pagesMapper||new Z9,$=typeof n.useSystemFonts=="boolean"?n.useSystemFonts:!FA&&!k,q=typeof n.useWorkerFetch=="boolean"?n.useWorkerFetch:!!(it===q_&&f&&p&&y&&w&&ev(f,document.baseURI)&&ev(y,document.baseURI)&&ev(w,document.baseURI)),tt=null;kK(u);const et={canvasFactory:new st({ownerDocument:W,enableHWA:At}),filterFactory:new rt({docId:e,ownerDocument:W}),binaryDataFactory:q?null:new it({cMapUrl:f,standardFontDataUrl:y,wasmUrl:w})};h||(h=w0.create({verbosity:u,port:Da.workerPort}),t._worker=h);const ot={docId:e,apiVersion:"5.7.284",data:i,password:a,disableAutoFetch:j,rangeChunkSize:l,docBaseUrl:d,enableXfa:Q,evaluatorOptions:{maxImageSize:E,disableFontFace:k,ignoreErrors:B,isOffscreenCanvasSupported:S,isImageDecoderSupported:I,canvasMaxAreaInBytes:L,fontExtraProperties:H,useSystemFonts:$,useWasm:mt,useWorkerFetch:q,cMapUrl:f,cMapPacked:p,iccUrl:m,standardFontDataUrl:y,wasmUrl:w,hasGPU:!1}},dt={ownerDocument:W,pdfBug:V,styleElement:tt,enableHWA:At,loadingParams:{disableAutoFetch:j,enableXfa:Q}};return Promise.all([h.promise,vt]).then(function([,wt]){if(t.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");ot.evaluatorOptions.hasGPU=wt;const yt=h.messageHandler.sendWithPromise("GetDocRequest",ot,i?[i.buffer]:null);let St;if(!i)if(o)St=new D9({pdfDataRangeTransport:o,disableRange:U,disableStream:D});else if(r){const Mt=X9(r);St=new Mt({url:r,httpHeaders:s,withCredentials:A,rangeChunkSize:l,disableRange:U,disableStream:D})}else throw new Error("getDocument - expected either `data`, `range`, or `url` parameter.");return yt.then(Mt=>{if(t.destroyed)throw new Error("Loading aborted");if(h.destroyed)throw new Error("Worker was destroyed");const Pt=new Em(e,Mt,h.port),jt=new iV(Pt,t,St,dt,et,M);t._transport=jt,Pt.send("Ready",null)})}).catch(t._capability.reject),t}var mB;const vB=class vB{constructor(){ct(this,"_capability",Promise.withResolvers());ct(this,"_transport",null);ct(this,"_worker",null);ct(this,"docId",`d${Hi(vB,mB)._++}`);ct(this,"destroyed",!1);ct(this,"onPassword",null);ct(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var t,e,r,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),await((e=this._transport)==null?void 0:e.destroy())}catch(s){throw(r=this._worker)!=null&&r.port&&delete this._worker._pendingDestroy,s}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null}async getData(){return this._transport.getData()}};mB=new WeakMap,T(vB,mB,0);let rS=vB;var Np,Ff;class m4{constructor(t,e,r=!1,i=null){T(this,Np,Promise.withResolvers());T(this,Ff,null);this.length=t,this.initialData=e,this.progressiveDone=r,this.contentDispositionFilename=i,Object.defineProperty(this,"onDataProgress",{value:()=>{jK("`PDFDataRangeTransport.prototype.onDataProgress` - method was removed, since loading progress is now reported automatically through the `PDFDataTransportStream` class (and related code).")}})}onDataRange(t,e){c(this,Ff).call(this,{type:"range",begin:t,chunk:e})}onDataProgressiveRead(t){c(this,Np).promise.then(()=>{c(this,Ff).call(this,{type:"progressiveRead",chunk:t})})}onDataProgressiveDone(){c(this,Np).promise.then(()=>{c(this,Ff).call(this,{type:"progressiveDone"})})}transportReady(t){C(this,Ff,t),c(this,Np).resolve()}requestDataRange(t,e){hr("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}Np=new WeakMap,Ff=new WeakMap;class rV{constructor(t,e){this._pdfInfo=t,this._transport=e}get pagesMapper(){return this._transport.pagesMapper}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Fe(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(t,e){return this._transport.getAnnotationsByType(t,e)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}extractPages(t){return this._transport.extractPages(t)}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getRawData(t){return this._transport.getRawData(t)}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Ol,Tf,If,Lm;const xT=class xT{constructor(t,e,r,i,s=!1){T(this,If);T(this,Ol,!1);T(this,Tf,null);this._pageIndex=t,this._pageInfo=e,this._transport=r,this._stats=s?new D_:null,this._pdfBug=s,this.commonObjs=r.commonObjs,this.objs=new hM,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null,C(this,Tf,i),this.imageCoordinates=null}clone(t){const e=new xT(t,this._pageInfo,this._transport,c(this,Tf),this._pdfBug);return e.clonedFromIndex=this.clonedFromIndex??this._pageIndex,this._transport.updatePage(e),e}get pageNumber(){return this._pageIndex+1}set pageNumber(t){this._pageIndex=t-1,this._transport.updatePage(this)}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:s=!1}={}){return new Bw({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:r,offsetY:i,dontFlip:s})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Fe(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null}render({canvasContext:t,canvas:e=t.canvas,viewport:r,intent:i="display",annotationMode:s=ec.ENABLE,transform:A=null,background:a=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:h=null,printAnnotationStorage:u=null,isEditing:d=!1,recordImages:f=!1,recordOperations:p=!1,operationsFilter:m=null}){var j,V,st;(j=this._stats)==null||j.time("Overall");const y=this._transport.getRenderingIntent(i,s,u,d),{renderingIntent:w,cacheKey:B}=y;C(this,Ol,!1),o||(o=this._transport.getOptionalContentConfig(w));const E=this._intentStates.getOrInsertComputed(B,Tb);E.streamReaderCancelTimeout&&(clearTimeout(E.streamReaderCancelTimeout),E.streamReaderCancelTimeout=null);const S=!!(w&SA.PRINT);E.displayReadyCapability||(E.displayReadyCapability=Promise.withResolvers(),E.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(V=this._stats)==null||V.time("Page Request"),this._pumpOperatorList(y));const I=!!(this._pdfBug&&((st=globalThis.StepperManager)!=null&&st.enabled)),L=!!e&&!this.recordedBBoxes&&(p||I),k=!!e&&!this.imageCoordinates&&f,H=rt=>{var it,At,ut,vt;if(E.renderTasks.delete(U),L){const mt=(it=U.gfx)==null?void 0:it.dependencyTracker.take();mt&&((At=U.stepper)==null||At.setOperatorBBoxes(mt,U.gfx.dependencyTracker.takeDebugMetadata()),p&&(this.recordedBBoxes=mt))}k&&!rt&&(this.imageCoordinates=(ut=U.gfx)==null?void 0:ut.imagesTracker.take()),S&&C(this,Ol,!0),_(this,If,Lm).call(this),rt?(U.capability.reject(rt),this._abortOperatorList({intentState:E,reason:rt instanceof Error?rt:new Error(rt)})):U.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(vt=globalThis.Stats)!=null&&vt.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))};let Q=null,W=null;(L||k)&&(W=new ZK(e,E.operatorList.length)),L&&(Q=new t9(W,I));const U=new nS({callback:H,params:{canvas:e,canvasContext:t,dependencyTracker:Q??W,imagesTracker:k?new GE(e):null,viewport:r,transform:A,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:E.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!S,pdfBug:this._pdfBug,pageColors:h,enableHWA:this._transport.enableHWA,operationsFilter:m});(E.renderTasks||(E.renderTasks=new Set)).add(U);const D=U.task;return Promise.all([E.displayReadyCapability.promise,o]).then(([rt,it])=>{var At;if(this.destroyed){H();return}if((At=this._stats)==null||At.time("Rendering"),!(it.renderingIntent&w))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");U.initializeGraphics({transparency:rt,optionalContentConfig:it}),U.operatorListChanged()}).catch(H),D}getOperatorList({intent:t="display",annotationMode:e=ec.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){var l;function s(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(o))}const A=this._transport.getRenderingIntent(t,e,r,i,!0),a=this._intentStates.getOrInsertComputed(A.cacheKey,Tb);let o;return a.opListReadCapability||(o=Object.create(null),o.operatorListChanged=s,a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||(a.renderTasks=new Set)).add(o),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(l=this._stats)==null||l.time("Page Request"),this._pumpOperatorList(A)),a.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageId:c(this,Tf).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(i){return i.items.length}})}async getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(i=>vv.textContent(i));const e=this.streamTextContent(t),r={items:[],styles:Object.create(null),lang:null};for await(const i of e)r.lang??(r.lang=i.lang),Object.assign(r.styles,i.styles),r.items.push(...i.items);return r}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const r of e.renderTasks)t.push(r.completed),r.cancel();return this.objs.clear(),C(this,Ol,!1),Promise.all(t)}cleanup(t=!1){C(this,Ol,!0);const e=_(this,If,Lm).call(this);return t&&e&&this._stats&&(this._stats=new D_),e}_startRenderPage(t,e){var i,s;const r=this._intentStates.get(e);r&&((i=this._stats)==null||i.timeEnd("Page Request"),(s=r.displayReadyCapability)==null||s.resolve(t))}_renderPageChunk(t,e){for(let r=0,i=t.length;r<i;r++)e.operatorList.fnArray.push(t.fnArray[r]),e.operatorList.argsArray.push(t.argsArray[r]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(const r of e.renderTasks)r.operatorListChanged();t.lastChunk&&_(this,If,Lm).call(this)}_pumpOperatorList({renderingIntent:t,cacheKey:e,annotationStorageSerializable:r,modifiedIds:i}){const{map:s,transfer:A}=r,o=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageId:c(this,Tf).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,intent:t,cacheKey:e,annotationStorage:s,modifiedIds:i},void 0,A).getReader(),l=this._intentStates.get(e);l.streamReader=o;const h=()=>{o.read().then(({value:u,done:d})=>{if(d){l.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(u,l),h())},u=>{if(l.streamReader=null,!this._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;for(const d of l.renderTasks)d.operatorListChanged();_(this,If,Lm).call(this)}if(l.displayReadyCapability)l.displayReadyCapability.reject(u);else if(l.opListReadCapability)l.opListReadCapability.reject(u);else throw u}})};h()}_abortOperatorList({intentState:t,reason:e,force:r=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!r){if(t.renderTasks.size>0)return;if(e instanceof DB){let i=eV;e.extraDelay>0&&e.extraDelay<1e3&&(i+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},i);return}}if(t.streamReader.cancel(new cc(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[i,s]of this._intentStates)if(s===t){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}};Ol=new WeakMap,Tf=new WeakMap,If=new WeakSet,Lm=function(){if(!c(this,Ol)||this.destroyed)return!1;for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),C(this,Ol,!1),!0};let iS=xT;var bh,Ia,Dl,_f,wB,Uf,Lf,Ts,Vy,pM,mM,Qm,Pp,Gy;const ui=class ui{constructor({name:t=null,port:e=null,verbosity:r=OK()}={}){T(this,Ts);T(this,bh,Promise.withResolvers());T(this,Ia,null);T(this,Dl,null);T(this,_f,null);if(this.name=t,this.destroyed=!1,this.verbosity=r,e){if(c(ui,Lf).has(e))throw new Error("Cannot use more than one PDFWorker per port.");c(ui,Lf).set(e,this),_(this,Ts,pM).call(this,e)}else _(this,Ts,mM).call(this)}get promise(){return c(this,bh).promise}get port(){return c(this,Dl)}get messageHandler(){return c(this,Ia)}destroy(){var t,e;this.destroyed=!0,(t=c(this,_f))==null||t.terminate(),C(this,_f,null),c(ui,Lf).delete(c(this,Dl)),C(this,Dl,null),(e=c(this,Ia))==null||e.destroy(),C(this,Ia,null)}static create(t){const e=c(this,Lf).get(t==null?void 0:t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new ui(t)}static get workerSrc(){if(Da.workerSrc)return Da.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Fe(this,"_setupFakeWorkerGlobal",(async()=>c(this,Pp,Gy)?c(this,Pp,Gy):(await import(this.workerSrc)).WorkerMessageHandler)())}};bh=new WeakMap,Ia=new WeakMap,Dl=new WeakMap,_f=new WeakMap,wB=new WeakMap,Uf=new WeakMap,Lf=new WeakMap,Ts=new WeakSet,Vy=function(){c(this,bh).resolve(),c(this,Ia).send("configure",{verbosity:this.verbosity})},pM=function(t){C(this,Dl,t),C(this,Ia,new Em("main","worker",t)),c(this,Ia).on("ready",()=>{}),_(this,Ts,Vy).call(this)},mM=function(){if(c(ui,Uf)||c(ui,Pp,Gy)){_(this,Ts,Qm).call(this);return}let{workerSrc:t}=ui;try{ui._isSameOrigin(window.location,t)||(t=ui._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),r=new Em("main","worker",e),i=()=>{s.abort(),r.destroy(),e.terminate(),this.destroyed?c(this,bh).reject(new Error("Worker was destroyed")):_(this,Ts,Qm).call(this)},s=new AbortController;e.addEventListener("error",()=>{c(this,_f)||i()},{signal:s.signal}),r.on("test",a=>{if(s.abort(),this.destroyed||!a){i();return}C(this,Ia,r),C(this,Dl,e),C(this,_f,e),_(this,Ts,Vy).call(this)}),r.on("ready",a=>{if(s.abort(),this.destroyed){i();return}try{A()}catch{_(this,Ts,Qm).call(this)}});const A=()=>{const a=new Uint8Array;r.send("test",a,[a.buffer])};A();return}catch{NB("The worker has been disabled.")}_(this,Ts,Qm).call(this)},Qm=function(){c(ui,Uf)||(Me("Setting up fake worker."),C(ui,Uf,!0)),ui._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){c(this,bh).reject(new Error("Worker was destroyed"));return}const e=new h9;C(this,Dl,e);const r=`fake${Hi(ui,wB)._++}`,i=new Em(r+"_worker",r,e);t.setup(i,e),C(this,Ia,new Em(r,r+"_worker",e)),_(this,Ts,Vy).call(this)}).catch(t=>{c(this,bh).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Pp=new WeakSet,Gy=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch{return null}},T(ui,Pp),T(ui,wB,0),T(ui,Uf,!1),T(ui,Lf,new WeakMap),FA&&(C(ui,Uf,!0),Da.workerSrc||(Da.workerSrc="./pdf.worker.mjs")),ui._isSameOrigin=(t,e)=>{const r=URL.parse(t);if(!(r!=null&&r.origin)||r.origin==="null")return!1;const i=new URL(e,r);return r.origin===i.origin},ui._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};let w0=ui;var uA,Qf,Rl,_a,Nf,Mp,Hl,Ha,Nm,jy;class iV{constructor(t,e,r,i,s,A){T(this,Ha);ct(this,"downloadInfoCapability",Promise.withResolvers());T(this,uA,null);T(this,Qf,new Map);T(this,Rl,null);T(this,_a,new Map);T(this,Nf,new Map);T(this,Mp,new Map);T(this,Hl,null);this.messageHandler=t,this.loadingTask=e,C(this,Rl,r),this.commonObjs=new hM,this.fontLoader=new e9({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.enableHWA=i.enableHWA,this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=s.canvasFactory,this.filterFactory=s.filterFactory,this.binaryDataFactory=s.binaryDataFactory,this.pagesMapper=A,this.destroyed=!1,this.destroyCapability=null,this.setupMessageHandler()}updatePage(t){const{_pageIndex:e}=t;c(this,_a).set(e,t),c(this,Nf).set(e,Promise.resolve(t))}get annotationStorage(){return Fe(this,"annotationStorage",new d4)}getRenderingIntent(t,e=ec.ENABLE,r=null,i=!1,s=!1){let A=SA.DISPLAY,a=bv;switch(t){case"any":A=SA.ANY;break;case"display":break;case"print":A=SA.PRINT;break;default:Me(`getRenderingIntent - invalid intent: ${t}`)}const o=A&SA.PRINT&&r instanceof kP?r:this.annotationStorage;switch(e){case ec.DISABLE:A+=SA.ANNOTATIONS_DISABLE;break;case ec.ENABLE:break;case ec.ENABLE_FORMS:A+=SA.ANNOTATIONS_FORMS;break;case ec.ENABLE_STORAGE:A+=SA.ANNOTATIONS_STORAGE,a=o.serializable;break;default:Me(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(A+=SA.IS_EDITING),s&&(A+=SA.OPLIST);const{ids:l,hash:h}=o.modifiedIds,u=[A,a.hash,h];return{renderingIntent:A,cacheKey:u.join("_"),annotationStorageSerializable:a,modifiedIds:l}}destroy(){var r;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(r=c(this,Hl))==null||r.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of c(this,_a).values())t.push(i._destroy());c(this,_a).clear(),c(this,Nf).clear(),c(this,Mp).clear(),Object.hasOwn(this,"annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var i,s;this.commonObjs.clear(),this.fontLoader.clear(),c(this,Qf).clear(),this.filterFactory.destroy(),v0.cleanup(),(i=c(this,Rl))==null||i.cancelAllRequests(new cc("Worker was terminated.")),(s=this.messageHandler)==null||s.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(r,i)=>{si(c(this,Rl),"GetReader - no `BasePDFStream` instance available."),C(this,uA,c(this,Rl).getFullReader()),c(this,uA).onProgress=s=>_(this,Ha,jy).call(this,s),i.onPull=()=>{c(this,uA).read().then(function({value:s,done:A}){if(A){i.close();return}si(s instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{i.error(s)})},i.onCancel=s=>{c(this,uA).cancel(s),i.ready.catch(A=>{if(!this.destroyed)throw A})}}),t.on("ReaderHeadersReady",async r=>{await c(this,uA).headersReady;const{isStreamingSupported:i,isRangeSupported:s,contentLength:A}=c(this,uA);return i&&s&&(c(this,uA).onProgress=null),{isStreamingSupported:i,isRangeSupported:s,contentLength:A}}),t.on("GetRangeReader",(r,i)=>{si(c(this,Rl),"GetRangeReader - no `BasePDFStream` instance available.");const s=c(this,Rl).getRangeReader(r.begin,r.end);if(!s){i.close();return}i.onPull=()=>{s.read().then(function({value:A,done:a}){if(a){i.close();return}si(A instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(A),1,[A])}).catch(A=>{i.error(A)})},i.onCancel=A=>{s.cancel(A),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("GetDoc",({pdfInfo:r})=>{this.pagesMapper.pagesNumber=r.numPages,this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,e._capability.resolve(new rV(r,this))}),t.on("DocException",r=>{e._capability.reject(Os(r))}),t.on("PasswordRequest",r=>{C(this,Hl,Promise.withResolvers());try{if(!e.onPassword)throw Os(r);const i=s=>{s instanceof Error?c(this,Hl).reject(s):c(this,Hl).resolve({password:s})};e.onPassword(i,r.code)}catch(i){c(this,Hl).reject(i)}return c(this,Hl).promise}),t.on("DataLoaded",r=>{_(this,Ha,jy).call(this,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),t.on("StartRenderPage",r=>{if(this.destroyed)return;c(this,_a).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),t.on("commonobj",([r,i,s])=>{var A;if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":if("error"in s){const d=s.error;Me(`Error during font loading: ${d}`),this.commonObjs.resolve(r,d);break}const a=new s9(s),o=this._params.pdfBug&&((A=globalThis.FontInspector)!=null&&A.enabled)?(d,f)=>globalThis.FontInspector.fontAdded(d,f):null,l=new r9(a,o,s.charProcOperatorList,s.extra);this.fontLoader.bind(l).catch(()=>t.sendWithPromise("FontFallback",{id:r})).finally(()=>{l.fontExtraProperties||l.clearData(),this.commonObjs.resolve(r,l)});break;case"CopyLocalImage":const{imageRef:h}=s;si(h,"The imageRef must be defined.");for(const d of c(this,_a).values())for(const[,f]of d.objs){if((f==null?void 0:f.ref)!==h)continue;if(!f.dataLen)return null;const p=structuredClone(f);return this.commonObjs.resolve(r,p),f.dataLen}break;case"FontPath":this.commonObjs.resolve(r,new a9(s));break;case"Image":this.commonObjs.resolve(r,s);break;case"Pattern":const u=new A9(s);this.commonObjs.resolve(r,u.getIR());break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),t.on("obj",([r,i,s,A])=>{var o;if(this.destroyed)return;const a=c(this,_a).get(i);if(!a.objs.has(r)){if(a._intentStates.size===0){(o=A==null?void 0:A.bitmap)==null||o.close();return}switch(s){case"Image":case"Pattern":a.objs.resolve(r,A);break;default:throw new Error(`Got unknown object type ${s}`)}}}),t.on("DocProgress",r=>{this.destroyed||_(this,Ha,jy).call(this,r)}),t.on("FetchBinaryData",async r=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.binaryDataFactory)throw new Error("`BinaryDataFactory` not initialized, see the `useWorkerFetch` parameter.");return this.binaryDataFactory.fetch(r)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var r;this.annotationStorage.size<=0&&Me("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:((r=c(this,uA))==null?void 0:r.filename)??null},e).finally(()=>{this.annotationStorage.resetModified()})}extractPages(t){const e={pageInfos:t};let r;if(this.annotationStorage.size>0){const{map:i,transfer:s}=this.annotationStorage.serializable;e.annotationStorage=i,r=s}return this.messageHandler.sendWithPromise("ExtractPages",e,r).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this.pagesMapper.pagesNumber)return Promise.reject(new Error("Invalid page request."));const e=t-1,r=this.pagesMapper.getPageId(t)-1,i=c(this,Nf).get(e);if(i)return i;const s=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(A=>{if(this.destroyed)throw new Error("Transport destroyed");A.refStr&&c(this,Mp).set(A.refStr,r);const a=new iS(e,A,this,this.pagesMapper,this._params.pdfBug);return c(this,_a).set(e,a),a});return c(this,Nf).set(e,s),s}async getPageIndex(t){if(!$E(t))throw new Error("Invalid pageIndex request.");const e=await this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}),r=this.pagesMapper.getPageNumber(e+1);if(r===0)throw new Error("GetPageIndex: page has been removed.");return r-1}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:this.pagesMapper.getPageId(t+1)-1,intent:e})}getFieldObjects(){return _(this,Ha,Nm).call(this,"GetFieldObjects")}hasJSActions(){return _(this,Ha,Nm).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(t,e){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:t,pageIndexesToSkip:e})}getDocJSActions(){return _(this,Ha,Nm).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:this.pagesMapper.getPageId(t+1)-1})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:this.pagesMapper.getPageId(t+1)-1})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return _(this,Ha,Nm).call(this,"GetOptionalContentConfig").then(e=>new J9(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata";return c(this,Qf).getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,null).then(e=>{var r,i;return{info:e[0],metadata:e[1]?new q9(e[1]):null,contentDispositionFilename:((r=c(this,uA))==null?void 0:r.filename)??null,contentLength:((i=c(this,uA))==null?void 0:i.contentLength)??null,hasStructTree:e[2]}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}getRawData(t){return this.messageHandler.sendWithPromise("GetRawData",t)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of c(this,_a).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),c(this,Qf).clear(),this.filterFactory.destroy(!0),v0.cleanup()}}cachedPageNumber(t){if(!$E(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`,r=c(this,Mp).get(e);if(r>=0){const i=this.pagesMapper.getPageNumber(r+1);if(i!==0)return i}return null}}uA=new WeakMap,Qf=new WeakMap,Rl=new WeakMap,_a=new WeakMap,Nf=new WeakMap,Mp=new WeakMap,Hl=new WeakMap,Ha=new WeakSet,Nm=function(t,e=null){return c(this,Qf).getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,e))},jy=function({loaded:t,total:e}){var r,i;(i=(r=this.loadingTask).onProgress)==null||i.call(r,{loaded:t,total:e,percent:e?Wr(Math.round(t/e*100),0,100):NaN})};class nV{constructor(t){ct(this,"_internalRenderTask",null);ct(this,"onContinue",null);ct(this,"onError",null);this._internalRenderTask=t}get promise(){return this._internalRenderTask.capability.promise}cancel(t=0){this._internalRenderTask.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this._internalRenderTask.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this._internalRenderTask;return t.form||t.canvas&&(e==null?void 0:e.size)>0}get imageCoordinates(){return this._internalRenderTask.imageCoordinates||null}}var Bh,Pf;const Pu=class Pu{constructor({callback:t,params:e,objs:r,commonObjs:i,annotationCanvasMap:s,operatorList:A,pageIndex:a,canvasFactory:o,filterFactory:l,useRequestAnimationFrame:h=!1,pdfBug:u=!1,pageColors:d=null,enableHWA:f=!1,operationsFilter:p=null}){T(this,Bh,null);this.callback=t,this.params=e,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=A,this._pageIndex=a,this.canvasFactory=o,this.filterFactory=l,this._pdfBug=u,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=h===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new nV(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvas,this._canvasContext=e.canvas?null:e.canvasContext,this._enableHWA=f,this._dependencyTracker=e.dependencyTracker,this._imagesTracker=e.imagesTracker,this._operationsFilter=p}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var l,h;if(this.cancelled)return;if(this._canvas){if(c(Pu,Pf).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");c(Pu,Pf).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:r,transform:i,background:s,dependencyTracker:A,imagesTracker:a}=this.params,o=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new Rg(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors,A,a),this.gfx.beginDrawing({transform:i,viewport:r,transparency:t,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,(h=this.graphicsReadyCallback)==null||h.call(this)}cancel(t=null,e=0){var r,i,s;this.running=!1,this.cancelled=!0,(r=this.gfx)==null||r.endDrawing(),c(this,Bh)&&(window.cancelAnimationFrame(c(this,Bh)),C(this,Bh,null)),c(Pu,Pf).delete(this._canvas),t||(t=new DB(`Rendering cancelled, page ${this._pageIndex+1}`,e)),this.callback(t),(s=(i=this.task).onError)==null||s.call(i,t)}operatorListChanged(){var t,e;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.gfx.dependencyTracker)==null||t.growOperationsCount(this.operatorList.fnArray.length),(e=this.stepper)==null||e.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?C(this,Bh,window.requestAnimationFrame(()=>{C(this,Bh,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),c(Pu,Pf).delete(this._canvas),this.callback())))}};Bh=new WeakMap,Pf=new WeakMap,T(Pu,Pf,new WeakSet);let nS=Pu;const vM="5.7.284",wM="7e5b36c2d";var fA,Mf,kp,nn,U1,Op,Kl,L1,Ch,Ua,Q1,Er,sS,AS,aS,Iu,yM,Rc;const Ds=class Ds{constructor({editor:t=null,uiManager:e=null}){T(this,Er);T(this,fA,null);T(this,Mf,null);T(this,kp);T(this,nn,null);T(this,U1,!1);T(this,Op,!1);T(this,Kl,null);T(this,L1);T(this,Ch,null);T(this,Ua,null);var r,i;t?(C(this,Op,!1),C(this,Kl,t)):C(this,Op,!0),C(this,Ua,(t==null?void 0:t._uiManager)||e),C(this,L1,c(this,Ua)._eventBus),C(this,kp,((r=t==null?void 0:t.color)==null?void 0:r.toUpperCase())||((i=c(this,Ua))==null?void 0:i.highlightColors.values().next().value)||"#FFFF98"),c(Ds,Q1)||C(Ds,Q1,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return Fe(this,"_keyboardManager",new xw([[["Escape","mac+Escape"],Ds.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Ds.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Ds.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Ds.prototype._moveToPrevious],[["Home","mac+Home"],Ds.prototype._moveToBeginning],[["End","mac+End"],Ds.prototype._moveToEnd]]))}renderButton(){const t=C(this,fA,document.createElement("button"));t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",c(this,Kl)&&(t.ariaControls=`${c(this,Kl).id}_colorpicker_dropdown`);const e=c(this,Ua)._signal;t.addEventListener("click",_(this,Er,Iu).bind(this),{signal:e}),t.addEventListener("keydown",_(this,Er,aS).bind(this),{signal:e});const r=C(this,Mf,document.createElement("span"));return r.className="swatch",r.ariaHidden="true",r.style.backgroundColor=c(this,kp),t.append(r),t}renderMainDropdown(){const t=C(this,nn,_(this,Er,sS).call(this));return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}_colorSelectFromKeyboard(t){if(t.target===c(this,fA)){_(this,Er,Iu).call(this,t);return}const e=t.target.getAttribute("data-color");e&&_(this,Er,AS).call(this,e,t)}_moveToNext(t){var e,r;if(!c(this,Er,Rc)){_(this,Er,Iu).call(this,t);return}if(t.target===c(this,fA)){(e=c(this,nn).firstElementChild)==null||e.focus();return}(r=t.target.nextSibling)==null||r.focus()}_moveToPrevious(t){var e,r;if(t.target===((e=c(this,nn))==null?void 0:e.firstElementChild)||t.target===c(this,fA)){c(this,Er,Rc)&&this._hideDropdownFromKeyboard();return}c(this,Er,Rc)||_(this,Er,Iu).call(this,t),(r=t.target.previousSibling)==null||r.focus()}_moveToBeginning(t){var e;if(!c(this,Er,Rc)){_(this,Er,Iu).call(this,t);return}(e=c(this,nn).firstElementChild)==null||e.focus()}_moveToEnd(t){var e;if(!c(this,Er,Rc)){_(this,Er,Iu).call(this,t);return}(e=c(this,nn).lastElementChild)==null||e.focus()}hideDropdown(){var t,e;(t=c(this,nn))==null||t.classList.add("hidden"),c(this,fA).ariaExpanded="false",(e=c(this,Ch))==null||e.abort(),C(this,Ch,null)}_hideDropdownFromKeyboard(){var t;if(!c(this,Op)){if(!c(this,Er,Rc)){(t=c(this,Kl))==null||t.unselect();return}this.hideDropdown(),c(this,fA).focus({preventScroll:!0,focusVisible:c(this,U1)})}}updateColor(t){if(c(this,Mf)&&(c(this,Mf).style.backgroundColor=t),!c(this,nn))return;const e=c(this,Ua).highlightColors.values();for(const r of c(this,nn).children)r.ariaSelected=e.next().value===t.toUpperCase()}destroy(){var t,e;(t=c(this,fA))==null||t.remove(),C(this,fA,null),C(this,Mf,null),(e=c(this,nn))==null||e.remove(),C(this,nn,null)}};fA=new WeakMap,Mf=new WeakMap,kp=new WeakMap,nn=new WeakMap,U1=new WeakMap,Op=new WeakMap,Kl=new WeakMap,L1=new WeakMap,Ch=new WeakMap,Ua=new WeakMap,Q1=new WeakMap,Er=new WeakSet,sS=function(){const t=document.createElement("div"),e=c(this,Ua)._signal;t.addEventListener("contextmenu",QA,{signal:e}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),c(this,Kl)&&(t.id=`${c(this,Kl).id}_colorpicker_dropdown`);for(const[r,i]of c(this,Ua).highlightColors){const s=document.createElement("button");s.tabIndex="0",s.role="option",s.setAttribute("data-color",i),s.title=r,s.setAttribute("data-l10n-id",c(Ds,Q1)[r]);const A=document.createElement("span");s.append(A),A.className="swatch",A.style.backgroundColor=i,s.ariaSelected=i===c(this,kp),s.addEventListener("click",_(this,Er,AS).bind(this,i),{signal:e}),t.append(s)}return t.addEventListener("keydown",_(this,Er,aS).bind(this),{signal:e}),t},AS=function(t,e){e.stopPropagation(),c(this,L1).dispatch("switchannotationeditorparams",{source:this,type:Pe.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)},aS=function(t){Ds._keyboardManager.exec(this,t)},Iu=function(t){if(c(this,Er,Rc)){this.hideDropdown();return}if(C(this,U1,t.detail===0),c(this,Ch)||(C(this,Ch,new AbortController),window.addEventListener("pointerdown",_(this,Er,yM).bind(this),{signal:c(this,Ua).combinedSignal(c(this,Ch))})),c(this,fA).ariaExpanded="true",c(this,nn)){c(this,nn).classList.remove("hidden");return}const e=C(this,nn,_(this,Er,sS).call(this));c(this,fA).append(e)},yM=function(t){var e;(e=c(this,nn))!=null&&e.contains(t.target)||this.hideDropdown()},Rc=function(){return c(this,nn)&&!c(this,nn).classList.contains("hidden")},T(Ds,Q1,null);let Cv=Ds;var dA,Dp,kf,Vl,N1;const Mu=class Mu{constructor(t){T(this,dA,null);T(this,Dp,!1);T(this,kf,null);T(this,Vl,null);C(this,kf,t),C(this,Vl,t._uiManager),c(Mu,N1)||C(Mu,N1,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(c(this,dA))return c(this,dA);const{editorType:t,colorType:e,colorAndOpacityType:r,opacityType:i,color:s,opacity:A}=c(this,kf),a=C(this,Dp,Mi.isAlphaColorInputSupported&&i!==void 0),o=C(this,dA,document.createElement("input"));if(o.type="color",a){o.setAttribute("alpha","");const l=Qt.hexNums[Math.round((A??1)*255)];o.value=(s||"#000000")+l}else o.value=s||"#000000";return o.className="basicColorPicker",o.tabIndex=0,o.setAttribute("data-l10n-id",c(Mu,N1)[t]),o.addEventListener("input",()=>{if(a){const l=HB(o.value);if(!l)return;const[h,u,d,f]=l,p=Qt.makeHexColor(h,u,d);r!==void 0?c(this,Vl).updateParams(r,{color:p,opacity:f}):(c(this,Vl).updateParams(e,p),c(this,Vl).updateParams(i,f))}else c(this,Vl).updateParams(e,o.value)},{signal:c(this,Vl)._signal}),o}update(t){if(c(this,dA))if(c(this,Dp)){const e=Qt.hexNums[Math.round(c(this,kf).opacity*255)];c(this,dA).value=t+e}else c(this,dA).value=t}updateOpacity(t){if(!c(this,dA)||!c(this,Dp))return;const e=Qt.hexNums[Math.round(t*255)];c(this,dA).value=c(this,kf).color+e}destroy(){var t;(t=c(this,dA))==null||t.remove(),C(this,dA,null)}hideDropdown(){}};dA=new WeakMap,Dp=new WeakMap,kf=new WeakMap,Vl=new WeakMap,N1=new WeakMap,T(Mu,N1,null);let Ub=Mu;function cU(n){return Math.floor(Wr(n,0,1)*255).toString(16).padStart(2,"0")}function im(n){return Wr(n,0,1)*255}class hU{static CMYK_G([t,e,r,i]){return["G",1-Math.min(1,.3*t+.59*r+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=im(t),[t,t,t]}static G_HTML([t]){const e=cU(t);return`#${e}${e}${e}`}static RGB_G([t,e,r]){return["G",.3*t+.59*e+.11*r]}static RGB_rgb(t){return t.map(im)}static RGB_HTML(t){return`#${t.map(cU).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,r,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,r+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,r,i]){return[im(1-Math.min(1,t+i)),im(1-Math.min(1,r+i)),im(1-Math.min(1,e+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,r]){const i=1-t,s=1-e,A=1-r,a=Math.min(i,s,A);return["CMYK",i,s,A,a]}}class sV{create(t,e,r=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),r||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){hr("Abstract method `_createSVG` called.")}}class xv extends sV{_createSVG(t){return document.createElementNS(fl,t)}}const AV=9,vd=new WeakSet,aV=new Date().getTimezoneOffset()*60*1e3;class H5{static create(t){switch(t.data.annotationType){case Fi.LINK:return new v4(t);case Fi.TEXT:return new lV(t);case Fi.WIDGET:switch(t.data.fieldType){case"Tx":return new cV(t);case"Btn":return t.data.radioButton?new CM(t):t.data.checkBox?new uV(t):new fV(t);case"Ch":return new dV(t);case"Sig":return new hV(t)}return new Cd(t);case Fi.POPUP:return new lS(t);case Fi.FREETEXT:return new TM(t);case Fi.LINE:return new pV(t);case Fi.SQUARE:return new mV(t);case Fi.CIRCLE:return new vV(t);case Fi.POLYLINE:return new IM(t);case Fi.CARET:return new yV(t);case Fi.INK:return new w4(t);case Fi.POLYGON:return new wV(t);case Fi.HIGHLIGHT:return new _M(t);case Fi.UNDERLINE:return new bV(t);case Fi.SQUIGGLY:return new BV(t);case Fi.STRIKEOUT:return new CV(t);case Fi.STAMP:return new UM(t);case Fi.FILEATTACHMENT:return new xV(t);default:return new ai(t)}}}var Of,Rp,JA,P1,oS;const ET=class ET{constructor(t,{isRenderable:e=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){T(this,P1);T(this,Of,null);T(this,Rp,!1);T(this,JA,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableComment=t.enableComment,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,this.hasOwnCommentButton=!1,e&&(this.contentElement=this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:e}){return!!(t!=null&&t.str||e!=null&&e.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return ET._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){var r;const{data:t}=this,e=(r=this.annotationStorage)==null?void 0:r.getEditor(t.id);return e?e.getData():t}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){var a;const t=(a=this.annotationStorage)==null?void 0:a.getEditor(this.data.id);if(t)return t.commentButtonPositionInPage;const{quadPoints:e,inkLists:r,rect:i}=this.data;let s=-1/0,A=-1/0;if((e==null?void 0:e.length)>=8){for(let o=0;o<e.length;o+=8)e[o+1]>A?(A=e[o+1],s=e[o+2]):e[o+1]===A&&(s=Math.max(s,e[o+2]));return[s,A]}if((r==null?void 0:r.length)>=1){for(const o of r)for(let l=0,h=o.length;l<h;l+=2)o[l+1]>A?(A=o[l+1],s=o[l]):o[l+1]===A&&(s=Math.max(s,o[l]));if(s!==1/0)return[s,A]}return i?[i[2],i[3]]:null}_normalizePoint(t){const{page:{view:e},viewport:{rawDims:{pageWidth:r,pageHeight:i,pageX:s,pageY:A}}}=this.parent;return t[1]=e[3]-t[1]+e[1],t[0]=100*(t[0]-s)/r,t[1]=100*(t[1]-A)/i,t}get commentText(){var e,r,i;const{data:t}=this;return((r=(e=this.annotationStorage.getRawValue(`${pv}${t.id}`))==null?void 0:e.popup)==null?void 0:r.contents)||((i=t.contentsObj)==null?void 0:i.str)||""}set commentText(t){const{data:e}=this,r={deleted:!t,contents:t||""};this.annotationStorage.updateEditor(e.id,{popup:r})||this.annotationStorage.setValue(`${pv}${e.id}`,{id:e.id,annotationType:e.annotationType,page:this.parent.page,popup:r,popupRef:e.popupRef,modificationDate:new Date}),t||this.removePopup()}removePopup(){var t,e;(e=((t=c(this,JA))==null?void 0:t.popup)||this.popup)==null||e.remove(),C(this,JA,this.popup=null)}updateEdited(t){var s;if(!this.container)return;t.rect&&(c(this,Of)||C(this,Of,{rect:this.data.rect.slice(0)}));const{rect:e,popup:r}=t;e&&_(this,P1,oS).call(this,e);let i=((s=c(this,JA))==null?void 0:s.popup)||this.popup;!i&&(r!=null&&r.text)&&(this._createPopup(r),i=c(this,JA).popup),i&&(i.updateEdited(t),r!=null&&r.deleted&&(i.remove(),C(this,JA,null),this.popup=null))}resetEdited(){var t;c(this,Of)&&(_(this,P1,oS).call(this,c(this,Of).rect),(t=c(this,JA))==null||t.popup.resetEdited(),C(this,Of,null))}_createContainer(t){const{data:e,parent:{page:r,viewport:i}}=this,s=document.createElement("section");s.setAttribute("data-annotation-id",e.id),!(this instanceof Cd)&&!(this instanceof v4)&&(s.tabIndex=0);const{style:A}=s;if(A.zIndex=this.parent.zIndex,this.parent.zIndex+=2,e.alternativeText&&(s.title=e.alternativeText),e.noRotate&&s.classList.add("norotate"),!e.rect||this instanceof lS){const{rotation:m}=e;return!e.hasOwnCanvas&&m!==0&&this.setRotation(m,s),s}const{width:a,height:o}=this;if(!t&&e.borderStyle.width>0){A.borderWidth=`${e.borderStyle.width}px`;const m=e.borderStyle.horizontalCornerRadius,y=e.borderStyle.verticalCornerRadius;if(m>0||y>0){const B=`calc(${m}px * var(--total-scale-factor)) / calc(${y}px * var(--total-scale-factor))`;A.borderRadius=B}else if(this instanceof CM){const B=`calc(${a}px * var(--total-scale-factor)) / calc(${o}px * var(--total-scale-factor))`;A.borderRadius=B}switch(e.borderStyle.style){case dg.SOLID:A.borderStyle="solid";break;case dg.DASHED:A.borderStyle="dashed";break;case dg.BEVELED:Me("Unimplemented border style: beveled");break;case dg.INSET:Me("Unimplemented border style: inset");break;case dg.UNDERLINE:A.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(C(this,Rp,!0),A.borderColor=Qt.makeHexColor(...w)):A.borderWidth=0}const l=Qt.normalizeRect([e.rect[0],r.view[3]-e.rect[1]+r.view[1],e.rect[2],r.view[3]-e.rect[3]+r.view[1]]),{pageWidth:h,pageHeight:u,pageX:d,pageY:f}=i.rawDims;A.left=`${100*(l[0]-d)/h}%`,A.top=`${100*(l[1]-f)/u}%`;const{rotation:p}=e;return e.hasOwnCanvas||p===0?(A.width=`${100*a/h}%`,A.height=`${100*o/u}%`):this.setRotation(p,s),s}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims;let{width:s,height:A}=this;t%180!==0&&([s,A]=[A,s]),e.style.width=`${100*s/r}%`,e.style.height=`${100*A/i}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,r,i)=>{const s=i.detail[e],A=s[0],a=s.slice(1);i.target.style[r]=hU[`${A}_HTML`](a),this.annotationStorage.setValue(this.data.id,{[r]:hU[`${A}_rgb`](a)})};return Fe(this,"_commonActions",{display:e=>{const{display:r}=e.detail,i=r%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:r}=e.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const r=e.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(t,e){const r=this._commonActions;for(const i of Object.keys(e.detail)){const s=t[i]||r[i];s==null||s(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const r=this._commonActions;for(const[i,s]of Object.entries(e)){const A=r[i];if(A){const a={detail:{[i]:s},target:t};A(a),delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,r,i,s]=this.data.rect.map(m=>Math.fround(m));if(t.length===8){const[m,y,w,B]=t.subarray(2,6);if(i===m&&s===y&&e===w&&r===B)return}const{style:A}=this.container;let a;if(c(this,Rp)){const{borderColor:m,borderWidth:y}=A;A.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${m}" stroke-width="${y}">`],this.container.classList.add("hasBorder")}const o=i-e,l=s-r,{svgFactory:h}=this,u=h.createElement("svg");u.classList.add("quadrilateralsContainer"),u.setAttribute("width",0),u.setAttribute("height",0),u.role="none";const d=h.createElement("defs");u.append(d);const f=h.createElement("clipPath"),p=`clippath_${this.data.id}`;f.setAttribute("id",p),f.setAttribute("clipPathUnits","objectBoundingBox"),d.append(f);for(let m=2,y=t.length;m<y;m+=8){const w=t[m],B=t[m+1],E=t[m+2],S=t[m+3],I=h.createElement("rect"),L=(E-e)/o,k=(s-B)/l,H=(w-E)/o,Q=(B-S)/l;I.setAttribute("x",L),I.setAttribute("y",k),I.setAttribute("width",H),I.setAttribute("height",Q),f.append(I),a==null||a.push(`<rect vector-effect="non-scaling-stroke" x="${L}" y="${k}" width="${H}" height="${Q}"/>`)}c(this,Rp)&&(a.push("</g></svg>')"),A.backgroundImage=a.join("")),this.container.append(u),this.container.style.clipPath=`url(#${p})`}_createPopup(t=null){const{data:e}=this;let r,i;t?(r={str:t.text},i=t.date):(r=e.contentsObj,i=e.modificationDate),C(this,JA,new lS({data:{color:e.color,titleObj:e.titleObj,modificationDate:i,contentsObj:r,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}))}get hasPopupElement(){return!!(c(this,JA)||this.popup||this.data.popupRef)}get extraPopupElement(){return c(this,JA)}render(){hr("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const r=[];if(this._fieldObjects){const i=this._fieldObjects[t];if(i)for(const{page:s,id:A,exportValues:a}of i){if(s===-1||A===e)continue;const o=typeof a=="string"?a:null,l=document.querySelector(`[data-element-id="${A}"]`);if(l&&!vd.has(l)){Me(`_getElementsByName - element not allowed: ${A}`);continue}r.push({id:A,exportValue:o,domElement:l})}return r}for(const i of document.getElementsByName(t)){const{exportValue:s}=i,A=i.getAttribute("data-element-id");A!==e&&vd.has(i)&&r.push({id:A,exportValue:s,domElement:i})}return r}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var r;(r=this.linkService.eventBus)==null||r.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Of=new WeakMap,Rp=new WeakMap,JA=new WeakMap,P1=new WeakSet,oS=function(t){const{container:{style:e},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:s,pageHeight:A,pageX:a,pageY:o}}}}=this;r==null||r.splice(0,4,...t),e.left=`${100*(t[0]-a)/s}%`,e.top=`${100*(A-t[3]+o)/A}%`,i===0?(e.width=`${100*(t[2]-t[0])/s}%`,e.height=`${100*(t[3]-t[1])/A}%`):this.setRotation(i)};let ai=ET;class oV extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.editor=t.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){const{editor:t}=this;t.hasComment&&this._createPopup(t.comment)}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(t){this.editor.comment=t,t||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.parent.removeAnnotation(this.data.id),this.container.remove(),this.container=null,this.removePopup()}}var IA,_u,bM,BM;class v4 extends ai{constructor(e,r=null){super(e,{isRenderable:!0,ignoreBorder:!!(r!=null&&r.ignoreBorder),createQuadrilaterals:!0});T(this,IA);this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:r}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let s=!1;return e.url?(r.addLinkAttributes(i,e.url,e.newWindow),s=!0):e.action?(this._bindNamedAction(i,e.action,e.overlaidText),s=!0):e.attachment?(_(this,IA,bM).call(this,i,e.attachment,e.overlaidText,e.attachmentDest),s=!0):e.setOCGState?(_(this,IA,BM).call(this,i,e.setOCGState,e.overlaidText),s=!0):e.dest?(this._bindLink(i,e.dest,e.overlaidText),s=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),s=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),s=!0):this.isTooltipOnly&&!s&&(this._bindLink(i,""),s=!0)),this.container.classList.add("linkAnnotation"),s&&(this.contentElement=i,this.container.append(i)),this.container}_bindLink(e,r,i=""){e.href=this.linkService.getDestinationHash(r),e.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&_(this,IA,_u).call(this),i&&(e.title=i)}_bindNamedAction(e,r,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(r),!1),i&&(e.title=i),_(this,IA,_u).call(this)}_bindJSAction(e,r){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const s of Object.keys(r.actions)){const A=i.get(s);A&&(e[A]=()=>{var a;return(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:s}}),!1})}r.overlaidText&&(e.title=r.overlaidText),e.onclick||(e.onclick=()=>!1),_(this,IA,_u).call(this)}_bindResetFormAction(e,r){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),_(this,IA,_u).call(this),!this._fieldObjects){Me('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(e.onclick=()=>!1);return}e.onclick=()=>{var u;i==null||i();const{fields:s,refs:A,include:a}=r,o=[];if(s.length!==0||A.length!==0){const d=new Set(A);for(const f of s){const p=this._fieldObjects[f]||[];for(const{id:m}of p)d.add(m)}for(const f of Object.values(this._fieldObjects))for(const p of f)d.has(p.id)===a&&o.push(p)}else for(const d of Object.values(this._fieldObjects))o.push(...d);const l=this.annotationStorage,h=[];for(const d of o){const{id:f}=d;switch(h.push(f),d.type){case"text":{const m=d.defaultValue||"";l.setValue(f,{value:m});break}case"checkbox":case"radiobutton":{const m=d.defaultValue===d.exportValues;l.setValue(f,{value:m});break}case"combobox":case"listbox":{const m=d.defaultValue||"";l.setValue(f,{value:m});break}default:continue}const p=document.querySelector(`[data-element-id="${f}"]`);if(p){if(!vd.has(p)){Me(`_bindResetFormAction - element not allowed: ${f}`);continue}}else continue;p.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((u=this.linkService.eventBus)==null||u.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:h,name:"ResetForm"}})),!1}}}IA=new WeakSet,_u=function(){this.container.setAttribute("data-internal-link","")},bM=function(e,r,i="",s=null){e.href=this.linkService.getAnchorUrl(""),r.description?e.title=r.description:i&&(e.title=i),e.onclick=()=>{var A;return(A=this.downloadManager)==null||A.openOrDownloadData(r.content,r.filename,s),!1},_(this,IA,_u).call(this)},BM=function(e,r,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(r),!1),i&&(e.title=i),_(this,IA,_u).call(this)};class lV extends ai{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(t),this.container}}class Cd extends ai{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Mi.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,r,i,s){r.includes("mouse")?t.addEventListener(r,A=>{var a;(a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:s(A),shift:A.shiftKey,modifier:this._getKeyModifier(A)}})}):t.addEventListener(r,A=>{var a;if(r==="blur"){if(!e.focused||!A.relatedTarget)return;e.focused=!1}else if(r==="focus"){if(e.focused)return;e.focused=!0}s&&((a=this.linkService.eventBus)==null||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:s(A)}}))})}_setEventListeners(t,e,r,i){var s,A,a;for(const[o,l]of r)(l==="Action"||(s=this.data.actions)!=null&&s[l])&&((l==="Focus"||l==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,o,l,i),l==="Focus"&&!((A=this.data.actions)!=null&&A.Blur)?this._setEventListener(t,e,"blur","Blur",null):l==="Blur"&&!((a=this.data.actions)!=null&&a.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":Qt.makeHexColor(...e)}_setTextStyle(t){const e=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||AV,s=t.style;let A;const a=2,o=l=>Math.round(10*l)/10;if(this.data.multiLine){const l=Math.abs(this.data.rect[3]-this.data.rect[1]-a),h=Math.round(l/(M5*i))||1,u=l/h;A=Math.min(i,o(u/M5))}else{const l=Math.abs(this.data.rect[3]-this.data.rect[1]-a);A=Math.min(i,o(l/M5))}s.fontSize=`calc(${A}px * var(--total-scale-factor))`,s.color=Qt.makeHexColor(...r),this.data.textAlignment!==null&&(s.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class cV extends Cd{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,r,i){const s=this.annotationStorage;for(const A of this._getElementsByName(t.name,t.id))A.domElement&&(A.domElement[e]=r),s.setValue(A.id,{[i]:r})}render(){var i,s;const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const A=t.getValue(e,{value:this.data.fieldValue});let a=A.value||"";const o=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;o&&a.length>o&&(a=a.slice(0,o));let l=A.formattedValue||((i=this.data.textContent)==null?void 0:i.join(`
|
|
263
|
+
`))||null;l&&this.data.comb&&(l=l.replaceAll(/\s+/g,""));const h={userValue:a,formattedValue:l,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=l??a,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type=this.data.password?"password":"text",r.setAttribute("value",l??a),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),vd.add(r),this.contentElement=r,r.setAttribute("data-element-id",e),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=0;const{datetimeFormat:u,datetimeType:d,timeStep:f}=this.data,p=!!d&&this.enableScripting;u&&(r.title=u),this._setRequired(r,this.data.required),o&&(r.maxLength=o),r.addEventListener("input",y=>{t.setValue(e,{value:y.target.value}),this.setPropertyOnSiblings(r,"value",y.target.value,"value"),h.formattedValue=null}),r.addEventListener("resetform",y=>{const w=this.data.defaultFieldValue??"";r.value=h.userValue=w,h.formattedValue=null});let m=y=>{const{formattedValue:w}=h;w!=null&&(y.target.value=w),y.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",w=>{var E;if(h.focused)return;const{target:B}=w;if(p&&(B.type=d,f&&(B.step=f)),h.userValue){const S=h.userValue;if(p)if(d==="time"){const I=new Date(S),L=[I.getHours(),I.getMinutes(),I.getSeconds()];B.value=L.map(k=>k.toString().padStart(2,"0")).join(":")}else B.value=new Date(S-aV).toISOString().split(d==="date"?"T":".",1)[0];else B.value=S}h.lastCommittedValue=B.value,h.commitKey=1,(E=this.data.actions)!=null&&E.Focus||(h.focused=!0)}),r.addEventListener("updatefromsandbox",w=>{this.showElementAndHideCanvas(w.target);const B={value(E){h.userValue=E.detail.value??"",p||t.setValue(e,{value:h.userValue.toString()}),E.target.value=h.userValue},formattedValue(E){const{formattedValue:S}=E.detail;h.formattedValue=S,S!=null&&E.target!==document.activeElement&&(E.target.value=S);const I={formattedValue:S};p&&(I.value=S),t.setValue(e,I)},selRange(E){E.target.setSelectionRange(...E.detail.selRange)},charLimit:E=>{var k;const{charLimit:S}=E.detail,{target:I}=E;if(S===0){I.removeAttribute("maxLength");return}I.setAttribute("maxLength",S);let L=h.userValue;!L||L.length<=S||(L=L.slice(0,S),I.value=h.userValue=L,t.setValue(e,{value:L}),(k=this.linkService.eventBus)==null||k.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:L,willCommit:!0,commitKey:1,selStart:I.selectionStart,selEnd:I.selectionEnd}}))}};this._dispatchEventFromSandbox(B,w)}),r.addEventListener("keydown",w=>{var S;h.commitKey=1;let B=-1;if(w.key==="Escape"?B=0:w.key==="Enter"&&!this.data.multiLine?B=2:w.key==="Tab"&&(h.commitKey=3),B===-1)return;const{value:E}=w.target;h.lastCommittedValue!==E&&(h.lastCommittedValue=E,h.userValue=E,(S=this.linkService.eventBus)==null||S.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:E,willCommit:!0,commitKey:B,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}}))});const y=m;m=null,r.addEventListener("blur",w=>{var S,I;if(!h.focused||!w.relatedTarget)return;(S=this.data.actions)!=null&&S.Blur||(h.focused=!1);const{target:B}=w;let{value:E}=B;if(p){if(E&&d==="time"){const L=E.split(":").map(k=>parseInt(k,10));E=new Date(2e3,0,1,L[0],L[1],L[2]||0).valueOf(),B.step=""}else E.includes("T")||(E=`${E}T00:00`),E=new Date(E).valueOf();B.type="text"}h.userValue=E,h.lastCommittedValue!==E&&((I=this.linkService.eventBus)==null||I.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:E,willCommit:!0,commitKey:h.commitKey,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}})),y(w)}),(s=this.data.actions)!=null&&s.Keystroke&&r.addEventListener("beforeinput",w=>{var Q;h.lastCommittedValue=null;const{data:B,target:E}=w,{value:S,selectionStart:I,selectionEnd:L}=E;let k=I,H=L;switch(w.inputType){case"deleteWordBackward":{const W=S.substring(0,I).match(/\w*[^\w]*$/);W&&(k-=W[0].length);break}case"deleteWordForward":{const W=S.substring(I).match(/^[^\w]*\w*/);W&&(H+=W[0].length);break}case"deleteContentBackward":I===L&&(k-=1);break;case"deleteContentForward":I===L&&(H+=1);break}w.preventDefault(),(Q=this.linkService.eventBus)==null||Q.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:S,change:B||"",willCommit:!1,selStart:k,selEnd:H}})}),this._setEventListeners(r,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],w=>w.target.value)}if(m&&r.addEventListener("blur",m),this.data.comb){const w=(this.data.rect[2]-this.data.rect[0])/o;r.classList.add("comb"),r.style.letterSpacing=`calc(${w}px * var(--total-scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class hV extends Cd{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class uV extends Cd{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,r=e.id;let i=t.getValue(r,{value:e.exportValue===e.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",t.setValue(r,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const s=document.createElement("input");return vd.add(s),s.setAttribute("data-element-id",r),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="checkbox",s.name=e.fieldName,i&&s.setAttribute("checked",!0),s.setAttribute("exportValue",e.exportValue),s.tabIndex=0,s.addEventListener("change",A=>{const{name:a,checked:o}=A.target;for(const l of this._getElementsByName(a,r)){const h=o&&l.exportValue===e.exportValue;l.domElement&&(l.domElement.checked=h),t.setValue(l.id,{value:h})}t.setValue(r,{value:o})}),s.addEventListener("resetform",A=>{const a=e.defaultFieldValue||"Off";A.target.checked=a===e.exportValue}),this.enableScripting&&this.hasJSActions&&(s.addEventListener("updatefromsandbox",A=>{const a={value(o){o.target.checked=o.detail.value!=="Off",t.setValue(r,{value:o.target.checked})}};this._dispatchEventFromSandbox(a,A)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],A=>A.target.checked)),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class CM extends Cd{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,r=e.id;let i=t.getValue(r,{value:e.fieldValue===e.buttonValue}).value;if(typeof i=="string"&&(i=i!==e.buttonValue,t.setValue(r,{value:i})),i)for(const A of this._getElementsByName(e.fieldName,r))t.setValue(A.id,{value:!1});const s=document.createElement("input");if(vd.add(s),s.setAttribute("data-element-id",r),s.disabled=e.readOnly,this._setRequired(s,this.data.required),s.type="radio",s.name=e.fieldName,i&&s.setAttribute("checked",!0),s.tabIndex=0,s.addEventListener("change",A=>{const{name:a,checked:o}=A.target;for(const l of this._getElementsByName(a,r))t.setValue(l.id,{value:!1});t.setValue(r,{value:o})}),s.addEventListener("resetform",A=>{const a=e.defaultFieldValue;A.target.checked=a!=null&&a===e.buttonValue}),this.enableScripting&&this.hasJSActions){const A=e.buttonValue;s.addEventListener("updatefromsandbox",a=>{const o={value:l=>{const h=A===l.detail.value;for(const u of this._getElementsByName(l.target.name)){const d=h&&u.id===r;u.domElement&&(u.domElement.checked=d),t.setValue(u.id,{value:d})}}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(s,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)}return this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class fV extends v4{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),t}}class dV extends Cd{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,r=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");vd.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=0;let s=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",u=>{const d=this.data.defaultFieldValue;for(const f of i.options)f.selected=f.value===d});const A=(u,d)=>{const f=d.replaceAll(" "," ");u.textContent=f,f!==d&&u.setAttribute("display-value",d)};for(const u of this.data.options){const d=document.createElement("option");A(d,u.displayValue),d.value=u.exportValue,r.value.includes(u.exportValue)&&(d.setAttribute("selected",!0),s=!1),i.append(d)}let a=null;if(s){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),i.prepend(u),a=()=>{u.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}const o=u=>{const d=u?"value":"textContent",{options:f,multiple:p}=i;return p?Array.prototype.filter.call(f,m=>m.selected).map(m=>m[d]):f.selectedIndex===-1?null:f[f.selectedIndex][d]};let l=o(!1);const h=u=>{const d=u.target.options;return Array.prototype.map.call(d,f=>({displayValue:f.getAttribute("display-value")||f.textContent,exportValue:f.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",u=>{const d={value(f){a==null||a();const p=f.detail.value,m=new Set(Array.isArray(p)?p:[p]);for(const y of i.options)y.selected=m.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(f){i.multiple=!0},remove(f){const p=i.options,m=f.detail.remove;p[m].selected=!1,i.remove(m),p.length>0&&Array.prototype.findIndex.call(p,w=>w.selected)===-1&&(p[0].selected=!0),t.setValue(e,{value:o(!0),items:h(f)}),l=o(!1)},clear(f){for(;i.length!==0;)i.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(f){const{index:p,displayValue:m,exportValue:y}=f.detail.insert,w=i.children[p],B=document.createElement("option");A(B,m),B.value=y,w?w.before(B):i.append(B),t.setValue(e,{value:o(!0),items:h(f)}),l=o(!1)},items(f){const{items:p}=f.detail;for(;i.length!==0;)i.remove(0);for(const m of p){const{displayValue:y,exportValue:w}=m,B=document.createElement("option");A(B,y),B.value=w,i.append(B)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(f)}),l=o(!1)},indices(f){const p=new Set(f.detail.indices);for(const m of f.target.options)m.selected=p.has(m.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(f){f.target.disabled=!f.detail.editable}};this._dispatchEventFromSandbox(d,u)}),i.addEventListener("input",u=>{var p;const d=o(!0),f=o(!1);t.setValue(e,{value:d}),u.preventDefault(),(p=this.linkService.eventBus)==null||p.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:f,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):i.addEventListener("input",function(u){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}var M1,cS;class lS extends ai{constructor(e){const{data:r,elements:i,parent:s}=e,A=!!s._commentManager;super(e,{isRenderable:!A&&ai._hasPopupData(r)});T(this,M1);if(this.elements=i,A&&ai._hasPopupData(r)){const a=this.popup=_(this,M1,cS).call(this);for(const o of i)o.popup=a}else this.popup=null}render(){const{container:e}=this;e.classList.add("popupAnnotation"),e.role="comment";const r=this.popup=_(this,M1,cS).call(this),i=[];for(const s of this.elements)s.popup=r,s.container.ariaHasPopup="dialog",i.push(s.data.id),s.addHighlightArea();return this.container.setAttribute("aria-controls",i.map(s=>`${Tg}${s}`).join(",")),this.container}}M1=new WeakSet,cS=function(){return new gV({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})};var gA,xh,yB,bB,Hp,Kp,gi,Fo,Eh,Df,Vp,Gp,To,pA,Gl,jl,pi,$l,Sh,k1,Wl,jp,Rf,Fh,fn,Th,Ve,$y,hS,uS,fS,Wy,dS,xM,EM,SM,FM,zy,Xy,gS;class gV{constructor({container:t,color:e,elements:r,titleObj:i,modificationDate:s,contentsObj:A,richText:a,parent:o,rect:l,parentRect:h,open:u,commentManager:d=null}){T(this,Ve);T(this,gA,null);T(this,xh,_(this,Ve,SM).bind(this));T(this,yB,_(this,Ve,gS).bind(this));T(this,bB,_(this,Ve,Xy).bind(this));T(this,Hp,_(this,Ve,zy).bind(this));T(this,Kp,null);T(this,gi,null);T(this,Fo,null);T(this,Eh,null);T(this,Df,null);T(this,Vp,null);T(this,Gp,null);T(this,To,!1);T(this,pA,null);T(this,Gl,null);T(this,jl,null);T(this,pi,null);T(this,$l,null);T(this,Sh,null);T(this,k1,null);T(this,Wl,null);T(this,jp,null);T(this,Rf,null);T(this,Fh,!1);T(this,fn,null);T(this,Th,null);C(this,gi,t),C(this,jp,i),C(this,Fo,A),C(this,Wl,a),C(this,Vp,o),C(this,Kp,e),C(this,k1,l),C(this,Gp,h),C(this,Df,r),C(this,gA,d),C(this,fn,r[0]),C(this,Eh,wv.toDateObject(s)),this.trigger=r.flatMap(f=>f.getElementsToTriggerPopup()),d||(_(this,Ve,$y).call(this),c(this,gi).hidden=!0,u&&_(this,Ve,zy).call(this))}renderCommentButton(){if(c(this,pi)){c(this,pi).parentNode||c(this,fn).container.after(c(this,pi));return}if(c(this,$l)||_(this,Ve,hS).call(this),!c(this,$l))return;const{signal:t}=C(this,Gl,new AbortController),e=c(this,fn).hasOwnCommentButton,r=()=>{c(this,gA).toggleCommentPopup(this,!0,void 0,!e)},i=()=>{c(this,gA).toggleCommentPopup(this,!1,!0,!e)},s=()=>{c(this,gA).toggleCommentPopup(this,!1,!1)};if(e){C(this,pi,c(this,fn).container);for(const A of this.trigger)A.ariaHasPopup="dialog",A.ariaControls="commentPopup",A.addEventListener("keydown",c(this,xh),{signal:t}),A.addEventListener("click",r,{signal:t}),A.addEventListener("pointerenter",i,{signal:t}),A.addEventListener("pointerleave",s,{signal:t}),A.classList.add("popupTriggerArea")}else{const A=C(this,pi,document.createElement("button"));A.className="annotationCommentButton";const a=c(this,fn).container;A.style.zIndex=parseInt(a.style.zIndex,10)+1,A.tabIndex=0,A.ariaHasPopup="dialog",A.ariaControls="commentPopup",A.setAttribute("data-l10n-id","pdfjs-show-comment-button"),_(this,Ve,fS).call(this),_(this,Ve,uS).call(this),A.addEventListener("keydown",c(this,xh),{signal:t}),A.addEventListener("click",r,{signal:t}),A.addEventListener("pointerenter",i,{signal:t}),A.addEventListener("pointerleave",s,{signal:t}),a.after(A)}}get commentButtonColor(){const{color:t,opacity:e}=c(this,fn).commentData;return t?c(this,Vp)._commentManager.makeCommentColor(t,e):null}focusCommentButton(){setTimeout(()=>{var t;(t=c(this,pi))==null||t.focus()},0)}getData(){const{richText:t,color:e,opacity:r,creationDate:i,modificationDate:s}=c(this,fn).commentData;return{contentsObj:{str:this.comment},richText:t,color:e,opacity:r,creationDate:i,modificationDate:s}}get elementBeforePopup(){return c(this,pi)}get comment(){return c(this,Th)||C(this,Th,c(this,fn).commentText),c(this,Th)}set comment(t){t!==this.comment&&(c(this,fn).commentText=C(this,Th,t))}focus(){var t;(t=c(this,fn).container)==null||t.focus()}get parentBoundingClientRect(){return c(this,fn).layer.getBoundingClientRect()}setCommentButtonStates({selected:t,hasPopup:e}){c(this,pi)&&(c(this,pi).classList.toggle("selected",t),c(this,pi).ariaExpanded=e)}setSelectedCommentButton(t){c(this,pi).classList.toggle("selected",t)}get commentPopupPosition(){if(c(this,Sh))return c(this,Sh);const{x:t,y:e,height:r}=c(this,pi).getBoundingClientRect(),{x:i,y:s,width:A,height:a}=c(this,fn).layer.getBoundingClientRect();return[(t-i)/A,(e+r-s)/a]}set commentPopupPosition(t){C(this,Sh,t)}hasDefaultPopupPosition(){return c(this,Sh)===null}get commentButtonPosition(){return c(this,$l)}get commentButtonWidth(){return c(this,pi).getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(t){const[e,r]=c(this,Sh)||this.commentButtonPosition.map(l=>l/100),i=this.parentBoundingClientRect,{x:s,y:A,width:a,height:o}=i;c(this,gA).showDialog(null,this,s+e*a,A+r*o,{...t,parentDimensions:i})}render(){var r,i;if(c(this,pA))return;const t=C(this,pA,document.createElement("div"));if(t.className="popup",c(this,Kp)){const s=t.style.outlineColor=Qt.makeHexColor(...c(this,Kp));t.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`}const e=document.createElement("span");if(e.className="header",(r=c(this,jp))!=null&&r.str){const s=document.createElement("span");s.className="title",e.append(s),{dir:s.dir,str:s.textContent}=c(this,jp)}if(t.append(e),c(this,Eh)){const s=document.createElement("time");s.className="popupDate",s.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),s.setAttribute("data-l10n-args",JSON.stringify({dateObj:c(this,Eh).valueOf()})),s.dateTime=c(this,Eh).toISOString(),e.append(s)}f4({html:c(this,Ve,Wy)||c(this,Fo).str,dir:(i=c(this,Fo))==null?void 0:i.dir,className:"popupContent"},t),c(this,gi).append(t)}updateEdited({rect:t,popup:e,deleted:r}){var i;if(c(this,gA)){r?(this.remove(),C(this,Th,null)):e&&(e.deleted?this.remove():(_(this,Ve,fS).call(this),C(this,Th,e.text))),t&&(C(this,$l,null),_(this,Ve,hS).call(this),_(this,Ve,uS).call(this));return}if(r||e!=null&&e.deleted){this.remove();return}_(this,Ve,$y).call(this),c(this,Rf)||C(this,Rf,{contentsObj:c(this,Fo),richText:c(this,Wl)}),t&&C(this,jl,null),e&&e.text&&(C(this,Wl,_(this,Ve,EM).call(this,e.text)),C(this,Eh,wv.toDateObject(e.date)),C(this,Fo,null)),(i=c(this,pA))==null||i.remove(),C(this,pA,null)}resetEdited(){var t;c(this,Rf)&&({contentsObj:Hi(this,Fo)._,richText:Hi(this,Wl)._}=c(this,Rf),C(this,Rf,null),(t=c(this,pA))==null||t.remove(),C(this,pA,null),C(this,jl,null))}remove(){var t,e,r;if((t=c(this,Gl))==null||t.abort(),C(this,Gl,null),(e=c(this,pA))==null||e.remove(),C(this,pA,null),C(this,Fh,!1),C(this,To,!1),(r=c(this,pi))==null||r.remove(),C(this,pi,null),this.trigger)for(const i of this.trigger)i.classList.remove("popupTriggerArea")}forceHide(){C(this,Fh,this.isVisible),c(this,Fh)&&(c(this,gi).hidden=!0)}maybeShow(){c(this,gA)||(_(this,Ve,$y).call(this),c(this,Fh)&&(c(this,pA)||_(this,Ve,Xy).call(this),C(this,Fh,!1),c(this,gi).hidden=!1))}get isVisible(){return c(this,gA)?!1:c(this,gi).hidden===!1}}gA=new WeakMap,xh=new WeakMap,yB=new WeakMap,bB=new WeakMap,Hp=new WeakMap,Kp=new WeakMap,gi=new WeakMap,Fo=new WeakMap,Eh=new WeakMap,Df=new WeakMap,Vp=new WeakMap,Gp=new WeakMap,To=new WeakMap,pA=new WeakMap,Gl=new WeakMap,jl=new WeakMap,pi=new WeakMap,$l=new WeakMap,Sh=new WeakMap,k1=new WeakMap,Wl=new WeakMap,jp=new WeakMap,Rf=new WeakMap,Fh=new WeakMap,fn=new WeakMap,Th=new WeakMap,Ve=new WeakSet,$y=function(){var e;if(c(this,Gl))return;C(this,Gl,new AbortController);const{signal:t}=c(this,Gl);for(const r of this.trigger)r.addEventListener("click",c(this,Hp),{signal:t}),r.addEventListener("pointerenter",c(this,bB),{signal:t}),r.addEventListener("pointerleave",c(this,yB),{signal:t}),r.classList.add("popupTriggerArea");for(const r of c(this,Df))(e=r.container)==null||e.addEventListener("keydown",c(this,xh),{signal:t})},hS=function(){const t=c(this,Df).find(e=>e.hasCommentButton);t&&C(this,$l,t._normalizePoint(t.commentButtonPosition))},uS=function(){if(c(this,fn).extraPopupElement&&!c(this,fn).editor)return;c(this,pi)||this.renderCommentButton();const[t,e]=c(this,$l),{style:r}=c(this,pi);r.left=`calc(${t}%)`,r.top=`calc(${e}% - var(--comment-button-dim))`},fS=function(){c(this,fn).extraPopupElement||(c(this,pi)||this.renderCommentButton(),c(this,pi).style.backgroundColor=this.commentButtonColor||"")},Wy=function(){const t=c(this,Wl),e=c(this,Fo);return t!=null&&t.str&&(!(e!=null&&e.str)||e.str===t.str)&&c(this,Wl).html||null},dS=function(){var t,e,r;return((r=(e=(t=c(this,Ve,Wy))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:r.fontSize)||0},xM=function(){var t,e,r;return((r=(e=(t=c(this,Ve,Wy))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:r.color)||null},EM=function(t){const e=[],r={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:e}]}},i={style:{color:c(this,Ve,xM),fontSize:c(this,Ve,dS)?`calc(${c(this,Ve,dS)}px * var(--total-scale-factor))`:""}};for(const s of t.split(`
|
|
264
|
+
`))e.push({name:"span",value:s,attributes:i});return r},SM=function(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&c(this,To))&&_(this,Ve,zy).call(this)},FM=function(){if(c(this,jl)!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:r,pageX:i,pageY:s}}}=c(this,Vp);let A=!!c(this,Gp),a=A?c(this,Gp):c(this,k1);for(const p of c(this,Df))if(!a||Qt.intersect(p.data.rect,a)!==null){a=p.data.rect,A=!0;break}const o=Qt.normalizeRect([a[0],t[3]-a[1]+t[1],a[2],t[3]-a[3]+t[1]]),h=A?a[2]-a[0]+5:0,u=o[0]+h,d=o[1];C(this,jl,[100*(u-i)/e,100*(d-s)/r]);const{style:f}=c(this,gi);f.left=`${c(this,jl)[0]}%`,f.top=`${c(this,jl)[1]}%`},zy=function(){if(c(this,gA)){c(this,gA).toggleCommentPopup(this,!1);return}C(this,To,!c(this,To)),c(this,To)?(_(this,Ve,Xy).call(this),c(this,gi).addEventListener("click",c(this,Hp)),c(this,gi).addEventListener("keydown",c(this,xh))):(_(this,Ve,gS).call(this),c(this,gi).removeEventListener("click",c(this,Hp)),c(this,gi).removeEventListener("keydown",c(this,xh)))},Xy=function(){c(this,pA)||this.render(),this.isVisible?c(this,To)&&c(this,gi).classList.add("focused"):(_(this,Ve,FM).call(this),c(this,gi).hidden=!1,c(this,gi).style.zIndex=parseInt(c(this,gi).style.zIndex,10)+1e3)},gS=function(){c(this,gi).classList.remove("focused"),!(c(this,To)||!this.isVisible)&&(c(this,gi).hidden=!0,c(this,gi).style.zIndex=parseInt(c(this,gi).style.zIndex,10)-1e3)};class TM extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=Ee.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=this.contentElement=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const r=document.createElement("span");r.textContent=e,t.append(r)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}var O1;class pV extends ai{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,O1,null)}render(){this.container.classList.add("lineAnnotation");const{data:e,width:r,height:i}=this,s=this.svgFactory.create(r,i,!0),A=C(this,O1,this.svgFactory.createElement("svg:line"));return A.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),A.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),A.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),A.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),A.setAttribute("stroke-width",e.borderStyle.width||1),A.setAttribute("stroke","transparent"),A.setAttribute("fill","transparent"),s.append(A),this.container.append(s),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,O1)}addHighlightArea(){this.container.classList.add("highlightArea")}}O1=new WeakMap;var D1;class mV extends ai{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,D1,null)}render(){this.container.classList.add("squareAnnotation");const{data:e,width:r,height:i}=this,s=this.svgFactory.create(r,i,!0),A=e.borderStyle.width,a=C(this,D1,this.svgFactory.createElement("svg:rect"));return a.setAttribute("x",A/2),a.setAttribute("y",A/2),a.setAttribute("width",r-A),a.setAttribute("height",i-A),a.setAttribute("stroke-width",A||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,D1)}addHighlightArea(){this.container.classList.add("highlightArea")}}D1=new WeakMap;var R1;class vV extends ai{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,R1,null)}render(){this.container.classList.add("circleAnnotation");const{data:e,width:r,height:i}=this,s=this.svgFactory.create(r,i,!0),A=e.borderStyle.width,a=C(this,R1,this.svgFactory.createElement("svg:ellipse"));return a.setAttribute("cx",r/2),a.setAttribute("cy",i/2),a.setAttribute("rx",r/2-A/2),a.setAttribute("ry",i/2-A/2),a.setAttribute("stroke-width",A||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,R1)}addHighlightArea(){this.container.classList.add("highlightArea")}}R1=new WeakMap;var H1;class IM extends ai{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,H1,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:r,borderStyle:i,popupRef:s},width:A,height:a}=this;if(!r)return this.container;const o=this.svgFactory.create(A,a,!0);let l=[];for(let u=0,d=r.length;u<d;u+=2){const f=r[u]-e[0],p=e[3]-r[u+1];l.push(`${f},${p}`)}l=l.join(" ");const h=C(this,H1,this.svgFactory.createElement(this.svgElementName));return h.setAttribute("points",l),h.setAttribute("stroke-width",i.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),o.append(h),this.container.append(o),!s&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return c(this,H1)}addHighlightArea(){this.container.classList.add("highlightArea")}}H1=new WeakMap;class wV extends IM{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class yV extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}}var K1,Hf,V1,pS;class w4 extends ai{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});T(this,V1);T(this,K1,null);T(this,Hf,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?Ee.HIGHLIGHT:Ee.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,rotation:r,inkLists:i,borderStyle:s,popupRef:A}}=this,{transform:a,width:o,height:l}=_(this,V1,pS).call(this,r,e),h=this.svgFactory.create(o,l,!0),u=C(this,K1,this.svgFactory.createElement("svg:g"));h.append(u),u.setAttribute("stroke-width",s.width||1),u.setAttribute("stroke-linecap","round"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit",10),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),u.setAttribute("transform",a);for(let d=0,f=i.length;d<f;d++){const p=this.svgFactory.createElement(this.svgElementName);c(this,Hf).push(p),p.setAttribute("points",i[d].join(",")),u.append(p)}return!A&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(h),this._editOnDoubleClick(),this.container}updateEdited(e){super.updateEdited(e);const{thickness:r,points:i,rect:s}=e,A=c(this,K1);if(r>=0&&A.setAttribute("stroke-width",r||1),i)for(let a=0,o=c(this,Hf).length;a<o;a++)c(this,Hf)[a].setAttribute("points",i[a].join(","));if(s){const{transform:a,width:o,height:l}=_(this,V1,pS).call(this,this.data.rotation,s);A.parentElement.setAttribute("viewBox",`0 0 ${o} ${l}`),A.setAttribute("transform",a)}}getElementsToTriggerPopup(){return c(this,Hf)}addHighlightArea(){this.container.classList.add("highlightArea")}}K1=new WeakMap,Hf=new WeakMap,V1=new WeakSet,pS=function(e,r){switch(e){case 90:return{transform:`rotate(90) translate(${-r[0]},${r[1]}) scale(1,-1)`,width:r[3]-r[1],height:r[2]-r[0]};case 180:return{transform:`rotate(180) translate(${-r[2]},${r[1]}) scale(1,-1)`,width:r[2]-r[0],height:r[3]-r[1]};case 270:return{transform:`rotate(270) translate(${-r[2]},${r[3]}) scale(1,-1)`,width:r[3]-r[1],height:r[2]-r[0]};default:return{transform:`translate(${-r[0]},${r[3]}) scale(1,-1)`,width:r[2]-r[0],height:r[3]-r[1]}}};class _M extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=Ee.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const r=document.createElement("mark");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class bV extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("underlineAnnotation"),t){const r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class BV extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("squigglyAnnotation"),t){const r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class CV extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("strikeoutAnnotation"),t){const r=document.createElement("s");r.classList.add("overlaidText"),r.textContent=t,this.container.append(r)}return this.container}}class UM extends ai{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=Ee.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}var G1,j1,mS;class xV extends ai{constructor(e){var i;super(e,{isRenderable:!0});T(this,j1);T(this,G1,null);const{file:r}=this.data;this.filename=r.filename,this.content=r.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:r}=this;let i;r.hasAppearance||r.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(r.name)?"paperclip":"pushpin"}.svg`,r.fillAlpha&&r.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(r.fillAlpha*100)}%);`)),i.addEventListener("dblclick",_(this,j1,mS).bind(this)),C(this,G1,i);const{isMac:s}=Mi.platform;return e.addEventListener("keydown",A=>{A.key==="Enter"&&(s?A.metaKey:A.ctrlKey)&&_(this,j1,mS).call(this)}),!r.popupRef&&this.hasPopupData?(this.hasOwnCommentButton=!0,this._createPopup()):i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return c(this,G1)}addHighlightArea(){this.container.classList.add("highlightArea")}}G1=new WeakMap,j1=new WeakSet,mS=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};var Kf,Vf,$p,Ih,$1,Gf,mA,W1,oc,qy,vS;const ST=class ST{constructor({div:t,accessibilityManager:e,annotationCanvasMap:r,annotationEditorUIManager:i,page:s,viewport:A,structTreeLayer:a,commentManager:o,linkService:l,annotationStorage:h}){T(this,oc);T(this,Kf,null);T(this,Vf,null);T(this,$p,null);T(this,Ih,new Map);T(this,$1,null);T(this,Gf,null);T(this,mA,[]);T(this,W1,!1);ct(this,"zIndex",0);this.div=t,C(this,Kf,e),C(this,Vf,r),C(this,$1,a||null),C(this,Gf,l||null),C(this,$p,h||new d4),this.page=s,this.viewport=A,this._annotationEditorUIManager=i,this._commentManager=o||null}hasEditableAnnotations(){return c(this,Ih).size>0}async render(t){var a;const{annotations:e}=t,r=this.div;Xh(r,this.viewport);const i=new Map,s=[],A={data:null,layer:r,linkService:c(this,Gf),downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new xv,annotationStorage:c(this,$p),enableComment:t.enableComment===!0,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of e){if(o.noHTML)continue;const l=o.annotationType===Fi.POPUP;if(l){const d=i.get(o.id);if(!d)continue;if(!this._commentManager){s.push(o);continue}A.elements=d}else if(o.rect[2]===o.rect[0]||o.rect[3]===o.rect[1])continue;A.data=o;const h=H5.create(A);if(!h.isRenderable)continue;l||(c(this,mA).push(h),o.popupRef&&i.getOrInsertComputed(o.popupRef,MB).push(h));const u=h.render();o.hidden&&(u.style.visibility="hidden"),h._isEditable&&(c(this,Ih).set(h.data.id,h),(a=this._annotationEditorUIManager)==null||a.renderAnnotationElement(h))}await _(this,oc,qy).call(this);for(const o of s){const l=A.elements=i.get(o.id);A.data=o;const h=H5.create(A);if(!h.isRenderable)continue;const u=h.render();h.contentElement.id=`${Tg}${o.id}`,o.hidden&&(u.style.visibility="hidden"),l.at(-1).container.after(u)}_(this,oc,vS).call(this)}async addLinkAnnotations(t){const e={data:null,layer:this.div,linkService:c(this,Gf),svgFactory:new xv,parent:this};for(const r of t){r.borderStyle||(r.borderStyle=ST._defaultBorderStyle),e.data=r;const i=H5.create(e);i.isRenderable&&(i.render(),i.contentElement.id=`${Tg}${r.id}`,c(this,mA).push(i))}await _(this,oc,qy).call(this)}update({viewport:t}){const e=this.div;this.viewport=t,Xh(e,{rotation:t.rotation}),_(this,oc,vS).call(this),e.hidden=!1}getEditableAnnotations(){return c(this,Ih).values()}getEditableAnnotation(t){return c(this,Ih).get(t)}addFakeAnnotation(t){const{div:e}=this,{id:r,rotation:i}=t,s=new oV({data:{id:r,rect:t.getPDFRect(),rotation:i},editor:t,layer:e,parent:this,enableComment:!!this._commentManager,linkService:c(this,Gf),annotationStorage:c(this,$p)});return s.render(),s.contentElement.id=`${Tg}${r}`,s.createOrUpdatePopup(),c(this,mA).push(s),s}removeAnnotation(t){var i;const e=c(this,mA).findIndex(s=>s.data.id===t);if(e<0)return;const[r]=c(this,mA).splice(e,1);(i=c(this,Kf))==null||i.removePointerInTextLayer(r.contentElement)}updateFakeAnnotations(t){if(t.length!==0){for(const e of t)e.updateFakeAnnotationElement(this);_(this,oc,qy).call(this)}}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}static get _defaultBorderStyle(){return Fe(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:dg.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};Kf=new WeakMap,Vf=new WeakMap,$p=new WeakMap,Ih=new WeakMap,$1=new WeakMap,Gf=new WeakMap,mA=new WeakMap,W1=new WeakMap,oc=new WeakSet,qy=async function(){var r,i,s;if(c(this,mA).length===0)return;this.div.replaceChildren();const t=[];if(!c(this,W1)){C(this,W1,!0);for(const{contentElement:A,data:{id:a}}of c(this,mA)){const o=A.id=`${Tg}${a}`;t.push((r=c(this,$1))==null?void 0:r.getAriaAttributes(o).then(l=>{if(l)for(const[h,u]of l)A.setAttribute(h,u)}))}}c(this,mA).sort(({data:{rect:[A,a,o,l]}},{data:{rect:[h,u,d,f]}})=>{if(A===o&&a===l)return 1;if(h===d&&u===f)return-1;const p=l,m=a,y=(a+l)/2,w=f,B=u,E=(u+f)/2;if(y>=w&&E<=m)return-1;if(E>=p&&y<=B)return 1;const S=(A+o)/2,I=(h+d)/2;return S-I});const e=document.createDocumentFragment();for(const A of c(this,mA))e.append(A.container),this._commentManager?(s=((i=A.extraPopupElement)==null?void 0:i.popup)||A.popup)==null||s.renderCommentButton():A.extraPopupElement&&e.append(A.extraPopupElement.render());if(this.div.append(e),await Promise.all(t),c(this,Kf))for(const A of c(this,mA))c(this,Kf).addPointerInTextLayer(A.contentElement,!1)},vS=function(){var e;if(!c(this,Vf))return;const t=this.div;for(const[r,i]of c(this,Vf)){const s=t.querySelector(`[data-annotation-id="${r}"]`);if(!s)continue;i.className="annotationContent";const{firstChild:A}=s;A?A.nodeName==="CANVAS"?A.replaceWith(i):A.classList.contains("annotationContent")?A.after(i):A.before(i):s.append(i);const a=c(this,Ih).get(r);a&&(a._hasNoCanvas?((e=this._annotationEditorUIManager)==null||e.setMissingCanvas(r,s.id,i),a._hasNoCanvas=!1):a.canvas=i)}c(this,Vf).clear()};let Lb=ST;const T2=/\r\n?|\n/g;var vA,z1,jf,wA,Wi,LM,QM,NM,Yy,lc,Jy,Zy,PM,yS,MM;const Gr=class Gr extends Dr{constructor(e){super({...e,name:"freeTextEditor"});T(this,Wi);T(this,vA,"");T(this,z1,`${this.id}-editor`);T(this,jf,null);T(this,wA);ct(this,"_colorPicker",null);this.color=e.color||Gr._defaultColor||Dr._defaultLineColor,C(this,wA,e.fontSize||Gr._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"),this.canAddComment=!1}static get _keyboardManager(){const e=Gr.prototype,r=A=>A.isEmpty(),i=qh.TRANSLATE_SMALL,s=qh.TRANSLATE_BIG;return Fe(this,"_keyboardManager",new xw([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-s,0],checker:r}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[s,0],checker:r}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-s],checker:r}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,s],checker:r}]]))}static initialize(e,r){Dr.initialize(e,r);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,r){switch(e){case Pe.FREETEXT_SIZE:Gr._defaultFontSize=r;break;case Pe.FREETEXT_COLOR:Gr._defaultColor=r;break}}updateParams(e,r){switch(e){case Pe.FREETEXT_SIZE:_(this,Wi,LM).call(this,r);break;case Pe.FREETEXT_COLOR:_(this,Wi,QM).call(this,r);break}}static get defaultPropertiesToUpdate(){return[[Pe.FREETEXT_SIZE,Gr._defaultFontSize],[Pe.FREETEXT_COLOR,Gr._defaultColor||Dr._defaultLineColor]]}get propertiesToUpdate(){return[[Pe.FREETEXT_SIZE,c(this,wA)],[Pe.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new Ub(this)),[["colorPicker",this._colorPicker]]}get colorType(){return Pe.FREETEXT_COLOR}onUpdatedColor(){var e;this.editorDiv.style.color=this.color,(e=this._colorPicker)==null||e.update(this.color),super.onUpdatedColor()}_translateEmpty(e,r){this._uiManager.translateSelectedEditors(e,r,!0)}getInitialTranslation(){const e=this.parentScale;return[-Gr._internalPadding*e,-(Gr._internalPadding+c(this,wA))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),C(this,jf,new AbortController);const e=this._uiManager.combinedSignal(c(this,jf));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e}),!0}disableEditMode(){var e;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",c(this,z1)),this._isDraggable=!0,(e=c(this,jf))==null||e.abort(),C(this,jf,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){var r;this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),(r=this._initialOptions)!=null&&r.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=c(this,vA),r=C(this,vA,_(this,Wi,NM).call(this).trimEnd());if(e===r)return;const i=s=>{if(C(this,vA,s),!s){this.remove();return}_(this,Wi,Zy).call(this),this._uiManager.rebuild(this),_(this,Wi,Yy).call(this)};this.addCommands({cmd:()=>{i(r)},undo:()=>{i(e)},mustExec:!1}),_(this,Wi,Yy).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){Gr._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,r;(this._isCopy||this.annotationElementId)&&(e=this.x,r=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",c(this,z1)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${c(this,wA)}px * var(--total-scale-factor))`,i.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[s,A]=this.parentDimensions;if(this.annotationElementId){const{position:a}=this._initialData;let[o,l]=this.getInitialTranslation();[o,l]=this.pageTranslationToScreen(o,l);const[h,u]=this.pageDimensions,[d,f]=this.pageTranslation;let p,m;switch(this.rotation){case 0:p=e+(a[0]-d)/h,m=r+this.height-(a[1]-f)/u;break;case 90:p=e+(a[0]-d)/h,m=r-(a[1]-f)/u,[o,l]=[l,-o];break;case 180:p=e-this.width+(a[0]-d)/h,m=r-(a[1]-f)/u,[o,l]=[-o,-l];break;case 270:p=e+(a[0]-d-this.height*u)/h,m=r+(a[1]-f-this.width*h)/u,[o,l]=[-l,o];break}this.setAt(p*s,m*A,o,l)}else this._moveAfterPaste(e,r);_(this,Wi,Zy).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var p,m,y;const r=e.clipboardData||window.clipboardData,{types:i}=r;if(i.length===1&&i[0]==="text/plain")return;e.preventDefault();const s=_(p=Gr,lc,yS).call(p,r.getData("text")||"").replaceAll(T2,`
|
|
265
|
+
`);if(!s)return;const A=window.getSelection();if(!A.rangeCount)return;this.editorDiv.normalize(),A.deleteFromDocument();const a=A.getRangeAt(0);if(!s.includes(`
|
|
266
|
+
`)){a.insertNode(document.createTextNode(s)),this.editorDiv.normalize(),A.collapseToStart();return}const{startContainer:o,startOffset:l}=a,h=[],u=[];if(o.nodeType===Node.TEXT_NODE){const w=o.parentElement;if(u.push(o.nodeValue.slice(l).replaceAll(T2,"")),w!==this.editorDiv){let B=h;for(const E of this.editorDiv.childNodes){if(E===w){B=u;continue}B.push(_(m=Gr,lc,Jy).call(m,E))}}h.push(o.nodeValue.slice(0,l).replaceAll(T2,""))}else if(o===this.editorDiv){let w=h,B=0;for(const E of this.editorDiv.childNodes)B++===l&&(w=u),w.push(_(y=Gr,lc,Jy).call(y,E))}C(this,vA,`${h.join(`
|
|
267
|
+
`)}${s}${u.join(`
|
|
268
|
+
`)}`),_(this,Wi,Zy).call(this);const d=new Range;let f=Math.sumPrecise(h.map(w=>w.length));for(const{firstChild:w}of this.editorDiv.childNodes)if(w.nodeType===Node.TEXT_NODE){const B=w.nodeValue.length;if(f<=B){d.setStart(w,f),d.setEnd(w,f);break}f-=B}A.removeAllRanges(),A.addRange(d)}get contentDiv(){return this.editorDiv}getPDFRect(){const e=Gr._internalPadding*this.parentScale;return this.getRect(e,e)}static async deserialize(e,r,i){var a;let s=null;if(e instanceof TM){const{data:{defaultAppearanceData:{fontSize:o,fontColor:l},rect:h,rotation:u,id:d,popupRef:f,richText:p,contentsObj:m,creationDate:y,modificationDate:w},textContent:B,textPosition:E,parent:{page:{pageNumber:S}}}=e;if(!B||B.length===0)return null;s=e={annotationType:Ee.FREETEXT,color:Array.from(l),fontSize:o,value:B.join(`
|
|
269
|
+
`),position:E,pageIndex:S-1,rect:h.slice(0),rotation:u,annotationElementId:d,id:d,deleted:!1,popupRef:f,comment:(m==null?void 0:m.str)||null,richText:p,creationDate:y,modificationDate:w}}const A=await super.deserialize(e,r,i);return C(A,wA,e.fontSize),A.color=Qt.makeHexColor(...e.color),C(A,vA,_(a=Gr,lc,yS).call(a,e.value)),A._initialData=s,e.comment&&A.setCommentData(e),A}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const r=Dr._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),i=Object.assign(super.serialize(e),{color:r,fontSize:c(this,wA),value:_(this,Wi,PM).call(this)});return this.addComment(i),e?(i.isCopy=!0,i):this.annotationElementId&&!_(this,Wi,MM).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(e){const r=super.renderAnnotationElement(e);if(!r)return null;const{style:i}=r;i.fontSize=`calc(${c(this,wA)}px * var(--total-scale-factor))`,i.color=this.color,r.replaceChildren();for(const s of c(this,vA).split(`
|
|
270
|
+
`)){const A=document.createElement("div");A.append(s?document.createTextNode(s):document.createElement("br")),r.append(A)}return e.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:c(this,vA)}}),r}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};vA=new WeakMap,z1=new WeakMap,jf=new WeakMap,wA=new WeakMap,Wi=new WeakSet,LM=function(e){const r=s=>{this.editorDiv.style.fontSize=`calc(${s}px * var(--total-scale-factor))`,this.translate(0,-(s-c(this,wA))*this.parentScale),C(this,wA,s),_(this,Wi,Yy).call(this)},i=c(this,wA);this.addCommands({cmd:r.bind(this,e),undo:r.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Pe.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},QM=function(e){const r=s=>{this.color=s,this.onUpdatedColor()},i=this.color;this.addCommands({cmd:r.bind(this,e),undo:r.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Pe.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},NM=function(){var i;const e=[];this.editorDiv.normalize();let r=null;for(const s of this.editorDiv.childNodes)(r==null?void 0:r.nodeType)===Node.TEXT_NODE&&s.nodeName==="BR"||(e.push(_(i=Gr,lc,Jy).call(i,s)),r=s);return e.join(`
|
|
271
|
+
`)},Yy=function(){const[e,r]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:s,div:A}=this,a=A.style.display,o=A.classList.contains("hidden");A.classList.remove("hidden"),A.style.display="hidden",s.div.append(this.div),i=A.getBoundingClientRect(),A.remove(),A.style.display=a,A.classList.toggle("hidden",o)}this.rotation%180===this.parentRotation%180?(this.width=i.width/e,this.height=i.height/r):(this.width=i.height/e,this.height=i.width/r),this.fixAndSetPosition()},lc=new WeakSet,Jy=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(T2,"")},Zy=function(){if(this.editorDiv.replaceChildren(),!!c(this,vA))for(const e of c(this,vA).split(`
|
|
272
|
+
`)){const r=document.createElement("div");r.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(r)}},PM=function(){return c(this,vA).replaceAll(" "," ")},yS=function(e){return e.replaceAll(" "," ")},MM=function(e){const{value:r,fontSize:i,color:s,pageIndex:A}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==r||e.fontSize!==i||e.color.some((a,o)=>a!==s[o])||e.pageIndex!==A},T(Gr,lc),ct(Gr,"_freeTextDefaultContent",""),ct(Gr,"_internalPadding",0),ct(Gr,"_defaultColor",null),ct(Gr,"_defaultFontSize",10),ct(Gr,"_type","freetext"),ct(Gr,"_editorType",Ee.FREETEXT);let wS=Gr;class zt{toSVGPath(){hr("Abstract method `toSVGPath` must be implemented.")}get box(){hr("Abstract getter `box` must be implemented.")}serialize(t,e){hr("Abstract method `serialize` must be implemented.")}static _rescale(t,e,r,i,s,A){A||(A=new Float32Array(t.length));for(let a=0,o=t.length;a<o;a+=2)A[a]=e+t[a]*i,A[a+1]=r+t[a+1]*s;return A}static _rescaleAndSwap(t,e,r,i,s,A){A||(A=new Float32Array(t.length));for(let a=0,o=t.length;a<o;a+=2)A[a]=e+t[a+1]*i,A[a+1]=r+t[a]*s;return A}static _translate(t,e,r,i){i||(i=new Float32Array(t.length));for(let s=0,A=t.length;s<A;s+=2)i[s]=e+t[s],i[s+1]=r+t[s+1];return i}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,e,r,i,s){switch(s){case 90:return[1-e/r,t/i];case 180:return[1-t/r,1-e/i];case 270:return[e/r,1-t/i];default:return[t/r,e/i]}}static _normalizePagePoint(t,e,r){switch(r){case 90:return[1-e,t];case 180:return[1-t,1-e];case 270:return[e,1-t];default:return[t,e]}}static createBezierPoints(t,e,r,i,s,A){return[(t+5*r)/6,(e+5*i)/6,(5*r+s)/6,(5*i+A)/6,(r+s)/2,(i+A)/2]}}ct(zt,"PRECISION",1e-4);var yA,La,Wp,zp,Io,$e,$f,Wf,X1,q1,Xp,qp,_h,Y1,BB,CB,An,Pm,kM,OM,DM,RM,HM,KM;const ml=class ml{constructor({x:t,y:e},r,i,s,A,a=0){T(this,An);T(this,yA);T(this,La,[]);T(this,Wp);T(this,zp);T(this,Io,[]);T(this,$e,new Float32Array(18));T(this,$f);T(this,Wf);T(this,X1);T(this,q1);T(this,Xp);T(this,qp);T(this,_h,[]);C(this,yA,r),C(this,qp,s*i),C(this,zp,A),c(this,$e).set([NaN,NaN,NaN,NaN,t,e],6),C(this,Wp,a),C(this,q1,c(ml,Y1)*i),C(this,X1,c(ml,CB)*i),C(this,Xp,i),c(this,_h).push(t,e)}isEmpty(){return isNaN(c(this,$e)[8])}add({x:t,y:e}){var Q;C(this,$f,t),C(this,Wf,e);const[r,i,s,A]=c(this,yA);let[a,o,l,h]=c(this,$e).subarray(8,12);const u=t-l,d=e-h,f=Math.hypot(u,d);if(f<c(this,X1))return!1;const p=f-c(this,q1),m=p/f,y=m*u,w=m*d;let B=a,E=o;a=l,o=h,l+=y,h+=w,(Q=c(this,_h))==null||Q.push(t,e);const S=-w/p,I=y/p,L=S*c(this,qp),k=I*c(this,qp);return c(this,$e).set(c(this,$e).subarray(2,8),0),c(this,$e).set([l+L,h+k],4),c(this,$e).set(c(this,$e).subarray(14,18),12),c(this,$e).set([l-L,h-k],16),isNaN(c(this,$e)[6])?(c(this,Io).length===0&&(c(this,$e).set([a+L,o+k],2),c(this,Io).push(NaN,NaN,NaN,NaN,(a+L-r)/s,(o+k-i)/A),c(this,$e).set([a-L,o-k],14),c(this,La).push(NaN,NaN,NaN,NaN,(a-L-r)/s,(o-k-i)/A)),c(this,$e).set([B,E,a,o,l,h],6),!this.isEmpty()):(c(this,$e).set([B,E,a,o,l,h],6),Math.abs(Math.atan2(E-o,B-a)-Math.atan2(w,y))<Math.PI/2?([a,o,l,h]=c(this,$e).subarray(2,6),c(this,Io).push(NaN,NaN,NaN,NaN,((a+l)/2-r)/s,((o+h)/2-i)/A),[a,o,B,E]=c(this,$e).subarray(14,18),c(this,La).push(NaN,NaN,NaN,NaN,((B+a)/2-r)/s,((E+o)/2-i)/A),!0):([B,E,a,o,l,h]=c(this,$e).subarray(0,6),c(this,Io).push(((B+5*a)/6-r)/s,((E+5*o)/6-i)/A,((5*a+l)/6-r)/s,((5*o+h)/6-i)/A,((a+l)/2-r)/s,((o+h)/2-i)/A),[l,h,a,o,B,E]=c(this,$e).subarray(12,18),c(this,La).push(((B+5*a)/6-r)/s,((E+5*o)/6-i)/A,((5*a+l)/6-r)/s,((5*o+h)/6-i)/A,((a+l)/2-r)/s,((o+h)/2-i)/A),!0))}toSVGPath(){if(this.isEmpty())return"";const t=c(this,Io),e=c(this,La);if(isNaN(c(this,$e)[6])&&!this.isEmpty())return _(this,An,kM).call(this);const r=[];r.push(`M${t[4]} ${t[5]}`);for(let i=6;i<t.length;i+=6)isNaN(t[i])?r.push(`L${t[i+4]} ${t[i+5]}`):r.push(`C${t[i]} ${t[i+1]} ${t[i+2]} ${t[i+3]} ${t[i+4]} ${t[i+5]}`);_(this,An,DM).call(this,r);for(let i=e.length-6;i>=6;i-=6)isNaN(e[i])?r.push(`L${e[i+4]} ${e[i+5]}`):r.push(`C${e[i]} ${e[i+1]} ${e[i+2]} ${e[i+3]} ${e[i+4]} ${e[i+5]}`);return _(this,An,OM).call(this,r),r.join(" ")}newFreeDrawOutline(t,e,r,i,s,A){return new VM(t,e,r,i,s,A)}getOutlines(){var u;const t=c(this,Io),e=c(this,La),r=c(this,$e),[i,s,A,a]=c(this,yA),o=new Float32Array((((u=c(this,_h))==null?void 0:u.length)??0)+2);for(let d=0,f=o.length-2;d<f;d+=2)o[d]=(c(this,_h)[d]-i)/A,o[d+1]=(c(this,_h)[d+1]-s)/a;if(o[o.length-2]=(c(this,$f)-i)/A,o[o.length-1]=(c(this,Wf)-s)/a,isNaN(r[6])&&!this.isEmpty())return _(this,An,RM).call(this,o);const l=new Float32Array(c(this,Io).length+24+c(this,La).length);let h=t.length;for(let d=0;d<h;d+=2){if(isNaN(t[d])){l[d]=l[d+1]=NaN;continue}l[d]=t[d],l[d+1]=t[d+1]}h=_(this,An,KM).call(this,l,h);for(let d=e.length-6;d>=6;d-=6)for(let f=0;f<6;f+=2){if(isNaN(e[d+f])){l[h]=l[h+1]=NaN,h+=2;continue}l[h]=e[d+f],l[h+1]=e[d+f+1],h+=2}return _(this,An,HM).call(this,l,h),this.newFreeDrawOutline(l,o,c(this,yA),c(this,Xp),c(this,Wp),c(this,zp))}};yA=new WeakMap,La=new WeakMap,Wp=new WeakMap,zp=new WeakMap,Io=new WeakMap,$e=new WeakMap,$f=new WeakMap,Wf=new WeakMap,X1=new WeakMap,q1=new WeakMap,Xp=new WeakMap,qp=new WeakMap,_h=new WeakMap,Y1=new WeakMap,BB=new WeakMap,CB=new WeakMap,An=new WeakSet,Pm=function(){const t=c(this,$e).subarray(4,6),e=c(this,$e).subarray(16,18),[r,i,s,A]=c(this,yA);return[(c(this,$f)+(t[0]-e[0])/2-r)/s,(c(this,Wf)+(t[1]-e[1])/2-i)/A,(c(this,$f)+(e[0]-t[0])/2-r)/s,(c(this,Wf)+(e[1]-t[1])/2-i)/A]},kM=function(){const[t,e,r,i]=c(this,yA),[s,A,a,o]=_(this,An,Pm).call(this);return`M${(c(this,$e)[2]-t)/r} ${(c(this,$e)[3]-e)/i} L${(c(this,$e)[4]-t)/r} ${(c(this,$e)[5]-e)/i} L${s} ${A} L${a} ${o} L${(c(this,$e)[16]-t)/r} ${(c(this,$e)[17]-e)/i} L${(c(this,$e)[14]-t)/r} ${(c(this,$e)[15]-e)/i} Z`},OM=function(t){const e=c(this,La);t.push(`L${e[4]} ${e[5]} Z`)},DM=function(t){const[e,r,i,s]=c(this,yA),A=c(this,$e).subarray(4,6),a=c(this,$e).subarray(16,18),[o,l,h,u]=_(this,An,Pm).call(this);t.push(`L${(A[0]-e)/i} ${(A[1]-r)/s} L${o} ${l} L${h} ${u} L${(a[0]-e)/i} ${(a[1]-r)/s}`)},RM=function(t){const e=c(this,$e),[r,i,s,A]=c(this,yA),[a,o,l,h]=_(this,An,Pm).call(this),u=new Float32Array(36);return u.set([NaN,NaN,NaN,NaN,(e[2]-r)/s,(e[3]-i)/A,NaN,NaN,NaN,NaN,(e[4]-r)/s,(e[5]-i)/A,NaN,NaN,NaN,NaN,a,o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,(e[16]-r)/s,(e[17]-i)/A,NaN,NaN,NaN,NaN,(e[14]-r)/s,(e[15]-i)/A],0),this.newFreeDrawOutline(u,t,c(this,yA),c(this,Xp),c(this,Wp),c(this,zp))},HM=function(t,e){const r=c(this,La);return t.set([NaN,NaN,NaN,NaN,r[4],r[5]],e),e+=6},KM=function(t,e){const r=c(this,$e).subarray(4,6),i=c(this,$e).subarray(16,18),[s,A,a,o]=c(this,yA),[l,h,u,d]=_(this,An,Pm).call(this);return t.set([NaN,NaN,NaN,NaN,(r[0]-s)/a,(r[1]-A)/o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,u,d,NaN,NaN,NaN,NaN,(i[0]-s)/a,(i[1]-A)/o],e),e+=24},T(ml,Y1,8),T(ml,BB,2),T(ml,CB,c(ml,Y1)+c(ml,BB));let Qb=ml;var Yp,zf,zl,J1,bA,Z1,Ui,xB,GM;class VM extends zt{constructor(e,r,i,s,A,a){super();T(this,xB);T(this,Yp);T(this,zf,new Float32Array(4));T(this,zl);T(this,J1);T(this,bA);T(this,Z1);T(this,Ui);C(this,Ui,e),C(this,bA,r),C(this,Yp,i),C(this,Z1,s),C(this,zl,A),C(this,J1,a),this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],_(this,xB,GM).call(this,a);const[o,l,h,u]=c(this,zf);for(let d=0,f=e.length;d<f;d+=2)e[d]=(e[d]-o)/h,e[d+1]=(e[d+1]-l)/u;for(let d=0,f=r.length;d<f;d+=2)r[d]=(r[d]-o)/h,r[d+1]=(r[d+1]-l)/u}toSVGPath(){const e=[`M${c(this,Ui)[4]} ${c(this,Ui)[5]}`];for(let r=6,i=c(this,Ui).length;r<i;r+=6){if(isNaN(c(this,Ui)[r])){e.push(`L${c(this,Ui)[r+4]} ${c(this,Ui)[r+5]}`);continue}e.push(`C${c(this,Ui)[r]} ${c(this,Ui)[r+1]} ${c(this,Ui)[r+2]} ${c(this,Ui)[r+3]} ${c(this,Ui)[r+4]} ${c(this,Ui)[r+5]}`)}return e.push("Z"),e.join(" ")}serialize([e,r,i,s],A){const a=i-e,o=s-r;let l,h;switch(A){case 0:l=zt._rescale(c(this,Ui),e,s,a,-o),h=zt._rescale(c(this,bA),e,s,a,-o);break;case 90:l=zt._rescaleAndSwap(c(this,Ui),e,r,a,o),h=zt._rescaleAndSwap(c(this,bA),e,r,a,o);break;case 180:l=zt._rescale(c(this,Ui),i,r,-a,o),h=zt._rescale(c(this,bA),i,r,-a,o);break;case 270:l=zt._rescaleAndSwap(c(this,Ui),i,s,-a,-o),h=zt._rescaleAndSwap(c(this,bA),i,s,-a,-o);break}return{outline:Array.from(l),points:[Array.from(h)]}}get box(){return c(this,zf)}newOutliner(e,r,i,s,A,a=0){return new Qb(e,r,i,s,A,a)}getNewOutline(e,r){const[i,s,A,a]=c(this,zf),[o,l,h,u]=c(this,Yp),d=A*h,f=a*u,p=i*h+o,m=s*u+l,y=this.newOutliner({x:c(this,bA)[0]*d+p,y:c(this,bA)[1]*f+m},c(this,Yp),c(this,Z1),e,c(this,J1),r??c(this,zl));for(let w=2;w<c(this,bA).length;w+=2)y.add({x:c(this,bA)[w]*d+p,y:c(this,bA)[w+1]*f+m});return y.getOutlines()}}Yp=new WeakMap,zf=new WeakMap,zl=new WeakMap,J1=new WeakMap,bA=new WeakMap,Z1=new WeakMap,Ui=new WeakMap,xB=new WeakSet,GM=function(e){const r=c(this,Ui);let i=r[4],s=r[5];const A=[i,s,i,s];let a=i,o=s,l=i,h=s;const u=e?Math.max:Math.min,d=new Float32Array(4);for(let p=6,m=r.length;p<m;p+=6){const y=r[p+4],w=r[p+5];isNaN(r[p])?(Qt.pointBoundingBox(y,w,A),o>w?(a=y,o=w):o===w&&(a=u(a,y)),h<w?(l=y,h=w):h===w&&(l=u(l,y))):(d.set(ic,0),Qt.bezierBoundingBox(i,s,...r.slice(p,p+6),d),Qt.rectBoundingBox(...d,A),o>d[1]?(a=d[0],o=d[1]):o===d[1]&&(a=u(a,d[0])),h<d[3]?(l=d[2],h=d[3]):h===d[3]&&(l=u(l,d[2]))),i=y,s=w}const f=c(this,zf);f[0]=A[0]-c(this,zl),f[1]=A[1]-c(this,zl),f[2]=A[2]-A[0]+2*c(this,zl),f[3]=A[3]-A[1]+2*c(this,zl),this.firstPoint=[a,o],this.lastPoint=[l,h]};var tw,ew,rw,Uh,Qa,Is,jM,tb,$M,WM,BS;class bS{constructor(t,e=0,r=0,i=!0){T(this,Is);T(this,tw);T(this,ew);T(this,rw);T(this,Uh,[]);T(this,Qa,[]);const s=ic.slice(),A=10**-4;for(const{x:m,y,width:w,height:B}of t){const E=Math.floor((m-e)/A)*A,S=Math.ceil((m+w+e)/A)*A,I=Math.floor((y-e)/A)*A,L=Math.ceil((y+B+e)/A)*A,k=[E,I,L,!0],H=[S,I,L,!1];c(this,Uh).push(k,H),Qt.rectBoundingBox(E,I,S,L,s)}const a=s[2]-s[0]+2*r,o=s[3]-s[1]+2*r,l=s[0]-r,h=s[1]-r;let u=i?-1/0:1/0,d=1/0;const f=c(this,Uh).at(i?-1:-2),p=[f[0],f[2]];for(const m of c(this,Uh)){const[y,w,B,E]=m;!E&&i?w<d?(d=w,u=y):w===d&&(u=Math.max(u,y)):E&&!i&&(w<d?(d=w,u=y):w===d&&(u=Math.min(u,y))),m[0]=(y-l)/a,m[1]=(w-h)/o,m[2]=(B-h)/o}C(this,tw,new Float32Array([l,h,a,o])),C(this,ew,[u,d]),C(this,rw,p)}getOutlines(){c(this,Uh).sort((e,r)=>e[0]-r[0]||e[1]-r[1]||e[2]-r[2]);const t=[];for(const e of c(this,Uh))e[3]?(t.push(..._(this,Is,BS).call(this,e)),_(this,Is,$M).call(this,e)):(_(this,Is,WM).call(this,e),t.push(..._(this,Is,BS).call(this,e)));return _(this,Is,jM).call(this,t)}}tw=new WeakMap,ew=new WeakMap,rw=new WeakMap,Uh=new WeakMap,Qa=new WeakMap,Is=new WeakSet,jM=function(t){const e=[],r=new Set;for(const A of t){const[a,o,l]=A;e.push([a,o,A],[a,l,A])}e.sort((A,a)=>A[1]-a[1]||A[0]-a[0]);for(let A=0,a=e.length;A<a;A+=2){const o=e[A][2],l=e[A+1][2];o.push(l),l.push(o),r.add(o),r.add(l)}const i=[];let s;for(;r.size>0;){const A=r.values().next().value;let[a,o,l,h,u]=A;r.delete(A);let d=a,f=o;for(s=[a,l],i.push(s);;){let p;if(r.has(h))p=h;else if(r.has(u))p=u;else break;r.delete(p),[a,o,l,h,u]=p,d!==a&&(s.push(d,f,a,f===o?o:l),d=a),f=f===o?l:o}s.push(d,f)}return new EV(i,c(this,tw),c(this,ew),c(this,rw))},tb=function(t){const e=c(this,Qa);let r=0,i=e.length-1;for(;r<=i;){const s=r+i>>1,A=e[s][0];if(A===t)return s;A<t?r=s+1:i=s-1}return i+1},$M=function([,t,e]){const r=_(this,Is,tb).call(this,t);c(this,Qa).splice(r,0,[t,e])},WM=function([,t,e]){const r=_(this,Is,tb).call(this,t);for(let i=r;i<c(this,Qa).length;i++){const[s,A]=c(this,Qa)[i];if(s!==t)break;if(s===t&&A===e){c(this,Qa).splice(i,1);return}}for(let i=r-1;i>=0;i--){const[s,A]=c(this,Qa)[i];if(s!==t)break;if(s===t&&A===e){c(this,Qa).splice(i,1);return}}},BS=function(t){const[e,r,i]=t,s=[[e,r,i]],A=_(this,Is,tb).call(this,i);for(let a=0;a<A;a++){const[o,l]=c(this,Qa)[a];for(let h=0,u=s.length;h<u;h++){const[,d,f]=s[h];if(!(l<=d||f<=o)){if(d>=o){if(f>l)s[h][1]=l;else{if(u===1)return[];s.splice(h,1),h--,u--}continue}s[h][2]=o,f>l&&s.push([e,l,f])}}}return s};var iw,Jp;class EV extends zt{constructor(e,r,i,s){super();T(this,iw);T(this,Jp);C(this,Jp,e),C(this,iw,r),this.firstPoint=i,this.lastPoint=s}toSVGPath(){const e=[];for(const r of c(this,Jp)){let[i,s]=r;e.push(`M${i} ${s}`);for(let A=2;A<r.length;A+=2){const a=r[A],o=r[A+1];a===i?(e.push(`V${o}`),s=o):o===s&&(e.push(`H${a}`),i=a)}e.push("Z")}return e.join(" ")}serialize([e,r,i,s],A){const a=[],o=i-e,l=s-r;for(const h of c(this,Jp)){const u=new Array(h.length);for(let d=0;d<h.length;d+=2)u[d]=e+h[d]*o,u[d+1]=s-h[d+1]*l;a.push(u)}return a}get box(){return c(this,iw)}get classNamesForOutlining(){return["highlightOutline"]}}iw=new WeakMap,Jp=new WeakMap;class CS extends Qb{newFreeDrawOutline(t,e,r,i,s,A){return new SV(t,e,r,i,s,A)}}class SV extends VM{newOutliner(t,e,r,i,s,A=0){return new CS(t,e,r,i,s,A)}}var Zp,nw,Xl,Xf,sw,Vs,Aw,aw,qf,BA,CA,Ln,t0,e0,As,r0,ZA,ow,Ke,xS,eb,zM,XM,qM,ES,Uu,ra,bg,YM,rb,ib,JM,ZM,tk,ek,rk;const Ar=class Ar extends Dr{constructor(e){super({...e,name:"highlightEditor"});T(this,Ke);T(this,Zp,null);T(this,nw,0);T(this,Xl);T(this,Xf,null);T(this,sw,null);T(this,Vs,null);T(this,Aw,null);T(this,aw,0);T(this,qf,null);T(this,BA,null);T(this,CA,null);T(this,Ln,!1);T(this,t0,null);T(this,e0,null);T(this,As,null);T(this,r0,"");T(this,ZA);T(this,ow,"");this.color=e.color||Ar._defaultColor,C(this,ZA,e.thickness||Ar._defaultThickness),this.opacity=e.opacity||Ar._defaultOpacity,C(this,Xl,e.boxes||null),C(this,ow,e.methodOfCreation||""),C(this,r0,e.text||""),this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",e.highlightId>-1?(C(this,Ln,!0),_(this,Ke,eb).call(this,e),_(this,Ke,Uu).call(this)):c(this,Xl)&&(C(this,Zp,e.anchorNode),C(this,nw,e.anchorOffset),C(this,Aw,e.focusNode),C(this,aw,e.focusOffset),_(this,Ke,xS).call(this),_(this,Ke,Uu).call(this),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}static get _keyboardManager(){const e=Ar.prototype;return Fe(this,"_keyboardManager",new xw([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:c(this,Ln)?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:c(this,ZA),methodOfCreation:c(this,ow)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}static initialize(e,r){var i;Dr.initialize(e,r),Ar._defaultColor||(Ar._defaultColor=((i=r.highlightColors)==null?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(e,r){switch(e){case Pe.HIGHLIGHT_COLOR:Ar._defaultColor=r;break;case Pe.HIGHLIGHT_THICKNESS:Ar._defaultThickness=r;break}}translateInPage(e,r){}get toolbarPosition(){return c(this,e0)}get commentButtonPosition(){return c(this,t0)}updateParams(e,r){switch(e){case Pe.HIGHLIGHT_COLOR:_(this,Ke,zM).call(this,r);break;case Pe.HIGHLIGHT_THICKNESS:_(this,Ke,XM).call(this,r);break}}static get defaultPropertiesToUpdate(){return[[Pe.HIGHLIGHT_COLOR,Ar._defaultColor],[Pe.HIGHLIGHT_THICKNESS,Ar._defaultThickness]]}get propertiesToUpdate(){return[[Pe.HIGHLIGHT_COLOR,this.color||Ar._defaultColor],[Pe.HIGHLIGHT_THICKNESS,c(this,ZA)||Ar._defaultThickness],[Pe.HIGHLIGHT_FREE,c(this,Ln)]]}onUpdatedColor(){var e,r;(e=this.parent)==null||e.drawLayer.updateProperties(c(this,CA),{root:{fill:this.color,"fill-opacity":this.opacity}}),(r=c(this,sw))==null||r.updateColor(this.color),super.onUpdatedColor()}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",C(this,sw,new Cv({editor:this}))]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(_(this,Ke,ib).call(this))}getBaseTranslation(){return[0,0]}getRect(e,r){return super.getRect(e,r,_(this,Ke,ib).call(this))}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){_(this,Ke,ES).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(_(this,Ke,Uu).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let r=!1;this.parent&&!e?_(this,Ke,ES).call(this):e&&(_(this,Ke,Uu).call(this,e),r=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),this.show(this._isVisible),r&&this.select()}rotate(e){var s,A,a;const{drawLayer:r}=this.parent;let i;c(this,Ln)?(e=(e-this.rotation+360)%360,i=_(s=Ar,ra,bg).call(s,c(this,BA).box,e)):i=_(A=Ar,ra,bg).call(A,[this.x,this.y,this.width,this.height],e),r.updateProperties(c(this,CA),{bbox:i,root:{"data-main-rotation":e}}),r.updateProperties(c(this,As),{bbox:_(a=Ar,ra,bg).call(a,c(this,Vs).box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;const e=super.render();c(this,r0)&&(e.setAttribute("aria-label",c(this,r0)),e.setAttribute("role","mark")),c(this,Ln)?e.classList.add("free"):this.div.addEventListener("keydown",_(this,Ke,YM).bind(this),{signal:this._uiManager._signal});const r=C(this,qf,document.createElement("div"));return e.append(r),r.setAttribute("aria-hidden","true"),r.className="internal",r.style.clipPath=c(this,Xf),this.setDims(),lP(this,c(this,qf),["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(c(this,As),{rootClass:{hovered:!0}})}pointerleave(){var e;this.isSelected||(e=this.parent)==null||e.drawLayer.updateProperties(c(this,As),{rootClass:{hovered:!1}})}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:_(this,Ke,rb).call(this,!0);break;case 1:case 3:_(this,Ke,rb).call(this,!1);break}}select(){var e;super.select(),c(this,As)&&((e=this.parent)==null||e.drawLayer.updateProperties(c(this,As),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var e;super.unselect(),c(this,As)&&((e=this.parent)==null||e.drawLayer.updateProperties(c(this,As),{rootClass:{selected:!1}}),c(this,Ln)||_(this,Ke,rb).call(this,!1))}get _mustFixPosition(){return!c(this,Ln)}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(c(this,CA),{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(c(this,As),{rootClass:{hidden:!e}}))}static startHighlighting(e,r,{target:i,x:s,y:A}){const{x:a,y:o,width:l,height:h}=i.getBoundingClientRect(),u=new AbortController,d=e.combinedSignal(u),f=p=>{u.abort(),_(this,ra,ek).call(this,e,p)};window.addEventListener("blur",f,{signal:d}),window.addEventListener("pointerup",f,{signal:d}),window.addEventListener("pointerdown",Zr,{capture:!0,passive:!1,signal:d}),window.addEventListener("contextmenu",QA,{signal:d}),i.addEventListener("pointermove",_(this,ra,tk).bind(this,e),{signal:d}),this._freeHighlight=new CS({x:s,y:A},[a,o,l,h],e.scale,this._defaultThickness/2,r,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static async deserialize(e,r,i){var y,w,B,E;let s=null;if(e instanceof _M){const{data:{quadPoints:S,rect:I,rotation:L,id:k,color:H,opacity:Q,popupRef:W,richText:U,contentsObj:D,creationDate:j,modificationDate:V},parent:{page:{pageNumber:st}}}=e;s=e={annotationType:Ee.HIGHLIGHT,color:Array.from(H),opacity:Q,quadPoints:S,boxes:null,pageIndex:st-1,rect:I.slice(0),rotation:L,annotationElementId:k,id:k,deleted:!1,popupRef:W,richText:U,comment:(D==null?void 0:D.str)||null,creationDate:j,modificationDate:V}}else if(e instanceof w4){const{data:{inkLists:S,rect:I,rotation:L,id:k,color:H,borderStyle:{rawWidth:Q},popupRef:W,richText:U,contentsObj:D,creationDate:j,modificationDate:V},parent:{page:{pageNumber:st}}}=e;s=e={annotationType:Ee.HIGHLIGHT,color:Array.from(H),thickness:Q,inkLists:S,boxes:null,pageIndex:st-1,rect:I.slice(0),rotation:L,annotationElementId:k,id:k,deleted:!1,popupRef:W,richText:U,comment:(D==null?void 0:D.str)||null,creationDate:j,modificationDate:V}}const{color:A,quadPoints:a,inkLists:o,outlines:l,opacity:h}=e,u=await super.deserialize(e,r,i);u.color=Qt.makeHexColor(...A),u.opacity=h||1,o&&C(u,ZA,e.thickness),u._initialData=s,e.comment&&u.setCommentData(e);const[d,f]=u.pageDimensions,[p,m]=u.pageTranslation;if(a){const S=C(u,Xl,[]);for(let I=0;I<a.length;I+=8)S.push({x:(a[I]-p)/d,y:1-(a[I+1]-m)/f,width:(a[I+2]-a[I])/d,height:(a[I+1]-a[I+5])/f});_(y=u,Ke,xS).call(y),_(w=u,Ke,Uu).call(w),u.rotate(u.rotation)}else if(o||l){C(u,Ln,!0);const S=(o||l.points)[0],I={x:S[0]-p,y:f-(S[1]-m)},L=new CS(I,[0,0,d,f],1,c(u,ZA)/2,!0,.001);for(let Q=0,W=S.length;Q<W;Q+=2)I.x=S[Q]-p,I.y=f-(S[Q+1]-m),L.add(I);const{id:k,clipPathId:H}=r.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:u.color,"fill-opacity":u._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:L.toSVGPath()}},!0,!0);_(B=u,Ke,eb).call(B,{highlightOutlines:L.getOutlines(),highlightId:k,clipPathId:H}),_(E=u,Ke,Uu).call(E),u.rotate(u.parentRotation)}return u}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();const r=Dr._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),i=super.serialize(e);return Object.assign(i,{color:r,opacity:this.opacity,thickness:c(this,ZA),quadPoints:_(this,Ke,JM).call(this),outlines:_(this,Ke,ZM).call(this,i.rect)}),this.addComment(i),this.annotationElementId&&!_(this,Ke,rk).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(e){return this.deleted?(e.hide(),null):(e.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};Zp=new WeakMap,nw=new WeakMap,Xl=new WeakMap,Xf=new WeakMap,sw=new WeakMap,Vs=new WeakMap,Aw=new WeakMap,aw=new WeakMap,qf=new WeakMap,BA=new WeakMap,CA=new WeakMap,Ln=new WeakMap,t0=new WeakMap,e0=new WeakMap,As=new WeakMap,r0=new WeakMap,ZA=new WeakMap,ow=new WeakMap,Ke=new WeakSet,xS=function(){const e=new bS(c(this,Xl),.001);C(this,BA,e.getOutlines()),[this.x,this.y,this.width,this.height]=c(this,BA).box;const r=new bS(c(this,Xl),.0025,.001,this._uiManager.direction==="ltr");C(this,Vs,r.getOutlines());const{firstPoint:i}=c(this,BA);C(this,t0,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height]);const{lastPoint:s}=c(this,Vs);C(this,e0,[(s[0]-this.x)/this.width,(s[1]-this.y)/this.height])},eb=function({highlightOutlines:e,highlightId:r,clipPathId:i}){var d,f;if(C(this,BA,e),C(this,Vs,e.getNewOutline(c(this,ZA)/2+1.5,.0025)),r>=0)C(this,CA,r),C(this,Xf,i),this.parent.drawLayer.finalizeDraw(r,{bbox:e.box,path:{d:e.toSVGPath()}}),C(this,As,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:c(this,Vs).box,path:{d:c(this,Vs).toSVGPath()}},!0));else if(this.parent){const p=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(c(this,CA),{bbox:_(d=Ar,ra,bg).call(d,c(this,BA).box,(p-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(c(this,As),{bbox:_(f=Ar,ra,bg).call(f,c(this,Vs).box,p),path:{d:c(this,Vs).toSVGPath()}})}const[A,a,o,l]=e.box;switch(this.rotation){case 0:this.x=A,this.y=a,this.width=o,this.height=l;break;case 90:{const[p,m]=this.parentDimensions;this.x=a,this.y=1-A,this.width=o*m/p,this.height=l*p/m;break}case 180:this.x=1-A,this.y=1-a,this.width=o,this.height=l;break;case 270:{const[p,m]=this.parentDimensions;this.x=1-a,this.y=A,this.width=o*m/p,this.height=l*p/m;break}}const{firstPoint:h}=e;C(this,t0,[(h[0]-A)/o,(h[1]-a)/l]);const{lastPoint:u}=c(this,Vs);C(this,e0,[(u[0]-A)/o,(u[1]-a)/l])},zM=function(e){const r=(A,a)=>{this.color=A,this.opacity=a,this.onUpdatedColor()},i=this.color,s=this.opacity;this.addCommands({cmd:r.bind(this,e,Ar._defaultOpacity),undo:r.bind(this,i,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Pe.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(e)},!0)},XM=function(e){const r=c(this,ZA),i=s=>{C(this,ZA,s),_(this,Ke,qM).call(this,s)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Pe.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)},qM=function(e){c(this,Ln)&&(_(this,Ke,eb).call(this,{highlightOutlines:c(this,BA).getNewOutline(e/2)}),this.fixAndSetPosition(),this.setDims())},ES=function(){c(this,CA)===null||!this.parent||(this.parent.drawLayer.remove(c(this,CA)),C(this,CA,null),this.parent.drawLayer.remove(c(this,As)),C(this,As,null))},Uu=function(e=this.parent){c(this,CA)===null&&({id:Hi(this,CA)._,clipPathId:Hi(this,Xf)._}=e.drawLayer.draw({bbox:c(this,BA).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:c(this,Ln)},path:{d:c(this,BA).toSVGPath()}},!1,!0),C(this,As,e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:c(this,Ln)},bbox:c(this,Vs).box,path:{d:c(this,Vs).toSVGPath()}},c(this,Ln))),c(this,qf)&&(c(this,qf).style.clipPath=c(this,Xf)))},ra=new WeakSet,bg=function([e,r,i,s],A){switch(A){case 90:return[1-r-s,e,s,i];case 180:return[1-e-i,1-r-s,i,s];case 270:return[r,1-e-i,s,i]}return[e,r,i,s]},YM=function(e){Ar._keyboardManager.exec(this,e)},rb=function(e){if(!c(this,Zp))return;const r=window.getSelection();e?r.setPosition(c(this,Zp),c(this,nw)):r.setPosition(c(this,Aw),c(this,aw))},ib=function(){return c(this,Ln)?this.rotation:0},JM=function(){if(c(this,Ln))return null;const[e,r]=this.pageDimensions,[i,s]=this.pageTranslation,A=c(this,Xl),a=new Float32Array(A.length*8);let o=0;for(const{x:l,y:h,width:u,height:d}of A){const f=l*e+i,p=(1-h)*r+s;a[o]=a[o+4]=f,a[o+1]=a[o+3]=p,a[o+2]=a[o+6]=f+u*e,a[o+5]=a[o+7]=p-d*r,o+=8}return a},ZM=function(e){return c(this,BA).serialize(e,_(this,Ke,ib).call(this))},tk=function(e,r){this._freeHighlight.add(r)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},ek=function(e,r){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(r,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},rk=function(e){const{color:r}=this._initialData;return this.hasEditedComment||e.color.some((i,s)=>i!==r[s])},T(Ar,ra),ct(Ar,"_defaultColor",null),ct(Ar,"_defaultOpacity",1),ct(Ar,"_defaultThickness",12),ct(Ar,"_type","highlight"),ct(Ar,"_editorType",Ee.HIGHLIGHT),ct(Ar,"_freeHighlightId",-1),ct(Ar,"_freeHighlight",null),ct(Ar,"_freeHighlightClipId","");let Nb=Ar;var Yf;class ik{constructor(){T(this,Yf,Object.create(null))}updateProperty(t,e){this[t]=e,this.updateSVGProperty(t,e)}updateProperties(t){if(t)for(const[e,r]of Object.entries(t))e.startsWith("_")||this.updateProperty(e,r)}updateSVGProperty(t,e){c(this,Yf)[t]=e}toSVGProperties(){const t=c(this,Yf);return C(this,Yf,Object.create(null)),{root:t}}reset(){C(this,Yf,Object.create(null))}updateAll(t=this){this.updateProperties(t)}clone(){hr("Not implemented")}}Yf=new WeakMap;var Bs,i0,dn,Jf,Zf,rr,SS,FS,TS,Mm,nk,nb,km,Bg;const ze=class ze extends Dr{constructor(e){super(e);T(this,rr);T(this,Bs,null);T(this,i0);ct(this,"_colorPicker",null);ct(this,"_drawId",null);C(this,i0,e.mustBeCommitted||!1),this._addOutlines(e)}onUpdatedColor(){var e;(e=this._colorPicker)==null||e.update(this.color),super.onUpdatedColor()}onUpdatedOpacity(){var e,r;(r=(e=this._colorPicker)==null?void 0:e.updateOpacity)==null||r.call(e,this.opacity)}_addOutlines(e){e.drawOutlines&&(_(this,rr,SS).call(this,e),_(this,rr,Mm).call(this))}static _mergeSVGProperties(e,r){const i=new Set(Object.keys(e));for(const[s,A]of Object.entries(r))i.has(s)?Object.assign(e[s],A):e[s]=A;return e}static getDefaultDrawingOptions(e){hr("Not implemented")}static get typesMap(){hr("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,r){const i=this.typesMap.get(e);i&&this._defaultDrawingOptions.updateProperty(i,r),this._currentParent&&(c(ze,dn).updateProperty(i,r),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,r){const i=this.constructor.typesMap.get(e);i&&this._updateProperty(e,i,r)}static get defaultPropertiesToUpdate(){const e=[],r=this._defaultDrawingOptions;for(const[i,s]of this.typesMap)e.push([i,r[s]]);return e}get propertiesToUpdate(){const e=[],{_drawingOptions:r}=this;for(const[i,s]of this.constructor.typesMap)e.push([i,r[s]]);return e}_updateProperty(e,r,i){const s=this._drawingOptions,A=s[r],a=o=>{var h;s.updateProperty(r,o);const l=c(this,Bs).updateProperty(r,o);l&&_(this,rr,km).call(this,l),(h=this.parent)==null||h.drawLayer.updateProperties(this._drawId,s.toSVGProperties()),e===this.colorType?this.onUpdatedColor():e===this.opacityType&&this.onUpdatedOpacity()};this.addCommands({cmd:a.bind(this,i),undo:a.bind(this,A),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_updateColorAndOpacity(e,r){const i=this.constructor.typesMap.get(this.colorType),s=this.constructor.typesMap.get(this.opacityType),A=this._drawingOptions,a=A[i],o=A[s],l=(h,u)=>{var d;A.updateProperty(i,h),A.updateProperty(s,u),c(this,Bs).updateProperty(i,h),c(this,Bs).updateProperty(s,u),(d=this.parent)==null||d.drawLayer.updateProperties(this._drawId,A.toSVGProperties()),this.onUpdatedColor(),this.onUpdatedOpacity()};this.addCommands({cmd:l.bind(this,e,r),undo:l.bind(this,a,o),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Pe.INK_COLOR_AND_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,ze._mergeSVGProperties(c(this,Bs).getPathResizingSVGProperties(_(this,rr,nb).call(this)),{bbox:_(this,rr,Bg).call(this)}))}_onResized(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,ze._mergeSVGProperties(c(this,Bs).getPathResizedSVGProperties(_(this,rr,nb).call(this)),{bbox:_(this,rr,Bg).call(this)}))}_onTranslating(e,r){var i;(i=this.parent)==null||i.drawLayer.updateProperties(this._drawId,{bbox:_(this,rr,Bg).call(this)})}_onTranslated(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,ze._mergeSVGProperties(c(this,Bs).getPathTranslatedSVGProperties(_(this,rr,nb).call(this),this.parentDimensions),{bbox:_(this,rr,Bg).call(this)}))}_onStartDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var e;(e=this.parent)==null||e.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,c(this,i0)&&(C(this,i0,!1),this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){_(this,rr,TS).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(_(this,rr,Mm).call(this),_(this,rr,km).call(this,c(this,Bs).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){var i;let r=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),_(this,rr,TS).call(this)):e&&(this._uiManager.addShouldRescale(this),_(this,rr,Mm).call(this,e),r=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(e),r&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,ze._mergeSVGProperties({bbox:_(this,rr,Bg).call(this)},c(this,Bs).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&_(this,rr,km).call(this,c(this,Bs).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let e,r;this._isCopy&&(e=this.x,r=this.y);const i=super.render();i.classList.add("draw");const s=document.createElement("div");return i.append(s),s.setAttribute("aria-hidden","true"),s.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(e,r),i}static createDrawerInstance(e,r,i,s,A){hr("Not implemented")}static startDrawing(e,r,i,s){var y;const{target:A,offsetX:a,offsetY:o,pointerId:l,pointerType:h}=s;if(rs.isInitializedAndDifferentPointerType(h))return;const{viewport:{rotation:u}}=e,{width:d,height:f}=A.getBoundingClientRect(),p=C(ze,Jf,new AbortController),m=e.combinedSignal(p);if(rs.setPointer(h,l),window.addEventListener("pointerup",w=>{rs.isSamePointerIdOrRemove(w.pointerId)&&this._endDraw(w)},{signal:m}),window.addEventListener("pointercancel",w=>{rs.isSamePointerIdOrRemove(w.pointerId)&&this._currentParent.endDrawingSession()},{signal:m}),window.addEventListener("pointerdown",w=>{rs.isSamePointerType(w.pointerType)&&(rs.initializeAndAddPointerId(w.pointerId),c(ze,dn).isCancellable()&&(c(ze,dn).removeLastElement(),c(ze,dn).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:m}),window.addEventListener("contextmenu",QA,{signal:m}),A.addEventListener("pointermove",this._drawMove.bind(this),{signal:m}),A.addEventListener("touchmove",w=>{rs.isSameTimeStamp(w.timeStamp)&&Zr(w)},{signal:m}),e.toggleDrawing(),(y=r._editorUndoBar)==null||y.hide(),c(ze,dn)){e.drawLayer.updateProperties(this._currentDrawId,c(ze,dn).startNew(a,o,d,f,u));return}r.updateUIForDefaultProperties(this),C(ze,dn,this.createDrawerInstance(a,o,d,f,u)),C(ze,Zf,this.getDefaultDrawingOptions()),this._currentParent=e,{id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties(c(ze,Zf).toSVGProperties(),c(ze,dn).defaultSVGProperties),!0,!1)}static _drawMove(e){if(rs.isSameTimeStamp(e.timeStamp),!c(ze,dn))return;const{offsetX:r,offsetY:i,pointerId:s}=e;if(rs.isSamePointerId(s)){if(rs.isUsingMultiplePointers()){this._endDraw(e);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,c(ze,dn).add(r,i)),rs.setTimeStamp(e.timeStamp),Zr(e)}}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,C(ze,dn,null),C(ze,Zf,null),rs.clearTimeStamp()),c(ze,Jf)&&(c(ze,Jf).abort(),C(ze,Jf,null),rs.clearPointerIds())}static _endDraw(e){const r=this._currentParent;if(r){if(r.toggleDrawing(!0),this._cleanup(!1),(e==null?void 0:e.target)===r.div&&r.drawLayer.updateProperties(this._currentDrawId,c(ze,dn).end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){const i=c(ze,dn),s=this._currentDrawId,A=i.getLastElement();r.addCommands({cmd:()=>{r.drawLayer.updateProperties(s,i.setLastElement(A))},undo:()=>{r.drawLayer.updateProperties(s,i.removeLastElement())},mustExec:!1,type:Pe.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(e){const r=this._currentParent;if(!r)return null;if(r.toggleDrawing(!0),r.cleanUndoStack(Pe.DRAW_STEP),!c(ze,dn).isEmpty()){const{pageDimensions:[i,s],scale:A}=r,a=r.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:c(ze,dn).getOutlines(i*A,s*A,A,this._INNER_MARGIN),drawingOptions:c(ze,Zf),mustBeCommitted:!e});return this._cleanup(!0),a}return r.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,r,i,s,A,a){hr("Not implemented")}static async deserialize(e,r,i){var u,d;const{rawDims:{pageWidth:s,pageHeight:A,pageX:a,pageY:o}}=r.viewport,l=this.deserializeDraw(a,o,s,A,this._INNER_MARGIN,e),h=await super.deserialize(e,r,i);return h.createDrawingOptions(e),_(u=h,rr,SS).call(u,{drawOutlines:l}),_(d=h,rr,Mm).call(d),h.onScaleChanging(),h.rotate(),h}serializeDraw(e){const[r,i]=this.pageTranslation,[s,A]=this.pageDimensions;return c(this,Bs).serialize([r,i,s,A],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};Bs=new WeakMap,i0=new WeakMap,dn=new WeakMap,Jf=new WeakMap,Zf=new WeakMap,rr=new WeakSet,SS=function({drawOutlines:e,drawId:r,drawingOptions:i}){C(this,Bs,e),this._drawingOptions||(this._drawingOptions=i),this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),r>=0?(this._drawId=r,this.parent.drawLayer.finalizeDraw(r,e.defaultProperties)):this._drawId=_(this,rr,FS).call(this,e,this.parent),_(this,rr,km).call(this,e.box)},FS=function(e,r){const{id:i}=r.drawLayer.draw(ze._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return i},TS=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},Mm=function(e=this.parent){if(!(this._drawId!==null&&this.parent===e)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,e.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=_(this,rr,FS).call(this,c(this,Bs),e)}},nk=function([e,r,i,s]){const{parentDimensions:[A,a],rotation:o}=this;switch(o){case 90:return[r,1-e,i*(a/A),s*(A/a)];case 180:return[1-e,1-r,i,s];case 270:return[1-r,e,i*(a/A),s*(A/a)];default:return[e,r,i,s]}},nb=function(){const{x:e,y:r,width:i,height:s,parentDimensions:[A,a],rotation:o}=this;switch(o){case 90:return[1-r,e,i*(A/a),s*(a/A)];case 180:return[1-e,1-r,i,s];case 270:return[r,1-e,i*(A/a),s*(a/A)];default:return[e,r,i,s]}},km=function(e){[this.x,this.y,this.width,this.height]=_(this,rr,nk).call(this,e),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()},Bg=function(){const{x:e,y:r,width:i,height:s,rotation:A,parentRotation:a,parentDimensions:[o,l]}=this;switch((A*4+a)/90){case 1:return[1-r-s,e,s,i];case 2:return[1-e-i,1-r-s,i,s];case 3:return[r,1-e-i,s,i];case 4:return[e,r-i*(o/l),s*(l/o),i*(o/l)];case 5:return[1-r,e,i*(o/l),s*(l/o)];case 6:return[1-e-s*(l/o),1-r,s*(l/o),i*(o/l)];case 7:return[r-i*(o/l),1-e-s*(l/o),i*(o/l),s*(l/o)];case 8:return[e-i,r-s,i,s];case 9:return[1-r,e-i,s,i];case 10:return[1-e,1-r,i,s];case 11:return[r-s,1-e,s,i];case 12:return[e-s*(l/o),r,s*(l/o),i*(o/l)];case 13:return[1-r-i*(o/l),e-s*(l/o),i*(o/l),s*(l/o)];case 14:return[1-e,1-r-i*(o/l),s*(l/o),i*(o/l)];case 15:return[r,1-e,i*(o/l),s*(l/o)];default:return[e,r,i,s]}},ct(ze,"_currentDrawId",-1),ct(ze,"_currentParent",null),T(ze,dn,null),T(ze,Jf,null),T(ze,Zf,null),ct(ze,"_INNER_MARGIN",3);let Pb=ze;var _o,gn,pn,td,n0,Cs,Qn,ta,ed,rd,id,s0,sb;class FV{constructor(t,e,r,i,s,A){T(this,s0);T(this,_o,new Float64Array(6));T(this,gn);T(this,pn);T(this,td);T(this,n0);T(this,Cs);T(this,Qn,"");T(this,ta,0);T(this,ed,new Ew);T(this,rd);T(this,id);C(this,rd,r),C(this,id,i),C(this,td,s),C(this,n0,A),[t,e]=_(this,s0,sb).call(this,t,e);const a=C(this,gn,[NaN,NaN,NaN,NaN,t,e]);C(this,Cs,[t,e]),C(this,pn,[{line:a,points:c(this,Cs)}]),c(this,_o).set(a,0)}updateProperty(t,e){t==="stroke-width"&&C(this,n0,e)}isEmpty(){return!c(this,pn)||c(this,pn).length===0}isCancellable(){return c(this,Cs).length<=10}add(t,e){[t,e]=_(this,s0,sb).call(this,t,e);const[r,i,s,A]=c(this,_o).subarray(2,6),a=t-s,o=e-A;return Math.hypot(c(this,rd)*a,c(this,id)*o)<=2?null:(c(this,Cs).push(t,e),isNaN(r)?(c(this,_o).set([s,A,t,e],2),c(this,gn).push(NaN,NaN,NaN,NaN,t,e),{path:{d:this.toSVGPath()}}):(isNaN(c(this,_o)[0])&&c(this,gn).splice(6,6),c(this,_o).set([r,i,s,A,t,e],0),c(this,gn).push(...zt.createBezierPoints(r,i,s,A,t,e)),{path:{d:this.toSVGPath()}}))}end(t,e){const r=this.add(t,e);return r||(c(this,Cs).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,e,r,i,s){C(this,rd,r),C(this,id,i),C(this,td,s),[t,e]=_(this,s0,sb).call(this,t,e);const A=C(this,gn,[NaN,NaN,NaN,NaN,t,e]);C(this,Cs,[t,e]);const a=c(this,pn).at(-1);return a&&(a.line=new Float32Array(a.line),a.points=new Float32Array(a.points)),c(this,pn).push({line:A,points:c(this,Cs)}),c(this,_o).set(A,0),C(this,ta,0),this.toSVGPath(),null}getLastElement(){return c(this,pn).at(-1)}setLastElement(t){return c(this,pn)?(c(this,pn).push(t),C(this,gn,t.line),C(this,Cs,t.points),C(this,ta,0),{path:{d:this.toSVGPath()}}):c(this,ed).setLastElement(t)}removeLastElement(){if(!c(this,pn))return c(this,ed).removeLastElement();c(this,pn).pop(),C(this,Qn,"");for(let t=0,e=c(this,pn).length;t<e;t++){const{line:r,points:i}=c(this,pn)[t];C(this,gn,r),C(this,Cs,i),C(this,ta,0),this.toSVGPath()}return{path:{d:c(this,Qn)}}}toSVGPath(){const t=zt.svgRound(c(this,gn)[4]),e=zt.svgRound(c(this,gn)[5]);if(c(this,Cs).length===2)return C(this,Qn,`${c(this,Qn)} M ${t} ${e} Z`),c(this,Qn);if(c(this,Cs).length<=6){const i=c(this,Qn).lastIndexOf("M");C(this,Qn,`${c(this,Qn).slice(0,i)} M ${t} ${e}`),C(this,ta,6)}if(c(this,Cs).length===4){const i=zt.svgRound(c(this,gn)[10]),s=zt.svgRound(c(this,gn)[11]);return C(this,Qn,`${c(this,Qn)} L ${i} ${s}`),C(this,ta,12),c(this,Qn)}const r=[];c(this,ta)===0&&(r.push(`M ${t} ${e}`),C(this,ta,6));for(let i=c(this,ta),s=c(this,gn).length;i<s;i+=6){const[A,a,o,l,h,u]=c(this,gn).slice(i,i+6).map(zt.svgRound);r.push(`C${A} ${a} ${o} ${l} ${h} ${u}`)}return C(this,Qn,c(this,Qn)+r.join(" ")),C(this,ta,c(this,gn).length),c(this,Qn)}getOutlines(t,e,r,i){const s=c(this,pn).at(-1);return s.line=new Float32Array(s.line),s.points=new Float32Array(s.points),c(this,ed).build(c(this,pn),t,e,r,c(this,td),c(this,n0),i),C(this,_o,null),C(this,gn,null),C(this,pn,null),C(this,Qn,null),c(this,ed)}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}_o=new WeakMap,gn=new WeakMap,pn=new WeakMap,td=new WeakMap,n0=new WeakMap,Cs=new WeakMap,Qn=new WeakMap,ta=new WeakMap,ed=new WeakMap,rd=new WeakMap,id=new WeakMap,s0=new WeakSet,sb=function(t,e){return zt._normalizePoint(t,e,c(this,rd),c(this,id),c(this,td))};var xs,lw,cw,xA,Uo,Lo,A0,a0,nd,Mn,gl,sk,Ak,ak;class Ew extends zt{constructor(){super(...arguments);T(this,Mn);T(this,xs);T(this,lw,0);T(this,cw);T(this,xA);T(this,Uo);T(this,Lo);T(this,A0);T(this,a0);T(this,nd)}build(e,r,i,s,A,a,o){C(this,Uo,r),C(this,Lo,i),C(this,A0,s),C(this,a0,A),C(this,nd,a),C(this,cw,o??0),C(this,xA,e),_(this,Mn,Ak).call(this)}get thickness(){return c(this,nd)}setLastElement(e){return c(this,xA).push(e),{path:{d:this.toSVGPath()}}}removeLastElement(){return c(this,xA).pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const e=[];for(const{line:r}of c(this,xA)){if(e.push(`M${zt.svgRound(r[4])} ${zt.svgRound(r[5])}`),r.length===6){e.push("Z");continue}if(r.length===12&&isNaN(r[6])){e.push(`L${zt.svgRound(r[10])} ${zt.svgRound(r[11])}`);continue}for(let i=6,s=r.length;i<s;i+=6){const[A,a,o,l,h,u]=r.subarray(i,i+6).map(zt.svgRound);e.push(`C${A} ${a} ${o} ${l} ${h} ${u}`)}}return e.join("")}serialize([e,r,i,s],A){const a=[],o=[],[l,h,u,d]=_(this,Mn,sk).call(this);let f,p,m,y,w,B,E,S,I;switch(c(this,a0)){case 0:I=zt._rescale,f=e,p=r+s,m=i,y=-s,w=e+l*i,B=r+(1-h-d)*s,E=e+(l+u)*i,S=r+(1-h)*s;break;case 90:I=zt._rescaleAndSwap,f=e,p=r,m=i,y=s,w=e+h*i,B=r+l*s,E=e+(h+d)*i,S=r+(l+u)*s;break;case 180:I=zt._rescale,f=e+i,p=r,m=-i,y=s,w=e+(1-l-u)*i,B=r+h*s,E=e+(1-l)*i,S=r+(h+d)*s;break;case 270:I=zt._rescaleAndSwap,f=e+i,p=r+s,m=-i,y=-s,w=e+(1-h-d)*i,B=r+(1-l-u)*s,E=e+(1-h)*i,S=r+(1-l)*s;break}for(const{line:L,points:k}of c(this,xA))a.push(I(L,f,p,m,y,A?new Array(L.length):null)),o.push(I(k,f,p,m,y,A?new Array(k.length):null));return{lines:a,points:o,rect:[w,B,E,S]}}static deserialize(e,r,i,s,A,{paths:{lines:a,points:o},rotation:l,thickness:h}){const u=[];let d,f,p,m,y;switch(l){case 0:y=zt._rescale,d=-e/i,f=r/s+1,p=1/i,m=-1/s;break;case 90:y=zt._rescaleAndSwap,d=-r/s,f=-e/i,p=1/s,m=1/i;break;case 180:y=zt._rescale,d=e/i+1,f=-r/s,p=-1/i,m=1/s;break;case 270:y=zt._rescaleAndSwap,d=r/s+1,f=e/i+1,p=-1/s,m=-1/i;break}if(!a){a=[];for(const B of o){const E=B.length;if(E===2){a.push(new Float32Array([NaN,NaN,NaN,NaN,B[0],B[1]]));continue}if(E===4){a.push(new Float32Array([NaN,NaN,NaN,NaN,B[0],B[1],NaN,NaN,NaN,NaN,B[2],B[3]]));continue}const S=new Float32Array(3*(E-2));a.push(S);let[I,L,k,H]=B.subarray(0,4);S.set([NaN,NaN,NaN,NaN,I,L],0);for(let Q=4;Q<E;Q+=2){const W=B[Q],U=B[Q+1];S.set(zt.createBezierPoints(I,L,k,H,W,U),(Q-2)*3),[I,L,k,H]=[k,H,W,U]}}}for(let B=0,E=a.length;B<E;B++)u.push({line:y(a[B].map(S=>S??NaN),d,f,p,m),points:y(o[B].map(S=>S??NaN),d,f,p,m)});const w=new this.prototype.constructor;return w.build(u,i,s,1,l,h,A),w}get box(){return c(this,xs)}updateProperty(e,r){return e==="stroke-width"?_(this,Mn,ak).call(this,r):null}updateParentDimensions([e,r],i){const[s,A]=_(this,Mn,gl).call(this);C(this,Uo,e),C(this,Lo,r),C(this,A0,i);const[a,o]=_(this,Mn,gl).call(this),l=a-s,h=o-A,u=c(this,xs);return u[0]-=l,u[1]-=h,u[2]+=2*l,u[3]+=2*h,u}updateRotation(e){return C(this,lw,e),{path:{transform:this.rotationTransform}}}get viewBox(){return c(this,xs).map(zt.svgRound).join(" ")}get defaultProperties(){const[e,r]=c(this,xs);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${zt.svgRound(e)} ${zt.svgRound(r)}`}}}get rotationTransform(){const[,,e,r]=c(this,xs);let i=0,s=0,A=0,a=0,o=0,l=0;switch(c(this,lw)){case 90:s=r/e,A=-e/r,o=e;break;case 180:i=-1,a=-1,o=e,l=r;break;case 270:s=-r/e,A=e/r,l=r;break;default:return""}return`matrix(${i} ${s} ${A} ${a} ${zt.svgRound(o)} ${zt.svgRound(l)})`}getPathResizingSVGProperties([e,r,i,s]){const[A,a]=_(this,Mn,gl).call(this),[o,l,h,u]=c(this,xs);if(Math.abs(h-A)<=zt.PRECISION||Math.abs(u-a)<=zt.PRECISION){const y=e+i/2-(o+h/2),w=r+s/2-(l+u/2);return{path:{"transform-origin":`${zt.svgRound(e)} ${zt.svgRound(r)}`,transform:`${this.rotationTransform} translate(${y} ${w})`}}}const d=(i-2*A)/(h-2*A),f=(s-2*a)/(u-2*a),p=h/i,m=u/s;return{path:{"transform-origin":`${zt.svgRound(o)} ${zt.svgRound(l)}`,transform:`${this.rotationTransform} scale(${p} ${m}) translate(${zt.svgRound(A)} ${zt.svgRound(a)}) scale(${d} ${f}) translate(${zt.svgRound(-A)} ${zt.svgRound(-a)})`}}}getPathResizedSVGProperties([e,r,i,s]){const[A,a]=_(this,Mn,gl).call(this),o=c(this,xs),[l,h,u,d]=o;if(o[0]=e,o[1]=r,o[2]=i,o[3]=s,Math.abs(u-A)<=zt.PRECISION||Math.abs(d-a)<=zt.PRECISION){const w=e+i/2-(l+u/2),B=r+s/2-(h+d/2);for(const{line:E,points:S}of c(this,xA))zt._translate(E,w,B,E),zt._translate(S,w,B,S);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${zt.svgRound(e)} ${zt.svgRound(r)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const f=(i-2*A)/(u-2*A),p=(s-2*a)/(d-2*a),m=-f*(l+A)+e+A,y=-p*(h+a)+r+a;if(f!==1||p!==1||m!==0||y!==0)for(const{line:w,points:B}of c(this,xA))zt._rescale(w,m,y,f,p,w),zt._rescale(B,m,y,f,p,B);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${zt.svgRound(e)} ${zt.svgRound(r)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,r],i){const[s,A]=i,a=c(this,xs),o=e-a[0],l=r-a[1];if(c(this,Uo)===s&&c(this,Lo)===A)for(const{line:h,points:u}of c(this,xA))zt._translate(h,o,l,h),zt._translate(u,o,l,u);else{const h=c(this,Uo)/s,u=c(this,Lo)/A;C(this,Uo,s),C(this,Lo,A);for(const{line:d,points:f}of c(this,xA))zt._rescale(d,o,l,h,u,d),zt._rescale(f,o,l,h,u,f);a[2]*=h,a[3]*=u}return a[0]=e,a[1]=r,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${zt.svgRound(e)} ${zt.svgRound(r)}`}}}get defaultSVGProperties(){const e=c(this,xs);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${zt.svgRound(e[0])} ${zt.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}}xs=new WeakMap,lw=new WeakMap,cw=new WeakMap,xA=new WeakMap,Uo=new WeakMap,Lo=new WeakMap,A0=new WeakMap,a0=new WeakMap,nd=new WeakMap,Mn=new WeakSet,gl=function(e=c(this,nd)){const r=c(this,cw)+e/2*c(this,A0);return c(this,a0)%180===0?[r/c(this,Uo),r/c(this,Lo)]:[r/c(this,Lo),r/c(this,Uo)]},sk=function(){const[e,r,i,s]=c(this,xs),[A,a]=_(this,Mn,gl).call(this,0);return[e+A,r+a,i-2*A,s-2*a]},Ak=function(){const e=C(this,xs,Ou.slice());for(const{line:s}of c(this,xA)){if(s.length<=12){for(let o=4,l=s.length;o<l;o+=6)Qt.pointBoundingBox(s[o],s[o+1],e);continue}let A=s[4],a=s[5];for(let o=6,l=s.length;o<l;o+=6){const[h,u,d,f,p,m]=s.subarray(o,o+6);Qt.bezierBoundingBox(A,a,h,u,d,f,p,m,e),A=p,a=m}}const[r,i]=_(this,Mn,gl).call(this);e[0]=Wr(e[0]-r,0,1),e[1]=Wr(e[1]-i,0,1),e[2]=Wr(e[2]+r,0,1),e[3]=Wr(e[3]+i,0,1),e[2]-=e[0],e[3]-=e[1]},ak=function(e){const[r,i]=_(this,Mn,gl).call(this);C(this,nd,e);const[s,A]=_(this,Mn,gl).call(this),[a,o]=[s-r,A-i],l=c(this,xs);return l[0]-=a,l[1]-=o,l[2]+=2*a,l[3]+=2*o,l};class qB extends ik{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:Dr._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,e){t==="stroke-width"&&(e??(e=this["stroke-width"]),e*=this._viewParameters.realScale),super.updateSVGProperty(t,e)}clone(){const t=new qB(this._viewParameters);return t.updateAll(this),t}}var EB,ok;const Ng=class Ng extends Pb{constructor(e){super({...e,name:"inkEditor"});T(this,EB);this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(e,r){Dr.initialize(e,r),this._defaultDrawingOptions=new qB(r.viewParameters)}static getDefaultDrawingOptions(e){const r=this._defaultDrawingOptions.clone();return r.updateProperties(e),r}static get supportMultipleDrawings(){return!0}static get typesMap(){return Fe(this,"typesMap",new Map([[Pe.INK_THICKNESS,"stroke-width"],[Pe.INK_COLOR,"stroke"],[Pe.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(e,r,i,s,A){return new FV(e,r,i,s,A,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(e,r,i,s,A,a){return Ew.deserialize(e,r,i,s,A,a)}static async deserialize(e,r,i){let s=null;if(e instanceof w4){const{data:{inkLists:a,rect:o,rotation:l,id:h,color:u,opacity:d,borderStyle:{rawWidth:f},popupRef:p,richText:m,contentsObj:y,creationDate:w,modificationDate:B},parent:{page:{pageNumber:E}}}=e;s=e={annotationType:Ee.INK,color:Array.from(u),thickness:f,opacity:d,paths:{points:a},boxes:null,pageIndex:E-1,rect:o.slice(0),rotation:l,annotationElementId:h,id:h,deleted:!1,popupRef:p,richText:m,comment:(y==null?void 0:y.str)||null,creationDate:w,modificationDate:B}}const A=await super.deserialize(e,r,i);return A._initialData=s,e.comment&&A.setCommentData(e),A}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new Ub(this)),[["colorPicker",this._colorPicker]]}get colorType(){return Pe.INK_COLOR}get colorAndOpacityType(){return Pe.INK_COLOR_AND_OPACITY}get opacityType(){return Pe.INK_OPACITY}updateParams(e,r){if(e===Pe.INK_COLOR_AND_OPACITY){this._updateColorAndOpacity(r.color,r.opacity);return}super.updateParams(e,r)}static updateDefaultParams(e,r){if(e===Pe.INK_COLOR_AND_OPACITY){super.updateDefaultParams(Pe.INK_COLOR,r.color),super.updateDefaultParams(Pe.INK_OPACITY,r.opacity);return}super.updateDefaultParams(e,r)}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:e,_drawingOptions:r,parent:i}=this;r.updateSVGProperty("stroke-width"),i.drawLayer.updateProperties(e,r.toSVGProperties())}static onScaleChangingWhenDrawing(){const e=this._currentParent;e&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),e.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:e,thickness:r,opacity:i}){this._drawingOptions=Ng.getDefaultDrawingOptions({stroke:Qt.makeHexColor(...e),"stroke-width":r,"stroke-opacity":i})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:r,points:i}=this.serializeDraw(e),{_drawingOptions:{stroke:s,"stroke-opacity":A,"stroke-width":a}}=this,o=Object.assign(super.serialize(e),{color:Dr._colorManager.convert(s),opacity:A,thickness:a,paths:{lines:r,points:i}});return this.addComment(o),e?(o.isCopy=!0,o):this.annotationElementId&&!_(this,EB,ok).call(this,o)?null:(o.id=this.annotationElementId,o)}renderAnnotationElement(e){if(this.deleted)return e.hide(),null;const{points:r,rect:i}=this.serializeDraw(!1);return e.updateEdited({rect:i,thickness:this._drawingOptions["stroke-width"],points:r,popup:this.comment}),null}};EB=new WeakSet,ok=function(e){const{color:r,thickness:i,opacity:s,pageIndex:A}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||e.color.some((a,o)=>a!==r[o])||e.thickness!==i||e.opacity!==s||e.pageIndex!==A},ct(Ng,"_type","ink"),ct(Ng,"_editorType",Ee.INK),ct(Ng,"_defaultDrawingOptions",null);let IS=Ng;class _S extends Ew{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const I2=8,nm=3;var sd,ur,US,Na,lk,ck,LS,Ab,hk,uk,fk,QS,NS,dk;class Do{static extractContoursFromText(t,{fontFamily:e,fontStyle:r,fontWeight:i},s,A,a,o){let l=new OffscreenCanvas(1,1),h=l.getContext("2d",{alpha:!1});const u=200,d=h.font=`${r} ${i} ${u}px ${e}`,{actualBoundingBoxLeft:f,actualBoundingBoxRight:p,actualBoundingBoxAscent:m,actualBoundingBoxDescent:y,fontBoundingBoxAscent:w,fontBoundingBoxDescent:B,width:E}=h.measureText(t),S=1.5,I=Math.ceil(Math.max(Math.abs(f)+Math.abs(p)||0,E)*S),L=Math.ceil(Math.max(Math.abs(m)+Math.abs(y)||u,Math.abs(w)+Math.abs(B)||u)*S);l=new OffscreenCanvas(I,L),h=l.getContext("2d",{alpha:!0,willReadFrequently:!0}),h.font=d,h.filter="grayscale(1)",h.fillStyle="white",h.fillRect(0,0,I,L),h.fillStyle="black",h.fillText(t,I*(S-1)/2,L*(3-S)/2);const k=_(this,ur,QS).call(this,h.getImageData(0,0,I,L).data),H=_(this,ur,fk).call(this,k),Q=_(this,ur,NS).call(this,H),W=_(this,ur,LS).call(this,k,I,L,Q);return this.processDrawnLines({lines:{curves:W,width:I,height:L},pageWidth:s,pageHeight:A,rotation:a,innerMargin:o,mustSmooth:!0,areContours:!0})}static process(t,e,r,i,s){const[A,a,o]=_(this,ur,dk).call(this,t),[l,h]=_(this,ur,uk).call(this,A,a,o,Math.hypot(a,o)*c(this,sd).sigmaSFactor,c(this,sd).sigmaR,c(this,sd).kernelSize),u=_(this,ur,NS).call(this,h),d=_(this,ur,LS).call(this,l,a,o,u);return this.processDrawnLines({lines:{curves:d,width:a,height:o},pageWidth:e,pageHeight:r,rotation:i,innerMargin:s,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:t,pageWidth:e,pageHeight:r,rotation:i,innerMargin:s,mustSmooth:A,areContours:a}){i%180!==0&&([e,r]=[r,e]);const{curves:o,width:l,height:h}=t,u=t.thickness??0,d=[],f=Math.min(e/l,r/h),p=f/e,m=f/r,y=[];for(const{points:B}of o){const E=A?_(this,ur,hk).call(this,B):B;if(!E)continue;y.push(E);const S=E.length,I=new Float32Array(S),L=new Float32Array(3*(S===2?2:S-2));if(d.push({line:L,points:I}),S===2){I[0]=E[0]*p,I[1]=E[1]*m,L.set([NaN,NaN,NaN,NaN,I[0],I[1]],0);continue}let[k,H,Q,W]=E;k*=p,H*=m,Q*=p,W*=m,I.set([k,H,Q,W],0),L.set([NaN,NaN,NaN,NaN,k,H],0);for(let U=4;U<S;U+=2){const D=I[U]=E[U]*p,j=I[U+1]=E[U+1]*m;L.set(zt.createBezierPoints(k,H,Q,W,D,j),(U-2)*3),[k,H,Q,W]=[Q,W,D,j]}}if(d.length===0)return null;const w=a?new _S:new Ew;return w.build(d,e,r,1,i,a?0:u,s),{outline:w,newCurves:y,areContours:a,thickness:u,width:l,height:h}}static async compressSignature({outlines:t,areContours:e,thickness:r,width:i,height:s}){let A=1/0,a=-1/0,o=0;for(const B of t){o+=B.length;for(let E=2,S=B.length;E<S;E++){const I=B[E]-B[E-2];A=Math.min(A,I),a=Math.max(a,I)}}let l;A>=-128&&a<=127?l=Int8Array:A>=-32768&&a<=32767?l=Int16Array:l=Int32Array;const h=t.length,u=I2+nm*h,d=new Uint32Array(u);let f=0;d[f++]=u*Uint32Array.BYTES_PER_ELEMENT+(o-2*h)*l.BYTES_PER_ELEMENT,d[f++]=0,d[f++]=i,d[f++]=s,d[f++]=e?0:1,d[f++]=Math.max(0,Math.floor(r??0)),d[f++]=h,d[f++]=l.BYTES_PER_ELEMENT;for(const B of t)d[f++]=B.length-2,d[f++]=B[0],d[f++]=B[1];const p=new CompressionStream("deflate-raw"),m=p.writable.getWriter();await m.ready,m.write(d);const y=l.prototype.constructor;for(const B of t){const E=new y(B.length-2);for(let S=2,I=B.length;S<I;S++)E[S-2]=B[S]-B[S-2];m.write(E)}return m.close(),(await new Response(p.readable).bytes()).toBase64()}static async decompressSignature(t){try{const e=Uint8Array.fromBase64(t),{readable:r,writable:i}=new DecompressionStream("deflate-raw"),s=i.getWriter();await s.ready,s.write(e).then(async()=>{await s.ready,await s.close()}).catch(()=>{});let A=null,a=0;for await(const E of r)A||(A=new Uint8Array(new Uint32Array(E.buffer,0,4)[0])),A.set(E,a),a+=E.length;const o=new Uint32Array(A.buffer,0,A.length>>2),l=o[1];if(l!==0)throw new Error(`Invalid version: ${l}`);const h=o[2],u=o[3],d=o[4]===0,f=o[5],p=o[6],m=o[7],y=[],w=(I2+nm*p)*Uint32Array.BYTES_PER_ELEMENT;let B;switch(m){case Int8Array.BYTES_PER_ELEMENT:B=new Int8Array(A.buffer,w);break;case Int16Array.BYTES_PER_ELEMENT:B=new Int16Array(A.buffer,w);break;case Int32Array.BYTES_PER_ELEMENT:B=new Int32Array(A.buffer,w);break}a=0;for(let E=0;E<p;E++){const S=o[nm*E+I2],I=new Float32Array(S+2);y.push(I);for(let L=0;L<nm-1;L++)I[L]=o[nm*E+I2+L+1];for(let L=0;L<S;L++)I[L+2]=I[L]+B[a++]}return{areContours:d,thickness:f,outlines:y,width:h,height:u}}catch(e){return Me(`decompressSignature: ${e}`),null}}}sd=new WeakMap,ur=new WeakSet,US=function(t,e,r,i){return r-=t,i-=e,r===0?i>0?0:4:r===1?i+6:2-i},Na=new WeakMap,lk=function(t,e,r,i,s,A,a){const o=_(this,ur,US).call(this,r,i,s,A);for(let l=0;l<8;l++){const h=(-l+o-a+16)%8,u=c(this,Na)[2*h],d=c(this,Na)[2*h+1];if(t[(r+u)*e+(i+d)]!==0)return h}return-1},ck=function(t,e,r,i,s,A,a){const o=_(this,ur,US).call(this,r,i,s,A);for(let l=0;l<8;l++){const h=(l+o+a+16)%8,u=c(this,Na)[2*h],d=c(this,Na)[2*h+1];if(t[(r+u)*e+(i+d)]!==0)return h}return-1},LS=function(t,e,r,i){const s=t.length,A=new Int32Array(s);for(let h=0;h<s;h++)A[h]=t[h]<=i?1:0;for(let h=1;h<r-1;h++)A[h*e]=A[h*e+e-1]=0;for(let h=0;h<e;h++)A[h]=A[e*r-1-h]=0;let a=1,o;const l=[];for(let h=1;h<r-1;h++){o=1;for(let u=1;u<e-1;u++){const d=h*e+u,f=A[d];if(f===0)continue;let p=h,m=u;if(f===1&&A[d-1]===0)a+=1,m-=1;else if(f>=1&&A[d+1]===0)a+=1,m+=1,f>1&&(o=f);else{f!==1&&(o=Math.abs(f));continue}const y=[u,h],w=m===u+1,B={isHole:w,points:y,id:a,parent:0};l.push(B);let E;for(const U of l)if(U.id===o){E=U;break}E?E.isHole?B.parent=w?E.parent:o:B.parent=w?o:E.parent:B.parent=w?o:0;const S=_(this,ur,lk).call(this,A,e,h,u,p,m,0);if(S===-1){A[d]=-a,A[d]!==1&&(o=Math.abs(A[d]));continue}let I=c(this,Na)[2*S],L=c(this,Na)[2*S+1];const k=h+I,H=u+L;p=k,m=H;let Q=h,W=u;for(;;){const U=_(this,ur,ck).call(this,A,e,Q,W,p,m,1);I=c(this,Na)[2*U],L=c(this,Na)[2*U+1];const D=Q+I,j=W+L;y.push(j,D);const V=Q*e+W;if(A[V+1]===0?A[V]=-a:A[V]===1&&(A[V]=a),D===h&&j===u&&Q===k&&W===H){A[d]!==1&&(o=Math.abs(A[d]));break}else p=Q,m=W,Q=D,W=j}}}return l},Ab=function(t,e,r,i){if(r-e<=4){for(let k=e;k<r-2;k+=2)i.push(t[k],t[k+1]);return}const s=t[e],A=t[e+1],a=t[r-4]-s,o=t[r-3]-A,l=Math.hypot(a,o),h=a/l,u=o/l,d=h*A-u*s,f=o/a,p=1/l,m=Math.atan(f),y=Math.cos(m),w=Math.sin(m),B=p*(Math.abs(y)+Math.abs(w)),E=p*(1-B+B**2),S=Math.max(Math.atan(Math.abs(w+y)*E),Math.atan(Math.abs(w-y)*E));let I=0,L=e;for(let k=e+2;k<r-2;k+=2){const H=Math.abs(d-h*t[k+1]+u*t[k]);H>I&&(L=k,I=H)}I>(l*S)**2?(_(this,ur,Ab).call(this,t,e,L+2,i),_(this,ur,Ab).call(this,t,L,r,i)):i.push(s,A)},hk=function(t){const e=[],r=t.length;return _(this,ur,Ab).call(this,t,0,r,e),e.push(t[r-2],t[r-1]),e.length<=4?null:e},uk=function(t,e,r,i,s,A){const a=new Float32Array(A**2),o=-2*i**2,l=A>>1;for(let m=0;m<A;m++){const y=(m-l)**2;for(let w=0;w<A;w++)a[m*A+w]=Math.exp((y+(w-l)**2)/o)}const h=new Float32Array(256),u=-2*s**2;for(let m=0;m<256;m++)h[m]=Math.exp(m**2/u);const d=t.length,f=new Uint8Array(d),p=new Uint32Array(256);for(let m=0;m<r;m++)for(let y=0;y<e;y++){const w=m*e+y,B=t[w];let E=0,S=0;for(let L=0;L<A;L++){const k=m+L-l;if(!(k<0||k>=r))for(let H=0;H<A;H++){const Q=y+H-l;if(Q<0||Q>=e)continue;const W=t[k*e+Q],U=a[L*A+H]*h[Math.abs(W-B)];E+=W*U,S+=U}}const I=f[w]=Math.round(E/S);p[I]++}return[f,p]},fk=function(t){const e=new Uint32Array(256);for(const r of t)e[r]++;return e},QS=function(t){const e=t.length,r=new Uint8ClampedArray(e>>2);let i=-1/0,s=1/0;for(let a=0,o=r.length;a<o;a++){const l=r[a]=t[a<<2];i=Math.max(i,l),s=Math.min(s,l)}const A=255/(i-s);for(let a=0,o=r.length;a<o;a++)r[a]=(r[a]-s)*A;return r},NS=function(t){let e,r=-1/0,i=-1/0;const s=t.findIndex(o=>o!==0);let A=s,a=s;for(e=s;e<256;e++){const o=t[e];o>r&&(e-A>i&&(i=e-A,a=e-1),r=o,A=e)}for(e=a-1;e>=0&&!(t[e]>t[e+1]);e--);return e},dk=function(t){const e=t,{width:r,height:i}=t,{maxDim:s}=c(this,sd);let A=r,a=i;if(r>s||i>s){let d=r,f=i,p=Math.log2(Math.max(r,i)/s);const m=Math.floor(p);p=p===m?m-1:m;for(let w=0;w<p;w++){A=Math.ceil(d/2),a=Math.ceil(f/2);const B=new OffscreenCanvas(A,a);B.getContext("2d").drawImage(t,0,0,d,f,0,0,A,a),d=A,f=a,t!==e&&t.close(),t=B.transferToImageBitmap()}const y=Math.min(s/A,s/a);A=Math.round(A*y),a=Math.round(a*y)}const l=new OffscreenCanvas(A,a).getContext("2d",{willReadFrequently:!0});l.fillStyle="white",l.fillRect(0,0,A,a),l.filter="grayscale(1)",l.drawImage(t,0,0,t.width,t.height,0,0,A,a);const h=l.getImageData(0,0,A,a).data;return[_(this,ur,QS).call(this,h),A,a]},T(Do,ur),T(Do,sd,{maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16}),T(Do,Na,new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]));class y4 extends ik{constructor(){super(),super.updateProperties({fill:Dr._defaultLineColor,"stroke-width":0})}clone(){const t=new y4;return t.updateAll(this),t}}class b4 extends qB{constructor(t){super(t),super.updateProperties({stroke:Dr._defaultLineColor,"stroke-width":1})}clone(){const t=new b4(this._viewParameters);return t.updateAll(this),t}}var Lh,Qo,Qh,Ad;const oA=class oA extends Pb{constructor(e){super({...e,mustBeCommitted:!0,name:"signatureEditor"});T(this,Lh,!1);T(this,Qo,null);T(this,Qh,null);T(this,Ad,null);this._willKeepAspectRatio=!0,C(this,Qh,e.signatureData||null),C(this,Qo,null),this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(e,r){Dr.initialize(e,r),this._defaultDrawingOptions=new y4,this._defaultDrawnSignatureOptions=new b4(r.viewParameters)}static getDefaultDrawingOptions(e){const r=this._defaultDrawingOptions.clone();return r.updateProperties(e),r}static get supportMultipleDrawings(){return!1}static get typesMap(){return Fe(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!c(this,Qo)}}static computeTelemetryFinalData(e){const r=e.get("hasDescription");return{hasAltText:r.get(!0)??0,hasNoAltText:r.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let e,r;const{_isCopy:i}=this;if(i&&(this._isCopy=!1,e=this.x,r=this.y),super.render(),this._drawId===null)if(c(this,Qh)){const{lines:s,mustSmooth:A,areContours:a,description:o,uuid:l,heightInPage:h}=c(this,Qh),{rawDims:{pageWidth:u,pageHeight:d},rotation:f}=this.parent.viewport,p=Do.processDrawnLines({lines:s,pageWidth:u,pageHeight:d,rotation:f,innerMargin:oA._INNER_MARGIN,mustSmooth:A,areContours:a});this.addSignature(p,h,o,l)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:c(this,Qo)||""}));return i&&(this._isCopy=!0,this._moveAfterPaste(e,r)),this.div}setUuid(e){C(this,Ad,e),this.addEditToolbar()}getUuid(){return c(this,Ad)}get description(){return c(this,Qo)}set description(e){C(this,Qo,e),this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:e})),super.addEditToolbar().then(r=>{r==null||r.updateEditSignatureButton(e)}))}getSignaturePreview(){const{newCurves:e,areContours:r,thickness:i,width:s,height:A}=c(this,Qh),a=Math.max(s,A),o=Do.processDrawnLines({lines:{curves:e.map(l=>({points:l})),thickness:i,width:s,height:A},pageWidth:a,pageHeight:a,rotation:0,innerMargin:0,mustSmooth:!1,areContours:r});return{areContours:r,outline:o.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(e,r,i,s){const{x:A,y:a}=this,{outline:o}=C(this,Qh,e);C(this,Lh,o instanceof _S),this.description=i;let l;c(this,Lh)?l=oA.getDefaultDrawingOptions():(l=oA._defaultDrawnSignatureOptions.clone(),l.updateProperties({"stroke-width":o.thickness})),this._addOutlines({drawOutlines:o,drawingOptions:l});const[,h]=this.pageDimensions;let u=r/h;u=u>=1?.5:u,this.width*=u/this.height,this.width>=1&&(u*=.9/this.width,this.width=.9),this.height=u,this.setDims(),this.x=A,this.y=a,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(s),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!s,hasDescription:!!i}}),this.div.hidden=!1}getFromImage(e){const{rawDims:{pageWidth:r,pageHeight:i},rotation:s}=this.parent.viewport;return Do.process(e,r,i,s,oA._INNER_MARGIN)}getFromText(e,r){const{rawDims:{pageWidth:i,pageHeight:s},rotation:A}=this.parent.viewport;return Do.extractContoursFromText(e,r,i,s,A,oA._INNER_MARGIN)}getDrawnSignature(e){const{rawDims:{pageWidth:r,pageHeight:i},rotation:s}=this.parent.viewport;return Do.processDrawnLines({lines:e,pageWidth:r,pageHeight:i,rotation:s,innerMargin:oA._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:e,thickness:r}){e?this._drawingOptions=oA.getDefaultDrawingOptions():(this._drawingOptions=oA._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":r}))}serialize(e=!1){if(this.isEmpty())return null;const{lines:r,points:i}=this.serializeDraw(e),{_drawingOptions:{"stroke-width":s}}=this,A=Object.assign(super.serialize(e),{isSignature:!0,areContours:c(this,Lh),color:[0,0,0],thickness:c(this,Lh)?0:s});return this.addComment(A),e?(A.paths={lines:r,points:i},A.uuid=c(this,Ad),A.isCopy=!0):A.lines=r,c(this,Qo)&&(A.accessibilityData={type:"Figure",alt:c(this,Qo)}),A}static deserializeDraw(e,r,i,s,A,a){return a.areContours?_S.deserialize(e,r,i,s,A,a):Ew.deserialize(e,r,i,s,A,a)}static async deserialize(e,r,i){var A;const s=await super.deserialize(e,r,i);return C(s,Lh,e.areContours),s.description=((A=e.accessibilityData)==null?void 0:A.alt)||"",C(s,Ad,e.uuid),s}};Lh=new WeakMap,Qo=new WeakMap,Qh=new WeakMap,Ad=new WeakMap,ct(oA,"_type","signature"),ct(oA,"_editorType",Ee.SIGNATURE),ct(oA,"_defaultDrawingOptions",null);let PS=oA;var Jr,mn,Nh,ql,Ph,o0,Yl,ad,No,EA,l0,ir,Om,Dm,ab,ob,lb,kS,cb,gk;class MS extends Dr{constructor(e){super({...e,name:"stampEditor"});T(this,ir);T(this,Jr,null);T(this,mn,null);T(this,Nh,null);T(this,ql,null);T(this,Ph,null);T(this,o0,"");T(this,Yl,null);T(this,ad,!1);T(this,No,null);T(this,EA,!1);T(this,l0,!1);C(this,ql,e.bitmapUrl),C(this,Ph,e.bitmapFile),this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(e,r){Dr.initialize(e,r)}static isHandlingMimeForPasting(e){return Ib.includes(e)}static paste(e,r){r.pasteEditor({mode:Ee.STAMP},{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var e;return{type:"stamp",hasAltText:!!((e=this.altTextData)!=null&&e.altText)}}static computeTelemetryFinalData(e){const r=e.get("hasAltText");return{hasAltText:r.get(!0)??0,hasNoAltText:r.get(!1)??0}}async mlGuessAltText(e=null,r=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!await i.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:s,width:A,height:a}=e||this.copyCanvas(null,null,!0).imageData,o=await i.guess({name:"altText",request:{data:s,width:A,height:a,channels:s.length/(A*a)}});if(!o)throw new Error("No response from the AI service.");if(o.error)throw new Error("Error from the AI service.");if(o.cancel)return null;if(!o.output)throw new Error("No valid response from the AI service.");const l=o.output;return await this.setGuessedAltText(l),r&&!this.hasAltTextData()&&(this.altTextData={alt:l,decorative:!1}),l}remove(){var e;c(this,mn)&&(C(this,Jr,null),this._uiManager.imageManager.deleteId(c(this,mn)),(e=c(this,Yl))==null||e.remove(),C(this,Yl,null),c(this,No)&&(clearTimeout(c(this,No)),C(this,No,null))),super.remove()}rebuild(){if(!this.parent){c(this,mn)&&_(this,ir,ab).call(this);return}super.rebuild(),this.div!==null&&(c(this,mn)&&c(this,Yl)===null&&_(this,ir,ab).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(c(this,Nh)||c(this,Jr)||c(this,ql)||c(this,Ph)||c(this,mn)||c(this,ad))}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let e,r;return this._isCopy&&(e=this.x,r=this.y),super.render(),this.div.hidden=!0,this.createAltText(),c(this,ad)||(c(this,Jr)?_(this,ir,ob).call(this):_(this,ir,ab).call(this)),this._isCopy&&this._moveAfterPaste(e,r),this._uiManager.addShouldRescale(this),this.div}setCanvas(e,r){const{id:i,bitmap:s}=this._uiManager.imageManager.getFromCanvas(e,r);r.remove(),i&&this._uiManager.imageManager.isValidId(i)&&(C(this,mn,i),s&&C(this,Jr,s),C(this,ad,!1),_(this,ir,ob).call(this))}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;c(this,No)!==null&&clearTimeout(c(this,No)),C(this,No,setTimeout(()=>{C(this,No,null),_(this,ir,kS).call(this)},200))}copyCanvas(e,r,i=!1){e||(e=224);const{width:s,height:A}=c(this,Jr),a=new Ga;let o=c(this,Jr),l=s,h=A,u=null;if(r){if(s>r||A>r){const k=Math.min(r/s,r/A);l=Math.floor(s*k),h=Math.floor(A*k)}u=document.createElement("canvas");const f=u.width=Math.ceil(l*a.sx),p=u.height=Math.ceil(h*a.sy);c(this,EA)||(o=_(this,ir,lb).call(this,f,p));const m=u.getContext("2d");m.filter=this._uiManager.hcmFilter;let y="white",w="#cfcfd8";this._uiManager.hcmFilter!=="none"?w="black":WK.isDarkMode&&(y="#8f8f9d",w="#42414d");const B=15,E=B*a.sx,S=B*a.sy,I=new OffscreenCanvas(E*2,S*2),L=I.getContext("2d");L.fillStyle=y,L.fillRect(0,0,E*2,S*2),L.fillStyle=w,L.fillRect(0,0,E,S),L.fillRect(E,S,E,S),m.fillStyle=m.createPattern(I,"repeat"),m.fillRect(0,0,f,p),m.drawImage(o,0,0,o.width,o.height,0,0,f,p)}let d=null;if(i){let f,p;if(a.symmetric&&o.width<e&&o.height<e)f=o.width,p=o.height;else if(o=c(this,Jr),s>e||A>e){const w=Math.min(e/s,e/A);f=Math.floor(s*w),p=Math.floor(A*w),c(this,EA)||(o=_(this,ir,lb).call(this,f,p))}const y=new OffscreenCanvas(f,p).getContext("2d",{willReadFrequently:!0});y.drawImage(o,0,0,o.width,o.height,0,0,f,p),d={width:f,height:p,data:y.getImageData(0,0,f,p).data}}return{canvas:u,width:l,height:h,imageData:d}}static async deserialize(e,r,i){var y;let s=null,A=!1;if(e instanceof UM){const{data:{rect:w,rotation:B,id:E,structParent:S,popupRef:I,richText:L,contentsObj:k,creationDate:H,modificationDate:Q},container:W,parent:{page:{pageNumber:U}},canvas:D}=e;let j,V;D?(delete e.canvas,{id:j,bitmap:V}=i.imageManager.getFromCanvas(W.id,D),D.remove()):(A=!0,e._hasNoCanvas=!0);const st=((y=await r._structTree.getAriaAttributes(`${Tg}${E}`))==null?void 0:y.get("aria-label"))||"";s=e={annotationType:Ee.STAMP,bitmapId:j,bitmap:V,pageIndex:U-1,rect:w.slice(0),rotation:B,annotationElementId:E,id:E,deleted:!1,accessibilityData:{decorative:!1,altText:st},isSvg:!1,structParent:S,popupRef:I,richText:L,comment:(k==null?void 0:k.str)||null,creationDate:H,modificationDate:Q}}const a=await super.deserialize(e,r,i),{rect:o,bitmap:l,bitmapUrl:h,bitmapId:u,isSvg:d,accessibilityData:f}=e;A?(i.addMissingCanvas(e.id,a),C(a,ad,!0)):u&&i.imageManager.isValidId(u)?(C(a,mn,u),l&&C(a,Jr,l)):C(a,ql,h),C(a,EA,d);const[p,m]=a.pageDimensions;return a.width=(o[2]-o[0])/p,a.height=(o[3]-o[1])/m,f&&(a.altTextData=f),a._initialData=s,e.comment&&a.setCommentData(e),C(a,l0,!!s),a}serialize(e=!1,r=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i=Object.assign(super.serialize(e),{bitmapId:c(this,mn),isSvg:c(this,EA)});if(this.addComment(i),e)return i.bitmapUrl=_(this,ir,cb).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i.isCopy=!0,i;const{decorative:s,altText:A}=this.serializeAltText(!1);if(!s&&A&&(i.accessibilityData={type:"Figure",alt:A}),this.annotationElementId){const o=_(this,ir,gk).call(this,i);return o.isSame?null:(o.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1,i.id=this.annotationElementId,delete i.bitmapId,i)}if(r===null)return i;r.stamps||(r.stamps=new Map);const a=c(this,EA)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(!r.stamps.has(c(this,mn)))r.stamps.set(c(this,mn),{area:a,serialized:i}),i.bitmap=_(this,ir,cb).call(this,!1);else if(c(this,EA)){const o=r.stamps.get(c(this,mn));a>o.area&&(o.area=a,o.serialized.bitmap.close(),o.serialized.bitmap=_(this,ir,cb).call(this,!1))}return i}renderAnnotationElement(e){return this.deleted?(e.hide(),null):(e.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}}Jr=new WeakMap,mn=new WeakMap,Nh=new WeakMap,ql=new WeakMap,Ph=new WeakMap,o0=new WeakMap,Yl=new WeakMap,ad=new WeakMap,No=new WeakMap,EA=new WeakMap,l0=new WeakMap,ir=new WeakSet,Om=function(e,r=!1){if(!e){this.remove();return}C(this,Jr,e.bitmap),r||(C(this,mn,e.id),C(this,EA,e.isSvg)),e.file&&C(this,o0,e.file.name),_(this,ir,ob).call(this)},Dm=function(){if(C(this,Nh,null),this._uiManager.enableWaiting(!1),!!c(this,Yl)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&c(this,Jr)){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&c(this,Jr)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},ab=function(){if(c(this,mn)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(c(this,mn)).then(i=>_(this,ir,Om).call(this,i,!0)).finally(()=>_(this,ir,Dm).call(this));return}if(c(this,ql)){const i=c(this,ql);C(this,ql,null),this._uiManager.enableWaiting(!0),C(this,Nh,this._uiManager.imageManager.getFromUrl(i).then(s=>_(this,ir,Om).call(this,s)).finally(()=>_(this,ir,Dm).call(this)));return}if(c(this,Ph)){const i=c(this,Ph);C(this,Ph,null),this._uiManager.enableWaiting(!0),C(this,Nh,this._uiManager.imageManager.getFromFile(i).then(s=>_(this,ir,Om).call(this,s)).finally(()=>_(this,ir,Dm).call(this)));return}const e=document.createElement("input");e.type="file",e.accept=Ib.join(",");const r=this._uiManager._signal;C(this,Nh,new Promise(i=>{e.addEventListener("change",async()=>{if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const s=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),_(this,ir,Om).call(this,s)}i()},{signal:r}),e.addEventListener("cancel",()=>{this.remove(),i()},{signal:r})}).finally(()=>_(this,ir,Dm).call(this))),e.click()},ob=function(){var l;const{div:e}=this;let{width:r,height:i}=c(this,Jr);const[s,A]=this.pageDimensions,a=.75;if(this.width)r=this.width*s,i=this.height*A;else if(r>a*s||i>a*A){const h=Math.min(a*s/r,a*A/i);r*=h,i*=h}this._uiManager.enableWaiting(!1);const o=C(this,Yl,document.createElement("canvas"));o.setAttribute("role","img"),this.addContainer(o),this.width=r/s,this.height=i/A,this.setDims(),(l=this._initialOptions)!=null&&l.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),_(this,ir,kS).call(this),c(this,l0)||(this.parent.addUndoableEditor(this),C(this,l0,!0)),this._reportTelemetry({action:"inserted_image"}),c(this,o0)&&this.div.setAttribute("aria-description",c(this,o0)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")},lb=function(e,r){const{width:i,height:s}=c(this,Jr);let A=i,a=s,o=c(this,Jr);for(;A>2*e||a>2*r;){const l=A,h=a;A>2*e&&(A=Math.ceil(A/2)),a>2*r&&(a=Math.ceil(a/2));const u=new OffscreenCanvas(A,a);u.getContext("2d").drawImage(o,0,0,l,h,0,0,A,a),o=u.transferToImageBitmap()}return o},kS=function(){const[e,r]=this.parentDimensions,{width:i,height:s}=this,A=new Ga,a=Math.ceil(i*e*A.sx),o=Math.ceil(s*r*A.sy),l=c(this,Yl);if(!l||l.width===a&&l.height===o)return;l.width=a,l.height=o;const h=c(this,EA)?c(this,Jr):_(this,ir,lb).call(this,a,o),u=l.getContext("2d");u.filter=this._uiManager.hcmFilter,u.drawImage(h,0,0,h.width,h.height,0,0,a,o)},cb=function(e){if(e){if(c(this,EA)){const s=this._uiManager.imageManager.getSvgUrl(c(this,mn));if(s)return s}const r=document.createElement("canvas");return{width:r.width,height:r.height}=c(this,Jr),r.getContext("2d").drawImage(c(this,Jr),0,0),r.toDataURL()}if(c(this,EA)){const[r,i]=this.pageDimensions,s=Math.round(this.width*r*hc.PDF_TO_CSS_UNITS),A=Math.round(this.height*i*hc.PDF_TO_CSS_UNITS),a=new OffscreenCanvas(s,A);return a.getContext("2d").drawImage(c(this,Jr),0,0,c(this,Jr).width,c(this,Jr).height,0,0,s,A),a.transferToImageBitmap()}return structuredClone(c(this,Jr))},gk=function(e){var a;const{pageIndex:r,accessibilityData:{altText:i}}=this._initialData,s=e.pageIndex===r,A=(((a=e.accessibilityData)==null?void 0:a.alt)||"")===i;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&s&&A,isSameAltText:A}},ct(MS,"_type","stamp"),ct(MS,"_editorType",Ee.STAMP);var od,c0,Mh,kh,Jl,Gs,Oh,h0,u0,Pa,Zl,vn,tc,Dh,f0,ee,Rh,Ur,OS,pk,uo,DS,RS,hb;const Ba=class Ba{constructor({uiManager:t,pageIndex:e,div:r,structTreeLayer:i,accessibilityManager:s,annotationLayer:A,drawLayer:a,textLayer:o,viewport:l,l10n:h}){T(this,Ur);T(this,od);T(this,c0,!1);T(this,Mh,null);T(this,kh,null);T(this,Jl,null);T(this,Gs,new Map);T(this,Oh,!1);T(this,h0,!1);T(this,u0,!1);T(this,Pa,null);T(this,Zl,null);T(this,vn,null);T(this,tc,null);T(this,Dh,null);T(this,f0,-1);T(this,ee);const u=[...c(Ba,Rh).values()];if(!Ba._initialized){Ba._initialized=!0;for(const d of u)d.initialize(h,t)}t.registerEditorTypes(u),C(this,ee,t),this.pageIndex=e,this.div=r,C(this,od,s),C(this,Mh,A),this.viewport=l,C(this,vn,o),this.drawLayer=a,this._structTree=i,c(this,ee).addLayer(this)}get isEmpty(){return c(this,Gs).size===0}get isInvisible(){return this.isEmpty&&c(this,ee).getMode()===Ee.NONE}updateToolbar(t){c(this,ee).updateToolbar(t)}updateMode(t=c(this,ee).getMode()){switch(_(this,Ur,hb).call(this),t){case Ee.NONE:this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case Ee.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case Ee.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;if(e.toggle("nonEditing",!1),t===Ee.POPUP)e.toggle("commentEditing",!0);else{e.toggle("commentEditing",!1);for(const r of c(Ba,Rh).values())e.toggle(`${r._type}Editing`,t===r._editorType)}this.div.hidden=!1}hasTextLayer(t){var e;return t===((e=c(this,vn))==null?void 0:e.div)}setEditingState(t){c(this,ee).setEditingState(t)}addCommands(t){c(this,ee).addCommands(t)}cleanUndoStack(t){c(this,ee).cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){var e;(e=c(this,Mh))==null||e.togglePointerEvents(t)}async enable(){var r;C(this,u0,!0),this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),(r=c(this,Dh))==null||r.abort(),C(this,Dh,null);const t=new Set;for(const i of c(this,Ur,OS))i.enableEditing(),i.show(!0),i.annotationElementId&&(c(this,ee).removeChangedExistingAnnotation(i),t.add(i.annotationElementId));const e=c(this,Mh);if(e)for(const i of e.getEditableAnnotations()){if(i.hide(),c(this,ee).isDeletedAnnotationElement(i.data.id)||t.has(i.data.id))continue;const s=await this.deserialize(i);s&&(this.addOrRebuild(s),s.enableEditing())}C(this,u0,!1),c(this,ee)._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){var i;if(C(this,h0,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),c(this,vn)&&!c(this,Dh)){C(this,Dh,new AbortController);const s=c(this,ee).combinedSignal(c(this,Dh));c(this,vn).div.addEventListener("pointerdown",A=>{const{clientX:o,clientY:l,timeStamp:h}=A,u=c(this,f0);if(h-u>500){C(this,f0,h);return}C(this,f0,-1);const{classList:d}=this.div;d.toggle("getElements",!0);const f=document.elementsFromPoint(o,l);if(d.toggle("getElements",!1),!this.div.contains(f[0]))return;let p;const m=new RegExp(`^${pv}[0-9]+$`);for(const w of f)if(m.test(w.id)){p=w.id;break}if(!p)return;const y=c(this,Gs).get(p);(y==null?void 0:y.annotationElementId)===null&&(Zr(A),y.dblclick(A))},{signal:s,capture:!0})}const t=c(this,Mh),e=[];if(t){const s=new Map,A=new Map;for(const a of c(this,Ur,OS)){if(a.disableEditing(),!a.annotationElementId){e.push(a);continue}if(a.serialize()!==null){s.set(a.annotationElementId,a);continue}else A.set(a.annotationElementId,a);(i=this.getEditableAnnotation(a.annotationElementId))==null||i.show(),a.remove()}for(const a of t.getEditableAnnotations()){const{id:o}=a.data;if(c(this,ee).isDeletedAnnotationElement(o)){a.updateEdited({deleted:!0});continue}let l=A.get(o);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=s.get(o),l&&(c(this,ee).addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}_(this,Ur,hb).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:r}=this.div;for(const s of c(Ba,Rh).values())r.remove(`${s._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),t==null||t.updateFakeAnnotations(e),C(this,h0,!1)}getEditableAnnotation(t){var e;return((e=c(this,Mh))==null?void 0:e.getEditableAnnotation(t))||null}setActiveEditor(t){c(this,ee).getActive()!==t&&c(this,ee).setActiveEditor(t)}enableTextSelection(){var t;if(this.div.tabIndex=-1,(t=c(this,vn))!=null&&t.div&&!c(this,tc)){C(this,tc,new AbortController);const e=c(this,ee).combinedSignal(c(this,tc));c(this,vn).div.addEventListener("pointerdown",_(this,Ur,pk).bind(this),{signal:e}),c(this,vn).div.classList.add("highlighting")}}disableTextSelection(){var t;this.div.tabIndex=0,(t=c(this,vn))!=null&&t.div&&c(this,tc)&&(c(this,tc).abort(),C(this,tc,null),c(this,vn).div.classList.remove("highlighting"))}enableClick(){if(c(this,kh))return;C(this,kh,new AbortController);const t=c(this,ee).combinedSignal(c(this,kh));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const e=this.pointerup.bind(this);this.div.addEventListener("pointerup",e,{signal:t}),this.div.addEventListener("pointercancel",e,{signal:t})}disableClick(){var t;(t=c(this,kh))==null||t.abort(),C(this,kh,null)}attach(t){c(this,Gs).set(t.id,t);const{annotationElementId:e}=t;e&&c(this,ee).isDeletedAnnotationElement(e)&&c(this,ee).removeDeletedAnnotationElement(t)}detach(t){var e;c(this,Gs).delete(t.id),(e=c(this,od))==null||e.removePointerInTextLayer(t.contentDiv),!c(this,h0)&&t.annotationElementId&&c(this,ee).addDeletedAnnotationElement(t)}remove(t){this.detach(t),c(this,ee).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(c(this,ee).addDeletedAnnotationElement(t),Dr.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),(e=t.parent)==null||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),c(this,ee).addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!c(this,u0)),c(this,ee).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){var r;if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&!c(this,Jl)&&(t._focusEventsAllowed=!1,C(this,Jl,setTimeout(()=>{C(this,Jl,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:c(this,ee)._signal}),e.focus())},0))),t._structTreeParentId=(r=c(this,od))==null?void 0:r.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const e=()=>t._uiManager.rebuild(t),r=()=>{t.remove()};this.addCommands({cmd:e,undo:r,mustExec:!1})}getEditorByUID(t){for(const e of c(this,Gs).values())if(e.uid===t)return e;return null}combinedSignal(t){return c(this,ee).combinedSignal(t)}canCreateNewEmptyEditor(){var t;return(t=c(this,Ur,uo))==null?void 0:t.canCreateNewEmptyEditor()}async pasteEditor(t,e){this.updateToolbar(t),await c(this,ee).updateMode(t.mode);const{offsetX:r,offsetY:i}=_(this,Ur,RS).call(this),s=c(this,ee).getId(),A=_(this,Ur,DS).call(this,{parent:this,id:s,x:r,y:i,uiManager:c(this,ee),isCentered:!0,...e});A&&this.add(A)}async deserialize(t){var e;return await((e=c(Ba,Rh).get(t.annotationType??t.annotationEditorType))==null?void 0:e.deserialize(t,this,c(this,ee)))||null}createAndAddNewEditor(t,e,r={}){const i=c(this,ee).getId(),s=_(this,Ur,DS).call(this,{parent:this,id:i,x:t.offsetX,y:t.offsetY,uiManager:c(this,ee),isCentered:e,...r});return s&&this.add(s),s}get boundingClientRect(){return this.div.getBoundingClientRect()}addNewEditor(t={}){this.createAndAddNewEditor(_(this,Ur,RS).call(this),!0,t)}setSelected(t){c(this,ee).setSelected(t)}toggleSelected(t){c(this,ee).toggleSelected(t)}unselect(t){c(this,ee).unselect(t)}pointerup(t){var i;const{isMac:e}=Mi.platform;if(t.button!==0||t.ctrlKey&&e||t.target!==this.div||!c(this,Oh)||(C(this,Oh,!1),(i=c(this,Ur,uo))!=null&&i.isDrawer&&c(this,Ur,uo).supportMultipleDrawings))return;if(!c(this,c0)){C(this,c0,!0);return}const r=c(this,ee).getMode();if(r===Ee.STAMP||r===Ee.POPUP||r===Ee.SIGNATURE){c(this,ee).unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){var i;if(c(this,ee).getMode()===Ee.HIGHLIGHT&&this.enableTextSelection(),c(this,Oh)){C(this,Oh,!1);return}const{isMac:e}=Mi.platform;if(t.button!==0||t.ctrlKey&&e||t.target!==this.div)return;if(C(this,Oh,!0),(i=c(this,Ur,uo))!=null&&i.isDrawer){this.startDrawingSession(t);return}const r=c(this,ee).getActive();C(this,c0,!r||r.isEmpty())}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),c(this,Pa)){c(this,Ur,uo).startDrawing(this,c(this,ee),!1,t);return}c(this,ee).setCurrentDrawingSession(this),C(this,Pa,new AbortController);const e=c(this,ee).combinedSignal(c(this,Pa));this.div.addEventListener("blur",({relatedTarget:r})=>{r&&!this.div.contains(r)&&(C(this,Zl,null),this.commitOrRemove())},{signal:e}),c(this,Ur,uo).startDrawing(this,c(this,ee),!1,t)}pause(t){if(t){const{activeElement:e}=document;this.div.contains(e)&&C(this,Zl,e);return}c(this,Zl)&&setTimeout(()=>{var e;(e=c(this,Zl))==null||e.focus(),C(this,Zl,null)},0)}endDrawingSession(t=!1){return c(this,Pa)?(c(this,ee).setCurrentDrawingSession(null),c(this,Pa).abort(),C(this,Pa,null),C(this,Zl,null),c(this,Ur,uo).endDrawing(t)):null}findNewParent(t,e,r){const i=c(this,ee).findParent(e,r);return i===null||i===this?!1:(i.changeParent(t),!0)}commitOrRemove(){return c(this,Pa)?(this.endDrawingSession(),!0):!1}onScaleChanging(){c(this,Pa)&&c(this,Ur,uo).onScaleChangingWhenDrawing(this)}destroy(){var t,e;this.commitOrRemove(),((t=c(this,ee).getActive())==null?void 0:t.parent)===this&&(c(this,ee).commitOrRemove(),c(this,ee).setActiveEditor(null)),c(this,Jl)&&(clearTimeout(c(this,Jl)),C(this,Jl,null));for(const r of c(this,Gs).values())(e=c(this,od))==null||e.removePointerInTextLayer(r.contentDiv),r.setParent(null),r.isAttachedToDOM=!1,r.div.remove();this.div=null,c(this,Gs).clear(),c(this,ee).removeLayer(this)}async render({viewport:t}){this.viewport=t,Xh(this.div,t);for(const e of c(this,ee).getEditors(this.pageIndex))this.add(e),e.rebuild();await c(this,ee).findClonesForPage(this),this.div.hidden=this.isEmpty,this.updateMode()}update({viewport:t}){c(this,ee).commitOrRemove(),_(this,Ur,hb).call(this);const e=this.viewport.rotation,r=t.rotation;if(this.viewport=t,Xh(this.div,{rotation:r}),e!==r)for(const i of c(this,Gs).values())i.rotate(r)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return c(this,ee).viewParameters.realScale}};od=new WeakMap,c0=new WeakMap,Mh=new WeakMap,kh=new WeakMap,Jl=new WeakMap,Gs=new WeakMap,Oh=new WeakMap,h0=new WeakMap,u0=new WeakMap,Pa=new WeakMap,Zl=new WeakMap,vn=new WeakMap,tc=new WeakMap,Dh=new WeakMap,f0=new WeakMap,ee=new WeakMap,Rh=new WeakMap,Ur=new WeakSet,OS=function(){return c(this,Gs).size!==0?c(this,Gs).values():c(this,ee).getEditors(this.pageIndex)},pk=function(t){c(this,ee).unselectAll();const{target:e}=t;if(e===c(this,vn).div||(e.getAttribute("role")==="img"||e.classList.contains("endOfContent")||e.classList.contains("textLayerImagePlaceholder"))&&c(this,vn).div.contains(e)){const{isMac:r}=Mi.platform;if(t.button!==0||t.ctrlKey&&r)return;c(this,ee).showAllEditors("highlight",!0,!0),c(this,vn).div.classList.add("free"),this.toggleDrawing(),Nb.startHighlighting(this,c(this,ee).direction==="ltr",{target:c(this,vn).div,x:t.x,y:t.y}),c(this,vn).div.addEventListener("pointerup",()=>{c(this,vn).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:c(this,ee)._signal}),t.preventDefault()}},uo=function(){return c(Ba,Rh).get(c(this,ee).getMode())},DS=function(t){const e=c(this,Ur,uo);return e?new e.prototype.constructor(t):null},RS=function(){const{x:t,y:e,width:r,height:i}=this.boundingClientRect,s=Math.max(0,t),A=Math.max(0,e),a=Math.min(window.innerWidth,t+r),o=Math.min(window.innerHeight,e+i),l=(s+a)/2-t,h=(A+o)/2-e,[u,d]=this.viewport.rotation%180===0?[l,h]:[h,l];return{offsetX:u,offsetY:d}},hb=function(){for(const t of c(this,Gs).values())t.isEmpty()&&t.remove()},ct(Ba,"_initialized",!1),T(Ba,Rh,new Map([wS,IS,MS,Nb,PS].map(t=>[t._editorType,t])));let Mb=Ba;var Ma,Es,ld,hw,SB,mk,Ko,HS,vk,KS;const rn=class rn{constructor(){T(this,Ko);T(this,Ma,null);T(this,Es,new Map);T(this,ld,new Map)}setParent(t){if(!c(this,Ma)){C(this,Ma,t);return}if(c(this,Ma)!==t){if(c(this,Es).size>0)for(const e of c(this,Es).values())e.remove(),t.append(e);C(this,Ma,t)}}static get _svgFactory(){return Fe(this,"_svgFactory",new xv)}draw(t,e=!1,r=!1){const i=Hi(rn,hw)._++,s=_(this,Ko,HS).call(this),A=rn._svgFactory.createElement("defs");s.append(A);const a=rn._svgFactory.createElement("path");A.append(a);const o=`path_${i}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke"),e&&c(this,ld).set(i,a);const l=r?_(this,Ko,vk).call(this,A,o):null,h=rn._svgFactory.createElement("use");return s.append(h),h.setAttribute("href",`#${o}`),this.updateProperties(s,t),c(this,Es).set(i,s),{id:i,clipPathId:`url(#${l})`}}drawOutline(t,e){const r=Hi(rn,hw)._++,i=_(this,Ko,HS).call(this),s=rn._svgFactory.createElement("defs");i.append(s);const A=rn._svgFactory.createElement("path");s.append(A);const a=`path_${r}`;A.setAttribute("id",a),A.setAttribute("vector-effect","non-scaling-stroke");let o;if(e){const u=rn._svgFactory.createElement("mask");s.append(u),o=`mask_${r}`,u.setAttribute("id",o),u.setAttribute("maskUnits","objectBoundingBox");const d=rn._svgFactory.createElement("rect");u.append(d),d.setAttribute("width","1"),d.setAttribute("height","1"),d.setAttribute("fill","white");const f=rn._svgFactory.createElement("use");u.append(f),f.setAttribute("href",`#${a}`),f.setAttribute("stroke","none"),f.setAttribute("fill","black"),f.setAttribute("fill-rule","nonzero"),f.classList.add("mask")}const l=rn._svgFactory.createElement("use");i.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const h=l.cloneNode();return i.append(h),l.classList.add("mainOutline"),h.classList.add("secondaryOutline"),this.updateProperties(i,t),c(this,Es).set(r,i),r}finalizeDraw(t,e){c(this,ld).delete(t),this.updateProperties(t,e)}updateProperties(t,e){var o;if(!e)return;const{root:r,bbox:i,rootClass:s,path:A}=e,a=typeof t=="number"?c(this,Es).get(t):t;if(a){if(r&&_(this,Ko,KS).call(this,a,r),i&&_(o=rn,SB,mk).call(o,a,i),s){const{classList:l}=a;for(const[h,u]of Object.entries(s))l.toggle(h,u)}if(A){const h=a.firstElementChild.firstElementChild;_(this,Ko,KS).call(this,h,A)}}}updateParent(t,e){if(e===this)return;const r=c(this,Es).get(t);r&&(c(e,Ma).append(r),c(this,Es).delete(t),c(e,Es).set(t,r))}remove(t){c(this,ld).delete(t),c(this,Ma)!==null&&(c(this,Es).get(t).remove(),c(this,Es).delete(t))}destroy(){C(this,Ma,null);for(const t of c(this,Es).values())t.remove();c(this,Es).clear(),c(this,ld).clear()}};Ma=new WeakMap,Es=new WeakMap,ld=new WeakMap,hw=new WeakMap,SB=new WeakSet,mk=function(t,[e,r,i,s]){const{style:A}=t;A.top=`${100*r}%`,A.left=`${100*e}%`,A.width=`${100*i}%`,A.height=`${100*s}%`},Ko=new WeakSet,HS=function(){const t=rn._svgFactory.create(1,1,!0);return c(this,Ma).append(t),t.setAttribute("aria-hidden",!0),t},vk=function(t,e){const r=rn._svgFactory.createElement("clipPath");t.append(r);const i=`clip_${e}`;r.setAttribute("id",i),r.setAttribute("clipPathUnits","objectBoundingBox");const s=rn._svgFactory.createElement("use");return r.append(s),s.setAttribute("href",`#${e}`),s.classList.add("clip"),i},KS=function(t,e){for(const[r,i]of Object.entries(e))i===null?t.removeAttribute(r):t.setAttribute(r,i)},T(rn,SB),T(rn,hw,0);let kb=rn;function _2(n){return`${(n*100).toFixed(2)}%`}var d0,uw,fw,g0,Po,Mo,dw,FB,wk;const hv=class hv{constructor(t,e,r,i){T(this,FB);T(this,d0,[]);T(this,uw,new Map);T(this,fw,null);T(this,g0,0);T(this,Po,0);T(this,Mo,0);C(this,g0,t),C(this,d0,e),C(this,Po,r.rawDims.pageWidth),C(this,Mo,r.rawDims.pageHeight),C(this,fw,i)}render(){const t=document.createElement("div");t.className="textLayerImages";for(let e=0;e<c(this,d0).length;e+=6){const r=_(this,FB,wk).call(this,c(this,d0).subarray(e,e+6));r&&t.append(r)}return t.addEventListener("contextmenu",e=>{var w;if(!(e.target instanceof HTMLCanvasElement))return;const r=e.target,i=c(this,uw).get(r);if(!i)return;const s=(w=c(hv,dw))==null?void 0:w.deref();if(s===r)return;s&&(s.width=0,s.height=0),C(hv,dw,new WeakRef(r));const{inverseTransform:A,x1:a,y1:o,width:l,height:h}=i,u=c(this,fw).call(this),d=Math.ceil(a*u.width),f=Math.ceil(o*u.height),p=Math.floor((a+l/c(this,Po))*u.width),m=Math.floor((o+h/c(this,Mo))*u.height);r.width=p-d,r.height=m-f;const y=r.getContext("2d");y.setTransform(...A),y.translate(-d,-f),y.drawImage(u,0,0)}),t}};d0=new WeakMap,uw=new WeakMap,fw=new WeakMap,g0=new WeakMap,Po=new WeakMap,Mo=new WeakMap,dw=new WeakMap,FB=new WeakSet,wk=function([t,e,r,i,s,A]){const a=Math.hypot((s-t)*c(this,Po),(A-e)*c(this,Mo)),o=Math.hypot((r-t)*c(this,Po),(i-e)*c(this,Mo));if(a<c(this,g0)||o<c(this,g0))return null;const l=[(s-t)*c(this,Po)/a,(A-e)*c(this,Mo)/a,(r-t)*c(this,Po)/o,(i-e)*c(this,Mo)/o,0,0],h=Qt.inverseTransform(l),u=document.createElement("canvas");return u.className="textLayerImagePlaceholder",u.width=0,u.height=0,Object.assign(u.style,{opacity:0,position:"absolute",left:_2(t),top:_2(e),width:_2(a/c(this,Po)),height:_2(o/c(this,Mo)),transformOrigin:"0% 0%",transform:`matrix(${l.join(",")})`}),c(this,uw).set(u,{inverseTransform:h,width:a,height:o,x1:t,y1:e}),u},T(hv,dw,null);let Ob=hv;globalThis._pdfjsTestingUtils={HighlightOutliner:bS};globalThis.pdfjsLib={AbortException:cc,AnnotationEditorLayer:Mb,AnnotationEditorParamsType:Pe,AnnotationEditorType:Ee,AnnotationEditorUIManager:qh,AnnotationLayer:Lb,AnnotationMode:ec,AnnotationType:Fi,applyOpacity:eP,build:wM,ColorPicker:Cv,createValidAbsoluteUrl:l4,CSSConstants:tP,DOMSVGFactory:xv,DrawLayer:kb,FeatureTest:Mi,fetchData:OB,findContrastColor:rP,getDocument:p4,getFilenameFromUrl:YN,getPdfFilenameFromUrl:JN,getRGB:S0,getRGBA:HB,getUuid:h4,getXfaPageViewport:ZN,GlobalWorkerOptions:Da,ImageKind:tv,InvalidPDFException:Fb,isDataScheme:Cw,isPdfFile:RB,isValidExplicitDest:RP,makeArr:MB,makeMap:kB,makeObj:Tb,MathClamp:Wr,noContextMenu:QA,normalizeUnicode:qN,OPS:Oo,OutputScale:Ga,PasswordResponses:XN,PDFDataRangeTransport:m4,PDFDateString:wv,PDFWorker:w0,PermissionFlag:zN,PixelsPerInch:hc,RenderingCancelledException:DB,renderRichText:f4,ResponseException:mv,setLayerDimensions:Xh,shadow:Fe,SignatureExtractor:Do,stopEvent:Zr,SupportedImageMimeTypes:Ib,TextLayer:v0,TextLayerImages:Ob,TouchManager:yv,updateUrlHash:c4,Util:Qt,VerbosityLevel:bw,version:vM,XfaLayer:u4};const TV=Object.freeze(Object.defineProperty({__proto__:null,AbortException:cc,AnnotationEditorLayer:Mb,AnnotationEditorParamsType:Pe,AnnotationEditorType:Ee,AnnotationEditorUIManager:qh,AnnotationLayer:Lb,AnnotationMode:ec,AnnotationType:Fi,CSSConstants:tP,ColorPicker:Cv,DOMSVGFactory:xv,DrawLayer:kb,FeatureTest:Mi,GlobalWorkerOptions:Da,ImageKind:tv,InvalidPDFException:Fb,MathClamp:Wr,OPS:Oo,OutputScale:Ga,PDFDataRangeTransport:m4,PDFDateString:wv,PDFWorker:w0,PasswordResponses:XN,PermissionFlag:zN,PixelsPerInch:hc,RenderingCancelledException:DB,ResponseException:mv,SignatureExtractor:Do,SupportedImageMimeTypes:Ib,TextLayer:v0,TextLayerImages:Ob,TouchManager:yv,Util:Qt,VerbosityLevel:bw,XfaLayer:u4,applyOpacity:eP,build:wM,createValidAbsoluteUrl:l4,fetchData:OB,findContrastColor:rP,getDocument:p4,getFilenameFromUrl:YN,getPdfFilenameFromUrl:JN,getRGB:S0,getRGBA:HB,getUuid:h4,getXfaPageViewport:ZN,isDataScheme:Cw,isPdfFile:RB,isValidExplicitDest:RP,makeArr:MB,makeMap:kB,makeObj:Tb,noContextMenu:QA,normalizeUnicode:qN,renderRichText:f4,setLayerDimensions:Xh,shadow:Fe,stopEvent:Zr,updateUrlHash:c4,version:vM},Symbol.toStringTag,{value:"Module"}));Da.workerSrc="";const uU=25.4/72,K5=8;class yk{importFromFilePicker(t){const e=document.createElement("input");e.type="file",e.accept=".pdf",e.style.display="none",document.body.appendChild(e),e.addEventListener("change",async()=>{var s;const r=(s=e.files)==null?void 0:s[0];if(document.body.removeChild(e),!r)return;const i=await r.arrayBuffer();await this.convert(t,i)}),e.click()}async convert(t,e,r=1){try{const s=await(await p4({data:e}).promise).getPage(r),a=s.getViewport({scale:1}).height,o=await s.getOperatorList(),l=this.extractEntities(o,a);if(l.length===0){Mc.log.warn("[PdfImport] No vector paths found in PDF page.");return}const h=t.doc.database.tables.blockTable.modelSpace;for(const u of l)h.appendEntity(u);Mc.log.info(`[PdfImport] Imported ${l.length} entities from PDF.`)}catch(i){Mc.log.error("[PdfImport] Failed to import PDF:",i)}}extractEntities(t,e){const{OPS:r}=TV,{fnArray:i,argsArray:s}=t,A=[];let a=[],o=[],l=0,h=0;const u=()=>{o.length>1&&a.push(o),o=[]},d=()=>{u();for(const m of a){const y=this.subpathToEntity(m);y&&A.push(y)}a=[]},f=(m,y)=>m*uU,p=(m,y)=>(e-y)*uU;for(let m=0;m<i.length;m++){const y=i[m],w=s[m];switch(y){case r.moveTo:{u(),l=w[0],h=w[1],o=[{x:f(l),y:p(l,h)}];break}case r.lineTo:{l=w[0],h=w[1],o.push({x:f(l),y:p(l,h)});break}case r.curveTo:{const[B,E,S,I,L,k]=w,H=V5({x:l,y:h},{x:B,y:E},{x:S,y:I},{x:L,y:k},K5);for(const Q of H)o.push({x:f(Q.x,Q.y),y:p(Q.x,Q.y)});l=L,h=k;break}case r.curveTo2:{const[B,E,S,I]=w,L=V5({x:l,y:h},{x:l,y:h},{x:B,y:E},{x:S,y:I},K5);for(const k of L)o.push({x:f(k.x,k.y),y:p(k.x,k.y)});l=S,h=I;break}case r.curveTo3:{const[B,E,S,I]=w,L=V5({x:l,y:h},{x:B,y:E},{x:S,y:I},{x:S,y:I},K5);for(const k of L)o.push({x:f(k.x,k.y),y:p(k.x,k.y)});l=S,h=I;break}case r.closePath:{o.length>0&&a.length===0&&o.push({...o[0]}),u();break}case r.stroke:case r.fill:case r.eoFill:case r.fillStroke:case r.eoFillStroke:case r.endPath:{d();break}}}return d(),A}subpathToEntity(t){if(t.length<2)return null;if(t.length===2)return new Mc.AcDbLine(new Mc.AcGePoint3d(t[0].x,t[0].y,0),new Mc.AcGePoint3d(t[1].x,t[1].y,0));const e=new Mc.AcDbPolyline;for(let a=0;a<t.length;a++)e.addVertexAt(a,new Mc.AcGePoint2d(t[a].x,t[a].y));const r=t[0],i=t[t.length-1],s=r.x-i.x,A=r.y-i.y;return Math.sqrt(s*s+A*A)<1e-6&&(e.closed=!0),e}}function V5(n,t,e,r,i){const s=[];for(let A=1;A<=i;A++){const a=A/i,o=1-a,l=o*o*o*n.x+3*o*o*a*t.x+3*o*a*a*e.x+a*a*a*r.x,h=o*o*o*n.y+3*o*o*a*t.y+3*o*a*a*e.y+a*a*a*r.y;s.push({x:l,y:h})}return s}class bk extends uv.AcEdCommand{async execute(t){new yk().importFromFilePicker(t)}}class IV{constructor(){this.name="PdfPlugin",this.version="1.0.0",this.description="PDF export (cpdf) and import (ipdf) commands",this.registeredCommands=[]}onLoad(t,e){const r=uv.AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME;e.addCommand(r,"cpdf","cpdf",new WN),e.addCommand(r,"ipdf","ipdf",new bk),this.registeredCommands.push({group:r,name:"cpdf"},{group:r,name:"ipdf"})}onUnload(t,e){for(const r of this.registeredCommands)e.removeCmd(r.group,r.name);this.registeredCommands=[]}}async function _V(){return new IV}/*!
|
|
273
|
+
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
274
|
+
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
275
|
+
* Released under MIT License
|
|
276
|
+
*//*! *****************************************************************************
|
|
277
|
+
Copyright (c) Microsoft Corporation.
|
|
278
|
+
|
|
279
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
280
|
+
purpose with or without fee is hereby granted.
|
|
281
|
+
|
|
282
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
283
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
284
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
285
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
286
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
287
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
288
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
289
|
+
***************************************************************************** */var VS=function(n,t){return VS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},VS(n,t)};function za(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");VS(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var GS=function(){return GS=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},GS.apply(this,arguments)};function Ss(n,t,e,r){function i(s){return s instanceof e?s:new e(function(A){A(s)})}return new(e||(e=Promise))(function(s,A){function a(h){try{l(r.next(h))}catch(u){A(u)}}function o(h){try{l(r.throw(h))}catch(u){A(u)}}function l(h){h.done?s(h.value):i(h.value).then(a,o)}l((r=r.apply(n,[])).next())})}function as(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,A;return A={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function a(l){return function(h){return o([l,h])}}function o(l){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(n,e)}catch(h){l=[6,h],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function U2(n,t,e){if(arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||t)}var uc=function(){function n(t,e,r,i){this.left=t,this.top=e,this.width=r,this.height=i}return n.prototype.add=function(t,e,r,i){return new n(this.left+t,this.top+e,this.width+r,this.height+i)},n.fromClientRect=function(t,e){return new n(e.left+t.windowBounds.left,e.top+t.windowBounds.top,e.width,e.height)},n.fromDOMRectList=function(t,e){var r=Array.from(e).find(function(i){return i.width!==0});return r?new n(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):n.EMPTY},n.EMPTY=new n(0,0,0,0),n}(),YB=function(n,t){return uc.fromClientRect(n,t.getBoundingClientRect())},UV=function(n){var t=n.body,e=n.documentElement;if(!t||!e)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,e.scrollWidth),Math.max(t.offsetWidth,e.offsetWidth),Math.max(t.clientWidth,e.clientWidth)),i=Math.max(Math.max(t.scrollHeight,e.scrollHeight),Math.max(t.offsetHeight,e.offsetHeight),Math.max(t.clientHeight,e.clientHeight));return new uc(0,0,r,i)},JB=function(n){for(var t=[],e=0,r=n.length;e<r;){var i=n.charCodeAt(e++);if(i>=55296&&i<=56319&&e<r){var s=n.charCodeAt(e++);(s&64512)===56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),e--)}else t.push(i)}return t},Li=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var e=n.length;if(!e)return"";for(var r=[],i=-1,s="";++i<e;){var A=n[i];A<=65535?r.push(A):(A-=65536,r.push((A>>10)+55296,A%1024+56320)),(i+1===e||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},fU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",LV=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var L2=0;L2<fU.length;L2++)LV[fU.charCodeAt(L2)]=L2;var dU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Q2=0;Q2<dU.length;Q2++)Rm[dU.charCodeAt(Q2)]=Q2;var QV=function(n){var t=n.length*.75,e=n.length,r,i=0,s,A,a,o;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),h=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<e;r+=4)s=Rm[n.charCodeAt(r)],A=Rm[n.charCodeAt(r+1)],a=Rm[n.charCodeAt(r+2)],o=Rm[n.charCodeAt(r+3)],h[i++]=s<<2|A>>4,h[i++]=(A&15)<<4|a>>2,h[i++]=(a&3)<<6|o&63;return l},NV=function(n){for(var t=n.length,e=[],r=0;r<t;r+=2)e.push(n[r+1]<<8|n[r]);return e},PV=function(n){for(var t=n.length,e=[],r=0;r<t;r+=4)e.push(n[r+3]<<24|n[r+2]<<16|n[r+1]<<8|n[r]);return e},hd=5,B4=11,G5=2,MV=B4-hd,Bk=65536>>hd,kV=1<<hd,j5=kV-1,OV=1024>>hd,DV=Bk+OV,RV=DV,HV=32,KV=RV+HV,VV=65536>>B4,GV=1<<MV,jV=GV-1,gU=function(n,t,e){return n.slice?n.slice(t,e):new Uint16Array(Array.prototype.slice.call(n,t,e))},$V=function(n,t,e){return n.slice?n.slice(t,e):new Uint32Array(Array.prototype.slice.call(n,t,e))},WV=function(n,t){var e=QV(n),r=Array.isArray(e)?PV(e):new Uint32Array(e),i=Array.isArray(e)?NV(e):new Uint16Array(e),s=24,A=gU(i,s/2,r[4]/2),a=r[5]===2?gU(i,(s+r[4])/2):$V(r,Math.ceil((s+r[4])/4));return new zV(r[0],r[1],r[2],r[3],A,a)},zV=function(){function n(t,e,r,i,s,A){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=A}return n.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>hd],e=(e<<G5)+(t&j5),this.data[e];if(t<=65535)return e=this.index[Bk+(t-55296>>hd)],e=(e<<G5)+(t&j5),this.data[e];if(t<this.highStart)return e=KV-VV+(t>>B4),e=this.index[e],e+=t>>hd&jV,e=this.index[e],e=(e<<G5)+(t&j5),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},n}(),pU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",XV=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var N2=0;N2<pU.length;N2++)XV[pU.charCodeAt(N2)]=N2;var qV="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",mU=50,YV=1,Ck=2,xk=3,JV=4,ZV=5,vU=7,Ek=8,wU=9,Kh=10,jS=11,yU=12,$S=13,tG=14,Hm=15,WS=16,P2=17,sm=18,eG=19,bU=20,zS=21,Am=22,$5=23,Zd=24,AA=25,Km=26,Vm=27,tg=28,rG=29,Lu=30,iG=31,M2=32,k2=33,XS=34,qS=35,YS=36,Ev=37,JS=38,ub=39,fb=40,W5=41,Sk=42,nG=43,sG=[9001,65288],Fk="!",Xe="×",O2="÷",ZS=WV(qV),ll=[Lu,YS],tF=[YV,Ck,xk,ZV],Tk=[Kh,Ek],BU=[Vm,Km],AG=tF.concat(Tk),CU=[JS,ub,fb,XS,qS],aG=[Hm,$S],oG=function(n,t){t===void 0&&(t="strict");var e=[],r=[],i=[];return n.forEach(function(s,A){var a=ZS.get(s);if(a>mU?(i.push(!0),a-=mU):i.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return r.push(A),e.push(WS);if(a===JV||a===jS){if(A===0)return r.push(A),e.push(Lu);var o=e[A-1];return AG.indexOf(o)===-1?(r.push(r[A-1]),e.push(o)):(r.push(A),e.push(Lu))}if(r.push(A),a===iG)return e.push(t==="strict"?zS:Ev);if(a===Sk||a===rG)return e.push(Lu);if(a===nG)return s>=131072&&s<=196605||s>=196608&&s<=262141?e.push(Ev):e.push(Lu);e.push(a)}),[r,e,i]},z5=function(n,t,e,r){var i=r[e];if(Array.isArray(n)?n.indexOf(i)!==-1:n===i)for(var s=e;s<=r.length;){s++;var A=r[s];if(A===t)return!0;if(A!==Kh)break}if(i===Kh)for(var s=e;s>0;){s--;var a=r[s];if(Array.isArray(n)?n.indexOf(a)!==-1:n===a)for(var o=e;o<=r.length;){o++;var A=r[o];if(A===t)return!0;if(A!==Kh)break}if(a!==Kh)break}return!1},xU=function(n,t){for(var e=n;e>=0;){var r=t[e];if(r===Kh)e--;else return r}return 0},lG=function(n,t,e,r,i){if(e[r]===0)return Xe;var s=r-1;if(Array.isArray(i)&&i[s]===!0)return Xe;var A=s-1,a=s+1,o=t[s],l=A>=0?t[A]:0,h=t[a];if(o===Ck&&h===xk)return Xe;if(tF.indexOf(o)!==-1)return Fk;if(tF.indexOf(h)!==-1||Tk.indexOf(h)!==-1)return Xe;if(xU(s,t)===Ek)return O2;if(ZS.get(n[s])===jS||(o===M2||o===k2)&&ZS.get(n[a])===jS||o===vU||h===vU||o===wU||[Kh,$S,Hm].indexOf(o)===-1&&h===wU||[P2,sm,eG,Zd,tg].indexOf(h)!==-1||xU(s,t)===Am||z5($5,Am,s,t)||z5([P2,sm],zS,s,t)||z5(yU,yU,s,t))return Xe;if(o===Kh)return O2;if(o===$5||h===$5)return Xe;if(h===WS||o===WS)return O2;if([$S,Hm,zS].indexOf(h)!==-1||o===tG||l===YS&&aG.indexOf(o)!==-1||o===tg&&h===YS||h===bU||ll.indexOf(h)!==-1&&o===AA||ll.indexOf(o)!==-1&&h===AA||o===Vm&&[Ev,M2,k2].indexOf(h)!==-1||[Ev,M2,k2].indexOf(o)!==-1&&h===Km||ll.indexOf(o)!==-1&&BU.indexOf(h)!==-1||BU.indexOf(o)!==-1&&ll.indexOf(h)!==-1||[Vm,Km].indexOf(o)!==-1&&(h===AA||[Am,Hm].indexOf(h)!==-1&&t[a+1]===AA)||[Am,Hm].indexOf(o)!==-1&&h===AA||o===AA&&[AA,tg,Zd].indexOf(h)!==-1)return Xe;if([AA,tg,Zd,P2,sm].indexOf(h)!==-1)for(var u=s;u>=0;){var d=t[u];if(d===AA)return Xe;if([tg,Zd].indexOf(d)!==-1)u--;else break}if([Vm,Km].indexOf(h)!==-1)for(var u=[P2,sm].indexOf(o)!==-1?A:s;u>=0;){var d=t[u];if(d===AA)return Xe;if([tg,Zd].indexOf(d)!==-1)u--;else break}if(JS===o&&[JS,ub,XS,qS].indexOf(h)!==-1||[ub,XS].indexOf(o)!==-1&&[ub,fb].indexOf(h)!==-1||[fb,qS].indexOf(o)!==-1&&h===fb||CU.indexOf(o)!==-1&&[bU,Km].indexOf(h)!==-1||CU.indexOf(h)!==-1&&o===Vm||ll.indexOf(o)!==-1&&ll.indexOf(h)!==-1||o===Zd&&ll.indexOf(h)!==-1||ll.concat(AA).indexOf(o)!==-1&&h===Am&&sG.indexOf(n[a])===-1||ll.concat(AA).indexOf(h)!==-1&&o===sm)return Xe;if(o===W5&&h===W5){for(var f=e[s],p=1;f>0&&(f--,t[f]===W5);)p++;if(p%2!==0)return Xe}return o===M2&&h===k2?Xe:O2},cG=function(n,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var e=oG(n,t.lineBreak),r=e[0],i=e[1],s=e[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(i=i.map(function(a){return[AA,Lu,Sk].indexOf(a)!==-1?Ev:a}));var A=t.wordBreak==="keep-all"?s.map(function(a,o){return a&&n[o]>=19968&&n[o]<=40959}):void 0;return[r,i,A]},hG=function(){function n(t,e,r,i){this.codePoints=t,this.required=e===Fk,this.start=r,this.end=i}return n.prototype.slice=function(){return Li.apply(void 0,this.codePoints.slice(this.start,this.end))},n}(),uG=function(n,t){var e=JB(n),r=cG(e,t),i=r[0],s=r[1],A=r[2],a=e.length,o=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var h=Xe;l<a&&(h=lG(e,s,i,++l,A))===Xe;);if(h!==Xe||l===a){var u=new hG(e,h,o,l);return o=l,{value:u,done:!1}}return{done:!0,value:null}}}},fG=1,dG=2,Sw=4,EU=8,Db=10,SU=47,iv=92,gG=9,pG=32,D2=34,am=61,mG=35,vG=36,wG=37,R2=39,H2=40,om=41,yG=95,$s=45,bG=33,BG=60,CG=62,xG=64,EG=91,SG=93,FG=61,TG=123,K2=63,IG=125,FU=124,_G=126,UG=128,TU=65533,X5=42,Du=43,LG=44,QG=58,NG=59,Sv=46,PG=0,MG=8,kG=11,OG=14,DG=31,RG=127,oo=-1,Ik=48,_k=97,Uk=101,HG=102,KG=117,VG=122,Lk=65,Qk=69,Nk=70,GG=85,jG=90,os=function(n){return n>=Ik&&n<=57},$G=function(n){return n>=55296&&n<=57343},eg=function(n){return os(n)||n>=Lk&&n<=Nk||n>=_k&&n<=HG},WG=function(n){return n>=_k&&n<=VG},zG=function(n){return n>=Lk&&n<=jG},XG=function(n){return WG(n)||zG(n)},qG=function(n){return n>=UG},V2=function(n){return n===Db||n===gG||n===pG},Rb=function(n){return XG(n)||qG(n)||n===yG},IU=function(n){return Rb(n)||os(n)||n===$s},YG=function(n){return n>=PG&&n<=MG||n===kG||n>=OG&&n<=DG||n===RG},Vc=function(n,t){return n!==iv?!1:t!==Db},G2=function(n,t,e){return n===$s?Rb(t)||Vc(t,e):Rb(n)?!0:!!(n===iv&&Vc(n,t))},q5=function(n,t,e){return n===Du||n===$s?os(t)?!0:t===Sv&&os(e):os(n===Sv?t:n)},JG=function(n){var t=0,e=1;(n[t]===Du||n[t]===$s)&&(n[t]===$s&&(e=-1),t++);for(var r=[];os(n[t]);)r.push(n[t++]);var i=r.length?parseInt(Li.apply(void 0,r),10):0;n[t]===Sv&&t++;for(var s=[];os(n[t]);)s.push(n[t++]);var A=s.length,a=A?parseInt(Li.apply(void 0,s),10):0;(n[t]===Qk||n[t]===Uk)&&t++;var o=1;(n[t]===Du||n[t]===$s)&&(n[t]===$s&&(o=-1),t++);for(var l=[];os(n[t]);)l.push(n[t++]);var h=l.length?parseInt(Li.apply(void 0,l),10):0;return e*(i+a*Math.pow(10,-A))*Math.pow(10,o*h)},ZG={type:2},tj={type:3},ej={type:4},rj={type:13},ij={type:8},nj={type:21},sj={type:9},Aj={type:10},aj={type:11},oj={type:12},lj={type:14},j2={type:23},cj={type:1},hj={type:25},uj={type:24},fj={type:26},dj={type:27},gj={type:28},pj={type:29},mj={type:31},eF={type:32},Pk=function(){function n(){this._value=[]}return n.prototype.write=function(t){this._value=this._value.concat(JB(t))},n.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==eF;)t.push(e),e=this.consumeToken();return t},n.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case D2:return this.consumeStringToken(D2);case mG:var e=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);if(IU(e)||Vc(r,i)){var s=G2(e,r,i)?dG:fG,A=this.consumeName();return{type:5,value:A,flags:s}}break;case vG:if(this.peekCodePoint(0)===am)return this.consumeCodePoint(),rj;break;case R2:return this.consumeStringToken(R2);case H2:return ZG;case om:return tj;case X5:if(this.peekCodePoint(0)===am)return this.consumeCodePoint(),lj;break;case Du:if(q5(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case LG:return ej;case $s:var a=t,o=this.peekCodePoint(0),l=this.peekCodePoint(1);if(q5(a,o,l))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(G2(a,o,l))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(o===$s&&l===CG)return this.consumeCodePoint(),this.consumeCodePoint(),uj;break;case Sv:if(q5(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case SU:if(this.peekCodePoint(0)===X5)for(this.consumeCodePoint();;){var h=this.consumeCodePoint();if(h===X5&&(h=this.consumeCodePoint(),h===SU))return this.consumeToken();if(h===oo)return this.consumeToken()}break;case QG:return fj;case NG:return dj;case BG:if(this.peekCodePoint(0)===bG&&this.peekCodePoint(1)===$s&&this.peekCodePoint(2)===$s)return this.consumeCodePoint(),this.consumeCodePoint(),hj;break;case xG:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),f=this.peekCodePoint(2);if(G2(u,d,f)){var A=this.consumeName();return{type:7,value:A}}break;case EG:return gj;case iv:if(Vc(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case SG:return pj;case FG:if(this.peekCodePoint(0)===am)return this.consumeCodePoint(),ij;break;case TG:return aj;case IG:return oj;case KG:case GG:var p=this.peekCodePoint(0),m=this.peekCodePoint(1);return p===Du&&(eg(m)||m===K2)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case FU:if(this.peekCodePoint(0)===am)return this.consumeCodePoint(),sj;if(this.peekCodePoint(0)===FU)return this.consumeCodePoint(),nj;break;case _G:if(this.peekCodePoint(0)===am)return this.consumeCodePoint(),Aj;break;case oo:return eF}return V2(t)?(this.consumeWhiteSpace(),mj):os(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):Rb(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:Li(t)}},n.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},n.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},n.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},n.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();eg(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var r=!1;e===K2&&t.length<6;)t.push(e),e=this.consumeCodePoint(),r=!0;if(r){var i=parseInt(Li.apply(void 0,t.map(function(o){return o===K2?Ik:o})),16),s=parseInt(Li.apply(void 0,t.map(function(o){return o===K2?Nk:o})),16);return{type:30,start:i,end:s}}var A=parseInt(Li.apply(void 0,t),16);if(this.peekCodePoint(0)===$s&&eg(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var a=[];eg(e)&&a.length<6;)a.push(e),e=this.consumeCodePoint();var s=parseInt(Li.apply(void 0,a),16);return{type:30,start:A,end:s}}else return{type:30,start:A,end:A}},n.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===H2?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===H2?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},n.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===oo)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===R2||e===D2){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===oo||this.peekCodePoint(0)===om)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),j2)}for(;;){var i=this.consumeCodePoint();if(i===oo||i===om)return{type:22,value:Li.apply(void 0,t)};if(V2(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===oo||this.peekCodePoint(0)===om?(this.consumeCodePoint(),{type:22,value:Li.apply(void 0,t)}):(this.consumeBadUrlRemnants(),j2);if(i===D2||i===R2||i===H2||YG(i))return this.consumeBadUrlRemnants(),j2;if(i===iv)if(Vc(i,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),j2;else t.push(i)}},n.prototype.consumeWhiteSpace=function(){for(;V2(this.peekCodePoint(0));)this.consumeCodePoint()},n.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===om||t===oo)return;Vc(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},n.prototype.consumeStringSlice=function(t){for(var e=5e4,r="";t>0;){var i=Math.min(e,t);r+=Li.apply(void 0,this._value.splice(0,i)),t-=i}return this._value.shift(),r},n.prototype.consumeStringToken=function(t){var e="",r=0;do{var i=this._value[r];if(i===oo||i===void 0||i===t)return e+=this.consumeStringSlice(r),{type:0,value:e};if(i===Db)return this._value.splice(0,r),cj;if(i===iv){var s=this._value[r+1];s!==oo&&s!==void 0&&(s===Db?(e+=this.consumeStringSlice(r),r=-1,this._value.shift()):Vc(i,s)&&(e+=this.consumeStringSlice(r),e+=Li(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},n.prototype.consumeNumber=function(){var t=[],e=Sw,r=this.peekCodePoint(0);for((r===Du||r===$s)&&t.push(this.consumeCodePoint());os(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(r===Sv&&os(i))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=EU;os(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0),i=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((r===Qk||r===Uk)&&((i===Du||i===$s)&&os(s)||os(i)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=EU;os(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[JG(t),e]},n.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],r=t[1],i=this.peekCodePoint(0),s=this.peekCodePoint(1),A=this.peekCodePoint(2);if(G2(i,s,A)){var a=this.consumeName();return{type:15,number:e,flags:r,unit:a}}return i===wG?(this.consumeCodePoint(),{type:16,number:e,flags:r}):{type:17,number:e,flags:r}},n.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(eg(t)){for(var e=Li(t);eg(this.peekCodePoint(0))&&e.length<6;)e+=Li(this.consumeCodePoint());V2(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(e,16);return r===0||$G(r)||r>1114111?TU:r}return t===oo?TU:t},n.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(IU(e))t+=Li(e);else if(Vc(e,this.peekCodePoint(0)))t+=Li(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),t}},n}(),Mk=function(){function n(t){this._tokens=t}return n.create=function(t){var e=new Pk;return e.write(t),new n(e.read())},n.parseValue=function(t){return n.create(t).parseComponentValue()},n.parseValues=function(t){return n.create(t).parseComponentValues()},n.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},n.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(e.type===32)return t;t.push(e),t.push()}},n.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},n.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},r=this.consumeToken();;){if(r.type===32||wj(r,t))return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue()),r=this.consumeToken()}},n.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return e;this.reconsumeToken(r),e.values.push(this.consumeComponentValue())}},n.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?eF:t},n.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},n}(),Fw=function(n){return n.type===15},F0=function(n){return n.type===17},Sr=function(n){return n.type===20},vj=function(n){return n.type===0},rF=function(n,t){return Sr(n)&&n.value===t},kk=function(n){return n.type!==31},y0=function(n){return n.type!==31&&n.type!==4},Go=function(n){var t=[],e=[];return n.forEach(function(r){if(r.type===4){if(e.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(e),e=[];return}r.type!==31&&e.push(r)}),e.length&&t.push(e),t},wj=function(n,t){return t===11&&n.type===12||t===28&&n.type===29?!0:t===2&&n.type===3},Yh=function(n){return n.type===17||n.type===15},$i=function(n){return n.type===16||Yh(n)},Ok=function(n){return n.length>1?[n[0],n[1]]:[n[0]]},Dn={type:17,number:0,flags:Sw},C4={type:16,number:50,flags:Sw},Vh={type:16,number:100,flags:Sw},Gm=function(n,t,e){var r=n[0],i=n[1];return[Or(r,t),Or(typeof i<"u"?i:r,e)]},Or=function(n,t){if(n.type===16)return n.number/100*t;if(Fw(n))switch(n.unit){case"rem":case"em":return 16*n.number;case"px":default:return n.number}return n.number},Dk="deg",Rk="grad",Hk="rad",Kk="turn",ZB={name:"angle",parse:function(n,t){if(t.type===15)switch(t.unit){case Dk:return Math.PI*t.number/180;case Rk:return Math.PI/200*t.number;case Hk:return t.number;case Kk:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},Vk=function(n){return n.type===15&&(n.unit===Dk||n.unit===Rk||n.unit===Hk||n.unit===Kk)},Gk=function(n){var t=n.filter(Sr).map(function(e){return e.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Dn,Dn];case"to top":case"bottom":return na(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Dn,Vh];case"to right":case"left":return na(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Vh,Vh];case"to bottom":case"top":return na(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Vh,Dn];case"to left":case"right":return na(270)}return 0},na=function(n){return Math.PI*n/180},jh={name:"color",parse:function(n,t){if(t.type===18){var e=yj[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return e(n,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),i=t.value.substring(1,2),s=t.value.substring(2,3);return Gh(parseInt(r+r,16),parseInt(i+i,16),parseInt(s+s,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),i=t.value.substring(1,2),s=t.value.substring(2,3),A=t.value.substring(3,4);return Gh(parseInt(r+r,16),parseInt(i+i,16),parseInt(s+s,16),parseInt(A+A,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),i=t.value.substring(2,4),s=t.value.substring(4,6);return Gh(parseInt(r,16),parseInt(i,16),parseInt(s,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),i=t.value.substring(2,4),s=t.value.substring(4,6),A=t.value.substring(6,8);return Gh(parseInt(r,16),parseInt(i,16),parseInt(s,16),parseInt(A,16)/255)}}if(t.type===20){var a=nc[t.value.toUpperCase()];if(typeof a<"u")return a}return nc.TRANSPARENT}},$h=function(n){return(255&n)===0},ln=function(n){var t=255&n,e=255&n>>8,r=255&n>>16,i=255&n>>24;return t<255?"rgba("+i+","+r+","+e+","+t/255+")":"rgb("+i+","+r+","+e+")"},Gh=function(n,t,e,r){return(n<<24|t<<16|e<<8|Math.round(r*255)<<0)>>>0},_U=function(n,t){if(n.type===17)return n.number;if(n.type===16){var e=t===3?1:255;return t===3?n.number/100*e:Math.round(n.number/100*e)}return 0},UU=function(n,t){var e=t.filter(y0);if(e.length===3){var r=e.map(_U),i=r[0],s=r[1],A=r[2];return Gh(i,s,A,1)}if(e.length===4){var a=e.map(_U),i=a[0],s=a[1],A=a[2],o=a[3];return Gh(i,s,A,o)}return 0};function Y5(n,t,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(t-n)*e*6+n:e<1/2?t:e<2/3?(t-n)*6*(2/3-e)+n:n}var LU=function(n,t){var e=t.filter(y0),r=e[0],i=e[1],s=e[2],A=e[3],a=(r.type===17?na(r.number):ZB.parse(n,r))/(Math.PI*2),o=$i(i)?i.number/100:0,l=$i(s)?s.number/100:0,h=typeof A<"u"&&$i(A)?Or(A,1):1;if(o===0)return Gh(l*255,l*255,l*255,1);var u=l<=.5?l*(o+1):l+o-l*o,d=l*2-u,f=Y5(d,u,a+1/3),p=Y5(d,u,a),m=Y5(d,u,a-1/3);return Gh(f*255,p*255,m*255,h)},yj={hsl:LU,hsla:LU,rgb:UU,rgba:UU},nv=function(n,t){return jh.parse(n,Mk.create(t).parseComponentValue())},nc={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},bj={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(n,t){return t.map(function(e){if(Sr(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Bj={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},tC=function(n,t){var e=jh.parse(n,t[0]),r=t[1];return r&&$i(r)?{color:e,stop:r}:{color:e,stop:null}},QU=function(n,t){var e=n[0],r=n[n.length-1];e.stop===null&&(e.stop=Dn),r.stop===null&&(r.stop=Vh);for(var i=[],s=0,A=0;A<n.length;A++){var a=n[A].stop;if(a!==null){var o=Or(a,t);o>s?i.push(o):i.push(s),s=o}else i.push(null)}for(var l=null,A=0;A<i.length;A++){var h=i[A];if(h===null)l===null&&(l=A);else if(l!==null){for(var u=A-l,d=i[l-1],f=(h-d)/(u+1),p=1;p<=u;p++)i[l+p-1]=f*p;l=null}}return n.map(function(m,y){var w=m.color;return{color:w,stop:Math.max(Math.min(1,i[y]/t),0)}})},Cj=function(n,t,e){var r=t/2,i=e/2,s=Or(n[0],t)-r,A=i-Or(n[1],e);return(Math.atan2(A,s)+Math.PI*2)%(Math.PI*2)},xj=function(n,t,e){var r=typeof n=="number"?n:Cj(n,t,e),i=Math.abs(t*Math.sin(r))+Math.abs(e*Math.cos(r)),s=t/2,A=e/2,a=i/2,o=Math.sin(r-Math.PI/2)*a,l=Math.cos(r-Math.PI/2)*a;return[i,s-l,s+l,A-o,A+o]},ya=function(n,t){return Math.sqrt(n*n+t*t)},NU=function(n,t,e,r,i){var s=[[0,0],[0,t],[n,0],[n,t]];return s.reduce(function(A,a){var o=a[0],l=a[1],h=ya(e-o,r-l);return(i?h<A.optimumDistance:h>A.optimumDistance)?{optimumCorner:a,optimumDistance:h}:A},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Ej=function(n,t,e,r,i){var s=0,A=0;switch(n.size){case 0:n.shape===0?s=A=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-i)):n.shape===1&&(s=Math.min(Math.abs(t),Math.abs(t-r)),A=Math.min(Math.abs(e),Math.abs(e-i)));break;case 2:if(n.shape===0)s=A=Math.min(ya(t,e),ya(t,e-i),ya(t-r,e),ya(t-r,e-i));else if(n.shape===1){var a=Math.min(Math.abs(e),Math.abs(e-i))/Math.min(Math.abs(t),Math.abs(t-r)),o=NU(r,i,t,e,!0),l=o[0],h=o[1];s=ya(l-t,(h-e)/a),A=a*s}break;case 1:n.shape===0?s=A=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(e),Math.abs(e-i)):n.shape===1&&(s=Math.max(Math.abs(t),Math.abs(t-r)),A=Math.max(Math.abs(e),Math.abs(e-i)));break;case 3:if(n.shape===0)s=A=Math.max(ya(t,e),ya(t,e-i),ya(t-r,e),ya(t-r,e-i));else if(n.shape===1){var a=Math.max(Math.abs(e),Math.abs(e-i))/Math.max(Math.abs(t),Math.abs(t-r)),u=NU(r,i,t,e,!1),l=u[0],h=u[1];s=ya(l-t,(h-e)/a),A=a*s}break}return Array.isArray(n.size)&&(s=Or(n.size[0],r),A=n.size.length===2?Or(n.size[1],i):s),[s,A]},Sj=function(n,t){var e=na(180),r=[];return Go(t).forEach(function(i,s){if(s===0){var A=i[0];if(A.type===20&&A.value==="to"){e=Gk(i);return}else if(Vk(A)){e=ZB.parse(n,A);return}}var a=tC(n,i);r.push(a)}),{angle:e,stops:r,type:1}},$2=function(n,t){var e=na(180),r=[];return Go(t).forEach(function(i,s){if(s===0){var A=i[0];if(A.type===20&&["top","left","right","bottom"].indexOf(A.value)!==-1){e=Gk(i);return}else if(Vk(A)){e=(ZB.parse(n,A)+na(270))%na(360);return}}var a=tC(n,i);r.push(a)}),{angle:e,stops:r,type:1}},Fj=function(n,t){var e=na(180),r=[],i=1,s=0,A=3,a=[];return Go(t).forEach(function(o,l){var h=o[0];if(l===0){if(Sr(h)&&h.value==="linear"){i=1;return}else if(Sr(h)&&h.value==="radial"){i=2;return}}if(h.type===18){if(h.name==="from"){var u=jh.parse(n,h.values[0]);r.push({stop:Dn,color:u})}else if(h.name==="to"){var u=jh.parse(n,h.values[0]);r.push({stop:Vh,color:u})}else if(h.name==="color-stop"){var d=h.values.filter(y0);if(d.length===2){var u=jh.parse(n,d[1]),f=d[0];F0(f)&&r.push({stop:{type:16,number:f.number*100,flags:f.flags},color:u})}}}}),i===1?{angle:(e+na(180))%na(360),stops:r,type:i}:{size:A,shape:s,stops:r,position:a,type:i}},jk="closest-side",$k="farthest-side",Wk="closest-corner",zk="farthest-corner",Xk="circle",qk="ellipse",Yk="cover",Jk="contain",Tj=function(n,t){var e=0,r=3,i=[],s=[];return Go(t).forEach(function(A,a){var o=!0;if(a===0){var l=!1;o=A.reduce(function(u,d){if(l)if(Sr(d))switch(d.value){case"center":return s.push(C4),u;case"top":case"left":return s.push(Dn),u;case"right":case"bottom":return s.push(Vh),u}else($i(d)||Yh(d))&&s.push(d);else if(Sr(d))switch(d.value){case Xk:return e=0,!1;case qk:return e=1,!1;case"at":return l=!0,!1;case jk:return r=0,!1;case Yk:case $k:return r=1,!1;case Jk:case Wk:return r=2,!1;case zk:return r=3,!1}else if(Yh(d)||$i(d))return Array.isArray(r)||(r=[]),r.push(d),!1;return u},o)}if(o){var h=tC(n,A);i.push(h)}}),{size:r,shape:e,stops:i,position:s,type:2}},W2=function(n,t){var e=0,r=3,i=[],s=[];return Go(t).forEach(function(A,a){var o=!0;if(a===0?o=A.reduce(function(h,u){if(Sr(u))switch(u.value){case"center":return s.push(C4),!1;case"top":case"left":return s.push(Dn),!1;case"right":case"bottom":return s.push(Vh),!1}else if($i(u)||Yh(u))return s.push(u),!1;return h},o):a===1&&(o=A.reduce(function(h,u){if(Sr(u))switch(u.value){case Xk:return e=0,!1;case qk:return e=1,!1;case Jk:case jk:return r=0,!1;case $k:return r=1,!1;case Wk:return r=2,!1;case Yk:case zk:return r=3,!1}else if(Yh(u)||$i(u))return Array.isArray(r)||(r=[]),r.push(u),!1;return h},o)),o){var l=tC(n,A);i.push(l)}}),{size:r,shape:e,stops:i,position:s,type:2}},Ij=function(n){return n.type===1},_j=function(n){return n.type===2},x4={name:"image",parse:function(n,t){if(t.type===22){var e={url:t.value,type:0};return n.cache.addImage(t.value),e}if(t.type===18){var r=Zk[t.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(n,t.values)}throw new Error("Unsupported image type "+t.type)}};function Uj(n){return!(n.type===20&&n.value==="none")&&(n.type!==18||!!Zk[n.name])}var Zk={"linear-gradient":Sj,"-moz-linear-gradient":$2,"-ms-linear-gradient":$2,"-o-linear-gradient":$2,"-webkit-linear-gradient":$2,"radial-gradient":Tj,"-moz-radial-gradient":W2,"-ms-radial-gradient":W2,"-o-radial-gradient":W2,"-webkit-radial-gradient":W2,"-webkit-gradient":Fj},Lj={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(n,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t.filter(function(r){return y0(r)&&Uj(r)}).map(function(r){return x4.parse(n,r)})}},Qj={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(n,t){return t.map(function(e){if(Sr(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Nj={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(n,t){return Go(t).map(function(e){return e.filter($i)}).map(Ok)}},Pj={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(n,t){return Go(t).map(function(e){return e.filter(Sr).map(function(r){return r.value}).join(" ")}).map(Mj)}},Mj=function(n){switch(n){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Hg;(function(n){n.AUTO="auto",n.CONTAIN="contain",n.COVER="cover"})(Hg||(Hg={}));var kj={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(n,t){return Go(t).map(function(e){return e.filter(Oj)})}},Oj=function(n){return Sr(n)||$i(n)},eC=function(n){return{name:"border-"+n+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Dj=eC("top"),Rj=eC("right"),Hj=eC("bottom"),Kj=eC("left"),rC=function(n){return{name:"border-radius-"+n,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return Ok(e.filter($i))}}},Vj=rC("top-left"),Gj=rC("top-right"),jj=rC("bottom-right"),$j=rC("bottom-left"),iC=function(n){return{name:"border-"+n+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Wj=iC("top"),zj=iC("right"),Xj=iC("bottom"),qj=iC("left"),nC=function(n){return{name:"border-"+n+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return Fw(e)?e.number:0}}},Yj=nC("top"),Jj=nC("right"),Zj=nC("bottom"),t$=nC("left"),e$={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},r$={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(n,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},i$={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(n,t){return t.filter(Sr).reduce(function(e,r){return e|n$(r.value)},0)}},n$=function(n){switch(n){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},s$={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},A$={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(n,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},Hb;(function(n){n.NORMAL="normal",n.STRICT="strict"})(Hb||(Hb={}));var a$={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"strict":return Hb.STRICT;case"normal":default:return Hb.NORMAL}}},o$={name:"line-height",initialValue:"normal",prefix:!1,type:4},PU=function(n,t){return Sr(n)&&n.value==="normal"?1.2*t:n.type===17?t*n.number:$i(n)?Or(n,t):t},l$={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(n,t){return t.type===20&&t.value==="none"?null:x4.parse(n,t)}},c$={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(n,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},iF={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},sC=function(n){return{name:"margin-"+n,initialValue:"0",prefix:!1,type:4}},h$=sC("top"),u$=sC("right"),f$=sC("bottom"),d$=sC("left"),g$={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(n,t){return t.filter(Sr).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},p$={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},AC=function(n){return{name:"padding-"+n,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},m$=AC("top"),v$=AC("right"),w$=AC("bottom"),y$=AC("left"),b$={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(n,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},B$={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(n,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},C$={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.length===1&&rF(t[0],"none")?[]:Go(t).map(function(e){for(var r={color:nc.TRANSPARENT,offsetX:Dn,offsetY:Dn,blur:Dn},i=0,s=0;s<e.length;s++){var A=e[s];Yh(A)?(i===0?r.offsetX=A:i===1?r.offsetY=A:r.blur=A,i++):r.color=jh.parse(n,A)}return r})}},x$={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},E$={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(n,t){if(t.type===20&&t.value==="none")return null;if(t.type===18){var e=T$[t.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return e(t.values)}return null}},S$=function(n){var t=n.filter(function(e){return e.type===17}).map(function(e){return e.number});return t.length===6?t:null},F$=function(n){var t=n.filter(function(o){return o.type===17}).map(function(o){return o.number}),e=t[0],r=t[1];t[2],t[3];var i=t[4],s=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var A=t[12],a=t[13];return t[14],t[15],t.length===16?[e,r,i,s,A,a]:null},T$={matrix:S$,matrix3d:F$},MU={type:16,number:50,flags:Sw},I$=[MU,MU],_$={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(n,t){var e=t.filter($i);return e.length!==2?I$:[e[0],e[1]]}},U$={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(n,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},sv;(function(n){n.NORMAL="normal",n.BREAK_ALL="break-all",n.KEEP_ALL="keep-all"})(sv||(sv={}));var L$={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"break-all":return sv.BREAK_ALL;case"keep-all":return sv.KEEP_ALL;case"normal":default:return sv.NORMAL}}},Q$={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(n,t){if(t.type===20)return{auto:!0,order:0};if(F0(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},tO={name:"time",parse:function(n,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},N$={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(n,t){return F0(t)?t.number:1}},P$={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},M$={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(n,t){return t.filter(Sr).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return e!==0})}},k$={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(n,t){var e=[],r=[];return t.forEach(function(i){switch(i.type){case 20:case 0:e.push(i.value);break;case 17:e.push(i.number.toString());break;case 4:r.push(e.join(" ")),e.length=0;break}}),e.length&&r.push(e.join(" ")),r.map(function(i){return i.indexOf(" ")===-1?i:"'"+i+"'"})}},O$={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},D$={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(n,t){if(F0(t))return t.number;if(Sr(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},R$={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.filter(Sr).map(function(e){return e.value})}},H$={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(n,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},sn=function(n,t){return(n&t)!==0},K$={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(n,t){if(t.length===0)return[];var e=t[0];return e.type===20&&e.value==="none"?[]:t}},V$={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;for(var r=[],i=t.filter(kk),s=0;s<i.length;s++){var A=i[s],a=i[s+1];if(A.type===20){var o=a&&F0(a)?a.number:1;r.push({counter:A.value,increment:o})}}return r}},G$={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return[];for(var e=[],r=t.filter(kk),i=0;i<r.length;i++){var s=r[i],A=r[i+1];if(Sr(s)&&s.value!=="none"){var a=A&&F0(A)?A.number:0;e.push({counter:s.value,reset:a})}}return e}},j$={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(n,t){return t.filter(Fw).map(function(e){return tO.parse(n,e)})}},$$={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(n,t){if(t.length===0)return null;var e=t[0];if(e.type===20&&e.value==="none")return null;var r=[],i=t.filter(vj);if(i.length%2!==0)return null;for(var s=0;s<i.length;s+=2){var A=i[s].value,a=i[s+1].value;r.push({open:A,close:a})}return r}},kU=function(n,t,e){if(!n)return"";var r=n[Math.min(t,n.length-1)];return r?e?r.open:r.close:""},W$={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(n,t){return t.length===1&&rF(t[0],"none")?[]:Go(t).map(function(e){for(var r={color:255,offsetX:Dn,offsetY:Dn,blur:Dn,spread:Dn,inset:!1},i=0,s=0;s<e.length;s++){var A=e[s];rF(A,"inset")?r.inset=!0:Yh(A)?(i===0?r.offsetX=A:i===1?r.offsetY=A:i===2?r.blur=A:r.spread=A,i++):r.color=jh.parse(n,A)}return r})}},z$={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(n,t){var e=[0,1,2],r=[];return t.filter(Sr).forEach(function(i){switch(i.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),e.forEach(function(i){r.indexOf(i)===-1&&r.push(i)}),r}},X$={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},q$={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(n,t){return Fw(t)?t.number:0}},Y$=function(){function n(t,e){var r,i;this.animationDuration=Gt(t,j$,e.animationDuration),this.backgroundClip=Gt(t,bj,e.backgroundClip),this.backgroundColor=Gt(t,Bj,e.backgroundColor),this.backgroundImage=Gt(t,Lj,e.backgroundImage),this.backgroundOrigin=Gt(t,Qj,e.backgroundOrigin),this.backgroundPosition=Gt(t,Nj,e.backgroundPosition),this.backgroundRepeat=Gt(t,Pj,e.backgroundRepeat),this.backgroundSize=Gt(t,kj,e.backgroundSize),this.borderTopColor=Gt(t,Dj,e.borderTopColor),this.borderRightColor=Gt(t,Rj,e.borderRightColor),this.borderBottomColor=Gt(t,Hj,e.borderBottomColor),this.borderLeftColor=Gt(t,Kj,e.borderLeftColor),this.borderTopLeftRadius=Gt(t,Vj,e.borderTopLeftRadius),this.borderTopRightRadius=Gt(t,Gj,e.borderTopRightRadius),this.borderBottomRightRadius=Gt(t,jj,e.borderBottomRightRadius),this.borderBottomLeftRadius=Gt(t,$j,e.borderBottomLeftRadius),this.borderTopStyle=Gt(t,Wj,e.borderTopStyle),this.borderRightStyle=Gt(t,zj,e.borderRightStyle),this.borderBottomStyle=Gt(t,Xj,e.borderBottomStyle),this.borderLeftStyle=Gt(t,qj,e.borderLeftStyle),this.borderTopWidth=Gt(t,Yj,e.borderTopWidth),this.borderRightWidth=Gt(t,Jj,e.borderRightWidth),this.borderBottomWidth=Gt(t,Zj,e.borderBottomWidth),this.borderLeftWidth=Gt(t,t$,e.borderLeftWidth),this.boxShadow=Gt(t,W$,e.boxShadow),this.color=Gt(t,e$,e.color),this.direction=Gt(t,r$,e.direction),this.display=Gt(t,i$,e.display),this.float=Gt(t,s$,e.cssFloat),this.fontFamily=Gt(t,k$,e.fontFamily),this.fontSize=Gt(t,O$,e.fontSize),this.fontStyle=Gt(t,H$,e.fontStyle),this.fontVariant=Gt(t,R$,e.fontVariant),this.fontWeight=Gt(t,D$,e.fontWeight),this.letterSpacing=Gt(t,A$,e.letterSpacing),this.lineBreak=Gt(t,a$,e.lineBreak),this.lineHeight=Gt(t,o$,e.lineHeight),this.listStyleImage=Gt(t,l$,e.listStyleImage),this.listStylePosition=Gt(t,c$,e.listStylePosition),this.listStyleType=Gt(t,iF,e.listStyleType),this.marginTop=Gt(t,h$,e.marginTop),this.marginRight=Gt(t,u$,e.marginRight),this.marginBottom=Gt(t,f$,e.marginBottom),this.marginLeft=Gt(t,d$,e.marginLeft),this.opacity=Gt(t,N$,e.opacity);var s=Gt(t,g$,e.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=Gt(t,p$,e.overflowWrap),this.paddingTop=Gt(t,m$,e.paddingTop),this.paddingRight=Gt(t,v$,e.paddingRight),this.paddingBottom=Gt(t,w$,e.paddingBottom),this.paddingLeft=Gt(t,y$,e.paddingLeft),this.paintOrder=Gt(t,z$,e.paintOrder),this.position=Gt(t,B$,e.position),this.textAlign=Gt(t,b$,e.textAlign),this.textDecorationColor=Gt(t,P$,(r=e.textDecorationColor)!==null&&r!==void 0?r:e.color),this.textDecorationLine=Gt(t,M$,(i=e.textDecorationLine)!==null&&i!==void 0?i:e.textDecoration),this.textShadow=Gt(t,C$,e.textShadow),this.textTransform=Gt(t,x$,e.textTransform),this.transform=Gt(t,E$,e.transform),this.transformOrigin=Gt(t,_$,e.transformOrigin),this.visibility=Gt(t,U$,e.visibility),this.webkitTextStrokeColor=Gt(t,X$,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=Gt(t,q$,e.webkitTextStrokeWidth),this.wordBreak=Gt(t,L$,e.wordBreak),this.zIndex=Gt(t,Q$,e.zIndex)}return n.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},n.prototype.isTransparent=function(){return $h(this.backgroundColor)},n.prototype.isTransformed=function(){return this.transform!==null},n.prototype.isPositioned=function(){return this.position!==0},n.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},n.prototype.isFloating=function(){return this.float!==0},n.prototype.isInlineLevel=function(){return sn(this.display,4)||sn(this.display,33554432)||sn(this.display,268435456)||sn(this.display,536870912)||sn(this.display,67108864)||sn(this.display,134217728)},n}(),J$=function(){function n(t,e){this.content=Gt(t,K$,e.content),this.quotes=Gt(t,$$,e.quotes)}return n}(),OU=function(){function n(t,e){this.counterIncrement=Gt(t,V$,e.counterIncrement),this.counterReset=Gt(t,G$,e.counterReset)}return n}(),Gt=function(n,t,e){var r=new Pk,i=e!==null&&typeof e<"u"?e.toString():t.initialValue;r.write(i);var s=new Mk(r.read());switch(t.type){case 2:var A=s.parseComponentValue();return t.parse(n,Sr(A)?A.value:t.initialValue);case 0:return t.parse(n,s.parseComponentValue());case 1:return t.parse(n,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(t.format){case"angle":return ZB.parse(n,s.parseComponentValue());case"color":return jh.parse(n,s.parseComponentValue());case"image":return x4.parse(n,s.parseComponentValue());case"length":var a=s.parseComponentValue();return Yh(a)?a:Dn;case"length-percentage":var o=s.parseComponentValue();return $i(o)?o:Dn;case"time":return tO.parse(n,s.parseComponentValue())}break}},Z$="data-html2canvas-debug",tW=function(n){var t=n.getAttribute(Z$);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},nF=function(n,t){var e=tW(n);return e===1||t===e},jo=function(){function n(t,e){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,nF(e,3))debugger;this.styles=new Y$(t,window.getComputedStyle(e,null)),aF(e)&&(this.styles.animationDuration.some(function(r){return r>0})&&(e.style.animationDuration="0s"),this.styles.transform!==null&&(e.style.transform="none")),this.bounds=YB(this.context,e),nF(e,4)&&(this.flags|=16)}return n}(),eW="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",DU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var z2=0;z2<DU.length;z2++)jm[DU.charCodeAt(z2)]=z2;var rW=function(n){var t=n.length*.75,e=n.length,r,i=0,s,A,a,o;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),h=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<e;r+=4)s=jm[n.charCodeAt(r)],A=jm[n.charCodeAt(r+1)],a=jm[n.charCodeAt(r+2)],o=jm[n.charCodeAt(r+3)],h[i++]=s<<2|A>>4,h[i++]=(A&15)<<4|a>>2,h[i++]=(a&3)<<6|o&63;return l},iW=function(n){for(var t=n.length,e=[],r=0;r<t;r+=2)e.push(n[r+1]<<8|n[r]);return e},nW=function(n){for(var t=n.length,e=[],r=0;r<t;r+=4)e.push(n[r+3]<<24|n[r+2]<<16|n[r+1]<<8|n[r]);return e},ud=5,E4=11,J5=2,sW=E4-ud,eO=65536>>ud,AW=1<<ud,Z5=AW-1,aW=1024>>ud,oW=eO+aW,lW=oW,cW=32,hW=lW+cW,uW=65536>>E4,fW=1<<sW,dW=fW-1,RU=function(n,t,e){return n.slice?n.slice(t,e):new Uint16Array(Array.prototype.slice.call(n,t,e))},gW=function(n,t,e){return n.slice?n.slice(t,e):new Uint32Array(Array.prototype.slice.call(n,t,e))},pW=function(n,t){var e=rW(n),r=Array.isArray(e)?nW(e):new Uint32Array(e),i=Array.isArray(e)?iW(e):new Uint16Array(e),s=24,A=RU(i,s/2,r[4]/2),a=r[5]===2?RU(i,(s+r[4])/2):gW(r,Math.ceil((s+r[4])/4));return new mW(r[0],r[1],r[2],r[3],A,a)},mW=function(){function n(t,e,r,i,s,A){this.initialValue=t,this.errorValue=e,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=A}return n.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=this.index[t>>ud],e=(e<<J5)+(t&Z5),this.data[e];if(t<=65535)return e=this.index[eO+(t-55296>>ud)],e=(e<<J5)+(t&Z5),this.data[e];if(t<this.highStart)return e=hW-uW+(t>>E4),e=this.index[e],e+=t>>ud&dW,e=this.index[e],e=(e<<J5)+(t&Z5),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},n}(),HU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vW=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var X2=0;X2<HU.length;X2++)vW[HU.charCodeAt(X2)]=X2;var wW=1,tx=2,ex=3,KU=4,VU=5,yW=7,GU=8,rx=9,ix=10,jU=11,$U=12,WU=13,zU=14,nx=15,bW=function(n){for(var t=[],e=0,r=n.length;e<r;){var i=n.charCodeAt(e++);if(i>=55296&&i<=56319&&e<r){var s=n.charCodeAt(e++);(s&64512)===56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),e--)}else t.push(i)}return t},BW=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,n);var e=n.length;if(!e)return"";for(var r=[],i=-1,s="";++i<e;){var A=n[i];A<=65535?r.push(A):(A-=65536,r.push((A>>10)+55296,A%1024+56320)),(i+1===e||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},CW=pW(eW),HA="×",sx="÷",xW=function(n){return CW.get(n)},EW=function(n,t,e){var r=e-2,i=t[r],s=t[e-1],A=t[e];if(s===tx&&A===ex)return HA;if(s===tx||s===ex||s===KU||A===tx||A===ex||A===KU)return sx;if(s===GU&&[GU,rx,jU,$U].indexOf(A)!==-1||(s===jU||s===rx)&&(A===rx||A===ix)||(s===$U||s===ix)&&A===ix||A===WU||A===VU||A===yW||s===wW)return HA;if(s===WU&&A===zU){for(;i===VU;)i=t[--r];if(i===zU)return HA}if(s===nx&&A===nx){for(var a=0;i===nx;)a++,i=t[--r];if(a%2===0)return HA}return sx},SW=function(n){var t=bW(n),e=t.length,r=0,i=0,s=t.map(xW);return{next:function(){if(r>=e)return{done:!0,value:null};for(var A=HA;r<e&&(A=EW(t,s,++r))===HA;);if(A!==HA||r===e){var a=BW.apply(null,t.slice(i,r));return i=r,{value:a,done:!1}}return{done:!0,value:null}}}},FW=function(n){for(var t=SW(n),e=[],r;!(r=t.next()).done;)r.value&&e.push(r.value.slice());return e},TW=function(n){var t=123;if(n.createRange){var e=n.createRange();if(e.getBoundingClientRect){var r=n.createElement("boundtest");r.style.height=t+"px",r.style.display="block",n.body.appendChild(r),e.selectNode(r);var i=e.getBoundingClientRect(),s=Math.round(i.height);if(n.body.removeChild(r),s===t)return!0}}return!1},IW=function(n){var t=n.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",n.body.appendChild(t);var e=n.createRange();t.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var r=t.firstChild,i=JB(r.data).map(function(o){return Li(o)}),s=0,A={},a=i.every(function(o,l){e.setStart(r,s),e.setEnd(r,s+o.length);var h=e.getBoundingClientRect();s+=o.length;var u=h.x>A.x||h.y>A.y;return A=h,l===0?!0:u});return n.body.removeChild(t),a},_W=function(){return typeof new Image().crossOrigin<"u"},UW=function(){return typeof new XMLHttpRequest().responseType=="string"},LW=function(n){var t=new Image,e=n.createElement("canvas"),r=e.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),e.toDataURL()}catch{return!1}return!0},XU=function(n){return n[0]===0&&n[1]===255&&n[2]===0&&n[3]===255},QW=function(n){var t=n.createElement("canvas"),e=100;t.width=e,t.height=e;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,e,e);var i=new Image,s=t.toDataURL();i.src=s;var A=sF(e,e,0,0,i);return r.fillStyle="red",r.fillRect(0,0,e,e),qU(A).then(function(a){r.drawImage(a,0,0);var o=r.getImageData(0,0,e,e).data;r.fillStyle="red",r.fillRect(0,0,e,e);var l=n.createElement("div");return l.style.backgroundImage="url("+s+")",l.style.height=e+"px",XU(o)?qU(sF(e,e,0,0,l)):Promise.reject(!1)}).then(function(a){return r.drawImage(a,0,0),XU(r.getImageData(0,0,e,e).data)}).catch(function(){return!1})},sF=function(n,t,e,r,i){var s="http://www.w3.org/2000/svg",A=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return A.setAttributeNS(null,"width",n.toString()),A.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",e.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),A.appendChild(a),a.appendChild(i),A},qU=function(n){return new Promise(function(t,e){var r=new Image;r.onload=function(){return t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(n))})},Nn={get SUPPORT_RANGE_BOUNDS(){var n=TW(document);return Object.defineProperty(Nn,"SUPPORT_RANGE_BOUNDS",{value:n}),n},get SUPPORT_WORD_BREAKING(){var n=Nn.SUPPORT_RANGE_BOUNDS&&IW(document);return Object.defineProperty(Nn,"SUPPORT_WORD_BREAKING",{value:n}),n},get SUPPORT_SVG_DRAWING(){var n=LW(document);return Object.defineProperty(Nn,"SUPPORT_SVG_DRAWING",{value:n}),n},get SUPPORT_FOREIGNOBJECT_DRAWING(){var n=typeof Array.from=="function"&&typeof window.fetch=="function"?QW(document):Promise.resolve(!1);return Object.defineProperty(Nn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:n}),n},get SUPPORT_CORS_IMAGES(){var n=_W();return Object.defineProperty(Nn,"SUPPORT_CORS_IMAGES",{value:n}),n},get SUPPORT_RESPONSE_TYPE(){var n=UW();return Object.defineProperty(Nn,"SUPPORT_RESPONSE_TYPE",{value:n}),n},get SUPPORT_CORS_XHR(){var n="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Nn,"SUPPORT_CORS_XHR",{value:n}),n},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var n=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Nn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:n}),n}},Av=function(){function n(t,e){this.text=t,this.bounds=e}return n}(),NW=function(n,t,e,r){var i=kW(t,e),s=[],A=0;return i.forEach(function(a){if(e.textDecorationLine.length||a.trim().length>0)if(Nn.SUPPORT_RANGE_BOUNDS){var o=YU(r,A,a.length).getClientRects();if(o.length>1){var l=S4(a),h=0;l.forEach(function(d){s.push(new Av(d,uc.fromDOMRectList(n,YU(r,h+A,d.length).getClientRects()))),h+=d.length})}else s.push(new Av(a,uc.fromDOMRectList(n,o)))}else{var u=r.splitText(a.length);s.push(new Av(a,PW(n,r))),r=u}else Nn.SUPPORT_RANGE_BOUNDS||(r=r.splitText(a.length));A+=a.length}),s},PW=function(n,t){var e=t.ownerDocument;if(e){var r=e.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var s=YB(n,r);return r.firstChild&&i.replaceChild(r.firstChild,r),s}}return uc.EMPTY},YU=function(n,t,e){var r=n.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(n,t),i.setEnd(n,t+e),i},S4=function(n){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(n)).map(function(e){return e.segment})}return FW(n)},MW=function(n,t){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(n)).map(function(r){return r.segment})}return DW(n,t)},kW=function(n,t){return t.letterSpacing!==0?S4(n):MW(n,t)},OW=[32,160,4961,65792,65793,4153,4241],DW=function(n,t){for(var e=uG(n,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),r=[],i,s=function(){if(i.value){var A=i.value.slice(),a=JB(A),o="";a.forEach(function(l){OW.indexOf(l)===-1?o+=Li(l):(o.length&&r.push(o),r.push(Li(l)),o="")}),o.length&&r.push(o)}};!(i=e.next()).done;)s();return r},RW=function(){function n(t,e,r){this.text=HW(e.data,r.textTransform),this.textBounds=NW(t,this.text,r,e)}return n}(),HW=function(n,t){switch(t){case 1:return n.toLowerCase();case 3:return n.replace(KW,VW);case 2:return n.toUpperCase();default:return n}},KW=/(^|\s|:|-|\(|\))([a-z])/g,VW=function(n,t,e){return n.length>0?t+e.toUpperCase():n},rO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.src=r.currentSrc||r.src,i.intrinsicWidth=r.naturalWidth,i.intrinsicHeight=r.naturalHeight,i.context.cache.addImage(i.src),i}return t}(jo),iO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.canvas=r,i.intrinsicWidth=r.width,i.intrinsicHeight=r.height,i}return t}(jo),nO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this,s=new XMLSerializer,A=YB(e,r);return r.setAttribute("width",A.width+"px"),r.setAttribute("height",A.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(r)),i.intrinsicWidth=r.width.baseVal.value,i.intrinsicHeight=r.height.baseVal.value,i.context.cache.addImage(i.svg),i}return t}(jo),sO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.value=r.value,i}return t}(jo),AF=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.start=r.start,i.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,i}return t}(jo),GW=[{type:15,flags:0,unit:"px",number:3}],jW=[{type:16,flags:0,number:50}],$W=function(n){return n.width>n.height?new uc(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new uc(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n},WW=function(n){var t=n.type===zW?new Array(n.value.length+1).join("•"):n.value;return t.length===0?n.placeholder||"":t},Kb="checkbox",Vb="radio",zW="password",JU=707406591,F4=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;switch(i.type=r.type.toLowerCase(),i.checked=r.checked,i.value=WW(r),(i.type===Kb||i.type===Vb)&&(i.styles.backgroundColor=3739148031,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=2779096575,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=1,i.styles.backgroundClip=[0],i.styles.backgroundOrigin=[0],i.bounds=$W(i.bounds)),i.type){case Kb:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=GW;break;case Vb:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=jW;break}return i}return t}(jo),AO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this,s=r.options[r.selectedIndex||0];return i.value=s&&s.text||"",i}return t}(jo),aO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.value=r.value,i}return t}(jo),oO=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;i.src=r.src,i.width=parseInt(r.width,10)||0,i.height=parseInt(r.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){i.tree=cO(e,r.contentWindow.document.documentElement);var s=r.contentWindow.document.documentElement?nv(e,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):nc.TRANSPARENT,A=r.contentWindow.document.body?nv(e,getComputedStyle(r.contentWindow.document.body).backgroundColor):nc.TRANSPARENT;i.backgroundColor=$h(s)?$h(A)?i.styles.backgroundColor:A:s}}catch{}return i}return t}(jo),XW=["OL","UL","MENU"],db=function(n,t,e,r){for(var i=t.firstChild,s=void 0;i;i=s)if(s=i.nextSibling,hO(i)&&i.data.trim().length>0)e.textNodes.push(new RW(n,i,e.styles));else if(Ig(i))if(gO(i)&&i.assignedNodes)i.assignedNodes().forEach(function(a){return db(n,a,e,r)});else{var A=lO(n,i);A.styles.isVisible()&&(qW(i,A,r)?A.flags|=4:YW(A.styles)&&(A.flags|=2),XW.indexOf(i.tagName)!==-1&&(A.flags|=8),e.elements.push(A),i.slot,i.shadowRoot?db(n,i.shadowRoot,A,r):!Gb(i)&&!uO(i)&&!jb(i)&&db(n,i,A,r))}},lO=function(n,t){return oF(t)?new rO(n,t):fO(t)?new iO(n,t):uO(t)?new nO(n,t):JW(t)?new sO(n,t):ZW(t)?new AF(n,t):tz(t)?new F4(n,t):jb(t)?new AO(n,t):Gb(t)?new aO(n,t):dO(t)?new oO(n,t):new jo(n,t)},cO=function(n,t){var e=lO(n,t);return e.flags|=4,db(n,t,e,e),e},qW=function(n,t,e){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||T4(n)&&e.styles.isTransparent()},YW=function(n){return n.isPositioned()||n.isFloating()},hO=function(n){return n.nodeType===Node.TEXT_NODE},Ig=function(n){return n.nodeType===Node.ELEMENT_NODE},aF=function(n){return Ig(n)&&typeof n.style<"u"&&!gb(n)},gb=function(n){return typeof n.className=="object"},JW=function(n){return n.tagName==="LI"},ZW=function(n){return n.tagName==="OL"},tz=function(n){return n.tagName==="INPUT"},ez=function(n){return n.tagName==="HTML"},uO=function(n){return n.tagName==="svg"},T4=function(n){return n.tagName==="BODY"},fO=function(n){return n.tagName==="CANVAS"},ZU=function(n){return n.tagName==="VIDEO"},oF=function(n){return n.tagName==="IMG"},dO=function(n){return n.tagName==="IFRAME"},t3=function(n){return n.tagName==="STYLE"},rz=function(n){return n.tagName==="SCRIPT"},Gb=function(n){return n.tagName==="TEXTAREA"},jb=function(n){return n.tagName==="SELECT"},gO=function(n){return n.tagName==="SLOT"},e3=function(n){return n.tagName.indexOf("-")>0},iz=function(){function n(){this.counters={}}return n.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},n.prototype.getCounterValues=function(t){var e=this.counters[t];return e||[]},n.prototype.pop=function(t){var e=this;t.forEach(function(r){return e.counters[r].pop()})},n.prototype.parse=function(t){var e=this,r=t.counterIncrement,i=t.counterReset,s=!0;r!==null&&r.forEach(function(a){var o=e.counters[a.counter];o&&a.increment!==0&&(s=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=a.increment)});var A=[];return s&&i.forEach(function(a){var o=e.counters[a.counter];A.push(a.counter),o||(o=e.counters[a.counter]=[]),o.push(a.reset)}),A},n}(),r3={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},i3={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},nz={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},sz={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},rg=function(n,t,e,r,i,s){return n<t||n>e?Fv(n,i,s.length>0):r.integers.reduce(function(A,a,o){for(;n>=a;)n-=a,A+=r.values[o];return A},"")+s},pO=function(n,t,e,r){var i="";do e||n--,i=r(n)+i,n/=t;while(n*t>=t);return i},Si=function(n,t,e,r,i){var s=e-t+1;return(n<0?"-":"")+(pO(Math.abs(n),s,r,function(A){return Li(Math.floor(A%s)+t)})+i)},Bu=function(n,t,e){e===void 0&&(e=". ");var r=t.length;return pO(Math.abs(n),r,!1,function(i){return t[Math.floor(i%r)]})+e},Cg=1,Hc=2,Kc=4,$m=8,cl=function(n,t,e,r,i,s){if(n<-9999||n>9999)return Fv(n,4,i.length>0);var A=Math.abs(n),a=i;if(A===0)return t[0]+a;for(var o=0;A>0&&o<=4;o++){var l=A%10;l===0&&sn(s,Cg)&&a!==""?a=t[l]+a:l>1||l===1&&o===0||l===1&&o===1&&sn(s,Hc)||l===1&&o===1&&sn(s,Kc)&&n>100||l===1&&o>1&&sn(s,$m)?a=t[l]+(o>0?e[o-1]:"")+a:l===1&&o>0&&(a=e[o-1]+a),A=Math.floor(A/10)}return(n<0?r:"")+a},n3="十百千萬",s3="拾佰仟萬",A3="マイナス",Ax="마이너스",Fv=function(n,t,e){var r=e?". ":"",i=e?"、":"",s=e?", ":"",A=e?" ":"";switch(t){case 0:return"•"+A;case 1:return"◦"+A;case 2:return"◾"+A;case 5:var a=Si(n,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return Bu(n,"〇一二三四五六七八九",i);case 6:return rg(n,1,3999,r3,3,r).toLowerCase();case 7:return rg(n,1,3999,r3,3,r);case 8:return Si(n,945,969,!1,r);case 9:return Si(n,97,122,!1,r);case 10:return Si(n,65,90,!1,r);case 11:return Si(n,1632,1641,!0,r);case 12:case 49:return rg(n,1,9999,i3,3,r);case 35:return rg(n,1,9999,i3,3,r).toLowerCase();case 13:return Si(n,2534,2543,!0,r);case 14:case 30:return Si(n,6112,6121,!0,r);case 15:return Bu(n,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Bu(n,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return cl(n,"零一二三四五六七八九",n3,"負",i,Hc|Kc|$m);case 47:return cl(n,"零壹貳參肆伍陸柒捌玖",s3,"負",i,Cg|Hc|Kc|$m);case 42:return cl(n,"零一二三四五六七八九",n3,"负",i,Hc|Kc|$m);case 41:return cl(n,"零壹贰叁肆伍陆柒捌玖",s3,"负",i,Cg|Hc|Kc|$m);case 26:return cl(n,"〇一二三四五六七八九","十百千万",A3,i,0);case 25:return cl(n,"零壱弐参四伍六七八九","拾百千万",A3,i,Cg|Hc|Kc);case 31:return cl(n,"영일이삼사오육칠팔구","십백천만",Ax,s,Cg|Hc|Kc);case 33:return cl(n,"零一二三四五六七八九","十百千萬",Ax,s,0);case 32:return cl(n,"零壹貳參四五六七八九","拾百千",Ax,s,Cg|Hc|Kc);case 18:return Si(n,2406,2415,!0,r);case 20:return rg(n,1,19999,sz,3,r);case 21:return Si(n,2790,2799,!0,r);case 22:return Si(n,2662,2671,!0,r);case 22:return rg(n,1,10999,nz,3,r);case 23:return Bu(n,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Bu(n,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Si(n,3302,3311,!0,r);case 28:return Bu(n,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Bu(n,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Si(n,3792,3801,!0,r);case 37:return Si(n,6160,6169,!0,r);case 38:return Si(n,4160,4169,!0,r);case 39:return Si(n,2918,2927,!0,r);case 40:return Si(n,1776,1785,!0,r);case 43:return Si(n,3046,3055,!0,r);case 44:return Si(n,3174,3183,!0,r);case 45:return Si(n,3664,3673,!0,r);case 46:return Si(n,3872,3881,!0,r);case 3:default:return Si(n,48,57,!0,r)}},mO="data-html2canvas-ignore",a3=function(){function n(t,e,r){if(this.context=t,this.options=r,this.scrolledElements=[],this.referenceElement=e,this.counters=new iz,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return n.prototype.toIFrame=function(t,e){var r=this,i=Az(t,e);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var s=t.defaultView.pageXOffset,A=t.defaultView.pageYOffset,a=i.contentWindow,o=a.document,l=lz(i).then(function(){return Ss(r,void 0,void 0,function(){var h,u;return as(this,function(d){switch(d.label){case 0:return this.scrolledElements.forEach(fz),a&&(a.scrollTo(e.left,e.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==e.top||a.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-e.left,a.scrollY-e.top,0,0))),h=this.options.onclone,u=this.clonedReferenceElement,typeof u>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:d.sent(),d.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,oz(o)]:[3,4];case 3:d.sent(),d.label=4;case 4:return typeof h=="function"?[2,Promise.resolve().then(function(){return h(o,u)}).then(function(){return i})]:[2,i]}})})});return o.open(),o.write(hz(document.doctype)+"<html></html>"),uz(this.referenceElement.ownerDocument,s,A),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),l},n.prototype.createElementClone=function(t){if(nF(t,2))debugger;if(fO(t))return this.createCanvasClone(t);if(ZU(t))return this.createVideoClone(t);if(t3(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return oF(e)&&(oF(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),e3(e)?this.createCustomElementClone(e):e},n.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return ax(t.style,e),e},n.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var r=[].slice.call(e.cssRules,0).reduce(function(s,A){return A&&typeof A.cssText=="string"?s+A.cssText:s},""),i=t.cloneNode(!1);return i.textContent=r,i}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return t.cloneNode(!1)},n.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var r=t.ownerDocument.createElement("img");try{return r.src=t.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var i=t.cloneNode(!1);try{i.width=t.width,i.height=t.height;var s=t.getContext("2d"),A=i.getContext("2d");if(A)if(!this.options.allowTaint&&s)A.putImageData(s.getImageData(0,0,t.width,t.height),0,0);else{var a=(e=t.getContext("webgl2"))!==null&&e!==void 0?e:t.getContext("webgl");if(a){var o=a.getContextAttributes();(o==null?void 0:o.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}A.drawImage(t,0,0)}return i}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return i},n.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var r=e.getContext("2d");try{return r&&(r.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||r.getImageData(0,0,e.width,e.height)),e}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var i=t.ownerDocument.createElement("canvas");return i.width=t.offsetWidth,i.height=t.offsetHeight,i},n.prototype.appendChildNode=function(t,e,r){(!Ig(e)||!rz(e)&&!e.hasAttribute(mO)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!Ig(e)||!t3(e))&&t.appendChild(this.cloneNode(e,r))},n.prototype.cloneChildNodes=function(t,e,r){for(var i=this,s=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;s;s=s.nextSibling)if(Ig(s)&&gO(s)&&typeof s.assignedNodes=="function"){var A=s.assignedNodes();A.length&&A.forEach(function(a){return i.appendChildNode(e,a,r)})}else this.appendChildNode(e,s,r)},n.prototype.cloneNode=function(t,e){if(hO(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var r=t.ownerDocument.defaultView;if(r&&Ig(t)&&(aF(t)||gb(t))){var i=this.createElementClone(t);i.style.transitionProperty="none";var s=r.getComputedStyle(t),A=r.getComputedStyle(t,":before"),a=r.getComputedStyle(t,":after");this.referenceElement===t&&aF(i)&&(this.clonedReferenceElement=i),T4(i)&&pz(i);var o=this.counters.parse(new OU(this.context,s)),l=this.resolvePseudoContent(t,i,A,av.BEFORE);e3(t)&&(e=!0),ZU(t)||this.cloneChildNodes(t,i,e),l&&i.insertBefore(l,i.firstChild);var h=this.resolvePseudoContent(t,i,a,av.AFTER);return h&&i.appendChild(h),this.counters.pop(o),(s&&(this.options.copyStyles||gb(t))&&!dO(t)||e)&&ax(s,i),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([i,t.scrollLeft,t.scrollTop]),(Gb(t)||jb(t))&&(Gb(i)||jb(i))&&(i.value=t.value),i}return t.cloneNode(!1)},n.prototype.resolvePseudoContent=function(t,e,r,i){var s=this;if(r){var A=r.content,a=e.ownerDocument;if(!(!a||!A||A==="none"||A==="-moz-alt-content"||r.display==="none")){this.counters.parse(new OU(this.context,r));var o=new J$(this.context,r),l=a.createElement("html2canvaspseudoelement");ax(r,l),o.content.forEach(function(u){if(u.type===0)l.appendChild(a.createTextNode(u.value));else if(u.type===22){var d=a.createElement("img");d.src=u.value,d.style.opacity="1",l.appendChild(d)}else if(u.type===18){if(u.name==="attr"){var f=u.values.filter(Sr);f.length&&l.appendChild(a.createTextNode(t.getAttribute(f[0].value)||""))}else if(u.name==="counter"){var p=u.values.filter(y0),m=p[0],y=p[1];if(m&&Sr(m)){var w=s.counters.getCounterValue(m.value),B=y&&Sr(y)?iF.parse(s.context,y.value):3;l.appendChild(a.createTextNode(Fv(w,B,!1)))}}else if(u.name==="counters"){var E=u.values.filter(y0),m=E[0],S=E[1],y=E[2];if(m&&Sr(m)){var I=s.counters.getCounterValues(m.value),L=y&&Sr(y)?iF.parse(s.context,y.value):3,k=S&&S.type===0?S.value:"",H=I.map(function(U){return Fv(U,L,!1)}).join(k);l.appendChild(a.createTextNode(H))}}}else if(u.type===20)switch(u.value){case"open-quote":l.appendChild(a.createTextNode(kU(o.quotes,s.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(kU(o.quotes,--s.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(u.value))}}),l.className=lF+" "+cF;var h=i===av.BEFORE?" "+lF:" "+cF;return gb(e)?e.className.baseValue+=h:e.className+=h,l}}},n.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},n}(),av;(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"})(av||(av={}));var Az=function(n,t){var e=n.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=t.width.toString(),e.height=t.height.toString(),e.scrolling="no",e.setAttribute(mO,"true"),n.body.appendChild(e),e},az=function(n){return new Promise(function(t){if(n.complete){t();return}if(!n.src){t();return}n.onload=t,n.onerror=t})},oz=function(n){return Promise.all([].slice.call(n.images,0).map(az))},lz=function(n){return new Promise(function(t,e){var r=n.contentWindow;if(!r)return e("No window assigned for iframe");var i=r.document;r.onload=n.onload=function(){r.onload=n.onload=null;var s=setInterval(function(){i.body.childNodes.length>0&&i.readyState==="complete"&&(clearInterval(s),t(n))},50)}})},cz=["all","d","content"],ax=function(n,t){for(var e=n.length-1;e>=0;e--){var r=n.item(e);cz.indexOf(r)===-1&&t.style.setProperty(r,n.getPropertyValue(r))}return t},hz=function(n){var t="";return n&&(t+="<!DOCTYPE ",n.name&&(t+=n.name),n.internalSubset&&(t+=n.internalSubset),n.publicId&&(t+='"'+n.publicId+'"'),n.systemId&&(t+='"'+n.systemId+'"'),t+=">"),t},uz=function(n,t,e){n&&n.defaultView&&(t!==n.defaultView.pageXOffset||e!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(t,e)},fz=function(n){var t=n[0],e=n[1],r=n[2];t.scrollLeft=e,t.scrollTop=r},dz=":before",gz=":after",lF="___html2canvas___pseudoelement_before",cF="___html2canvas___pseudoelement_after",o3=`{
|
|
290
|
+
content: "" !important;
|
|
291
|
+
display: none !important;
|
|
292
|
+
}`,pz=function(n){mz(n,"."+lF+dz+o3+`
|
|
293
|
+
.`+cF+gz+o3)},mz=function(n,t){var e=n.ownerDocument;if(e){var r=e.createElement("style");r.textContent=t,n.appendChild(r)}},vO=function(){function n(){}return n.getOrigin=function(t){var e=n._link;return e?(e.href=t,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},n.isSameOrigin=function(t){return n.getOrigin(t)===n._origin},n.setContext=function(t){n._link=t.document.createElement("a"),n._origin=n.getOrigin(t.location.href)},n._origin="about:blank",n}(),vz=function(){function n(t,e){this.context=t,this._options=e,this._cache={}}return n.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)||(lx(t)||Bz(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),e},n.prototype.match=function(t){return this._cache[t]},n.prototype.loadImage=function(t){return Ss(this,void 0,void 0,function(){var e,r,i,s,A=this;return as(this,function(a){switch(a.label){case 0:return e=vO.isSameOrigin(t),r=!ox(t)&&this._options.useCORS===!0&&Nn.SUPPORT_CORS_IMAGES&&!e,i=!ox(t)&&!e&&!lx(t)&&typeof this._options.proxy=="string"&&Nn.SUPPORT_CORS_XHR&&!r,!e&&this._options.allowTaint===!1&&!ox(t)&&!lx(t)&&!i&&!r?[2]:(s=t,i?[4,this.proxy(s)]:[3,2]);case 1:s=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(o,l){var h=new Image;h.onload=function(){return o(h)},h.onerror=l,(Cz(s)||r)&&(h.crossOrigin="anonymous"),h.src=s,h.complete===!0&&setTimeout(function(){return o(h)},500),A._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},n.prototype.has=function(t){return typeof this._cache[t]<"u"},n.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},n.prototype.proxy=function(t){var e=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var i=t.substring(0,256);return new Promise(function(s,A){var a=Nn.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(a==="text")s(o.response);else{var u=new FileReader;u.addEventListener("load",function(){return s(u.result)},!1),u.addEventListener("error",function(d){return A(d)},!1),u.readAsDataURL(o.response)}else A("Failed to proxy resource "+i+" with status code "+o.status)},o.onerror=A;var l=r.indexOf("?")>-1?"&":"?";if(o.open("GET",""+r+l+"url="+encodeURIComponent(t)+"&responseType="+a),a!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=a),e._options.imageTimeout){var h=e._options.imageTimeout;o.timeout=h,o.ontimeout=function(){return A("Timed out ("+h+"ms) proxying "+i)}}o.send()})},n}(),wz=/^data:image\/svg\+xml/i,yz=/^data:image\/.*;base64,/i,bz=/^data:image\/.*/i,Bz=function(n){return Nn.SUPPORT_SVG_DRAWING||!xz(n)},ox=function(n){return bz.test(n)},Cz=function(n){return yz.test(n)},lx=function(n){return n.substr(0,4)==="blob"},xz=function(n){return n.substr(-3).toLowerCase()==="svg"||wz.test(n)},Kt=function(){function n(t,e){this.type=0,this.x=t,this.y=e}return n.prototype.add=function(t,e){return new n(this.x+t,this.y+e)},n}(),ig=function(n,t,e){return new Kt(n.x+(t.x-n.x)*e,n.y+(t.y-n.y)*e)},q2=function(){function n(t,e,r,i){this.type=1,this.start=t,this.startControl=e,this.endControl=r,this.end=i}return n.prototype.subdivide=function(t,e){var r=ig(this.start,this.startControl,t),i=ig(this.startControl,this.endControl,t),s=ig(this.endControl,this.end,t),A=ig(r,i,t),a=ig(i,s,t),o=ig(A,a,t);return e?new n(this.start,r,A,o):new n(o,a,s,this.end)},n.prototype.add=function(t,e){return new n(this.start.add(t,e),this.startControl.add(t,e),this.endControl.add(t,e),this.end.add(t,e))},n.prototype.reverse=function(){return new n(this.end,this.endControl,this.startControl,this.start)},n}(),ea=function(n){return n.type===1},Ez=function(){function n(t){var e=t.styles,r=t.bounds,i=Gm(e.borderTopLeftRadius,r.width,r.height),s=i[0],A=i[1],a=Gm(e.borderTopRightRadius,r.width,r.height),o=a[0],l=a[1],h=Gm(e.borderBottomRightRadius,r.width,r.height),u=h[0],d=h[1],f=Gm(e.borderBottomLeftRadius,r.width,r.height),p=f[0],m=f[1],y=[];y.push((s+o)/r.width),y.push((p+u)/r.width),y.push((A+m)/r.height),y.push((l+d)/r.height);var w=Math.max.apply(Math,y);w>1&&(s/=w,A/=w,o/=w,l/=w,u/=w,d/=w,p/=w,m/=w);var B=r.width-o,E=r.height-d,S=r.width-u,I=r.height-m,L=e.borderTopWidth,k=e.borderRightWidth,H=e.borderBottomWidth,Q=e.borderLeftWidth,W=Or(e.paddingTop,t.bounds.width),U=Or(e.paddingRight,t.bounds.width),D=Or(e.paddingBottom,t.bounds.width),j=Or(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||A>0?qr(r.left+Q/3,r.top+L/3,s-Q/3,A-L/3,lr.TOP_LEFT):new Kt(r.left+Q/3,r.top+L/3),this.topRightBorderDoubleOuterBox=s>0||A>0?qr(r.left+B,r.top+L/3,o-k/3,l-L/3,lr.TOP_RIGHT):new Kt(r.left+r.width-k/3,r.top+L/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?qr(r.left+S,r.top+E,u-k/3,d-H/3,lr.BOTTOM_RIGHT):new Kt(r.left+r.width-k/3,r.top+r.height-H/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?qr(r.left+Q/3,r.top+I,p-Q/3,m-H/3,lr.BOTTOM_LEFT):new Kt(r.left+Q/3,r.top+r.height-H/3),this.topLeftBorderDoubleInnerBox=s>0||A>0?qr(r.left+Q*2/3,r.top+L*2/3,s-Q*2/3,A-L*2/3,lr.TOP_LEFT):new Kt(r.left+Q*2/3,r.top+L*2/3),this.topRightBorderDoubleInnerBox=s>0||A>0?qr(r.left+B,r.top+L*2/3,o-k*2/3,l-L*2/3,lr.TOP_RIGHT):new Kt(r.left+r.width-k*2/3,r.top+L*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?qr(r.left+S,r.top+E,u-k*2/3,d-H*2/3,lr.BOTTOM_RIGHT):new Kt(r.left+r.width-k*2/3,r.top+r.height-H*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?qr(r.left+Q*2/3,r.top+I,p-Q*2/3,m-H*2/3,lr.BOTTOM_LEFT):new Kt(r.left+Q*2/3,r.top+r.height-H*2/3),this.topLeftBorderStroke=s>0||A>0?qr(r.left+Q/2,r.top+L/2,s-Q/2,A-L/2,lr.TOP_LEFT):new Kt(r.left+Q/2,r.top+L/2),this.topRightBorderStroke=s>0||A>0?qr(r.left+B,r.top+L/2,o-k/2,l-L/2,lr.TOP_RIGHT):new Kt(r.left+r.width-k/2,r.top+L/2),this.bottomRightBorderStroke=u>0||d>0?qr(r.left+S,r.top+E,u-k/2,d-H/2,lr.BOTTOM_RIGHT):new Kt(r.left+r.width-k/2,r.top+r.height-H/2),this.bottomLeftBorderStroke=p>0||m>0?qr(r.left+Q/2,r.top+I,p-Q/2,m-H/2,lr.BOTTOM_LEFT):new Kt(r.left+Q/2,r.top+r.height-H/2),this.topLeftBorderBox=s>0||A>0?qr(r.left,r.top,s,A,lr.TOP_LEFT):new Kt(r.left,r.top),this.topRightBorderBox=o>0||l>0?qr(r.left+B,r.top,o,l,lr.TOP_RIGHT):new Kt(r.left+r.width,r.top),this.bottomRightBorderBox=u>0||d>0?qr(r.left+S,r.top+E,u,d,lr.BOTTOM_RIGHT):new Kt(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||m>0?qr(r.left,r.top+I,p,m,lr.BOTTOM_LEFT):new Kt(r.left,r.top+r.height),this.topLeftPaddingBox=s>0||A>0?qr(r.left+Q,r.top+L,Math.max(0,s-Q),Math.max(0,A-L),lr.TOP_LEFT):new Kt(r.left+Q,r.top+L),this.topRightPaddingBox=o>0||l>0?qr(r.left+Math.min(B,r.width-k),r.top+L,B>r.width+k?0:Math.max(0,o-k),Math.max(0,l-L),lr.TOP_RIGHT):new Kt(r.left+r.width-k,r.top+L),this.bottomRightPaddingBox=u>0||d>0?qr(r.left+Math.min(S,r.width-Q),r.top+Math.min(E,r.height-H),Math.max(0,u-k),Math.max(0,d-H),lr.BOTTOM_RIGHT):new Kt(r.left+r.width-k,r.top+r.height-H),this.bottomLeftPaddingBox=p>0||m>0?qr(r.left+Q,r.top+Math.min(I,r.height-H),Math.max(0,p-Q),Math.max(0,m-H),lr.BOTTOM_LEFT):new Kt(r.left+Q,r.top+r.height-H),this.topLeftContentBox=s>0||A>0?qr(r.left+Q+j,r.top+L+W,Math.max(0,s-(Q+j)),Math.max(0,A-(L+W)),lr.TOP_LEFT):new Kt(r.left+Q+j,r.top+L+W),this.topRightContentBox=o>0||l>0?qr(r.left+Math.min(B,r.width+Q+j),r.top+L+W,B>r.width+Q+j?0:o-Q+j,l-(L+W),lr.TOP_RIGHT):new Kt(r.left+r.width-(k+U),r.top+L+W),this.bottomRightContentBox=u>0||d>0?qr(r.left+Math.min(S,r.width-(Q+j)),r.top+Math.min(E,r.height+L+W),Math.max(0,u-(k+U)),d-(H+D),lr.BOTTOM_RIGHT):new Kt(r.left+r.width-(k+U),r.top+r.height-(H+D)),this.bottomLeftContentBox=p>0||m>0?qr(r.left+Q+j,r.top+I,Math.max(0,p-(Q+j)),m-(H+D),lr.BOTTOM_LEFT):new Kt(r.left+Q+j,r.top+r.height-(H+D))}return n}(),lr;(function(n){n[n.TOP_LEFT=0]="TOP_LEFT",n[n.TOP_RIGHT=1]="TOP_RIGHT",n[n.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",n[n.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(lr||(lr={}));var qr=function(n,t,e,r,i){var s=4*((Math.sqrt(2)-1)/3),A=e*s,a=r*s,o=n+e,l=t+r;switch(i){case lr.TOP_LEFT:return new q2(new Kt(n,l),new Kt(n,l-a),new Kt(o-A,t),new Kt(o,t));case lr.TOP_RIGHT:return new q2(new Kt(n,t),new Kt(n+A,t),new Kt(o,l-a),new Kt(o,l));case lr.BOTTOM_RIGHT:return new q2(new Kt(o,t),new Kt(o,t+a),new Kt(n+A,l),new Kt(n,l));case lr.BOTTOM_LEFT:default:return new q2(new Kt(o,l),new Kt(o-A,l),new Kt(n,t+a),new Kt(n,t))}},$b=function(n){return[n.topLeftBorderBox,n.topRightBorderBox,n.bottomRightBorderBox,n.bottomLeftBorderBox]},Sz=function(n){return[n.topLeftContentBox,n.topRightContentBox,n.bottomRightContentBox,n.bottomLeftContentBox]},Wb=function(n){return[n.topLeftPaddingBox,n.topRightPaddingBox,n.bottomRightPaddingBox,n.bottomLeftPaddingBox]},Fz=function(){function n(t,e,r){this.offsetX=t,this.offsetY=e,this.matrix=r,this.type=0,this.target=6}return n}(),Y2=function(){function n(t,e){this.path=t,this.target=e,this.type=1}return n}(),Tz=function(){function n(t){this.opacity=t,this.type=2,this.target=6}return n}(),Iz=function(n){return n.type===0},wO=function(n){return n.type===1},_z=function(n){return n.type===2},l3=function(n,t){return n.length===t.length?n.some(function(e,r){return e===t[r]}):!1},Uz=function(n,t,e,r,i){return n.map(function(s,A){switch(A){case 0:return s.add(t,e);case 1:return s.add(t+r,e);case 2:return s.add(t+r,e+i);case 3:return s.add(t,e+i)}return s})},yO=function(){function n(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return n}(),bO=function(){function n(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new Ez(this.container),this.container.styles.opacity<1&&this.effects.push(new Tz(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Fz(r,i,s))}if(this.container.styles.overflowX!==0){var A=$b(this.curves),a=Wb(this.curves);l3(A,a)?this.effects.push(new Y2(A,6)):(this.effects.push(new Y2(A,2)),this.effects.push(new Y2(a,4)))}}return n.prototype.getEffects=function(t){for(var e=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,i=this.effects.slice(0);r;){var s=r.effects.filter(function(o){return!wO(o)});if(e||r.container.styles.position!==0||!r.parent){if(i.unshift.apply(i,s),e=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var A=$b(r.curves),a=Wb(r.curves);l3(A,a)||i.unshift(new Y2(a,6))}}else i.unshift.apply(i,s);r=r.parent}return i.filter(function(o){return sn(o.target,t)})},n}(),hF=function(n,t,e,r){n.container.elements.forEach(function(i){var s=sn(i.flags,4),A=sn(i.flags,2),a=new bO(i,n);sn(i.styles.display,2048)&&r.push(a);var o=sn(i.flags,8)?[]:r;if(s||A){var l=s||i.styles.isPositioned()?e:t,h=new yO(a);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var u=i.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(p,m){return u>p.element.container.styles.zIndex.order?(d=m,!1):d>0}),l.negativeZIndex.splice(d,0,h)}else if(u>0){var f=0;l.positiveZIndex.some(function(p,m){return u>=p.element.container.styles.zIndex.order?(f=m+1,!1):f>0}),l.positiveZIndex.splice(f,0,h)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(h)}else i.styles.isFloating()?l.nonPositionedFloats.push(h):l.nonPositionedInlineLevel.push(h);hF(a,h,s?h:e,o)}else i.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),hF(a,t,e,o);sn(i.flags,8)&&BO(i,o)})},BO=function(n,t){for(var e=n instanceof AF?n.start:1,r=n instanceof AF?n.reversed:!1,i=0;i<t.length;i++){var s=t[i];s.container instanceof sO&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=Fv(e,s.container.styles.listStyleType,!0),e+=r?-1:1}},Lz=function(n){var t=new bO(n,null),e=new yO(t),r=[];return hF(t,e,e,r),BO(t.container,r),e},c3=function(n,t){switch(t){case 0:return sa(n.topLeftBorderBox,n.topLeftPaddingBox,n.topRightBorderBox,n.topRightPaddingBox);case 1:return sa(n.topRightBorderBox,n.topRightPaddingBox,n.bottomRightBorderBox,n.bottomRightPaddingBox);case 2:return sa(n.bottomRightBorderBox,n.bottomRightPaddingBox,n.bottomLeftBorderBox,n.bottomLeftPaddingBox);case 3:default:return sa(n.bottomLeftBorderBox,n.bottomLeftPaddingBox,n.topLeftBorderBox,n.topLeftPaddingBox)}},Qz=function(n,t){switch(t){case 0:return sa(n.topLeftBorderBox,n.topLeftBorderDoubleOuterBox,n.topRightBorderBox,n.topRightBorderDoubleOuterBox);case 1:return sa(n.topRightBorderBox,n.topRightBorderDoubleOuterBox,n.bottomRightBorderBox,n.bottomRightBorderDoubleOuterBox);case 2:return sa(n.bottomRightBorderBox,n.bottomRightBorderDoubleOuterBox,n.bottomLeftBorderBox,n.bottomLeftBorderDoubleOuterBox);case 3:default:return sa(n.bottomLeftBorderBox,n.bottomLeftBorderDoubleOuterBox,n.topLeftBorderBox,n.topLeftBorderDoubleOuterBox)}},Nz=function(n,t){switch(t){case 0:return sa(n.topLeftBorderDoubleInnerBox,n.topLeftPaddingBox,n.topRightBorderDoubleInnerBox,n.topRightPaddingBox);case 1:return sa(n.topRightBorderDoubleInnerBox,n.topRightPaddingBox,n.bottomRightBorderDoubleInnerBox,n.bottomRightPaddingBox);case 2:return sa(n.bottomRightBorderDoubleInnerBox,n.bottomRightPaddingBox,n.bottomLeftBorderDoubleInnerBox,n.bottomLeftPaddingBox);case 3:default:return sa(n.bottomLeftBorderDoubleInnerBox,n.bottomLeftPaddingBox,n.topLeftBorderDoubleInnerBox,n.topLeftPaddingBox)}},Pz=function(n,t){switch(t){case 0:return J2(n.topLeftBorderStroke,n.topRightBorderStroke);case 1:return J2(n.topRightBorderStroke,n.bottomRightBorderStroke);case 2:return J2(n.bottomRightBorderStroke,n.bottomLeftBorderStroke);case 3:default:return J2(n.bottomLeftBorderStroke,n.topLeftBorderStroke)}},J2=function(n,t){var e=[];return ea(n)?e.push(n.subdivide(.5,!1)):e.push(n),ea(t)?e.push(t.subdivide(.5,!0)):e.push(t),e},sa=function(n,t,e,r){var i=[];return ea(n)?i.push(n.subdivide(.5,!1)):i.push(n),ea(e)?i.push(e.subdivide(.5,!0)):i.push(e),ea(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),ea(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},CO=function(n){var t=n.bounds,e=n.styles;return t.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},zb=function(n){var t=n.styles,e=n.bounds,r=Or(t.paddingLeft,e.width),i=Or(t.paddingRight,e.width),s=Or(t.paddingTop,e.width),A=Or(t.paddingBottom,e.width);return e.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+s+A))},Mz=function(n,t){return n===0?t.bounds:n===2?zb(t):CO(t)},kz=function(n,t){return n===0?t.bounds:n===2?zb(t):CO(t)},cx=function(n,t,e){var r=Mz(xg(n.styles.backgroundOrigin,t),n),i=kz(xg(n.styles.backgroundClip,t),n),s=Oz(xg(n.styles.backgroundSize,t),e,r),A=s[0],a=s[1],o=Gm(xg(n.styles.backgroundPosition,t),r.width-A,r.height-a),l=Dz(xg(n.styles.backgroundRepeat,t),o,s,r,i),h=Math.round(r.left+o[0]),u=Math.round(r.top+o[1]);return[l,h,u,A,a]},ng=function(n){return Sr(n)&&n.value===Hg.AUTO},Z2=function(n){return typeof n=="number"},Oz=function(n,t,e){var r=t[0],i=t[1],s=t[2],A=n[0],a=n[1];if(!A)return[0,0];if($i(A)&&a&&$i(a))return[Or(A,e.width),Or(a,e.height)];var o=Z2(s);if(Sr(A)&&(A.value===Hg.CONTAIN||A.value===Hg.COVER)){if(Z2(s)){var l=e.width/e.height;return l<s!=(A.value===Hg.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var h=Z2(r),u=Z2(i),d=h||u;if(ng(A)&&(!a||ng(a))){if(h&&u)return[r,i];if(!o&&!d)return[e.width,e.height];if(d&&o){var f=h?r:i*s,p=u?i:r/s;return[f,p]}var m=h?r:e.width,y=u?i:e.height;return[m,y]}if(o){var w=0,B=0;return $i(A)?w=Or(A,e.width):$i(a)&&(B=Or(a,e.height)),ng(A)?w=B*s:(!a||ng(a))&&(B=w/s),[w,B]}var E=null,S=null;if($i(A)?E=Or(A,e.width):a&&$i(a)&&(S=Or(a,e.height)),E!==null&&(!a||ng(a))&&(S=h&&u?E/r*i:e.height),S!==null&&ng(A)&&(E=h&&u?S/i*r:e.width),E!==null&&S!==null)return[E,S];throw new Error("Unable to calculate background-size for element")},xg=function(n,t){var e=n[t];return typeof e>"u"?n[0]:e},Dz=function(n,t,e,r,i){var s=t[0],A=t[1],a=e[0],o=e[1];switch(n){case 2:return[new Kt(Math.round(r.left),Math.round(r.top+A)),new Kt(Math.round(r.left+r.width),Math.round(r.top+A)),new Kt(Math.round(r.left+r.width),Math.round(o+r.top+A)),new Kt(Math.round(r.left),Math.round(o+r.top+A))];case 3:return[new Kt(Math.round(r.left+s),Math.round(r.top)),new Kt(Math.round(r.left+s+a),Math.round(r.top)),new Kt(Math.round(r.left+s+a),Math.round(r.height+r.top)),new Kt(Math.round(r.left+s),Math.round(r.height+r.top))];case 1:return[new Kt(Math.round(r.left+s),Math.round(r.top+A)),new Kt(Math.round(r.left+s+a),Math.round(r.top+A)),new Kt(Math.round(r.left+s+a),Math.round(r.top+A+o)),new Kt(Math.round(r.left+s),Math.round(r.top+A+o))];default:return[new Kt(Math.round(i.left),Math.round(i.top)),new Kt(Math.round(i.left+i.width),Math.round(i.top)),new Kt(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Kt(Math.round(i.left),Math.round(i.height+i.top))]}},Rz="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",h3="Hidden Text",Hz=function(){function n(t){this._data={},this._document=t}return n.prototype.parseMetrics=function(t,e){var r=this._document.createElement("div"),i=this._document.createElement("img"),s=this._document.createElement("span"),A=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=e,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",A.appendChild(r),i.src=Rz,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",s.style.fontFamily=t,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(h3)),r.appendChild(s),r.appendChild(i);var a=i.offsetTop-s.offsetTop+2;r.removeChild(s),r.appendChild(this._document.createTextNode(h3)),r.style.lineHeight="normal",i.style.verticalAlign="super";var o=i.offsetTop-r.offsetTop+2;return A.removeChild(r),{baseline:a,middle:o}},n.prototype.getMetrics=function(t,e){var r=t+" "+e;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,e)),this._data[r]},n}(),xO=function(){function n(t,e){this.context=t,this.options=e}return n}(),Kz=1e4,Vz=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i._activeEffects=[],i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),r.canvas||(i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px"),i.fontMetrics=new Hz(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),i}return t.prototype.applyEffects=function(e){for(var r=this;this._activeEffects.length;)this.popEffect();e.forEach(function(i){return r.applyEffect(i)})},t.prototype.applyEffect=function(e){this.ctx.save(),_z(e)&&(this.ctx.globalAlpha=e.opacity),Iz(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),wO(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return Ss(this,void 0,void 0,function(){var r;return as(this,function(i){switch(i.label){case 0:return r=e.element.container.styles,r.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return Ss(this,void 0,void 0,function(){return as(this,function(r){switch(r.label){case 0:if(sn(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(e)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,r,i){var s=this;if(r===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i);else{var A=S4(e.text);A.reduce(function(a,o){return s.ctx.fillText(o,a,e.bounds.top+i),a+s.ctx.measureText(o).width},e.bounds.left)}},t.prototype.createFontStyle=function(e){var r=e.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),i=zz(e.fontFamily).join(", "),s=Fw(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,r,e.fontWeight,s,i].join(" "),i,s]},t.prototype.renderTextNode=function(e,r){return Ss(this,void 0,void 0,function(){var i,s,A,a,o,l,h,u,d=this;return as(this,function(f){return i=this.createFontStyle(r),s=i[0],A=i[1],a=i[2],this.ctx.font=s,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(A,a),l=o.baseline,h=o.middle,u=r.paintOrder,e.textBounds.forEach(function(p){u.forEach(function(m){switch(m){case 0:d.ctx.fillStyle=ln(r.color),d.renderTextWithLetterSpacing(p,r.letterSpacing,l);var y=r.textShadow;y.length&&p.text.trim().length&&(y.slice(0).reverse().forEach(function(w){d.ctx.shadowColor=ln(w.color),d.ctx.shadowOffsetX=w.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=w.offsetY.number*d.options.scale,d.ctx.shadowBlur=w.blur.number,d.renderTextWithLetterSpacing(p,r.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),r.textDecorationLine.length&&(d.ctx.fillStyle=ln(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+l),p.bounds.width,1);break;case 2:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:d.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+h),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(d.ctx.strokeStyle=ln(r.webkitTextStrokeColor),d.ctx.lineWidth=r.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(e,r,i){if(i&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=zb(e),A=Wb(r);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return Ss(this,void 0,void 0,function(){var r,i,s,A,a,o,B,B,l,h,u,d,S,f,p,I,m,y,w,B,E,S,I;return as(this,function(L){switch(L.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,i=e.curves,s=r.styles,A=0,a=r.textNodes,L.label=1;case 1:return A<a.length?(o=a[A],[4,this.renderTextNode(o,s)]):[3,4];case 2:L.sent(),L.label=3;case 3:return A++,[3,1];case 4:if(!(r instanceof rO))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return B=L.sent(),this.renderReplacedElement(r,i,B),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof iO&&this.renderReplacedElement(r,i,r.canvas),!(r instanceof nO))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return B=L.sent(),this.renderReplacedElement(r,i,B),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof oO&&r.tree?(l=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:h=L.sent(),r.width&&r.height&&this.ctx.drawImage(h,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),L.label=14;case 14:if(r instanceof F4&&(u=Math.min(r.bounds.width,r.bounds.height),r.type===Kb?r.checked&&(this.ctx.save(),this.path([new Kt(r.bounds.left+u*.39363,r.bounds.top+u*.79),new Kt(r.bounds.left+u*.16,r.bounds.top+u*.5549),new Kt(r.bounds.left+u*.27347,r.bounds.top+u*.44071),new Kt(r.bounds.left+u*.39694,r.bounds.top+u*.5649),new Kt(r.bounds.left+u*.72983,r.bounds.top+u*.23),new Kt(r.bounds.left+u*.84,r.bounds.top+u*.34085),new Kt(r.bounds.left+u*.39363,r.bounds.top+u*.79)]),this.ctx.fillStyle=ln(JU),this.ctx.fill(),this.ctx.restore()):r.type===Vb&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+u/2,r.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=ln(JU),this.ctx.fill(),this.ctx.restore())),Gz(r)&&r.value.length){switch(d=this.createFontStyle(s),S=d[0],f=d[1],p=this.fontMetrics.getMetrics(S,f).baseline,this.ctx.font=S,this.ctx.fillStyle=ln(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=$z(r.styles.textAlign),I=zb(r),m=0,r.styles.textAlign){case 1:m+=I.width/2;break;case 2:m+=I.width;break}y=I.add(m,0,0,-I.height/2+1),this.ctx.save(),this.path([new Kt(I.left,I.top),new Kt(I.left+I.width,I.top),new Kt(I.left+I.width,I.top+I.height),new Kt(I.left,I.top+I.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Av(r.value,y),s.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!sn(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];B=void 0,E=w.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return B=L.sent(),this.ctx.drawImage(B,r.bounds.left-(B.width+10),r.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:e.listValue&&r.styles.listStyleType!==-1&&(S=this.createFontStyle(s)[0],this.ctx.font=S,this.ctx.fillStyle=ln(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",I=new uc(r.bounds.left,r.bounds.top+Or(r.styles.paddingTop,r.bounds.width),r.bounds.width,PU(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Av(e.listValue,I),s.letterSpacing,PU(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return Ss(this,void 0,void 0,function(){var r,i,w,s,A,w,a,o,w,l,h,w,u,d,w,f,p,w,m,y,w;return as(this,function(B){switch(B.label){case 0:if(sn(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:B.sent(),r=0,i=e.negativeZIndex,B.label=2;case 2:return r<i.length?(w=i[r],[4,this.renderStack(w)]):[3,5];case 3:B.sent(),B.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:B.sent(),s=0,A=e.nonInlineLevel,B.label=7;case 7:return s<A.length?(w=A[s],[4,this.renderNode(w)]):[3,10];case 8:B.sent(),B.label=9;case 9:return s++,[3,7];case 10:a=0,o=e.nonPositionedFloats,B.label=11;case 11:return a<o.length?(w=o[a],[4,this.renderStack(w)]):[3,14];case 12:B.sent(),B.label=13;case 13:return a++,[3,11];case 14:l=0,h=e.nonPositionedInlineLevel,B.label=15;case 15:return l<h.length?(w=h[l],[4,this.renderStack(w)]):[3,18];case 16:B.sent(),B.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,B.label=19;case 19:return u<d.length?(w=d[u],[4,this.renderNode(w)]):[3,22];case 20:B.sent(),B.label=21;case 21:return u++,[3,19];case 22:f=0,p=e.zeroOrAutoZIndexOrTransformedOrOpacity,B.label=23;case 23:return f<p.length?(w=p[f],[4,this.renderStack(w)]):[3,26];case 24:B.sent(),B.label=25;case 25:return f++,[3,23];case 26:m=0,y=e.positiveZIndex,B.label=27;case 27:return m<y.length?(w=y[m],[4,this.renderStack(w)]):[3,30];case 28:B.sent(),B.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var r=this;e.forEach(function(i,s){var A=ea(i)?i.start:i;s===0?r.ctx.moveTo(A.x,A.y):r.ctx.lineTo(A.x,A.y),ea(i)&&r.ctx.bezierCurveTo(i.startControl.x,i.startControl.y,i.endControl.x,i.endControl.y,i.end.x,i.end.y)})},t.prototype.renderRepeat=function(e,r,i,s){this.path(e),this.ctx.fillStyle=r,this.ctx.translate(i,s),this.ctx.fill(),this.ctx.translate(-i,-s)},t.prototype.resizeImage=function(e,r,i){var s;if(e.width===r&&e.height===i)return e;var A=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,a=A.createElement("canvas");a.width=Math.max(1,r),a.height=Math.max(1,i);var o=a.getContext("2d");return o.drawImage(e,0,0,e.width,e.height,0,0,r,i),a},t.prototype.renderBackgroundImage=function(e){return Ss(this,void 0,void 0,function(){var r,i,s,A,a,o;return as(this,function(l){switch(l.label){case 0:r=e.styles.backgroundImage.length-1,i=function(h){var u,d,f,W,rt,it,j,V,H,p,W,rt,it,j,V,m,y,w,B,E,S,I,L,k,H,Q,W,U,D,j,V,st,rt,it,At,ut,vt,mt,M,$,q,tt;return as(this,function(et){switch(et.label){case 0:if(h.type!==0)return[3,5];u=void 0,d=h.url,et.label=1;case 1:return et.trys.push([1,3,,4]),[4,s.context.cache.match(d)];case 2:return u=et.sent(),[3,4];case 3:return et.sent(),s.context.logger.error("Error loading background-image "+d),[3,4];case 4:return u&&(f=cx(e,r,[u.width,u.height,u.width/u.height]),W=f[0],rt=f[1],it=f[2],j=f[3],V=f[4],H=s.ctx.createPattern(s.resizeImage(u,j,V),"repeat"),s.renderRepeat(W,H,rt,it)),[3,6];case 5:Ij(h)?(p=cx(e,r,[null,null,null]),W=p[0],rt=p[1],it=p[2],j=p[3],V=p[4],m=xj(h.angle,j,V),y=m[0],w=m[1],B=m[2],E=m[3],S=m[4],I=document.createElement("canvas"),I.width=j,I.height=V,L=I.getContext("2d"),k=L.createLinearGradient(w,E,B,S),QU(h.stops,y).forEach(function(ot){return k.addColorStop(ot.stop,ln(ot.color))}),L.fillStyle=k,L.fillRect(0,0,j,V),j>0&&V>0&&(H=s.ctx.createPattern(I,"repeat"),s.renderRepeat(W,H,rt,it))):_j(h)&&(Q=cx(e,r,[null,null,null]),W=Q[0],U=Q[1],D=Q[2],j=Q[3],V=Q[4],st=h.position.length===0?[C4]:h.position,rt=Or(st[0],j),it=Or(st[st.length-1],V),At=Ej(h,rt,it,j,V),ut=At[0],vt=At[1],ut>0&&vt>0&&(mt=s.ctx.createRadialGradient(U+rt,D+it,0,U+rt,D+it,ut),QU(h.stops,ut*2).forEach(function(ot){return mt.addColorStop(ot.stop,ln(ot.color))}),s.path(W),s.ctx.fillStyle=mt,ut!==vt?(M=e.bounds.left+.5*e.bounds.width,$=e.bounds.top+.5*e.bounds.height,q=vt/ut,tt=1/q,s.ctx.save(),s.ctx.translate(M,$),s.ctx.transform(1,0,0,q,0,0),s.ctx.translate(-M,-$),s.ctx.fillRect(U,tt*(D-$)+$,j,V*tt),s.ctx.restore()):s.ctx.fill())),et.label=6;case 6:return r--,[2]}})},s=this,A=0,a=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return A<a.length?(o=a[A],[5,i(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,r,i){return Ss(this,void 0,void 0,function(){return as(this,function(s){return this.path(c3(i,r)),this.ctx.fillStyle=ln(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,r,i,s){return Ss(this,void 0,void 0,function(){var A,a;return as(this,function(o){switch(o.label){case 0:return r<3?[4,this.renderSolidBorder(e,i,s)]:[3,2];case 1:return o.sent(),[2];case 2:return A=Qz(s,i),this.path(A),this.ctx.fillStyle=ln(e),this.ctx.fill(),a=Nz(s,i),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return Ss(this,void 0,void 0,function(){var r,i,s,A,a,o,l,h,u=this;return as(this,function(d){switch(d.label){case 0:return this.applyEffects(e.getEffects(2)),r=e.container.styles,i=!$h(r.backgroundColor)||r.backgroundImage.length,s=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],A=jz(xg(r.backgroundClip,0),e.curves),i||r.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),$h(r.backgroundColor)||(this.ctx.fillStyle=ln(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(f){u.ctx.save();var p=$b(e.curves),m=f.inset?0:Kz,y=Uz(p,-m+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(u.path(p),u.ctx.clip(),u.mask(y)):(u.mask(p),u.ctx.clip(),u.path(y)),u.ctx.shadowOffsetX=f.offsetX.number+m,u.ctx.shadowOffsetY=f.offsetY.number,u.ctx.shadowColor=ln(f.color),u.ctx.shadowBlur=f.blur.number,u.ctx.fillStyle=f.inset?ln(f.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),d.label=2;case 2:a=0,o=0,l=s,d.label=3;case 3:return o<l.length?(h=l[o],h.style!==0&&!$h(h.color)&&h.width>0?h.style!==2?[3,5]:[4,this.renderDashedDottedBorder(h.color,h.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return h.style!==3?[3,7]:[4,this.renderDashedDottedBorder(h.color,h.width,a,e.curves,3)];case 6:return d.sent(),[3,11];case 7:return h.style!==4?[3,9]:[4,this.renderDoubleBorder(h.color,h.width,a,e.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(h.color,a,e.curves)];case 10:d.sent(),d.label=11;case 11:a++,d.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,r,i,s,A){return Ss(this,void 0,void 0,function(){var a,o,l,h,u,d,f,p,m,y,w,B,E,S,I,L,I,L;return as(this,function(k){return this.ctx.save(),a=Pz(s,i),o=c3(s,i),A===2&&(this.path(o),this.ctx.clip()),ea(o[0])?(l=o[0].start.x,h=o[0].start.y):(l=o[0].x,h=o[0].y),ea(o[1])?(u=o[1].end.x,d=o[1].end.y):(u=o[1].x,d=o[1].y),i===0||i===2?f=Math.abs(l-u):f=Math.abs(h-d),this.ctx.beginPath(),A===3?this.formatPath(a):this.formatPath(o.slice(0,2)),p=r<3?r*3:r*2,m=r<3?r*2:r,A===3&&(p=r,m=r),y=!0,f<=p*2?y=!1:f<=p*2+m?(w=f/(2*p+m),p*=w,m*=w):(B=Math.floor((f+m)/(p+m)),E=(f-B*p)/(B-1),S=(f-(B+1)*p)/B,m=S<=0||Math.abs(m-E)<Math.abs(m-S)?E:S),y&&(A===3?this.ctx.setLineDash([0,p+m]):this.ctx.setLineDash([p,m])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=ln(e),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(ea(o[0])&&(I=o[3],L=o[0],this.ctx.beginPath(),this.formatPath([new Kt(I.end.x,I.end.y),new Kt(L.start.x,L.start.y)]),this.ctx.stroke()),ea(o[1])&&(I=o[1],L=o[2],this.ctx.beginPath(),this.formatPath([new Kt(I.end.x,I.end.y),new Kt(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return Ss(this,void 0,void 0,function(){var r;return as(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ln(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=Lz(e),[4,this.renderStack(r)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(xO),Gz=function(n){return n instanceof aO||n instanceof AO?!0:n instanceof F4&&n.type!==Vb&&n.type!==Kb},jz=function(n,t){switch(n){case 0:return $b(t);case 2:return Sz(t);case 1:default:return Wb(t)}},$z=function(n){switch(n){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Wz=["-apple-system","system-ui"],zz=function(n){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?n.filter(function(t){return Wz.indexOf(t)===-1}):n},Xz=function(n){za(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=r,i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),i}return t.prototype.render=function(e){return Ss(this,void 0,void 0,function(){var r,i;return as(this,function(s){switch(s.label){case 0:return r=sF(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,qz(r)];case 1:return i=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ln(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(xO),qz=function(n){return new Promise(function(t,e){var r=new Image;r.onload=function(){t(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(n))})},Yz=function(){function n(t){var e=t.id,r=t.enabled;this.id=e,this.enabled=r,this.start=Date.now()}return n.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,U2([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.prototype.getTime=function(){return Date.now()-this.start},n.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,U2([this.id,this.getTime()+"ms"],t))},n.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,U2([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,U2([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},n.instances={},n}(),Jz=function(){function n(t,e){var r;this.windowBounds=e,this.instanceName="#"+n.instanceCount++,this.logger=new Yz({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new vz(this,t)}return n.instanceCount=1,n}(),Zz=function(n,t){return t===void 0&&(t={}),tX(n,t)};typeof window<"u"&&vO.setContext(window);var tX=function(n,t){return Ss(void 0,void 0,void 0,function(){var e,r,i,s,A,a,o,l,h,u,d,f,p,m,y,w,B,E,S,I,k,L,k,H,Q,W,U,D,j,V,st,rt,it,At,ut,vt,mt,M,$,q;return as(this,function(tt){switch(tt.label){case 0:if(!n||typeof n!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=n.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(r=e.defaultView,!r)throw new Error("Document is not attached to a Window");return i={allowTaint:(H=t.allowTaint)!==null&&H!==void 0?H:!1,imageTimeout:(Q=t.imageTimeout)!==null&&Q!==void 0?Q:15e3,proxy:t.proxy,useCORS:(W=t.useCORS)!==null&&W!==void 0?W:!1},s=GS({logging:(U=t.logging)!==null&&U!==void 0?U:!0,cache:t.cache},i),A={windowWidth:(D=t.windowWidth)!==null&&D!==void 0?D:r.innerWidth,windowHeight:(j=t.windowHeight)!==null&&j!==void 0?j:r.innerHeight,scrollX:(V=t.scrollX)!==null&&V!==void 0?V:r.pageXOffset,scrollY:(st=t.scrollY)!==null&&st!==void 0?st:r.pageYOffset},a=new uc(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),o=new Jz(s,a),l=(rt=t.foreignObjectRendering)!==null&&rt!==void 0?rt:!1,h={allowTaint:(it=t.allowTaint)!==null&&it!==void 0?it:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),u=new a3(o,n,h),d=u.clonedReferenceElement,d?[4,u.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=tt.sent(),p=T4(d)||ez(d)?UV(d.ownerDocument):YB(o,d),m=p.width,y=p.height,w=p.left,B=p.top,E=eX(o,d,t.backgroundColor),S={canvas:t.canvas,backgroundColor:E,scale:(ut=(At=t.scale)!==null&&At!==void 0?At:r.devicePixelRatio)!==null&&ut!==void 0?ut:1,x:((vt=t.x)!==null&&vt!==void 0?vt:0)+w,y:((mt=t.y)!==null&&mt!==void 0?mt:0)+B,width:(M=t.width)!==null&&M!==void 0?M:Math.ceil(m),height:($=t.height)!==null&&$!==void 0?$:Math.ceil(y)},l?(o.logger.debug("Document cloned, using foreign object rendering"),k=new Xz(o,S),[4,k.render(d)]):[3,3];case 2:return I=tt.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+w+","+B+" with size "+m+"x"+y+" using computed rendering"),o.logger.debug("Starting DOM parsing"),L=cO(o,d),E===L.styles.backgroundColor&&(L.styles.backgroundColor=nc.TRANSPARENT),o.logger.debug("Starting renderer for element at "+S.x+","+S.y+" with size "+S.width+"x"+S.height),k=new Vz(o,S),[4,k.render(L)];case 4:I=tt.sent(),tt.label=5;case 5:return(!((q=t.removeContainer)!==null&&q!==void 0)||q)&&(a3.destroy(f)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,I]}})})},eX=function(n,t,e){var r=t.ownerDocument,i=r.documentElement?nv(n,getComputedStyle(r.documentElement).backgroundColor):nc.TRANSPARENT,s=r.body?nv(n,getComputedStyle(r.body).backgroundColor):nc.TRANSPARENT,A=typeof e=="string"?nv(n,e):e===null?nc.TRANSPARENT:4294967295;return t===r.documentElement?$h(i)?$h(s)?A:s:i:A};const rX=Object.freeze(Object.defineProperty({__proto__:null,default:Zz},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function u3(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function iX(n){if(Array.isArray(n))return n}function nX(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,i,s,A,a=[],o=!0,l=!1;try{if(s=(e=e.call(n)).next,t!==0)for(;!(o=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(h){l=!0,i=h}finally{try{if(!o&&e.return!=null&&(A=e.return(),Object(A)!==A))return}finally{if(l)throw i}}return a}}function sX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
294
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AX(n,t){return iX(n)||nX(n,t)||aX(n,t)||sX()}function aX(n,t){if(n){if(typeof n=="string")return u3(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?u3(n,t):void 0}}const EO=Object.entries,f3=Object.setPrototypeOf,oX=Object.isFrozen,lX=Object.getPrototypeOf,cX=Object.getOwnPropertyDescriptor;let _s=Object.freeze,oa=Object.seal,Eg=Object.create,SO=typeof Reflect<"u"&&Reflect,uF=SO.apply,fF=SO.construct;_s||(_s=function(t){return t});oa||(oa=function(t){return t});uF||(uF=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return t.apply(e,i)});fF||(fF=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const sg=zi(Array.prototype.forEach),hX=zi(Array.prototype.lastIndexOf),d3=zi(Array.prototype.pop),Ag=zi(Array.prototype.push),uX=zi(Array.prototype.splice),vs=Array.isArray,Wm=zi(String.prototype.toLowerCase),hx=zi(String.prototype.toString),g3=zi(String.prototype.match),ag=zi(String.prototype.replace),p3=zi(String.prototype.indexOf),fX=zi(String.prototype.trim),dX=zi(Number.prototype.toString),gX=zi(Boolean.prototype.toString),m3=typeof BigInt>"u"?null:zi(BigInt.prototype.toString),v3=typeof Symbol>"u"?null:zi(Symbol.prototype.toString),hi=zi(Object.prototype.hasOwnProperty),lm=zi(Object.prototype.toString),Sn=zi(RegExp.prototype.test),cm=pX(TypeError);function zi(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return uF(n,t,r)}}function pX(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return fF(n,e)}}function He(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wm;if(f3&&f3(n,null),!vs(t))return n;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=e(i);s!==i&&(oX(t)||(t[r]=s),i=s)}n[i]=!0}return n}function mX(n){for(let t=0;t<n.length;t++)hi(n,t)||(n[t]=null);return n}function ts(n){const t=Eg(null);for(const r of EO(n)){var e=AX(r,2);const i=e[0],s=e[1];hi(n,i)&&(vs(s)?t[i]=mX(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=ts(s):t[i]=s)}return t}function vX(n){switch(typeof n){case"string":return n;case"number":return dX(n);case"boolean":return gX(n);case"bigint":return m3?m3(n):"0";case"symbol":return v3?v3(n):"Symbol()";case"undefined":return lm(n);case"function":case"object":{if(n===null)return lm(n);const t=n,e=fo(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:lm(r)}return lm(n)}default:return lm(n)}}function fo(n,t){for(;n!==null;){const r=cX(n,t);if(r){if(r.get)return zi(r.get);if(typeof r.value=="function")return zi(r.value)}n=lX(n)}function e(){return null}return e}function wX(n){try{return Sn(n,""),!0}catch{return!1}}const w3=_s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ux=_s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fx=_s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yX=_s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dx=_s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bX=_s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),y3=_s(["#text"]),b3=_s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),gx=_s(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B3=_s(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ty=_s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),BX=oa(/{{[\w\W]*|^[\w\W]*}}/g),CX=oa(/<%[\w\W]*|^[\w\W]*%>/g),xX=oa(/\${[\w\W]*/g),EX=oa(/^data-[\-\w.\u00B7-\uFFFF]+$/),SX=oa(/^aria-[\-\w]+$/),C3=oa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),FX=oa(/^(?:\w+script|data):/i),TX=oa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),IX=oa(/^html$/i),_X=oa(/^[a-z][.\w]*(-[.\w]+)+$/i),lo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},UX=function(){return typeof window>"u"?null:window},LX=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(A){return A},createScriptURL(A){return A}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},x3=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function FO(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UX();const t=Jt=>FO(Jt);if(t.version="3.4.7",t.removed=[],!n||!n.document||n.document.nodeType!==lo.document||!n.Element)return t.isSupported=!1,t;let e=n.document;const r=e,i=r.currentScript;n.DocumentFragment;const s=n.HTMLTemplateElement,A=n.Node,a=n.Element,o=n.NodeFilter,l=n.NamedNodeMap;l===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const h=n.DOMParser,u=n.trustedTypes,d=a.prototype,f=fo(d,"cloneNode"),p=fo(d,"remove"),m=fo(d,"nextSibling"),y=fo(d,"childNodes"),w=fo(d,"parentNode"),B=fo(d,"shadowRoot"),E=fo(d,"attributes"),S=A&&A.prototype?fo(A.prototype,"nodeType"):null,I=A&&A.prototype?fo(A.prototype,"nodeName"):null;if(typeof s=="function"){const Jt=e.createElement("template");Jt.content&&Jt.content.ownerDocument&&(e=Jt.content.ownerDocument)}let L,k="";const H=e,Q=H.implementation,W=H.createNodeIterator,U=H.createDocumentFragment,D=H.getElementsByTagName,j=r.importNode;let V=x3();t.isSupported=typeof EO=="function"&&typeof w=="function"&&Q&&Q.createHTMLDocument!==void 0;const st=BX,rt=CX,it=xX,At=EX,ut=SX,vt=FX,mt=TX,M=_X;let $=C3,q=null;const tt=He({},[...w3,...ux,...fx,...dx,...y3]);let et=null;const ot=He({},[...b3,...gx,...B3,...ty]);let dt=Object.seal(Eg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,yt=null;const St=Object.seal(Eg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mt=!0,Pt=!0,jt=!1,z=!0,Nt=!1,ve=!0,re=!1,Tt=!1,ie=!1,kt=!1,qt=!1,Wt=!1,we=!0,Ie=!1;const me="user-content-";let _e=!0,Be=!1,Vt={},ce=null;const Xt=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let fr=null;const Ge=He({},["audio","video","img","source","image","track"]);let Ce=null;const xe=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tr="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let Ae=ke,ge=!1,nr=null;const fe=He({},[tr,ne,ke],hx);let de=He({},["mi","mo","mn","ms","mtext"]),Ye=He({},["annotation-xml"]);const Wo=He({},["title","style","font","a","script"]);let oi=null;const ca=["application/xhtml+xml","text/html"],NA="text/html";let Ht=null,Hn=null;const ha=e.createElement("form"),hs=function(Z){return Z instanceof RegExp||Z instanceof Function},Kn=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Hn&&Hn===Z)return;(!Z||typeof Z!="object")&&(Z={}),Z=ts(Z),oi=ca.indexOf(Z.PARSER_MEDIA_TYPE)===-1?NA:Z.PARSER_MEDIA_TYPE,Ht=oi==="application/xhtml+xml"?hx:Wm,q=hi(Z,"ALLOWED_TAGS")&&vs(Z.ALLOWED_TAGS)?He({},Z.ALLOWED_TAGS,Ht):tt,et=hi(Z,"ALLOWED_ATTR")&&vs(Z.ALLOWED_ATTR)?He({},Z.ALLOWED_ATTR,Ht):ot,nr=hi(Z,"ALLOWED_NAMESPACES")&&vs(Z.ALLOWED_NAMESPACES)?He({},Z.ALLOWED_NAMESPACES,hx):fe,Ce=hi(Z,"ADD_URI_SAFE_ATTR")&&vs(Z.ADD_URI_SAFE_ATTR)?He(ts(xe),Z.ADD_URI_SAFE_ATTR,Ht):xe,fr=hi(Z,"ADD_DATA_URI_TAGS")&&vs(Z.ADD_DATA_URI_TAGS)?He(ts(Ge),Z.ADD_DATA_URI_TAGS,Ht):Ge,ce=hi(Z,"FORBID_CONTENTS")&&vs(Z.FORBID_CONTENTS)?He({},Z.FORBID_CONTENTS,Ht):Xt,wt=hi(Z,"FORBID_TAGS")&&vs(Z.FORBID_TAGS)?He({},Z.FORBID_TAGS,Ht):ts({}),yt=hi(Z,"FORBID_ATTR")&&vs(Z.FORBID_ATTR)?He({},Z.FORBID_ATTR,Ht):ts({}),Vt=hi(Z,"USE_PROFILES")?Z.USE_PROFILES&&typeof Z.USE_PROFILES=="object"?ts(Z.USE_PROFILES):Z.USE_PROFILES:!1,Mt=Z.ALLOW_ARIA_ATTR!==!1,Pt=Z.ALLOW_DATA_ATTR!==!1,jt=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,z=Z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Nt=Z.SAFE_FOR_TEMPLATES||!1,ve=Z.SAFE_FOR_XML!==!1,re=Z.WHOLE_DOCUMENT||!1,kt=Z.RETURN_DOM||!1,qt=Z.RETURN_DOM_FRAGMENT||!1,Wt=Z.RETURN_TRUSTED_TYPE||!1,ie=Z.FORCE_BODY||!1,we=Z.SANITIZE_DOM!==!1,Ie=Z.SANITIZE_NAMED_PROPS||!1,_e=Z.KEEP_CONTENT!==!1,Be=Z.IN_PLACE||!1,$=wX(Z.ALLOWED_URI_REGEXP)?Z.ALLOWED_URI_REGEXP:C3,Ae=typeof Z.NAMESPACE=="string"?Z.NAMESPACE:ke,de=hi(Z,"MATHML_TEXT_INTEGRATION_POINTS")&&Z.MATHML_TEXT_INTEGRATION_POINTS&&typeof Z.MATHML_TEXT_INTEGRATION_POINTS=="object"?ts(Z.MATHML_TEXT_INTEGRATION_POINTS):He({},["mi","mo","mn","ms","mtext"]),Ye=hi(Z,"HTML_INTEGRATION_POINTS")&&Z.HTML_INTEGRATION_POINTS&&typeof Z.HTML_INTEGRATION_POINTS=="object"?ts(Z.HTML_INTEGRATION_POINTS):He({},["annotation-xml"]);const xt=hi(Z,"CUSTOM_ELEMENT_HANDLING")&&Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING=="object"?ts(Z.CUSTOM_ELEMENT_HANDLING):Eg(null);if(dt=Eg(null),hi(xt,"tagNameCheck")&&hs(xt.tagNameCheck)&&(dt.tagNameCheck=xt.tagNameCheck),hi(xt,"attributeNameCheck")&&hs(xt.attributeNameCheck)&&(dt.attributeNameCheck=xt.attributeNameCheck),hi(xt,"allowCustomizedBuiltInElements")&&typeof xt.allowCustomizedBuiltInElements=="boolean"&&(dt.allowCustomizedBuiltInElements=xt.allowCustomizedBuiltInElements),Nt&&(Pt=!1),qt&&(kt=!0),Vt&&(q=He({},y3),et=Eg(null),Vt.html===!0&&(He(q,w3),He(et,b3)),Vt.svg===!0&&(He(q,ux),He(et,gx),He(et,ty)),Vt.svgFilters===!0&&(He(q,fx),He(et,gx),He(et,ty)),Vt.mathMl===!0&&(He(q,dx),He(et,B3),He(et,ty))),St.tagCheck=null,St.attributeCheck=null,hi(Z,"ADD_TAGS")&&(typeof Z.ADD_TAGS=="function"?St.tagCheck=Z.ADD_TAGS:vs(Z.ADD_TAGS)&&(q===tt&&(q=ts(q)),He(q,Z.ADD_TAGS,Ht))),hi(Z,"ADD_ATTR")&&(typeof Z.ADD_ATTR=="function"?St.attributeCheck=Z.ADD_ATTR:vs(Z.ADD_ATTR)&&(et===ot&&(et=ts(et)),He(et,Z.ADD_ATTR,Ht))),hi(Z,"ADD_URI_SAFE_ATTR")&&vs(Z.ADD_URI_SAFE_ATTR)&&He(Ce,Z.ADD_URI_SAFE_ATTR,Ht),hi(Z,"FORBID_CONTENTS")&&vs(Z.FORBID_CONTENTS)&&(ce===Xt&&(ce=ts(ce)),He(ce,Z.FORBID_CONTENTS,Ht)),hi(Z,"ADD_FORBID_CONTENTS")&&vs(Z.ADD_FORBID_CONTENTS)&&(ce===Xt&&(ce=ts(ce)),He(ce,Z.ADD_FORBID_CONTENTS,Ht)),_e&&(q["#text"]=!0),re&&He(q,["html","head","body"]),q.table&&(He(q,["tbody"]),delete wt.tbody),Z.TRUSTED_TYPES_POLICY){if(typeof Z.TRUSTED_TYPES_POLICY.createHTML!="function")throw cm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=Z.TRUSTED_TYPES_POLICY,k=L.createHTML("")}else L===void 0&&(L=LX(u,i)),L!==null&&typeof k=="string"&&(k=L.createHTML(""));(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&q===tt&&(q=ts(q)),V.uponSanitizeAttribute.length>0&&et===ot&&(et=ts(et)),_s&&_s(Z),Hn=Z},Hr=He({},[...ux,...fx,...yX]),bi=He({},[...dx,...bX]),Xi=function(Z){let xt=w(Z);(!xt||!xt.tagName)&&(xt={namespaceURI:Ae,tagName:"template"});const Rt=Wm(Z.tagName),We=Wm(xt.tagName);return nr[Z.namespaceURI]?Z.namespaceURI===ne?xt.namespaceURI===ke?Rt==="svg":xt.namespaceURI===tr?Rt==="svg"&&(We==="annotation-xml"||de[We]):!!Hr[Rt]:Z.namespaceURI===tr?xt.namespaceURI===ke?Rt==="math":xt.namespaceURI===ne?Rt==="math"&&Ye[We]:!!bi[Rt]:Z.namespaceURI===ke?xt.namespaceURI===ne&&!Ye[We]||xt.namespaceURI===tr&&!de[We]?!1:!bi[Rt]&&(Wo[Rt]||!Hr[Rt]):!!(oi==="application/xhtml+xml"&&nr[Z.namespaceURI]):!1},qi=function(Z){Ag(t.removed,{element:Z});try{w(Z).removeChild(Z)}catch{p(Z)}},Vn=function(Z,xt){try{Ag(t.removed,{attribute:xt.getAttributeNode(Z),from:xt})}catch{Ag(t.removed,{attribute:null,from:xt})}if(xt.removeAttribute(Z),Z==="is")if(kt||qt)try{qi(xt)}catch{}else try{xt.setAttribute(Z,"")}catch{}},Qs=function(Z){let xt=null,Rt=null;if(ie)Z="<remove></remove>"+Z;else{const ar=g3(Z,/^[\r\n\t ]+/);Rt=ar&&ar[0]}oi==="application/xhtml+xml"&&Ae===ke&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");const We=L?L.createHTML(Z):Z;if(Ae===ke)try{xt=new h().parseFromString(We,oi)}catch{}if(!xt||!xt.documentElement){xt=Q.createDocument(Ae,"template",null);try{xt.documentElement.innerHTML=ge?k:We}catch{}}const Oe=xt.body||xt.documentElement;return Z&&Rt&&Oe.insertBefore(e.createTextNode(Rt),Oe.childNodes[0]||null),Ae===ke?D.call(xt,re?"html":"body")[0]:re?xt.documentElement:Oe},qs=function(Z){return W.call(Z.ownerDocument||Z,Z,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},Ns=function(Z){Z.normalize();const xt=W.call(Z.ownerDocument||Z,Z,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let Rt=xt.nextNode();for(;Rt;){let We=Rt.data;sg([st,rt,it],Oe=>{We=ag(We,Oe," ")}),Rt.data=We,Rt=xt.nextNode()}},Gn=function(Z){const xt=I?I(Z):null;return typeof xt!="string"||Ht(xt)!=="form"?!1:typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||Z.attributes!==E(Z)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function"||Z.nodeType!==S(Z)||Z.childNodes!==y(Z)},an=function(Z){if(!S||typeof Z!="object"||Z===null)return!1;try{return S(Z)===lo.documentFragment}catch{return!1}},PA=function(Z){if(!S||typeof Z!="object"||Z===null)return!1;try{return typeof S(Z)=="number"}catch{return!1}};function Oi(Jt,Z,xt){sg(Jt,Rt=>{Rt.call(t,Z,xt,Hn)})}const Ja=function(Z){let xt=null;if(Oi(V.beforeSanitizeElements,Z,null),Gn(Z))return qi(Z),!0;const Rt=Ht(Z.nodeName);if(Oi(V.uponSanitizeElement,Z,{tagName:Rt,allowedTags:q}),ve&&Z.hasChildNodes()&&!PA(Z.firstElementChild)&&Sn(/<[/\w!]/g,Z.innerHTML)&&Sn(/<[/\w!]/g,Z.textContent)||ve&&Z.namespaceURI===ke&&Rt==="style"&&PA(Z.firstElementChild)||Z.nodeType===lo.progressingInstruction||ve&&Z.nodeType===lo.comment&&Sn(/<[/\w]/g,Z.data))return qi(Z),!0;if(wt[Rt]||!(St.tagCheck instanceof Function&&St.tagCheck(Rt))&&!q[Rt]){if(!wt[Rt]&&Xo(Rt)&&(dt.tagNameCheck instanceof RegExp&&Sn(dt.tagNameCheck,Rt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Rt)))return!1;if(_e&&!ce[Rt]){const Oe=w(Z),ar=y(Z);if(ar&&Oe){const bn=ar.length;for(let Bi=bn-1;Bi>=0;--Bi){const on=f(ar[Bi],!0);Oe.insertBefore(on,m(Z))}}}return qi(Z),!0}return(S?S(Z):Z.nodeType)===lo.element&&!Xi(Z)||(Rt==="noscript"||Rt==="noembed"||Rt==="noframes")&&Sn(/<\/no(script|embed|frames)/i,Z.innerHTML)?(qi(Z),!0):(Nt&&Z.nodeType===lo.text&&(xt=Z.textContent,sg([st,rt,it],Oe=>{xt=ag(xt,Oe," ")}),Z.textContent!==xt&&(Ag(t.removed,{element:Z.cloneNode()}),Z.textContent=xt)),Oi(V.afterSanitizeElements,Z,null),!1)},zo=function(Z,xt,Rt){if(yt[xt]||we&&(xt==="id"||xt==="name")&&(Rt in e||Rt in ha))return!1;const We=et[xt]||St.attributeCheck instanceof Function&&St.attributeCheck(xt,Z);if(!(Pt&&!yt[xt]&&Sn(At,xt))){if(!(Mt&&Sn(ut,xt))){if(!We||yt[xt]){if(!(Xo(Z)&&(dt.tagNameCheck instanceof RegExp&&Sn(dt.tagNameCheck,Z)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Z))&&(dt.attributeNameCheck instanceof RegExp&&Sn(dt.attributeNameCheck,xt)||dt.attributeNameCheck instanceof Function&&dt.attributeNameCheck(xt,Z))||xt==="is"&&dt.allowCustomizedBuiltInElements&&(dt.tagNameCheck instanceof RegExp&&Sn(dt.tagNameCheck,Rt)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(Rt))))return!1}else if(!Ce[xt]){if(!Sn($,ag(Rt,mt,""))){if(!((xt==="src"||xt==="xlink:href"||xt==="href")&&Z!=="script"&&p3(Rt,"data:")===0&&fr[Z])){if(!(jt&&!Sn(vt,ag(Rt,mt,"")))){if(Rt)return!1}}}}}}return!0},bc=He({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xo=function(Z){return!bc[Wm(Z)]&&Sn(M,Z)},Td=function(Z){Oi(V.beforeSanitizeAttributes,Z,null);const xt=Z.attributes;if(!xt||Gn(Z))return;const Rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let We=xt.length;for(;We--;){const Oe=xt[We],ar=Oe.name,bn=Oe.namespaceURI,Bi=Oe.value,on=Ht(ar),su=Bi;let je=ar==="value"?su:fX(su);if(Rt.attrName=on,Rt.attrValue=je,Rt.keepAttr=!0,Rt.forceKeepAttr=void 0,Oi(V.uponSanitizeAttribute,Z,Rt),je=Rt.attrValue,Ie&&(on==="id"||on==="name")&&p3(je,me)!==0&&(Vn(ar,Z),je=me+je),ve&&Sn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,je)){Vn(ar,Z);continue}if(on==="attributename"&&g3(je,"href")){Vn(ar,Z);continue}if(Rt.forceKeepAttr)continue;if(!Rt.keepAttr){Vn(ar,Z);continue}if(!z&&Sn(/\/>/i,je)){Vn(ar,Z);continue}Nt&&sg([st,rt,it],Ys=>{je=ag(je,Ys," ")});const Au=Ht(Z.nodeName);if(!zo(Au,on,je)){Vn(ar,Z);continue}if(L&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!bn)switch(u.getAttributeType(Au,on)){case"TrustedHTML":{je=L.createHTML(je);break}case"TrustedScriptURL":{je=L.createScriptURL(je);break}}if(je!==su)try{bn?Z.setAttributeNS(bn,ar,je):Z.setAttribute(ar,je),Gn(Z)?qi(Z):d3(t.removed)}catch{Vn(ar,Z)}}Oi(V.afterSanitizeAttributes,Z,null)},Za=function(Z){let xt=null;const Rt=qs(Z);for(Oi(V.beforeSanitizeShadowDOM,Z,null);xt=Rt.nextNode();)if(Oi(V.uponSanitizeShadowNode,xt,null),Ja(xt),Td(xt),an(xt.content)&&Za(xt.content),(S?S(xt):xt.nodeType)===lo.element){const Oe=B?B(xt):xt.shadowRoot;an(Oe)&&(ua(Oe),Za(Oe))}Oi(V.afterSanitizeShadowDOM,Z,null)},ua=function(Z){const xt=S?S(Z):Z.nodeType;if(xt===lo.element){const Oe=B?B(Z):Z.shadowRoot;an(Oe)&&(ua(Oe),Za(Oe))}const Rt=y?y(Z):Z.childNodes;if(!Rt)return;const We=[];sg(Rt,Oe=>{Ag(We,Oe)});for(const Oe of We)ua(Oe);if(xt===lo.element){const Oe=I?I(Z):null;if(typeof Oe=="string"&&Ht(Oe)==="template"){const ar=Z.content;an(ar)&&ua(ar)}}};return t.sanitize=function(Jt){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xt=null,Rt=null,We=null,Oe=null;if(ge=!Jt,ge&&(Jt="<!-->"),typeof Jt!="string"&&!PA(Jt)&&(Jt=vX(Jt),typeof Jt!="string"))throw cm("dirty is not a string, aborting");if(!t.isSupported)return Jt;if(Tt||Kn(Z),t.removed=[],typeof Jt=="string"&&(Be=!1),Be){const Bi=I?I(Jt):Jt.nodeName;if(typeof Bi=="string"){const on=Ht(Bi);if(!q[on]||wt[on])throw cm("root node is forbidden and cannot be sanitized in-place")}if(Gn(Jt))throw cm("root node is clobbered and cannot be sanitized in-place");ua(Jt)}else if(PA(Jt))xt=Qs("<!---->"),Rt=xt.ownerDocument.importNode(Jt,!0),Rt.nodeType===lo.element&&Rt.nodeName==="BODY"||Rt.nodeName==="HTML"?xt=Rt:xt.appendChild(Rt),ua(Rt);else{if(!kt&&!Nt&&!re&&Jt.indexOf("<")===-1)return L&&Wt?L.createHTML(Jt):Jt;if(xt=Qs(Jt),!xt)return kt?null:Wt?k:""}xt&&ie&&qi(xt.firstChild);const ar=qs(Be?Jt:xt);for(;We=ar.nextNode();)Ja(We),Td(We),an(We.content)&&Za(We.content);if(Be)return Nt&&Ns(Jt),Jt;if(kt){if(Nt&&Ns(xt),qt)for(Oe=U.call(xt.ownerDocument);xt.firstChild;)Oe.appendChild(xt.firstChild);else Oe=xt;return(et.shadowroot||et.shadowrootmode)&&(Oe=j.call(r,Oe,!0)),Oe}let bn=re?xt.outerHTML:xt.innerHTML;return re&&q["!doctype"]&&xt.ownerDocument&&xt.ownerDocument.doctype&&xt.ownerDocument.doctype.name&&Sn(IX,xt.ownerDocument.doctype.name)&&(bn="<!DOCTYPE "+xt.ownerDocument.doctype.name+`>
|
|
295
|
+
`+bn),Nt&&sg([st,rt,it],Bi=>{bn=ag(bn,Bi," ")}),L&&Wt?L.createHTML(bn):bn},t.setConfig=function(){let Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Kn(Jt),Tt=!0},t.clearConfig=function(){Hn=null,Tt=!1},t.isValidAttribute=function(Jt,Z,xt){Hn||Kn({});const Rt=Ht(Jt),We=Ht(Z);return zo(Rt,We,xt)},t.addHook=function(Jt,Z){typeof Z=="function"&&Ag(V[Jt],Z)},t.removeHook=function(Jt,Z){if(Z!==void 0){const xt=hX(V[Jt],Z);return xt===-1?void 0:uX(V[Jt],xt,1)[0]}return d3(V[Jt])},t.removeHooks=function(Jt){V[Jt]=[]},t.removeAllHooks=function(){V=x3()},t}var QX=FO();const NX=Object.freeze(Object.defineProperty({__proto__:null,default:QX},Symbol.toStringTag,{value:"Module"}));var hm=function(n){return n&&n.Math===Math&&n},ti=hm(typeof globalThis=="object"&&globalThis)||hm(typeof window=="object"&&window)||hm(typeof self=="object"&&self)||hm(typeof Fg=="object"&&Fg)||hm(typeof Fg=="object"&&Fg)||function(){return this}()||Function("return this")(),Tw={},wi=function(n){try{return!!n()}catch{return!0}},PX=wi,Xa=!PX(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),MX=wi,aC=!MX(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")}),kX=aC,ey=Function.prototype.call,Rn=kX?ey.bind(ey):function(){return ey.apply(ey,arguments)},TO={},IO={}.propertyIsEnumerable,_O=Object.getOwnPropertyDescriptor,OX=_O&&!IO.call({1:2},1);TO.f=OX?function(t){var e=_O(this,t);return!!e&&e.enumerable}:IO;var I4=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}},UO=aC,LO=Function.prototype,dF=LO.call,DX=UO&&LO.bind.bind(dF,dF),yi=UO?DX:function(n){return function(){return dF.apply(n,arguments)}},QO=yi,RX=QO({}.toString),HX=QO("".slice),xd=function(n){return HX(RX(n),8,-1)},KX=yi,VX=wi,GX=xd,px=Object,jX=KX("".split),NO=VX(function(){return!px("z").propertyIsEnumerable(0)})?function(n){return GX(n)==="String"?jX(n,""):px(n)}:px,oC=function(n){return n==null},$X=oC,WX=TypeError,qa=function(n){if($X(n))throw new WX("Can't call method on "+n);return n},zX=NO,XX=qa,Iw=function(n){return zX(XX(n))},mx=typeof document=="object"&&document.all,ki=typeof mx>"u"&&mx!==void 0?function(n){return typeof n=="function"||n===mx}:function(n){return typeof n=="function"},qX=ki,Xs=function(n){return typeof n=="object"?n!==null:qX(n)},vx=ti,YX=ki,JX=function(n){return YX(n)?n:void 0},Ed=function(n,t){return arguments.length<2?JX(vx[n]):vx[n]&&vx[n][t]},ZX=yi,lC=ZX({}.isPrototypeOf),tq=ti,E3=tq.navigator,S3=E3&&E3.userAgent,_w=S3?String(S3):"",PO=ti,wx=_w,F3=PO.process,T3=PO.Deno,I3=F3&&F3.versions||T3&&T3.version,_3=I3&&I3.v8,Oa,Xb;_3&&(Oa=_3.split("."),Xb=Oa[0]>0&&Oa[0]<4?1:+(Oa[0]+Oa[1]));!Xb&&wx&&(Oa=wx.match(/Edge\/(\d+)/),(!Oa||Oa[1]>=74)&&(Oa=wx.match(/Chrome\/(\d+)/),Oa&&(Xb=+Oa[1])));var _4=Xb,U3=_4,eq=wi,rq=ti,iq=rq.String,MO=!!Object.getOwnPropertySymbols&&!eq(function(){var n=Symbol("symbol detection");return!iq(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&U3&&U3<41}),nq=MO,kO=nq&&!Symbol.sham&&typeof Symbol.iterator=="symbol",sq=Ed,Aq=ki,aq=lC,oq=kO,lq=Object,OO=oq?function(n){return typeof n=="symbol"}:function(n){var t=sq("Symbol");return Aq(t)&&aq(t.prototype,lq(n))},cq=String,cC=function(n){try{return cq(n)}catch{return"Object"}},hq=ki,uq=cC,fq=TypeError,wc=function(n){if(hq(n))return n;throw new fq(uq(n)+" is not a function")},dq=wc,gq=oC,T0=function(n,t){var e=n[t];return gq(e)?void 0:dq(e)},yx=Rn,bx=ki,Bx=Xs,pq=TypeError,mq=function(n,t){var e,r;if(t==="string"&&bx(e=n.toString)&&!Bx(r=yx(e,n))||bx(e=n.valueOf)&&!Bx(r=yx(e,n))||t!=="string"&&bx(e=n.toString)&&!Bx(r=yx(e,n)))return r;throw new pq("Can't convert object to primitive value")},DO={exports:{}},L3=ti,vq=Object.defineProperty,U4=function(n,t){try{vq(L3,n,{value:t,configurable:!0,writable:!0})}catch{L3[n]=t}return t},wq=ti,yq=U4,Q3="__core-js_shared__",N3=DO.exports=wq[Q3]||yq(Q3,{});(N3.versions||(N3.versions=[])).push({version:"3.49.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"});var L4=DO.exports,P3=L4,Q4=function(n,t){return P3[n]||(P3[n]=t||{})},bq=qa,Bq=Object,hC=function(n){return Bq(bq(n))},Cq=yi,xq=hC,Eq=Cq({}.hasOwnProperty),Ya=Object.hasOwn||function(t,e){return Eq(xq(t),e)},Sq=yi,Fq=0,Tq=Math.random(),Iq=Sq(1.1.toString),RO=function(n){return"Symbol("+(n===void 0?"":n)+")_"+Iq(++Fq+Tq,36)},_q=ti,Uq=Q4,M3=Ya,Lq=RO,Qq=MO,Nq=kO,_g=_q.Symbol,Cx=Uq("wks"),Pq=Nq?_g.for||_g:_g&&_g.withoutSetter||Lq,yn=function(n){return M3(Cx,n)||(Cx[n]=Qq&&M3(_g,n)?_g[n]:Pq("Symbol."+n)),Cx[n]},Mq=Rn,k3=Xs,O3=OO,kq=T0,Oq=mq,Dq=yn,Rq=TypeError,Hq=Dq("toPrimitive"),Kq=function(n,t){if(!k3(n)||O3(n))return n;var e=kq(n,Hq),r;if(e){if(t===void 0&&(t="default"),r=Mq(e,n,t),!k3(r)||O3(r))return r;throw new Rq("Can't convert object to primitive value")}return t===void 0&&(t="number"),Oq(n,t)},Vq=Kq,Gq=OO,HO=function(n){var t=Vq(n,"string");return Gq(t)?t:t+""},jq=ti,D3=Xs,gF=jq.document,$q=D3(gF)&&D3(gF.createElement),uC=function(n){return $q?gF.createElement(n):{}},Wq=Xa,zq=wi,Xq=uC,KO=!Wq&&!zq(function(){return Object.defineProperty(Xq("div"),"a",{get:function(){return 7}}).a!==7}),qq=Xa,Yq=Rn,Jq=TO,Zq=I4,tY=Iw,eY=HO,rY=Ya,iY=KO,R3=Object.getOwnPropertyDescriptor;Tw.f=qq?R3:function(t,e){if(t=tY(t),e=eY(e),iY)try{return R3(t,e)}catch{}if(rY(t,e))return Zq(!Yq(Jq.f,t,e),t[e])};var yc={},nY=Xa,sY=wi,VO=nY&&sY(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),AY=Xs,aY=String,oY=TypeError,Us=function(n){if(AY(n))return n;throw new oY(aY(n)+" is not an object")},lY=Xa,cY=KO,hY=VO,ry=Us,H3=HO,uY=TypeError,xx=Object.defineProperty,fY=Object.getOwnPropertyDescriptor,Ex="enumerable",Sx="configurable",Fx="writable";yc.f=lY?hY?function(t,e,r){if(ry(t),e=H3(e),ry(r),typeof t=="function"&&e==="prototype"&&"value"in r&&Fx in r&&!r[Fx]){var i=fY(t,e);i&&i[Fx]&&(t[e]=r.value,r={configurable:Sx in r?r[Sx]:i[Sx],enumerable:Ex in r?r[Ex]:i[Ex],writable:!1})}return xx(t,e,r)}:xx:function(t,e,r){if(ry(t),e=H3(e),ry(r),cY)try{return xx(t,e,r)}catch{}if("get"in r||"set"in r)throw new uY("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var dY=Xa,gY=yc,pY=I4,Uw=dY?function(n,t,e){return gY.f(n,t,pY(1,e))}:function(n,t,e){return n[t]=e,n},GO={exports:{}},pF=Xa,mY=Ya,jO=Function.prototype,vY=pF&&Object.getOwnPropertyDescriptor,$O=mY(jO,"name"),wY=$O&&(function(){}).name==="something",yY=$O&&(!pF||pF&&vY(jO,"name").configurable),fC={PROPER:wY,CONFIGURABLE:yY},bY=yi,BY=ki,mF=L4,CY=bY(Function.toString);BY(mF.inspectSource)||(mF.inspectSource=function(n){return CY(n)});var N4=mF.inspectSource,xY=ti,EY=ki,K3=xY.WeakMap,SY=EY(K3)&&/native code/.test(String(K3)),FY=Q4,TY=RO,V3=FY("keys"),P4=function(n){return V3[n]||(V3[n]=TY(n))},M4={},IY=SY,WO=ti,_Y=Xs,UY=Uw,Tx=Ya,Ix=L4,LY=P4,QY=M4,G3="Object already initialized",vF=WO.TypeError,NY=WO.WeakMap,qb,Tv,Yb,PY=function(n){return Yb(n)?Tv(n):qb(n,{})},MY=function(n){return function(t){var e;if(!_Y(t)||(e=Tv(t)).type!==n)throw new vF("Incompatible receiver, "+n+" required");return e}};if(IY||Ix.state){var co=Ix.state||(Ix.state=new NY);co.get=co.get,co.has=co.has,co.set=co.set,qb=function(n,t){if(co.has(n))throw new vF(G3);return t.facade=n,co.set(n,t),t},Tv=function(n){return co.get(n)||{}},Yb=function(n){return co.has(n)}}else{var og=LY("state");QY[og]=!0,qb=function(n,t){if(Tx(n,og))throw new vF(G3);return t.facade=n,UY(n,og,t),t},Tv=function(n){return Tx(n,og)?n[og]:{}},Yb=function(n){return Tx(n,og)}}var dC={set:qb,get:Tv,has:Yb,enforce:PY,getterFor:MY},k4=yi,kY=wi,OY=ki,iy=Ya,wF=Xa,DY=fC.CONFIGURABLE,RY=N4,zO=dC,HY=zO.enforce,KY=zO.get,j3=String,pb=Object.defineProperty,VY=k4("".slice),GY=k4("".replace),jY=k4([].join),$Y=wF&&!kY(function(){return pb(function(){},"length",{value:8}).length!==8}),WY=String(String).split("String"),zY=GO.exports=function(n,t,e){VY(j3(t),0,7)==="Symbol("&&(t="["+GY(j3(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!iy(n,"name")||DY&&n.name!==t)&&(wF?pb(n,"name",{value:t,configurable:!0}):n.name=t),$Y&&e&&iy(e,"arity")&&n.length!==e.arity&&pb(n,"length",{value:e.arity});try{e&&iy(e,"constructor")&&e.constructor?wF&&pb(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch{}var r=HY(n);return iy(r,"source")||(r.source=jY(WY,typeof t=="string"?t:"")),n};Function.prototype.toString=zY(function(){return OY(this)&&KY(this).source||RY(this)},"toString");var XO=GO.exports,XY=ki,qY=yc,YY=XO,JY=U4,Sd=function(n,t,e,r){r||(r={});var i=r.enumerable,s=r.name!==void 0?r.name:t;if(XY(e)&&YY(e,s,r),r.global)i?n[t]=e:JY(t,e);else{try{r.unsafe?n[t]&&(i=!0):delete n[t]}catch{}i?n[t]=e:qY.f(n,t,{value:e,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return n},qO={},ZY=Math.ceil,tJ=Math.floor,eJ=Math.trunc||function(t){var e=+t;return(e>0?tJ:ZY)(e)},rJ=eJ,gC=function(n){var t=+n;return t!==t||t===0?0:rJ(t)},iJ=gC,nJ=Math.max,sJ=Math.min,AJ=function(n,t){var e=iJ(n);return e<0?nJ(e+t,0):sJ(e,t)},aJ=gC,oJ=Math.min,I0=function(n){var t=aJ(n);return t>0?oJ(t,9007199254740991):0},lJ=I0,O4=function(n){return lJ(n.length)},cJ=Iw,hJ=AJ,uJ=O4,fJ=function(n){return function(t,e,r){var i=cJ(t),s=uJ(i);if(s===0)return!n&&-1;var A=hJ(r,s),a;if(n&&e!==e){for(;s>A;)if(a=i[A++],a!==a)return!0}else for(;s>A;A++)if((n||A in i)&&i[A]===e)return n||A||0;return!n&&-1}},YO={indexOf:fJ(!1)},dJ=yi,_x=Ya,gJ=Iw,pJ=YO.indexOf,mJ=M4,$3=dJ([].push),JO=function(n,t){var e=gJ(n),r=0,i=[],s;for(s in e)!_x(mJ,s)&&_x(e,s)&&$3(i,s);for(;t.length>r;)_x(e,s=t[r++])&&(~pJ(i,s)||$3(i,s));return i},D4=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vJ=JO,wJ=D4,yJ=wJ.concat("length","prototype");qO.f=Object.getOwnPropertyNames||function(t){return vJ(t,yJ)};var ZO={};ZO.f=Object.getOwnPropertySymbols;var bJ=Ed,BJ=yi,CJ=qO,xJ=ZO,EJ=Us,SJ=BJ([].concat),FJ=bJ("Reflect","ownKeys")||function(t){var e=CJ.f(EJ(t)),r=xJ.f;return r?SJ(e,r(t)):e},W3=Ya,TJ=FJ,IJ=Tw,_J=yc,UJ=function(n,t,e){for(var r=TJ(t),i=_J.f,s=IJ.f,A=0;A<r.length;A++){var a=r[A];!W3(n,a)&&!(e&&W3(e,a))&&i(n,a,s(t,a))}},LJ=wi,QJ=ki,NJ=/#|\.prototype\./,Lw=function(n,t){var e=MJ[PJ(n)];return e===OJ?!0:e===kJ?!1:QJ(t)?LJ(t):!!t},PJ=Lw.normalize=function(n){return String(n).replace(NJ,".").toLowerCase()},MJ=Lw.data={},kJ=Lw.NATIVE="N",OJ=Lw.POLYFILL="P",tD=Lw,ny=ti,DJ=Tw.f,RJ=Uw,HJ=Sd,KJ=U4,VJ=UJ,GJ=tD,Ls=function(n,t){var e=n.target,r=n.global,i=n.stat,s,A,a,o,l,h;if(r?A=ny:i?A=ny[e]||KJ(e,{}):A=ny[e]&&ny[e].prototype,A)for(a in t){if(l=t[a],n.dontCallGetSet?(h=DJ(A,a),o=h&&h.value):o=A[a],s=GJ(r?a:e+(i?".":"#")+a,n.forced),!s&&o!==void 0){if(typeof l==typeof o)continue;VJ(l,o)}(n.sham||o&&o.sham)&&RJ(l,"sham",!0),HJ(A,a,l,n)}},um=ti,jJ=_w,$J=xd,sy=function(n){return jJ.slice(0,n.length)===n},eD=function(){return sy("Bun/")?"BUN":sy("Cloudflare-Workers")?"CLOUDFLARE":sy("Deno/")?"DENO":sy("Node.js/")?"NODE":um.Bun&&typeof Bun.version=="string"?"BUN":um.Deno&&typeof Deno.version=="object"?"DENO":$J(um.process)==="process"?"NODE":um.window&&um.document?"BROWSER":"REST"}(),WJ=eD,pC=WJ==="NODE",zJ=ti,XJ=zJ,qJ=yi,YJ=wc,JJ=function(n,t,e){try{return qJ(YJ(Object.getOwnPropertyDescriptor(n,t)[e]))}catch{}},ZJ=Xs,tZ=function(n){return ZJ(n)||n===null},eZ=tZ,rZ=String,iZ=TypeError,nZ=function(n){if(eZ(n))return n;throw new iZ("Can't set "+rZ(n)+" as a prototype")},sZ=JJ,AZ=Xs,aZ=qa,oZ=nZ,rD=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},e;try{e=sZ(Object.prototype,"__proto__","set"),e(t,[]),n=t instanceof Array}catch{}return function(i,s){return aZ(i),oZ(s),AZ(i)&&(n?e(i,s):i.__proto__=s),i}}():void 0),lZ=yc.f,cZ=Ya,hZ=yn,z3=hZ("toStringTag"),mC=function(n,t,e){n&&!e&&(n=n.prototype),n&&!cZ(n,z3)&&lZ(n,z3,{configurable:!0,value:t})},X3=XO,uZ=yc,fZ=function(n,t,e){return e.get&&X3(e.get,t,{getter:!0}),e.set&&X3(e.set,t,{setter:!0}),uZ.f(n,t,e)},dZ=Ed,gZ=fZ,pZ=yn,mZ=Xa,q3=pZ("species"),vZ=function(n){var t=dZ(n);mZ&&t&&!t[q3]&&gZ(t,q3,{configurable:!0,get:function(){return this}})},wZ=lC,yZ=TypeError,bZ=function(n,t){if(wZ(t,n))return n;throw new yZ("Incorrect invocation")},BZ=yn,CZ=BZ("toStringTag"),iD={};iD[CZ]="z";var xZ=String(iD)==="[object z]",EZ=xZ,SZ=ki,mb=xd,FZ=yn,TZ=FZ("toStringTag"),IZ=Object,_Z=mb(function(){return arguments}())==="Arguments",UZ=function(n,t){try{return n[t]}catch{}},R4=EZ?mb:function(n){var t,e,r;return n===void 0?"Undefined":n===null?"Null":typeof(e=UZ(t=IZ(n),TZ))=="string"?e:_Z?mb(t):(r=mb(t))==="Object"&&SZ(t.callee)?"Arguments":r},LZ=yi,QZ=wi,nD=ki,NZ=R4,PZ=Ed,MZ=N4,sD=function(){},AD=PZ("Reflect","construct"),H4=/^\s*(?:class|function)\b/,kZ=LZ(H4.exec),OZ=!H4.test(sD),fm=function(t){if(!nD(t))return!1;try{return AD(sD,[],t),!0}catch{return!1}},aD=function(t){if(!nD(t))return!1;switch(NZ(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return OZ||!!kZ(H4,MZ(t))}catch{return!0}};aD.sham=!0;var DZ=!AD||QZ(function(){var n;return fm(fm.call)||!fm(Object)||!fm(function(){n=!0})||n})?aD:fm,RZ=DZ,HZ=cC,KZ=TypeError,VZ=function(n){if(RZ(n))return n;throw new KZ(HZ(n)+" is not a constructor")},Y3=Us,GZ=VZ,jZ=oC,$Z=yn,WZ=$Z("species"),oD=function(n,t){var e=Y3(n).constructor,r;return e===void 0||jZ(r=Y3(e)[WZ])?t:GZ(r)},zZ=aC,lD=Function.prototype,J3=lD.apply,Z3=lD.call,cD=typeof Reflect=="object"&&Reflect.apply||(zZ?Z3.bind(J3):function(){return Z3.apply(J3,arguments)}),XZ=xd,qZ=yi,vC=function(n){if(XZ(n)==="Function")return qZ(n)},tL=vC,YZ=wc,JZ=aC,ZZ=tL(tL.bind),K4=function(n,t){return YZ(n),t===void 0?n:JZ?ZZ(n,t):function(){return n.apply(t,arguments)}},ttt=Ed,hD=ttt("document","documentElement"),ett=yi,rtt=ett([].slice),itt=TypeError,ntt=function(n,t){if(n<t)throw new itt("Not enough arguments");return n},eL=_w,uD=/ipad|iphone|ipod/i.test(eL)&&/applewebkit/i.test(eL),UA=ti,stt=cD,Att=K4,rL=ki,att=Ya,fD=wi,iL=hD,ott=rtt,nL=uC,ltt=ntt,ctt=uD,htt=pC,yF=UA.setImmediate,sL=UA.clearImmediate,utt=UA.process,Ux=UA.Dispatch,ftt=UA.Function,AL=UA.MessageChannel,dtt=UA.String,Lx=0,ov={},aL="onreadystatechange",Iv,Cu,Qx,Nx;fD(function(){Iv=UA.location});var V4=function(n){if(att(ov,n)){var t=ov[n];delete ov[n],t()}},Px=function(n){return function(){V4(n)}},oL=function(n){V4(n.data)},lL=function(n){UA.postMessage(dtt(n),Iv.protocol+"//"+Iv.host)};(!yF||!sL)&&(yF=function(t){ltt(arguments.length,1);var e=rL(t)?t:ftt(t),r=ott(arguments,1);return ov[++Lx]=function(){stt(e,void 0,r)},Cu(Lx),Lx},sL=function(t){delete ov[t]},htt?Cu=function(n){utt.nextTick(Px(n))}:Ux&&Ux.now?Cu=function(n){Ux.now(Px(n))}:AL&&!ctt?(Qx=new AL,Nx=Qx.port2,Qx.port1.onmessage=oL,Cu=Att(Nx.postMessage,Nx)):UA.addEventListener&&rL(UA.postMessage)&&!UA.importScripts&&Iv&&Iv.protocol!=="file:"&&!fD(lL)?(Cu=lL,UA.addEventListener("message",oL,!1)):aL in nL("script")?Cu=function(n){iL.appendChild(nL("script"))[aL]=function(){iL.removeChild(this),V4(n)}}:Cu=function(n){setTimeout(Px(n),0)});var dD={set:yF},cL=ti,gtt=Xa,ptt=Object.getOwnPropertyDescriptor,mtt=function(n){if(!gtt)return cL[n];var t=ptt(cL,n);return t&&t.value},gD=function(){this.head=null,this.tail=null};gD.prototype={add:function(n){var t={item:n,next:null},e=this.tail;e?e.next=t:this.head=t,this.tail=t},get:function(){var n=this.head;if(n){var t=this.head=n.next;return t===null&&(this.tail=null),n.item}}};var pD=gD,vtt=_w,wtt=/ipad|iphone|ipod/i.test(vtt)&&typeof Pebble<"u",ytt=_w,btt=/web0s(?!.*chrome)/i.test(ytt),b0=ti,Btt=mtt,hL=K4,Mx=dD.set,Ctt=pD,xtt=uD,Ett=wtt,Stt=btt,kx=pC,uL=b0.MutationObserver||b0.WebKitMutationObserver,fL=b0.document,dL=b0.process,Ay=b0.Promise,bF=Btt("queueMicrotask"),lg,Ox,Dx,ay,gL;if(!bF){var oy=new Ctt,ly=function(){var n,t;for(kx&&(n=dL.domain)&&n.exit();t=oy.get();)try{t()}catch(e){throw oy.head&&lg(),e}n&&n.enter()};!xtt&&!kx&&!Stt&&uL&&fL?(Ox=!0,Dx=fL.createTextNode(""),new uL(ly).observe(Dx,{characterData:!0}),lg=function(){Dx.data=Ox=!Ox}):!Ett&&Ay&&Ay.resolve?(ay=Ay.resolve(void 0),ay.constructor=Ay,gL=hL(ay.then,ay),lg=function(){gL(ly)}):kx?lg=function(){dL.nextTick(ly)}:(Mx=hL(Mx,b0),lg=function(){Mx(ly)}),bF=function(n){oy.head||lg(),oy.add(n)}}var Ftt=bF,Ttt=function(n,t){try{arguments.length===1?console.error(n):console.error(n,t)}catch{}},G4=function(n){try{return{error:!1,value:n()}}catch(t){return{error:!0,value:t}}},Itt=ti,wC=Itt.Promise,_tt=ti,lv=wC,Utt=ki,Ltt=tD,Qtt=N4,Ntt=yn,pL=eD,Rx=_4;lv&&lv.prototype;var Ptt=Ntt("species"),BF=!1,mD=Utt(_tt.PromiseRejectionEvent),Mtt=Ltt("Promise",function(){var n=Qtt(lv),t=n!==String(lv);if(!t&&Rx===66)return!0;if(!Rx||Rx<51||!/native code/.test(n)){var e=new lv(function(s){s(1)}),r=function(s){s(function(){},function(){})},i=e.constructor={};if(i[Ptt]=r,BF=e.then(function(){})instanceof r,!BF)return!0}return!t&&(pL==="BROWSER"||pL==="DENO")&&!mD}),Qw={CONSTRUCTOR:Mtt,REJECTION_EVENT:mD,SUBCLASSING:BF},_0={},mL=wc,ktt=TypeError,Ott=function(n){var t,e;this.promise=new n(function(r,i){if(t!==void 0||e!==void 0)throw new ktt("Bad Promise constructor");t=r,e=i}),this.resolve=mL(t),this.reject=mL(e)};_0.f=function(n){return new Ott(n)};var Dtt=Ls,Jb=pC,Jh=ti,Rtt=XJ,B0=Rn,vL=Sd,wL=rD,Htt=mC,Ktt=vZ,Vtt=wc,vb=ki,Gtt=Xs,jtt=bZ,$tt=oD,vD=dD.set,j4=Ftt,Wtt=Ttt,ztt=G4,Xtt=pD,wD=dC,Zb=wC,$4=Qw,yD=_0,yC="Promise",bD=$4.CONSTRUCTOR,qtt=$4.REJECTION_EVENT,Ytt=$4.SUBCLASSING,Hx=wD.getterFor(yC),Jtt=wD.set,Sg=Zb&&Zb.prototype,Qu=Zb,cy=Sg,BD=Jh.TypeError,CF=Jh.document,W4=Jh.process,xF=yD.f,Ztt=xF,tet=!!(CF&&CF.createEvent&&Jh.dispatchEvent),CD="unhandledrejection",eet="rejectionhandled",yL=0,xD=1,ret=2,z4=1,ED=2,hy,bL,SD,BL,FD=function(n){var t;return Gtt(n)&&vb(t=n.then)?t:!1},TD=function(n,t){var e=t.value,r=t.state===xD,i=r?n.ok:n.fail,s=n.resolve,A=n.reject,a=n.domain,o,l,h;try{i?(r||(t.rejection===ED&&net(t),t.rejection=z4),i===!0?o=e:(a&&a.enter(),o=i(e),a&&(a.exit(),h=!0)),o===n.promise?A(new BD("Promise-chain cycle")):(l=FD(o))?B0(l,o,s,A):s(o)):A(e)}catch(u){a&&!h&&a.exit(),A(u)}},ID=function(n,t){n.notified||(n.notified=!0,j4(function(){for(var e=n.reactions,r;r=e.get();)TD(r,n);n.notified=!1,t&&!n.rejection&&iet(n)}))},_D=function(n,t,e){var r,i;tet?(r=CF.createEvent("Event"),r.promise=t,r.reason=e,r.initEvent(n,!1,!0),Jh.dispatchEvent(r)):r={promise:t,reason:e},!qtt&&(i=Jh["on"+n])?i(r):n===CD&&Wtt("Unhandled promise rejection",e)},iet=function(n){B0(vD,Jh,function(){var t=n.facade,e=n.value,r=CL(n),i;if(r&&(i=ztt(function(){Jb?W4.emit("unhandledRejection",e,t):_D(CD,t,e)}),n.rejection=Jb||CL(n)?ED:z4,i.error))throw i.value})},CL=function(n){return n.rejection!==z4&&!n.parent},net=function(n){B0(vD,Jh,function(){var t=n.facade;Jb?W4.emit("rejectionHandled",t):_D(eet,t,n.value)})},Ug=function(n,t,e){return function(r){n(t,r,e)}},Kg=function(n,t,e){n.done||(n.done=!0,e&&(n=e),n.value=t,n.state=ret,ID(n,!0))},EF=function(n,t,e){if(!n.done){n.done=!0,e&&(n=e);try{if(n.facade===t)throw new BD("Promise can't be resolved itself");var r=FD(t);r?j4(function(){var i={done:!1};try{B0(r,t,Ug(EF,i,n),Ug(Kg,i,n))}catch(s){Kg(i,s,n)}}):(n.value=t,n.state=xD,ID(n,!1))}catch(i){Kg({done:!1},i,n)}}};if(bD&&(Qu=function(t){jtt(this,cy),Vtt(t),B0(hy,this);var e=Hx(this);try{t(Ug(EF,e),Ug(Kg,e))}catch(r){Kg(e,r)}},cy=Qu.prototype,hy=function(t){Jtt(this,{type:yC,done:!1,notified:!1,parent:!1,reactions:new Xtt,rejection:!1,state:yL,value:null})},hy.prototype=vL(cy,"then",function(t,e){var r=Hx(this),i=xF($tt(this,Qu));return r.parent=!0,i.ok=vb(t)?t:!0,i.fail=vb(e)&&e,i.domain=Jb?W4.domain:void 0,r.state===yL?r.reactions.add(i):j4(function(){TD(i,r)}),i.promise}),bL=function(){var n=new hy,t=Hx(n);this.promise=n,this.resolve=Ug(EF,t),this.reject=Ug(Kg,t)},yD.f=xF=function(n){return n===Qu||n===SD?new bL(n):Ztt(n)},vb(Zb)&&Sg!==Object.prototype)){BL=Sg.then,Ytt||vL(Sg,"then",function(t,e){var r=this;return new Qu(function(i,s){B0(BL,r,i,s)}).then(t,e)},{unsafe:!0});try{delete Sg.constructor}catch{}wL&&wL(Sg,cy)}Dtt({global:!0,constructor:!0,wrap:!0,forced:bD},{Promise:Qu});SD=Rtt.Promise;Htt(Qu,yC,!1);Ktt(yC);var Nw={},set=yn,Aet=Nw,aet=set("iterator"),oet=Array.prototype,cet=function(n){return n!==void 0&&(Aet.Array===n||oet[aet]===n)},het=R4,xL=T0,uet=oC,fet=Nw,det=yn,get=det("iterator"),UD=function(n){if(!uet(n))return xL(n,get)||xL(n,"@@iterator")||fet[het(n)]},pet=Rn,met=wc,vet=Us,wet=cC,yet=UD,bet=TypeError,Bet=function(n,t){var e=arguments.length<2?yet(n):t;if(met(e))return vet(pet(e,n));throw new bet(wet(n)+" is not iterable")},Cet=Rn,EL=Us,xet=T0,Eet=function(n,t,e){var r,i;EL(n);try{if(r=xet(n,"return"),!r){if(t==="throw")throw e;return e}r=Cet(r,n)}catch(s){i=!0,r=s}if(t==="throw")throw e;if(i)throw r;return EL(r),e},Fet=K4,Tet=Rn,Iet=Us,_et=cC,Uet=cet,Let=O4,SL=lC,Qet=Bet,Net=UD,FL=Eet,Pet=TypeError,wb=function(n,t){this.stopped=n,this.result=t},TL=wb.prototype,LD=function(n,t,e){var r=e&&e.that,i=!!(e&&e.AS_ENTRIES),s=!!(e&&e.IS_RECORD),A=!!(e&&e.IS_ITERATOR),a=!!(e&&e.INTERRUPTED),o=Fet(t,r),l,h,u,d,f,p,m,y=function(E){var S=l;return l=void 0,S&&FL(S,"normal"),new wb(!0,E)},w=function(E){return i?(Iet(E),a?o(E[0],E[1],y):o(E[0],E[1])):a?o(E,y):o(E)};if(s)l=n.iterator;else if(A)l=n;else{if(h=Net(n),!h)throw new Pet(_et(n)+" is not iterable");if(Uet(h)){for(u=0,d=Let(n);d>u;u++)if(f=w(n[u]),f&&SL(TL,f))return f;return new wb(!1)}l=Qet(n,h)}for(p=s?n.next:l.next;!(m=Tet(p,l)).done;){var B=m.value;try{f=w(B)}catch(E){if(l)FL(l,"throw",E);else throw E}if(typeof f=="object"&&f&&SL(TL,f))return f}return new wb(!1)},Met=yn,QD=Met("iterator"),ND=!1;try{var ket=0,IL={next:function(){return{done:!!ket++}},return:function(){ND=!0}};IL[QD]=function(){return this},Array.from(IL,function(){throw 2})}catch{}var Oet=function(n,t){try{if(!t&&!ND)return!1}catch{return!1}var e=!1;try{var r={};r[QD]=function(){return{next:function(){return{done:e=!0}}}},n(r)}catch{}return e},Det=wC,Ret=Oet,Het=Qw.CONSTRUCTOR,PD=Het||!Ret(function(n){Det.all(n).then(void 0,function(){})}),Ket=Ls,Vet=Rn,Get=wc,jet=_0,$et=G4,Wet=LD,zet=PD;Ket({target:"Promise",stat:!0,forced:zet},{all:function(t){var e=this,r=jet.f(e),i=r.resolve,s=r.reject,A=$et(function(){var a=Get(e.resolve),o=[],l=0,h=1;Wet(t,function(u){var d=l++,f=!1;h++,Vet(a,e,u).then(function(p){f||(f=!0,o[d]=p,--h||i(o))},s)}),--h||i(o)});return A.error&&s(A.value),r.promise}});var Xet=Ls,qet=Qw.CONSTRUCTOR,SF=wC,Yet=Ed,Jet=ki,Zet=Sd,_L=SF&&SF.prototype;Xet({target:"Promise",proto:!0,forced:qet,real:!0},{catch:function(n){return this.then(void 0,n)}});if(Jet(SF)){var UL=Yet("Promise").prototype.catch;_L.catch!==UL&&Zet(_L,"catch",UL,{unsafe:!0})}var trt=Ls,ert=Rn,rrt=wc,irt=_0,nrt=G4,srt=LD,Art=PD;trt({target:"Promise",stat:!0,forced:Art},{race:function(t){var e=this,r=irt.f(e),i=r.reject,s=nrt(function(){var A=rrt(e.resolve);srt(t,function(a){ert(A,e,a).then(r.resolve,i)})});return s.error&&i(s.value),r.promise}});var art=Ls,ort=_0,lrt=Qw.CONSTRUCTOR;art({target:"Promise",stat:!0,forced:lrt},{reject:function(t){var e=ort.f(this),r=e.reject;return r(t),e.promise}});var crt=Us,hrt=Xs,urt=_0,frt=function(n,t){if(crt(n),hrt(t)&&t.constructor===n)return t;var e=urt.f(n),r=e.resolve;return r(t),e.promise},drt=Ls,grt=Ed,prt=Qw.CONSTRUCTOR,mrt=frt;grt("Promise");drt({target:"Promise",stat:!0,forced:prt},{resolve:function(t){return mrt(this,t)}});function LL(n,t,e,r,i,s,A){try{var a=n[s](A),o=a.value}catch(l){return void e(l)}a.done?t(o):Promise.resolve(o).then(r,i)}function fc(n){return function(){var t=this,e=arguments;return new Promise(function(r,i){var s=n.apply(t,e);function A(o){LL(s,r,i,A,a,"next",o)}function a(o){LL(s,r,i,A,a,"throw",o)}A(void 0)})}}var vrt=R4,wrt=String,$o=function(n){if(vrt(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return wrt(n)},yrt=Us,MD=function(){var n=yrt(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t},X4=wi,brt=ti,q4=brt.RegExp,Y4=X4(function(){var n=q4("a","y");return n.lastIndex=2,n.exec("abcd")!==null});Y4||X4(function(){return!q4("a","y").sticky});var Brt=Y4||X4(function(){var n=q4("^r","gy");return n.lastIndex=2,n.exec("str")!==null}),kD={BROKEN_CARET:Brt,UNSUPPORTED_Y:Y4},OD={},Crt=JO,xrt=D4,Ert=Object.keys||function(t){return Crt(t,xrt)},Srt=Xa,Frt=VO,Trt=yc,Irt=Us,_rt=Iw,Urt=Ert;OD.f=Srt&&!Frt?Object.defineProperties:function(t,e){Irt(t);for(var r=_rt(e),i=Urt(e),s=i.length,A=0,a;s>A;)Trt.f(t,a=i[A++],r[a]);return t};var Lrt=Us,Qrt=OD,QL=D4,Nrt=M4,Prt=hD,Mrt=uC,krt=P4,NL=">",PL="<",FF="prototype",TF="script",DD=krt("IE_PROTO"),Kx=function(){},RD=function(n){return PL+TF+NL+n+PL+"/"+TF+NL},ML=function(n){n.write(RD("")),n.close();var t=n.parentWindow.Object;return n=null,t},Ort=function(){var n=Mrt("iframe"),t="java"+TF+":",e;return n.style.display="none",Prt.appendChild(n),n.src=String(t),e=n.contentWindow.document,e.open(),e.write(RD("document.F=Object")),e.close(),e.F},uy,yb=function(){try{uy=new ActiveXObject("htmlfile")}catch{}yb=typeof document<"u"?document.domain&&uy?ML(uy):Ort():ML(uy);for(var n=QL.length;n--;)delete yb[FF][QL[n]];return yb()};Nrt[DD]=!0;var J4=Object.create||function(t,e){var r;return t!==null?(Kx[FF]=Lrt(t),r=new Kx,Kx[FF]=null,r[DD]=t):r=yb(),e===void 0?r:Qrt.f(r,e)},Drt=wi,Rrt=ti,Hrt=Rrt.RegExp,Krt=Drt(function(){var n=Hrt(".","s");return!(n.dotAll&&n.test(`
|
|
296
|
+
`)&&n.flags==="s")}),Vrt=wi,Grt=ti,jrt=Grt.RegExp,$rt=Vrt(function(){var n=jrt("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Lg=Rn,bC=yi,Wrt=$o,zrt=MD,Xrt=kD,qrt=Q4,Yrt=J4,Jrt=dC.get,Zrt=Krt,tit=$rt,eit=qrt("native-string-replace",String.prototype.replace),tB=RegExp.prototype.exec,IF=tB,rit=bC("".charAt),iit=bC("".indexOf),nit=bC("".replace),kL=bC("".slice),_F=function(){var n=/a/,t=/b*/g;return Lg(tB,n,"a"),Lg(tB,t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),HD=Xrt.BROKEN_CARET,UF=/()??/.exec("")[1]!==void 0,sit=_F||UF||HD||Zrt||tit,OL=function(n,t){for(var e=n.groups=Yrt(null),r=0;r<t.length;r++){var i=t[r];e[i[0]]=n[i[1]]}};sit&&(IF=function(t){var e=this,r=Jrt(e),i=Wrt(t),s=r.raw,A,a,o;if(s)return s.lastIndex=e.lastIndex,A=Lg(IF,s,i),e.lastIndex=s.lastIndex,A&&r.groups&&OL(A,r.groups),A;var l=r.groups,h=HD&&e.sticky,u=Lg(zrt,e),d=e.source,f=0,p=i;if(h){u=nit(u,"y",""),iit(u,"g")===-1&&(u+="g"),p=kL(i,e.lastIndex);var m=e.lastIndex>0&&rit(i,e.lastIndex-1);e.lastIndex>0&&(!e.multiline||e.multiline&&m!==`
|
|
297
|
+
`&&m!=="\r"&&m!=="\u2028"&&m!=="\u2029")&&(d="(?: (?:"+d+"))",p=" "+p,f++),a=new RegExp("^(?:"+d+")",u)}UF&&(a=new RegExp("^"+d+"$(?!\\s)",u)),_F&&(o=e.lastIndex);var y=Lg(tB,h?a:e,p);return h?y?(y.input=i,y[0]=kL(y[0],f),y.index=e.lastIndex,e.lastIndex+=y[0].length):e.lastIndex=0:_F&&y&&(e.lastIndex=e.global?y.index+y[0].length:o),UF&&y&&y.length>1&&Lg(eit,y[0],a,function(){for(var w=1;w<arguments.length-2;w++)arguments[w]===void 0&&(y[w]=void 0)}),y&&l&&OL(y,l),y});var Z4=IF,Ait=Ls,DL=Z4;Ait({target:"RegExp",proto:!0,forced:/./.exec!==DL},{exec:DL});var RL=Rn,HL=Sd,ait=Z4,KL=wi,KD=yn,oit=Uw,lit=KD("species"),Vx=RegExp.prototype,tT=function(n,t,e,r){var i=KD(n),s=!KL(function(){var l={};return l[i]=function(){return 7},""[n](l)!==7}),A=s&&!KL(function(){var l=!1,h=/a/;if(n==="split"){var u={};u[lit]=function(){return h},h={constructor:u,flags:""},h[i]=/./[i]}return h.exec=function(){return l=!0,null},h[i](""),!l});if(!s||!A||e){var a=/./[i],o=t(i,""[n],function(l,h,u,d,f){var p=h.exec;return p===ait||p===Vx.exec?s&&!f?{done:!0,value:RL(a,h,u,d)}:{done:!0,value:RL(l,u,h,d)}:{done:!1}});HL(String.prototype,n,o[0]),HL(Vx,i,o[1])}r&&oit(Vx[i],"sham",!0)},eT=yi,cit=gC,hit=$o,uit=qa,fit=eT("".charAt),VL=eT("".charCodeAt),dit=eT("".slice),git=function(n){return function(t,e){var r=hit(uit(t)),i=cit(e),s=r.length,A,a;return i<0||i>=s?n?"":void 0:(A=VL(r,i),A<55296||A>56319||i+1===s||(a=VL(r,i+1))<56320||a>57343?n?fit(r,i):A:n?dit(r,i,i+2):(A-55296<<10)+(a-56320)+65536)}},pit={charAt:git(!0)},mit=pit.charAt,rT=function(n,t,e){return t+(e&&mit(n,t).length||1)},vit=ti,wit=wi,GL=vit.RegExp,yit=!wit(function(){var n=!0;try{GL(".","d")}catch{n=!1}var t={},e="",r=n?"dgimsy":"gimsy",i=function(o,l){Object.defineProperty(t,o,{get:function(){return e+=l,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};n&&(s.hasIndices="d");for(var A in s)i(A,s[A]);var a=Object.getOwnPropertyDescriptor(GL.prototype,"flags").get.call(t);return a!==r||e!==r}),bit={correct:yit},Bit=Rn,Cit=Ya,xit=lC,jL=bit,Eit=MD,Sit=RegExp.prototype,BC=jL.correct?function(n){return n.flags}:function(n){return!jL.correct&&xit(Sit,n)&&!Cit(n,"flags")?Bit(Eit,n):n.flags},$L=Rn,Fit=Us,Tit=ki,Iit=xd,_it=Z4,Uit=TypeError,iT=function(n,t){var e=n.exec;if(Tit(e)){var r=$L(e,n,t);return r!==null&&Fit(r),r}if(Iit(n)==="RegExp")return $L(_it,n,t);throw new Uit("RegExp#exec called on incompatible receiver")},Lit=Rn,Qit=yi,Nit=tT,Pit=Us,Mit=Xs,kit=I0,fy=$o,Oit=qa,Dit=T0,Rit=rT,Hit=BC,WL=iT,Gx=Qit("".indexOf);Nit("match",function(n,t,e){return[function(i){var s=Oit(this),A=Mit(i)?Dit(i,n):void 0;return A?Lit(A,i,s):new RegExp(i)[n](fy(s))},function(r){var i=Pit(this),s=fy(r),A=e(t,i,s);if(A.done)return A.value;var a=fy(Hit(i));if(!~Gx(a,"g"))return WL(i,s);var o=!!~Gx(a,"u")||!!~Gx(a,"v");i.lastIndex=0;for(var l=[],h=0,u;(u=WL(i,s))!==null;){var d=fy(u[0]);l[h]=d,d===""&&(i.lastIndex=Rit(s,kit(i.lastIndex),o)),h++}return h===0?null:l}]});var nT=yi,Kit=hC,Vit=Math.floor,jx=nT("".charAt),Git=nT("".replace),$x=nT("".slice),jit=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,$it=/\$([$&'`]|\d{1,2})/g,Wit=function(n,t,e,r,i,s){var A=e+n.length,a=r.length,o=$it;return i!==void 0&&(i=Kit(i),o=jit),Git(s,o,function(l,h){var u;switch(jx(h,0)){case"$":return"$";case"&":return n;case"`":return $x(t,0,e);case"'":return $x(t,A);case"<":u=i[$x(h,1,-1)];break;default:var d=+h;if(d===0)return l;if(d>a){var f=Vit(d/10);return f===0?l:f<=a?r[f-1]===void 0?jx(h,1):r[f-1]+jx(h,1):l}u=r[d-1]}return u===void 0?"":u})},zit=cD,zL=Rn,CC=yi,Xit=tT,qit=wi,Yit=Us,Jit=ki,Zit=Xs,tnt=gC,ent=I0,xu=$o,rnt=qa,int=rT,nnt=T0,snt=Wit,Ant=BC,ant=iT,ont=yn,LF=ont("replace"),lnt=Math.max,cnt=Math.min,hnt=CC([].concat),Wx=CC([].push),cg=CC("".indexOf),XL=CC("".slice),unt=function(n){return n===void 0?n:String(n)},fnt=function(){return"a".replace(/./,"$0")==="$0"}(),qL=function(){return/./[LF]?/./[LF]("a","$0")==="":!1}(),dnt=!qit(function(){var n=/./;return n.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(n,"$<a>")!=="7"});Xit("replace",function(n,t,e){var r=qL?"$":"$0";return[function(s,A){var a=rnt(this),o=Zit(s)?nnt(s,LF):void 0;return o?zL(o,s,a,A):zL(t,xu(a),s,A)},function(i,s){var A=Yit(this),a=xu(i),o=Jit(s);o||(s=xu(s));var l=xu(Ant(A));if(typeof s=="string"&&!~cg(s,r)&&!~cg(s,"$<")&&!~cg(l,"y")){var h=e(t,A,a,s);if(h.done)return h.value}var u=!!~cg(l,"g"),d;u&&(d=!!~cg(l,"u")||!!~cg(l,"v"),A.lastIndex=0);for(var f=[],p;p=ant(A,a),!(p===null||(Wx(f,p),!u));){var m=xu(p[0]);m===""&&(A.lastIndex=int(a,ent(A.lastIndex),d))}for(var y="",w=0,B=0;B<f.length;B++){p=f[B];for(var E=xu(p[0]),S=lnt(cnt(tnt(p.index),a.length),0),I=[],L,k=1;k<p.length;k++)Wx(I,unt(p[k]));var H=p.groups;if(o){var Q=hnt([E],I,S,a);H!==void 0&&Wx(Q,H),L=xu(zit(s,void 0,Q))}else L=snt(E,a,S,I,H,s);S>=w&&(y+=XL(a,w,S)+L,w=S+E.length)}return y+XL(a,w)}]},!dnt||!fnt||qL);var gnt=Xs,pnt=xd,mnt=yn,vnt=mnt("match"),wnt=function(n){var t;return gnt(n)&&((t=n[vnt])!==void 0?!!t:pnt(n)==="RegExp")},ynt=wnt,bnt=TypeError,sT=function(n){if(ynt(n))throw new bnt("The method doesn't accept regular expressions");return n},Bnt=yn,Cnt=Bnt("match"),AT=function(n){var t=/./;try{"/./"[n](t)}catch{try{return t[Cnt]=!1,"/./"[n](t)}catch{}}return!1},xnt=Ls,Ent=vC,Snt=Tw.f,Fnt=I0,YL=$o,Tnt=sT,Int=qa,_nt=AT,Unt=Ent("".slice),Lnt=Math.min,VD=_nt("startsWith"),Qnt=!VD&&!!function(){var n=Snt(String.prototype,"startsWith");return n&&!n.writable}();xnt({target:"String",proto:!0,forced:!Qnt&&!VD},{startsWith:function(t){var e=YL(Int(this));Tnt(t);var r=YL(t),i=Fnt(Lnt(arguments.length>1?arguments[1]:void 0,e.length));return Unt(e,i,i+r.length)===r}});var Nnt=yn,Pnt=J4,Mnt=yc.f,QF=Nnt("unscopables"),NF=Array.prototype;NF[QF]===void 0&&Mnt(NF,QF,{configurable:!0,value:Pnt(null)});var knt=function(n){NF[QF][n]=!0},Ont=wi,Dnt=!Ont(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),Rnt=Ya,Hnt=ki,Knt=hC,Vnt=P4,Gnt=Dnt,JL=Vnt("IE_PROTO"),PF=Object,jnt=PF.prototype,GD=Gnt?PF.getPrototypeOf:function(n){var t=Knt(n);if(Rnt(t,JL))return t[JL];var e=t.constructor;return Hnt(e)&&t instanceof e?e.prototype:t instanceof PF?jnt:null},$nt=wi,Wnt=ki,znt=Xs,ZL=GD,Xnt=Sd,qnt=yn,MF=qnt("iterator"),jD=!1,wd,zx,Xx;[].keys&&(Xx=[].keys(),"next"in Xx?(zx=ZL(ZL(Xx)),zx!==Object.prototype&&(wd=zx)):jD=!0);var Ynt=!znt(wd)||$nt(function(){var n={};return wd[MF].call(n)!==n});Ynt&&(wd={});Wnt(wd[MF])||Xnt(wd,MF,function(){return this});var $D={IteratorPrototype:wd,BUGGY_SAFARI_ITERATORS:jD},Jnt=$D.IteratorPrototype,Znt=J4,tst=I4,est=mC,rst=Nw,ist=function(){return this},nst=function(n,t,e,r){var i=t+" Iterator";return n.prototype=Znt(Jnt,{next:tst(+!r,e)}),est(n,i,!1),rst[i]=ist,n},sst=Ls,Ast=Rn,WD=fC,ast=ki,ost=nst,tQ=GD,eQ=rD,lst=mC,cst=Uw,qx=Sd,hst=yn,ust=Nw,zD=$D,fst=WD.PROPER,dst=WD.CONFIGURABLE,rQ=zD.IteratorPrototype,dy=zD.BUGGY_SAFARI_ITERATORS,dm=hst("iterator"),iQ="keys",gm="values",nQ="entries",gst=function(){return this},pst=function(n,t,e,r,i,s,A){ost(e,t,r);var a=function(w){if(w===i&&d)return d;if(!dy&&w&&w in h)return h[w];switch(w){case iQ:return function(){return new e(this,w)};case gm:return function(){return new e(this,w)};case nQ:return function(){return new e(this,w)}}return function(){return new e(this)}},o=t+" Iterator",l=!1,h=n.prototype,u=h[dm]||h["@@iterator"]||i&&h[i],d=!dy&&u||a(i),f=t==="Array"&&h.entries||u,p,m,y;if(f&&(p=tQ(f.call(new n)),p!==Object.prototype&&p.next&&(tQ(p)!==rQ&&(eQ?eQ(p,rQ):ast(p[dm])||qx(p,dm,gst)),lst(p,o,!0))),fst&&i===gm&&u&&u.name!==gm&&(dst?cst(h,"name",gm):(l=!0,d=function(){return Ast(u,this)})),i)if(m={values:a(gm),keys:s?d:a(iQ),entries:a(nQ)},A)for(y in m)(dy||l||!(y in h))&&qx(h,y,m[y]);else sst({target:t,proto:!0,forced:dy||l},m);return h[dm]!==d&&qx(h,dm,d,{name:i}),ust[t]=d,m},mst=function(n,t){return{value:n,done:t}},vst=Iw,aT=knt,sQ=Nw,XD=dC,wst=yc.f,yst=pst,gy=mst,bst=Xa,qD="Array Iterator",Bst=XD.set,Cst=XD.getterFor(qD),xst=yst(Array,"Array",function(n,t){Bst(this,{type:qD,target:vst(n),index:0,kind:t})},function(){var n=Cst(this),t=n.target,e=n.index++;if(!t||e>=t.length)return n.target=null,gy(void 0,!0);switch(n.kind){case"keys":return gy(e,!1);case"values":return gy(t[e],!1)}return gy([e,t[e]],!1)},"values"),AQ=sQ.Arguments=sQ.Array;aT("keys");aT("values");aT("entries");if(bst&&AQ.name!=="values")try{wst(AQ,"name",{value:"values"})}catch{}var Est={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Sst=uC,Yx=Sst("span").classList,aQ=Yx&&Yx.constructor&&Yx.constructor.prototype,Fst=aQ===Object.prototype?void 0:aQ,oQ=ti,YD=Est,Tst=Fst,zm=xst,lQ=Uw,Ist=mC,_st=yn,Jx=_st("iterator"),Zx=zm.values,JD=function(n,t){if(n){if(n[Jx]!==Zx)try{lQ(n,Jx,Zx)}catch{n[Jx]=Zx}if(Ist(n,t,!0),YD[t]){for(var e in zm)if(n[e]!==zm[e])try{lQ(n,e,zm[e])}catch{n[e]=zm[e]}}}};for(var tE in YD)JD(oQ[tE]&&oQ[tE].prototype,tE);JD(Tst,"DOMTokenList");function Ust(n,t){if(sr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var r=e.call(n,t);if(sr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function Lst(n){var t=Ust(n,"string");return sr(t)=="symbol"?t:t+""}function oT(n,t,e){return(t=Lst(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Qst=wc,Nst=hC,Pst=NO,Mst=O4,cQ=TypeError,hQ="Reduce of empty array with no initial value",kst=function(n){return function(t,e,r,i){var s=Nst(t),A=Pst(s),a=Mst(s);if(Qst(e),a===0&&r<2)throw new cQ(hQ);var o=n?a-1:0,l=n?-1:1;if(r<2)for(;;){if(o in A){i=A[o],o+=l;break}if(o+=l,n?o<0:a<=o)throw new cQ(hQ)}for(;n?o>=0:a>o;o+=l)o in A&&(i=e(i,A[o],o,s));return i}},Ost={left:kst(!1)},Dst=wi,ZD=function(n,t){var e=[][n];return!!e&&Dst(function(){e.call(null,t||function(){return 1},1)})},Rst=Ls,Hst=Ost.left,Kst=ZD,uQ=_4,Vst=pC,Gst=!Vst&&uQ>79&&uQ<83,jst=Gst||!Kst("reduce");Rst({target:"Array",proto:!0,forced:jst},{reduce:function(t){var e=arguments.length;return Hst(this,t,e,e>1?arguments[1]:void 0)}});var $st=Ls,Wst=vC,zst=Tw.f,Xst=I0,fQ=$o,qst=sT,Yst=qa,Jst=AT,Zst=Wst("".slice),tAt=Math.min,tR=Jst("endsWith"),eAt=!tR&&!!function(){var n=zst(String.prototype,"endsWith");return n&&!n.writable}();$st({target:"String",proto:!0,forced:!eAt&&!tR},{endsWith:function(t){var e=fQ(Yst(this));qst(t);var r=fQ(t),i=arguments.length>1?arguments[1]:void 0,s=e.length,A=i===void 0?s:tAt(Xst(i),s);return Zst(e,A-r.length,A)===r}});var eE=Rn,lT=yi,rAt=tT,iAt=Us,nAt=Xs,sAt=qa,AAt=oD,aAt=rT,oAt=I0,rE=$o,lAt=T0,cAt=BC,dQ=iT,hAt=kD,uAt=wi,hg=hAt.UNSUPPORTED_Y,fAt=4294967295,dAt=Math.min,iE=lT([].push),nE=lT("".slice),py=lT("".indexOf),gAt=!uAt(function(){var n=/(?:)/,t=n.exec;n.exec=function(){return t.apply(this,arguments)};var e="ab".split(n);return e.length!==2||e[0]!=="a"||e[1]!=="b"}),gQ="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;rAt("split",function(n,t,e){var r="0".split(void 0,0).length?function(i,s){return i===void 0&&s===0?[]:eE(t,this,i,s)}:t;return[function(s,A){var a=sAt(this),o=nAt(s)?lAt(s,n):void 0;return o?eE(o,s,a,A):eE(r,rE(a),s,A)},function(i,s){var A=iAt(this),a=rE(i);if(!gQ){var o=e(r,A,a,s,r!==t);if(o.done)return o.value}var l=AAt(A,RegExp),h=rE(cAt(A)),u=!!~py(h,"u")||!!~py(h,"v");hg?~py(h,"g")||(h+="g"):~py(h,"y")||(h+="y");var d=new l(hg?"^(?:"+A.source+")":A,h),f=s===void 0?fAt:s>>>0;if(f===0)return[];if(a.length===0)return dQ(d,a)===null?[a]:[];for(var p=0,m=0,y=[];m<a.length;){d.lastIndex=hg?0:m;var w=dQ(d,hg?nE(a,m):a),B;if(w===null||(B=dAt(oAt(d.lastIndex+(hg?m:0)),a.length))===p)m=aAt(a,m,u);else{if(iE(y,nE(a,p,m)),y.length===f)return y;for(var E=1;E<=w.length-1;E++)if(iE(y,w[E]),y.length===f)return y;m=p=B}}return iE(y,nE(a,p)),y}]},gQ||!gAt,hg);var xC={exports:{}},Xm={exports:{}};(function(){var n,t,e,r,i,s;typeof performance<"u"&&performance!==null&&performance.now?Xm.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Xm.exports=function(){return(n()-i)/1e6},t=process.hrtime,n=function(){var A;return A=t(),A[0]*1e9+A[1]},r=n(),s=process.uptime()*1e9,i=r-s):Date.now?(Xm.exports=function(){return Date.now()-e},e=Date.now()):(Xm.exports=function(){return new Date().getTime()-e},e=new Date().getTime())}).call(Fg);var pAt=Xm.exports,mAt=pAt,sc=typeof window>"u"?Fg:window,my=["moz","webkit"],Vg="AnimationFrame",C0=sc["request"+Vg],_v=sc["cancel"+Vg]||sc["cancelRequest"+Vg];for(var pm=0;!C0&&pm<my.length;pm++)C0=sc[my[pm]+"Request"+Vg],_v=sc[my[pm]+"Cancel"+Vg]||sc[my[pm]+"CancelRequest"+Vg];if(!C0||!_v){var sE=0,pQ=0,Eu=[],vAt=1e3/60;C0=function(n){if(Eu.length===0){var t=mAt(),e=Math.max(0,vAt-(t-sE));sE=e+t,setTimeout(function(){var r=Eu.slice(0);Eu.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(sE)}catch(s){setTimeout(function(){throw s},0)}},Math.round(e))}return Eu.push({handle:++pQ,callback:n,cancelled:!1}),pQ},_v=function(n){for(var t=0;t<Eu.length;t++)Eu[t].handle===n&&(Eu[t].cancelled=!0)}}xC.exports=function(n){return C0.call(sc,n)};xC.exports.cancel=function(){_v.apply(sc,arguments)};xC.exports.polyfill=function(n){n||(n=sc),n.requestAnimationFrame=C0,n.cancelAnimationFrame=_v};var wAt=xC.exports;const AE=pw(wAt);var eR=`
|
|
298
|
+
\v\f\r \u2028\u2029\uFEFF`,yAt=yi,bAt=qa,BAt=$o,kF=eR,mQ=yAt("".replace),CAt=RegExp("^["+kF+"]+"),xAt=RegExp("(^|[^"+kF+"])["+kF+"]+$"),EAt=function(n){return function(t){var e=BAt(bAt(t));return n&1&&(e=mQ(e,CAt,"")),n&2&&(e=mQ(e,xAt,"$1")),e}},SAt={trim:EAt(3)},FAt=fC.PROPER,TAt=wi,vQ=eR,wQ="
",IAt=function(n){return TAt(function(){return!!vQ[n]()||wQ[n]()!==wQ||FAt&&vQ[n].name!==n})},_At=Ls,UAt=SAt.trim,LAt=IAt;_At({target:"String",proto:!0,forced:LAt("trim")},{trim:function(){return UAt(this)}});var QAt=function(n){this.ok=!1,this.alpha=1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n=n.replace(/ /g,""),n=n.toLowerCase();var t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};n=t[n]||n;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseFloat(o[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],r=0;r<e.length;r++){var i=e[r].re,s=e[r].process,A=i.exec(n);if(A){var a=s(A);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+o+l+h},this.getHelpXML=function(){for(var o=new Array,l=0;l<e.length;l++)for(var h=e[l].example,u=0;u<h.length;u++)o[o.length]=h[u];for(var d in t)o[o.length]=d;var f=document.createElement("ul");f.setAttribute("id","rgbcolor-examples");for(var l=0;l<o.length;l++)try{var p=document.createElement("li"),m=new RGBColor(o[l]),y=document.createElement("div");y.style.cssText="margin: 3px; border: 1px solid black; background:"+m.toHex()+"; color:"+m.toHex(),y.appendChild(document.createTextNode("test"));var w=document.createTextNode(" "+o[l]+" -> "+m.toRGB()+" -> "+m.toHex());p.appendChild(y),p.appendChild(w),f.appendChild(p)}catch{}return f}};const OF=pw(QAt);var NAt=Ls,PAt=vC,MAt=YO.indexOf,kAt=ZD,DF=PAt([].indexOf),rR=!!DF&&1/DF([1],1,-0)<0,OAt=rR||!kAt("indexOf");NAt({target:"Array",proto:!0,forced:OAt},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return rR?DF(this,t,e)||0:MAt(this,t,e)}});var DAt=Ls,RAt=yi,HAt=sT,KAt=qa,yQ=$o,VAt=AT,GAt=RAt("".indexOf);DAt({target:"String",proto:!0,forced:!VAt("includes")},{includes:function(t){return!!~GAt(yQ(KAt(this)),yQ(HAt(t)),arguments.length>1?arguments[1]:void 0)}});var jAt=xd,$At=Array.isArray||function(t){return jAt(t)==="Array"},WAt=Ls,zAt=yi,XAt=$At,qAt=zAt([].reverse),bQ=[1,2];WAt({target:"Array",proto:!0,forced:String(bQ)===String(bQ.reverse())},{reverse:function(){return XAt(this)&&(this.length=this.length),qAt(this)}});/*! *****************************************************************************
|
|
299
|
+
Copyright (c) Microsoft Corporation.
|
|
300
|
+
|
|
301
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
302
|
+
purpose with or without fee is hereby granted.
|
|
303
|
+
|
|
304
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
305
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
306
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
307
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
308
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
309
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
310
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
311
|
+
***************************************************************************** */var iR=function(n,t){return(iR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])})(n,t)};function nR(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}iR(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function YAt(n){var t="";Array.isArray(n)||(n=[n]);for(var e=0;e<n.length;e++){var r=n[e];if(r.type===_t.CLOSE_PATH)t+="z";else if(r.type===_t.HORIZ_LINE_TO)t+=(r.relative?"h":"H")+r.x;else if(r.type===_t.VERT_LINE_TO)t+=(r.relative?"v":"V")+r.y;else if(r.type===_t.MOVE_TO)t+=(r.relative?"m":"M")+r.x+" "+r.y;else if(r.type===_t.LINE_TO)t+=(r.relative?"l":"L")+r.x+" "+r.y;else if(r.type===_t.CURVE_TO)t+=(r.relative?"c":"C")+r.x1+" "+r.y1+" "+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===_t.SMOOTH_CURVE_TO)t+=(r.relative?"s":"S")+r.x2+" "+r.y2+" "+r.x+" "+r.y;else if(r.type===_t.QUAD_TO)t+=(r.relative?"q":"Q")+r.x1+" "+r.y1+" "+r.x+" "+r.y;else if(r.type===_t.SMOOTH_QUAD_TO)t+=(r.relative?"t":"T")+r.x+" "+r.y;else{if(r.type!==_t.ARC)throw new Error('Unexpected command type "'+r.type+'" at index '+e+".");t+=(r.relative?"a":"A")+r.rX+" "+r.rY+" "+r.xRot+" "+ +r.lArcFlag+" "+ +r.sweepFlag+" "+r.x+" "+r.y}}return t}function RF(n,t){var e=n[0],r=n[1];return[e*Math.cos(t)-r*Math.sin(t),e*Math.sin(t)+r*Math.cos(t)]}function ba(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=0;e<n.length;e++)if(typeof n[e]!="number")throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof n[e]+" == typeof "+n[e]);return!0}var Gc=Math.PI;function aE(n,t,e){n.lArcFlag=n.lArcFlag===0?0:1,n.sweepFlag=n.sweepFlag===0?0:1;var r=n.rX,i=n.rY,s=n.x,A=n.y;r=Math.abs(n.rX),i=Math.abs(n.rY);var a=RF([(t-s)/2,(e-A)/2],-n.xRot/180*Gc),o=a[0],l=a[1],h=Math.pow(o,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(i,2);1<h&&(r*=Math.sqrt(h),i*=Math.sqrt(h)),n.rX=r,n.rY=i;var u=Math.pow(r,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(o,2),d=(n.lArcFlag!==n.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-u)/u)),f=r*l/i*d,p=-i*o/r*d,m=RF([f,p],n.xRot/180*Gc);n.cX=m[0]+(t+s)/2,n.cY=m[1]+(e+A)/2,n.phi1=Math.atan2((l-p)/i,(o-f)/r),n.phi2=Math.atan2((-l-p)/i,(-o-f)/r),n.sweepFlag===0&&n.phi2>n.phi1&&(n.phi2-=2*Gc),n.sweepFlag===1&&n.phi2<n.phi1&&(n.phi2+=2*Gc),n.phi1*=180/Gc,n.phi2*=180/Gc}function BQ(n,t,e){ba(n,t,e);var r=n*n+t*t-e*e;if(0>r)return[];if(r===0)return[[n*e/(n*n+t*t),t*e/(n*n+t*t)]];var i=Math.sqrt(r);return[[(n*e+t*i)/(n*n+t*t),(t*e-n*i)/(n*n+t*t)],[(n*e-t*i)/(n*n+t*t),(t*e+n*i)/(n*n+t*t)]]}var Gi,hl=Math.PI/180;function CQ(n,t,e){return(1-e)*n+e*t}function xQ(n,t,e,r){return n+Math.cos(r/180*Gc)*t+Math.sin(r/180*Gc)*e}function EQ(n,t,e,r){var i=1e-6,s=t-n,A=e-t,a=3*s+3*(r-e)-6*A,o=6*(A-s),l=3*s;return Math.abs(a)<i?[-l/o]:function(h,u,d){var f=h*h/4-u;if(f<-d)return[];if(f<=d)return[-h/2];var p=Math.sqrt(f);return[-h/2-p,-h/2+p]}(o/a,l/a,i)}function SQ(n,t,e,r,i){var s=1-i;return n*(s*s*s)+t*(3*s*s*i)+e*(3*s*i*i)+r*(i*i*i)}(function(n){function t(){return i(function(a,o,l){return a.relative&&(a.x1!==void 0&&(a.x1+=o),a.y1!==void 0&&(a.y1+=l),a.x2!==void 0&&(a.x2+=o),a.y2!==void 0&&(a.y2+=l),a.x!==void 0&&(a.x+=o),a.y!==void 0&&(a.y+=l),a.relative=!1),a})}function e(){var a=NaN,o=NaN,l=NaN,h=NaN;return i(function(u,d,f){return u.type&_t.SMOOTH_CURVE_TO&&(u.type=_t.CURVE_TO,a=isNaN(a)?d:a,o=isNaN(o)?f:o,u.x1=u.relative?d-a:2*d-a,u.y1=u.relative?f-o:2*f-o),u.type&_t.CURVE_TO?(a=u.relative?d+u.x2:u.x2,o=u.relative?f+u.y2:u.y2):(a=NaN,o=NaN),u.type&_t.SMOOTH_QUAD_TO&&(u.type=_t.QUAD_TO,l=isNaN(l)?d:l,h=isNaN(h)?f:h,u.x1=u.relative?d-l:2*d-l,u.y1=u.relative?f-h:2*f-h),u.type&_t.QUAD_TO?(l=u.relative?d+u.x1:u.x1,h=u.relative?f+u.y1:u.y1):(l=NaN,h=NaN),u})}function r(){var a=NaN,o=NaN;return i(function(l,h,u){if(l.type&_t.SMOOTH_QUAD_TO&&(l.type=_t.QUAD_TO,a=isNaN(a)?h:a,o=isNaN(o)?u:o,l.x1=l.relative?h-a:2*h-a,l.y1=l.relative?u-o:2*u-o),l.type&_t.QUAD_TO){a=l.relative?h+l.x1:l.x1,o=l.relative?u+l.y1:l.y1;var d=l.x1,f=l.y1;l.type=_t.CURVE_TO,l.x1=((l.relative?0:h)+2*d)/3,l.y1=((l.relative?0:u)+2*f)/3,l.x2=(l.x+2*d)/3,l.y2=(l.y+2*f)/3}else a=NaN,o=NaN;return l})}function i(a){var o=0,l=0,h=NaN,u=NaN;return function(d){if(isNaN(h)&&!(d.type&_t.MOVE_TO))throw new Error("path must start with moveto");var f=a(d,o,l,h,u);return d.type&_t.CLOSE_PATH&&(o=h,l=u),d.x!==void 0&&(o=d.relative?o+d.x:d.x),d.y!==void 0&&(l=d.relative?l+d.y:d.y),d.type&_t.MOVE_TO&&(h=o,u=l),f}}function s(a,o,l,h,u,d){return ba(a,o,l,h,u,d),i(function(f,p,m,y){var w=f.x1,B=f.x2,E=f.relative&&!isNaN(y),S=f.x!==void 0?f.x:E?0:p,I=f.y!==void 0?f.y:E?0:m;function L(M){return M*M}f.type&_t.HORIZ_LINE_TO&&o!==0&&(f.type=_t.LINE_TO,f.y=f.relative?0:m),f.type&_t.VERT_LINE_TO&&l!==0&&(f.type=_t.LINE_TO,f.x=f.relative?0:p),f.x!==void 0&&(f.x=f.x*a+I*l+(E?0:u)),f.y!==void 0&&(f.y=S*o+f.y*h+(E?0:d)),f.x1!==void 0&&(f.x1=f.x1*a+f.y1*l+(E?0:u)),f.y1!==void 0&&(f.y1=w*o+f.y1*h+(E?0:d)),f.x2!==void 0&&(f.x2=f.x2*a+f.y2*l+(E?0:u)),f.y2!==void 0&&(f.y2=B*o+f.y2*h+(E?0:d));var k=a*h-o*l;if(f.xRot!==void 0&&(a!==1||o!==0||l!==0||h!==1))if(k===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=_t.LINE_TO;else{var H=f.xRot*Math.PI/180,Q=Math.sin(H),W=Math.cos(H),U=1/L(f.rX),D=1/L(f.rY),j=L(W)*U+L(Q)*D,V=2*Q*W*(U-D),st=L(Q)*U+L(W)*D,rt=j*h*h-V*o*h+st*o*o,it=V*(a*h+o*l)-2*(j*l*h+st*a*o),At=j*l*l-V*a*l+st*a*a,ut=(Math.atan2(it,rt-At)+Math.PI)%Math.PI/2,vt=Math.sin(ut),mt=Math.cos(ut);f.rX=Math.abs(k)/Math.sqrt(rt*L(mt)+it*vt*mt+At*L(vt)),f.rY=Math.abs(k)/Math.sqrt(rt*L(vt)-it*vt*mt+At*L(mt)),f.xRot=180*ut/Math.PI}return f.sweepFlag!==void 0&&0>k&&(f.sweepFlag=+!f.sweepFlag),f})}function A(){return function(a){var o={};for(var l in a)o[l]=a[l];return o}}n.ROUND=function(a){function o(l){return Math.round(l*a)/a}return a===void 0&&(a=1e13),ba(a),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},n.TO_ABS=t,n.TO_REL=function(){return i(function(a,o,l){return a.relative||(a.x1!==void 0&&(a.x1-=o),a.y1!==void 0&&(a.y1-=l),a.x2!==void 0&&(a.x2-=o),a.y2!==void 0&&(a.y2-=l),a.x!==void 0&&(a.x-=o),a.y!==void 0&&(a.y-=l),a.relative=!0),a})},n.NORMALIZE_HVZ=function(a,o,l){return a===void 0&&(a=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),i(function(h,u,d,f,p){if(isNaN(f)&&!(h.type&_t.MOVE_TO))throw new Error("path must start with moveto");return o&&h.type&_t.HORIZ_LINE_TO&&(h.type=_t.LINE_TO,h.y=h.relative?0:d),l&&h.type&_t.VERT_LINE_TO&&(h.type=_t.LINE_TO,h.x=h.relative?0:u),a&&h.type&_t.CLOSE_PATH&&(h.type=_t.LINE_TO,h.x=h.relative?f-u:f,h.y=h.relative?p-d:p),h.type&_t.ARC&&(h.rX===0||h.rY===0)&&(h.type=_t.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h})},n.NORMALIZE_ST=e,n.QT_TO_C=r,n.INFO=i,n.SANITIZE=function(a){a===void 0&&(a=0),ba(a);var o=NaN,l=NaN,h=NaN,u=NaN;return i(function(d,f,p,m,y){var w=Math.abs,B=!1,E=0,S=0;if(d.type&_t.SMOOTH_CURVE_TO&&(E=isNaN(o)?0:f-o,S=isNaN(l)?0:p-l),d.type&(_t.CURVE_TO|_t.SMOOTH_CURVE_TO)?(o=d.relative?f+d.x2:d.x2,l=d.relative?p+d.y2:d.y2):(o=NaN,l=NaN),d.type&_t.SMOOTH_QUAD_TO?(h=isNaN(h)?f:2*f-h,u=isNaN(u)?p:2*p-u):d.type&_t.QUAD_TO?(h=d.relative?f+d.x1:d.x1,u=d.relative?p+d.y1:d.y2):(h=NaN,u=NaN),d.type&_t.LINE_COMMANDS||d.type&_t.ARC&&(d.rX===0||d.rY===0||!d.lArcFlag)||d.type&_t.CURVE_TO||d.type&_t.SMOOTH_CURVE_TO||d.type&_t.QUAD_TO||d.type&_t.SMOOTH_QUAD_TO){var I=d.x===void 0?0:d.relative?d.x:d.x-f,L=d.y===void 0?0:d.relative?d.y:d.y-p;E=isNaN(h)?d.x1===void 0?E:d.relative?d.x:d.x1-f:h-f,S=isNaN(u)?d.y1===void 0?S:d.relative?d.y:d.y1-p:u-p;var k=d.x2===void 0?0:d.relative?d.x:d.x2-f,H=d.y2===void 0?0:d.relative?d.y:d.y2-p;w(I)<=a&&w(L)<=a&&w(E)<=a&&w(S)<=a&&w(k)<=a&&w(H)<=a&&(B=!0)}return d.type&_t.CLOSE_PATH&&w(f-m)<=a&&w(p-y)<=a&&(B=!0),B?[]:d})},n.MATRIX=s,n.ROTATE=function(a,o,l){o===void 0&&(o=0),l===void 0&&(l=0),ba(a,o,l);var h=Math.sin(a),u=Math.cos(a);return s(u,h,-h,u,o-o*u+l*h,l-o*h-l*u)},n.TRANSLATE=function(a,o){return o===void 0&&(o=0),ba(a,o),s(1,0,0,1,a,o)},n.SCALE=function(a,o){return o===void 0&&(o=a),ba(a,o),s(a,0,0,o,0,0)},n.SKEW_X=function(a){return ba(a),s(1,0,Math.atan(a),1,0,0)},n.SKEW_Y=function(a){return ba(a),s(1,Math.atan(a),0,1,0,0)},n.X_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),ba(a),s(-1,0,0,1,a,0)},n.Y_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),ba(a),s(1,0,0,-1,0,a)},n.A_TO_C=function(){return i(function(a,o,l){return _t.ARC===a.type?function(h,u,d){var f,p,m,y;h.cX||aE(h,u,d);for(var w=Math.min(h.phi1,h.phi2),B=Math.max(h.phi1,h.phi2)-w,E=Math.ceil(B/90),S=new Array(E),I=u,L=d,k=0;k<E;k++){var H=CQ(h.phi1,h.phi2,k/E),Q=CQ(h.phi1,h.phi2,(k+1)/E),W=Q-H,U=4/3*Math.tan(W*hl/4),D=[Math.cos(H*hl)-U*Math.sin(H*hl),Math.sin(H*hl)+U*Math.cos(H*hl)],j=D[0],V=D[1],st=[Math.cos(Q*hl),Math.sin(Q*hl)],rt=st[0],it=st[1],At=[rt+U*Math.sin(Q*hl),it-U*Math.cos(Q*hl)],ut=At[0],vt=At[1];S[k]={relative:h.relative,type:_t.CURVE_TO};var mt=function(M,$){var q=RF([M*h.rX,$*h.rY],h.xRot),tt=q[0],et=q[1];return[h.cX+tt,h.cY+et]};f=mt(j,V),S[k].x1=f[0],S[k].y1=f[1],p=mt(ut,vt),S[k].x2=p[0],S[k].y2=p[1],m=mt(rt,it),S[k].x=m[0],S[k].y=m[1],h.relative&&(S[k].x1-=I,S[k].y1-=L,S[k].x2-=I,S[k].y2-=L,S[k].x-=I,S[k].y-=L),I=(y=[S[k].x,S[k].y])[0],L=y[1]}return S}(a,a.relative?0:o,a.relative?0:l):a})},n.ANNOTATE_ARCS=function(){return i(function(a,o,l){return a.relative&&(o=0,l=0),_t.ARC===a.type&&aE(a,o,l),a})},n.CLONE=A,n.CALCULATE_BOUNDS=function(){var a=function(d){var f={};for(var p in d)f[p]=d[p];return f},o=t(),l=r(),h=e(),u=i(function(d,f,p){var m=h(l(o(a(d))));function y(vt){vt>u.maxX&&(u.maxX=vt),vt<u.minX&&(u.minX=vt)}function w(vt){vt>u.maxY&&(u.maxY=vt),vt<u.minY&&(u.minY=vt)}if(m.type&_t.DRAWING_COMMANDS&&(y(f),w(p)),m.type&_t.HORIZ_LINE_TO&&y(m.x),m.type&_t.VERT_LINE_TO&&w(m.y),m.type&_t.LINE_TO&&(y(m.x),w(m.y)),m.type&_t.CURVE_TO){y(m.x),w(m.y);for(var B=0,E=EQ(f,m.x1,m.x2,m.x);B<E.length;B++)0<(ut=E[B])&&1>ut&&y(SQ(f,m.x1,m.x2,m.x,ut));for(var S=0,I=EQ(p,m.y1,m.y2,m.y);S<I.length;S++)0<(ut=I[S])&&1>ut&&w(SQ(p,m.y1,m.y2,m.y,ut))}if(m.type&_t.ARC){y(m.x),w(m.y),aE(m,f,p);for(var L=m.xRot/180*Math.PI,k=Math.cos(L)*m.rX,H=Math.sin(L)*m.rX,Q=-Math.sin(L)*m.rY,W=Math.cos(L)*m.rY,U=m.phi1<m.phi2?[m.phi1,m.phi2]:-180>m.phi2?[m.phi2+360,m.phi1+360]:[m.phi2,m.phi1],D=U[0],j=U[1],V=function(vt){var mt=vt[0],M=vt[1],$=180*Math.atan2(M,mt)/Math.PI;return $<D?$+360:$},st=0,rt=BQ(Q,-k,0).map(V);st<rt.length;st++)(ut=rt[st])>D&&ut<j&&y(xQ(m.cX,k,Q,ut));for(var it=0,At=BQ(W,-H,0).map(V);it<At.length;it++){var ut;(ut=At[it])>D&&ut<j&&w(xQ(m.cY,H,W,ut))}}return d});return u.minX=1/0,u.maxX=-1/0,u.minY=1/0,u.maxY=-1/0,u}})(Gi||(Gi={}));var va,sR=function(){function n(){}return n.prototype.round=function(t){return this.transform(Gi.ROUND(t))},n.prototype.toAbs=function(){return this.transform(Gi.TO_ABS())},n.prototype.toRel=function(){return this.transform(Gi.TO_REL())},n.prototype.normalizeHVZ=function(t,e,r){return this.transform(Gi.NORMALIZE_HVZ(t,e,r))},n.prototype.normalizeST=function(){return this.transform(Gi.NORMALIZE_ST())},n.prototype.qtToC=function(){return this.transform(Gi.QT_TO_C())},n.prototype.aToC=function(){return this.transform(Gi.A_TO_C())},n.prototype.sanitize=function(t){return this.transform(Gi.SANITIZE(t))},n.prototype.translate=function(t,e){return this.transform(Gi.TRANSLATE(t,e))},n.prototype.scale=function(t,e){return this.transform(Gi.SCALE(t,e))},n.prototype.rotate=function(t,e,r){return this.transform(Gi.ROTATE(t,e,r))},n.prototype.matrix=function(t,e,r,i,s,A){return this.transform(Gi.MATRIX(t,e,r,i,s,A))},n.prototype.skewX=function(t){return this.transform(Gi.SKEW_X(t))},n.prototype.skewY=function(t){return this.transform(Gi.SKEW_Y(t))},n.prototype.xSymmetry=function(t){return this.transform(Gi.X_AXIS_SYMMETRY(t))},n.prototype.ySymmetry=function(t){return this.transform(Gi.Y_AXIS_SYMMETRY(t))},n.prototype.annotateArcs=function(){return this.transform(Gi.ANNOTATE_ARCS())},n}(),JAt=function(n){return n===" "||n===" "||n==="\r"||n===`
|
|
312
|
+
`},FQ=function(n){return 48<=n.charCodeAt(0)&&n.charCodeAt(0)<=57},ZAt=function(n){function t(){var e=n.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return nR(t,n),t.prototype.finish=function(e){if(e===void 0&&(e=[]),this.parse(" ",e),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return e},t.prototype.parse=function(e,r){var i=this;r===void 0&&(r=[]);for(var s=function(u){r.push(u),i.curArgs.length=0,i.canParseCommandOrComma=!0},A=0;A<e.length;A++){var a=e[A],o=!(this.curCommandType!==_t.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=FQ(a)&&(this.curNumber==="0"&&a==="0"||o);if(!FQ(a)||l)if(a!=="e"&&a!=="E")if(a!=="-"&&a!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(a!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var h=Number(this.curNumber);if(isNaN(h))throw new SyntaxError("Invalid number ending at "+A);if(this.curCommandType===_t.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>h)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+A+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+A+'"')}this.curArgs.push(h),this.curArgs.length===tat[this.curCommandType]&&(_t.HORIZ_LINE_TO===this.curCommandType?s({type:_t.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):_t.VERT_LINE_TO===this.curCommandType?s({type:_t.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===_t.MOVE_TO||this.curCommandType===_t.LINE_TO||this.curCommandType===_t.SMOOTH_QUAD_TO?(s({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),_t.MOVE_TO===this.curCommandType&&(this.curCommandType=_t.LINE_TO)):this.curCommandType===_t.CURVE_TO?s({type:_t.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===_t.SMOOTH_CURVE_TO?s({type:_t.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_t.QUAD_TO?s({type:_t.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_t.ARC&&s({type:_t.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!JAt(a))if(a===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(a!=="+"&&a!=="-"&&a!==".")if(l)this.curNumber=a,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+A+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+a+'" at index '+A+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,a!=="z"&&a!=="Z")if(a==="h"||a==="H")this.curCommandType=_t.HORIZ_LINE_TO,this.curCommandRelative=a==="h";else if(a==="v"||a==="V")this.curCommandType=_t.VERT_LINE_TO,this.curCommandRelative=a==="v";else if(a==="m"||a==="M")this.curCommandType=_t.MOVE_TO,this.curCommandRelative=a==="m";else if(a==="l"||a==="L")this.curCommandType=_t.LINE_TO,this.curCommandRelative=a==="l";else if(a==="c"||a==="C")this.curCommandType=_t.CURVE_TO,this.curCommandRelative=a==="c";else if(a==="s"||a==="S")this.curCommandType=_t.SMOOTH_CURVE_TO,this.curCommandRelative=a==="s";else if(a==="q"||a==="Q")this.curCommandType=_t.QUAD_TO,this.curCommandRelative=a==="q";else if(a==="t"||a==="T")this.curCommandType=_t.SMOOTH_QUAD_TO,this.curCommandRelative=a==="t";else{if(a!=="a"&&a!=="A")throw new SyntaxError('Unexpected character "'+a+'" at index '+A+".");this.curCommandType=_t.ARC,this.curCommandRelative=a==="a"}else r.push({type:_t.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=a,this.curNumberHasDecimal=a==="."}else this.curNumber+=a,this.curNumberHasDecimal=!0;else this.curNumber+=a;else this.curNumber+=a,this.curNumberHasExp=!0;else this.curNumber+=a,this.curNumberHasExpDigits=this.curNumberHasExp}return r},t.prototype.transform=function(e){return Object.create(this,{parse:{value:function(r,i){i===void 0&&(i=[]);for(var s=0,A=Object.getPrototypeOf(this).parse.call(this,r);s<A.length;s++){var a=A[s],o=e(a);Array.isArray(o)?i.push.apply(i,o):i.push(o)}return i}}})},t}(sR),_t=function(n){function t(e){var r=n.call(this)||this;return r.commands=typeof e=="string"?t.parse(e):e,r}return nR(t,n),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var e=Gi.CALCULATE_BOUNDS();return this.transform(e),e},t.prototype.transform=function(e){for(var r=[],i=0,s=this.commands;i<s.length;i++){var A=e(s[i]);Array.isArray(A)?r.push.apply(r,A):r.push(A)}return this.commands=r,this},t.encode=function(e){return YAt(e)},t.parse=function(e){var r=new ZAt,i=[];return r.parse(e,i),r.finish(i),i},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t}(sR),tat=((va={})[_t.MOVE_TO]=2,va[_t.LINE_TO]=2,va[_t.HORIZ_LINE_TO]=1,va[_t.VERT_LINE_TO]=1,va[_t.CLOSE_PATH]=0,va[_t.QUAD_TO]=4,va[_t.SMOOTH_QUAD_TO]=2,va[_t.CURVE_TO]=6,va[_t.SMOOTH_CURVE_TO]=4,va[_t.ARC]=7,va),eat=fC.PROPER,rat=Sd,iat=Us,TQ=$o,nat=wi,sat=BC,cT="toString",AR=RegExp.prototype,aR=AR[cT],Aat=nat(function(){return aR.call({source:"a",flags:"b"})!=="/a/b"}),aat=eat&&aR.name!==cT;(Aat||aat)&&rat(AR,cT,function(){var t=iat(this),e=TQ(t.source),r=TQ(sat(t));return"/"+e+"/"+r},{unsafe:!0});function bb(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bb=function(t){return typeof t}:bb=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(n)}function oat(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var lat=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],cat=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function hat(n,t,e,r,i){if(typeof n=="string"&&(n=document.getElementById(n)),!n||bb(n)!=="object"||!("getContext"in n))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=n.getContext("2d");try{return s.getImageData(t,e,r,i)}catch(A){throw new Error("unable to access image data: "+A)}}function uat(n,t,e,r,i,s){if(!(isNaN(s)||s<1)){s|=0;var A=hat(n,t,e,r,i);A=fat(A,t,e,r,i,s),n.getContext("2d").putImageData(A,t,e)}}function fat(n,t,e,r,i,s){for(var A=n.data,a=2*s+1,o=r-1,l=i-1,h=s+1,u=h*(h+1)/2,d=new IQ,f=d,p,m=1;m<a;m++)f=f.next=new IQ,m===h&&(p=f);f.next=d;for(var y=null,w=null,B=0,E=0,S=lat[s],I=cat[s],L=0;L<i;L++){f=d;for(var k=A[E],H=A[E+1],Q=A[E+2],W=A[E+3],U=0;U<h;U++)f.r=k,f.g=H,f.b=Q,f.a=W,f=f.next;for(var D=0,j=0,V=0,st=0,rt=h*k,it=h*H,At=h*Q,ut=h*W,vt=u*k,mt=u*H,M=u*Q,$=u*W,q=1;q<h;q++){var tt=E+((o<q?o:q)<<2),et=A[tt],ot=A[tt+1],dt=A[tt+2],wt=A[tt+3],yt=h-q;vt+=(f.r=et)*yt,mt+=(f.g=ot)*yt,M+=(f.b=dt)*yt,$+=(f.a=wt)*yt,D+=et,j+=ot,V+=dt,st+=wt,f=f.next}y=d,w=p;for(var St=0;St<r;St++){var Mt=$*S>>>I;if(A[E+3]=Mt,Mt!==0){var Pt=255/Mt;A[E]=(vt*S>>>I)*Pt,A[E+1]=(mt*S>>>I)*Pt,A[E+2]=(M*S>>>I)*Pt}else A[E]=A[E+1]=A[E+2]=0;vt-=rt,mt-=it,M-=At,$-=ut,rt-=y.r,it-=y.g,At-=y.b,ut-=y.a;var jt=St+s+1;jt=B+(jt<o?jt:o)<<2,D+=y.r=A[jt],j+=y.g=A[jt+1],V+=y.b=A[jt+2],st+=y.a=A[jt+3],vt+=D,mt+=j,M+=V,$+=st,y=y.next;var z=w,Nt=z.r,ve=z.g,re=z.b,Tt=z.a;rt+=Nt,it+=ve,At+=re,ut+=Tt,D-=Nt,j-=ve,V-=re,st-=Tt,w=w.next,E+=4}B+=r}for(var ie=0;ie<r;ie++){E=ie<<2;var kt=A[E],qt=A[E+1],Wt=A[E+2],we=A[E+3],Ie=h*kt,me=h*qt,_e=h*Wt,Be=h*we,Vt=u*kt,ce=u*qt,Xt=u*Wt,fr=u*we;f=d;for(var Ge=0;Ge<h;Ge++)f.r=kt,f.g=qt,f.b=Wt,f.a=we,f=f.next;for(var Ce=r,xe=0,tr=0,ne=0,ke=0,Ae=1;Ae<=s;Ae++){E=Ce+ie<<2;var ge=h-Ae;Vt+=(f.r=kt=A[E])*ge,ce+=(f.g=qt=A[E+1])*ge,Xt+=(f.b=Wt=A[E+2])*ge,fr+=(f.a=we=A[E+3])*ge,ke+=kt,xe+=qt,tr+=Wt,ne+=we,f=f.next,Ae<l&&(Ce+=r)}E=ie,y=d,w=p;for(var nr=0;nr<i;nr++){var fe=E<<2;A[fe+3]=we=fr*S>>>I,we>0?(we=255/we,A[fe]=(Vt*S>>>I)*we,A[fe+1]=(ce*S>>>I)*we,A[fe+2]=(Xt*S>>>I)*we):A[fe]=A[fe+1]=A[fe+2]=0,Vt-=Ie,ce-=me,Xt-=_e,fr-=Be,Ie-=y.r,me-=y.g,_e-=y.b,Be-=y.a,fe=ie+((fe=nr+h)<l?fe:l)*r<<2,Vt+=ke+=y.r=A[fe],ce+=xe+=y.g=A[fe+1],Xt+=tr+=y.b=A[fe+2],fr+=ne+=y.a=A[fe+3],y=y.next,Ie+=kt=w.r,me+=qt=w.g,_e+=Wt=w.b,Be+=we=w.a,ke-=kt,xe-=qt,tr-=Wt,ne-=we,w=w.next,E+=r}}return n}var IQ=function n(){oat(this,n),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function dat(){var{DOMParser:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:n,createCanvas(e,r){return new OffscreenCanvas(e,r)},createImage(e){return fc(function*(){var r=yield fetch(e),i=yield r.blob(),s=yield createImageBitmap(i);return s})()}};return(typeof DOMParser<"u"||typeof n>"u")&&Reflect.deleteProperty(t,"DOMParser"),t}function gat(n){var{DOMParser:t,canvas:e,fetch:r}=n;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,fetch:r,createCanvas:e.createCanvas,createImage:e.loadImage}}var pat=Object.freeze({__proto__:null,offscreen:dat,node:gat});function Fd(n){return n.replace(/(?!\u3000)\s+/gm," ")}function oR(n){return n.replace(/^[\n \t]+/,"")}function lR(n){return n.replace(/[\n \t]+$/,"")}function Ws(n){var t=(n||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return t.map(parseFloat)}var mat=/^[A-Z-]+$/;function cR(n){return mat.test(n)?n.toLowerCase():n}function hT(n){var t=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(n)||[];return t[2]||t[3]||t[4]}function hR(n){if(!n.startsWith("rgb"))return n;var t=3,e=n.replace(/\d+(\.\d+)?/g,(r,i)=>t--&&i?String(Math.round(parseFloat(r))):r);return e}var vat=/(\[[^\]]+\])/g,wat=/(#[^\s+>~.[:]+)/g,yat=/(\.[^\s+>~.[:]+)/g,bat=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,Bat=/(:[\w-]+\([^)]*\))/gi,Cat=/(:[^\s+>~.[:]+)/g,xat=/([^\s+>~.[:]+)/g;function Su(n,t){var e=t.exec(n);return e?[n.replace(t," "),e.length]:[n,0]}function uR(n){var t=[0,0,0],e=n.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[e,r]=Su(e,vat),t[1]+=r,[e,r]=Su(e,wat),t[0]+=r,[e,r]=Su(e,yat),t[1]+=r,[e,r]=Su(e,bat),t[2]+=r,[e,r]=Su(e,Bat),t[1]+=r,[e,r]=Su(e,Cat),t[1]+=r,e=e.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[e,r]=Su(e,xat),t[2]+=r,t.join("")}var fd=1e-8;function HF(n){return Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2))}function eB(n,t){return(n[0]*t[0]+n[1]*t[1])/(HF(n)*HF(t))}function KF(n,t){return(n[0]*t[1]<n[1]*t[0]?-1:1)*Math.acos(eB(n,t))}function VF(n){return n*n*n}function GF(n){return 3*n*n*(1-n)}function jF(n){return 3*n*(1-n)*(1-n)}function $F(n){return(1-n)*(1-n)*(1-n)}function WF(n){return n*n}function zF(n){return 2*n*(1-n)}function XF(n){return(1-n)*(1-n)}class ue{constructor(t,e,r){this.document=t,this.name=e,this.value=r,this.isNormalizedColor=!1}static empty(t){return new ue(t,"EMPTY","")}split(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:e,name:r}=this;return Fd(this.getString()).trim().split(t).map(i=>new ue(e,r,i))}hasValue(t){var{value:e}=this;return e!==null&&e!==""&&(t||e!==0)&&typeof e<"u"}isString(t){var{value:e}=this,r=typeof e=="string";return!r||!t?r:t.test(e)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return typeof t>"u"||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return typeof t>"u"?0:parseFloat(t);var{value:e}=this,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}getString(t){return typeof t>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(t)}getColor(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=hR(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[r,i]=typeof t=="boolean"?[void 0,t]:[t],{viewPort:s}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(r);default:{var A=this.getNumber();return e&&A<1?A*s.computeSize(r):A}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}getFillStyleDefinition(t,e){var r=this.getDefinition();if(!r)return null;if(typeof r.createGradient=="function")return r.createGradient(this.document.ctx,t,e);if(typeof r.createPattern=="function"){if(r.getHrefAttribute().hasValue()){var i=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&r.getAttribute("patternTransform",!0).setValue(i.value)}return r.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){return this.hasValue()?ue.textBaselineMapping[this.getString()]:null}addOpacity(t){for(var e=this.getColor(),r=e.length,i=0,s=0;s<r&&(e[s]===","&&i++,i!==3);s++);if(t.hasValue()&&this.isString()&&i!==3){var A=new OF(e);A.ok&&(A.alpha=t.getNumber(),e=A.toRGBA())}return new ue(this.document,this.name,e)}}ue.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class fR{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:t}=this;return t[t.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return typeof t=="number"?t:t==="x"?this.width:t==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class vi{constructor(t,e){this.x=t,this.y=e}static parse(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[r=e,i=e]=Ws(t);return new vi(r,i)}static parseScale(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[r=e,i=r]=Ws(t);return new vi(r,i)}static parsePath(t){for(var e=Ws(t),r=e.length,i=[],s=0;s<r;s+=2)i.push(new vi(e[s],e[s+1]));return i}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){var{x:e,y:r}=this,i=e*t[0]+r*t[2]+t[4],s=e*t[1]+r*t[3]+t[5];this.x=i,this.y=s}}class dR{constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:t,onClick:e,onMouseMove:r}=this,i=t.ctx.canvas;i.onclick=e,i.onmousemove=r,this.working=!0}}stop(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:t,events:e,eventElements:r}=this,{style:i}=t.ctx.canvas;i&&(i.cursor=""),e.forEach((s,A)=>{for(var{run:a}=s,o=r[A];o;)a(o),o=o.parent}),this.events=[],this.eventElements=[]}}checkPath(t,e){if(!(!this.working||!e)){var{events:r,eventElements:i}=this;r.forEach((s,A)=>{var{x:a,y:o}=s;!i[A]&&e.isPointInPath&&e.isPointInPath(a,o)&&(i[A]=t)})}}checkBoundingBox(t,e){if(!(!this.working||!e)){var{events:r,eventElements:i}=this;r.forEach((s,A)=>{var{x:a,y:o}=s;!i[A]&&e.isPointInBox(a,o)&&(i[A]=t)})}}mapXY(t,e){for(var{window:r,ctx:i}=this.screen,s=new vi(t,e),A=i.canvas;A;)s.x-=A.offsetLeft,s.y-=A.offsetTop,A=A.offsetParent;return r.scrollX&&(s.x+=r.scrollX),r.scrollY&&(s.y+=r.scrollY),s}onClick(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:r,run(i){i.onClick&&i.onClick()}})}onMouseMove(t){var{x:e,y:r}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:r,run(i){i.onMouseMove&&i.onMouseMove()}})}}var gR=typeof window<"u"?window:null,pR=typeof fetch<"u"?fetch.bind(void 0):null;class Pw{constructor(t){var{fetch:e=pR,window:r=gR}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=t,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new fR,this.mouse=new dR(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=r,this.fetch=e}wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var t=this.waits.every(e=>e());return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){var{document:e,ctx:r,aspectRatio:i,width:s,desiredWidth:A,height:a,desiredHeight:o,minX:l=0,minY:h=0,refX:u,refY:d,clip:f=!1,clipX:p=0,clipY:m=0}=t,y=Fd(i).replace(/^defer\s/,""),[w,B]=y.split(" "),E=w||"xMidYMid",S=B||"meet",I=s/A,L=a/o,k=Math.min(I,L),H=Math.max(I,L),Q=A,W=o;S==="meet"&&(Q*=k,W*=k),S==="slice"&&(Q*=H,W*=H);var U=new ue(e,"refX",u),D=new ue(e,"refY",d),j=U.hasValue()&&D.hasValue();if(j&&r.translate(-k*U.getPixels("x"),-k*D.getPixels("y")),f){var V=k*p,st=k*m;r.beginPath(),r.moveTo(V,st),r.lineTo(s,st),r.lineTo(s,a),r.lineTo(V,a),r.closePath(),r.clip()}if(!j){var rt=S==="meet"&&k===L,it=S==="slice"&&H===L,At=S==="meet"&&k===I,ut=S==="slice"&&H===I;E.startsWith("xMid")&&(rt||it)&&r.translate(s/2-Q/2,0),E.endsWith("YMid")&&(At||ut)&&r.translate(0,a/2-W/2),E.startsWith("xMax")&&(rt||it)&&r.translate(s-Q,0),E.endsWith("YMax")&&(At||ut)&&r.translate(0,a-W)}switch(!0){case E==="none":r.scale(I,L);break;case S==="meet":r.scale(k,k);break;case S==="slice":r.scale(H,H);break}r.translate(-l,-h)}start(t){var{enableRedraw:e=!1,ignoreMouse:r=!1,ignoreAnimation:i=!1,ignoreDimensions:s=!1,ignoreClear:A=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:h,offsetY:u}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:d,mouse:f}=this,p=1e3/d;if(this.frameDuration=p,this.readyPromise=new Promise(E=>{this.resolveReady=E}),this.isReady()&&this.render(t,s,A,o,l,h,u),!!e){var m=Date.now(),y=m,w=0,B=()=>{m=Date.now(),w=m-y,w>=p&&(y=m-w%p,this.shouldUpdate(i,a)&&(this.render(t,s,A,o,l,h,u),f.runEvents())),this.intervalId=AE(B)};r||f.start(),this.intervalId=AE(B)}}stop(){this.intervalId&&(AE.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){var{frameDuration:r}=this,i=this.animations.reduce((s,A)=>A.update(r)||s,!1);if(i)return!0}return!!(typeof e=="function"&&e()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(t,e,r,i,s,A,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:l,viewPort:h,ctx:u,isFirstRender:d}=this,f=u.canvas;h.clear(),f.width&&f.height?h.setCurrent(f.width,f.height):h.setCurrent(o,l);var p=t.getStyle("width"),m=t.getStyle("height");!e&&(d||typeof i!="number"&&typeof s!="number")&&(p.hasValue()&&(f.width=p.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),m.hasValue()&&(f.height=m.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var y=f.clientWidth||f.width,w=f.clientHeight||f.height;if(e&&p.hasValue()&&m.hasValue()&&(y=p.getPixels("x"),w=m.getPixels("y")),h.setCurrent(y,w),typeof A=="number"&&t.getAttribute("x",!0).setValue(A),typeof a=="number"&&t.getAttribute("y",!0).setValue(a),typeof i=="number"||typeof s=="number"){var B=Ws(t.getAttribute("viewBox").getString()),E=0,S=0;if(typeof i=="number"){var I=t.getStyle("width");I.hasValue()?E=I.getPixels("x")/i:isNaN(B[2])||(E=B[2]/i)}if(typeof s=="number"){var L=t.getStyle("height");L.hasValue()?S=L.getPixels("y")/s:isNaN(B[3])||(S=B[3]/s)}E||(E=S),S||(S=E),t.getAttribute("width",!0).setValue(i),t.getAttribute("height",!0).setValue(s);var k=t.getStyle("transform",!0,!0);k.setValue("".concat(k.getString()," scale(").concat(1/E,", ").concat(1/S,")"))}r||u.clearRect(0,0,y,w),t.render(u),d&&(this.isFirstRender=!1)}}Pw.defaultWindow=gR;Pw.defaultFetch=pR;var{defaultFetch:Eat}=Pw,Sat=typeof DOMParser<"u"?DOMParser:null;class Bb{constructor(){var{fetch:t=Eat,DOMParser:e=Sat}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=t,this.DOMParser=e}parse(t){var e=this;return fc(function*(){return t.startsWith("<")?e.parseFromString(t):e.load(t)})()}parseFromString(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch{return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}load(t){var e=this;return fc(function*(){var r=yield e.fetch(t),i=yield r.text();return e.parseFromString(i)})()}}class mR{constructor(t,e){this.type="translate",this.point=null,this.point=vi.parse(e)}apply(t){var{x:e,y:r}=this.point;t.translate(e||0,r||0)}unapply(t){var{x:e,y:r}=this.point;t.translate(-1*e||0,-1*r||0)}applyToPoint(t){var{x:e,y:r}=this.point;t.applyTransform([1,0,0,1,e||0,r||0])}}class vR{constructor(t,e,r){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Ws(e);this.angle=new ue(t,"angle",i[0]),this.originX=r[0],this.originY=r[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(t){var{cx:e,cy:r,originX:i,originY:s,angle:A}=this,a=e+i.getPixels("x"),o=r+s.getPixels("y");t.translate(a,o),t.rotate(A.getRadians()),t.translate(-a,-o)}unapply(t){var{cx:e,cy:r,originX:i,originY:s,angle:A}=this,a=e+i.getPixels("x"),o=r+s.getPixels("y");t.translate(a,o),t.rotate(-1*A.getRadians()),t.translate(-a,-o)}applyToPoint(t){var{cx:e,cy:r,angle:i}=this,s=i.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(s),Math.sin(s),-Math.sin(s),Math.cos(s),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}class wR{constructor(t,e,r){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=vi.parseScale(e);(i.x===0||i.y===0)&&(i.x=fd,i.y=fd),this.scale=i,this.originX=r[0],this.originY=r[1]}apply(t){var{scale:{x:e,y:r},originX:i,originY:s}=this,A=i.getPixels("x"),a=s.getPixels("y");t.translate(A,a),t.scale(e,r||e),t.translate(-A,-a)}unapply(t){var{scale:{x:e,y:r},originX:i,originY:s}=this,A=i.getPixels("x"),a=s.getPixels("y");t.translate(A,a),t.scale(1/e,1/r||e),t.translate(-A,-a)}applyToPoint(t){var{x:e,y:r}=this.scale;t.applyTransform([e||0,0,0,r||0,0,0])}}class uT{constructor(t,e,r){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Ws(e),this.originX=r[0],this.originY=r[1]}apply(t){var{originX:e,originY:r,matrix:i}=this,s=e.getPixels("x"),A=r.getPixels("y");t.translate(s,A),t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),t.translate(-s,-A)}unapply(t){var{originX:e,originY:r,matrix:i}=this,s=i[0],A=i[2],a=i[4],o=i[1],l=i[3],h=i[5],u=0,d=0,f=1,p=1/(s*(l*f-h*d)-A*(o*f-h*u)+a*(o*d-l*u)),m=e.getPixels("x"),y=r.getPixels("y");t.translate(m,y),t.transform(p*(l*f-h*d),p*(h*u-o*f),p*(a*d-A*f),p*(s*f-a*u),p*(A*h-a*l),p*(a*o-s*h)),t.translate(-m,-y)}applyToPoint(t){t.applyTransform(this.matrix)}}class fT extends uT{constructor(t,e,r){super(t,e,r),this.type="skew",this.angle=null,this.angle=new ue(t,"angle",e)}}class yR extends fT{constructor(t,e,r){super(t,e,r),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class bR extends fT{constructor(t,e,r){super(t,e,r),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function Fat(n){return Fd(n).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Tat(n){var[t,e]=n.split("(");return[t.trim(),e.trim().replace(")","")]}class Zh{constructor(t,e,r){this.document=t,this.transforms=[];var i=Fat(e);i.forEach(s=>{if(s!=="none"){var[A,a]=Tat(s),o=Zh.transformTypes[A];typeof o<"u"&&this.transforms.push(new o(this.document,a,r))}})}static fromElement(t,e){var r=e.getStyle("transform",!1,!0),[i,s=i]=e.getStyle("transform-origin",!1,!0).split(),A=[i,s];return r.hasValue()?new Zh(t,r.getString(),A):null}apply(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].apply(t)}unapply(t){for(var{transforms:e}=this,r=e.length,i=r-1;i>=0;i--)e[i].unapply(t)}applyToPoint(t){for(var{transforms:e}=this,r=e.length,i=0;i<r;i++)e[i].applyToPoint(t)}}Zh.transformTypes={translate:mR,rotate:vR,scale:wR,matrix:uT,skewX:yR,skewY:bR};class Rr{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=t,this.node=e,this.captureTextNodes=r,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!e||e.nodeType!==1)){if(Array.from(e.attributes).forEach(a=>{var o=cR(a.nodeName);this.attributes[o]=new ue(t,o,a.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(a=>a.trim());i.forEach(a=>{if(a){var[o,l]=a.split(":").map(h=>h.trim());this.styles[o]=new ue(t,o,l)}})}var{definitions:s}=t,A=this.getAttribute("id");A.hasValue()&&(s[A.getString()]||(s[A.getString()]=this)),Array.from(e.childNodes).forEach(a=>{if(a.nodeType===1)this.addChild(a);else if(r&&(a.nodeType===3||a.nodeType===4)){var o=t.createTextNode(a);o.getText().length>0&&this.addChild(o)}})}}getAttribute(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.attributes[t];if(!r&&e){var i=new ue(this.document,t,"");return this.attributes[t]=i,i}return r||ue.empty(this.document)}getHrefAttribute(){for(var t in this.attributes)if(t==="href"||t.endsWith(":href"))return this.attributes[t];return ue.empty(this.document)}getStyle(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[t];if(i)return i;var s=this.getAttribute(t);if(s!=null&&s.hasValue())return this.styles[t]=s,s;if(!r){var{parent:A}=this;if(A){var a=A.getStyle(t);if(a!=null&&a.hasValue())return a}}if(e){var o=new ue(this.document,t,"");return this.styles[t]=o,o}return i||ue.empty(this.document)}render(t){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){var e=Zh.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var i=r.getDefinition();i&&i.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach(e=>{e.render(t)})}addChild(t){var e=t instanceof Rr?t:this.document.createElement(t);e.parent=this,Rr.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e,{node:r}=this;if(typeof r.matches=="function")return r.matches(t);var i=(e=r.getAttribute)===null||e===void 0?void 0:e.call(r,"class");return!i||i===""?!1:i.split(" ").some(s=>".".concat(s)===t)}addStylesFromStyleDefinition(){var{styles:t,stylesSpecificity:e}=this.document;for(var r in t)if(!r.startsWith("@")&&this.matchesSelector(r)){var i=t[r],s=e[r];if(i)for(var A in i){var a=this.stylesSpecificity[A];typeof a>"u"&&(a="000"),s>=a&&(this.styles[A]=i[A],this.stylesSpecificity[A]=s)}}}removeStyles(t,e){var r=e.reduce((i,s)=>{var A=t.getStyle(s);if(!A.hasValue())return i;var a=A.getString();return A.setValue(""),[...i,[s,a]]},[]);return r}restoreStyles(t,e){e.forEach(r=>{var[i,s]=r;t.getStyle(i,!0).setValue(s)})}isFirstChild(){var t;return((t=this.parent)===null||t===void 0?void 0:t.children.indexOf(this))===0}}Rr.ignoreChildTypes=["title"];class BR extends Rr{constructor(t,e,r){super(t,e,r)}}function Iat(n){var t=n.trim();return/^('|")/.test(t)?t:'"'.concat(t,'"')}function _at(n){return typeof process>"u"?n:n.trim().split(",").map(Iat).join(",")}function Uat(n){if(!n)return"";var t=n.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}function Lat(n){if(!n)return"";var t=n.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}class ls{constructor(t,e,r,i,s,A){var a=A?typeof A=="string"?ls.parse(A):A:{};this.fontFamily=s||a.fontFamily,this.fontSize=i||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=r||a.fontWeight,this.fontVariant=e||a.fontVariant}static parse(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,r="",i="",s="",A="",a="",o=Fd(t).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(h=>{switch(!0){case(!l.fontStyle&&ls.styles.includes(h)):h!=="inherit"&&(r=h),l.fontStyle=!0;break;case(!l.fontVariant&&ls.variants.includes(h)):h!=="inherit"&&(i=h),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&ls.weights.includes(h)):h!=="inherit"&&(s=h),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:h!=="inherit"&&([A]=h.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:h!=="inherit"&&(a+=h)}}),new ls(r,i,s,A,a,e)}toString(){return[Uat(this.fontStyle),this.fontVariant,Lat(this.fontWeight),this.fontSize,_at(this.fontFamily)].join(" ").trim()}}ls.styles="normal|italic|oblique|inherit";ls.variants="normal|small-caps|inherit";ls.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class la{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=t,this.y1=e,this.x2=r,this.y2=i,this.addPoint(t,e),this.addPoint(r,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){typeof t<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),typeof e<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addBoundingBox(t){if(t){var{x1:e,y1:r,x2:i,y2:s}=t;this.addPoint(e,r),this.addPoint(i,s)}}sumCubic(t,e,r,i,s){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*i+Math.pow(t,3)*s}bezierCurveAdd(t,e,r,i,s){var A=6*e-12*r+6*i,a=-3*e+9*r-9*i+3*s,o=3*r-3*e;if(a===0){if(A===0)return;var l=-o/A;0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,i,s)):this.addY(this.sumCubic(l,e,r,i,s)));return}var h=Math.pow(A,2)-4*o*a;if(!(h<0)){var u=(-A+Math.sqrt(h))/(2*a);0<u&&u<1&&(t?this.addX(this.sumCubic(u,e,r,i,s)):this.addY(this.sumCubic(u,e,r,i,s)));var d=(-A-Math.sqrt(h))/(2*a);0<d&&d<1&&(t?this.addX(this.sumCubic(d,e,r,i,s)):this.addY(this.sumCubic(d,e,r,i,s)))}}addBezierCurve(t,e,r,i,s,A,a,o){this.addPoint(t,e),this.addPoint(a,o),this.bezierCurveAdd(!0,t,r,s,a),this.bezierCurveAdd(!1,e,i,A,o)}addQuadraticCurve(t,e,r,i,s,A){var a=t+.6666666666666666*(r-t),o=e+2/3*(i-e),l=a+1/3*(s-t),h=o+1/3*(A-e);this.addBezierCurve(t,e,a,l,o,h,s,A)}isPointInBox(t,e){var{x1:r,y1:i,x2:s,y2:A}=this;return r<=t&&t<=s&&i<=e&&e<=A}}class Ne extends _t{constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new vi(0,0),this.control=new vi(0,0),this.current=new vi(0,0),this.points=[],this.angles=[]}isEnd(){var{i:t,commands:e}=this;return t>=e.length-1}next(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",r=new vi(this.command[t],this.command[e]);return this.makeAbsolute(r)}getAsControlPoint(t,e){var r=this.getPoint(t,e);return this.control=r,r}getAsCurrentPoint(t,e){var r=this.getPoint(t,e);return this.current=r,r}getReflectedControlPoint(){var t=this.previousCommand.type;if(t!==_t.CURVE_TO&&t!==_t.SMOOTH_CURVE_TO&&t!==_t.QUAD_TO&&t!==_t.SMOOTH_QUAD_TO)return this.current;var{current:{x:e,y:r},control:{x:i,y:s}}=this,A=new vi(2*e-i,2*r-s);return A}makeAbsolute(t){if(this.command.relative){var{x:e,y:r}=this.current;t.x+=e,t.y+=r}return t}addMarker(t,e,r){var{points:i,angles:s}=this;r&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=i[i.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:t}=this,e=t.length,r=0;r<e;r++)if(!t[r]){for(var i=r+1;i<e;i++)if(t[i]){t[r]=t[i];break}}return t}}class nu extends Rr{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent}return t}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!e){var r=this.getStyle("fill"),i=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),A=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var a=r.getFillStyleDefinition(this,i);a&&(t.fillStyle=a)}else if(r.hasValue()){r.getString()==="currentColor"&&r.setValue(this.getStyle("color").getColor());var o=r.getColor();o!=="inherit"&&(t.fillStyle=o==="none"?"rgba(0,0,0,0)":o)}if(i.hasValue()){var l=new ue(this.document,"fill",t.fillStyle).addOpacity(i).getColor();t.fillStyle=l}if(s.isUrlDefinition()){var h=s.getFillStyleDefinition(this,A);h&&(t.strokeStyle=h)}else if(s.hasValue()){s.getString()==="currentColor"&&s.setValue(this.getStyle("color").getColor());var u=s.getString();u!=="inherit"&&(t.strokeStyle=u==="none"?"rgba(0,0,0,0)":u)}if(A.hasValue()){var d=new ue(this.document,"stroke",t.strokeStyle).addOpacity(A).getString();t.strokeStyle=d}var f=this.getStyle("stroke-width");if(f.hasValue()){var p=f.getPixels();t.lineWidth=p||fd}var m=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),w=this.getStyle("stroke-miterlimit"),B=this.getStyle("stroke-dasharray"),E=this.getStyle("stroke-dashoffset");if(m.hasValue()&&(t.lineCap=m.getString()),y.hasValue()&&(t.lineJoin=y.getString()),w.hasValue()&&(t.miterLimit=w.getNumber()),B.hasValue()&&B.getString()!=="none"){var S=Ws(B.getString());typeof t.setLineDash<"u"?t.setLineDash(S):typeof t.webkitLineDash<"u"?t.webkitLineDash=S:typeof t.mozDash<"u"&&!(S.length===1&&S[0]===0)&&(t.mozDash=S);var I=E.getPixels();typeof t.lineDashOffset<"u"?t.lineDashOffset=I:typeof t.webkitLineDashOffset<"u"?t.webkitLineDashOffset=I:typeof t.mozDashOffset<"u"&&(t.mozDashOffset=I)}}if(this.modifiedEmSizeStack=!1,typeof t.font<"u"){var L=this.getStyle("font"),k=this.getStyle("font-style"),H=this.getStyle("font-variant"),Q=this.getStyle("font-weight"),W=this.getStyle("font-size"),U=this.getStyle("font-family"),D=new ls(k.getString(),H.getString(),Q.getString(),W.hasValue()?"".concat(W.getPixels(!0),"px"):"",U.getString(),ls.parse(L.getString(),t.font));k.setValue(D.fontStyle),H.setValue(D.fontVariant),Q.setValue(D.fontWeight),W.setValue(D.fontSize),U.setValue(D.fontFamily),t.font=D.toString(),W.isPixels()&&(this.document.emSize=W.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}}class cr extends nu{constructor(t,e,r){super(t,e,r),this.type="path",this.pathParser=null,this.pathParser=new Ne(this.getAttribute("d").getString())}path(t){var{pathParser:e}=this,r=new la;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case Ne.MOVE_TO:this.pathM(t,r);break;case Ne.LINE_TO:this.pathL(t,r);break;case Ne.HORIZ_LINE_TO:this.pathH(t,r);break;case Ne.VERT_LINE_TO:this.pathV(t,r);break;case Ne.CURVE_TO:this.pathC(t,r);break;case Ne.SMOOTH_CURVE_TO:this.pathS(t,r);break;case Ne.QUAD_TO:this.pathQ(t,r);break;case Ne.SMOOTH_QUAD_TO:this.pathT(t,r);break;case Ne.ARC:this.pathA(t,r);break;case Ne.CLOSE_PATH:this.pathZ(t,r);break}return r}getBoundingBox(t){return this.path()}getMarkers(){var{pathParser:t}=this,e=t.getMarkerPoints(),r=t.getMarkerAngles(),i=e.map((s,A)=>[s,r[A]]);return i}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");t.fillStyle!==""&&(e.getString("inherit")!=="inherit"?t.fill(e.getString()):t.fill()),t.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var i=r.length-1,s=this.getStyle("marker-start"),A=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(s.isUrlDefinition()){var o=s.getDefinition(),[l,h]=r[0];o.render(t,l,h)}if(A.isUrlDefinition())for(var u=A.getDefinition(),d=1;d<i;d++){var[f,p]=r[d];u.render(t,f,p)}if(a.isUrlDefinition()){var m=a.getDefinition(),[y,w]=r[i];m.render(t,y,w)}}}static pathM(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){var{pathParser:r}=this,{point:i}=cr.pathM(r),{x:s,y:A}=i;r.addMarker(i),e.addPoint(s,A),t&&t.moveTo(s,A)}static pathL(t){var{current:e}=t,r=t.getAsCurrentPoint();return{current:e,point:r}}pathL(t,e){var{pathParser:r}=this,{current:i,point:s}=cr.pathL(r),{x:A,y:a}=s;r.addMarker(s,i),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathH(t){var{current:e,command:r}=t,i=new vi((r.relative?e.x:0)+r.x,e.y);return t.current=i,{current:e,point:i}}pathH(t,e){var{pathParser:r}=this,{current:i,point:s}=cr.pathH(r),{x:A,y:a}=s;r.addMarker(s,i),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathV(t){var{current:e,command:r}=t,i=new vi(e.x,(r.relative?e.y:0)+r.y);return t.current=i,{current:e,point:i}}pathV(t,e){var{pathParser:r}=this,{current:i,point:s}=cr.pathV(r),{x:A,y:a}=s;r.addMarker(s,i),e.addPoint(A,a),t&&t.lineTo(A,a)}static pathC(t){var{current:e}=t,r=t.getPoint("x1","y1"),i=t.getAsControlPoint("x2","y2"),s=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:i,currentPoint:s}}pathC(t,e){var{pathParser:r}=this,{current:i,point:s,controlPoint:A,currentPoint:a}=cr.pathC(r);r.addMarker(a,A,s),e.addBezierCurve(i.x,i.y,s.x,s.y,A.x,A.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,A.x,A.y,a.x,a.y)}static pathS(t){var{current:e}=t,r=t.getReflectedControlPoint(),i=t.getAsControlPoint("x2","y2"),s=t.getAsCurrentPoint();return{current:e,point:r,controlPoint:i,currentPoint:s}}pathS(t,e){var{pathParser:r}=this,{current:i,point:s,controlPoint:A,currentPoint:a}=cr.pathS(r);r.addMarker(a,A,s),e.addBezierCurve(i.x,i.y,s.x,s.y,A.x,A.y,a.x,a.y),t&&t.bezierCurveTo(s.x,s.y,A.x,A.y,a.x,a.y)}static pathQ(t){var{current:e}=t,r=t.getAsControlPoint("x1","y1"),i=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:i}}pathQ(t,e){var{pathParser:r}=this,{current:i,controlPoint:s,currentPoint:A}=cr.pathQ(r);r.addMarker(A,s,s),e.addQuadraticCurve(i.x,i.y,s.x,s.y,A.x,A.y),t&&t.quadraticCurveTo(s.x,s.y,A.x,A.y)}static pathT(t){var{current:e}=t,r=t.getReflectedControlPoint();t.control=r;var i=t.getAsCurrentPoint();return{current:e,controlPoint:r,currentPoint:i}}pathT(t,e){var{pathParser:r}=this,{current:i,controlPoint:s,currentPoint:A}=cr.pathT(r);r.addMarker(A,s,s),e.addQuadraticCurve(i.x,i.y,s.x,s.y,A.x,A.y),t&&t.quadraticCurveTo(s.x,s.y,A.x,A.y)}static pathA(t){var{current:e,command:r}=t,{rX:i,rY:s,xRot:A,lArcFlag:a,sweepFlag:o}=r,l=A*(Math.PI/180),h=t.getAsCurrentPoint(),u=new vi(Math.cos(l)*(e.x-h.x)/2+Math.sin(l)*(e.y-h.y)/2,-Math.sin(l)*(e.x-h.x)/2+Math.cos(l)*(e.y-h.y)/2),d=Math.pow(u.x,2)/Math.pow(i,2)+Math.pow(u.y,2)/Math.pow(s,2);d>1&&(i*=Math.sqrt(d),s*=Math.sqrt(d));var f=(a===o?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(s,2)-Math.pow(i,2)*Math.pow(u.y,2)-Math.pow(s,2)*Math.pow(u.x,2))/(Math.pow(i,2)*Math.pow(u.y,2)+Math.pow(s,2)*Math.pow(u.x,2)));isNaN(f)&&(f=0);var p=new vi(f*i*u.y/s,f*-s*u.x/i),m=new vi((e.x+h.x)/2+Math.cos(l)*p.x-Math.sin(l)*p.y,(e.y+h.y)/2+Math.sin(l)*p.x+Math.cos(l)*p.y),y=KF([1,0],[(u.x-p.x)/i,(u.y-p.y)/s]),w=[(u.x-p.x)/i,(u.y-p.y)/s],B=[(-u.x-p.x)/i,(-u.y-p.y)/s],E=KF(w,B);return eB(w,B)<=-1&&(E=Math.PI),eB(w,B)>=1&&(E=0),{currentPoint:h,rX:i,rY:s,sweepFlag:o,xAxisRotation:l,centp:m,a1:y,ad:E}}pathA(t,e){var{pathParser:r}=this,{currentPoint:i,rX:s,rY:A,sweepFlag:a,xAxisRotation:o,centp:l,a1:h,ad:u}=cr.pathA(r),d=1-a?1:-1,f=h+d*(u/2),p=new vi(l.x+s*Math.cos(f),l.y+A*Math.sin(f));if(r.addMarkerAngle(p,f-d*Math.PI/2),r.addMarkerAngle(i,f-d*Math.PI),e.addPoint(i.x,i.y),t&&!isNaN(h)&&!isNaN(u)){var m=s>A?s:A,y=s>A?1:s/A,w=s>A?A/s:1;t.translate(l.x,l.y),t.rotate(o),t.scale(y,w),t.arc(0,0,m,h,h+u,!!(1-a)),t.scale(1/y,1/w),t.rotate(-o),t.translate(-l.x,-l.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){cr.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}class dT extends cr{constructor(t,e,r){super(t,e,r),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class dc extends nu{constructor(t,e,r){super(t,e,new.target===dc?!0:r),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(t,e);var r=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();r&&(t.textBaseline=r)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if(this.type!=="text")return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var e=null;return this.children.forEach((r,i)=>{var s=this.getChildBoundingBox(t,this,this,i);e?e.addBoundingBox(s):e=s}),e}getFontSize(){var{document:t,parent:e}=this,r=ls.parse(t.ctx.font).fontSize,i=e.getStyle("font-size").getNumber(r);return i}getTElementBoundingBox(t){var e=this.getFontSize();return new la(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,r){var i=e[r],s=null;if(t.isArabic){var A=e.length,a=e[r-1],o=e[r+1],l="isolated";if((r===0||a===" ")&&r<A-1&&o!==" "&&(l="terminal"),r>0&&a!==" "&&r<A-1&&o!==" "&&(l="medial"),r>0&&a!==" "&&(r===A-1||o===" ")&&(l="initial"),typeof t.glyphs[i]<"u"){var h=t.glyphs[i];s=h instanceof dT?h:h[l]}}else s=t.glyphs[i];return s||(s=t.missingGlyph),s}getText(){return""}getTextFromNode(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),i=r.indexOf(e),s=r.length-1,A=Fd(e.textContent||"");return i===0&&(A=oR(A)),i===s&&(A=lR(A)),A}renderChildren(t){if(this.type!=="text"){this.renderTElementChildren(t);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((r,i)=>{this.renderChild(t,this,this,i)});var{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){var{document:e,parent:r}=this,i=this.getText(),s=r.getStyle("font-family").getDefinition();if(s){for(var{unitsPerEm:A}=s.fontFace,a=ls.parse(e.ctx.font),o=r.getStyle("font-size").getNumber(a.fontSize),l=r.getStyle("font-style").getString(a.fontStyle),h=o/A,u=s.isRTL?i.split("").reverse().join(""):i,d=Ws(r.getAttribute("dx").getString()),f=u.length,p=0;p<f;p++){var m=this.getGlyph(s,u,p);t.translate(this.x,this.y),t.scale(h,-h);var y=t.lineWidth;t.lineWidth=t.lineWidth*A/o,l==="italic"&&t.transform(1,0,.4,1,0,0),m.render(t),l==="italic"&&t.transform(1,0,-.4,1,0,0),t.lineWidth=y,t.scale(1/h,-1/h),t.translate(-this.x,-this.y),this.x+=o*(m.horizAdvX||s.horizAdvX)/A,typeof d[p]<"u"&&!isNaN(d[p])&&(this.x+=d[p])}return}var{x:w,y:B}=this;t.fillStyle&&t.fillText(i,w,B),t.strokeStyle&&t.strokeText(i,w,B)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r=!1,i=0;e==="start"&&!r||e==="end"&&r?i=t.x-this.minX:e==="end"&&!r||e==="start"&&r?i=t.x-this.maxX:i=t.x-(this.minX+this.maxX)/2;for(var s=this.textChunkStart;s<this.leafTexts.length;s++)this.leafTexts[s].x+=i;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(t){this.children.forEach((e,r)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,r)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,r,i){var s=r.children[i];s.children.length>0?s.children.forEach((A,a)=>{e.adjustChildCoordinatesRecursiveCore(t,e,s,a)}):this.adjustChildCoordinates(t,e,r,i)}adjustChildCoordinates(t,e,r,i){var s=r.children[i];if(typeof s.measureText!="function")return s;t.save(),s.setContext(t,!0);var A=s.getAttribute("x"),a=s.getAttribute("y"),o=s.getAttribute("dx"),l=s.getAttribute("dy"),h=s.getStyle("font-family").getDefinition(),u=!!h&&h.isRTL;i===0&&(A.hasValue()||A.setValue(s.getInheritedAttribute("x")),a.hasValue()||a.setValue(s.getInheritedAttribute("y")),o.hasValue()||o.setValue(s.getInheritedAttribute("dx")),l.hasValue()||l.setValue(s.getInheritedAttribute("dy")));var d=s.measureText(t);return u&&(e.x-=d),A.hasValue()?(e.applyAnchoring(),s.x=A.getPixels("x"),o.hasValue()&&(s.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),s.x=e.x),e.x=s.x,u||(e.x+=d),a.hasValue()?(s.y=a.getPixels("y"),l.hasValue()&&(s.y+=l.getPixels("y"))):(l.hasValue()&&(e.y+=l.getPixels("y")),s.y=e.y),e.y=s.y,e.leafTexts.push(s),e.minX=Math.min(e.minX,s.x,s.x+d),e.maxX=Math.max(e.maxX,s.x,s.x+d),s.clearContext(t),t.restore(),s}getChildBoundingBox(t,e,r,i){var s=r.children[i];if(typeof s.getBoundingBox!="function")return null;var A=s.getBoundingBox(t);return A?(s.children.forEach((a,o)=>{var l=e.getChildBoundingBox(t,e,s,o);A.addBoundingBox(l)}),A):null}renderChild(t,e,r,i){var s=r.children[i];s.render(t),s.children.forEach((A,a)=>{e.renderChild(t,e,s,a)})}measureText(t){var{measureCache:e}=this;if(~e)return e;var r=this.getText(),i=this.measureTargetText(t,r);return this.measureCache=i,i}measureTargetText(t,e){if(!e.length)return 0;var{parent:r}=this,i=r.getStyle("font-family").getDefinition();if(i){for(var s=this.getFontSize(),A=i.isRTL?e.split("").reverse().join(""):e,a=Ws(r.getAttribute("dx").getString()),o=A.length,l=0,h=0;h<o;h++){var u=this.getGlyph(i,A,h);l+=(u.horizAdvX||i.horizAdvX)*s/i.fontFace.unitsPerEm,typeof a[h]<"u"&&!isNaN(a[h])&&(l+=a[h])}return l}if(!t.measureText)return e.length*10;t.save(),this.setContext(t,!0);var{width:d}=t.measureText(e);return this.clearContext(t),t.restore(),d}getInheritedAttribute(t){for(var e=this;e instanceof dc&&e.isFirstChild();){var r=e.parent.getAttribute(t);if(r.hasValue(!0))return r.getValue("0");e=e.parent}return null}}class Mw extends dc{constructor(t,e,r){super(t,e,new.target===Mw?!0:r),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class Qat extends Mw{constructor(){super(...arguments),this.type="textNode"}}class U0 extends nu{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(t){var e,{document:r}=this,{screen:i,window:s}=r,A=t.canvas;if(i.setDefaults(t),A.style&&typeof t.font<"u"&&s&&typeof s.getComputedStyle<"u"){t.font=s.getComputedStyle(A).getPropertyValue("font");var a=new ue(r,"fontSize",ls.parse(t.font).fontSize);a.hasValue()&&(r.rootEmSize=a.getPixels("y"),r.emSize=r.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:l}=i.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),u=this.getAttribute("refY"),d=this.getAttribute("viewBox"),f=d.hasValue()?Ws(d.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",m=0,y=0,w=0,B=0;f&&(m=f[0],y=f[1]),this.root||(o=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(w=m,B=y,m=0,y=0)),i.viewPort.setCurrent(o,l),this.node&&(!this.parent||((e=this.node.parentNode)===null||e===void 0?void 0:e.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),f&&(o=f[2],l=f[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:o,height:i.viewPort.height,desiredHeight:l,minX:m,minY:y,refX:h.getValue(),refY:u.getValue(),clip:p,clipX:w,clipY:B}),f&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(o,l))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),s=this.getAttribute("height",!0),A=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=i.getNumber(0),l=s.getNumber(0);if(r)if(typeof r=="string")this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(t),s.setValue(e),A.hasValue()||A.setValue("0 0 ".concat(o||t," ").concat(l||e)),a.hasValue()){var u=this.getStyle("width"),d=this.getStyle("height");u.hasValue()&&u.setValue("".concat(t,"px")),d.hasValue()&&d.setValue("".concat(e,"px"))}}}class gT extends cr{constructor(){super(...arguments),this.type="rect"}path(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),A=this.getAttribute("rx"),a=this.getAttribute("ry"),o=A.getPixels("x"),l=a.getPixels("y");if(A.hasValue()&&!a.hasValue()&&(l=o),a.hasValue()&&!A.hasValue()&&(o=l),o=Math.min(o,i/2),l=Math.min(l,s/2),t){var h=4*((Math.sqrt(2)-1)/3);t.beginPath(),s>0&&i>0&&(t.moveTo(e+o,r),t.lineTo(e+i-o,r),t.bezierCurveTo(e+i-o+h*o,r,e+i,r+l-h*l,e+i,r+l),t.lineTo(e+i,r+s-l),t.bezierCurveTo(e+i,r+s-l+h*l,e+i-o+h*o,r+s,e+i-o,r+s),t.lineTo(e+o,r+s),t.bezierCurveTo(e+o-h*o,r+s,e,r+s-l+h*l,e,r+s-l),t.lineTo(e,r+l),t.bezierCurveTo(e,r+l-h*l,e+o-h*o,r,e+o,r),t.closePath())}return new la(e,r,e+i,r+s)}getMarkers(){return null}}class CR extends cr{constructor(){super(...arguments),this.type="circle"}path(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return t&&i>0&&(t.beginPath(),t.arc(e,r,i,0,Math.PI*2,!1),t.closePath()),new la(e-i,r-i,e+i,r+i)}getMarkers(){return null}}class xR extends cr{constructor(){super(...arguments),this.type="ellipse"}path(t){var e=4*((Math.sqrt(2)-1)/3),r=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),A=this.getAttribute("cy").getPixels("y");return t&&r>0&&i>0&&(t.beginPath(),t.moveTo(s+r,A),t.bezierCurveTo(s+r,A+e*i,s+e*r,A+i,s,A+i),t.bezierCurveTo(s-e*r,A+i,s-r,A+e*i,s-r,A),t.bezierCurveTo(s-r,A-e*i,s-e*r,A-i,s,A-i),t.bezierCurveTo(s+e*r,A-i,s+r,A-e*i,s+r,A),t.closePath()),new la(s-r,A-i,s+r,A+i)}getMarkers(){return null}}class ER extends cr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new vi(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new vi(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){var[{x:e,y:r},{x:i,y:s}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,r),t.lineTo(i,s)),new la(e,r,i,s)}getMarkers(){var[t,e]=this.getPoints(),r=t.angleTo(e);return[[t,r],[e,r]]}}class pT extends cr{constructor(t,e,r){super(t,e,r),this.type="polyline",this.points=[],this.points=vi.parsePath(this.getAttribute("points").getString())}path(t){var{points:e}=this,[{x:r,y:i}]=e,s=new la(r,i);return t&&(t.beginPath(),t.moveTo(r,i)),e.forEach(A=>{var{x:a,y:o}=A;s.addPoint(a,o),t&&t.lineTo(a,o)}),s}getMarkers(){var{points:t}=this,e=t.length-1,r=[];return t.forEach((i,s)=>{s!==e&&r.push([i,i.angleTo(t[s+1])])}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}class SR extends pT{constructor(){super(...arguments),this.type="polygon"}path(t){var e=super.path(t),[{x:r,y:i}]=this.points;return t&&(t.lineTo(r,i),t.closePath()),e}}class FR extends Rr{constructor(){super(...arguments),this.type="pattern"}createPattern(t,e,r){var i=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),A=new U0(this.document,null);A.attributes.viewBox=new ue(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.width=new ue(this.document,"width","".concat(i,"px")),A.attributes.height=new ue(this.document,"height","".concat(s,"px")),A.attributes.transform=new ue(this.document,"transform",this.getAttribute("patternTransform").getValue()),A.children=this.children;var a=this.document.createCanvas(i,s),o=a.getContext("2d"),l=this.getAttribute("x"),h=this.getAttribute("y");l.hasValue()&&h.hasValue()&&o.translate(l.getPixels("x",!0),h.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var u=-1;u<=1;u++)for(var d=-1;d<=1;d++)o.save(),A.attributes.x=new ue(this.document,"x",u*a.width),A.attributes.y=new ue(this.document,"y",d*a.height),A.render(o),o.restore();var f=t.createPattern(a,"repeat");return f}}class TR extends Rr{constructor(){super(...arguments),this.type="marker"}render(t,e,r){if(e){var{x:i,y:s}=e,A=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(i,s),A==="auto"&&t.rotate(r),a==="strokeWidth"&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new U0(this.document,null);o.type=this.type,o.attributes.viewBox=new ue(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new ue(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new ue(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new ue(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new ue(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new ue(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new ue(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new ue(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),a==="strokeWidth"&&t.scale(1/t.lineWidth,1/t.lineWidth),A==="auto"&&t.rotate(-r),t.translate(-i,-s)}}}class IR extends Rr{constructor(){super(...arguments),this.type="defs"}render(){}}class EC extends nu{constructor(){super(...arguments),this.type="g"}getBoundingBox(t){var e=new la;return this.children.forEach(r=>{e.addBoundingBox(r.getBoundingBox(t))}),e}}class mT extends Rr{constructor(t,e,r){super(t,e,r),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:s}=this;s.forEach(A=>{A.type==="stop"&&i.push(A)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,r){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:s}=i,A=this.getGradient(t,e);if(!A)return this.addParentOpacity(r,s[s.length-1].color);if(s.forEach(y=>{A.addColorStop(y.offset,this.addParentOpacity(r,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:a}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:l}=a.screen,[h]=l.viewPorts,u=new gT(a,null);u.attributes.x=new ue(a,"x",-o/3),u.attributes.y=new ue(a,"y",-o/3),u.attributes.width=new ue(a,"width",o),u.attributes.height=new ue(a,"height",o);var d=new EC(a,null);d.attributes.transform=new ue(a,"transform",this.getAttribute("gradientTransform").getValue()),d.children=[u];var f=new U0(a,null);f.attributes.x=new ue(a,"x",0),f.attributes.y=new ue(a,"y",0),f.attributes.width=new ue(a,"width",h.width),f.attributes.height=new ue(a,"height",h.height),f.children=[d];var p=a.createCanvas(h.width,h.height),m=p.getContext("2d");return m.fillStyle=A,f.render(m),m.createPattern(p,"no-repeat")}return A}inheritStopContainer(t){this.attributesToInherit.forEach(e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())})}addParentOpacity(t,e){if(t.hasValue()){var r=new ue(this.document,"color",e);return r.addOpacity(t).getColor()}return e}}class _R extends mT{constructor(t,e,r){super(t,e,r),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",i=r?e.getBoundingBox(t):null;if(r&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var s=r?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),A=r?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=r?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=r?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===a&&A===o?null:t.createLinearGradient(s,A,a,o)}}class UR extends mT{constructor(t,e,r){super(t,e,r),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(t,e){var r=this.getGradientUnits()==="objectBoundingBox",i=e.getBoundingBox(t);if(r&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var s=r?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),A=r?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=s,o=A;this.getAttribute("fx").hasValue()&&(a=r?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=r?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,o,h,s,A,l)}}class LR extends Rr{constructor(t,e,r){super(t,e,r),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),s=this.getStyle("stop-opacity"),A=this.getStyle("stop-color",!0);A.getString()===""&&A.setValue("#000"),s.hasValue()&&(A=A.addOpacity(s)),this.offset=i,this.color=A.getColor()}}class SC extends Rr{constructor(t,e,r){super(t,e,r),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new ue(t,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return t==="CSS"?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){var{initialUnits:t}=this,{progress:e,from:r,to:i}=this.getProgress(),s=r.getNumber()+(i.getNumber()-r.getNumber())*e;return t==="%"&&(s*=100),"".concat(s).concat(t)}update(t){var{parent:e}=this,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=t;var s=!1;if(this.begin<this.duration){var A=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var o=a.getString();A="".concat(o,"(").concat(A,")")}r.setValue(A),s=!0}return s}getProgress(){var{document:t,values:e}=this,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var i=r.progress*(e.getValue().length-1),s=Math.floor(i),A=Math.ceil(i);r.from=new ue(t,"from",parseFloat(e.getValue()[s])),r.to=new ue(t,"to",parseFloat(e.getValue()[A])),r.progress=(i-s)/(A-s)}else r.from=this.from,r.to=this.to;return r}}class QR extends SC{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),i=new OF(e.getColor()),s=new OF(r.getColor());if(i.ok&&s.ok){var A=i.r+(s.r-i.r)*t,a=i.g+(s.g-i.g)*t,o=i.b+(s.b-i.b)*t;return"rgb(".concat(Math.floor(A),", ").concat(Math.floor(a),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class NR extends SC{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:t,from:e,to:r}=this.getProgress(),i=Ws(e.getString()),s=Ws(r.getString()),A=i.map((a,o)=>{var l=s[o];return a+(l-a)*t}).join(" ");return A}}class PR extends Rr{constructor(t,e,r){super(t,e,r),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=t,{children:s}=this;for(var A of s)switch(A.type){case"font-face":{this.fontFace=A;var a=A.getStyle("font-family");a.hasValue()&&(i[a.getString()]=this);break}case"missing-glyph":this.missingGlyph=A;break;case"glyph":{var o=A;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[o.unicode]>"u"&&(this.glyphs[o.unicode]=Object.create(null)),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o;break}}}render(){}}class MR extends Rr{constructor(t,e,r){super(t,e,r),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class kR extends cr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class OR extends dc{constructor(){super(...arguments),this.type="tref"}getText(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}class DR extends dc{constructor(t,e,r){super(t,e,r),this.type="a";var{childNodes:i}=e,s=i[0],A=i.length>0&&Array.from(i).every(a=>a.nodeType===3);this.hasText=A,this.text=A?this.getTextFromNode(s):""}getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);var{document:e,x:r,y:i}=this,{mouse:s}=e.screen,A=new ue(e,"fontSize",ls.parse(e.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new la(r,i-A.getPixels("y"),r+this.measureText(t),i))}else if(this.children.length>0){var a=new EC(this.document,null);a.children=this.children,a.parent=this,a.render(t)}}onClick(){var{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){var t=this.document.ctx;t.canvas.style.cursor="pointer"}}function _Q(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function vy(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?_Q(Object(e),!0).forEach(function(r){oT(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):_Q(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}class RR extends dc{constructor(t,e,r){super(t,e,r),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var i=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(i)}getText(){return this.text}path(t){var{dataArray:e}=this;t&&t.beginPath(),e.forEach(r=>{var{type:i,points:s}=r;switch(i){case Ne.LINE_TO:t&&t.lineTo(s[0],s[1]);break;case Ne.MOVE_TO:t&&t.moveTo(s[0],s[1]);break;case Ne.CURVE_TO:t&&t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case Ne.QUAD_TO:t&&t.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case Ne.ARC:{var[A,a,o,l,h,u,d,f]=s,p=o>l?o:l,m=o>l?1:o/l,y=o>l?l/o:1;t&&(t.translate(A,a),t.rotate(d),t.scale(m,y),t.arc(0,0,p,h,h+u,!!(1-f)),t.scale(1/m,1/y),t.rotate(-d),t.translate(-A,-a));break}case Ne.CLOSE_PATH:t&&t.closePath();break}})}renderChildren(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),{glyphInfo:i}=this,s=t.fillStyle;e==="underline"&&t.beginPath(),i.forEach((A,a)=>{var{p0:o,p1:l,rotation:h,text:u}=A;t.save(),t.translate(o.x,o.y),t.rotate(h),t.fillStyle&&t.fillText(u,0,0),t.strokeStyle&&t.strokeText(u,0,0),t.restore(),e==="underline"&&(a===0&&t.moveTo(o.x,o.y+r/8),t.lineTo(l.x,l.y+r/5))}),e==="underline"&&(t.lineWidth=r/20,t.strokeStyle=s,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,r,i,s,A,a,o,l){var h=A,u=this.measureText(t,o);o===" "&&e==="justify"&&r<i&&(u+=(i-r)/s),l>-1&&(h+=this.getLetterSpacingAt(l));var d=this.textHeight/20,f=this.getEquidistantPointOnPath(h,d,0),p=this.getEquidistantPointOnPath(h+u,d,0),m={p0:f,p1:p},y=f&&p?Math.atan2(p.y-f.y,p.x-f.x):0;if(a){var w=Math.cos(Math.PI/2+y)*a,B=Math.cos(-y)*a;m.p0=vy(vy({},f),{},{x:f.x+w,y:f.y+B}),m.p1=vy(vy({},p),{},{x:p.x+w,y:p.y+B})}return h+=u,{offset:h,segment:m,rotation:y}}measureText(t,e){var{measuresCache:r}=this,i=e||this.getText();if(r.has(i))return r.get(i);var s=this.measureTargetText(t,i);return r.set(i,s),s}setTextData(t){if(!this.glyphInfo){var e=this.getText(),r=e.split(""),i=e.split(" ").length-1,s=this.parent.getAttribute("dx").split().map(S=>S.getPixels("x")),A=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),h=0;!o.hasValue()||o.getValue()==="inherit"?h=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(h=o.getPixels());var u=[],d=e.length;this.letterSpacingCache=u;for(var f=0;f<d;f++)u.push(typeof s[f]<"u"?s[f]:h);var p=u.reduce((S,I,L)=>L===0?0:S+I||0,0),m=this.measureText(t),y=Math.max(m+p,0);this.textWidth=m,this.textHeight=this.getFontSize(),this.glyphInfo=[];var w=this.getPathLength(),B=this.getStyle("startOffset").getNumber(0)*w,E=0;(a==="middle"||a==="center")&&(E=-y/2),(a==="end"||a==="right")&&(E=-y),E+=B,r.forEach((S,I)=>{var{offset:L,segment:k,rotation:H}=this.findSegmentToFitChar(t,a,y,w,i,E,A,S,I);E=L,!(!k.p0||!k.p1)&&this.glyphInfo.push({text:r[I],p0:k.p0,p1:k.p1,rotation:H})})}}parsePathData(t){if(this.pathLength=-1,!t)return[];var e=[],{pathParser:r}=t;for(r.reset();!r.isEnd();){var{current:i}=r,s=i?i.x:0,A=i?i.y:0,a=r.next(),o=a.type,l=[];switch(a.type){case Ne.MOVE_TO:this.pathM(r,l);break;case Ne.LINE_TO:o=this.pathL(r,l);break;case Ne.HORIZ_LINE_TO:o=this.pathH(r,l);break;case Ne.VERT_LINE_TO:o=this.pathV(r,l);break;case Ne.CURVE_TO:this.pathC(r,l);break;case Ne.SMOOTH_CURVE_TO:o=this.pathS(r,l);break;case Ne.QUAD_TO:this.pathQ(r,l);break;case Ne.SMOOTH_QUAD_TO:o=this.pathT(r,l);break;case Ne.ARC:l=this.pathA(r);break;case Ne.CLOSE_PATH:cr.pathZ(r);break}a.type!==Ne.CLOSE_PATH?e.push({type:o,points:l,start:{x:s,y:A},pathLength:this.calcLength(s,A,o,l)}):e.push({type:Ne.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){var{x:r,y:i}=cr.pathM(t).point;e.push(r,i)}pathL(t,e){var{x:r,y:i}=cr.pathL(t).point;return e.push(r,i),Ne.LINE_TO}pathH(t,e){var{x:r,y:i}=cr.pathH(t).point;return e.push(r,i),Ne.LINE_TO}pathV(t,e){var{x:r,y:i}=cr.pathV(t).point;return e.push(r,i),Ne.LINE_TO}pathC(t,e){var{point:r,controlPoint:i,currentPoint:s}=cr.pathC(t);e.push(r.x,r.y,i.x,i.y,s.x,s.y)}pathS(t,e){var{point:r,controlPoint:i,currentPoint:s}=cr.pathS(t);return e.push(r.x,r.y,i.x,i.y,s.x,s.y),Ne.CURVE_TO}pathQ(t,e){var{controlPoint:r,currentPoint:i}=cr.pathQ(t);e.push(r.x,r.y,i.x,i.y)}pathT(t,e){var{controlPoint:r,currentPoint:i}=cr.pathT(t);return e.push(r.x,r.y,i.x,i.y),Ne.QUAD_TO}pathA(t){var{rX:e,rY:r,sweepFlag:i,xAxisRotation:s,centp:A,a1:a,ad:o}=cr.pathA(t);return i===0&&o>0&&(o-=2*Math.PI),i===1&&o<0&&(o+=2*Math.PI),[A.x,A.y,e,r,a,o,s,i]}calcLength(t,e,r,i){var s=0,A=null,a=null,o=0;switch(r){case Ne.LINE_TO:return this.getLineLength(t,e,i[0],i[1]);case Ne.CURVE_TO:for(s=0,A=this.getPointOnCubicBezier(0,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return s;case Ne.QUAD_TO:for(s=0,A=this.getPointOnQuadraticBezier(0,t,e,i[0],i[1],i[2],i[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,t,e,i[0],i[1],i[2],i[3]),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return s;case Ne.ARC:{s=0;var l=i[4],h=i[5],u=i[4]+h,d=Math.PI/180;if(Math.abs(l-u)<d&&(d=Math.abs(l-u)),A=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),h<0)for(o=l-d;o>u;o-=d)a=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],o,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;else for(o=l+d;o<u;o+=d)a=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],o,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),A=a;return a=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),s+=this.getLineLength(A.x,A.y,a.x,a.y),s}}return 0}getPointOnLine(t,e,r,i,s){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:r,o=(s-r)/(i-e+fd),l=Math.sqrt(t*t/(1+o*o));i<e&&(l*=-1);var h=o*l,u=null;if(i===e)u={x:A,y:a+h};else if((a-r)/(A-e+fd)===o)u={x:A+l,y:a+h};else{var d=0,f=0,p=this.getLineLength(e,r,i,s);if(p<fd)return null;var m=(A-e)*(i-e)+(a-r)*(s-r);m/=p*p,d=e+m*(i-e),f=r+m*(s-r);var y=this.getLineLength(A,a,d,f),w=Math.sqrt(t*t-y*y);l=Math.sqrt(w*w/(1+o*o)),i<e&&(l*=-1),h=o*l,u={x:d+l,y:f+h}}return u}getPointOnPath(t){var e=this.getPathLength(),r=0,i=null;if(t<-5e-5||t-5e-5>e)return null;var{dataArray:s}=this;for(var A of s){if(A&&(A.pathLength<5e-5||r+A.pathLength+5e-5<t)){r+=A.pathLength;continue}var a=t-r,o=0;switch(A.type){case Ne.LINE_TO:i=this.getPointOnLine(a,A.start.x,A.start.y,A.points[0],A.points[1],A.start.x,A.start.y);break;case Ne.ARC:{var l=A.points[4],h=A.points[5],u=A.points[4]+h;if(o=l+a/A.pathLength*h,h<0&&o<u||h>=0&&o>u)break;i=this.getPointOnEllipticalArc(A.points[0],A.points[1],A.points[2],A.points[3],o,A.points[6]);break}case Ne.CURVE_TO:o=a/A.pathLength,o>1&&(o=1),i=this.getPointOnCubicBezier(o,A.start.x,A.start.y,A.points[0],A.points[1],A.points[2],A.points[3],A.points[4],A.points[5]);break;case Ne.QUAD_TO:o=a/A.pathLength,o>1&&(o=1),i=this.getPointOnQuadraticBezier(o,A.start.x,A.start.y,A.points[0],A.points[1],A.points[2],A.points[3]);break}if(i)return i;break}return null}getLineLength(t,e,r,i){return Math.sqrt((r-t)*(r-t)+(i-e)*(i-e))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((t,e)=>e.pathLength>0?t+e.pathLength:t,0)),this.pathLength}getPointOnCubicBezier(t,e,r,i,s,A,a,o,l){var h=o*VF(t)+A*GF(t)+i*jF(t)+e*$F(t),u=l*VF(t)+a*GF(t)+s*jF(t)+r*$F(t);return{x:h,y:u}}getPointOnQuadraticBezier(t,e,r,i,s,A,a){var o=A*WF(t)+i*zF(t)+e*XF(t),l=a*WF(t)+s*zF(t)+r*XF(t);return{x:o,y:l}}getPointOnEllipticalArc(t,e,r,i,s,A){var a=Math.cos(A),o=Math.sin(A),l={x:r*Math.cos(s),y:i*Math.sin(s)};return{x:t+(l.x*a-l.y*o),y:e+(l.x*o+l.y*a)}}buildEquidistantCache(t,e){var r=this.getPathLength(),i=e||.25,s=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==i){this.equidistantCache={step:s,precision:i,points:[]};for(var A=0,a=0;a<=r;a+=i){var o=this.getPointOnPath(a),l=this.getPointOnPath(a+i);!o||!l||(A+=this.getLineLength(o.x,o.y,l.x,l.y),A>=s&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:a}),A-=s))}}}getEquidistantPointOnPath(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var i=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var Nat=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class HR extends nu{constructor(t,e,r){super(t,e,r),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var s=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);t.images.push(this),s?this.loadSvg(i):this.loadImage(i),this.isSvg=s}}loadImage(t){var e=this;return fc(function*(){try{var r=yield e.document.createImage(t);e.image=r}catch(i){console.error('Error while loading image "'.concat(t,'":'),i)}e.loaded=!0})()}loadSvg(t){var e=this;return fc(function*(){var r=Nat.exec(t);if(r){var i=r[5];r[4]==="base64"?e.image=atob(i):e.image=decodeURIComponent(i)}else try{var s=yield e.document.fetch(t),A=yield s.text();e.image=A}catch(a){console.error('Error while loading image "'.concat(t,'":'),a)}e.loaded=!0})()}renderChildren(t){var{document:e,image:r,loaded:i}=this,s=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!i||!r||!a||!o)){if(t.save(),t.translate(s,A),this.isSvg){var l=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o});l.document.documentElement.parent=this,l.render()}else{var h=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:h.width,height:o,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&t.drawImage(h,0,0)}t.restore()}}getBoundingBox(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new la(t,e,t+r,e+i)}}class KR extends nu{constructor(){super(...arguments),this.type="symbol"}render(t){}}class VR{constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}load(t,e){var r=this;return fc(function*(){try{var{document:i}=r,s=yield i.canvg.parser.load(e),A=s.getElementsByTagName("font");Array.from(A).forEach(a=>{var o=i.createElement(a);i.definitions[t]=o})}catch(a){console.error('Error while loading font "'.concat(e,'":'),a)}r.loaded=!0})()}}class vT extends Rr{constructor(t,e,r){super(t,e,r),this.type="style";var i=Fd(Array.from(e.childNodes).map(A=>A.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),s=i.split("}");s.forEach(A=>{var a=A.trim();if(a){var o=a.split("{"),l=o[0].split(","),h=o[1].split(";");l.forEach(u=>{var d=u.trim();if(d){var f=t.styles[d]||{};if(h.forEach(y=>{var w=y.indexOf(":"),B=y.substr(0,w).trim(),E=y.substr(w+1,y.length-w).trim();B&&E&&(f[B]=new ue(t,B,E))}),t.styles[d]=f,t.stylesSpecificity[d]=uR(d),d==="@font-face"){var p=f["font-family"].getString().replace(/"|'/g,""),m=f.src.getString().split(",");m.forEach(y=>{if(y.indexOf('format("svg")')>0){var w=hT(y);w&&new VR(t).load(p,w)}})}}})}})}}vT.parseExternalUrl=hT;class GR extends nu{constructor(){super(...arguments),this.type="use"}setContext(t){super.setContext(t);var e=this.getAttribute("x"),r=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),r.hasValue()&&t.translate(0,r.getPixels("y"))}path(t){var{element:e}=this;e&&e.path(t)}renderChildren(t){var{document:e,element:r}=this;if(r){var i=r;if(r.type==="symbol"&&(i=new U0(e,null),i.attributes.viewBox=new ue(e,"viewBox",r.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new ue(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new ue(e,"overflow",r.getAttribute("overflow").getString()),i.children=r.children,r.styles.opacity=new ue(e,"opacity",this.calculateOpacity())),i.type==="svg"){var s=this.getStyle("width",!1,!0),A=this.getStyle("height",!1,!0);s.hasValue()&&(i.attributes.width=new ue(e,"width",s.getString())),A.hasValue()&&(i.attributes.height=new ue(e,"height",A.getString()))}var a=i.parent;i.parent=this,i.render(t),i.parent=a}}getBoundingBox(t){var{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){var{document:t,element:e}=this;return Zh.fromElement(t,e)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function wy(n,t,e,r,i,s){return n[e*r*4+t*4+s]}function yy(n,t,e,r,i,s,A){n[e*r*4+t*4+s]=A}function Vi(n,t,e){var r=n[t];return r*e}function ul(n,t,e,r){return t+Math.cos(n)*e+Math.sin(n)*r}class wT extends Rr{constructor(t,e,r){super(t,e,r),this.type="feColorMatrix";var i=Ws(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var s=i[0];i=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var A=i[0]*Math.PI/180;i=[ul(A,.213,.787,-.213),ul(A,.715,-.715,-.715),ul(A,.072,-.072,.928),0,0,ul(A,.213,-.213,.143),ul(A,.715,.285,.14),ul(A,.072,-.072,-.283),0,0,ul(A,.213,-.213,-.787),ul(A,.715,-.715,.715),ul(A,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(t,e,r,i,s){for(var{includeOpacity:A,matrix:a}=this,o=t.getImageData(0,0,i,s),l=0;l<s;l++)for(var h=0;h<i;h++){var u=wy(o.data,h,l,i,s,0),d=wy(o.data,h,l,i,s,1),f=wy(o.data,h,l,i,s,2),p=wy(o.data,h,l,i,s,3),m=Vi(a,0,u)+Vi(a,1,d)+Vi(a,2,f)+Vi(a,3,p)+Vi(a,4,1),y=Vi(a,5,u)+Vi(a,6,d)+Vi(a,7,f)+Vi(a,8,p)+Vi(a,9,1),w=Vi(a,10,u)+Vi(a,11,d)+Vi(a,12,f)+Vi(a,13,p)+Vi(a,14,1),B=Vi(a,15,u)+Vi(a,16,d)+Vi(a,17,f)+Vi(a,18,p)+Vi(a,19,1);A&&(m=0,y=0,w=0,B*=p/255),yy(o.data,h,l,i,s,0,m),yy(o.data,h,l,i,s,1,y),yy(o.data,h,l,i,s,2,w),yy(o.data,h,l,i,s,3,B)}t.clearRect(0,0,i,s),t.putImageData(o,0,0)}}class kw extends Rr{constructor(){super(...arguments),this.type="mask"}apply(t,e){var{document:r}=this,i=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!A&&!a){var o=new la;this.children.forEach(p=>{o.addBoundingBox(p.getBoundingBox(t))}),i=Math.floor(o.x1),s=Math.floor(o.y1),A=Math.floor(o.width),a=Math.floor(o.height)}var l=this.removeStyles(e,kw.ignoreStyles),h=r.createCanvas(i+A,s+a),u=h.getContext("2d");r.screen.setDefaults(u),this.renderChildren(u),new wT(r,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(u,0,0,i+A,s+a);var d=r.createCanvas(i+A,s+a),f=d.getContext("2d");r.screen.setDefaults(f),e.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=u.createPattern(h,"no-repeat"),f.fillRect(0,0,i+A,s+a),t.fillStyle=f.createPattern(d,"no-repeat"),t.fillRect(0,0,i+A,s+a),this.restoreStyles(e,l)}render(t){}}kw.ignoreStyles=["mask","transform","clip-path"];var UQ=()=>{};class jR extends Rr{constructor(){super(...arguments),this.type="clipPath"}apply(t){var{document:e}=this,r=Reflect.getPrototypeOf(t),{beginPath:i,closePath:s}=t;r&&(r.beginPath=UQ,r.closePath=UQ),Reflect.apply(i,t,[]),this.children.forEach(A=>{if(!(typeof A.path>"u")){var a=typeof A.elementTransform<"u"?A.elementTransform():null;a||(a=Zh.fromElement(e,A)),a&&a.apply(t),A.path(t),r&&(r.closePath=s),a&&a.unapply(t)}}),Reflect.apply(s,t,[]),t.clip(),r&&(r.beginPath=i,r.closePath=s)}render(t){}}class Ow extends Rr{constructor(){super(...arguments),this.type="filter"}apply(t,e){var{document:r,children:i}=this,s=e.getBoundingBox(t);if(s){var A=0,a=0;i.forEach(w=>{var B=w.extraFilterDistance||0;A=Math.max(A,B),a=Math.max(a,B)});var o=Math.floor(s.width),l=Math.floor(s.height),h=o+2*A,u=l+2*a;if(!(h<1||u<1)){var d=Math.floor(s.x),f=Math.floor(s.y),p=this.removeStyles(e,Ow.ignoreStyles),m=r.createCanvas(h,u),y=m.getContext("2d");r.screen.setDefaults(y),y.translate(-d+A,-f+a),e.render(y),i.forEach(w=>{typeof w.apply=="function"&&w.apply(y,0,0,h,u)}),t.drawImage(m,0,0,h,u,d-A,f-a,h,u),this.restoreStyles(e,p)}}}render(t){}}Ow.ignoreStyles=["filter","transform","clip-path"];class $R extends Rr{constructor(t,e,r){super(t,e,r),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(t,e,r,i,s){}}class WR extends Rr{constructor(){super(...arguments),this.type="feMorphology"}apply(t,e,r,i,s){}}class zR extends Rr{constructor(){super(...arguments),this.type="feComposite"}apply(t,e,r,i,s){}}class XR extends Rr{constructor(t,e,r){super(t,e,r),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(t,e,r,i,s){var{document:A,blurRadius:a}=this,o=A.window?A.window.document.body:null,l=t.canvas;l.id=A.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),uat(l,e,r,i,s,a),o&&o.removeChild(l)}}class qR extends Rr{constructor(){super(...arguments),this.type="title"}}class YR extends Rr{constructor(){super(...arguments),this.type="desc"}}var Pat={svg:U0,rect:gT,circle:CR,ellipse:xR,line:ER,polyline:pT,polygon:SR,path:cr,pattern:FR,marker:TR,defs:IR,linearGradient:_R,radialGradient:UR,stop:LR,animate:SC,animateColor:QR,animateTransform:NR,font:PR,"font-face":MR,"missing-glyph":kR,glyph:dT,text:dc,tspan:Mw,tref:OR,a:DR,textPath:RR,image:HR,g:EC,symbol:KR,style:vT,use:GR,mask:kw,clipPath:jR,filter:Ow,feDropShadow:$R,feMorphology:WR,feComposite:zR,feColorMatrix:wT,feGaussianBlur:XR,title:qR,desc:YR};function LQ(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function Mat(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?LQ(Object(e),!0).forEach(function(r){oT(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):LQ(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function kat(n,t){var e=document.createElement("canvas");return e.width=n,e.height=t,e}function Oat(n){return qF.apply(this,arguments)}function qF(){return qF=fc(function*(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=document.createElement("img");return t&&(e.crossOrigin="Anonymous"),new Promise((r,i)=>{e.onload=()=>{r(e)},e.onerror=(s,A,a,o,l)=>{i(l)},e.src=n})}),qF.apply(this,arguments)}class Ac{constructor(t){var{rootEmSize:e=12,emSize:r=12,createCanvas:i=Ac.createCanvas,createImage:s=Ac.createImage,anonymousCrossOrigin:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=t,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=r,this.createCanvas=i,this.createImage=this.bindCreateImage(s,A),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(t,e){return typeof e=="boolean"?(r,i)=>t(r,typeof i=="boolean"?i:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:t}=this;return t[t.length-1]}set emSize(t){var{emSizeStack:e}=this;e.push(t)}popEmSize(){var{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(t=>t.loaded)}isFontsLoaded(){return this.fonts.every(t=>t.loaded)}createDocumentElement(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){var e=t.nodeName.replace(/^[^:]+:/,""),r=Ac.elementTypes[e];return typeof r<"u"?new r(this,t):new BR(this,t)}createTextNode(t){return new Qat(this,t)}setViewBox(t){this.screen.setViewBox(Mat({document:this},t))}}Ac.createCanvas=kat;Ac.createImage=Oat;Ac.elementTypes=Pat;function QQ(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function Fu(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?QQ(Object(e),!0).forEach(function(r){oT(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):QQ(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}class Ru{constructor(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new Bb(r),this.screen=new Pw(t,r),this.options=r;var i=new Ac(this,r),s=i.createDocumentElement(e);this.document=i,this.documentElement=s}static from(t,e){var r=arguments;return fc(function*(){var i=r.length>2&&r[2]!==void 0?r[2]:{},s=new Bb(i),A=yield s.parse(e);return new Ru(t,A,i)})()}static fromString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new Bb(r),s=i.parseFromString(e);return new Ru(t,s,r)}fork(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ru.from(t,e,Fu(Fu({},this.options),r))}forkString(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ru.fromString(t,e,Fu(Fu({},this.options),r))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var t=arguments,e=this;return fc(function*(){var r=t.length>0&&t[0]!==void 0?t[0]:{};e.start(Fu({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},r)),yield e.ready(),e.stop()})()}start(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:e,screen:r,options:i}=this;r.start(e,Fu(Fu({enableRedraw:!0},i),t))}stop(){this.screen.stop()}resize(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(t,e,r)}}const Dat=Object.freeze(Object.defineProperty({__proto__:null,AElement:DR,AnimateColorElement:QR,AnimateElement:SC,AnimateTransformElement:NR,BoundingBox:la,CB1:VF,CB2:GF,CB3:jF,CB4:$F,Canvg:Ru,CircleElement:CR,ClipPathElement:jR,DefsElement:IR,DescElement:YR,Document:Ac,Element:Rr,EllipseElement:xR,FeColorMatrixElement:wT,FeCompositeElement:zR,FeDropShadowElement:$R,FeGaussianBlurElement:XR,FeMorphologyElement:WR,FilterElement:Ow,Font:ls,FontElement:PR,FontFaceElement:MR,GElement:EC,GlyphElement:dT,GradientElement:mT,ImageElement:HR,LineElement:ER,LinearGradientElement:_R,MarkerElement:TR,MaskElement:kw,Matrix:uT,MissingGlyphElement:kR,Mouse:dR,PSEUDO_ZERO:fd,Parser:Bb,PathElement:cr,PathParser:Ne,PatternElement:FR,Point:vi,PolygonElement:SR,PolylineElement:pT,Property:ue,QB1:WF,QB2:zF,QB3:XF,RadialGradientElement:UR,RectElement:gT,RenderedElement:nu,Rotate:vR,SVGElement:U0,SVGFontLoader:VR,Scale:wR,Screen:Pw,Skew:fT,SkewX:yR,SkewY:bR,StopElement:LR,StyleElement:vT,SymbolElement:KR,TRefElement:OR,TSpanElement:Mw,TextElement:dc,TextPathElement:RR,TitleElement:qR,Transform:Zh,Translate:mR,UnknownElement:BR,UseElement:GR,ViewPort:fR,compressSpaces:Fd,default:Ru,getSelectorSpecificity:uR,normalizeAttributeName:cR,normalizeColor:hR,parseExternalUrl:hT,presets:pat,toNumbers:Ws,trimLeft:oR,trimRight:lR,vectorMagnitude:HF,vectorsAngle:KF,vectorsRatio:eB},Symbol.toStringTag,{value:"Module"}));exports.PDF_PLUGIN_NAME=PQ.PDF_PLUGIN_NAME;exports.PDF_PLUGIN_TRIGGERS=PQ.PDF_PLUGIN_TRIGGERS;exports.AcApConvertToPdfCmd=WN;exports.AcApImportPdfCmd=bk;exports.AcApPdfConvertor=$N;exports.AcApPdfImportConvertor=yk;exports.createPdfPlugin=_V;
|