(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81353,(t,e,r)=>{},89308,88477,75954,43682,t=>{"use strict";var e,r,n,o,i,a,s,u,c,l,h,f,d,p,g,y,v,b,m,w,x,C,S,F,A,k,D,P,T,B,O,R,N,I,M,j,E,W,z,L,U,H,G,K,V,q,_,X,Z,J,Y,Q,$,tt,te,tr,tn,to,ti=function(t,e){return(ti=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function ta(t,e){function r(){this.constructor=t}ti(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var ts=function(){return(ts=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]>2],e+=th[(3&t[n])<<4|t[n+1]>>4],e+=th[(15&t[n+1])<<2|t[n+2]>>6],e+=th[63&t[n+2]];return r%3==2?e=e.substring(0,e.length-1)+"=":r%3==1&&(e=e.substring(0,e.length-2)+"=="),e},tg=function(t){var e,r,n,o,i,a=.75*t.length,s=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var c=new Uint8Array(a);for(e=0;e>4,c[u++]=(15&n)<<4|o>>2,c[u++]=(3&o)<<6|63&i;return c},ty=/^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i,tv=function(t){var e=t.trim(),r=e.substring(0,100).match(ty);if(!r)return tg(e);var n=r[0];return tg(e.substring(n.length))},tb=function(t){return t.charCodeAt(0)},tm=function(t,e){return tC(t.toString(16),e,"0").toUpperCase()},tw=function(t){return tm(t,2)},tx=function(t){return String.fromCharCode(t)},tC=function(t,e,r){for(var n="",o=0,i=e-t.length;o=55296&&n<=56319&&t.length>o&&(r=t.charCodeAt(o))>=56320&&r<=57343&&(i=2),[t.slice(e,e+i),i]},tB=function(t){for(var e=[],r=0,n=t.length;rr&&c(),a+=f,s+=d}}return c(),u},tN=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,tI=function(t){var e=t.match(tN);if(e){var r=e[1],n=e[2],o=e[3],i=e[4],a=e[5],s=e[6],u=e[7],c=void 0===u?"Z":u,l=e[8],h=e[9];return new Date(r+"-"+(void 0===n?"01":n)+"-"+(void 0===o?"01":o)+"T"+(void 0===i?"00":i)+":"+(void 0===a?"00":a)+":"+(void 0===s?"00":s)+("Z"===c?"Z":""+c+(void 0===l?"00":l)+":"+(void 0===h?"00":h)))}},tM=function(t,e){for(var r,n,o=0;o=2;){var i=t1(t[n++],t[n++],r);if(t$(i))if(t.length-n<2)o.push(65533);else{var a=t1(t[n++],t[n++],r);t0(a)?o.push(i,a):o.push(65533)}else t0(i)?(n+=2,o.push(65533)):o.push(i)}return n=55296&&t<=56319},t0=function(t){return t>=56320&&t<=57343},t1=function(t,e,r){if(r===R.LittleEndian)return e<<8|t;if(r===R.BigEndian)return t<<8|e;throw Error("Invalid byteOrder: "+r)},t2=function(t){return t5(t)?R.BigEndian:t4(t)?R.LittleEndian:R.BigEndian},t5=function(t){return 254===t[0]&&255===t[1]},t4=function(t){return 255===t[0]&&254===t[1]},t3=function(t){return t5(t)||t4(t)},t9=function(t){var e=String(t);if(1>Math.abs(t)){var r=parseInt(t.toString().split("e-")[1]);if(r){var n=t<0;n&&(t*=-1),t*=Math.pow(10,r-1),e="0."+Array(r).join("0")+t.toString().substring(2),n&&(e="-"+e)}}else{var r=parseInt(t.toString().split("+")[1]);r>20&&(r-=20,t/=Math.pow(10,r),e=t.toString()+Array(r+1).join("0"))}return e},t8=function(t){return Math.ceil(t.toString(2).length/8)},t6=function(t){for(var e=new Uint8Array(t8(t)),r=1;r<=e.length;r++)e[r-1]=t>>(e.length-r)*8;return e},t7=function(t){throw Error(t)},et=t.i(9643),ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",er=new Uint8Array(256),en=0;en>4,c[u++]=(15&n)<<4|o>>2,c[u++]=(3&o)<<6|63&i;return c},ei=function(t){for(var e="",r=0;rn)throw Error(eR(e)+" must be at least "+r+" and at most "+n+", but was actually "+t)},eG=function(t,e,r,n){ez(t,e,["number","undefined"]),"number"==typeof t&&eH(t,e,r,n)},eK=function(t,e,r){if(ez(t,e,["number"]),t%r!=0)throw Error(eR(e)+" must be a multiple of "+r+", but was actually "+t)},eV=function(t,e){if(!Number.isInteger(t))throw Error(eR(e)+" must be an integer, but was actually "+t)},eq=function(t,e){if(![1,0].includes(Math.sign(t)))throw Error(eR(e)+" must be a positive number or 0, but was actually "+t)},e_=new Uint16Array(256),eX=0;eX<256;eX++)e_[eX]=eX;e_[22]=tb("\x17"),e_[24]=tb("˘"),e_[25]=tb("ˇ"),e_[26]=tb("ˆ"),e_[27]=tb("˙"),e_[28]=tb("˝"),e_[29]=tb("˛"),e_[30]=tb("˚"),e_[31]=tb("˜"),e_[127]=tb("�"),e_[128]=tb("•"),e_[129]=tb("†"),e_[130]=tb("‡"),e_[131]=tb("…"),e_[132]=tb("—"),e_[133]=tb("–"),e_[134]=tb("ƒ"),e_[135]=tb("⁄"),e_[136]=tb("‹"),e_[137]=tb("›"),e_[138]=tb("−"),e_[139]=tb("‰"),e_[140]=tb("„"),e_[141]=tb("“"),e_[142]=tb("”"),e_[143]=tb("‘"),e_[144]=tb("’"),e_[145]=tb("‚"),e_[146]=tb("™"),e_[147]=tb("fi"),e_[148]=tb("fl"),e_[149]=tb("Ł"),e_[150]=tb("Œ"),e_[151]=tb("Š"),e_[152]=tb("Ÿ"),e_[153]=tb("Ž"),e_[154]=tb("ı"),e_[155]=tb("ł"),e_[156]=tb("œ"),e_[157]=tb("š"),e_[158]=tb("ž"),e_[159]=tb("�"),e_[160]=tb("€"),e_[173]=tb("�");var eZ=function(t){for(var e=Array(t.length),r=0,n=t.length;r=rp.ExclamationPoint&&u<=rp.Tilde&&!rS[u]?s:"#"+tw(u)}return n.encodedName=o,n}return ta(e,t),e.prototype.asBytes=function(){for(var t=[],e="",r=!1,n=function(e){void 0!==e&&t.push(e),r=!1},o=1,i=this.encodedName.length;o=rp.Zero&&s<=rp.Nine||s>=rp.a&&s<=rp.f||s>=rp.A&&s<=rp.F?2!==(e+=a).length&&(u>="0"&&u<="9"||u>="a"&&u<="f"||u>="A"&&u<="F")||(n(parseInt(e,16)),e=""):n(s):s===rp.Hash?r=!0:n(s)}return new Uint8Array(t)},e.prototype.decodeText=function(){var t=this.asBytes();return String.fromCharCode.apply(String,Array.from(t))},e.prototype.asString=function(){return this.encodedName},e.prototype.value=function(){return this.encodedName},e.prototype.clone=function(){return this},e.prototype.toString=function(){return this.encodedName},e.prototype.sizeInBytes=function(){return this.encodedName.length},e.prototype.copyBytesInto=function(t,e){return e+=tS(this.encodedName,t,e),this.encodedName.length},e.of=function(t){var r=t.replace(/#([\dABCDEF]{2})/g,function(t,e){return tx(parseInt(e,16))}),n=rk.get(r);return n||(n=new e(rA,r),rk.set(r,n)),n},e.Length=e.of("Length"),e.FlateDecode=e.of("FlateDecode"),e.Resources=e.of("Resources"),e.Font=e.of("Font"),e.XObject=e.of("XObject"),e.ExtGState=e.of("ExtGState"),e.Contents=e.of("Contents"),e.Type=e.of("Type"),e.Parent=e.of("Parent"),e.MediaBox=e.of("MediaBox"),e.Page=e.of("Page"),e.Annots=e.of("Annots"),e.TrimBox=e.of("TrimBox"),e.ArtBox=e.of("ArtBox"),e.BleedBox=e.of("BleedBox"),e.CropBox=e.of("CropBox"),e.Rotate=e.of("Rotate"),e.Title=e.of("Title"),e.Author=e.of("Author"),e.Subject=e.of("Subject"),e.Creator=e.of("Creator"),e.Keywords=e.of("Keywords"),e.Producer=e.of("Producer"),e.CreationDate=e.of("CreationDate"),e.ModDate=e.of("ModDate"),e}(ry);let rP=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.asNull=function(){return null},e.prototype.clone=function(){return this},e.prototype.toString=function(){return"null"},e.prototype.sizeInBytes=function(){return 4},e.prototype.copyBytesInto=function(t,e){return t[e++]=rp.n,t[e++]=rp.u,t[e++]=rp.l,t[e++]=rp.l,4},e}(ry));var rT=function(t){function e(e,r){var n=t.call(this)||this;return n.dict=e,n.context=r,n}return ta(e,t),e.prototype.keys=function(){return Array.from(this.dict.keys())},e.prototype.values=function(){return Array.from(this.dict.values())},e.prototype.entries=function(){return Array.from(this.dict.entries())},e.prototype.set=function(t,e){this.dict.set(t,e)},e.prototype.get=function(t,e){void 0===e&&(e=!1);var r=this.dict.get(t);if(r!==rP||e)return r},e.prototype.has=function(t){var e=this.dict.get(t);return void 0!==e&&e!==rP},e.prototype.lookupMaybe=function(t){for(var e,r=[],n=1;n>"},e.prototype.sizeInBytes=function(){for(var t=5,e=this.entries(),r=0,n=e.length;rthis.largestObjectNumber&&(this.largestObjectNumber=t.objectNumber)},t.prototype.nextRef=function(){return this.largestObjectNumber+=1,rI.of(this.largestObjectNumber)},t.prototype.register=function(t){var e=this.nextRef();return this.assign(e,t),e},t.prototype.delete=function(t){return this.indirectObjects.delete(t)},t.prototype.lookupMaybe=function(t){for(var e=[],r=1;r1?(this.subsections.push([t]),this.chunkIdx+=1,this.chunkLength=1):(e.push(t),this.chunkLength+=1)},t.create=function(){return new t({ref:rI.of(0,65535),offset:0,deleted:!0})},t.createEmpty=function(){return new t},t}(),rV=function(){function t(t){this.lastXRefOffset=String(t)}return t.prototype.toString=function(){return"startxref\n"+this.lastXRefOffset+"\n%%EOF"},t.prototype.sizeInBytes=function(){return 16+this.lastXRefOffset.length},t.prototype.copyBytesInto=function(t,e){var r=e;return t[e++]=rp.s,t[e++]=rp.t,t[e++]=rp.a,t[e++]=rp.r,t[e++]=rp.t,t[e++]=rp.x,t[e++]=rp.r,t[e++]=rp.e,t[e++]=rp.f,t[e++]=rp.Newline,e+=tS(this.lastXRefOffset,t,e),t[e++]=rp.Newline,t[e++]=rp.Percent,t[e++]=rp.Percent,t[e++]=rp.E,t[e++]=rp.O,t[e++]=rp.F,e-r},t.forLastCrossRefSectionOffset=function(e){return new t(e)},t}(),rq=function(){function t(t){this.dict=t}return t.prototype.toString=function(){return"trailer\n"+this.dict.toString()},t.prototype.sizeInBytes=function(){return 8+this.dict.sizeInBytes()},t.prototype.copyBytesInto=function(t,e){var r=e;return t[e++]=rp.t,t[e++]=rp.r,t[e++]=rp.a,t[e++]=rp.i,t[e++]=rp.l,t[e++]=rp.e,t[e++]=rp.r,t[e++]=rp.Newline,(e+=this.dict.copyBytesInto(t,e))-r},t.of=function(e){return new t(e)},t}(),r_=function(t){function e(e,r,n){void 0===n&&(n=!0);var o=t.call(this,e.obj({}),n)||this;return o.objects=r,o.offsets=o.computeObjectOffsets(),o.offsetsString=o.computeOffsetsString(),o.dict.set(rD.of("Type"),rD.of("ObjStm")),o.dict.set(rD.of("N"),rv.of(o.objects.length)),o.dict.set(rD.of("First"),rv.of(o.offsetsString.length)),o}return ta(e,t),e.prototype.getObjectsCount=function(){return this.objects.length},e.prototype.clone=function(t){return e.withContextAndObjects(t||this.dict.context,this.objects.slice(),this.encode)},e.prototype.getContentsString=function(){for(var t=this.offsetsString,e=0,r=this.objects.length;e1&&(t.push(e),t.push(i.ref.objectNumber),e=0),e+=1}return t.push(e),t},o.computeEntryTuples=function(){for(var t=Array(o.entries.length),e=0,r=o.entries.length;ee[0]&&(e[0]=c),l>e[1]&&(e[1]=l),h>e[2]&&(e[2]=h)}return e},o.entries=r||[],o.entryTuplesCache=eJ.populatedBy(o.computeEntryTuples),o.maxByteWidthsCache=eJ.populatedBy(o.computeMaxEntryByteWidths),o.indexCache=eJ.populatedBy(o.computeIndex),e.set(rD.of("Type"),rD.of("XRef")),o}return ta(e,t),e.prototype.addDeletedEntry=function(t,e){var r=j.Deleted;this.entries.push({type:r,ref:t,nextFreeObjectNumber:e}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},e.prototype.addUncompressedEntry=function(t,e){var r=j.Uncompressed;this.entries.push({type:r,ref:t,offset:e}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},e.prototype.addCompressedEntry=function(t,e,r){var n=j.Compressed;this.entries.push({type:n,ref:t,objectStreamRef:e,index:r}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},e.prototype.clone=function(t){var r=this.dict,n=this.entries,o=this.encode;return e.of(r.clone(t),n.slice(),o)},e.prototype.getContentsString=function(){for(var t=this.entryTuplesCache.access(),e=this.maxByteWidthsCache.access(),r="",n=0,o=t.length;n=0;f--)r+=(c[f]||0).toString(2);for(var f=e[1]-1;f>=0;f--)r+=(l[f]||0).toString(2);for(var f=e[2]-1;f>=0;f--)r+=(h[f]||0).toString(2)}return r},e.prototype.getUnencodedContents=function(){for(var t=this.entryTuplesCache.access(),e=this.maxByteWidthsCache.access(),r=new Uint8Array(this.getUnencodedContentsSize()),n=0,o=0,i=t.length;o=0;d--)r[n++]=l[d]||0;for(var d=e[1]-1;d>=0;d--)r[n++]=h[d]||0;for(var d=e[2]-1;d>=0;d--)r[n++]=f[d]||0}return r},e.prototype.getUnencodedContentsSize=function(){return tK(this.maxByteWidthsCache.access())*this.entries.length},e.prototype.updateDict=function(){t.prototype.updateDict.call(this);var e=this.maxByteWidthsCache.access(),r=this.indexCache.access(),n=this.dict.context;this.dict.set(rD.of("W"),n.obj(e)),this.dict.set(rD.of("Index"),n.obj(r))},e.create=function(t,r){void 0===r&&(r=!0);var n=new e(t,[],r);return n.addDeletedEntry(rI.of(0,65535),0),n},e.of=function(t,r,n){return void 0===n&&(n=!0),new e(t,r,n)},e}(rE),rY=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.encodeStreams=n,i.objectsPerStream=o,i}return ta(e,t),e.prototype.computeBufferSize=function(){return tu(this,void 0,void 0,function(){var t,e,r,n,o,i,a,s,u,c,l,h,f,d,p,g,y,v,b;return tc(this,function(m){switch(m.label){case 0:t=this.context.largestObjectNumber+1,r=(e=rg.forVersion(1,7)).sizeInBytes()+2,n=rJ.create(this.createTrailerDict(),this.encodeStreams),o=[],i=[],a=[],s=this.context.enumerateIndirectObjects(),u=0,c=s.length,m.label=1;case 1:if(!(u"},e.prototype.sizeInBytes=function(){return this.value.length+2},e.prototype.copyBytesInto=function(t,e){return t[e++]=rp.LessThan,e+=tS(this.value,t,e),t[e++]=rp.GreaterThan,this.value.length+2},e.of=function(t){return new e(t)},e.fromText=function(t){for(var r=tZ(t),n="",o=0,i=r.length;o> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n"+t.length+" beginbfchar\n"+t.map(function(t){return t[0]+" "+t[1]}).join("\n")+"\nendbfchar\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},r2=function(){for(var t=[],e=0;e"},r5=function(t){return tm(t,4)},r4=function(t){if(t>=0&&t<=65535)return r5(t);if(t>=65536&&t<=1114111){var e=tJ(t),r=tY(t);return""+r5(e)+r5(r)}throw Error("0x"+tw(t)+" is not a valid UTF-8 or UTF-16 codepoint.")},r3=function(t){var e=0,r=function(t){e|=1<=rp.Zero&&s<=rp.Seven?3!==(e+=a).length&&u>="0"&&u<="7"||(n(parseInt(e,8)),e=""):n(s):s===rp.BackSlash?r=!0:n(s)}return new Uint8Array(t)},e.prototype.decodeText=function(){var t=this.asBytes();return t3(t)?tQ(t):eZ(t)},e.prototype.decodeDate=function(){var t=this.decodeText(),e=tI(t);if(!e)throw new e9(t);return e},e.prototype.asString=function(){return this.value},e.prototype.clone=function(){return e.of(this.value)},e.prototype.toString=function(){return"("+this.value+")"},e.prototype.sizeInBytes=function(){return this.value.length+2},e.prototype.copyBytesInto=function(t,e){return t[e++]=rp.LeftParen,e+=tS(this.value,t,e),t[e++]=rp.RightParen,this.value.length+2},e.of=function(t){return new e(t)},e.fromDate=function(t){return new e("D:"+tC(String(t.getUTCFullYear()),4,"0")+tC(String(t.getUTCMonth()+1),2,"0")+tC(String(t.getUTCDate()),2,"0")+tC(String(t.getUTCHours()),2,"0")+tC(String(t.getUTCMinutes()),2,"0")+tC(String(t.getUTCSeconds()),2,"0")+"Z")},e}(ry),r6=function(){function t(t,e,r,n){var o=this;this.allGlyphsInFontSortedById=function(){for(var t=Array(o.font.characterSet.length),e=0,r=t.length;e>3)]>>7-(7&f)&1,k=3*A;a[b]=m[k],a[b+1]=m[k+1],a[b+2]=m[k+2],a[b+3]=A>2)]>>6-((3&f)<<1)&3,k=3*A;a[b]=m[k],a[b+1]=m[k+1],a[b+2]=m[k+2],a[b+3]=A>1)]>>4-((1&f)<<2)&15,k=3*A;a[b]=m[k],a[b+1]=m[k+1],a[b+2]=m[k+2],a[b+3]=A>>3)]>>>7-(7&O)&1),R=255*(P!=255*g);s[B+O]=R<<24|P<<16|P<<8|P}else if(2==c)for(var O=0;O>>2)]>>>6-((3&O)<<1)&3),R=255*(P!=85*g);s[B+O]=R<<24|P<<16|P<<8|P}else if(4==c)for(var O=0;O>>1)]>>>4-((1&O)<<2)&15),R=255*(P!=17*g);s[B+O]=R<<24|P<<16|P<<8|P}else if(8==c)for(var O=0;O>>2<<3));0==i;){if(i=y(t,p,1),a=y(t,p+1,2),p+=3,0==a){(7&p)!=0&&(p+=8-(7&p));var F=(p>>>3)+4,A=t[F-4]|t[F-3]<<8;S&&(e=c.H.W(e,d+A)),e.set(new o(t.buffer,t.byteOffset+F,A),d),p=F+A<<3,d+=A;continue}if(S&&(e=c.H.W(e,d+131072)),1==a&&(r=C.J,n=C.h,h=511,f=31),2==a){s=v(t,p,5)+257,u=v(t,p+5,5)+1,l=v(t,p+10,4)+4,p+=14;for(var k=1,D=0;D<38;D+=2)C.Q[D]=0,C.Q[D+1]=0;for(var D=0;Dk&&(k=P)}p+=3*l,m(C.Q,k),w(C.Q,k,C.u),r=C.w,n=C.d,p=b(C.u,(1<>>4;if(R>>>8==0)e[d++]=R;else if(256==R)break;else{var N=d+R-254;if(R>264){var I=C.q[R-257];N=d+(I>>>3)+v(t,p,7&I),p+=7&I}var M=n[x(t,p)&f];p+=15&M;var j=M>>>4,E=C.c[j],W=(E>>>4)+y(t,p,15&E);for(p+=15&E;d>>4;if(h<=15)i[u]=h,u++;else{var f=0,d=0;16==h?(d=3+a(n,o,2),o+=2,f=i[u-1]):17==h?(d=3+a(n,o,3),o+=3):18==h&&(d=11+a(n,o,7),o+=7);for(var p=u+d;u>>1;io&&(o=s),i++}for(;i>1,s=t[i+1],u=a<<4|s,l=e-s,h=t[i]<>>15-e]=u,h++},c.H.l=function(t,e){for(var r=c.H.m.r,n=15-e,o=0;o>>n}},c.H.M=function(t,e,r){r<<=7&e;var n=e>>>3;t[n]|=r,t[n+1]|=r>>>8},c.H.I=function(t,e,r){r<<=7&e;var n=e>>>3;t[n]|=r,t[n+1]|=r>>>8,t[n+2]|=r>>>16},c.H.e=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(7&e)&(1<>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(7&e)&(1<>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(7&e)},c.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(7&e)},c.H.m=(l=Uint16Array,h=Uint32Array,{K:new l(16),j:new l(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[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],q:new l(32),p:[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,65535,65535],z:[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],c:new h(32),J:new l(512),_:[],h:new l(32),$:[],w:new l(32768),C:[],v:[],d:new l(32768),D:[],u:new l(512),Q:[],r:new l(32768),s:new h(286),Y:new h(30),a:new h(19),t:new h(15e3),k:new l(65536),g:new l(32768)}),function(){for(var t=c.H.m,e=0;e<32768;e++){var r=e;r=(0xff00ff00&(r=(0xf0f0f0f0&(r=(0xcccccccc&(r=(0xaaaaaaaa&r)>>>1|(0x55555555&r)<<1))>>>2|(0x33333333&r)<<2))>>>4|(0xf0f0f0f&r)<<4))>>>8|(0xff00ff&r)<<8,t.r[e]=(r>>>16|r<<16)>>>17}function n(t,e,r){for(;0!=e--;)t.push(0,r)}for(var e=0;e<32;e++)t.q[e]=t.S[e]<<3|t.T[e],t.c[e]=t.p[e]<<4|t.z[e];n(t._,144,8),n(t._,112,9),n(t._,24,7),n(t._,8,8),c.H.n(t._,9),c.H.A(t._,9,t.J),c.H.l(t._,9),n(t.$,32,5),c.H.n(t.$,5),c.H.A(t.$,5,t.h),c.H.l(t.$,5),n(t.Q,19,0),n(t.C,286,0),n(t.D,30,0),n(t.v,320,0)}(),no.inflateRaw=c.H.N,no.decode._readInterlace=function(t,e){for(var r=e.width,n=e.height,o=no.decode._getBPP(e),i=o>>3,a=Math.ceil(r*o/8),s=new Uint8Array(n*a),u=0,c=[0,0,4,0,2,0,1],l=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],f=[8,8,4,4,2,2,1],d=0;d<7;){for(var p=h[d],g=f[d],y=0,v=0,b=c[d];b>3];A=A>>7-(7&F)&1,s[C*a+(S>>3)]|=A<<7-(7&S)}if(2==o){var A=t[F>>3];A=A>>6-(7&F)&3,s[C*a+(S>>2)]|=A<<6-((3&S)<<1)}if(4==o){var A=t[F>>3];A=A>>4-(7&F)&15,s[C*a+(S>>1)]|=A<<4-((1&S)<<2)}if(o>=8)for(var k=C*a+S*i,D=0;D>3)+D];F+=o,S+=g}x++,C+=p}y*v!=0&&(u+=v*(1+w)),d+=1}return s},no.decode._getBPP=function(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth},no.decode._filterZero=function(t,e,r,n,o){var i=no.decode._getBPP(e),a=Math.ceil(n*i/8),s=no.decode._paeth;i=Math.ceil(i/8);var u=0,c=1,l=t[r],h=0;if(l>1&&(t[r]=[0,0,1][l-2]),3==l)for(h=i;h>>1)&255;for(var f=0;f>>1);for(;h>>1)}else{for(;h>8&255,t[e+1]=255&r},readUint:function(t,e){return 0x1000000*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3])},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},readASCII:function(t,e,r){for(var n="",o=0;o=0&&s>=0?(h=d*e+p<<2,f=(s+d)*o+a+p<<2):(h=(-s+d)*e-a+p<<2,f=d*o+p<<2),0==u)n[f]=t[h],n[f+1]=t[h+1],n[f+2]=t[h+2],n[f+3]=t[h+3];else if(1==u){var g=t[h+3]*(1/255),y=t[h]*g,v=t[h+1]*g,b=t[h+2]*g,m=n[f+3]*(1/255),w=n[f]*m,x=n[f+1]*m,C=n[f+2]*m,S=1-g,F=g+m*S,A=0==F?0:1/F;n[f+3]=255*F,n[f+0]=(y+w*S)*A,n[f+1]=(v+x*S)*A,n[f+2]=(b+C*S)*A}else if(2==u){var g=t[h+3],y=t[h],v=t[h+1],b=t[h+2],m=n[f+3],w=n[f],x=n[f+1],C=n[f+2];g==m&&y==w&&v==x&&b==C?(n[f]=0,n[f+1]=0,n[f+2]=0,n[f+3]=0):(n[f]=y,n[f+1]=v,n[f+2]=b,n[f+3]=g)}else if(3==u){var g=t[h+3],y=t[h],v=t[h+1],b=t[h+2],m=n[f+3],w=n[f],x=n[f+1],C=n[f+2];if(g==m&&y==w&&v==x&&b==C)continue;if(g<220&&m>20)return!1}return!0},no.encode=function(t,e,r,n,o,i,a){null==n&&(n=0),null==a&&(a=!1);var s=no.encode.compress(t,e,r,n,[!1,!1,!1,0,a]);return no.encode.compressPNG(s,-1),no.encode._main(s,e,r,o,i)},no.encodeLL=function(t,e,r,n,o,i,a,s){var u={ctype:0+2*(1!=n)+4*(0!=o),depth:i,frames:[]};Date.now();for(var c=(n+o)*i,l=c*e,h=0;h1,h=!1,f=33+20*!!l;if(null!=o.sRGB&&(f+=13),null!=o.pHYs&&(f+=21),3==t.ctype){for(var d=t.plte.length,p=0;p>>24!=255&&(h=!0);f+=8+3*d+4+(h?8+ +d+4:0)}for(var g=0;g>>8&255,S=w>>>16&255;v[c+m+0]=x,v[c+m+1]=C,v[c+m+2]=S}if(a(v,c+=3*d,i(v,c-3*d-4,3*d+4)),c+=4,h){a(v,c,d),u(v,c+=4,"tRNS"),c+=4;for(var p=0;p>>24&255;a(v,c+=d,i(v,c-d-4,d+4)),c+=4}}for(var F=0,g=0;g>2,P>>2));for(var d=0;dO&&N==B[y-O])R[y]=R[y-O];else{var I=m[N];if(null==I&&(m[N]=I=w.length,w.push(N),w.length>=300))break;R[y]=I}}}var M=w.length;M<=256&&!1==c&&(h=Math.max(h=M<=2?1:M<=4?2:M<=16?4:8,u));for(var d=0;d>1)]|=U[G+K]<<4-(1&K)*4;else if(2==h)for(var K=0;K>2)]|=U[G+K]<<6-(3&K)*2;else if(1==h)for(var K=0;K>3)]|=U[G+K]<<7-(7&K)*1}E=L,l=3,z=1}else if(!1==v&&1==b.length){for(var L=new Uint8Array(O*j*3),V=O*j,y=0;yF&&(F=D),kA&&(A=k))}-1==F&&(C=S=F=A=0),o&&((1&C)==1&&C--,(1&S)==1&&S--);var T=(F-C+1)*(A-S+1);Ty&&(y=w),xv&&(v=x))}-1==y&&(p=g=y=v=0),a&&((1&p)==1&&p--,(1&g)==1&&g--),i={x:p,y:g,width:y-p+1,height:v-g+1};var F=n[o];F.rect=i,F.blend=1,F.img=new Uint8Array(i.width*i.height*4),0==n[o-1].dispose?(no._copyTile(c,e,r,F.img,i.width,i.height,-i.x,-i.y,0),no.encode._prepareDiff(f,e,r,F.img,i)):no._copyTile(f,e,r,F.img,i.width,i.height,-i.x,-i.y,0)},no.encode._prepareDiff=function(t,e,r,n,o){no._copyTile(t,e,r,n,o.width,o.height,-o.x,-o.y,2)},no.encode._filterZero=function(t,e,r,n,o,i,a){var s=[],u=[0,1,2,3,4];-1!=i?u=[i]:(e*n>5e5||1==r)&&(u=[0]),a&&(f={level:0});for(var c=a&&null!=UZIP?UZIP:et.default,l=0;l>1)+256&255;if(4==i)for(var c=o;c>1)&255;for(var c=o;c>1)&255}if(4==i){for(var c=0;c>>1:r>>>=1;t[e]=r}return t}(),update:function(t,e,r,n){for(var o=0;o>>8;return t},crc:function(t,e,r){return 0xffffffff^no.crc.update(0xffffffff,t,e,r)}},no.quantize=function(t,e){var r=new Uint8Array(t),n=r.slice(0),o=new Uint32Array(n.buffer),i=no.quantize.getKDtree(n,e),a=i[0],s=i[1];no.quantize.planeDst;for(var u=r.length,c=new Uint8Array(r.length>>2),l=0;l>2]=g.ind,o[l>>2]=g.est.rgba}return{abuf:n.buffer,inds:c,plte:s}},no.quantize.getKDtree=function(t,e,r){null==r&&(r=1e-4);var n=new Uint32Array(t.buffer),o={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};o.bst=no.quantize.stats(t,o.i0,o.i1),o.est=no.quantize.estats(o.bst);for(var i=[o];i.lengtha&&(a=i[u].est.L,s=u);if(a=l||c.i1<=l){c.est.L=0;continue}var h={i0:c.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};h.bst=no.quantize.stats(t,h.i0,h.i1),h.est=no.quantize.estats(h.bst);var f={i0:l,i1:c.i1,bst:null,est:null,tdst:0,left:null,right:null};f.bst={R:[],m:[],N:c.bst.N-h.bst.N};for(var u=0;u<16;u++)f.bst.R[u]=c.bst.R[u]-h.bst.R[u];for(var u=0;u<4;u++)f.bst.m[u]=c.bst.m[u]-h.bst.m[u];f.est=no.quantize.estats(f.bst),c.left=h,c.right=f,i[s]=h,i.push(f)}i.sort(function(t,e){return e.bst.N-t.bst.N});for(var u=0;u0&&(a=t.right,s=t.left);var u=no.quantize.getNearest(a,e,r,n,o);if(u.tdst<=i*i)return u;var c=no.quantize.getNearest(s,e,r,n,o);return c.tdsti;)n-=4;if(r>=n)break;var s=e[r>>2];e[r>>2]=e[n>>2],e[n>>2]=s,r+=4,n-=4}for(;a(t,r,o)>i;)r-=4;return r+4},no.quantize.vecDot=function(t,e,r){return t[e]*r[0]+t[e+1]*r[1]+t[e+2]*r[2]+t[e+3]*r[3]},no.quantize.stats=function(t,e,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=[0,0,0,0],i=e;i>2}},no.quantize.estats=function(t){var e=t.R,r=t.m,n=t.N,o=r[0],i=r[1],a=r[2],s=r[3],u=0==n?0:1/n,c=[e[0]-o*o*u,e[1]-o*i*u,e[2]-o*a*u,e[3]-o*s*u,e[4]-i*o*u,e[5]-i*i*u,e[6]-i*a*u,e[7]-i*s*u,e[8]-a*o*u,e[9]-a*i*u,e[10]-a*a*u,e[11]-a*s*u,e[12]-s*o*u,e[13]-s*i*u,e[14]-s*a*u,e[15]-s*s*u],l=no.M4,h=[.5,.5,.5,.5],f=0,d=0;if(0!=n)for(var p=0;p<10&&(h=l.multVec(c,h),d=Math.sqrt(l.dot(h,h)),h=l.sml(1/d,h),!(1e-9>Math.abs(d-f)));p++)f=d;var g=[o*u,i*u,a*u,s*u],y=l.dot(l.sml(255,g),h);return{Cov:c,q:g,e:h,L:f,eMq255:y,eMq:l.dot(h,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|(0|Math.round(255*g[0])))>>>0}},no.M4={multVec:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]]},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},sml:function(t,e){return[t*e[0],t*e[1],t*e[2],t*e[3]]}},no.encode.concatRGBA=function(t){for(var e=0,r=0;r1)throw Error("Animated PNGs are not supported");var n=na(new Uint8Array(r[0])),o=n.rgbChannel,i=n.alphaChannel;this.rgbChannel=o,i.some(function(t){return t<255})&&(this.alphaChannel=i),this.type=ni(e.ctype),this.width=e.width,this.height=e.height,this.bitsPerComponent=8}return t.load=function(e){return new t(e)},t}(),nu=function(){function t(t){this.image=t,this.bitsPerComponent=t.bitsPerComponent,this.width=t.width,this.height=t.height,this.colorSpace="DeviceRGB"}return t.for=function(e){return tu(this,void 0,void 0,function(){return tc(this,function(r){return[2,new t(ns.load(e))]})})},t.prototype.embedIntoContext=function(t,e){return tu(this,void 0,void 0,function(){var r,n;return tc(this,function(o){return(r=this.embedAlphaChannel(t),n=t.flateStream(this.image.rgbChannel,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:r}),e)?(t.assign(e,n),[2,e]):[2,t.register(n)]})})},t.prototype.embedAlphaChannel=function(t){if(this.image.alphaChannel){var e=t.flateStream(this.image.alphaChannel,{Type:"XObject",Subtype:"Image",Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:"DeviceGray",Decode:[0,1]});return t.register(e)}},t}(),nc=function(){function t(t,e,r){this.bytes=t,this.start=e||0,this.pos=this.start,this.end=e&&r?e+r:this.bytes.length}return Object.defineProperty(t.prototype,"length",{get:function(){return this.end-this.start},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),t.prototype.getByte=function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},t.prototype.getUint16=function(){var t=this.getByte(),e=this.getByte();return -1===t||-1===e?-1:(t<<8)+e},t.prototype.getInt32=function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},t.prototype.getBytes=function(t,e){void 0===e&&(e=!1);var r=this.bytes,n=this.pos,o=this.end;if(t){var i=n+t;i>o&&(i=o),this.pos=i;var a=r.subarray(n,i);return e?new Uint8ClampedArray(a):a}var a=r.subarray(n,o);return e?new Uint8ClampedArray(a):a},t.prototype.peekByte=function(){var t=this.getByte();return this.pos--,t},t.prototype.peekBytes=function(t,e){void 0===e&&(e=!1);var r=this.getBytes(t,e);return this.pos-=r.length,r},t.prototype.skip=function(t){t||(t=1),this.pos+=t},t.prototype.reset=function(){this.pos=this.start},t.prototype.moveStart=function(){this.start=this.pos},t.prototype.makeSubStream=function(e,r){return new t(this.bytes,e,r)},t.prototype.decode=function(){return this.bytes},t}(),nl=new Uint8Array(0),nh=function(){function t(t){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=nl,this.minBufferLength=512,t)for(;this.minBufferLengtho&&(r=o)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}this.pos=r;var i=this.buffer.subarray(n,r);return!e||i instanceof Uint8ClampedArray?i:new Uint8ClampedArray(i)},t.prototype.peekByte=function(){var t=this.getByte();return this.pos--,t},t.prototype.peekBytes=function(t,e){void 0===e&&(e=!1);var r=this.getBytes(t,e);return this.pos-=r.length,r},t.prototype.skip=function(t){t||(t=1),this.pos+=t},t.prototype.reset=function(){this.pos=0},t.prototype.makeSubStream=function(t,e){for(var r=t+e;this.bufferLength<=r&&!this.eof;)this.readBlock();return new nc(this.buffer,t,e)},t.prototype.decode=function(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)},t.prototype.readBlock=function(){throw new eY(this.constructor.name,"readBlock")},t.prototype.ensureBuffer=function(t){var e=this.buffer;if(t<=e.byteLength)return e;for(var r=this.minBufferLength;r=0;--e)t[o+e]=255&a,a>>=8}},e}(nh),np=function(t){function e(e,r){var n=t.call(this,r)||this;return n.stream=e,n.firstDigit=-1,r&&(r*=.5),n}return ta(e,t),e.prototype.readBlock=function(){var t=this.stream.getBytes(8e3);if(!t.length){this.eof=!0;return}for(var e=t.length+1>>1,r=this.ensureBuffer(this.bufferLength+e),n=this.bufferLength,o=this.firstDigit,i=0,a=t.length;i=48&&s<=57)u=15&s;else if(s>=65&&s<=70||s>=97&&s<=102)u=(15&s)+9;else{if(62!==s)continue;this.eof=!0;break}o<0?o=u:(r[n++]=o<<4|u,o=-1)}o>=0&&this.eof&&(r[n++]=o<<4,o=-1),this.firstDigit=o,this.bufferLength=n},e}(nh),ng=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ny=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),nv=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),nb=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],nm=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],nw=function(t){function e(e,r){var n=t.call(this,r)||this;n.stream=e;var o=e.getByte(),i=e.getByte();if(-1===o||-1===i)throw Error("Invalid header in flate stream: "+o+", "+i);if((15&o)!=8)throw Error("Unknown compression method in flate stream: "+o+", "+i);if(((o<<8)+i)%31!=0)throw Error("Bad FCHECK in flate stream: "+o+", "+i);if(32&i)throw Error("FDICT bit set in flate stream: "+o+", "+i);return n.codeSize=0,n.codeBuf=0,n}return ta(e,t),e.prototype.readBlock=function(){var t,e,r,n,o=this.stream,i=this.getBits(3);if(1&i&&(this.eof=!0),0==(i>>=1)){var a=void 0;if(-1===(a=o.getByte()))throw Error("Bad block header in flate stream");var s=a;if(-1===(a=o.getByte())||(s|=a<<8,-1===(a=o.getByte())))throw Error("Bad block header in flate stream");var u=a;if(-1===(a=o.getByte()))throw Error("Bad block header in flate stream");if((u|=a<<8)!=(65535&~s)&&(0!==s||0!==u))throw Error("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var c=this.bufferLength;t=this.ensureBuffer(c+s);var l=c+s;if(this.bufferLength=l,0===s)-1===o.peekByte()&&(this.eof=!0);else for(var h=c;h0;)m[y++]=C}r=this.generateHuffmanTable(m.subarray(0,f)),n=this.generateHuffmanTable(m.subarray(f,b))}else throw Error("Unknown block type in flate stream");for(var A=(t=this.buffer)?t.length:0,k=this.bufferLength;;){var D=this.getCode(r);if(D<256){k+1>=A&&(A=(t=this.ensureBuffer(k+1)).length),t[k++]=D;continue}if(256===D){this.bufferLength=k;return}D-=257;var P=(D=ny[D])>>16;P>0&&(P=this.getBits(P)),e=(65535&D)+P,(P=(D=nv[D=this.getCode(n)])>>16)>0&&(P=this.getBits(P));var T=(65535&D)+P;k+e>=A&&(A=(t=this.ensureBuffer(k+e)).length);for(var B=0;B>t,this.codeSize=n-=t,e},e.prototype.getCode=function(t){for(var e,r=this.stream,n=t[0],o=t[1],i=this.codeSize,a=this.codeBuf;i>16;if(u<1||i>u,this.codeSize=i-u,65535&s},e.prototype.generateHuffmanTable=function(t){var e,r=t.length,n=0;for(e=0;en&&(n=t[e]);for(var o=1<>=1;for(e=l;e0;if(!v||v<256)f[0]=v,d=1;else if(v>=258)if(v=0;e--)f[e]=s[r],r=c[r];else f[d++]=f[0];else if(256===v){l=9,a=258,d=0;continue}else{this.eof=!0,delete this.lzwState;break}if(b&&(c[a]=h,u[a]=u[h]+1,s[a]=f[0],l=++a+i&a+i-1?l:0|Math.min(Math.log(a+i)/.6931471805599453+1,12)),h=v,n<(p+=d)){do n+=512;while(n>>e&(1<0){var o=this.stream.getBytes(n);t.set(o,r),r+=n}}else{n=257-n;var i=e[1];t=this.ensureBuffer(r+n+1);for(var a=0;ae.size())throw new e7(t,0,e.size());e.remove(t)}else{if(0!==t)throw new e7(t,0,0);this.setKids([])}},e.prototype.normalizedEntries=function(){var t=this.Kids();return t||(t=this.dict.context.obj([this.ref]),this.dict.set(rD.of("Kids"),t)),{Kids:t}},e.fromDict=function(t,r){return new e(t,r)},e}(nB),nj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.Opt=function(){return this.dict.lookupMaybe(rD.of("Opt"),r8,rQ,rb)},e.prototype.setOpt=function(t){this.dict.set(rD.of("Opt"),this.dict.context.obj(t))},e.prototype.getExportValues=function(){var t=this.Opt();if(t){if(t instanceof r8||t instanceof rQ)return[t];for(var e=[],r=0,n=t.size();re.size())throw new e7(t,0,e.size());e.remove(t)}},e.prototype.normalizeExportValues=function(){for(var t,e,r,n,o=null!=(t=this.getExportValues())?t:[],i=[],a=this.getWidgets(),s=0,u=a.length;sV,"AcroChoiceFlags",()=>_,"AcroFieldFlags",()=>K,"AcroTextFlags",()=>q],76336);var nz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.setValues=function(t){if(this.hasFlag(_.Combo)&&!this.hasFlag(_.Edit)&&!this.valuesAreValid(t))throw new rt;if(0===t.length&&this.dict.delete(rD.of("V")),1===t.length&&this.dict.set(rD.of("V"),t[0]),t.length>1){if(!this.hasFlag(_.MultiSelect))throw new re;this.dict.set(rD.of("V"),this.dict.context.obj(t))}this.updateSelectedIndices(t)},e.prototype.valuesAreValid=function(t){for(var e=this.getOptions(),r=0,n=t.length;r1){for(var e=Array(t.length),r=this.getOptions(),n=0,o=t.length;n0){var i=o.lookup(0,r8,rQ),a=o.lookupMaybe(1,r8,rQ);e.push({value:i,display:a||i})}}return e}return[]},e}(nM),nL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.fromDict=function(t,r){return new e(t,r)},e.create=function(t){var r=t.obj({FT:"Ch",Ff:_.Combo,Kids:[]}),n=t.register(r);return new e(r,n)},e}(nz),nU=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.addField=function(t){var e=this.normalizedEntries().Kids;null==e||e.push(t)},e.prototype.normalizedEntries=function(){var t=this.Kids();return t||(t=this.dict.context.obj([]),this.dict.set(rD.of("Kids"),t)),{Kids:t}},e.fromDict=function(t,r){return new e(t,r)},e.create=function(t){var r=t.obj({}),n=t.register(r);return new e(r,n)},e}(nB),nH=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.fromDict=function(t,r){return new e(t,r)},e}(nM),nG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.MaxLen=function(){var t=this.dict.lookup(rD.of("MaxLen"));if(t instanceof rv)return t},e.prototype.Q=function(){var t=this.dict.lookup(rD.of("Q"));if(t instanceof rv)return t},e.prototype.setMaxLength=function(t){this.dict.set(rD.of("MaxLen"),rv.of(t))},e.prototype.removeMaxLength=function(){this.dict.delete(rD.of("MaxLen"))},e.prototype.getMaxLength=function(){var t;return null==(t=this.MaxLen())?void 0:t.asNumber()},e.prototype.setQuadding=function(t){this.dict.set(rD.of("Q"),rv.of(t))},e.prototype.getQuadding=function(){var t;return null==(t=this.Q())?void 0:t.asNumber()},e.prototype.setValue=function(t){this.dict.set(rD.of("V"),t)},e.prototype.removeValue=function(){this.dict.delete(rD.of("V"))},e.prototype.getValue=function(){var t=this.V();if(t instanceof r8||t instanceof rQ)return t},e.fromDict=function(t,r){return new e(t,r)},e.create=function(t){var r=t.obj({FT:"Tx",Kids:[]}),n=t.register(r);return new e(r,n)},e}(nM),nK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.fromDict=function(t,r){return new e(t,r)},e.create=function(t){var r=t.obj({FT:"Btn",Ff:V.PushButton,Kids:[]}),n=t.register(r);return new e(r,n)},e}(nj),nV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ta(e,t),e.prototype.setValue=function(t){if(!this.getOnValues().includes(t)&&t!==rD.of("Off"))throw new rt;this.dict.set(rD.of("V"),t);for(var e=this.getWidgets(),r=0,n=e.length;rnX,"createPDFAcroFields",()=>n_],49551);var n2=function(){function t(t){this.dict=t}return t.prototype.Fields=function(){var t=this.dict.lookup(rD.of("Fields"));if(t instanceof rb)return t},t.prototype.getFields=function(){for(var t=this.normalizedEntries().Fields,e=Array(t.size()),r=0,n=t.size();ro)throw new e8(r,o);for(var i=r,a=0,s=n.size();ai)return c.insertLeafNode(t,i)||u;else i-=c.Count().asNumber();c instanceof rH&&(i-=1)}if(0===i)return void this.insertLeafKid(n.size(),t);throw new e6(r,"insertLeafNode")},e.prototype.removeLeafNode=function(t,r){void 0===r&&(r=!0);var n=this.Kids(),o=this.Count().asNumber();if(t>=o)throw new e8(t,o);for(var i=t,a=0,s=n.size();ai){c.removeLeafNode(i,r),r&&0===c.Kids().size()&&n.remove(a);return}else i-=c.Count().asNumber();if(c instanceof rH)if(0===i)return void this.removeKid(a);else i-=1}throw new e6(t,"removeLeafNode")},e.prototype.ascend=function(t){t(this);var e=this.Parent();e&&e.ascend(t)},e.prototype.traverse=function(t){for(var r=this.Kids(),n=0,o=r.size();nNumber.MAX_SAFE_INTEGER)if(this.capNumbers){var n="Parsed number that is too large for some PDF readers: "+t+", using Number.MAX_SAFE_INTEGER instead.";return console.warn(n),Number.MAX_SAFE_INTEGER}else{var n="Parsed number that is too large for some PDF readers: "+t+", not capping.";console.warn(n)}return r},t.prototype.skipWhitespace=function(){for(;!this.bytes.done()&&rC[this.bytes.peek()];)this.bytes.next()},t.prototype.skipLine=function(){for(;!this.bytes.done();){var t=this.bytes.peek();if(t===n7||t===ot)return;this.bytes.next()}},t.prototype.skipComment=function(){if(this.bytes.peek()!==rp.Percent)return!1;for(;!this.bytes.done();){var t=this.bytes.peek();if(t===n7||t===ot)break;this.bytes.next()}return!0},t.prototype.skipWhitespaceAndComments=function(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()},t.prototype.matchKeyword=function(t){for(var e=this.bytes.offset(),r=0,n=t.length;r=this.length},t.prototype.offset=function(){return this.idx},t.prototype.slice=function(t,e){return this.bytes.slice(t,e)},t.prototype.position=function(){return{line:this.line,column:this.column,offset:this.idx}},t.of=function(e){return new t(e)},t.fromPDFRawStream=function(e){return t.of(nF(e).decode())},t}(),on=rp.Space,oo=rp.CarriageReturn,oi=rp.Newline,oa=[rp.s,rp.t,rp.r,rp.e,rp.a,rp.m],os=[rp.e,rp.n,rp.d,rp.s,rp.t,rp.r,rp.e,rp.a,rp.m],ou={header:[rp.Percent,rp.P,rp.D,rp.F,rp.Dash],eof:[rp.Percent,rp.Percent,rp.E,rp.O,rp.F],obj:[rp.o,rp.b,rp.j],endobj:[rp.e,rp.n,rp.d,rp.o,rp.b,rp.j],xref:[rp.x,rp.r,rp.e,rp.f],trailer:[rp.t,rp.r,rp.a,rp.i,rp.l,rp.e,rp.r],startxref:[rp.s,rp.t,rp.a,rp.r,rp.t,rp.x,rp.r,rp.e,rp.f],true:[rp.t,rp.r,rp.u,rp.e],false:[rp.f,rp.a,rp.l,rp.s,rp.e],null:[rp.n,rp.u,rp.l,rp.l],stream:oa,streamEOF1:tl(oa,[on,oo,oi]),streamEOF2:tl(oa,[oo,oi]),streamEOF3:tl(oa,[oo]),streamEOF4:tl(oa,[oi]),endstream:os,EOF1endstream:tl([oo,oi],os),EOF2endstream:tl([oo],os),EOF3endstream:tl([oi],os)},oc=function(t){function e(e,r,n){void 0===n&&(n=!1);var o=t.call(this,e,n)||this;return o.context=r,o}return ta(e,t),e.prototype.parseObject=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(ou.true))return rw.True;if(this.matchKeyword(ou.false))return rw.False;if(this.matchKeyword(ou.null))return rP;var t=this.bytes.peek();if(t===rp.LessThan&&this.bytes.peekAhead(1)===rp.LessThan)return this.parseDictOrStream();if(t===rp.LessThan)return this.parseHexString();if(t===rp.LeftParen)return this.parseString();if(t===rp.ForwardSlash)return this.parseName();if(t===rp.LeftSquareBracket)return this.parseArray();if(n8[t])return this.parseNumberOrRef();throw new rs(this.bytes.position(),t)},e.prototype.parseNumberOrRef=function(){var t=this.parseRawNumber();this.skipWhitespaceAndComments();var e=this.bytes.offset();if(n3[this.bytes.peek()]){var r=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===rp.R)return this.bytes.assertNext(rp.R),rI.of(t,r)}return this.bytes.moveTo(e),rv.of(t)},e.prototype.parseHexString=function(){var t="";for(this.bytes.assertNext(rp.LessThan);!this.bytes.done()&&this.bytes.peek()!==rp.GreaterThan;)t+=tx(this.bytes.next());return this.bytes.assertNext(rp.GreaterThan),rQ.of(t)},e.prototype.parseString=function(){for(var t=0,e=!1,r="";!this.bytes.done();){var n=this.bytes.next();if(r+=tx(n),e||(n===rp.LeftParen&&(t+=1),n===rp.RightParen&&(t-=1)),n===rp.BackSlash?e=!e:e&&(e=!1),0===t)return r8.of(r.substring(1,r.length-1))}throw new rl(this.bytes.position())},e.prototype.parseName=function(){this.bytes.assertNext(rp.ForwardSlash);for(var t="";!this.bytes.done();){var e=this.bytes.peek();if(rC[e]||rx[e])break;t+=tx(e),this.bytes.next()}return rD.of(t)},e.prototype.parseArray=function(){this.bytes.assertNext(rp.LeftSquareBracket),this.skipWhitespaceAndComments();for(var t=rb.withContext(this.context);this.bytes.peek()!==rp.RightSquareBracket;){var e=this.parseObject();t.push(e),this.skipWhitespaceAndComments()}return this.bytes.assertNext(rp.RightSquareBracket),t},e.prototype.parseDict=function(){this.bytes.assertNext(rp.LessThan),this.bytes.assertNext(rp.LessThan),this.skipWhitespaceAndComments();for(var t=new Map;!this.bytes.done()&&this.bytes.peek()!==rp.GreaterThan&&this.bytes.peekAhead(1)!==rp.GreaterThan;){var e=this.parseName(),r=this.parseObject();t.set(e,r),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(rp.GreaterThan),this.bytes.assertNext(rp.GreaterThan);var n=t.get(rD.of("Type"));return n===rD.of("Catalog")?n5.fromMapWithContext(t,this.context):n===rD.of("Pages")?n4.fromMapWithContext(t,this.context):n===rD.of("Page")?rH.fromMapWithContext(t,this.context):rT.fromMapWithContext(t,this.context)},e.prototype.parseDictOrStream=function(){var t,e=this.bytes.position(),r=this.parseDict();if(this.skipWhitespaceAndComments(),!this.matchKeyword(ou.streamEOF1)&&!this.matchKeyword(ou.streamEOF2)&&!this.matchKeyword(ou.streamEOF3)&&!this.matchKeyword(ou.streamEOF4)&&!this.matchKeyword(ou.stream))return r;var n=this.bytes.offset(),o=r.get(rD.of("Length"));o instanceof rv?(t=n+o.asNumber(),this.bytes.moveTo(t),this.skipWhitespaceAndComments(),this.matchKeyword(ou.endstream)||(this.bytes.moveTo(n),t=this.findEndOfStreamFallback(e))):t=this.findEndOfStreamFallback(e);var i=this.bytes.slice(n,t);return rO.of(r,i)},e.prototype.findEndOfStreamFallback=function(t){for(var e=1,r=this.bytes.offset();!this.bytes.done()&&(r=this.bytes.offset(),this.matchKeyword(ou.stream)?e+=1:this.matchKeyword(ou.EOF1endstream)||this.matchKeyword(ou.EOF2endstream)||this.matchKeyword(ou.EOF3endstream)||this.matchKeyword(ou.endstream)?e-=1:this.bytes.next(),0!==e););if(0!==e)throw new rc(t);return r},e.forBytes=function(t,r,n){return new e(or.of(t),r,n)},e.forByteStream=function(t,r,n){return void 0===n&&(n=!1),new e(t,r,n)},e}(oe),ol=function(t){function e(e,r){var n=t.call(this,or.fromPDFRawStream(e),e.dict.context)||this,o=e.dict;return n.alreadyParsed=!1,n.shouldWaitForTick=r||function(){return!1},n.firstOffset=o.lookup(rD.of("First"),rv).asNumber(),n.objectCount=o.lookup(rD.of("N"),rv).asNumber(),n}return ta(e,t),e.prototype.parseIntoContext=function(){return tu(this,void 0,void 0,function(){var t,e,r,n,o,i,a,s;return tc(this,function(u){switch(u.label){case 0:if(this.alreadyParsed)throw new e1("PDFObjectStreamParser","parseIntoContext");this.alreadyParsed=!0,t=this.parseOffsetsAndObjectNumbers(),e=0,r=t.length,u.label=1;case 1:if(!(e=rp.Space&&e<=rp.Tilde&&(this.matchKeyword(ou.xref)||this.matchKeyword(ou.trailer)||this.matchKeyword(ou.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(t);break}this.bytes.next()}},e.prototype.skipBinaryHeaderComment=function(){this.skipWhitespaceAndComments();try{var t=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(t)}catch(t){this.bytes.next(),this.skipWhitespaceAndComments()}},e.forBytesWithOptions=function(t,r,n,o){return new e(t,r,n,o)},e}(oc),od=function(t){return 1<X],51721),t.s([],82958);var op=function(t){return t instanceof rD?t:rD.of(t)},og=function(t){return t instanceof rv?t:rv.of(t)},oy=function(t){return t instanceof rv?t.asNumber():t};t.s(["asNumber",()=>oy,"asPDFName",()=>op,"asPDFNumber",()=>og],38109),(C=Z||(Z={})).Degrees="degrees",C.Radians="radians";var ov=function(t){return ez(t,"radianAngle",["number"]),{type:Z.Radians,angle:t}},ob=function(t){return ez(t,"degreeAngle",["number"]),{type:Z.Degrees,angle:t}},om=Z.Radians,ow=Z.Degrees,ox=function(t){return t*Math.PI/180},oC=function(t){return 180*t/Math.PI},oS=function(t){return t.type===om?t.angle:t.type===ow?ox(t.angle):t7("Invalid rotation: "+JSON.stringify(t))},oF=function(t){return t.type===om?oC(t.angle):t.type===ow?t.angle:t7("Invalid rotation: "+JSON.stringify(t))},oA=function(t){void 0===t&&(t=0);var e=t/90%4;return 0===e?0:1===e?90:2===e?180:270*(3===e)},ok=function(t,e){void 0===e&&(e=0);var r=oA(e);return 90===r||270===r?{width:t.height,height:t.width}:{width:t.width,height:t.height}},oD=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var n=t.x,o=t.y,i=t.width,a=t.height,s=oA(r),u=e/2;return 0===s?{x:n-u,y:o-u,width:i,height:a}:90===s?{x:n-a+u,y:o-u,width:a,height:i}:180===s?{x:n-i+u,y:o-a+u,width:i,height:a}:270===s?{x:n-u,y:o-i+u,width:a,height:i}:{x:n-u,y:o-u,width:i,height:a}};t.s(["RotationTypes",()=>Z,"adjustDimsForRotation",()=>ok,"degrees",()=>ob,"degreesToRadians",()=>ox,"radians",()=>ov,"radiansToDegrees",()=>oC,"reduceRotation",()=>oA,"rotateRectangle",()=>oD,"toDegrees",()=>oF,"toRadians",()=>oS],88477);var oP=function(){return rM.of(rj.ClipNonZero)},oT=function(){return rM.of(rj.ClipEvenOdd)},oB=Math.cos,oO=Math.sin,oR=Math.tan,oN=function(t,e,r,n,o,i){return rM.of(rj.ConcatTransformationMatrix,[og(t),og(e),og(r),og(n),og(o),og(i)])},oI=function(t,e){return oN(1,0,0,1,t,e)},oM=function(t,e){return oN(t,0,0,e,0,0)},oj=function(t){return oN(oB(oy(t)),oO(oy(t)),-oO(oy(t)),oB(oy(t)),0,0)},oE=function(t){return oj(ox(oy(t)))},oW=function(t,e){return oN(1,oR(oy(t)),oR(oy(e)),1,0,0)},oz=function(t,e){return oW(ox(oy(t)),ox(oy(e)))},oL=function(t,e){return rM.of(rj.SetLineDashPattern,["["+t.map(og).join(" ")+"]",og(e)])},oU=function(){return oL([],0)};(S=J||(J={}))[S.Butt=0]="Butt",S[S.Round=1]="Round",S[S.Projecting=2]="Projecting";var oH=function(t){return rM.of(rj.SetLineCapStyle,[og(t)])};(F=Y||(Y={}))[F.Miter=0]="Miter",F[F.Round=1]="Round",F[F.Bevel=2]="Bevel";var oG=function(t){return rM.of(rj.SetLineJoinStyle,[og(t)])},oK=function(t){return rM.of(rj.SetGraphicsStateParams,[op(t)])},oV=function(){return rM.of(rj.PushGraphicsState)},oq=function(){return rM.of(rj.PopGraphicsState)},o_=function(t){return rM.of(rj.SetLineWidth,[og(t)])},oX=function(t,e,r,n,o,i){return rM.of(rj.AppendBezierCurve,[og(t),og(e),og(r),og(n),og(o),og(i)])},oZ=function(t,e,r,n){return rM.of(rj.CurveToReplicateInitialPoint,[og(t),og(e),og(r),og(n)])},oJ=function(){return rM.of(rj.ClosePath)},oY=function(t,e){return rM.of(rj.MoveTo,[og(t),og(e)])},oQ=function(t,e){return rM.of(rj.LineTo,[og(t),og(e)])},o$=function(t,e,r,n){return rM.of(rj.AppendRectangle,[og(t),og(e),og(r),og(n)])},o0=function(t,e,r){return o$(t,e,r,r)},o1=function(){return rM.of(rj.StrokePath)},o2=function(){return rM.of(rj.FillNonZero)},o5=function(){return rM.of(rj.FillNonZeroAndStroke)},o4=function(){return rM.of(rj.EndPath)},o3=function(){return rM.of(rj.NextLine)},o9=function(t,e){return rM.of(rj.MoveText,[og(t),og(e)])},o8=function(t){return rM.of(rj.ShowText,[t])},o6=function(){return rM.of(rj.BeginText)},o7=function(){return rM.of(rj.EndText)},it=function(t,e){return rM.of(rj.SetFontAndSize,[op(t),og(e)])},ie=function(t){return rM.of(rj.SetCharacterSpacing,[og(t)])},ir=function(t){return rM.of(rj.SetWordSpacing,[og(t)])},io=function(t){return rM.of(rj.SetTextHorizontalScaling,[og(t)])},ii=function(t){return rM.of(rj.SetTextLineHeight,[og(t)])},ia=function(t){return rM.of(rj.SetTextRise,[og(t)])};(A=Q||(Q={}))[A.Fill=0]="Fill",A[A.Outline=1]="Outline",A[A.FillAndOutline=2]="FillAndOutline",A[A.Invisible=3]="Invisible",A[A.FillAndClip=4]="FillAndClip",A[A.OutlineAndClip=5]="OutlineAndClip",A[A.FillAndOutlineAndClip=6]="FillAndOutlineAndClip",A[A.Clip=7]="Clip";var is=function(t){return rM.of(rj.SetTextRenderingMode,[og(t)])},iu=function(t,e,r,n,o,i){return rM.of(rj.SetTextMatrix,[og(t),og(e),og(r),og(n),og(o),og(i)])},ic=function(t,e,r,n,o){return iu(oB(oy(t)),oO(oy(t))+oR(oy(e)),-oO(oy(t))+oR(oy(r)),oB(oy(t)),n,o)},il=function(t,e,r,n,o){return ic(ox(oy(t)),ox(oy(e)),ox(oy(r)),n,o)},ih=function(t){return rM.of(rj.DrawObject,[op(t)])},id=function(t){return rM.of(rj.NonStrokingColorGray,[og(t)])},ip=function(t){return rM.of(rj.StrokingColorGray,[og(t)])},ig=function(t,e,r){return rM.of(rj.NonStrokingColorRgb,[og(t),og(e),og(r)])},iy=function(t,e,r){return rM.of(rj.StrokingColorRgb,[og(t),og(e),og(r)])},iv=function(t,e,r,n){return rM.of(rj.NonStrokingColorCmyk,[og(t),og(e),og(r),og(n)])},ib=function(t,e,r,n){return rM.of(rj.StrokingColorCmyk,[og(t),og(e),og(r),og(n)])},im=function(t){return rM.of(rj.BeginMarkedContent,[op(t)])},iw=function(){return rM.of(rj.EndMarkedContent)};t.s(["LineCapStyle",()=>J,"LineJoinStyle",()=>Y,"TextRenderingMode",()=>Q,"appendBezierCurve",()=>oX,"appendQuadraticCurve",()=>oZ,"beginMarkedContent",()=>im,"beginText",()=>o6,"clip",()=>oP,"clipEvenOdd",()=>oT,"closePath",()=>oJ,"concatTransformationMatrix",()=>oN,"drawObject",()=>ih,"endMarkedContent",()=>iw,"endPath",()=>o4,"endText",()=>o7,"fill",()=>o2,"fillAndStroke",()=>o5,"lineTo",()=>oQ,"moveText",()=>o9,"moveTo",()=>oY,"nextLine",()=>o3,"popGraphicsState",()=>oq,"pushGraphicsState",()=>oV,"rectangle",()=>o$,"restoreDashPattern",()=>oU,"rotateAndSkewTextDegreesAndTranslate",()=>il,"rotateAndSkewTextRadiansAndTranslate",()=>ic,"rotateDegrees",()=>oE,"rotateRadians",()=>oj,"scale",()=>oM,"setCharacterSpacing",()=>ie,"setCharacterSqueeze",()=>io,"setDashPattern",()=>oL,"setFillingCmykColor",()=>iv,"setFillingGrayscaleColor",()=>id,"setFillingRgbColor",()=>ig,"setFontAndSize",()=>it,"setGraphicsState",()=>oK,"setLineCap",()=>oH,"setLineHeight",()=>ii,"setLineJoin",()=>oG,"setLineWidth",()=>o_,"setStrokingCmykColor",()=>ib,"setStrokingGrayscaleColor",()=>ip,"setStrokingRgbColor",()=>iy,"setTextMatrix",()=>iu,"setTextRenderingMode",()=>is,"setTextRise",()=>ia,"setWordSpacing",()=>ir,"showText",()=>o8,"skewDegrees",()=>oz,"skewRadians",()=>oW,"square",()=>o0,"stroke",()=>o1,"translate",()=>oI],64406),(k=$||($={})).Grayscale="Grayscale",k.RGB="RGB",k.CMYK="CMYK";var ix=function(t){return eH(t,"gray",0,1),{type:$.Grayscale,gray:t}},iC=function(t,e,r){return eH(t,"red",0,1),eH(e,"green",0,1),eH(r,"blue",0,1),{type:$.RGB,red:t,green:e,blue:r}},iS=function(t,e,r,n){return eH(t,"cyan",0,1),eH(e,"magenta",0,1),eH(r,"yellow",0,1),eH(n,"key",0,1),{type:$.CMYK,cyan:t,magenta:e,yellow:r,key:n}},iF=$.Grayscale,iA=$.RGB,ik=$.CMYK,iD=function(t){return t.type===iF?id(t.gray):t.type===iA?ig(t.red,t.green,t.blue):t.type===ik?iv(t.cyan,t.magenta,t.yellow,t.key):t7("Invalid color: "+JSON.stringify(t))},iP=function(t){return t.type===iF?ip(t.gray):t.type===iA?iy(t.red,t.green,t.blue):t.type===ik?ib(t.cyan,t.magenta,t.yellow,t.key):t7("Invalid color: "+JSON.stringify(t))},iT=function(t,e){return void 0===e&&(e=1),(null==t?void 0:t.length)===1?ix(t[0]*e):(null==t?void 0:t.length)===3?iC(t[0]*e,t[1]*e,t[2]*e):(null==t?void 0:t.length)===4?iS(t[0]*e,t[1]*e,t[2]*e,t[3]*e):void 0},iB=function(t){return t.type===iF?[t.gray]:t.type===iA?[t.red,t.green,t.blue]:t.type===ik?[t.cyan,t.magenta,t.yellow,t.key]:t7("Invalid color: "+JSON.stringify(t))};t.s(["ColorTypes",()=>$,"cmyk",()=>iS,"colorToComponents",()=>iB,"componentsToColor",()=>iT,"grayscale",()=>ix,"rgb",()=>iC,"setFillingColor",()=>iD,"setStrokingColor",()=>iP],27003);var iO=0,iR=0,iN=0,iI=0,iM=0,ij=0,iE=new Map([["A",7],["a",7],["C",6],["c",6],["H",1],["h",1],["L",2],["l",2],["M",2],["m",2],["Q",4],["q",4],["S",4],["s",4],["T",2],["t",2],["V",1],["v",1],["Z",0],["z",0]]),iW=function(t){for(var e,r=[],n=[],o="",i=!1,a=0,s=0;s0&&(n[n.length]=+o),r[r.length]={cmd:e,args:n},n=[],o="",i=!1),e=u;else if([" ",","].includes(u)||"-"===u&&o.length>0&&"e"!==o[o.length-1]||"."===u&&i){if(0===o.length)continue;n.length===a?(r[r.length]={cmd:e,args:n},n=[+o],"M"===e&&(e="L"),"m"===e&&(e="l")):n[n.length]=+o,i="."===u,o=["-","."].includes(u)?u:""}else o+=u,"."===u&&(i=!0)}return o.length>0&&(n.length===a?(r[r.length]={cmd:e,args:n},n=[+o],"M"===e&&(e="L"),"m"===e&&(e="l")):n[n.length]=+o),r[r.length]={cmd:e,args:n},r},iz=function(t){iO=iR=iN=iI=iM=ij=0;for(var e=[],r=0;r1&&(r*=f=Math.sqrt(f),n*=f);var d=h/r,p=l/r,g=-l/n,y=h/n,v=d*s+p*u,b=g*s+y*u,m=d*t+p*e,w=g*t+y*e,x=1/((m-v)*(m-v)+(w-b)*(w-b))-.25;x<0&&(x=0);var C=Math.sqrt(x);i===o&&(C=-C);var S=.5*(v+m)-C*(w-b),F=.5*(b+w)+C*(m-v),A=Math.atan2(b-F,v-S),k=Math.atan2(w-F,m-S)-A;k<0&&1===i?k+=2*Math.PI:k>0&&0===i&&(k-=2*Math.PI);for(var D=Math.ceil(Math.abs(k/(.5*Math.PI+.001))),P=[],T=0;Ti3,"drawCheckBox",()=>i5,"drawCheckMark",()=>i1,"drawEllipse",()=>i$,"drawEllipsePath",()=>iY,"drawImage",()=>iq,"drawLine",()=>iX,"drawLinesOfText",()=>iV,"drawOptionList",()=>i6,"drawPage",()=>i_,"drawRadioButton",()=>i4,"drawRectangle",()=>iZ,"drawSvgPath",()=>i0,"drawText",()=>iK,"drawTextField",()=>i8,"drawTextLines",()=>i9,"rotateInPlace",()=>i2],85978);var i7=function(t){function e(){return t.call(this,"Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.")||this}return ta(e,t),e}(Error),at=function(t){function e(){return t.call(this,"Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts.")||this}return ta(e,t),e}(Error),ae=function(t){function e(){return t.call(this,"A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them.")||this}return ta(e,t),e}(Error),ar=function(t){function e(){return t.call(this,"PDFDocument has no pages so `PDFDocument.removePage` cannot be called")||this}return ta(e,t),e}(Error),an=function(t){function e(e){return t.call(this,'PDFDocument has no form field with the name "'+e+'"')||this}return ta(e,t),e}(Error),ao=function(t){function e(e,r,n){var o,i,a='Expected field "'+e+'" to be of type '+(null==r?void 0:r.name)+", but it is actually of type "+(null!=(i=null==(o=null==n?void 0:n.constructor)?void 0:o.name)?i:n);return t.call(this,a)||this}return ta(e,t),e}(Error),ai=function(t){function e(e){return t.call(this,'Failed to select check box due to missing onValue: "'+e+'"')||this}return ta(e,t),e}(Error),aa=function(t){function e(e){return t.call(this,'A field already exists with the specified name: "'+e+'"')||this}return ta(e,t),e}(Error),as=function(t){function e(e){return t.call(this,'Field name contains invalid component: "'+e+'"')||this}return ta(e,t),e}(Error),au=function(t){function e(e){return t.call(this,'A non-terminal field already exists with the specified name: "'+e+'"')||this}return ta(e,t),e}(Error),ac=function(t){function e(e){return t.call(this,"Reading rich text fields is not supported: Attempted to read rich text field: "+e)||this}return ta(e,t),e}(Error),al=function(t){function e(e,r){return t.call(this,"Failed to layout combed text as lineLength="+e+" is greater than cellCount="+r)||this}return ta(e,t),e}(Error),ah=function(t){function e(e,r,n){return t.call(this,"Attempted to set text with length="+e+" for TextField with maxLength="+r+" and name="+n)||this}return ta(e,t),e}(Error),af=function(t){function e(e,r,n){var o="Attempted to set maxLength="+r+", which is less than "+e+", the length of this field's current value (name="+n+")";return t.call(this,o)||this}return ta(e,t),e}(Error);t.s(["CombedTextLayoutError",()=>al,"EncryptedPDFError",()=>i7,"ExceededMaxLengthError",()=>ah,"FieldAlreadyExistsError",()=>aa,"FieldExistsAsNonTerminalError",()=>au,"FontkitNotRegisteredError",()=>at,"ForeignPageError",()=>ae,"InvalidFieldNamePartError",()=>as,"InvalidMaxLengthError",()=>af,"MissingOnValueCheckError",()=>ai,"NoSuchFieldError",()=>an,"RemovePageFromEmptyDocumentError",()=>ar,"RichTextFieldReadError",()=>ac,"UnexpectedFieldTypeError",()=>ao],68941),(D=tt||(tt={}))[D.Left=0]="Left",D[D.Center=1]="Center",D[D.Right=2]="Right",t.s(["TextAlignment",()=>tt],34282);var ad=function(t,e,r,n){void 0===n&&(n=!1);for(var o=4;o<500;){for(var i=0,a=0,s=t.length;at.length)return o-1;var p=e.heightAtSize(o);if((p+.2*p)*i>Math.abs(r.height))return o-1;o+=1}return o},ap=function(t,e,r,n){for(var o=r.width/n,i=r.height,a=4,s=tB(t);a<500;){for(var u=0,c=s.length;u.75*o)return a-1}if(e.heightAtSize(a,{descender:!1})>i)return a-1;a+=1}return a},ag=function(t){for(var e=t.length;e>0;e--)if(/\s/.test(t[e]))return e},ay=function(t,e,r,n){for(var o,i=t.length;i>0;){var a=t.substring(0,i),s=r.encodeText(a),u=r.widthOfTextAtSize(a,n);if(uf&&(f=S+x),p+s>d&&(d=p+s),c.push({text:m,encoded:w,width:x,height:s,x:S,y:p}),v=null==C?void 0:C.trim()}return{fontSize:n,lineHeight:u,lines:c,bounds:{x:l,y:h,width:f-l,height:d-h}}},ab=function(t,e){var r=e.fontSize,n=e.font,o=e.bounds,i=e.cellCount,a=tP(tF(t));if(a.length>i)throw new al(a.length,i);(void 0===r||0===r)&&(r=ap(a,n,o,i));for(var s=o.width/i,u=n.heightAtSize(r,{descender:!1}),c=o.y+(o.height/2-u/2),l=[],h=o.x,f=o.y,d=o.x+o.width,p=o.y+o.height,g=0,y=0;gd&&(d=C+x),c+u>p&&(p=c+u),l.push({text:a,encoded:w,width:x,height:u,x:C,y:c}),g+=1,y+=m}return{fontSize:r,cells:l,bounds:{x:h,y:f,width:d-h,height:p-f}}},am=function(t,e){var r=e.alignment,n=e.fontSize,o=e.font,i=e.bounds,a=tP(tF(t));(void 0===n||0===n)&&(n=ad([a],o,i));var s=o.encodeText(a),u=o.widthOfTextAtSize(a,n),c=o.heightAtSize(n,{descender:!1}),l=r===tt.Left?i.x:r===tt.Center?i.x+i.width/2-u/2:r===tt.Right?i.x+i.width-u:i.x,h=i.y+(i.height/2-c/2);return{fontSize:n,line:{text:a,encoded:s,width:u,height:c,x:l,y:h},bounds:{x:l,y:h,width:u,height:c}}};t.s(["layoutCombedText",()=>ab,"layoutMultilineText",()=>av,"layoutSinglelineText",()=>am],45361);var aw=function(t){return"normal"in t?t:{normal:t}},ax=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,aC=function(t){var e,r,n=Number((null!=(r=tM(null!=(e=t.getDefaultAppearance())?e:"",ax).match)?r:[])[2]);return isFinite(n)?n:void 0},aS=/(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,aF=function(t){var e,r=tM(null!=(e=t.getDefaultAppearance())?e:"",aS).match,n=null!=r?r:[],o=n[1],i=n[2],a=n[3],s=n[4],u=n[5];return"g"===u&&o?ix(Number(o)):"rg"===u&&o&&i&&a?iC(Number(o),Number(i),Number(a)):"k"===u&&o&&i&&a&&s?iS(Number(o),Number(i),Number(a),Number(s)):void 0},aA=function(t,e,r,n){void 0===n&&(n=0);var o,i=[iD(e).toString(),it(null!=(o=null==r?void 0:r.name)?o:"dummy__noop",n).toString()].join("\n");t.setDefaultAppearance(i)},ak=function(t,e){var r,n,o,i=aF(e),a=aF(t.acroField),s=e.getRectangle(),u=e.getAppearanceCharacteristics(),c=e.getBorderStyle(),l=null!=(r=null==c?void 0:c.getWidth())?r:0,h=oA(null==u?void 0:u.getRotation()),f=ok(s,h),d=f.width,p=f.height,g=i2(ts(ts({},s),{rotation:h})),y=iC(0,0,0),v=null!=(n=iT(null==u?void 0:u.getBorderColor()))?n:y,b=iT(null==u?void 0:u.getBackgroundColor()),m=iT(null==u?void 0:u.getBackgroundColor(),.8),w=null!=(o=null!=i?i:a)?o:y;i?aA(e,w):aA(t.acroField,w);var x={x:0+l/2,y:0+l/2,width:d-l,height:p-l,thickness:1.5,borderWidth:l,borderColor:v,markColor:w};return{normal:{on:tl(g,i5(ts(ts({},x),{color:b,filled:!0}))),off:tl(g,i5(ts(ts({},x),{color:b,filled:!1})))},down:{on:tl(g,i5(ts(ts({},x),{color:m,filled:!0}))),off:tl(g,i5(ts(ts({},x),{color:m,filled:!1})))}}},aD=function(t,e){var r,n,o,i=aF(e),a=aF(t.acroField),s=e.getRectangle(),u=e.getAppearanceCharacteristics(),c=e.getBorderStyle(),l=null!=(r=null==c?void 0:c.getWidth())?r:0,h=oA(null==u?void 0:u.getRotation()),f=ok(s,h),d=f.width,p=f.height,g=i2(ts(ts({},s),{rotation:h})),y=iC(0,0,0),v=null!=(n=iT(null==u?void 0:u.getBorderColor()))?n:y,b=iT(null==u?void 0:u.getBackgroundColor()),m=iT(null==u?void 0:u.getBackgroundColor(),.8),w=null!=(o=null!=i?i:a)?o:y;i?aA(e,w):aA(t.acroField,w);var x={x:d/2,y:p/2,width:d-l,height:p-l,borderWidth:l,borderColor:v,dotColor:w};return{normal:{on:tl(g,i4(ts(ts({},x),{color:b,filled:!0}))),off:tl(g,i4(ts(ts({},x),{color:b,filled:!1})))},down:{on:tl(g,i4(ts(ts({},x),{color:m,filled:!0}))),off:tl(g,i4(ts(ts({},x),{color:m,filled:!1})))}}},aP=function(t,e,r){var n,o,i,a,s,u=aF(e),c=aF(t.acroField),l=aC(e),h=aC(t.acroField),f=e.getRectangle(),d=e.getAppearanceCharacteristics(),p=e.getBorderStyle(),g=null==d?void 0:d.getCaptions(),y=null!=(n=null==g?void 0:g.normal)?n:"",v=null!=(i=null!=(o=null==g?void 0:g.down)?o:y)?i:"",b=null!=(a=null==p?void 0:p.getWidth())?a:0,m=oA(null==d?void 0:d.getRotation()),w=ok(f,m),x=w.width,C=w.height,S=i2(ts(ts({},f),{rotation:m})),F=iC(0,0,0),A=iT(null==d?void 0:d.getBorderColor()),k=iT(null==d?void 0:d.getBackgroundColor()),D=iT(null==d?void 0:d.getBackgroundColor(),.8),P={x:b,y:b,width:x-2*b,height:C-2*b},T=am(y,{alignment:tt.Center,fontSize:null!=l?l:h,font:r,bounds:P}),B=am(v,{alignment:tt.Center,fontSize:null!=l?l:h,font:r,bounds:P}),O=Math.min(T.fontSize,B.fontSize),R=null!=(s=null!=u?u:c)?s:F;u||void 0!==l?aA(e,R,r,O):aA(t.acroField,R,r,O);var N={x:0+b/2,y:0+b/2,width:x-b,height:C-b,borderWidth:b,borderColor:A,textColor:R,font:r.name,fontSize:O};return{normal:tl(S,i3(ts(ts({},N),{color:k,textLines:[T.line]}))),down:tl(S,i3(ts(ts({},N),{color:D,textLines:[B.line]})))}},aT=function(t,e,r){var n,o,i,a,s,u,c=aF(e),l=aF(t.acroField),h=aC(e),f=aC(t.acroField),d=e.getRectangle(),p=e.getAppearanceCharacteristics(),g=e.getBorderStyle(),y=null!=(n=t.getText())?n:"",v=null!=(o=null==g?void 0:g.getWidth())?o:0,b=oA(null==p?void 0:p.getRotation()),m=ok(d,b),w=m.width,x=m.height,C=i2(ts(ts({},d),{rotation:b})),S=iC(0,0,0),F=iT(null==p?void 0:p.getBorderColor()),A=iT(null==p?void 0:p.getBackgroundColor()),k=+!t.isCombed(),D={x:v+k,y:v+k,width:w-(v+k)*2,height:x-(v+k)*2};if(t.isMultiline()){var P=av(y,{alignment:t.getAlignment(),fontSize:null!=h?h:f,font:r,bounds:D});s=P.lines,u=P.fontSize}else if(t.isCombed()){var P=ab(y,{fontSize:null!=h?h:f,font:r,bounds:D,cellCount:null!=(i=t.getMaxLength())?i:0});s=P.cells,u=P.fontSize}else{var P=am(y,{alignment:t.getAlignment(),fontSize:null!=h?h:f,font:r,bounds:D});s=[P.line],u=P.fontSize}var T=null!=(a=null!=c?c:l)?a:S;return c||void 0!==h?aA(e,T,r,u):aA(t.acroField,T,r,u),tl(C,i8({x:0+v/2,y:0+v/2,width:w-v,height:x-v,borderWidth:null!=v?v:0,borderColor:F,textColor:T,font:r.name,fontSize:u,color:A,textLines:s,padding:k}))},aB=function(t,e,r){var n,o,i,a=aF(e),s=aF(t.acroField),u=aC(e),c=aC(t.acroField),l=e.getRectangle(),h=e.getAppearanceCharacteristics(),f=e.getBorderStyle(),d=null!=(n=t.getSelected()[0])?n:"",p=null!=(o=null==f?void 0:f.getWidth())?o:0,g=oA(null==h?void 0:h.getRotation()),y=ok(l,g),v=y.width,b=y.height,m=i2(ts(ts({},l),{rotation:g})),w=iC(0,0,0),x=iT(null==h?void 0:h.getBorderColor()),C=iT(null==h?void 0:h.getBackgroundColor()),S=am(d,{alignment:tt.Left,fontSize:null!=u?u:c,font:r,bounds:{x:p+1,y:p+1,width:v-(p+1)*2,height:b-(p+1)*2}}),F=S.line,A=S.fontSize,k=null!=(i=null!=a?a:s)?i:w;return a||void 0!==u?aA(e,k,r,A):aA(t.acroField,k,r,A),tl(m,i8({x:0+p/2,y:0+p/2,width:v-p,height:b-p,borderWidth:null!=p?p:0,borderColor:x,textColor:k,font:r.name,fontSize:A,color:C,textLines:[F],padding:1}))},aO=function(t,e,r){var n,o,i=aF(e),a=aF(t.acroField),s=aC(e),u=aC(t.acroField),c=e.getRectangle(),l=e.getAppearanceCharacteristics(),h=e.getBorderStyle(),f=null!=(n=null==h?void 0:h.getWidth())?n:0,d=oA(null==l?void 0:l.getRotation()),p=ok(c,d),g=p.width,y=p.height,v=i2(ts(ts({},c),{rotation:d})),b=iC(0,0,0),m=iT(null==l?void 0:l.getBorderColor()),w=iT(null==l?void 0:l.getBackgroundColor()),x=t.getOptions(),C=t.getSelected();t.isSorted()&&x.sort();for(var S="",F=0,A=x.length;FaP,"defaultCheckBoxAppearanceProvider",()=>ak,"defaultDropdownAppearanceProvider",()=>aB,"defaultOptionListAppearanceProvider",()=>aO,"defaultRadioGroupAppearanceProvider",()=>aD,"defaultTextFieldAppearanceProvider",()=>aT,"normalizeAppearance",()=>aw],90213);var aR=function(){function t(t,e,r){this.alreadyEmbedded=!1,ez(t,"ref",[[rI,"PDFRef"]]),ez(e,"doc",[[aY,"PDFDocument"]]),ez(r,"embedder",[[nk,"PDFPageEmbedder"]]),this.ref=t,this.doc=e,this.width=r.width,this.height=r.height,this.embedder=r}return t.prototype.scale=function(t){return ez(t,"factor",["number"]),{width:this.width*t,height:this.height*t}},t.prototype.size=function(){return this.scale(1)},t.prototype.embed=function(){return tu(this,void 0,void 0,function(){return tc(this,function(t){switch(t.label){case 0:if(this.alreadyEmbedded)return[3,2];return[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t.sent(),this.alreadyEmbedded=!0,t.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),aN=function(){function t(t,e,r){this.modified=!0,ez(t,"ref",[[rI,"PDFRef"]]),ez(e,"doc",[[aY,"PDFDocument"]]),ez(r,"embedder",[[r6,"CustomFontEmbedder"],[r$,"StandardFontEmbedder"]]),this.ref=t,this.doc=e,this.name=r.fontName,this.embedder=r}return t.prototype.encodeText=function(t){return ez(t,"text",["string"]),this.modified=!0,this.embedder.encodeText(t)},t.prototype.widthOfTextAtSize=function(t,e){return ez(t,"text",["string"]),ez(e,"size",["number"]),this.embedder.widthOfTextAtSize(t,e)},t.prototype.heightAtSize=function(t,e){var r;return ez(t,"size",["number"]),eL(null==e?void 0:e.descender,"options.descender",["boolean"]),this.embedder.heightOfFontAtSize(t,{descender:null==(r=null==e?void 0:e.descender)||r})},t.prototype.sizeAtHeight=function(t){return ez(t,"height",["number"]),this.embedder.sizeOfFontAtHeight(t)},t.prototype.getCharacterSet=function(){return this.embedder instanceof r$?this.embedder.encoding.supportedCodePoints:this.embedder.font.characterSet},t.prototype.embed=function(){return tu(this,void 0,void 0,function(){return tc(this,function(t){switch(t.label){case 0:if(!this.modified)return[3,2];return[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t.sent(),this.modified=!1,t.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),aI=function(){function t(t,e,r){ez(t,"ref",[[rI,"PDFRef"]]),ez(e,"doc",[[aY,"PDFDocument"]]),ez(r,"embedder",[[nn,"JpegEmbedder"],[nu,"PngEmbedder"]]),this.ref=t,this.doc=e,this.width=r.width,this.height=r.height,this.embedder=r}return t.prototype.scale=function(t){return ez(t,"factor",["number"]),{width:this.width*t,height:this.height*t}},t.prototype.scaleToFit=function(t,e){ez(t,"width",["number"]),ez(e,"height",["number"]);var r=Math.min(t/this.width,e/this.height);return this.scale(r)},t.prototype.size=function(){return this.scale(1)},t.prototype.embed=function(){return tu(this,void 0,void 0,function(){var t,e,r;return tc(this,function(n){switch(n.label){case 0:if(!this.embedder)return[2];return this.embedTask||(t=this,e=t.doc,r=t.ref,this.embedTask=this.embedder.embedIntoContext(e.context,r)),[4,this.embedTask];case 1:return n.sent(),this.embedder=void 0,[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}();t.i(82958),t.i(51721),t.i(79900),t.i(76336),t.i(49551),(P=te||(te={}))[P.Left=0]="Left",P[P.Center=1]="Center",P[P.Right=2]="Right",t.s(["ImageAlignment",()=>te],25156),t.s([],86234);var aM=function(t){eL(null==t?void 0:t.x,"options.x",["number"]),eL(null==t?void 0:t.y,"options.y",["number"]),eL(null==t?void 0:t.width,"options.width",["number"]),eL(null==t?void 0:t.height,"options.height",["number"]),eL(null==t?void 0:t.textColor,"options.textColor",[[Object,"Color"]]),eL(null==t?void 0:t.backgroundColor,"options.backgroundColor",[[Object,"Color"]]),eL(null==t?void 0:t.borderColor,"options.borderColor",[[Object,"Color"]]),eL(null==t?void 0:t.borderWidth,"options.borderWidth",["number"]),eL(null==t?void 0:t.rotate,"options.rotate",[[Object,"Rotation"]])},aj=function(){function t(t,e,r){ez(t,"acroField",[[nM,"PDFAcroTerminal"]]),ez(e,"ref",[[rI,"PDFRef"]]),ez(r,"doc",[[aY,"PDFDocument"]]),this.acroField=t,this.ref=e,this.doc=r}return t.prototype.getName=function(){var t;return null!=(t=this.acroField.getFullyQualifiedName())?t:""},t.prototype.isReadOnly=function(){return this.acroField.hasFlag(K.ReadOnly)},t.prototype.enableReadOnly=function(){this.acroField.setFlagTo(K.ReadOnly,!0)},t.prototype.disableReadOnly=function(){this.acroField.setFlagTo(K.ReadOnly,!1)},t.prototype.isRequired=function(){return this.acroField.hasFlag(K.Required)},t.prototype.enableRequired=function(){this.acroField.setFlagTo(K.Required,!0)},t.prototype.disableRequired=function(){this.acroField.setFlagTo(K.Required,!1)},t.prototype.isExported=function(){return!this.acroField.hasFlag(K.NoExport)},t.prototype.enableExporting=function(){this.acroField.setFlagTo(K.NoExport,!1)},t.prototype.disableExporting=function(){this.acroField.setFlagTo(K.NoExport,!0)},t.prototype.needsAppearancesUpdate=function(){throw new eY(this.constructor.name,"needsAppearancesUpdate")},t.prototype.defaultUpdateAppearances=function(t){throw new eY(this.constructor.name,"defaultUpdateAppearances")},t.prototype.markAsDirty=function(){this.doc.getForm().markFieldAsDirty(this.ref)},t.prototype.markAsClean=function(){this.doc.getForm().markFieldAsClean(this.ref)},t.prototype.isDirty=function(){return this.doc.getForm().fieldIsDirty(this.ref)},t.prototype.createWidget=function(t){var e,r=t.textColor,n=t.backgroundColor,o=t.borderColor,i=t.borderWidth,a=oF(t.rotate),s=t.caption,u=t.x,c=t.y,l=t.width+i,h=t.height+i,f=!!t.hidden,d=t.page;eK(a,"degreesAngle",90);var p=nI.create(this.doc.context,this.ref),g=oD({x:u,y:c,width:l,height:h},i,a);p.setRectangle(g),d&&p.setP(d);var y=p.getOrCreateAppearanceCharacteristics();n&&y.setBackgroundColor(iB(n)),y.setRotation(a),s&&y.setCaptions({normal:s}),o&&y.setBorderColor(iB(o));var v=p.getOrCreateBorderStyle();if(void 0!==i&&v.setWidth(i),p.setFlagTo(X.Print,!0),p.setFlagTo(X.Hidden,f),p.setFlagTo(X.Invisible,!1),r){var b=(null!=(e=this.acroField.getDefaultAppearance())?e:"")+"\n"+iD(r).toString();this.acroField.setDefaultAppearance(b)}return p},t.prototype.updateWidgetAppearanceWithFont=function(t,e,r){var n=r.normal,o=r.rollover,i=r.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceStream(t,n,e),rollover:o&&this.createAppearanceStream(t,o,e),down:i&&this.createAppearanceStream(t,i,e)})},t.prototype.updateOnOffWidgetAppearance=function(t,e,r){var n=r.normal,o=r.rollover,i=r.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceDict(t,n,e),rollover:o&&this.createAppearanceDict(t,o,e),down:i&&this.createAppearanceDict(t,i,e)})},t.prototype.updateWidgetAppearances=function(t,e){var r=e.normal,n=e.rollover,o=e.down;t.setNormalAppearance(r),n?t.setRolloverAppearance(n):t.removeRolloverAppearance(),o?t.setDownAppearance(o):t.removeDownAppearance()},t.prototype.createAppearanceStream=function(t,e,r){var n,o=this.acroField.dict.context,i=t.getRectangle(),a=i.width,s=i.height,u=r&&{Font:((n={})[r.name]=r.ref,n)},c=o.formXObject(e,{Resources:u,BBox:o.obj([0,0,a,s]),Matrix:o.obj([1,0,0,1,0,0])});return o.register(c)},t.prototype.createImageAppearanceStream=function(t,e,r){var n,o,i=this.acroField.dict.context,a=t.getRectangle(),s=t.getAppearanceCharacteristics(),u=t.getBorderStyle(),c=null!=(o=null==u?void 0:u.getWidth())?o:0,l=oA(null==s?void 0:s.getRotation()),h=i2(ts(ts({},a),{rotation:l})),f=ok(a,l),d=e.scaleToFit(f.width-2*c,f.height-2*c),p={x:c,y:c,width:d.width,height:d.height,rotate:ob(0),xSkew:ob(0),ySkew:ob(0)};r===te.Center?(p.x+=(f.width-2*c)/2-d.width/2,p.y+=(f.height-2*c)/2-d.height/2):r===te.Right&&(p.x=f.width-c-d.width,p.y=f.height-c-d.height);var g=this.doc.context.addRandomSuffix("Image",10),y=tl(h,iq(g,p)),v={XObject:((n={})[g]=e.ref,n)},b=i.formXObject(y,{Resources:v,BBox:i.obj([0,0,a.width,a.height]),Matrix:i.obj([1,0,0,1,0,0])});return i.register(b)},t.prototype.createAppearanceDict=function(t,e,r){var n=this.acroField.dict.context,o=this.createAppearanceStream(t,e.on),i=this.createAppearanceStream(t,e.off),a=n.obj({});return a.set(r,o),a.set(rD.of("Off"),i),a},t}(),aE=function(t){function e(e,r,n){var o=t.call(this,e,r,n)||this;return ez(e,"acroCheckBox",[[nE,"PDFAcroCheckBox"]]),o.acroField=e,o}return ta(e,t),e.prototype.check=function(){var t,e=null!=(t=this.acroField.getOnValue())?t:rD.of("Yes");this.markAsDirty(),this.acroField.setValue(e)},e.prototype.uncheck=function(){this.markAsDirty(),this.acroField.setValue(rD.of("Off"))},e.prototype.isChecked=function(){var t=this.acroField.getOnValue();return!!t&&t===this.acroField.getValue()},e.prototype.addToPage=function(t,e){ez(t,"page",[[a$,"PDFPage"]]),aM(e),e||(e={}),"textColor"in e||(e.textColor=iC(0,0,0)),"backgroundColor"in e||(e.backgroundColor=iC(1,1,1)),"borderColor"in e||(e.borderColor=iC(0,0,0)),"borderWidth"in e||(e.borderWidth=1);var r,n,o,i,a,s,u=this.createWidget({x:null!=(r=e.x)?r:0,y:null!=(n=e.y)?n:0,width:null!=(o=e.width)?o:50,height:null!=(i=e.height)?i:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:null!=(a=e.borderWidth)?a:0,rotate:null!=(s=e.rotate)?s:ob(0),hidden:e.hidden,page:t.ref}),c=this.doc.context.register(u.dict);this.acroField.addWidget(c),u.setAppearanceState(rD.of("Off")),this.updateWidgetAppearance(u,rD.of("Yes")),t.node.addAnnot(c)},e.prototype.needsAppearancesUpdate=function(){for(var t,e=this.acroField.getWidgets(),r=0,n=e.length;r1||1===r.length&&e)&&this.enableMultiselect();for(var o=Array(r.length),i=0,a=r.length;i1||1===r.length&&e)&&this.enableMultiselect();for(var n=Array(r.length),o=0,i=r.length;oe)throw new ah(t.length,e,this.getName());this.markAsDirty(),this.disableRichFormatting(),t?this.acroField.setValue(rQ.fromText(t)):this.acroField.removeValue()},e.prototype.getAlignment=function(){var t=this.acroField.getQuadding();return 0===t?tt.Left:1===t?tt.Center:2===t?tt.Right:tt.Left},e.prototype.setAlignment=function(t){eM(t,"alignment",tt),this.markAsDirty(),this.acroField.setQuadding(t)},e.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},e.prototype.setMaxLength=function(t){if(eG(t,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),void 0===t)this.acroField.removeMaxLength();else{var e=this.getText();if(e&&e.length>t)throw new af(e.length,t,this.getName());this.acroField.setMaxLength(t)}},e.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},e.prototype.setImage=function(t){for(var e=this.getAlignment(),r=e===tt.Center?te.Center:e===tt.Right?te.Right:te.Left,n=this.acroField.getWidgets(),o=0,i=n.length;otr],76071);var aG=function(){function t(t,e){var r=this;this.embedDefaultFont=function(){return r.doc.embedStandardFont(tr.Helvetica)},ez(t,"acroForm",[[n2,"PDFAcroForm"]]),ez(e,"doc",[[aY,"PDFDocument"]]),this.acroForm=t,this.doc=e,this.dirtyFields=new Set,this.defaultFontCache=eJ.populatedBy(this.embedDefaultFont)}return t.prototype.hasXFA=function(){return this.acroForm.dict.has(rD.of("XFA"))},t.prototype.deleteXFA=function(){this.acroForm.dict.delete(rD.of("XFA"))},t.prototype.getFields=function(){for(var t=this.acroForm.getAllFields(),e=[],r=0,n=t.length;ra_],78020),(B=tn||(tn={}))[B.Fastest=1/0]="Fastest",B[B.Fast=1500]="Fast",B[B.Medium=500]="Medium",B[B.Slow=100]="Slow",t.s(["ParseSpeeds",()=>tn],2375);var aX=function(){function t(t,e,r){this.alreadyEmbedded=!1,this.ref=t,this.doc=e,this.embedder=r}return t.prototype.embed=function(){return tu(this,void 0,void 0,function(){var t,e,r,n;return tc(this,function(o){switch(o.label){case 0:if(this.alreadyEmbedded)return[3,2];return[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t=o.sent(),this.doc.catalog.has(rD.of("Names"))||this.doc.catalog.set(rD.of("Names"),this.doc.context.obj({})),(e=this.doc.catalog.lookup(rD.of("Names"),rT)).has(rD.of("EmbeddedFiles"))||e.set(rD.of("EmbeddedFiles"),this.doc.context.obj({})),(r=e.lookup(rD.of("EmbeddedFiles"),rT)).has(rD.of("Names"))||r.set(rD.of("Names"),this.doc.context.obj([])),(n=r.lookup(rD.of("Names"),rb)).push(rQ.fromText(this.embedder.fileName)),n.push(t),this.doc.catalog.has(rD.of("AF"))||this.doc.catalog.set(rD.of("AF"),this.doc.context.obj([])),this.doc.catalog.lookup(rD.of("AF"),rb).push(t),this.alreadyEmbedded=!0,o.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),aZ=function(){function t(t,e,r){this.alreadyEmbedded=!1,this.ref=t,this.doc=e,this.embedder=r}return t.prototype.embed=function(){return tu(this,void 0,void 0,function(){var t,e,r,n,o,i,a;return tc(this,function(s){switch(s.label){case 0:if(this.alreadyEmbedded)return[3,2];return e=(t=this.doc).catalog,r=t.context,[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:n=s.sent(),e.has(rD.of("Names"))||e.set(rD.of("Names"),r.obj({})),(o=e.lookup(rD.of("Names"),rT)).has(rD.of("JavaScript"))||o.set(rD.of("JavaScript"),r.obj({})),(i=o.lookup(rD.of("JavaScript"),rT)).has(rD.of("Names"))||i.set(rD.of("Names"),r.obj([])),(a=i.lookup(rD.of("Names"),rb)).push(rQ.fromText(this.embedder.scriptName)),a.push(n),this.alreadyEmbedded=!0,s.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),aJ=function(){function t(t,e){this.script=t,this.scriptName=e}return t.for=function(e,r){return new t(e,r)},t.prototype.embedIntoContext=function(t,e){return tu(this,void 0,void 0,function(){var r;return tc(this,function(n){return(r=t.obj({Type:"Action",S:"JavaScript",JS:rQ.fromText(this.script)}),e)?(t.assign(e,r),[2,e]):[2,t.register(r)]})})},t}();let aY=function(){function t(t,e,r){var n=this;if(this.defaultWordBreaks=[" "],this.computePages=function(){var t=[];return n.catalog.Pages().traverse(function(e,r){if(e instanceof rH){var o=n.pageMap.get(e);o||(o=a$.of(e,r,n),n.pageMap.set(e,o)),t.push(o)}}),t},this.getOrCreateForm=function(){var t=n.catalog.getOrCreateAcroForm();return aG.of(t,n)},ez(t,"context",[[rU,"PDFContext"]]),ez(e,"ignoreEncryption",["boolean"]),this.context=t,this.catalog=t.lookup(t.trailerInfo.Root),this.isEncrypted=!!t.lookup(t.trailerInfo.Encrypt),this.pageCache=eJ.populatedBy(this.computePages),this.pageMap=new Map,this.formCache=eJ.populatedBy(this.getOrCreateForm),this.fonts=[],this.images=[],this.embeddedPages=[],this.embeddedFiles=[],this.javaScripts=[],!e&&this.isEncrypted)throw new i7;r&&this.updateInfoDict()}return t.load=function(e,r){return void 0===r&&(r={}),tu(this,void 0,void 0,function(){var n,o,i,a,s,u,c,l,h,f,d;return tc(this,function(p){switch(p.label){case 0:return o=void 0!==(n=r.ignoreEncryption)&&n,a=void 0===(i=r.parseSpeed)?tn.Slow:i,u=void 0!==(s=r.throwOnInvalidObject)&&s,l=void 0===(c=r.updateMetadata)||c,f=void 0!==(h=r.capNumbers)&&h,ez(e,"pdf",["string",Uint8Array,ArrayBuffer]),ez(o,"ignoreEncryption",["boolean"]),ez(a,"parseSpeed",["number"]),ez(u,"throwOnInvalidObject",["boolean"]),d=t_(e),[4,of.forBytesWithOptions(d,a,u,f).parseDocument()];case 1:return[2,new t(p.sent(),o,l)]}})})},t.create=function(e){return void 0===e&&(e={}),tu(this,void 0,void 0,function(){var r,n,o,i,a,s;return tc(this,function(u){return n=void 0===(r=e.updateMetadata)||r,o=rU.create(),i=n4.withContext(o),a=o.register(i),s=n5.withContextAndPages(o,a),o.trailerInfo.Root=o.register(s),[2,new t(o,!1,n)]})})},t.prototype.registerFontkit=function(t){this.fontkit=t},t.prototype.getForm=function(){var t=this.formCache.access();return t.hasXFA()&&(console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"),t.deleteXFA()),t},t.prototype.getTitle=function(){var t=this.getInfoDict().lookup(rD.Title);if(t)return aQ(t),t.decodeText()},t.prototype.getAuthor=function(){var t=this.getInfoDict().lookup(rD.Author);if(t)return aQ(t),t.decodeText()},t.prototype.getSubject=function(){var t=this.getInfoDict().lookup(rD.Subject);if(t)return aQ(t),t.decodeText()},t.prototype.getKeywords=function(){var t=this.getInfoDict().lookup(rD.Keywords);if(t)return aQ(t),t.decodeText()},t.prototype.getCreator=function(){var t=this.getInfoDict().lookup(rD.Creator);if(t)return aQ(t),t.decodeText()},t.prototype.getProducer=function(){var t=this.getInfoDict().lookup(rD.Producer);if(t)return aQ(t),t.decodeText()},t.prototype.getCreationDate=function(){var t=this.getInfoDict().lookup(rD.CreationDate);if(t)return aQ(t),t.decodeDate()},t.prototype.getModificationDate=function(){var t=this.getInfoDict().lookup(rD.ModDate);if(t)return aQ(t),t.decodeDate()},t.prototype.setTitle=function(t,e){ez(t,"title",["string"]);var r=rD.of("Title");this.getInfoDict().set(r,rQ.fromText(t)),(null==e?void 0:e.showInWindowTitleBar)&&this.catalog.getOrCreateViewerPreferences().setDisplayDocTitle(!0)},t.prototype.setAuthor=function(t){ez(t,"author",["string"]);var e=rD.of("Author");this.getInfoDict().set(e,rQ.fromText(t))},t.prototype.setSubject=function(t){ez(t,"author",["string"]);var e=rD.of("Subject");this.getInfoDict().set(e,rQ.fromText(t))},t.prototype.setKeywords=function(t){ez(t,"keywords",[Array]);var e=rD.of("Keywords");this.getInfoDict().set(e,rQ.fromText(t.join(" ")))},t.prototype.setCreator=function(t){ez(t,"creator",["string"]);var e=rD.of("Creator");this.getInfoDict().set(e,rQ.fromText(t))},t.prototype.setProducer=function(t){ez(t,"creator",["string"]);var e=rD.of("Producer");this.getInfoDict().set(e,rQ.fromText(t))},t.prototype.setLanguage=function(t){ez(t,"language",["string"]);var e=rD.of("Lang");this.catalog.set(e,r8.of(t))},t.prototype.setCreationDate=function(t){ez(t,"creationDate",[[Date,"Date"]]);var e=rD.of("CreationDate");this.getInfoDict().set(e,r8.fromDate(t))},t.prototype.setModificationDate=function(t){ez(t,"modificationDate",[[Date,"Date"]]);var e=rD.of("ModDate");this.getInfoDict().set(e,r8.fromDate(t))},t.prototype.getPageCount=function(){return void 0===this.pageCount&&(this.pageCount=this.getPages().length),this.pageCount},t.prototype.getPages=function(){return this.pageCache.access()},t.prototype.getPage=function(t){var e=this.getPages();return eH(t,"index",0,e.length-1),e[t]},t.prototype.getPageIndices=function(){return tV(0,this.getPageCount())},t.prototype.removePage=function(t){var e=this.getPageCount();if(0===this.pageCount)throw new ar;eH(t,"index",0,e-1),this.catalog.removeLeafNode(t),this.pageCount=e-1},t.prototype.addPage=function(t){return ez(t,"page",["undefined",[a$,"PDFPage"],Array]),this.insertPage(this.getPageCount(),t)},t.prototype.insertPage=function(t,e){var r=this.getPageCount();if(eH(t,"index",0,r),ez(e,"page",["undefined",[a$,"PDFPage"],Array]),!e||Array.isArray(e)){var n=Array.isArray(e)?e:a_.A4;(e=a$.create(this)).setSize.apply(e,n)}else if(e.doc!==this)throw new ae;var o=this.catalog.insertLeafNode(e.ref,t);return e.node.setParent(o),this.pageMap.set(e.node,e),this.pageCache.invalidate(),this.pageCount=r+1,e},t.prototype.copyPages=function(e,r){return tu(this,void 0,void 0,function(){var n,o,i,a,s,u,c,l;return tc(this,function(h){switch(h.label){case 0:return ez(e,"srcDoc",[[t,"PDFDocument"]]),ez(r,"indices",[Array]),[4,e.flush()];case 1:for(h.sent(),n=rG.for(e.context,this.context),o=e.getPages(),i=Array(r.length),a=0,s=r.length;ae.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}(t,["dataUri"]),ez(r,"dataUri",["boolean"]),[4,this.save(n)];case 1:return o=tp(i.sent()),[2,r?"data:application/pdf;base64,"+o:o]}})})},t.prototype.findPageForAnnotationRef=function(t){for(var e=this.getPages(),r=0,n=e.length;rto],34006);let a$=function(){function t(t,e,r){this.fontSize=24,this.fontColor=iC(0,0,0),this.lineHeight=24,this.x=0,this.y=0,ez(t,"leafNode",[[rH,"PDFPageLeaf"]]),ez(e,"ref",[[rI,"PDFRef"]]),ez(r,"doc",[[aY,"PDFDocument"]]),this.node=t,this.ref=e,this.doc=r}return t.prototype.setRotation=function(t){var e=oF(t);eK(e,"degreesAngle",90),this.node.set(rD.of("Rotate"),this.doc.context.obj(e))},t.prototype.getRotation=function(){var t=this.node.Rotate();return ob(t?t.asNumber():0)},t.prototype.setSize=function(t,e){ez(t,"width",["number"]),ez(e,"height",["number"]);var r=this.getMediaBox();this.setMediaBox(r.x,r.y,t,e);var n=this.getCropBox(),o=this.getBleedBox(),i=this.getTrimBox(),a=this.getArtBox(),s=this.node.CropBox(),u=this.node.BleedBox(),c=this.node.TrimBox(),l=this.node.ArtBox();s&&eO(n,r)&&this.setCropBox(r.x,r.y,t,e),u&&eO(o,r)&&this.setBleedBox(r.x,r.y,t,e),c&&eO(i,r)&&this.setTrimBox(r.x,r.y,t,e),l&&eO(a,r)&&this.setArtBox(r.x,r.y,t,e)},t.prototype.setWidth=function(t){ez(t,"width",["number"]),this.setSize(t,this.getSize().height)},t.prototype.setHeight=function(t){ez(t,"height",["number"]),this.setSize(this.getSize().width,t)},t.prototype.setMediaBox=function(t,e,r,n){ez(t,"x",["number"]),ez(e,"y",["number"]),ez(r,"width",["number"]),ez(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(rD.MediaBox,o)},t.prototype.setCropBox=function(t,e,r,n){ez(t,"x",["number"]),ez(e,"y",["number"]),ez(r,"width",["number"]),ez(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(rD.CropBox,o)},t.prototype.setBleedBox=function(t,e,r,n){ez(t,"x",["number"]),ez(e,"y",["number"]),ez(r,"width",["number"]),ez(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(rD.BleedBox,o)},t.prototype.setTrimBox=function(t,e,r,n){ez(t,"x",["number"]),ez(e,"y",["number"]),ez(r,"width",["number"]),ez(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(rD.TrimBox,o)},t.prototype.setArtBox=function(t,e,r,n){ez(t,"x",["number"]),ez(e,"y",["number"]),ez(r,"width",["number"]),ez(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(rD.ArtBox,o)},t.prototype.getSize=function(){var t=this.getMediaBox();return{width:t.width,height:t.height}},t.prototype.getWidth=function(){return this.getSize().width},t.prototype.getHeight=function(){return this.getSize().height},t.prototype.getMediaBox=function(){return this.node.MediaBox().asRectangle()},t.prototype.getCropBox=function(){var t,e=this.node.CropBox();return null!=(t=null==e?void 0:e.asRectangle())?t:this.getMediaBox()},t.prototype.getBleedBox=function(){var t,e=this.node.BleedBox();return null!=(t=null==e?void 0:e.asRectangle())?t:this.getCropBox()},t.prototype.getTrimBox=function(){var t,e=this.node.TrimBox();return null!=(t=null==e?void 0:e.asRectangle())?t:this.getCropBox()},t.prototype.getArtBox=function(){var t,e=this.node.ArtBox();return null!=(t=null==e?void 0:e.asRectangle())?t:this.getCropBox()},t.prototype.translateContent=function(t,e){ez(t,"x",["number"]),ez(e,"y",["number"]),this.node.normalize(),this.getContentStream();var r=this.createContentStream(oV(),oI(t,e)),n=this.doc.context.register(r),o=this.createContentStream(oq()),i=this.doc.context.register(o);this.node.wrapContentStreams(n,i)},t.prototype.scale=function(t,e){ez(t,"x",["number"]),ez(e,"y",["number"]),this.setSize(this.getWidth()*t,this.getHeight()*e),this.scaleContent(t,e),this.scaleAnnotations(t,e)},t.prototype.scaleContent=function(t,e){ez(t,"x",["number"]),ez(e,"y",["number"]),this.node.normalize(),this.getContentStream();var r=this.createContentStream(oV(),oM(t,e)),n=this.doc.context.register(r),o=this.createContentStream(oq()),i=this.doc.context.register(o);this.node.wrapContentStreams(n,i)},t.prototype.scaleAnnotations=function(t,e){ez(t,"x",["number"]),ez(e,"y",["number"]);var r=this.node.Annots();if(r)for(var n=0;nn.file(t,e));let o=await n.generateAsync({type:"blob"}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=r,a.click(),URL.revokeObjectURL(i)}t.s([],55324),t.s([],78871),t.s([],59454),t.i(81353),t.s([],89308),t.i(59454),t.i(55324),t.i(90213),t.s(["PDFButton",0,a0,"PDFCheckBox",0,aE,"PDFDropdown",0,aW,"PDFField",0,aj,"PDFForm",0,aG,"PDFOptionList",0,az,"PDFRadioGroup",0,aL,"PDFSignature",0,aU,"PDFTextField",0,aH,"defaultButtonAppearanceProvider",()=>aP,"defaultCheckBoxAppearanceProvider",()=>ak,"defaultDropdownAppearanceProvider",()=>aB,"defaultOptionListAppearanceProvider",()=>aO,"defaultRadioGroupAppearanceProvider",()=>aD,"defaultTextFieldAppearanceProvider",()=>aT,"normalizeAppearance",()=>aw],44129),t.i(44129),t.i(78871),t.i(34282),t.i(45361),t.s(["TextAlignment",()=>tt,"layoutCombedText",()=>ab,"layoutMultilineText",()=>av,"layoutSinglelineText",()=>am],17772),t.i(17772),t.i(27003),t.i(68941),t.i(86234),t.i(25156),t.s(["ImageAlignment",()=>te],12174),t.i(12174),t.i(38109),t.i(85978),t.i(64406),t.i(88477),t.i(78020),t.i(34006),t.i(2375),t.i(76071),t.s(["PDFDocument",0,aY],75954),t.s(["downloadBytes",()=>a1,"downloadDataUrl",()=>a2,"downloadZip",()=>a5],43682)}]);