/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
 */var A={d:(e,t)=>{for(var i in t)A.o(t,i)&&!A.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(A,e)=>Object.prototype.hasOwnProperty.call(A,e)},e=globalThis.pdfjsWorker={};A.d(e,{WorkerMessageHandler:()=>iy});const t=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),i=[1,0,0,1,0,0],a=[.001,0,0,.001,0,0],s=1.35,n=.35,g=.25925925925925924,r=1,o=2,I=4,c=8,C=16,B=64,h=256,Q="pdfjs_internal_editor_",l=3,E=9,u=13,d=15,f={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},p=0,m=4,y=1,w=2,D=3,b=1,k=2,F=3,S=4,R=5,G=6,N=7,x=8,U=9,M=10,L=11,J=12,H=13,Y=14,v=15,K=16,q=17,T=20,P="Group",W="R",Z=1,O=2,X=4,V=16,j=32,z=128,_=512,$=1,AA=2,eA=4096,tA=8192,iA=32768,aA=65536,sA=131072,nA=1048576,gA=2097152,rA=8388608,oA=16777216,IA=1,cA=2,CA=3,BA=4,hA=5,QA={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},lA={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},EA={O:"PageOpen",C:"PageClose"},uA=1,dA=5,fA=0,pA=1,mA=1,yA=2,wA=3,DA=4,bA=5,kA=6,FA=7,SA=8,RA=9,GA=10,NA=11,xA=12,UA=13,MA=14,LA=15,JA=16,HA=17,YA=18,vA=19,KA=20,qA=21,TA=22,PA=23,WA=24,ZA=25,OA=26,XA=27,VA=28,jA=29,zA=30,_A=31,$A=32,Ae=33,ee=34,te=35,ie=36,ae=37,se=38,ne=39,ge=40,re=41,oe=42,Ie=43,ce=44,Ce=45,Be=46,he=47,Qe=48,le=49,Ee=50,ue=51,de=52,fe=53,pe=54,me=55,ye=56,we=57,De=58,be=59,ke=60,Fe=61,Se=62,Re=63,Ge=64,Ne=65,xe=66,Ue=67,Me=68,Le=69,Je=70,He=71,Ye=72,ve=73,Ke=74,qe=75,Te=76,Pe=77,We=80,Ze=81,Oe=83,Xe=84,Ve=85,je=86,ze=87,_e=88,$e=89,At=90,et=91,tt=1,it=2;let at=uA;function st(){return at}function nt(A){at>=dA&&console.log(`Info: ${A}`)}function gt(A){at>=uA&&console.log(`Warning: ${A}`)}function rt(A){throw new Error(A)}function ot(A,e){A||rt(e)}function It(A,e=null,t=null){if(!A)return null;try{if(t&&"string"==typeof A){if(t.addDefaultProtocol&&A.startsWith("www.")){const e=A.match(/\./g);e?.length>=2&&(A=`http://${A}`)}if(t.tryConvertEncoding)try{A=St(A)}catch{}}const i=e?new URL(A,e):new URL(A);if(function(A){switch(A?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch{}return null}function ct(A,e,t,i=!1){return Object.defineProperty(A,e,{value:t,enumerable:!i,configurable:!0,writable:!1}),t}const Ct=function(){function A(e,t){this.constructor===A&&rt("Cannot initialize BaseException."),this.message=e,this.name=t}return A.prototype=new Error,A.constructor=A,A}();class Bt extends Ct{constructor(A,e){super(A,"PasswordException"),this.code=e}}class ht extends Ct{constructor(A,e){super(A,"UnknownErrorException"),this.details=e}}class Qt extends Ct{constructor(A){super(A,"InvalidPDFException")}}class lt extends Ct{constructor(A){super(A,"MissingPDFException")}}class Et extends Ct{constructor(A,e){super(A,"UnexpectedResponseException"),this.status=e}}class ut extends Ct{constructor(A){super(A,"FormatError")}}class dt extends Ct{constructor(A){super(A,"AbortException")}}function ft(A){"object"==typeof A&&void 0!==A?.length||rt("Invalid argument for bytesToString");const e=A.length,t=8192;if(e<t)return String.fromCharCode.apply(null,A);const i=[];for(let a=0;a<e;a+=t){const s=Math.min(a+t,e),n=A.subarray(a,s);i.push(String.fromCharCode.apply(null,n))}return i.join("")}function pt(A){"string"!=typeof A&&rt("Invalid argument for stringToBytes");const e=A.length,t=new Uint8Array(e);for(let i=0;i<e;++i)t[i]=255&A.charCodeAt(i);return t}function mt(A){return String.fromCharCode(A>>24&255,A>>16&255,A>>8&255,255&A)}function yt(A){return Object.keys(A).length}class wt{static get isLittleEndian(){return ct(this,"isLittleEndian",function(){const A=new Uint8Array(4);return A[0]=1,1===new Uint32Array(A.buffer,0,1)[0]}())}static get isEvalSupported(){return ct(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return ct(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"!=typeof navigator&&"string"==typeof navigator?.platform?ct(this,"platform",{isMac:navigator.platform.includes("Mac")}):ct(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){return ct(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const Dt=Array.from(Array(256).keys(),A=>A.toString(16).padStart(2,"0"));class bt{static makeHexColor(A,e,t){return`#${Dt[A]}${Dt[e]}${Dt[t]}`}static scaleMinMax(A,e){let t;A[0]?(A[0]<0&&(t=e[0],e[0]=e[2],e[2]=t),e[0]*=A[0],e[2]*=A[0],A[3]<0&&(t=e[1],e[1]=e[3],e[3]=t),e[1]*=A[3],e[3]*=A[3]):(t=e[0],e[0]=e[1],e[1]=t,t=e[2],e[2]=e[3],e[3]=t,A[1]<0&&(t=e[1],e[1]=e[3],e[3]=t),e[1]*=A[1],e[3]*=A[1],A[2]<0&&(t=e[0],e[0]=e[2],e[2]=t),e[0]*=A[2],e[2]*=A[2]),e[0]+=A[4],e[1]+=A[5],e[2]+=A[4],e[3]+=A[5]}static transform(A,e){return[A[0]*e[0]+A[2]*e[1],A[1]*e[0]+A[3]*e[1],A[0]*e[2]+A[2]*e[3],A[1]*e[2]+A[3]*e[3],A[0]*e[4]+A[2]*e[5]+A[4],A[1]*e[4]+A[3]*e[5]+A[5]]}static applyTransform(A,e){return[A[0]*e[0]+A[1]*e[2]+e[4],A[0]*e[1]+A[1]*e[3]+e[5]]}static applyInverseTransform(A,e){const t=e[0]*e[3]-e[1]*e[2];return[(A[0]*e[3]-A[1]*e[2]+e[2]*e[5]-e[4]*e[3])/t,(-A[0]*e[1]+A[1]*e[0]+e[4]*e[1]-e[5]*e[0])/t]}static getAxialAlignedBoundingBox(A,e){const t=this.applyTransform(A,e),i=this.applyTransform(A.slice(2,4),e),a=this.applyTransform([A[0],A[3]],e),s=this.applyTransform([A[2],A[1]],e);return[Math.min(t[0],i[0],a[0],s[0]),Math.min(t[1],i[1],a[1],s[1]),Math.max(t[0],i[0],a[0],s[0]),Math.max(t[1],i[1],a[1],s[1])]}static inverseTransform(A){const e=A[0]*A[3]-A[1]*A[2];return[A[3]/e,-A[1]/e,-A[2]/e,A[0]/e,(A[2]*A[5]-A[4]*A[3])/e,(A[4]*A[1]-A[5]*A[0])/e]}static singularValueDecompose2dScale(A){const e=[A[0],A[2],A[1],A[3]],t=A[0]*e[0]+A[1]*e[2],i=A[0]*e[1]+A[1]*e[3],a=A[2]*e[0]+A[3]*e[2],s=A[2]*e[1]+A[3]*e[3],n=(t+s)/2,g=Math.sqrt((t+s)**2-4*(t*s-a*i))/2,r=n+g||1,o=n-g||1;return[Math.sqrt(r),Math.sqrt(o)]}static normalizeRect(A){const e=A.slice(0);return A[0]>A[2]&&(e[0]=A[2],e[2]=A[0]),A[1]>A[3]&&(e[1]=A[3],e[3]=A[1]),e}static intersect(A,e){const t=Math.max(Math.min(A[0],A[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(A[0],A[2]),Math.max(e[0],e[2]));if(t>i)return null;const a=Math.max(Math.min(A[1],A[3]),Math.min(e[1],e[3])),s=Math.min(Math.max(A[1],A[3]),Math.max(e[1],e[3]));return a>s?null:[t,a,i,s]}static#A(A,e,t,i,a,s,n,g,r,o){if(r<=0||r>=1)return;const I=1-r,c=r*r,C=c*r,B=I*(I*(I*A+3*r*e)+3*c*t)+C*i,h=I*(I*(I*a+3*r*s)+3*c*n)+C*g;o[0]=Math.min(o[0],B),o[1]=Math.min(o[1],h),o[2]=Math.max(o[2],B),o[3]=Math.max(o[3],h)}static#e(A,e,t,i,a,s,n,g,r,o,I,c){if(Math.abs(r)<1e-12)return void(Math.abs(o)>=1e-12&&this.#A(A,e,t,i,a,s,n,g,-I/o,c));const C=o**2-4*I*r;if(C<0)return;const B=Math.sqrt(C),h=2*r;this.#A(A,e,t,i,a,s,n,g,(-o+B)/h,c),this.#A(A,e,t,i,a,s,n,g,(-o-B)/h,c)}static bezierBoundingBox(A,e,t,i,a,s,n,g,r){return r?(r[0]=Math.min(r[0],A,n),r[1]=Math.min(r[1],e,g),r[2]=Math.max(r[2],A,n),r[3]=Math.max(r[3],e,g)):r=[Math.min(A,n),Math.min(e,g),Math.max(A,n),Math.max(e,g)],this.#e(A,t,a,n,e,i,s,g,3*(3*(t-a)-A+n),6*(A-2*t+a),3*(t-A),r),this.#e(A,t,a,n,e,i,s,g,3*(3*(i-s)-e+g),6*(e-2*i+s),3*(i-e),r),r}}const kt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function Ft(A){if(A[0]>="ï"){let e;if("þ"===A[0]&&"ÿ"===A[1]?(e="utf-16be",A.length%2==1&&(A=A.slice(0,-1))):"ÿ"===A[0]&&"þ"===A[1]?(e="utf-16le",A.length%2==1&&(A=A.slice(0,-1))):"ï"===A[0]&&"»"===A[1]&&"¿"===A[2]&&(e="utf-8"),e)try{const t=new TextDecoder(e,{fatal:!0}),i=pt(A),a=t.decode(i);return a.includes("")?a.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g,""):a}catch(A){gt(`stringToPDFString: "${A}".`)}}const e=[];for(let t=0,i=A.length;t<i;t++){const a=A.charCodeAt(t);if(27===a){for(;++t<i&&27!==A.charCodeAt(t););continue}const s=kt[a];e.push(s?String.fromCharCode(s):A.charAt(t))}return e.join("")}function St(A){return decodeURIComponent(escape(A))}function Rt(A){return unescape(encodeURIComponent(A))}function Gt(A,e){if(A.length!==e.length)return!1;for(let t=0,i=A.length;t<i;t++)if(A[t]!==e[t])return!1;return!0}function Nt(A=new Date){return[A.getUTCFullYear().toString(),(A.getUTCMonth()+1).toString().padStart(2,"0"),A.getUTCDate().toString().padStart(2,"0"),A.getUTCHours().toString().padStart(2,"0"),A.getUTCMinutes().toString().padStart(2,"0"),A.getUTCSeconds().toString().padStart(2,"0")].join("")}let xt=null,Ut=null;const Mt=0,Lt=1,Jt=2,Ht=3,Yt=4,vt=5,Kt=6,qt=7,Tt=8,Pt=Symbol("CIRCULAR_REF"),Wt=Symbol("EOF");let Zt=Object.create(null),Ot=Object.create(null),Xt=Object.create(null);class Vt{constructor(A){this.name=A}static get(A){return Ot[A]||=new Vt(A)}}class jt{constructor(A){this.cmd=A}static get(A){return Zt[A]||=new jt(A)}}const zt=function(){return zt};class _t{constructor(A=null){this._map=Object.create(null),this.xref=A,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=zt}assignXref(A){this.xref=A}get size(){return Object.keys(this._map).length}get(A,e,t){let i=this._map[A];return void 0===i&&void 0!==e&&(i=this._map[e],void 0===i&&void 0!==t&&(i=this._map[t])),i instanceof $t&&this.xref?this.xref.fetch(i,this.suppressEncryption):i}async getAsync(A,e,t){let i=this._map[A];return void 0===i&&void 0!==e&&(i=this._map[e],void 0===i&&void 0!==t&&(i=this._map[t])),i instanceof $t&&this.xref?this.xref.fetchAsync(i,this.suppressEncryption):i}getArray(A,e,t){let i=this._map[A];if(void 0===i&&void 0!==e&&(i=this._map[e],void 0===i&&void 0!==t&&(i=this._map[t])),i instanceof $t&&this.xref&&(i=this.xref.fetch(i,this.suppressEncryption)),Array.isArray(i)){i=i.slice();for(let A=0,e=i.length;A<e;A++)i[A]instanceof $t&&this.xref&&(i[A]=this.xref.fetch(i[A],this.suppressEncryption))}return i}getRaw(A){return this._map[A]}getKeys(){return Object.keys(this._map)}getRawValues(){return Object.values(this._map)}set(A,e){this._map[A]=e}has(A){return void 0!==this._map[A]}forEach(A){for(const e in this._map)A(e,this.get(e))}static get empty(){const A=new _t(null);return A.set=(A,e)=>{rt("Should not call `set` on the empty dictionary.")},ct(this,"empty",A)}static merge({xref:A,dictArray:e,mergeSubDicts:t=!1}){const i=new _t(A),a=new Map;for(const A of e)if(A instanceof _t)for(const[e,i]of Object.entries(A._map)){let A=a.get(e);if(void 0===A)A=[],a.set(e,A);else if(!(t&&i instanceof _t))continue;A.push(i)}for(const[e,t]of a){if(1===t.length||!(t[0]instanceof _t)){i._map[e]=t[0];continue}const a=new _t(A);for(const A of t)for(const[e,t]of Object.entries(A._map))void 0===a._map[e]&&(a._map[e]=t);a.size>0&&(i._map[e]=a)}return a.clear(),i.size>0?i:_t.empty}clone(){const A=new _t(this.xref);for(const e of this.getKeys())A.set(e,this.getRaw(e));return A}}class $t{constructor(A,e){this.num=A,this.gen=e}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(A){const e=Xt[A];if(e)return e;const t=/^(\d+)R(\d*)$/.exec(A);return t&&"0"!==t[1]?Xt[A]=new $t(parseInt(t[1]),t[2]?parseInt(t[2]):0):null}static get(A,e){const t=0===e?`${A}R`:`${A}R${e}`;return Xt[t]||=new $t(A,e)}}class Ai{constructor(A=null){this._set=new Set(A?._set)}has(A){return this._set.has(A.toString())}put(A){this._set.add(A.toString())}remove(A){this._set.delete(A.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}class ei{constructor(){this._map=new Map}get size(){return this._map.size}get(A){return this._map.get(A.toString())}has(A){return this._map.has(A.toString())}put(A,e){this._map.set(A.toString(),e)}putAlias(A,e){this._map.set(A.toString(),this.get(e))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*items(){for(const[A,e]of this._map)yield[$t.fromString(A),e]}}function ti(A,e){return A instanceof Vt&&(void 0===e||A.name===e)}function ii(A,e){return A instanceof jt&&(void 0===e||A.cmd===e)}function ai(A,e){return A instanceof _t&&(void 0===e||ti(A.get("Type"),e))}function si(A,e){return A.num===e.num&&A.gen===e.gen}class ni{constructor(){this.constructor===ni&&rt("Cannot initialize BaseStream.")}get length(){rt("Abstract getter `length` accessed")}get isEmpty(){rt("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return ct(this,"isDataLoaded",!0)}getByte(){rt("Abstract method `getByte` called")}getBytes(A){rt("Abstract method `getBytes` called")}async getImageData(A,e){return this.getBytes(A,e)}async asyncGetBytes(){rt("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}peekByte(){const A=this.getByte();return-1!==A&&this.pos--,A}peekBytes(A){const e=this.getBytes(A);return this.pos-=e.length,e}getUint16(){const A=this.getByte(),e=this.getByte();return-1===A||-1===e?-1:(A<<8)+e}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(A,e){rt("Abstract method `getByteRange` called")}getString(A){return ft(this.getBytes(A))}skip(A){this.pos+=A||1}reset(){rt("Abstract method `reset` called")}moveStart(){rt("Abstract method `moveStart` called")}makeSubStream(A,e,t=null){rt("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}const gi=/^[1-9]\.\d$/;function ri(A){let e;return function(){return A&&(e=Object.create(null),A(e),A=null),e}}class oi extends Ct{constructor(A,e){super(`Missing data [${A}, ${e})`,"MissingDataException"),this.begin=A,this.end=e}}class Ii extends Ct{constructor(A){super(A,"ParserEOFException")}}class ci extends Ct{constructor(A){super(A,"XRefEntryException")}}class Ci extends Ct{constructor(A){super(A,"XRefParseException")}}function Bi(A){const e=A.length;if(0===e)return new Uint8Array(0);if(1===e)return new Uint8Array(A[0]);let t=0;for(let i=0;i<e;i++)t+=A[i].byteLength;const i=new Uint8Array(t);let a=0;for(let t=0;t<e;t++){const e=new Uint8Array(A[t]);i.set(e,a),a+=e.byteLength}return i}function hi({dict:A,key:e,getArray:t=!1,stopWhenFound:i=!0}){let a;const s=new Ai;for(;A instanceof _t&&(!A.objId||!s.has(A.objId));){A.objId&&s.put(A.objId);const n=t?A.getArray(e):A.get(e);if(void 0!==n){if(i)return n;(a||=[]).push(n)}A=A.get("Parent")}return a}const Qi=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function li(A,e=!1){ot(Number.isInteger(A)&&A>0,"The number should be a positive integer.");const t=[];let i;for(;A>=1e3;)A-=1e3,t.push("M");i=A/100|0,A%=100,t.push(Qi[i]),i=A/10|0,A%=10,t.push(Qi[10+i]),t.push(Qi[20+A]);const a=t.join("");return e?a.toLowerCase():a}function Ei(A){return A<=0?0:Math.ceil(Math.log2(A))}function ui(A,e){return A[e]<<24>>24}function di(A,e){return A[e]<<8|A[e+1]}function fi(A,e){return(A[e]<<24|A[e+1]<<16|A[e+2]<<8|A[e+3])>>>0}function pi(A){return 32===A||9===A||13===A||10===A}function mi(A,e){return Array.isArray(A)&&(null===e||A.length===e)&&A.every(A=>"number"==typeof A)}function yi(A,e){return mi(A,6)?A:e}function wi(A,e){return mi(A,4)?A:e}function Di(A,e){return mi(A,4)?bt.normalizeRect(A):e}function bi(A){const e=/(.+)\[(\d+)\]$/;return A.split(".").map(A=>{const t=A.match(e);return t?{name:t[1],pos:parseInt(t[2],10)}:{name:A,pos:0}})}function ki(A){const e=[];let t=0;for(let i=0,a=A.length;i<a;i++){const a=A.charCodeAt(i);(a<33||a>126||35===a||40===a||41===a||60===a||62===a||91===a||93===a||123===a||125===a||47===a||37===a)&&(t<i&&e.push(A.substring(t,i)),e.push(`#${a.toString(16)}`),t=i+1)}return 0===e.length?A:(t<A.length&&e.push(A.substring(t,A.length)),e.join(""))}function Fi(A){return A.replaceAll(/([()\\\n\r])/g,A=>"\n"===A?"\\n":"\r"===A?"\\r":`\\${A}`)}function Si(A,e,t,i){if(!A)return;let a=null;if(A instanceof $t){if(i.has(A))return;a=A,i.put(a),A=e.fetch(A)}if(Array.isArray(A))for(const a of A)Si(a,e,t,i);else if(A instanceof _t){if(ti(A.get("S"),"JavaScript")){const e=A.get("JS");let i;e instanceof ni?i=e.getString():"string"==typeof e&&(i=e),i&&=Ft(i).replaceAll("\0",""),i&&t.push(i)}Si(A.getRaw("Next"),e,t,i)}a&&i.remove(a)}function Ri(A,e,t){const i=Object.create(null),a=hi({dict:e,key:"AA",stopWhenFound:!1});if(a)for(let e=a.length-1;e>=0;e--){const s=a[e];if(s instanceof _t)for(const e of s.getKeys()){const a=t[e];if(!a)continue;const n=[];Si(s.getRaw(e),A,n,new Ai),n.length>0&&(i[a]=n)}}if(e.has("A")){const t=[];Si(e.get("A"),A,t,new Ai),t.length>0&&(i.Action=t)}return yt(i)>0?i:null}const Gi={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function*Ni(A){for(let e=0,t=A.length;e<t;e++){const t=A.codePointAt(e);t>55295&&(t<57344||t>65533)&&e++,yield t}}function xi(A){const e=[];let t=0;for(let i=0,a=A.length;i<a;i++){const a=A.codePointAt(i);if(32<=a&&a<=126){const s=Gi[a];s&&(t<i&&e.push(A.substring(t,i)),e.push(s),t=i+1)}else t<i&&e.push(A.substring(t,i)),e.push(`&#x${a.toString(16).toUpperCase()};`),a>55295&&(a<57344||a>65533)&&i++,t=i+1}return 0===e.length?A:(t<A.length&&e.push(A.substring(t,A.length)),e.join(""))}function Ui(A,e=!1){const t=/^("|').*("|')$/.exec(A);if(t&&t[1]===t[2]){if(new RegExp(`[^\\\\]${t[1]}`).test(A.slice(1,-1)))return e&&gt(`FontFamily contains unescaped ${t[1]}: ${A}.`),!1}else for(const t of A.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(t)||!/^[\w-\\]+$/.test(t))return e&&gt(`FontFamily contains invalid <custom-ident>: ${A}.`),!1;return!0}function Mi(A){const e=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:t,fontWeight:i,italicAngle:a}=A;if(!Ui(t,!0))return!1;const s=i?i.toString():"";A.fontWeight=e.has(s)?s:"400";const n=parseFloat(a);return A.italicAngle=isNaN(n)||n<-90||n>90?"14":a.toString(),!0}function Li(A){const e=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(A);if(e?.[2]){const A=e[2];let t=!1;return"true"===e[3]&&"app.launchURL"===e[1]&&(t=!0),{url:A,newWindow:t}}return null}function Ji(A){if(Number.isInteger(A))return A.toString();const e=Math.round(100*A);return e%100==0?(e/100).toString():e%10==0?A.toFixed(1):A.toFixed(2)}function Hi(A){if(!A)return null;const e=new Map;for(const[t,i]of A){if(!t.startsWith(Q))continue;let A=e.get(i.pageIndex);A||(A=[],e.set(i.pageIndex,A)),A.push(i)}return e.size>0?e:null}function Yi(A){return/^[\x00-\x7F]*$/.test(A)}function vi(A){const e=[];for(let t=0,i=A.length;t<i;t++){const i=A.charCodeAt(t);e.push((i>>8&255).toString(16).padStart(2,"0"),(255&i).toString(16).padStart(2,"0"))}return e.join("")}function Ki(A,e=!1){const t=[];e&&t.push("þÿ");for(let e=0,i=A.length;e<i;e++){const i=A.charCodeAt(e);t.push(String.fromCharCode(i>>8&255),String.fromCharCode(255&i))}return t.join("")}function qi(A,e,t){switch(A){case 90:return[0,1,-1,0,e,0];case 180:return[-1,0,0,-1,e,t];case 270:return[0,-1,1,0,0,t];default:throw new Error("Invalid rotation")}}function Ti(A){return Math.ceil(Math.ceil(Math.log2(1+A))/8)}class Pi extends ni{constructor(A,e,t,i){super(),this.bytes=A instanceof Uint8Array?A:new Uint8Array(A),this.start=e||0,this.pos=this.start,this.end=e+t||this.bytes.length,this.dict=i}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(A){const e=this.bytes,t=this.pos,i=this.end;if(!A)return e.subarray(t,i);let a=t+A;return a>i&&(a=i),this.pos=a,e.subarray(t,a)}getByteRange(A,e){return A<0&&(A=0),e>this.end&&(e=this.end),this.bytes.subarray(A,e)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(A,e,t=null){return new Pi(this.bytes.buffer,A,e,t)}}class Wi extends Pi{constructor(A){super(pt(A))}}class Zi extends Pi{constructor(){super(new Uint8Array(0))}}class Oi extends Pi{constructor(A,e,t){super(new Uint8Array(A),0,A,null),this.chunkSize=e,this._loadedChunks=new Set,this.numChunks=Math.ceil(A/e),this.manager=t,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const A=[];for(let e=0,t=this.numChunks;e<t;++e)this._loadedChunks.has(e)||A.push(e);return A}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(A,e){const t=this.chunkSize;if(A%t!==0)throw new Error(`Bad begin offset: ${A}`);const i=A+e.byteLength;if(i%t!==0&&i!==this.bytes.length)throw new Error(`Bad end offset: ${i}`);this.bytes.set(new Uint8Array(e),A);const a=Math.floor(A/t),s=Math.floor((i-1)/t)+1;for(let A=a;A<s;++A)this._loadedChunks.add(A)}onReceiveProgressiveData(A){let e=this.progressiveDataLength;const t=Math.floor(e/this.chunkSize);this.bytes.set(new Uint8Array(A),e),e+=A.byteLength,this.progressiveDataLength=e;const i=e>=this.end?this.numChunks:Math.floor(e/this.chunkSize);for(let A=t;A<i;++A)this._loadedChunks.add(A)}ensureByte(A){if(A<this.progressiveDataLength)return;const e=Math.floor(A/this.chunkSize);if(!(e>this.numChunks)&&e!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(e))throw new oi(A,A+1);this.lastSuccessfulEnsureByteChunk=e}}ensureRange(A,e){if(A>=e)return;if(e<=this.progressiveDataLength)return;const t=Math.floor(A/this.chunkSize);if(t>this.numChunks)return;const i=Math.min(Math.floor((e-1)/this.chunkSize)+1,this.numChunks);for(let a=t;a<i;++a)if(!this._loadedChunks.has(a))throw new oi(A,e)}nextEmptyChunk(A){const e=this.numChunks;for(let t=0;t<e;++t){const i=(A+t)%e;if(!this._loadedChunks.has(i))return i}return null}hasChunk(A){return this._loadedChunks.has(A)}getByte(){const A=this.pos;return A>=this.end?-1:(A>=this.progressiveDataLength&&this.ensureByte(A),this.bytes[this.pos++])}getBytes(A){const e=this.bytes,t=this.pos,i=this.end;if(!A)return i>this.progressiveDataLength&&this.ensureRange(t,i),e.subarray(t,i);let a=t+A;return a>i&&(a=i),a>this.progressiveDataLength&&this.ensureRange(t,a),this.pos=a,e.subarray(t,a)}getByteRange(A,e){return A<0&&(A=0),e>this.end&&(e=this.end),e>this.progressiveDataLength&&this.ensureRange(A,e),this.bytes.subarray(A,e)}makeSubStream(A,e,t=null){function i(){}e?A+e>this.progressiveDataLength&&this.ensureRange(A,A+e):A>=this.progressiveDataLength&&this.ensureByte(A),i.prototype=Object.create(this),i.prototype.getMissingChunks=function(){const A=this.chunkSize,e=Math.floor(this.start/A),t=Math.floor((this.end-1)/A)+1,i=[];for(let A=e;A<t;++A)this._loadedChunks.has(A)||i.push(A);return i},Object.defineProperty(i.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const a=new i;return a.pos=a.start=A,a.end=A+e||this.end,a.dict=t,a}getBaseStreams(){return[this]}}class Xi{constructor(A,e){this.length=e.length,this.chunkSize=e.rangeChunkSize,this.stream=new Oi(this.length,this.chunkSize,this),this.pdfNetworkStream=A,this.disableAutoFetch=e.disableAutoFetch,this.msgHandler=e.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=Promise.withResolvers()}sendRequest(A,e){const t=this.pdfNetworkStream.getRangeReader(A,e);t.isStreamingSupported||(t.onProgress=this.onProgress.bind(this));let i=[],a=0;return new Promise((A,e)=>{const s=({value:n,done:g})=>{try{if(g){const e=Bi(i);return i=null,void A(e)}a+=n.byteLength,t.isStreamingSupported&&this.onProgress({loaded:a}),i.push(n),t.read().then(s,e)}catch(A){e(A)}};t.read().then(s,e)}).then(e=>{this.aborted||this.onReceiveData({chunk:e,begin:A})})}requestAllChunks(A=!1){if(!A){const A=this.stream.getMissingChunks();this._requestChunks(A)}return this._loadedStreamCapability.promise}_requestChunks(A){const e=this.currRequestId++,t=new Set;this._chunksNeededByRequest.set(e,t);for(const e of A)this.stream.hasChunk(e)||t.add(e);if(0===t.size)return Promise.resolve();const i=Promise.withResolvers();this._promisesByRequest.set(e,i);const a=[];for(const A of t){let t=this._requestsByChunk.get(A);t||(t=[],this._requestsByChunk.set(A,t),a.push(A)),t.push(e)}if(a.length>0){const A=this.groupChunks(a);for(const e of A){const A=e.beginChunk*this.chunkSize,t=Math.min(e.endChunk*this.chunkSize,this.length);this.sendRequest(A,t).catch(i.reject)}}return i.promise.catch(A=>{if(!this.aborted)throw A})}getStream(){return this.stream}requestRange(A,e){e=Math.min(e,this.length);const t=this.getBeginChunk(A),i=this.getEndChunk(e),a=[];for(let A=t;A<i;++A)a.push(A);return this._requestChunks(a)}requestRanges(A=[]){const e=[];for(const t of A){const A=this.getBeginChunk(t.begin),i=this.getEndChunk(t.end);for(let t=A;t<i;++t)e.includes(t)||e.push(t)}return e.sort(function(A,e){return A-e}),this._requestChunks(e)}groupChunks(A){const e=[];let t=-1,i=-1;for(let a=0,s=A.length;a<s;++a){const s=A[a];t<0&&(t=s),i>=0&&i+1!==s&&(e.push({beginChunk:t,endChunk:i+1}),t=s),a+1===A.length&&e.push({beginChunk:t,endChunk:s+1}),i=s}return e}onProgress(A){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+A.loaded,total:this.length})}onReceiveData(A){const e=A.chunk,t=void 0===A.begin,i=t?this.progressiveDataLength:A.begin,a=i+e.byteLength,s=Math.floor(i/this.chunkSize),n=a<this.length?Math.floor(a/this.chunkSize):Math.ceil(a/this.chunkSize);t?(this.stream.onReceiveProgressiveData(e),this.progressiveDataLength=a):this.stream.onReceiveData(i,e),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const g=[];for(let A=s;A<n;++A){const e=this._requestsByChunk.get(A);if(e){this._requestsByChunk.delete(A);for(const t of e){const e=this._chunksNeededByRequest.get(t);e.has(A)&&e.delete(A),e.size>0||g.push(t)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let A;if(1===this.stream.numChunksLoaded){const e=this.stream.numChunks-1;this.stream.hasChunk(e)||(A=e)}else A=this.stream.nextEmptyChunk(n);Number.isInteger(A)&&this._requestChunks([A])}for(const A of g){const e=this._promisesByRequest.get(A);this._promisesByRequest.delete(A),e.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(A){this._loadedStreamCapability.reject(A)}getBeginChunk(A){return Math.floor(A/this.chunkSize)}getEndChunk(A){return Math.floor((A-1)/this.chunkSize)+1}abort(A){this.aborted=!0,this.pdfNetworkStream?.cancelAllRequests(A);for(const e of this._promisesByRequest.values())e.reject(A)}}class Vi{constructor(A,e){this.constructor===Vi&&rt("Cannot initialize ColorSpace."),this.name=A,this.numComps=e}getRgb(A,e){const t=new Uint8ClampedArray(3);return this.getRgbItem(A,e,t,0),t}getRgbItem(A,e,t,i){rt("Should not call ColorSpace.getRgbItem")}getRgbBuffer(A,e,t,i,a,s,n){rt("Should not call ColorSpace.getRgbBuffer")}getOutputLength(A,e){rt("Should not call ColorSpace.getOutputLength")}isPassthrough(A){return!1}isDefaultDecode(A,e){return Vi.isDefaultDecode(A,this.numComps)}fillRgb(A,e,t,i,a,s,n,g,r){const o=e*t;let I=null;const c=1<<n,C=t!==a||e!==i;if(this.isPassthrough(n))I=g;else if(1===this.numComps&&o>c&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const e=n<=8?new Uint8Array(c):new Uint16Array(c);for(let A=0;A<c;A++)e[A]=A;const t=new Uint8ClampedArray(3*c);if(this.getRgbBuffer(e,0,c,t,0,n,0),C){I=new Uint8Array(3*o);let A=0;for(let e=0;e<o;++e){const i=3*g[e];I[A++]=t[i],I[A++]=t[i+1],I[A++]=t[i+2]}}else{let e=0;for(let i=0;i<o;++i){const a=3*g[i];A[e++]=t[a],A[e++]=t[a+1],A[e++]=t[a+2],e+=r}}}else C?(I=new Uint8ClampedArray(3*o),this.getRgbBuffer(g,0,o,I,0,n,0)):this.getRgbBuffer(g,0,i*s,A,0,n,r);if(I)if(C)!function(A,e,t,i,a,s,n){n=1!==n?0:n;const g=t/a,r=i/s;let o,I=0;const c=new Uint16Array(a),C=3*t;for(let A=0;A<a;A++)c[A]=3*Math.floor(A*g);for(let t=0;t<s;t++){const i=Math.floor(t*r)*C;for(let t=0;t<a;t++)o=i+c[t],e[I++]=A[o++],e[I++]=A[o++],e[I++]=A[o++],I+=n}}(I,A,e,t,i,a,r);else{let e=0,t=0;for(let a=0,n=i*s;a<n;a++)A[e++]=I[t++],A[e++]=I[t++],A[e++]=I[t++],e+=r}}get usesZeroToOneRange(){return ct(this,"usesZeroToOneRange",!0)}static _cache(A,e,t,i){if(!t)throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!i)throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.');let a,s;A instanceof $t&&(s=A,A=e.fetch(A)),A instanceof Vt&&(a=A.name),(a||s)&&t.set(a,s,i)}static getCached(A,e,t){if(!t)throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(A instanceof $t){const i=t.getByRef(A);if(i)return i;try{A=e.fetch(A)}catch(A){if(A instanceof oi)throw A}}if(A instanceof Vt){const e=t.getByName(A.name);if(e)return e}return null}static async parseAsync({cs:A,xref:e,resources:t=null,pdfFunctionFactory:i,localColorSpaceCache:a}){const s=this._parse(A,e,t,i);return this._cache(A,e,a,s),s}static parse({cs:A,xref:e,resources:t=null,pdfFunctionFactory:i,localColorSpaceCache:a}){const s=this.getCached(A,e,a);if(s)return s;const n=this._parse(A,e,t,i);return this._cache(A,e,a,n),n}static _parse(A,e,t=null,i){if((A=e.fetchIfRef(A))instanceof Vt)switch(A.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"DeviceRGBA":return this.singletons.rgba;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new zi(null);default:if(t instanceof _t){const a=t.get("ColorSpace");if(a instanceof _t){const s=a.get(A.name);if(s){if(s instanceof Vt)return this._parse(s,e,t,i);A=s;break}}}throw new ut(`Unrecognized ColorSpace: ${A.name}`)}if(Array.isArray(A)){const a=e.fetchIfRef(A[0]).name;let s,n,g,r,o,I;switch(a){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return s=e.fetchIfRef(A[1]),r=s.getArray("WhitePoint"),o=s.getArray("BlackPoint"),I=s.get("Gamma"),new ia(r,o,I);case"CalRGB":s=e.fetchIfRef(A[1]),r=s.getArray("WhitePoint"),o=s.getArray("BlackPoint"),I=s.getArray("Gamma");const c=s.getArray("Matrix");return new aa(r,o,I,c);case"ICCBased":const C=e.fetchIfRef(A[1]).dict;n=C.get("N");const B=C.get("Alternate");if(B){const A=this._parse(B,e,t,i);if(A.numComps===n)return A;gt("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===n)return this.singletons.gray;if(3===n)return this.singletons.rgb;if(4===n)return this.singletons.cmyk;break;case"Pattern":return g=A[1]||null,g&&(g=this._parse(g,e,t,i)),new zi(g);case"I":case"Indexed":g=this._parse(A[1],e,t,i);const h=e.fetchIfRef(A[2])+1,Q=e.fetchIfRef(A[3]);return new _i(g,h,Q);case"Separation":case"DeviceN":const l=e.fetchIfRef(A[1]);n=Array.isArray(l)?l.length:1,g=this._parse(A[2],e,t,i);const E=i.create(A[3]);return new ji(n,g,E);case"Lab":s=e.fetchIfRef(A[1]),r=s.getArray("WhitePoint"),o=s.getArray("BlackPoint");const u=s.getArray("Range");return new sa(r,o,u);default:throw new ut(`Unimplemented ColorSpace object: ${a}`)}}throw new ut(`Unrecognized ColorSpace object: ${A}`)}static isDefaultDecode(A,e){if(!Array.isArray(A))return!0;if(2*e!==A.length)return gt("The decode map is not the correct length"),!0;for(let e=0,t=A.length;e<t;e+=2)if(0!==A[e]||1!==A[e+1])return!1;return!0}static get singletons(){return ct(this,"singletons",{get gray(){return ct(this,"gray",new $i)},get rgb(){return ct(this,"rgb",new Aa)},get rgba(){return ct(this,"rgba",new ea)},get cmyk(){return ct(this,"cmyk",new ta)}})}}class ji extends Vi{constructor(A,e,t){super("Alternate",A),this.base=e,this.tintFn=t,this.tmpBuf=new Float32Array(e.numComps)}getRgbItem(A,e,t,i){const a=this.tmpBuf;this.tintFn(A,e,a,0),this.base.getRgbItem(a,0,t,i)}getRgbBuffer(A,e,t,i,a,s,n){const g=this.tintFn,r=this.base,o=1/((1<<s)-1),I=r.numComps,c=r.usesZeroToOneRange,C=(r.isPassthrough(8)||!c)&&0===n;let B=C?a:0;const h=C?i:new Uint8ClampedArray(I*t),Q=this.numComps,l=new Float32Array(Q),E=new Float32Array(I);let u,d;for(u=0;u<t;u++){for(d=0;d<Q;d++)l[d]=A[e++]*o;if(g(l,0,E,0),c)for(d=0;d<I;d++)h[B++]=255*E[d];else r.getRgbItem(E,0,h,B),B+=I}C||r.getRgbBuffer(h,0,t,i,a,8,n)}getOutputLength(A,e){return this.base.getOutputLength(A*this.base.numComps/this.numComps,e)}}class zi extends Vi{constructor(A){super("Pattern",null),this.base=A}isDefaultDecode(A,e){rt("Should not call PatternCS.isDefaultDecode")}}class _i extends Vi{constructor(A,e,t){super("Indexed",1),this.base=A,this.highVal=e;const i=A.numComps*e;if(this.lookup=new Uint8Array(i),t instanceof ni){const A=t.getBytes(i);this.lookup.set(A)}else{if("string"!=typeof t)throw new ut(`IndexedCS - unrecognized lookup table: ${t}`);for(let A=0;A<i;++A)this.lookup[A]=255&t.charCodeAt(A)}}getRgbItem(A,e,t,i){const a=this.base.numComps,s=A[e]*a;this.base.getRgbBuffer(this.lookup,s,1,t,i,8,0)}getRgbBuffer(A,e,t,i,a,s,n){const g=this.base,r=g.numComps,o=g.getOutputLength(r,n),I=this.lookup;for(let s=0;s<t;++s){const t=A[e++]*r;g.getRgbBuffer(I,t,1,i,a,8,n),a+=o}}getOutputLength(A,e){return this.base.getOutputLength(A*this.base.numComps,e)}isDefaultDecode(A,e){return!Array.isArray(A)||(2!==A.length?(gt("Decode map length is not correct"),!0):!Number.isInteger(e)||e<1?(gt("Bits per component is not correct"),!0):0===A[0]&&A[1]===(1<<e)-1)}}class $i extends Vi{constructor(){super("DeviceGray",1)}getRgbItem(A,e,t,i){const a=255*A[e];t[i]=t[i+1]=t[i+2]=a}getRgbBuffer(A,e,t,i,a,s,n){const g=255/((1<<s)-1);let r=e,o=a;for(let e=0;e<t;++e){const e=g*A[r++];i[o++]=e,i[o++]=e,i[o++]=e,o+=n}}getOutputLength(A,e){return A*(3+e)}}class Aa extends Vi{constructor(){super("DeviceRGB",3)}getRgbItem(A,e,t,i){t[i]=255*A[e],t[i+1]=255*A[e+1],t[i+2]=255*A[e+2]}getRgbBuffer(A,e,t,i,a,s,n){if(8===s&&0===n)return void i.set(A.subarray(e,e+3*t),a);const g=255/((1<<s)-1);let r=e,o=a;for(let e=0;e<t;++e)i[o++]=g*A[r++],i[o++]=g*A[r++],i[o++]=g*A[r++],o+=n}getOutputLength(A,e){return A*(3+e)/3|0}isPassthrough(A){return 8===A}}class ea extends Vi{constructor(){super("DeviceRGBA",4)}getOutputLength(A,e){return 4*A}isPassthrough(A){return 8===A}}class ta extends Vi{constructor(){super("DeviceCMYK",4)}#t(A,e,t,i,a){const s=A[e]*t,n=A[e+1]*t,g=A[e+2]*t,r=A[e+3]*t;i[a]=255+s*(-4.387332384609988*s+54.48615194189176*n+18.82290502165302*g+212.25662451639585*r-285.2331026137004)+n*(1.7149763477362134*n-5.6096736904047315*g+-17.873870861415444*r-5.497006427196366)+g*(-2.5217340131683033*g-21.248923337353073*r+17.5119270841813)+r*(-21.86122147463605*r-189.48180835922747),i[a+1]=255+s*(8.841041422036149*s+60.118027045597366*n+6.871425592049007*g+31.159100130055922*r-79.2970844816548)+n*(-15.310361306967817*n+17.575251261109482*g+131.35250912493976*r-190.9453302588951)+g*(4.444339102852739*g+9.8632861493405*r-24.86741582555878)+r*(-20.737325471181034*r-187.80453709719578),i[a+2]=255+s*(.8842522430003296*s+8.078677503112928*n+30.89978309703729*g-.23883238689178934*r-14.183576799673286)+n*(10.49593273432072*n+63.02378494754052*g+50.606957656360734*r-112.23884253719248)+g*(.03296041114873217*g+115.60384449646641*r-193.58209356861505)+r*(-22.33816807309886*r-180.12613974708367)}getRgbItem(A,e,t,i){this.#t(A,e,1,t,i)}getRgbBuffer(A,e,t,i,a,s,n){const g=1/((1<<s)-1);for(let s=0;s<t;s++)this.#t(A,e,g,i,a),e+=4,a+=3+n}getOutputLength(A,e){return A/4*(3+e)|0}}class ia extends Vi{constructor(A,e,t){if(super("CalGray",1),!A)throw new ut("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=A,[this.XB,this.YB,this.ZB]=e||[0,0,0],this.G=t||1,this.XW<0||this.ZW<0||1!==this.YW)throw new ut(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&(nt(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||gt(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),this.G<1&&(nt(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}#t(A,e,t,i,a){const s=(A[e]*a)**this.G,n=this.YW*s,g=Math.max(295.8*n**.3333333333333333-40.8,0);t[i]=g,t[i+1]=g,t[i+2]=g}getRgbItem(A,e,t,i){this.#t(A,e,t,i,1)}getRgbBuffer(A,e,t,i,a,s,n){const g=1/((1<<s)-1);for(let s=0;s<t;++s)this.#t(A,e,i,a,g),e+=1,a+=3+n}getOutputLength(A,e){return A*(3+e)}}class aa extends Vi{static#i=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#a=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#s=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#n=new Float32Array([1,1,1]);static#g=new Float32Array(3);static#r=new Float32Array(3);static#o=new Float32Array(3);static#I=(24/116)**3/8;constructor(A,e,t,i){if(super("CalRGB",3),!A)throw new ut("WhitePoint missing - required for color space CalRGB");const[a,s,n]=this.whitePoint=A,[g,r,o]=this.blackPoint=e||new Float32Array(3);if([this.GR,this.GG,this.GB]=t||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=i||new Float32Array([1,0,0,0,1,0,0,0,1]),a<0||n<0||1!==s)throw new ut(`Invalid WhitePoint components for ${this.name}, no fallback available`);(g<0||r<0||o<0)&&(nt(`Invalid BlackPoint for ${this.name} [${g}, ${r}, ${o}], falling back to default.`),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(nt(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`),this.GR=this.GG=this.GB=1)}#c(A,e,t){t[0]=A[0]*e[0]+A[1]*e[1]+A[2]*e[2],t[1]=A[3]*e[0]+A[4]*e[1]+A[5]*e[2],t[2]=A[6]*e[0]+A[7]*e[1]+A[8]*e[2]}#C(A,e,t){t[0]=1*e[0]/A[0],t[1]=1*e[1]/A[1],t[2]=1*e[2]/A[2]}#B(A,e,t){t[0]=.95047*e[0]/A[0],t[1]=1*e[1]/A[1],t[2]=1.08883*e[2]/A[2]}#h(A){return A<=.0031308?this.#Q(0,1,12.92*A):A>=.99554525?1:this.#Q(0,1,1.055*A**(1/2.4)-.055)}#Q(A,e,t){return Math.max(A,Math.min(e,t))}#l(A){return A<0?-this.#l(-A):A>8?((A+16)/116)**3:A*aa.#I}#E(A,e,t){if(0===A[0]&&0===A[1]&&0===A[2])return t[0]=e[0],t[1]=e[1],void(t[2]=e[2]);const i=this.#l(0),a=(1-i)/(1-this.#l(A[0])),s=1-a,n=(1-i)/(1-this.#l(A[1])),g=1-n,r=(1-i)/(1-this.#l(A[2])),o=1-r;t[0]=e[0]*a+s,t[1]=e[1]*n+g,t[2]=e[2]*r+o}#u(A,e,t){if(1===A[0]&&1===A[2])return t[0]=e[0],t[1]=e[1],void(t[2]=e[2]);const i=t;this.#c(aa.#i,e,i);const a=aa.#g;this.#C(A,i,a),this.#c(aa.#a,a,t)}#d(A,e,t){const i=t;this.#c(aa.#i,e,i);const a=aa.#g;this.#B(A,i,a),this.#c(aa.#a,a,t)}#t(A,e,t,i,a){const s=this.#Q(0,1,A[e]*a),n=this.#Q(0,1,A[e+1]*a),g=this.#Q(0,1,A[e+2]*a),r=1===s?1:s**this.GR,o=1===n?1:n**this.GG,I=1===g?1:g**this.GB,c=this.MXA*r+this.MXB*o+this.MXC*I,C=this.MYA*r+this.MYB*o+this.MYC*I,B=this.MZA*r+this.MZB*o+this.MZC*I,h=aa.#r;h[0]=c,h[1]=C,h[2]=B;const Q=aa.#o;this.#u(this.whitePoint,h,Q);const l=aa.#r;this.#E(this.blackPoint,Q,l);const E=aa.#o;this.#d(aa.#n,l,E);const u=aa.#r;this.#c(aa.#s,E,u),t[i]=255*this.#h(u[0]),t[i+1]=255*this.#h(u[1]),t[i+2]=255*this.#h(u[2])}getRgbItem(A,e,t,i){this.#t(A,e,t,i,1)}getRgbBuffer(A,e,t,i,a,s,n){const g=1/((1<<s)-1);for(let s=0;s<t;++s)this.#t(A,e,i,a,g),e+=3,a+=3+n}getOutputLength(A,e){return A*(3+e)/3|0}}class sa extends Vi{constructor(A,e,t){if(super("Lab",3),!A)throw new ut("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=A,[this.amin,this.amax,this.bmin,this.bmax]=t||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=e||[0,0,0],this.XW<0||this.ZW<0||1!==this.YW)throw new ut("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&(nt("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(nt("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}#f(A){return A>=6/29?A**3:108/841*(A-4/29)}#p(A,e,t,i){return t+A*(i-t)/e}#t(A,e,t,i,a){let s=A[e],n=A[e+1],g=A[e+2];!1!==t&&(s=this.#p(s,t,0,100),n=this.#p(n,t,this.amin,this.amax),g=this.#p(g,t,this.bmin,this.bmax)),n>this.amax?n=this.amax:n<this.amin&&(n=this.amin),g>this.bmax?g=this.bmax:g<this.bmin&&(g=this.bmin);const r=(s+16)/116,o=r+n/500,I=r-g/200,c=this.XW*this.#f(o),C=this.YW*this.#f(r),B=this.ZW*this.#f(I);let h,Q,l;this.ZW<1?(h=3.1339*c+-1.617*C+-.4906*B,Q=-.9785*c+1.916*C+.0333*B,l=.072*c+-.229*C+1.4057*B):(h=3.2406*c+-1.5372*C+-.4986*B,Q=-.9689*c+1.8758*C+.0415*B,l=.0557*c+-.204*C+1.057*B),i[a]=255*Math.sqrt(h),i[a+1]=255*Math.sqrt(Q),i[a+2]=255*Math.sqrt(l)}getRgbItem(A,e,t,i){this.#t(A,e,!1,t,i)}getRgbBuffer(A,e,t,i,a,s,n){const g=(1<<s)-1;for(let s=0;s<t;s++)this.#t(A,e,g,i,a),e+=3,a+=3+n}getOutputLength(A,e){return A*(3+e)/3|0}isDefaultDecode(A,e){return!0}get usesZeroToOneRange(){return ct(this,"usesZeroToOneRange",!1)}}function na(A,e){let t=0;for(let i=0;i<=e;i++)t=t<<8|A[i];return t>>>0}function ga(A,e){return 1===e?String.fromCharCode(A[0],A[1]):3===e?String.fromCharCode(A[0],A[1],A[2],A[3]):String.fromCharCode(...A.subarray(0,e+1))}function ra(A,e,t){let i=0;for(let a=t;a>=0;a--)i+=A[a]+e[a],A[a]=255&i,i>>=8}function oa(A,e){let t=1;for(let i=e;i>=0&&t>0;i--)t+=A[i],A[i]=255&t,t>>=8}const Ia=16;class ca{constructor(A){this.buffer=A,this.pos=0,this.end=A.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let A,e=0;do{const t=this.readByte();if(t<0)throw new ut("unexpected EOF in bcmap");A=!(128&t),e=e<<7|127&t}while(!A);return e}readSigned(){const A=this.readNumber();return 1&A?~(A>>>1):A>>>1}readHex(A,e){A.set(this.buffer.subarray(this.pos,this.pos+e+1)),this.pos+=e+1}readHexNumber(A,e){let t;const i=this.tmpBuf;let a=0;do{const A=this.readByte();if(A<0)throw new ut("unexpected EOF in bcmap");t=!(128&A),i[a++]=127&A}while(!t);let s=e,n=0,g=0;for(;s>=0;){for(;g<8&&i.length>0;)n|=i[--a]<<g,g+=7;A[s]=255&n,s--,n>>=8,g-=8}}readHexSigned(A,e){this.readHexNumber(A,e);const t=1&A[e]?255:0;let i=0;for(let a=0;a<=e;a++)i=(1&i)<<8|A[a],A[a]=i>>1^t}readString(){const A=this.readNumber(),e=new Array(A);for(let t=0;t<A;t++)e[t]=this.readNumber();return String.fromCharCode(...e)}}class Ca{async process(A,e,t){const i=new ca(A),a=i.readByte();e.vertical=!!(1&a);let s=null;const n=new Uint8Array(Ia),g=new Uint8Array(Ia),r=new Uint8Array(Ia),o=new Uint8Array(Ia),I=new Uint8Array(Ia);let c,C;for(;(C=i.readByte())>=0;){const A=C>>5;if(7===A){switch(31&C){case 0:i.readString();break;case 1:s=i.readString()}continue}const t=!!(16&C),a=15&C;if(a+1>Ia)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const B=1,h=i.readNumber();switch(A){case 0:i.readHex(n,a),i.readHexNumber(g,a),ra(g,n,a),e.addCodespaceRange(a+1,na(n,a),na(g,a));for(let A=1;A<h;A++)oa(g,a),i.readHexNumber(n,a),ra(n,g,a),i.readHexNumber(g,a),ra(g,n,a),e.addCodespaceRange(a+1,na(n,a),na(g,a));break;case 1:i.readHex(n,a),i.readHexNumber(g,a),ra(g,n,a),i.readNumber();for(let A=1;A<h;A++)oa(g,a),i.readHexNumber(n,a),ra(n,g,a),i.readHexNumber(g,a),ra(g,n,a),i.readNumber();break;case 2:i.readHex(r,a),c=i.readNumber(),e.mapOne(na(r,a),c);for(let A=1;A<h;A++)oa(r,a),t||(i.readHexNumber(I,a),ra(r,I,a)),c=i.readSigned()+(c+1),e.mapOne(na(r,a),c);break;case 3:i.readHex(n,a),i.readHexNumber(g,a),ra(g,n,a),c=i.readNumber(),e.mapCidRange(na(n,a),na(g,a),c);for(let A=1;A<h;A++)oa(g,a),t?n.set(g):(i.readHexNumber(n,a),ra(n,g,a)),i.readHexNumber(g,a),ra(g,n,a),c=i.readNumber(),e.mapCidRange(na(n,a),na(g,a),c);break;case 4:i.readHex(r,B),i.readHex(o,a),e.mapOne(na(r,B),ga(o,a));for(let A=1;A<h;A++)oa(r,B),t||(i.readHexNumber(I,B),ra(r,I,B)),oa(o,a),i.readHexSigned(I,a),ra(o,I,a),e.mapOne(na(r,B),ga(o,a));break;case 5:i.readHex(n,B),i.readHexNumber(g,B),ra(g,n,B),i.readHex(o,a),e.mapBfRange(na(n,B),na(g,B),ga(o,a));for(let A=1;A<h;A++)oa(g,B),t?n.set(g):(i.readHexNumber(n,B),ra(n,g,B)),i.readHexNumber(g,B),ra(g,n,B),i.readHex(o,a),e.mapBfRange(na(n,B),na(g,B),ga(o,a));break;default:throw new Error(`BinaryCMapReader.process - unknown type: ${A}`)}}return s?t(s):e}}const Ba=new Uint8Array(0);class ha extends ni{constructor(A){if(super(),this._rawMinBufferLength=A||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=Ba,this.minBufferLength=512,A)for(;this.minBufferLength<A;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(A){const e=this.buffer;if(A<=e.byteLength)return e;let t=this.minBufferLength;for(;t<A;)t*=2;const i=new Uint8Array(t);return i.set(e),this.buffer=i}getByte(){const A=this.pos;for(;this.bufferLength<=A;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(A,e=null){const t=this.pos;let i;if(A){for(this.ensureBuffer(t+A),i=t+A;!this.eof&&this.bufferLength<i;)this.readBlock(e);const a=this.bufferLength;i>a&&(i=a)}else{for(;!this.eof;)this.readBlock(e);i=this.bufferLength}return this.pos=i,this.buffer.subarray(t,i)}async getImageData(A,e=null){if(!this.canAsyncDecodeImageFromBuffer)return this.getBytes(A,e);const t=await this.stream.asyncGetBytes();return this.decodeImage(t,e)}reset(){this.pos=0}makeSubStream(A,e,t=null){if(void 0===e)for(;!this.eof;)this.readBlock();else{const t=A+e;for(;this.bufferLength<=t&&!this.eof;)this.readBlock()}return new Pi(this.buffer,A,e,t)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}class Qa extends ha{constructor(A,e=null){let t=0;for(const e of A)t+=e instanceof ha?e._rawMinBufferLength:e.length;super(t),this.streams=A,this._onError=e}readBlock(){const A=this.streams;if(0===A.length)return void(this.eof=!0);const e=A.shift();let t;try{t=e.getBytes()}catch(A){if(this._onError)return void this._onError(A,e.dict?.objId);throw A}const i=this.bufferLength,a=i+t.length;this.ensureBuffer(a).set(t,i),this.bufferLength=a}getBaseStreams(){const A=[];for(const e of this.streams){const t=e.getBaseStreams();t&&A.push(...t)}return A.length>0?A:null}}class la extends ha{constructor(A,e){e&&(e*=.8),super(e),this.str=A,this.dict=A.dict,this.input=new Uint8Array(5)}readBlock(){const A=this.str;let e=A.getByte();for(;pi(e);)e=A.getByte();if(-1===e||126===e)return void(this.eof=!0);const t=this.bufferLength;let i,a;if(122===e){for(i=this.ensureBuffer(t+4),a=0;a<4;++a)i[t+a]=0;this.bufferLength+=4}else{const s=this.input;for(s[0]=e,a=1;a<5;++a){for(e=A.getByte();pi(e);)e=A.getByte();if(s[a]=e,-1===e||126===e)break}if(i=this.ensureBuffer(t+a-1),this.bufferLength+=a-1,a<5){for(;a<5;++a)s[a]=117;this.eof=!0}let n=0;for(a=0;a<5;++a)n=85*n+(s[a]-33);for(a=3;a>=0;--a)i[t+a]=255&n,n>>=8}}}class Ea extends ha{constructor(A,e){e&&(e*=.5),super(e),this.str=A,this.dict=A.dict,this.firstDigit=-1}readBlock(){const A=this.str.getBytes(8e3);if(!A.length)return void(this.eof=!0);const e=A.length+1>>1,t=this.ensureBuffer(this.bufferLength+e);let i=this.bufferLength,a=this.firstDigit;for(const e of A){let A;if(e>=48&&e<=57)A=15&e;else{if(!(e>=65&&e<=70||e>=97&&e<=102)){if(62===e){this.eof=!0;break}continue}A=9+(15&e)}a<0?a=A:(t[i++]=a<<4|A,a=-1)}a>=0&&this.eof&&(t[i++]=a<<4,a=-1),this.firstDigit=a,this.bufferLength=i}}const ua=-1,da=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],fa=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],pa=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],ma=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],ya=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],wa=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class Da{constructor(A,e={}){if(!A||"function"!=typeof A.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');let t;for(this.source=A,this.eof=!1,this.encoding=e.K||0,this.eoline=e.EndOfLine||!1,this.byteAlign=e.EncodedByteAlign||!1,this.columns=e.Columns||1728,this.rows=e.Rows||0,this.eoblock=e.EndOfBlock??!0,this.black=e.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(t=this._lookBits(12));)this._eatBits(1);1===t&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;const A=this.refLine,e=this.codingLine,t=this.columns;let i,a,s,n,g;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let s,g,r;if(this.err=!1,this.nextLine2D){for(n=0;e[n]<t;++n)A[n]=e[n];for(A[n++]=t,A[n]=t,e[0]=0,this.codingPos=0,i=0,a=0;e[this.codingPos]<t;)switch(s=this._getTwoDimCode(),s){case 0:this._addPixels(A[i+1],a),A[i+1]<t&&(i+=2);break;case 1:if(s=g=0,a){do{s+=r=this._getBlackCode()}while(r>=64);do{g+=r=this._getWhiteCode()}while(r>=64)}else{do{s+=r=this._getWhiteCode()}while(r>=64);do{g+=r=this._getBlackCode()}while(r>=64)}for(this._addPixels(e[this.codingPos]+s,a),e[this.codingPos]<t&&this._addPixels(e[this.codingPos]+g,1^a);A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 7:if(this._addPixels(A[i]+3,a),a^=1,e[this.codingPos]<t)for(++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 5:if(this._addPixels(A[i]+2,a),a^=1,e[this.codingPos]<t)for(++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 3:if(this._addPixels(A[i]+1,a),a^=1,e[this.codingPos]<t)for(++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 2:if(this._addPixels(A[i],a),a^=1,e[this.codingPos]<t)for(++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 8:if(this._addPixelsNeg(A[i]-3,a),a^=1,e[this.codingPos]<t)for(i>0?--i:++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 6:if(this._addPixelsNeg(A[i]-2,a),a^=1,e[this.codingPos]<t)for(i>0?--i:++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case 4:if(this._addPixelsNeg(A[i]-1,a),a^=1,e[this.codingPos]<t)for(i>0?--i:++i;A[i]<=e[this.codingPos]&&A[i]<t;)i+=2;break;case ua:this._addPixels(t,0),this.eof=!0;break;default:nt("bad 2d code"),this._addPixels(t,0),this.err=!0}}else for(e[0]=0,this.codingPos=0,a=0;e[this.codingPos]<t;){if(s=0,a)do{s+=r=this._getBlackCode()}while(r>=64);else do{s+=r=this._getWhiteCode()}while(r>=64);this._addPixels(e[this.codingPos]+s,a),a^=1}let o=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(s=this._lookBits(12),this.eoline)for(;s!==ua&&1!==s;)this._eatBits(1),s=this._lookBits(12);else for(;0===s;)this._eatBits(1),s=this._lookBits(12);1===s?(this._eatBits(12),o=!0):s===ua&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&o&&this.byteAlign){if(s=this._lookBits(12),1===s){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(n=0;n<4;++n)s=this._lookBits(12),1!==s&&nt("bad rtc code: "+s),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(s=this._lookBits(13),s===ua)return this.eof=!0,-1;if(s>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&s))}this.outputBits=e[0]>0?e[this.codingPos=0]:e[this.codingPos=1],this.row++}if(this.outputBits>=8)g=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&e[this.codingPos]<t&&(this.codingPos++,this.outputBits=e[this.codingPos]-e[this.codingPos-1]);else{s=8,g=0;do{if("number"!=typeof this.outputBits)throw new ut('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>s?(g<<=s,1&this.codingPos||(g|=255>>8-s),this.outputBits-=s,s=0):(g<<=this.outputBits,1&this.codingPos||(g|=255>>8-this.outputBits),s-=this.outputBits,this.outputBits=0,e[this.codingPos]<t?(this.codingPos++,this.outputBits=e[this.codingPos]-e[this.codingPos-1]):s>0&&(g<<=s,s=0))}while(s)}return this.black&&(g^=255),g}_addPixels(A,e){const t=this.codingLine;let i=this.codingPos;A>t[i]&&(A>this.columns&&(nt("row is wrong length"),this.err=!0,A=this.columns),1&i^e&&++i,t[i]=A),this.codingPos=i}_addPixelsNeg(A,e){const t=this.codingLine;let i=this.codingPos;if(A>t[i])A>this.columns&&(nt("row is wrong length"),this.err=!0,A=this.columns),1&i^e&&++i,t[i]=A;else if(A<t[i]){for(A<0&&(nt("invalid code"),this.err=!0,A=0);i>0&&A<t[i-1];)--i;t[i]=A}this.codingPos=i}_findTableCode(A,e,t,i){const a=i||0;for(let i=A;i<=e;++i){let A=this._lookBits(i);if(A===ua)return[!0,1,!1];if(i<e&&(A<<=e-i),!a||A>=a){const e=t[A-a];if(e[0]===i)return this._eatBits(i),[!0,e[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let A,e=0;if(this.eoblock){if(e=this._lookBits(7),A=da[e],A?.[0]>0)return this._eatBits(A[0]),A[1]}else{const A=this._findTableCode(1,7,da);if(A[0]&&A[2])return A[1]}return nt("Bad two dim code"),ua}_getWhiteCode(){let A,e=0;if(this.eoblock){if(e=this._lookBits(12),e===ua)return 1;if(A=e>>5?pa[e>>3]:fa[e],A[0]>0)return this._eatBits(A[0]),A[1]}else{let A=this._findTableCode(1,9,pa);if(A[0])return A[1];if(A=this._findTableCode(11,12,fa),A[0])return A[1]}return nt("bad white code"),this._eatBits(1),1}_getBlackCode(){let A,e;if(this.eoblock){if(A=this._lookBits(13),A===ua)return 1;if(e=A>>7?!(A>>9)&&A>>7?ya[(A>>1)-64]:wa[A>>7]:ma[A],e[0]>0)return this._eatBits(e[0]),e[1]}else{let A=this._findTableCode(2,6,wa);if(A[0])return A[1];if(A=this._findTableCode(7,12,ya,64),A[0])return A[1];if(A=this._findTableCode(10,13,ma),A[0])return A[1]}return nt("bad black code"),this._eatBits(1),1}_lookBits(A){let e;for(;this.inputBits<A;){if(-1===(e=this.source.next()))return 0===this.inputBits?ua:this.inputBuf<<A-this.inputBits&65535>>16-A;this.inputBuf=this.inputBuf<<8|e,this.inputBits+=8}return this.inputBuf>>this.inputBits-A&65535>>16-A}_eatBits(A){(this.inputBits-=A)<0&&(this.inputBits=0)}}class ba extends ha{constructor(A,e,t){super(e),this.str=A,this.dict=A.dict,t instanceof _t||(t=_t.empty);const i={next:()=>A.getByte()};this.ccittFaxDecoder=new Da(i,{K:t.get("K"),EndOfLine:t.get("EndOfLine"),EncodedByteAlign:t.get("EncodedByteAlign"),Columns:t.get("Columns"),Rows:t.get("Rows"),EndOfBlock:t.get("EndOfBlock"),BlackIs1:t.get("BlackIs1")})}readBlock(){for(;!this.eof;){const A=this.ccittFaxDecoder.readNextChar();if(-1===A)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=A}}}const ka=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Fa=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]),Sa=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]),Ra=[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],Ga=[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];class Na extends ha{constructor(A,e){super(e),this.str=A,this.dict=A.dict;const t=A.getByte(),i=A.getByte();if(-1===t||-1===i)throw new ut(`Invalid header in flate stream: ${t}, ${i}`);if(8!=(15&t))throw new ut(`Unknown compression method in flate stream: ${t}, ${i}`);if(((t<<8)+i)%31!=0)throw new ut(`Bad FCHECK in flate stream: ${t}, ${i}`);if(32&i)throw new ut(`FDICT bit set in flate stream: ${t}, ${i}`);this.codeSize=0,this.codeBuf=0}async getImageData(A,e){const t=await this.asyncGetBytes();return t?.subarray(0,A)||this.getBytes(A)}async asyncGetBytes(){this.str.reset();const A=this.str.getBytes();try{const{readable:e,writable:t}=new DecompressionStream("deflate"),i=t.getWriter();i.write(A),i.close();const a=[];let s=0;for await(const A of e)a.push(A),s+=A.byteLength;const n=new Uint8Array(s);let g=0;for(const A of a)n.set(A,g),g+=A.byteLength;return n}catch{return this.str=new Pi(A,2,A.length,this.str.dict),this.reset(),null}}get isAsync(){return!0}getBits(A){const e=this.str;let t,i=this.codeSize,a=this.codeBuf;for(;i<A;){if(-1===(t=e.getByte()))throw new ut("Bad encoding in flate stream");a|=t<<i,i+=8}return t=a&(1<<A)-1,this.codeBuf=a>>A,this.codeSize=i-=A,t}getCode(A){const e=this.str,t=A[0],i=A[1];let a,s=this.codeSize,n=this.codeBuf;for(;s<i&&-1!==(a=e.getByte());)n|=a<<s,s+=8;const g=t[n&(1<<i)-1],r=g>>16,o=65535&g;if(r<1||s<r)throw new ut("Bad encoding in flate stream");return this.codeBuf=n>>r,this.codeSize=s-r,o}generateHuffmanTable(A){const e=A.length;let t,i=0;for(t=0;t<e;++t)A[t]>i&&(i=A[t]);const a=1<<i,s=new Int32Array(a);for(let n=1,g=0,r=2;n<=i;++n,g<<=1,r<<=1)for(let i=0;i<e;++i)if(A[i]===n){let A=0,e=g;for(t=0;t<n;++t)A=A<<1|1&e,e>>=1;for(t=A;t<a;t+=r)s[t]=n<<16|i;++g}return[s,i]}#m(A){nt(A),this.eof=!0}readBlock(){let A,e,t;const i=this.str;try{e=this.getBits(3)}catch(A){return void this.#m(A.message)}if(1&e&&(this.eof=!0),e>>=1,0===e){let e;if(-1===(e=i.getByte()))return void this.#m("Bad block header in flate stream");let t=e;if(-1===(e=i.getByte()))return void this.#m("Bad block header in flate stream");if(t|=e<<8,-1===(e=i.getByte()))return void this.#m("Bad block header in flate stream");let a=e;if(-1===(e=i.getByte()))return void this.#m("Bad block header in flate stream");if(a|=e<<8,a!==(65535&~t)&&(0!==t||0!==a))throw new ut("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;const s=this.bufferLength,n=s+t;if(A=this.ensureBuffer(n),this.bufferLength=n,0===t)-1===i.peekByte()&&(this.eof=!0);else{const e=i.getBytes(t);A.set(e,s),e.length<t&&(this.eof=!0)}return}let a,s;if(1===e)a=Ra,s=Ga;else{if(2!==e)throw new ut("Unknown block type in flate stream");{const A=this.getBits(5)+257,e=this.getBits(5)+1,i=this.getBits(4)+4,n=new Uint8Array(ka.length);let g;for(g=0;g<i;++g)n[ka[g]]=this.getBits(3);const r=this.generateHuffmanTable(n);t=0,g=0;const o=A+e,I=new Uint8Array(o);let c,C,B;for(;g<o;){const A=this.getCode(r);if(16===A)c=2,C=3,B=t;else if(17===A)c=3,C=3,B=t=0;else{if(18!==A){I[g++]=t=A;continue}c=7,C=11,B=t=0}let e=this.getBits(c)+C;for(;e-- >0;)I[g++]=B}a=this.generateHuffmanTable(I.subarray(0,A)),s=this.generateHuffmanTable(I.subarray(A,o))}}A=this.buffer;let n=A?A.length:0,g=this.bufferLength;for(;;){let e=this.getCode(a);if(e<256){g+1>=n&&(A=this.ensureBuffer(g+1),n=A.length),A[g++]=e;continue}if(256===e)return void(this.bufferLength=g);e-=257,e=Fa[e];let i=e>>16;i>0&&(i=this.getBits(i)),t=(65535&e)+i,e=this.getCode(s),e=Sa[e],i=e>>16,i>0&&(i=this.getBits(i));const r=(65535&e)+i;g+t>=n&&(A=this.ensureBuffer(g+t),n=A.length);for(let e=0;e<t;++e,++g)A[g]=A[g-r]}}}const xa=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class Ua{constructor(A,e,t){this.data=A,this.bp=e,this.dataEnd=t,this.chigh=A[e],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){const A=this.data;let e=this.bp;255===A[e]?A[e+1]>143?(this.clow+=65280,this.ct=8):(e++,this.clow+=A[e]<<9,this.ct=7,this.bp=e):(e++,this.clow+=e<this.dataEnd?A[e]<<8:65280,this.ct=8,this.bp=e),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(A,e){let t=A[e]>>1,i=1&A[e];const a=xa[t],s=a.qe;let n,g=this.a-s;if(this.chigh<s)g<s?(g=s,n=i,t=a.nmps):(g=s,n=1^i,1===a.switchFlag&&(i=n),t=a.nlps);else{if(this.chigh-=s,32768&g)return this.a=g,i;g<s?(n=1^i,1===a.switchFlag&&(i=n),t=a.nlps):(n=i,t=a.nmps)}do{0===this.ct&&this.byteIn(),g<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(!(32768&g));return this.a=g,A[e]=t<<1|i,n}}class Ma extends Ct{constructor(A){super(A,"Jbig2Error")}}class La{getContexts(A){return A in this?this[A]:this[A]=new Int8Array(65536)}}class Ja{constructor(A,e,t){this.data=A,this.start=e,this.end=t}get decoder(){return ct(this,"decoder",new Ua(this.data,this.start,this.end))}get contextCache(){return ct(this,"contextCache",new La)}}function Ha(A,e,t){const i=A.getContexts(e);let a=1;function s(A){let e=0;for(let s=0;s<A;s++){const A=t.readBit(i,a);a=a<256?a<<1|A:511&(a<<1|A)|256,e=e<<1|A}return e>>>0}const n=s(1),g=s(1)?s(1)?s(1)?s(1)?s(1)?s(32)+4436:s(12)+340:s(8)+84:s(6)+20:s(4)+4:s(2);let r;return 0===n?r=g:g>0&&(r=-g),r>=-2147483648&&r<=2147483647?r:null}function Ya(A,e,t){const i=A.getContexts("IAID");let a=1;for(let A=0;A<t;A++){a=a<<1|e.readBit(i,a)}return t<31?a&(1<<t)-1:2147483647&a}const va=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],Ka=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],qa=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],Ta=[39717,1941,229,405],Pa=[32,8];function Wa(A,e,t,i,a,s,n,g){if(A){return os(new ns(g.data,g.start,g.end),e,t,!1)}if(0===i&&!s&&!a&&4===n.length&&3===n[0].x&&-1===n[0].y&&-3===n[1].x&&-1===n[1].y&&2===n[2].x&&-2===n[2].y&&-2===n[3].x&&-2===n[3].y)return function(A,e,t){const i=t.decoder,a=t.contextCache.getContexts("GB"),s=[];let n,g,r,o,I,c,C;for(g=0;g<e;g++)for(I=s[g]=new Uint8Array(A),c=g<1?I:s[g-1],C=g<2?I:s[g-2],n=C[0]<<13|C[1]<<12|C[2]<<11|c[0]<<7|c[1]<<6|c[2]<<5|c[3]<<4,r=0;r<A;r++)I[r]=o=i.readBit(a,n),n=(31735&n)<<1|(r+3<A?C[r+3]<<11:0)|(r+4<A?c[r+4]<<4:0)|o;return s}(e,t,g);const r=!!s,o=Ka[i].concat(n);o.sort(function(A,e){return A.y-e.y||A.x-e.x});const I=o.length,c=new Int8Array(I),C=new Int8Array(I),B=[];let h,Q,l=0,E=0,u=0,d=0;for(Q=0;Q<I;Q++)c[Q]=o[Q].x,C[Q]=o[Q].y,E=Math.min(E,o[Q].x),u=Math.max(u,o[Q].x),d=Math.min(d,o[Q].y),Q<I-1&&o[Q].y===o[Q+1].y&&o[Q].x===o[Q+1].x-1?l|=1<<I-1-Q:B.push(Q);const f=B.length,p=new Int8Array(f),m=new Int8Array(f),y=new Uint16Array(f);for(h=0;h<f;h++)Q=B[h],p[h]=o[Q].x,m[h]=o[Q].y,y[h]=1<<I-1-Q;const w=-E,D=-d,b=e-u,k=Ta[i];let F=new Uint8Array(e);const S=[],R=g.decoder,G=g.contextCache.getContexts("GB");let N,x,U,M,L,J=0,H=0;for(let A=0;A<t;A++){if(a){if(J^=R.readBit(G,k),J){S.push(F);continue}}for(F=new Uint8Array(F),S.push(F),N=0;N<e;N++){if(r&&s[A][N]){F[N]=0;continue}if(N>=w&&N<b&&A>=D)for(H=H<<1&l,Q=0;Q<f;Q++)x=A+m[Q],U=N+p[Q],M=S[x][U],M&&(M=y[Q],H|=M);else for(H=0,L=I-1,Q=0;Q<I;Q++,L--)U=N+c[Q],U>=0&&U<e&&(x=A+C[Q],x>=0&&(M=S[x][U],M&&(H|=M<<L)));const t=R.readBit(G,H);F[N]=t}}return S}function Za(A,e,t,i,a,s,n,g,r){let o=qa[t].coding;0===t&&(o=o.concat([g[0]]));const I=o.length,c=new Int32Array(I),C=new Int32Array(I);let B;for(B=0;B<I;B++)c[B]=o[B].x,C[B]=o[B].y;let h=qa[t].reference;0===t&&(h=h.concat([g[1]]));const Q=h.length,l=new Int32Array(Q),E=new Int32Array(Q);for(B=0;B<Q;B++)l[B]=h[B].x,E[B]=h[B].y;const u=i[0].length,d=i.length,f=Pa[t],p=[],m=r.decoder,y=r.contextCache.getContexts("GR");let w=0;for(let t=0;t<e;t++){if(n){if(w^=m.readBit(y,f),w)throw new Ma("prediction is not supported")}const e=new Uint8Array(A);p.push(e);for(let n=0;n<A;n++){let g,r,o=0;for(B=0;B<I;B++)g=t+C[B],r=n+c[B],g<0||r<0||r>=A?o<<=1:o=o<<1|p[g][r];for(B=0;B<Q;B++)g=t+E[B]-s,r=n+l[B]-a,g<0||g>=d||r<0||r>=u?o<<=1:o=o<<1|i[g][r];const h=m.readBit(y,o);e[n]=h}}return p}function Oa(A,e,t,i,a,s,n,g,r,o,I,c,C,B,h,Q,l,E,u){if(A&&e)throw new Ma("refinement with Huffman is not supported");const d=[];let f,p;for(f=0;f<i;f++){if(p=new Uint8Array(t),a)for(let A=0;A<t;A++)p[A]=a;d.push(p)}const m=l.decoder,y=l.contextCache;let w=A?-B.tableDeltaT.decode(u):-Ha(y,"IADT",m),D=0;for(f=0;f<s;){w+=A?B.tableDeltaT.decode(u):Ha(y,"IADT",m);D+=A?B.tableFirstS.decode(u):Ha(y,"IAFS",m);let i=D;for(;;){let a=0;n>1&&(a=A?u.readBits(E):Ha(y,"IAIT",m));const s=n*w+a,D=A?B.symbolIDTable.decode(u):Ya(y,m,r),b=e&&(A?u.readBit():Ha(y,"IARI",m));let k=g[D],F=k[0].length,S=k.length;if(b){const A=Ha(y,"IARDW",m),e=Ha(y,"IARDH",m);F+=A,S+=e,k=Za(F,S,h,k,(A>>1)+Ha(y,"IARDX",m),(e>>1)+Ha(y,"IARDY",m),!1,Q,l)}let R=0;o?1&c?R=S-1:i+=S-1:c>1?i+=F-1:R=F-1;const G=s-(1&c?0:S-1),N=i-(2&c?F-1:0);let x,U,M;if(o)for(x=0;x<S;x++){if(p=d[N+x],!p)continue;M=k[x];const A=Math.min(t-G,F);switch(C){case 0:for(U=0;U<A;U++)p[G+U]|=M[U];break;case 2:for(U=0;U<A;U++)p[G+U]^=M[U];break;default:throw new Ma(`operator ${C} is not supported`)}}else for(U=0;U<S;U++)if(p=d[G+U],p)switch(M=k[U],C){case 0:for(x=0;x<F;x++)p[N+x]|=M[x];break;case 2:for(x=0;x<F;x++)p[N+x]^=M[x];break;default:throw new Ma(`operator ${C} is not supported`)}f++;const L=A?B.tableDeltaS.decode(u):Ha(y,"IADS",m);if(null===L)break;i+=R+L+I}}return d}function Xa(A,e){const t={};t.number=fi(A,e);const i=A[e+4],a=63&i;if(!va[a])throw new Ma("invalid segment type: "+a);t.type=a,t.typeName=va[a],t.deferredNonRetain=!!(128&i);const s=!!(64&i),n=A[e+5];let g=n>>5&7;const r=[31&n];let o=e+6;if(7===n){g=536870911&fi(A,o-1),o+=3;let e=g+7>>3;for(r[0]=A[o++];--e>0;)r.push(A[o++])}else if(5===n||6===n)throw new Ma("invalid referred-to flags");t.retainBits=r;let I=4;t.number<=256?I=1:t.number<=65536&&(I=2);const c=[];let C,B;for(C=0;C<g;C++){let e;e=1===I?A[o]:2===I?di(A,o):fi(A,o),c.push(e),o+=I}if(t.referredTo=c,s?(t.pageAssociation=fi(A,o),o+=4):t.pageAssociation=A[o++],t.length=fi(A,o),o+=4,4294967295===t.length){if(38!==a)throw new Ma("invalid unknown segment length");{const e=ja(A,o),i=!!(1&A[o+za]),a=6,s=new Uint8Array(a);for(i||(s[0]=255,s[1]=172),s[2]=e.height>>>24&255,s[3]=e.height>>16&255,s[4]=e.height>>8&255,s[5]=255&e.height,C=o,B=A.length;C<B;C++){let e=0;for(;e<a&&s[e]===A[C+e];)e++;if(e===a){t.length=C+a;break}}if(4294967295===t.length)throw new Ma("segment end was not found")}}return t.headerEnd=o,t}function Va(A,e,t,i){const a=[];let s=t;for(;s<i;){const t=Xa(e,s);s=t.headerEnd;const i={header:t,data:e};if(A.randomAccess||(i.start=s,s+=t.length,i.end=s),a.push(i),51===t.type)break}if(A.randomAccess)for(let A=0,e=a.length;A<e;A++)a[A].start=s,s+=a[A].header.length,a[A].end=s;return a}function ja(A,e){return{width:fi(A,e),height:fi(A,e+4),x:fi(A,e+8),y:fi(A,e+12),combinationOperator:7&A[e+16]}}const za=17;function _a(A,e){const t=A.header,i=A.data,a=A.end;let s,n,g,r,o=A.start;switch(t.type){case 0:const A={},e=di(i,o);if(A.huffman=!!(1&e),A.refinement=!!(2&e),A.huffmanDHSelector=e>>2&3,A.huffmanDWSelector=e>>4&3,A.bitmapSizeSelector=e>>6&1,A.aggregationInstancesSelector=e>>7&1,A.bitmapCodingContextUsed=!!(256&e),A.bitmapCodingContextRetained=!!(512&e),A.template=e>>10&3,A.refinementTemplate=e>>12&1,o+=2,!A.huffman){for(r=0===A.template?4:1,n=[],g=0;g<r;g++)n.push({x:ui(i,o),y:ui(i,o+1)}),o+=2;A.at=n}if(A.refinement&&!A.refinementTemplate){for(n=[],g=0;g<2;g++)n.push({x:ui(i,o),y:ui(i,o+1)}),o+=2;A.refinementAt=n}A.numberOfExportedSymbols=fi(i,o),o+=4,A.numberOfNewSymbols=fi(i,o),o+=4,s=[A,t.number,t.referredTo,i,o,a];break;case 6:case 7:const I={};I.info=ja(i,o),o+=za;const c=di(i,o);if(o+=2,I.huffman=!!(1&c),I.refinement=!!(2&c),I.logStripSize=c>>2&3,I.stripSize=1<<I.logStripSize,I.referenceCorner=c>>4&3,I.transposed=!!(64&c),I.combinationOperator=c>>7&3,I.defaultPixelValue=c>>9&1,I.dsOffset=c<<17>>27,I.refinementTemplate=c>>15&1,I.huffman){const A=di(i,o);o+=2,I.huffmanFS=3&A,I.huffmanDS=A>>2&3,I.huffmanDT=A>>4&3,I.huffmanRefinementDW=A>>6&3,I.huffmanRefinementDH=A>>8&3,I.huffmanRefinementDX=A>>10&3,I.huffmanRefinementDY=A>>12&3,I.huffmanRefinementSizeSelector=!!(16384&A)}if(I.refinement&&!I.refinementTemplate){for(n=[],g=0;g<2;g++)n.push({x:ui(i,o),y:ui(i,o+1)}),o+=2;I.refinementAt=n}I.numberOfSymbolInstances=fi(i,o),o+=4,s=[I,t.referredTo,i,o,a];break;case 16:const C={},B=i[o++];C.mmr=!!(1&B),C.template=B>>1&3,C.patternWidth=i[o++],C.patternHeight=i[o++],C.maxPatternIndex=fi(i,o),o+=4,s=[C,t.number,i,o,a];break;case 22:case 23:const h={};h.info=ja(i,o),o+=za;const Q=i[o++];h.mmr=!!(1&Q),h.template=Q>>1&3,h.enableSkip=!!(8&Q),h.combinationOperator=Q>>4&7,h.defaultPixelValue=Q>>7&1,h.gridWidth=fi(i,o),o+=4,h.gridHeight=fi(i,o),o+=4,h.gridOffsetX=4294967295&fi(i,o),o+=4,h.gridOffsetY=4294967295&fi(i,o),o+=4,h.gridVectorX=di(i,o),o+=2,h.gridVectorY=di(i,o),o+=2,s=[h,t.referredTo,i,o,a];break;case 38:case 39:const l={};l.info=ja(i,o),o+=za;const E=i[o++];if(l.mmr=!!(1&E),l.template=E>>1&3,l.prediction=!!(8&E),!l.mmr){for(r=0===l.template?4:1,n=[],g=0;g<r;g++)n.push({x:ui(i,o),y:ui(i,o+1)}),o+=2;l.at=n}s=[l,i,o,a];break;case 48:const u={width:fi(i,o),height:fi(i,o+4),resolutionX:fi(i,o+8),resolutionY:fi(i,o+12)};4294967295===u.height&&delete u.height;const d=i[o+16];di(i,o+17),u.lossless=!!(1&d),u.refinement=!!(2&d),u.defaultPixelValue=d>>2&1,u.combinationOperator=d>>3&3,u.requiresBuffer=!!(32&d),u.combinationOperatorOverride=!!(64&d),s=[u];break;case 49:case 50:case 51:case 62:break;case 53:s=[t.number,i,o,a];break;default:throw new Ma(`segment type ${t.typeName}(${t.type}) is not implemented`)}const I="on"+t.typeName;I in e&&e[I].apply(e,s)}function $a(A,e){for(let t=0,i=A.length;t<i;t++)_a(A[t],e)}class As{onPageInformation(A){this.currentPageInfo=A;const e=A.width+7>>3,t=new Uint8ClampedArray(e*A.height);A.defaultPixelValue&&t.fill(255),this.buffer=t}drawBitmap(A,e){const t=this.currentPageInfo,i=A.width,a=A.height,s=t.width+7>>3,n=t.combinationOperatorOverride?A.combinationOperator:t.combinationOperator,g=this.buffer,r=128>>(7&A.x);let o,I,c,C,B=A.y*s+(A.x>>3);switch(n){case 0:for(o=0;o<a;o++){for(c=r,C=B,I=0;I<i;I++)e[o][I]&&(g[C]|=c),c>>=1,c||(c=128,C++);B+=s}break;case 2:for(o=0;o<a;o++){for(c=r,C=B,I=0;I<i;I++)e[o][I]&&(g[C]^=c),c>>=1,c||(c=128,C++);B+=s}break;default:throw new Ma(`operator ${n} is not supported`)}}onImmediateGenericRegion(A,e,t,i){const a=A.info,s=new Ja(e,t,i),n=Wa(A.mmr,a.width,a.height,A.template,A.prediction,null,A.at,s);this.drawBitmap(a,n)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(A,e,t,i,a,s){let n,g;A.huffman&&(n=function(A,e,t){let i,a,s,n,g=0;switch(A.huffmanDHSelector){case 0:case 1:i=ss(A.huffmanDHSelector+4);break;case 3:i=gs(g,e,t),g++;break;default:throw new Ma("invalid Huffman DH selector")}switch(A.huffmanDWSelector){case 0:case 1:a=ss(A.huffmanDWSelector+2);break;case 3:a=gs(g,e,t),g++;break;default:throw new Ma("invalid Huffman DW selector")}A.bitmapSizeSelector?(s=gs(g,e,t),g++):s=ss(1);n=A.aggregationInstancesSelector?gs(g,e,t):ss(1);return{tableDeltaHeight:i,tableDeltaWidth:a,tableBitmapSize:s,tableAggregateInstances:n}}(A,t,this.customTables),g=new ns(i,a,s));let r=this.symbols;r||(this.symbols=r={});const o=[];for(const A of t){const e=r[A];e&&o.push(...e)}const I=new Ja(i,a,s);r[e]=function(A,e,t,i,a,s,n,g,r,o,I,c){if(A&&e)throw new Ma("symbol refinement with Huffman is not supported");const C=[];let B=0,h=Ei(t.length+i);const Q=I.decoder,l=I.contextCache;let E,u;for(A&&(E=ss(1),u=[],h=Math.max(h,1));C.length<i;){B+=A?s.tableDeltaHeight.decode(c):Ha(l,"IADH",Q);let i=0,a=0;const E=A?u.length:0;for(;;){const E=A?s.tableDeltaWidth.decode(c):Ha(l,"IADW",Q);if(null===E)break;let d;if(i+=E,a+=i,e){const a=Ha(l,"IAAI",Q);if(a>1)d=Oa(A,e,i,B,0,a,1,t.concat(C),h,0,0,1,0,s,r,o,I,0,c);else{const A=Ya(l,Q,h),e=Ha(l,"IARDX",Q),a=Ha(l,"IARDY",Q);d=Za(i,B,r,A<t.length?t[A]:C[A-t.length],e,a,!1,o,I)}C.push(d)}else A?u.push(i):(d=Wa(!1,i,B,n,!1,null,g,I),C.push(d))}if(A&&!e){const A=s.tableBitmapSize.decode(c);let e;if(c.byteAlign(),0===A)e=rs(c,a,B);else{const t=c.end,i=c.position+A;c.end=i,e=os(c,a,B,!1),c.end=t,c.position=i}const t=u.length;if(E===t-1)C.push(e);else{let A,i,a,s,n,g=0;for(A=E;A<t;A++){for(s=u[A],a=g+s,n=[],i=0;i<B;i++)n.push(e[i].subarray(g,a));C.push(n),g=a}}}}const d=[],f=[];let p,m,y=!1;const w=t.length+i;for(;f.length<w;){let e=A?E.decode(c):Ha(l,"IAEX",Q);for(;e--;)f.push(y);y=!y}for(p=0,m=t.length;p<m;p++)f[p]&&d.push(t[p]);for(let A=0;A<i;p++,A++)f[p]&&d.push(C[A]);return d}(A.huffman,A.refinement,o,A.numberOfNewSymbols,A.numberOfExportedSymbols,n,A.template,A.at,A.refinementTemplate,A.refinementAt,I,g)}onImmediateTextRegion(A,e,t,i,a){const s=A.info;let n,g;const r=this.symbols,o=[];for(const A of e){const e=r[A];e&&o.push(...e)}const I=Ei(o.length);A.huffman&&(g=new ns(t,i,a),n=function(A,e,t,i,a){const s=[];for(let A=0;A<=34;A++){const e=a.readBits(4);s.push(new es([A,e,0,0]))}const n=new is(s,!1);s.length=0;for(let A=0;A<i;){const e=n.decode(a);if(e>=32){let t,i,n;switch(e){case 32:if(0===A)throw new Ma("no previous value in symbol ID table");i=a.readBits(2)+3,t=s[A-1].prefixLength;break;case 33:i=a.readBits(3)+3,t=0;break;case 34:i=a.readBits(7)+11,t=0;break;default:throw new Ma("invalid code length in symbol ID table")}for(n=0;n<i;n++)s.push(new es([A,t,0,0])),A++}else s.push(new es([A,e,0,0])),A++}a.byteAlign();const g=new is(s,!1);let r,o,I,c=0;switch(A.huffmanFS){case 0:case 1:r=ss(A.huffmanFS+6);break;case 3:r=gs(c,e,t),c++;break;default:throw new Ma("invalid Huffman FS selector")}switch(A.huffmanDS){case 0:case 1:case 2:o=ss(A.huffmanDS+8);break;case 3:o=gs(c,e,t),c++;break;default:throw new Ma("invalid Huffman DS selector")}switch(A.huffmanDT){case 0:case 1:case 2:I=ss(A.huffmanDT+11);break;case 3:I=gs(c,e,t),c++;break;default:throw new Ma("invalid Huffman DT selector")}if(A.refinement)throw new Ma("refinement with Huffman is not supported");return{symbolIDTable:g,tableFirstS:r,tableDeltaS:o,tableDeltaT:I}}(A,e,this.customTables,o.length,g));const c=new Ja(t,i,a),C=Oa(A.huffman,A.refinement,s.width,s.height,A.defaultPixelValue,A.numberOfSymbolInstances,A.stripSize,o,I,A.transposed,A.dsOffset,A.referenceCorner,A.combinationOperator,n,A.refinementTemplate,A.refinementAt,c,A.logStripSize,g);this.drawBitmap(s,C)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(A,e,t,i,a){let s=this.patterns;s||(this.patterns=s={});const n=new Ja(t,i,a);s[e]=function(A,e,t,i,a,s){const n=[];A||(n.push({x:-e,y:0}),0===a&&n.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const g=Wa(A,(i+1)*e,t,a,!1,null,n,s),r=[];for(let A=0;A<=i;A++){const i=[],a=e*A,s=a+e;for(let A=0;A<t;A++)i.push(g[A].subarray(a,s));r.push(i)}return r}(A.mmr,A.patternWidth,A.patternHeight,A.maxPatternIndex,A.template,n)}onImmediateHalftoneRegion(A,e,t,i,a){const s=this.patterns[e[0]],n=A.info,g=new Ja(t,i,a),r=function(A,e,t,i,a,s,n,g,r,o,I,c,C,B,h){if(n)throw new Ma("skip is not supported");if(0!==g)throw new Ma(`operator "${g}" is not supported in halftone region`);const Q=[];let l,E,u;for(l=0;l<a;l++){if(u=new Uint8Array(i),s)for(E=0;E<i;E++)u[E]=s;Q.push(u)}const d=e.length,f=e[0],p=f[0].length,m=f.length,y=Ei(d),w=[];A||(w.push({x:t<=1?3:2,y:-1}),0===t&&w.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const D=[];let b,k,F,S,R,G,N,x,U,M,L;for(A&&(b=new ns(h.data,h.start,h.end)),l=y-1;l>=0;l--)k=A?os(b,r,o,!0):Wa(!1,r,o,t,!1,null,w,h),D[l]=k;for(F=0;F<o;F++)for(S=0;S<r;S++){for(R=0,G=0,E=y-1;E>=0;E--)R^=D[E][F][S],G|=R<<E;if(N=e[G],x=I+F*B+S*C>>8,U=c+F*C-S*B>>8,x>=0&&x+p<=i&&U>=0&&U+m<=a)for(l=0;l<m;l++)for(L=Q[U+l],M=N[l],E=0;E<p;E++)L[x+E]|=M[E];else{let A,e;for(l=0;l<m;l++)if(e=U+l,!(e<0||e>=a))for(L=Q[e],M=N[l],E=0;E<p;E++)A=x+E,A>=0&&A<i&&(L[A]|=M[E])}}return Q}(A.mmr,s,A.template,n.width,n.height,A.defaultPixelValue,A.enableSkip,A.combinationOperator,A.gridWidth,A.gridHeight,A.gridOffsetX,A.gridOffsetY,A.gridVectorX,A.gridVectorY,g);this.drawBitmap(n,r)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(A,e,t,i){let a=this.customTables;a||(this.customTables=a={}),a[A]=function(A,e,t){const i=A[e],a=4294967295&fi(A,e+1),s=4294967295&fi(A,e+5),n=new ns(A,e+9,t),g=1+(i>>1&7),r=1+(i>>4&7),o=[];let I,c,C=a;do{I=n.readBits(g),c=n.readBits(r),o.push(new es([C,I,c,0])),C+=1<<c}while(C<s);I=n.readBits(g),o.push(new es([a-1,I,32,0,"lower"])),I=n.readBits(g),o.push(new es([s,I,32,0])),1&i&&(I=n.readBits(g),o.push(new es([I,0])));return new is(o,!1)}(e,t,i)}}class es{constructor(A){2===A.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=A[0],this.rangeLength=0,this.prefixCode=A[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=A[0],this.prefixLength=A[1],this.rangeLength=A[2],this.prefixCode=A[3],this.isLowerRange="lower"===A[4])}}class ts{constructor(A){this.children=[],A?(this.isLeaf=!0,this.rangeLength=A.rangeLength,this.rangeLow=A.rangeLow,this.isLowerRange=A.isLowerRange,this.isOOB=A.isOOB):this.isLeaf=!1}buildTree(A,e){const t=A.prefixCode>>e&1;if(e<=0)this.children[t]=new ts(A);else{let i=this.children[t];i||(this.children[t]=i=new ts(null)),i.buildTree(A,e-1)}}decodeNode(A){if(this.isLeaf){if(this.isOOB)return null;const e=A.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-e:e)}const e=this.children[A.readBit()];if(!e)throw new Ma("invalid Huffman data");return e.decodeNode(A)}}class is{constructor(A,e){e||this.assignPrefixCodes(A),this.rootNode=new ts(null);for(let e=0,t=A.length;e<t;e++){const t=A[e];t.prefixLength>0&&this.rootNode.buildTree(t,t.prefixLength-1)}}decode(A){return this.rootNode.decodeNode(A)}assignPrefixCodes(A){const e=A.length;let t=0;for(let i=0;i<e;i++)t=Math.max(t,A[i].prefixLength);const i=new Uint32Array(t+1);for(let t=0;t<e;t++)i[A[t].prefixLength]++;let a,s,n,g=1,r=0;for(i[0]=0;g<=t;){for(r=r+i[g-1]<<1,a=r,s=0;s<e;)n=A[s],n.prefixLength===g&&(n.prefixCode=a,a++),s++;g++}}}const as={};function ss(A){let e,t=as[A];if(t)return t;switch(A){case 1:e=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:e=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:e=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:e=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:e=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:e=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:e=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:e=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:e=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:e=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:e=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:e=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:e=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:e=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:e=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new Ma(`standard table B.${A} does not exist`)}for(let A=0,t=e.length;A<t;A++)e[A]=new es(e[A]);return t=new is(e,!0),as[A]=t,t}class ns{constructor(A,e,t){this.data=A,this.start=e,this.end=t,this.position=e,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new Ma("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}const A=this.currentByte>>this.shift&1;return this.shift--,A}readBits(A){let e,t=0;for(e=A-1;e>=0;e--)t|=this.readBit()<<e;return t}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function gs(A,e,t){let i=0;for(let a=0,s=e.length;a<s;a++){const s=t[e[a]];if(s){if(A===i)return s;i++}}throw new Ma("can't find custom Huffman table")}function rs(A,e,t){const i=[];for(let a=0;a<t;a++){const t=new Uint8Array(e);i.push(t);for(let i=0;i<e;i++)t[i]=A.readBit();A.byteAlign()}return i}function os(A,e,t,i){const a=new Da(A,{K:-1,Columns:e,Rows:t,BlackIs1:!0,EndOfBlock:i}),s=[];let n,g=!1;for(let A=0;A<t;A++){const A=new Uint8Array(e);s.push(A);let t=-1;for(let i=0;i<e;i++)t<0&&(n=a.readNextChar(),-1===n&&(n=0,g=!0),t=7),A[i]=n>>t&1,t--}if(i&&!g){const A=5;for(let e=0;e<A&&-1!==a.readNextChar();e++);}return s}class Is{parseChunks(A){return function(A){const e=new As;for(let t=0,i=A.length;t<i;t++){const i=A[t];$a(Va({},i.data,i.start,i.end),e)}return e.buffer}(A)}parse(A){throw new Error("Not implemented: Jbig2Image.parse")}}class cs extends ha{constructor(A,e,t){super(e),this.stream=A,this.dict=A.dict,this.maybeLength=e,this.params=t}get bytes(){return ct(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(A){}readBlock(){this.decodeImage()}decodeImage(A){if(this.eof)return this.buffer;A||=this.bytes;const e=new Is,t=[];if(this.params instanceof _t){const A=this.params.get("JBIG2Globals");if(A instanceof ni){const e=A.getBytes();t.push({data:e,start:0,end:e.length})}}t.push({data:A,start:0,end:A.length});const i=e.parseChunks(t),a=i.length;for(let A=0;A<a;A++)i[A]^=255;return this.buffer=i,this.bufferLength=a,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}function Cs(A){switch(A.kind){case y:return Bs(A);case w:return function({src:A,srcPos:e=0,dest:t,destPos:i=0,width:a,height:s}){let n=0;const g=A.length>>2,r=new Uint32Array(A.buffer,e,g);if(wt.isLittleEndian){for(;n<g-2;n+=3,i+=4){const A=r[n],e=r[n+1],a=r[n+2];t[i]=4278190080|A,t[i+1]=A>>>24|e<<8|4278190080,t[i+2]=e>>>16|a<<16|4278190080,t[i+3]=a>>>8|4278190080}for(let e=4*n,a=A.length;e<a;e+=3)t[i++]=A[e]|A[e+1]<<8|A[e+2]<<16|4278190080}else{for(;n<g-2;n+=3,i+=4){const A=r[n],e=r[n+1],a=r[n+2];t[i]=255|A,t[i+1]=A<<24|e>>>8|255,t[i+2]=e<<16|a>>>16|255,t[i+3]=a<<8|255}for(let e=4*n,a=A.length;e<a;e+=3)t[i++]=A[e]<<24|A[e+1]<<16|A[e+2]<<8|255}return{srcPos:e,destPos:i}}(A)}return null}function Bs({src:A,srcPos:e=0,dest:t,width:i,height:a,nonBlackColor:s=4294967295,inverseDecode:n=!1}){const g=wt.isLittleEndian?4278190080:255,[r,o]=n?[s,g]:[g,s],I=i>>3,c=7&i,C=A.length;t=new Uint32Array(t.buffer);let B=0;for(let i=0;i<a;i++){for(const i=e+I;e<i;e++){const i=e<C?A[e]:255;t[B++]=128&i?o:r,t[B++]=64&i?o:r,t[B++]=32&i?o:r,t[B++]=16&i?o:r,t[B++]=8&i?o:r,t[B++]=4&i?o:r,t[B++]=2&i?o:r,t[B++]=1&i?o:r}if(0===c)continue;const i=e<C?A[e++]:255;for(let A=0;A<c;A++)t[B++]=i&1<<7-A?o:r}return{srcPos:e,destPos:B}}class hs extends Ct{constructor(A){super(A,"JpegError")}}class Qs extends Ct{constructor(A,e){super(A,"DNLMarkerError"),this.scanLines=e}}class ls extends Ct{constructor(A){super(A,"EOIMarkerError")}}const Es=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),us=4017,ds=799,fs=3406,ps=2276,ms=1567,ys=3784,ws=5793,Ds=2896;function bs(A,e){let t,i,a=0,s=16;for(;s>0&&!A[s-1];)s--;const n=[{children:[],index:0}];let g,r=n[0];for(t=0;t<s;t++){for(i=0;i<A[t];i++){for(r=n.pop(),r.children[r.index]=e[a];r.index>0;)r=n.pop();for(r.index++,n.push(r);n.length<=t;)n.push(g={children:[],index:0}),r.children[r.index]=g.children,r=g;a++}t+1<s&&(n.push(g={children:[],index:0}),r.children[r.index]=g.children,r=g)}return n[0].children}function ks(A,e,t){return 64*((A.blocksPerLine+1)*e+t)}function Fs(A,e,t,i,a,s,n,g,r,o=!1){const I=t.mcusPerLine,c=t.progressive,C=e;let B=0,h=0;function Q(){if(h>0)return h--,B>>h&1;if(B=A[e++],255===B){const i=A[e++];if(i){if(220===i&&o){const i=di(A,e+=2);if(e+=2,i>0&&i!==t.scanLines)throw new Qs("Found DNL marker (0xFFDC) while parsing scan data",i)}else if(217===i){if(o){const A=m*(8===t.precision?8:0);if(A>0&&Math.round(t.scanLines/A)>=5)throw new Qs("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",A)}throw new ls("Found EOI marker (0xFFD9) while parsing scan data")}throw new hs(`unexpected marker ${(B<<8|i).toString(16)}`)}}return h=7,B>>>7}function l(A){let e=A;for(;;){switch(e=e[Q()],typeof e){case"number":return e;case"object":continue}throw new hs("invalid huffman sequence")}}function E(A){let e=0;for(;A>0;)e=e<<1|Q(),A--;return e}function u(A){if(1===A)return 1===Q()?1:-1;const e=E(A);return e>=1<<A-1?e:e+(-1<<A)+1}let d=0;let f,p=0;let m=0;function y(A,e,t,i,a){const s=t%I;m=(t/I|0)*A.v+i;const n=s*A.h+a;e(A,ks(A,m,n))}function w(A,e,t){m=t/A.blocksPerLine|0;const i=t%A.blocksPerLine;e(A,ks(A,m,i))}const D=i.length;let b,k,F,S,R,G;G=c?0===s?0===g?function(A,e){const t=l(A.huffmanTableDC),i=0===t?0:u(t)<<r;A.blockData[e]=A.pred+=i}:function(A,e){A.blockData[e]|=Q()<<r}:0===g?function(A,e){if(d>0)return void d--;let t=s;const i=n;for(;t<=i;){const i=l(A.huffmanTableAC),a=15&i,s=i>>4;if(0===a){if(s<15){d=E(s)+(1<<s)-1;break}t+=16;continue}t+=s;const n=Es[t];A.blockData[e+n]=u(a)*(1<<r),t++}}:function(A,e){let t=s;const i=n;let a,g,o=0;for(;t<=i;){const i=e+Es[t],s=A.blockData[i]<0?-1:1;switch(p){case 0:if(g=l(A.huffmanTableAC),a=15&g,o=g>>4,0===a)o<15?(d=E(o)+(1<<o),p=4):(o=16,p=1);else{if(1!==a)throw new hs("invalid ACn encoding");f=u(a),p=o?2:3}continue;case 1:case 2:A.blockData[i]?A.blockData[i]+=s*(Q()<<r):(o--,0===o&&(p=2===p?3:0));break;case 3:A.blockData[i]?A.blockData[i]+=s*(Q()<<r):(A.blockData[i]=f<<r,p=0);break;case 4:A.blockData[i]&&(A.blockData[i]+=s*(Q()<<r))}t++}4===p&&(d--,0===d&&(p=0))}:function(A,e){const t=l(A.huffmanTableDC),i=0===t?0:u(t);A.blockData[e]=A.pred+=i;let a=1;for(;a<64;){const t=l(A.huffmanTableAC),i=15&t,s=t>>4;if(0===i){if(s<15)break;a+=16;continue}a+=s;const n=Es[a];A.blockData[e+n]=u(i),a++}};let N,x=0;const U=1===D?i[0].blocksPerLine*i[0].blocksPerColumn:I*t.mcusPerColumn;let M,L;for(;x<=U;){const t=a?Math.min(U-x,a):U;if(t>0){for(k=0;k<D;k++)i[k].pred=0;if(d=0,1===D)for(b=i[0],R=0;R<t;R++)w(b,G,x),x++;else for(R=0;R<t;R++){for(k=0;k<D;k++)for(b=i[k],M=b.h,L=b.v,F=0;F<L;F++)for(S=0;S<M;S++)y(b,G,x,F,S);x++}}if(h=0,N=Gs(A,e),!N)break;if(N.invalid){gt(`decodeScan - ${t>0?"unexpected":"excessive"} MCU data, current marker is: ${N.invalid}`),e=N.offset}if(!(N.marker>=65488&&N.marker<=65495))break;e+=2}return e-C}function Ss(A,e,t){const i=A.quantizationTable,a=A.blockData;let s,n,g,r,o,I,c,C,B,h,Q,l,E,u,d,f,p;if(!i)throw new hs("missing required Quantization Table.");for(let A=0;A<64;A+=8)B=a[e+A],h=a[e+A+1],Q=a[e+A+2],l=a[e+A+3],E=a[e+A+4],u=a[e+A+5],d=a[e+A+6],f=a[e+A+7],B*=i[A],0!==(h|Q|l|E|u|d|f)?(h*=i[A+1],Q*=i[A+2],l*=i[A+3],E*=i[A+4],u*=i[A+5],d*=i[A+6],f*=i[A+7],s=ws*B+128>>8,n=ws*E+128>>8,g=Q,r=d,o=Ds*(h-f)+128>>8,C=Ds*(h+f)+128>>8,I=l<<4,c=u<<4,s=s+n+1>>1,n=s-n,p=g*ys+r*ms+128>>8,g=g*ms-r*ys+128>>8,r=p,o=o+c+1>>1,c=o-c,C=C+I+1>>1,I=C-I,s=s+r+1>>1,r=s-r,n=n+g+1>>1,g=n-g,p=o*ps+C*fs+2048>>12,o=o*fs-C*ps+2048>>12,C=p,p=I*ds+c*us+2048>>12,I=I*us-c*ds+2048>>12,c=p,t[A]=s+C,t[A+7]=s-C,t[A+1]=n+c,t[A+6]=n-c,t[A+2]=g+I,t[A+5]=g-I,t[A+3]=r+o,t[A+4]=r-o):(p=ws*B+512>>10,t[A]=p,t[A+1]=p,t[A+2]=p,t[A+3]=p,t[A+4]=p,t[A+5]=p,t[A+6]=p,t[A+7]=p);for(let A=0;A<8;++A)B=t[A],h=t[A+8],Q=t[A+16],l=t[A+24],E=t[A+32],u=t[A+40],d=t[A+48],f=t[A+56],0!==(h|Q|l|E|u|d|f)?(s=ws*B+2048>>12,n=ws*E+2048>>12,g=Q,r=d,o=Ds*(h-f)+2048>>12,C=Ds*(h+f)+2048>>12,I=l,c=u,s=4112+(s+n+1>>1),n=s-n,p=g*ys+r*ms+2048>>12,g=g*ms-r*ys+2048>>12,r=p,o=o+c+1>>1,c=o-c,C=C+I+1>>1,I=C-I,s=s+r+1>>1,r=s-r,n=n+g+1>>1,g=n-g,p=o*ps+C*fs+2048>>12,o=o*fs-C*ps+2048>>12,C=p,p=I*ds+c*us+2048>>12,I=I*us-c*ds+2048>>12,c=p,B=s+C,f=s-C,h=n+c,d=n-c,Q=g+I,u=g-I,l=r+o,E=r-o,B<16?B=0:B>=4080?B=255:B>>=4,h<16?h=0:h>=4080?h=255:h>>=4,Q<16?Q=0:Q>=4080?Q=255:Q>>=4,l<16?l=0:l>=4080?l=255:l>>=4,E<16?E=0:E>=4080?E=255:E>>=4,u<16?u=0:u>=4080?u=255:u>>=4,d<16?d=0:d>=4080?d=255:d>>=4,f<16?f=0:f>=4080?f=255:f>>=4,a[e+A]=B,a[e+A+8]=h,a[e+A+16]=Q,a[e+A+24]=l,a[e+A+32]=E,a[e+A+40]=u,a[e+A+48]=d,a[e+A+56]=f):(p=ws*B+8192>>14,p=p<-2040?0:p>=2024?255:p+2056>>4,a[e+A]=p,a[e+A+8]=p,a[e+A+16]=p,a[e+A+24]=p,a[e+A+32]=p,a[e+A+40]=p,a[e+A+48]=p,a[e+A+56]=p)}function Rs(A,e){const t=e.blocksPerLine,i=e.blocksPerColumn,a=new Int16Array(64);for(let A=0;A<i;A++)for(let i=0;i<t;i++){Ss(e,ks(e,A,i),a)}return e.blockData}function Gs(A,e,t=e){const i=A.length-1;let a=t<e?t:e;if(e>=i)return null;const s=di(A,e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};let n=di(A,a);for(;!(n>=65472&&n<=65534);){if(++a>=i)return null;n=di(A,a)}return{invalid:s.toString(16),marker:n,offset:a}}class Ns{constructor({decodeTransform:A=null,colorTransform:e=-1}={}){this._decodeTransform=A,this._colorTransform=e}parse(A,{dnlScanLines:e=null}={}){function t(){const e=di(A,n);n+=2;let t=n+e-2;const i=Gs(A,t,n);i?.invalid&&(gt("readDataBlock - incorrect length, current marker is: "+i.invalid),t=i.offset);const a=A.subarray(n,t);return n+=a.length,a}function i(A){const e=Math.ceil(A.samplesPerLine/8/A.maxH),t=Math.ceil(A.scanLines/8/A.maxV);for(const i of A.components){const a=Math.ceil(Math.ceil(A.samplesPerLine/8)*i.h/A.maxH),s=Math.ceil(Math.ceil(A.scanLines/8)*i.v/A.maxV),n=e*i.h,g=64*(t*i.v)*(n+1);i.blockData=new Int16Array(g),i.blocksPerLine=a,i.blocksPerColumn=s}A.mcusPerLine=e,A.mcusPerColumn=t}let a,s,n=0,g=null,r=null,o=0;const I=[],c=[],C=[];let B=di(A,n);if(n+=2,65496!==B)throw new hs("SOI not found");B=di(A,n),n+=2;A:for(;65497!==B;){let h,Q,l;switch(B){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const E=t();65504===B&&74===E[0]&&70===E[1]&&73===E[2]&&70===E[3]&&0===E[4]&&(g={version:{major:E[5],minor:E[6]},densityUnits:E[7],xDensity:E[8]<<8|E[9],yDensity:E[10]<<8|E[11],thumbWidth:E[12],thumbHeight:E[13],thumbData:E.subarray(14,14+3*E[12]*E[13])}),65518===B&&65===E[0]&&100===E[1]&&111===E[2]&&98===E[3]&&101===E[4]&&(r={version:E[5]<<8|E[6],flags0:E[7]<<8|E[8],flags1:E[9]<<8|E[10],transformCode:E[11]});break;case 65499:const u=di(A,n);n+=2;const d=u+n-2;let f;for(;n<d;){const e=A[n++],t=new Uint16Array(64);if(e>>4){if(e>>4!=1)throw new hs("DQT - invalid table spec");for(Q=0;Q<64;Q++)f=Es[Q],t[f]=di(A,n),n+=2}else for(Q=0;Q<64;Q++)f=Es[Q],t[f]=A[n++];I[15&e]=t}break;case 65472:case 65473:case 65474:if(a)throw new hs("Only single frame JPEGs supported");n+=2,a={},a.extended=65473===B,a.progressive=65474===B,a.precision=A[n++];const p=di(A,n);n+=2,a.scanLines=e||p,a.samplesPerLine=di(A,n),n+=2,a.components=[],a.componentIds={};const m=A[n++];let y=0,w=0;for(h=0;h<m;h++){const e=A[n],t=A[n+1]>>4,i=15&A[n+1];y<t&&(y=t),w<i&&(w=i);const s=A[n+2];l=a.components.push({h:t,v:i,quantizationId:s,quantizationTable:null}),a.componentIds[e]=l-1,n+=3}a.maxH=y,a.maxV=w,i(a);break;case 65476:const D=di(A,n);for(n+=2,h=2;h<D;){const e=A[n++],t=new Uint8Array(16);let i=0;for(Q=0;Q<16;Q++,n++)i+=t[Q]=A[n];const a=new Uint8Array(i);for(Q=0;Q<i;Q++,n++)a[Q]=A[n];h+=17+i,(e>>4?c:C)[15&e]=bs(t,a)}break;case 65501:n+=2,s=di(A,n),n+=2;break;case 65498:const b=1===++o&&!e;n+=2;const k=A[n++],F=[];for(h=0;h<k;h++){const e=A[n++],t=a.componentIds[e],i=a.components[t];i.index=e;const s=A[n++];i.huffmanTableDC=C[s>>4],i.huffmanTableAC=c[15&s],F.push(i)}const S=A[n++],R=A[n++],G=A[n++];try{const e=Fs(A,n,a,F,s,S,R,G>>4,15&G,b);n+=e}catch(e){if(e instanceof Qs)return gt(`${e.message} -- attempting to re-parse the JPEG image.`),this.parse(A,{dnlScanLines:e.scanLines});if(e instanceof ls){gt(`${e.message} -- ignoring the rest of the image data.`);break A}throw e}break;case 65500:n+=4;break;case 65535:255!==A[n]&&n--;break;default:const N=Gs(A,n-2,n-3);if(N?.invalid){gt("JpegImage.parse - unexpected data, current marker is: "+N.invalid),n=N.offset;break}if(!N||n>=A.length-1){gt("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break A}throw new hs("JpegImage.parse - unknown marker: "+B.toString(16))}B=di(A,n),n+=2}if(!a)throw new hs("JpegImage.parse - no frame data found.");this.width=a.samplesPerLine,this.height=a.scanLines,this.jfif=g,this.adobe=r,this.components=[];for(const A of a.components){const e=I[A.quantizationId];e&&(A.quantizationTable=e),this.components.push({index:A.index,output:Rs(0,A),scaleX:A.h/a.maxH,scaleY:A.v/a.maxV,blocksPerLine:A.blocksPerLine,blocksPerColumn:A.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(A,e,t=!1){const i=this.width/A,a=this.height/e;let s,n,g,r,o,I,c,C,B,h,Q,l=0;const E=this.components.length,u=A*e*E,d=new Uint8ClampedArray(u),f=new Uint32Array(A),p=4294967288;let m;for(c=0;c<E;c++){if(s=this.components[c],n=s.scaleX*i,g=s.scaleY*a,l=c,Q=s.output,r=s.blocksPerLine+1<<3,n!==m){for(o=0;o<A;o++)C=0|o*n,f[o]=(C&p)<<3|7&C;m=n}for(I=0;I<e;I++)for(C=0|I*g,h=r*(C&p)|(7&C)<<3,o=0;o<A;o++)d[l]=Q[h+f[o]],l+=E}let y=this._decodeTransform;if(t||4!==E||y||(y=new Int32Array([-256,255,-256,255,-256,255,-256,255])),y)for(c=0;c<u;)for(C=0,B=0;C<E;C++,c++,B+=2)d[c]=(d[c]*y[B]>>8)+y[B+1];return d}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(A){let e,t,i;for(let a=0,s=A.length;a<s;a+=3)e=A[a],t=A[a+1],i=A[a+2],A[a]=e-179.456+1.402*i,A[a+1]=e+135.459-.344*t-.714*i,A[a+2]=e-226.816+1.772*t;return A}_convertYccToRgba(A,e){for(let t=0,i=0,a=A.length;t<a;t+=3,i+=4){const a=A[t],s=A[t+1],n=A[t+2];e[i]=a-179.456+1.402*n,e[i+1]=a+135.459-.344*s-.714*n,e[i+2]=a-226.816+1.772*s,e[i+3]=255}return e}_convertYcckToRgb(A){let e,t,i,a,s=0;for(let n=0,g=A.length;n<g;n+=4)e=A[n],t=A[n+1],i=A[n+2],a=A[n+3],A[s++]=t*(-660635669420364e-19*t+.000437130475926232*i-54080610064599e-18*e+.00048449797120281*a-.154362151871126)-122.67195406894+i*(-.000957964378445773*i+.000817076911346625*e-.00477271405408747*a+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*a+.48357088451265)+a*(-.000336197177618394*a+.484791561490776),A[s++]=107.268039397724+t*(219927104525741e-19*t-.000640992018297945*i+.000659397001245577*e+.000426105652938837*a-.176491792462875)+i*(-.000778269941513683*i+.00130872261408275*e+.000770482631801132*a-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*a+.25802910206845)+a*(-.000318913117588328*a-.213742400323665),A[s++]=t*(-.000570115196973677*t-263409051004589e-19*i+.0020741088115012*e-.00288260236853442*a+.814272968359295)-20.810012546947+i*(-153496057440975e-19*i-.000132689043961446*e+.000560833691242812*a-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*a+.116935020465145)+a*(-.000343531996510555*a+.24165260232407);return A.subarray(0,s)}_convertYcckToRgba(A){for(let e=0,t=A.length;e<t;e+=4){const t=A[e],i=A[e+1],a=A[e+2],s=A[e+3];A[e]=i*(-660635669420364e-19*i+.000437130475926232*a-54080610064599e-18*t+.00048449797120281*s-.154362151871126)-122.67195406894+a*(-.000957964378445773*a+.000817076911346625*t-.00477271405408747*s+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*s+.48357088451265)+s*(-.000336197177618394*s+.484791561490776),A[e+1]=107.268039397724+i*(219927104525741e-19*i-.000640992018297945*a+.000659397001245577*t+.000426105652938837*s-.176491792462875)+a*(-.000778269941513683*a+.00130872261408275*t+.000770482631801132*s-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*s+.25802910206845)+s*(-.000318913117588328*s-.213742400323665),A[e+2]=i*(-.000570115196973677*i-263409051004589e-19*a+.0020741088115012*t-.00288260236853442*s+.814272968359295)-20.810012546947+a*(-153496057440975e-19*a-.000132689043961446*t+.000560833691242812*s-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*s+.116935020465145)+s*(-.000343531996510555*s+.24165260232407),A[e+3]=255}return A}_convertYcckToCmyk(A){let e,t,i;for(let a=0,s=A.length;a<s;a+=4)e=A[a],t=A[a+1],i=A[a+2],A[a]=434.456-e-1.402*i,A[a+1]=119.541-e+.344*t+.714*i,A[a+2]=481.816-e-1.772*t;return A}_convertCmykToRgb(A){let e,t,i,a,s=0;for(let n=0,g=A.length;n<g;n+=4)e=A[n],t=A[n+1],i=A[n+2],a=A[n+3],A[s++]=255+e*(-6747147073602441e-20*e+.0008379262121013727*t+.0002894718188643294*i+.003264231057537806*a-1.1185611867203937)+t*(26374107616089405e-21*t-8626949158638572e-20*i-.0002748769067499491*a-.02155688794978967)+i*(-3878099212869363e-20*i-.0003267808279485286*a+.0686742238595345)-a*(.0003361971776183937*a+.7430659151342254),A[s++]=255+e*(.00013596372813588848*e+.000924537132573585*t+.00010567359618683593*i+.0004791864687436512*a-.3109689587515875)+t*(-.00023545346108370344*t+.0002702845253534714*i+.0020200308977307156*a-.7488052167015494)+i*(6834815998235662e-20*i+.00015168452363460973*a-.09751927774728933)-a*(.0003189131175883281*a+.7364883807733168),A[s++]=255+e*(13598650411385307e-21*e+.00012423956175490851*t+.0004751985097583589*i-36729317476630422e-22*a-.05562186980264034)+t*(.00016141380598724676*t+.0009692239130725186*i+.0007782692450036253*a-.44015232367526463)+i*(5.068882914068769e-7*i+.0017778369011375071*a-.7591454649749609)-a*(.0003435319965105553*a+.7063770186160144);return A.subarray(0,s)}_convertCmykToRgba(A){for(let e=0,t=A.length;e<t;e+=4){const t=A[e],i=A[e+1],a=A[e+2],s=A[e+3];A[e]=255+t*(-6747147073602441e-20*t+.0008379262121013727*i+.0002894718188643294*a+.003264231057537806*s-1.1185611867203937)+i*(26374107616089405e-21*i-8626949158638572e-20*a-.0002748769067499491*s-.02155688794978967)+a*(-3878099212869363e-20*a-.0003267808279485286*s+.0686742238595345)-s*(.0003361971776183937*s+.7430659151342254),A[e+1]=255+t*(.00013596372813588848*t+.000924537132573585*i+.00010567359618683593*a+.0004791864687436512*s-.3109689587515875)+i*(-.00023545346108370344*i+.0002702845253534714*a+.0020200308977307156*s-.7488052167015494)+a*(6834815998235662e-20*a+.00015168452363460973*s-.09751927774728933)-s*(.0003189131175883281*s+.7364883807733168),A[e+2]=255+t*(13598650411385307e-21*t+.00012423956175490851*i+.0004751985097583589*a-36729317476630422e-22*s-.05562186980264034)+i*(.00016141380598724676*i+.0009692239130725186*a+.0007782692450036253*s-.44015232367526463)+a*(5.068882914068769e-7*a+.0017778369011375071*s-.7591454649749609)-s*(.0003435319965105553*s+.7063770186160144),A[e+3]=255}return A}getData({width:A,height:e,forceRGBA:t=!1,forceRGB:i=!1,isSourcePDF:a=!1}){if(this.numComponents>4)throw new hs("Unsupported color mode");const s=this._getLinearizedBlockData(A,e,a);if(1===this.numComponents&&(t||i)){const A=s.length*(t?4:3),e=new Uint8ClampedArray(A);let i=0;if(t)!function(A,e){if(wt.isLittleEndian)for(let t=0,i=A.length;t<i;t++)e[t]=65793*A[t]|4278190080;else for(let t=0,i=A.length;t<i;t++)e[t]=16843008*A[t]|255}(s,new Uint32Array(e.buffer));else for(const A of s)e[i++]=A,e[i++]=A,e[i++]=A;return e}if(3===this.numComponents&&this._isColorConversionNeeded){if(t){const A=new Uint8ClampedArray(s.length/3*4);return this._convertYccToRgba(s,A)}return this._convertYccToRgb(s)}if(4===this.numComponents){if(this._isColorConversionNeeded)return t?this._convertYcckToRgba(s):i?this._convertYcckToRgb(s):this._convertYcckToCmyk(s);if(t)return this._convertCmykToRgba(s);if(i)return this._convertCmykToRgb(s)}return s}}class xs extends ha{constructor(A,e,t){super(e),this.stream=A,this.dict=A.dict,this.maybeLength=e,this.params=t}get bytes(){return ct(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(A){}readBlock(){this.decodeImage()}decodeImage(A){if(this.eof)return this.buffer;A||=this.bytes;for(let e=0,t=A.length-1;e<t;e++)if(255===A[e]&&216===A[e+1]){e>0&&(A=A.subarray(e));break}const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(t)){const A=this.dict.get("BPC","BitsPerComponent")||8,i=t.length,a=new Int32Array(i);let s=!1;const n=(1<<A)-1;for(let A=0;A<i;A+=2)a[A]=256*(t[A+1]-t[A])|0,a[A+1]=t[A]*n|0,256===a[A]&&0===a[A+1]||(s=!0);s&&(e.decodeTransform=a)}if(this.params instanceof _t){const A=this.params.get("ColorTransform");Number.isInteger(A)&&(e.colorTransform=A)}const i=new Ns(e);i.parse(A);const a=i.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});return this.buffer=a,this.bufferLength=a.length,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}var Us,Ms=(Us="undefined"!=typeof document?document.currentScript?.src:void 0,function(A={}){var e,t,i=A;new Promise((A,i)=>{e=A,t=i}),i.decode=function(A,{numComponents:e=4,isIndexedColormap:t=!1,smaskInData:a=!1}){const s=A.length,n=i._malloc(s);i.HEAPU8.set(A,n);const g=i._jp2_decode(n,s,e>0?e:0,!!t,!!a);if(i._free(n),g){const{errorMessages:A}=i;return A?(delete i.errorMessages,A):"Unknown error"}const{imageData:r}=i;return i.imageData=null,r};var a,s=Object.assign({},i),n="./this.program",g="";"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),Us&&(g=Us),g=g.startsWith("blob:")?"":g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1);var r,o,I,c,C,B=i.print||console.log.bind(console),h=i.printErr||console.error.bind(console);function Q(A){if(k(A))return function(A){for(var e=atob(A),t=new Uint8Array(e.length),i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}(A.slice(b.length))}function l(){var A=o.buffer;i.HEAP8=I=new Int8Array(A),i.HEAP16=new Int16Array(A),i.HEAPU8=c=new Uint8Array(A),i.HEAPU16=new Uint16Array(A),i.HEAP32=new Int32Array(A),i.HEAPU32=C=new Uint32Array(A),i.HEAPF32=new Float32Array(A),i.HEAPF64=new Float64Array(A)}Object.assign(i,s),s=null,i.arguments&&i.arguments,i.thisProgram&&(n=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(r=i.wasmBinary);var E=[],u=[],d=[];function f(A){E.unshift(A)}function p(A){d.unshift(A)}var m,y=0,w=null,D=null,b="data:application/octet-stream;base64,",k=A=>A.startsWith(b);function F(A,e){var t,i=function(A){if(A==m&&r)return new Uint8Array(r);var e=Q(A);if(e)return e;if(a)return a(A);throw'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)'}(A);return t=new WebAssembly.Module(i),[new WebAssembly.Instance(t,e),t]}var S=A=>{for(;A.length>0;)A.shift()(i)};i.noExitRuntime;var R,G=A=>{var e=(A-o.buffer.byteLength+65535)/65536;try{return o.grow(e),l(),1}catch(A){}},N={},x=()=>{if(!x.strings){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var e in N)void 0===N[e]?delete A[e]:A[e]=N[e];var t=[];for(var e in A)t.push(`${e}=${A[e]}`);x.strings=t}return x.strings},U=[null,[],[]],M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,L=(A,e,t)=>{for(var i=e+t,a=e;A[a]&&!(a>=i);)++a;if(a-e>16&&A.buffer&&M)return M.decode(A.subarray(e,a));for(var s="";e<a;){var n=A[e++];if(128&n){var g=63&A[e++];if(192!=(224&n)){var r=63&A[e++];if((n=224==(240&n)?(15&n)<<12|g<<6|r:(7&n)<<18|g<<12|r<<6|63&A[e++])<65536)s+=String.fromCharCode(n);else{var o=n-65536;s+=String.fromCharCode(55296|o>>10,56320|1023&o)}}else s+=String.fromCharCode((31&n)<<6|g)}else s+=String.fromCharCode(n)}return s},J=(A,e)=>{var t=U[A];0===e||10===e?((1===A?B:h)(L(t,0)),t.length=0):t.push(e)},H=(A,e)=>A?L(c,A,e):"",Y={c:(A,e,t)=>c.copyWithin(A,e,e+t),g:function(A,e){A>>=2;const t=i.imageData=new Uint8ClampedArray(e),a=i.HEAP32.subarray(A,A+e);t.set(a)},f:function(A,e,t,a){A>>=2,e>>=2,t>>=2;const s=i.imageData=new Uint8ClampedArray(3*a),n=i.HEAP32.subarray(A,A+a),g=i.HEAP32.subarray(e,e+a),r=i.HEAP32.subarray(t,t+a);for(let A=0;A<a;A++)s[3*A]=n[A],s[3*A+1]=g[A],s[3*A+2]=r[A]},e:function(A,e,t,a,s){A>>=2,e>>=2,t>>=2,a>>=2;const n=i.imageData=new Uint8ClampedArray(4*s),g=i.HEAP32.subarray(A,A+s),r=i.HEAP32.subarray(e,e+s),o=i.HEAP32.subarray(t,t+s),I=i.HEAP32.subarray(a,a+s);for(let A=0;A<s;A++)n[4*A]=g[A],n[4*A+1]=r[A],n[4*A+2]=o[A],n[4*A+3]=I[A]},k:A=>{var e=c.length,t=2147483648;if((A>>>=0)>t)return!1;for(var i=(A,e)=>A+(e-A%e)%e,a=1;a<=4;a*=2){var s=e*(1+.2/a);s=Math.min(s,A+100663296);var n=Math.min(t,i(Math.max(A,s),65536));if(G(n))return!0}return!1},l:(A,e)=>{var t=0;return x().forEach((i,a)=>{var s=e+t;C[A+4*a>>2]=s,((A,e)=>{for(var t=0;t<A.length;++t)I[e++]=A.charCodeAt(t);I[e]=0})(i,s),t+=i.length+1}),0},m:(A,e)=>{var t=x();C[A>>2]=t.length;var i=0;return t.forEach(A=>i+=A.length+1),C[e>>2]=i,0},n:A=>52,j:function(A,e,t,i,a){return 70},b:(A,e,t,i)=>{for(var a=0,s=0;s<t;s++){var n=C[e>>2],g=C[e+4>>2];e+=8;for(var r=0;r<g;r++)J(A,c[n+r]);a+=g}return C[i>>2]=a,0},o:function(A,e){A>>=2;const t=i.imageData=new Uint8ClampedArray(4*e),a=i.HEAP32.subarray(A,A+e);for(let A=0;A<e;A++)t[4*A]=t[4*A+1]=t[4*A+2]=a[A],t[4*A+3]=255},i:function(A,e,t){A>>=2,e>>=2;const a=i.imageData=new Uint8ClampedArray(4*t),s=i.HEAP32.subarray(A,A+t),n=i.HEAP32.subarray(e,e+t);for(let A=0;A<t;A++)a[4*A]=a[4*A+1]=a[4*A+2]=s[A],a[4*A+3]=n[A]},d:function(A){const e=H(A);(i.warn||console.warn)(`OpenJPEG: ${e}`)},h:function(A,e,t,a){A>>=2,e>>=2,t>>=2;const s=i.imageData=new Uint8ClampedArray(4*a),n=i.HEAP32.subarray(A,A+a),g=i.HEAP32.subarray(e,e+a),r=i.HEAP32.subarray(t,t+a);for(let A=0;A<a;A++)s[4*A]=n[A],s[4*A+1]=g[A],s[4*A+2]=r[A],s[4*A+3]=255},a:function(A){const e=H(A);i.errorMessages?i.errorMessages+="\n"+e:i.errorMessages=e}},v=function(){var A={a:Y};function e(A,e){var t;return v=A.exports,o=v.p,l(),t=v.q,u.unshift(t),function(){if(y--,i.monitorRunDependencies?.(y),0==y&&(null!==w&&(clearInterval(w),w=null),D)){var A=D;D=null,A()}}(),v}if(y++,i.monitorRunDependencies?.(y),i.instantiateWasm)try{return i.instantiateWasm(A,e)}catch(A){h(`Module.instantiateWasm callback failed with error: ${A}`),t(A)}return m||(m="data:application/octet-stream;base64, "),e(F(m,A)[0])}();function K(){function A(){R||(R=!0,i.calledRun=!0,S(u),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)p(i.postRun.shift());S(d)}())}y>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)f(i.preRun.shift());S(E)}(),y>0||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),A()},1)):A()))}if(v.q,i._malloc=v.r,i._free=v.s,i._jp2_decode=v.u,D=function A(){R||K(),R||(D=A)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return K(),i});const Ls=Ms;class Js extends Ct{constructor(A){super(A,"JpxError")}}class Hs{static#y=null;static decode(A,e){e||={},this.#y||=Ls({warn:gt});const t=this.#y.decode(A,e);if("string"==typeof t)throw new Js(t);return t}static cleanup(){this.#y=null}static parseImageProperties(A){let e=A.getByte();for(;e>=0;){const t=e;e=A.getByte();if(65361===(t<<8|e)){A.skip(4);const e=A.getInt32()>>>0,t=A.getInt32()>>>0,i=A.getInt32()>>>0,a=A.getInt32()>>>0;A.skip(16);return{width:e-i,height:t-a,bitsPerComponent:8,componentsCount:A.getUint16()}}}throw new Js("No size marker found in JPX stream")}}class Ys extends ha{constructor(A,e,t){super(e),this.stream=A,this.dict=A.dict,this.maybeLength=e,this.params=t}get bytes(){return ct(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(A){}readBlock(A){this.decodeImage(null,A)}decodeImage(A,e){return this.eof||(A||=this.bytes,this.buffer=Hs.decode(A,e),this.bufferLength=this.buffer.length,this.eof=!0),this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}class vs extends ha{constructor(A,e,t){super(e),this.str=A,this.dict=A.dict,this.cachedData=0,this.bitsCached=0;const i=4096,a={earlyChange:t,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(i),dictionaryLengths:new Uint16Array(i),dictionaryPrevCodes:new Uint16Array(i),currentSequence:new Uint8Array(i),currentSequenceLength:0};for(let A=0;A<256;++A)a.dictionaryValues[A]=A,a.dictionaryLengths[A]=1;this.lzwState=a}readBits(A){let e=this.bitsCached,t=this.cachedData;for(;e<A;){const A=this.str.getByte();if(-1===A)return this.eof=!0,null;t=t<<8|A,e+=8}return this.bitsCached=e-=A,this.cachedData=t,this.lastCode=null,t>>>e&(1<<A)-1}readBlock(){let A,e,t,i=1024;const a=this.lzwState;if(!a)return;const s=a.earlyChange;let n=a.nextCode;const g=a.dictionaryValues,r=a.dictionaryLengths,o=a.dictionaryPrevCodes;let I=a.codeLength,c=a.prevCode;const C=a.currentSequence;let B=a.currentSequenceLength,h=0,Q=this.bufferLength,l=this.ensureBuffer(this.bufferLength+i);for(A=0;A<512;A++){const A=this.readBits(I),a=B>0;if(A<256)C[0]=A,B=1;else{if(!(A>=258)){if(256===A){I=9,n=258,B=0;continue}this.eof=!0,delete this.lzwState;break}if(A<n)for(B=r[A],e=B-1,t=A;e>=0;e--)C[e]=g[t],t=o[t];else C[B++]=C[0]}if(a&&(o[n]=c,r[n]=r[c]+1,g[n]=C[0],n++,I=n+s&n+s-1?I:0|Math.min(Math.log(n+s)/.6931471805599453+1,12)),c=A,h+=B,i<h){do{i+=512}while(i<h);l=this.ensureBuffer(this.bufferLength+i)}for(e=0;e<B;e++)l[Q++]=C[e]}a.nextCode=n,a.codeLength=I,a.prevCode=c,a.currentSequenceLength=B,this.bufferLength=Q}}class Ks extends ha{constructor(A,e,t){if(super(e),!(t instanceof _t))return A;const i=this.predictor=t.get("Predictor")||1;if(i<=1)return A;if(2!==i&&(i<10||i>15))throw new ut(`Unsupported predictor: ${i}`);this.readBlock=2===i?this.readBlockTiff:this.readBlockPng,this.str=A,this.dict=A.dict;const a=this.colors=t.get("Colors")||1,s=this.bits=t.get("BPC","BitsPerComponent")||8,n=this.columns=t.get("Columns")||1;return this.pixBytes=a*s+7>>3,this.rowBytes=n*a*s+7>>3,this}readBlockTiff(){const A=this.rowBytes,e=this.bufferLength,t=this.ensureBuffer(e+A),i=this.bits,a=this.colors,s=this.str.getBytes(A);if(this.eof=!s.length,this.eof)return;let n,g=0,r=0,o=0,I=0,c=e;if(1===i&&1===a)for(n=0;n<A;++n){let A=s[n]^g;A^=A>>1,A^=A>>2,A^=A>>4,g=(1&A)<<7,t[c++]=A}else if(8===i){for(n=0;n<a;++n)t[c++]=s[n];for(;n<A;++n)t[c]=t[c-a]+s[n],c++}else if(16===i){const e=2*a;for(n=0;n<e;++n)t[c++]=s[n];for(;n<A;n+=2){const A=((255&s[n])<<8)+(255&s[n+1])+((255&t[c-e])<<8)+(255&t[c-e+1]);t[c++]=A>>8&255,t[c++]=255&A}}else{const A=new Uint8Array(a+1),c=(1<<i)-1;let C=0,B=e;const h=this.columns;for(n=0;n<h;++n)for(let e=0;e<a;++e)o<i&&(g=g<<8|255&s[C++],o+=8),A[e]=A[e]+(g>>o-i)&c,o-=i,r=r<<i|A[e],I+=i,I>=8&&(t[B++]=r>>I-8&255,I-=8);I>0&&(t[B++]=(r<<8-I)+(g&(1<<8-I)-1))}this.bufferLength+=A}readBlockPng(){const A=this.rowBytes,e=this.pixBytes,t=this.str.getByte(),i=this.str.getBytes(A);if(this.eof=!i.length,this.eof)return;const a=this.bufferLength,s=this.ensureBuffer(a+A);let n=s.subarray(a-A,a);0===n.length&&(n=new Uint8Array(A));let g,r,o,I=a;switch(t){case 0:for(g=0;g<A;++g)s[I++]=i[g];break;case 1:for(g=0;g<e;++g)s[I++]=i[g];for(;g<A;++g)s[I]=s[I-e]+i[g]&255,I++;break;case 2:for(g=0;g<A;++g)s[I++]=n[g]+i[g]&255;break;case 3:for(g=0;g<e;++g)s[I++]=(n[g]>>1)+i[g];for(;g<A;++g)s[I]=(n[g]+s[I-e]>>1)+i[g]&255,I++;break;case 4:for(g=0;g<e;++g)r=n[g],o=i[g],s[I++]=r+o;for(;g<A;++g){r=n[g];const A=n[g-e],t=s[I-e],a=t+r-A;let c=a-t;c<0&&(c=-c);let C=a-r;C<0&&(C=-C);let B=a-A;B<0&&(B=-B),o=i[g],s[I++]=c<=C&&c<=B?t+o:C<=B?r+o:A+o}break;default:throw new ut(`Unsupported predictor: ${t}`)}this.bufferLength+=A}}class qs extends ha{constructor(A,e){super(e),this.str=A,this.dict=A.dict}readBlock(){const A=this.str.getBytes(2);if(!A||A.length<2||128===A[0])return void(this.eof=!0);let e,t=this.bufferLength,i=A[0];if(i<128){if(e=this.ensureBuffer(t+i+1),e[t++]=A[1],i>0){const A=this.str.getBytes(i);e.set(A,t),t+=i}}else{i=257-i;const a=A[1];e=this.ensureBuffer(t+i+1);for(let A=0;A<i;A++)e[t++]=a}this.bufferLength=t}}class Ts{constructor({lexer:A,xref:e,allowStreams:t=!1,recoveryMode:i=!1}){this.lexer=A,this.xref=e,this.allowStreams=t,this.recoveryMode=i,this.imageCache=Object.create(null),this._imageId=0,this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof jt&&"ID"===this.buf2.cmd?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(A){if(A instanceof oi)throw A;return!1}}getObj(A=null){const e=this.buf1;if(this.shift(),e instanceof jt)switch(e.cmd){case"BI":return this.makeInlineImage(A);case"[":const t=[];for(;!ii(this.buf1,"]")&&this.buf1!==Wt;)t.push(this.getObj(A));if(this.buf1===Wt){if(this.recoveryMode)return t;throw new Ii("End of file inside array.")}return this.shift(),t;case"<<":const i=new _t(this.xref);for(;!ii(this.buf1,">>")&&this.buf1!==Wt;){if(!(this.buf1 instanceof Vt)){nt("Malformed dictionary: key must be a name object"),this.shift();continue}const e=this.buf1.name;if(this.shift(),this.buf1===Wt)break;i.set(e,this.getObj(A))}if(this.buf1===Wt){if(this.recoveryMode)return i;throw new Ii("End of file inside dictionary.")}return ii(this.buf2,"stream")?this.allowStreams?this.makeStream(i,A):i:(this.shift(),i);default:return e}if(Number.isInteger(e)){if(Number.isInteger(this.buf1)&&ii(this.buf2,"R")){const A=$t.get(e,this.buf1);return this.shift(),this.shift(),A}return e}return"string"==typeof e&&A?A.decryptString(e):e}findDefaultInlineStreamEnd(A){const{knownCommands:e}=this.lexer,t=A.pos;let i,a,s=0;for(;-1!==(i=A.getByte());)if(0===s)s=69===i?1:0;else if(1===s)s=73===i?2:0;else if(32===i||10===i||13===i){a=A.pos;const t=A.peekBytes(15),n=t.length;if(0===n)break;for(let A=0;A<n;A++)if(i=t[A],(0!==i||0===t[A+1])&&10!==i&&13!==i&&(i<32||i>127)){s=0;break}if(2!==s)continue;if(!e){gt("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const g=new Zs(new Pi(t.slice()),e);g._hexStringWarn=()=>{};let r=0;for(;;){const A=g.getObj();if(A===Wt){s=0;break}if(A instanceof jt){const t=e[A.cmd];if(!t){s=0;break}if(t.variableArgs?r<=t.numArgs:r===t.numArgs)break;r=0;continue}r++}if(2===s)break}else s=0;-1===i&&(gt("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),a&&(gt('... trying to recover by using the last "EI" occurrence.'),A.skip(-(A.pos-a))));let n=4;return A.skip(-n),i=A.peekByte(),A.skip(n),pi(i)||n--,A.pos-n-t}findDCTDecodeInlineStreamEnd(A){const e=A.pos;let t,i,a=!1;for(;-1!==(t=A.getByte());)if(255===t){switch(A.getByte()){case 0:break;case 255:A.skip(-1);break;case 217:a=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=A.getUint16(),i>2?A.skip(i-2):A.skip(-2)}if(a)break}const s=A.pos-e;return-1===t?(gt("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),A.skip(-s),this.findDefaultInlineStreamEnd(A)):(this.inlineStreamSkipEI(A),s)}findASCII85DecodeInlineStreamEnd(A){const e=A.pos;let t;for(;-1!==(t=A.getByte());)if(126===t){const e=A.pos;for(t=A.peekByte();pi(t);)A.skip(),t=A.peekByte();if(62===t){A.skip();break}if(A.pos>e){const e=A.peekBytes(2);if(69===e[0]&&73===e[1])break}}const i=A.pos-e;return-1===t?(gt("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),A.skip(-i),this.findDefaultInlineStreamEnd(A)):(this.inlineStreamSkipEI(A),i)}findASCIIHexDecodeInlineStreamEnd(A){const e=A.pos;let t;for(;-1!==(t=A.getByte())&&62!==t;);const i=A.pos-e;return-1===t?(gt("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),A.skip(-i),this.findDefaultInlineStreamEnd(A)):(this.inlineStreamSkipEI(A),i)}inlineStreamSkipEI(A){let e,t=0;for(;-1!==(e=A.getByte());)if(0===t)t=69===e?1:0;else if(1===t)t=73===e?2:0;else if(2===t)break}makeInlineImage(A){const e=this.lexer,t=e.stream,i=Object.create(null);let a;for(;!ii(this.buf1,"ID")&&this.buf1!==Wt;){if(!(this.buf1 instanceof Vt))throw new ut("Dictionary key must be a name object");const e=this.buf1.name;if(this.shift(),this.buf1===Wt)break;i[e]=this.getObj(A)}-1!==e.beginInlineImagePos&&(a=t.pos-e.beginInlineImagePos);const s=this.xref.fetchIfRef(i.F||i.Filter);let n;if(s instanceof Vt)n=s.name;else if(Array.isArray(s)){const A=this.xref.fetchIfRef(s[0]);A instanceof Vt&&(n=A.name)}const g=t.pos;let r,o;switch(n){case"DCT":case"DCTDecode":r=this.findDCTDecodeInlineStreamEnd(t);break;case"A85":case"ASCII85Decode":r=this.findASCII85DecodeInlineStreamEnd(t);break;case"AHx":case"ASCIIHexDecode":r=this.findASCIIHexDecodeInlineStreamEnd(t);break;default:r=this.findDefaultInlineStreamEnd(t)}if(r<1e3&&a>0){const A=t.pos;t.pos=e.beginInlineImagePos,o=function(A){const e=[],t=A.length;let i=0;for(;i<t-1;)e.push(A[i++]<<8|A[i++]);return i<t&&e.push(A[i]),t+"_"+String.fromCharCode.apply(null,e)}(t.getBytes(a+r)),t.pos=A;const i=this.imageCache[o];if(void 0!==i)return this.buf2=jt.get("EI"),this.shift(),i.reset(),i}const I=new _t(this.xref);for(const A in i)I.set(A,i[A]);let c=t.makeSubStream(g,r,I);return A&&(c=A.createStream(c,r)),c=this.filter(c,I,r),c.dict=I,void 0!==o&&(c.cacheKey="inline_img_"+ ++this._imageId,this.imageCache[o]=c),this.buf2=jt.get("EI"),this.shift(),c}#w(A){const{stream:e}=this.lexer;e.pos=A;const t=new Uint8Array([101,110,100]),i=t.length,a=[new Uint8Array([115,116,114,101,97,109]),new Uint8Array([115,116,101,97,109]),new Uint8Array([115,116,114,101,97])],s=9-i;for(;e.pos<e.end;){const n=e.peekBytes(2048),g=n.length-9;if(g<=0)break;let r=0;for(;r<g;){let g=0;for(;g<i&&n[r+g]===t[g];)g++;if(g>=i){let i=!1;for(const A of a){const e=A.length;let a=0;for(;a<e&&n[r+g+a]===A[a];)a++;if(a>=s){i=!0;break}if(a>=e){pi(n[r+g+a])&&(nt(`Found "${ft([...t,...A])}" when searching for endstream command.`),i=!0);break}}if(i)return e.pos+=r,e.pos-A}r++}e.pos+=g}return-1}makeStream(A,e){const t=this.lexer;let i=t.stream;t.skipToNextLine();const a=i.pos-1;let s=A.get("Length");if(Number.isInteger(s)||(nt(`Bad length "${s&&s.toString()}" in stream.`),s=0),i.pos=a+s,t.nextChar(),this.tryShift()&&ii(this.buf2,"endstream"))this.shift();else{if(s=this.#w(a),s<0)throw new ut("Missing endstream command.");t.nextChar(),this.shift(),this.shift()}return this.shift(),i=i.makeSubStream(a,s,A),e&&(i=e.createStream(i,s)),i=this.filter(i,A,s),i.dict=A,i}filter(A,e,t){let i=e.get("F","Filter"),a=e.get("DP","DecodeParms");if(i instanceof Vt)return Array.isArray(a)&&gt("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(A,i.name,t,a);let s=t;if(Array.isArray(i)){const e=i,t=a;for(let n=0,g=e.length;n<g;++n){if(i=this.xref.fetchIfRef(e[n]),!(i instanceof Vt))throw new ut(`Bad filter name "${i}"`);a=null,Array.isArray(t)&&n in t&&(a=this.xref.fetchIfRef(t[n])),A=this.makeFilter(A,i.name,s,a),s=null}}return A}makeFilter(A,e,t,i){if(0===t)return gt(`Empty "${e}" stream.`),new Zi;try{switch(e){case"Fl":case"FlateDecode":return i?new Ks(new Na(A,t),t,i):new Na(A,t);case"LZW":case"LZWDecode":let e=1;return i?(i.has("EarlyChange")&&(e=i.get("EarlyChange")),new Ks(new vs(A,t,e),t,i)):new vs(A,t,e);case"DCT":case"DCTDecode":return new xs(A,t,i);case"JPX":case"JPXDecode":return new Ys(A,t,i);case"A85":case"ASCII85Decode":return new la(A,t);case"AHx":case"ASCIIHexDecode":return new Ea(A,t);case"CCF":case"CCITTFaxDecode":return new ba(A,t,i);case"RL":case"RunLengthDecode":return new qs(A,t);case"JBIG2Decode":return new cs(A,t,i)}return gt(`Filter "${e}" is not supported.`),A}catch(A){if(A instanceof oi)throw A;return gt(`Invalid stream: "${A}"`),new Zi}}}const Ps=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Ws(A){return A>=48&&A<=57?15&A:A>=65&&A<=70||A>=97&&A<=102?9+(15&A):-1}class Zs{constructor(A,e=null){this.stream=A,this.nextChar(),this.strBuf=[],this.knownCommands=e,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let A=this.currentChar,e=!1,t=0,i=1;if(45===A?(i=-1,A=this.nextChar(),45===A&&(A=this.nextChar())):43===A&&(A=this.nextChar()),10===A||13===A)do{A=this.nextChar()}while(10===A||13===A);if(46===A&&(t=10,A=this.nextChar()),A<48||A>57){const e=`Invalid number: ${String.fromCharCode(A)} (charCode ${A})`;if(pi(A)||-1===A)return nt(`Lexer.getNumber - "${e}".`),0;throw new ut(e)}let a=A-48,s=0,n=1;for(;(A=this.nextChar())>=0;)if(A>=48&&A<=57){const i=A-48;e?s=10*s+i:(0!==t&&(t*=10),a=10*a+i)}else if(46===A){if(0!==t)break;t=1}else if(45===A)gt("Badly formatted number: minus sign in the middle");else{if(69!==A&&101!==A)break;if(A=this.peekChar(),43===A||45===A)n=45===A?-1:1,this.nextChar();else if(A<48||A>57)break;e=!0}return 0!==t&&(a/=t),e&&(a*=10**(n*s)),i*a}getString(){let A=1,e=!1;const t=this.strBuf;t.length=0;let i=this.nextChar();for(;;){let a=!1;switch(0|i){case-1:gt("Unterminated string"),e=!0;break;case 40:++A,t.push("(");break;case 41:0===--A?(this.nextChar(),e=!0):t.push(")");break;case 92:switch(i=this.nextChar(),i){case-1:gt("Unterminated string"),e=!0;break;case 110:t.push("\n");break;case 114:t.push("\r");break;case 116:t.push("\t");break;case 98:t.push("\b");break;case 102:t.push("\f");break;case 92:case 40:case 41:t.push(String.fromCharCode(i));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let A=15&i;i=this.nextChar(),a=!0,i>=48&&i<=55&&(A=(A<<3)+(15&i),i=this.nextChar(),i>=48&&i<=55&&(a=!1,A=(A<<3)+(15&i))),t.push(String.fromCharCode(A));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:t.push(String.fromCharCode(i))}break;default:t.push(String.fromCharCode(i))}if(e)break;a||(i=this.nextChar())}return t.join("")}getName(){let A,e;const t=this.strBuf;for(t.length=0;(A=this.nextChar())>=0&&!Ps[A];)if(35===A){if(A=this.nextChar(),Ps[A]){gt("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),t.push("#");break}const i=Ws(A);if(-1!==i){e=A,A=this.nextChar();const a=Ws(A);if(-1===a){if(gt(`Lexer_getName: Illegal digit (${String.fromCharCode(A)}) in hexadecimal number.`),t.push("#",String.fromCharCode(e)),Ps[A])break;t.push(String.fromCharCode(A));continue}t.push(String.fromCharCode(i<<4|a))}else t.push("#",String.fromCharCode(A))}else t.push(String.fromCharCode(A));return t.length>127&&gt(`Name token is longer than allowed by the spec: ${t.length}`),Vt.get(t.join(""))}_hexStringWarn(A){5!==this._hexStringNumWarn++?this._hexStringNumWarn>5||gt(`getHexString - ignoring invalid character: ${A}`):gt("getHexString - ignoring additional invalid characters.")}getHexString(){const A=this.strBuf;A.length=0;let e,t,i=this.currentChar,a=!0;for(this._hexStringNumWarn=0;;){if(i<0){gt("Unterminated hex string");break}if(62===i){this.nextChar();break}if(1!==Ps[i]){if(a){if(e=Ws(i),-1===e){this._hexStringWarn(i),i=this.nextChar();continue}}else{if(t=Ws(i),-1===t){this._hexStringWarn(i),i=this.nextChar();continue}A.push(String.fromCharCode(e<<4|t))}a=!a,i=this.nextChar()}else i=this.nextChar()}return A.join("")}getObj(){let A=!1,e=this.currentChar;for(;;){if(e<0)return Wt;if(A)10!==e&&13!==e||(A=!1);else if(37===e)A=!0;else if(1!==Ps[e])break;e=this.nextChar()}switch(0|e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),jt.get("[");case 93:return this.nextChar(),jt.get("]");case 60:return e=this.nextChar(),60===e?(this.nextChar(),jt.get("<<")):this.getHexString();case 62:return e=this.nextChar(),62===e?(this.nextChar(),jt.get(">>")):jt.get(">");case 123:return this.nextChar(),jt.get("{");case 125:return this.nextChar(),jt.get("}");case 41:throw this.nextChar(),new ut(`Illegal character: ${e}`)}let t=String.fromCharCode(e);if(e<32||e>127){const A=this.peekChar();if(A>=32&&A<=127)return this.nextChar(),jt.get(t)}const i=this.knownCommands;let a=void 0!==i?.[t];for(;(e=this.nextChar())>=0&&!Ps[e];){const A=t+String.fromCharCode(e);if(a&&void 0===i[A])break;if(128===t.length)throw new ut(`Command token too long: ${t.length}`);t=A,a=void 0!==i?.[t]}return"true"===t||"false"!==t&&("null"===t?null:("BI"===t&&(this.beginInlineImagePos=this.stream.pos),jt.get(t)))}skipToNextLine(){let A=this.currentChar;for(;A>=0;){if(13===A){A=this.nextChar(),10===A&&this.nextChar();break}if(10===A){this.nextChar();break}A=this.nextChar()}}}class Os{static create(A){function e(A,e,t=!1){const i=A.get(e);if(Number.isInteger(i)&&(t?i>=0:i>0))return i;throw new Error(`The "${e}" parameter in the linearization dictionary is invalid.`)}const t=new Ts({lexer:new Zs(A),xref:null}),i=t.getObj(),a=t.getObj(),s=t.getObj(),n=t.getObj();let g,r;if(!(Number.isInteger(i)&&Number.isInteger(a)&&ii(s,"obj")&&n instanceof _t&&"number"==typeof(g=n.get("Linearized"))&&g>0))return null;if((r=e(n,"L"))!==A.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:r,hints:function(A){const e=A.get("H");let t;if(Array.isArray(e)&&(2===(t=e.length)||4===t)){for(let A=0;A<t;A++){const t=e[A];if(!(Number.isInteger(t)&&t>0))throw new Error(`Hint (${A}) in the linearization dictionary is invalid.`)}return e}throw new Error("Hint array in the linearization dictionary is invalid.")}(n),objectNumberFirst:e(n,"O"),endFirst:e(n,"E"),numPages:e(n,"N"),mainXRefEntriesOffset:e(n,"T"),pageFirst:n.has("P")?e(n,"P",!0):0}}}const Xs=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],Vs=2**24-1;class js{constructor(A=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=A}addCodespaceRange(A,e,t){this.codespaceRanges[A-1].push(e,t),this.numCodespaceRanges++}mapCidRange(A,e,t){if(e-A>Vs)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;A<=e;)this._map[A++]=t++}mapBfRange(A,e,t){if(e-A>Vs)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const i=t.length-1;for(;A<=e;){this._map[A++]=t;const e=t.charCodeAt(i)+1;e>255?t=t.substring(0,i-1)+String.fromCharCode(t.charCodeAt(i-1)+1)+"\0":t=t.substring(0,i)+String.fromCharCode(e)}}mapBfRangeToArray(A,e,t){if(e-A>Vs)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const i=t.length;let a=0;for(;A<=e&&a<i;)this._map[A]=t[a++],++A}mapOne(A,e){this._map[A]=e}lookup(A){return this._map[A]}contains(A){return void 0!==this._map[A]}forEach(A){const e=this._map,t=e.length;if(t<=65536)for(let i=0;i<t;i++)void 0!==e[i]&&A(i,e[i]);else for(const t in e)A(t,e[t])}charCodeOf(A){const e=this._map;if(e.length<=65536)return e.indexOf(A);for(const t in e)if(e[t]===A)return 0|t;return-1}getMap(){return this._map}readCharCode(A,e,t){let i=0;const a=this.codespaceRanges;for(let s=0,n=a.length;s<n;s++){i=(i<<8|A.charCodeAt(e+s))>>>0;const n=a[s];for(let A=0,e=n.length;A<e;){const e=n[A++],a=n[A++];if(i>=e&&i<=a)return t.charcode=i,void(t.length=s+1)}}t.charcode=0,t.length=1}getCharCodeLength(A){const e=this.codespaceRanges;for(let t=0,i=e.length;t<i;t++){const i=e[t];for(let e=0,a=i.length;e<a;){const a=i[e++],s=i[e++];if(A>=a&&A<=s)return t+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let A=0;A<65536;A++)if(this._map[A]!==A)return!1;return!0}}class zs extends js{constructor(A,e){super(),this.vertical=A,this.addCodespaceRange(e,0,65535)}mapCidRange(A,e,t){rt("should not call mapCidRange")}mapBfRange(A,e,t){rt("should not call mapBfRange")}mapBfRangeToArray(A,e,t){rt("should not call mapBfRangeToArray")}mapOne(A,e){rt("should not call mapCidOne")}lookup(A){return Number.isInteger(A)&&A<=65535?A:void 0}contains(A){return Number.isInteger(A)&&A<=65535}forEach(A){for(let e=0;e<=65535;e++)A(e,e)}charCodeOf(A){return Number.isInteger(A)&&A<=65535?A:-1}getMap(){const A=new Array(65536);for(let e=0;e<=65535;e++)A[e]=e;return A}get length(){return 65536}get isIdentityCMap(){rt("should not access .isIdentityCMap")}}function _s(A){let e=0;for(let t=0;t<A.length;t++)e=e<<8|A.charCodeAt(t);return e>>>0}function $s(A){if("string"!=typeof A)throw new ut("Malformed CMap: expected string.")}function An(A){if(!Number.isInteger(A))throw new ut("Malformed CMap: expected int.")}function en(A,e){for(;;){let t=e.getObj();if(t===Wt)break;if(ii(t,"endbfchar"))return;$s(t);const i=_s(t);t=e.getObj(),$s(t);const a=t;A.mapOne(i,a)}}function tn(A,e){for(;;){let t=e.getObj();if(t===Wt)break;if(ii(t,"endbfrange"))return;$s(t);const i=_s(t);t=e.getObj(),$s(t);const a=_s(t);if(t=e.getObj(),Number.isInteger(t)||"string"==typeof t){const e=Number.isInteger(t)?String.fromCharCode(t):t;A.mapBfRange(i,a,e)}else{if(!ii(t,"["))break;{t=e.getObj();const s=[];for(;!ii(t,"]")&&t!==Wt;)s.push(t),t=e.getObj();A.mapBfRangeToArray(i,a,s)}}}throw new ut("Invalid bf range.")}function an(A,e){for(;;){let t=e.getObj();if(t===Wt)break;if(ii(t,"endcidchar"))return;$s(t);const i=_s(t);t=e.getObj(),An(t);const a=t;A.mapOne(i,a)}}function sn(A,e){for(;;){let t=e.getObj();if(t===Wt)break;if(ii(t,"endcidrange"))return;$s(t);const i=_s(t);t=e.getObj(),$s(t);const a=_s(t);t=e.getObj(),An(t);const s=t;A.mapCidRange(i,a,s)}}function nn(A,e){for(;;){let t=e.getObj();if(t===Wt)break;if(ii(t,"endcodespacerange"))return;if("string"!=typeof t)break;const i=_s(t);if(t=e.getObj(),"string"!=typeof t)break;const a=_s(t);A.addCodespaceRange(t.length,i,a)}throw new ut("Invalid codespace range.")}function gn(A,e){const t=e.getObj();Number.isInteger(t)&&(A.vertical=!!t)}function rn(A,e){const t=e.getObj();t instanceof Vt&&(A.name=t.name)}async function on(A,e,t,i){let a,s;A:for(;;)try{const t=e.getObj();if(t===Wt)break;if(t instanceof Vt)"WMode"===t.name?gn(A,e):"CMapName"===t.name&&rn(A,e),a=t;else if(t instanceof jt)switch(t.cmd){case"endcmap":break A;case"usecmap":a instanceof Vt&&(s=a.name);break;case"begincodespacerange":nn(A,e);break;case"beginbfchar":en(A,e);break;case"begincidchar":an(A,e);break;case"beginbfrange":tn(A,e);break;case"begincidrange":sn(A,e)}}catch(A){if(A instanceof oi)throw A;gt("Invalid cMap data: "+A);continue}return!i&&s&&(i=s),i?In(A,t,i):A}async function In(A,e,t){if(A.useCMap=await cn(t,e),0===A.numCodespaceRanges){const e=A.useCMap.codespaceRanges;for(let t=0;t<e.length;t++)A.codespaceRanges[t]=e[t].slice();A.numCodespaceRanges=A.useCMap.numCodespaceRanges}return A.useCMap.forEach(function(e,t){A.contains(e)||A.mapOne(e,A.useCMap.lookup(e))}),A}async function cn(A,e){if("Identity-H"===A)return new zs(!1,2);if("Identity-V"===A)return new zs(!0,2);if(!Xs.includes(A))throw new Error("Unknown CMap name: "+A);if(!e)throw new Error("Built-in CMap parameters are not provided.");const{cMapData:t,compressionType:i}=await e(A),a=new js(!0);if(i===pA)return(new Ca).process(t,a,A=>In(a,e,A));if(i===fA){const A=new Zs(new Pi(t));return on(a,A,e,null)}throw new Error(`Invalid CMap "compressionType" value: ${i}`)}class Cn{static async create({encoding:A,fetchBuiltInCMap:e,useCMap:t}){if(A instanceof Vt)return cn(A.name,e);if(A instanceof ni){const i=await on(new js,new Zs(A),e,t);return i.isIdentityCMap?cn(i.name,e):i}throw new Error("Encoding required.")}}const Bn=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],hn=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Qn=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],ln=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],En=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],un=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"],dn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],fn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],pn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],mn=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];function yn(A){switch(A){case"WinAnsiEncoding":return fn;case"StandardEncoding":return dn;case"MacRomanEncoding":return un;case"SymbolSetEncoding":return pn;case"ZapfDingbatsEncoding":return mn;case"ExpertEncoding":return ln;case"MacExpertEncoding":return En;default:return null}}const wn=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Dn=391,bn=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],kn=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(A,e){A[e-2]=A[e-2]+A[e-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(A,e){A[e-2]=A[e-2]-A[e-1]}},{id:"div",min:2,stackDelta:-1,stackFn(A,e){A[e-2]=A[e-2]/A[e-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(A,e){A[e-1]=-A[e-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(A,e){A[e-2]=A[e-2]*A[e-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];class Fn{constructor(A,e,t){this.bytes=A.getBytes(),this.properties=e,this.seacAnalysisEnabled=!!t}parse(){const A=this.properties,e=new Sn;this.cff=e;const t=this.parseHeader(),i=this.parseIndex(t.endPos),a=this.parseIndex(i.endPos),s=this.parseIndex(a.endPos),n=this.parseIndex(s.endPos),g=this.parseDict(a.obj.get(0)),r=this.createDict(Mn,g,e.strings);e.header=t.obj,e.names=this.parseNameIndex(i.obj),e.strings=this.parseStringIndex(s.obj),e.topDict=r,e.globalSubrIndex=n.obj,this.parsePrivateDict(e.topDict),e.isCIDFont=r.hasName("ROS");const o=r.getByName("CharStrings"),I=this.parseIndex(o).obj,c=r.getByName("FontMatrix");c&&(A.fontMatrix=c);const C=r.getByName("FontBBox");let B,h;if(C&&(A.ascent=Math.max(C[3],C[1]),A.descent=Math.min(C[1],C[3]),A.ascentScaled=!0),e.isCIDFont){const A=this.parseIndex(r.getByName("FDArray")).obj;for(let t=0,i=A.count;t<i;++t){const i=A.get(t),a=this.createDict(Mn,this.parseDict(i),e.strings);this.parsePrivateDict(a),e.fdArray.push(a)}h=null,B=this.parseCharsets(r.getByName("charset"),I.count,e.strings,!0),e.fdSelect=this.parseFDSelect(r.getByName("FDSelect"),I.count)}else B=this.parseCharsets(r.getByName("charset"),I.count,e.strings,!1),h=this.parseEncoding(r.getByName("Encoding"),A,e.strings,B.charset);e.charset=B,e.encoding=h;const Q=this.parseCharStrings({charStrings:I,localSubrIndex:r.privateDict.subrsIndex,globalSubrIndex:n.obj,fdSelect:e.fdSelect,fdArray:e.fdArray,privateDict:r.privateDict});return e.charStrings=Q.charStrings,e.seacs=Q.seacs,e.widths=Q.widths,e}parseHeader(){let A=this.bytes;const e=A.length;let t=0;for(;t<e&&1!==A[t];)++t;if(t>=e)throw new ut("Invalid CFF header");0!==t&&(nt("cff data is shifted"),A=A.subarray(t),this.bytes=A);const i=A[0],a=A[1],s=A[2],n=A[3];return{obj:new Rn(i,a,s,n),endPos:s}}parseDict(A){let e=0;function t(){let t=A[e++];return 30===t?function(){let t="";const i=15,a=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],s=A.length;for(;e<s;){const s=A[e++],n=s>>4,g=15&s;if(n===i)break;if(t+=a[n],g===i)break;t+=a[g]}return parseFloat(t)}():28===t?(t=A[e++],t=(t<<24|A[e++]<<16)>>16,t):29===t?(t=A[e++],t=t<<8|A[e++],t=t<<8|A[e++],t=t<<8|A[e++],t):t>=32&&t<=246?t-139:t>=247&&t<=250?256*(t-247)+A[e++]+108:t>=251&&t<=254?-256*(t-251)-A[e++]-108:(gt('CFFParser_parseDict: "'+t+'" is a reserved command.'),NaN)}let i=[];const a=[];e=0;const s=A.length;for(;e<s;){let s=A[e];s<=21?(12===s&&(s=s<<8|A[++e]),a.push([s,i]),i=[],++e):i.push(t())}return a}parseIndex(A){const e=new Nn,t=this.bytes,i=t[A++]<<8|t[A++],a=[];let s,n,g=A;if(0!==i){const e=t[A++],r=A+(i+1)*e-1;for(s=0,n=i+1;s<n;++s){let i=0;for(let a=0;a<e;++a)i<<=8,i+=t[A++];a.push(r+i)}g=a[i]}for(s=0,n=a.length-1;s<n;++s){const A=a[s],i=a[s+1];e.add(t.subarray(A,i))}return{obj:e,endPos:g}}parseNameIndex(A){const e=[];for(let t=0,i=A.count;t<i;++t){const i=A.get(t);e.push(ft(i))}return e}parseStringIndex(A){const e=new Gn;for(let t=0,i=A.count;t<i;++t){const i=A.get(t);e.add(ft(i))}return e}createDict(A,e,t){const i=new A(t);for(const[A,t]of e)i.setByKey(A,t);return i}parseCharString(A,e,t,i){if(!e||A.callDepth>10)return!1;let a=A.stackSize;const s=A.stack;let n=e.length;for(let g=0;g<n;){const r=e[g++];let o=null;if(12===r){const A=e[g++];0===A?(e[g-2]=139,e[g-1]=22,a=0):o=kn[A]}else if(28===r)s[a]=(e[g]<<24|e[g+1]<<16)>>16,g+=2,a++;else if(14===r){if(a>=4&&(a-=4,this.seacAnalysisEnabled))return A.seac=s.slice(a,a+4),!1;o=bn[r]}else if(r>=32&&r<=246)s[a]=r-139,a++;else if(r>=247&&r<=254)s[a]=r<251?(r-247<<8)+e[g]+108:-(r-251<<8)-e[g]-108,g++,a++;else if(255===r)s[a]=(e[g]<<24|e[g+1]<<16|e[g+2]<<8|e[g+3])/65536,g+=4,a++;else if(19===r||20===r){if(A.hints+=a>>1,0===A.hints){e.copyWithin(g-1,g,-1),g-=1,n-=1;continue}g+=A.hints+7>>3,a%=2,o=bn[r]}else{if(10===r||29===r){const e=10===r?t:i;if(!e)return o=bn[r],gt("Missing subrsIndex for "+o.id),!1;let n=32768;e.count<1240?n=107:e.count<33900&&(n=1131);const g=s[--a]+n;if(g<0||g>=e.count||isNaN(g))return o=bn[r],gt("Out of bounds subrIndex for "+o.id),!1;A.stackSize=a,A.callDepth++;if(!this.parseCharString(A,e.get(g),t,i))return!1;A.callDepth--,a=A.stackSize;continue}if(11===r)return A.stackSize=a,!0;if(0===r&&g===e.length)e[g-1]=14,o=bn[14];else{if(9===r){e.copyWithin(g-1,g,-1),g-=1,n-=1;continue}o=bn[r]}}if(o){if(o.stem&&(A.hints+=a>>1,3===r||23===r?A.hasVStems=!0:!A.hasVStems||1!==r&&18!==r||(gt("CFF stem hints are in wrong order"),e[g-1]=1===r?3:23)),"min"in o&&!A.undefStack&&a<o.min)return gt("Not enough parameters for "+o.id+"; actual: "+a+", expected: "+o.min),0===a&&(e[g-1]=14,!0);A.firstStackClearing&&o.stackClearing&&(A.firstStackClearing=!1,a-=o.min,a>=2&&o.stem?a%=2:a>1&&gt("Found too many parameters for stack-clearing command"),a>0&&(A.width=s[a-1])),"stackDelta"in o?("stackFn"in o&&o.stackFn(s,a),a+=o.stackDelta):o.stackClearing?a=0:o.resetStack?(a=0,A.undefStack=!1):o.undefStack&&(a=0,A.undefStack=!0,A.firstStackClearing=!1)}}return n<e.length&&e.fill(14,n),A.stackSize=a,!0}parseCharStrings({charStrings:A,localSubrIndex:e,globalSubrIndex:t,fdSelect:i,fdArray:a,privateDict:s}){const n=[],g=[],r=A.count;for(let o=0;o<r;o++){const r=A.get(o),I={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let c=!0,C=null,B=s;if(i&&a.length){const A=i.getFDIndex(o);-1===A&&(gt("Glyph index is not in fd select."),c=!1),A>=a.length&&(gt("Invalid fd index for glyph index."),c=!1),c&&(B=a[A].privateDict,C=B.subrsIndex)}else e&&(C=e);if(c&&(c=this.parseCharString(I,r,C,t)),null!==I.width){const A=B.getByName("nominalWidthX");g[o]=A+I.width}else{const A=B.getByName("defaultWidthX");g[o]=A}null!==I.seac&&(n[o]=I.seac),c||A.set(o,new Uint8Array([14]))}return{charStrings:A,seacs:n,widths:g}}emptyPrivateDictionary(A){const e=this.createDict(Jn,[],A.strings);A.setByKey(18,[0,0]),A.privateDict=e}parsePrivateDict(A){if(!A.hasName("Private"))return void this.emptyPrivateDictionary(A);const e=A.getByName("Private");if(!Array.isArray(e)||2!==e.length)return void A.removeByName("Private");const t=e[0],i=e[1];if(0===t||i>=this.bytes.length)return void this.emptyPrivateDictionary(A);const a=i+t,s=this.bytes.subarray(i,a),n=this.parseDict(s),g=this.createDict(Jn,n,A.strings);if(A.privateDict=g,0===g.getByName("ExpansionFactor")&&g.setByName("ExpansionFactor",.06),!g.getByName("Subrs"))return;const r=g.getByName("Subrs"),o=i+r;if(0===r||o>=this.bytes.length)return void this.emptyPrivateDictionary(A);const I=this.parseIndex(o);g.subrsIndex=I.obj}parseCharsets(A,e,t,i){if(0===A)return new Yn(!0,Hn.ISO_ADOBE,Bn);if(1===A)return new Yn(!0,Hn.EXPERT,hn);if(2===A)return new Yn(!0,Hn.EXPERT_SUBSET,Qn);const a=this.bytes,s=A,n=a[A++],g=[i?0:".notdef"];let r,o,I;switch(e-=1,n){case 0:for(I=0;I<e;I++)r=a[A++]<<8|a[A++],g.push(i?r:t.get(r));break;case 1:for(;g.length<=e;)for(r=a[A++]<<8|a[A++],o=a[A++],I=0;I<=o;I++)g.push(i?r++:t.get(r++));break;case 2:for(;g.length<=e;)for(r=a[A++]<<8|a[A++],o=a[A++]<<8|a[A++],I=0;I<=o;I++)g.push(i?r++:t.get(r++));break;default:throw new ut("Unknown charset format")}const c=A,C=a.subarray(s,c);return new Yn(!1,n,g,C)}parseEncoding(A,e,t,i){const a=Object.create(null),s=this.bytes;let n,g,r,o=!1,I=null;if(0===A||1===A){o=!0,n=A;const e=A?ln:dn;for(g=0,r=i.length;g<r;g++){const A=e.indexOf(i[g]);-1!==A&&(a[A]=g)}}else{const e=A;switch(n=s[A++],127&n){case 0:const e=s[A++];for(g=1;g<=e;g++)a[s[A++]]=g;break;case 1:const t=s[A++];let i=1;for(g=0;g<t;g++){const e=s[A++],t=s[A++];for(let A=e;A<=e+t;A++)a[A]=i++}break;default:throw new ut(`Unknown encoding format: ${n} in CFF`)}const r=A;128&n&&(s[e]&=127,function(){const e=s[A++];for(g=0;g<e;g++){const e=s[A++],n=(s[A++]<<8)+(255&s[A++]);a[e]=i.indexOf(t.get(n))}}()),I=s.subarray(e,r)}return n&=127,new vn(o,n,a,I)}parseFDSelect(A,e){const t=this.bytes,i=t[A++],a=[];let s;switch(i){case 0:for(s=0;s<e;++s){const e=t[A++];a.push(e)}break;case 3:const n=t[A++]<<8|t[A++];for(s=0;s<n;++s){let e=t[A++]<<8|t[A++];0===s&&0!==e&&(gt("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),e=0);const i=t[A++],n=t[A]<<8|t[A+1];for(let A=e;A<n;++A)a.push(i)}A+=2;break;default:throw new ut(`parseFDSelect: Unknown format "${i}".`)}if(a.length!==e)throw new ut("parseFDSelect: Invalid font data.");return new Kn(i,a)}}class Sn{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new Gn,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535)return void gt("Not enough space in charstrings to duplicate first glyph.");const A=this.charStrings.get(0);this.charStrings.add(A),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(A){if(A<0||A>=this.charStrings.count)return!1;return this.charStrings.get(A).length>0}}class Rn{constructor(A,e,t,i){this.major=A,this.minor=e,this.hdrSize=t,this.offSize=i}}class Gn{constructor(){this.strings=[]}get(A){return A>=0&&A<=390?wn[A]:A-Dn<=this.strings.length?this.strings[A-Dn]:wn[0]}getSID(A){let e=wn.indexOf(A);return-1!==e?e:(e=this.strings.indexOf(A),-1!==e?e+Dn:-1)}add(A){this.strings.push(A)}get count(){return this.strings.length}}class Nn{constructor(){this.objects=[],this.length=0}add(A){this.length+=A.length,this.objects.push(A)}set(A,e){this.length+=e.length-this.objects[A].length,this.objects[A]=e}get(A){return this.objects[A]}get count(){return this.objects.length}}class xn{constructor(A,e){this.keyToNameMap=A.keyToNameMap,this.nameToKeyMap=A.nameToKeyMap,this.defaults=A.defaults,this.types=A.types,this.opcodes=A.opcodes,this.order=A.order,this.strings=e,this.values=Object.create(null)}setByKey(A,e){if(!(A in this.keyToNameMap))return!1;if(0===e.length)return!0;for(const t of e)if(isNaN(t))return gt(`Invalid CFFDict value: "${e}" for key "${A}".`),!0;const t=this.types[A];return"num"!==t&&"sid"!==t&&"offset"!==t||(e=e[0]),this.values[A]=e,!0}setByName(A,e){if(!(A in this.nameToKeyMap))throw new ut(`Invalid dictionary name "${A}"`);this.values[this.nameToKeyMap[A]]=e}hasName(A){return this.nameToKeyMap[A]in this.values}getByName(A){if(!(A in this.nameToKeyMap))throw new ut(`Invalid dictionary name ${A}"`);const e=this.nameToKeyMap[A];return e in this.values?this.values[e]:this.defaults[e]}removeByName(A){delete this.values[this.nameToKeyMap[A]]}static createTables(A){const e={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const t of A){const A=Array.isArray(t[0])?(t[0][0]<<8)+t[0][1]:t[0];e.keyToNameMap[A]=t[1],e.nameToKeyMap[t[1]]=A,e.types[A]=t[2],e.defaults[A]=t[3],e.opcodes[A]=Array.isArray(t[0])?t[0]:[t[0]],e.order.push(A)}return e}}const Un=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class Mn extends xn{static get tables(){return ct(this,"tables",this.createTables(Un))}constructor(A){super(Mn.tables,A),this.privateDict=null}}const Ln=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class Jn extends xn{static get tables(){return ct(this,"tables",this.createTables(Ln))}constructor(A){super(Jn.tables,A),this.subrsIndex=null}}const Hn={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class Yn{constructor(A,e,t,i){this.predefined=A,this.format=e,this.charset=t,this.raw=i}}class vn{constructor(A,e,t,i){this.predefined=A,this.format=e,this.encoding=t,this.raw=i}}class Kn{constructor(A,e){this.format=A,this.fdSelect=e}getFDIndex(A){return A<0||A>=this.fdSelect.length?-1:this.fdSelect[A]}}class qn{constructor(){this.offsets=Object.create(null)}isTracking(A){return A in this.offsets}track(A,e){if(A in this.offsets)throw new ut(`Already tracking location of ${A}`);this.offsets[A]=e}offset(A){for(const e in this.offsets)this.offsets[e]+=A}setEntryLocation(A,e,t){if(!(A in this.offsets))throw new ut(`Not tracking location of ${A}`);const i=t.data,a=this.offsets[A];for(let A=0,t=e.length;A<t;++A){const t=5*A+a,s=t+1,n=t+2,g=t+3,r=t+4;if(29!==i[t]||0!==i[s]||0!==i[n]||0!==i[g]||0!==i[r])throw new ut("writing to an offset that is not empty");const o=e[A];i[t]=29,i[s]=o>>24&255,i[n]=o>>16&255,i[g]=o>>8&255,i[r]=255&o}}}class Tn{constructor(A){this.cff=A}compile(){const A=this.cff,e={data:[],length:0,add(A){try{this.data.push(...A)}catch{this.data=this.data.concat(A)}this.length=this.data.length}},t=this.compileHeader(A.header);e.add(t);const i=this.compileNameIndex(A.names);if(e.add(i),A.isCIDFont&&A.topDict.hasName("FontMatrix")){const e=A.topDict.getByName("FontMatrix");A.topDict.removeByName("FontMatrix");for(const t of A.fdArray){let A=e.slice(0);t.hasName("FontMatrix")&&(A=bt.transform(A,t.getByName("FontMatrix"))),t.setByName("FontMatrix",A)}}const a=A.topDict.getByName("XUID");a?.length>16&&A.topDict.removeByName("XUID"),A.topDict.setByName("charset",0);let s=this.compileTopDicts([A.topDict],e.length,A.isCIDFont);e.add(s.output);const n=s.trackers[0],g=this.compileStringIndex(A.strings.strings);e.add(g);const r=this.compileIndex(A.globalSubrIndex);if(e.add(r),A.encoding&&A.topDict.hasName("Encoding"))if(A.encoding.predefined)n.setEntryLocation("Encoding",[A.encoding.format],e);else{const t=this.compileEncoding(A.encoding);n.setEntryLocation("Encoding",[e.length],e),e.add(t)}const o=this.compileCharset(A.charset,A.charStrings.count,A.strings,A.isCIDFont);n.setEntryLocation("charset",[e.length],e),e.add(o);const I=this.compileCharStrings(A.charStrings);if(n.setEntryLocation("CharStrings",[e.length],e),e.add(I),A.isCIDFont){n.setEntryLocation("FDSelect",[e.length],e);const t=this.compileFDSelect(A.fdSelect);e.add(t),s=this.compileTopDicts(A.fdArray,e.length,!0),n.setEntryLocation("FDArray",[e.length],e),e.add(s.output);const i=s.trackers;this.compilePrivateDicts(A.fdArray,i,e)}return this.compilePrivateDicts([A.topDict],[n],e),e.add([0]),e.data}encodeNumber(A){return Number.isInteger(A)?this.encodeInteger(A):this.encodeFloat(A)}static get EncodeFloatRegExp(){return ct(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(A){let e=A.toString();const t=Tn.EncodeFloatRegExp.exec(e);if(t){const i=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));e=(Math.round(A*i)/i).toString()}let i,a,s="";for(i=0,a=e.length;i<a;++i){const A=e[i];s+="e"===A?"-"===e[++i]?"c":"b":"."===A?"a":"-"===A?"e":A}s+=1&s.length?"f":"ff";const n=[30];for(i=0,a=s.length;i<a;i+=2)n.push(parseInt(s.substring(i,i+2),16));return n}encodeInteger(A){let e;return e=A>=-107&&A<=107?[A+139]:A>=108&&A<=1131?[247+((A-=108)>>8),255&A]:A>=-1131&&A<=-108?[251+((A=-A-108)>>8),255&A]:A>=-32768&&A<=32767?[28,A>>8&255,255&A]:[29,A>>24&255,A>>16&255,A>>8&255,255&A],e}compileHeader(A){return[A.major,A.minor,4,A.offSize]}compileNameIndex(A){const e=new Nn;for(const t of A){const A=Math.min(t.length,127);let i=new Array(A);for(let e=0;e<A;e++){let A=t[e];(A<"!"||A>"~"||"["===A||"]"===A||"("===A||")"===A||"{"===A||"}"===A||"<"===A||">"===A||"/"===A||"%"===A)&&(A="_"),i[e]=A}i=i.join(""),""===i&&(i="Bad_Font_Name"),e.add(pt(i))}return this.compileIndex(e)}compileTopDicts(A,e,t){const i=[];let a=new Nn;for(const s of A){t&&(s.removeByName("CIDFontVersion"),s.removeByName("CIDFontRevision"),s.removeByName("CIDFontType"),s.removeByName("CIDCount"),s.removeByName("UIDBase"));const A=new qn,n=this.compileDict(s,A);i.push(A),a.add(n),A.offset(e)}return a=this.compileIndex(a,i),{trackers:i,output:a}}compilePrivateDicts(A,e,t){for(let i=0,a=A.length;i<a;++i){const a=A[i],s=a.privateDict;if(!s||!a.hasName("Private"))throw new ut("There must be a private dictionary.");const n=new qn,g=this.compileDict(s,n);let r=t.length;if(n.offset(r),g.length||(r=0),e[i].setEntryLocation("Private",[g.length,r],t),t.add(g),s.subrsIndex&&s.hasName("Subrs")){const A=this.compileIndex(s.subrsIndex);n.setEntryLocation("Subrs",[g.length],t),t.add(A)}}}compileDict(A,e){const t=[];for(const i of A.order){if(!(i in A.values))continue;let a=A.values[i],s=A.types[i];if(Array.isArray(s)||(s=[s]),Array.isArray(a)||(a=[a]),0!==a.length){for(let n=0,g=s.length;n<g;++n){const g=s[n],r=a[n];switch(g){case"num":case"sid":t.push(...this.encodeNumber(r));break;case"offset":const s=A.keyToNameMap[i];e.isTracking(s)||e.track(s,t.length),t.push(29,0,0,0,0);break;case"array":case"delta":t.push(...this.encodeNumber(r));for(let A=1,e=a.length;A<e;++A)t.push(...this.encodeNumber(a[A]));break;default:throw new ut(`Unknown data type of ${g}`)}}t.push(...A.opcodes[i])}}return t}compileStringIndex(A){const e=new Nn;for(const t of A)e.add(pt(t));return this.compileIndex(e)}compileCharStrings(A){const e=new Nn;for(let t=0;t<A.count;t++){const i=A.get(t);0!==i.length?e.add(i):e.add(new Uint8Array([139,14]))}return this.compileIndex(e)}compileCharset(A,e,t,i){let a;const s=e-1;if(i)a=new Uint8Array([2,0,0,s>>8&255,255&s]);else{a=new Uint8Array(1+2*s),a[0]=0;let e=0;const i=A.charset.length;let n=!1;for(let s=1;s<a.length;s+=2){let g=0;if(e<i){const i=A.charset[e++];g=t.getSID(i),-1===g&&(g=0,n||(n=!0,gt(`Couldn't find ${i} in CFF strings`)))}a[s]=g>>8&255,a[s+1]=255&g}}return this.compileTypedArray(a)}compileEncoding(A){return this.compileTypedArray(A.raw)}compileFDSelect(A){const e=A.format;let t,i;switch(e){case 0:for(t=new Uint8Array(1+A.fdSelect.length),t[0]=e,i=0;i<A.fdSelect.length;i++)t[i+1]=A.fdSelect[i];break;case 3:const a=0;let s=A.fdSelect[0];const n=[e,0,0,a>>8&255,255&a,s];for(i=1;i<A.fdSelect.length;i++){const e=A.fdSelect[i];e!==s&&(n.push(i>>8&255,255&i,e),s=e)}const g=(n.length-3)/3;n[1]=g>>8&255,n[2]=255&g,n.push(i>>8&255,255&i),t=new Uint8Array(n)}return this.compileTypedArray(t)}compileTypedArray(A){return Array.from(A)}compileIndex(A,e=[]){const t=A.objects,i=t.length;if(0===i)return[0,0];const a=[i>>8&255,255&i];let s,n,g=1;for(s=0;s<i;++s)g+=t[s].length;n=g<256?1:g<65536?2:g<16777216?3:4,a.push(n);let r=1;for(s=0;s<i+1;s++)1===n?a.push(255&r):2===n?a.push(r>>8&255,255&r):3===n?a.push(r>>16&255,r>>8&255,255&r):a.push(r>>>24&255,r>>16&255,r>>8&255,255&r),t[s]&&(r+=t[s].length);for(s=0;s<i;s++)e[s]&&e[s].offset(a.length),a.push(...t[s]);return a}}const Pn=ri(function(A){A.A=65,A.AE=198,A.AEacute=508,A.AEmacron=482,A.AEsmall=63462,A.Aacute=193,A.Aacutesmall=63457,A.Abreve=258,A.Abreveacute=7854,A.Abrevecyrillic=1232,A.Abrevedotbelow=7862,A.Abrevegrave=7856,A.Abrevehookabove=7858,A.Abrevetilde=7860,A.Acaron=461,A.Acircle=9398,A.Acircumflex=194,A.Acircumflexacute=7844,A.Acircumflexdotbelow=7852,A.Acircumflexgrave=7846,A.Acircumflexhookabove=7848,A.Acircumflexsmall=63458,A.Acircumflextilde=7850,A.Acute=63177,A.Acutesmall=63412,A.Acyrillic=1040,A.Adblgrave=512,A.Adieresis=196,A.Adieresiscyrillic=1234,A.Adieresismacron=478,A.Adieresissmall=63460,A.Adotbelow=7840,A.Adotmacron=480,A.Agrave=192,A.Agravesmall=63456,A.Ahookabove=7842,A.Aiecyrillic=1236,A.Ainvertedbreve=514,A.Alpha=913,A.Alphatonos=902,A.Amacron=256,A.Amonospace=65313,A.Aogonek=260,A.Aring=197,A.Aringacute=506,A.Aringbelow=7680,A.Aringsmall=63461,A.Asmall=63329,A.Atilde=195,A.Atildesmall=63459,A.Aybarmenian=1329,A.B=66,A.Bcircle=9399,A.Bdotaccent=7682,A.Bdotbelow=7684,A.Becyrillic=1041,A.Benarmenian=1330,A.Beta=914,A.Bhook=385,A.Blinebelow=7686,A.Bmonospace=65314,A.Brevesmall=63220,A.Bsmall=63330,A.Btopbar=386,A.C=67,A.Caarmenian=1342,A.Cacute=262,A.Caron=63178,A.Caronsmall=63221,A.Ccaron=268,A.Ccedilla=199,A.Ccedillaacute=7688,A.Ccedillasmall=63463,A.Ccircle=9400,A.Ccircumflex=264,A.Cdot=266,A.Cdotaccent=266,A.Cedillasmall=63416,A.Chaarmenian=1353,A.Cheabkhasiancyrillic=1212,A.Checyrillic=1063,A.Chedescenderabkhasiancyrillic=1214,A.Chedescendercyrillic=1206,A.Chedieresiscyrillic=1268,A.Cheharmenian=1347,A.Chekhakassiancyrillic=1227,A.Cheverticalstrokecyrillic=1208,A.Chi=935,A.Chook=391,A.Circumflexsmall=63222,A.Cmonospace=65315,A.Coarmenian=1361,A.Csmall=63331,A.D=68,A.DZ=497,A.DZcaron=452,A.Daarmenian=1332,A.Dafrican=393,A.Dcaron=270,A.Dcedilla=7696,A.Dcircle=9401,A.Dcircumflexbelow=7698,A.Dcroat=272,A.Ddotaccent=7690,A.Ddotbelow=7692,A.Decyrillic=1044,A.Deicoptic=1006,A.Delta=8710,A.Deltagreek=916,A.Dhook=394,A.Dieresis=63179,A.DieresisAcute=63180,A.DieresisGrave=63181,A.Dieresissmall=63400,A.Digammagreek=988,A.Djecyrillic=1026,A.Dlinebelow=7694,A.Dmonospace=65316,A.Dotaccentsmall=63223,A.Dslash=272,A.Dsmall=63332,A.Dtopbar=395,A.Dz=498,A.Dzcaron=453,A.Dzeabkhasiancyrillic=1248,A.Dzecyrillic=1029,A.Dzhecyrillic=1039,A.E=69,A.Eacute=201,A.Eacutesmall=63465,A.Ebreve=276,A.Ecaron=282,A.Ecedillabreve=7708,A.Echarmenian=1333,A.Ecircle=9402,A.Ecircumflex=202,A.Ecircumflexacute=7870,A.Ecircumflexbelow=7704,A.Ecircumflexdotbelow=7878,A.Ecircumflexgrave=7872,A.Ecircumflexhookabove=7874,A.Ecircumflexsmall=63466,A.Ecircumflextilde=7876,A.Ecyrillic=1028,A.Edblgrave=516,A.Edieresis=203,A.Edieresissmall=63467,A.Edot=278,A.Edotaccent=278,A.Edotbelow=7864,A.Efcyrillic=1060,A.Egrave=200,A.Egravesmall=63464,A.Eharmenian=1335,A.Ehookabove=7866,A.Eightroman=8551,A.Einvertedbreve=518,A.Eiotifiedcyrillic=1124,A.Elcyrillic=1051,A.Elevenroman=8554,A.Emacron=274,A.Emacronacute=7702,A.Emacrongrave=7700,A.Emcyrillic=1052,A.Emonospace=65317,A.Encyrillic=1053,A.Endescendercyrillic=1186,A.Eng=330,A.Enghecyrillic=1188,A.Enhookcyrillic=1223,A.Eogonek=280,A.Eopen=400,A.Epsilon=917,A.Epsilontonos=904,A.Ercyrillic=1056,A.Ereversed=398,A.Ereversedcyrillic=1069,A.Escyrillic=1057,A.Esdescendercyrillic=1194,A.Esh=425,A.Esmall=63333,A.Eta=919,A.Etarmenian=1336,A.Etatonos=905,A.Eth=208,A.Ethsmall=63472,A.Etilde=7868,A.Etildebelow=7706,A.Euro=8364,A.Ezh=439,A.Ezhcaron=494,A.Ezhreversed=440,A.F=70,A.Fcircle=9403,A.Fdotaccent=7710,A.Feharmenian=1366,A.Feicoptic=996,A.Fhook=401,A.Fitacyrillic=1138,A.Fiveroman=8548,A.Fmonospace=65318,A.Fourroman=8547,A.Fsmall=63334,A.G=71,A.GBsquare=13191,A.Gacute=500,A.Gamma=915,A.Gammaafrican=404,A.Gangiacoptic=1002,A.Gbreve=286,A.Gcaron=486,A.Gcedilla=290,A.Gcircle=9404,A.Gcircumflex=284,A.Gcommaaccent=290,A.Gdot=288,A.Gdotaccent=288,A.Gecyrillic=1043,A.Ghadarmenian=1346,A.Ghemiddlehookcyrillic=1172,A.Ghestrokecyrillic=1170,A.Gheupturncyrillic=1168,A.Ghook=403,A.Gimarmenian=1331,A.Gjecyrillic=1027,A.Gmacron=7712,A.Gmonospace=65319,A.Grave=63182,A.Gravesmall=63328,A.Gsmall=63335,A.Gsmallhook=667,A.Gstroke=484,A.H=72,A.H18533=9679,A.H18543=9642,A.H18551=9643,A.H22073=9633,A.HPsquare=13259,A.Haabkhasiancyrillic=1192,A.Hadescendercyrillic=1202,A.Hardsigncyrillic=1066,A.Hbar=294,A.Hbrevebelow=7722,A.Hcedilla=7720,A.Hcircle=9405,A.Hcircumflex=292,A.Hdieresis=7718,A.Hdotaccent=7714,A.Hdotbelow=7716,A.Hmonospace=65320,A.Hoarmenian=1344,A.Horicoptic=1e3,A.Hsmall=63336,A.Hungarumlaut=63183,A.Hungarumlautsmall=63224,A.Hzsquare=13200,A.I=73,A.IAcyrillic=1071,A.IJ=306,A.IUcyrillic=1070,A.Iacute=205,A.Iacutesmall=63469,A.Ibreve=300,A.Icaron=463,A.Icircle=9406,A.Icircumflex=206,A.Icircumflexsmall=63470,A.Icyrillic=1030,A.Idblgrave=520,A.Idieresis=207,A.Idieresisacute=7726,A.Idieresiscyrillic=1252,A.Idieresissmall=63471,A.Idot=304,A.Idotaccent=304,A.Idotbelow=7882,A.Iebrevecyrillic=1238,A.Iecyrillic=1045,A.Ifraktur=8465,A.Igrave=204,A.Igravesmall=63468,A.Ihookabove=7880,A.Iicyrillic=1048,A.Iinvertedbreve=522,A.Iishortcyrillic=1049,A.Imacron=298,A.Imacroncyrillic=1250,A.Imonospace=65321,A.Iniarmenian=1339,A.Iocyrillic=1025,A.Iogonek=302,A.Iota=921,A.Iotaafrican=406,A.Iotadieresis=938,A.Iotatonos=906,A.Ismall=63337,A.Istroke=407,A.Itilde=296,A.Itildebelow=7724,A.Izhitsacyrillic=1140,A.Izhitsadblgravecyrillic=1142,A.J=74,A.Jaarmenian=1345,A.Jcircle=9407,A.Jcircumflex=308,A.Jecyrillic=1032,A.Jheharmenian=1355,A.Jmonospace=65322,A.Jsmall=63338,A.K=75,A.KBsquare=13189,A.KKsquare=13261,A.Kabashkircyrillic=1184,A.Kacute=7728,A.Kacyrillic=1050,A.Kadescendercyrillic=1178,A.Kahookcyrillic=1219,A.Kappa=922,A.Kastrokecyrillic=1182,A.Kaverticalstrokecyrillic=1180,A.Kcaron=488,A.Kcedilla=310,A.Kcircle=9408,A.Kcommaaccent=310,A.Kdotbelow=7730,A.Keharmenian=1364,A.Kenarmenian=1343,A.Khacyrillic=1061,A.Kheicoptic=998,A.Khook=408,A.Kjecyrillic=1036,A.Klinebelow=7732,A.Kmonospace=65323,A.Koppacyrillic=1152,A.Koppagreek=990,A.Ksicyrillic=1134,A.Ksmall=63339,A.L=76,A.LJ=455,A.LL=63167,A.Lacute=313,A.Lambda=923,A.Lcaron=317,A.Lcedilla=315,A.Lcircle=9409,A.Lcircumflexbelow=7740,A.Lcommaaccent=315,A.Ldot=319,A.Ldotaccent=319,A.Ldotbelow=7734,A.Ldotbelowmacron=7736,A.Liwnarmenian=1340,A.Lj=456,A.Ljecyrillic=1033,A.Llinebelow=7738,A.Lmonospace=65324,A.Lslash=321,A.Lslashsmall=63225,A.Lsmall=63340,A.M=77,A.MBsquare=13190,A.Macron=63184,A.Macronsmall=63407,A.Macute=7742,A.Mcircle=9410,A.Mdotaccent=7744,A.Mdotbelow=7746,A.Menarmenian=1348,A.Mmonospace=65325,A.Msmall=63341,A.Mturned=412,A.Mu=924,A.N=78,A.NJ=458,A.Nacute=323,A.Ncaron=327,A.Ncedilla=325,A.Ncircle=9411,A.Ncircumflexbelow=7754,A.Ncommaaccent=325,A.Ndotaccent=7748,A.Ndotbelow=7750,A.Nhookleft=413,A.Nineroman=8552,A.Nj=459,A.Njecyrillic=1034,A.Nlinebelow=7752,A.Nmonospace=65326,A.Nowarmenian=1350,A.Nsmall=63342,A.Ntilde=209,A.Ntildesmall=63473,A.Nu=925,A.O=79,A.OE=338,A.OEsmall=63226,A.Oacute=211,A.Oacutesmall=63475,A.Obarredcyrillic=1256,A.Obarreddieresiscyrillic=1258,A.Obreve=334,A.Ocaron=465,A.Ocenteredtilde=415,A.Ocircle=9412,A.Ocircumflex=212,A.Ocircumflexacute=7888,A.Ocircumflexdotbelow=7896,A.Ocircumflexgrave=7890,A.Ocircumflexhookabove=7892,A.Ocircumflexsmall=63476,A.Ocircumflextilde=7894,A.Ocyrillic=1054,A.Odblacute=336,A.Odblgrave=524,A.Odieresis=214,A.Odieresiscyrillic=1254,A.Odieresissmall=63478,A.Odotbelow=7884,A.Ogoneksmall=63227,A.Ograve=210,A.Ogravesmall=63474,A.Oharmenian=1365,A.Ohm=8486,A.Ohookabove=7886,A.Ohorn=416,A.Ohornacute=7898,A.Ohorndotbelow=7906,A.Ohorngrave=7900,A.Ohornhookabove=7902,A.Ohorntilde=7904,A.Ohungarumlaut=336,A.Oi=418,A.Oinvertedbreve=526,A.Omacron=332,A.Omacronacute=7762,A.Omacrongrave=7760,A.Omega=8486,A.Omegacyrillic=1120,A.Omegagreek=937,A.Omegaroundcyrillic=1146,A.Omegatitlocyrillic=1148,A.Omegatonos=911,A.Omicron=927,A.Omicrontonos=908,A.Omonospace=65327,A.Oneroman=8544,A.Oogonek=490,A.Oogonekmacron=492,A.Oopen=390,A.Oslash=216,A.Oslashacute=510,A.Oslashsmall=63480,A.Osmall=63343,A.Ostrokeacute=510,A.Otcyrillic=1150,A.Otilde=213,A.Otildeacute=7756,A.Otildedieresis=7758,A.Otildesmall=63477,A.P=80,A.Pacute=7764,A.Pcircle=9413,A.Pdotaccent=7766,A.Pecyrillic=1055,A.Peharmenian=1354,A.Pemiddlehookcyrillic=1190,A.Phi=934,A.Phook=420,A.Pi=928,A.Piwrarmenian=1363,A.Pmonospace=65328,A.Psi=936,A.Psicyrillic=1136,A.Psmall=63344,A.Q=81,A.Qcircle=9414,A.Qmonospace=65329,A.Qsmall=63345,A.R=82,A.Raarmenian=1356,A.Racute=340,A.Rcaron=344,A.Rcedilla=342,A.Rcircle=9415,A.Rcommaaccent=342,A.Rdblgrave=528,A.Rdotaccent=7768,A.Rdotbelow=7770,A.Rdotbelowmacron=7772,A.Reharmenian=1360,A.Rfraktur=8476,A.Rho=929,A.Ringsmall=63228,A.Rinvertedbreve=530,A.Rlinebelow=7774,A.Rmonospace=65330,A.Rsmall=63346,A.Rsmallinverted=641,A.Rsmallinvertedsuperior=694,A.S=83,A.SF010000=9484,A.SF020000=9492,A.SF030000=9488,A.SF040000=9496,A.SF050000=9532,A.SF060000=9516,A.SF070000=9524,A.SF080000=9500,A.SF090000=9508,A.SF100000=9472,A.SF110000=9474,A.SF190000=9569,A.SF200000=9570,A.SF210000=9558,A.SF220000=9557,A.SF230000=9571,A.SF240000=9553,A.SF250000=9559,A.SF260000=9565,A.SF270000=9564,A.SF280000=9563,A.SF360000=9566,A.SF370000=9567,A.SF380000=9562,A.SF390000=9556,A.SF400000=9577,A.SF410000=9574,A.SF420000=9568,A.SF430000=9552,A.SF440000=9580,A.SF450000=9575,A.SF460000=9576,A.SF470000=9572,A.SF480000=9573,A.SF490000=9561,A.SF500000=9560,A.SF510000=9554,A.SF520000=9555,A.SF530000=9579,A.SF540000=9578,A.Sacute=346,A.Sacutedotaccent=7780,A.Sampigreek=992,A.Scaron=352,A.Scarondotaccent=7782,A.Scaronsmall=63229,A.Scedilla=350,A.Schwa=399,A.Schwacyrillic=1240,A.Schwadieresiscyrillic=1242,A.Scircle=9416,A.Scircumflex=348,A.Scommaaccent=536,A.Sdotaccent=7776,A.Sdotbelow=7778,A.Sdotbelowdotaccent=7784,A.Seharmenian=1357,A.Sevenroman=8550,A.Shaarmenian=1351,A.Shacyrillic=1064,A.Shchacyrillic=1065,A.Sheicoptic=994,A.Shhacyrillic=1210,A.Shimacoptic=1004,A.Sigma=931,A.Sixroman=8549,A.Smonospace=65331,A.Softsigncyrillic=1068,A.Ssmall=63347,A.Stigmagreek=986,A.T=84,A.Tau=932,A.Tbar=358,A.Tcaron=356,A.Tcedilla=354,A.Tcircle=9417,A.Tcircumflexbelow=7792,A.Tcommaaccent=354,A.Tdotaccent=7786,A.Tdotbelow=7788,A.Tecyrillic=1058,A.Tedescendercyrillic=1196,A.Tenroman=8553,A.Tetsecyrillic=1204,A.Theta=920,A.Thook=428,A.Thorn=222,A.Thornsmall=63486,A.Threeroman=8546,A.Tildesmall=63230,A.Tiwnarmenian=1359,A.Tlinebelow=7790,A.Tmonospace=65332,A.Toarmenian=1337,A.Tonefive=444,A.Tonesix=388,A.Tonetwo=423,A.Tretroflexhook=430,A.Tsecyrillic=1062,A.Tshecyrillic=1035,A.Tsmall=63348,A.Twelveroman=8555,A.Tworoman=8545,A.U=85,A.Uacute=218,A.Uacutesmall=63482,A.Ubreve=364,A.Ucaron=467,A.Ucircle=9418,A.Ucircumflex=219,A.Ucircumflexbelow=7798,A.Ucircumflexsmall=63483,A.Ucyrillic=1059,A.Udblacute=368,A.Udblgrave=532,A.Udieresis=220,A.Udieresisacute=471,A.Udieresisbelow=7794,A.Udieresiscaron=473,A.Udieresiscyrillic=1264,A.Udieresisgrave=475,A.Udieresismacron=469,A.Udieresissmall=63484,A.Udotbelow=7908,A.Ugrave=217,A.Ugravesmall=63481,A.Uhookabove=7910,A.Uhorn=431,A.Uhornacute=7912,A.Uhorndotbelow=7920,A.Uhorngrave=7914,A.Uhornhookabove=7916,A.Uhorntilde=7918,A.Uhungarumlaut=368,A.Uhungarumlautcyrillic=1266,A.Uinvertedbreve=534,A.Ukcyrillic=1144,A.Umacron=362,A.Umacroncyrillic=1262,A.Umacrondieresis=7802,A.Umonospace=65333,A.Uogonek=370,A.Upsilon=933,A.Upsilon1=978,A.Upsilonacutehooksymbolgreek=979,A.Upsilonafrican=433,A.Upsilondieresis=939,A.Upsilondieresishooksymbolgreek=980,A.Upsilonhooksymbol=978,A.Upsilontonos=910,A.Uring=366,A.Ushortcyrillic=1038,A.Usmall=63349,A.Ustraightcyrillic=1198,A.Ustraightstrokecyrillic=1200,A.Utilde=360,A.Utildeacute=7800,A.Utildebelow=7796,A.V=86,A.Vcircle=9419,A.Vdotbelow=7806,A.Vecyrillic=1042,A.Vewarmenian=1358,A.Vhook=434,A.Vmonospace=65334,A.Voarmenian=1352,A.Vsmall=63350,A.Vtilde=7804,A.W=87,A.Wacute=7810,A.Wcircle=9420,A.Wcircumflex=372,A.Wdieresis=7812,A.Wdotaccent=7814,A.Wdotbelow=7816,A.Wgrave=7808,A.Wmonospace=65335,A.Wsmall=63351,A.X=88,A.Xcircle=9421,A.Xdieresis=7820,A.Xdotaccent=7818,A.Xeharmenian=1341,A.Xi=926,A.Xmonospace=65336,A.Xsmall=63352,A.Y=89,A.Yacute=221,A.Yacutesmall=63485,A.Yatcyrillic=1122,A.Ycircle=9422,A.Ycircumflex=374,A.Ydieresis=376,A.Ydieresissmall=63487,A.Ydotaccent=7822,A.Ydotbelow=7924,A.Yericyrillic=1067,A.Yerudieresiscyrillic=1272,A.Ygrave=7922,A.Yhook=435,A.Yhookabove=7926,A.Yiarmenian=1349,A.Yicyrillic=1031,A.Yiwnarmenian=1362,A.Ymonospace=65337,A.Ysmall=63353,A.Ytilde=7928,A.Yusbigcyrillic=1130,A.Yusbigiotifiedcyrillic=1132,A.Yuslittlecyrillic=1126,A.Yuslittleiotifiedcyrillic=1128,A.Z=90,A.Zaarmenian=1334,A.Zacute=377,A.Zcaron=381,A.Zcaronsmall=63231,A.Zcircle=9423,A.Zcircumflex=7824,A.Zdot=379,A.Zdotaccent=379,A.Zdotbelow=7826,A.Zecyrillic=1047,A.Zedescendercyrillic=1176,A.Zedieresiscyrillic=1246,A.Zeta=918,A.Zhearmenian=1338,A.Zhebrevecyrillic=1217,A.Zhecyrillic=1046,A.Zhedescendercyrillic=1174,A.Zhedieresiscyrillic=1244,A.Zlinebelow=7828,A.Zmonospace=65338,A.Zsmall=63354,A.Zstroke=437,A.a=97,A.aabengali=2438,A.aacute=225,A.aadeva=2310,A.aagujarati=2694,A.aagurmukhi=2566,A.aamatragurmukhi=2622,A.aarusquare=13059,A.aavowelsignbengali=2494,A.aavowelsigndeva=2366,A.aavowelsigngujarati=2750,A.abbreviationmarkarmenian=1375,A.abbreviationsigndeva=2416,A.abengali=2437,A.abopomofo=12570,A.abreve=259,A.abreveacute=7855,A.abrevecyrillic=1233,A.abrevedotbelow=7863,A.abrevegrave=7857,A.abrevehookabove=7859,A.abrevetilde=7861,A.acaron=462,A.acircle=9424,A.acircumflex=226,A.acircumflexacute=7845,A.acircumflexdotbelow=7853,A.acircumflexgrave=7847,A.acircumflexhookabove=7849,A.acircumflextilde=7851,A.acute=180,A.acutebelowcmb=791,A.acutecmb=769,A.acutecomb=769,A.acutedeva=2388,A.acutelowmod=719,A.acutetonecmb=833,A.acyrillic=1072,A.adblgrave=513,A.addakgurmukhi=2673,A.adeva=2309,A.adieresis=228,A.adieresiscyrillic=1235,A.adieresismacron=479,A.adotbelow=7841,A.adotmacron=481,A.ae=230,A.aeacute=509,A.aekorean=12624,A.aemacron=483,A.afii00208=8213,A.afii08941=8356,A.afii10017=1040,A.afii10018=1041,A.afii10019=1042,A.afii10020=1043,A.afii10021=1044,A.afii10022=1045,A.afii10023=1025,A.afii10024=1046,A.afii10025=1047,A.afii10026=1048,A.afii10027=1049,A.afii10028=1050,A.afii10029=1051,A.afii10030=1052;A.afii10031=1053,A.afii10032=1054,A.afii10033=1055,A.afii10034=1056,A.afii10035=1057,A.afii10036=1058,A.afii10037=1059,A.afii10038=1060,A.afii10039=1061,A.afii10040=1062,A.afii10041=1063,A.afii10042=1064,A.afii10043=1065,A.afii10044=1066,A.afii10045=1067,A.afii10046=1068,A.afii10047=1069,A.afii10048=1070,A.afii10049=1071,A.afii10050=1168,A.afii10051=1026,A.afii10052=1027,A.afii10053=1028,A.afii10054=1029,A.afii10055=1030,A.afii10056=1031,A.afii10057=1032,A.afii10058=1033,A.afii10059=1034,A.afii10060=1035,A.afii10061=1036,A.afii10062=1038,A.afii10063=63172,A.afii10064=63173,A.afii10065=1072,A.afii10066=1073,A.afii10067=1074,A.afii10068=1075,A.afii10069=1076,A.afii10070=1077,A.afii10071=1105,A.afii10072=1078,A.afii10073=1079,A.afii10074=1080,A.afii10075=1081,A.afii10076=1082,A.afii10077=1083,A.afii10078=1084,A.afii10079=1085,A.afii10080=1086,A.afii10081=1087,A.afii10082=1088,A.afii10083=1089,A.afii10084=1090,A.afii10085=1091,A.afii10086=1092,A.afii10087=1093,A.afii10088=1094,A.afii10089=1095,A.afii10090=1096,A.afii10091=1097,A.afii10092=1098,A.afii10093=1099,A.afii10094=1100,A.afii10095=1101,A.afii10096=1102,A.afii10097=1103,A.afii10098=1169,A.afii10099=1106,A.afii10100=1107,A.afii10101=1108,A.afii10102=1109,A.afii10103=1110,A.afii10104=1111,A.afii10105=1112,A.afii10106=1113,A.afii10107=1114,A.afii10108=1115,A.afii10109=1116,A.afii10110=1118,A.afii10145=1039,A.afii10146=1122,A.afii10147=1138,A.afii10148=1140,A.afii10192=63174,A.afii10193=1119,A.afii10194=1123,A.afii10195=1139,A.afii10196=1141,A.afii10831=63175,A.afii10832=63176,A.afii10846=1241,A.afii299=8206,A.afii300=8207,A.afii301=8205,A.afii57381=1642,A.afii57388=1548,A.afii57392=1632,A.afii57393=1633,A.afii57394=1634,A.afii57395=1635,A.afii57396=1636,A.afii57397=1637,A.afii57398=1638,A.afii57399=1639,A.afii57400=1640,A.afii57401=1641,A.afii57403=1563,A.afii57407=1567,A.afii57409=1569,A.afii57410=1570,A.afii57411=1571,A.afii57412=1572,A.afii57413=1573,A.afii57414=1574,A.afii57415=1575,A.afii57416=1576,A.afii57417=1577,A.afii57418=1578,A.afii57419=1579,A.afii57420=1580,A.afii57421=1581,A.afii57422=1582,A.afii57423=1583,A.afii57424=1584,A.afii57425=1585,A.afii57426=1586,A.afii57427=1587,A.afii57428=1588,A.afii57429=1589,A.afii57430=1590,A.afii57431=1591,A.afii57432=1592,A.afii57433=1593,A.afii57434=1594,A.afii57440=1600,A.afii57441=1601,A.afii57442=1602,A.afii57443=1603,A.afii57444=1604,A.afii57445=1605,A.afii57446=1606,A.afii57448=1608,A.afii57449=1609,A.afii57450=1610,A.afii57451=1611,A.afii57452=1612,A.afii57453=1613,A.afii57454=1614,A.afii57455=1615,A.afii57456=1616,A.afii57457=1617,A.afii57458=1618,A.afii57470=1607,A.afii57505=1700,A.afii57506=1662,A.afii57507=1670,A.afii57508=1688,A.afii57509=1711,A.afii57511=1657,A.afii57512=1672,A.afii57513=1681,A.afii57514=1722,A.afii57519=1746,A.afii57534=1749,A.afii57636=8362,A.afii57645=1470,A.afii57658=1475,A.afii57664=1488,A.afii57665=1489,A.afii57666=1490,A.afii57667=1491,A.afii57668=1492,A.afii57669=1493,A.afii57670=1494,A.afii57671=1495,A.afii57672=1496,A.afii57673=1497,A.afii57674=1498,A.afii57675=1499,A.afii57676=1500,A.afii57677=1501,A.afii57678=1502,A.afii57679=1503,A.afii57680=1504,A.afii57681=1505,A.afii57682=1506,A.afii57683=1507,A.afii57684=1508,A.afii57685=1509,A.afii57686=1510,A.afii57687=1511,A.afii57688=1512,A.afii57689=1513,A.afii57690=1514,A.afii57694=64298,A.afii57695=64299,A.afii57700=64331,A.afii57705=64287,A.afii57716=1520,A.afii57717=1521,A.afii57718=1522,A.afii57723=64309,A.afii57793=1460,A.afii57794=1461,A.afii57795=1462,A.afii57796=1467,A.afii57797=1464,A.afii57798=1463,A.afii57799=1456,A.afii57800=1458,A.afii57801=1457,A.afii57802=1459,A.afii57803=1474,A.afii57804=1473,A.afii57806=1465,A.afii57807=1468,A.afii57839=1469,A.afii57841=1471,A.afii57842=1472,A.afii57929=700,A.afii61248=8453,A.afii61289=8467,A.afii61352=8470,A.afii61573=8236,A.afii61574=8237,A.afii61575=8238,A.afii61664=8204,A.afii63167=1645,A.afii64937=701,A.agrave=224,A.agujarati=2693,A.agurmukhi=2565,A.ahiragana=12354,A.ahookabove=7843,A.aibengali=2448,A.aibopomofo=12574,A.aideva=2320,A.aiecyrillic=1237,A.aigujarati=2704,A.aigurmukhi=2576,A.aimatragurmukhi=2632,A.ainarabic=1593,A.ainfinalarabic=65226,A.aininitialarabic=65227,A.ainmedialarabic=65228,A.ainvertedbreve=515,A.aivowelsignbengali=2504,A.aivowelsigndeva=2376,A.aivowelsigngujarati=2760,A.akatakana=12450,A.akatakanahalfwidth=65393,A.akorean=12623,A.alef=1488,A.alefarabic=1575,A.alefdageshhebrew=64304,A.aleffinalarabic=65166,A.alefhamzaabovearabic=1571,A.alefhamzaabovefinalarabic=65156,A.alefhamzabelowarabic=1573,A.alefhamzabelowfinalarabic=65160,A.alefhebrew=1488,A.aleflamedhebrew=64335,A.alefmaddaabovearabic=1570,A.alefmaddaabovefinalarabic=65154,A.alefmaksuraarabic=1609,A.alefmaksurafinalarabic=65264,A.alefmaksurainitialarabic=65267,A.alefmaksuramedialarabic=65268,A.alefpatahhebrew=64302,A.alefqamatshebrew=64303,A.aleph=8501,A.allequal=8780,A.alpha=945,A.alphatonos=940,A.amacron=257,A.amonospace=65345,A.ampersand=38,A.ampersandmonospace=65286,A.ampersandsmall=63270,A.amsquare=13250,A.anbopomofo=12578,A.angbopomofo=12580,A.angbracketleft=12296,A.angbracketright=12297,A.angkhankhuthai=3674,A.angle=8736,A.anglebracketleft=12296,A.anglebracketleftvertical=65087,A.anglebracketright=12297,A.anglebracketrightvertical=65088,A.angleleft=9001,A.angleright=9002,A.angstrom=8491,A.anoteleia=903,A.anudattadeva=2386,A.anusvarabengali=2434,A.anusvaradeva=2306,A.anusvaragujarati=2690,A.aogonek=261,A.apaatosquare=13056,A.aparen=9372,A.apostrophearmenian=1370,A.apostrophemod=700,A.apple=63743,A.approaches=8784,A.approxequal=8776,A.approxequalorimage=8786,A.approximatelyequal=8773,A.araeaekorean=12686,A.araeakorean=12685,A.arc=8978,A.arighthalfring=7834,A.aring=229,A.aringacute=507,A.aringbelow=7681,A.arrowboth=8596,A.arrowdashdown=8675,A.arrowdashleft=8672,A.arrowdashright=8674,A.arrowdashup=8673,A.arrowdblboth=8660,A.arrowdbldown=8659,A.arrowdblleft=8656,A.arrowdblright=8658,A.arrowdblup=8657,A.arrowdown=8595,A.arrowdownleft=8601,A.arrowdownright=8600,A.arrowdownwhite=8681,A.arrowheaddownmod=709,A.arrowheadleftmod=706,A.arrowheadrightmod=707,A.arrowheadupmod=708,A.arrowhorizex=63719,A.arrowleft=8592,A.arrowleftdbl=8656,A.arrowleftdblstroke=8653,A.arrowleftoverright=8646,A.arrowleftwhite=8678,A.arrowright=8594,A.arrowrightdblstroke=8655,A.arrowrightheavy=10142,A.arrowrightoverleft=8644,A.arrowrightwhite=8680,A.arrowtableft=8676,A.arrowtabright=8677,A.arrowup=8593,A.arrowupdn=8597,A.arrowupdnbse=8616,A.arrowupdownbase=8616,A.arrowupleft=8598,A.arrowupleftofdown=8645,A.arrowupright=8599,A.arrowupwhite=8679,A.arrowvertex=63718,A.asciicircum=94,A.asciicircummonospace=65342,A.asciitilde=126,A.asciitildemonospace=65374,A.ascript=593,A.ascriptturned=594,A.asmallhiragana=12353,A.asmallkatakana=12449,A.asmallkatakanahalfwidth=65383,A.asterisk=42,A.asteriskaltonearabic=1645,A.asteriskarabic=1645,A.asteriskmath=8727,A.asteriskmonospace=65290,A.asterisksmall=65121,A.asterism=8258,A.asuperior=63209,A.asymptoticallyequal=8771,A.at=64,A.atilde=227,A.atmonospace=65312,A.atsmall=65131,A.aturned=592,A.aubengali=2452,A.aubopomofo=12576,A.audeva=2324,A.augujarati=2708,A.augurmukhi=2580,A.aulengthmarkbengali=2519,A.aumatragurmukhi=2636,A.auvowelsignbengali=2508,A.auvowelsigndeva=2380,A.auvowelsigngujarati=2764,A.avagrahadeva=2365,A.aybarmenian=1377,A.ayin=1506,A.ayinaltonehebrew=64288,A.ayinhebrew=1506,A.b=98,A.babengali=2476,A.backslash=92,A.backslashmonospace=65340,A.badeva=2348,A.bagujarati=2732,A.bagurmukhi=2604,A.bahiragana=12400,A.bahtthai=3647,A.bakatakana=12496,A.bar=124,A.barmonospace=65372,A.bbopomofo=12549,A.bcircle=9425,A.bdotaccent=7683,A.bdotbelow=7685,A.beamedsixteenthnotes=9836,A.because=8757,A.becyrillic=1073,A.beharabic=1576,A.behfinalarabic=65168,A.behinitialarabic=65169,A.behiragana=12409,A.behmedialarabic=65170,A.behmeeminitialarabic=64671,A.behmeemisolatedarabic=64520,A.behnoonfinalarabic=64621,A.bekatakana=12505,A.benarmenian=1378,A.bet=1489,A.beta=946,A.betasymbolgreek=976,A.betdagesh=64305,A.betdageshhebrew=64305,A.bethebrew=1489,A.betrafehebrew=64332,A.bhabengali=2477,A.bhadeva=2349,A.bhagujarati=2733,A.bhagurmukhi=2605,A.bhook=595,A.bihiragana=12403,A.bikatakana=12499,A.bilabialclick=664,A.bindigurmukhi=2562,A.birusquare=13105,A.blackcircle=9679,A.blackdiamond=9670,A.blackdownpointingtriangle=9660,A.blackleftpointingpointer=9668,A.blackleftpointingtriangle=9664,A.blacklenticularbracketleft=12304,A.blacklenticularbracketleftvertical=65083,A.blacklenticularbracketright=12305,A.blacklenticularbracketrightvertical=65084,A.blacklowerlefttriangle=9699,A.blacklowerrighttriangle=9698,A.blackrectangle=9644,A.blackrightpointingpointer=9658,A.blackrightpointingtriangle=9654,A.blacksmallsquare=9642,A.blacksmilingface=9787,A.blacksquare=9632,A.blackstar=9733,A.blackupperlefttriangle=9700,A.blackupperrighttriangle=9701,A.blackuppointingsmalltriangle=9652,A.blackuppointingtriangle=9650,A.blank=9251,A.blinebelow=7687,A.block=9608,A.bmonospace=65346,A.bobaimaithai=3610,A.bohiragana=12412,A.bokatakana=12508,A.bparen=9373,A.bqsquare=13251,A.braceex=63732,A.braceleft=123,A.braceleftbt=63731,A.braceleftmid=63730,A.braceleftmonospace=65371,A.braceleftsmall=65115,A.bracelefttp=63729,A.braceleftvertical=65079,A.braceright=125,A.bracerightbt=63742,A.bracerightmid=63741,A.bracerightmonospace=65373,A.bracerightsmall=65116,A.bracerighttp=63740,A.bracerightvertical=65080,A.bracketleft=91,A.bracketleftbt=63728,A.bracketleftex=63727,A.bracketleftmonospace=65339,A.bracketlefttp=63726,A.bracketright=93,A.bracketrightbt=63739,A.bracketrightex=63738,A.bracketrightmonospace=65341,A.bracketrighttp=63737,A.breve=728,A.brevebelowcmb=814,A.brevecmb=774,A.breveinvertedbelowcmb=815,A.breveinvertedcmb=785,A.breveinverteddoublecmb=865,A.bridgebelowcmb=810,A.bridgeinvertedbelowcmb=826,A.brokenbar=166,A.bstroke=384,A.bsuperior=63210,A.btopbar=387,A.buhiragana=12406,A.bukatakana=12502,A.bullet=8226,A.bulletinverse=9688,A.bulletoperator=8729,A.bullseye=9678,A.c=99,A.caarmenian=1390,A.cabengali=2458,A.cacute=263,A.cadeva=2330,A.cagujarati=2714,A.cagurmukhi=2586,A.calsquare=13192,A.candrabindubengali=2433,A.candrabinducmb=784,A.candrabindudeva=2305,A.candrabindugujarati=2689,A.capslock=8682,A.careof=8453,A.caron=711,A.caronbelowcmb=812,A.caroncmb=780,A.carriagereturn=8629,A.cbopomofo=12568,A.ccaron=269,A.ccedilla=231,A.ccedillaacute=7689,A.ccircle=9426,A.ccircumflex=265,A.ccurl=597,A.cdot=267,A.cdotaccent=267,A.cdsquare=13253,A.cedilla=184,A.cedillacmb=807,A.cent=162,A.centigrade=8451,A.centinferior=63199,A.centmonospace=65504,A.centoldstyle=63394,A.centsuperior=63200,A.chaarmenian=1401,A.chabengali=2459,A.chadeva=2331,A.chagujarati=2715,A.chagurmukhi=2587,A.chbopomofo=12564,A.cheabkhasiancyrillic=1213,A.checkmark=10003,A.checyrillic=1095,A.chedescenderabkhasiancyrillic=1215,A.chedescendercyrillic=1207,A.chedieresiscyrillic=1269,A.cheharmenian=1395,A.chekhakassiancyrillic=1228,A.cheverticalstrokecyrillic=1209,A.chi=967,A.chieuchacirclekorean=12919,A.chieuchaparenkorean=12823,A.chieuchcirclekorean=12905,A.chieuchkorean=12618,A.chieuchparenkorean=12809,A.chochangthai=3594,A.chochanthai=3592,A.chochingthai=3593,A.chochoethai=3596,A.chook=392,A.cieucacirclekorean=12918,A.cieucaparenkorean=12822,A.cieuccirclekorean=12904,A.cieuckorean=12616,A.cieucparenkorean=12808,A.cieucuparenkorean=12828,A.circle=9675,A.circlecopyrt=169,A.circlemultiply=8855,A.circleot=8857,A.circleplus=8853,A.circlepostalmark=12342,A.circlewithlefthalfblack=9680,A.circlewithrighthalfblack=9681,A.circumflex=710,A.circumflexbelowcmb=813,A.circumflexcmb=770,A.clear=8999,A.clickalveolar=450,A.clickdental=448,A.clicklateral=449,A.clickretroflex=451,A.club=9827,A.clubsuitblack=9827,A.clubsuitwhite=9831,A.cmcubedsquare=13220,A.cmonospace=65347,A.cmsquaredsquare=13216,A.coarmenian=1409,A.colon=58,A.colonmonetary=8353,A.colonmonospace=65306,A.colonsign=8353,A.colonsmall=65109,A.colontriangularhalfmod=721,A.colontriangularmod=720,A.comma=44,A.commaabovecmb=787,A.commaaboverightcmb=789,A.commaaccent=63171,A.commaarabic=1548,A.commaarmenian=1373,A.commainferior=63201,A.commamonospace=65292,A.commareversedabovecmb=788,A.commareversedmod=701,A.commasmall=65104,A.commasuperior=63202,A.commaturnedabovecmb=786,A.commaturnedmod=699,A.compass=9788,A.congruent=8773,A.contourintegral=8750,A.control=8963,A.controlACK=6,A.controlBEL=7,A.controlBS=8,A.controlCAN=24,A.controlCR=13,A.controlDC1=17,A.controlDC2=18,A.controlDC3=19,A.controlDC4=20,A.controlDEL=127,A.controlDLE=16,A.controlEM=25,A.controlENQ=5,A.controlEOT=4,A.controlESC=27,A.controlETB=23,A.controlETX=3,A.controlFF=12,A.controlFS=28,A.controlGS=29,A.controlHT=9,A.controlLF=10,A.controlNAK=21,A.controlNULL=0,A.controlRS=30,A.controlSI=15,A.controlSO=14,A.controlSOT=2,A.controlSTX=1,A.controlSUB=26,A.controlSYN=22,A.controlUS=31,A.controlVT=11,A.copyright=169,A.copyrightsans=63721,A.copyrightserif=63193,A.cornerbracketleft=12300,A.cornerbracketlefthalfwidth=65378,A.cornerbracketleftvertical=65089,A.cornerbracketright=12301,A.cornerbracketrighthalfwidth=65379,A.cornerbracketrightvertical=65090,A.corporationsquare=13183,A.cosquare=13255,A.coverkgsquare=13254,A.cparen=9374,A.cruzeiro=8354,A.cstretched=663,A.curlyand=8911,A.curlyor=8910,A.currency=164,A.cyrBreve=63185,A.cyrFlex=63186,A.cyrbreve=63188,A.cyrflex=63189,A.d=100,A.daarmenian=1380,A.dabengali=2470,A.dadarabic=1590,A.dadeva=2342,A.dadfinalarabic=65214,A.dadinitialarabic=65215,A.dadmedialarabic=65216,A.dagesh=1468,A.dageshhebrew=1468,A.dagger=8224,A.daggerdbl=8225,A.dagujarati=2726,A.dagurmukhi=2598,A.dahiragana=12384,A.dakatakana=12480,A.dalarabic=1583,A.dalet=1491,A.daletdagesh=64307,A.daletdageshhebrew=64307,A.dalethebrew=1491,A.dalfinalarabic=65194,A.dammaarabic=1615,A.dammalowarabic=1615,A.dammatanaltonearabic=1612,A.dammatanarabic=1612,A.danda=2404,A.dargahebrew=1447,A.dargalefthebrew=1447,A.dasiapneumatacyrilliccmb=1157,A.dblGrave=63187,A.dblanglebracketleft=12298,A.dblanglebracketleftvertical=65085,A.dblanglebracketright=12299,A.dblanglebracketrightvertical=65086,A.dblarchinvertedbelowcmb=811,A.dblarrowleft=8660,A.dblarrowright=8658,A.dbldanda=2405,A.dblgrave=63190,A.dblgravecmb=783,A.dblintegral=8748,A.dbllowline=8215,A.dbllowlinecmb=819,A.dbloverlinecmb=831,A.dblprimemod=698,A.dblverticalbar=8214,A.dblverticallineabovecmb=782,A.dbopomofo=12553,A.dbsquare=13256,A.dcaron=271,A.dcedilla=7697,A.dcircle=9427,A.dcircumflexbelow=7699,A.dcroat=273,A.ddabengali=2465,A.ddadeva=2337,A.ddagujarati=2721,A.ddagurmukhi=2593,A.ddalarabic=1672,A.ddalfinalarabic=64393,A.dddhadeva=2396,A.ddhabengali=2466,A.ddhadeva=2338,A.ddhagujarati=2722,A.ddhagurmukhi=2594,A.ddotaccent=7691,A.ddotbelow=7693,A.decimalseparatorarabic=1643,A.decimalseparatorpersian=1643,A.decyrillic=1076,A.degree=176,A.dehihebrew=1453,A.dehiragana=12391,A.deicoptic=1007,A.dekatakana=12487,A.deleteleft=9003,A.deleteright=8998,A.delta=948,A.deltaturned=397,A.denominatorminusonenumeratorbengali=2552,A.dezh=676,A.dhabengali=2471,A.dhadeva=2343,A.dhagujarati=2727,A.dhagurmukhi=2599,A.dhook=599,A.dialytikatonos=901,A.dialytikatonoscmb=836,A.diamond=9830,A.diamondsuitwhite=9826,A.dieresis=168,A.dieresisacute=63191,A.dieresisbelowcmb=804,A.dieresiscmb=776,A.dieresisgrave=63192,A.dieresistonos=901,A.dihiragana=12386,A.dikatakana=12482,A.dittomark=12291,A.divide=247,A.divides=8739,A.divisionslash=8725,A.djecyrillic=1106,A.dkshade=9619,A.dlinebelow=7695,A.dlsquare=13207,A.dmacron=273,A.dmonospace=65348,A.dnblock=9604,A.dochadathai=3598,A.dodekthai=3604,A.dohiragana=12393,A.dokatakana=12489,A.dollar=36;A.dollarinferior=63203,A.dollarmonospace=65284,A.dollaroldstyle=63268,A.dollarsmall=65129,A.dollarsuperior=63204,A.dong=8363,A.dorusquare=13094,A.dotaccent=729,A.dotaccentcmb=775,A.dotbelowcmb=803,A.dotbelowcomb=803,A.dotkatakana=12539,A.dotlessi=305,A.dotlessj=63166,A.dotlessjstrokehook=644,A.dotmath=8901,A.dottedcircle=9676,A.doubleyodpatah=64287,A.doubleyodpatahhebrew=64287,A.downtackbelowcmb=798,A.downtackmod=725,A.dparen=9375,A.dsuperior=63211,A.dtail=598,A.dtopbar=396,A.duhiragana=12389,A.dukatakana=12485,A.dz=499,A.dzaltone=675,A.dzcaron=454,A.dzcurl=677,A.dzeabkhasiancyrillic=1249,A.dzecyrillic=1109,A.dzhecyrillic=1119,A.e=101,A.eacute=233,A.earth=9793,A.ebengali=2447,A.ebopomofo=12572,A.ebreve=277,A.ecandradeva=2317,A.ecandragujarati=2701,A.ecandravowelsigndeva=2373,A.ecandravowelsigngujarati=2757,A.ecaron=283,A.ecedillabreve=7709,A.echarmenian=1381,A.echyiwnarmenian=1415,A.ecircle=9428,A.ecircumflex=234,A.ecircumflexacute=7871,A.ecircumflexbelow=7705,A.ecircumflexdotbelow=7879,A.ecircumflexgrave=7873,A.ecircumflexhookabove=7875,A.ecircumflextilde=7877,A.ecyrillic=1108,A.edblgrave=517,A.edeva=2319,A.edieresis=235,A.edot=279,A.edotaccent=279,A.edotbelow=7865,A.eegurmukhi=2575,A.eematragurmukhi=2631,A.efcyrillic=1092,A.egrave=232,A.egujarati=2703,A.eharmenian=1383,A.ehbopomofo=12573,A.ehiragana=12360,A.ehookabove=7867,A.eibopomofo=12575,A.eight=56,A.eightarabic=1640,A.eightbengali=2542,A.eightcircle=9319,A.eightcircleinversesansserif=10129,A.eightdeva=2414,A.eighteencircle=9329,A.eighteenparen=9349,A.eighteenperiod=9369,A.eightgujarati=2798,A.eightgurmukhi=2670,A.eighthackarabic=1640,A.eighthangzhou=12328,A.eighthnotebeamed=9835,A.eightideographicparen=12839,A.eightinferior=8328,A.eightmonospace=65304,A.eightoldstyle=63288,A.eightparen=9339,A.eightperiod=9359,A.eightpersian=1784,A.eightroman=8567,A.eightsuperior=8312,A.eightthai=3672,A.einvertedbreve=519,A.eiotifiedcyrillic=1125,A.ekatakana=12456,A.ekatakanahalfwidth=65396,A.ekonkargurmukhi=2676,A.ekorean=12628,A.elcyrillic=1083,A.element=8712,A.elevencircle=9322,A.elevenparen=9342,A.elevenperiod=9362,A.elevenroman=8570,A.ellipsis=8230,A.ellipsisvertical=8942,A.emacron=275,A.emacronacute=7703,A.emacrongrave=7701,A.emcyrillic=1084,A.emdash=8212,A.emdashvertical=65073,A.emonospace=65349,A.emphasismarkarmenian=1371,A.emptyset=8709,A.enbopomofo=12579,A.encyrillic=1085,A.endash=8211,A.endashvertical=65074,A.endescendercyrillic=1187,A.eng=331,A.engbopomofo=12581,A.enghecyrillic=1189,A.enhookcyrillic=1224,A.enspace=8194,A.eogonek=281,A.eokorean=12627,A.eopen=603,A.eopenclosed=666,A.eopenreversed=604,A.eopenreversedclosed=606,A.eopenreversedhook=605,A.eparen=9376,A.epsilon=949,A.epsilontonos=941,A.equal=61,A.equalmonospace=65309,A.equalsmall=65126,A.equalsuperior=8316,A.equivalence=8801,A.erbopomofo=12582,A.ercyrillic=1088,A.ereversed=600,A.ereversedcyrillic=1101,A.escyrillic=1089,A.esdescendercyrillic=1195,A.esh=643,A.eshcurl=646,A.eshortdeva=2318,A.eshortvowelsigndeva=2374,A.eshreversedloop=426,A.eshsquatreversed=645,A.esmallhiragana=12359,A.esmallkatakana=12455,A.esmallkatakanahalfwidth=65386,A.estimated=8494,A.esuperior=63212,A.eta=951,A.etarmenian=1384,A.etatonos=942,A.eth=240,A.etilde=7869,A.etildebelow=7707,A.etnahtafoukhhebrew=1425,A.etnahtafoukhlefthebrew=1425,A.etnahtahebrew=1425,A.etnahtalefthebrew=1425,A.eturned=477,A.eukorean=12641,A.euro=8364,A.evowelsignbengali=2503,A.evowelsigndeva=2375,A.evowelsigngujarati=2759,A.exclam=33,A.exclamarmenian=1372,A.exclamdbl=8252,A.exclamdown=161,A.exclamdownsmall=63393,A.exclammonospace=65281,A.exclamsmall=63265,A.existential=8707,A.ezh=658,A.ezhcaron=495,A.ezhcurl=659,A.ezhreversed=441,A.ezhtail=442,A.f=102,A.fadeva=2398,A.fagurmukhi=2654,A.fahrenheit=8457,A.fathaarabic=1614,A.fathalowarabic=1614,A.fathatanarabic=1611,A.fbopomofo=12552,A.fcircle=9429,A.fdotaccent=7711,A.feharabic=1601,A.feharmenian=1414,A.fehfinalarabic=65234,A.fehinitialarabic=65235,A.fehmedialarabic=65236,A.feicoptic=997,A.female=9792,A.ff=64256,A.f_f=64256,A.ffi=64259,A.f_f_i=64259,A.ffl=64260,A.f_f_l=64260,A.fi=64257,A.f_i=64257,A.fifteencircle=9326,A.fifteenparen=9346,A.fifteenperiod=9366,A.figuredash=8210,A.filledbox=9632,A.filledrect=9644,A.finalkaf=1498,A.finalkafdagesh=64314,A.finalkafdageshhebrew=64314,A.finalkafhebrew=1498,A.finalmem=1501,A.finalmemhebrew=1501,A.finalnun=1503,A.finalnunhebrew=1503,A.finalpe=1507,A.finalpehebrew=1507,A.finaltsadi=1509,A.finaltsadihebrew=1509,A.firsttonechinese=713,A.fisheye=9673,A.fitacyrillic=1139,A.five=53,A.fivearabic=1637,A.fivebengali=2539,A.fivecircle=9316,A.fivecircleinversesansserif=10126,A.fivedeva=2411,A.fiveeighths=8541,A.fivegujarati=2795,A.fivegurmukhi=2667,A.fivehackarabic=1637,A.fivehangzhou=12325,A.fiveideographicparen=12836,A.fiveinferior=8325,A.fivemonospace=65301,A.fiveoldstyle=63285,A.fiveparen=9336,A.fiveperiod=9356,A.fivepersian=1781,A.fiveroman=8564,A.fivesuperior=8309,A.fivethai=3669,A.fl=64258,A.f_l=64258,A.florin=402,A.fmonospace=65350,A.fmsquare=13209,A.fofanthai=3615,A.fofathai=3613,A.fongmanthai=3663,A.forall=8704,A.four=52,A.fourarabic=1636,A.fourbengali=2538,A.fourcircle=9315,A.fourcircleinversesansserif=10125,A.fourdeva=2410,A.fourgujarati=2794,A.fourgurmukhi=2666,A.fourhackarabic=1636,A.fourhangzhou=12324,A.fourideographicparen=12835,A.fourinferior=8324,A.fourmonospace=65300,A.fournumeratorbengali=2551,A.fouroldstyle=63284,A.fourparen=9335,A.fourperiod=9355,A.fourpersian=1780,A.fourroman=8563,A.foursuperior=8308,A.fourteencircle=9325,A.fourteenparen=9345,A.fourteenperiod=9365,A.fourthai=3668,A.fourthtonechinese=715,A.fparen=9377,A.fraction=8260,A.franc=8355,A.g=103,A.gabengali=2455,A.gacute=501,A.gadeva=2327,A.gafarabic=1711,A.gaffinalarabic=64403,A.gafinitialarabic=64404,A.gafmedialarabic=64405,A.gagujarati=2711,A.gagurmukhi=2583,A.gahiragana=12364,A.gakatakana=12460,A.gamma=947,A.gammalatinsmall=611,A.gammasuperior=736,A.gangiacoptic=1003,A.gbopomofo=12557,A.gbreve=287,A.gcaron=487,A.gcedilla=291,A.gcircle=9430,A.gcircumflex=285,A.gcommaaccent=291,A.gdot=289,A.gdotaccent=289,A.gecyrillic=1075,A.gehiragana=12370,A.gekatakana=12466,A.geometricallyequal=8785,A.gereshaccenthebrew=1436,A.gereshhebrew=1523,A.gereshmuqdamhebrew=1437,A.germandbls=223,A.gershayimaccenthebrew=1438,A.gershayimhebrew=1524,A.getamark=12307,A.ghabengali=2456,A.ghadarmenian=1394,A.ghadeva=2328,A.ghagujarati=2712,A.ghagurmukhi=2584,A.ghainarabic=1594,A.ghainfinalarabic=65230,A.ghaininitialarabic=65231,A.ghainmedialarabic=65232,A.ghemiddlehookcyrillic=1173,A.ghestrokecyrillic=1171,A.gheupturncyrillic=1169,A.ghhadeva=2394,A.ghhagurmukhi=2650,A.ghook=608,A.ghzsquare=13203,A.gihiragana=12366,A.gikatakana=12462,A.gimarmenian=1379,A.gimel=1490,A.gimeldagesh=64306,A.gimeldageshhebrew=64306,A.gimelhebrew=1490,A.gjecyrillic=1107,A.glottalinvertedstroke=446,A.glottalstop=660,A.glottalstopinverted=662,A.glottalstopmod=704,A.glottalstopreversed=661,A.glottalstopreversedmod=705,A.glottalstopreversedsuperior=740,A.glottalstopstroke=673,A.glottalstopstrokereversed=674,A.gmacron=7713,A.gmonospace=65351,A.gohiragana=12372,A.gokatakana=12468,A.gparen=9378,A.gpasquare=13228,A.gradient=8711,A.grave=96,A.gravebelowcmb=790,A.gravecmb=768,A.gravecomb=768,A.gravedeva=2387,A.gravelowmod=718,A.gravemonospace=65344,A.gravetonecmb=832,A.greater=62,A.greaterequal=8805,A.greaterequalorless=8923,A.greatermonospace=65310,A.greaterorequivalent=8819,A.greaterorless=8823,A.greateroverequal=8807,A.greatersmall=65125,A.gscript=609,A.gstroke=485,A.guhiragana=12368,A.guillemotleft=171,A.guillemotright=187,A.guilsinglleft=8249,A.guilsinglright=8250,A.gukatakana=12464,A.guramusquare=13080,A.gysquare=13257,A.h=104,A.haabkhasiancyrillic=1193,A.haaltonearabic=1729,A.habengali=2489,A.hadescendercyrillic=1203,A.hadeva=2361,A.hagujarati=2745,A.hagurmukhi=2617,A.haharabic=1581,A.hahfinalarabic=65186,A.hahinitialarabic=65187,A.hahiragana=12399,A.hahmedialarabic=65188,A.haitusquare=13098,A.hakatakana=12495,A.hakatakanahalfwidth=65418,A.halantgurmukhi=2637,A.hamzaarabic=1569,A.hamzalowarabic=1569,A.hangulfiller=12644,A.hardsigncyrillic=1098,A.harpoonleftbarbup=8636,A.harpoonrightbarbup=8640,A.hasquare=13258,A.hatafpatah=1458,A.hatafpatah16=1458,A.hatafpatah23=1458,A.hatafpatah2f=1458,A.hatafpatahhebrew=1458,A.hatafpatahnarrowhebrew=1458,A.hatafpatahquarterhebrew=1458,A.hatafpatahwidehebrew=1458,A.hatafqamats=1459,A.hatafqamats1b=1459,A.hatafqamats28=1459,A.hatafqamats34=1459,A.hatafqamatshebrew=1459,A.hatafqamatsnarrowhebrew=1459,A.hatafqamatsquarterhebrew=1459,A.hatafqamatswidehebrew=1459,A.hatafsegol=1457,A.hatafsegol17=1457,A.hatafsegol24=1457,A.hatafsegol30=1457,A.hatafsegolhebrew=1457,A.hatafsegolnarrowhebrew=1457,A.hatafsegolquarterhebrew=1457,A.hatafsegolwidehebrew=1457,A.hbar=295,A.hbopomofo=12559,A.hbrevebelow=7723,A.hcedilla=7721,A.hcircle=9431,A.hcircumflex=293,A.hdieresis=7719,A.hdotaccent=7715,A.hdotbelow=7717,A.he=1492,A.heart=9829,A.heartsuitblack=9829,A.heartsuitwhite=9825,A.hedagesh=64308,A.hedageshhebrew=64308,A.hehaltonearabic=1729,A.heharabic=1607,A.hehebrew=1492,A.hehfinalaltonearabic=64423,A.hehfinalalttwoarabic=65258,A.hehfinalarabic=65258,A.hehhamzaabovefinalarabic=64421,A.hehhamzaaboveisolatedarabic=64420,A.hehinitialaltonearabic=64424,A.hehinitialarabic=65259,A.hehiragana=12408,A.hehmedialaltonearabic=64425,A.hehmedialarabic=65260,A.heiseierasquare=13179,A.hekatakana=12504,A.hekatakanahalfwidth=65421,A.hekutaarusquare=13110,A.henghook=615,A.herutusquare=13113,A.het=1495,A.hethebrew=1495,A.hhook=614,A.hhooksuperior=689,A.hieuhacirclekorean=12923,A.hieuhaparenkorean=12827,A.hieuhcirclekorean=12909,A.hieuhkorean=12622,A.hieuhparenkorean=12813,A.hihiragana=12402,A.hikatakana=12498,A.hikatakanahalfwidth=65419,A.hiriq=1460,A.hiriq14=1460,A.hiriq21=1460,A.hiriq2d=1460,A.hiriqhebrew=1460,A.hiriqnarrowhebrew=1460,A.hiriqquarterhebrew=1460,A.hiriqwidehebrew=1460,A.hlinebelow=7830,A.hmonospace=65352,A.hoarmenian=1392,A.hohipthai=3627,A.hohiragana=12411,A.hokatakana=12507,A.hokatakanahalfwidth=65422,A.holam=1465,A.holam19=1465,A.holam26=1465,A.holam32=1465,A.holamhebrew=1465,A.holamnarrowhebrew=1465,A.holamquarterhebrew=1465,A.holamwidehebrew=1465,A.honokhukthai=3630,A.hookabovecomb=777,A.hookcmb=777,A.hookpalatalizedbelowcmb=801,A.hookretroflexbelowcmb=802,A.hoonsquare=13122,A.horicoptic=1001,A.horizontalbar=8213,A.horncmb=795,A.hotsprings=9832,A.house=8962,A.hparen=9379,A.hsuperior=688,A.hturned=613,A.huhiragana=12405,A.huiitosquare=13107,A.hukatakana=12501,A.hukatakanahalfwidth=65420,A.hungarumlaut=733,A.hungarumlautcmb=779,A.hv=405,A.hyphen=45,A.hypheninferior=63205,A.hyphenmonospace=65293,A.hyphensmall=65123,A.hyphensuperior=63206,A.hyphentwo=8208,A.i=105,A.iacute=237,A.iacyrillic=1103,A.ibengali=2439,A.ibopomofo=12583,A.ibreve=301,A.icaron=464,A.icircle=9432,A.icircumflex=238,A.icyrillic=1110,A.idblgrave=521,A.ideographearthcircle=12943,A.ideographfirecircle=12939,A.ideographicallianceparen=12863,A.ideographiccallparen=12858,A.ideographiccentrecircle=12965,A.ideographicclose=12294,A.ideographiccomma=12289,A.ideographiccommaleft=65380,A.ideographiccongratulationparen=12855,A.ideographiccorrectcircle=12963,A.ideographicearthparen=12847,A.ideographicenterpriseparen=12861,A.ideographicexcellentcircle=12957,A.ideographicfestivalparen=12864,A.ideographicfinancialcircle=12950,A.ideographicfinancialparen=12854,A.ideographicfireparen=12843,A.ideographichaveparen=12850,A.ideographichighcircle=12964,A.ideographiciterationmark=12293,A.ideographiclaborcircle=12952,A.ideographiclaborparen=12856,A.ideographicleftcircle=12967,A.ideographiclowcircle=12966,A.ideographicmedicinecircle=12969,A.ideographicmetalparen=12846,A.ideographicmoonparen=12842,A.ideographicnameparen=12852,A.ideographicperiod=12290,A.ideographicprintcircle=12958,A.ideographicreachparen=12867,A.ideographicrepresentparen=12857,A.ideographicresourceparen=12862,A.ideographicrightcircle=12968,A.ideographicsecretcircle=12953,A.ideographicselfparen=12866,A.ideographicsocietyparen=12851,A.ideographicspace=12288,A.ideographicspecialparen=12853,A.ideographicstockparen=12849,A.ideographicstudyparen=12859,A.ideographicsunparen=12848,A.ideographicsuperviseparen=12860,A.ideographicwaterparen=12844,A.ideographicwoodparen=12845,A.ideographiczero=12295,A.ideographmetalcircle=12942,A.ideographmooncircle=12938,A.ideographnamecircle=12948,A.ideographsuncircle=12944,A.ideographwatercircle=12940,A.ideographwoodcircle=12941,A.ideva=2311,A.idieresis=239,A.idieresisacute=7727,A.idieresiscyrillic=1253,A.idotbelow=7883,A.iebrevecyrillic=1239,A.iecyrillic=1077,A.ieungacirclekorean=12917,A.ieungaparenkorean=12821,A.ieungcirclekorean=12903,A.ieungkorean=12615,A.ieungparenkorean=12807,A.igrave=236,A.igujarati=2695,A.igurmukhi=2567,A.ihiragana=12356,A.ihookabove=7881,A.iibengali=2440,A.iicyrillic=1080,A.iideva=2312,A.iigujarati=2696,A.iigurmukhi=2568,A.iimatragurmukhi=2624,A.iinvertedbreve=523,A.iishortcyrillic=1081,A.iivowelsignbengali=2496,A.iivowelsigndeva=2368,A.iivowelsigngujarati=2752,A.ij=307,A.ikatakana=12452,A.ikatakanahalfwidth=65394,A.ikorean=12643,A.ilde=732,A.iluyhebrew=1452,A.imacron=299,A.imacroncyrillic=1251,A.imageorapproximatelyequal=8787,A.imatragurmukhi=2623,A.imonospace=65353,A.increment=8710,A.infinity=8734,A.iniarmenian=1387,A.integral=8747,A.integralbottom=8993,A.integralbt=8993,A.integralex=63733,A.integraltop=8992,A.integraltp=8992,A.intersection=8745,A.intisquare=13061,A.invbullet=9688,A.invcircle=9689,A.invsmileface=9787,A.iocyrillic=1105,A.iogonek=303,A.iota=953,A.iotadieresis=970,A.iotadieresistonos=912,A.iotalatin=617,A.iotatonos=943,A.iparen=9380,A.irigurmukhi=2674,A.ismallhiragana=12355,A.ismallkatakana=12451,A.ismallkatakanahalfwidth=65384,A.issharbengali=2554,A.istroke=616,A.isuperior=63213,A.iterationhiragana=12445,A.iterationkatakana=12541,A.itilde=297,A.itildebelow=7725,A.iubopomofo=12585,A.iucyrillic=1102,A.ivowelsignbengali=2495,A.ivowelsigndeva=2367,A.ivowelsigngujarati=2751,A.izhitsacyrillic=1141,A.izhitsadblgravecyrillic=1143,A.j=106,A.jaarmenian=1393,A.jabengali=2460,A.jadeva=2332,A.jagujarati=2716,A.jagurmukhi=2588,A.jbopomofo=12560,A.jcaron=496,A.jcircle=9433,A.jcircumflex=309,A.jcrossedtail=669,A.jdotlessstroke=607,A.jecyrillic=1112,A.jeemarabic=1580,A.jeemfinalarabic=65182,A.jeeminitialarabic=65183,A.jeemmedialarabic=65184,A.jeharabic=1688,A.jehfinalarabic=64395,A.jhabengali=2461,A.jhadeva=2333,A.jhagujarati=2717,A.jhagurmukhi=2589,A.jheharmenian=1403,A.jis=12292,A.jmonospace=65354,A.jparen=9381,A.jsuperior=690,A.k=107,A.kabashkircyrillic=1185,A.kabengali=2453,A.kacute=7729,A.kacyrillic=1082,A.kadescendercyrillic=1179,A.kadeva=2325,A.kaf=1499,A.kafarabic=1603,A.kafdagesh=64315,A.kafdageshhebrew=64315,A.kaffinalarabic=65242,A.kafhebrew=1499,A.kafinitialarabic=65243,A.kafmedialarabic=65244,A.kafrafehebrew=64333,A.kagujarati=2709,A.kagurmukhi=2581,A.kahiragana=12363,A.kahookcyrillic=1220,A.kakatakana=12459,A.kakatakanahalfwidth=65398,A.kappa=954,A.kappasymbolgreek=1008,A.kapyeounmieumkorean=12657,A.kapyeounphieuphkorean=12676,A.kapyeounpieupkorean=12664,A.kapyeounssangpieupkorean=12665,A.karoriisquare=13069,A.kashidaautoarabic=1600,A.kashidaautonosidebearingarabic=1600,A.kasmallkatakana=12533,A.kasquare=13188,A.kasraarabic=1616,A.kasratanarabic=1613,A.kastrokecyrillic=1183,A.katahiraprolongmarkhalfwidth=65392,A.kaverticalstrokecyrillic=1181,A.kbopomofo=12558,A.kcalsquare=13193,A.kcaron=489,A.kcedilla=311,A.kcircle=9434,A.kcommaaccent=311,A.kdotbelow=7731,A.keharmenian=1412,A.kehiragana=12369,A.kekatakana=12465,A.kekatakanahalfwidth=65401,A.kenarmenian=1391,A.kesmallkatakana=12534,A.kgreenlandic=312,A.khabengali=2454,A.khacyrillic=1093,A.khadeva=2326,A.khagujarati=2710,A.khagurmukhi=2582,A.khaharabic=1582,A.khahfinalarabic=65190,A.khahinitialarabic=65191,A.khahmedialarabic=65192,A.kheicoptic=999,A.khhadeva=2393,A.khhagurmukhi=2649,A.khieukhacirclekorean=12920,A.khieukhaparenkorean=12824,A.khieukhcirclekorean=12906,A.khieukhkorean=12619,A.khieukhparenkorean=12810,A.khokhaithai=3586,A.khokhonthai=3589,A.khokhuatthai=3587,A.khokhwaithai=3588,A.khomutthai=3675,A.khook=409,A.khorakhangthai=3590,A.khzsquare=13201,A.kihiragana=12365,A.kikatakana=12461,A.kikatakanahalfwidth=65399,A.kiroguramusquare=13077,A.kiromeetorusquare=13078,A.kirosquare=13076,A.kiyeokacirclekorean=12910,A.kiyeokaparenkorean=12814,A.kiyeokcirclekorean=12896,A.kiyeokkorean=12593,A.kiyeokparenkorean=12800,A.kiyeoksioskorean=12595;A.kjecyrillic=1116,A.klinebelow=7733,A.klsquare=13208,A.kmcubedsquare=13222,A.kmonospace=65355,A.kmsquaredsquare=13218,A.kohiragana=12371,A.kohmsquare=13248,A.kokaithai=3585,A.kokatakana=12467,A.kokatakanahalfwidth=65402,A.kooposquare=13086,A.koppacyrillic=1153,A.koreanstandardsymbol=12927,A.koroniscmb=835,A.kparen=9382,A.kpasquare=13226,A.ksicyrillic=1135,A.ktsquare=13263,A.kturned=670,A.kuhiragana=12367,A.kukatakana=12463,A.kukatakanahalfwidth=65400,A.kvsquare=13240,A.kwsquare=13246,A.l=108,A.labengali=2482,A.lacute=314,A.ladeva=2354,A.lagujarati=2738,A.lagurmukhi=2610,A.lakkhangyaothai=3653,A.lamaleffinalarabic=65276,A.lamalefhamzaabovefinalarabic=65272,A.lamalefhamzaaboveisolatedarabic=65271,A.lamalefhamzabelowfinalarabic=65274,A.lamalefhamzabelowisolatedarabic=65273,A.lamalefisolatedarabic=65275,A.lamalefmaddaabovefinalarabic=65270,A.lamalefmaddaaboveisolatedarabic=65269,A.lamarabic=1604,A.lambda=955,A.lambdastroke=411,A.lamed=1500,A.lameddagesh=64316,A.lameddageshhebrew=64316,A.lamedhebrew=1500,A.lamfinalarabic=65246,A.lamhahinitialarabic=64714,A.laminitialarabic=65247,A.lamjeeminitialarabic=64713,A.lamkhahinitialarabic=64715,A.lamlamhehisolatedarabic=65010,A.lammedialarabic=65248,A.lammeemhahinitialarabic=64904,A.lammeeminitialarabic=64716,A.largecircle=9711,A.lbar=410,A.lbelt=620,A.lbopomofo=12556,A.lcaron=318,A.lcedilla=316,A.lcircle=9435,A.lcircumflexbelow=7741,A.lcommaaccent=316,A.ldot=320,A.ldotaccent=320,A.ldotbelow=7735,A.ldotbelowmacron=7737,A.leftangleabovecmb=794,A.lefttackbelowcmb=792,A.less=60,A.lessequal=8804,A.lessequalorgreater=8922,A.lessmonospace=65308,A.lessorequivalent=8818,A.lessorgreater=8822,A.lessoverequal=8806,A.lesssmall=65124,A.lezh=622,A.lfblock=9612,A.lhookretroflex=621,A.lira=8356,A.liwnarmenian=1388,A.lj=457,A.ljecyrillic=1113,A.ll=63168,A.lladeva=2355,A.llagujarati=2739,A.llinebelow=7739,A.llladeva=2356,A.llvocalicbengali=2529,A.llvocalicdeva=2401,A.llvocalicvowelsignbengali=2531,A.llvocalicvowelsigndeva=2403,A.lmiddletilde=619,A.lmonospace=65356,A.lmsquare=13264,A.lochulathai=3628,A.logicaland=8743,A.logicalnot=172,A.logicalnotreversed=8976,A.logicalor=8744,A.lolingthai=3621,A.longs=383,A.lowlinecenterline=65102,A.lowlinecmb=818,A.lowlinedashed=65101,A.lozenge=9674,A.lparen=9383,A.lslash=322,A.lsquare=8467,A.lsuperior=63214,A.ltshade=9617,A.luthai=3622,A.lvocalicbengali=2444,A.lvocalicdeva=2316,A.lvocalicvowelsignbengali=2530,A.lvocalicvowelsigndeva=2402,A.lxsquare=13267,A.m=109,A.mabengali=2478,A.macron=175,A.macronbelowcmb=817,A.macroncmb=772,A.macronlowmod=717,A.macronmonospace=65507,A.macute=7743,A.madeva=2350,A.magujarati=2734,A.magurmukhi=2606,A.mahapakhhebrew=1444,A.mahapakhlefthebrew=1444,A.mahiragana=12414,A.maichattawalowleftthai=63637,A.maichattawalowrightthai=63636,A.maichattawathai=3659,A.maichattawaupperleftthai=63635,A.maieklowleftthai=63628,A.maieklowrightthai=63627,A.maiekthai=3656,A.maiekupperleftthai=63626,A.maihanakatleftthai=63620,A.maihanakatthai=3633,A.maitaikhuleftthai=63625,A.maitaikhuthai=3655,A.maitholowleftthai=63631,A.maitholowrightthai=63630,A.maithothai=3657,A.maithoupperleftthai=63629,A.maitrilowleftthai=63634,A.maitrilowrightthai=63633,A.maitrithai=3658,A.maitriupperleftthai=63632,A.maiyamokthai=3654,A.makatakana=12510,A.makatakanahalfwidth=65423,A.male=9794,A.mansyonsquare=13127,A.maqafhebrew=1470,A.mars=9794,A.masoracirclehebrew=1455,A.masquare=13187,A.mbopomofo=12551,A.mbsquare=13268,A.mcircle=9436,A.mcubedsquare=13221,A.mdotaccent=7745,A.mdotbelow=7747,A.meemarabic=1605,A.meemfinalarabic=65250,A.meeminitialarabic=65251,A.meemmedialarabic=65252,A.meemmeeminitialarabic=64721,A.meemmeemisolatedarabic=64584,A.meetorusquare=13133,A.mehiragana=12417,A.meizierasquare=13182,A.mekatakana=12513,A.mekatakanahalfwidth=65426,A.mem=1502,A.memdagesh=64318,A.memdageshhebrew=64318,A.memhebrew=1502,A.menarmenian=1396,A.merkhahebrew=1445,A.merkhakefulahebrew=1446,A.merkhakefulalefthebrew=1446,A.merkhalefthebrew=1445,A.mhook=625,A.mhzsquare=13202,A.middledotkatakanahalfwidth=65381,A.middot=183,A.mieumacirclekorean=12914,A.mieumaparenkorean=12818,A.mieumcirclekorean=12900,A.mieumkorean=12609,A.mieumpansioskorean=12656,A.mieumparenkorean=12804,A.mieumpieupkorean=12654,A.mieumsioskorean=12655,A.mihiragana=12415,A.mikatakana=12511,A.mikatakanahalfwidth=65424,A.minus=8722,A.minusbelowcmb=800,A.minuscircle=8854,A.minusmod=727,A.minusplus=8723,A.minute=8242,A.miribaarusquare=13130,A.mirisquare=13129,A.mlonglegturned=624,A.mlsquare=13206,A.mmcubedsquare=13219,A.mmonospace=65357,A.mmsquaredsquare=13215,A.mohiragana=12418,A.mohmsquare=13249,A.mokatakana=12514,A.mokatakanahalfwidth=65427,A.molsquare=13270,A.momathai=3617,A.moverssquare=13223,A.moverssquaredsquare=13224,A.mparen=9384,A.mpasquare=13227,A.mssquare=13235,A.msuperior=63215,A.mturned=623,A.mu=181,A.mu1=181,A.muasquare=13186,A.muchgreater=8811,A.muchless=8810,A.mufsquare=13196,A.mugreek=956,A.mugsquare=13197,A.muhiragana=12416,A.mukatakana=12512,A.mukatakanahalfwidth=65425,A.mulsquare=13205,A.multiply=215,A.mumsquare=13211,A.munahhebrew=1443,A.munahlefthebrew=1443,A.musicalnote=9834,A.musicalnotedbl=9835,A.musicflatsign=9837,A.musicsharpsign=9839,A.mussquare=13234,A.muvsquare=13238,A.muwsquare=13244,A.mvmegasquare=13241,A.mvsquare=13239,A.mwmegasquare=13247,A.mwsquare=13245,A.n=110,A.nabengali=2472,A.nabla=8711,A.nacute=324,A.nadeva=2344,A.nagujarati=2728,A.nagurmukhi=2600,A.nahiragana=12394,A.nakatakana=12490,A.nakatakanahalfwidth=65413,A.napostrophe=329,A.nasquare=13185,A.nbopomofo=12555,A.nbspace=160,A.ncaron=328,A.ncedilla=326,A.ncircle=9437,A.ncircumflexbelow=7755,A.ncommaaccent=326,A.ndotaccent=7749,A.ndotbelow=7751,A.nehiragana=12397,A.nekatakana=12493,A.nekatakanahalfwidth=65416,A.newsheqelsign=8362,A.nfsquare=13195,A.ngabengali=2457,A.ngadeva=2329,A.ngagujarati=2713,A.ngagurmukhi=2585,A.ngonguthai=3591,A.nhiragana=12435,A.nhookleft=626,A.nhookretroflex=627,A.nieunacirclekorean=12911,A.nieunaparenkorean=12815,A.nieuncieuckorean=12597,A.nieuncirclekorean=12897,A.nieunhieuhkorean=12598,A.nieunkorean=12596,A.nieunpansioskorean=12648,A.nieunparenkorean=12801,A.nieunsioskorean=12647,A.nieuntikeutkorean=12646,A.nihiragana=12395,A.nikatakana=12491,A.nikatakanahalfwidth=65414,A.nikhahitleftthai=63641,A.nikhahitthai=3661,A.nine=57,A.ninearabic=1641,A.ninebengali=2543,A.ninecircle=9320,A.ninecircleinversesansserif=10130,A.ninedeva=2415,A.ninegujarati=2799,A.ninegurmukhi=2671,A.ninehackarabic=1641,A.ninehangzhou=12329,A.nineideographicparen=12840,A.nineinferior=8329,A.ninemonospace=65305,A.nineoldstyle=63289,A.nineparen=9340,A.nineperiod=9360,A.ninepersian=1785,A.nineroman=8568,A.ninesuperior=8313,A.nineteencircle=9330,A.nineteenparen=9350,A.nineteenperiod=9370,A.ninethai=3673,A.nj=460,A.njecyrillic=1114,A.nkatakana=12531,A.nkatakanahalfwidth=65437,A.nlegrightlong=414,A.nlinebelow=7753,A.nmonospace=65358,A.nmsquare=13210,A.nnabengali=2467,A.nnadeva=2339,A.nnagujarati=2723,A.nnagurmukhi=2595,A.nnnadeva=2345,A.nohiragana=12398,A.nokatakana=12494,A.nokatakanahalfwidth=65417,A.nonbreakingspace=160,A.nonenthai=3603,A.nonuthai=3609,A.noonarabic=1606,A.noonfinalarabic=65254,A.noonghunnaarabic=1722,A.noonghunnafinalarabic=64415,A.nooninitialarabic=65255,A.noonjeeminitialarabic=64722,A.noonjeemisolatedarabic=64587,A.noonmedialarabic=65256,A.noonmeeminitialarabic=64725,A.noonmeemisolatedarabic=64590,A.noonnoonfinalarabic=64653,A.notcontains=8716,A.notelement=8713,A.notelementof=8713,A.notequal=8800,A.notgreater=8815,A.notgreaternorequal=8817,A.notgreaternorless=8825,A.notidentical=8802,A.notless=8814,A.notlessnorequal=8816,A.notparallel=8742,A.notprecedes=8832,A.notsubset=8836,A.notsucceeds=8833,A.notsuperset=8837,A.nowarmenian=1398,A.nparen=9385,A.nssquare=13233,A.nsuperior=8319,A.ntilde=241,A.nu=957,A.nuhiragana=12396,A.nukatakana=12492,A.nukatakanahalfwidth=65415,A.nuktabengali=2492,A.nuktadeva=2364,A.nuktagujarati=2748,A.nuktagurmukhi=2620,A.numbersign=35,A.numbersignmonospace=65283,A.numbersignsmall=65119,A.numeralsigngreek=884,A.numeralsignlowergreek=885,A.numero=8470,A.nun=1504,A.nundagesh=64320,A.nundageshhebrew=64320,A.nunhebrew=1504,A.nvsquare=13237,A.nwsquare=13243,A.nyabengali=2462,A.nyadeva=2334,A.nyagujarati=2718,A.nyagurmukhi=2590,A.o=111,A.oacute=243,A.oangthai=3629,A.obarred=629,A.obarredcyrillic=1257,A.obarreddieresiscyrillic=1259,A.obengali=2451,A.obopomofo=12571,A.obreve=335,A.ocandradeva=2321,A.ocandragujarati=2705,A.ocandravowelsigndeva=2377,A.ocandravowelsigngujarati=2761,A.ocaron=466,A.ocircle=9438,A.ocircumflex=244,A.ocircumflexacute=7889,A.ocircumflexdotbelow=7897,A.ocircumflexgrave=7891,A.ocircumflexhookabove=7893,A.ocircumflextilde=7895,A.ocyrillic=1086,A.odblacute=337,A.odblgrave=525,A.odeva=2323,A.odieresis=246,A.odieresiscyrillic=1255,A.odotbelow=7885,A.oe=339,A.oekorean=12634,A.ogonek=731,A.ogonekcmb=808,A.ograve=242,A.ogujarati=2707,A.oharmenian=1413,A.ohiragana=12362,A.ohookabove=7887,A.ohorn=417,A.ohornacute=7899,A.ohorndotbelow=7907,A.ohorngrave=7901,A.ohornhookabove=7903,A.ohorntilde=7905,A.ohungarumlaut=337,A.oi=419,A.oinvertedbreve=527,A.okatakana=12458,A.okatakanahalfwidth=65397,A.okorean=12631,A.olehebrew=1451,A.omacron=333,A.omacronacute=7763,A.omacrongrave=7761,A.omdeva=2384,A.omega=969,A.omega1=982,A.omegacyrillic=1121,A.omegalatinclosed=631,A.omegaroundcyrillic=1147,A.omegatitlocyrillic=1149,A.omegatonos=974,A.omgujarati=2768,A.omicron=959,A.omicrontonos=972,A.omonospace=65359,A.one=49,A.onearabic=1633,A.onebengali=2535,A.onecircle=9312,A.onecircleinversesansserif=10122,A.onedeva=2407,A.onedotenleader=8228,A.oneeighth=8539,A.onefitted=63196,A.onegujarati=2791,A.onegurmukhi=2663,A.onehackarabic=1633,A.onehalf=189,A.onehangzhou=12321,A.oneideographicparen=12832,A.oneinferior=8321,A.onemonospace=65297,A.onenumeratorbengali=2548,A.oneoldstyle=63281,A.oneparen=9332,A.oneperiod=9352,A.onepersian=1777,A.onequarter=188,A.oneroman=8560,A.onesuperior=185,A.onethai=3665,A.onethird=8531,A.oogonek=491,A.oogonekmacron=493,A.oogurmukhi=2579,A.oomatragurmukhi=2635,A.oopen=596,A.oparen=9386,A.openbullet=9702,A.option=8997,A.ordfeminine=170,A.ordmasculine=186,A.orthogonal=8735,A.oshortdeva=2322,A.oshortvowelsigndeva=2378,A.oslash=248,A.oslashacute=511,A.osmallhiragana=12361,A.osmallkatakana=12457,A.osmallkatakanahalfwidth=65387,A.ostrokeacute=511,A.osuperior=63216,A.otcyrillic=1151,A.otilde=245,A.otildeacute=7757,A.otildedieresis=7759,A.oubopomofo=12577,A.overline=8254,A.overlinecenterline=65098,A.overlinecmb=773,A.overlinedashed=65097,A.overlinedblwavy=65100,A.overlinewavy=65099,A.overscore=175,A.ovowelsignbengali=2507,A.ovowelsigndeva=2379,A.ovowelsigngujarati=2763,A.p=112,A.paampssquare=13184,A.paasentosquare=13099,A.pabengali=2474,A.pacute=7765,A.padeva=2346,A.pagedown=8671,A.pageup=8670,A.pagujarati=2730,A.pagurmukhi=2602,A.pahiragana=12401,A.paiyannoithai=3631,A.pakatakana=12497,A.palatalizationcyrilliccmb=1156,A.palochkacyrillic=1216,A.pansioskorean=12671,A.paragraph=182,A.parallel=8741,A.parenleft=40,A.parenleftaltonearabic=64830,A.parenleftbt=63725,A.parenleftex=63724,A.parenleftinferior=8333,A.parenleftmonospace=65288,A.parenleftsmall=65113,A.parenleftsuperior=8317,A.parenlefttp=63723,A.parenleftvertical=65077,A.parenright=41,A.parenrightaltonearabic=64831,A.parenrightbt=63736,A.parenrightex=63735,A.parenrightinferior=8334,A.parenrightmonospace=65289,A.parenrightsmall=65114,A.parenrightsuperior=8318,A.parenrighttp=63734,A.parenrightvertical=65078,A.partialdiff=8706,A.paseqhebrew=1472,A.pashtahebrew=1433,A.pasquare=13225,A.patah=1463,A.patah11=1463,A.patah1d=1463,A.patah2a=1463,A.patahhebrew=1463,A.patahnarrowhebrew=1463,A.patahquarterhebrew=1463,A.patahwidehebrew=1463,A.pazerhebrew=1441,A.pbopomofo=12550,A.pcircle=9439,A.pdotaccent=7767,A.pe=1508,A.pecyrillic=1087,A.pedagesh=64324,A.pedageshhebrew=64324,A.peezisquare=13115,A.pefinaldageshhebrew=64323,A.peharabic=1662,A.peharmenian=1402,A.pehebrew=1508,A.pehfinalarabic=64343,A.pehinitialarabic=64344,A.pehiragana=12410,A.pehmedialarabic=64345,A.pekatakana=12506,A.pemiddlehookcyrillic=1191,A.perafehebrew=64334,A.percent=37,A.percentarabic=1642,A.percentmonospace=65285,A.percentsmall=65130,A.period=46,A.periodarmenian=1417,A.periodcentered=183,A.periodhalfwidth=65377,A.periodinferior=63207,A.periodmonospace=65294,A.periodsmall=65106,A.periodsuperior=63208,A.perispomenigreekcmb=834,A.perpendicular=8869,A.perthousand=8240,A.peseta=8359,A.pfsquare=13194,A.phabengali=2475,A.phadeva=2347,A.phagujarati=2731,A.phagurmukhi=2603,A.phi=966,A.phi1=981,A.phieuphacirclekorean=12922,A.phieuphaparenkorean=12826,A.phieuphcirclekorean=12908,A.phieuphkorean=12621,A.phieuphparenkorean=12812,A.philatin=632,A.phinthuthai=3642,A.phisymbolgreek=981,A.phook=421,A.phophanthai=3614,A.phophungthai=3612,A.phosamphaothai=3616,A.pi=960,A.pieupacirclekorean=12915,A.pieupaparenkorean=12819,A.pieupcieuckorean=12662,A.pieupcirclekorean=12901,A.pieupkiyeokkorean=12658,A.pieupkorean=12610,A.pieupparenkorean=12805,A.pieupsioskiyeokkorean=12660,A.pieupsioskorean=12612,A.pieupsiostikeutkorean=12661,A.pieupthieuthkorean=12663,A.pieuptikeutkorean=12659,A.pihiragana=12404,A.pikatakana=12500,A.pisymbolgreek=982,A.piwrarmenian=1411,A.planckover2pi=8463,A.planckover2pi1=8463,A.plus=43,A.plusbelowcmb=799,A.pluscircle=8853,A.plusminus=177,A.plusmod=726,A.plusmonospace=65291,A.plussmall=65122,A.plussuperior=8314,A.pmonospace=65360,A.pmsquare=13272,A.pohiragana=12413,A.pointingindexdownwhite=9759,A.pointingindexleftwhite=9756,A.pointingindexrightwhite=9758,A.pointingindexupwhite=9757,A.pokatakana=12509,A.poplathai=3611,A.postalmark=12306,A.postalmarkface=12320,A.pparen=9387,A.precedes=8826,A.prescription=8478,A.primemod=697,A.primereversed=8245,A.product=8719,A.projective=8965,A.prolongedkana=12540,A.propellor=8984,A.propersubset=8834,A.propersuperset=8835,A.proportion=8759,A.proportional=8733,A.psi=968,A.psicyrillic=1137,A.psilipneumatacyrilliccmb=1158,A.pssquare=13232,A.puhiragana=12407,A.pukatakana=12503,A.pvsquare=13236,A.pwsquare=13242,A.q=113,A.qadeva=2392,A.qadmahebrew=1448,A.qafarabic=1602,A.qaffinalarabic=65238,A.qafinitialarabic=65239,A.qafmedialarabic=65240,A.qamats=1464,A.qamats10=1464,A.qamats1a=1464,A.qamats1c=1464,A.qamats27=1464,A.qamats29=1464,A.qamats33=1464,A.qamatsde=1464,A.qamatshebrew=1464,A.qamatsnarrowhebrew=1464,A.qamatsqatanhebrew=1464,A.qamatsqatannarrowhebrew=1464,A.qamatsqatanquarterhebrew=1464,A.qamatsqatanwidehebrew=1464,A.qamatsquarterhebrew=1464,A.qamatswidehebrew=1464,A.qarneyparahebrew=1439,A.qbopomofo=12561,A.qcircle=9440,A.qhook=672,A.qmonospace=65361,A.qof=1511,A.qofdagesh=64327,A.qofdageshhebrew=64327,A.qofhebrew=1511,A.qparen=9388,A.quarternote=9833,A.qubuts=1467,A.qubuts18=1467,A.qubuts25=1467,A.qubuts31=1467,A.qubutshebrew=1467,A.qubutsnarrowhebrew=1467,A.qubutsquarterhebrew=1467,A.qubutswidehebrew=1467,A.question=63,A.questionarabic=1567,A.questionarmenian=1374,A.questiondown=191,A.questiondownsmall=63423,A.questiongreek=894,A.questionmonospace=65311,A.questionsmall=63295,A.quotedbl=34,A.quotedblbase=8222,A.quotedblleft=8220,A.quotedblmonospace=65282,A.quotedblprime=12318,A.quotedblprimereversed=12317,A.quotedblright=8221,A.quoteleft=8216,A.quoteleftreversed=8219,A.quotereversed=8219,A.quoteright=8217,A.quoterightn=329,A.quotesinglbase=8218,A.quotesingle=39,A.quotesinglemonospace=65287,A.r=114,A.raarmenian=1404,A.rabengali=2480,A.racute=341,A.radeva=2352,A.radical=8730,A.radicalex=63717,A.radoverssquare=13230,A.radoverssquaredsquare=13231,A.radsquare=13229,A.rafe=1471,A.rafehebrew=1471,A.ragujarati=2736,A.ragurmukhi=2608,A.rahiragana=12425,A.rakatakana=12521,A.rakatakanahalfwidth=65431,A.ralowerdiagonalbengali=2545,A.ramiddlediagonalbengali=2544,A.ramshorn=612,A.ratio=8758,A.rbopomofo=12566,A.rcaron=345,A.rcedilla=343,A.rcircle=9441,A.rcommaaccent=343,A.rdblgrave=529,A.rdotaccent=7769,A.rdotbelow=7771,A.rdotbelowmacron=7773,A.referencemark=8251,A.reflexsubset=8838,A.reflexsuperset=8839,A.registered=174,A.registersans=63720,A.registerserif=63194,A.reharabic=1585,A.reharmenian=1408,A.rehfinalarabic=65198,A.rehiragana=12428,A.rekatakana=12524;A.rekatakanahalfwidth=65434,A.resh=1512,A.reshdageshhebrew=64328,A.reshhebrew=1512,A.reversedtilde=8765,A.reviahebrew=1431,A.reviamugrashhebrew=1431,A.revlogicalnot=8976,A.rfishhook=638,A.rfishhookreversed=639,A.rhabengali=2525,A.rhadeva=2397,A.rho=961,A.rhook=637,A.rhookturned=635,A.rhookturnedsuperior=693,A.rhosymbolgreek=1009,A.rhotichookmod=734,A.rieulacirclekorean=12913,A.rieulaparenkorean=12817,A.rieulcirclekorean=12899,A.rieulhieuhkorean=12608,A.rieulkiyeokkorean=12602,A.rieulkiyeoksioskorean=12649,A.rieulkorean=12601,A.rieulmieumkorean=12603,A.rieulpansioskorean=12652,A.rieulparenkorean=12803,A.rieulphieuphkorean=12607,A.rieulpieupkorean=12604,A.rieulpieupsioskorean=12651,A.rieulsioskorean=12605,A.rieulthieuthkorean=12606,A.rieultikeutkorean=12650,A.rieulyeorinhieuhkorean=12653,A.rightangle=8735,A.righttackbelowcmb=793,A.righttriangle=8895,A.rihiragana=12426,A.rikatakana=12522,A.rikatakanahalfwidth=65432,A.ring=730,A.ringbelowcmb=805,A.ringcmb=778,A.ringhalfleft=703,A.ringhalfleftarmenian=1369,A.ringhalfleftbelowcmb=796,A.ringhalfleftcentered=723,A.ringhalfright=702,A.ringhalfrightbelowcmb=825,A.ringhalfrightcentered=722,A.rinvertedbreve=531,A.rittorusquare=13137,A.rlinebelow=7775,A.rlongleg=636,A.rlonglegturned=634,A.rmonospace=65362,A.rohiragana=12429,A.rokatakana=12525,A.rokatakanahalfwidth=65435,A.roruathai=3619,A.rparen=9389,A.rrabengali=2524,A.rradeva=2353,A.rragurmukhi=2652,A.rreharabic=1681,A.rrehfinalarabic=64397,A.rrvocalicbengali=2528,A.rrvocalicdeva=2400,A.rrvocalicgujarati=2784,A.rrvocalicvowelsignbengali=2500,A.rrvocalicvowelsigndeva=2372,A.rrvocalicvowelsigngujarati=2756,A.rsuperior=63217,A.rtblock=9616,A.rturned=633,A.rturnedsuperior=692,A.ruhiragana=12427,A.rukatakana=12523,A.rukatakanahalfwidth=65433,A.rupeemarkbengali=2546,A.rupeesignbengali=2547,A.rupiah=63197,A.ruthai=3620,A.rvocalicbengali=2443,A.rvocalicdeva=2315,A.rvocalicgujarati=2699,A.rvocalicvowelsignbengali=2499,A.rvocalicvowelsigndeva=2371,A.rvocalicvowelsigngujarati=2755,A.s=115,A.sabengali=2488,A.sacute=347,A.sacutedotaccent=7781,A.sadarabic=1589,A.sadeva=2360,A.sadfinalarabic=65210,A.sadinitialarabic=65211,A.sadmedialarabic=65212,A.sagujarati=2744,A.sagurmukhi=2616,A.sahiragana=12373,A.sakatakana=12469,A.sakatakanahalfwidth=65403,A.sallallahoualayhewasallamarabic=65018,A.samekh=1505,A.samekhdagesh=64321,A.samekhdageshhebrew=64321,A.samekhhebrew=1505,A.saraaathai=3634,A.saraaethai=3649,A.saraaimaimalaithai=3652,A.saraaimaimuanthai=3651,A.saraamthai=3635,A.saraathai=3632,A.saraethai=3648,A.saraiileftthai=63622,A.saraiithai=3637,A.saraileftthai=63621,A.saraithai=3636,A.saraothai=3650,A.saraueeleftthai=63624,A.saraueethai=3639,A.saraueleftthai=63623,A.sarauethai=3638,A.sarauthai=3640,A.sarauuthai=3641,A.sbopomofo=12569,A.scaron=353,A.scarondotaccent=7783,A.scedilla=351,A.schwa=601,A.schwacyrillic=1241,A.schwadieresiscyrillic=1243,A.schwahook=602,A.scircle=9442,A.scircumflex=349,A.scommaaccent=537,A.sdotaccent=7777,A.sdotbelow=7779,A.sdotbelowdotaccent=7785,A.seagullbelowcmb=828,A.second=8243,A.secondtonechinese=714,A.section=167,A.seenarabic=1587,A.seenfinalarabic=65202,A.seeninitialarabic=65203,A.seenmedialarabic=65204,A.segol=1462,A.segol13=1462,A.segol1f=1462,A.segol2c=1462,A.segolhebrew=1462,A.segolnarrowhebrew=1462,A.segolquarterhebrew=1462,A.segoltahebrew=1426,A.segolwidehebrew=1462,A.seharmenian=1405,A.sehiragana=12379,A.sekatakana=12475,A.sekatakanahalfwidth=65406,A.semicolon=59,A.semicolonarabic=1563,A.semicolonmonospace=65307,A.semicolonsmall=65108,A.semivoicedmarkkana=12444,A.semivoicedmarkkanahalfwidth=65439,A.sentisquare=13090,A.sentosquare=13091,A.seven=55,A.sevenarabic=1639,A.sevenbengali=2541,A.sevencircle=9318,A.sevencircleinversesansserif=10128,A.sevendeva=2413,A.seveneighths=8542,A.sevengujarati=2797,A.sevengurmukhi=2669,A.sevenhackarabic=1639,A.sevenhangzhou=12327,A.sevenideographicparen=12838,A.seveninferior=8327,A.sevenmonospace=65303,A.sevenoldstyle=63287,A.sevenparen=9338,A.sevenperiod=9358,A.sevenpersian=1783,A.sevenroman=8566,A.sevensuperior=8311,A.seventeencircle=9328,A.seventeenparen=9348,A.seventeenperiod=9368,A.seventhai=3671,A.sfthyphen=173,A.shaarmenian=1399,A.shabengali=2486,A.shacyrillic=1096,A.shaddaarabic=1617,A.shaddadammaarabic=64609,A.shaddadammatanarabic=64606,A.shaddafathaarabic=64608,A.shaddakasraarabic=64610,A.shaddakasratanarabic=64607,A.shade=9618,A.shadedark=9619,A.shadelight=9617,A.shademedium=9618,A.shadeva=2358,A.shagujarati=2742,A.shagurmukhi=2614,A.shalshelethebrew=1427,A.shbopomofo=12565,A.shchacyrillic=1097,A.sheenarabic=1588,A.sheenfinalarabic=65206,A.sheeninitialarabic=65207,A.sheenmedialarabic=65208,A.sheicoptic=995,A.sheqel=8362,A.sheqelhebrew=8362,A.sheva=1456,A.sheva115=1456,A.sheva15=1456,A.sheva22=1456,A.sheva2e=1456,A.shevahebrew=1456,A.shevanarrowhebrew=1456,A.shevaquarterhebrew=1456,A.shevawidehebrew=1456,A.shhacyrillic=1211,A.shimacoptic=1005,A.shin=1513,A.shindagesh=64329,A.shindageshhebrew=64329,A.shindageshshindot=64300,A.shindageshshindothebrew=64300,A.shindageshsindot=64301,A.shindageshsindothebrew=64301,A.shindothebrew=1473,A.shinhebrew=1513,A.shinshindot=64298,A.shinshindothebrew=64298,A.shinsindot=64299,A.shinsindothebrew=64299,A.shook=642,A.sigma=963,A.sigma1=962,A.sigmafinal=962,A.sigmalunatesymbolgreek=1010,A.sihiragana=12375,A.sikatakana=12471,A.sikatakanahalfwidth=65404,A.siluqhebrew=1469,A.siluqlefthebrew=1469,A.similar=8764,A.sindothebrew=1474,A.siosacirclekorean=12916,A.siosaparenkorean=12820,A.sioscieuckorean=12670,A.sioscirclekorean=12902,A.sioskiyeokkorean=12666,A.sioskorean=12613,A.siosnieunkorean=12667,A.siosparenkorean=12806,A.siospieupkorean=12669,A.siostikeutkorean=12668,A.six=54,A.sixarabic=1638,A.sixbengali=2540,A.sixcircle=9317,A.sixcircleinversesansserif=10127,A.sixdeva=2412,A.sixgujarati=2796,A.sixgurmukhi=2668,A.sixhackarabic=1638,A.sixhangzhou=12326,A.sixideographicparen=12837,A.sixinferior=8326,A.sixmonospace=65302,A.sixoldstyle=63286,A.sixparen=9337,A.sixperiod=9357,A.sixpersian=1782,A.sixroman=8565,A.sixsuperior=8310,A.sixteencircle=9327,A.sixteencurrencydenominatorbengali=2553,A.sixteenparen=9347,A.sixteenperiod=9367,A.sixthai=3670,A.slash=47,A.slashmonospace=65295,A.slong=383,A.slongdotaccent=7835,A.smileface=9786,A.smonospace=65363,A.sofpasuqhebrew=1475,A.softhyphen=173,A.softsigncyrillic=1100,A.sohiragana=12381,A.sokatakana=12477,A.sokatakanahalfwidth=65407,A.soliduslongoverlaycmb=824,A.solidusshortoverlaycmb=823,A.sorusithai=3625,A.sosalathai=3624,A.sosothai=3595,A.sosuathai=3626,A.space=32,A.spacehackarabic=32,A.spade=9824,A.spadesuitblack=9824,A.spadesuitwhite=9828,A.sparen=9390,A.squarebelowcmb=827,A.squarecc=13252,A.squarecm=13213,A.squarediagonalcrosshatchfill=9641,A.squarehorizontalfill=9636,A.squarekg=13199,A.squarekm=13214,A.squarekmcapital=13262,A.squareln=13265,A.squarelog=13266,A.squaremg=13198,A.squaremil=13269,A.squaremm=13212,A.squaremsquared=13217,A.squareorthogonalcrosshatchfill=9638,A.squareupperlefttolowerrightfill=9639,A.squareupperrighttolowerleftfill=9640,A.squareverticalfill=9637,A.squarewhitewithsmallblack=9635,A.srsquare=13275,A.ssabengali=2487,A.ssadeva=2359,A.ssagujarati=2743,A.ssangcieuckorean=12617,A.ssanghieuhkorean=12677,A.ssangieungkorean=12672,A.ssangkiyeokkorean=12594,A.ssangnieunkorean=12645,A.ssangpieupkorean=12611,A.ssangsioskorean=12614,A.ssangtikeutkorean=12600,A.ssuperior=63218,A.sterling=163,A.sterlingmonospace=65505,A.strokelongoverlaycmb=822,A.strokeshortoverlaycmb=821,A.subset=8834,A.subsetnotequal=8842,A.subsetorequal=8838,A.succeeds=8827,A.suchthat=8715,A.suhiragana=12377,A.sukatakana=12473,A.sukatakanahalfwidth=65405,A.sukunarabic=1618,A.summation=8721,A.sun=9788,A.superset=8835,A.supersetnotequal=8843,A.supersetorequal=8839,A.svsquare=13276,A.syouwaerasquare=13180,A.t=116,A.tabengali=2468,A.tackdown=8868,A.tackleft=8867,A.tadeva=2340,A.tagujarati=2724,A.tagurmukhi=2596,A.taharabic=1591,A.tahfinalarabic=65218,A.tahinitialarabic=65219,A.tahiragana=12383,A.tahmedialarabic=65220,A.taisyouerasquare=13181,A.takatakana=12479,A.takatakanahalfwidth=65408,A.tatweelarabic=1600,A.tau=964,A.tav=1514,A.tavdages=64330,A.tavdagesh=64330,A.tavdageshhebrew=64330,A.tavhebrew=1514,A.tbar=359,A.tbopomofo=12554,A.tcaron=357,A.tccurl=680,A.tcedilla=355,A.tcheharabic=1670,A.tchehfinalarabic=64379,A.tchehinitialarabic=64380,A.tchehmedialarabic=64381,A.tcircle=9443,A.tcircumflexbelow=7793,A.tcommaaccent=355,A.tdieresis=7831,A.tdotaccent=7787,A.tdotbelow=7789,A.tecyrillic=1090,A.tedescendercyrillic=1197,A.teharabic=1578,A.tehfinalarabic=65174,A.tehhahinitialarabic=64674,A.tehhahisolatedarabic=64524,A.tehinitialarabic=65175,A.tehiragana=12390,A.tehjeeminitialarabic=64673,A.tehjeemisolatedarabic=64523,A.tehmarbutaarabic=1577,A.tehmarbutafinalarabic=65172,A.tehmedialarabic=65176,A.tehmeeminitialarabic=64676,A.tehmeemisolatedarabic=64526,A.tehnoonfinalarabic=64627,A.tekatakana=12486,A.tekatakanahalfwidth=65411,A.telephone=8481,A.telephoneblack=9742,A.telishagedolahebrew=1440,A.telishaqetanahebrew=1449,A.tencircle=9321,A.tenideographicparen=12841,A.tenparen=9341,A.tenperiod=9361,A.tenroman=8569,A.tesh=679,A.tet=1496,A.tetdagesh=64312,A.tetdageshhebrew=64312,A.tethebrew=1496,A.tetsecyrillic=1205,A.tevirhebrew=1435,A.tevirlefthebrew=1435,A.thabengali=2469,A.thadeva=2341,A.thagujarati=2725,A.thagurmukhi=2597,A.thalarabic=1584,A.thalfinalarabic=65196,A.thanthakhatlowleftthai=63640,A.thanthakhatlowrightthai=63639,A.thanthakhatthai=3660,A.thanthakhatupperleftthai=63638,A.theharabic=1579,A.thehfinalarabic=65178,A.thehinitialarabic=65179,A.thehmedialarabic=65180,A.thereexists=8707,A.therefore=8756,A.theta=952,A.theta1=977,A.thetasymbolgreek=977,A.thieuthacirclekorean=12921,A.thieuthaparenkorean=12825,A.thieuthcirclekorean=12907,A.thieuthkorean=12620,A.thieuthparenkorean=12811,A.thirteencircle=9324,A.thirteenparen=9344,A.thirteenperiod=9364,A.thonangmonthothai=3601,A.thook=429,A.thophuthaothai=3602,A.thorn=254,A.thothahanthai=3607,A.thothanthai=3600,A.thothongthai=3608,A.thothungthai=3606,A.thousandcyrillic=1154,A.thousandsseparatorarabic=1644,A.thousandsseparatorpersian=1644,A.three=51,A.threearabic=1635,A.threebengali=2537,A.threecircle=9314,A.threecircleinversesansserif=10124,A.threedeva=2409,A.threeeighths=8540,A.threegujarati=2793,A.threegurmukhi=2665,A.threehackarabic=1635,A.threehangzhou=12323,A.threeideographicparen=12834,A.threeinferior=8323,A.threemonospace=65299,A.threenumeratorbengali=2550,A.threeoldstyle=63283,A.threeparen=9334,A.threeperiod=9354,A.threepersian=1779,A.threequarters=190,A.threequartersemdash=63198,A.threeroman=8562,A.threesuperior=179,A.threethai=3667,A.thzsquare=13204,A.tihiragana=12385,A.tikatakana=12481,A.tikatakanahalfwidth=65409,A.tikeutacirclekorean=12912,A.tikeutaparenkorean=12816,A.tikeutcirclekorean=12898,A.tikeutkorean=12599,A.tikeutparenkorean=12802,A.tilde=732,A.tildebelowcmb=816,A.tildecmb=771,A.tildecomb=771,A.tildedoublecmb=864,A.tildeoperator=8764,A.tildeoverlaycmb=820,A.tildeverticalcmb=830,A.timescircle=8855,A.tipehahebrew=1430,A.tipehalefthebrew=1430,A.tippigurmukhi=2672,A.titlocyrilliccmb=1155,A.tiwnarmenian=1407,A.tlinebelow=7791,A.tmonospace=65364,A.toarmenian=1385,A.tohiragana=12392,A.tokatakana=12488,A.tokatakanahalfwidth=65412,A.tonebarextrahighmod=741,A.tonebarextralowmod=745,A.tonebarhighmod=742,A.tonebarlowmod=744,A.tonebarmidmod=743,A.tonefive=445,A.tonesix=389,A.tonetwo=424,A.tonos=900,A.tonsquare=13095,A.topatakthai=3599,A.tortoiseshellbracketleft=12308,A.tortoiseshellbracketleftsmall=65117,A.tortoiseshellbracketleftvertical=65081,A.tortoiseshellbracketright=12309,A.tortoiseshellbracketrightsmall=65118,A.tortoiseshellbracketrightvertical=65082,A.totaothai=3605,A.tpalatalhook=427,A.tparen=9391,A.trademark=8482,A.trademarksans=63722,A.trademarkserif=63195,A.tretroflexhook=648,A.triagdn=9660,A.triaglf=9668,A.triagrt=9658,A.triagup=9650,A.ts=678,A.tsadi=1510,A.tsadidagesh=64326,A.tsadidageshhebrew=64326,A.tsadihebrew=1510,A.tsecyrillic=1094,A.tsere=1461,A.tsere12=1461,A.tsere1e=1461,A.tsere2b=1461,A.tserehebrew=1461,A.tserenarrowhebrew=1461,A.tserequarterhebrew=1461,A.tserewidehebrew=1461,A.tshecyrillic=1115,A.tsuperior=63219,A.ttabengali=2463,A.ttadeva=2335,A.ttagujarati=2719,A.ttagurmukhi=2591,A.tteharabic=1657,A.ttehfinalarabic=64359,A.ttehinitialarabic=64360,A.ttehmedialarabic=64361,A.tthabengali=2464,A.tthadeva=2336,A.tthagujarati=2720,A.tthagurmukhi=2592,A.tturned=647,A.tuhiragana=12388,A.tukatakana=12484,A.tukatakanahalfwidth=65410,A.tusmallhiragana=12387,A.tusmallkatakana=12483,A.tusmallkatakanahalfwidth=65391,A.twelvecircle=9323,A.twelveparen=9343,A.twelveperiod=9363,A.twelveroman=8571,A.twentycircle=9331,A.twentyhangzhou=21316,A.twentyparen=9351,A.twentyperiod=9371,A.two=50,A.twoarabic=1634,A.twobengali=2536,A.twocircle=9313,A.twocircleinversesansserif=10123,A.twodeva=2408,A.twodotenleader=8229,A.twodotleader=8229,A.twodotleadervertical=65072,A.twogujarati=2792,A.twogurmukhi=2664,A.twohackarabic=1634,A.twohangzhou=12322,A.twoideographicparen=12833,A.twoinferior=8322,A.twomonospace=65298,A.twonumeratorbengali=2549,A.twooldstyle=63282,A.twoparen=9333,A.twoperiod=9353,A.twopersian=1778,A.tworoman=8561,A.twostroke=443,A.twosuperior=178,A.twothai=3666,A.twothirds=8532,A.u=117,A.uacute=250,A.ubar=649,A.ubengali=2441,A.ubopomofo=12584,A.ubreve=365,A.ucaron=468,A.ucircle=9444,A.ucircumflex=251,A.ucircumflexbelow=7799,A.ucyrillic=1091,A.udattadeva=2385,A.udblacute=369,A.udblgrave=533,A.udeva=2313,A.udieresis=252,A.udieresisacute=472,A.udieresisbelow=7795,A.udieresiscaron=474,A.udieresiscyrillic=1265,A.udieresisgrave=476,A.udieresismacron=470,A.udotbelow=7909,A.ugrave=249,A.ugujarati=2697,A.ugurmukhi=2569,A.uhiragana=12358,A.uhookabove=7911,A.uhorn=432,A.uhornacute=7913,A.uhorndotbelow=7921,A.uhorngrave=7915,A.uhornhookabove=7917,A.uhorntilde=7919,A.uhungarumlaut=369,A.uhungarumlautcyrillic=1267,A.uinvertedbreve=535,A.ukatakana=12454,A.ukatakanahalfwidth=65395,A.ukcyrillic=1145,A.ukorean=12636,A.umacron=363,A.umacroncyrillic=1263,A.umacrondieresis=7803,A.umatragurmukhi=2625,A.umonospace=65365,A.underscore=95,A.underscoredbl=8215,A.underscoremonospace=65343,A.underscorevertical=65075,A.underscorewavy=65103,A.union=8746,A.universal=8704,A.uogonek=371,A.uparen=9392,A.upblock=9600,A.upperdothebrew=1476,A.upsilon=965,A.upsilondieresis=971,A.upsilondieresistonos=944,A.upsilonlatin=650,A.upsilontonos=973,A.uptackbelowcmb=797,A.uptackmod=724,A.uragurmukhi=2675,A.uring=367,A.ushortcyrillic=1118,A.usmallhiragana=12357,A.usmallkatakana=12453,A.usmallkatakanahalfwidth=65385,A.ustraightcyrillic=1199,A.ustraightstrokecyrillic=1201,A.utilde=361,A.utildeacute=7801,A.utildebelow=7797,A.uubengali=2442,A.uudeva=2314,A.uugujarati=2698,A.uugurmukhi=2570,A.uumatragurmukhi=2626,A.uuvowelsignbengali=2498,A.uuvowelsigndeva=2370,A.uuvowelsigngujarati=2754,A.uvowelsignbengali=2497,A.uvowelsigndeva=2369,A.uvowelsigngujarati=2753,A.v=118,A.vadeva=2357,A.vagujarati=2741,A.vagurmukhi=2613,A.vakatakana=12535,A.vav=1493,A.vavdagesh=64309,A.vavdagesh65=64309,A.vavdageshhebrew=64309,A.vavhebrew=1493,A.vavholam=64331,A.vavholamhebrew=64331,A.vavvavhebrew=1520,A.vavyodhebrew=1521,A.vcircle=9445,A.vdotbelow=7807,A.vecyrillic=1074,A.veharabic=1700,A.vehfinalarabic=64363,A.vehinitialarabic=64364,A.vehmedialarabic=64365,A.vekatakana=12537,A.venus=9792,A.verticalbar=124,A.verticallineabovecmb=781,A.verticallinebelowcmb=809,A.verticallinelowmod=716,A.verticallinemod=712,A.vewarmenian=1406,A.vhook=651,A.vikatakana=12536,A.viramabengali=2509,A.viramadeva=2381,A.viramagujarati=2765,A.visargabengali=2435,A.visargadeva=2307,A.visargagujarati=2691,A.vmonospace=65366,A.voarmenian=1400,A.voicediterationhiragana=12446,A.voicediterationkatakana=12542,A.voicedmarkkana=12443,A.voicedmarkkanahalfwidth=65438,A.vokatakana=12538,A.vparen=9393,A.vtilde=7805,A.vturned=652,A.vuhiragana=12436,A.vukatakana=12532,A.w=119,A.wacute=7811,A.waekorean=12633,A.wahiragana=12431,A.wakatakana=12527,A.wakatakanahalfwidth=65436,A.wakorean=12632,A.wasmallhiragana=12430,A.wasmallkatakana=12526,A.wattosquare=13143,A.wavedash=12316,A.wavyunderscorevertical=65076,A.wawarabic=1608,A.wawfinalarabic=65262,A.wawhamzaabovearabic=1572,A.wawhamzaabovefinalarabic=65158,A.wbsquare=13277,A.wcircle=9446,A.wcircumflex=373,A.wdieresis=7813,A.wdotaccent=7815,A.wdotbelow=7817,A.wehiragana=12433,A.weierstrass=8472,A.wekatakana=12529,A.wekorean=12638,A.weokorean=12637,A.wgrave=7809,A.whitebullet=9702,A.whitecircle=9675,A.whitecircleinverse=9689,A.whitecornerbracketleft=12302,A.whitecornerbracketleftvertical=65091,A.whitecornerbracketright=12303,A.whitecornerbracketrightvertical=65092,A.whitediamond=9671,A.whitediamondcontainingblacksmalldiamond=9672,A.whitedownpointingsmalltriangle=9663;A.whitedownpointingtriangle=9661,A.whiteleftpointingsmalltriangle=9667,A.whiteleftpointingtriangle=9665,A.whitelenticularbracketleft=12310,A.whitelenticularbracketright=12311,A.whiterightpointingsmalltriangle=9657,A.whiterightpointingtriangle=9655,A.whitesmallsquare=9643,A.whitesmilingface=9786,A.whitesquare=9633,A.whitestar=9734,A.whitetelephone=9743,A.whitetortoiseshellbracketleft=12312,A.whitetortoiseshellbracketright=12313,A.whiteuppointingsmalltriangle=9653,A.whiteuppointingtriangle=9651,A.wihiragana=12432,A.wikatakana=12528,A.wikorean=12639,A.wmonospace=65367,A.wohiragana=12434,A.wokatakana=12530,A.wokatakanahalfwidth=65382,A.won=8361,A.wonmonospace=65510,A.wowaenthai=3623,A.wparen=9394,A.wring=7832,A.wsuperior=695,A.wturned=653,A.wynn=447,A.x=120,A.xabovecmb=829,A.xbopomofo=12562,A.xcircle=9447,A.xdieresis=7821,A.xdotaccent=7819,A.xeharmenian=1389,A.xi=958,A.xmonospace=65368,A.xparen=9395,A.xsuperior=739,A.y=121,A.yaadosquare=13134,A.yabengali=2479,A.yacute=253,A.yadeva=2351,A.yaekorean=12626,A.yagujarati=2735,A.yagurmukhi=2607,A.yahiragana=12420,A.yakatakana=12516,A.yakatakanahalfwidth=65428,A.yakorean=12625,A.yamakkanthai=3662,A.yasmallhiragana=12419,A.yasmallkatakana=12515,A.yasmallkatakanahalfwidth=65388,A.yatcyrillic=1123,A.ycircle=9448,A.ycircumflex=375,A.ydieresis=255,A.ydotaccent=7823,A.ydotbelow=7925,A.yeharabic=1610,A.yehbarreearabic=1746,A.yehbarreefinalarabic=64431,A.yehfinalarabic=65266,A.yehhamzaabovearabic=1574,A.yehhamzaabovefinalarabic=65162,A.yehhamzaaboveinitialarabic=65163,A.yehhamzaabovemedialarabic=65164,A.yehinitialarabic=65267,A.yehmedialarabic=65268,A.yehmeeminitialarabic=64733,A.yehmeemisolatedarabic=64600,A.yehnoonfinalarabic=64660,A.yehthreedotsbelowarabic=1745,A.yekorean=12630,A.yen=165,A.yenmonospace=65509,A.yeokorean=12629,A.yeorinhieuhkorean=12678,A.yerahbenyomohebrew=1450,A.yerahbenyomolefthebrew=1450,A.yericyrillic=1099,A.yerudieresiscyrillic=1273,A.yesieungkorean=12673,A.yesieungpansioskorean=12675,A.yesieungsioskorean=12674,A.yetivhebrew=1434,A.ygrave=7923,A.yhook=436,A.yhookabove=7927,A.yiarmenian=1397,A.yicyrillic=1111,A.yikorean=12642,A.yinyang=9775,A.yiwnarmenian=1410,A.ymonospace=65369,A.yod=1497,A.yoddagesh=64313,A.yoddageshhebrew=64313,A.yodhebrew=1497,A.yodyodhebrew=1522,A.yodyodpatahhebrew=64287,A.yohiragana=12424,A.yoikorean=12681,A.yokatakana=12520,A.yokatakanahalfwidth=65430,A.yokorean=12635,A.yosmallhiragana=12423,A.yosmallkatakana=12519,A.yosmallkatakanahalfwidth=65390,A.yotgreek=1011,A.yoyaekorean=12680,A.yoyakorean=12679,A.yoyakthai=3618,A.yoyingthai=3597,A.yparen=9396,A.ypogegrammeni=890,A.ypogegrammenigreekcmb=837,A.yr=422,A.yring=7833,A.ysuperior=696,A.ytilde=7929,A.yturned=654,A.yuhiragana=12422,A.yuikorean=12684,A.yukatakana=12518,A.yukatakanahalfwidth=65429,A.yukorean=12640,A.yusbigcyrillic=1131,A.yusbigiotifiedcyrillic=1133,A.yuslittlecyrillic=1127,A.yuslittleiotifiedcyrillic=1129,A.yusmallhiragana=12421,A.yusmallkatakana=12517,A.yusmallkatakanahalfwidth=65389,A.yuyekorean=12683,A.yuyeokorean=12682,A.yyabengali=2527,A.yyadeva=2399,A.z=122,A.zaarmenian=1382,A.zacute=378,A.zadeva=2395,A.zagurmukhi=2651,A.zaharabic=1592,A.zahfinalarabic=65222,A.zahinitialarabic=65223,A.zahiragana=12374,A.zahmedialarabic=65224,A.zainarabic=1586,A.zainfinalarabic=65200,A.zakatakana=12470,A.zaqefgadolhebrew=1429,A.zaqefqatanhebrew=1428,A.zarqahebrew=1432,A.zayin=1494,A.zayindagesh=64310,A.zayindageshhebrew=64310,A.zayinhebrew=1494,A.zbopomofo=12567,A.zcaron=382,A.zcircle=9449,A.zcircumflex=7825,A.zcurl=657,A.zdot=380,A.zdotaccent=380,A.zdotbelow=7827,A.zecyrillic=1079,A.zedescendercyrillic=1177,A.zedieresiscyrillic=1247,A.zehiragana=12380,A.zekatakana=12476,A.zero=48,A.zeroarabic=1632,A.zerobengali=2534,A.zerodeva=2406,A.zerogujarati=2790,A.zerogurmukhi=2662,A.zerohackarabic=1632,A.zeroinferior=8320,A.zeromonospace=65296,A.zerooldstyle=63280,A.zeropersian=1776,A.zerosuperior=8304,A.zerothai=3664,A.zerowidthjoiner=65279,A.zerowidthnonjoiner=8204,A.zerowidthspace=8203,A.zeta=950,A.zhbopomofo=12563,A.zhearmenian=1386,A.zhebrevecyrillic=1218,A.zhecyrillic=1078,A.zhedescendercyrillic=1175,A.zhedieresiscyrillic=1245,A.zihiragana=12376,A.zikatakana=12472,A.zinorhebrew=1454,A.zlinebelow=7829,A.zmonospace=65370,A.zohiragana=12382,A.zokatakana=12478,A.zparen=9397,A.zretroflexhook=656,A.zstroke=438,A.zuhiragana=12378,A.zukatakana=12474,A[".notdef"]=0,A.angbracketleftbig=9001,A.angbracketleftBig=9001,A.angbracketleftbigg=9001,A.angbracketleftBigg=9001,A.angbracketrightBig=9002,A.angbracketrightbig=9002,A.angbracketrightBigg=9002,A.angbracketrightbigg=9002,A.arrowhookleft=8618,A.arrowhookright=8617,A.arrowlefttophalf=8636,A.arrowleftbothalf=8637,A.arrownortheast=8599,A.arrownorthwest=8598,A.arrowrighttophalf=8640,A.arrowrightbothalf=8641,A.arrowsoutheast=8600,A.arrowsouthwest=8601,A.backslashbig=8726,A.backslashBig=8726,A.backslashBigg=8726,A.backslashbigg=8726,A.bardbl=8214,A.bracehtipdownleft=65079,A.bracehtipdownright=65079,A.bracehtipupleft=65080,A.bracehtipupright=65080,A.braceleftBig=123,A.braceleftbig=123,A.braceleftbigg=123,A.braceleftBigg=123,A.bracerightBig=125,A.bracerightbig=125,A.bracerightbigg=125,A.bracerightBigg=125,A.bracketleftbig=91,A.bracketleftBig=91,A.bracketleftbigg=91,A.bracketleftBigg=91,A.bracketrightBig=93,A.bracketrightbig=93,A.bracketrightbigg=93,A.bracketrightBigg=93,A.ceilingleftbig=8968,A.ceilingleftBig=8968,A.ceilingleftBigg=8968,A.ceilingleftbigg=8968,A.ceilingrightbig=8969,A.ceilingrightBig=8969,A.ceilingrightbigg=8969,A.ceilingrightBigg=8969,A.circledotdisplay=8857,A.circledottext=8857,A.circlemultiplydisplay=8855,A.circlemultiplytext=8855,A.circleplusdisplay=8853,A.circleplustext=8853,A.contintegraldisplay=8750,A.contintegraltext=8750,A.coproductdisplay=8720,A.coproducttext=8720,A.floorleftBig=8970,A.floorleftbig=8970,A.floorleftbigg=8970,A.floorleftBigg=8970,A.floorrightbig=8971,A.floorrightBig=8971,A.floorrightBigg=8971,A.floorrightbigg=8971,A.hatwide=770,A.hatwider=770,A.hatwidest=770,A.intercal=7488,A.integraldisplay=8747,A.integraltext=8747,A.intersectiondisplay=8898,A.intersectiontext=8898,A.logicalanddisplay=8743,A.logicalandtext=8743,A.logicalordisplay=8744,A.logicalortext=8744,A.parenleftBig=40,A.parenleftbig=40,A.parenleftBigg=40,A.parenleftbigg=40,A.parenrightBig=41,A.parenrightbig=41,A.parenrightBigg=41,A.parenrightbigg=41,A.prime=8242,A.productdisplay=8719,A.producttext=8719,A.radicalbig=8730,A.radicalBig=8730,A.radicalBigg=8730,A.radicalbigg=8730,A.radicalbt=8730,A.radicaltp=8730,A.radicalvertex=8730,A.slashbig=47,A.slashBig=47,A.slashBigg=47,A.slashbigg=47,A.summationdisplay=8721,A.summationtext=8721,A.tildewide=732,A.tildewider=732,A.tildewidest=732,A.uniondisplay=8899,A.unionmultidisplay=8846,A.unionmultitext=8846,A.unionsqdisplay=8852,A.unionsqtext=8852,A.uniontext=8899,A.vextenddouble=8741,A.vextendsingle=8739}),Wn=ri(function(A){A.space=32,A.a1=9985,A.a2=9986,A.a202=9987,A.a3=9988,A.a4=9742,A.a5=9990,A.a119=9991,A.a118=9992,A.a117=9993,A.a11=9755,A.a12=9758,A.a13=9996,A.a14=9997,A.a15=9998,A.a16=9999,A.a105=1e4,A.a17=10001,A.a18=10002,A.a19=10003,A.a20=10004,A.a21=10005,A.a22=10006,A.a23=10007,A.a24=10008,A.a25=10009,A.a26=10010,A.a27=10011,A.a28=10012,A.a6=10013,A.a7=10014,A.a8=10015,A.a9=10016,A.a10=10017,A.a29=10018,A.a30=10019,A.a31=10020,A.a32=10021,A.a33=10022,A.a34=10023,A.a35=9733,A.a36=10025,A.a37=10026,A.a38=10027,A.a39=10028,A.a40=10029,A.a41=10030,A.a42=10031,A.a43=10032,A.a44=10033,A.a45=10034,A.a46=10035,A.a47=10036,A.a48=10037,A.a49=10038,A.a50=10039,A.a51=10040,A.a52=10041,A.a53=10042,A.a54=10043,A.a55=10044,A.a56=10045,A.a57=10046,A.a58=10047,A.a59=10048,A.a60=10049,A.a61=10050,A.a62=10051,A.a63=10052,A.a64=10053,A.a65=10054,A.a66=10055,A.a67=10056,A.a68=10057,A.a69=10058,A.a70=10059,A.a71=9679,A.a72=10061,A.a73=9632,A.a74=10063,A.a203=10064,A.a75=10065,A.a204=10066,A.a76=9650,A.a77=9660,A.a78=9670,A.a79=10070,A.a81=9687,A.a82=10072,A.a83=10073,A.a84=10074,A.a97=10075,A.a98=10076,A.a99=10077,A.a100=10078,A.a101=10081,A.a102=10082,A.a103=10083,A.a104=10084,A.a106=10085,A.a107=10086,A.a108=10087,A.a112=9827,A.a111=9830,A.a110=9829,A.a109=9824,A.a120=9312,A.a121=9313,A.a122=9314,A.a123=9315,A.a124=9316,A.a125=9317,A.a126=9318,A.a127=9319,A.a128=9320,A.a129=9321,A.a130=10102,A.a131=10103,A.a132=10104,A.a133=10105,A.a134=10106,A.a135=10107,A.a136=10108,A.a137=10109,A.a138=10110,A.a139=10111,A.a140=10112,A.a141=10113,A.a142=10114,A.a143=10115,A.a144=10116,A.a145=10117,A.a146=10118,A.a147=10119,A.a148=10120,A.a149=10121,A.a150=10122,A.a151=10123,A.a152=10124,A.a153=10125,A.a154=10126,A.a155=10127,A.a156=10128,A.a157=10129,A.a158=10130,A.a159=10131,A.a160=10132,A.a161=8594,A.a163=8596,A.a164=8597,A.a196=10136,A.a165=10137,A.a192=10138,A.a166=10139,A.a167=10140,A.a168=10141,A.a169=10142,A.a170=10143,A.a171=10144,A.a172=10145,A.a173=10146,A.a162=10147,A.a174=10148,A.a175=10149,A.a176=10150,A.a177=10151,A.a178=10152,A.a179=10153,A.a193=10154,A.a180=10155,A.a199=10156,A.a181=10157,A.a200=10158,A.a182=10159,A.a201=10161,A.a183=10162,A.a184=10163,A.a197=10164,A.a185=10165,A.a194=10166,A.a198=10167,A.a186=10168,A.a195=10169,A.a187=10170,A.a188=10171,A.a189=10172,A.a190=10173,A.a191=10174,A.a89=10088,A.a90=10089,A.a93=10090,A.a94=10091,A.a91=10092,A.a92=10093,A.a205=10094,A.a85=10095,A.a206=10096,A.a86=10097,A.a87=10098,A.a88=10099,A.a95=10100,A.a96=10101,A[".notdef"]=0}),Zn=ri(function(A){A[63721]=169,A[63193]=169,A[63720]=174,A[63194]=174,A[63722]=8482,A[63195]=8482,A[63729]=9127,A[63730]=9128,A[63731]=9129,A[63740]=9131,A[63741]=9132,A[63742]=9133,A[63726]=9121,A[63727]=9122,A[63728]=9123,A[63737]=9124,A[63738]=9125,A[63739]=9126,A[63723]=9115,A[63724]=9116,A[63725]=9117,A[63734]=9118,A[63735]=9119,A[63736]=9120});function On(A,e){let t=e[A];if(void 0!==t)return t;if(!A)return-1;if("u"===A[0]){const e=A.length;let i;if(7===e&&"n"===A[1]&&"i"===A[2])i=A.substring(3);else{if(!(e>=5&&e<=7))return-1;i=A.substring(1)}if(i===i.toUpperCase()&&(t=parseInt(i,16),t>=0))return t}return-1}const Xn=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function Vn(A,e=-1){if(-1!==e){const t=Xn[e];for(let i=0,a=t.length;i<a;i+=2)if(A>=t[i]&&A<=t[i+1])return e}for(let e=0,t=Xn.length;e<t;e++){const t=Xn[e];for(let i=0,a=t.length;i<a;i+=2)if(A>=t[i]&&A<=t[i+1])return e}return-1}const jn=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),zn=new Map;const _n=!0,$n=1,Ag=2,eg=4,tg=32,ig=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function ag(A,e){if(void 0!==e[A])return A;const t=On(A,e);if(-1!==t)for(const A in e)if(e[A]===t)return A;return nt("Unable to recover a standard glyph name for: "+A),A}function sg(A,e,t){const i=Object.create(null);let a,s,n;const g=!!(A.flags&eg);if(A.isInternalFont)for(n=e,s=0;s<n.length;s++)a=t.indexOf(n[s]),i[s]=a>=0?a:0;else if(A.baseEncodingName)for(n=yn(A.baseEncodingName),s=0;s<n.length;s++)a=t.indexOf(n[s]),i[s]=a>=0?a:0;else if(g)for(s in e)i[s]=e[s];else for(n=dn,s=0;s<n.length;s++)a=t.indexOf(n[s]),i[s]=a>=0?a:0;const r=A.differences;let o;if(r)for(s in r){const A=r[s];if(a=t.indexOf(A),-1===a){o||(o=Pn());const e=ag(A,o);e!==A&&(a=t.indexOf(e))}i[s]=a>=0?a:0}return i}function ng(A){return A.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")}const gg=ri(function(A){A["Times-Roman"]="Times-Roman",A.Helvetica="Helvetica",A.Courier="Courier",A.Symbol="Symbol",A["Times-Bold"]="Times-Bold",A["Helvetica-Bold"]="Helvetica-Bold",A["Courier-Bold"]="Courier-Bold",A.ZapfDingbats="ZapfDingbats",A["Times-Italic"]="Times-Italic",A["Helvetica-Oblique"]="Helvetica-Oblique",A["Courier-Oblique"]="Courier-Oblique",A["Times-BoldItalic"]="Times-BoldItalic",A["Helvetica-BoldOblique"]="Helvetica-BoldOblique",A["Courier-BoldOblique"]="Courier-BoldOblique",A.ArialNarrow="Helvetica",A["ArialNarrow-Bold"]="Helvetica-Bold",A["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",A["ArialNarrow-Italic"]="Helvetica-Oblique",A.ArialBlack="Helvetica",A["ArialBlack-Bold"]="Helvetica-Bold",A["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",A["ArialBlack-Italic"]="Helvetica-Oblique",A["Arial-Black"]="Helvetica",A["Arial-Black-Bold"]="Helvetica-Bold",A["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",A["Arial-Black-Italic"]="Helvetica-Oblique",A.Arial="Helvetica",A["Arial-Bold"]="Helvetica-Bold",A["Arial-BoldItalic"]="Helvetica-BoldOblique",A["Arial-Italic"]="Helvetica-Oblique",A.ArialMT="Helvetica",A["Arial-BoldItalicMT"]="Helvetica-BoldOblique",A["Arial-BoldMT"]="Helvetica-Bold",A["Arial-ItalicMT"]="Helvetica-Oblique",A["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",A["Arial-BoldMT-Bold"]="Helvetica-Bold",A["Arial-ItalicMT-Italic"]="Helvetica-Oblique",A.ArialUnicodeMS="Helvetica",A["ArialUnicodeMS-Bold"]="Helvetica-Bold",A["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",A["ArialUnicodeMS-Italic"]="Helvetica-Oblique",A["Courier-BoldItalic"]="Courier-BoldOblique",A["Courier-Italic"]="Courier-Oblique",A.CourierNew="Courier",A["CourierNew-Bold"]="Courier-Bold",A["CourierNew-BoldItalic"]="Courier-BoldOblique",A["CourierNew-Italic"]="Courier-Oblique",A["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",A["CourierNewPS-BoldMT"]="Courier-Bold",A["CourierNewPS-ItalicMT"]="Courier-Oblique",A.CourierNewPSMT="Courier",A["Helvetica-BoldItalic"]="Helvetica-BoldOblique",A["Helvetica-Italic"]="Helvetica-Oblique",A["Symbol-Bold"]="Symbol",A["Symbol-BoldItalic"]="Symbol",A["Symbol-Italic"]="Symbol",A.TimesNewRoman="Times-Roman",A["TimesNewRoman-Bold"]="Times-Bold",A["TimesNewRoman-BoldItalic"]="Times-BoldItalic",A["TimesNewRoman-Italic"]="Times-Italic",A.TimesNewRomanPS="Times-Roman",A["TimesNewRomanPS-Bold"]="Times-Bold",A["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",A["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",A["TimesNewRomanPS-BoldMT"]="Times-Bold",A["TimesNewRomanPS-Italic"]="Times-Italic",A["TimesNewRomanPS-ItalicMT"]="Times-Italic",A.TimesNewRomanPSMT="Times-Roman",A["TimesNewRomanPSMT-Bold"]="Times-Bold",A["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",A["TimesNewRomanPSMT-Italic"]="Times-Italic"}),rg=ri(function(A){A.Courier="FoxitFixed.pfb",A["Courier-Bold"]="FoxitFixedBold.pfb",A["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",A["Courier-Oblique"]="FoxitFixedItalic.pfb",A.Helvetica="LiberationSans-Regular.ttf",A["Helvetica-Bold"]="LiberationSans-Bold.ttf",A["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",A["Helvetica-Oblique"]="LiberationSans-Italic.ttf",A["Times-Roman"]="FoxitSerif.pfb",A["Times-Bold"]="FoxitSerifBold.pfb",A["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",A["Times-Italic"]="FoxitSerifItalic.pfb",A.Symbol="FoxitSymbol.pfb",A.ZapfDingbats="FoxitDingbats.pfb",A["LiberationSans-Regular"]="LiberationSans-Regular.ttf",A["LiberationSans-Bold"]="LiberationSans-Bold.ttf",A["LiberationSans-Italic"]="LiberationSans-Italic.ttf",A["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}),og=ri(function(A){A.Calibri="Helvetica",A["Calibri-Bold"]="Helvetica-Bold",A["Calibri-BoldItalic"]="Helvetica-BoldOblique",A["Calibri-Italic"]="Helvetica-Oblique",A.CenturyGothic="Helvetica",A["CenturyGothic-Bold"]="Helvetica-Bold",A["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",A["CenturyGothic-Italic"]="Helvetica-Oblique",A.ComicSansMS="Comic Sans MS",A["ComicSansMS-Bold"]="Comic Sans MS-Bold",A["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",A["ComicSansMS-Italic"]="Comic Sans MS-Italic",A.Impact="Helvetica",A["ItcSymbol-Bold"]="Helvetica-Bold",A["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",A["ItcSymbol-Book"]="Helvetica",A["ItcSymbol-BookItalic"]="Helvetica-Oblique",A["ItcSymbol-Medium"]="Helvetica",A["ItcSymbol-MediumItalic"]="Helvetica-Oblique",A.LucidaConsole="Courier",A["LucidaConsole-Bold"]="Courier-Bold",A["LucidaConsole-BoldItalic"]="Courier-BoldOblique",A["LucidaConsole-Italic"]="Courier-Oblique",A["LucidaSans-Demi"]="Helvetica-Bold",A["MS-Gothic"]="MS Gothic",A["MS-Gothic-Bold"]="MS Gothic-Bold",A["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",A["MS-Gothic-Italic"]="MS Gothic-Italic",A["MS-Mincho"]="MS Mincho",A["MS-Mincho-Bold"]="MS Mincho-Bold",A["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",A["MS-Mincho-Italic"]="MS Mincho-Italic",A["MS-PGothic"]="MS PGothic",A["MS-PGothic-Bold"]="MS PGothic-Bold",A["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",A["MS-PGothic-Italic"]="MS PGothic-Italic",A["MS-PMincho"]="MS PMincho",A["MS-PMincho-Bold"]="MS PMincho-Bold",A["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",A["MS-PMincho-Italic"]="MS PMincho-Italic",A.NuptialScript="Times-Italic",A.SegoeUISymbol="Helvetica"}),Ig=ri(function(A){A["Adobe Jenson"]=!0,A["Adobe Text"]=!0,A.Albertus=!0,A.Aldus=!0,A.Alexandria=!0,A.Algerian=!0,A["American Typewriter"]=!0,A.Antiqua=!0,A.Apex=!0,A.Arno=!0,A.Aster=!0,A.Aurora=!0,A.Baskerville=!0,A.Bell=!0,A.Bembo=!0,A["Bembo Schoolbook"]=!0,A.Benguiat=!0,A["Berkeley Old Style"]=!0,A["Bernhard Modern"]=!0,A["Berthold City"]=!0,A.Bodoni=!0,A["Bauer Bodoni"]=!0,A["Book Antiqua"]=!0,A.Bookman=!0,A["Bordeaux Roman"]=!0,A["Californian FB"]=!0,A.Calisto=!0,A.Calvert=!0,A.Capitals=!0,A.Cambria=!0,A.Cartier=!0,A.Caslon=!0,A.Catull=!0,A.Centaur=!0,A["Century Old Style"]=!0,A["Century Schoolbook"]=!0,A.Chaparral=!0,A["Charis SIL"]=!0,A.Cheltenham=!0,A["Cholla Slab"]=!0,A.Clarendon=!0,A.Clearface=!0,A.Cochin=!0,A.Colonna=!0,A["Computer Modern"]=!0,A["Concrete Roman"]=!0,A.Constantia=!0,A["Cooper Black"]=!0,A.Corona=!0,A.Ecotype=!0,A.Egyptienne=!0,A.Elephant=!0,A.Excelsior=!0,A.Fairfield=!0,A["FF Scala"]=!0,A.Folkard=!0,A.Footlight=!0,A.FreeSerif=!0,A["Friz Quadrata"]=!0,A.Garamond=!0,A.Gentium=!0,A.Georgia=!0,A.Gloucester=!0,A["Goudy Old Style"]=!0,A["Goudy Schoolbook"]=!0,A["Goudy Pro Font"]=!0,A.Granjon=!0,A["Guardian Egyptian"]=!0,A.Heather=!0,A.Hercules=!0,A["High Tower Text"]=!0,A.Hiroshige=!0,A["Hoefler Text"]=!0,A["Humana Serif"]=!0,A.Imprint=!0,A["Ionic No. 5"]=!0,A.Janson=!0,A.Joanna=!0,A.Korinna=!0,A.Lexicon=!0,A.LiberationSerif=!0,A["Liberation Serif"]=!0,A["Linux Libertine"]=!0,A.Literaturnaya=!0,A.Lucida=!0,A["Lucida Bright"]=!0,A.Melior=!0,A.Memphis=!0,A.Miller=!0,A.Minion=!0,A.Modern=!0,A["Mona Lisa"]=!0,A["Mrs Eaves"]=!0,A["MS Serif"]=!0,A["Museo Slab"]=!0,A["New York"]=!0,A["Nimbus Roman"]=!0,A["NPS Rawlinson Roadway"]=!0,A.NuptialScript=!0,A.Palatino=!0,A.Perpetua=!0,A.Plantin=!0,A["Plantin Schoolbook"]=!0,A.Playbill=!0,A["Poor Richard"]=!0,A["Rawlinson Roadway"]=!0,A.Renault=!0,A.Requiem=!0,A.Rockwell=!0,A.Roman=!0,A["Rotis Serif"]=!0,A.Sabon=!0,A.Scala=!0,A.Seagull=!0,A.Sistina=!0,A.Souvenir=!0,A.STIX=!0,A["Stone Informal"]=!0,A["Stone Serif"]=!0,A.Sylfaen=!0,A.Times=!0,A.Trajan=!0,A["Trinité"]=!0,A["Trump Mediaeval"]=!0,A.Utopia=!0,A["Vale Type"]=!0,A["Bitstream Vera"]=!0,A["Vera Serif"]=!0,A.Versailles=!0,A.Wanted=!0,A.Weiss=!0,A["Wide Latin"]=!0,A.Windsor=!0,A.XITS=!0}),cg=ri(function(A){A.Dingbats=!0,A.Symbol=!0,A.ZapfDingbats=!0,A.Wingdings=!0,A["Wingdings-Bold"]=!0,A["Wingdings-Regular"]=!0}),Cg=ri(function(A){A[2]=10,A[3]=32,A[4]=33,A[5]=34,A[6]=35,A[7]=36,A[8]=37,A[9]=38,A[10]=39,A[11]=40,A[12]=41,A[13]=42,A[14]=43,A[15]=44,A[16]=45,A[17]=46,A[18]=47,A[19]=48,A[20]=49,A[21]=50,A[22]=51,A[23]=52,A[24]=53,A[25]=54,A[26]=55,A[27]=56,A[28]=57,A[29]=58,A[30]=894,A[31]=60,A[32]=61,A[33]=62,A[34]=63,A[35]=64,A[36]=65,A[37]=66,A[38]=67,A[39]=68,A[40]=69,A[41]=70,A[42]=71,A[43]=72,A[44]=73,A[45]=74,A[46]=75,A[47]=76,A[48]=77,A[49]=78,A[50]=79,A[51]=80,A[52]=81,A[53]=82,A[54]=83,A[55]=84,A[56]=85,A[57]=86,A[58]=87,A[59]=88,A[60]=89,A[61]=90,A[62]=91,A[63]=92,A[64]=93,A[65]=94,A[66]=95,A[67]=96,A[68]=97,A[69]=98,A[70]=99,A[71]=100,A[72]=101,A[73]=102,A[74]=103,A[75]=104,A[76]=105,A[77]=106,A[78]=107,A[79]=108,A[80]=109,A[81]=110,A[82]=111,A[83]=112,A[84]=113,A[85]=114,A[86]=115,A[87]=116,A[88]=117,A[89]=118,A[90]=119,A[91]=120,A[92]=121,A[93]=122,A[94]=123,A[95]=124,A[96]=125,A[97]=126,A[98]=196,A[99]=197,A[100]=199,A[101]=201,A[102]=209,A[103]=214,A[104]=220,A[105]=225,A[106]=224,A[107]=226,A[108]=228,A[109]=227,A[110]=229,A[111]=231,A[112]=233,A[113]=232,A[114]=234,A[115]=235,A[116]=237,A[117]=236,A[118]=238,A[119]=239,A[120]=241,A[121]=243,A[122]=242,A[123]=244,A[124]=246,A[125]=245,A[126]=250,A[127]=249,A[128]=251,A[129]=252,A[130]=8224,A[131]=176,A[132]=162,A[133]=163,A[134]=167,A[135]=8226,A[136]=182,A[137]=223,A[138]=174,A[139]=169,A[140]=8482,A[141]=180,A[142]=168,A[143]=8800,A[144]=198,A[145]=216,A[146]=8734,A[147]=177,A[148]=8804,A[149]=8805,A[150]=165,A[151]=181,A[152]=8706,A[153]=8721,A[154]=8719,A[156]=8747,A[157]=170,A[158]=186,A[159]=8486,A[160]=230,A[161]=248,A[162]=191,A[163]=161,A[164]=172,A[165]=8730,A[166]=402,A[167]=8776,A[168]=8710,A[169]=171,A[170]=187,A[171]=8230,A[179]=8220,A[180]=8221,A[181]=8216,A[182]=8217,A[200]=193,A[203]=205,A[207]=211,A[210]=218,A[223]=711,A[224]=321,A[225]=322,A[226]=352,A[227]=353,A[228]=381,A[229]=382,A[233]=221,A[234]=253,A[252]=263,A[253]=268,A[254]=269,A[258]=258,A[260]=260,A[261]=261,A[265]=280,A[266]=281,A[267]=282,A[268]=283,A[269]=313,A[275]=323,A[276]=324,A[278]=328,A[283]=344,A[284]=345,A[285]=346,A[286]=347,A[292]=367,A[295]=377,A[296]=378,A[298]=380,A[305]=963,A[306]=964,A[307]=966,A[308]=8215,A[309]=8252,A[310]=8319,A[311]=8359,A[312]=8592,A[313]=8593,A[337]=9552,A[493]=1039,A[494]=1040,A[672]=1488,A[673]=1489,A[674]=1490,A[675]=1491,A[676]=1492,A[677]=1493,A[678]=1494,A[679]=1495,A[680]=1496,A[681]=1497,A[682]=1498,A[683]=1499,A[684]=1500,A[685]=1501,A[686]=1502,A[687]=1503,A[688]=1504,A[689]=1505,A[690]=1506,A[691]=1507,A[692]=1508,A[693]=1509,A[694]=1510,A[695]=1511,A[696]=1512,A[697]=1513,A[698]=1514,A[705]=1524,A[706]=8362,A[710]=64288,A[711]=64298,A[759]=1617,A[761]=1776,A[763]=1778,A[775]=1652,A[777]=1764,A[778]=1780,A[779]=1781,A[780]=1782,A[782]=771,A[783]=64726,A[786]=8363,A[788]=8532,A[790]=768,A[791]=769,A[792]=768,A[795]=803,A[797]=64336,A[798]=64337,A[799]=64342,A[800]=64343,A[801]=64344,A[802]=64345,A[803]=64362,A[804]=64363,A[805]=64364,A[2424]=7821,A[2425]=7822,A[2426]=7823,A[2427]=7824,A[2428]=7825,A[2429]=7826,A[2430]=7827,A[2433]=7682,A[2678]=8045,A[2679]=8046,A[2830]=1552,A[2838]=686,A[2840]=751,A[2842]=753,A[2843]=754,A[2844]=755,A[2846]=757,A[2856]=767,A[2857]=848,A[2858]=849,A[2862]=853,A[2863]=854,A[2864]=855,A[2865]=861,A[2866]=862,A[2906]=7460,A[2908]=7462,A[2909]=7463,A[2910]=7464,A[2912]=7466,A[2913]=7467,A[2914]=7468,A[2916]=7470,A[2917]=7471,A[2918]=7472,A[2920]=7474,A[2921]=7475,A[2922]=7476,A[2924]=7478,A[2925]=7479,A[2926]=7480,A[2928]=7482,A[2929]=7483,A[2930]=7484,A[2932]=7486,A[2933]=7487,A[2934]=7488,A[2936]=7490,A[2937]=7491,A[2938]=7492,A[2940]=7494,A[2941]=7495,A[2942]=7496,A[2944]=7498,A[2946]=7500,A[2948]=7502,A[2950]=7504,A[2951]=7505,A[2952]=7506,A[2954]=7508,A[2955]=7509,A[2956]=7510,A[2958]=7512,A[2959]=7513,A[2960]=7514,A[2962]=7516,A[2963]=7517,A[2964]=7518,A[2966]=7520,A[2967]=7521,A[2968]=7522,A[2970]=7524,A[2971]=7525,A[2972]=7526,A[2974]=7528,A[2975]=7529,A[2976]=7530,A[2978]=1537,A[2979]=1538,A[2980]=1539,A[2982]=1549,A[2983]=1551,A[2984]=1552,A[2986]=1554,A[2987]=1555,A[2988]=1556,A[2990]=1623,A[2991]=1624,A[2995]=1775,A[2999]=1791,A[3002]=64290,A[3003]=64291,A[3004]=64292,A[3006]=64294,A[3007]=64295,A[3008]=64296,A[3011]=1900,A[3014]=8223,A[3015]=8244,A[3017]=7532,A[3018]=7533,A[3019]=7534,A[3075]=7590,A[3076]=7591,A[3079]=7594,A[3080]=7595,A[3083]=7598,A[3084]=7599,A[3087]=7602,A[3088]=7603,A[3091]=7606,A[3092]=7607,A[3095]=7610,A[3096]=7611,A[3099]=7614,A[3100]=7615,A[3103]=7618,A[3104]=7619,A[3107]=8337,A[3108]=8338,A[3116]=1884,A[3119]=1885,A[3120]=1885,A[3123]=1886,A[3124]=1886,A[3127]=1887,A[3128]=1887,A[3131]=1888,A[3132]=1888,A[3135]=1889,A[3136]=1889,A[3139]=1890,A[3140]=1890,A[3143]=1891,A[3144]=1891,A[3147]=1892,A[3148]=1892,A[3153]=580,A[3154]=581,A[3157]=584,A[3158]=585,A[3161]=588,A[3162]=589,A[3165]=891,A[3166]=892,A[3169]=1274,A[3170]=1275,A[3173]=1278,A[3174]=1279,A[3181]=7622,A[3182]=7623,A[3282]=11799,A[3316]=578,A[3379]=42785,A[3393]=1159,A[3416]=8377}),Bg=ri(function(A){A[227]=322,A[264]=261,A[291]=346}),hg=ri(function(A){A[1]=32,A[4]=65,A[5]=192,A[6]=193,A[9]=196,A[17]=66,A[18]=67,A[21]=268,A[24]=68,A[28]=69,A[29]=200,A[30]=201,A[32]=282,A[38]=70,A[39]=71,A[44]=72,A[47]=73,A[48]=204,A[49]=205,A[58]=74,A[60]=75,A[62]=76,A[68]=77,A[69]=78,A[75]=79,A[76]=210,A[80]=214,A[87]=80,A[89]=81,A[90]=82,A[92]=344,A[94]=83,A[97]=352,A[100]=84,A[104]=85,A[109]=220,A[115]=86,A[116]=87,A[121]=88,A[122]=89,A[124]=221,A[127]=90,A[129]=381,A[258]=97,A[259]=224,A[260]=225,A[263]=228,A[268]=261,A[271]=98,A[272]=99,A[273]=263,A[275]=269,A[282]=100,A[286]=101,A[287]=232,A[288]=233,A[290]=283,A[295]=281,A[296]=102,A[336]=103,A[346]=104,A[349]=105,A[350]=236,A[351]=237,A[361]=106,A[364]=107,A[367]=108,A[371]=322,A[373]=109,A[374]=110,A[381]=111,A[382]=242,A[383]=243,A[386]=246,A[393]=112,A[395]=113,A[396]=114,A[398]=345,A[400]=115,A[401]=347,A[403]=353,A[410]=116,A[437]=117,A[442]=252,A[448]=118,A[449]=119,A[454]=120,A[455]=121,A[457]=253,A[460]=122,A[462]=382,A[463]=380,A[853]=44,A[855]=58,A[856]=46,A[876]=47,A[878]=45,A[882]=45,A[894]=40,A[895]=41,A[896]=91,A[897]=93,A[923]=64,A[1004]=48,A[1005]=49,A[1006]=50,A[1007]=51,A[1008]=52,A[1009]=53,A[1010]=54,A[1011]=55,A[1012]=56,A[1013]=57,A[1081]=37,A[1085]=43,A[1086]=45});function Qg(A){const e=ng(A);return gg()[e]}function lg(A){const e=ng(A);return!!(gg()[e]||og()[e]||Ig()[e]||cg()[e])}class Eg{constructor(A=[]){this._map=A}get length(){return this._map.length}forEach(A){for(const e in this._map)A(e,this._map[e].charCodeAt(0))}has(A){return void 0!==this._map[A]}get(A){return this._map[A]}charCodeOf(A){const e=this._map;if(e.length<=65536)return e.indexOf(A);for(const t in e)if(e[t]===A)return 0|t;return-1}amend(A){for(const e in A)this._map[e]=A[e]}}class ug{constructor(A,e){this.firstChar=A,this.lastChar=e}get length(){return this.lastChar+1-this.firstChar}forEach(A){for(let e=this.firstChar,t=this.lastChar;e<=t;e++)A(e,e)}has(A){return this.firstChar<=A&&A<=this.lastChar}get(A){if(this.firstChar<=A&&A<=this.lastChar)return String.fromCharCode(A)}charCodeOf(A){return Number.isInteger(A)&&A>=this.firstChar&&A<=this.lastChar?A:-1}amend(A){rt("Should not call amend()")}}class dg{constructor(A,e){this.properties=e;const t=new Fn(A,e,_n);this.cff=t.parse(),this.cff.duplicateFirstGlyph();const i=new Tn(this.cff);this.seacs=this.cff.seacs;try{this.data=i.compile()}catch{gt("Failed to compile font "+e.loadedName),this.data=A}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const A=this.cff,e=this.properties,{cidToGidMap:t,cMap:i}=e,a=A.charset.charset;let s,n;if(e.composite){let e,g;if(t?.length>0){e=Object.create(null);for(let A=0,i=t.length;A<i;A++){const i=t[A];void 0!==i&&(e[i]=A)}}if(s=Object.create(null),A.isCIDFont)for(n=0;n<a.length;n++){const A=a[n];g=i.charCodeOf(A),void 0!==e?.[g]&&(g=e[g]),s[g]=n}else for(n=0;n<A.charStrings.count;n++)g=i.charCodeOf(n),s[g]=n;return s}let g=A.encoding?A.encoding.encoding:null;return e.isInternalFont&&(g=e.defaultEncoding),s=sg(e,g,a),s}hasGlyphId(A){return this.cff.hasGlyphId(A)}_createBuiltInEncoding(){const{charset:A,encoding:e}=this.cff;if(!A||!e)return;const t=A.charset,i=e.encoding,a=[];for(const A in i){const e=i[A];if(e>=0){const i=t[e];i&&(a[A]=i)}}a.length>0&&(this.properties.builtInEncoding=a)}}function fg(A,e){return(A[e]<<24|A[e+1]<<16|A[e+2]<<8|A[e+3])>>>0}function pg(A,e){return A[e]<<8|A[e+1]}function mg(A,e){return(A[e]<<24|A[e+1]<<16)>>16}function yg(A,e){return A[e]<<24>>24}function wg(A,e){return mg(A,e)/16384}function Dg(A){const e=A.length;let t=32768;return e<1240?t=107:e<33900&&(t=1131),t}function bg(A,e,t){const i=1===pg(A,e+2)?fg(A,e+8):fg(A,e+16),a=pg(A,e+i);let s,n,g;if(4===a){pg(A,e+i+2);const t=pg(A,e+i+6)>>1;for(n=e+i+14,s=[],g=0;g<t;g++,n+=2)s[g]={end:pg(A,n)};for(n+=2,g=0;g<t;g++,n+=2)s[g].start=pg(A,n);for(g=0;g<t;g++,n+=2)s[g].idDelta=pg(A,n);for(g=0;g<t;g++,n+=2){let e=pg(A,n);if(0!==e){s[g].ids=[];for(let t=0,i=s[g].end-s[g].start+1;t<i;t++)s[g].ids[t]=pg(A,n+e),e+=2}}return s}if(12===a){const t=fg(A,e+i+12);for(n=e+i+16,s=[],g=0;g<t;g++)e=fg(A,n),s.push({start:e,end:fg(A,n+4),idDelta:fg(A,n+8)-e}),n+=12;return s}throw new ut(`unsupported cmap: ${a}`)}function kg(A,e,t,i){const a=new Fn(new Pi(A,e,t-e),{},i).parse();return{glyphs:a.charStrings.objects,subrs:a.topDict.privateDict?.subrsIndex?.objects,gsubrs:a.globalSubrIndex?.objects,isCFFCIDFont:a.isCIDFont,fdSelect:a.fdSelect,fdArray:a.fdArray}}function Fg(A,e){const t=e.codePointAt(0);let i=0,a=0,s=A.length-1;for(;a<s;){const e=a+s+1>>1;t<A[e].start?s=e-1:a=e}return A[a].start<=t&&t<=A[a].end&&(i=A[a].idDelta+(A[a].ids?A[a].ids[t-A[a].start]:t)&65535),{charCode:t,glyphId:i}}function Sg(A,e,t){function i(A,t){e.add(Lt,[A,t])}function a(A,t){e.add(Jt,[A,t])}function s(A,t,i,a){e.add(Ht,[A,t,i,a])}let n=0;const g=mg(A,n);let r,o=0,I=0;if(n+=10,g<0)do{r=pg(A,n);const i=pg(A,n+2);let a,s;n+=4,1&r?(2&r?(a=mg(A,n),s=mg(A,n+2)):(a=pg(A,n),s=pg(A,n+2)),n+=4):2&r?(a=yg(A,n++),s=yg(A,n++)):(a=A[n++],s=A[n++]),2&r?(o=a,I=s):(o=0,I=0);let g=1,c=1,C=0,B=0;8&r?(g=c=wg(A,n),n+=2):64&r?(g=wg(A,n),c=wg(A,n+2),n+=4):128&r&&(g=wg(A,n),C=wg(A,n+2),B=wg(A,n+4),c=wg(A,n+6),n+=8);const h=t.glyphs[i];h&&(e.add(vt),e.add(qt,[g,C,B,c,o,I]),Sg(h,e,t),e.add(Yt))}while(32&r);else{const e=[];let t,c;for(t=0;t<g;t++)e.push(pg(A,n)),n+=2;n+=2+pg(A,n);const C=e.at(-1)+1,B=[];for(;B.length<C;){r=A[n++];let e=1;for(8&r&&(e+=A[n++]);e-- >0;)B.push({flags:r})}for(t=0;t<C;t++){switch(18&B[t].flags){case 0:o+=mg(A,n),n+=2;break;case 2:o-=A[n++];break;case 18:o+=A[n++]}B[t].x=o}for(t=0;t<C;t++){switch(36&B[t].flags){case 0:I+=mg(A,n),n+=2;break;case 4:I-=A[n++];break;case 36:I+=A[n++]}B[t].y=I}let h=0;for(n=0;n<g;n++){const A=e[n],g=B.slice(h,A+1);if(1&g[0].flags)g.push(g[0]);else if(1&g.at(-1).flags)g.unshift(g.at(-1));else{const A={flags:1,x:(g[0].x+g.at(-1).x)/2,y:(g[0].y+g.at(-1).y)/2};g.unshift(A),g.push(A)}for(i(g[0].x,g[0].y),t=1,c=g.length;t<c;t++)1&g[t].flags?a(g[t].x,g[t].y):1&g[t+1].flags?(s(g[t].x,g[t].y,g[t+1].x,g[t+1].y),t++):s(g[t].x,g[t].y,(g[t].x+g[t+1].x)/2,(g[t].y+g[t+1].y)/2);h=A+1}}}function Rg(A,e,t,i){function a(A,t){e.add(Lt,[A,t])}function s(A,t){e.add(Jt,[A,t])}function n(A,t,i,a,s,n){e.add(Mt,[A,t,i,a,s,n])}const g=[];let r=0,o=0,I=0;!function A(c){let C=0;for(;C<c.length;){let B,h,Q,l,E,u,d,f,p,m=!1,y=c[C++];switch(y){case 1:case 3:case 18:case 23:I+=g.length>>1,m=!0;break;case 4:o+=g.pop(),a(r,o),m=!0;break;case 5:for(;g.length>0;)r+=g.shift(),o+=g.shift(),s(r,o);break;case 6:for(;g.length>0&&(r+=g.shift(),s(r,o),0!==g.length);)o+=g.shift(),s(r,o);break;case 7:for(;g.length>0&&(o+=g.shift(),s(r,o),0!==g.length);)r+=g.shift(),s(r,o);break;case 8:for(;g.length>0;)B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+g.shift(),n(B,Q,h,l,r,o);break;case 10:if(f=g.pop(),p=null,t.isCFFCIDFont){const A=t.fdSelect.getFDIndex(i);if(A>=0&&A<t.fdArray.length){const e=t.fdArray[A];let i;e.privateDict?.subrsIndex&&(i=e.privateDict.subrsIndex.objects),i&&(f+=Dg(i),p=i[f])}else gt("Invalid fd index for glyph index.")}else p=t.subrs[f+t.subrsBias];p&&A(p);break;case 11:return;case 12:switch(y=c[C++],y){case 34:B=r+g.shift(),h=B+g.shift(),E=o+g.shift(),r=h+g.shift(),n(B,o,h,E,r,E),B=r+g.shift(),h=B+g.shift(),r=h+g.shift(),n(B,E,h,o,r,o);break;case 35:B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+g.shift(),n(B,Q,h,l,r,o),B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+g.shift(),n(B,Q,h,l,r,o),g.pop();break;case 36:B=r+g.shift(),E=o+g.shift(),h=B+g.shift(),u=E+g.shift(),r=h+g.shift(),n(B,E,h,u,r,u),B=r+g.shift(),h=B+g.shift(),d=u+g.shift(),r=h+g.shift(),n(B,u,h,d,r,o);break;case 37:const A=r,e=o;B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+g.shift(),n(B,Q,h,l,r,o),B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h,o=l,Math.abs(r-A)>Math.abs(o-e)?r+=g.shift():o+=g.shift(),n(B,Q,h,l,r,o);break;default:throw new ut(`unknown operator: 12 ${y}`)}break;case 14:if(g.length>=4){const A=g.pop(),i=g.pop();o=g.pop(),r=g.pop(),e.add(vt),e.add(Tt,[r,o]);let a=Fg(t.cmap,String.fromCharCode(t.glyphNameMap[dn[A]]));Rg(t.glyphs[a.glyphId],e,t,a.glyphId),e.add(Yt),a=Fg(t.cmap,String.fromCharCode(t.glyphNameMap[dn[i]])),Rg(t.glyphs[a.glyphId],e,t,a.glyphId)}return;case 19:case 20:I+=g.length>>1,C+=I+7>>3,m=!0;break;case 21:o+=g.pop(),r+=g.pop(),a(r,o),m=!0;break;case 22:r+=g.pop(),a(r,o),m=!0;break;case 24:for(;g.length>2;)B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+g.shift(),n(B,Q,h,l,r,o);r+=g.shift(),o+=g.shift(),s(r,o);break;case 25:for(;g.length>6;)r+=g.shift(),o+=g.shift(),s(r,o);B=r+g.shift(),Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+g.shift(),n(B,Q,h,l,r,o);break;case 26:for(g.length%2&&(r+=g.shift());g.length>0;)B=r,Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h,o=l+g.shift(),n(B,Q,h,l,r,o);break;case 27:for(g.length%2&&(o+=g.shift());g.length>0;)B=r+g.shift(),Q=o,h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l,n(B,Q,h,l,r,o);break;case 28:g.push((c[C]<<24|c[C+1]<<16)>>16),C+=2;break;case 29:f=g.pop()+t.gsubrsBias,p=t.gsubrs[f],p&&A(p);break;case 30:for(;g.length>0&&(B=r,Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+(1===g.length?g.shift():0),n(B,Q,h,l,r,o),0!==g.length);)B=r+g.shift(),Q=o,h=B+g.shift(),l=Q+g.shift(),o=l+g.shift(),r=h+(1===g.length?g.shift():0),n(B,Q,h,l,r,o);break;case 31:for(;g.length>0&&(B=r+g.shift(),Q=o,h=B+g.shift(),l=Q+g.shift(),o=l+g.shift(),r=h+(1===g.length?g.shift():0),n(B,Q,h,l,r,o),0!==g.length);)B=r,Q=o+g.shift(),h=B+g.shift(),l=Q+g.shift(),r=h+g.shift(),o=l+(1===g.length?g.shift():0),n(B,Q,h,l,r,o);break;default:if(y<32)throw new ut(`unknown operator: ${y}`);y<247?g.push(y-139):y<251?g.push(256*(y-247)+c[C++]+108):y<255?g.push(256*-(y-251)-c[C++]-108):(g.push((c[C]<<24|c[C+1]<<16|c[C+2]<<8|c[C+3])/65536),C+=4)}m&&(g.length=0)}}(A)}const Gg=[];class Ng{cmds=[];add(A,e){if(e)if(mi(e,null))this.cmds.push(A,...e);else{gt(`Commands.add - "${A}" has at least one non-number arg: "${e}".`);const t=e.map(A=>"number"==typeof A?A:0);this.cmds.push(A,...t)}else this.cmds.push(A)}}class xg{constructor(A){this.constructor===xg&&rt("Cannot initialize CompiledFont."),this.fontMatrix=A,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(A){const{charCode:e,glyphId:t}=Fg(this.cmap,A);let i,a=this.compiledGlyphs[t];if(!a){try{a=this.compileGlyph(this.glyphs[t],t)}catch(A){a=Gg,i=A}this.compiledGlyphs[t]=a}if(this.compiledCharCodeToGlyphId[e]??=t,i)throw i;return a}compileGlyph(A,e){if(!A||0===A.length||14===A[0])return Gg;let t=this.fontMatrix;if(this.isCFFCIDFont){const A=this.fdSelect.getFDIndex(e);if(A>=0&&A<this.fdArray.length){t=this.fdArray[A].getByName("FontMatrix")||a}else gt("Invalid fd index for glyph index.")}const i=new Ng;return i.add(vt),i.add(qt,t.slice()),i.add(Kt),this.compileGlyphImpl(A,i,e),i.add(Yt),i.cmds}compileGlyphImpl(){rt("Children classes should implement this.")}hasBuiltPath(A){const{charCode:e,glyphId:t}=Fg(this.cmap,A);return void 0!==this.compiledGlyphs[t]&&void 0!==this.compiledCharCodeToGlyphId[e]}}class Ug extends xg{constructor(A,e,t){super(t||[488e-6,0,0,488e-6,0,0]),this.glyphs=A,this.cmap=e}compileGlyphImpl(A,e){Sg(A,e,this)}}class Mg extends xg{constructor(A,e,t,i){super(t||[.001,0,0,.001,0,0]),this.glyphs=A.glyphs,this.gsubrs=A.gsubrs||[],this.subrs=A.subrs||[],this.cmap=e,this.glyphNameMap=i||Pn(),this.gsubrsBias=Dg(this.gsubrs),this.subrsBias=Dg(this.subrs),this.isCFFCIDFont=A.isCFFCIDFont,this.fdSelect=A.fdSelect,this.fdArray=A.fdArray}compileGlyphImpl(A,e,t){Rg(A,e,this,t)}}class Lg{static create(A,e){const t=new Uint8Array(A.data);let i,a,s,n,g,r;const o=pg(t,4);for(let A=0,I=12;A<o;A++,I+=16){const A=ft(t.subarray(I,I+4)),o=fg(t,I+8),c=fg(t,I+12);switch(A){case"cmap":i=bg(t,o);break;case"glyf":a=t.subarray(o,o+c);break;case"loca":s=t.subarray(o,o+c);break;case"head":r=pg(t,o+18),g=pg(t,o+50);break;case"CFF ":n=kg(t,o,o+c,e)}}if(a){const e=r?[1/r,0,0,1/r,0,0]:A.fontMatrix;return new Ug(function(A,e,t){let i,a;t?(i=4,a=fg):(i=2,a=(A,e)=>2*pg(A,e));const s=[];let n=a(e,0);for(let t=i;t<e.length;t+=i){const i=a(e,t);s.push(A.subarray(n,i)),n=i}return s}(a,s,g),i,e)}return new Mg(n,i,A.fontMatrix,A.glyphNameMap)}}const Jg=ri(function(A){A.Courier=600,A["Courier-Bold"]=600,A["Courier-BoldOblique"]=600,A["Courier-Oblique"]=600,A.Helvetica=ri(function(A){A.space=278,A.exclam=278,A.quotedbl=355,A.numbersign=556,A.dollar=556,A.percent=889,A.ampersand=667,A.quoteright=222,A.parenleft=333,A.parenright=333,A.asterisk=389,A.plus=584,A.comma=278,A.hyphen=333,A.period=278,A.slash=278,A.zero=556,A.one=556,A.two=556,A.three=556,A.four=556,A.five=556,A.six=556,A.seven=556,A.eight=556,A.nine=556,A.colon=278,A.semicolon=278,A.less=584,A.equal=584,A.greater=584,A.question=556,A.at=1015,A.A=667,A.B=667,A.C=722,A.D=722,A.E=667,A.F=611,A.G=778,A.H=722,A.I=278,A.J=500,A.K=667,A.L=556,A.M=833,A.N=722,A.O=778,A.P=667,A.Q=778,A.R=722,A.S=667,A.T=611,A.U=722,A.V=667,A.W=944,A.X=667,A.Y=667,A.Z=611,A.bracketleft=278,A.backslash=278,A.bracketright=278,A.asciicircum=469,A.underscore=556,A.quoteleft=222,A.a=556,A.b=556,A.c=500,A.d=556,A.e=556,A.f=278,A.g=556,A.h=556,A.i=222,A.j=222,A.k=500,A.l=222,A.m=833,A.n=556,A.o=556,A.p=556,A.q=556,A.r=333,A.s=500,A.t=278,A.u=556,A.v=500,A.w=722,A.x=500,A.y=500,A.z=500,A.braceleft=334,A.bar=260,A.braceright=334,A.asciitilde=584,A.exclamdown=333,A.cent=556,A.sterling=556,A.fraction=167,A.yen=556,A.florin=556,A.section=556,A.currency=556,A.quotesingle=191,A.quotedblleft=333,A.guillemotleft=556,A.guilsinglleft=333,A.guilsinglright=333,A.fi=500,A.fl=500,A.endash=556,A.dagger=556,A.daggerdbl=556,A.periodcentered=278,A.paragraph=537,A.bullet=350,A.quotesinglbase=222,A.quotedblbase=333,A.quotedblright=333,A.guillemotright=556,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=611,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=1e3,A.ordfeminine=370,A.Lslash=556,A.Oslash=778,A.OE=1e3,A.ordmasculine=365,A.ae=889,A.dotlessi=278,A.lslash=222,A.oslash=611,A.oe=944,A.germandbls=611,A.Idieresis=278,A.eacute=556,A.abreve=556,A.uhungarumlaut=556,A.ecaron=556,A.Ydieresis=667,A.divide=584,A.Yacute=667,A.Acircumflex=667,A.aacute=556,A.Ucircumflex=722,A.yacute=500,A.scommaaccent=500,A.ecircumflex=556,A.Uring=722,A.Udieresis=722,A.aogonek=556,A.Uacute=722,A.uogonek=556,A.Edieresis=667,A.Dcroat=722,A.commaaccent=250,A.copyright=737,A.Emacron=667,A.ccaron=500,A.aring=556,A.Ncommaaccent=722,A.lacute=222,A.agrave=556,A.Tcommaaccent=611,A.Cacute=722,A.atilde=556,A.Edotaccent=667,A.scaron=500,A.scedilla=500,A.iacute=278,A.lozenge=471,A.Rcaron=722,A.Gcommaaccent=778,A.ucircumflex=556,A.acircumflex=556,A.Amacron=667,A.rcaron=333,A.ccedilla=500,A.Zdotaccent=611,A.Thorn=667,A.Omacron=778,A.Racute=722,A.Sacute=667,A.dcaron=643,A.Umacron=722,A.uring=556,A.threesuperior=333,A.Ograve=778,A.Agrave=667,A.Abreve=667,A.multiply=584,A.uacute=556,A.Tcaron=611,A.partialdiff=476,A.ydieresis=500,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=667,A.adieresis=556,A.edieresis=556,A.cacute=500,A.nacute=556,A.umacron=556,A.Ncaron=722,A.Iacute=278,A.plusminus=584,A.brokenbar=260,A.registered=737,A.Gbreve=778,A.Idotaccent=278,A.summation=600,A.Egrave=667,A.racute=333,A.omacron=556,A.Zacute=611,A.Zcaron=611,A.greaterequal=549,A.Eth=722,A.Ccedilla=722,A.lcommaaccent=222,A.tcaron=317,A.eogonek=556,A.Uogonek=722,A.Aacute=667,A.Adieresis=667,A.egrave=556,A.zacute=500,A.iogonek=222,A.Oacute=778,A.oacute=556,A.amacron=556,A.sacute=500,A.idieresis=278,A.Ocircumflex=778,A.Ugrave=722,A.Delta=612,A.thorn=556,A.twosuperior=333,A.Odieresis=778,A.mu=556,A.igrave=278,A.ohungarumlaut=556,A.Eogonek=667,A.dcroat=556,A.threequarters=834,A.Scedilla=667,A.lcaron=299,A.Kcommaaccent=667,A.Lacute=556,A.trademark=1e3,A.edotaccent=556,A.Igrave=278,A.Imacron=278,A.Lcaron=556,A.onehalf=834,A.lessequal=549,A.ocircumflex=556,A.ntilde=556,A.Uhungarumlaut=722,A.Eacute=667,A.emacron=556,A.gbreve=556,A.onequarter=834,A.Scaron=667,A.Scommaaccent=667,A.Ohungarumlaut=778,A.degree=400,A.ograve=556,A.Ccaron=722,A.ugrave=556,A.radical=453,A.Dcaron=722,A.rcommaaccent=333,A.Ntilde=722,A.otilde=556,A.Rcommaaccent=722,A.Lcommaaccent=556,A.Atilde=667,A.Aogonek=667,A.Aring=667,A.Otilde=778,A.zdotaccent=500,A.Ecaron=667,A.Iogonek=278,A.kcommaaccent=500,A.minus=584,A.Icircumflex=278,A.ncaron=556,A.tcommaaccent=278,A.logicalnot=584,A.odieresis=556,A.udieresis=556,A.notequal=549,A.gcommaaccent=556,A.eth=556,A.zcaron=500,A.ncommaaccent=556,A.onesuperior=333,A.imacron=278,A.Euro=556}),A["Helvetica-Bold"]=ri(function(A){A.space=278,A.exclam=333,A.quotedbl=474,A.numbersign=556,A.dollar=556,A.percent=889,A.ampersand=722,A.quoteright=278,A.parenleft=333,A.parenright=333,A.asterisk=389,A.plus=584,A.comma=278,A.hyphen=333,A.period=278,A.slash=278,A.zero=556,A.one=556,A.two=556,A.three=556,A.four=556,A.five=556,A.six=556,A.seven=556,A.eight=556,A.nine=556,A.colon=333,A.semicolon=333,A.less=584,A.equal=584,A.greater=584,A.question=611,A.at=975,A.A=722,A.B=722,A.C=722,A.D=722,A.E=667,A.F=611,A.G=778,A.H=722,A.I=278,A.J=556,A.K=722,A.L=611,A.M=833,A.N=722,A.O=778,A.P=667,A.Q=778,A.R=722,A.S=667,A.T=611,A.U=722,A.V=667,A.W=944,A.X=667,A.Y=667,A.Z=611,A.bracketleft=333,A.backslash=278,A.bracketright=333,A.asciicircum=584,A.underscore=556,A.quoteleft=278,A.a=556,A.b=611,A.c=556,A.d=611,A.e=556,A.f=333,A.g=611,A.h=611,A.i=278,A.j=278,A.k=556,A.l=278,A.m=889,A.n=611,A.o=611,A.p=611,A.q=611,A.r=389,A.s=556,A.t=333,A.u=611,A.v=556,A.w=778,A.x=556,A.y=556,A.z=500,A.braceleft=389,A.bar=280,A.braceright=389,A.asciitilde=584,A.exclamdown=333,A.cent=556,A.sterling=556,A.fraction=167,A.yen=556,A.florin=556,A.section=556,A.currency=556,A.quotesingle=238,A.quotedblleft=500,A.guillemotleft=556,A.guilsinglleft=333,A.guilsinglright=333,A.fi=611,A.fl=611,A.endash=556,A.dagger=556,A.daggerdbl=556,A.periodcentered=278,A.paragraph=556,A.bullet=350,A.quotesinglbase=278,A.quotedblbase=500,A.quotedblright=500,A.guillemotright=556,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=611,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=1e3,A.ordfeminine=370,A.Lslash=611,A.Oslash=778,A.OE=1e3,A.ordmasculine=365,A.ae=889,A.dotlessi=278,A.lslash=278,A.oslash=611,A.oe=944,A.germandbls=611,A.Idieresis=278,A.eacute=556,A.abreve=556,A.uhungarumlaut=611,A.ecaron=556,A.Ydieresis=667,A.divide=584,A.Yacute=667,A.Acircumflex=722,A.aacute=556,A.Ucircumflex=722,A.yacute=556,A.scommaaccent=556,A.ecircumflex=556,A.Uring=722,A.Udieresis=722,A.aogonek=556,A.Uacute=722,A.uogonek=611,A.Edieresis=667,A.Dcroat=722,A.commaaccent=250,A.copyright=737,A.Emacron=667,A.ccaron=556,A.aring=556,A.Ncommaaccent=722,A.lacute=278,A.agrave=556,A.Tcommaaccent=611,A.Cacute=722,A.atilde=556,A.Edotaccent=667,A.scaron=556,A.scedilla=556,A.iacute=278,A.lozenge=494,A.Rcaron=722,A.Gcommaaccent=778,A.ucircumflex=611,A.acircumflex=556,A.Amacron=722,A.rcaron=389,A.ccedilla=556,A.Zdotaccent=611,A.Thorn=667,A.Omacron=778,A.Racute=722,A.Sacute=667,A.dcaron=743,A.Umacron=722,A.uring=611,A.threesuperior=333,A.Ograve=778,A.Agrave=722,A.Abreve=722,A.multiply=584,A.uacute=611,A.Tcaron=611,A.partialdiff=494,A.ydieresis=556,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=667,A.adieresis=556,A.edieresis=556,A.cacute=556,A.nacute=611,A.umacron=611,A.Ncaron=722,A.Iacute=278,A.plusminus=584,A.brokenbar=280,A.registered=737,A.Gbreve=778,A.Idotaccent=278,A.summation=600,A.Egrave=667,A.racute=389,A.omacron=611,A.Zacute=611,A.Zcaron=611,A.greaterequal=549,A.Eth=722,A.Ccedilla=722,A.lcommaaccent=278,A.tcaron=389,A.eogonek=556,A.Uogonek=722,A.Aacute=722,A.Adieresis=722,A.egrave=556,A.zacute=500,A.iogonek=278,A.Oacute=778,A.oacute=611,A.amacron=556,A.sacute=556,A.idieresis=278,A.Ocircumflex=778,A.Ugrave=722,A.Delta=612,A.thorn=611,A.twosuperior=333,A.Odieresis=778,A.mu=611,A.igrave=278,A.ohungarumlaut=611,A.Eogonek=667,A.dcroat=611,A.threequarters=834,A.Scedilla=667,A.lcaron=400,A.Kcommaaccent=722,A.Lacute=611,A.trademark=1e3,A.edotaccent=556,A.Igrave=278,A.Imacron=278,A.Lcaron=611,A.onehalf=834,A.lessequal=549,A.ocircumflex=611,A.ntilde=611,A.Uhungarumlaut=722,A.Eacute=667,A.emacron=556,A.gbreve=611,A.onequarter=834,A.Scaron=667,A.Scommaaccent=667,A.Ohungarumlaut=778,A.degree=400,A.ograve=611,A.Ccaron=722,A.ugrave=611,A.radical=549,A.Dcaron=722,A.rcommaaccent=389,A.Ntilde=722,A.otilde=611,A.Rcommaaccent=722,A.Lcommaaccent=611,A.Atilde=722,A.Aogonek=722,A.Aring=722,A.Otilde=778,A.zdotaccent=500,A.Ecaron=667,A.Iogonek=278,A.kcommaaccent=556,A.minus=584,A.Icircumflex=278,A.ncaron=611,A.tcommaaccent=333,A.logicalnot=584,A.odieresis=611,A.udieresis=611,A.notequal=549,A.gcommaaccent=611,A.eth=611,A.zcaron=500,A.ncommaaccent=611,A.onesuperior=333,A.imacron=278,A.Euro=556}),A["Helvetica-BoldOblique"]=ri(function(A){A.space=278,A.exclam=333,A.quotedbl=474,A.numbersign=556,A.dollar=556,A.percent=889,A.ampersand=722,A.quoteright=278,A.parenleft=333,A.parenright=333,A.asterisk=389,A.plus=584,A.comma=278,A.hyphen=333,A.period=278,A.slash=278,A.zero=556,A.one=556,A.two=556,A.three=556,A.four=556,A.five=556,A.six=556,A.seven=556,A.eight=556,A.nine=556,A.colon=333,A.semicolon=333,A.less=584,A.equal=584,A.greater=584,A.question=611,A.at=975,A.A=722,A.B=722,A.C=722,A.D=722,A.E=667,A.F=611,A.G=778,A.H=722,A.I=278,A.J=556,A.K=722,A.L=611,A.M=833,A.N=722,A.O=778,A.P=667,A.Q=778,A.R=722,A.S=667,A.T=611,A.U=722,A.V=667,A.W=944,A.X=667,A.Y=667,A.Z=611,A.bracketleft=333,A.backslash=278,A.bracketright=333,A.asciicircum=584,A.underscore=556,A.quoteleft=278,A.a=556,A.b=611,A.c=556,A.d=611,A.e=556,A.f=333,A.g=611,A.h=611,A.i=278,A.j=278,A.k=556,A.l=278,A.m=889,A.n=611,A.o=611,A.p=611,A.q=611,A.r=389,A.s=556,A.t=333,A.u=611,A.v=556,A.w=778,A.x=556,A.y=556,A.z=500,A.braceleft=389,A.bar=280,A.braceright=389,A.asciitilde=584,A.exclamdown=333,A.cent=556,A.sterling=556,A.fraction=167,A.yen=556,A.florin=556,A.section=556,A.currency=556,A.quotesingle=238,A.quotedblleft=500,A.guillemotleft=556,A.guilsinglleft=333,A.guilsinglright=333,A.fi=611,A.fl=611,A.endash=556,A.dagger=556,A.daggerdbl=556,A.periodcentered=278,A.paragraph=556,A.bullet=350,A.quotesinglbase=278,A.quotedblbase=500,A.quotedblright=500,A.guillemotright=556,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=611,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=1e3,A.ordfeminine=370,A.Lslash=611,A.Oslash=778,A.OE=1e3,A.ordmasculine=365,A.ae=889,A.dotlessi=278,A.lslash=278,A.oslash=611,A.oe=944,A.germandbls=611,A.Idieresis=278,A.eacute=556,A.abreve=556,A.uhungarumlaut=611,A.ecaron=556,A.Ydieresis=667,A.divide=584,A.Yacute=667,A.Acircumflex=722,A.aacute=556,A.Ucircumflex=722,A.yacute=556,A.scommaaccent=556,A.ecircumflex=556,A.Uring=722,A.Udieresis=722,A.aogonek=556,A.Uacute=722,A.uogonek=611,A.Edieresis=667,A.Dcroat=722,A.commaaccent=250,A.copyright=737,A.Emacron=667,A.ccaron=556,A.aring=556,A.Ncommaaccent=722,A.lacute=278,A.agrave=556,A.Tcommaaccent=611,A.Cacute=722,A.atilde=556,A.Edotaccent=667,A.scaron=556,A.scedilla=556,A.iacute=278,A.lozenge=494,A.Rcaron=722,A.Gcommaaccent=778,A.ucircumflex=611,A.acircumflex=556,A.Amacron=722,A.rcaron=389,A.ccedilla=556,A.Zdotaccent=611,A.Thorn=667,A.Omacron=778,A.Racute=722,A.Sacute=667,A.dcaron=743,A.Umacron=722,A.uring=611,A.threesuperior=333,A.Ograve=778,A.Agrave=722,A.Abreve=722,A.multiply=584,A.uacute=611,A.Tcaron=611,A.partialdiff=494,A.ydieresis=556,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=667,A.adieresis=556,A.edieresis=556,A.cacute=556,A.nacute=611,A.umacron=611,A.Ncaron=722,A.Iacute=278,A.plusminus=584,A.brokenbar=280,A.registered=737,A.Gbreve=778,A.Idotaccent=278,A.summation=600,A.Egrave=667,A.racute=389,A.omacron=611,A.Zacute=611,A.Zcaron=611,A.greaterequal=549,A.Eth=722,A.Ccedilla=722,A.lcommaaccent=278,A.tcaron=389,A.eogonek=556,A.Uogonek=722,A.Aacute=722,A.Adieresis=722,A.egrave=556,A.zacute=500,A.iogonek=278,A.Oacute=778,A.oacute=611,A.amacron=556,A.sacute=556,A.idieresis=278,A.Ocircumflex=778,A.Ugrave=722,A.Delta=612,A.thorn=611,A.twosuperior=333,A.Odieresis=778,A.mu=611,A.igrave=278,A.ohungarumlaut=611,A.Eogonek=667,A.dcroat=611,A.threequarters=834,A.Scedilla=667,A.lcaron=400,A.Kcommaaccent=722,A.Lacute=611,A.trademark=1e3,A.edotaccent=556,A.Igrave=278,A.Imacron=278,A.Lcaron=611,A.onehalf=834,A.lessequal=549,A.ocircumflex=611,A.ntilde=611,A.Uhungarumlaut=722,A.Eacute=667,A.emacron=556,A.gbreve=611,A.onequarter=834,A.Scaron=667,A.Scommaaccent=667,A.Ohungarumlaut=778,A.degree=400,A.ograve=611,A.Ccaron=722,A.ugrave=611,A.radical=549,A.Dcaron=722,A.rcommaaccent=389,A.Ntilde=722,A.otilde=611,A.Rcommaaccent=722,A.Lcommaaccent=611,A.Atilde=722,A.Aogonek=722,A.Aring=722,A.Otilde=778,A.zdotaccent=500,A.Ecaron=667,A.Iogonek=278,A.kcommaaccent=556,A.minus=584,A.Icircumflex=278,A.ncaron=611,A.tcommaaccent=333,A.logicalnot=584,A.odieresis=611,A.udieresis=611,A.notequal=549,A.gcommaaccent=611,A.eth=611,A.zcaron=500,A.ncommaaccent=611,A.onesuperior=333,A.imacron=278,A.Euro=556}),A["Helvetica-Oblique"]=ri(function(A){A.space=278,A.exclam=278,A.quotedbl=355,A.numbersign=556,A.dollar=556,A.percent=889,A.ampersand=667,A.quoteright=222,A.parenleft=333,A.parenright=333,A.asterisk=389,A.plus=584,A.comma=278,A.hyphen=333,A.period=278,A.slash=278,A.zero=556,A.one=556,A.two=556,A.three=556,A.four=556,A.five=556,A.six=556,A.seven=556,A.eight=556,A.nine=556,A.colon=278,A.semicolon=278,A.less=584,A.equal=584,A.greater=584,A.question=556,A.at=1015,A.A=667,A.B=667,A.C=722,A.D=722,A.E=667,A.F=611,A.G=778,A.H=722,A.I=278,A.J=500,A.K=667,A.L=556,A.M=833,A.N=722,A.O=778,A.P=667,A.Q=778,A.R=722,A.S=667,A.T=611,A.U=722,A.V=667,A.W=944,A.X=667,A.Y=667,A.Z=611,A.bracketleft=278,A.backslash=278,A.bracketright=278,A.asciicircum=469,A.underscore=556,A.quoteleft=222,A.a=556,A.b=556,A.c=500,A.d=556,A.e=556,A.f=278,A.g=556,A.h=556,A.i=222,A.j=222,A.k=500,A.l=222,A.m=833,A.n=556,A.o=556,A.p=556,A.q=556,A.r=333,A.s=500,A.t=278,A.u=556,A.v=500,A.w=722,A.x=500,A.y=500,A.z=500,A.braceleft=334,A.bar=260,A.braceright=334,A.asciitilde=584,A.exclamdown=333,A.cent=556,A.sterling=556,A.fraction=167,A.yen=556,A.florin=556,A.section=556,A.currency=556,A.quotesingle=191,A.quotedblleft=333,A.guillemotleft=556,A.guilsinglleft=333,A.guilsinglright=333,A.fi=500,A.fl=500,A.endash=556,A.dagger=556,A.daggerdbl=556,A.periodcentered=278,A.paragraph=537,A.bullet=350,A.quotesinglbase=222,A.quotedblbase=333,A.quotedblright=333,A.guillemotright=556,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=611,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=1e3,A.ordfeminine=370,A.Lslash=556,A.Oslash=778,A.OE=1e3,A.ordmasculine=365,A.ae=889,A.dotlessi=278,A.lslash=222,A.oslash=611,A.oe=944,A.germandbls=611,A.Idieresis=278,A.eacute=556,A.abreve=556,A.uhungarumlaut=556,A.ecaron=556,A.Ydieresis=667,A.divide=584,A.Yacute=667,A.Acircumflex=667,A.aacute=556,A.Ucircumflex=722,A.yacute=500,A.scommaaccent=500,A.ecircumflex=556,A.Uring=722,A.Udieresis=722,A.aogonek=556,A.Uacute=722,A.uogonek=556,A.Edieresis=667,A.Dcroat=722,A.commaaccent=250,A.copyright=737,A.Emacron=667,A.ccaron=500,A.aring=556,A.Ncommaaccent=722,A.lacute=222,A.agrave=556,A.Tcommaaccent=611,A.Cacute=722,A.atilde=556,A.Edotaccent=667,A.scaron=500,A.scedilla=500,A.iacute=278,A.lozenge=471,A.Rcaron=722,A.Gcommaaccent=778,A.ucircumflex=556,A.acircumflex=556,A.Amacron=667,A.rcaron=333,A.ccedilla=500,A.Zdotaccent=611,A.Thorn=667,A.Omacron=778,A.Racute=722,A.Sacute=667,A.dcaron=643,A.Umacron=722,A.uring=556,A.threesuperior=333,A.Ograve=778,A.Agrave=667,A.Abreve=667,A.multiply=584,A.uacute=556,A.Tcaron=611,A.partialdiff=476,A.ydieresis=500,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=667,A.adieresis=556,A.edieresis=556,A.cacute=500,A.nacute=556,A.umacron=556,A.Ncaron=722,A.Iacute=278,A.plusminus=584,A.brokenbar=260,A.registered=737,A.Gbreve=778,A.Idotaccent=278,A.summation=600,A.Egrave=667,A.racute=333,A.omacron=556,A.Zacute=611,A.Zcaron=611,A.greaterequal=549,A.Eth=722,A.Ccedilla=722,A.lcommaaccent=222,A.tcaron=317,A.eogonek=556,A.Uogonek=722,A.Aacute=667,A.Adieresis=667,A.egrave=556,A.zacute=500,A.iogonek=222,A.Oacute=778,A.oacute=556,A.amacron=556,A.sacute=500,A.idieresis=278,A.Ocircumflex=778,A.Ugrave=722,A.Delta=612,A.thorn=556,A.twosuperior=333,A.Odieresis=778,A.mu=556,A.igrave=278,A.ohungarumlaut=556,A.Eogonek=667,A.dcroat=556,A.threequarters=834,A.Scedilla=667,A.lcaron=299,A.Kcommaaccent=667,A.Lacute=556,A.trademark=1e3,A.edotaccent=556,A.Igrave=278,A.Imacron=278,A.Lcaron=556,A.onehalf=834,A.lessequal=549,A.ocircumflex=556,A.ntilde=556,A.Uhungarumlaut=722,A.Eacute=667,A.emacron=556,A.gbreve=556,A.onequarter=834,A.Scaron=667,A.Scommaaccent=667,A.Ohungarumlaut=778,A.degree=400,A.ograve=556,A.Ccaron=722,A.ugrave=556,A.radical=453,A.Dcaron=722,A.rcommaaccent=333,A.Ntilde=722,A.otilde=556,A.Rcommaaccent=722,A.Lcommaaccent=556,A.Atilde=667,A.Aogonek=667,A.Aring=667,A.Otilde=778,A.zdotaccent=500,A.Ecaron=667,A.Iogonek=278,A.kcommaaccent=500,A.minus=584,A.Icircumflex=278,A.ncaron=556,A.tcommaaccent=278,A.logicalnot=584,A.odieresis=556,A.udieresis=556,A.notequal=549,A.gcommaaccent=556,A.eth=556,A.zcaron=500,A.ncommaaccent=556,A.onesuperior=333,A.imacron=278,A.Euro=556}),A.Symbol=ri(function(A){A.space=250,A.exclam=333,A.universal=713,A.numbersign=500,A.existential=549,A.percent=833,A.ampersand=778,A.suchthat=439,A.parenleft=333,A.parenright=333,A.asteriskmath=500,A.plus=549,A.comma=250,A.minus=549,A.period=250,A.slash=278,A.zero=500,A.one=500,A.two=500,A.three=500,A.four=500,A.five=500,A.six=500,A.seven=500,A.eight=500,A.nine=500,A.colon=278,A.semicolon=278,A.less=549,A.equal=549,A.greater=549,A.question=444,A.congruent=549,A.Alpha=722,A.Beta=667,A.Chi=722,A.Delta=612,A.Epsilon=611,A.Phi=763,A.Gamma=603,A.Eta=722,A.Iota=333,A.theta1=631,A.Kappa=722,A.Lambda=686,A.Mu=889,A.Nu=722,A.Omicron=722,A.Pi=768,A.Theta=741,A.Rho=556,A.Sigma=592,A.Tau=611,A.Upsilon=690,A.sigma1=439,A.Omega=768,A.Xi=645,A.Psi=795,A.Zeta=611,A.bracketleft=333,A.therefore=863,A.bracketright=333,A.perpendicular=658,A.underscore=500,A.radicalex=500,A.alpha=631,A.beta=549,A.chi=549,A.delta=494,A.epsilon=439,A.phi=521,A.gamma=411,A.eta=603,A.iota=329,A.phi1=603,A.kappa=549,A.lambda=549,A.mu=576,A.nu=521,A.omicron=549,A.pi=549,A.theta=521,A.rho=549,A.sigma=603,A.tau=439,A.upsilon=576,A.omega1=713,A.omega=686,A.xi=493,A.psi=686,A.zeta=494,A.braceleft=480,A.bar=200,A.braceright=480,A.similar=549,A.Euro=750,A.Upsilon1=620,A.minute=247,A.lessequal=549,A.fraction=167,A.infinity=713,A.florin=500,A.club=753,A.diamond=753,A.heart=753,A.spade=753,A.arrowboth=1042,A.arrowleft=987,A.arrowup=603,A.arrowright=987,A.arrowdown=603,A.degree=400,A.plusminus=549,A.second=411,A.greaterequal=549,A.multiply=549,A.proportional=713,A.partialdiff=494,A.bullet=460,A.divide=549,A.notequal=549,A.equivalence=549,A.approxequal=549,A.ellipsis=1e3,A.arrowvertex=603,A.arrowhorizex=1e3,A.carriagereturn=658,A.aleph=823,A.Ifraktur=686,A.Rfraktur=795,A.weierstrass=987,A.circlemultiply=768,A.circleplus=768,A.emptyset=823,A.intersection=768,A.union=768,A.propersuperset=713,A.reflexsuperset=713,A.notsubset=713,A.propersubset=713,A.reflexsubset=713,A.element=713,A.notelement=713,A.angle=768,A.gradient=713,A.registerserif=790,A.copyrightserif=790,A.trademarkserif=890,A.product=823,A.radical=549,A.dotmath=250,A.logicalnot=713,A.logicaland=603,A.logicalor=603,A.arrowdblboth=1042,A.arrowdblleft=987,A.arrowdblup=603,A.arrowdblright=987,A.arrowdbldown=603,A.lozenge=494,A.angleleft=329,A.registersans=790,A.copyrightsans=790,A.trademarksans=786,A.summation=713,A.parenlefttp=384,A.parenleftex=384,A.parenleftbt=384,A.bracketlefttp=384,A.bracketleftex=384,A.bracketleftbt=384,A.bracelefttp=494,A.braceleftmid=494,A.braceleftbt=494,A.braceex=494,A.angleright=329,A.integral=274,A.integraltp=686,A.integralex=686,A.integralbt=686,A.parenrighttp=384,A.parenrightex=384,A.parenrightbt=384,A.bracketrighttp=384,A.bracketrightex=384,A.bracketrightbt=384,A.bracerighttp=494,A.bracerightmid=494,A.bracerightbt=494,A.apple=790}),A["Times-Roman"]=ri(function(A){A.space=250,A.exclam=333,A.quotedbl=408,A.numbersign=500,A.dollar=500,A.percent=833,A.ampersand=778,A.quoteright=333,A.parenleft=333,A.parenright=333,A.asterisk=500,A.plus=564,A.comma=250,A.hyphen=333,A.period=250,A.slash=278,A.zero=500,A.one=500,A.two=500,A.three=500,A.four=500,A.five=500,A.six=500,A.seven=500,A.eight=500,A.nine=500,A.colon=278,A.semicolon=278,A.less=564,A.equal=564,A.greater=564,A.question=444,A.at=921,A.A=722,A.B=667,A.C=667,A.D=722,A.E=611,A.F=556,A.G=722,A.H=722,A.I=333,A.J=389,A.K=722,A.L=611,A.M=889,A.N=722,A.O=722,A.P=556,A.Q=722,A.R=667,A.S=556,A.T=611,A.U=722,A.V=722,A.W=944,A.X=722,A.Y=722,A.Z=611,A.bracketleft=333,A.backslash=278,A.bracketright=333,A.asciicircum=469,A.underscore=500,A.quoteleft=333,A.a=444,A.b=500,A.c=444,A.d=500,A.e=444,A.f=333,A.g=500,A.h=500,A.i=278,A.j=278,A.k=500,A.l=278,A.m=778,A.n=500,A.o=500,A.p=500,A.q=500,A.r=333,A.s=389,A.t=278,A.u=500,A.v=500,A.w=722,A.x=500,A.y=500,A.z=444,A.braceleft=480,A.bar=200,A.braceright=480,A.asciitilde=541,A.exclamdown=333,A.cent=500,A.sterling=500,A.fraction=167,A.yen=500,A.florin=500,A.section=500,A.currency=500,A.quotesingle=180,A.quotedblleft=444,A.guillemotleft=500,A.guilsinglleft=333,A.guilsinglright=333,A.fi=556,A.fl=556,A.endash=500,A.dagger=500,A.daggerdbl=500,A.periodcentered=250,A.paragraph=453,A.bullet=350,A.quotesinglbase=333,A.quotedblbase=444,A.quotedblright=444,A.guillemotright=500,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=444,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=889,A.ordfeminine=276,A.Lslash=611,A.Oslash=722,A.OE=889,A.ordmasculine=310,A.ae=667,A.dotlessi=278,A.lslash=278,A.oslash=500,A.oe=722,A.germandbls=500,A.Idieresis=333,A.eacute=444,A.abreve=444,A.uhungarumlaut=500,A.ecaron=444,A.Ydieresis=722,A.divide=564,A.Yacute=722,A.Acircumflex=722,A.aacute=444,A.Ucircumflex=722,A.yacute=500,A.scommaaccent=389,A.ecircumflex=444,A.Uring=722,A.Udieresis=722,A.aogonek=444,A.Uacute=722,A.uogonek=500,A.Edieresis=611,A.Dcroat=722,A.commaaccent=250,A.copyright=760,A.Emacron=611,A.ccaron=444,A.aring=444,A.Ncommaaccent=722,A.lacute=278,A.agrave=444,A.Tcommaaccent=611,A.Cacute=667,A.atilde=444,A.Edotaccent=611,A.scaron=389,A.scedilla=389,A.iacute=278,A.lozenge=471,A.Rcaron=667,A.Gcommaaccent=722,A.ucircumflex=500,A.acircumflex=444,A.Amacron=722,A.rcaron=333,A.ccedilla=444,A.Zdotaccent=611,A.Thorn=556,A.Omacron=722,A.Racute=667,A.Sacute=556,A.dcaron=588,A.Umacron=722,A.uring=500,A.threesuperior=300,A.Ograve=722,A.Agrave=722,A.Abreve=722,A.multiply=564,A.uacute=500,A.Tcaron=611,A.partialdiff=476,A.ydieresis=500,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=611,A.adieresis=444,A.edieresis=444,A.cacute=444,A.nacute=500,A.umacron=500,A.Ncaron=722,A.Iacute=333,A.plusminus=564,A.brokenbar=200,A.registered=760,A.Gbreve=722,A.Idotaccent=333,A.summation=600,A.Egrave=611,A.racute=333,A.omacron=500,A.Zacute=611,A.Zcaron=611,A.greaterequal=549,A.Eth=722,A.Ccedilla=667,A.lcommaaccent=278,A.tcaron=326,A.eogonek=444,A.Uogonek=722,A.Aacute=722,A.Adieresis=722,A.egrave=444,A.zacute=444,A.iogonek=278,A.Oacute=722,A.oacute=500,A.amacron=444,A.sacute=389,A.idieresis=278,A.Ocircumflex=722,A.Ugrave=722,A.Delta=612,A.thorn=500,A.twosuperior=300,A.Odieresis=722,A.mu=500,A.igrave=278,A.ohungarumlaut=500,A.Eogonek=611,A.dcroat=500,A.threequarters=750,A.Scedilla=556,A.lcaron=344,A.Kcommaaccent=722,A.Lacute=611,A.trademark=980,A.edotaccent=444,A.Igrave=333,A.Imacron=333,A.Lcaron=611,A.onehalf=750,A.lessequal=549,A.ocircumflex=500,A.ntilde=500,A.Uhungarumlaut=722,A.Eacute=611,A.emacron=444,A.gbreve=500,A.onequarter=750,A.Scaron=556,A.Scommaaccent=556,A.Ohungarumlaut=722,A.degree=400,A.ograve=500,A.Ccaron=667,A.ugrave=500,A.radical=453,A.Dcaron=722,A.rcommaaccent=333,A.Ntilde=722,A.otilde=500,A.Rcommaaccent=667,A.Lcommaaccent=611,A.Atilde=722,A.Aogonek=722,A.Aring=722,A.Otilde=722,A.zdotaccent=444,A.Ecaron=611,A.Iogonek=333,A.kcommaaccent=500,A.minus=564,A.Icircumflex=333,A.ncaron=500,A.tcommaaccent=278,A.logicalnot=564,A.odieresis=500,A.udieresis=500,A.notequal=549,A.gcommaaccent=500,A.eth=500,A.zcaron=444,A.ncommaaccent=500,A.onesuperior=300,A.imacron=278,A.Euro=500}),A["Times-Bold"]=ri(function(A){A.space=250,A.exclam=333,A.quotedbl=555,A.numbersign=500,A.dollar=500,A.percent=1e3,A.ampersand=833,A.quoteright=333,A.parenleft=333,A.parenright=333,A.asterisk=500,A.plus=570,A.comma=250,A.hyphen=333,A.period=250,A.slash=278,A.zero=500,A.one=500,A.two=500,A.three=500,A.four=500,A.five=500,A.six=500,A.seven=500,A.eight=500,A.nine=500,A.colon=333,A.semicolon=333,A.less=570,A.equal=570,A.greater=570,A.question=500,A.at=930,A.A=722,A.B=667,A.C=722,A.D=722,A.E=667,A.F=611,A.G=778,A.H=778,A.I=389,A.J=500,A.K=778,A.L=667,A.M=944,A.N=722,A.O=778,A.P=611,A.Q=778,A.R=722,A.S=556,A.T=667,A.U=722,A.V=722,A.W=1e3,A.X=722,A.Y=722,A.Z=667,A.bracketleft=333,A.backslash=278,A.bracketright=333,A.asciicircum=581,A.underscore=500,A.quoteleft=333,A.a=500,A.b=556,A.c=444,A.d=556,A.e=444,A.f=333,A.g=500,A.h=556,A.i=278,A.j=333,A.k=556,A.l=278,A.m=833,A.n=556,A.o=500,A.p=556,A.q=556,A.r=444,A.s=389,A.t=333,A.u=556,A.v=500,A.w=722,A.x=500,A.y=500,A.z=444,A.braceleft=394,A.bar=220,A.braceright=394,A.asciitilde=520,A.exclamdown=333,A.cent=500,A.sterling=500,A.fraction=167,A.yen=500,A.florin=500,A.section=500,A.currency=500,A.quotesingle=278,A.quotedblleft=500,A.guillemotleft=500,A.guilsinglleft=333,A.guilsinglright=333,A.fi=556,A.fl=556,A.endash=500,A.dagger=500,A.daggerdbl=500,A.periodcentered=250,A.paragraph=540,A.bullet=350,A.quotesinglbase=333,A.quotedblbase=500,A.quotedblright=500,A.guillemotright=500,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=500,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=1e3,A.ordfeminine=300,A.Lslash=667,A.Oslash=778,A.OE=1e3,A.ordmasculine=330,A.ae=722,A.dotlessi=278,A.lslash=278,A.oslash=500,A.oe=722,A.germandbls=556,A.Idieresis=389,A.eacute=444,A.abreve=500,A.uhungarumlaut=556,A.ecaron=444,A.Ydieresis=722,A.divide=570,A.Yacute=722,A.Acircumflex=722,A.aacute=500,A.Ucircumflex=722,A.yacute=500,A.scommaaccent=389,A.ecircumflex=444,A.Uring=722,A.Udieresis=722,A.aogonek=500,A.Uacute=722,A.uogonek=556,A.Edieresis=667,A.Dcroat=722,A.commaaccent=250,A.copyright=747,A.Emacron=667,A.ccaron=444,A.aring=500,A.Ncommaaccent=722,A.lacute=278,A.agrave=500,A.Tcommaaccent=667,A.Cacute=722,A.atilde=500,A.Edotaccent=667,A.scaron=389,A.scedilla=389,A.iacute=278,A.lozenge=494,A.Rcaron=722,A.Gcommaaccent=778,A.ucircumflex=556,A.acircumflex=500,A.Amacron=722,A.rcaron=444,A.ccedilla=444,A.Zdotaccent=667,A.Thorn=611,A.Omacron=778,A.Racute=722,A.Sacute=556,A.dcaron=672,A.Umacron=722,A.uring=556,A.threesuperior=300,A.Ograve=778,A.Agrave=722,A.Abreve=722,A.multiply=570,A.uacute=556,A.Tcaron=667,A.partialdiff=494,A.ydieresis=500,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=667,A.adieresis=500,A.edieresis=444,A.cacute=444,A.nacute=556,A.umacron=556,A.Ncaron=722,A.Iacute=389,A.plusminus=570,A.brokenbar=220,A.registered=747,A.Gbreve=778,A.Idotaccent=389,A.summation=600,A.Egrave=667,A.racute=444,A.omacron=500,A.Zacute=667,A.Zcaron=667,A.greaterequal=549,A.Eth=722,A.Ccedilla=722,A.lcommaaccent=278,A.tcaron=416,A.eogonek=444,A.Uogonek=722,A.Aacute=722,A.Adieresis=722,A.egrave=444,A.zacute=444,A.iogonek=278,A.Oacute=778,A.oacute=500,A.amacron=500,A.sacute=389,A.idieresis=278,A.Ocircumflex=778,A.Ugrave=722,A.Delta=612,A.thorn=556,A.twosuperior=300,A.Odieresis=778,A.mu=556,A.igrave=278,A.ohungarumlaut=500,A.Eogonek=667,A.dcroat=556,A.threequarters=750,A.Scedilla=556,A.lcaron=394,A.Kcommaaccent=778,A.Lacute=667,A.trademark=1e3,A.edotaccent=444,A.Igrave=389,A.Imacron=389,A.Lcaron=667,A.onehalf=750,A.lessequal=549,A.ocircumflex=500,A.ntilde=556,A.Uhungarumlaut=722,A.Eacute=667,A.emacron=444,A.gbreve=500,A.onequarter=750,A.Scaron=556,A.Scommaaccent=556,A.Ohungarumlaut=778,A.degree=400,A.ograve=500,A.Ccaron=722,A.ugrave=556,A.radical=549,A.Dcaron=722,A.rcommaaccent=444,A.Ntilde=722,A.otilde=500,A.Rcommaaccent=722,A.Lcommaaccent=667,A.Atilde=722,A.Aogonek=722,A.Aring=722,A.Otilde=778,A.zdotaccent=444,A.Ecaron=667,A.Iogonek=389,A.kcommaaccent=556,A.minus=570,A.Icircumflex=389,A.ncaron=556,A.tcommaaccent=333,A.logicalnot=570,A.odieresis=500,A.udieresis=556,A.notequal=549,A.gcommaaccent=500,A.eth=500,A.zcaron=444,A.ncommaaccent=556,A.onesuperior=300,A.imacron=278,A.Euro=500}),A["Times-BoldItalic"]=ri(function(A){A.space=250,A.exclam=389,A.quotedbl=555,A.numbersign=500,A.dollar=500,A.percent=833,A.ampersand=778,A.quoteright=333,A.parenleft=333,A.parenright=333,A.asterisk=500,A.plus=570,A.comma=250,A.hyphen=333,A.period=250,A.slash=278,A.zero=500,A.one=500,A.two=500,A.three=500,A.four=500,A.five=500,A.six=500,A.seven=500,A.eight=500,A.nine=500,A.colon=333,A.semicolon=333,A.less=570,A.equal=570,A.greater=570,A.question=500,A.at=832,A.A=667,A.B=667,A.C=667,A.D=722,A.E=667,A.F=667,A.G=722,A.H=778,A.I=389,A.J=500,A.K=667,A.L=611,A.M=889,A.N=722,A.O=722,A.P=611,A.Q=722,A.R=667,A.S=556,A.T=611,A.U=722,A.V=667,A.W=889,A.X=667,A.Y=611,A.Z=611,A.bracketleft=333,A.backslash=278,A.bracketright=333,A.asciicircum=570,A.underscore=500,A.quoteleft=333,A.a=500,A.b=500,A.c=444,A.d=500,A.e=444,A.f=333,A.g=500,A.h=556,A.i=278,A.j=278,A.k=500,A.l=278,A.m=778,A.n=556,A.o=500,A.p=500,A.q=500,A.r=389,A.s=389,A.t=278,A.u=556,A.v=444,A.w=667,A.x=500,A.y=444,A.z=389,A.braceleft=348,A.bar=220,A.braceright=348,A.asciitilde=570,A.exclamdown=389,A.cent=500,A.sterling=500,A.fraction=167,A.yen=500,A.florin=500,A.section=500,A.currency=500,A.quotesingle=278,A.quotedblleft=500,A.guillemotleft=500,A.guilsinglleft=333,A.guilsinglright=333,A.fi=556,A.fl=556,A.endash=500,A.dagger=500,A.daggerdbl=500,A.periodcentered=250,A.paragraph=500,A.bullet=350,A.quotesinglbase=333,A.quotedblbase=500,A.quotedblright=500,A.guillemotright=500,A.ellipsis=1e3,A.perthousand=1e3,A.questiondown=500,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=1e3,A.AE=944,A.ordfeminine=266,A.Lslash=611,A.Oslash=722,A.OE=944,A.ordmasculine=300,A.ae=722,A.dotlessi=278,A.lslash=278,A.oslash=500,A.oe=722,A.germandbls=500,A.Idieresis=389,A.eacute=444,A.abreve=500,A.uhungarumlaut=556,A.ecaron=444,A.Ydieresis=611,A.divide=570,A.Yacute=611,A.Acircumflex=667,A.aacute=500,A.Ucircumflex=722,A.yacute=444,A.scommaaccent=389,A.ecircumflex=444,A.Uring=722,A.Udieresis=722,A.aogonek=500,A.Uacute=722,A.uogonek=556,A.Edieresis=667,A.Dcroat=722,A.commaaccent=250,A.copyright=747,A.Emacron=667,A.ccaron=444,A.aring=500,A.Ncommaaccent=722,A.lacute=278,A.agrave=500,A.Tcommaaccent=611,A.Cacute=667,A.atilde=500,A.Edotaccent=667,A.scaron=389,A.scedilla=389,A.iacute=278,A.lozenge=494,A.Rcaron=667,A.Gcommaaccent=722,A.ucircumflex=556,A.acircumflex=500,A.Amacron=667,A.rcaron=389,A.ccedilla=444,A.Zdotaccent=611,A.Thorn=611,A.Omacron=722,A.Racute=667,A.Sacute=556,A.dcaron=608,A.Umacron=722,A.uring=556,A.threesuperior=300,A.Ograve=722,A.Agrave=667,A.Abreve=667,A.multiply=570,A.uacute=556,A.Tcaron=611,A.partialdiff=494,A.ydieresis=444,A.Nacute=722,A.icircumflex=278,A.Ecircumflex=667,A.adieresis=500,A.edieresis=444,A.cacute=444,A.nacute=556,A.umacron=556,A.Ncaron=722,A.Iacute=389,A.plusminus=570,A.brokenbar=220,A.registered=747,A.Gbreve=722,A.Idotaccent=389,A.summation=600,A.Egrave=667,A.racute=389,A.omacron=500,A.Zacute=611,A.Zcaron=611,A.greaterequal=549,A.Eth=722,A.Ccedilla=667,A.lcommaaccent=278,A.tcaron=366,A.eogonek=444,A.Uogonek=722,A.Aacute=667,A.Adieresis=667,A.egrave=444,A.zacute=389,A.iogonek=278,A.Oacute=722,A.oacute=500,A.amacron=500,A.sacute=389,A.idieresis=278,A.Ocircumflex=722,A.Ugrave=722,A.Delta=612,A.thorn=500,A.twosuperior=300,A.Odieresis=722,A.mu=576,A.igrave=278,A.ohungarumlaut=500,A.Eogonek=667,A.dcroat=500,A.threequarters=750,A.Scedilla=556,A.lcaron=382,A.Kcommaaccent=667,A.Lacute=611,A.trademark=1e3,A.edotaccent=444,A.Igrave=389,A.Imacron=389,A.Lcaron=611,A.onehalf=750,A.lessequal=549,A.ocircumflex=500,A.ntilde=556,A.Uhungarumlaut=722,A.Eacute=667,A.emacron=444,A.gbreve=500,A.onequarter=750,A.Scaron=556,A.Scommaaccent=556,A.Ohungarumlaut=722,A.degree=400,A.ograve=500,A.Ccaron=667,A.ugrave=556,A.radical=549,A.Dcaron=722,A.rcommaaccent=389,A.Ntilde=722,A.otilde=500,A.Rcommaaccent=667,A.Lcommaaccent=611,A.Atilde=667,A.Aogonek=667,A.Aring=667,A.Otilde=722,A.zdotaccent=389,A.Ecaron=667,A.Iogonek=389,A.kcommaaccent=500,A.minus=606,A.Icircumflex=389,A.ncaron=556,A.tcommaaccent=278,A.logicalnot=606,A.odieresis=500,A.udieresis=556,A.notequal=549,A.gcommaaccent=500,A.eth=500,A.zcaron=389,A.ncommaaccent=556,A.onesuperior=300,A.imacron=278,A.Euro=500}),A["Times-Italic"]=ri(function(A){A.space=250,A.exclam=333,A.quotedbl=420,A.numbersign=500,A.dollar=500,A.percent=833,A.ampersand=778,A.quoteright=333,A.parenleft=333,A.parenright=333,A.asterisk=500,A.plus=675,A.comma=250,A.hyphen=333,A.period=250,A.slash=278,A.zero=500,A.one=500,A.two=500,A.three=500,A.four=500,A.five=500,A.six=500,A.seven=500,A.eight=500,A.nine=500,A.colon=333,A.semicolon=333,A.less=675,A.equal=675,A.greater=675,A.question=500,A.at=920,A.A=611,A.B=611,A.C=667,A.D=722,A.E=611,A.F=611,A.G=722,A.H=722,A.I=333,A.J=444,A.K=667,A.L=556,A.M=833,A.N=667,A.O=722,A.P=611,A.Q=722,A.R=611,A.S=500,A.T=556,A.U=722,A.V=611,A.W=833,A.X=611,A.Y=556,A.Z=556,A.bracketleft=389,A.backslash=278,A.bracketright=389,A.asciicircum=422,A.underscore=500,A.quoteleft=333,A.a=500,A.b=500,A.c=444,A.d=500,A.e=444,A.f=278,A.g=500,A.h=500,A.i=278,A.j=278,A.k=444,A.l=278,A.m=722,A.n=500,A.o=500,A.p=500,A.q=500,A.r=389,A.s=389,A.t=278,A.u=500,A.v=444,A.w=667,A.x=444,A.y=444,A.z=389,A.braceleft=400,A.bar=275,A.braceright=400,A.asciitilde=541,A.exclamdown=389,A.cent=500,A.sterling=500,A.fraction=167,A.yen=500,A.florin=500,A.section=500,A.currency=500,A.quotesingle=214,A.quotedblleft=556,A.guillemotleft=500,A.guilsinglleft=333,A.guilsinglright=333,A.fi=500,A.fl=500,A.endash=500,A.dagger=500,A.daggerdbl=500,A.periodcentered=250,A.paragraph=523,A.bullet=350,A.quotesinglbase=333,A.quotedblbase=556,A.quotedblright=556,A.guillemotright=500,A.ellipsis=889,A.perthousand=1e3,A.questiondown=500,A.grave=333,A.acute=333,A.circumflex=333,A.tilde=333,A.macron=333,A.breve=333,A.dotaccent=333,A.dieresis=333,A.ring=333,A.cedilla=333,A.hungarumlaut=333,A.ogonek=333,A.caron=333,A.emdash=889,A.AE=889,A.ordfeminine=276,A.Lslash=556,A.Oslash=722,A.OE=944,A.ordmasculine=310,A.ae=667,A.dotlessi=278,A.lslash=278,A.oslash=500,A.oe=667,A.germandbls=500,A.Idieresis=333,A.eacute=444,A.abreve=500,A.uhungarumlaut=500,A.ecaron=444,A.Ydieresis=556,A.divide=675,A.Yacute=556,A.Acircumflex=611,A.aacute=500,A.Ucircumflex=722,A.yacute=444,A.scommaaccent=389,A.ecircumflex=444,A.Uring=722,A.Udieresis=722,A.aogonek=500,A.Uacute=722,A.uogonek=500,A.Edieresis=611,A.Dcroat=722,A.commaaccent=250,A.copyright=760,A.Emacron=611,A.ccaron=444,A.aring=500,A.Ncommaaccent=667,A.lacute=278,A.agrave=500,A.Tcommaaccent=556,A.Cacute=667,A.atilde=500,A.Edotaccent=611,A.scaron=389,A.scedilla=389,A.iacute=278,A.lozenge=471,A.Rcaron=611,A.Gcommaaccent=722,A.ucircumflex=500,A.acircumflex=500,A.Amacron=611,A.rcaron=389,A.ccedilla=444,A.Zdotaccent=556,A.Thorn=611,A.Omacron=722,A.Racute=611,A.Sacute=500,A.dcaron=544,A.Umacron=722,A.uring=500,A.threesuperior=300,A.Ograve=722,A.Agrave=611,A.Abreve=611,A.multiply=675,A.uacute=500,A.Tcaron=556,A.partialdiff=476,A.ydieresis=444,A.Nacute=667,A.icircumflex=278,A.Ecircumflex=611,A.adieresis=500,A.edieresis=444,A.cacute=444,A.nacute=500,A.umacron=500,A.Ncaron=667,A.Iacute=333,A.plusminus=675,A.brokenbar=275,A.registered=760,A.Gbreve=722,A.Idotaccent=333,A.summation=600,A.Egrave=611,A.racute=389,A.omacron=500,A.Zacute=556,A.Zcaron=556,A.greaterequal=549,A.Eth=722,A.Ccedilla=667,A.lcommaaccent=278,A.tcaron=300,A.eogonek=444,A.Uogonek=722,A.Aacute=611,A.Adieresis=611,A.egrave=444,A.zacute=389,A.iogonek=278,A.Oacute=722,A.oacute=500,A.amacron=500,A.sacute=389,A.idieresis=278,A.Ocircumflex=722,A.Ugrave=722,A.Delta=612,A.thorn=500,A.twosuperior=300,A.Odieresis=722,A.mu=500,A.igrave=278,A.ohungarumlaut=500,A.Eogonek=611,A.dcroat=500,A.threequarters=750,A.Scedilla=500,A.lcaron=300,A.Kcommaaccent=667,A.Lacute=556,A.trademark=980,A.edotaccent=444,A.Igrave=333,A.Imacron=333,A.Lcaron=611,A.onehalf=750,A.lessequal=549,A.ocircumflex=500,A.ntilde=500,A.Uhungarumlaut=722,A.Eacute=611,A.emacron=444,A.gbreve=500,A.onequarter=750,A.Scaron=500,A.Scommaaccent=500,A.Ohungarumlaut=722,A.degree=400,A.ograve=500,A.Ccaron=667,A.ugrave=500,A.radical=453,A.Dcaron=722,A.rcommaaccent=389,A.Ntilde=667,A.otilde=500,A.Rcommaaccent=611,A.Lcommaaccent=556,A.Atilde=611,A.Aogonek=611,A.Aring=611,A.Otilde=722,A.zdotaccent=389,A.Ecaron=611,A.Iogonek=333,A.kcommaaccent=444,A.minus=675,A.Icircumflex=333,A.ncaron=500,A.tcommaaccent=278,A.logicalnot=675,A.odieresis=500,A.udieresis=500,A.notequal=549,A.gcommaaccent=500,A.eth=500,A.zcaron=389,A.ncommaaccent=500,A.onesuperior=300,A.imacron=278,A.Euro=500}),A.ZapfDingbats=ri(function(A){A.space=278,A.a1=974,A.a2=961,A.a202=974,A.a3=980,A.a4=719,A.a5=789,A.a119=790,A.a118=791,A.a117=690,A.a11=960,A.a12=939,A.a13=549,A.a14=855,A.a15=911,A.a16=933,A.a105=911,A.a17=945,A.a18=974,A.a19=755,A.a20=846,A.a21=762,A.a22=761,A.a23=571,A.a24=677,A.a25=763,A.a26=760,A.a27=759,A.a28=754,A.a6=494,A.a7=552,A.a8=537,A.a9=577,A.a10=692,A.a29=786,A.a30=788,A.a31=788,A.a32=790,A.a33=793,A.a34=794,A.a35=816,A.a36=823,A.a37=789,A.a38=841,A.a39=823,A.a40=833,A.a41=816,A.a42=831,A.a43=923,A.a44=744,A.a45=723,A.a46=749,A.a47=790,A.a48=792,A.a49=695,A.a50=776,A.a51=768,A.a52=792,A.a53=759,A.a54=707,A.a55=708,A.a56=682,A.a57=701,A.a58=826,A.a59=815,A.a60=789,A.a61=789,A.a62=707,A.a63=687,A.a64=696,A.a65=689,A.a66=786,A.a67=787,A.a68=713,A.a69=791,A.a70=785,A.a71=791,A.a72=873,A.a73=761,A.a74=762,A.a203=762,A.a75=759,A.a204=759,A.a76=892,A.a77=892,A.a78=788,A.a79=784,A.a81=438,A.a82=138,A.a83=277,A.a84=415,A.a97=392,A.a98=392,A.a99=668,A.a100=668,A.a89=390,A.a90=390,A.a93=317,A.a94=317,A.a91=276,A.a92=276,A.a205=509,A.a85=509,A.a206=410,A.a86=410,A.a87=234,A.a88=234,A.a95=334,A.a96=334,A.a101=732,A.a102=544,A.a103=544,A.a104=910,A.a106=667,A.a107=760,A.a108=760,A.a112=776,A.a111=595,A.a110=694,A.a109=626,A.a120=788,A.a121=788,A.a122=788,A.a123=788,A.a124=788,A.a125=788,A.a126=788,A.a127=788,A.a128=788,A.a129=788,A.a130=788,A.a131=788,A.a132=788,A.a133=788,A.a134=788,A.a135=788,A.a136=788,A.a137=788,A.a138=788,A.a139=788,A.a140=788,A.a141=788,A.a142=788,A.a143=788,A.a144=788,A.a145=788,A.a146=788,A.a147=788,A.a148=788,A.a149=788,A.a150=788,A.a151=788,A.a152=788,A.a153=788,A.a154=788,A.a155=788,A.a156=788,A.a157=788,A.a158=788,A.a159=788,A.a160=894,A.a161=838,A.a163=1016,A.a164=458,A.a196=748,A.a165=924,A.a192=748,A.a166=918,A.a167=927,A.a168=928,A.a169=928,A.a170=834,A.a171=873,A.a172=828,A.a173=924,A.a162=924,A.a174=917,A.a175=930,A.a176=931,A.a177=463,A.a178=883,A.a179=836,A.a193=836,A.a180=867,A.a199=867,A.a181=696,A.a200=696,A.a182=874,A.a201=874,A.a183=760,A.a184=946,A.a197=771,A.a185=865,A.a194=771,A.a198=888,A.a186=967,A.a195=888,A.a187=831,A.a188=873,A.a189=927,A.a190=970,A.a191=918})}),Hg=ri(function(A){A.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},A["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},A["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},A["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},A.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},A["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},A["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},A["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},A["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},A["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},A["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},A["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},A.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},A.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}});class Yg{constructor({glyfTable:A,isGlyphLocationsLong:e,locaTable:t,numGlyphs:i}){this.glyphs=[];const a=new DataView(t.buffer,t.byteOffset,t.byteLength),s=new DataView(A.buffer,A.byteOffset,A.byteLength),n=e?4:2;let g=e?a.getUint32(0):2*a.getUint16(0),r=0;for(let A=0;A<i;A++){r+=n;const A=e?a.getUint32(r):2*a.getUint16(r);if(A===g){this.glyphs.push(new vg({}));continue}const t=vg.parse(g,s);this.glyphs.push(t),g=A}}getSize(){return this.glyphs.reduce((A,e)=>A+(e.getSize()+3&-4),0)}write(){const A=this.getSize(),e=new DataView(new ArrayBuffer(A)),t=A>131070,i=t?4:2,a=new DataView(new ArrayBuffer((this.glyphs.length+1)*i));t?a.setUint32(0,0):a.setUint16(0,0);let s=0,n=0;for(const A of this.glyphs)s+=A.write(s,e),s=s+3&-4,n+=i,t?a.setUint32(n,s):a.setUint16(n,s>>1);return{isLocationLong:t,loca:new Uint8Array(a.buffer),glyf:new Uint8Array(e.buffer)}}scale(A){for(let e=0,t=this.glyphs.length;e<t;e++)this.glyphs[e].scale(A[e])}}class vg{constructor({header:A=null,simple:e=null,composites:t=null}){this.header=A,this.simple=e,this.composites=t}static parse(A,e){const[t,i]=Kg.parse(A,e);if(A+=t,i.numberOfContours<0){const t=[];for(;;){const[i,a]=Pg.parse(A,e);if(A+=i,t.push(a),!(32&a.flags))break}return new vg({header:i,composites:t})}const a=Tg.parse(A,e,i.numberOfContours);return new vg({header:i,simple:a})}getSize(){if(!this.header)return 0;const A=this.simple?this.simple.getSize():this.composites.reduce((A,e)=>A+e.getSize(),0);return this.header.getSize()+A}write(A,e){if(!this.header)return 0;const t=A;if(A+=this.header.write(A,e),this.simple)A+=this.simple.write(A,e);else for(const t of this.composites)A+=t.write(A,e);return A-t}scale(A){if(!this.header)return;const e=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(e,A),this.simple)this.simple.scale(e,A);else for(const t of this.composites)t.scale(e,A)}}class Kg{constructor({numberOfContours:A,xMin:e,yMin:t,xMax:i,yMax:a}){this.numberOfContours=A,this.xMin=e,this.yMin=t,this.xMax=i,this.yMax=a}static parse(A,e){return[10,new Kg({numberOfContours:e.getInt16(A),xMin:e.getInt16(A+2),yMin:e.getInt16(A+4),xMax:e.getInt16(A+6),yMax:e.getInt16(A+8)})]}getSize(){return 10}write(A,e){return e.setInt16(A,this.numberOfContours),e.setInt16(A+2,this.xMin),e.setInt16(A+4,this.yMin),e.setInt16(A+6,this.xMax),e.setInt16(A+8,this.yMax),10}scale(A,e){this.xMin=Math.round(A+(this.xMin-A)*e),this.xMax=Math.round(A+(this.xMax-A)*e)}}class qg{constructor({flags:A,xCoordinates:e,yCoordinates:t}){this.xCoordinates=e,this.yCoordinates=t,this.flags=A}}class Tg{constructor({contours:A,instructions:e}){this.contours=A,this.instructions=e}static parse(A,e,t){const i=[];for(let a=0;a<t;a++){const t=e.getUint16(A);A+=2,i.push(t)}const a=i[t-1]+1,s=e.getUint16(A);A+=2;const n=new Uint8Array(e).slice(A,A+s);A+=s;const g=[];for(let t=0;t<a;A++,t++){let i=e.getUint8(A);if(g.push(i),8&i){const a=e.getUint8(++A);i^=8;for(let A=0;A<a;A++)g.push(i);t+=a}}const r=[];let o=[],I=[],c=[];const C=[];let B=0,h=0;for(let t=0;t<a;t++){const a=g[t];if(2&a){const t=e.getUint8(A++);h+=16&a?t:-t,o.push(h)}else 16&a||(h+=e.getInt16(A),A+=2),o.push(h);i[B]===t&&(B++,r.push(o),o=[])}h=0,B=0;for(let t=0;t<a;t++){const a=g[t];if(4&a){const t=e.getUint8(A++);h+=32&a?t:-t,I.push(h)}else 32&a||(h+=e.getInt16(A),A+=2),I.push(h);c.push(1&a|64&a),i[B]===t&&(o=r[B],B++,C.push(new qg({flags:c,xCoordinates:o,yCoordinates:I})),I=[],c=[])}return new Tg({contours:C,instructions:n})}getSize(){let A=2*this.contours.length+2+this.instructions.length,e=0,t=0;for(const i of this.contours){A+=i.flags.length;for(let a=0,s=i.xCoordinates.length;a<s;a++){const s=i.xCoordinates[a],n=i.yCoordinates[a];let g=Math.abs(s-e);g>255?A+=2:g>0&&(A+=1),e=s,g=Math.abs(n-t),g>255?A+=2:g>0&&(A+=1),t=n}}return A}write(A,e){const t=A,i=[],a=[],s=[];let n=0,g=0;for(const t of this.contours){for(let A=0,e=t.xCoordinates.length;A<e;A++){let e=t.flags[A];const r=t.xCoordinates[A];let o=r-n;if(0===o)e|=16,i.push(0);else{const A=Math.abs(o);A<=255?(e|=o>=0?18:2,i.push(A)):i.push(o)}n=r;const I=t.yCoordinates[A];if(o=I-g,0===o)e|=32,a.push(0);else{const A=Math.abs(o);A<=255?(e|=o>=0?36:4,a.push(A)):a.push(o)}g=I,s.push(e)}e.setUint16(A,i.length-1),A+=2}e.setUint16(A,this.instructions.length),A+=2,this.instructions.length&&(new Uint8Array(e.buffer,0,e.buffer.byteLength).set(this.instructions,A),A+=this.instructions.length);for(const t of s)e.setUint8(A++,t);for(let t=0,a=i.length;t<a;t++){const a=i[t],n=s[t];2&n?e.setUint8(A++,a):16&n||(e.setInt16(A,a),A+=2)}for(let t=0,i=a.length;t<i;t++){const i=a[t],n=s[t];4&n?e.setUint8(A++,i):32&n||(e.setInt16(A,i),A+=2)}return A-t}scale(A,e){for(const t of this.contours)if(0!==t.xCoordinates.length)for(let i=0,a=t.xCoordinates.length;i<a;i++)t.xCoordinates[i]=Math.round(A+(t.xCoordinates[i]-A)*e)}}class Pg{constructor({flags:A,glyphIndex:e,argument1:t,argument2:i,transf:a,instructions:s}){this.flags=A,this.glyphIndex=e,this.argument1=t,this.argument2=i,this.transf=a,this.instructions=s}static parse(A,e){const t=A,i=[];let a=e.getUint16(A);const s=e.getUint16(A+2);let n,g;A+=4,1&a?(2&a?(n=e.getInt16(A),g=e.getInt16(A+2)):(n=e.getUint16(A),g=e.getUint16(A+2)),A+=4,a^=1):(2&a?(n=e.getInt8(A),g=e.getInt8(A+1)):(n=e.getUint8(A),g=e.getUint8(A+1)),A+=2),8&a?(i.push(e.getUint16(A)),A+=2):64&a?(i.push(e.getUint16(A),e.getUint16(A+2)),A+=4):128&a&&(i.push(e.getUint16(A),e.getUint16(A+2),e.getUint16(A+4),e.getUint16(A+6)),A+=8);let r=null;if(256&a){const t=e.getUint16(A);A+=2,r=new Uint8Array(e).slice(A,A+t),A+=t}return[A-t,new Pg({flags:a,glyphIndex:s,argument1:n,argument2:g,transf:i,instructions:r})]}getSize(){let A=4+2*this.transf.length;return 256&this.flags&&(A+=2+this.instructions.length),A+=2,2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(A+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(A+=2),A}write(A,e){const t=A;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),e.setUint16(A,this.flags),e.setUint16(A+2,this.glyphIndex),A+=4,1&this.flags?(2&this.flags?(e.setInt16(A,this.argument1),e.setInt16(A+2,this.argument2)):(e.setUint16(A,this.argument1),e.setUint16(A+2,this.argument2)),A+=4):(e.setUint8(A,this.argument1),e.setUint8(A+1,this.argument2),A+=2),256&this.flags&&(e.setUint16(A,this.instructions.length),A+=2,this.instructions.length&&(new Uint8Array(e.buffer,0,e.buffer.byteLength).set(this.instructions,A),A+=this.instructions.length)),A-t}scale(A,e){}}function Wg(A,e,t){A[e]=t>>8&255,A[e+1]=255&t}function Zg(A,e,t){A[e]=t>>24&255,A[e+1]=t>>16&255,A[e+2]=t>>8&255,A[e+3]=255&t}function Og(A,e,t){if(t instanceof Uint8Array)A.set(t,e);else if("string"==typeof t)for(let i=0,a=t.length;i<a;i++)A[e++]=255&t.charCodeAt(i);else for(const i of t)A[e++]=255&i}class Xg{constructor(A){this.sfnt=A,this.tables=Object.create(null)}static getSearchParams(A,e){let t=1,i=0;for(;(t^A)>t;)t<<=1,i++;const a=t*e;return{range:a,entry:i,rangeShift:e*A-a}}toArray(){let A=this.sfnt;const e=this.tables,t=Object.keys(e);t.sort();const i=t.length;let a,s,n,g,r,o=12+16*i;const I=[o];for(a=0;a<i;a++){g=e[t[a]];o+=(g.length+3&-4)>>>0,I.push(o)}const c=new Uint8Array(o);for(a=0;a<i;a++)g=e[t[a]],Og(c,I[a],g);"true"===A&&(A=mt(65536)),c[0]=255&A.charCodeAt(0),c[1]=255&A.charCodeAt(1),c[2]=255&A.charCodeAt(2),c[3]=255&A.charCodeAt(3),Wg(c,4,i);const C=Xg.getSearchParams(i,16);for(Wg(c,6,C.range),Wg(c,8,C.entry),Wg(c,10,C.rangeShift),o=12,a=0;a<i;a++){r=t[a],c[o]=255&r.charCodeAt(0),c[o+1]=255&r.charCodeAt(1),c[o+2]=255&r.charCodeAt(2),c[o+3]=255&r.charCodeAt(3);let A=0;for(s=I[a],n=I[a+1];s<n;s+=4){A=A+fi(c,s)>>>0}Zg(c,o+4,A),Zg(c,o+8,I[a]),Zg(c,o+12,e[r].length),o+=16}return c}addTable(A,e){if(A in this.tables)throw new Error("Table "+A+" already exists");this.tables[A]=e}}const Vg=[4],jg=[5],zg=[6],_g=[7],$g=[8],Ar=[12,35],er=[14],tr=[21],ir=[22],ar=[30],sr=[31];class nr{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(A,e,t){const i=A.length;let a,s,n,g=!1;for(let r=0;r<i;r++){let i=A[r];if(i<32){switch(12===i&&(i=(i<<8)+A[++r]),i){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){g=!0;break}const A=this.stack.pop();this.stack.push(0,A);break}g=this.executeCommand(1,Vg);break;case 5:g=this.executeCommand(2,jg);break;case 6:g=this.executeCommand(1,zg);break;case 7:g=this.executeCommand(1,_g);break;case 8:g=this.executeCommand(6,$g);break;case 10:if(this.stack.length<1){g=!0;break}if(n=this.stack.pop(),!e[n]){g=!0;break}g=this.convert(e[n],e,t);break;case 11:return g;case 13:if(this.stack.length<2){g=!0;break}a=this.stack.pop(),s=this.stack.pop(),this.lsb=s,this.width=a,this.stack.push(a,s),g=this.executeCommand(2,ir);break;case 14:this.output.push(er[0]);break;case 21:if(this.flexing)break;g=this.executeCommand(2,tr);break;case 22:if(this.flexing){this.stack.push(0);break}g=this.executeCommand(1,ir);break;case 30:g=this.executeCommand(4,ar);break;case 31:g=this.executeCommand(4,sr);break;case 3078:if(t){const A=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-A,g=this.executeCommand(0,er)}else g=this.executeCommand(4,er);break;case 3079:if(this.stack.length<4){g=!0;break}this.stack.pop(),a=this.stack.pop();const A=this.stack.pop();s=this.stack.pop(),this.lsb=s,this.width=a,this.stack.push(a,s,A),g=this.executeCommand(3,tr);break;case 3084:if(this.stack.length<2){g=!0;break}const r=this.stack.pop(),o=this.stack.pop();this.stack.push(o/r);break;case 3088:if(this.stack.length<2){g=!0;break}n=this.stack.pop();const I=this.stack.pop();if(0===n&&3===I){const A=this.stack.splice(-17,17);this.stack.push(A[2]+A[0],A[3]+A[1],A[4],A[5],A[6],A[7],A[8],A[9],A[10],A[11],A[12],A[13],A[14]),g=this.executeCommand(13,Ar,!0),this.flexing=!1,this.stack.push(A[15],A[16])}else 1===n&&0===I&&(this.flexing=!0);break;case 3089:break;default:gt('Unknown type 1 charstring command of "'+i+'"')}if(g)break}else i<=246?i-=139:i=i<=250?256*(i-247)+A[++r]+108:i<=254?-256*(i-251)-A[++r]-108:(255&A[++r])<<24|(255&A[++r])<<16|(255&A[++r])<<8|255&A[++r],this.stack.push(i)}return g}executeCommand(A,e,t){const i=this.stack.length;if(A>i)return!0;const a=i-A;for(let A=a;A<i;A++){let e=this.stack[A];Number.isInteger(e)?this.output.push(28,e>>8&255,255&e):(e=65536*e|0,this.output.push(255,e>>24&255,e>>16&255,e>>8&255,255&e))}return this.output.push(...e),t?this.stack.splice(a,A):this.stack.length=0,!1}}function gr(A){return A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102}function rr(A,e,t){if(t>=A.length)return new Uint8Array(0);let i,a,s=0|e;for(i=0;i<t;i++)s=52845*(A[i]+s)+22719&65535;const n=A.length-t,g=new Uint8Array(n);for(i=t,a=0;a<n;i++,a++){const e=A[i];g[a]=e^s>>8,s=52845*(e+s)+22719&65535}return g}function or(A){return 47===A||91===A||93===A||123===A||125===A||40===A||41===A}class Ir{constructor(A,e,t){if(e){const e=A.getBytes(),t=!((gr(e[0])||pi(e[0]))&&gr(e[1])&&gr(e[2])&&gr(e[3])&&gr(e[4])&&gr(e[5])&&gr(e[6])&&gr(e[7]));A=new Pi(t?rr(e,55665,4):function(A,e,t){let i=0|e;const a=A.length,s=new Uint8Array(a>>>1);let n,g;for(n=0,g=0;n<a;n++){const e=A[n];if(!gr(e))continue;let t;for(n++;n<a&&!gr(t=A[n]);)n++;if(n<a){const A=parseInt(String.fromCharCode(e,t),16);s[g++]=A^i>>8,i=52845*(A+i)+22719&65535}}return s.slice(t,g)}(e,55665,4))}this.seacAnalysisEnabled=!!t,this.stream=A,this.nextChar()}readNumberArray(){this.getToken();const A=[];for(;;){const e=this.getToken();if(null===e||"]"===e||"}"===e)break;A.push(parseFloat(e||0))}return A}readNumber(){const A=this.getToken();return parseFloat(A||0)}readInt(){const A=this.getToken();return 0|parseInt(A||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let A=!1,e=this.currentChar;for(;;){if(-1===e)return null;if(A)10!==e&&13!==e||(A=!1);else if(37===e)A=!0;else if(!pi(e))break;e=this.nextChar()}if(or(e))return this.nextChar(),String.fromCharCode(e);let t="";do{t+=String.fromCharCode(e),e=this.nextChar()}while(e>=0&&!pi(e)&&!or(e));return t}readCharStrings(A,e){return-1===e?A:rr(A,4330,e)}extractFontProgram(A){const e=this.stream,t=[],i=[],a=Object.create(null);a.lenIV=4;const s={subrs:[],charstrings:[],properties:{privateData:a}};let n,g,r,o;for(;null!==(n=this.getToken());)if("/"===n)switch(n=this.getToken(),n){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();n=this.getToken(),null!==n&&"end"!==n;){if("/"!==n)continue;const A=this.getToken();g=this.readInt(),this.getToken(),r=g>0?e.getBytes(g):new Uint8Array(0),o=s.properties.privateData.lenIV;const t=this.readCharStrings(r,o);this.nextChar(),n=this.getToken(),"noaccess"===n?this.getToken():"/"===n&&this.prevChar(),i.push({glyph:A,encoded:t})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){const A=this.readInt();g=this.readInt(),this.getToken(),r=g>0?e.getBytes(g):new Uint8Array(0),o=s.properties.privateData.lenIV;const i=this.readCharStrings(r,o);this.nextChar(),n=this.getToken(),"noaccess"===n&&this.getToken(),t[A]=i}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const A=this.readNumberArray();A.length>0&&A.length,0;break;case"StemSnapH":case"StemSnapV":s.properties.privateData[n]=this.readNumberArray();break;case"StdHW":case"StdVW":s.properties.privateData[n]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":s.properties.privateData[n]=this.readNumber();break;case"ExpansionFactor":s.properties.privateData[n]=this.readNumber()||.06;break;case"ForceBold":s.properties.privateData[n]=this.readBoolean()}for(const{encoded:e,glyph:a}of i){const i=new nr,n=i.convert(e,t,this.seacAnalysisEnabled);let g=i.output;n&&(g=[14]);const r={glyphName:a,charstring:g,width:i.width,lsb:i.lsb,seac:i.seac};if(".notdef"===a?s.charstrings.unshift(r):s.charstrings.push(r),A.builtInEncoding){const e=A.builtInEncoding.indexOf(a);e>-1&&void 0===A.widths[e]&&e>=A.firstChar&&e<=A.lastChar&&(A.widths[e]=i.width)}}return s}extractFontHeader(A){let e;for(;null!==(e=this.getToken());)if("/"===e)switch(e=this.getToken(),e){case"FontMatrix":const t=this.readNumberArray();A.fontMatrix=t;break;case"Encoding":const i=this.getToken();let a;if(/^\d+$/.test(i)){a=[];const A=0|parseInt(i,10);this.getToken();for(let t=0;t<A;t++){for(e=this.getToken();"dup"!==e&&"def"!==e;)if(e=this.getToken(),null===e)return;if("def"===e)break;const A=this.readInt();this.getToken();const t=this.getToken();a[A]=t,this.getToken()}}else a=yn(i);A.builtInEncoding=a;break;case"FontBBox":const s=this.readNumberArray();A.ascent=Math.max(s[3],s[1]),A.descent=Math.min(s[1],s[3]),A.ascentScaled=!0}}}function cr(A,e,t){const i=A.length,a=e.length,s=i-a;let n=t,g=!1;for(;n<s;){let t=0;for(;t<a&&A[n+t]===e[t];)t++;if(t>=a){for(n+=t;n<i&&pi(A[n]);)n++;g=!0;break}n++}return{found:g,length:n}}class Cr{constructor(A,e,t){let i=t.length1,a=t.length2,s=e.peekBytes(6);const n=128===s[0]&&1===s[1];n&&(e.skip(6),i=s[5]<<24|s[4]<<16|s[3]<<8|s[2]);const g=function(A,e){const t=[101,101,120,101,99],i=A.pos;let a,s,n,g;try{a=A.getBytes(e),s=a.length}catch{}if(s===e&&(n=cr(a,t,e-2*t.length),n.found&&n.length===e))return{stream:new Pi(a),length:e};for(gt('Invalid "Length1" property in Type1 font -- trying to recover.'),A.pos=i;n=cr(A.peekBytes(2048),t,0),0!==n.length;)if(A.pos+=n.length,n.found){g=A.pos-i;break}return A.pos=i,g?{stream:new Pi(A.getBytes(g)),length:g}:(gt('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new Pi(A.getBytes(e)),length:e})}(e,i);new Ir(g.stream,!1,_n).extractFontHeader(t),n&&(s=e.getBytes(6),a=s[5]<<24|s[4]<<16|s[3]<<8|s[2]);const r=function(A){const e=A.getBytes();if(0===e.length)throw new ut("getEexecBlock - no font program found.");return{stream:new Pi(e),length:e.length}}(e),o=new Ir(r.stream,!0,_n).extractFontProgram(t);for(const A in o.properties)t[A]=o.properties[A];const I=o.charstrings,c=this.getType2Charstrings(I),C=this.getType2Subrs(o.subrs);this.charstrings=I,this.data=this.wrap(A,c,this.charstrings,C,t),this.seacs=this.getSeacs(o.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const A=[".notdef"];for(const{glyphName:e}of this.charstrings)A.push(e);return A}getGlyphMapping(A){const e=this.charstrings;if(A.composite){const t=Object.create(null);for(let i=0,a=e.length;i<a;i++){t[A.cMap.charCodeOf(i)]=i+1}return t}const t=[".notdef"];let i,a;for(a=0;a<e.length;a++)t.push(e[a].glyphName);const s=A.builtInEncoding;if(s){i=Object.create(null);for(const A in s)a=t.indexOf(s[A]),a>=0&&(i[A]=a)}return sg(A,i,t)}hasGlyphId(A){if(A<0||A>=this.numGlyphs)return!1;if(0===A)return!0;return this.charstrings[A-1].charstring.length>0}getSeacs(A){const e=[];for(let t=0,i=A.length;t<i;t++){const i=A[t];i.seac&&(e[t+1]=i.seac)}return e}getType2Charstrings(A){const e=[];for(const t of A)e.push(t.charstring);return e}getType2Subrs(A){let e=0;const t=A.length;e=t<1133?107:t<33769?1131:32768;const i=[];let a;for(a=0;a<e;a++)i.push([11]);for(a=0;a<t;a++)i.push(A[a]);return i}wrap(A,e,t,i,a){const s=new Sn;s.header=new Rn(1,0,4,4),s.names=[A];const n=new Mn;n.setByName("version",391),n.setByName("Notice",392),n.setByName("FullName",393),n.setByName("FamilyName",394),n.setByName("Weight",395),n.setByName("Encoding",null),n.setByName("FontMatrix",a.fontMatrix),n.setByName("FontBBox",a.bbox),n.setByName("charset",null),n.setByName("CharStrings",null),n.setByName("Private",null),s.topDict=n;const g=new Gn;g.add("Version 0.11"),g.add("See original notice"),g.add(A),g.add(A),g.add("Medium"),s.strings=g,s.globalSubrIndex=new Nn;const r=e.length,o=[".notdef"];let I,c;for(I=0;I<r;I++){const A=t[I].glyphName;-1===wn.indexOf(A)&&g.add(A),o.push(A)}s.charset=new Yn(!1,0,o);const C=new Nn;for(C.add([139,14]),I=0;I<r;I++)C.add(e[I]);s.charStrings=C;const B=new Jn;B.setByName("Subrs",null);const h=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(I=0,c=h.length;I<c;I++){const A=h[I];if(!(A in a.privateData))continue;const e=a.privateData[A];if(Array.isArray(e))for(let A=e.length-1;A>0;A--)e[A]-=e[A-1];B.setByName(A,e)}s.topDict.privateDict=B;const Q=new Nn;for(I=0,c=i.length;I<c;I++)Q.add(i[I]);B.subrsIndex=Q;return new Tn(s).compile()}}const Br=[[57344,63743],[1048576,1114109]],hr=1e3,Qr=["ascent","bbox","black","bold","charProcOperatorList","composite","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","fallbackName","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","subtype","systemFontInfo","type","vertical"],lr=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function Er(A){if(!A.fontMatrix)return;if(A.fontMatrix[0]===a[0])return;const e=.001/A.fontMatrix[0],t=A.widths;for(const A in t)t[A]*=e;A.defaultWidth*=e}function ur(A){if(!A.fallbackToUnicode)return;if(A.toUnicode instanceof ug)return;const e=[];for(const t in A.fallbackToUnicode)A.toUnicode.has(t)||(e[t]=A.fallbackToUnicode[t]);e.length>0&&A.toUnicode.amend(e)}class dr{constructor(A,e,t,i,a,s,n,g,r){this.originalCharCode=A,this.fontChar=e,this.unicode=t,this.accent=i,this.width=a,this.vmetric=s,this.operatorListId=n,this.isSpace=g,this.isInFont=r}get category(){return ct(this,"category",function(A){const e=zn.get(A);if(e)return e;const t=A.match(jn),i={isWhitespace:!!t?.[1],isZeroWidthDiacritic:!!t?.[2],isInvisibleFormatMark:!!t?.[3]};return zn.set(A,i),i}(this.unicode),!0)}}function fr(A,e){return(A<<8)+e}function pr(A,e,t){A[e+1]=t,A[e]=t>>>8}function mr(A,e){const t=(A<<8)+e;return 32768&t?t-65536:t}function yr(A){return String.fromCharCode(A>>8&255,255&A)}function wr(A){return A>32767?A=32767:A<-32768&&(A=-32768),String.fromCharCode(A>>8&255,255&A)}function Dr(A){return"ttcf"===ft(A.peekBytes(4))}function br(A,{type:e,subtype:t,composite:i}){let a,s;return function(A){const e=A.peekBytes(4);return 65536===fi(e,0)||"true"===ft(e)}(A)||Dr(A)?a=i?"CIDFontType2":"TrueType":!function(A){return"OTTO"===ft(A.peekBytes(4))}(A)?!function(A){const e=A.peekBytes(2);return 37===e[0]&&33===e[1]||128===e[0]&&1===e[1]}(A)?!function(A){const e=A.peekBytes(4);return e[0]>=1&&e[3]>=1&&e[3]<=4}(A)?(gt("getFontFileType: Unable to detect correct font file Type/Subtype."),a=e,s=t):i?(a="CIDFontType0",s="CIDFontType0C"):(a="MMType1"===e?"MMType1":"Type1",s="Type1C"):a=i?"CIDFontType0":"MMType1"===e?"MMType1":"Type1":a=i?"CIDFontType2":"OpenType",[a,s]}function kr(A,e){for(const t in e)A[+t]=e[t]}function Fr(A,e,t){const i=[];let a;for(let t=0,s=A.length;t<s;t++)a=On(A[t],e),-1!==a&&(i[t]=a);for(const A in t)a=On(t[A],e),-1!==a&&(i[+A]=a);return i}function Sr(A){return 1===A.platform&&0===A.encoding&&0===A.language}function Rr(A){return 3===A.platform&&1===A.encoding&&1033===A.language}function Gr(A,e,t=!1){switch(e.length){case 1:return e.charCodeAt(0);case 2:return e.charCodeAt(0)<<8|e.charCodeAt(1)}const i=`Unsupported CID string (charCode ${A}): "${e}".`;if(t)throw new ut(i);return gt(i),e}function Nr(A,e,t,i){const a=Object.create(null),s=new Map,n=[],g=new Set;let r=0;let o=Br[r][0],I=Br[r][1];const c=A=>Br[0][0]<=A&&A<=Br[0][1]||Br[1][0]<=A&&A<=Br[1][1];for(const C in A){let B=A[C];if(!e(B))continue;if(o>I){if(r++,r>=Br.length){gt("Ran out of space in font private use area.");break}o=Br[r][0],I=Br[r][1]}const h=o++;0===B&&(B=t);let Q=i.get(C);"string"==typeof Q&&(Q=Q.codePointAt(0)),!Q||c(Q)||g.has(B)||(s.set(Q,B),g.add(B)),a[h]=B,n[C]=h}return{toFontChar:n,charCodeToGlyphId:a,toUnicodeExtraMap:s,nextAvailableFontCharCode:o}}function xr(A,e,t){const i=function(A,e,t){const i=[];for(const e in A)A[e]>=t||i.push({fontCharCode:0|e,glyphId:A[e]});if(e)for(const[A,a]of e)a>=t||i.push({fontCharCode:A,glyphId:a});0===i.length&&i.push({fontCharCode:0,glyphId:0}),i.sort(function(A,e){return A.fontCharCode-e.fontCharCode});const a=[],s=i.length;for(let A=0;A<s;){const e=i[A].fontCharCode,t=[i[A].glyphId];++A;let n=e;for(;A<s&&n+1===i[A].fontCharCode&&(t.push(i[A].glyphId),++n,++A,65535!==n););a.push([e,n,t])}return a}(A,e,t),a=i.at(-1)[1]>65535?2:1;let s,n,g,r,o="\0\0"+yr(a)+"\0\0"+mt(4+8*a);for(s=i.length-1;s>=0&&!(i[s][0]<=65535);--s);const I=s+1;i[s][0]<65535&&65535===i[s][1]&&(i[s][1]=65534);const c=i[s][1]<65535?1:0,C=I+c,B=Xg.getSearchParams(C,2);let h,Q,l,E,u="",d="",f="",p="",m="",y=0;for(s=0,n=I;s<n;s++){h=i[s],Q=h[0],l=h[1],u+=yr(Q),d+=yr(l),E=h[2];let A=!0;for(g=1,r=E.length;g<r;++g)if(E[g]!==E[g-1]+1){A=!1;break}if(A){f+=yr(E[0]-Q&65535),p+=yr(0)}else{const A=2*(C-s)+2*y;for(y+=l-Q+1,f+=yr(0),p+=yr(A),g=0,r=E.length;g<r;++g)m+=yr(E[g])}}c>0&&(d+="ÿÿ",u+="ÿÿ",f+="\0",p+="\0\0");const w="\0\0"+yr(2*C)+yr(B.range)+yr(B.entry)+yr(B.rangeShift)+d+"\0\0"+u+f+p+m;let D="",b="";if(a>1){for(o+="\0\0\n"+mt(4+8*a+4+w.length),D="",s=0,n=i.length;s<n;s++){h=i[s],Q=h[0],E=h[2];let A=E[0];for(g=1,r=E.length;g<r;++g)E[g]!==E[g-1]+1&&(l=h[0]+g-1,D+=mt(Q)+mt(l)+mt(A),Q=l+1,A=E[g]);D+=mt(Q)+mt(h[1])+mt(A)}b="\0\f\0\0"+mt(D.length+16)+"\0\0\0\0"+mt(D.length/12)}return o+"\0"+yr(w.length+4)+w+b+D}function Ur(A,e,t){t||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let i=0,a=0,s=0,n=0,g=null,r=0,o=-1;if(e){for(let A in e)if(A|=0,(g>A||!g)&&(g=A),r<A&&(r=A),o=Vn(A,o),o<32)i|=1<<o;else if(o<64)a|=1<<o-32;else if(o<96)s|=1<<o-64;else{if(!(o<123))throw new ut("Unicode ranges Bits > 123 are reserved for internal usage");n|=1<<o-96}r>65535&&(r=65535)}else g=0,r=255;const I=A.bbox||[0,0,0,0],c=t.unitsPerEm||(A.fontMatrix?1/Math.max(...A.fontMatrix.slice(0,4).map(Math.abs)):1e3),C=A.ascentScaled?1:c/hr,B=t.ascent||Math.round(C*(A.ascent||I[3]));let h=t.descent||Math.round(C*(A.descent||I[1]));h>0&&A.descent>0&&I[1]<0&&(h=-h);const Q=t.yMax||B,l=-t.yMin||-h;return"\0$ô\0\0\0»\0\0\0»\0\0ß\x001\0\0\0\0"+String.fromCharCode(A.fixedPitch?9:0)+"\0\0\0\0\0\0"+mt(i)+mt(a)+mt(s)+mt(n)+"*21*"+yr(A.italicAngle?1:0)+yr(g||A.firstChar)+yr(r||A.lastChar)+yr(B)+yr(h)+"\0d"+yr(Q)+yr(l)+"\0\0\0\0\0\0\0\0"+yr(A.xHeight)+yr(A.capHeight)+yr(0)+yr(g||A.firstChar)+"\0"}function Mr(A){return"\0\0\0"+mt(Math.floor(65536*A.italicAngle))+"\0\0\0\0"+mt(A.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function Lr(A){return A.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function Jr(A,e){e||(e=[[],[]]);const t=[e[0][0]||"Original licence",e[0][1]||A,e[0][2]||"Unknown",e[0][3]||"uniqueID",e[0][4]||A,e[0][5]||"Version 0.11",e[0][6]||Lr(A),e[0][7]||"Unknown",e[0][8]||"Unknown",e[0][9]||"Unknown"],i=[];let a,s,n,g,r;for(a=0,s=t.length;a<s;a++){r=e[1][a]||t[a];const A=[];for(n=0,g=r.length;n<g;n++)A.push(yr(r.charCodeAt(n)));i.push(A.join(""))}const o=[t,i],I=["\0","\0"],c=["\0\0","\0"],C=["\0\0","\t"],B=t.length*I.length;let h="\0\0"+yr(B)+yr(12*B+6),Q=0;for(a=0,s=I.length;a<s;a++){const A=o[a];for(n=0,g=A.length;n<g;n++){r=A[n];h+=I[a]+c[a]+C[a]+yr(n)+yr(r.length)+yr(Q),Q+=r.length}}return h+=t.join("")+i.join(""),h}class Hr{constructor(A,e,t){this.name=A,this.psName=null,this.mimetype=null,this.disableFontFace=!1,this.loadedName=t.loadedName,this.isType3Font=t.isType3Font,this.missingFile=!1,this.cssFontInfo=t.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let i=!!(t.flags&Ag);if(!i&&!t.isSimulatedFlags){const e=A.replaceAll(/[,_]/g,"-").split("-",1)[0],t=Ig();for(const A of e.split("+"))if(t[A]){i=!0;break}}this.isSerifFont=i,this.isSymbolicFont=!!(t.flags&eg),this.isMonospace=!!(t.flags&$n);let{type:a,subtype:s}=t;this.type=a,this.subtype=s,this.systemFontInfo=t.systemFontInfo;const n=A.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!n,this.isInvalidPDFjsFont?this.fallbackName=n[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif",this.systemFontInfo?.guessFallback&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=t.differences,this.widths=t.widths,this.defaultWidth=t.defaultWidth,this.composite=t.composite,this.cMap=t.cMap,this.capHeight=t.capHeight/hr,this.ascent=t.ascent/hr,this.descent=t.descent/hr,this.lineHeight=this.ascent-this.descent,this.fontMatrix=t.fontMatrix,this.bbox=t.bbox,this.defaultEncoding=t.defaultEncoding,this.toUnicode=t.toUnicode,this.toFontChar=[],"Type3"===t.type){for(let A=0;A<256;A++)this.toFontChar[A]=this.differences[A]||t.defaultEncoding[A];return}if(this.cidEncoding=t.cidEncoding||"",this.vertical=!!t.vertical,this.vertical&&(this.vmetrics=t.vmetrics,this.defaultVMetrics=t.defaultVMetrics),!e||e.isEmpty)return e&&gt('Font file is empty in "'+A+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(t);let g;[a,s]=br(e,t),a===this.type&&s===this.subtype||nt(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${a}/${s}.`);try{switch(a){case"MMType1":nt("MMType1 font ("+A+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const i="Type1C"===s||"CIDFontType0C"===s?new dg(e,t):new Cr(A,e,t);Er(t),g=this.convert(A,i,t);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",g=this.checkAndRepair(A,e,t),this.isOpenType&&(Er(t),a="OpenType");break;default:throw new ut(`Font ${a} is not supported`)}}catch(A){return gt(A),void this.fallbackToSystemFont(t)}ur(t),this.data=g,this.type=a,this.subtype=s,this.fontMatrix=t.fontMatrix,this.widths=t.widths,this.defaultWidth=t.defaultWidth,this.toUnicode=t.toUnicode,this.seacMap=t.seacMap}get renderer(){return ct(this,"renderer",Lg.create(this,_n))}exportData(A=!1){const e=A?[...Qr,...lr]:Qr,t=Object.create(null);let i,a;for(i of e)a=this[i],void 0!==a&&(t[i]=a);return t}fallbackToSystemFont(A){this.missingFile=!0;const{name:e,type:t}=this;let i=ng(e);const a=gg(),s=og(),n=!!a[i],g=!(!s[i]||!a[s[i]]);i=a[i]||s[i]||i;const r=Hg()[i];r&&(isNaN(this.ascent)&&(this.ascent=r.ascent/hr),isNaN(this.descent)&&(this.descent=r.descent/hr),isNaN(this.capHeight)&&(this.capHeight=r.capHeight/hr)),this.bold=/bold/gi.test(i),this.italic=/oblique|italic/gi.test(i),this.black=/Black/g.test(e);const o=/Narrow/g.test(e);if(this.remeasure=(!n||o)&&Object.keys(this.widths).length>0,(n||g)&&"CIDFontType2"===t&&this.cidEncoding.startsWith("Identity-")){const t=A.cidToGidMap,i=[];if(kr(i,Cg()),/Arial-?Black/i.test(e)?kr(i,Bg()):/Calibri/i.test(e)&&kr(i,hg()),t){for(const A in i){const e=i[A];void 0!==t[e]&&(i[+A]=t[e])}t.length!==this.toUnicode.length&&A.hasIncludedToUnicodeMap&&this.toUnicode instanceof ug&&this.toUnicode.forEach(function(A,e){const a=i[A];void 0===t[a]&&(i[+A]=e)})}this.toUnicode instanceof ug||this.toUnicode.forEach(function(A,e){i[+A]=e}),this.toFontChar=i,this.toUnicode=new Eg(i)}else if(/Symbol/i.test(i))this.toFontChar=Fr(pn,Pn(),this.differences);else if(/Dingbats/i.test(i))this.toFontChar=Fr(mn,Wn(),this.differences);else if(n){const A=Fr(this.defaultEncoding,Pn(),this.differences);"CIDFontType2"!==t||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof ug||this.toUnicode.forEach(function(e,t){A[+e]=t}),this.toFontChar=A}else{const A=Pn(),t=[];this.toUnicode.forEach((e,i)=>{if(!this.composite){const t=On(this.differences[e]||this.defaultEncoding[e],A);-1!==t&&(i=t)}t[+e]=i}),this.composite&&this.toUnicode instanceof ug&&/Tahoma|Verdana/i.test(e)&&kr(t,Cg()),this.toFontChar=t}ur(A),this.loadedName=i.split("-",1)[0]}checkAndRepair(A,e,t){const i=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function a(A,e){const t=Object.create(null);t["OS/2"]=null,t.cmap=null,t.head=null,t.hhea=null,t.hmtx=null,t.maxp=null,t.name=null,t.post=null;for(let a=0;a<e;a++){const e=s(A);i.includes(e.tag)&&(0!==e.length&&(t[e.tag]=e))}return t}function s(A){const e=A.getString(4),t=A.getInt32()>>>0,i=A.getInt32()>>>0,a=A.getInt32()>>>0,s=A.pos;A.pos=A.start||0,A.skip(i);const n=A.getBytes(a);return A.pos=s,"head"===e&&(n[8]=n[9]=n[10]=n[11]=0,n[17]|=32),{tag:e,checksum:t,length:a,offset:i,data:n}}function n(A){return{version:A.getString(4),numTables:A.getUint16(),searchRange:A.getUint16(),entrySelector:A.getUint16(),rangeShift:A.getUint16()}}function g(A,e,t,i,a,s){const n={length:0,sizeOfInstructions:0};if(e<0||e>=A.length||t>A.length||t-e<=12)return n;const g=A.subarray(e,t),r=mr(g[2],g[3]),o=mr(g[4],g[5]),I=mr(g[6],g[7]),c=mr(g[8],g[9]);r>I&&(pr(g,2,I),pr(g,6,r)),o>c&&(pr(g,4,c),pr(g,8,o));const C=mr(g[0],g[1]);if(C<0)return C<-1||(i.set(g,a),n.length=g.length),n;let B,h=10,Q=0;for(B=0;B<C;B++){Q=(g[h]<<8|g[h+1])+1,h+=2}const l=h,E=g[h]<<8|g[h+1];n.sizeOfInstructions=E,h+=2+E;const u=h;let d=0;for(B=0;B<Q;B++){const A=g[h++];192&A&&(g[h-1]=63&A);let e=2;2&A?e=1:16&A&&(e=0);let t=2;4&A?t=1:32&A&&(t=0);const i=e+t;if(d+=i,8&A){const A=g[h++];0===A&&(g[h-1]^=8),B+=A,d+=A*i}}if(0===d)return n;let f=h+d;return f>g.length?n:!s&&E>0?(i.set(g.subarray(0,l),a),i.set([0,0],a+l),i.set(g.subarray(u,f),a+l+2),f-=E,g.length-f>3&&(f=f+3&-4),n.length=f,n):g.length-f>3?(f=f+3&-4,i.set(g.subarray(0,f),a),n.length=f,n):(i.set(g,a),n.length=g.length,n)}function r(A){const t=(e.start||0)+A.offset;e.pos=t;const i=[[],[]],a=[],s=A.length,n=t+s;if(0!==e.getUint16()||s<6)return[i,a];const g=e.getUint16(),r=e.getUint16();let o,I;for(o=0;o<g&&e.pos+12<=n;o++){const A={platform:e.getUint16(),encoding:e.getUint16(),language:e.getUint16(),name:e.getUint16(),length:e.getUint16(),offset:e.getUint16()};(Sr(A)||Rr(A))&&a.push(A)}for(o=0,I=a.length;o<I;o++){const A=a[o];if(A.length<=0)continue;const s=t+r+A.offset;if(s+A.length>n)continue;e.pos=s;const g=A.name;if(A.encoding){let t="";for(let i=0,a=A.length;i<a;i+=2)t+=String.fromCharCode(e.getUint16());i[1][g]=t}else i[0][g]=e.getString(A.length)}return[i,a]}const o=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function I(A,e){let t,i,a,s,n,g=A.data,r=0,I=0,c=0;const C=[],B=[],h=[];let Q=e.tooComplexToFollowFunctions,l=!1,E=0,u=0;for(let A=g.length;r<A;){const A=g[r++];if(64===A)if(i=g[r++],l||u)r+=i;else for(t=0;t<i;t++)C.push(g[r++]);else if(65===A)if(i=g[r++],l||u)r+=2*i;else for(t=0;t<i;t++)a=g[r++],C.push(a<<8|g[r++]);else if(176==(248&A))if(i=A-176+1,l||u)r+=i;else for(t=0;t<i;t++)C.push(g[r++]);else if(184==(248&A))if(i=A-184+1,l||u)r+=2*i;else for(t=0;t<i;t++)a=g[r++],C.push(a<<8|g[r++]);else if(43!==A||Q)if(44!==A||Q){if(45===A)if(l)l=!1,I=r;else{if(n=B.pop(),!n)return gt("TT: ENDF bad stack"),void(e.hintsValid=!1);s=h.pop(),g=n.data,r=n.i,e.functionsStackDeltas[s]=C.length-n.stackTop}else if(137===A)(l||u)&&(gt("TT: nested IDEFs not allowed"),Q=!0),l=!0,c=r;else if(88===A)++E;else if(27===A)u=E;else if(89===A)u===E&&(u=0),--E;else if(28===A&&!l&&!u){const A=C.at(-1);A>0&&(r+=A-1)}}else(l||u)&&(gt("TT: nested FDEFs not allowed"),Q=!0),l=!0,c=r,s=C.pop(),e.functionsDefined[s]={data:g,i:r};else if(!l&&!u)if(s=C.at(-1),isNaN(s))nt("TT: CALL empty stack (or invalid entry).");else if(e.functionsUsed[s]=!0,s in e.functionsStackDeltas){const A=C.length+e.functionsStackDeltas[s];if(A<0)return gt("TT: CALL invalid functions stack delta."),void(e.hintsValid=!1);C.length=A}else if(s in e.functionsDefined&&!h.includes(s)){if(B.push({data:g,i:r,stackTop:C.length-1}),h.push(s),n=e.functionsDefined[s],!n)return gt("TT: CALL non-existent function"),void(e.hintsValid=!1);g=n.data,r=n.i}if(!l&&!u){let e=0;for(A<=142?e=o[A]:A>=192&&A<=223?e=-1:A>=224&&(e=-2),A>=113&&A<=117&&(i=C.pop(),isNaN(i)||(e=2*-i));e<0&&C.length>0;)C.pop(),e++;for(;e>0;)C.push(NaN),e--}}e.tooComplexToFollowFunctions=Q;const d=[g];r>g.length&&d.push(new Uint8Array(r-g.length)),c>I&&(gt("TT: complementing a missing function tail"),d.push(new Uint8Array([34,45]))),function(A,e){if(e.length>1){let t,i,a=0;for(t=0,i=e.length;t<i;t++)a+=e[t].length;a=a+3&-4;const s=new Uint8Array(a);let n=0;for(t=0,i=e.length;t<i;t++)s.set(e[t],n),n+=e[t].length;A.data=s,A.length=a}}(A,d)}let c,C,B,h;if(Dr(e=new Pi(new Uint8Array(e.getBytes())))){const A=function(A,e){const{numFonts:t,offsetTable:i}=function(A){const e=A.getString(4);ot("ttcf"===e,"Must be a TrueType Collection font.");const t=A.getUint16(),i=A.getUint16(),a=A.getInt32()>>>0,s=[];for(let e=0;e<a;e++)s.push(A.getInt32()>>>0);const n={ttcTag:e,majorVersion:t,minorVersion:i,numFonts:a,offsetTable:s};switch(t){case 1:return n;case 2:return n.dsigTag=A.getInt32()>>>0,n.dsigLength=A.getInt32()>>>0,n.dsigOffset=A.getInt32()>>>0,n}throw new ut(`Invalid TrueType Collection majorVersion: ${t}.`)}(A),s=e.split("+");let g;for(let o=0;o<t;o++){A.pos=(A.start||0)+i[o];const t=n(A),I=a(A,t.numTables);if(!I.name)throw new ut('TrueType Collection font must contain a "name" table.');const[c]=r(I.name);for(let A=0,i=c.length;A<i;A++)for(let i=0,a=c[A].length;i<a;i++){const a=c[A][i]?.replaceAll(/\s/g,"");if(a){if(a===e)return{header:t,tables:I};if(!(s.length<2))for(const A of s)a===A&&(g={name:A,header:t,tables:I})}}}if(g)return gt(`TrueType Collection does not contain "${e}" font, falling back to "${g.name}" font instead.`),{header:g.header,tables:g.tables};throw new ut(`TrueType Collection does not contain "${e}" font.`)}(e,this.name);c=A.header,C=A.tables}else c=n(e),C=a(e,c.numTables);const Q=!C["CFF "];if(Q){if(!C.loca)throw new ut('Required "loca" table is not found');C.glyf||(gt('Required "glyf" table is not found -- trying to recover.'),C.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{const e=t.composite&&(t.cidToGidMap?.length>0||!(t.cMap instanceof zs));if("OTTO"===c.version&&!e||!C.head||!C.hhea||!C.maxp||!C.post)return h=new Pi(C["CFF "].data),B=new dg(h,t),Er(t),this.convert(A,B,t);delete C.glyf,delete C.loca,delete C.fpgm,delete C.prep,delete C["cvt "],this.isOpenType=!0}if(!C.maxp)throw new ut('Required "maxp" table is not found');e.pos=(e.start||0)+C.maxp.offset;let l=e.getInt32();const E=e.getUint16();if(65536!==l&&20480!==l){if(6===C.maxp.length)l=20480;else{if(!(C.maxp.length>=32))throw new ut('"maxp" table has a wrong version number');l=65536}u=C.maxp.data,f=l,u[(d=0)+3]=255&f,u[d+2]=f>>>8,u[d+1]=f>>>16,u[d]=f>>>24}var u,d,f;if(t.scaleFactors?.length===E&&Q){const{scaleFactors:A}=t,e=fr(C.head.data[50],C.head.data[51]),i=new Yg({glyfTable:C.glyf.data,isGlyphLocationsLong:e,locaTable:C.loca.data,numGlyphs:E});i.scale(A);const{glyf:a,loca:s,isLocationLong:n}=i.write();C.glyf.data=a,C.loca.data=s,n!==!!e&&(C.head.data[50]=0,C.head.data[51]=n?1:0);const g=C.hmtx.data;for(let e=0;e<E;e++){const t=4*e,i=Math.round(A[e]*fr(g[t],g[t+1]));g[t]=i>>8&255,g[t+1]=255&i;pr(g,t+2,Math.round(A[e]*mr(g[t+2],g[t+3])))}}let p=E+1,m=!0;p>65535&&(m=!1,p=E,gt("Not enough space in glyfs to duplicate first glyph."));let y=0,w=0;if(l>=65536&&C.maxp.length>=32){e.pos+=8;e.getUint16()>2&&(C.maxp.data[14]=0,C.maxp.data[15]=2),e.pos+=4,y=e.getUint16(),e.pos+=4,w=e.getUint16()}C.maxp.data[4]=p>>8,C.maxp.data[5]=255&p;const D=function(A,e,t,i){const a={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(A&&I(A,a),e&&I(e,a),A&&function(A,e){if(!A.tooComplexToFollowFunctions){if(A.functionsDefined.length>e)return gt("TT: more functions defined than expected"),void(A.hintsValid=!1);for(let t=0,i=A.functionsUsed.length;t<i;t++){if(t>e)return gt("TT: invalid function id: "+t),void(A.hintsValid=!1);if(A.functionsUsed[t]&&!A.functionsDefined[t])return gt("TT: undefined function: "+t),void(A.hintsValid=!1)}}}(a,i),t&&1&t.length){const A=new Uint8Array(t.length+1);A.set(t.data),t.data=A}return a.hintsValid}(C.fpgm,C.prep,C["cvt "],y);if(D||(delete C.fpgm,delete C.prep,delete C["cvt "]),function(A,e,t,i,a,s){if(!e)return void(t&&(t.data=null));A.pos=(A.start||0)+e.offset,A.pos+=4,A.pos+=2,A.pos+=2,A.pos+=2,A.pos+=2,A.pos+=2,A.pos+=2,A.pos+=2,A.pos+=2,A.pos+=2;const n=A.getUint16();A.pos+=8,A.pos+=2;let g=A.getUint16();if(0!==n){2&fr(i.data[44],i.data[45])||(e.data[22]=0,e.data[23]=0)}g>a&&(nt(`The numOfMetrics (${g}) should not be greater than the numGlyphs (${a}).`),g=a,e.data[34]=(65280&g)>>8,e.data[35]=255&g);const r=a-g-(t.length-4*g>>1);if(r>0){const A=new Uint8Array(t.length+2*r);A.set(t.data),s&&(A[t.length]=t.data[2],A[t.length+1]=t.data[3]),t.data=A}}(e,C.hhea,C.hmtx,C.head,p,m),!C.head)throw new ut('Required "head" table is not found');!function(A,e,t){const i=A.data,a=(s=i[0],n=i[1],g=i[2],r=i[3],(s<<24)+(n<<16)+(g<<8)+r);var s,n,g,r;a>>16!=1&&(nt("Attempting to fix invalid version in head table: "+a),i[0]=0,i[1]=1,i[2]=0,i[3]=0);const o=fr(i[50],i[51]);if(o<0||o>1){nt("Attempting to fix invalid indexToLocFormat in head table: "+o);const A=e+1;if(t===A<<1)i[50]=0,i[51]=0;else{if(t!==A<<2)throw new ut("Could not fix indexToLocFormat: "+o);i[50]=0,i[51]=1}}}(C.head,E,Q?C.loca.length:0);let b=Object.create(null);if(Q){const A=fr(C.head.data[50],C.head.data[51]),e=function(A,e,t,i,a,s,n){let r,o,I;i?(r=4,o=function(A,e){return A[e]<<24|A[e+1]<<16|A[e+2]<<8|A[e+3]},I=function(A,e,t){A[e]=t>>>24&255,A[e+1]=t>>16&255,A[e+2]=t>>8&255,A[e+3]=255&t}):(r=2,o=function(A,e){return A[e]<<9|A[e+1]<<1},I=function(A,e,t){A[e]=t>>9&255,A[e+1]=t>>1&255});const c=s?t+1:t,C=r*(1+c),B=new Uint8Array(C);B.set(A.data.subarray(0,C)),A.data=B;const h=e.data,Q=h.length,l=new Uint8Array(Q);let E,u;const d=[];for(E=0,u=0;E<t+1;E++,u+=r){let A=o(B,u);A>Q&&(A=Q),d.push({index:E,offset:A,endOffset:0})}for(d.sort((A,e)=>A.offset-e.offset),E=0;E<t;E++)d[E].endOffset=d[E+1].offset;for(d.sort((A,e)=>A.index-e.index),E=0;E<t;E++){const{offset:A,endOffset:e}=d[E];if(0!==A||0!==e)break;const t=d[E+1].offset;if(0!==t){d[E].endOffset=t;break}}const f=d.at(-2);0!==f.offset&&0===f.endOffset&&(f.endOffset=Q);const p=Object.create(null);let m=0;for(I(B,0,m),E=0,u=r;E<t;E++,u+=r){const A=g(h,d[E].offset,d[E].endOffset,l,m,a),e=A.length;0===e&&(p[E]=!0),A.sizeOfInstructions>n&&(n=A.sizeOfInstructions),m+=e,I(B,u,m)}if(0===m){const A=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(E=0,u=r;E<c;E++,u+=r)I(B,u,A.length);e.data=A}else if(s){const t=o(B,r);l.length>t+m?e.data=l.subarray(0,t+m):(e.data=new Uint8Array(t+m),e.data.set(l.subarray(0,m))),e.data.set(l.subarray(0,t),m),I(A.data,B.length-r,m+t)}else e.data=l.subarray(0,m);return{missingGlyphs:p,maxSizeOfInstructions:n}}(C.loca,C.glyf,E,A,D,m,w);b=e.missingGlyphs,l>=65536&&C.maxp.length>=32&&(C.maxp.data[26]=e.maxSizeOfInstructions>>8,C.maxp.data[27]=255&e.maxSizeOfInstructions)}if(!C.hhea)throw new ut('Required "hhea" table is not found');0===C.hhea.data[10]&&0===C.hhea.data[11]&&(C.hhea.data[10]=255,C.hhea.data[11]=255);const k={unitsPerEm:fr(C.head.data[18],C.head.data[19]),yMax:mr(C.head.data[42],C.head.data[43]),yMin:mr(C.head.data[38],C.head.data[39]),ascent:mr(C.hhea.data[4],C.hhea.data[5]),descent:mr(C.hhea.data[6],C.hhea.data[7]),lineGap:mr(C.hhea.data[8],C.hhea.data[9])};this.ascent=k.ascent/k.unitsPerEm,this.descent=k.descent/k.unitsPerEm,this.lineGap=k.lineGap/k.unitsPerEm,this.cssFontInfo?.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,C.post&&function(A,t,i){const a=(e.start||0)+A.offset;e.pos=a;const s=a+A.length,n=e.getInt32();let g;e.skip(28);let r,o=!0;switch(n){case 65536:g=ig;break;case 131072:const A=e.getUint16();if(A!==i){o=!1;break}const a=[];for(r=0;r<A;++r){const A=e.getUint16();if(A>=32768){o=!1;break}a.push(A)}if(!o)break;const I=[],c=[];for(;e.pos<s;){const A=e.getByte();for(c.length=A,r=0;r<A;++r)c[r]=String.fromCharCode(e.getByte());I.push(c.join(""))}for(g=[],r=0;r<A;++r){const A=a[r];A<258?g.push(ig[A]):g.push(I[A-258])}break;case 196608:break;default:gt("Unknown/unsupported post table version "+n),o=!1,t.defaultEncoding&&(g=t.defaultEncoding)}t.glyphNames=g}(C.post,t,E),C.post={tag:"post",data:Mr(t)};const F=Object.create(null);function S(A){return!b[A]}if(t.composite){const A=t.cidToGidMap||[],e=0===A.length;t.cMap.forEach(function(t,i){if("string"==typeof i&&(i=Gr(t,i,!0)),i>65535)throw new ut("Max size of CID is 65,535");let a=-1;e?a=i:void 0!==A[i]&&(a=A[i]),a>=0&&a<E&&S(a)&&(F[t]=a)})}else{const A=function(A,e,t,i){if(!A)return gt("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let a,s=(e.start||0)+A.offset;e.pos=s,e.skip(2);const n=e.getUint16();let g,r=!1;for(let A=0;A<n;A++){const a=e.getUint16(),s=e.getUint16(),o=e.getInt32()>>>0;let I=!1;if(g?.platformId!==a||g?.encodingId!==s){if(0!==a||0!==s&&1!==s&&3!==s)if(1===a&&0===s)I=!0;else if(3!==a||1!==s||!i&&g){if(t&&3===a&&0===s){I=!0;let t=!0;if(A<n-1){const A=e.peekBytes(2);fr(A[0],A[1])<a&&(t=!1)}t&&(r=!0)}}else I=!0,t||(r=!0);else I=!0;if(I&&(g={platformId:a,encodingId:s,offset:o}),r)break}}if(g&&(e.pos=s+g.offset),!g||-1===e.peekByte())return gt("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};const o=e.getUint16();let I=!1;const c=[];let C,B;if(0===o){for(e.skip(4),C=0;C<256;C++){const A=e.getByte();A&&c.push({charCode:C,glyphId:A})}I=!0}else if(2===o){e.skip(4);const A=[];let t=0;for(let i=0;i<256;i++){const i=e.getUint16()>>3;A.push(i),t=Math.max(i,t)}const i=[];for(let A=0;A<=t;A++)i.push({firstCode:e.getUint16(),entryCount:e.getUint16(),idDelta:mr(e.getByte(),e.getByte()),idRangePos:e.pos+e.getUint16()});for(let t=0;t<256;t++)if(0===A[t])e.pos=i[0].idRangePos+2*t,B=e.getUint16(),c.push({charCode:t,glyphId:B});else{const a=i[A[t]];for(C=0;C<a.entryCount;C++){const A=(t<<8)+C+a.firstCode;e.pos=a.idRangePos+2*C,B=e.getUint16(),0!==B&&(B=(B+a.idDelta)%65536),c.push({charCode:A,glyphId:B})}}}else if(4===o){e.skip(4);const A=e.getUint16()>>1;e.skip(6);const t=[];let i;for(i=0;i<A;i++)t.push({end:e.getUint16()});for(e.skip(2),i=0;i<A;i++)t[i].start=e.getUint16();for(i=0;i<A;i++)t[i].delta=e.getUint16();let n,g=0;for(i=0;i<A;i++){a=t[i];const s=e.getUint16();s?(n=(s>>1)-(A-i),a.offsetIndex=n,g=Math.max(g,n+a.end-a.start+1)):a.offsetIndex=-1}const r=[];for(C=0;C<g;C++)r.push(e.getUint16());for(i=0;i<A;i++){a=t[i],s=a.start;const A=a.end,e=a.delta;for(n=a.offsetIndex,C=s;C<=A;C++)65535!==C&&(B=n<0?C:r[n+C-s],B=B+e&65535,c.push({charCode:C,glyphId:B}))}}else if(6===o){e.skip(4);const A=e.getUint16(),t=e.getUint16();for(C=0;C<t;C++){B=e.getUint16();const t=A+C;c.push({charCode:t,glyphId:B})}}else{if(12!==o)return gt("cmap table has unsupported format: "+o),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{e.skip(10);const A=e.getInt32()>>>0;for(C=0;C<A;C++){const A=e.getInt32()>>>0,t=e.getInt32()>>>0;let i=e.getInt32()>>>0;for(let e=A;e<=t;e++)c.push({charCode:e,glyphId:i++})}}}c.sort(function(A,e){return A.charCode-e.charCode});for(let A=1;A<c.length;A++)c[A-1].charCode===c[A].charCode&&(c.splice(A,1),A--);return{platformId:g.platformId,encodingId:g.encodingId,mappings:c,hasShortCmap:I}}(C.cmap,e,this.isSymbolicFont,t.hasEncoding),i=A.platformId,a=A.encodingId,s=A.mappings;let n=[],g=!1;if(!t.hasEncoding||"MacRomanEncoding"!==t.baseEncodingName&&"WinAnsiEncoding"!==t.baseEncodingName||(n=yn(t.baseEncodingName)),t.hasEncoding&&!this.isSymbolicFont&&(3===i&&1===a||1===i&&0===a)){const A=Pn();for(let e=0;e<256;e++){let g;if(g=void 0!==this.differences[e]?this.differences[e]:n.length&&""!==n[e]?n[e]:dn[e],!g)continue;const r=ag(g,A);let o;if(3===i&&1===a?o=A[r]:1===i&&0===a&&(o=un.indexOf(r)),void 0===o){if(!t.glyphNames&&t.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof ug)){const A=this.toUnicode.get(e);A&&(o=A.codePointAt(0))}if(void 0===o)continue}for(const A of s)if(A.charCode===o){F[e]=A.glyphId;break}}}else if(0===i){for(const A of s)F[A.charCode]=A.glyphId;g=!0}else if(3===i&&0===a)for(const A of s){let e=A.charCode;e>=61440&&e<=61695&&(e&=255),F[e]=A.glyphId}else for(const A of s)F[A.charCode]=A.glyphId;if(t.glyphNames&&(n.length||this.differences.length))for(let A=0;A<256;++A){if(!g&&void 0!==F[A])continue;const e=this.differences[A]||n[A];if(!e)continue;const i=t.glyphNames.indexOf(e);i>0&&S(i)&&(F[A]=i)}}0===F.length&&(F[0]=0);let R=p-1;if(m||(R=0),!t.cssFontInfo){const A=Nr(F,S,R,this.toUnicode);this.toFontChar=A.toFontChar,C.cmap={tag:"cmap",data:xr(A.charCodeToGlyphId,A.toUnicodeExtraMap,p)},C["OS/2"]&&function(A,e){e.pos=(e.start||0)+A.offset;const t=e.getUint16();e.skip(60);const i=e.getUint16();return!(t<4&&768&i)&&(!(e.getUint16()>e.getUint16())&&(e.skip(6),0!==e.getUint16()&&(A.data[8]=A.data[9]=0,!0)))}(C["OS/2"],e)||(C["OS/2"]={tag:"OS/2",data:Ur(t,A.charCodeToGlyphId,k)})}if(!Q)try{h=new Pi(C["CFF "].data);B=new Fn(h,t,_n).parse(),B.duplicateFirstGlyph();const A=new Tn(B);C["CFF "].data=A.compile()}catch{gt("Failed to compile font "+t.loadedName)}if(C.name){const[e,i]=r(C.name);C.name.data=Jr(A,e),this.psName=e[0][6]||null,t.composite||function(A,e,t){if(A.isInternalFont)return;if(A.hasIncludedToUnicodeMap)return;if(A.hasEncoding)return;if(A.toUnicode instanceof ug)return;if(!e)return;if(0===t.length)return;if(A.defaultEncoding===fn)return;for(const A of t)if(!Rr(A))return;const i=fn,a=[],s=Pn();for(const A in i){const e=i[A];if(""===e)continue;const t=s[e];void 0!==t&&(a[A]=String.fromCharCode(t))}a.length>0&&A.toUnicode.amend(a)}(t,this.isSymbolicFont,i)}else C.name={tag:"name",data:Jr(this.name)};const G=new Xg(c.version);for(const A in C)G.addTable(A,C[A].data);return G.toArray()}convert(A,e,t){t.fixedPitch=!1,t.builtInEncoding&&function(A,e){if(A.isInternalFont)return;if(A.hasIncludedToUnicodeMap)return;if(e===A.defaultEncoding)return;if(A.toUnicode instanceof ug)return;const t=[],i=Pn();for(const a in e){if(A.hasEncoding&&(A.baseEncodingName||void 0!==A.differences[a]))continue;const s=On(e[a],i);-1!==s&&(t[a]=String.fromCharCode(s))}t.length>0&&A.toUnicode.amend(t)}(t,t.builtInEncoding);let i=1;e instanceof dg&&(i=e.numGlyphs-1);const s=e.getGlyphMapping(t);let n=null,g=s,r=null;t.cssFontInfo||(n=Nr(s,e.hasGlyphId.bind(e),i,this.toUnicode),this.toFontChar=n.toFontChar,g=n.charCodeToGlyphId,r=n.toUnicodeExtraMap);const o=e.numGlyphs;function I(A,e){let t=null;for(const i in A)e===A[i]&&(t||=[]).push(0|i);return t}function c(A,e){for(const t in A)if(e===A[t])return 0|t;return n.charCodeToGlyphId[n.nextAvailableFontCharCode]=e,n.nextAvailableFontCharCode++}const C=e.seacs;if(n&&C?.length){const A=t.fontMatrix||a,i=e.getCharset(),g=Object.create(null);for(let e in C){e|=0;const t=C[e],a=dn[t[2]],r=dn[t[3]],o=i.indexOf(a),B=i.indexOf(r);if(o<0||B<0)continue;const h={x:t[0]*A[0]+t[1]*A[2]+A[4],y:t[0]*A[1]+t[1]*A[3]+A[5]},Q=I(s,e);if(Q)for(const A of Q){const e=n.charCodeToGlyphId,t=c(e,o),i=c(e,B);g[A]={baseFontCharCode:t,accentFontCharCode:i,accentOffset:h}}}t.seacMap=g}const B=t.fontMatrix?1/Math.max(...t.fontMatrix.slice(0,4).map(Math.abs)):1e3,h=new Xg("OTTO");return h.addTable("CFF ",e.data),h.addTable("OS/2",Ur(t,g)),h.addTable("cmap",xr(g,r,o)),h.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+wr(B)+"\0\0\0\0\v~'\0\0\0\0\v~'\0\0"+wr(t.descent)+"ÿ"+wr(t.ascent)+yr(t.italicAngle?2:0)+"\0\0\0\0\0\0\0"),h.addTable("hhea","\0\0\0"+wr(t.ascent)+wr(t.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+wr(t.capHeight)+wr(Math.tan(t.italicAngle)*t.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+yr(o)),h.addTable("hmtx",function(){const A=e.charstrings,t=e.cff?e.cff.widths:null;let i="\0\0\0\0";for(let e=1,a=o;e<a;e++){let a=0;if(A){const t=A[e-1];a="width"in t?t.width:0}else t&&(a=Math.ceil(t[e]||0));i+=yr(a)+yr(0)}return i}()),h.addTable("maxp","\0\0P\0"+yr(o)),h.addTable("name",Jr(A)),h.addTable("post",Mr(t)),h.toArray()}_charToGlyph(A,e=!1){let t,i,a,s=this._glyphCache[A];if(s?.isSpace===e)return s;let n=A;this.cMap?.contains(A)&&(n=this.cMap.lookup(A),"string"==typeof n&&(n=Gr(A,n))),i=this.widths[n],"number"!=typeof i&&(i=this.defaultWidth);const g=this.vmetrics?.[n];let r=this.toUnicode.get(A)||A;"number"==typeof r&&(r=String.fromCharCode(r));let o=void 0!==this.toFontChar[A];if(t=this.toFontChar[A]||A,this.missingFile){const e=this.differences[A]||this.defaultEncoding[A];".notdef"!==e&&""!==e||"Type1"!==this.type||(t=32),t=(I=t)>=65520&&I<=65535?0:I>=62976&&I<=63743?Zn()[I]||I:173===I?45:I}var I;this.isType3Font&&(a=t);let c=null;if(this.seacMap?.[A]){o=!0;const e=this.seacMap[A];t=e.baseFontCharCode,c={fontChar:String.fromCodePoint(e.accentFontCharCode),offset:e.accentOffset}}let C="";return"number"==typeof t&&(t<=1114111?C=String.fromCodePoint(t):gt(`charToGlyph - invalid fontCharCode: ${t}`)),s=new dr(A,C,r,c,i,g,a,e,o),this._glyphCache[A]=s}charsToGlyphs(A){let e=this._charsCache[A];if(e)return e;if(e=[],this.cMap){const t=Object.create(null),i=A.length;let a=0;for(;a<i;){this.cMap.readCharCode(A,a,t);const{charcode:i,length:s}=t;a+=s;const n=this._charToGlyph(i,1===s&&32===A.charCodeAt(a-1));e.push(n)}}else for(let t=0,i=A.length;t<i;++t){const i=A.charCodeAt(t),a=this._charToGlyph(i,32===i);e.push(a)}return this._charsCache[A]=e}getCharPositions(A){const e=[];if(this.cMap){const t=Object.create(null);let i=0;for(;i<A.length;){this.cMap.readCharCode(A,i,t);const a=t.length;e.push([i,i+a]),i+=a}}else for(let t=0,i=A.length;t<i;++t)e.push([t,t+1]);return e}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(A){const e=[],t=[],i=()=>e.length%2==1,a=this.toUnicode instanceof ug?A=>this.toUnicode.charCodeOf(A):A=>this.toUnicode.charCodeOf(String.fromCodePoint(A));for(let s=0,n=A.length;s<n;s++){const n=A.codePointAt(s);if(n>55295&&(n<57344||n>65533)&&s++,this.toUnicode){const A=a(n);if(-1!==A){i()&&(e.push(t.join("")),t.length=0);for(let e=(this.cMap?this.cMap.getCharCodeLength(A):1)-1;e>=0;e--)t.push(String.fromCharCode(A>>8*e&255));continue}}i()||(e.push(t.join("")),t.length=0),t.push(String.fromCodePoint(n))}return e.push(t.join("")),e}}class Yr{constructor(A){this.error=A,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(A){return[A]}exportData(A=!1){return{error:this.error}}}const vr=2,Kr=3,qr=4,Tr=5,Pr=6,Wr=7;class Zr{constructor(){rt("Cannot initialize Pattern.")}static parseShading(A,e,t,i,a){const s=A instanceof ni?A.dict:A,n=s.get("ShadingType");try{switch(n){case vr:case Kr:return new Xr(s,e,t,i,a);case qr:case Tr:case Pr:case Wr:return new _r(A,e,t,i,a);default:throw new ut("Unsupported ShadingType: "+n)}}catch(A){if(A instanceof oi)throw A;return gt(A),new $r}}}class Or{static SMALL_NUMBER=1e-6;constructor(){this.constructor===Or&&rt("Cannot initialize BaseShading.")}getIR(){rt("Abstract method `getIR` called.")}}class Xr extends Or{constructor(A,e,t,i,a){super(),this.shadingType=A.get("ShadingType");let s=0;if(this.shadingType===vr?s=4:this.shadingType===Kr&&(s=6),this.coordsArr=A.getArray("Coords"),!mi(this.coordsArr,s))throw new ut("RadialAxialShading: Invalid /Coords array.");const n=Vi.parse({cs:A.getRaw("CS")||A.getRaw("ColorSpace"),xref:e,resources:t,pdfFunctionFactory:i,localColorSpaceCache:a});this.bbox=Di(A.getArray("BBox"),null);let g=0,r=1;const o=A.getArray("Domain");mi(o,2)&&([g,r]=o);let I=!1,c=!1;const C=A.getArray("Extend");var B,h;if(B=C,h=2,Array.isArray(B)&&(null===h||B.length===h)&&B.every(A=>"boolean"==typeof A)&&([I,c]=C),!(this.shadingType!==Kr||I&&c)){const[A,e,t,i,a,s]=this.coordsArr,n=Math.hypot(A-i,e-a);t<=s+n&&s<=t+n&&gt("Unsupported radial gradient.")}this.extendStart=I,this.extendEnd=c;const Q=A.getRaw("Function"),l=i.createFromArray(Q),E=(r-g)/840,u=this.colorStops=[];if(g>=r||E<=0)return void nt("Bad shading domain.");const d=new Float32Array(n.numComps),f=new Float32Array(1);let p,m=0;f[0]=g,l(f,0,d,0);let y=n.getRgb(d,0);const w=bt.makeHexColor(y[0],y[1],y[2]);u.push([0,w]);let D=1;f[0]=g+E,l(f,0,d,0);let b=n.getRgb(d,0),k=b[0]-y[0]+1,F=b[1]-y[1]+1,S=b[2]-y[2]+1,R=b[0]-y[0]-1,G=b[1]-y[1]-1,N=b[2]-y[2]-1;for(let A=2;A<840;A++){f[0]=g+A*E,l(f,0,d,0),p=n.getRgb(d,0);const e=A-m;k=Math.min(k,(p[0]-y[0]+1)/e),F=Math.min(F,(p[1]-y[1]+1)/e),S=Math.min(S,(p[2]-y[2]+1)/e),R=Math.max(R,(p[0]-y[0]-1)/e),G=Math.max(G,(p[1]-y[1]-1)/e),N=Math.max(N,(p[2]-y[2]-1)/e);if(!(R<=k&&G<=F&&N<=S)){const A=bt.makeHexColor(b[0],b[1],b[2]);u.push([D/840,A]),k=p[0]-b[0]+1,F=p[1]-b[1]+1,S=p[2]-b[2]+1,R=p[0]-b[0]-1,G=p[1]-b[1]-1,N=p[2]-b[2]-1,m=D,y=b}D=A,b=p}const x=bt.makeHexColor(b[0],b[1],b[2]);u.push([1,x]);let U="transparent";A.has("Background")&&(p=n.getRgb(A.get("Background"),0),U=bt.makeHexColor(p[0],p[1],p[2])),I||(u.unshift([0,U]),u[1][0]+=Or.SMALL_NUMBER),c||(u.at(-1)[0]-=Or.SMALL_NUMBER,u.push([1,U])),this.colorStops=u}getIR(){const{coordsArr:A,shadingType:e}=this;let t,i,a,s,n;return e===vr?(i=[A[0],A[1]],a=[A[2],A[3]],s=null,n=null,t="axial"):e===Kr?(i=[A[0],A[1]],a=[A[3],A[4]],s=A[2],n=A[5],t="radial"):rt(`getPattern type unknown: ${e}`),["RadialAxial",t,this.bbox,this.colorStops,i,a,s,n]}}class Vr{constructor(A,e){this.stream=A,this.context=e,this.buffer=0,this.bufferLength=0;const t=e.numComps;this.tmpCompsBuf=new Float32Array(t);const i=e.colorSpace.numComps;this.tmpCsCompsBuf=e.colorFn?new Float32Array(i):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const A=this.stream.getByte();return!(A<0)&&(this.buffer=A,this.bufferLength=8,!0)}readBits(A){let e=this.buffer,t=this.bufferLength;if(32===A){if(0===t)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;e=e<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();const A=this.stream.getByte();return this.buffer=A&(1<<t)-1,(e<<8-t|(255&A)>>t)>>>0}if(8===A&&0===t)return this.stream.getByte();for(;t<A;)e=e<<8|this.stream.getByte(),t+=8;return t-=A,this.bufferLength=t,this.buffer=e&(1<<t)-1,e>>t}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const A=this.context.bitsPerCoordinate,e=this.readBits(A),t=this.readBits(A),i=this.context.decode,a=A<32?1/((1<<A)-1):2.3283064365386963e-10;return[e*a*(i[1]-i[0])+i[0],t*a*(i[3]-i[2])+i[2]]}readComponents(){const A=this.context.numComps,e=this.context.bitsPerComponent,t=e<32?1/((1<<e)-1):2.3283064365386963e-10,i=this.context.decode,a=this.tmpCompsBuf;for(let s=0,n=4;s<A;s++,n+=2){const A=this.readBits(e);a[s]=A*t*(i[n+1]-i[n])+i[n]}const s=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(a,0,s,0),this.context.colorSpace.getRgb(s,0)}}let jr=Object.create(null);function zr(A){return jr[A]||=function(A){const e=[];for(let t=0;t<=A;t++){const i=t/A,a=1-i;e.push(new Float32Array([a**3,3*i*a**2,3*i**2*a,i**3]))}return e}(A)}class _r extends Or{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(A,e,t,i,a){if(super(),!(A instanceof ni))throw new ut("Mesh data is not a stream");const s=A.dict;this.shadingType=s.get("ShadingType"),this.bbox=Di(s.getArray("BBox"),null);const n=Vi.parse({cs:s.getRaw("CS")||s.getRaw("ColorSpace"),xref:e,resources:t,pdfFunctionFactory:i,localColorSpaceCache:a});this.background=s.has("Background")?n.getRgb(s.get("Background"),0):null;const g=s.getRaw("Function"),r=g?i.createFromArray(g):null;this.coords=[],this.colors=[],this.figures=[];const o={bitsPerCoordinate:s.get("BitsPerCoordinate"),bitsPerComponent:s.get("BitsPerComponent"),bitsPerFlag:s.get("BitsPerFlag"),decode:s.getArray("Decode"),colorFn:r,colorSpace:n,numComps:r?1:n.numComps},I=new Vr(A,o);let c=!1;switch(this.shadingType){case qr:this._decodeType4Shading(I);break;case Tr:const A=0|s.get("VerticesPerRow");if(A<2)throw new ut("Invalid VerticesPerRow");this._decodeType5Shading(I,A);break;case Pr:this._decodeType6Shading(I),c=!0;break;case Wr:this._decodeType7Shading(I),c=!0;break;default:rt("Unsupported mesh type.")}if(c){this._updateBounds();for(let A=0,e=this.figures.length;A<e;A++)this._buildFigureFromPatch(A)}this._updateBounds(),this._packData()}_decodeType4Shading(A){const e=this.coords,t=this.colors,i=[],a=[];let s=0;for(;A.hasData;){const n=A.readFlag(),g=A.readCoordinate(),r=A.readComponents();if(0===s){if(!(0<=n&&n<=2))throw new ut("Unknown type4 flag");switch(n){case 0:s=3;break;case 1:a.push(a.at(-2),a.at(-1)),s=1;break;case 2:a.push(a.at(-3),a.at(-1)),s=1}i.push(n)}a.push(e.length),e.push(g),t.push(r),s--,A.align()}this.figures.push({type:"triangles",coords:new Int32Array(a),colors:new Int32Array(a)})}_decodeType5Shading(A,e){const t=this.coords,i=this.colors,a=[];for(;A.hasData;){const e=A.readCoordinate(),s=A.readComponents();a.push(t.length),t.push(e),i.push(s)}this.figures.push({type:"lattice",coords:new Int32Array(a),colors:new Int32Array(a),verticesPerRow:e})}_decodeType6Shading(A){const e=this.coords,t=this.colors,i=new Int32Array(16),a=new Int32Array(4);for(;A.hasData;){const s=A.readFlag();if(!(0<=s&&s<=3))throw new ut("Unknown type6 flag");const n=e.length;for(let t=0,i=0!==s?8:12;t<i;t++)e.push(A.readCoordinate());const g=t.length;for(let e=0,i=0!==s?2:4;e<i;e++)t.push(A.readComponents());let r,o,I,c;switch(s){case 0:i[12]=n+3,i[13]=n+4,i[14]=n+5,i[15]=n+6,i[8]=n+2,i[11]=n+7,i[4]=n+1,i[7]=n+8,i[0]=n,i[1]=n+11,i[2]=n+10,i[3]=n+9,a[2]=g+1,a[3]=g+2,a[0]=g,a[1]=g+3;break;case 1:r=i[12],o=i[13],I=i[14],c=i[15],i[12]=c,i[13]=n+0,i[14]=n+1,i[15]=n+2,i[8]=I,i[11]=n+3,i[4]=o,i[7]=n+4,i[0]=r,i[1]=n+7,i[2]=n+6,i[3]=n+5,r=a[2],o=a[3],a[2]=o,a[3]=g,a[0]=r,a[1]=g+1;break;case 2:r=i[15],o=i[11],i[12]=i[3],i[13]=n+0,i[14]=n+1,i[15]=n+2,i[8]=i[7],i[11]=n+3,i[4]=o,i[7]=n+4,i[0]=r,i[1]=n+7,i[2]=n+6,i[3]=n+5,r=a[3],a[2]=a[1],a[3]=g,a[0]=r,a[1]=g+1;break;case 3:i[12]=i[0],i[13]=n+0,i[14]=n+1,i[15]=n+2,i[8]=i[1],i[11]=n+3,i[4]=i[2],i[7]=n+4,i[0]=i[3],i[1]=n+7,i[2]=n+6,i[3]=n+5,a[2]=a[0],a[3]=g,a[0]=a[1],a[1]=g+1}i[5]=e.length,e.push([(-4*e[i[0]][0]-e[i[15]][0]+6*(e[i[4]][0]+e[i[1]][0])-2*(e[i[12]][0]+e[i[3]][0])+3*(e[i[13]][0]+e[i[7]][0]))/9,(-4*e[i[0]][1]-e[i[15]][1]+6*(e[i[4]][1]+e[i[1]][1])-2*(e[i[12]][1]+e[i[3]][1])+3*(e[i[13]][1]+e[i[7]][1]))/9]),i[6]=e.length,e.push([(-4*e[i[3]][0]-e[i[12]][0]+6*(e[i[2]][0]+e[i[7]][0])-2*(e[i[0]][0]+e[i[15]][0])+3*(e[i[4]][0]+e[i[14]][0]))/9,(-4*e[i[3]][1]-e[i[12]][1]+6*(e[i[2]][1]+e[i[7]][1])-2*(e[i[0]][1]+e[i[15]][1])+3*(e[i[4]][1]+e[i[14]][1]))/9]),i[9]=e.length,e.push([(-4*e[i[12]][0]-e[i[3]][0]+6*(e[i[8]][0]+e[i[13]][0])-2*(e[i[0]][0]+e[i[15]][0])+3*(e[i[11]][0]+e[i[1]][0]))/9,(-4*e[i[12]][1]-e[i[3]][1]+6*(e[i[8]][1]+e[i[13]][1])-2*(e[i[0]][1]+e[i[15]][1])+3*(e[i[11]][1]+e[i[1]][1]))/9]),i[10]=e.length,e.push([(-4*e[i[15]][0]-e[i[0]][0]+6*(e[i[11]][0]+e[i[14]][0])-2*(e[i[12]][0]+e[i[3]][0])+3*(e[i[2]][0]+e[i[8]][0]))/9,(-4*e[i[15]][1]-e[i[0]][1]+6*(e[i[11]][1]+e[i[14]][1])-2*(e[i[12]][1]+e[i[3]][1])+3*(e[i[2]][1]+e[i[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(i),colors:new Int32Array(a)})}}_decodeType7Shading(A){const e=this.coords,t=this.colors,i=new Int32Array(16),a=new Int32Array(4);for(;A.hasData;){const s=A.readFlag();if(!(0<=s&&s<=3))throw new ut("Unknown type7 flag");const n=e.length;for(let t=0,i=0!==s?12:16;t<i;t++)e.push(A.readCoordinate());const g=t.length;for(let e=0,i=0!==s?2:4;e<i;e++)t.push(A.readComponents());let r,o,I,c;switch(s){case 0:i[12]=n+3,i[13]=n+4,i[14]=n+5,i[15]=n+6,i[8]=n+2,i[9]=n+13,i[10]=n+14,i[11]=n+7,i[4]=n+1,i[5]=n+12,i[6]=n+15,i[7]=n+8,i[0]=n,i[1]=n+11,i[2]=n+10,i[3]=n+9,a[2]=g+1,a[3]=g+2,a[0]=g,a[1]=g+3;break;case 1:r=i[12],o=i[13],I=i[14],c=i[15],i[12]=c,i[13]=n+0,i[14]=n+1,i[15]=n+2,i[8]=I,i[9]=n+9,i[10]=n+10,i[11]=n+3,i[4]=o,i[5]=n+8,i[6]=n+11,i[7]=n+4,i[0]=r,i[1]=n+7,i[2]=n+6,i[3]=n+5,r=a[2],o=a[3],a[2]=o,a[3]=g,a[0]=r,a[1]=g+1;break;case 2:r=i[15],o=i[11],i[12]=i[3],i[13]=n+0,i[14]=n+1,i[15]=n+2,i[8]=i[7],i[9]=n+9,i[10]=n+10,i[11]=n+3,i[4]=o,i[5]=n+8,i[6]=n+11,i[7]=n+4,i[0]=r,i[1]=n+7,i[2]=n+6,i[3]=n+5,r=a[3],a[2]=a[1],a[3]=g,a[0]=r,a[1]=g+1;break;case 3:i[12]=i[0],i[13]=n+0,i[14]=n+1,i[15]=n+2,i[8]=i[1],i[9]=n+9,i[10]=n+10,i[11]=n+3,i[4]=i[2],i[5]=n+8,i[6]=n+11,i[7]=n+4,i[0]=i[3],i[1]=n+7,i[2]=n+6,i[3]=n+5,a[2]=a[0],a[3]=g,a[0]=a[1],a[1]=g+1}this.figures.push({type:"patch",coords:new Int32Array(i),colors:new Int32Array(a)})}}_buildFigureFromPatch(A){const e=this.figures[A];ot("patch"===e.type,"Unexpected patch mesh figure");const t=this.coords,i=this.colors,a=e.coords,s=e.colors,n=Math.min(t[a[0]][0],t[a[3]][0],t[a[12]][0],t[a[15]][0]),g=Math.min(t[a[0]][1],t[a[3]][1],t[a[12]][1],t[a[15]][1]),r=Math.max(t[a[0]][0],t[a[3]][0],t[a[12]][0],t[a[15]][0]),o=Math.max(t[a[0]][1],t[a[3]][1],t[a[12]][1],t[a[15]][1]);let I=Math.ceil((r-n)*_r.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));I=Math.max(_r.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(_r.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,I));let c=Math.ceil((o-g)*_r.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));c=Math.max(_r.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(_r.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,c));const C=I+1,B=new Int32Array((c+1)*C),h=new Int32Array((c+1)*C);let Q=0;const l=new Uint8Array(3),E=new Uint8Array(3),u=i[s[0]],d=i[s[1]],f=i[s[2]],p=i[s[3]],m=zr(c),y=zr(I);for(let A=0;A<=c;A++){l[0]=(u[0]*(c-A)+f[0]*A)/c|0,l[1]=(u[1]*(c-A)+f[1]*A)/c|0,l[2]=(u[2]*(c-A)+f[2]*A)/c|0,E[0]=(d[0]*(c-A)+p[0]*A)/c|0,E[1]=(d[1]*(c-A)+p[1]*A)/c|0,E[2]=(d[2]*(c-A)+p[2]*A)/c|0;for(let e=0;e<=I;e++,Q++){if(!(0!==A&&A!==c||0!==e&&e!==I))continue;let s=0,n=0,g=0;for(let i=0;i<=3;i++)for(let r=0;r<=3;r++,g++){const o=m[A][i]*y[e][r];s+=t[a[g]][0]*o,n+=t[a[g]][1]*o}B[Q]=t.length,t.push([s,n]),h[Q]=i.length;const r=new Uint8Array(3);r[0]=(l[0]*(I-e)+E[0]*e)/I|0,r[1]=(l[1]*(I-e)+E[1]*e)/I|0,r[2]=(l[2]*(I-e)+E[2]*e)/I|0,i.push(r)}}B[0]=a[0],h[0]=s[0],B[I]=a[3],h[I]=s[1],B[C*c]=a[12],h[C*c]=s[2],B[C*c+I]=a[15],h[C*c+I]=s[3],this.figures[A]={type:"lattice",coords:B,colors:h,verticesPerRow:C}}_updateBounds(){let A=this.coords[0][0],e=this.coords[0][1],t=A,i=e;for(let a=1,s=this.coords.length;a<s;a++){const s=this.coords[a][0],n=this.coords[a][1];A=A>s?s:A,e=e>n?n:e,t=t<s?s:t,i=i<n?n:i}this.bounds=[A,e,t,i]}_packData(){let A,e,t,i;const a=this.coords,s=new Float32Array(2*a.length);for(A=0,t=0,e=a.length;A<e;A++){const e=a[A];s[t++]=e[0],s[t++]=e[1]}this.coords=s;const n=this.colors,g=new Uint8Array(3*n.length);for(A=0,t=0,e=n.length;A<e;A++){const e=n[A];g[t++]=e[0],g[t++]=e[1],g[t++]=e[2]}this.colors=g;const r=this.figures;for(A=0,e=r.length;A<e;A++){const e=r[A],a=e.coords,s=e.colors;for(t=0,i=a.length;t<i;t++)a[t]*=2,s[t]*=3}}getIR(){const{bounds:A}=this;if(A[2]-A[0]===0||A[3]-A[1]===0)throw new ut(`Invalid MeshShading bounds: [${A}].`);return["Mesh",this.shadingType,this.coords,this.colors,this.figures,A,this.bbox,this.background]}}class $r extends Or{getIR(){return["Dummy"]}}function Ao(A,e,t){const a=yi(e.getArray("Matrix"),i),s=Di(e.getArray("BBox"),null);if(!s||s[2]-s[0]===0||s[3]-s[1]===0)throw new ut("Invalid getTilingPatternIR /BBox array.");const n=e.get("XStep");if("number"!=typeof n)throw new ut("Invalid getTilingPatternIR /XStep value.");const g=e.get("YStep");if("number"!=typeof g)throw new ut("Invalid getTilingPatternIR /YStep value.");const r=e.get("PaintType");if(!Number.isInteger(r))throw new ut("Invalid getTilingPatternIR /PaintType value.");const o=e.get("TilingType");if(!Number.isInteger(o))throw new ut("Invalid getTilingPatternIR /TilingType value.");return["TilingPattern",t,A,a,s,n,g,r,o]}const eo=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],to={lineHeight:1.2207,lineGap:.2207},io=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],ao={lineHeight:1.2207,lineGap:.2207},so=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],no={lineHeight:1.2207,lineGap:.2207},go=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],ro={lineHeight:1.2207,lineGap:.2207},oo=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Io={lineHeight:1.2,lineGap:.2},co=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Co={lineHeight:1.35,lineGap:.2},Bo=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],ho={lineHeight:1.35,lineGap:.2},Qo=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],lo={lineHeight:1.2,lineGap:.2},Eo=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],uo=[-1,-1,-1,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,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],fo=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],po=[-1,-1,-1,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,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],mo=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],yo=[-1,-1,-1,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,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],wo=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],Do=[-1,-1,-1,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,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],bo=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],ko={lineHeight:1.2,lineGap:.2},Fo=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],So={lineHeight:1.2,lineGap:.2},Ro=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Go={lineHeight:1.2,lineGap:.2},No=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],xo={lineHeight:1.2,lineGap:.2},Uo=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Mo={lineHeight:1.33008,lineGap:0},Lo=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Jo={lineHeight:1.33008,lineGap:0},Ho=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Yo={lineHeight:1.33008,lineGap:0},vo=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],Ko={lineHeight:1.33008,lineGap:0},qo=ri(function(A){A["MyriadPro-Regular"]=A["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:No,baseWidths:wo,baseMapping:Do,metrics:xo},A["MyriadPro-Bold"]=A["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:bo,baseWidths:Eo,baseMapping:uo,metrics:ko},A["MyriadPro-It"]=A["MyriadPro-Italic"]=A["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:Ro,baseWidths:mo,baseMapping:yo,metrics:Go},A["MyriadPro-BoldIt"]=A["MyriadPro-BoldItalic"]=A["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Fo,baseWidths:fo,baseMapping:po,metrics:So},A.ArialMT=A.Arial=A["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:wo,baseMapping:Do},A["Arial-BoldMT"]=A["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:Eo,baseMapping:uo},A["Arial-ItalicMT"]=A["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:mo,baseMapping:yo},A["Arial-BoldItalicMT"]=A["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:fo,baseMapping:po},A["Calibri-Regular"]={name:"LiberationSans-Regular",factors:go,baseWidths:wo,baseMapping:Do,metrics:ro},A["Calibri-Bold"]={name:"LiberationSans-Bold",factors:eo,baseWidths:Eo,baseMapping:uo,metrics:to},A["Calibri-Italic"]={name:"LiberationSans-Italic",factors:so,baseWidths:mo,baseMapping:yo,metrics:no},A["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:io,baseWidths:fo,baseMapping:po,metrics:ao},A["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:vo,baseWidths:wo,baseMapping:Do,metrics:Ko},A["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:Uo,baseWidths:Eo,baseMapping:uo,metrics:Mo},A["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:Ho,baseWidths:mo,baseMapping:yo,metrics:Yo},A["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Lo,baseWidths:fo,baseMapping:po,metrics:Jo},A["Helvetica-Regular"]=A.Helvetica={name:"LiberationSans-Regular",factors:Qo,baseWidths:wo,baseMapping:Do,metrics:lo},A["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:oo,baseWidths:Eo,baseMapping:uo,metrics:Io},A["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:Bo,baseWidths:mo,baseMapping:yo,metrics:ho},A["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:co,baseWidths:fo,baseMapping:po,metrics:Co}});function To(A){const e=ng(A);return qo()[e]}function Po(A){const e=function(A){const e=To(A);if(!e)return null;const{baseWidths:t,baseMapping:i,factors:a}=e,s=a?t.map((A,e)=>A*a[e]):t;let n,g=-2;const r=[];for(const[A,e]of i.map((A,e)=>[A,e]).sort(([A],[e])=>A-e))-1!==A&&(A===g+1?(n.push(s[e]),g+=1):(g=A,n=[s[e]],r.push(A,n)));return r}(A),t=new _t(null);t.set("BaseFont",Vt.get(A)),t.set("Type",Vt.get("Font")),t.set("Subtype",Vt.get("CIDFontType2")),t.set("Encoding",Vt.get("Identity-H")),t.set("CIDToGIDMap",Vt.get("Identity")),t.set("W",e),t.set("FirstChar",e[0]),t.set("LastChar",e.at(-2)+e.at(-1).length-1);const i=new _t(null);t.set("FontDescriptor",i);const a=new _t(null);return a.set("Ordering","Identity"),a.set("Registry","Adobe"),a.set("Supplement",0),t.set("CIDSystemInfo",a),t}class Wo{constructor(A){this.lexer=A,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(A){return this.token.type===A&&(this.nextToken(),!0)}expect(A){if(this.accept(A))return!0;throw new ut(`Unexpected symbol: found ${this.token.type} expected ${A}.`)}parse(){return this.nextToken(),this.expect(Zo.LBRACE),this.parseBlock(),this.expect(Zo.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(Zo.NUMBER))this.operators.push(this.prev.value);else if(this.accept(Zo.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(Zo.LBRACE))return;this.parseCondition()}}parseCondition(){const A=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(Zo.RBRACE),this.accept(Zo.IF))this.operators[A]=this.operators.length,this.operators[A+1]="jz";else{if(!this.accept(Zo.LBRACE))throw new ut("PS Function: error parsing conditional.");{const e=this.operators.length;this.operators.push(null,null);const t=this.operators.length;this.parseBlock(),this.expect(Zo.RBRACE),this.expect(Zo.IFELSE),this.operators[e]=this.operators.length,this.operators[e+1]="j",this.operators[A]=t,this.operators[A+1]="jz"}}}}const Zo={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class Oo{static get opCache(){return ct(this,"opCache",Object.create(null))}constructor(A,e){this.type=A,this.value=e}static getOperator(A){return Oo.opCache[A]||=new Oo(Zo.OPERATOR,A)}static get LBRACE(){return ct(this,"LBRACE",new Oo(Zo.LBRACE,"{"))}static get RBRACE(){return ct(this,"RBRACE",new Oo(Zo.RBRACE,"}"))}static get IF(){return ct(this,"IF",new Oo(Zo.IF,"IF"))}static get IFELSE(){return ct(this,"IFELSE",new Oo(Zo.IFELSE,"IFELSE"))}}class Xo{constructor(A){this.stream=A,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let A=!1,e=this.currentChar;for(;;){if(e<0)return Wt;if(A)10!==e&&13!==e||(A=!1);else if(37===e)A=!0;else if(!pi(e))break;e=this.nextChar()}switch(0|e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new Oo(Zo.NUMBER,this.getNumber());case 123:return this.nextChar(),Oo.LBRACE;case 125:return this.nextChar(),Oo.RBRACE}const t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=65&&e<=90||e>=97&&e<=122);)t.push(String.fromCharCode(e));const i=t.join("");switch(i.toLowerCase()){case"if":return Oo.IF;case"ifelse":return Oo.IFELSE;default:return Oo.getOperator(i)}}getNumber(){let A=this.currentChar;const e=this.strBuf;for(e.length=0,e[0]=String.fromCharCode(A);(A=this.nextChar())>=0&&(A>=48&&A<=57||45===A||46===A);)e.push(String.fromCharCode(A));const t=parseFloat(e.join(""));if(isNaN(t))throw new ut(`Invalid floating point number: ${t}`);return t}}class Vo{constructor(A){this.constructor===Vo&&rt("Cannot initialize BaseLocalCache."),this._onlyRefs=!0===A?.onlyRefs,this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new ei}getByName(A){this._onlyRefs&&rt("Should not call `getByName` method.");const e=this._nameRefMap.get(A);return e?this.getByRef(e):this._imageMap.get(A)||null}getByRef(A){return this._imageCache.get(A)||null}set(A,e,t){rt("Abstract method `set` called.")}}class jo extends Vo{set(A,e=null,t){if("string"!=typeof A)throw new Error('LocalImageCache.set - expected "name" argument.');if(e){if(this._imageCache.has(e))return;return this._nameRefMap.set(A,e),void this._imageCache.put(e,t)}this._imageMap.has(A)||this._imageMap.set(A,t)}}class zo extends Vo{set(A=null,e=null,t){if("string"!=typeof A&&!e)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(e){if(this._imageCache.has(e))return;return null!==A&&this._nameRefMap.set(A,e),void this._imageCache.put(e,t)}this._imageMap.has(A)||this._imageMap.set(A,t)}}class _o extends Vo{constructor(A){super({onlyRefs:!0})}set(A=null,e,t){if(!e)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}class $o extends Vo{set(A,e=null,t){if("string"!=typeof A)throw new Error('LocalGStateCache.set - expected "name" argument.');if(e){if(this._imageCache.has(e))return;return this._nameRefMap.set(A,e),void this._imageCache.put(e,t)}this._imageMap.has(A)||this._imageMap.set(A,t)}}class AI extends Vo{constructor(A){super({onlyRefs:!0})}set(A=null,e,t){if(!e)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}class eI extends Vo{constructor(A){super({onlyRefs:!0})}set(A=null,e,t){if(!e)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}class tI{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=5e7;#D=new Ai;constructor(){this._refCache=new ei,this._imageCache=new ei}get#b(){let A=0;for(const e of this._imageCache)A+=e.byteSize;return A}get#k(){return!(this._imageCache.size<tI.MIN_IMAGES_TO_CACHE)&&!(this.#b<tI.MAX_BYTE_SIZE)}shouldCache(A,e){let t=this._refCache.get(A);return t||(t=new Set,this._refCache.put(A,t)),t.add(e),!(t.size<tI.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(A)&&this.#k)}addDecodeFailed(A){this.#D.put(A)}hasDecodeFailed(A){return this.#D.has(A)}addByteSize(A,e){const t=this._imageCache.get(A);t&&(t.byteSize||(t.byteSize=e))}getData(A,e){const t=this._refCache.get(A);if(!t)return null;if(t.size<tI.NUM_PAGES_THRESHOLD)return null;const i=this._imageCache.get(A);return i?(t.add(e),i):null}setData(A,e){if(!this._refCache.has(A))throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(A)||(this.#k?gt("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(A,e))}clear(A=!1){A||(this.#D.clear(),this._refCache.clear()),this._imageCache.clear()}}class iI{constructor({xref:A,isEvalSupported:e=!0}){this.xref=A,this.isEvalSupported=!1!==e}create(A){const e=this.getCached(A);if(e)return e;const t=sI.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:A instanceof $t?this.xref.fetch(A):A});return this._cache(A,t),t}createFromArray(A){const e=this.getCached(A);if(e)return e;const t=sI.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:A instanceof $t?this.xref.fetch(A):A});return this._cache(A,t),t}getCached(A){let e;if(A instanceof $t?e=A:A instanceof _t?e=A.objId:A instanceof ni&&(e=A.dict?.objId),e){const A=this._localFunctionCache.getByRef(e);if(A)return A}return null}_cache(A,e){if(!e)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let t;A instanceof $t?t=A:A instanceof _t?t=A.objId:A instanceof ni&&(t=A.dict?.objId),t&&this._localFunctionCache.set(null,t,e)}get _localFunctionCache(){return ct(this,"_localFunctionCache",new _o)}}function aI(A){return Array.isArray(A)?mi(A,null)?A:A.map(A=>+A):null}class sI{static getSampleArray(A,e,t,i){let a,s,n=1;for(a=0,s=A.length;a<s;a++)n*=A[a];n*=e;const g=new Array(n);let r=0,o=0;const I=1/(2**t-1),c=i.getBytes((n*t+7)/8);let C=0;for(a=0;a<n;a++){for(;r<t;)o<<=8,o|=c[C++],r+=8;r-=t,g[a]=(o>>r)*I,o&=(1<<r)-1}return g}static parse({xref:A,isEvalSupported:e,fn:t}){const i=t.dict||t;switch(i.get("FunctionType")){case 0:return this.constructSampled({xref:A,isEvalSupported:e,fn:t,dict:i});case 1:break;case 2:return this.constructInterpolated({xref:A,isEvalSupported:e,dict:i});case 3:return this.constructStiched({xref:A,isEvalSupported:e,dict:i});case 4:return this.constructPostScript({xref:A,isEvalSupported:e,fn:t,dict:i})}throw new ut("Unknown type of function")}static parseArray({xref:A,isEvalSupported:e,fnObj:t}){if(!Array.isArray(t))return this.parse({xref:A,isEvalSupported:e,fn:t});const i=[];for(const a of t)i.push(this.parse({xref:A,isEvalSupported:e,fn:A.fetchIfRef(a)}));return function(A,e,t,a){for(let s=0,n=i.length;s<n;s++)i[s](A,e,t,a+s)}}static constructSampled({xref:A,isEvalSupported:e,fn:t,dict:i}){function a(A){const e=A.length,t=[];let i=0;for(let a=0;a<e;a+=2)t[i++]=[A[a],A[a+1]];return t}function s(A,e,t,i,a){return i+(a-i)/(t-e)*(A-e)}let n=aI(i.getArray("Domain")),g=aI(i.getArray("Range"));if(!n||!g)throw new ut("No domain or range");const r=n.length/2,o=g.length/2;n=a(n),g=a(g);const I=aI(i.getArray("Size")),c=i.get("BitsPerSample"),C=i.get("Order")||1;1!==C&&nt("No support for cubic spline interpolation: "+C);let B=aI(i.getArray("Encode"));if(B)B=a(B);else{B=[];for(let A=0;A<r;++A)B.push([0,I[A]-1])}let h=aI(i.getArray("Decode"));h=h?a(h):g;const Q=this.getSampleArray(I,o,c,t);return function(A,e,t,i){const a=1<<r,c=new Float64Array(a),C=new Uint32Array(a);let l,E;for(E=0;E<a;E++)c[E]=1;let u=o,d=1;for(l=0;l<r;++l){const t=n[l][0],i=n[l][1];let g=s(Math.min(Math.max(A[e+l],t),i),t,i,B[l][0],B[l][1]);const r=I[l];g=Math.min(Math.max(g,0),r-1);const o=g<r-1?Math.floor(g):g-1,h=o+1-g,Q=g-o,f=o*u,p=f+u;for(E=0;E<a;E++)E&d?(c[E]*=Q,C[E]+=p):(c[E]*=h,C[E]+=f);u*=r,d<<=1}for(E=0;E<o;++E){let A=0;for(l=0;l<a;l++)A+=Q[C[l]+E]*c[l];A=s(A,0,1,h[E][0],h[E][1]),t[i+E]=Math.min(Math.max(A,g[E][0]),g[E][1])}}}static constructInterpolated({xref:A,isEvalSupported:e,dict:t}){const i=aI(t.getArray("C0"))||[0],a=aI(t.getArray("C1"))||[1],s=t.get("N"),n=[];for(let A=0,e=i.length;A<e;++A)n.push(a[A]-i[A]);const g=n.length;return function(A,e,t,a){const r=1===s?A[e]:A[e]**s;for(let A=0;A<g;++A)t[a+A]=i[A]+r*n[A]}}static constructStiched({xref:A,isEvalSupported:e,dict:t}){const i=aI(t.getArray("Domain"));if(!i)throw new ut("No domain");if(1!==i.length/2)throw new ut("Bad domain for stiched function");const a=[];for(const i of t.get("Functions"))a.push(this.parse({xref:A,isEvalSupported:e,fn:A.fetchIfRef(i)}));const s=aI(t.getArray("Bounds")),n=aI(t.getArray("Encode")),g=new Float32Array(1);return function(A,e,t,r){const o=function(A,e,t){return A>t?A=t:A<e&&(A=e),A}(A[e],i[0],i[1]),I=s.length;let c;for(c=0;c<I&&!(o<s[c]);++c);let C=i[0];c>0&&(C=s[c-1]);let B=i[1];c<s.length&&(B=s[c]);const h=n[2*c],Q=n[2*c+1];g[0]=C===B?h:h+(o-C)*(Q-h)/(B-C),a[c](g,0,t,r)}}static constructPostScript({xref:A,isEvalSupported:e,fn:t,dict:i}){const a=aI(i.getArray("Domain")),s=aI(i.getArray("Range"));if(!a)throw new ut("No domain.");if(!s)throw new ut("No range.");const n=new Xo(t),g=new Wo(n).parse();if(e&&wt.isEvalSupported){const A=(new pI).compile(g,a,s);if(A)return new Function("src","srcOffset","dest","destOffset",A)}nt("Unable to compile PS function");const r=s.length>>1,o=a.length>>1,I=new rI(g),c=Object.create(null);let C=8192;const B=new Float32Array(o);return function(A,e,t,i){let a,n,g="";const h=B;for(a=0;a<o;a++)n=A[e+a],h[a]=n,g+=n+"_";const Q=c[g];if(void 0!==Q)return void t.set(Q,i);const l=new Float32Array(r),E=I.execute(h),u=E.length-r;for(a=0;a<r;a++){n=E[u+a];let A=s[2*a];n<A?n=A:(A=s[2*a+1],n>A&&(n=A)),l[a]=n}C>0&&(C--,c[g]=l),t.set(l,i)}}}function nI(A){let e;if(A instanceof _t)e=A;else{if(!(A instanceof ni))return!1;e=A.dict}return e.has("FunctionType")}class gI{static MAX_STACK_SIZE=100;constructor(A){this.stack=A?Array.from(A):[]}push(A){if(this.stack.length>=gI.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(A)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(A){if(this.stack.length+A>=gI.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const e=this.stack;for(let t=e.length-A,i=A-1;i>=0;i--,t++)e.push(e[t])}index(A){this.push(this.stack[this.stack.length-A-1])}roll(A,e){const t=this.stack,i=t.length-A,a=t.length-1,s=i+(e-Math.floor(e/A)*A);for(let A=i,e=a;A<e;A++,e--){const i=t[A];t[A]=t[e],t[e]=i}for(let A=i,e=s-1;A<e;A++,e--){const i=t[A];t[A]=t[e],t[e]=i}for(let A=s,e=a;A<e;A++,e--){const i=t[A];t[A]=t[e],t[e]=i}}}class rI{constructor(A){this.operators=A}execute(A){const e=new gI(A);let t=0;const i=this.operators,a=i.length;let s,n,g;for(;t<a;)if(s=i[t++],"number"!=typeof s)switch(s){case"jz":g=e.pop(),n=e.pop(),n||(t=g);break;case"j":n=e.pop(),t=n;break;case"abs":n=e.pop(),e.push(Math.abs(n));break;case"add":g=e.pop(),n=e.pop(),e.push(n+g);break;case"and":g=e.pop(),n=e.pop(),"boolean"==typeof n&&"boolean"==typeof g?e.push(n&&g):e.push(n&g);break;case"atan":g=e.pop(),n=e.pop(),n=Math.atan2(n,g)/Math.PI*180,n<0&&(n+=360),e.push(n);break;case"bitshift":g=e.pop(),n=e.pop(),n>0?e.push(n<<g):e.push(n>>g);break;case"ceiling":n=e.pop(),e.push(Math.ceil(n));break;case"copy":n=e.pop(),e.copy(n);break;case"cos":n=e.pop(),e.push(Math.cos(n%360/180*Math.PI));break;case"cvi":n=0|e.pop(),e.push(n);break;case"cvr":break;case"div":g=e.pop(),n=e.pop(),e.push(n/g);break;case"dup":e.copy(1);break;case"eq":g=e.pop(),n=e.pop(),e.push(n===g);break;case"exch":e.roll(2,1);break;case"exp":g=e.pop(),n=e.pop(),e.push(n**g);break;case"false":e.push(!1);break;case"floor":n=e.pop(),e.push(Math.floor(n));break;case"ge":g=e.pop(),n=e.pop(),e.push(n>=g);break;case"gt":g=e.pop(),n=e.pop(),e.push(n>g);break;case"idiv":g=e.pop(),n=e.pop(),e.push(n/g|0);break;case"index":n=e.pop(),e.index(n);break;case"le":g=e.pop(),n=e.pop(),e.push(n<=g);break;case"ln":n=e.pop(),e.push(Math.log(n));break;case"log":n=e.pop(),e.push(Math.log10(n));break;case"lt":g=e.pop(),n=e.pop(),e.push(n<g);break;case"mod":g=e.pop(),n=e.pop(),e.push(n%g);break;case"mul":g=e.pop(),n=e.pop(),e.push(n*g);break;case"ne":g=e.pop(),n=e.pop(),e.push(n!==g);break;case"neg":n=e.pop(),e.push(-n);break;case"not":n=e.pop(),"boolean"==typeof n?e.push(!n):e.push(~n);break;case"or":g=e.pop(),n=e.pop(),"boolean"==typeof n&&"boolean"==typeof g?e.push(n||g):e.push(n|g);break;case"pop":e.pop();break;case"roll":g=e.pop(),n=e.pop(),e.roll(n,g);break;case"round":n=e.pop(),e.push(Math.round(n));break;case"sin":n=e.pop(),e.push(Math.sin(n%360/180*Math.PI));break;case"sqrt":n=e.pop(),e.push(Math.sqrt(n));break;case"sub":g=e.pop(),n=e.pop(),e.push(n-g);break;case"true":e.push(!0);break;case"truncate":n=e.pop(),n=n<0?Math.ceil(n):Math.floor(n),e.push(n);break;case"xor":g=e.pop(),n=e.pop(),"boolean"==typeof n&&"boolean"==typeof g?e.push(n!==g):e.push(n^g);break;default:throw new ut(`Unknown operator ${s}`)}else e.push(s);return e.stack}}class oI{constructor(A){this.type=A}visit(A){rt("abstract method")}}class II extends oI{constructor(A,e,t){super("args"),this.index=A,this.min=e,this.max=t}visit(A){A.visitArgument(this)}}class cI extends oI{constructor(A){super("literal"),this.number=A,this.min=A,this.max=A}visit(A){A.visitLiteral(this)}}class CI extends oI{constructor(A,e,t,i,a){super("binary"),this.op=A,this.arg1=e,this.arg2=t,this.min=i,this.max=a}visit(A){A.visitBinaryOperation(this)}}class BI extends oI{constructor(A,e){super("max"),this.arg=A,this.min=A.min,this.max=e}visit(A){A.visitMin(this)}}class hI extends oI{constructor(A,e,t){super("var"),this.index=A,this.min=e,this.max=t}visit(A){A.visitVariable(this)}}class QI extends oI{constructor(A,e){super("definition"),this.variable=A,this.arg=e}visit(A){A.visitVariableDefinition(this)}}class lI{constructor(){this.parts=[]}visitArgument(A){this.parts.push("Math.max(",A.min,", Math.min(",A.max,", src[srcOffset + ",A.index,"]))")}visitVariable(A){this.parts.push("v",A.index)}visitLiteral(A){this.parts.push(A.number)}visitBinaryOperation(A){this.parts.push("("),A.arg1.visit(this),this.parts.push(" ",A.op," "),A.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(A){this.parts.push("var "),A.variable.visit(this),this.parts.push(" = "),A.arg.visit(this),this.parts.push(";")}visitMin(A){this.parts.push("Math.min("),A.arg.visit(this),this.parts.push(", ",A.max,")")}toString(){return this.parts.join("")}}function EI(A,e){return"literal"===e.type&&0===e.number?A:"literal"===A.type&&0===A.number?e:"literal"===e.type&&"literal"===A.type?new cI(A.number+e.number):new CI("+",A,e,A.min+e.min,A.max+e.max)}function uI(A,e){if("literal"===e.type){if(0===e.number)return new cI(0);if(1===e.number)return A;if("literal"===A.type)return new cI(A.number*e.number)}if("literal"===A.type){if(0===A.number)return new cI(0);if(1===A.number)return e}const t=Math.min(A.min*e.min,A.min*e.max,A.max*e.min,A.max*e.max),i=Math.max(A.min*e.min,A.min*e.max,A.max*e.min,A.max*e.max);return new CI("*",A,e,t,i)}function dI(A,e){if("literal"===e.type){if(0===e.number)return A;if("literal"===A.type)return new cI(A.number-e.number)}return"binary"===e.type&&"-"===e.op&&"literal"===A.type&&1===A.number&&"literal"===e.arg1.type&&1===e.arg1.number?e.arg2:new CI("-",A,e,A.min-e.max,A.max-e.min)}function fI(A,e){return A.min>=e?new cI(e):A.max<=e?A:new BI(A,e)}class pI{compile(A,e,t){const i=[],a=[],s=e.length>>1,n=t.length>>1;let g,r,o,I,c,C,B,h,Q=0;for(let A=0;A<s;A++)i.push(new II(A,e[2*A],e[2*A+1]));for(let e=0,t=A.length;e<t;e++)if(h=A[e],"number"!=typeof h)switch(h){case"add":if(i.length<2)return null;I=i.pop(),o=i.pop(),i.push(EI(o,I));break;case"cvr":if(i.length<1)return null;break;case"mul":if(i.length<2)return null;I=i.pop(),o=i.pop(),i.push(uI(o,I));break;case"sub":if(i.length<2)return null;I=i.pop(),o=i.pop(),i.push(dI(o,I));break;case"exch":if(i.length<2)return null;c=i.pop(),C=i.pop(),i.push(c,C);break;case"pop":if(i.length<1)return null;i.pop();break;case"index":if(i.length<1)return null;if(o=i.pop(),"literal"!==o.type)return null;if(g=o.number,g<0||!Number.isInteger(g)||i.length<g)return null;if(c=i[i.length-g-1],"literal"===c.type||"var"===c.type){i.push(c);break}B=new hI(Q++,c.min,c.max),i[i.length-g-1]=B,i.push(B),a.push(new QI(B,c));break;case"dup":if(i.length<1)return null;if("number"==typeof A[e+1]&&"gt"===A[e+2]&&A[e+3]===e+7&&"jz"===A[e+4]&&"pop"===A[e+5]&&A[e+6]===A[e+1]){o=i.pop(),i.push(fI(o,A[e+1])),e+=6;break}if(c=i.at(-1),"literal"===c.type||"var"===c.type){i.push(c);break}B=new hI(Q++,c.min,c.max),i[i.length-1]=B,i.push(B),a.push(new QI(B,c));break;case"roll":if(i.length<2)return null;if(I=i.pop(),o=i.pop(),"literal"!==I.type||"literal"!==o.type)return null;if(r=I.number,g=o.number,g<=0||!Number.isInteger(g)||!Number.isInteger(r)||i.length<g)return null;if(r=(r%g+g)%g,0===r)break;i.push(...i.splice(i.length-g,g-r));break;default:return null}else i.push(new cI(h));if(i.length!==n)return null;const l=[];for(const A of a){const e=new lI;A.visit(e),l.push(e.toString())}for(let A=0,e=i.length;A<e;A++){const e=i[A],a=new lI;e.visit(a);const s=t[2*A],n=t[2*A+1],g=[a.toString()];s>e.min&&(g.unshift("Math.max(",s,", "),g.push(")")),n<e.max&&(g.unshift("Math.min(",n,", "),g.push(")")),g.unshift("dest[destOffset + ",A,"] = "),g.push(";"),l.push(g.join(""))}return l.join("\n")}}const mI=["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","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","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","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],yI=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","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","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","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function wI(A){return!!(1&A)}function DI(A){return!(1&A)}function bI(A,e,t){let i,a;for(i=e,a=A.length;i<a;++i)if(A[i]!==t)return i;return i}function kI(A,e,t,i){for(let a=e;a<t;++a)A[a]=i}function FI(A,e,t){for(let i=e,a=t-1;i<a;++i,--a){const e=A[i];A[i]=A[a],A[a]=e}}function SI(A,e,t=!1){let i="ltr";return t?i="ttb":e||(i="rtl"),{str:A,dir:i}}const RI=[],GI=[];function NI(A,e=-1,t=!1){let i=!0;const a=A.length;if(0===a||t)return SI(A,i,t);RI.length=a,GI.length=a;let s,n,g=0;for(s=0;s<a;++s){RI[s]=A.charAt(s);const e=A.charCodeAt(s);let t="L";e<=255?t=mI[e]:1424<=e&&e<=1524?t="R":1536<=e&&e<=1791?(t=yI[255&e],t||gt("Bidi: invalid Unicode character "+e.toString(16))):(1792<=e&&e<=2220||64336<=e&&e<=65023||65136<=e&&e<=65279)&&(t="AL"),"R"!==t&&"AL"!==t&&"AN"!==t||g++,GI[s]=t}if(0===g)return i=!0,SI(A,i);-1===e&&(g/a<.3&&a>4?(i=!0,e=0):(i=!1,e=1));const r=[];for(s=0;s<a;++s)r[s]=e;const o=wI(e)?"R":"L",I=o,c=I;let C,B=I;for(s=0;s<a;++s)"NSM"===GI[s]?GI[s]=B:B=GI[s];for(B=I,s=0;s<a;++s)C=GI[s],"EN"===C?GI[s]="AL"===B?"AN":"EN":"R"!==C&&"L"!==C&&"AL"!==C||(B=C);for(s=0;s<a;++s)C=GI[s],"AL"===C&&(GI[s]="R");for(s=1;s<a-1;++s)"ES"===GI[s]&&"EN"===GI[s-1]&&"EN"===GI[s+1]&&(GI[s]="EN"),"CS"!==GI[s]||"EN"!==GI[s-1]&&"AN"!==GI[s-1]||GI[s+1]!==GI[s-1]||(GI[s]=GI[s-1]);for(s=0;s<a;++s)if("EN"===GI[s]){for(let A=s-1;A>=0&&"ET"===GI[A];--A)GI[A]="EN";for(let A=s+1;A<a&&"ET"===GI[A];++A)GI[A]="EN"}for(s=0;s<a;++s)C=GI[s],"WS"!==C&&"ES"!==C&&"ET"!==C&&"CS"!==C||(GI[s]="ON");for(B=I,s=0;s<a;++s)C=GI[s],"EN"===C?GI[s]="L"===B?"L":"EN":"R"!==C&&"L"!==C||(B=C);for(s=0;s<a;++s)if("ON"===GI[s]){const A=bI(GI,s+1,"ON");let e=I;s>0&&(e=GI[s-1]);let t=c;A+1<a&&(t=GI[A+1]),"L"!==e&&(e="R"),"L"!==t&&(t="R"),e===t&&kI(GI,s,A,e),s=A-1}for(s=0;s<a;++s)"ON"===GI[s]&&(GI[s]=o);for(s=0;s<a;++s)C=GI[s],DI(r[s])?"R"===C?r[s]+=1:"AN"!==C&&"EN"!==C||(r[s]+=2):"L"!==C&&"AN"!==C&&"EN"!==C||(r[s]+=1);let h,Q=-1,l=99;for(s=0,n=r.length;s<n;++s)h=r[s],Q<h&&(Q=h),l>h&&wI(h)&&(l=h);for(h=Q;h>=l;--h){let A=-1;for(s=0,n=r.length;s<n;++s)r[s]<h?A>=0&&(FI(RI,A,s),A=-1):A<0&&(A=s);A>=0&&FI(RI,A,r.length)}for(s=0,n=RI.length;s<n;++s){const A=RI[s];"<"!==A&&">"!==A||(RI[s]="")}return SI(RI.join(""),i)}const xI={style:"normal",weight:"normal"},UI={style:"normal",weight:"bold"},MI={style:"italic",weight:"normal"},LI={style:"italic",weight:"bold"},JI=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:xI,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:UI,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:MI,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:LI,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:xI,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:UI,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:MI,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:LI,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],style:xI,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:UI,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:MI,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:LI,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:xI,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:UI,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:MI,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:LI,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:xI,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:UI,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:MI,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:LI,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:xI}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),HI=new Map([["Arial-Black","ArialBlack"]]);function YI(A){const e=new Set(["thin","extralight","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultracondensed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return A.split(/[- ,+]+/g).filter(A=>!e.has(A.toLowerCase())).join(" ")}function vI({alias:A,local:e,path:t,fallback:i,style:a,ultimate:s},n,g,r=!0,o=!0,I=""){const c={style:null,ultimate:null};if(e){const A=I?` ${I}`:"";for(const t of e)n.push(`local(${t}${A})`)}if(A){const e=JI.get(A),s=I||function(A){switch(A){case UI:return"Bold";case MI:return"Italic";case LI:return"Bold Italic";default:if("bold"===A?.weight)return"Bold";if("italic"===A?.style)return"Italic"}return""}(a);Object.assign(c,vI(e,n,g,r&&!i,o&&!t,s))}if(a&&(c.style=a),s&&(c.ultimate=s),r&&i){const A=JI.get(i),{ultimate:e}=vI(A,n,g,r,o&&!t,I);c.ultimate||=e}return o&&t&&g&&n.push(`url(${g}${t})`),c}function KI(A,e,t,i,a,s){if(i.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==s&&"Type1"!==s||!/^[A-Z]{6}\+/.test(i)||(i=i.slice(7));const n=i=ng(i);let g=A.get(n);if(g)return g;let r=JI.get(i);if(!r)for(const[A,e]of HI)if(i.startsWith(A)){i=`${e}${i.substring(A.length)}`,r=JI.get(i);break}let o=!1;r||(r=JI.get(a),o=!0);const I=`${e.getDocId()}_s${e.createFontId()}`;if(!r){if(!Ui(i))return gt(`Cannot substitute the font because of its name: ${i}`),A.set(n,null),null;const e=/bold/gi.test(i),t=/oblique|italic/gi.test(i),a=e&&t&&LI||e&&UI||t&&MI||xI;return g={css:`"${YI(i)}",${I}`,guessFallback:!0,loadedName:I,baseFontName:i,src:`local(${i})`,style:a},A.set(n,g),g}const c=[];o&&Ui(i)&&c.push(`local(${i})`);const{style:C,ultimate:B}=vI(r,c,t),h=null===B,Q=h?"":`,${B}`;return g={css:`"${YI(i)}",${I}${Q}`,guessFallback:h,loadedName:I,baseFontName:i,src:c.join(","),style:C},A.set(n,g),g}class qI{constructor(A,e){this._imgData=A,this._isMask=e}static needsToBeResized(A,e){if(A<=this._goodSquareLength&&e<=this._goodSquareLength)return!1;const{MAX_DIM:t}=this;if(A>t||e>t)return!0;const i=A*e;if(this._hasMaxArea)return i>this.MAX_AREA;if(i<this._goodSquareLength**2)return!1;if(this._areGoodDims(A,e))return this._goodSquareLength=Math.max(this._goodSquareLength,Math.floor(Math.sqrt(A*e))),!1;this._goodSquareLength=this._guessMax(this._goodSquareLength,t,128,0);return i>(this.MAX_AREA=this._goodSquareLength**2)}static get MAX_DIM(){return ct(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,ct(this,"MAX_AREA",this._guessMax(qI._goodSquareLength,this.MAX_DIM,128,0)**2)}static set MAX_AREA(A){A>=0&&(this._hasMaxArea=!0,ct(this,"MAX_AREA",A))}static setMaxArea(A){this._hasMaxArea||(this.MAX_AREA=A>>2)}static _areGoodDims(A,e){try{const t=new OffscreenCanvas(A,e),i=t.getContext("2d");i.fillRect(0,0,1,1);const a=i.getImageData(0,0,1,1).data[3];return t.width=t.height=1,0!==a}catch{return!1}}static _guessMax(A,e,t,i){for(;A+t+1<e;){const t=Math.floor((A+e)/2),a=i||t;this._areGoodDims(t,a)?A=t:e=t}return A}static async createImage(A,e=!1){return new qI(A,e)._createImage()}async _createImage(){const A=this._encodeBMP(),e=new Blob([A.buffer],{type:"image/bmp"}),t=createImageBitmap(e),{MAX_AREA:i,MAX_DIM:a}=qI,{_imgData:s}=this,{width:n,height:g}=s,r=Math.max(n/a,g/a,Math.sqrt(n*g/i)),o=Math.max(r,2),I=Math.round(10*(r+1.25))/10/o,c=Math.floor(Math.log2(I)),C=new Array(c+2).fill(2);C[0]=o,C.splice(-1,1,I/(1<<c));let B=n,h=g,Q=await t;for(const A of C){const e=B,t=h;B=Math.floor(B/A)-1,h=Math.floor(h/A)-1;const i=new OffscreenCanvas(B,h);i.getContext("2d").drawImage(Q,0,0,e,t,0,0,B,h),Q=i.transferToImageBitmap()}return s.data=null,s.bitmap=Q,s.width=B,s.height=h,s}_encodeBMP(){const{width:A,height:e,kind:t}=this._imgData;let i,a=this._imgData.data,s=new Uint8Array(0),n=s,g=0;switch(t){case y:{i=1,s=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const t=A+7>>3,n=t+3&-4;if(t!==n){const A=new Uint8Array(n*e);let i=0;for(let s=0,g=e*t;s<g;s+=t,i+=n)A.set(a.subarray(s,s+t),i);a=A}break}case w:if(i=24,3&A){const t=3*A,i=t+3&-4,s=i-t,n=new Uint8Array(i*e);let g=0;for(let A=0,i=e*t;A<i;A+=t){const e=a.subarray(A,A+t);for(let A=0;A<t;A+=3)n[g++]=e[A+2],n[g++]=e[A+1],n[g++]=e[A];g+=s}a=n}else for(let A=0,e=a.length;A<e;A+=3){const e=a[A];a[A]=a[A+2],a[A+2]=e}break;case D:i=32,g=3,n=new Uint8Array(68);const t=new DataView(n.buffer);wt.isLittleEndian?(t.setUint32(0,255,!0),t.setUint32(4,65280,!0),t.setUint32(8,16711680,!0),t.setUint32(12,4278190080,!0)):(t.setUint32(0,4278190080,!0),t.setUint32(4,16711680,!0),t.setUint32(8,65280,!0),t.setUint32(12,255,!0));break;default:throw new Error("invalid format")}let r=0;const o=40+n.length,I=14+o+s.length+a.length,c=new Uint8Array(I),C=new DataView(c.buffer);return C.setUint16(r,19778,!0),r+=2,C.setUint32(r,I,!0),r+=4,C.setUint32(r,0,!0),r+=4,C.setUint32(r,14+o+s.length,!0),r+=4,C.setUint32(r,o,!0),r+=4,C.setInt32(r,A,!0),r+=4,C.setInt32(r,-e,!0),r+=4,C.setUint16(r,1,!0),r+=2,C.setUint16(r,i,!0),r+=2,C.setUint32(r,g,!0),r+=4,C.setUint32(r,0,!0),r+=4,C.setInt32(r,0,!0),r+=4,C.setInt32(r,0,!0),r+=4,C.setUint32(r,s.length/4,!0),r+=4,C.setUint32(r,0,!0),r+=4,c.set(n,r),r+=n.length,c.set(s,r),r+=s.length,c.set(a,r),c}}qI._goodSquareLength=2048;const TI=3285377520,PI=4294901760,WI=65535;class ZI{constructor(A){this.h1=A?4294967295&A:TI,this.h2=A?4294967295&A:TI}update(A){let e,t;if("string"==typeof A){e=new Uint8Array(2*A.length),t=0;for(let i=0,a=A.length;i<a;i++){const a=A.charCodeAt(i);a<=255?e[t++]=a:(e[t++]=a>>>8,e[t++]=255&a)}}else{if(!ArrayBuffer.isView(A))throw new Error("Invalid data format, must be a string or TypedArray.");e=A.slice(),t=e.byteLength}const i=t>>2,a=t-4*i,s=new Uint32Array(e.buffer,0,i);let n=0,g=0,r=this.h1,o=this.h2;const I=3432918353,c=461845907,C=11601,B=13715;for(let A=0;A<i;A++)1&A?(n=s[A],n=n*I&PI|n*C&WI,n=n<<15|n>>>17,n=n*c&PI|n*B&WI,r^=n,r=r<<13|r>>>19,r=5*r+3864292196):(g=s[A],g=g*I&PI|g*C&WI,g=g<<15|g>>>17,g=g*c&PI|g*B&WI,o^=g,o=o<<13|o>>>19,o=5*o+3864292196);switch(n=0,a){case 3:n^=e[4*i+2]<<16;case 2:n^=e[4*i+1]<<8;case 1:n^=e[4*i],n=n*I&PI|n*C&WI,n=n<<15|n>>>17,n=n*c&PI|n*B&WI,1&i?r^=n:o^=n}this.h1=r,this.h2=o}hexdigest(){let A=this.h1,e=this.h2;return A^=e>>>1,A=3981806797*A&PI|36045*A&WI,e=4283543511*e&PI|(2950163797*(e<<16|A>>>16)&PI)>>>16,A^=e>>>1,A=444984403*A&PI|60499*A&WI,e=3301882366*e&PI|(3120437893*(e<<16|A>>>16)&PI)>>>16,A^=e>>>1,(A>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}function OI(A,e,t,i,a){let s=A;for(let A=0,t=e.length-1;A<t;A++){const t=e[A];s=s[t]||=[]}s[e.at(-1)]={checkFn:t,iterateFn:i,processFn:a}}const XI=[];OI(XI,[GA,xA,je,NA],null,function(A,e){const t=A.fnArray,i=(e-(A.iCurr-3))%4;switch(i){case 0:return t[e]===GA;case 1:return t[e]===xA;case 2:return t[e]===je;case 3:return t[e]===NA}throw new Error(`iterateInlineImageGroup - invalid pos: ${i}`)},function(A,e){const t=A.fnArray,i=A.argsArray,a=A.iCurr,s=a-3,n=a-2,g=a-1,r=Math.min(Math.floor((e-s)/4),200);if(r<10)return e-(e-s)%4;let o=0;const I=[];let c=0,C=1,B=1;for(let A=0;A<r;A++){const e=i[n+(A<<2)],t=i[g+(A<<2)][0];C+t.width>1e3&&(o=Math.max(o,C),B+=c+2,C=0,c=0),I.push({transform:e,x:C,y:B,w:t.width,h:t.height}),C+=t.width+2,c=Math.max(c,t.height)}const h=Math.max(o,C)+1,Q=B+c+1,l=new Uint8Array(h*Q*4),E=h<<2;for(let A=0;A<r;A++){const e=i[g+(A<<2)][0].data,t=I[A].w<<2;let a=0,s=I[A].x+I[A].y*h<<2;l.set(e.subarray(0,t),s-E);for(let i=0,n=I[A].h;i<n;i++)l.set(e.subarray(a,a+t),s),a+=t,s+=E;for(l.set(e.subarray(a-t,a),s);s>=0;)e[s-4]=e[s],e[s-3]=e[s+1],e[s-2]=e[s+2],e[s-1]=e[s+3],e[s+t]=e[s+t-4],e[s+t+1]=e[s+t-3],e[s+t+2]=e[s+t-2],e[s+t+3]=e[s+t-1],s-=E}const u={width:h,height:Q};if(A.isOffscreenCanvasSupported){const A=new OffscreenCanvas(h,Q);A.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(l.buffer),h,Q),0,0),u.bitmap=A.transferToImageBitmap(),u.data=null}else u.kind=D,u.data=l;return t.splice(s,4*r,ze),i.splice(s,4*r,[u,I]),s+1}),OI(XI,[GA,xA,Oe,NA],null,function(A,e){const t=A.fnArray,i=(e-(A.iCurr-3))%4;switch(i){case 0:return t[e]===GA;case 1:return t[e]===xA;case 2:return t[e]===Oe;case 3:return t[e]===NA}throw new Error(`iterateImageMaskGroup - invalid pos: ${i}`)},function(A,e){const t=A.fnArray,i=A.argsArray,a=A.iCurr,s=a-3,n=a-2,g=a-1;let r=Math.floor((e-s)/4);if(r<10)return e-(e-s)%4;let o,I,c=!1;const C=i[g][0],B=i[n][0],h=i[n][1],Q=i[n][2],l=i[n][3];if(h===Q){c=!0,o=n+4;let A=g+4;for(let e=1;e<r;e++,o+=4,A+=4)if(I=i[o],i[A][0]!==C||I[0]!==B||I[1]!==h||I[2]!==Q||I[3]!==l){e<10?c=!1:r=e;break}}if(c){r=Math.min(r,1e3);const A=new Float32Array(2*r);o=n;for(let e=0;e<r;e++,o+=4)I=i[o],A[e<<1]=I[4],A[1+(e<<1)]=I[5];t.splice(s,4*r,$e),i.splice(s,4*r,[C,B,h,Q,l,A])}else{r=Math.min(r,100);const A=[];for(let e=0;e<r;e++){I=i[n+(e<<2)];const t=i[g+(e<<2)][0];A.push({data:t.data,width:t.width,height:t.height,interpolate:t.interpolate,count:t.count,transform:I})}t.splice(s,4*r,Xe),i.splice(s,4*r,[A])}return s+1}),OI(XI,[GA,xA,Ve,NA],function(A){const e=A.argsArray,t=A.iCurr-2;return 0===e[t][1]&&0===e[t][2]},function(A,e){const t=A.fnArray,i=A.argsArray,a=(e-(A.iCurr-3))%4;switch(a){case 0:return t[e]===GA;case 1:if(t[e]!==xA)return!1;const a=A.iCurr-2,s=i[a][0],n=i[a][3];return i[e][0]===s&&0===i[e][1]&&0===i[e][2]&&i[e][3]===n;case 2:if(t[e]!==Ve)return!1;const g=i[A.iCurr-1][0];return i[e][0]===g;case 3:return t[e]===NA}throw new Error(`iterateImageGroup - invalid pos: ${a}`)},function(A,e){const t=A.fnArray,i=A.argsArray,a=A.iCurr,s=a-3,n=a-2,g=i[a-1][0],r=i[n][0],o=i[n][3],I=Math.min(Math.floor((e-s)/4),1e3);if(I<3)return e-(e-s)%4;const c=new Float32Array(2*I);let C=n;for(let A=0;A<I;A++,C+=4){const e=i[C];c[A<<1]=e[4],c[1+(A<<1)]=e[5]}const B=[g,r,o,c];return t.splice(s,4*I,_e),i.splice(s,4*I,B),s+1}),OI(XI,[_A,ae,oe,ce,$A],null,function(A,e){const t=A.fnArray,i=A.argsArray,a=(e-(A.iCurr-4))%5;switch(a){case 0:return t[e]===_A;case 1:return t[e]===ae;case 2:return t[e]===oe;case 3:if(t[e]!==ce)return!1;const a=A.iCurr-3,s=i[a][0],n=i[a][1];return i[e][0]===s&&i[e][1]===n;case 4:return t[e]===$A}throw new Error(`iterateShowTextGroup - invalid pos: ${a}`)},function(A,e){const t=A.fnArray,i=A.argsArray,a=A.iCurr,s=a-4,n=a-3,g=a-2,r=a-1,o=a,I=i[n][0],c=i[n][1];let C=Math.min(Math.floor((e-s)/5),1e3);if(C<3)return e-(e-s)%5;let B=s;s>=4&&t[s-4]===t[n]&&t[s-3]===t[g]&&t[s-2]===t[r]&&t[s-1]===t[o]&&i[s-4][0]===I&&i[s-4][1]===c&&(C++,B-=5);let h=B+4;for(let A=1;A<C;A++)t.splice(h,3),i.splice(h,3),h+=2;return h+1});class VI{constructor(A){this.queue=A}_optimize(){}push(A,e){this.queue.fnArray.push(A),this.queue.argsArray.push(e),this._optimize()}flush(){}reset(){}}class jI extends VI{constructor(A){super(A),this.state=null,this.context={iCurr:0,fnArray:A.fnArray,argsArray:A.argsArray,isOffscreenCanvasSupported:!1},this.match=null,this.lastProcessed=0}set isOffscreenCanvasSupported(A){this.context.isOffscreenCanvasSupported=A}_optimize(){const A=this.queue.fnArray;let e=this.lastProcessed,t=A.length,i=this.state,a=this.match;if(!i&&!a&&e+1===t&&!XI[A[e]])return void(this.lastProcessed=t);const s=this.context;for(;e<t;){if(a){if((0,a.iterateFn)(s,e)){e++;continue}if(e=(0,a.processFn)(s,e+1),t=A.length,a=null,i=null,e>=t)break}i=(i||XI)[A[e]],i&&!Array.isArray(i)?(s.iCurr=e,e++,!i.checkFn||(0,i.checkFn)(s)?(a=i,i=null):i=null):e++}this.state=i,this.match=a,this.lastProcessed=e}flush(){for(;this.match;){const A=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,A),this.match=null,this.state=null,this._optimize()}}reset(){this.state=null,this.match=null,this.lastProcessed=0}}class zI{static CHUNK_SIZE=1e3;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;constructor(A=0,e){this._streamSink=e,this.fnArray=[],this.argsArray=[],this.optimizer=!e||A&h?new VI(this):new jI(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=e?null:Promise.resolve()}set isOffscreenCanvasSupported(A){this.optimizer.isOffscreenCanvasSupported=A}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(A,e){this.optimizer.push(A,e),this.weight++,this._streamSink&&(this.weight>=zI.CHUNK_SIZE||this.weight>=zI.CHUNK_SIZE_ABOUT&&(A===NA||A===$A))&&this.flush()}addImageOps(A,e,t){void 0!==t&&this.addOp(Je,["OC",t]),this.addOp(A,e),void 0!==t&&this.addOp(He,[])}addDependency(A){this.dependencies.has(A)||(this.dependencies.add(A),this.addOp(mA,[A]))}addDependencies(A){for(const e of A)this.addDependency(e)}addOpList(A){if(A instanceof zI){for(const e of A.dependencies)this.dependencies.add(e);for(let e=0,t=A.length;e<t;e++)this.addOp(A.fnArray[e],A.argsArray[e])}else gt('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){const A=[],{fnArray:e,argsArray:t,length:i}=this;for(let a=0;a<i;a++)switch(e[a]){case je:case ze:case Oe:const e=t[a][0];!e.cached&&e.data?.buffer instanceof ArrayBuffer&&A.push(e.data.buffer)}return A}flush(A=!1,e=null){this.optimizer.flush();const t=this.length;this._totalLength+=t,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:A,separateAnnots:e,length:t},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}function _I(A,e,t,i){return(A=e+A*t)<0?A=0:A>i&&(A=i),A}function $I(A,e,t,i,a,s){const n=a*s;let g;g=e<=8?new Uint8Array(n):e<=16?new Uint16Array(n):new Uint32Array(n);const r=t/a,o=i/s;let I,c,C,B,h=0;const Q=new Uint16Array(a),l=t;for(I=0;I<a;I++)Q[I]=Math.floor(I*r);for(I=0;I<s;I++)for(C=Math.floor(I*o)*l,c=0;c<a;c++)B=C+Q[c],g[h++]=A[B];return g}class Ac{constructor({xref:A,res:e,image:t,isInline:i=!1,smask:a=null,mask:s=null,isMask:n=!1,pdfFunctionFactory:g,localColorSpaceCache:r}){this.image=t;const o=t.dict,I=o.get("F","Filter");let c;if(I instanceof Vt)c=I.name;else if(Array.isArray(I)){const e=A.fetchIfRef(I[0]);e instanceof Vt&&(c=e.name)}switch(c){case"JPXDecode":({width:t.width,height:t.height,componentsCount:t.numComps,bitsPerComponent:t.bitsPerComponent}=Hs.parseImageProperties(t.stream)),t.stream.reset(),this.jpxDecoderOptions={numComponents:0,isIndexedColormap:!1,smaskInData:o.has("SMaskInData")};break;case"JBIG2Decode":t.bitsPerComponent=1,t.numComps=1}let C=o.get("W","Width"),B=o.get("H","Height");if(Number.isInteger(t.width)&&t.width>0&&Number.isInteger(t.height)&&t.height>0&&(t.width!==C||t.height!==B)&&(gt("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),C=t.width,B=t.height),C<1||B<1)throw new ut(`Invalid image width: ${C} or height: ${B}`);this.width=C,this.height=B,this.interpolate=o.get("I","Interpolate"),this.imageMask=o.get("IM","ImageMask")||!1,this.matte=o.get("Matte")||!1;let h=t.bitsPerComponent;if(!h&&(h=o.get("BPC","BitsPerComponent"),!h)){if(!this.imageMask)throw new ut(`Bits per component missing in image: ${this.imageMask}`);h=1}if(this.bpc=h,!this.imageMask){let a=o.getRaw("CS")||o.getRaw("ColorSpace");const s=!!a;if(s)this.jpxDecoderOptions?.smaskInData&&(a=Vt.get("DeviceRGBA"));else if(this.jpxDecoderOptions)a=Vt.get("DeviceRGBA");else switch(t.numComps){case 1:a=Vt.get("DeviceGray");break;case 3:a=Vt.get("DeviceRGB");break;case 4:a=Vt.get("DeviceCMYK");break;default:throw new Error(`Images with ${t.numComps} color components not supported.`)}this.colorSpace=Vi.parse({cs:a,xref:A,resources:i?e:null,pdfFunctionFactory:g,localColorSpaceCache:r}),this.numComps=this.colorSpace.numComps,this.jpxDecoderOptions&&(this.jpxDecoderOptions.numComponents=s?this.numComp:0,this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name)}if(this.decode=o.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,h)||n&&!Vi.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const A=(1<<h)-1;this.decodeCoefficients=[],this.decodeAddends=[];const e="Indexed"===this.colorSpace?.name;for(let t=0,i=0;t<this.decode.length;t+=2,++i){const a=this.decode[t],s=this.decode[t+1];this.decodeCoefficients[i]=e?(s-a)/A:s-a,this.decodeAddends[i]=e?a:A*a}}if(a)this.smask=new Ac({xref:A,res:e,image:a,isInline:i,pdfFunctionFactory:g,localColorSpaceCache:r});else if(s)if(s instanceof ni){s.dict.get("IM","ImageMask")?this.mask=new Ac({xref:A,res:e,image:s,isInline:i,isMask:!0,pdfFunctionFactory:g,localColorSpaceCache:r}):gt("Ignoring /Mask in image without /ImageMask.")}else this.mask=s}static async buildImage({xref:A,res:e,image:t,isInline:i=!1,pdfFunctionFactory:a,localColorSpaceCache:s}){const n=t;let g=null,r=null;const o=t.dict.get("SMask"),I=t.dict.get("Mask");return o?o instanceof ni?g=o:gt("Unsupported /SMask format."):I&&(I instanceof ni||Array.isArray(I)?r=I:gt("Unsupported /Mask format.")),new Ac({xref:A,res:e,image:n,isInline:i,smask:g,mask:r,pdfFunctionFactory:a,localColorSpaceCache:s})}static createRawMask({imgArray:A,width:e,height:t,imageIsFromDecodeStream:i,inverseDecode:a,interpolate:s}){const n=(e+7>>3)*t,g=A.byteLength;let r,o;if(!i||a&&!(n===g)?a?(r=new Uint8Array(n),r.set(A),r.fill(255,g)):r=new Uint8Array(A):r=A,a)for(o=0;o<g;o++)r[o]^=255;return{data:r,width:e,height:t,interpolate:s}}static async createMask({imgArray:A,width:e,height:t,imageIsFromDecodeStream:i,inverseDecode:a,interpolate:s,isOffscreenCanvasSupported:n=!1}){const g=1===e&&1===t&&a===(0===A.length||!!(128&A[0]));if(g)return{isSingleOpaquePixel:g};if(n){if(qI.needsToBeResized(e,t)){const i=new Uint8ClampedArray(e*t*4);return Bs({src:A,dest:i,width:e,height:t,nonBlackColor:0,inverseDecode:a}),qI.createImage({kind:D,data:i,width:e,height:t,interpolate:s})}const i=new OffscreenCanvas(e,t),n=i.getContext("2d"),g=n.createImageData(e,t);Bs({src:A,dest:g.data,width:e,height:t,nonBlackColor:0,inverseDecode:a}),n.putImageData(g,0,0);return{data:null,width:e,height:t,interpolate:s,bitmap:i.transferToImageBitmap()}}return this.createRawMask({imgArray:A,width:e,height:t,inverseDecode:a,imageIsFromDecodeStream:i,interpolate:s})}get drawWidth(){return Math.max(this.width,this.smask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(A){const e=this.bpc,t=this.numComps,i=this.decodeAddends,a=this.decodeCoefficients,s=(1<<e)-1;let n,g;if(1===e){for(n=0,g=A.length;n<g;n++)A[n]=+!A[n];return}let r=0;for(n=0,g=this.width*this.height;n<g;n++)for(let e=0;e<t;e++)A[r]=_I(A[r],i[e],a[e],s),r++}getComponents(A){const e=this.bpc;if(8===e)return A;const t=this.width,i=this.height,a=this.numComps,s=t*i*a;let n,g=0;n=e<=8?new Uint8Array(s):e<=16?new Uint16Array(s):new Uint32Array(s);const r=t*a,o=(1<<e)-1;let I,c,C=0;if(1===e){let e,t,a;for(let s=0;s<i;s++){for(t=C+(-8&r),a=C+r;C<t;)c=A[g++],n[C]=c>>7&1,n[C+1]=c>>6&1,n[C+2]=c>>5&1,n[C+3]=c>>4&1,n[C+4]=c>>3&1,n[C+5]=c>>2&1,n[C+6]=c>>1&1,n[C+7]=1&c,C+=8;if(C<a)for(c=A[g++],e=128;C<a;)n[C++]=+!!(c&e),e>>=1}}else{let t=0;for(c=0,C=0,I=s;C<I;++C){for(C%r===0&&(c=0,t=0);t<e;)c=c<<8|A[g++],t+=8;const i=t-e;let a=c>>i;a<0?a=0:a>o&&(a=o),n[C]=a,c&=(1<<i)-1,t=i}}return n}async fillOpacity(A,e,t,i,a){const s=this.smask,n=this.mask;let g,r,o,I,c,C;if(s)r=s.width,o=s.height,g=new Uint8ClampedArray(r*o),await s.fillGrayBuffer(g),r===e&&o===t||(g=$I(g,s.bpc,r,o,e,t));else if(n)if(n instanceof Ac){for(r=n.width,o=n.height,g=new Uint8ClampedArray(r*o),n.numComps=1,await n.fillGrayBuffer(g),I=0,c=r*o;I<c;++I)g[I]=255-g[I];r===e&&o===t||(g=$I(g,n.bpc,r,o,e,t))}else{if(!Array.isArray(n))throw new ut("Unknown mask format.");{g=new Uint8ClampedArray(e*t);const A=this.numComps;for(I=0,c=e*t;I<c;++I){let e=0;const t=I*A;for(C=0;C<A;++C){const A=a[t+C],i=2*C;if(A<n[i]||A>n[i+1]){e=255;break}}g[I]=e}}}if(g)for(I=0,C=3,c=e*i;I<c;++I,C+=4)A[C]=g[I];else for(I=0,C=3,c=e*i;I<c;++I,C+=4)A[C]=255}undoPreblend(A,e,t){const i=this.smask?.matte;if(!i)return;const a=this.colorSpace.getRgb(i,0),s=a[0],n=a[1],g=a[2],r=e*t*4;for(let e=0;e<r;e+=4){const t=A[e+3];if(0===t){A[e]=255,A[e+1]=255,A[e+2]=255;continue}const i=255/t;A[e]=(A[e]-s)*i+s,A[e+1]=(A[e+1]-n)*i+n,A[e+2]=(A[e+2]-g)*i+g}}async createImageData(A=!1,e=!1){const t=this.drawWidth,i=this.drawHeight,a={width:t,height:i,interpolate:this.interpolate,kind:0,data:null},s=this.numComps,n=this.width,g=this.height,r=this.bpc,o=n*s*r+7>>3,I=e&&qI.needsToBeResized(t,i);if("DeviceRGBA"===this.colorSpace.name){a.kind=D;const A=a.data=await this.getImageBytes(g*n*4,{});return e?I?qI.createImage(a,!1):this.createBitmap(D,t,i,A):a}if(!A){let A;if("DeviceGray"===this.colorSpace.name&&1===r?A=y:"DeviceRGB"!==this.colorSpace.name||8!==r||this.needsDecode||(A=w),A&&!this.smask&&!this.mask&&t===n&&i===g){const s=await this.getImageBytes(g*o,{});if(e)return I?qI.createImage({data:s,kind:A,width:t,height:i,interpolate:this.interpolate},this.needsDecode):this.createBitmap(A,n,g,s);if(a.kind=A,a.data=s,this.needsDecode){ot(A===y,"PDFImage.createImageData: The image must be grayscale.");const e=a.data;for(let A=0,t=e.length;A<t;A++)e[A]^=255}return a}if(this.image instanceof xs&&!this.smask&&!this.mask&&!this.needsDecode){let A=g*o;if(e&&!I){let e=!1;switch(this.colorSpace.name){case"DeviceGray":A*=4,e=!0;break;case"DeviceRGB":A=A/3*4,e=!0;break;case"DeviceCMYK":e=!0}if(e){const e=await this.getImageBytes(A,{drawWidth:t,drawHeight:i,forceRGBA:!0});return this.createBitmap(D,t,i,e)}}else switch(this.colorSpace.name){case"DeviceGray":A*=3;case"DeviceRGB":case"DeviceCMYK":return a.kind=w,a.data=await this.getImageBytes(A,{drawWidth:t,drawHeight:i,forceRGB:!0}),I?qI.createImage(a):a}}}const c=await this.getImageBytes(g*o,{internal:!0}),C=0|c.length/o*i/g,B=this.getComponents(c);let h,Q,l,E,u,d;if(e&&!I&&(l=new OffscreenCanvas(t,i),E=l.getContext("2d"),u=E.createImageData(t,i),d=u.data),a.kind=D,A||this.smask||this.mask)e&&!I||(d=new Uint8ClampedArray(t*i*4)),h=1,Q=!0,await this.fillOpacity(d,t,i,C,B);else{if(!e||I)a.kind=w,d=new Uint8ClampedArray(t*i*3),h=0;else{new Uint32Array(d.buffer).fill(wt.isLittleEndian?4278190080:255),h=1}Q=!1}if(this.needsDecode&&this.decodeBuffer(B),this.colorSpace.fillRgb(d,n,g,t,i,C,r,B,h),Q&&this.undoPreblend(d,t,C),e&&!I){E.putImageData(u,0,0);return{data:null,width:t,height:i,bitmap:l.transferToImageBitmap(),interpolate:this.interpolate}}return a.data=d,I?qI.createImage(a):a}async fillGrayBuffer(A){const e=this.numComps;if(1!==e)throw new ut(`Reading gray scale from a color image: ${e}`);const t=this.width,i=this.height,a=this.bpc,s=t*e*a+7>>3,n=await this.getImageBytes(i*s,{internal:!0}),g=this.getComponents(n);let r,o;if(1===a){if(o=t*i,this.needsDecode)for(r=0;r<o;++r)A[r]=g[r]-1&255;else for(r=0;r<o;++r)A[r]=255&-g[r];return}this.needsDecode&&this.decodeBuffer(g),o=t*i;const I=255/((1<<a)-1);for(r=0;r<o;++r)A[r]=I*g[r]}createBitmap(A,e,t,i){const a=new OffscreenCanvas(e,t),s=a.getContext("2d");let n;A===D?n=new ImageData(i,e,t):(n=s.createImageData(e,t),Cs({kind:A,src:i,dest:new Uint32Array(n.data.buffer),width:e,height:t,inverseDecode:this.needsDecode})),s.putImageData(n,0,0);return{data:null,width:e,height:t,bitmap:a.transferToImageBitmap(),interpolate:this.interpolate}}async getImageBytes(A,{drawWidth:e,drawHeight:t,forceRGBA:i=!1,forceRGB:a=!1,internal:s=!1}){this.image.reset(),this.image.drawWidth=e||this.width,this.image.drawHeight=t||this.height,this.image.forceRGBA=!!i,this.image.forceRGB=!!a;const n=await this.image.getImageData(A,this.jpxDecoderOptions);return s||this.image instanceof ha?n:(ot(n instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(n))}}const ec=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),tc=1,ic=2,ac=Promise.resolve();function sc(A,e=!1){if(Array.isArray(A)){for(const e of A){const A=sc(e,!0);if(A)return A}return gt(`Unsupported blend mode Array: ${A}`),"source-over"}if(!(A instanceof Vt))return e?null:"source-over";switch(A.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return e?null:(gt(`Unsupported blend mode: ${A.name}`),"source-over")}function nc(A,e){e.objId&&A.addDependency(e.objId),A.addImageOps(e.fn,e.args,e.optionalContent),e.fn===Oe&&e.args[0]?.count>0&&e.args[0].count++}class gc{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){return!(++this.checked<gc.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+gc.TIME_SLOT_DURATION_MS,this.checked=0}}class rc{constructor({xref:A,handler:e,pageIndex:t,idFactory:i,fontCache:a,builtInCMapCache:s,standardFontDataCache:n,globalImageCache:g,systemFontCache:r,options:o=null}){this.xref=A,this.handler=e,this.pageIndex=t,this.idFactory=i,this.fontCache=a,this.builtInCMapCache=s,this.standardFontDataCache=n,this.globalImageCache=g,this.systemFontCache=r,this.options=o||ec,this.type3FontRefs=null,this._regionalImageCache=new eI,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this),qI.setMaxArea(this.options.canvasMaxAreaInBytes)}get _pdfFunctionFactory(){return ct(this,"_pdfFunctionFactory",new iI({xref:this.xref,isEvalSupported:this.options.isEvalSupported}))}get parsingType3Font(){return!!this.type3FontRefs}clone(A=null){const e=Object.create(this);return e.options=Object.assign(Object.create(null),this.options,A),e}hasBlendModes(A,e){if(!(A instanceof _t))return!1;if(A.objId&&e.has(A.objId))return!1;const t=new Ai(e);A.objId&&t.put(A.objId);const i=[A],a=this.xref;for(;i.length;){const A=i.shift(),e=A.get("ExtGState");if(e instanceof _t)for(let A of e.getRawValues()){if(A instanceof $t){if(t.has(A))continue;try{A=a.fetch(A)}catch(e){t.put(A),nt(`hasBlendModes - ignoring ExtGState: "${e}".`);continue}}if(!(A instanceof _t))continue;A.objId&&t.put(A.objId);const e=A.get("BM");if(e instanceof Vt){if("Normal"!==e.name)return!0}else if(void 0!==e&&Array.isArray(e))for(const A of e)if(A instanceof Vt&&"Normal"!==A.name)return!0}const s=A.get("XObject");if(s instanceof _t)for(let A of s.getRawValues()){if(A instanceof $t){if(t.has(A))continue;try{A=a.fetch(A)}catch(e){t.put(A),nt(`hasBlendModes - ignoring XObject: "${e}".`);continue}}if(!(A instanceof ni))continue;A.dict.objId&&t.put(A.dict.objId);const e=A.dict.get("Resources");e instanceof _t&&(e.objId&&t.has(e.objId)||(i.push(e),e.objId&&t.put(e.objId)))}}for(const A of t)e.put(A);return!1}async fetchBuiltInCMap(A){const e=this.builtInCMapCache.get(A);if(e)return e;let t;if(null!==this.options.cMapUrl){const e=`${this.options.cMapUrl}${A}.bcmap`,i=await fetch(e);if(!i.ok)throw new Error(`fetchBuiltInCMap: failed to fetch file "${e}" with "${i.statusText}".`);t={cMapData:new Uint8Array(await i.arrayBuffer()),compressionType:pA}}else t=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:A});return t.compressionType!==fA&&this.builtInCMapCache.set(A,t),t}async fetchStandardFontData(A){const e=this.standardFontDataCache.get(A);if(e)return new Pi(e);if(this.options.useSystemFonts&&"Symbol"!==A&&"ZapfDingbats"!==A)return null;const t=rg()[A];let i;if(null!==this.options.standardFontDataUrl){const A=`${this.options.standardFontDataUrl}${t}`,e=await fetch(A);e.ok?i=new Uint8Array(await e.arrayBuffer()):gt(`fetchStandardFontData: failed to fetch file "${A}" with "${e.statusText}".`)}else try{i=await this.handler.sendWithPromise("FetchStandardFontData",{filename:t})}catch(A){gt(`fetchStandardFontData: failed to fetch file "${t}" with "${A}".`)}return i?(this.standardFontDataCache.set(A,i),new Pi(i)):null}async buildFormXObject(A,e,t,i,a,s,n){const g=e.dict,r=yi(g.getArray("Matrix"),null),o=Di(g.getArray("BBox"),null);let I,c;g.has("OC")&&(I=await this.parseMarkedContentProps(g.get("OC"),A)),void 0!==I&&i.addOp(Je,["OC",I]);const C=g.get("Group");if(C){c={matrix:r,bbox:o,smask:t,isolated:!1,knockout:!1};let e=null;if(ti(C.get("S"),"Transparency")&&(c.isolated=C.get("I")||!1,c.knockout=C.get("K")||!1,C.has("CS"))){const t=C.getRaw("CS"),i=Vi.getCached(t,this.xref,n);e=i||await this.parseColorSpace({cs:t,resources:A,localColorSpaceCache:n})}t?.backdrop&&(e||=Vi.singletons.rgb,t.backdrop=e.getRgb(t.backdrop,0)),i.addOp(Te,[c])}const B=C?[r,null]:[r,o];i.addOp(Ke,B),await this.getOperatorList({stream:e,task:a,resources:g.get("Resources")||A,operatorList:i,initialState:s}),i.addOp(qe,[]),C&&i.addOp(Pe,[c]),void 0!==I&&i.addOp(He,[])}_sendImgData(A,e,t=!1){const i=e?[e.bitmap||e.data.buffer]:null;return this.parsingType3Font||t?this.handler.send("commonobj",[A,"Image",e],i):this.handler.send("obj",[A,this.pageIndex,"Image",e],i)}async buildPaintImageXObject({resources:A,image:e,isInline:t=!1,operatorList:i,cacheKey:a,localImageCache:s,localColorSpaceCache:n}){const g=e.dict,r=g.objId,o=g.get("W","Width"),I=g.get("H","Height");if(!o||"number"!=typeof o||!I||"number"!=typeof I)return void gt("Image dimensions are missing, or not numbers.");const c=this.options.maxImageSize;if(-1!==c&&o*I>c){const A="Image exceeded maximum allowed size and was removed.";if(this.options.ignoreErrors)return void gt(A);throw new Error(A)}let C;g.has("OC")&&(C=await this.parseMarkedContentProps(g.get("OC"),A));let B,h;if(g.get("IM","ImageMask")||!1){const A=g.get("I","Interpolate"),t=o+7>>3,n=e.getBytes(t*I),c=g.getArray("D","Decode");if(this.parsingType3Font){if(B=Ac.createRawMask({imgArray:n,width:o,height:I,imageIsFromDecodeStream:e instanceof ha,inverseDecode:c?.[0]>0,interpolate:A}),B.cached=!!a,h=[B],i.addImageOps(Oe,h,C),a){const A={fn:Oe,args:h,optionalContent:C};s.set(a,r,A),r&&this._regionalImageCache.set(null,r,A)}return}if(B=await Ac.createMask({imgArray:n,width:o,height:I,imageIsFromDecodeStream:e instanceof ha,inverseDecode:c?.[0]>0,interpolate:A,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported}),B.isSingleOpaquePixel){if(i.addImageOps(At,[],C),a){const A={fn:At,args:[],optionalContent:C};s.set(a,r,A),r&&this._regionalImageCache.set(null,r,A)}return}const Q=`mask_${this.idFactory.createObjId()}`;if(i.addDependency(Q),B.dataLen=B.bitmap?B.width*B.height*4:B.data.length,this._sendImgData(Q,B),h=[{data:Q,width:B.width,height:B.height,interpolate:B.interpolate,count:1}],i.addImageOps(Oe,h,C),a){const A={objId:Q,fn:Oe,args:h,optionalContent:C};s.set(a,r,A),r&&this._regionalImageCache.set(null,r,A)}return}if(t&&o+I<200&&!g.has("SMask")&&!g.has("Mask")){try{const a=new Ac({xref:this.xref,res:A,image:e,isInline:t,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:n});B=await a.createImageData(!0,!1),i.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,i.addImageOps(je,[B],C)}catch(A){const e=`Unable to decode inline image: "${A}".`;if(!this.options.ignoreErrors)throw new Error(e);gt(e)}return}let Q=`img_${this.idFactory.createObjId()}`,l=!1;if(this.parsingType3Font?Q=`${this.idFactory.getDocId()}_type3_${Q}`:a&&r&&(l=this.globalImageCache.shouldCache(r,this.pageIndex),l&&(ot(!t,"Cannot cache an inline image globally."),Q=`${this.idFactory.getDocId()}_${Q}`)),i.addDependency(Q),h=[Q,o,I],i.addImageOps(Ve,h,C),l){if(this.globalImageCache.hasDecodeFailed(r))return this.globalImageCache.setData(r,{objId:Q,fn:Ve,args:h,optionalContent:C,byteSize:0}),void this._sendImgData(Q,null,l);if(o*I>25e4||g.has("SMask")||g.has("Mask")){const A=await this.handler.sendWithPromise("commonobj",[Q,"CopyLocalImage",{imageRef:r}]);if(A)return this.globalImageCache.setData(r,{objId:Q,fn:Ve,args:h,optionalContent:C,byteSize:0}),void this.globalImageCache.addByteSize(r,A)}}if(Ac.buildImage({xref:this.xref,res:A,image:e,isInline:t,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:n}).then(async A=>(B=await A.createImageData(!1,this.options.isOffscreenCanvasSupported),B.dataLen=B.bitmap?B.width*B.height*4:B.data.length,B.ref=r,l&&this.globalImageCache.addByteSize(r,B.dataLen),this._sendImgData(Q,B,l))).catch(A=>(gt(`Unable to decode image "${Q}": "${A}".`),r&&this.globalImageCache.addDecodeFailed(r),this._sendImgData(Q,null,l))),a){const A={objId:Q,fn:Ve,args:h,optionalContent:C};s.set(a,r,A),r&&(this._regionalImageCache.set(null,r,A),l&&this.globalImageCache.setData(r,{objId:Q,fn:Ve,args:h,optionalContent:C,byteSize:0}))}}handleSMask(A,e,t,i,a,s){const n=A.get("G"),g={subtype:A.get("S").name,backdrop:A.get("BC")},r=A.get("TR");if(nI(r)){const A=this._pdfFunctionFactory.create(r),e=new Uint8Array(256),t=new Float32Array(1);for(let i=0;i<256;i++)t[0]=i/255,A(t,0,t,0),e[i]=255*t[0]|0;g.transferMap=e}return this.buildFormXObject(e,n,g,t,i,a.state.clone(),s)}handleTransferFunction(A){let e;if(Array.isArray(A))e=A;else{if(!nI(A))return null;e=[A]}const t=[];let i=0,a=0;for(const A of e){const e=this.xref.fetchIfRef(A);if(i++,ti(e,"Identity")){t.push(null);continue}if(!nI(e))return null;const s=this._pdfFunctionFactory.create(e),n=new Uint8Array(256),g=new Float32Array(1);for(let A=0;A<256;A++)g[0]=A/255,s(g,0,g,0),n[A]=255*g[0]|0;t.push(n),a++}return 1!==i&&4!==i||0===a?null:t}handleTilingType(A,e,t,i,a,s,n,g){const r=new zI,o=_t.merge({xref:this.xref,dictArray:[a.get("Resources"),t]});return this.getOperatorList({stream:i,task:n,resources:o,operatorList:r}).then(function(){const t=r.getIR(),i=Ao(t,a,e);s.addDependencies(r.dependencies),s.addOp(A,i),a.objId&&g.set(null,a.objId,{operatorListIR:t,dict:a})}).catch(A=>{if(!(A instanceof dt)){if(!this.options.ignoreErrors)throw A;gt(`handleTilingType - ignoring pattern: "${A}".`)}})}async handleSetFont(A,e,t,i,a,s,n=null,g=null){const r=e?.[0]instanceof Vt?e[0].name:null;let o=await this.loadFont(r,t,A,n,g);if(o.font.isType3Font)try{await o.loadType3Data(this,A,a),i.addDependencies(o.type3Dependencies)}catch(A){o=new oc({loadedName:"g_font_error",font:new Yr(`Type3 font load error: ${A}`),dict:o.font,evaluatorOptions:this.options})}return s.font=o.font,o.send(this.handler),o.loadedName}handleText(A,e){const t=e.font,i=t.charsToGlyphs(A);if(t.data){(!!(e.textRenderingMode&m)||"Pattern"===e.fillColorSpace.name||t.disableFontFace||this.options.disableFontFace)&&rc.buildFontPaths(t,i,this.handler,this.options)}return i}ensureStateFont(A){if(A.font)return;const e=new ut("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw e;gt(`ensureStateFont: "${e}".`)}async setGState({resources:A,gState:e,operatorList:t,cacheKey:i,task:a,stateManager:s,localGStateCache:n,localColorSpaceCache:g}){const r=e.objId;let o=!0;const I=[];let c=Promise.resolve();for(const i of e.getKeys()){const n=e.get(i);switch(i){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":I.push([i,n]);break;case"Font":o=!1,c=c.then(()=>this.handleSetFont(A,null,n[0],t,a,s.state).then(function(A){t.addDependency(A),I.push([i,[A,n[1]]])}));break;case"BM":I.push([i,sc(n)]);break;case"SMask":if(ti(n,"None")){I.push([i,!1]);break}n instanceof _t?(o=!1,c=c.then(()=>this.handleSMask(n,A,t,a,s,g)),I.push([i,!0])):gt("Unsupported SMask type");break;case"TR":const e=this.handleTransferFunction(n);I.push([i,e]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":nt("graphic state operator "+i);break;default:nt("Unknown graphic state operator "+i)}}await c,I.length>0&&t.addOp(RA,[I]),o&&n.set(i,r,I)}loadFont(A,e,t,i=null,a=null){const s=async()=>new oc({loadedName:"g_font_error",font:new Yr(`Font "${A}" is not available.`),dict:e,evaluatorOptions:this.options});let n;if(e)e instanceof $t&&(n=e);else{const e=t.get("Font");e&&(n=e.getRaw(A))}if(n){if(this.type3FontRefs?.has(n))return s();if(this.fontCache.has(n))return this.fontCache.get(n);try{e=this.xref.fetchIfRef(n)}catch(A){gt(`loadFont - lookup failed: "${A}".`)}}if(!(e instanceof _t)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return gt(`Font "${A}" is not available.`),s();gt(`Font "${A}" is not available -- attempting to fallback to a default font.`),e=i||rc.fallbackFontDict}if(e.cacheKey&&this.fontCache.has(e.cacheKey))return this.fontCache.get(e.cacheKey);const{promise:g,resolve:r}=Promise.withResolvers();let o;try{o=this.preEvaluateFont(e),o.cssFontInfo=a}catch(A){return gt(`loadFont - preEvaluateFont failed: "${A}".`),s()}const{descriptor:I,hash:c}=o,C=n instanceof $t;let B;if(c&&I instanceof _t){const A=I.fontAliases||=Object.create(null);if(A[c]){const e=A[c].aliasRef;if(C&&e&&this.fontCache.has(e))return this.fontCache.putAlias(n,e),this.fontCache.get(n)}else A[c]={fontID:this.idFactory.createFontId()};C&&(A[c].aliasRef=n),B=A[c].fontID}else B=this.idFactory.createFontId();return ot(B?.startsWith("f"),'The "fontID" must be (correctly) defined.'),C?this.fontCache.put(n,g):(e.cacheKey=`cacheKey_${B}`,this.fontCache.put(e.cacheKey,g)),e.loadedName=`${this.idFactory.getDocId()}_${B}`,this.translateFont(o).then(A=>{r(new oc({loadedName:e.loadedName,font:A,dict:e,evaluatorOptions:this.options}))}).catch(A=>{gt(`loadFont - translateFont failed: "${A}".`),r(new oc({loadedName:e.loadedName,font:new Yr(A instanceof Error?A.message:A),dict:e,evaluatorOptions:this.options}))}),g}buildPath(A,e,t,i=!1){const a=A.length-1;if(t||(t=[]),a<0||A.fnArray[a]!==et){let a;switch(i&&(gt(`Encountered path operator "${e}" inside of a text object.`),A.addOp(GA,null)),e){case vA:const A=t[0]+t[2],e=t[1]+t[3];a=[Math.min(t[0],A),Math.min(t[1],e),Math.max(t[0],A),Math.max(t[1],e)];break;case UA:case MA:a=[t[0],t[1],t[0],t[1]];break;default:a=[1/0,1/0,-1/0,-1/0]}A.addOp(et,[[e],t,a]),i&&A.addOp(NA,null)}else{const i=A.argsArray[a];i[0].push(e),i[1].push(...t);const s=i[2];switch(e){case vA:const A=t[0]+t[2],e=t[1]+t[3];s[0]=Math.min(s[0],t[0],A),s[1]=Math.min(s[1],t[1],e),s[2]=Math.max(s[2],t[0],A),s[3]=Math.max(s[3],t[1],e);break;case UA:case MA:s[0]=Math.min(s[0],t[0]),s[1]=Math.min(s[1],t[1]),s[2]=Math.max(s[2],t[0]),s[3]=Math.max(s[3],t[1])}}}parseColorSpace({cs:A,resources:e,localColorSpaceCache:t}){return Vi.parseAsync({cs:A,xref:this.xref,resources:e,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:t}).catch(A=>{if(A instanceof dt)return null;if(this.options.ignoreErrors)return gt(`parseColorSpace - ignoring ColorSpace: "${A}".`),null;throw A})}parseShading({shading:A,resources:e,localColorSpaceCache:t,localShadingPatternCache:i}){let a,s=i.get(A);if(s)return s;try{a=Zr.parseShading(A,this.xref,e,this._pdfFunctionFactory,t).getIR()}catch(e){if(e instanceof dt)return null;if(this.options.ignoreErrors)return gt(`parseShading - ignoring shading: "${e}".`),i.set(A,null),null;throw e}return s=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(s=`${this.idFactory.getDocId()}_type3_${s}`),i.set(A,s),this.parsingType3Font?this.handler.send("commonobj",[s,"Pattern",a]):this.handler.send("obj",[s,this.pageIndex,"Pattern",a]),s}handleColorN(A,e,t,i,a,s,n,g,r,o){const I=t.pop();if(I instanceof Vt){const c=a.getRaw(I.name),C=c instanceof $t&&r.getByRef(c);if(C)try{const a=i.base?i.base.getRgb(t,0):null,s=Ao(C.operatorListIR,C.dict,a);return void A.addOp(e,s)}catch{}const B=this.xref.fetchIfRef(c);if(B){const a=B instanceof ni?B.dict:B,I=a.get("PatternType");if(I===tc){const g=i.base?i.base.getRgb(t,0):null;return this.handleTilingType(e,g,s,B,a,A,n,r)}if(I===ic){const t=a.get("Shading"),i=this.parseShading({shading:t,resources:s,localColorSpaceCache:g,localShadingPatternCache:o});if(i){const t=yi(a.getArray("Matrix"),null);A.addOp(e,["Shading",i,t])}return}throw new ut(`Unknown PatternType: ${I}`)}}throw new ut(`Unknown PatternName: ${I}`)}_parseVisibilityExpression(A,e,t){if(++e>10)return void gt("Visibility expression is too deeply nested");const i=A.length,a=this.xref.fetchIfRef(A[0]);if(!(i<2)&&a instanceof Vt){switch(a.name){case"And":case"Or":case"Not":t.push(a.name);break;default:return void gt(`Invalid operator ${a.name} in visibility expression`)}for(let a=1;a<i;a++){const i=A[a],s=this.xref.fetchIfRef(i);if(Array.isArray(s)){const A=[];t.push(A),this._parseVisibilityExpression(s,e,A)}else i instanceof $t&&t.push(i.toString())}}else gt("Invalid visibility expression")}async parseMarkedContentProps(A,e){let t;if(A instanceof Vt){t=e.get("Properties").get(A.name)}else{if(!(A instanceof _t))throw new ut("Optional content properties malformed.");t=A}const i=t.get("Type")?.name;if("OCG"===i)return{type:i,id:t.objId};if("OCMD"===i){const A=t.get("VE");if(Array.isArray(A)){const e=[];if(this._parseVisibilityExpression(A,0,e),e.length>0)return{type:"OCMD",expression:e}}const e=t.get("OCGs");if(Array.isArray(e)||e instanceof _t){const A=[];if(Array.isArray(e))for(const t of e)A.push(t.toString());else A.push(e.objId);return{type:i,ids:A,policy:t.get("P")instanceof Vt?t.get("P").name:null,expression:null}}if(e instanceof $t)return{type:i,id:e.toString()}}return null}getOperatorList({stream:A,task:e,resources:t,operatorList:i,initialState:a=null,fallbackFontDict:s=null}){if(t||=_t.empty,a||=new Cc,!i)throw new Error('getOperatorList: missing "operatorList" parameter');const n=this,g=this.xref;let r=!1;const o=new jo,I=new zo,c=new $o,C=new AI,B=new Map,h=t.get("XObject")||_t.empty,Q=t.get("Pattern")||_t.empty,l=new Ic(a),E=new Bc(A,g,l),u=new gc;function d(A){for(let A=0,e=E.savedStatesDepth;A<e;A++)i.addOp(NA,[])}return new Promise(function A(a,f){const p=function(e){Promise.all([e,i.ready]).then(function(){try{A(a,f)}catch(A){f(A)}},f)};e.ensureNotTerminated(),u.reset();const m={};let y,w,D,b,k,F;for(;!(y=u.check())&&(m.args=null,E.read(m));){let A=m.args,a=m.fn;switch(0|a){case xe:if(F=A[0]instanceof Vt,k=A[0].name,F){const e=o.getByName(k);if(e){nc(i,e),A=null;continue}}return void p(new Promise(function(A,a){if(!F)throw new ut("XObject must be referred to by name.");let s=h.getRaw(k);if(s instanceof $t){const e=o.getByRef(s)||n._regionalImageCache.getByRef(s);if(e)return nc(i,e),void A();const t=n.globalImageCache.getData(s,n.pageIndex);if(t)return i.addDependency(t.objId),i.addImageOps(t.fn,t.args,t.optionalContent),void A();s=g.fetch(s)}if(!(s instanceof ni))throw new ut("XObject should be a stream");const r=s.dict.get("Subtype");if(!(r instanceof Vt))throw new ut("XObject should have a Name subtype");if("Form"===r.name)return l.save(),void n.buildFormXObject(t,s,null,i,e,l.state.clone(),I).then(function(){l.restore(),A()},a);if("Image"!==r.name){if("PS"!==r.name)throw new ut(`Unhandled XObject subtype ${r.name}`);nt("Ignored XObject subtype PS"),A()}else n.buildPaintImageXObject({resources:t,image:s,operatorList:i,cacheKey:k,localImageCache:o,localColorSpaceCache:I}).then(A,a)}).catch(function(A){if(!(A instanceof dt)){if(!n.options.ignoreErrors)throw A;gt(`getOperatorList - ignoring XObject: "${A}".`)}}));case ae:var S=A[1];return void p(n.handleSetFont(t,A,null,i,e,l.state,s).then(function(A){i.addDependency(A),i.addOp(ae,[A,S])}));case _A:r=!0;break;case $A:r=!1;break;case Ne:var R=A[0].cacheKey;if(R){const e=o.getByName(R);if(e){nc(i,e),A=null;continue}}return void p(n.buildPaintImageXObject({resources:t,image:A[0],isInline:!0,operatorList:i,cacheKey:R,localImageCache:o,localColorSpaceCache:I}));case ce:if(!l.state.font){n.ensureStateFont(l.state);continue}A[0]=n.handleText(A[0],l.state);break;case Ce:if(!l.state.font){n.ensureStateFont(l.state);continue}var G=[],N=l.state;for(const e of A[0])"string"==typeof e?G.push(...n.handleText(e,N)):"number"==typeof e&&G.push(e);A[0]=G,a=ce;break;case Be:if(!l.state.font){n.ensureStateFont(l.state);continue}i.addOp(Ie),A[0]=n.handleText(A[0],l.state),a=ce;break;case he:if(!l.state.font){n.ensureStateFont(l.state);continue}i.addOp(Ie),i.addOp(ee,[A.shift()]),i.addOp(Ae,[A.shift()]),A[0]=n.handleText(A[0],l.state),a=ce;break;case se:l.state.textRenderingMode=A[0];break;case ue:{const e=Vi.getCached(A[0],g,I);if(e){l.state.fillColorSpace=e;continue}return void p(n.parseColorSpace({cs:A[0],resources:t,localColorSpaceCache:I}).then(function(A){A&&(l.state.fillColorSpace=A)}))}case Ee:{const e=Vi.getCached(A[0],g,I);if(e){l.state.strokeColorSpace=e;continue}return void p(n.parseColorSpace({cs:A[0],resources:t,localColorSpaceCache:I}).then(function(A){A&&(l.state.strokeColorSpace=A)}))}case pe:b=l.state.fillColorSpace,A=b.getRgb(A,0),a=be;break;case de:b=l.state.strokeColorSpace,A=b.getRgb(A,0),a=De;break;case we:l.state.fillColorSpace=Vi.singletons.gray,A=Vi.singletons.gray.getRgb(A,0),a=be;break;case ye:l.state.strokeColorSpace=Vi.singletons.gray,A=Vi.singletons.gray.getRgb(A,0),a=De;break;case Fe:l.state.fillColorSpace=Vi.singletons.cmyk,A=Vi.singletons.cmyk.getRgb(A,0),a=be;break;case ke:l.state.strokeColorSpace=Vi.singletons.cmyk,A=Vi.singletons.cmyk.getRgb(A,0),a=De;break;case be:l.state.fillColorSpace=Vi.singletons.rgb,A=Vi.singletons.rgb.getRgb(A,0);break;case De:l.state.strokeColorSpace=Vi.singletons.rgb,A=Vi.singletons.rgb.getRgb(A,0);break;case me:if(b=l.state.fillColorSpace,"Pattern"===b.name)return void p(n.handleColorN(i,me,A,b,Q,t,e,I,C,B));A=b.getRgb(A,0),a=be;break;case fe:if(b=l.state.strokeColorSpace,"Pattern"===b.name)return void p(n.handleColorN(i,fe,A,b,Q,t,e,I,C,B));A=b.getRgb(A,0),a=De;break;case Se:var x=t.get("Shading");if(!x)throw new ut("No shading resource found");var U=x.get(A[0].name);if(!U)throw new ut("No shading object found");const E=n.parseShading({shading:U,resources:t,localColorSpaceCache:I,localShadingPatternCache:B});if(!E)continue;A=[E],a=Se;break;case RA:if(F=A[0]instanceof Vt,k=A[0].name,F){const e=c.getByName(k);if(e){e.length>0&&i.addOp(RA,[e]),A=null;continue}}return void p(new Promise(function(A,a){if(!F)throw new ut("GState must be referred to by name.");const s=t.get("ExtGState");if(!(s instanceof _t))throw new ut("ExtGState should be a dictionary.");const g=s.get(k);if(!(g instanceof _t))throw new ut("GState should be a dictionary.");n.setGState({resources:t,gState:g,operatorList:i,cacheKey:k,task:e,stateManager:l,localGStateCache:c,localColorSpaceCache:I}).then(A,a)}).catch(function(A){if(!(A instanceof dt)){if(!n.options.ignoreErrors)throw A;gt(`getOperatorList - ignoring ExtGState: "${A}".`)}}));case UA:case MA:case LA:case JA:case HA:case YA:case vA:n.buildPath(i,a,A,r);continue;case Ue:case Me:case Ye:case ve:continue;case Je:if(!(A[0]instanceof Vt)){gt(`Expected name for beginMarkedContentProps arg0=${A[0]}`),i.addOp(Je,["OC",null]);continue}if("OC"===A[0].name)return void p(n.parseMarkedContentProps(A[1],t).then(A=>{i.addOp(Je,["OC",A])}).catch(A=>{if(!(A instanceof dt)){if(n.options.ignoreErrors)return gt(`getOperatorList - ignoring beginMarkedContentProps: "${A}".`),void i.addOp(Je,["OC",null]);throw A}}));A=[A[0].name,A[1]instanceof _t?A[1].get("MCID"):null];break;default:if(null!==A){for(w=0,D=A.length;w<D&&!(A[w]instanceof _t);w++);if(w<D){gt("getOperatorList - ignoring operator: "+a);continue}}}i.addOp(a,A)}y?p(ac):(d(),a())}).catch(A=>{if(!(A instanceof dt)){if(this.options.ignoreErrors)return gt(`getOperatorList - ignoring errors during "${e.name}" task: "${A}".`),void d();throw A}})}getTextContent({stream:A,task:e,resources:t,stateManager:s=null,includeMarkedContent:n=!1,sink:g,seenStyles:r=new Set,viewBox:o,lang:I=null,markedContentData:c=null,disableNormalization:C=!1,keepWhiteSpace:B=!1}){t||=_t.empty,s||=new Ic(new cc),n&&(c||={level:0});const h={items:[],styles:Object.create(null),lang:I},Q={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},l=[" "," "];let E=0;function u(A){const e=(E+1)%2,t=" "!==l[E]&&" "===l[e];return l[E]=A,E=e,!B&&t}function d(){return!B&&" "!==l[E]&&" "===l[(E+1)%2]}function f(){l[0]=l[1]=" ",E=0}const p=this,m=this.xref,y=[];let w=null;const D=new jo,b=new $o,k=new Bc(A,m,s);let F;function S({width:A=0,height:e=0,transform:t=Q.prevTransform,fontName:i=Q.fontName}){h.items.push({str:" ",dir:"ltr",width:A,height:e,transform:t,fontName:i,hasEOL:!1})}function R(){const A=F.font,e=[F.fontSize*F.textHScale,0,0,F.fontSize,0,F.textRise];if(A.isType3Font&&(F.fontSize<=1||A.isCharBBox)&&!Gt(F.fontMatrix,a)){const t=A.bbox[3]-A.bbox[1];t>0&&(e[3]*=t*F.fontMatrix[3])}return bt.transform(F.ctm,bt.transform(F.textMatrix,e))}function G(){if(Q.initialized)return Q;const{font:A,loadedName:e}=F;if(!r.has(e)&&(r.add(e),h.styles[e]={fontFamily:A.fallbackName,ascent:A.ascent,descent:A.descent,vertical:A.vertical},p.options.fontExtraProperties&&A.systemFontInfo)){const t=h.styles[e];t.fontSubstitution=A.systemFontInfo.css,t.fontSubstitutionLoadedName=A.systemFontInfo.loadedName}Q.fontName=e;const t=Q.transform=R();A.vertical?(Q.width=Q.totalWidth=Math.hypot(t[0],t[1]),Q.height=Q.totalHeight=0,Q.vertical=!0):(Q.width=Q.totalWidth=0,Q.height=Q.totalHeight=Math.hypot(t[2],t[3]),Q.vertical=!1);const i=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),a=Math.hypot(F.ctm[0],F.ctm[1]);Q.textAdvanceScale=a*i;const{fontSize:s}=F;return Q.trackingSpaceMin=.102*s,Q.notASpace=.03*s,Q.negativeSpaceMax=-.2*s,Q.spaceInFlowMin=.102*s,Q.spaceInFlowMax=.6*s,Q.hasEOL=!1,Q.initialized=!0,Q}function N(){if(!Q.initialized)return;const A=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),e=Math.hypot(F.ctm[0],F.ctm[1])*A;e!==Q.textAdvanceScale&&(Q.vertical?(Q.totalHeight+=Q.height*Q.textAdvanceScale,Q.height=0):(Q.totalWidth+=Q.width*Q.textAdvanceScale,Q.width=0),Q.textAdvanceScale=e)}function x(A){let e=A.str.join("");var t;C||(t=e,xt||(xt=/([\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,Ut=new Map([["ﬅ","ſt"]])),e=t.replaceAll(xt,(A,e,t)=>e?e.normalize("NFKC"):Ut.get(t)));const i=NI(e,-1,A.vertical);return{str:i.str,dir:i.dir,width:Math.abs(A.totalWidth),height:Math.abs(A.totalHeight),transform:A.transform,fontName:A.fontName,hasEOL:A.hasEOL}}async function U(A,i){const s=await p.loadFont(A,i,t);if(s.font.isType3Font)try{await s.loadType3Data(p,t,e)}catch{}F.loadedName=s.loadedName,F.font=s.font,F.fontMatrix=s.font.fontMatrix||a}function M(A,e,t){const i=Math.hypot(t[0],t[1]);return[(t[0]*A+t[1]*e)/i,(t[2]*A+t[3]*e)/i]}function L(A){const e=R();let t=e[4],i=e[5];if(F.font?.vertical){if(t<o[0]||t>o[2]||i+A<o[1]||i>o[3])return!1}else if(t+A<o[0]||t>o[2]||i<o[1]||i>o[3])return!1;if(!F.font||!Q.prevTransform)return!0;let a=Q.prevTransform[4],s=Q.prevTransform[5];if(a===t&&s===i)return!0;let n=-1;switch(e[0]&&0===e[1]&&0===e[2]?n=e[0]>0?0:180:e[1]&&0===e[0]&&0===e[3]&&(n=e[1]>0?90:270),n){case 0:break;case 90:[t,i]=[i,t],[a,s]=[s,a];break;case 180:[t,i,a,s]=[-t,-i,-a,-s];break;case 270:[t,i]=[-i,-t],[a,s]=[-s,-a];break;default:[t,i]=M(t,i,e),[a,s]=M(a,s,Q.prevTransform)}if(F.font.vertical){const A=(s-i)/Q.textAdvanceScale,e=t-a,n=Math.sign(Q.height);return A<n*Q.negativeSpaceMax?Math.abs(e)>.5*Q.width?(H(),!0):(f(),v(),!0):Math.abs(e)>Q.width?(H(),!0):(A<=n*Q.notASpace&&f(),A<=n*Q.trackingSpaceMin?d()?(f(),v(),S({height:Math.abs(A)})):Q.height+=A:Y(A,Q.prevTransform,n)||(0===Q.str.length?(f(),S({height:Math.abs(A)})):Q.height+=A),Math.abs(e)>.25*Q.width&&v(),!0)}const g=(t-a)/Q.textAdvanceScale,r=i-s,I=Math.sign(Q.width);return g<I*Q.negativeSpaceMax?Math.abs(r)>.5*Q.height?(H(),!0):(f(),v(),!0):Math.abs(r)>Q.height?(H(),!0):(g<=I*Q.notASpace&&f(),g<=I*Q.trackingSpaceMin?d()?(f(),v(),S({width:Math.abs(g)})):Q.width+=g:Y(g,Q.prevTransform,I)||(0===Q.str.length?(f(),S({width:Math.abs(g)})):Q.width+=g),Math.abs(r)>.25*Q.height&&v(),!0)}function J({chars:A,extraSpacing:e}){const t=F.font;if(!A){const A=F.charSpacing+e;return A&&(t.vertical?F.translateTextMatrix(0,-A):F.translateTextMatrix(A*F.textHScale,0)),void(B&&L(0))}const i=t.charsToGlyphs(A),a=F.fontMatrix[0]*F.fontSize;for(let A=0,s=i.length;A<s;A++){const n=i[A],{category:g}=n;if(g.isInvisibleFormatMark)continue;let r=F.charSpacing+(A+1===s?e:0),o=n.width;t.vertical&&(o=n.vmetric?n.vmetric[0]:-o);let I=o*a;if(!B&&g.isWhitespace){t.vertical?(r+=-I+F.wordSpacing,F.translateTextMatrix(0,-r)):(r+=I+F.wordSpacing,F.translateTextMatrix(r*F.textHScale,0)),u(" ");continue}if(!g.isZeroWidthDiacritic&&!L(I)){t.vertical?F.translateTextMatrix(0,I):F.translateTextMatrix(I*F.textHScale,0);continue}const c=G();g.isZeroWidthDiacritic&&(I=0),t.vertical?(F.translateTextMatrix(0,I),I=Math.abs(I),c.height+=I):(I*=F.textHScale,F.translateTextMatrix(I,0),c.width+=I),I&&(c.prevTransform=R());const C=n.unicode;u(C)&&c.str.push(" "),c.str.push(C),r&&(t.vertical?F.translateTextMatrix(0,-r):F.translateTextMatrix(r*F.textHScale,0))}}function H(){f(),Q.initialized?(Q.hasEOL=!0,v()):h.items.push({str:"",dir:"ltr",width:0,height:0,transform:R(),fontName:F.loadedName,hasEOL:!0})}function Y(A,e,t){if(t*Q.spaceInFlowMin<=A&&A<=t*Q.spaceInFlowMax)return Q.initialized&&(f(),Q.str.push(" ")),!1;const i=Q.fontName;let a=0;return Q.vertical&&(a=A,A=0),v(),f(),S({width:Math.abs(A),height:Math.abs(a),transform:e||R(),fontName:i}),!0}function v(){Q.initialized&&Q.str&&(Q.vertical?Q.totalHeight+=Q.height*Q.textAdvanceScale:Q.totalWidth+=Q.width*Q.textAdvanceScale,h.items.push(x(Q)),Q.initialized=!1,Q.str.length=0)}function K(A=!1){const e=h.items.length;0!==e&&(A&&e<10||(g.enqueue(h,e),h.items=[],h.styles=Object.create(null)))}const q=new gc;return new Promise(function A(a,Q){const l=function(e){K(!0),Promise.all([e,g.ready]).then(function(){try{A(a,Q)}catch(A){Q(A)}},Q)};e.ensureNotTerminated(),q.reset();const E={};let u,d=[];for(;!(u=q.check())&&(d.length=0,E.args=d,k.read(E));){const A=F;F=s.state;const a=E.fn;switch(d=E.args,0|a){case ae:var f=d[0].name,S=d[1];if(F.font&&f===F.fontName&&S===F.fontSize)break;return v(),F.fontName=f,F.fontSize=S,void l(U(f,null));case ne:F.textRise=d[0];break;case te:F.textHScale=d[0]/100;break;case ie:F.leading=d[0];break;case ge:F.translateTextLineMatrix(d[0],d[1]),F.textMatrix=F.textLineMatrix.slice();break;case re:F.leading=-d[1],F.translateTextLineMatrix(d[0],d[1]),F.textMatrix=F.textLineMatrix.slice();break;case Ie:F.carriageReturn();break;case oe:F.setTextMatrix(d[0],d[1],d[2],d[3],d[4],d[5]),F.setTextLineMatrix(d[0],d[1],d[2],d[3],d[4],d[5]),N();break;case Ae:F.charSpacing=d[0];break;case ee:F.wordSpacing=d[0];break;case _A:F.textMatrix=i.slice(),F.textLineMatrix=i.slice();break;case Ce:if(!s.state.font){p.ensureStateFont(s.state);continue}const a=(F.font.vertical?1:-1)*F.fontSize/1e3,Q=d[0];for(let A=0,e=Q.length;A<e;A++){const e=Q[A];if("string"==typeof e)y.push(e);else if("number"==typeof e&&0!==e){const A=y.join("");y.length=0,J({chars:A,extraSpacing:e*a})}}if(y.length>0){const A=y.join("");y.length=0,J({chars:A,extraSpacing:0})}break;case ce:if(!s.state.font){p.ensureStateFont(s.state);continue}J({chars:d[0],extraSpacing:0});break;case Be:if(!s.state.font){p.ensureStateFont(s.state);continue}F.carriageReturn(),J({chars:d[0],extraSpacing:0});break;case he:if(!s.state.font){p.ensureStateFont(s.state);continue}F.wordSpacing=d[0],F.charSpacing=d[1],F.carriageReturn(),J({chars:d[2],extraSpacing:0});break;case xe:v(),w||(w=t.get("XObject")||_t.empty);var R=d[0]instanceof Vt,G=d[0].name;if(R&&D.getByName(G))break;return void l(new Promise(function(A,i){if(!R)throw new ut("XObject must be referred to by name.");let a=w.getRaw(G);if(a instanceof $t){if(D.getByRef(a))return void A();if(p.globalImageCache.getData(a,p.pageIndex))return void A();a=m.fetch(a)}if(!(a instanceof ni))throw new ut("XObject should be a stream");const h=a.dict.get("Subtype");if(!(h instanceof Vt))throw new ut("XObject should have a Name subtype");if("Form"!==h.name)return D.set(G,a.dict.objId,!0),void A();const Q=s.state.clone(),l=new Ic(Q),E=yi(a.dict.getArray("Matrix"),null);E&&l.transform(E),K();const u={enqueueInvoked:!1,enqueue(A,e){this.enqueueInvoked=!0,g.enqueue(A,e)},get desiredSize(){return g.desiredSize},get ready(){return g.ready}};p.getTextContent({stream:a,task:e,resources:a.dict.get("Resources")||t,stateManager:l,includeMarkedContent:n,sink:u,seenStyles:r,viewBox:o,lang:I,markedContentData:c,disableNormalization:C,keepWhiteSpace:B}).then(function(){u.enqueueInvoked||D.set(G,a.dict.objId,!0),A()},i)}).catch(function(A){if(!(A instanceof dt)){if(!p.options.ignoreErrors)throw A;gt(`getTextContent - ignoring XObject: "${A}".`)}}));case RA:if(R=d[0]instanceof Vt,G=d[0].name,R&&b.getByName(G))break;return void l(new Promise(function(A,e){if(!R)throw new ut("GState must be referred to by name.");const i=t.get("ExtGState");if(!(i instanceof _t))throw new ut("ExtGState should be a dictionary.");const a=i.get(G);if(!(a instanceof _t))throw new ut("GState should be a dictionary.");const s=a.get("Font");if(!s)return b.set(G,a.objId,!0),void A();v(),F.fontName=null,F.fontSize=s[1],U(null,s[0]).then(A,e)}).catch(function(A){if(!(A instanceof dt)){if(!p.options.ignoreErrors)throw A;gt(`getTextContent - ignoring ExtGState: "${A}".`)}}));case Le:v(),n&&(c.level++,h.items.push({type:"beginMarkedContent",tag:d[0]instanceof Vt?d[0].name:null}));break;case Je:if(v(),n){c.level++;let A=null;d[1]instanceof _t&&(A=d[1].get("MCID")),h.items.push({type:"beginMarkedContentProps",id:Number.isInteger(A)?`${p.idFactory.getPageObjId()}_mc${A}`:null,tag:d[0]instanceof Vt?d[0].name:null})}break;case He:if(v(),n){if(0===c.level)break;c.level--,h.items.push({type:"endMarkedContent"})}break;case NA:!A||A.font===F.font&&A.fontSize===F.fontSize&&A.fontName===F.fontName||v()}if(h.items.length>=g.desiredSize){u=!0;break}}u?l(ac):(v(),K(),a())}).catch(A=>{if(!(A instanceof dt)){if(this.options.ignoreErrors)return gt(`getTextContent - ignoring errors during "${e.name}" task: "${A}".`),v(),void K();throw A}})}async extractDataStructures(A,e){const t=this.xref;let i;const a=this.readToUnicode(e.toUnicode);if(e.composite){const t=A.get("CIDSystemInfo");t instanceof _t&&(e.cidSystemInfo={registry:Ft(t.get("Registry")),ordering:Ft(t.get("Ordering")),supplement:t.get("Supplement")});try{const e=A.get("CIDToGIDMap");e instanceof ni&&(i=e.getBytes())}catch(A){if(!this.options.ignoreErrors)throw A;gt(`extractDataStructures - ignoring CIDToGIDMap data: "${A}".`)}}const s=[];let n,g=null;if(A.has("Encoding")){if(n=A.get("Encoding"),n instanceof _t){if(g=n.get("BaseEncoding"),g=g instanceof Vt?g.name:null,n.has("Differences")){const A=n.get("Differences");let e=0;for(const i of A){const A=t.fetchIfRef(i);if("number"==typeof A)e=A;else{if(!(A instanceof Vt))throw new ut(`Invalid entry in 'Differences' array: ${A}`);s[e++]=A.name}}}}else if(n instanceof Vt)g=n.name;else{const A="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new ut(A);gt(A)}"MacRomanEncoding"!==g&&"MacExpertEncoding"!==g&&"WinAnsiEncoding"!==g&&(g=null)}const r=!e.file||e.isInternalFont,o=cg()[e.name];if(g&&r&&o&&(g=null),g)e.defaultEncoding=yn(g);else{const A=!!(e.flags&eg),t=!!(e.flags&tg);n=dn,"TrueType"!==e.type||t||(n=fn),(A||o)&&(n=un,r&&(/Symbol/i.test(e.name)?n=pn:/Dingbats/i.test(e.name)?n=mn:/Wingdings/i.test(e.name)&&(n=fn))),e.defaultEncoding=n}e.differences=s,e.baseEncodingName=g,e.hasEncoding=!!g||s.length>0,e.dict=A,e.toUnicode=await a;const I=await this.buildToUnicode(e);return e.toUnicode=I,i&&(e.cidToGidMap=this.readCidToGidMap(i,I)),e}_simpleFontToUnicode(A,e=!1){ot(!A.composite,"Must be a simple font.");const t=[],i=A.defaultEncoding.slice(),a=A.baseEncodingName,s=A.differences;for(const A in s){const e=s[A];".notdef"!==e&&(i[A]=e)}const n=Pn();for(const s in i){let g=i[s];if(""===g)continue;let r=n[g];if(void 0!==r){t[s]=String.fromCharCode(r);continue}let o=0;switch(g[0]){case"G":3===g.length&&(o=parseInt(g.substring(1),16));break;case"g":5===g.length&&(o=parseInt(g.substring(1),16));break;case"C":case"c":if(g.length>=3&&g.length<=4){const t=g.substring(1);if(e){o=parseInt(t,16);break}if(o=+t,Number.isNaN(o)&&Number.isInteger(parseInt(t,16)))return this._simpleFontToUnicode(A,!0)}break;case"u":r=On(g,n),-1!==r&&(o=r);break;default:switch(g){case"f_h":case"f_t":case"T_h":t[s]=g.replaceAll("_","");continue}}if(o>0&&o<=1114111&&Number.isInteger(o)){if(a&&o===+s){const A=yn(a);if(A&&(g=A[s])){t[s]=String.fromCharCode(n[g]);continue}}t[s]=String.fromCodePoint(o)}}return t}async buildToUnicode(A){if(A.hasIncludedToUnicodeMap=A.toUnicode?.length>0,A.hasIncludedToUnicodeMap)return!A.composite&&A.hasEncoding&&(A.fallbackToUnicode=this._simpleFontToUnicode(A)),A.toUnicode;if(!A.composite)return new Eg(this._simpleFontToUnicode(A));if(A.composite&&(A.cMap.builtInCMap&&!(A.cMap instanceof zs)||"Adobe"===A.cidSystemInfo?.registry&&("GB1"===A.cidSystemInfo.ordering||"CNS1"===A.cidSystemInfo.ordering||"Japan1"===A.cidSystemInfo.ordering||"Korea1"===A.cidSystemInfo.ordering))){const{registry:e,ordering:t}=A.cidSystemInfo,i=Vt.get(`${e}-${t}-UCS2`),a=await Cn.create({encoding:i,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),s=[],n=[];return A.cMap.forEach(function(A,e){if(e>65535)throw new ut("Max size of CID is 65,535");const t=a.lookup(e);if(t){n.length=0;for(let A=0,e=t.length;A<e;A+=2)n.push((t.charCodeAt(A)<<8)+t.charCodeAt(A+1));s[A]=String.fromCharCode(...n)}}),new Eg(s)}return new ug(A.firstChar,A.lastChar)}async readToUnicode(A){if(!A)return null;if(A instanceof Vt){const e=await Cn.create({encoding:A,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});return e instanceof zs?new ug(0,65535):new Eg(e.getMap())}if(A instanceof ni)try{const e=await Cn.create({encoding:A,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});if(e instanceof zs)return new ug(0,65535);const t=new Array(e.length);return e.forEach(function(A,e){if("number"==typeof e)return void(t[A]=String.fromCodePoint(e));const i=[];for(let A=0;A<e.length;A+=2){const t=e.charCodeAt(A)<<8|e.charCodeAt(A+1);if(55296!=(63488&t)){i.push(t);continue}A+=2;const a=e.charCodeAt(A)<<8|e.charCodeAt(A+1);i.push(((1023&t)<<10)+(1023&a)+65536)}t[A]=String.fromCodePoint(...i)}),new Eg(t)}catch(A){if(A instanceof dt)return null;if(this.options.ignoreErrors)return gt(`readToUnicode - ignoring ToUnicode data: "${A}".`),null;throw A}return null}readCidToGidMap(A,e){const t=[];for(let i=0,a=A.length;i<a;i++){const a=A[i++]<<8|A[i],s=i>>1;(0!==a||e.has(s))&&(t[s]=a)}return t}extractWidths(A,e,t){const i=this.xref;let a=[],s=0;const n=[];let g;if(t.composite){const e=A.get("DW");s="number"==typeof e?Math.ceil(e):1e3;const r=A.get("W");if(Array.isArray(r))for(let A=0,e=r.length;A<e;A++){let e=i.fetchIfRef(r[A++]);if(!Number.isInteger(e))break;const t=i.fetchIfRef(r[A]);if(Array.isArray(t))for(const A of t){const t=i.fetchIfRef(A);"number"==typeof t&&(a[e]=t),e++}else{if(!Number.isInteger(t))break;{const s=i.fetchIfRef(r[++A]);if("number"!=typeof s)continue;for(let A=e;A<=t;A++)a[A]=s}}}if(t.vertical){const e=A.getArray("DW2");let t=mi(e,2)?e:[880,-1e3];if(g=[t[1],.5*s,t[0]],t=A.get("W2"),Array.isArray(t))for(let A=0,e=t.length;A<e;A++){let e=i.fetchIfRef(t[A++]);if(!Number.isInteger(e))break;const a=i.fetchIfRef(t[A]);if(Array.isArray(a))for(let A=0,t=a.length;A<t;A++){const t=[i.fetchIfRef(a[A++]),i.fetchIfRef(a[A++]),i.fetchIfRef(a[A])];mi(t,null)&&(n[e]=t),e++}else{if(!Number.isInteger(a))break;{const s=[i.fetchIfRef(t[++A]),i.fetchIfRef(t[++A]),i.fetchIfRef(t[++A])];if(!mi(s,null))continue;for(let A=e;A<=a;A++)n[A]=s}}}}}else{const n=A.get("Widths");if(Array.isArray(n)){let A=t.firstChar;for(const e of n){const t=i.fetchIfRef(e);"number"==typeof t&&(a[A]=t),A++}const g=e.get("MissingWidth");s="number"==typeof g?g:0}else{const e=A.get("BaseFont");if(e instanceof Vt){const A=this.getBaseFontMetrics(e.name);a=this.buildCharCodeToWidth(A.widths,t),s=A.defaultWidth}}}let r=!0,o=s;for(const A in a){const e=a[A];if(e)if(o){if(o!==e){r=!1;break}}else o=e}r?t.flags|=$n:t.flags&=~$n,t.defaultWidth=s,t.widths=a,t.defaultVMetrics=g,t.vmetrics=n}isSerifFont(A){const e=A.split("-",1)[0];return e in Ig()||/serif/gi.test(e)}getBaseFontMetrics(A){let e=0,t=Object.create(null),i=!1;let a=gg()[A]||A;const s=Jg();a in s||(a=this.isSerifFont(A)?"Times-Roman":"Helvetica");const n=s[a];return"number"==typeof n?(e=n,i=!0):t=n(),{defaultWidth:e,monospace:i,widths:t}}buildCharCodeToWidth(A,e){const t=Object.create(null),i=e.differences,a=e.defaultEncoding;for(let e=0;e<256;e++)e in i&&A[i[e]]?t[e]=A[i[e]]:e in a&&A[a[e]]&&(t[e]=A[a[e]]);return t}preEvaluateFont(A){const e=A;let t=A.get("Subtype");if(!(t instanceof Vt))throw new ut("invalid font Subtype");let i,a=!1;if("Type0"===t.name){const e=A.get("DescendantFonts");if(!e)throw new ut("Descendant fonts are not specified");if(!((A=Array.isArray(e)?this.xref.fetchIfRef(e[0]):e)instanceof _t))throw new ut("Descendant font is not a dictionary.");if(t=A.get("Subtype"),!(t instanceof Vt))throw new ut("invalid font Subtype");a=!0}let s=A.get("FirstChar");Number.isInteger(s)||(s=0);let n=A.get("LastChar");Number.isInteger(n)||(n=a?65535:255);const g=A.get("FontDescriptor"),r=A.get("ToUnicode")||e.get("ToUnicode");if(g){i=new ZI;const t=e.getRaw("Encoding");if(t instanceof Vt)i.update(t.name);else if(t instanceof $t)i.update(t.toString());else if(t instanceof _t)for(const A of t.getRawValues())if(A instanceof Vt)i.update(A.name);else if(A instanceof $t)i.update(A.toString());else if(Array.isArray(A)){const e=A.length,t=new Array(e);for(let i=0;i<e;i++){const e=A[i];e instanceof Vt?t[i]=e.name:("number"==typeof e||e instanceof $t)&&(t[i]=e.toString())}i.update(t.join())}if(i.update(`${s}-${n}`),r instanceof ni){const A=r.str||r,e=A.buffer?new Uint8Array(A.buffer.buffer,0,A.bufferLength):new Uint8Array(A.bytes.buffer,A.start,A.end-A.start);i.update(e)}else r instanceof Vt&&i.update(r.name);const g=A.get("Widths")||e.get("Widths");if(Array.isArray(g)){const A=[];for(const e of g)("number"==typeof e||e instanceof $t)&&A.push(e.toString());i.update(A.join())}if(a){i.update("compositeFont");const t=A.get("W")||e.get("W");if(Array.isArray(t)){const A=[];for(const e of t)if("number"==typeof e||e instanceof $t)A.push(e.toString());else if(Array.isArray(e)){const t=[];for(const A of e)("number"==typeof A||A instanceof $t)&&t.push(A.toString());A.push(`[${t.join()}]`)}i.update(A.join())}const a=A.getRaw("CIDToGIDMap")||e.getRaw("CIDToGIDMap");a instanceof Vt?i.update(a.name):a instanceof $t?i.update(a.toString()):a instanceof ni&&i.update(a.peekBytes())}}return{descriptor:g,dict:A,baseDict:e,composite:a,type:t.name,firstChar:s,lastChar:n,toUnicode:r,hash:i?i.hexdigest():""}}async translateFont({descriptor:A,dict:e,baseDict:t,composite:i,type:s,firstChar:n,lastChar:g,toUnicode:r,cssFontInfo:o}){const I="Type3"===s;if(!A){if(!I){let A=e.get("BaseFont");if(!(A instanceof Vt))throw new ut("Base font is not specified");A=A.name.replaceAll(/[,_]/g,"-");const i=this.getBaseFontMetrics(A),a=A.split("-",1)[0],o=(this.isSerifFont(a)?Ag:0)|(i.monospace?$n:0)|(cg()[a]?eg:tg),c={type:s,name:A,loadedName:t.loadedName,systemFontInfo:null,widths:i.widths,defaultWidth:i.defaultWidth,isSimulatedFlags:!0,flags:o,firstChar:n,lastChar:g,toUnicode:r,xHeight:0,capHeight:0,italicAngle:0,isType3Font:I},C=e.get("Widths"),B=Qg(A);let h=null;B&&(h=await this.fetchStandardFontData(B),c.isInternalFont=!!h),!c.isInternalFont&&this.options.useSystemFonts&&(c.systemFontInfo=KI(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,A,B,s));const Q=await this.extractDataStructures(e,c);if(Array.isArray(C)){const A=[];let e=n;for(const t of C){const i=this.xref.fetchIfRef(t);"number"==typeof i&&(A[e]=i),e++}Q.widths=A}else Q.widths=this.buildCharCodeToWidth(i.widths,Q);return new Hr(A,h,Q)}{const t=Di(e.getArray("FontBBox"),[0,0,0,0]);(A=new _t(null)).set("FontName",Vt.get(s)),A.set("FontBBox",t)}}let c=A.get("FontName"),C=e.get("BaseFont");"string"==typeof c&&(c=Vt.get(c)),"string"==typeof C&&(C=Vt.get(C));const B=c?.name,h=C?.name;if(I||B===h||(nt(`The FontDescriptor's FontName is "${B}" but should be the same as the Font's BaseFont "${h}".`),B&&h&&(h.startsWith(B)||!lg(B)&&lg(h))&&(c=null)),c||=C,!(c instanceof Vt))throw new ut("invalid font name");let Q,l,E,u,d;try{Q=A.get("FontFile","FontFile2","FontFile3")}catch(A){if(!this.options.ignoreErrors)throw A;gt(`translateFont - fetching "${c.name}" font file: "${A}".`),Q=new Zi}let f=!1,p=null,m=null;if(Q){if(Q.dict){const A=Q.dict.get("Subtype");A instanceof Vt&&(l=A.name),E=Q.dict.get("Length1"),u=Q.dict.get("Length2"),d=Q.dict.get("Length3")}}else if(o){const A=To(c.name);A&&(o.fontFamily=`${o.fontFamily}-PdfJS-XFA`,o.metrics=A.metrics||null,p=A.factors||null,Q=await this.fetchStandardFontData(A.name),f=!!Q,t=e=Po(c.name),i=!0)}else if(!I){const A=Qg(c.name);A&&(Q=await this.fetchStandardFontData(A),f=!!Q),!f&&this.options.useSystemFonts&&(m=KI(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,c.name,A,s))}const y=yi(e.getArray("FontMatrix"),a),w=Di(A.getArray("FontBBox")||e.getArray("FontBBox"),void 0);let D=A.get("Ascent");"number"!=typeof D&&(D=void 0);let b=A.get("Descent");"number"!=typeof b&&(b=void 0);let k=A.get("XHeight");"number"!=typeof k&&(k=0);let F=A.get("CapHeight");"number"!=typeof F&&(F=0);let S=A.get("Flags");Number.isInteger(S)||(S=0);let R=A.get("ItalicAngle");"number"!=typeof R&&(R=0);const G={type:s,name:c.name,subtype:l,file:Q,length1:E,length2:u,length3:d,isInternalFont:f,loadedName:t.loadedName,composite:i,fixedPitch:!1,fontMatrix:y,firstChar:n,lastChar:g,toUnicode:r,bbox:w,ascent:D,descent:b,xHeight:k,capHeight:F,flags:S,italicAngle:R,isType3Font:I,cssFontInfo:o,scaleFactors:p,systemFontInfo:m};if(i){const A=t.get("Encoding");A instanceof Vt&&(G.cidEncoding=A.name);const e=await Cn.create({encoding:A,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});G.cMap=e,G.vertical=G.cMap.vertical}const N=await this.extractDataStructures(e,G);return this.extractWidths(e,A,N),new Hr(c.name,Q,N)}static buildFontPaths(A,e,t,i){function a(e){const a=`${A.loadedName}_path_${e}`;try{if(A.renderer.hasBuiltPath(e))return;t.send("commonobj",[a,"FontPath",A.renderer.getPathJs(e)])}catch(A){if(i.ignoreErrors)return void gt(`buildFontPaths - ignoring ${a} glyph: "${A}".`);throw A}}for(const A of e){a(A.fontChar);const e=A.accent;e?.fontChar&&a(e.fontChar)}}static get fallbackFontDict(){const A=new _t;return A.set("BaseFont",Vt.get("Helvetica")),A.set("Type",Vt.get("FallbackType")),A.set("Subtype",Vt.get("FallbackType")),A.set("Encoding",Vt.get("WinAnsiEncoding")),ct(this,"fallbackFontDict",A)}}class oc{constructor({loadedName:A,font:e,dict:t,evaluatorOptions:i}){this.loadedName=A,this.font=e,this.dict=t,this._evaluatorOptions=i||ec,this.type3Loaded=null,this.type3Dependencies=e.isType3Font?new Set:null,this.sent=!1}send(A){this.sent||(this.sent=!0,A.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}fallback(A){this.font.data&&(this.font.disableFontFace=!0,rc.buildFontPaths(this.font,this.font.glyphCacheValues,A,this._evaluatorOptions))}loadType3Data(A,e,t){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");const i=A.clone({ignoreErrors:!1}),a=new Ai(A.type3FontRefs);this.dict.objId&&!a.has(this.dict.objId)&&a.put(this.dict.objId),i.type3FontRefs=a;const s=this.font,n=this.type3Dependencies;let g=Promise.resolve();const r=this.dict.get("CharProcs"),o=this.dict.get("Resources")||e,I=Object.create(null),c=bt.normalizeRect(s.bbox||[0,0,0,0]),C=c[2]-c[0],B=c[3]-c[1],h=Math.hypot(C,B);for(const A of r.getKeys())g=g.then(()=>{const e=r.get(A),a=new zI;return i.getOperatorList({stream:e,task:t,resources:o,operatorList:a}).then(()=>{a.fnArray[0]===le&&this._removeType3ColorOperators(a,h),I[A]=a.getIR();for(const A of a.dependencies)n.add(A)}).catch(function(e){gt(`Type3 font resource "${A}" is not available.`);const t=new zI;I[A]=t.getIR()})});return this.type3Loaded=g.then(()=>{s.charProcOperatorList=I,this._bbox&&(s.isCharBBox=!0,s.bbox=this._bbox)}),this.type3Loaded}_removeType3ColorOperators(A,e=NaN){const t=bt.normalizeRect(A.argsArray[0].slice(2)),i=t[2]-t[0],a=t[3]-t[1],s=Math.hypot(i,a);0===i||0===a?(A.fnArray.splice(0,1),A.argsArray.splice(0,1)):(0===e||Math.round(s/e)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[2]),this._bbox[3]=Math.max(this._bbox[3],t[3]));let n=0,g=A.length;for(;n<g;){switch(A.fnArray[n]){case le:break;case Ee:case ue:case de:case fe:case pe:case me:case ye:case we:case De:case be:case ke:case Fe:case Se:case FA:A.fnArray.splice(n,1),A.argsArray.splice(n,1),g--;continue;case RA:const[e]=A.argsArray[n];let t=0,i=e.length;for(;t<i;){const[A]=e[t];switch(A){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":e.splice(t,1),i--;continue}t++}}n++}}}class Ic{constructor(A=new Cc){this.state=A,this.stateStack=[]}save(){const A=this.state;this.stateStack.push(this.state),this.state=A.clone()}restore(){const A=this.stateStack.pop();A&&(this.state=A)}transform(A){this.state.ctm=bt.transform(this.state.ctm,A)}}class cc{constructor(){this.ctm=new Float32Array(i),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=a,this.textMatrix=i.slice(),this.textLineMatrix=i.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(A,e,t,i,a,s){const n=this.textMatrix;n[0]=A,n[1]=e,n[2]=t,n[3]=i,n[4]=a,n[5]=s}setTextLineMatrix(A,e,t,i,a,s){const n=this.textLineMatrix;n[0]=A,n[1]=e,n[2]=t,n[3]=i,n[4]=a,n[5]=s}translateTextMatrix(A,e){const t=this.textMatrix;t[4]=t[0]*A+t[2]*e+t[4],t[5]=t[1]*A+t[3]*e+t[5]}translateTextLineMatrix(A,e){const t=this.textLineMatrix;t[4]=t[0]*A+t[2]*e+t[4],t[5]=t[1]*A+t[3]*e+t[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){const A=Object.create(this);return A.textMatrix=this.textMatrix.slice(),A.textLineMatrix=this.textLineMatrix.slice(),A.fontMatrix=this.fontMatrix.slice(),A}}class Cc{constructor(){this.ctm=new Float32Array(i),this.font=null,this.textRenderingMode=p,this.fillColorSpace=Vi.singletons.gray,this.strokeColorSpace=Vi.singletons.gray}clone(){return Object.create(this)}}class Bc{static get opMap(){return ct(this,"opMap",Object.assign(Object.create(null),{w:{id:yA,numArgs:1,variableArgs:!1},J:{id:wA,numArgs:1,variableArgs:!1},j:{id:DA,numArgs:1,variableArgs:!1},M:{id:bA,numArgs:1,variableArgs:!1},d:{id:kA,numArgs:2,variableArgs:!1},ri:{id:FA,numArgs:1,variableArgs:!1},i:{id:SA,numArgs:1,variableArgs:!1},gs:{id:RA,numArgs:1,variableArgs:!1},q:{id:GA,numArgs:0,variableArgs:!1},Q:{id:NA,numArgs:0,variableArgs:!1},cm:{id:xA,numArgs:6,variableArgs:!1},m:{id:UA,numArgs:2,variableArgs:!1},l:{id:MA,numArgs:2,variableArgs:!1},c:{id:LA,numArgs:6,variableArgs:!1},v:{id:JA,numArgs:4,variableArgs:!1},y:{id:HA,numArgs:4,variableArgs:!1},h:{id:YA,numArgs:0,variableArgs:!1},re:{id:vA,numArgs:4,variableArgs:!1},S:{id:KA,numArgs:0,variableArgs:!1},s:{id:qA,numArgs:0,variableArgs:!1},f:{id:TA,numArgs:0,variableArgs:!1},F:{id:TA,numArgs:0,variableArgs:!1},"f*":{id:PA,numArgs:0,variableArgs:!1},B:{id:WA,numArgs:0,variableArgs:!1},"B*":{id:ZA,numArgs:0,variableArgs:!1},b:{id:OA,numArgs:0,variableArgs:!1},"b*":{id:XA,numArgs:0,variableArgs:!1},n:{id:VA,numArgs:0,variableArgs:!1},W:{id:jA,numArgs:0,variableArgs:!1},"W*":{id:zA,numArgs:0,variableArgs:!1},BT:{id:_A,numArgs:0,variableArgs:!1},ET:{id:$A,numArgs:0,variableArgs:!1},Tc:{id:Ae,numArgs:1,variableArgs:!1},Tw:{id:ee,numArgs:1,variableArgs:!1},Tz:{id:te,numArgs:1,variableArgs:!1},TL:{id:ie,numArgs:1,variableArgs:!1},Tf:{id:ae,numArgs:2,variableArgs:!1},Tr:{id:se,numArgs:1,variableArgs:!1},Ts:{id:ne,numArgs:1,variableArgs:!1},Td:{id:ge,numArgs:2,variableArgs:!1},TD:{id:re,numArgs:2,variableArgs:!1},Tm:{id:oe,numArgs:6,variableArgs:!1},"T*":{id:Ie,numArgs:0,variableArgs:!1},Tj:{id:ce,numArgs:1,variableArgs:!1},TJ:{id:Ce,numArgs:1,variableArgs:!1},"'":{id:Be,numArgs:1,variableArgs:!1},'"':{id:he,numArgs:3,variableArgs:!1},d0:{id:Qe,numArgs:2,variableArgs:!1},d1:{id:le,numArgs:6,variableArgs:!1},CS:{id:Ee,numArgs:1,variableArgs:!1},cs:{id:ue,numArgs:1,variableArgs:!1},SC:{id:de,numArgs:4,variableArgs:!0},SCN:{id:fe,numArgs:33,variableArgs:!0},sc:{id:pe,numArgs:4,variableArgs:!0},scn:{id:me,numArgs:33,variableArgs:!0},G:{id:ye,numArgs:1,variableArgs:!1},g:{id:we,numArgs:1,variableArgs:!1},RG:{id:De,numArgs:3,variableArgs:!1},rg:{id:be,numArgs:3,variableArgs:!1},K:{id:ke,numArgs:4,variableArgs:!1},k:{id:Fe,numArgs:4,variableArgs:!1},sh:{id:Se,numArgs:1,variableArgs:!1},BI:{id:Re,numArgs:0,variableArgs:!1},ID:{id:Ge,numArgs:0,variableArgs:!1},EI:{id:Ne,numArgs:1,variableArgs:!1},Do:{id:xe,numArgs:1,variableArgs:!1},MP:{id:Ue,numArgs:1,variableArgs:!1},DP:{id:Me,numArgs:2,variableArgs:!1},BMC:{id:Le,numArgs:1,variableArgs:!1},BDC:{id:Je,numArgs:2,variableArgs:!1},EMC:{id:He,numArgs:0,variableArgs:!1},BX:{id:Ye,numArgs:0,variableArgs:!1},EX:{id:ve,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}static MAX_INVALID_PATH_OPS=10;constructor(A,e,t=new Ic){this.parser=new Ts({lexer:new Zs(A,Bc.opMap),xref:e}),this.stateManager=t,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(A){let e=A.args;for(;;){const t=this.parser.getObj();if(t instanceof jt){const i=t.cmd,a=Bc.opMap[i];if(!a){gt(`Unknown command "${i}".`);continue}const s=a.id,n=a.numArgs;let g=null!==e?e.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=s>=UA&&s<=VA,a.variableArgs)g>n&&nt(`Command ${i}: expected [0, ${n}] args, but received ${g} args.`);else{if(g!==n){const A=this.nonProcessedArgs;for(;g>n;)A.push(e.shift()),g--;for(;g<n&&0!==A.length;)null===e&&(e=[]),e.unshift(A.pop()),g++}if(g<n){const A=`command ${i}: expected ${n} args, but received ${g} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>Bc.MAX_INVALID_PATH_OPS)throw new ut(`Invalid ${A}`);gt(`Skipping ${A}`),null!==e&&(e.length=0);continue}}return this.preprocessCommand(s,e),A.fn=s,A.args=e,!0}if(t===Wt)return!1;if(null!==t&&(null===e&&(e=[]),e.push(t),e.length>33))throw new ut("Too many arguments")}}preprocessCommand(A,e){switch(0|A){case GA:this.stateManager.save();break;case NA:this.stateManager.restore();break;case xA:this.stateManager.transform(e)}}}class hc extends Bc{constructor(A){super(new Wi(A))}parse(){const A={fn:0,args:[]},e={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;A.args.length=0,this.read(A);){if(0!==this.savedStatesDepth)continue;const{fn:t,args:i}=A;switch(0|t){case ae:const[A,t]=i;A instanceof Vt&&(e.fontName=A.name),"number"==typeof t&&t>0&&(e.fontSize=t);break;case be:Vi.singletons.rgb.getRgbItem(i,0,e.fontColor,0);break;case we:Vi.singletons.gray.getRgbItem(i,0,e.fontColor,0);break;case Fe:Vi.singletons.cmyk.getRgbItem(i,0,e.fontColor,0)}}}catch(A){gt(`parseDefaultAppearance - ignoring errors: "${A}".`)}return e}}function Qc(A){return new hc(A).parse()}class lc extends Bc{constructor(A,e,t){super(A),this.stream=A,this.evaluatorOptions=e,this.xref=t,this.resources=A.dict?.get("Resources")}parse(){const A={fn:0,args:[]};let e={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:Vi.singletons.gray},t=!1;const i=[];try{for(;A.args.length=0,!t&&this.read(A);){const{fn:a,args:s}=A;switch(0|a){case GA:i.push({scaleFactor:e.scaleFactor,fontSize:e.fontSize,fontName:e.fontName,fontColor:e.fontColor.slice(),fillColorSpace:e.fillColorSpace});break;case NA:e=i.pop()||e;break;case oe:e.scaleFactor*=Math.hypot(s[0],s[1]);break;case ae:const[A,a]=s;A instanceof Vt&&(e.fontName=A.name),"number"==typeof a&&a>0&&(e.fontSize=a*e.scaleFactor);break;case ue:e.fillColorSpace=Vi.parse({cs:s[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case pe:e.fillColorSpace.getRgbItem(s,0,e.fontColor,0);break;case be:Vi.singletons.rgb.getRgbItem(s,0,e.fontColor,0);break;case we:Vi.singletons.gray.getRgbItem(s,0,e.fontColor,0);break;case Fe:Vi.singletons.cmyk.getRgbItem(s,0,e.fontColor,0);break;case ce:case Ce:case Be:case he:t=!0}}}catch(A){gt(`parseAppearanceStream - ignoring errors: "${A}".`)}return this.stream.reset(),delete e.scaleFactor,delete e.fillColorSpace,e}get _localColorSpaceCache(){return ct(this,"_localColorSpaceCache",new zo)}get _pdfFunctionFactory(){return ct(this,"_pdfFunctionFactory",new iI({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}function Ec(A,e){if(A[0]===A[1]&&A[1]===A[2]){return`${Ji(A[0]/255)} ${e?"g":"G"}`}return Array.from(A,A=>Ji(A/255)).join(" ")+" "+(e?"rg":"RG")}class uc{constructor(A,e){this.xref=A,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=e;const t=new OffscreenCanvas(1,1);this.ctxMeasure=t.getContext("2d",{willReadFrequently:!0}),uc._fontNameId||(uc._fontNameId=1),this.fontName=Vt.get(`InvalidPDFjsFont_${e}_${uc._fontNameId++}`)}get fontDescriptorRef(){if(!uc._fontDescriptorRef){const A=new _t(this.xref);A.set("Type",Vt.get("FontDescriptor")),A.set("FontName",this.fontName),A.set("FontFamily","MyriadPro Regular"),A.set("FontBBox",[0,0,0,0]),A.set("FontStretch",Vt.get("Normal")),A.set("FontWeight",400),A.set("ItalicAngle",0),uc._fontDescriptorRef=this.xref.getNewPersistentRef(A)}return uc._fontDescriptorRef}get descendantFontRef(){const A=new _t(this.xref);A.set("BaseFont",this.fontName),A.set("Type",Vt.get("Font")),A.set("Subtype",Vt.get("CIDFontType0")),A.set("CIDToGIDMap",Vt.get("Identity")),A.set("FirstChar",this.firstChar),A.set("LastChar",this.lastChar),A.set("FontDescriptor",this.fontDescriptorRef),A.set("DW",1e3);const e=[],t=[...this.widths.entries()].sort();let i=null,a=null;for(const[A,s]of t)i?A===i+a.length?a.push(s):(e.push(i,a),i=A,a=[s]):(i=A,a=[s]);i&&e.push(i,a),A.set("W",e);const s=new _t(this.xref);return s.set("Ordering","Identity"),s.set("Registry","Adobe"),s.set("Supplement",0),A.set("CIDSystemInfo",s),this.xref.getNewPersistentRef(A)}get baseFontRef(){const A=new _t(this.xref);return A.set("BaseFont",this.fontName),A.set("Type",Vt.get("Font")),A.set("Subtype",Vt.get("Type0")),A.set("Encoding",Vt.get("Identity-H")),A.set("DescendantFonts",[this.descendantFontRef]),A.set("ToUnicode",Vt.get("Identity-H")),this.xref.getNewPersistentRef(A)}get resources(){const A=new _t(this.xref),e=new _t(this.xref);return e.set(this.fontName.name,this.baseFontRef),A.set("Font",e),A}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(A){const e=this._createContext();for(const t of A.split(/\r\n?|\n/))for(const A of t.split("")){const t=A.charCodeAt(0);if(this.widths.has(t))continue;const i=e.measureText(A),a=Math.ceil(i.width);this.widths.set(t,a),this.firstChar=Math.min(t,this.firstChar),this.lastChar=Math.max(t,this.lastChar)}return this.resources}static getFirstPositionInfo(A,e,t){const[i,a,g,r]=A;let o=g-i,I=r-a;e%180!=0&&([o,I]=[I,o]);const c=s*t;return{coords:[0,I+n*t-c],bbox:[0,0,o,I],matrix:0!==e?qi(e,I,c):void 0}}createAppearance(A,e,t,i,a,g){const r=this._createContext(),o=[];let I=-1/0;for(const e of A.split(/\r\n?|\n/)){o.push(e);const A=r.measureText(e).width;I=Math.max(I,A);for(const A of Ni(e)){const e=String.fromCodePoint(A);let t=this.widths.get(A);if(void 0===t){const i=r.measureText(e);t=Math.ceil(i.width),this.widths.set(A,t),this.firstChar=Math.min(A,this.firstChar),this.lastChar=Math.max(A,this.lastChar)}}}I*=i/1e3;const[c,C,B,h]=e;let Q=B-c,l=h-C;t%180!=0&&([Q,l]=[l,Q]);let E=1;I>Q&&(E=Q/I);let u=1;const d=s*i,f=n*i,p=d*o.length;p>l&&(u=l/p);const m=i*Math.min(E,u),y=["q",`0 0 ${Ji(Q)} ${Ji(l)} re W n`,"BT",`1 0 0 1 0 ${Ji(l+f)} Tm 0 Tc ${Ec(a,!0)}`,`/${this.fontName.name} ${Ji(m)} Tf`],{resources:w}=this;if(1!==(g="number"==typeof g&&g>=0&&g<=1?g:1)){y.push("/R0 gs");const A=new _t(this.xref),e=new _t(this.xref);e.set("ca",g),e.set("CA",g),e.set("Type",Vt.get("ExtGState")),A.set("R0",e),w.set("ExtGState",A)}const D=Ji(d);for(const A of o)y.push(`0 -${D} Td <${vi(A)}> Tj`);y.push("ET","Q");const b=y.join("\n"),k=new _t(this.xref);if(k.set("Subtype",Vt.get("Form")),k.set("Type",Vt.get("XObject")),k.set("BBox",[0,0,Q,l]),k.set("Length",b.length),k.set("Resources",w),t){const A=qi(t,Q,l);k.set("Matrix",A)}const F=new Wi(b);return F.dict=k,F}}class dc{constructor(A,e,t){this.constructor===dc&&rt("Cannot initialize NameOrNumberTree."),this.root=A,this.xref=e,this._type=t}getAll(){const A=new Map;if(!this.root)return A;const e=this.xref,t=new Ai;t.put(this.root);const i=[this.root];for(;i.length>0;){const a=e.fetchIfRef(i.shift());if(!(a instanceof _t))continue;if(a.has("Kids")){const A=a.get("Kids");if(!Array.isArray(A))continue;for(const e of A){if(t.has(e))throw new ut(`Duplicate entry in "${this._type}" tree.`);i.push(e),t.put(e)}continue}const s=a.get(this._type);if(Array.isArray(s))for(let t=0,i=s.length;t<i;t+=2)A.set(e.fetchIfRef(s[t]),e.fetchIfRef(s[t+1]))}return A}get(A){if(!this.root)return null;const e=this.xref;let t=e.fetchIfRef(this.root),i=0;for(;t.has("Kids");){if(++i>10)return gt(`Search depth limit reached for "${this._type}" tree.`),null;const a=t.get("Kids");if(!Array.isArray(a))return null;let s=0,n=a.length-1;for(;s<=n;){const i=s+n>>1,g=e.fetchIfRef(a[i]),r=g.get("Limits");if(A<e.fetchIfRef(r[0]))n=i-1;else{if(!(A>e.fetchIfRef(r[1]))){t=g;break}s=i+1}}if(s>n)return null}const a=t.get(this._type);if(Array.isArray(a)){let t=0,i=a.length-2;for(;t<=i;){const s=t+i>>1,n=s+(1&s),g=e.fetchIfRef(a[n]);if(A<g)i=n-2;else{if(!(A>g))return e.fetchIfRef(a[n+1]);t=n+2}}}return null}}class fc extends dc{constructor(A,e){super(A,e,"Names")}}class pc extends dc{constructor(A,e){super(A,e,"Nums")}}function mc(){jr=Object.create(null),Zt=Object.create(null),Ot=Object.create(null),Xt=Object.create(null),zn.clear(),Hs.cleanup()}function yc(A){return A instanceof _t?A.has("UF")?A.get("UF"):A.has("F")?A.get("F"):A.has("Unix")?A.get("Unix"):A.has("Mac")?A.get("Mac"):A.has("DOS")?A.get("DOS"):null:null}class wc{#F=!1;constructor(A,e,t=!1){A instanceof _t&&(this.xref=e,this.root=A,A.has("FS")&&(this.fs=A.get("FS")),A.has("RF")&&gt("Related file specifications are not supported"),t||(A.has("EF")?this.#F=!0:gt("Non-embedded file specifications are not supported")))}get filename(){let A="";const e=yc(this.root);return e&&"string"==typeof e&&(A=Ft(e).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")),ct(this,"filename",A||"unnamed")}get content(){if(!this.#F)return null;this._contentRef||=yc(this.root?.get("EF"));let A=null;if(this._contentRef){const e=this.xref.fetchIfRef(this._contentRef);e instanceof ni?A=e.getBytes():gt("Embedded file specification points to non-existing/invalid content")}else gt("Embedded file specification does not have any content");return A}get description(){let A="";const e=this.root?.get("Desc");return e&&"string"==typeof e&&(A=Ft(e)),ct(this,"description",A)}get serializable(){return{rawFilename:this.filename,filename:(A=this.filename,A.substring(A.lastIndexOf("/")+1)),content:this.content,description:this.description};var A}}const Dc=0,bc=-2,kc=-3,Fc=-4,Sc=-5,Rc=-6,Gc=-9;function Nc(A,e){const t=A[e];return" "===t||"\n"===t||"\r"===t||"\t"===t}class xc{_resolveEntities(A){return A.replaceAll(/&([^;]+);/g,(A,e)=>{if("#x"===e.substring(0,2))return String.fromCodePoint(parseInt(e.substring(2),16));if("#"===e.substring(0,1))return String.fromCodePoint(parseInt(e.substring(1),10));switch(e){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(e)})}_parseContent(A,e){const t=[];let i=e;function a(){for(;i<A.length&&Nc(A,i);)++i}for(;i<A.length&&!Nc(A,i)&&">"!==A[i]&&"/"!==A[i];)++i;const s=A.substring(e,i);for(a();i<A.length&&">"!==A[i]&&"/"!==A[i]&&"?"!==A[i];){a();let e="",s="";for(;i<A.length&&!Nc(A,i)&&"="!==A[i];)e+=A[i],++i;if(a(),"="!==A[i])return null;++i,a();const n=A[i];if('"'!==n&&"'"!==n)return null;const g=A.indexOf(n,++i);if(g<0)return null;s=A.substring(i,g),t.push({name:e,value:this._resolveEntities(s)}),i=g+1,a()}return{name:s,attributes:t,parsed:i-e}}_parseProcessingInstruction(A,e){let t=e;for(;t<A.length&&!Nc(A,t)&&">"!==A[t]&&"?"!==A[t]&&"/"!==A[t];)++t;const i=A.substring(e,t);!function(){for(;t<A.length&&Nc(A,t);)++t}();const a=t;for(;t<A.length&&("?"!==A[t]||">"!==A[t+1]);)++t;return{name:i,value:A.substring(a,t),parsed:t-e}}parseXml(A){let e=0;for(;e<A.length;){let t=e;if("<"===A[e]){++t;let e;switch(A[t]){case"/":if(++t,e=A.indexOf(">",t),e<0)return void this.onError(Gc);this.onEndElement(A.substring(t,e)),t=e+1;break;case"?":++t;const i=this._parseProcessingInstruction(A,t);if("?>"!==A.substring(t+i.parsed,t+i.parsed+2))return void this.onError(kc);this.onPi(i.name,i.value),t+=i.parsed+2;break;case"!":if("--"===A.substring(t+1,t+3)){if(e=A.indexOf("--\x3e",t+3),e<0)return void this.onError(Sc);this.onComment(A.substring(t+3,e)),t=e+3}else if("[CDATA["===A.substring(t+1,t+8)){if(e=A.indexOf("]]>",t+8),e<0)return void this.onError(bc);this.onCdata(A.substring(t+8,e)),t=e+3}else{if("DOCTYPE"!==A.substring(t+1,t+8))return void this.onError(Rc);{const i=A.indexOf("[",t+8);let a=!1;if(e=A.indexOf(">",t+8),e<0)return void this.onError(Fc);if(i>0&&e>i){if(e=A.indexOf("]>",t+8),e<0)return void this.onError(Fc);a=!0}const s=A.substring(t+8,e+(a?1:0));this.onDoctype(s),t=e+(a?2:1)}}break;default:const a=this._parseContent(A,t);if(null===a)return void this.onError(Rc);let s=!1;if("/>"===A.substring(t+a.parsed,t+a.parsed+2))s=!0;else if(">"!==A.substring(t+a.parsed,t+a.parsed+1))return void this.onError(Gc);this.onBeginElement(a.name,a.attributes,s),t+=a.parsed+(s?2:1)}}else{for(;t<A.length&&"<"!==A[t];)t++;const i=A.substring(e,t);this.onText(this._resolveEntities(i))}e=t}}onResolveEntity(A){return`&${A};`}onPi(A,e){}onComment(A){}onCdata(A){}onDoctype(A){}onText(A){}onBeginElement(A,e,t){}onEndElement(A){}onError(A){}}class Uc{constructor(A,e){this.nodeName=A,this.nodeValue=e,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes?.[0]}get nextSibling(){const A=this.parentNode.childNodes;if(!A)return;const e=A.indexOf(this);return-1!==e?A[e+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map(function(A){return A.textContent}).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(A,e){if(e>=A.length)return this;const t=A[e];if(t.name.startsWith("#")&&e<A.length-1)return this.searchNode(A,e+1);const i=[];let a=this;for(;;){if(t.name===a.nodeName){if(0!==t.pos){if(0===i.length)return null;{const[s]=i.pop();let n=0;for(const i of s.childNodes)if(t.name===i.nodeName){if(n===t.pos)return i.searchNode(A,e+1);n++}return a.searchNode(A,e+1)}}{const t=a.searchNode(A,e+1);if(null!==t)return t}}if(a.childNodes?.length>0)i.push([a,0]),a=a.childNodes[0];else{if(0===i.length)return null;for(;0!==i.length;){const[A,e]=i.pop(),t=e+1;if(t<A.childNodes.length){i.push([A,t]),a=A.childNodes[t];break}}if(0===i.length)return null}}}dump(A){if("#text"!==this.nodeName){if(A.push(`<${this.nodeName}`),this.attributes)for(const e of this.attributes)A.push(` ${e.name}="${xi(e.value)}"`);if(this.hasChildNodes()){A.push(">");for(const e of this.childNodes)e.dump(A);A.push(`</${this.nodeName}>`)}else this.nodeValue?A.push(`>${xi(this.nodeValue)}</${this.nodeName}>`):A.push("/>")}else A.push(xi(this.nodeValue))}}class Mc extends xc{constructor({hasAttributes:A=!1,lowerCaseName:e=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=Dc,this._hasAttributes=A,this._lowerCaseName=e}parseFromString(A){if(this._currentFragment=[],this._stack=[],this._errorCode=Dc,this.parseXml(A),this._errorCode!==Dc)return;const[e]=this._currentFragment;return e?{documentElement:e}:void 0}onText(A){if(function(A){for(let e=0,t=A.length;e<t;e++)if(!Nc(A,e))return!1;return!0}(A))return;const e=new Uc("#text",A);this._currentFragment.push(e)}onCdata(A){const e=new Uc("#text",A);this._currentFragment.push(e)}onBeginElement(A,e,t){this._lowerCaseName&&(A=A.toLowerCase());const i=new Uc(A);i.childNodes=[],this._hasAttributes&&(i.attributes=e),this._currentFragment.push(i),t||(this._stack.push(this._currentFragment),this._currentFragment=i.childNodes)}onEndElement(A){this._currentFragment=this._stack.pop()||[];const e=this._currentFragment.at(-1);if(!e)return null;for(const A of e.childNodes)A.parentNode=e;return e}onError(A){this._errorCode=A}}class Lc{constructor(A){A=this._repair(A);const e=new Mc({lowerCaseName:!0}).parseFromString(A);this._metadataMap=new Map,this._data=A,e&&this._parse(e)}_repair(A){return A.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,function(A,e){const t=e.replaceAll(/\\([0-3])([0-7])([0-7])/g,function(A,e,t,i){return String.fromCharCode(64*e+8*t+1*i)}).replaceAll(/&(amp|apos|gt|lt|quot);/g,function(A,e){switch(e){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${e} isn't defined.`)}),i=[">"];for(let A=0,e=t.length;A<e;A+=2){const e=256*t.charCodeAt(A)+t.charCodeAt(A+1);e>=32&&e<127&&60!==e&&62!==e&&38!==e?i.push(String.fromCharCode(e)):i.push("&#x"+(65536+e).toString(16).substring(1)+";")}return i.join("")})}_getSequence(A){const e=A.nodeName;return"rdf:bag"!==e&&"rdf:seq"!==e&&"rdf:alt"!==e?null:A.childNodes.filter(A=>"rdf:li"===A.nodeName)}_parseArray(A){if(!A.hasChildNodes())return;const[e]=A.childNodes,t=this._getSequence(e)||[];this._metadataMap.set(A.nodeName,t.map(A=>A.textContent.trim()))}_parse(A){let e=A.documentElement;if("rdf:rdf"!==e.nodeName)for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName;)e=e.nextSibling;if(e&&"rdf:rdf"===e.nodeName&&e.hasChildNodes())for(const A of e.childNodes)if("rdf:description"===A.nodeName)for(const e of A.childNodes){const A=e.nodeName;switch(A){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(e);continue}this._metadataMap.set(A,e.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}class Jc extends ha{constructor(A,e,t){super(e),this.str=A,this.dict=A.dict,this.decrypt=t,this.nextChunk=null,this.initialized=!1}readBlock(){let A;if(this.initialized?A=this.nextChunk:(A=this.str.getBytes(512),this.initialized=!0),!A||0===A.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512);const e=this.nextChunk?.length>0;A=(0,this.decrypt)(A,!e);const t=this.bufferLength,i=t+A.length;this.ensureBuffer(i).set(A,t),this.bufferLength=i}}class Hc{constructor(A){this.a=0,this.b=0;const e=new Uint8Array(256),t=A.length;for(let A=0;A<256;++A)e[A]=A;for(let i=0,a=0;i<256;++i){const s=e[i];a=a+s+A[i%t]&255,e[i]=e[a],e[a]=s}this.s=e}encryptBlock(A){let e=this.a,t=this.b;const i=this.s,a=A.length,s=new Uint8Array(a);for(let n=0;n<a;++n){e=e+1&255;const a=i[e];t=t+a&255;const g=i[t];i[e]=g,i[t]=a,s[n]=A[n]^i[a+g&255]}return this.a=e,this.b=t,s}decryptBlock(A){return this.encryptBlock(A)}encrypt(A){return this.encryptBlock(A)}}const Yc=function(){const A=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),e=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return function(t,i,a){let s=1732584193,n=-271733879,g=-1732584194,r=271733878;const o=a+72&-64,I=new Uint8Array(o);let c,C;for(c=0;c<a;++c)I[c]=t[i++];I[c++]=128;const B=o-8;for(;c<B;)I[c++]=0;I[c++]=a<<3&255,I[c++]=a>>5&255,I[c++]=a>>13&255,I[c++]=a>>21&255,I[c++]=a>>>29&255,I[c++]=0,I[c++]=0,I[c++]=0;const h=new Int32Array(16);for(c=0;c<o;){for(C=0;C<16;++C,c+=4)h[C]=I[c]|I[c+1]<<8|I[c+2]<<16|I[c+3]<<24;let t,i,a=s,o=n,B=g,Q=r;for(C=0;C<64;++C){C<16?(t=o&B|~o&Q,i=C):C<32?(t=Q&o|~Q&B,i=5*C+1&15):C<48?(t=o^B^Q,i=3*C+5&15):(t=B^(o|~Q),i=7*C&15);const s=Q,n=a+t+e[C]+h[i]|0,g=A[C];Q=B,B=o,o=o+(n<<g|n>>>32-g)|0,a=s}s=s+a|0,n=n+o|0,g=g+B|0,r=r+Q|0}return new Uint8Array([255&s,s>>8&255,s>>16&255,s>>>24&255,255&n,n>>8&255,n>>16&255,n>>>24&255,255&g,g>>8&255,g>>16&255,g>>>24&255,255&r,r>>8&255,r>>16&255,r>>>24&255])}}();class vc{constructor(A,e){this.high=0|A,this.low=0|e}and(A){this.high&=A.high,this.low&=A.low}xor(A){this.high^=A.high,this.low^=A.low}or(A){this.high|=A.high,this.low|=A.low}shiftRight(A){A>=32?(this.low=this.high>>>A-32|0,this.high=0):(this.low=this.low>>>A|this.high<<32-A,this.high=this.high>>>A|0)}shiftLeft(A){A>=32?(this.high=this.low<<A-32,this.low=0):(this.high=this.high<<A|this.low>>>32-A,this.low<<=A)}rotateRight(A){let e,t;32&A?(t=this.low,e=this.high):(e=this.low,t=this.high),A&=31,this.low=e>>>A|t<<32-A,this.high=t>>>A|e<<32-A}not(){this.high=~this.high,this.low=~this.low}add(A){const e=(this.low>>>0)+(A.low>>>0);let t=(this.high>>>0)+(A.high>>>0);e>4294967295&&(t+=1),this.low=0|e,this.high=0|t}copyTo(A,e){A[e]=this.high>>>24&255,A[e+1]=this.high>>16&255,A[e+2]=this.high>>8&255,A[e+3]=255&this.high,A[e+4]=this.low>>>24&255,A[e+5]=this.low>>16&255,A[e+6]=this.low>>8&255,A[e+7]=255&this.low}assign(A){this.high=A.high,this.low=A.low}}const Kc=function(){function A(A,e){return A>>>e|A<<32-e}function e(A,e,t){return A&e^~A&t}function t(A,e,t){return A&e^A&t^e&t}function i(e){return A(e,2)^A(e,13)^A(e,22)}function a(e){return A(e,6)^A(e,11)^A(e,25)}function s(e){return A(e,7)^A(e,18)^e>>>3}function n(e){return A(e,17)^A(e,19)^e>>>10}const g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(A,r,o){let I=1779033703,c=3144134277,C=1013904242,B=2773480762,h=1359893119,Q=2600822924,l=528734635,E=1541459225;const u=64*Math.ceil((o+9)/64),d=new Uint8Array(u);let f,p;for(f=0;f<o;++f)d[f]=A[r++];d[f++]=128;const m=u-8;for(;f<m;)d[f++]=0;d[f++]=0,d[f++]=0,d[f++]=0,d[f++]=o>>>29&255,d[f++]=o>>21&255,d[f++]=o>>13&255,d[f++]=o>>5&255,d[f++]=o<<3&255;const y=new Uint32Array(64);for(f=0;f<u;){for(p=0;p<16;++p)y[p]=d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3],f+=4;for(p=16;p<64;++p)y[p]=n(y[p-2])+y[p-7]+s(y[p-15])+y[p-16]|0;let A,r,o=I,u=c,m=C,w=B,D=h,b=Q,k=l,F=E;for(p=0;p<64;++p)A=F+a(D)+e(D,b,k)+g[p]+y[p],r=i(o)+t(o,u,m),F=k,k=b,b=D,D=w+A|0,w=m,m=u,u=o,o=A+r|0;I=I+o|0,c=c+u|0,C=C+m|0,B=B+w|0,h=h+D|0,Q=Q+b|0,l=l+k|0,E=E+F|0}return new Uint8Array([I>>24&255,I>>16&255,I>>8&255,255&I,c>>24&255,c>>16&255,c>>8&255,255&c,C>>24&255,C>>16&255,C>>8&255,255&C,B>>24&255,B>>16&255,B>>8&255,255&B,h>>24&255,h>>16&255,h>>8&255,255&h,Q>>24&255,Q>>16&255,Q>>8&255,255&Q,l>>24&255,l>>16&255,l>>8&255,255&l,E>>24&255,E>>16&255,E>>8&255,255&E])}}(),qc=function(){function A(A,e,t,i,a){A.assign(e),A.and(t),a.assign(e),a.not(),a.and(i),A.xor(a)}function e(A,e,t,i,a){A.assign(e),A.and(t),a.assign(e),a.and(i),A.xor(a),a.assign(t),a.and(i),A.xor(a)}function t(A,e,t){A.assign(e),A.rotateRight(28),t.assign(e),t.rotateRight(34),A.xor(t),t.assign(e),t.rotateRight(39),A.xor(t)}function i(A,e,t){A.assign(e),A.rotateRight(14),t.assign(e),t.rotateRight(18),A.xor(t),t.assign(e),t.rotateRight(41),A.xor(t)}function a(A,e,t){A.assign(e),A.rotateRight(1),t.assign(e),t.rotateRight(8),A.xor(t),t.assign(e),t.shiftRight(7),A.xor(t)}function s(A,e,t){A.assign(e),A.rotateRight(19),t.assign(e),t.rotateRight(61),A.xor(t),t.assign(e),t.shiftRight(6),A.xor(t)}const n=[new vc(1116352408,3609767458),new vc(1899447441,602891725),new vc(3049323471,3964484399),new vc(3921009573,2173295548),new vc(961987163,4081628472),new vc(1508970993,3053834265),new vc(2453635748,2937671579),new vc(2870763221,3664609560),new vc(3624381080,2734883394),new vc(310598401,1164996542),new vc(607225278,1323610764),new vc(1426881987,3590304994),new vc(1925078388,4068182383),new vc(2162078206,991336113),new vc(2614888103,633803317),new vc(3248222580,3479774868),new vc(3835390401,2666613458),new vc(4022224774,944711139),new vc(264347078,2341262773),new vc(604807628,2007800933),new vc(770255983,1495990901),new vc(1249150122,1856431235),new vc(1555081692,3175218132),new vc(1996064986,2198950837),new vc(2554220882,3999719339),new vc(2821834349,766784016),new vc(2952996808,2566594879),new vc(3210313671,3203337956),new vc(3336571891,1034457026),new vc(3584528711,2466948901),new vc(113926993,3758326383),new vc(338241895,168717936),new vc(666307205,1188179964),new vc(773529912,1546045734),new vc(1294757372,1522805485),new vc(1396182291,2643833823),new vc(1695183700,2343527390),new vc(1986661051,1014477480),new vc(2177026350,1206759142),new vc(2456956037,344077627),new vc(2730485921,1290863460),new vc(2820302411,3158454273),new vc(3259730800,3505952657),new vc(3345764771,106217008),new vc(3516065817,3606008344),new vc(3600352804,1432725776),new vc(4094571909,1467031594),new vc(275423344,851169720),new vc(430227734,3100823752),new vc(506948616,1363258195),new vc(659060556,3750685593),new vc(883997877,3785050280),new vc(958139571,3318307427),new vc(1322822218,3812723403),new vc(1537002063,2003034995),new vc(1747873779,3602036899),new vc(1955562222,1575990012),new vc(2024104815,1125592928),new vc(2227730452,2716904306),new vc(2361852424,442776044),new vc(2428436474,593698344),new vc(2756734187,3733110249),new vc(3204031479,2999351573),new vc(3329325298,3815920427),new vc(3391569614,3928383900),new vc(3515267271,566280711),new vc(3940187606,3454069534),new vc(4118630271,4000239992),new vc(116418474,1914138554),new vc(174292421,2731055270),new vc(289380356,3203993006),new vc(460393269,320620315),new vc(685471733,587496836),new vc(852142971,1086792851),new vc(1017036298,365543100),new vc(1126000580,2618297676),new vc(1288033470,3409855158),new vc(1501505948,4234509866),new vc(1607167915,987167468),new vc(1816402316,1246189591)];return function(g,r,o,I=!1){let c,C,B,h,Q,l,E,u;I?(c=new vc(3418070365,3238371032),C=new vc(1654270250,914150663),B=new vc(2438529370,812702999),h=new vc(355462360,4144912697),Q=new vc(1731405415,4290775857),l=new vc(2394180231,1750603025),E=new vc(3675008525,1694076839),u=new vc(1203062813,3204075428)):(c=new vc(1779033703,4089235720),C=new vc(3144134277,2227873595),B=new vc(1013904242,4271175723),h=new vc(2773480762,1595750129),Q=new vc(1359893119,2917565137),l=new vc(2600822924,725511199),E=new vc(528734635,4215389547),u=new vc(1541459225,327033209));const d=128*Math.ceil((o+17)/128),f=new Uint8Array(d);let p,m;for(p=0;p<o;++p)f[p]=g[r++];f[p++]=128;const y=d-16;for(;p<y;)f[p++]=0;f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=0,f[p++]=o>>>29&255,f[p++]=o>>21&255,f[p++]=o>>13&255,f[p++]=o>>5&255,f[p++]=o<<3&255;const w=new Array(80);for(p=0;p<80;p++)w[p]=new vc(0,0);let D=new vc(0,0),b=new vc(0,0),k=new vc(0,0),F=new vc(0,0),S=new vc(0,0),R=new vc(0,0),G=new vc(0,0),N=new vc(0,0);const x=new vc(0,0),U=new vc(0,0),M=new vc(0,0),L=new vc(0,0);let J,H;for(p=0;p<d;){for(m=0;m<16;++m)w[m].high=f[p]<<24|f[p+1]<<16|f[p+2]<<8|f[p+3],w[m].low=f[p+4]<<24|f[p+5]<<16|f[p+6]<<8|f[p+7],p+=8;for(m=16;m<80;++m)J=w[m],s(J,w[m-2],L),J.add(w[m-7]),a(M,w[m-15],L),J.add(M),J.add(w[m-16]);for(D.assign(c),b.assign(C),k.assign(B),F.assign(h),S.assign(Q),R.assign(l),G.assign(E),N.assign(u),m=0;m<80;++m)x.assign(N),i(M,S,L),x.add(M),A(M,S,R,G,L),x.add(M),x.add(n[m]),x.add(w[m]),t(U,D,L),e(M,D,b,k,L),U.add(M),J=N,N=G,G=R,R=S,F.add(x),S=F,F=k,k=b,b=D,J.assign(x),J.add(U),D=J;c.add(D),C.add(b),B.add(k),h.add(F),Q.add(S),l.add(R),E.add(G),u.add(N)}return I?(H=new Uint8Array(48),c.copyTo(H,0),C.copyTo(H,8),B.copyTo(H,16),h.copyTo(H,24),Q.copyTo(H,32),l.copyTo(H,40)):(H=new Uint8Array(64),c.copyTo(H,0),C.copyTo(H,8),B.copyTo(H,16),h.copyTo(H,24),Q.copyTo(H,32),l.copyTo(H,40),E.copyTo(H,48),u.copyTo(H,56)),H}}();function Tc(A,e,t){return qc(A,e,t,!0)}class Pc{decryptBlock(A){return A}encrypt(A){return A}}class Wc{constructor(){this.constructor===Wc&&rt("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(let A=0;A<256;A++)this._mixCol[A]=A<128?A<<1:A<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(A){rt("Cannot call `_expandKey` on the base class")}_decrypt(A,e){let t,i,a;const s=new Uint8Array(16);s.set(A);for(let A=0,t=this._keySize;A<16;++A,++t)s[A]^=e[t];for(let A=this._cyclesOfRepetition-1;A>=1;--A){t=s[13],s[13]=s[9],s[9]=s[5],s[5]=s[1],s[1]=t,t=s[14],i=s[10],s[14]=s[6],s[10]=s[2],s[6]=t,s[2]=i,t=s[15],i=s[11],a=s[7],s[15]=s[3],s[11]=t,s[7]=i,s[3]=a;for(let A=0;A<16;++A)s[A]=this._inv_s[s[A]];for(let t=0,i=16*A;t<16;++t,++i)s[t]^=e[i];for(let A=0;A<16;A+=4){const e=this._mix[s[A]],i=this._mix[s[A+1]],a=this._mix[s[A+2]],n=this._mix[s[A+3]];t=e^i>>>8^i<<24^a>>>16^a<<16^n>>>24^n<<8,s[A]=t>>>24&255,s[A+1]=t>>16&255,s[A+2]=t>>8&255,s[A+3]=255&t}}t=s[13],s[13]=s[9],s[9]=s[5],s[5]=s[1],s[1]=t,t=s[14],i=s[10],s[14]=s[6],s[10]=s[2],s[6]=t,s[2]=i,t=s[15],i=s[11],a=s[7],s[15]=s[3],s[11]=t,s[7]=i,s[3]=a;for(let A=0;A<16;++A)s[A]=this._inv_s[s[A]],s[A]^=e[A];return s}_encrypt(A,e){const t=this._s;let i,a,s;const n=new Uint8Array(16);n.set(A);for(let A=0;A<16;++A)n[A]^=e[A];for(let A=1;A<this._cyclesOfRepetition;A++){for(let A=0;A<16;++A)n[A]=t[n[A]];s=n[1],n[1]=n[5],n[5]=n[9],n[9]=n[13],n[13]=s,s=n[2],a=n[6],n[2]=n[10],n[6]=n[14],n[10]=s,n[14]=a,s=n[3],a=n[7],i=n[11],n[3]=n[15],n[7]=s,n[11]=a,n[15]=i;for(let A=0;A<16;A+=4){const e=n[A+0],t=n[A+1],a=n[A+2],s=n[A+3];i=e^t^a^s,n[A+0]^=i^this._mixCol[e^t],n[A+1]^=i^this._mixCol[t^a],n[A+2]^=i^this._mixCol[a^s],n[A+3]^=i^this._mixCol[s^e]}for(let t=0,i=16*A;t<16;++t,++i)n[t]^=e[i]}for(let A=0;A<16;++A)n[A]=t[n[A]];s=n[1],n[1]=n[5],n[5]=n[9],n[9]=n[13],n[13]=s,s=n[2],a=n[6],n[2]=n[10],n[6]=n[14],n[10]=s,n[14]=a,s=n[3],a=n[7],i=n[11],n[3]=n[15],n[7]=s,n[11]=a,n[15]=i;for(let A=0,t=this._keySize;A<16;++A,++t)n[A]^=e[t];return n}_decryptBlock2(A,e){const t=A.length;let i=this.buffer,a=this.bufferPosition;const s=[];let n=this.iv;for(let e=0;e<t;++e){if(i[a]=A[e],++a,a<16)continue;const t=this._decrypt(i,this._key);for(let A=0;A<16;++A)t[A]^=n[A];n=i,s.push(t),i=new Uint8Array(16),a=0}if(this.buffer=i,this.bufferLength=a,this.iv=n,0===s.length)return new Uint8Array(0);let g=16*s.length;if(e){const A=s.at(-1);let e=A[15];if(e<=16){for(let t=15,i=16-e;t>=i;--t)if(A[t]!==e){e=0;break}g-=e,s[s.length-1]=A.subarray(0,16-e)}}const r=new Uint8Array(g);for(let A=0,e=0,t=s.length;A<t;++A,e+=16)r.set(s[A],e);return r}decryptBlock(A,e,t=null){const i=A.length,a=this.buffer;let s=this.bufferPosition;if(t)this.iv=t;else{for(let e=0;s<16&&e<i;++e,++s)a[s]=A[e];if(s<16)return this.bufferLength=s,new Uint8Array(0);this.iv=a,A=A.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(A,e)}encrypt(A,e){const t=A.length;let i=this.buffer,a=this.bufferPosition;const s=[];e||(e=new Uint8Array(16));for(let n=0;n<t;++n){if(i[a]=A[n],++a,a<16)continue;for(let A=0;A<16;++A)i[A]^=e[A];const t=this._encrypt(i,this._key);e=t,s.push(t),i=new Uint8Array(16),a=0}if(this.buffer=i,this.bufferLength=a,this.iv=e,0===s.length)return new Uint8Array(0);const n=16*s.length,g=new Uint8Array(n);for(let A=0,e=0,t=s.length;A<t;++A,e+=16)g.set(s[A],e);return g}}class Zc extends Wc{constructor(A){super(),this._cyclesOfRepetition=10,this._keySize=160,this._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),this._key=this._expandKey(A)}_expandKey(A){const e=this._s,t=this._rcon,i=new Uint8Array(176);i.set(A);for(let A=16,a=1;A<176;++a){let s=i[A-3],n=i[A-2],g=i[A-1],r=i[A-4];s=e[s],n=e[n],g=e[g],r=e[r],s^=t[a];for(let e=0;e<4;++e)i[A]=s^=i[A-16],A++,i[A]=n^=i[A-16],A++,i[A]=g^=i[A-16],A++,i[A]=r^=i[A-16],A++}return i}}class Oc extends Wc{constructor(A){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(A)}_expandKey(A){const e=this._s,t=new Uint8Array(240);t.set(A);let i,a,s,n,g=1;for(let A=32,r=1;A<240;++r){A%32==16?(i=e[i],a=e[a],s=e[s],n=e[n]):A%32==0&&(i=t[A-3],a=t[A-2],s=t[A-1],n=t[A-4],i=e[i],a=e[a],s=e[s],n=e[n],i^=g,(g<<=1)>=256&&(g=255&(27^g)));for(let e=0;e<4;++e)t[A]=i^=t[A-32],A++,t[A]=a^=t[A-32],A++,t[A]=s^=t[A-32],A++,t[A]=n^=t[A-32],A++}return t}}class Xc{checkOwnerPassword(A,e,t,i){const a=new Uint8Array(A.length+56);a.set(A,0),a.set(e,A.length),a.set(t,A.length+e.length);return Gt(Kc(a,0,a.length),i)}checkUserPassword(A,e,t){const i=new Uint8Array(A.length+8);i.set(A,0),i.set(e,A.length);return Gt(Kc(i,0,i.length),t)}getOwnerKey(A,e,t,i){const a=new Uint8Array(A.length+56);a.set(A,0),a.set(e,A.length),a.set(t,A.length+e.length);const s=Kc(a,0,a.length);return new Oc(s).decryptBlock(i,!1,new Uint8Array(16))}getUserKey(A,e,t){const i=new Uint8Array(A.length+8);i.set(A,0),i.set(e,A.length);const a=Kc(i,0,i.length);return new Oc(a).decryptBlock(t,!1,new Uint8Array(16))}}class Vc{_hash(A,e,t){let i=Kc(e,0,e.length).subarray(0,32),a=[0],s=0;for(;s<64||a.at(-1)>s-32;){const e=A.length+i.length+t.length,n=new Uint8Array(e);let g=0;n.set(A,g),g+=A.length,n.set(i,g),g+=i.length,n.set(t,g);const r=new Uint8Array(64*e);for(let A=0,t=0;A<64;A++,t+=e)r.set(n,t);a=new Zc(i.subarray(0,16)).encrypt(r,i.subarray(16,32));const o=a.slice(0,16).reduce((A,e)=>A+e,0)%3;0===o?i=Kc(a,0,a.length):1===o?i=Tc(a,0,a.length):2===o&&(i=qc(a,0,a.length)),s++}return i.subarray(0,32)}checkOwnerPassword(A,e,t,i){const a=new Uint8Array(A.length+56);a.set(A,0),a.set(e,A.length),a.set(t,A.length+e.length);return Gt(this._hash(A,a,t),i)}checkUserPassword(A,e,t){const i=new Uint8Array(A.length+8);i.set(A,0),i.set(e,A.length);return Gt(this._hash(A,i,[]),t)}getOwnerKey(A,e,t,i){const a=new Uint8Array(A.length+56);a.set(A,0),a.set(e,A.length),a.set(t,A.length+e.length);const s=this._hash(A,a,t);return new Oc(s).decryptBlock(i,!1,new Uint8Array(16))}getUserKey(A,e,t){const i=new Uint8Array(A.length+8);i.set(A,0),i.set(e,A.length);const a=this._hash(A,i,[]);return new Oc(a).decryptBlock(t,!1,new Uint8Array(16))}}class jc{constructor(A,e){this.StringCipherConstructor=A,this.StreamCipherConstructor=e}createStream(A,e){const t=new this.StreamCipherConstructor;return new Jc(A,e,function(A,e){return t.decryptBlock(A,e)})}decryptString(A){const e=new this.StringCipherConstructor;let t=pt(A);return t=e.decryptBlock(t,!0),ft(t)}encryptString(A){const e=new this.StringCipherConstructor;if(e instanceof Wc){const t=16-A.length%16;A+=String.fromCharCode(t).repeat(t);const i=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(i);else for(let A=0;A<16;A++)i[A]=Math.floor(256*Math.random());let a=pt(A);a=e.encrypt(a,i);const s=new Uint8Array(16+a.length);return s.set(i),s.set(a,16),ft(s)}let t=pt(A);return t=e.encrypt(t),ft(t)}}class zc{static#S=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]);#R(A,e,t,i,a,s,n,g,r,o,I,c){if(e){const A=Math.min(127,e.length);e=e.subarray(0,A)}else e=[];const C=6===A?new Vc:new Xc;return C.checkUserPassword(e,g,n)?C.getUserKey(e,r,I):e.length&&C.checkOwnerPassword(e,i,s,t)?C.getOwnerKey(e,a,s,o):null}#G(A,e,t,i,a,s,n,g){const r=40+t.length+A.length,o=new Uint8Array(r);let I,c,C=0;if(e)for(c=Math.min(32,e.length);C<c;++C)o[C]=e[C];for(I=0;C<32;)o[C++]=zc.#S[I++];for(I=0,c=t.length;I<c;++I)o[C++]=t[I];for(o[C++]=255&a,o[C++]=a>>8&255,o[C++]=a>>16&255,o[C++]=a>>>24&255,I=0,c=A.length;I<c;++I)o[C++]=A[I];s>=4&&!g&&(o[C++]=255,o[C++]=255,o[C++]=255,o[C++]=255);let B=Yc(o,0,C);const h=n>>3;if(s>=3)for(I=0;I<50;++I)B=Yc(B,0,h);const Q=B.subarray(0,h);let l,E;if(s>=3){for(C=0;C<32;++C)o[C]=zc.#S[C];for(I=0,c=A.length;I<c;++I)o[C++]=A[I];l=new Hc(Q),E=l.encryptBlock(Yc(o,0,C)),c=Q.length;const e=new Uint8Array(c);for(I=1;I<=19;++I){for(let A=0;A<c;++A)e[A]=Q[A]^I;l=new Hc(e),E=l.encryptBlock(E)}for(I=0,c=E.length;I<c;++I)if(i[I]!==E[I])return null}else for(l=new Hc(Q),E=l.encryptBlock(zc.#S),I=0,c=E.length;I<c;++I)if(i[I]!==E[I])return null;return Q}#N(A,e,t,i){const a=new Uint8Array(32);let s=0;const n=Math.min(32,A.length);for(;s<n;++s)a[s]=A[s];let g=0;for(;s<32;)a[s++]=zc.#S[g++];let r=Yc(a,0,s);const o=i>>3;if(t>=3)for(g=0;g<50;++g)r=Yc(r,0,r.length);let I,c;if(t>=3){c=e;const A=new Uint8Array(o);for(g=19;g>=0;g--){for(let e=0;e<o;++e)A[e]=r[e]^g;I=new Hc(A),c=I.encryptBlock(c)}}else I=new Hc(r.subarray(0,o)),c=I.encryptBlock(e);return c}#x(A,e,t,i=!1){const a=new Uint8Array(t.length+9),s=t.length;let n;for(n=0;n<s;++n)a[n]=t[n];a[n++]=255&A,a[n++]=A>>8&255,a[n++]=A>>16&255,a[n++]=255&e,a[n++]=e>>8&255,i&&(a[n++]=115,a[n++]=65,a[n++]=108,a[n++]=84);return Yc(a,0,n).subarray(0,Math.min(t.length+5,16))}#U(A,e,t,i,a){if(!(e instanceof Vt))throw new ut("Invalid crypt filter name.");const s=this,n=A.get(e.name),g=n?.get("CFM");if(!g||"None"===g.name)return function(){return new Pc};if("V2"===g.name)return function(){return new Hc(s.#x(t,i,a,!1))};if("AESV2"===g.name)return function(){return new Zc(s.#x(t,i,a,!0))};if("AESV3"===g.name)return function(){return new Oc(a)};throw new ut("Unknown crypto method")}constructor(A,e,t){const i=A.get("Filter");if(!ti(i,"Standard"))throw new ut("unknown encryption method");this.filterName=i.name,this.dict=A;const a=A.get("V");if(!Number.isInteger(a)||1!==a&&2!==a&&4!==a&&5!==a)throw new ut("unsupported encryption algorithm");this.algorithm=a;let s=A.get("Length");if(!s)if(a<=3)s=40;else{const e=A.get("CF"),t=A.get("StmF");if(e instanceof _t&&t instanceof Vt){e.suppressEncryption=!0;const A=e.get(t.name);s=A?.get("Length")||128,s<40&&(s<<=3)}}if(!Number.isInteger(s)||s<40||s%8!=0)throw new ut("invalid key length");const n=pt(A.get("O")),g=pt(A.get("U")),r=n.subarray(0,32),o=g.subarray(0,32),I=A.get("P"),c=A.get("R"),C=(4===a||5===a)&&!1!==A.get("EncryptMetadata");this.encryptMetadata=C;const B=pt(e);let h,Q;if(t){if(6===c)try{t=Rt(t)}catch{gt("CipherTransformFactory: Unable to convert UTF8 encoded password.")}h=pt(t)}if(5!==a)Q=this.#G(B,h,r,o,I,c,s,C);else{const e=n.subarray(32,40),t=n.subarray(40,48),i=g.subarray(0,48),a=g.subarray(32,40),s=g.subarray(40,48),I=pt(A.get("OE")),C=pt(A.get("UE")),B=pt(A.get("Perms"));Q=this.#R(c,h,r,e,t,i,o,a,s,I,C,B)}if(!Q&&!t)throw new Bt("No password given",tt);if(!Q&&t){const A=this.#N(h,r,c,s);Q=this.#G(B,A,r,o,I,c,s,C)}if(!Q)throw new Bt("Incorrect Password",it);if(this.encryptionKey=Q,a>=4){const e=A.get("CF");e instanceof _t&&(e.suppressEncryption=!0),this.cf=e,this.stmf=A.get("StmF")||Vt.get("Identity"),this.strf=A.get("StrF")||Vt.get("Identity"),this.eff=A.get("EFF")||this.stmf}}createCipherTransform(A,e){if(4===this.algorithm||5===this.algorithm)return new jc(this.#U(this.cf,this.strf,A,e,this.encryptionKey),this.#U(this.cf,this.stmf,A,e,this.encryptionKey));const t=this.#x(A,e,this.encryptionKey,!1),i=function(){return new Hc(t)};return new jc(i,i)}}async function _c(A,e,t,{encrypt:i=null}){const a=i?.createCipherTransform(A.num,A.gen);t.push(`${A.num} ${A.gen} obj\n`),e instanceof _t?await $c(e,t,a):e instanceof ni?await AC(e,t,a):(Array.isArray(e)||ArrayBuffer.isView(e))&&await eC(e,t,a),t.push("\nendobj\n")}async function $c(A,e,t){e.push("<<");for(const i of A.getKeys())e.push(` /${ki(i)} `),await tC(A.getRaw(i),e,t);e.push(">>")}async function AC(A,e,t){let i=A.getBytes();const{dict:a}=A,[s,n]=await Promise.all([a.getAsync("Filter"),a.getAsync("DecodeParms")]),g=ti(Array.isArray(s)?await a.xref.fetchIfRefAsync(s[0]):s,"FlateDecode");if(i.length>=256||g)try{const A=new CompressionStream("deflate"),e=A.writable.getWriter();e.write(i),e.close();const t=await new Response(A.readable).arrayBuffer();let r,o;i=new Uint8Array(t),s?g||(r=Array.isArray(s)?[Vt.get("FlateDecode"),...s]:[Vt.get("FlateDecode"),s],n&&(o=Array.isArray(n)?[null,...n]:[null,n])):r=Vt.get("FlateDecode"),r&&a.set("Filter",r),o&&a.set("DecodeParms",o)}catch(A){nt(`writeStream - cannot compress data: "${A}".`)}let r=ft(i);t&&(r=t.encryptString(r)),a.set("Length",r.length),await $c(a,e,t),e.push(" stream\n",r,"\nendstream")}async function eC(A,e,t){e.push("[");let i=!0;for(const a of A)i?i=!1:e.push(" "),await tC(a,e,t);e.push("]")}async function tC(A,e,t){A instanceof Vt?e.push(`/${ki(A.name)}`):A instanceof $t?e.push(`${A.num} ${A.gen} R`):Array.isArray(A)||ArrayBuffer.isView(A)?await eC(A,e,t):"string"==typeof A?(t&&(A=t.encryptString(A)),e.push(`(${Fi(A)})`)):"number"==typeof A?e.push(Ji(A)):"boolean"==typeof A?e.push(A.toString()):A instanceof _t?await $c(A,e,t):A instanceof ni?await AC(A,e,t):null===A?e.push("null"):gt(`Unhandled value in writer: ${typeof A}, please file a bug.`)}function iC(A,e,t,i){for(let a=e+t-1;a>t-1;a--)i[a]=255&A,A>>=8;return t+e}function aC(A,e,t){for(let i=0,a=A.length;i<a;i++)t[e+i]=255&A.charCodeAt(i)}function sC({xfaData:A,xfaDatasetsRef:e,newRefs:t,xref:i}){if(null===A){A=function(A,e){const t=new Mc({hasAttributes:!0}).parseFromString(A);for(const{xfa:A}of e){if(!A)continue;const{path:e,value:i}=A;if(!e)continue;const a=bi(e);let s=t.documentElement.searchNode(a,0);!s&&a.length>1&&(s=t.documentElement.searchNode([a.at(-1)],0)),s?s.childNodes=Array.isArray(i)?i.map(A=>new Uc("value",A)):[new Uc("#text",i)]:gt(`Node not found for path: ${e}`)}const i=[];return t.documentElement.dump(i),i.join("")}(i.fetchIfRef(e).getString(),t)}const a=i.encrypt;if(a){A=a.createCipherTransform(e.num,e.gen).encryptString(A)}const s=`${e.num} ${e.gen} obj\n<< /Type /EmbeddedFile /Length ${A.length}>>\nstream\n`+A+"\nendstream\nendobj\n";t.push({ref:e,data:s})}function nC(A){const e=[];for(const{ref:t}of A)t.num===e.at(-2)+e.at(-1)?e[e.length-1]+=1:e.push(t.num,1);return e}function gC(A,e,t){if(Array.isArray(e.fileIds)&&e.fileIds.length>0){const i=function(A,e){const t=Math.floor(Date.now()/1e3),i=e.filename||"",a=[t.toString(),i,A.toString()];let s=a.reduce((A,e)=>A+e.length,0);for(const A of Object.values(e.info))a.push(A),s+=A.length;const n=new Uint8Array(s);let g=0;for(const A of a)aC(A,g,n),g+=A.length;return ft(Yc(n))}(A,e);t.set("ID",[e.fileIds[0],i])}}async function rC({originalData:A,xrefInfo:e,newRefs:t,xref:i=null,hasXfa:a=!1,xfaDatasetsRef:s=null,hasXfaDatasetsEntry:n=!1,needAppearances:g,acroFormRef:r=null,acroForm:o=null,xfaData:I=null,useXrefStream:c=!1}){await async function({xref:A,acroForm:e,acroFormRef:t,hasXfa:i,hasXfaDatasetsEntry:a,xfaDatasetsRef:s,needAppearances:n,newRefs:g}){if(!i||a||s||gt("XFA - Cannot save it"),!n&&(!i||!s||a))return;const r=e.clone();if(i&&!a){const A=e.get("XFA").slice();A.splice(2,0,"datasets"),A.splice(3,0,s),r.set("XFA",A)}n&&r.set("NeedAppearances",!0);const o=[];await _c(t,r,o,A),g.push({ref:t,data:o.join("")})}({xref:i,acroForm:o,acroFormRef:r,hasXfa:a,hasXfaDatasetsEntry:n,xfaDatasetsRef:s,needAppearances:g,newRefs:t}),a&&sC({xfaData:I,xfaDatasetsRef:s,newRefs:t,xref:i});const C=[];let B=A.length;const h=A.at(-1);10!==h&&13!==h&&(C.push("\n"),B+=1);const Q=function(A,e,t){const i=new _t(null);i.set("Prev",A.startXRef);const a=A.newRef;return t?(e.push({ref:a,data:""}),i.set("Size",a.num+1),i.set("Type",Vt.get("XRef"))):i.set("Size",a.num),null!==A.rootRef&&i.set("Root",A.rootRef),null!==A.infoRef&&i.set("Info",A.infoRef),null!==A.encryptRef&&i.set("Encrypt",A.encryptRef),i}(e,t,c);t=t.sort((A,e)=>A.ref.num-e.ref.num);for(const{data:A}of t)null!==A&&C.push(A);await(c?async function(A,e,t,i,a){const s=[];let n=0,g=0;for(const{ref:A,data:i}of t){let t;n=Math.max(n,e),null!==i?(t=Math.min(A.gen,65535),s.push([1,e,t]),e+=i.length):(t=Math.min(A.gen+1,65535),s.push([0,0,t])),g=Math.max(g,t)}i.set("Index",nC(t));const r=[1,Ti(n),Ti(g)];i.set("W",r),gC(e,A,i);const o=r.reduce((A,e)=>A+e,0),I=new Uint8Array(o*s.length),c=new Pi(I);c.dict=i;let C=0;for(const[A,e,t]of s)C=iC(A,r[0],C,I),C=iC(e,r[1],C,I),C=iC(t,r[2],C,I);await _c(A.newRef,c,a,{}),a.push("startxref\n",e.toString(),"\n%%EOF\n")}(e,B,t,Q,C):async function(A,e,t,i,a){a.push("xref\n");const s=nC(t);let n=0;for(const{ref:A,data:i}of t)A.num===s[n]&&(a.push(`${s[n]} ${s[n+1]}\n`),n+=2),null!==i?(a.push(`${e.toString().padStart(10,"0")} ${Math.min(A.gen,65535).toString().padStart(5,"0")} n\r\n`),e+=i.length):a.push(`0000000000 ${Math.min(A.gen+1,65535).toString().padStart(5,"0")} f\r\n`);gC(e,A,i),a.push("trailer\n"),await $c(i,a),a.push("\nstartxref\n",e.toString(),"\n%%EOF\n")}(e,B,t,Q,C));const l=C.reduce((A,e)=>A+e.length,A.length),E=new Uint8Array(l);E.set(A);let u=A.length;for(const A of C)aC(A,u,E),u+=A.length;return E}const oC=1,IC=2,cC=3,CC=4,BC=5;class hC{constructor(A,e){this.dict=A,this.ref=e instanceof $t?e:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}#M(A,e,t){if(!(A instanceof $t)||e<0)return;this.structParentIds||=new ei;let i=this.structParentIds.get(A);i||(i=[],this.structParentIds.put(A,i)),i.push([e,t])}addAnnotationIdToPage(A,e){this.#M(A,e,CC)}readRoleMap(){const A=this.dict.get("RoleMap");A instanceof _t&&A.forEach((A,e)=>{e instanceof Vt&&this.roleMap.set(A,e.name)})}static async canCreateStructureTree({catalogRef:A,pdfManager:e,newAnnotationsByPage:t}){if(!(A instanceof $t))return gt("Cannot save the struct tree: no catalog reference."),!1;let i=0,a=!0;for(const[A,s]of t){const{ref:t}=await e.getPage(A);if(!(t instanceof $t)){gt(`Cannot save the struct tree: page ${A} has no ref.`),a=!0;break}for(const A of s)A.accessibilityData?.type&&(A.parentTreeId=i++,a=!1)}if(a){for(const A of t.values())for(const e of A)delete e.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:A,xref:e,catalogRef:t,pdfManager:i,newRefs:a}){const s=i.catalog.cloneDict(),n=new ei;n.put(t,s);const g=e.getNewTemporaryRef();s.set("StructTreeRoot",g);const r=new _t(e);r.set("Type",Vt.get("StructTreeRoot"));const o=e.getNewTemporaryRef();r.set("ParentTree",o);const I=[];r.set("K",I),n.put(g,r);const c=new _t(e),C=[];c.set("Nums",C);const B=await this.#L({newAnnotationsByPage:A,structTreeRootRef:g,kids:I,nums:C,xref:e,pdfManager:i,cache:n});r.set("ParentTreeNextKey",B),n.put(o,c);const h=[];for(const[A,t]of n.items())h.length=0,await _c(A,t,h,e),a.push({ref:A,data:h.join("")})}async canUpdateStructTree({pdfManager:A,xref:e,newAnnotationsByPage:t}){if(!this.ref)return gt("Cannot update the struct tree: no root reference."),!1;let i=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(i)||i<0)return gt("Cannot update the struct tree: invalid next key."),!1;const a=this.dict.get("ParentTree");if(!(a instanceof _t))return gt("Cannot update the struct tree: ParentTree isn't a dict."),!1;const s=a.get("Nums");if(!Array.isArray(s))return gt("Cannot update the struct tree: nums isn't an array."),!1;const n=new pc(a,e);for(const e of t.keys()){const{pageDict:t}=await A.getPage(e);if(!t.has("StructParents"))continue;const i=t.get("StructParents");if(!Number.isInteger(i)||!Array.isArray(n.get(i)))return gt(`Cannot save the struct tree: page ${e} has a wrong id.`),!1}let g=!0;for(const[e,a]of t){const{pageDict:t}=await A.getPage(e);hC.#J({elements:a,xref:this.dict.xref,pageDict:t,numberTree:n});for(const A of a)A.accessibilityData?.type&&(A.parentTreeId=i++,g=!1)}if(g){for(const A of t.values())for(const e of A)delete e.parentTreeId,delete e.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:A,pdfManager:e,newRefs:t}){const i=this.dict.xref,a=this.dict.clone(),s=this.ref,n=new ei;n.put(s,a);let g,r=a.getRaw("ParentTree");r instanceof $t?g=i.fetch(r):(g=r,r=i.getNewTemporaryRef(),a.set("ParentTree",r)),g=g.clone(),n.put(r,g);let o=g.getRaw("Nums"),I=null;o instanceof $t&&(I=o,o=i.fetch(I)),o=o.slice(),I||g.set("Nums",o);const c=await hC.#L({newAnnotationsByPage:A,structTreeRootRef:s,kids:null,nums:o,xref:i,pdfManager:e,cache:n});a.set("ParentTreeNextKey",c),I&&n.put(I,o);const C=[];for(const[A,e]of n.items())C.length=0,await _c(A,e,C,i),t.push({ref:A,data:C.join("")})}static async#L({newAnnotationsByPage:A,structTreeRootRef:e,kids:t,nums:i,xref:a,pdfManager:s,cache:n}){const g=Vt.get("OBJR");let r=-1/0;for(const[o,I]of A){const{ref:A}=await s.getPage(o),c=A instanceof $t;for(const{accessibilityData:s,ref:o,parentTreeId:C,structTreeParent:B}of I){if(!s?.type)continue;const{type:I,title:h,lang:Q,alt:l,expanded:E,actualText:u}=s;r=Math.max(r,C);const d=a.getNewTemporaryRef(),f=new _t(a);f.set("S",Vt.get(I)),h&&f.set("T",h),Q&&f.set("Lang",Q),l&&f.set("Alt",l),E&&f.set("E",E),u&&f.set("ActualText",u),await this.#H({structTreeParent:B,tagDict:f,newTagRef:d,structTreeRootRef:e,fallbackKids:t,xref:a,cache:n});const p=new _t(a);f.set("K",p),p.set("Type",g),c&&p.set("Pg",A),p.set("Obj",o),n.put(d,f),i.push(C,d)}}return r+1}static#J({elements:A,xref:e,pageDict:t,numberTree:i}){const a=new Map;for(const e of A)if(e.structTreeParentId){const A=parseInt(e.structTreeParentId.split("_mc")[1],10);let t=a.get(A);t||(t=[],a.set(A,t)),t.push(e)}const s=t.get("StructParents");if(!Number.isInteger(s))return;const n=i.get(s),g=(A,t,i)=>{const s=a.get(A);if(s){const A=t.getRaw("P"),a=e.fetchIfRef(A);if(A instanceof $t&&a instanceof _t){const A={ref:i,dict:t};for(const e of s)e.structTreeParent=A}return!0}return!1};for(const A of n){if(!(A instanceof $t))continue;const t=e.fetch(A),i=t.get("K");if(Number.isInteger(i))g(i,t,A);else if(Array.isArray(i))for(let a of i){if(a=e.fetchIfRef(a),Number.isInteger(a)&&g(a,t,A))break;if(!(a instanceof _t))continue;if(!ti(a.get("Type"),"MCR"))break;const i=a.get("MCID");if(Number.isInteger(i)&&g(i,t,A))break}}}static async#H({structTreeParent:A,tagDict:e,newTagRef:t,structTreeRootRef:i,fallbackKids:a,xref:s,cache:n}){let g,r=null;A?(({ref:r}=A),g=A.dict.getRaw("P")||i):g=i,e.set("P",g);const o=s.fetchIfRef(g);if(!o)return void a.push(t);let I=n.get(g);I||(I=o.clone(),n.put(g,I));const c=I.getRaw("K");let C=c instanceof $t?n.get(c):null;if(!C){C=s.fetchIfRef(c),C=Array.isArray(C)?C.slice():[c];const A=s.getNewTemporaryRef();I.set("K",A),n.put(A,C)}const B=C.indexOf(r);C.splice(B>=0?B+1:C.length,0,t)}}class QC{constructor(A,e){this.tree=A,this.dict=e,this.kids=[],this.parseKids()}get role(){const A=this.dict.get("S"),e=A instanceof Vt?A.name:"",{root:t}=this.tree;return t.roleMap.has(e)?t.roleMap.get(e):e}parseKids(){let A=null;const e=this.dict.getRaw("Pg");e instanceof $t&&(A=e.toString());const t=this.dict.get("K");if(Array.isArray(t))for(const e of t){const t=this.parseKid(A,e);t&&this.kids.push(t)}else{const e=this.parseKid(A,t);e&&this.kids.push(e)}}parseKid(A,e){if(Number.isInteger(e))return this.tree.pageDict.objId!==A?null:new lC({type:oC,mcid:e,pageObjId:A});let t=null;if(e instanceof $t?t=this.dict.xref.fetch(e):e instanceof _t&&(t=e),!t)return null;const i=t.getRaw("Pg");i instanceof $t&&(A=i.toString());const a=t.get("Type")instanceof Vt?t.get("Type").name:null;if("MCR"===a){if(this.tree.pageDict.objId!==A)return null;const e=t.getRaw("Stm");return new lC({type:IC,refObjId:e instanceof $t?e.toString():null,pageObjId:A,mcid:t.get("MCID")})}if("OBJR"===a){if(this.tree.pageDict.objId!==A)return null;const e=t.getRaw("Obj");return new lC({type:cC,refObjId:e instanceof $t?e.toString():null,pageObjId:A})}return new lC({type:BC,dict:t})}}class lC{constructor({type:A,dict:e=null,mcid:t=null,pageObjId:i=null,refObjId:a=null}){this.type=A,this.dict=e,this.mcid=t,this.pageObjId=i,this.refObjId=a,this.parentNode=null}}class EC{constructor(A,e){this.root=A,this.rootDict=A?A.dict:null,this.pageDict=e,this.nodes=[]}parse(A){if(!this.root||!this.rootDict)return;const e=this.rootDict.get("ParentTree");if(!e)return;const t=this.pageDict.get("StructParents"),i=A instanceof $t&&this.root.structParentIds?.get(A);if(!Number.isInteger(t)&&!i)return;const a=new Map,s=new pc(e,this.rootDict.xref);if(Number.isInteger(t)){const A=s.get(t);if(Array.isArray(A))for(const e of A)e instanceof $t&&this.addNode(this.rootDict.xref.fetch(e),a)}if(i)for(const[A,e]of i){const t=s.get(A);if(t){const A=this.addNode(this.rootDict.xref.fetchIfRef(t),a);1===A?.kids?.length&&A.kids[0].type===cC&&(A.kids[0].type=e)}}}addNode(A,e,t=0){if(t>40)return gt("StructTree MAX_DEPTH reached."),null;if(e.has(A))return e.get(A);const i=new QC(this,A);e.set(A,i);const a=A.get("P");if(!a||ti(a.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(A,i)||e.delete(A),i;const s=this.addNode(a,e,t+1);if(!s)return i;let n=!1;for(const e of s.kids)e.type===BC&&e.dict===A&&(e.parentNode=i,n=!0);return n||e.delete(A),i}addTopLevelNode(A,e){const t=this.rootDict.get("K");if(!t)return!1;if(t instanceof _t)return t.objId===A.objId&&(this.nodes[0]=e,!0);if(!Array.isArray(t))return!0;let i=!1;for(let a=0;a<t.length;a++){const s=t[a];s?.toString()===A.objId&&(this.nodes[a]=e,i=!0)}return i}get serializable(){function A(e,t,i=0){if(i>40)return void gt("StructTree too deep to be fully serialized.");const a=Object.create(null);a.role=e.role,a.children=[],t.children.push(a);const s=e.dict.get("Alt");"string"==typeof s&&(a.alt=Ft(s));const n=e.dict.get("Lang");"string"==typeof n&&(a.lang=Ft(n));for(const t of e.kids){const e=t.type===BC?t.parentNode:null;e?A(e,a,i+1):t.type===oC||t.type===IC?a.children.push({type:"content",id:`p${t.pageObjId}_mc${t.mcid}`}):t.type===cC?a.children.push({type:"object",id:t.refObjId}):t.type===CC&&a.children.push({type:"annotation",id:`pdfjs_internal_id_${t.refObjId}`})}}const e=Object.create(null);e.children=[],e.role="Root";for(const t of this.nodes)t&&A(t,e);return e}}function uC(A){if(!Array.isArray(A)||A.length<2)return!1;const[e,t,...i]=A;if(!(e instanceof $t||Number.isInteger(e)))return!1;if(!(t instanceof Vt))return!1;let a=!0;switch(t.name){case"XYZ":if(3!==i.length)return!1;break;case"Fit":case"FitB":return 0===i.length;case"FitH":case"FitBH":case"FitV":case"FitBV":if(1!==i.length)return!1;break;case"FitR":if(4!==i.length)return!1;a=!1;break;default:return!1}for(const A of i)if(!("number"==typeof A||a&&null===A))return!1;return!0}function dC(A){return A instanceof _t&&(A=A.get("D")),uC(A)?A:null}function fC(A){let e=A.get("D");if(e){if(e instanceof Vt&&(e=e.name),"string"==typeof e)return Ft(e);if(uC(e))return JSON.stringify(e)}return null}class pC{constructor(A,e){if(this.pdfManager=A,this.xref=e,this._catDict=e.getCatalogObj(),!(this._catDict instanceof _t))throw new ut("Catalog object is not a dictionary.");this.toplevelPagesDict,this._actualNumPages=null,this.fontCache=new ei,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new tI,this.pageKidsCountCache=new ei,this.pageIndexCache=new ei,this.nonBlendModesSet=new Ai,this.systemFontCache=new Map}cloneDict(){return this._catDict.clone()}get version(){const A=this._catDict.get("Version");if(A instanceof Vt){if(gi.test(A.name))return ct(this,"version",A.name);gt(`Invalid PDF catalog version: ${A.name}`)}return ct(this,"version",null)}get lang(){const A=this._catDict.get("Lang");return ct(this,"lang",A&&"string"==typeof A?Ft(A):null)}get needsRendering(){const A=this._catDict.get("NeedsRendering");return ct(this,"needsRendering","boolean"==typeof A&&A)}get collection(){let A=null;try{const e=this._catDict.get("Collection");e instanceof _t&&e.size>0&&(A=e)}catch(A){if(A instanceof oi)throw A;nt("Cannot fetch Collection entry; assuming no collection is present.")}return ct(this,"collection",A)}get acroForm(){let A=null;try{const e=this._catDict.get("AcroForm");e instanceof _t&&e.size>0&&(A=e)}catch(A){if(A instanceof oi)throw A;nt("Cannot fetch AcroForm entry; assuming no forms are present.")}return ct(this,"acroForm",A)}get acroFormRef(){const A=this._catDict.getRaw("AcroForm");return ct(this,"acroFormRef",A instanceof $t?A:null)}get metadata(){const A=this._catDict.getRaw("Metadata");if(!(A instanceof $t))return ct(this,"metadata",null);let e=null;try{const t=this.xref.fetch(A,!this.xref.encrypt?.encryptMetadata);if(t instanceof ni&&t.dict instanceof _t){const A=t.dict.get("Type"),i=t.dict.get("Subtype");if(ti(A,"Metadata")&&ti(i,"XML")){const A=St(t.getString());A&&(e=new Lc(A).serializable)}}}catch(A){if(A instanceof oi)throw A;nt(`Skipping invalid Metadata: "${A}".`)}return ct(this,"metadata",e)}get markInfo(){let A=null;try{A=this._readMarkInfo()}catch(A){if(A instanceof oi)throw A;gt("Unable to read mark info.")}return ct(this,"markInfo",A)}_readMarkInfo(){const A=this._catDict.get("MarkInfo");if(!(A instanceof _t))return null;const e={Marked:!1,UserProperties:!1,Suspects:!1};for(const t in e){const i=A.get(t);"boolean"==typeof i&&(e[t]=i)}return e}get structTreeRoot(){let A=null;try{A=this._readStructTreeRoot()}catch(A){if(A instanceof oi)throw A;gt("Unable read to structTreeRoot info.")}return ct(this,"structTreeRoot",A)}_readStructTreeRoot(){const A=this._catDict.getRaw("StructTreeRoot"),e=this.xref.fetchIfRef(A);if(!(e instanceof _t))return null;const t=new hC(e,A);return t.init(),t}get toplevelPagesDict(){const A=this._catDict.get("Pages");if(!(A instanceof _t))throw new ut("Invalid top-level pages dictionary.");return ct(this,"toplevelPagesDict",A)}get documentOutline(){let A=null;try{A=this._readDocumentOutline()}catch(A){if(A instanceof oi)throw A;gt("Unable to read document outline.")}return ct(this,"documentOutline",A)}_readDocumentOutline(){let A=this._catDict.get("Outlines");if(!(A instanceof _t))return null;if(A=A.getRaw("First"),!(A instanceof $t))return null;const e={items:[]},t=[{obj:A,parent:e}],i=new Ai;i.put(A);const a=this.xref,s=new Uint8ClampedArray(3);for(;t.length>0;){const e=t.shift(),n=a.fetchIfRef(e.obj);if(null===n)continue;n.has("Title")||gt("Invalid outline item encountered.");const g={url:null,dest:null,action:null};pC.parseDestDictionary({destDict:n,resultObj:g,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const r=n.get("Title"),o=n.get("F")||0,I=n.getArray("C"),c=n.get("Count");let C=s;!mi(I,3)||0===I[0]&&0===I[1]&&0===I[2]||(C=Vi.singletons.rgb.getRgb(I,0));const B={action:g.action,attachment:g.attachment,dest:g.dest,url:g.url,unsafeUrl:g.unsafeUrl,newWindow:g.newWindow,setOCGState:g.setOCGState,title:"string"==typeof r?Ft(r):"",color:C,count:Number.isInteger(c)?c:void 0,bold:!!(2&o),italic:!!(1&o),items:[]};e.parent.items.push(B),A=n.getRaw("First"),A instanceof $t&&!i.has(A)&&(t.push({obj:A,parent:B}),i.put(A)),A=n.getRaw("Next"),A instanceof $t&&!i.has(A)&&(t.push({obj:A,parent:e.parent}),i.put(A))}return e.items.length>0?e.items:null}get permissions(){let A=null;try{A=this._readPermissions()}catch(A){if(A instanceof oi)throw A;gt("Unable to read permissions.")}return ct(this,"permissions",A)}_readPermissions(){const A=this.xref.trailer.get("Encrypt");if(!(A instanceof _t))return null;let e=A.get("P");if("number"!=typeof e)return null;e+=2**32;const t=[];for(const A in f){const i=f[A];e&i&&t.push(i)}return t}get optionalContentConfig(){let A=null;try{const e=this._catDict.get("OCProperties");if(!e)return ct(this,"optionalContentConfig",null);const t=e.get("D");if(!t)return ct(this,"optionalContentConfig",null);const i=e.get("OCGs");if(!Array.isArray(i))return ct(this,"optionalContentConfig",null);const a=[],s=new Ai;for(const A of i)A instanceof $t&&!s.has(A)&&(s.put(A),a.push(this.#Y(A)));A=this.#v(t,s),A.groups=a}catch(A){if(A instanceof oi)throw A;gt(`Unable to read optional content config: ${A}`)}return ct(this,"optionalContentConfig",A)}#Y(A){const e=this.xref.fetch(A),t={id:A.toString(),name:null,intent:null,usage:{print:null,view:null}},i=e.get("Name");"string"==typeof i&&(t.name=Ft(i));let a=e.getArray("Intent");Array.isArray(a)||(a=[a]),a.every(A=>A instanceof Vt)&&(t.intent=a.map(A=>A.name));const s=e.get("Usage");if(!(s instanceof _t))return t;const n=t.usage,g=s.get("Print");if(g instanceof _t){const A=g.get("PrintState");if(A instanceof Vt)switch(A.name){case"ON":case"OFF":n.print={printState:A.name}}}const r=s.get("View");if(r instanceof _t){const A=r.get("ViewState");if(A instanceof Vt)switch(A.name){case"ON":case"OFF":n.view={viewState:A.name}}}return t}#v(A,e){function t(A){const t=[];if(Array.isArray(A))for(const i of A)i instanceof $t&&e.has(i)&&t.push(i.toString());return t}function i(A,t=0){if(!Array.isArray(A))return null;const i=[];for(const s of A){if(s instanceof $t&&e.has(s)){n.put(s),i.push(s.toString());continue}const A=a(s,t);A&&i.push(A)}if(t>0)return i;const s=[];for(const A of e)n.has(A)||s.push(A.toString());return s.length&&i.push({name:null,order:s}),i}function a(A,e){if(++e>g)return gt("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;const t=s.fetchIfRef(A);if(!Array.isArray(t))return null;const a=s.fetchIfRef(t[0]);if("string"!=typeof a)return null;const n=i(t.slice(1),e);return n&&n.length?{name:Ft(a),order:n}:null}const s=this.xref,n=new Ai,g=10;return{name:"string"==typeof A.get("Name")?Ft(A.get("Name")):null,creator:"string"==typeof A.get("Creator")?Ft(A.get("Creator")):null,baseState:A.get("BaseState")instanceof Vt?A.get("BaseState").name:null,on:t(A.get("ON")),off:t(A.get("OFF")),order:i(A.get("Order")),groups:null}}setActualNumPages(A=null){this._actualNumPages=A}get hasActualNumPages(){return null!==this._actualNumPages}get _pagesCount(){const A=this.toplevelPagesDict.get("Count");if(!Number.isInteger(A))throw new ut("Page count in top-level pages dictionary is not an integer.");return ct(this,"_pagesCount",A)}get numPages(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}get destinations(){const A=this._readDests(),e=Object.create(null);if(A instanceof fc)for(const[t,i]of A.getAll()){const A=dC(i);A&&(e[Ft(t)]=A)}else A instanceof _t&&A.forEach(function(A,t){const i=dC(t);i&&(e[A]=i)});return ct(this,"destinations",e)}getDestination(A){const e=this._readDests();if(e instanceof fc){const t=dC(e.get(A));if(t)return t;const i=this.destinations[A];if(i)return gt(`Found "${A}" at an incorrect position in the NameTree.`),i}else if(e instanceof _t){const t=dC(e.get(A));if(t)return t}return null}_readDests(){const A=this._catDict.get("Names");return A?.has("Dests")?new fc(A.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}get pageLabels(){let A=null;try{A=this._readPageLabels()}catch(A){if(A instanceof oi)throw A;gt("Unable to read page labels.")}return ct(this,"pageLabels",A)}_readPageLabels(){const A=this._catDict.getRaw("PageLabels");if(!A)return null;const e=new Array(this.numPages);let t=null,i="";const a=new pc(A,this.xref).getAll();let s="",n=1;for(let A=0,g=this.numPages;A<g;A++){const g=a.get(A);if(void 0!==g){if(!(g instanceof _t))throw new ut("PageLabel is not a dictionary.");if(g.has("Type")&&!ti(g.get("Type"),"PageLabel"))throw new ut("Invalid type in PageLabel dictionary.");if(g.has("S")){const A=g.get("S");if(!(A instanceof Vt))throw new ut("Invalid style in PageLabel dictionary.");t=A.name}else t=null;if(g.has("P")){const A=g.get("P");if("string"!=typeof A)throw new ut("Invalid prefix in PageLabel dictionary.");i=Ft(A)}else i="";if(g.has("St")){const A=g.get("St");if(!(Number.isInteger(A)&&A>=1))throw new ut("Invalid start in PageLabel dictionary.");n=A}else n=1}switch(t){case"D":s=n;break;case"R":case"r":s=li(n,"r"===t);break;case"A":case"a":const A=26,e="a"===t?97:65,i=n-1;s=String.fromCharCode(e+i%A).repeat(Math.floor(i/A)+1);break;default:if(t)throw new ut(`Invalid style "${t}" in PageLabel dictionary.`);s=""}e[A]=i+s,n++}return e}get pageLayout(){const A=this._catDict.get("PageLayout");let e="";if(A instanceof Vt)switch(A.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":e=A.name}return ct(this,"pageLayout",e)}get pageMode(){const A=this._catDict.get("PageMode");let e="UseNone";if(A instanceof Vt)switch(A.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":e=A.name}return ct(this,"pageMode",e)}get viewerPreferences(){const A=this._catDict.get("ViewerPreferences");if(!(A instanceof _t))return ct(this,"viewerPreferences",null);let e=null;for(const t of A.getKeys()){const i=A.get(t);let a;switch(t){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof i&&(a=i);break;case"NonFullScreenPageMode":if(i instanceof Vt)switch(i.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":a=i.name;break;default:a="UseNone"}break;case"Direction":if(i instanceof Vt)switch(i.name){case"L2R":case"R2L":a=i.name;break;default:a="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(i instanceof Vt)switch(i.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":a=i.name;break;default:a="CropBox"}break;case"PrintScaling":if(i instanceof Vt)switch(i.name){case"None":case"AppDefault":a=i.name;break;default:a="AppDefault"}break;case"Duplex":if(i instanceof Vt)switch(i.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":a=i.name;break;default:a="None"}break;case"PrintPageRange":if(Array.isArray(i)&&i.length%2==0){i.every((A,e,t)=>Number.isInteger(A)&&A>0&&(0===e||A>=t[e-1])&&A<=this.numPages)&&(a=i)}break;case"NumCopies":Number.isInteger(i)&&i>0&&(a=i);break;default:gt(`Ignoring non-standard key in ViewerPreferences: ${t}.`);continue}void 0!==a?(e||(e=Object.create(null)),e[t]=a):gt(`Bad value, for key "${t}", in ViewerPreferences: ${i}.`)}return ct(this,"viewerPreferences",e)}get openAction(){const A=this._catDict.get("OpenAction"),e=Object.create(null);if(A instanceof _t){const t=new _t(this.xref);t.set("A",A);const i={url:null,dest:null,action:null};pC.parseDestDictionary({destDict:t,resultObj:i}),Array.isArray(i.dest)?e.dest=i.dest:i.action&&(e.action=i.action)}else Array.isArray(A)&&(e.dest=A);return ct(this,"openAction",yt(e)>0?e:null)}get attachments(){const A=this._catDict.get("Names");let e=null;if(A instanceof _t&&A.has("EmbeddedFiles")){const t=new fc(A.getRaw("EmbeddedFiles"),this.xref);for(const[A,i]of t.getAll()){const t=new wc(i,this.xref);e||(e=Object.create(null)),e[Ft(A)]=t.serializable}}return ct(this,"attachments",e)}get xfaImages(){const A=this._catDict.get("Names");let e=null;if(A instanceof _t&&A.has("XFAImages")){const t=new fc(A.getRaw("XFAImages"),this.xref);for(const[A,i]of t.getAll())e||(e=new _t(this.xref)),e.set(Ft(A),i)}return ct(this,"xfaImages",e)}_collectJavaScript(){const A=this._catDict.get("Names");let e=null;function t(A,t){if(!(t instanceof _t))return;if(!ti(t.get("S"),"JavaScript"))return;let i=t.get("JS");if(i instanceof ni)i=i.getString();else if("string"!=typeof i)return;i=Ft(i).replaceAll("\0",""),i&&(e||=new Map).set(A,i)}if(A instanceof _t&&A.has("JavaScript")){const e=new fc(A.getRaw("JavaScript"),this.xref);for(const[A,i]of e.getAll())t(Ft(A),i)}const i=this._catDict.get("OpenAction");return i&&t("OpenAction",i),e}get jsActions(){const A=this._collectJavaScript();let e=Ri(this.xref,this._catDict,lA);if(A){e||=Object.create(null);for(const[t,i]of A)t in e?e[t].push(i):e[t]=[i]}return ct(this,"jsActions",e)}async fontFallback(A,e){const t=await Promise.all(this.fontCache);for(const i of t)if(i.loadedName===A)return void i.fallback(e)}async cleanup(A=!1){mc(),this.globalImageCache.clear(A),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.nonBlendModesSet.clear();const e=await Promise.all(this.fontCache);for(const{dict:A}of e)delete A.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(A){const e=[this.toplevelPagesDict],t=new Ai,i=this._catDict.getRaw("Pages");i instanceof $t&&t.put(i);const a=this.xref,s=this.pageKidsCountCache,n=this.pageIndexCache;let g=0;for(;e.length;){const i=e.pop();if(i instanceof $t){const r=s.get(i);if(r>=0&&g+r<=A){g+=r;continue}if(t.has(i))throw new ut("Pages tree contains circular reference.");t.put(i);const o=await a.fetchAsync(i);if(o instanceof _t){let e=o.getRaw("Type");if(e instanceof $t&&(e=await a.fetchAsync(e)),ti(e,"Page")||!o.has("Kids")){if(s.has(i)||s.put(i,1),n.has(i)||n.put(i,g),g===A)return[o,i];g++;continue}}e.push(o);continue}if(!(i instanceof _t))throw new ut("Page dictionary kid reference points to wrong type of object.");const{objId:r}=i;let o=i.getRaw("Count");if(o instanceof $t&&(o=await a.fetchAsync(o)),Number.isInteger(o)&&o>=0&&(r&&!s.has(r)&&s.put(r,o),g+o<=A)){g+=o;continue}let I=i.getRaw("Kids");if(I instanceof $t&&(I=await a.fetchAsync(I)),!Array.isArray(I)){let e=i.getRaw("Type");if(e instanceof $t&&(e=await a.fetchAsync(e)),ti(e,"Page")||!i.has("Kids")){if(g===A)return[i,null];g++;continue}throw new ut("Page dictionary kids object is not an array.")}for(let A=I.length-1;A>=0;A--)e.push(I[A])}throw new Error(`Page index ${A} not found.`)}async getAllPageDicts(A=!1){const{ignoreErrors:e}=this.pdfManager.evaluatorOptions,t=[{currentNode:this.toplevelPagesDict,posInKids:0}],i=new Ai,a=this._catDict.getRaw("Pages");a instanceof $t&&i.put(a);const s=new Map,n=this.xref,g=this.pageIndexCache;let r=0;function o(A,e){e&&!g.has(e)&&g.put(e,r),s.set(r++,[A,e])}function I(t){if(t instanceof ci&&!A)throw t;A&&e&&0===r&&(gt(`getAllPageDicts - Skipping invalid first page: "${t}".`),t=_t.empty),s.set(r++,[t,null])}for(;t.length>0;){const A=t.at(-1),{currentNode:e,posInKids:a}=A;let s=e.getRaw("Kids");if(s instanceof $t)try{s=await n.fetchAsync(s)}catch(A){I(A);break}if(!Array.isArray(s)){I(new ut("Page dictionary kids object is not an array."));break}if(a>=s.length){t.pop();continue}const g=s[a];let r;if(g instanceof $t){if(i.has(g)){I(new ut("Pages tree contains circular reference."));break}i.put(g);try{r=await n.fetchAsync(g)}catch(A){I(A);break}}else r=g;if(!(r instanceof _t)){I(new ut("Page dictionary kid reference points to wrong type of object."));break}let c=r.getRaw("Type");if(c instanceof $t)try{c=await n.fetchAsync(c)}catch(A){I(A);break}ti(c,"Page")||!r.has("Kids")?o(r,g instanceof $t?g:null):t.push({currentNode:r,posInKids:0}),A.posInKids++}return s}getPageIndex(A){const e=this.pageIndexCache.get(A);if(void 0!==e)return Promise.resolve(e);const t=this.xref;let i=0;const a=e=>function(e){let i,a=0;return t.fetchAsync(e).then(function(t){if(si(e,A)&&!ai(t,"Page")&&!(t instanceof _t&&!t.has("Type")&&t.has("Contents")))throw new ut("The reference does not point to a /Page dictionary.");if(!t)return null;if(!(t instanceof _t))throw new ut("Node must be a dictionary.");return i=t.getRaw("Parent"),t.getAsync("Parent")}).then(function(A){if(!A)return null;if(!(A instanceof _t))throw new ut("Parent must be a dictionary.");return A.getAsync("Kids")}).then(function(A){if(!A)return null;const s=[];let n=!1;for(const i of A){if(!(i instanceof $t))throw new ut("Kid must be a reference.");if(si(i,e)){n=!0;break}s.push(t.fetchAsync(i).then(function(A){if(!(A instanceof _t))throw new ut("Kid node must be a dictionary.");A.has("Count")?a+=A.get("Count"):a++}))}if(!n)throw new ut("Kid reference not found in parent's kids.");return Promise.all(s).then(function(){return[a,i]})})}(e).then(e=>{if(!e)return this.pageIndexCache.put(A,i),i;const[t,s]=e;return i+=t,a(s)});return a(A)}get baseUrl(){const A=this._catDict.get("URI");if(A instanceof _t){const e=A.get("Base");if("string"==typeof e){const A=It(e,null,{tryConvertEncoding:!0});if(A)return ct(this,"baseUrl",A.href)}}return ct(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:A,resultObj:e,docBaseUrl:t=null,docAttachments:i=null}){if(!(A instanceof _t))return void gt("parseDestDictionary: `destDict` must be a dictionary.");let a,s,n=A.get("A");if(n instanceof _t||(A.has("Dest")?n=A.get("Dest"):(n=A.get("AA"),n instanceof _t&&(n.has("D")?n=n.get("D"):n.has("U")&&(n=n.get("U"))))),n instanceof _t){const A=n.get("S");if(!(A instanceof Vt))return void gt("parseDestDictionary: Invalid type in Action dictionary.");const t=A.name;switch(t){case"ResetForm":const A=n.get("Flags"),g=!(1&("number"==typeof A?A:0)),r=[],o=[];for(const A of n.get("Fields")||[])A instanceof $t?o.push(A.toString()):"string"==typeof A&&r.push(Ft(A));e.resetForm={fields:r,refs:o,include:g};break;case"URI":a=n.get("URI"),a instanceof Vt&&(a="/"+a.name);break;case"GoTo":s=n.get("D");break;case"Launch":case"GoToR":const I=n.get("F");if(I instanceof _t){const A=new wc(I,null,!0),{rawFilename:e}=A.serializable;a=e}else"string"==typeof I&&(a=I);const c=fC(n);c&&"string"==typeof a&&(a=a.split("#",1)[0]+"#"+c);const C=n.get("NewWindow");"boolean"==typeof C&&(e.newWindow=C);break;case"GoToE":const B=n.get("T");let h;if(i&&B instanceof _t){const A=B.get("R"),e=B.get("N");ti(A,"C")&&"string"==typeof e&&(h=i[Ft(e)])}if(h){e.attachment=h;const A=fC(n);A&&(e.attachmentDest=A)}else gt('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":const Q=n.get("N");Q instanceof Vt&&(e.action=Q.name);break;case"SetOCGState":const l=n.get("State"),E=n.get("PreserveRB");if(!Array.isArray(l)||0===l.length)break;const u=[];for(const A of l)if(A instanceof Vt)switch(A.name){case"ON":case"OFF":case"Toggle":u.push(A.name)}else A instanceof $t&&u.push(A.toString());if(u.length!==l.length)break;e.setOCGState={state:u,preserveRB:"boolean"!=typeof E||E};break;case"JavaScript":const d=n.get("JS");let f;d instanceof ni?f=d.getString():"string"==typeof d&&(f=d);const p=f&&Li(Ft(f));if(p){a=p.url,e.newWindow=p.newWindow;break}default:if("JavaScript"===t||"SubmitForm"===t)break;gt(`parseDestDictionary - unsupported action: "${t}".`)}}else A.has("Dest")&&(s=A.get("Dest"));if("string"==typeof a){const A=It(a,t,{addDefaultProtocol:!0,tryConvertEncoding:!0});A&&(e.url=A.href),e.unsafeUrl=a}s&&(s instanceof Vt&&(s=s.name),"string"==typeof s?e.dest=Ft(s):uC(s)&&(e.dest=s))}}function mC(A){return A instanceof $t||A instanceof _t||A instanceof ni||Array.isArray(A)}function yC(A,e){if(A instanceof _t)A=A.getRawValues();else if(A instanceof ni)A=A.dict.getRawValues();else if(!Array.isArray(A))return;for(const t of A)mC(t)&&e.push(t)}class wC{constructor(A,e,t){this.dict=A,this.keys=e,this.xref=t,this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:A,dict:e}=this;this.refSet=new Ai;const t=[];for(const i of A){const A=e.getRaw(i);void 0!==A&&t.push(A)}return this._walk(t)}async _walk(A){const e=[],t=[];for(;A.length;){let i=A.pop();if(i instanceof $t){if(this.refSet.has(i))continue;try{this.refSet.put(i),i=this.xref.fetch(i)}catch(A){if(!(A instanceof oi)){gt(`ObjectLoader._walk - requesting all data: "${A}".`),this.refSet=null;const{manager:e}=this.xref.stream;return e.requestAllChunks()}e.push(i),t.push({begin:A.begin,end:A.end})}}if(i instanceof ni){const A=i.getBaseStreams();if(A){let a=!1;for(const e of A)e.isDataLoaded||(a=!0,t.push({begin:e.start,end:e.end}));a&&e.push(i)}}yC(i,A)}if(t.length){await this.xref.stream.manager.requestRanges(t);for(const A of e)A instanceof $t&&this.refSet.remove(A);return this._walk(e)}this.refSet=null}}const DC=Symbol(),bC=Symbol(),kC=Symbol(),FC=Symbol(),SC=Symbol(),RC=Symbol(),GC=Symbol(),NC=Symbol(),xC=Symbol(),UC=Symbol("content"),MC=Symbol("data"),LC=Symbol(),JC=Symbol("extra"),HC=Symbol(),YC=Symbol(),vC=Symbol(),KC=Symbol(),qC=Symbol(),TC=Symbol(),PC=Symbol(),WC=Symbol(),ZC=Symbol(),OC=Symbol(),XC=Symbol(),VC=Symbol(),jC=Symbol(),zC=Symbol(),_C=Symbol(),$C=Symbol(),AB=Symbol(),eB=Symbol(),tB=Symbol(),iB=Symbol(),aB=Symbol(),sB=Symbol(),nB=Symbol(),gB=Symbol(),rB=Symbol(),oB=Symbol(),IB=Symbol(),cB=Symbol(),CB=Symbol(),BB=Symbol(),hB=Symbol(),QB=Symbol(),lB=Symbol("namespaceId"),EB=Symbol("nodeName"),uB=Symbol(),dB=Symbol(),fB=Symbol(),pB=Symbol(),mB=Symbol(),yB=Symbol(),wB=Symbol(),DB=Symbol(),bB=Symbol("root"),kB=Symbol(),FB=Symbol(),SB=Symbol(),RB=Symbol(),GB=Symbol(),NB=Symbol(),xB=Symbol(),UB=Symbol(),MB=Symbol(),LB=Symbol(),JB=Symbol(),HB=Symbol("uid"),YB=Symbol(),vB={config:{id:0,check:A=>A.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:A=>A.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:A=>A.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:A=>A.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:A=>A.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:A=>"http://ns.adobe.com/xdp/pdf/"===A},signature:{id:6,check:A=>"http://www.w3.org/2000/09/xmldsig#"===A},sourceSet:{id:7,check:A=>A.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:A=>"http://www.w3.org/1999/XSL/Transform"===A},template:{id:9,check:A=>A.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:A=>A.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:A=>"http://ns.adobe.com/xdp/"===A},xfdf:{id:12,check:A=>"http://ns.adobe.com/xfdf/"===A},xhtml:{id:13,check:A=>"http://www.w3.org/1999/xhtml"===A},xmpmeta:{id:14,check:A=>"http://ns.adobe.com/xmpmeta/"===A}},KB={pt:A=>A,cm:A=>A/2.54*72,mm:A=>A/25.4*72,in:A=>72*A,px:A=>A},qB=/([+-]?\d+\.?\d*)(.*)/;function TB(A){return A.startsWith("'")||A.startsWith('"')?A.slice(1,-1):A}function PB({data:A,defaultValue:e,validate:t}){if(!A)return e;A=A.trim();const i=parseInt(A,10);return!isNaN(i)&&t(i)?i:e}function WB({data:A,defaultValue:e,validate:t}){if(!A)return e;A=A.trim();const i=parseFloat(A);return!isNaN(i)&&t(i)?i:e}function ZB({data:A,defaultValue:e,validate:t}){return A&&t(A=A.trim())?A:e}function OB(A,e){return ZB({data:A,defaultValue:e[0],validate:A=>e.includes(A)})}function XB(A,e="0"){if(e||="0",!A)return XB(e);const t=A.trim().match(qB);if(!t)return XB(e);const[,i,a]=t,s=parseFloat(i);if(isNaN(s))return XB(e);if(0===s)return 0;const n=KB[a];return n?n(s):s}function VB(A){if(!A)return{num:1,den:1};const e=A.trim().split(/\s*:\s*/).map(A=>parseFloat(A)).filter(A=>!isNaN(A));if(1===e.length&&e.push(1),0===e.length)return{num:1,den:1};const[t,i]=e;return{num:t,den:i}}function jB(A){return A?A.trim().split(/\s+/).map(A=>({excluded:"-"===A[0],viewname:A.substring(1)})):[]}class zB{static get FAILURE(){return ct(this,"FAILURE",new zB(!1,null,null,null))}static get EMPTY(){return ct(this,"EMPTY",new zB(!0,null,null,null))}constructor(A,e,t,i){this.success=A,this.html=e,this.bbox=t,this.breakNode=i}isBreak(){return!!this.breakNode}static breakNode(A){return new zB(!1,null,null,A)}static success(A,e=null){return new zB(!0,A,e,null)}}class _B{constructor(A){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(A)}add(A,e=null){for(const e of A)this.addPdfFont(e);for(const A of this.fonts.values())A.regular||(A.regular=A.italic||A.bold||A.bolditalic);if(!e||0===e.size)return;const t=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const A of e)this.fonts.set(A,t)}addPdfFont(A){const e=A.cssFontInfo,t=e.fontFamily;let i=this.fonts.get(t);i||(i=Object.create(null),this.fonts.set(t,i),this.defaultFont||(this.defaultFont=i));let a="";const s=parseFloat(e.fontWeight);0!==parseFloat(e.italicAngle)?a=s>=700?"bolditalic":"italic":s>=700&&(a="bold"),a||((A.name.includes("Bold")||A.psName?.includes("Bold"))&&(a="bold"),(A.name.includes("Italic")||A.name.endsWith("It")||A.psName?.includes("Italic")||A.psName?.endsWith("It"))&&(a+="italic")),a||(a="regular"),i[a]=A}getDefault(){return this.defaultFont}find(A,e=!0){let t=this.fonts.get(A)||this.cache.get(A);if(t)return t;const i=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let a=A.replaceAll(i,"");if(t=this.fonts.get(a),t)return this.cache.set(A,t),t;a=a.toLowerCase();const s=[];for(const[A,e]of this.fonts.entries())A.replaceAll(i,"").toLowerCase().startsWith(a)&&s.push(e);if(0===s.length)for(const[,A]of this.fonts.entries())A.regular.name?.replaceAll(i,"").toLowerCase().startsWith(a)&&s.push(A);if(0===s.length){a=a.replaceAll(/psmt|mt/gi,"");for(const[A,e]of this.fonts.entries())A.replaceAll(i,"").toLowerCase().startsWith(a)&&s.push(e)}if(0===s.length)for(const A of this.fonts.values())A.regular.name?.replaceAll(i,"").toLowerCase().startsWith(a)&&s.push(A);return s.length>=1?(1!==s.length&&e&&gt(`XFA - Too many choices to guess the correct font: ${A}`),this.cache.set(A,s[0]),s[0]):(e&&!this.warned.has(A)&&(this.warned.add(A),gt(`XFA - Cannot find the font: ${A}`)),null)}}function $B(A,e){return"italic"===A.posture?"bold"===A.weight?e.bolditalic:e.italic:"bold"===A.weight?e.bold:e.regular}class Ah{constructor(A,e,t,i){if(this.lineHeight=t,this.paraMargin=e||{top:0,bottom:0,left:0,right:0},!A)return void([this.pdfFont,this.xfaFont]=this.defaultFont(i));this.xfaFont={typeface:A.typeface,posture:A.posture,weight:A.weight,size:A.size,letterSpacing:A.letterSpacing};const a=i.find(A.typeface);a?(this.pdfFont=$B(A,a),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(i))):[this.pdfFont,this.xfaFont]=this.defaultFont(i)}defaultFont(A){const e=A.find("Helvetica",!1)||A.find("Myriad Pro",!1)||A.find("Arial",!1)||A.getDefault();if(e?.regular){const A=e.regular;return[A,{typeface:A.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class eh{constructor(A,e,t,i){this.fontFinder=i,this.stack=[new Ah(A,e,t,i)]}pushData(A,e,t){const i=this.stack.at(-1);for(const e of["typeface","posture","weight","size","letterSpacing"])A[e]||(A[e]=i.xfaFont[e]);for(const A of["top","bottom","left","right"])isNaN(e[A])&&(e[A]=i.paraMargin[A]);const a=new Ah(A,e,t||i.lineHeight,this.fontFinder);a.pdfFont||(a.pdfFont=i.pdfFont),this.stack.push(a)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class th{constructor(A,e,t,i){this.glyphs=[],this.fontSelector=new eh(A,e,t,i),this.extraHeight=0}pushData(A,e,t){this.fontSelector.pushData(A,e,t)}popFont(A){return this.fontSelector.popFont()}addPara(){const A=this.fontSelector.topFont();this.extraHeight+=A.paraMargin.top+A.paraMargin.bottom}addString(A){if(!A)return;const e=this.fontSelector.topFont(),t=e.xfaFont.size;if(e.pdfFont){const i=e.xfaFont.letterSpacing,a=e.pdfFont,s=a.lineHeight||1.2,n=e.lineHeight||Math.max(1.2,s)*t,g=s-(void 0===a.lineGap?.2:a.lineGap),r=Math.max(1,g)*t,o=t/1e3,I=a.defaultWidth||a.charsToGlyphs(" ")[0].width;for(const e of A.split(/[\u2029\n]/)){const A=a.encodeString(e).join(""),t=a.charsToGlyphs(A);for(const A of t){const e=A.width||I;this.glyphs.push([e*o+i,n,r,A.unicode,!1])}this.glyphs.push([0,0,0,"\n",!0])}return void this.glyphs.pop()}for(const e of A.split(/[\u2029\n]/)){for(const A of e.split(""))this.glyphs.push([t,1.2*t,t,A,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}compute(A){let e=-1,t=0,i=0,a=0,s=0,n=0,g=!1,r=!0;for(let o=0,I=this.glyphs.length;o<I;o++){const[I,c,C,B,h]=this.glyphs[o],Q=" "===B,l=r?C:c;h?(i=Math.max(i,s),s=0,a+=n,n=l,e=-1,t=0,r=!1):Q?s+I>A?(i=Math.max(i,s),s=0,a+=n,n=l,e=-1,t=0,g=!0,r=!1):(n=Math.max(l,n),t=s,s+=I,e=o):s+I>A?(a+=n,n=l,-1!==e?(o=e,i=Math.max(i,t),s=0,e=-1,t=0):(i=Math.max(i,s),s=I),g=!0,r=!1):(s+=I,n=Math.max(l,n))}return i=Math.max(i,s),a+=n+this.extraHeight,{width:1.02*i,height:a,isBroken:g}}}const ih=/^[^.[]+/,ah=/^[^\]]+/,sh=0,nh=1,gh=2,rh=3,oh=4,Ih=new Map([["$data",(A,e)=>A.datasets?A.datasets.data:A],["$record",(A,e)=>(A.datasets?A.datasets.data:A)[VC]()[0]],["$template",(A,e)=>A.template],["$connectionSet",(A,e)=>A.connectionSet],["$form",(A,e)=>A.form],["$layout",(A,e)=>A.layout],["$host",(A,e)=>A.host],["$dataWindow",(A,e)=>A.dataWindow],["$event",(A,e)=>A.event],["!",(A,e)=>A.datasets],["$xfa",(A,e)=>A],["xfa",(A,e)=>A],["$",(A,e)=>e]]),ch=new WeakMap;function Ch(A){return"*"===(A=A.trim())?1/0:parseInt(A,10)||0}function Bh(A,e,t=!0){let i=A.match(ih);if(!i)return null;let[a]=i;const s=[{name:a,cacheName:"."+a,index:0,js:null,formCalc:null,operator:sh}];let n=a.length;for(;n<A.length;){const g=n;if("["===A.charAt(n++)){if(i=A.slice(n).match(ah),!i)return gt("XFA - Invalid index in SOM expression"),null;s.at(-1).index=Ch(i[0]),n+=i[0].length+1;continue}let r;switch(A.charAt(n)){case".":if(!e)return null;n++,r=nh;break;case"#":n++,r=gh;break;case"[":if(t)return gt("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;r=rh;break;case"(":if(t)return gt("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;r=oh;break;default:r=sh}if(i=A.slice(n).match(ih),!i)break;[a]=i,n+=a.length,s.push({name:a,cacheName:A.slice(g,n),operator:r,index:0,js:null,formCalc:null})}return s}function hh(A,e,t,i=!0,a=!0){const s=Bh(t,i);if(!s)return null;const n=Ih.get(s[0].name);let g,r=0;n?(g=!0,A=[n(A,e)],r=1):(g=null===e,A=[e||A]);for(let t=s.length;r<t;r++){const{name:t,cacheName:i,operator:n,index:o}=s[r],I=[];for(const e of A){if(!e.isXFAObject)continue;let A,s;if(a&&(s=ch.get(e),s||(s=new Map,ch.set(e,s)),A=s.get(i)),!A){switch(n){case sh:A=e[PC](t,!1);break;case nh:A=e[PC](t,!0);break;case gh:A=e[TC](t),A=A.isXFAObjectArray?A.children:[A]}a&&s.set(i,A)}A.length>0&&I.push(A)}if(0===I.length&&!g&&0===r){const t=e[$C]();if(!(e=t))return null;r=-1,A=[e];continue}A=isFinite(o)?I.filter(A=>o<A.length).map(A=>A[o]):I.flat()}return 0===A.length?null:A}function Qh(A,e,t){const i=Bh(t);if(!i)return null;if(i.some(A=>A.operator===nh))return null;const a=Ih.get(i[0].name);let s=0;a?(A=a(A,e),s=1):A=e||A;for(let e=i.length;s<e;s++){const{name:e,operator:t,index:a}=i[s];if(!isFinite(a))return i[s].index=0,A.createNodes(i.slice(s));let n;switch(t){case sh:n=A[PC](e,!1);break;case nh:n=A[PC](e,!0);break;case gh:n=A[TC](e),n=n.isXFAObjectArray?n.children:[n]}if(0===n.length)return A.createNodes(i.slice(s));if(!(a<n.length))return i[s].index=a-n.length,A.createNodes(i.slice(s));{const e=n[a];if(!e.isXFAObject)return gt("XFA - Cannot create a node."),null;A=e}}return null}const lh=Symbol(),Eh=Symbol(),uh=Symbol(),dh=Symbol("_children"),fh=Symbol(),ph=Symbol(),mh=Symbol(),yh=Symbol(),wh=Symbol(),Dh=Symbol(),bh=Symbol(),kh=Symbol(),Fh=Symbol(),Sh=Symbol("parent"),Rh=Symbol(),Gh=Symbol(),Nh=Symbol();let xh=0;const Uh=vB.datasets.id;class Mh{constructor(A,e,t=!1){this[lB]=A,this[EB]=e,this[bh]=t,this[Sh]=null,this[dh]=[],this[HB]=`${e}${xh++}`,this[eB]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(A){let e=this,t=null;for(const{name:i,index:a}of A){for(let A=0,s=isFinite(a)?a:0;A<=s;A++){const A=e[lB]===Uh?-1:e[lB];t=new Hh(A,i),e[kC](t)}e=t}return t}[dB](A){if(!this[bh]||!this[fB](A))return!1;const e=A[EB],t=this[e];if(!(t instanceof Lh))return null!==t&&this[DB](t),this[e]=A,this[kC](A),!0;if(t.push(A))return this[kC](A),!0;let i="";return this.id?i=` (id: ${this.id})`:this.name&&(i=` (name: ${this.name} ${this.h.value})`),gt(`XFA - node "${this[EB]}"${i} has already enough "${e}"!`),!1}[fB](A){return this.hasOwnProperty(A[EB])&&A[lB]===this[lB]}[IB](){return!1}[DC](){return!1}[nB](){return!1}[gB](){return!1}[yB](){this.para&&this[AB]()[JC].paraStack.pop()}[wB](){this[AB]()[JC].paraStack.push(this.para)}[SB](A){this.id&&this[lB]===vB.template.id&&A.set(this.id,this)}[AB](){return this[eB].template}[cB](){return!1}[CB](){return!1}[kC](A){A[Sh]=this,this[dh].push(A),!A[eB]&&this[eB]&&(A[eB]=this[eB])}[DB](A){const e=this[dh].indexOf(A);this[dh].splice(e,1)}[tB](){return this.hasOwnProperty("value")}[GB](A){}[pB](A){}[HC](){}[SC](A){delete this[bh],this[GC]&&(A.clean(this[GC]),delete this[GC])}[aB](A){return this[dh].indexOf(A)}[sB](A,e){e[Sh]=this,this[dh].splice(A,0,e),!e[eB]&&this[eB]&&(e[eB]=this[eB])}[BB](){return!this.name}[QB](){return""}[xB](){return 0===this[dh].length?this[UC]:this[dh].map(A=>A[xB]()).join("")}get[uh](){const A=Object.getPrototypeOf(this);if(!A._attributes){const e=A._attributes=new Set;for(const A of Object.getOwnPropertyNames(this)){if(null===this[A]||this[A]instanceof Mh||this[A]instanceof Lh)break;e.add(A)}}return ct(this,uh,A._attributes)}[oB](A){let e=this;for(;e;){if(e===A)return!0;e=e[$C]()}return!1}[$C](){return this[Sh]}[_C](){return this[$C]()}[VC](A=null){return A?this[A]:this[dh]}[LC](){const A=Object.create(null);this[UC]&&(A.$content=this[UC]);for(const e of Object.getOwnPropertyNames(this)){const t=this[e];null!==t&&(t instanceof Mh?A[e]=t[LC]():t instanceof Lh?t.isEmpty()||(A[e]=t.dump()):A[e]=t)}return A}[JB](){return null}[MB](){return zB.EMPTY}*[jC](){for(const A of this[VC]())yield A}*[yh](A,e){for(const t of this[jC]())if(!A||e===A.has(t[EB])){const A=this[qC](),e=t[MB](A);e.success||(this[JC].failingNode=t),yield e}}[YC](){return null}[bC](A,e){this[JC].children.push(A)}[qC](){}[FC]({filter:A=null,include:e=!0}){if(this[JC].generator){const A=this[qC](),e=this[JC].failingNode[MB](A);if(!e.success)return e;e.html&&this[bC](e.html,e.bbox),delete this[JC].failingNode}else this[JC].generator=this[yh](A,e);for(;;){const A=this[JC].generator.next();if(A.done)break;const e=A.value;if(!e.success)return e;e.html&&this[bC](e.html,e.bbox)}return this[JC].generator=null,zB.EMPTY}[RB](A){this[Gh]=new Set(Object.keys(A))}[Dh](A){const e=this[uh],t=this[Gh];return[...A].filter(A=>e.has(A)&&!t.has(A))}[kB](A,e=new Set){for(const t of this[dh])t[Rh](A,e)}[Rh](A,e){const t=this[wh](A,e);t?this[lh](t,A,e):this[kB](A,e)}[wh](A,e){const{use:t,usehref:i}=this;if(!t&&!i)return null;let a=null,s=null,n=null,g=t;if(i?(g=i,i.startsWith("#som(")&&i.endsWith(")")?s=i.slice(5,-1):i.startsWith(".#som(")&&i.endsWith(")")?s=i.slice(6,-1):i.startsWith("#")?n=i.slice(1):i.startsWith(".#")&&(n=i.slice(2))):t.startsWith("#")?n=t.slice(1):s=t,this.use=this.usehref="",n?a=A.get(n):(a=hh(A.get(bB),this,s,!0,!1),a&&(a=a[0])),!a)return gt(`XFA - Invalid prototype reference: ${g}.`),null;if(a[EB]!==this[EB])return gt(`XFA - Incompatible prototype: ${a[EB]} !== ${this[EB]}.`),null;if(e.has(a))return gt("XFA - Cycle detected in prototypes use."),null;e.add(a);const r=a[wh](A,e);return r&&a[lh](r,A,e),a[kB](A,e),e.delete(a),a}[lh](A,e,t){if(t.has(A))return void gt("XFA - Cycle detected in prototypes use.");!this[UC]&&A[UC]&&(this[UC]=A[UC]);new Set(t).add(A);for(const e of this[Dh](A[Gh]))this[e]=A[e],this[Gh]&&this[Gh].add(e);for(const i of Object.getOwnPropertyNames(this)){if(this[uh].has(i))continue;const a=this[i],s=A[i];if(a instanceof Lh){for(const A of a[dh])A[Rh](e,t);for(let i=a[dh].length,n=s[dh].length;i<n;i++){const s=A[dh][i][NC]();if(!a.push(s))break;s[Sh]=this,this[dh].push(s),s[Rh](e,t)}}else if(null===a){if(null!==s){const A=s[NC]();A[Sh]=this,this[i]=A,this[dh].push(A),A[Rh](e,t)}}else a[kB](e,t),s&&a[lh](s,e,t)}}static[fh](A){return Array.isArray(A)?A.map(A=>Mh[fh](A)):"object"==typeof A&&null!==A?Object.assign({},A):A}[NC](){const A=Object.create(Object.getPrototypeOf(this));for(const e of Object.getOwnPropertySymbols(this))try{A[e]=this[e]}catch{ct(A,e,this[e])}A[HB]=`${A[EB]}${xh++}`,A[dh]=[];for(const e of Object.getOwnPropertyNames(this)){if(this[uh].has(e)){A[e]=Mh[fh](this[e]);continue}const t=this[e];A[e]=t instanceof Lh?new Lh(t[kh]):null}for(const e of this[dh]){const t=e[EB],i=e[NC]();A[dh].push(i),i[Sh]=A,null===A[t]?A[t]=i:A[t][dh].push(i)}return A}[VC](A=null){return A?this[dh].filter(e=>e[EB]===A):this[dh]}[TC](A){return this[A]}[PC](A,e,t=!0){return Array.from(this[WC](A,e,t))}*[WC](A,e,t=!0){if("parent"!==A){for(const t of this[dh])t[EB]===A&&(yield t),t.name===A&&(yield t),(e||t[BB]())&&(yield*t[WC](A,e,!1));t&&this[uh].has(A)&&(yield new Jh(this,A,this[A]))}else yield this[Sh]}}class Lh{constructor(A=1/0){this[kh]=A,this[dh]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(A){return this[dh].length<=this[kh]?(this[dh].push(A),!0):(gt(`XFA - node "${A[EB]}" accepts no more than ${this[kh]} children`),!1)}isEmpty(){return 0===this[dh].length}dump(){return 1===this[dh].length?this[dh][0][LC]():this[dh].map(A=>A[LC]())}[NC](){const A=new Lh(this[kh]);return A[dh]=this[dh].map(A=>A[NC]()),A}get children(){return this[dh]}clear(){this[dh].length=0}}class Jh{constructor(A,e,t){this[Sh]=A,this[EB]=e,this[UC]=t,this[xC]=!1,this[HB]="attribute"+xh++}[$C](){return this[Sh]}[rB](){return!0}[ZC](){return this[UC].trim()}[GB](A){A=A.value||"",this[UC]=A.toString()}[xB](){return this[UC]}[oB](A){return this[Sh]===A||this[Sh][oB](A)}}class Hh extends Mh{constructor(A,e,t={}){if(super(A,e),this[UC]="",this[ph]=null,"#text"!==e){const A=new Map;this[Eh]=A;for(const[e,i]of Object.entries(t))A.set(e,new Jh(this,e,i));if(t.hasOwnProperty(uB)){const A=t[uB].xfa.dataNode;void 0!==A&&("dataGroup"===A?this[ph]=!1:"dataValue"===A&&(this[ph]=!0))}}this[xC]=!1}[LB](A){const e=this[EB];if("#text"===e)return void A.push(xi(this[UC]));const t=Rt(e),i=this[lB]===Uh?"xfa:":"";A.push(`<${i}${t}`);for(const[e,t]of this[Eh].entries()){const i=Rt(e);A.push(` ${i}="${xi(t[UC])}"`)}if(null!==this[ph]&&(this[ph]?A.push(' xfa:dataNode="dataValue"'):A.push(' xfa:dataNode="dataGroup"')),this[UC]||0!==this[dh].length){if(A.push(">"),this[UC])"string"==typeof this[UC]?A.push(xi(this[UC])):this[UC][LB](A);else for(const e of this[dh])e[LB](A);A.push(`</${i}${t}>`)}else A.push("/>")}[dB](A){if(this[UC]){const A=new Hh(this[lB],"#text");this[kC](A),A[UC]=this[UC],this[UC]=""}return this[kC](A),!0}[pB](A){this[UC]+=A}[HC](){if(this[UC]&&this[dh].length>0){const A=new Hh(this[lB],"#text");this[kC](A),A[UC]=this[UC],delete this[UC]}}[MB](){return"#text"===this[EB]?zB.success({name:"#text",value:this[UC]}):zB.EMPTY}[VC](A=null){return A?this[dh].filter(e=>e[EB]===A):this[dh]}[KC](){return this[Eh]}[TC](A){const e=this[Eh].get(A);return void 0!==e?e:this[VC](A)}*[WC](A,e){const t=this[Eh].get(A);t&&(yield t);for(const t of this[dh])t[EB]===A&&(yield t),e&&(yield*t[WC](A,e))}*[vC](A,e){const t=this[Eh].get(A);!t||e&&t[xC]||(yield t);for(const t of this[dh])yield*t[vC](A,e)}*[XC](A,e,t){for(const i of this[dh])i[EB]!==A||t&&i[xC]||(yield i),e&&(yield*i[XC](A,e,t))}[rB](){return null===this[ph]?0===this[dh].length||this[dh][0][lB]===vB.xhtml.id:this[ph]}[ZC](){return null===this[ph]?0===this[dh].length?this[UC].trim():this[dh][0][lB]===vB.xhtml.id?this[dh][0][xB]().trim():null:this[UC].trim()}[GB](A){A=A.value||"",this[UC]=A.toString()}[LC](A=!1){const e=Object.create(null);A&&(e.$ns=this[lB]),this[UC]&&(e.$content=this[UC]),e.$name=this[EB],e.children=[];for(const t of this[dh])e.children.push(t[LC](A));e.attributes=Object.create(null);for(const[A,t]of this[Eh])e.attributes[A]=t[UC];return e}}class Yh extends Mh{constructor(A,e){super(A,e),this[UC]=""}[pB](A){this[UC]+=A}[HC](){}}class vh extends Yh{constructor(A,e,t){super(A,e),this[Fh]=t}[HC](){this[UC]=ZB({data:this[UC],defaultValue:this[Fh][0],validate:A=>this[Fh].includes(A)})}[SC](A){super[SC](A),delete this[Fh]}}class Kh extends Yh{[HC](){this[UC]=this[UC].trim()}}class qh extends Yh{constructor(A,e,t,i){super(A,e),this[mh]=t,this[Nh]=i}[HC](){this[UC]=PB({data:this[UC],defaultValue:this[mh],validate:this[Nh]})}[SC](A){super[SC](A),delete this[mh],delete this[Nh]}}class Th extends qh{constructor(A,e){super(A,e,0,A=>1===A)}}class Ph extends qh{constructor(A,e){super(A,e,1,A=>0===A)}}function Wh(A){return"string"==typeof A?"0px":Number.isInteger(A)?`${A}px`:`${A.toFixed(2)}px`}const Zh={anchorType(A,e){const t=A[_C]();if(t&&(!t.layout||"position"===t.layout))switch("transform"in e||(e.transform=""),A.anchorType){case"bottomCenter":e.transform+="translate(-50%, -100%)";break;case"bottomLeft":e.transform+="translate(0,-100%)";break;case"bottomRight":e.transform+="translate(-100%,-100%)";break;case"middleCenter":e.transform+="translate(-50%,-50%)";break;case"middleLeft":e.transform+="translate(0,-50%)";break;case"middleRight":e.transform+="translate(-100%,-50%)";break;case"topCenter":e.transform+="translate(-50%,0)";break;case"topRight":e.transform+="translate(-100%,0)"}},dimensions(A,e){const t=A[_C]();let i=A.w;const a=A.h;if(t.layout?.includes("row")){const e=t[JC],a=A.colSpan;let s;-1===a?(s=e.columnWidths.slice(e.currentColumn).reduce((A,e)=>A+e,0),e.currentColumn=0):(s=e.columnWidths.slice(e.currentColumn,e.currentColumn+a).reduce((A,e)=>A+e,0),e.currentColumn=(e.currentColumn+A.colSpan)%e.columnWidths.length),isNaN(s)||(i=A.w=s)}e.width=""!==i?Wh(i):"auto",e.height=""!==a?Wh(a):"auto"},position(A,e){const t=A[_C]();t?.layout&&"position"!==t.layout||(e.position="absolute",e.left=Wh(A.x),e.top=Wh(A.y))},rotate(A,e){A.rotate&&("transform"in e||(e.transform=""),e.transform+=`rotate(-${A.rotate}deg)`,e.transformOrigin="top left")},presence(A,e){switch(A.presence){case"invisible":e.visibility="hidden";break;case"hidden":case"inactive":e.display="none"}},hAlign(A,e){if("para"===A[EB])switch(A.hAlign){case"justifyAll":e.textAlign="justify-all";break;case"radix":e.textAlign="left";break;default:e.textAlign=A.hAlign}else switch(A.hAlign){case"left":e.alignSelf="start";break;case"center":e.alignSelf="center";break;case"right":e.alignSelf="end"}},margin(A,e){A.margin&&(e.margin=A.margin[JB]().margin)}};function Oh(A,e){"position"===A[_C]().layout&&(A.minW>0&&(e.minWidth=Wh(A.minW)),A.maxW>0&&(e.maxWidth=Wh(A.maxW)),A.minH>0&&(e.minHeight=Wh(A.minH)),A.maxH>0&&(e.maxHeight=Wh(A.maxH)))}function Xh(A,e,t,i,a,s){const n=new th(e,t,i,a);return"string"==typeof A?n.addString(A):A[mB](n),n.compute(s)}function Vh(A,e){let t=null,i=null,a=!1;if((!A.w||!A.h)&&A.value){let s=0,n=0;A.margin&&(s=A.margin.leftInset+A.margin.rightInset,n=A.margin.topInset+A.margin.bottomInset);let g=null,r=null;A.para&&(r=Object.create(null),g=""===A.para.lineHeight?null:A.para.lineHeight,r.top=""===A.para.spaceAbove?0:A.para.spaceAbove,r.bottom=""===A.para.spaceBelow?0:A.para.spaceBelow,r.left=""===A.para.marginLeft?0:A.para.marginLeft,r.right=""===A.para.marginRight?0:A.para.marginRight);let o=A.font;if(!o){const e=A[AB]();let t=A[$C]();for(;t&&t!==e;){if(t.font){o=t.font;break}t=t[$C]()}}const I=(A.w||e.width)-s,c=A[eB].fontFinder;if(A.value.exData&&A.value.exData[UC]&&"text/html"===A.value.exData.contentType){const e=Xh(A.value.exData[UC],o,r,g,c,I);i=e.width,t=e.height,a=e.isBroken}else{const e=A.value[xB]();if(e){const A=Xh(e,o,r,g,c,I);i=A.width,t=A.height,a=A.isBroken}}null===i||A.w||(i+=s),null===t||A.h||(t+=n)}return{w:i,h:t,isBroken:a}}function jh(A,e,t){let i;if(""!==A.w&&""!==A.h)i=[A.x,A.y,A.w,A.h];else{if(!t)return null;let a=A.w;if(""===a){if(0===A.maxW){const e=A[_C]();a="position"===e.layout&&""!==e.w?0:A.minW}else a=Math.min(A.maxW,t.width);e.attributes.style.width=Wh(a)}let s=A.h;if(""===s){if(0===A.maxH){const e=A[_C]();s="position"===e.layout&&""!==e.h?0:A.minH}else s=Math.min(A.maxH,t.height);e.attributes.style.height=Wh(s)}i=[A.x,A.y,a,s]}return i}function zh(A){const e=A[_C]();if(e.layout?.includes("row")){const t=e[JC],i=A.colSpan;let a;a=-1===i?t.columnWidths.slice(t.currentColumn).reduce((A,e)=>A+e,0):t.columnWidths.slice(t.currentColumn,t.currentColumn+i).reduce((A,e)=>A+e,0),isNaN(a)||(A.w=a)}e.layout&&"position"!==e.layout&&(A.x=A.y=0),"table"===A.layout&&""===A.w&&Array.isArray(A.columnWidths)&&(A.w=A.columnWidths.reduce((A,e)=>A+e,0))}function _h(A){switch(A.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function $h(A,...e){const t=Object.create(null);for(const i of e){const e=A[i];if(null!==e)if(Zh.hasOwnProperty(i))Zh[i](A,t);else if(e instanceof Mh){const A=e[JB]();A?Object.assign(t,A):gt(`(DEBUG) - XFA - style for ${i} not implemented yet`)}}return t}function AQ(A,e){const{attributes:t}=e,{style:i}=t,a={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(t.class.push("xfaWrapped"),A.border){const{widths:t,insets:s}=A.border[JC];let n,g,r=s[0],o=s[3];const I=s[0]+s[2],c=s[1]+s[3];switch(A.border.hand){case"even":r-=t[0]/2,o-=t[3]/2,n=`calc(100% + ${(t[1]+t[3])/2-c}px)`,g=`calc(100% + ${(t[0]+t[2])/2-I}px)`;break;case"left":r-=t[0],o-=t[3],n=`calc(100% + ${t[1]+t[3]-c}px)`,g=`calc(100% + ${t[0]+t[2]-I}px)`;break;case"right":n=c?`calc(100% - ${c}px)`:"100%",g=I?`calc(100% - ${I}px)`:"100%"}const C=["xfaBorder"];iQ(A.border)&&C.push("xfaPrintOnly");const B={name:"div",attributes:{class:C,style:{top:`${r}px`,left:`${o}px`,width:n,height:g}},children:[]};for(const A of["border","borderWidth","borderColor","borderRadius","borderStyle"])void 0!==i[A]&&(B.attributes.style[A]=i[A],delete i[A]);a.children.push(B,e)}else a.children.push(e);for(const A of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])void 0!==i[A]&&(a.attributes.style[A]=i[A],delete i[A]);return a.attributes.style.position="absolute"===i.position?"absolute":"relative",delete i.position,i.alignSelf&&(a.attributes.style.alignSelf=i.alignSelf,delete i.alignSelf),a}function eQ(A){const e=XB(A.textIndent,"0px");if(e>=0)return;const t="padding"+("left"===("right"===A.textAlign?"right":"left")?"Left":"Right"),i=XB(A[t],"0px");A[t]=i-e+"px"}function tQ(A,e){switch(A.access){case"nonInteractive":e.push("xfaNonInteractive");break;case"readOnly":e.push("xfaReadOnly");break;case"protected":e.push("xfaDisabled")}}function iQ(A){return A.relevant.length>0&&!A.relevant[0].excluded&&"print"===A.relevant[0].viewname}function aQ(A){const e=A[AB]()[JC].paraStack;return e.length?e.at(-1):null}function sQ(A,e,t){if(t.attributes.class?.includes("xfaRich")){e&&(""===A.h&&(e.height="auto"),""===A.w&&(e.width="auto"));const i=aQ(A);if(i){const A=t.attributes.style;switch(A.display="flex",A.flexDirection="column",i.vAlign){case"top":A.justifyContent="start";break;case"bottom":A.justifyContent="end";break;case"middle":A.justifyContent="center"}const e=i[JB]();for(const[t,i]of Object.entries(e))t in A||(A[t]=i)}}}function nQ(A,e,t,i){if(!t)return void delete i.fontFamily;const a=TB(A.typeface);i.fontFamily=`"${a}"`;const s=t.find(a);if(s){const{fontFamily:t}=s.regular.cssFontInfo;t!==a&&(i.fontFamily=`"${t}"`);const n=aQ(e);if(n&&""!==n.lineHeight)return;if(i.lineHeight)return;const g=$B(A,s);g&&(i.lineHeight=Math.max(1.2,g.lineHeight))}}function gQ(A){const e=It(A,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return e?e.href:null}function rQ(A,e){return{name:"div",attributes:{class:["lr-tb"===A.layout?"xfaLr":"xfaRl"]},children:e}}function oQ(A){if(!A[JC])return null;const e={name:"div",attributes:A[JC].attributes,children:A[JC].children};if(A[JC].failingNode){const t=A[JC].failingNode[YC]();t&&(A.layout.endsWith("-tb")?e.children.push(rQ(A,[t])):e.children.push(t))}return 0===e.children.length?null:e}function IQ(A,e,t){const i=A[JC],a=i.availableSpace,[s,n,g,r]=t;switch(A.layout){case"position":i.width=Math.max(i.width,s+g),i.height=Math.max(i.height,n+r),i.children.push(e);break;case"lr-tb":case"rl-tb":i.line&&1!==i.attempt||(i.line=rQ(A,[]),i.children.push(i.line),i.numberInLine=0),i.numberInLine+=1,i.line.children.push(e),0===i.attempt?(i.currentWidth+=g,i.height=Math.max(i.height,i.prevHeight+r)):(i.currentWidth=g,i.prevHeight=i.height,i.height+=r,i.attempt=0),i.width=Math.max(i.width,i.currentWidth);break;case"rl-row":case"row":{i.children.push(e),i.width+=g,i.height=Math.max(i.height,r);const A=Wh(i.height);for(const e of i.children)e.attributes.style.height=A;break}case"table":case"tb":i.width=Math.min(a.width,Math.max(i.width,g)),i.height+=r,i.children.push(e)}}function cQ(A){const e=A[JC].availableSpace,t=A.margin?A.margin.topInset+A.margin.bottomInset:0,i=A.margin?A.margin.leftInset+A.margin.rightInset:0;switch(A.layout){case"lr-tb":case"rl-tb":return 0===A[JC].attempt?{width:e.width-i-A[JC].currentWidth,height:e.height-t-A[JC].prevHeight}:{width:e.width-i,height:e.height-t-A[JC].height};case"rl-row":case"row":return{width:A[JC].columnWidths.slice(A[JC].currentColumn).reduce((A,e)=>A+e),height:e.height-i};case"table":case"tb":return{width:e.width-i,height:e.height-t-A[JC].height};default:return e}}function CQ(A,e){if(null===A[AB]()[JC].firstUnsplittable)return!0;if(0===A.w||0===A.h)return!0;const t=A[_C](),i=t[JC]?.attempt||0,[,a,s,n]=function(A){let e,t,i=""===A.w?NaN:A.w,a=""===A.h?NaN:A.h,[s,n]=[0,0];switch(A.anchorType||""){case"bottomCenter":[s,n]=[i/2,a];break;case"bottomLeft":[s,n]=[0,a];break;case"bottomRight":[s,n]=[i,a];break;case"middleCenter":[s,n]=[i/2,a/2];break;case"middleLeft":[s,n]=[0,a/2];break;case"middleRight":[s,n]=[i,a/2];break;case"topCenter":[s,n]=[i/2,0];break;case"topRight":[s,n]=[i,0]}switch(A.rotate||0){case 0:[e,t]=[-s,-n];break;case 90:[e,t]=[-n,s],[i,a]=[a,-i];break;case 180:[e,t]=[s,n],[i,a]=[-i,-a];break;case 270:[e,t]=[n,-s],[i,a]=[-a,i]}return[A.x+e+Math.min(0,i),A.y+t+Math.min(0,a),Math.abs(i),Math.abs(a)]}(A);switch(t.layout){case"lr-tb":case"rl-tb":return 0===i?A[AB]()[JC].noLayoutFailure?""!==A.w?Math.round(s-e.width)<=2:e.width>2:!(""!==A.h&&Math.round(n-e.height)>2)&&(""!==A.w?Math.round(s-e.width)<=2||0===t[JC].numberInLine&&e.height>2:e.width>2):!!A[AB]()[JC].noLayoutFailure||!(""!==A.h&&Math.round(n-e.height)>2)&&((""===A.w||Math.round(s-e.width)<=2||!t[CB]())&&e.height>2);case"table":case"tb":return!!A[AB]()[JC].noLayoutFailure||(""===A.h||A[cB]()?(""===A.w||Math.round(s-e.width)<=2||!t[CB]())&&e.height>2:Math.round(n-e.height)<=2);case"position":if(A[AB]()[JC].noLayoutFailure)return!0;if(""===A.h||Math.round(n+a-e.height)<=2)return!0;return n+a>A[AB]()[JC].currentContentArea.h;case"rl-row":case"row":return!!A[AB]()[JC].noLayoutFailure||(""===A.h||Math.round(n-e.height)<=2);default:return!0}}const BQ=vB.template.id,hQ="http://www.w3.org/2000/svg",QQ=/^H(\d+)$/,lQ=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),EQ=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function uQ(A){if(!A||!A.border)return{w:0,h:0};const e=A.border[OC]();return e?{w:e.widths[0]+e.widths[2]+e.insets[0]+e.insets[2],h:e.widths[1]+e.widths[3]+e.insets[1]+e.insets[3]}:{w:0,h:0}}function dQ(A){return A.margin&&(A.margin.topInset||A.margin.rightInset||A.margin.bottomInset||A.margin.leftInset)}function fQ(A,e){if(!A.value){const e=new UE({});A[kC](e),A.value=e}A.value[GB](e)}function*pQ(A){for(const e of A[VC]())e instanceof fE?yield*e[jC]():yield e}function mQ(A){return"error"===A.validate?.nullTest}function yQ(A){for(;A;){if(!A.traversal)return void(A[NB]=A[$C]()[NB]);if(A[NB])return;let e=null;for(const t of A.traversal[VC]())if("next"===t.operation){e=t;break}if(!e||!e.ref)return void(A[NB]=A[$C]()[NB]);const t=A[AB]();A[NB]=++t[NB];const i=t[FB](e.ref,A);if(!i)return;A=i[0]}}function wQ(A,e){const t=A.assist;if(t){const A=t[MB]();A&&(e.title=A);const i=t.role.match(QQ);if(i){const A="heading",t=i[1];e.role=A,e["aria-level"]=t}}if("table"===A.layout)e.role="table";else if("row"===A.layout)e.role="row";else{const t=A[$C]();"row"===t.layout&&(e.role="TH"===t.assist?.role?"columnheader":"cell")}}function DQ(A){if(!A.assist)return null;const e=A.assist;return e.speak&&""!==e.speak[UC]?e.speak[UC]:e.toolTip?e.toolTip[UC]:null}function bQ(A){return zB.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:A}]})}function kQ(A){const e=A[AB]();null===e[JC].firstUnsplittable&&(e[JC].firstUnsplittable=A,e[JC].noLayoutFailure=!0)}function FQ(A){const e=A[AB]();e[JC].firstUnsplittable===A&&(e[JC].noLayoutFailure=!1)}function SQ(A){if(A[JC])return!1;if(A[JC]=Object.create(null),"auto"===A.targetType)return!1;const e=A[AB]();let t=null;if(A.target){if(t=e[FB](A.target,A[$C]()),!t)return!1;t=t[0]}const{currentPageArea:i,currentContentArea:a}=e[JC];if("pageArea"===A.targetType)return t instanceof $l||(t=null),A.startNew?(A[JC].target=t||i,!0):!(!t||t===i)&&(A[JC].target=t,!0);t instanceof Al||(t=null);const s=t&&t[$C]();let n,g=s;if(A.startNew)if(t){const A=s.contentArea.children,e=A.indexOf(a),i=A.indexOf(t);-1!==e&&e<i&&(g=null),n=i-1}else n=i.contentArea.children.indexOf(a);else{if(!t||t===a)return!1;n=s.contentArea.children.indexOf(t)-1,g=s===i?null:s}return A[JC].target=g,A[JC].index=n,!0}function RQ(A,e,t){const i=A[AB](),a=i[JC].noLayoutFailure,s=e[_C];e[_C]=()=>A,i[JC].noLayoutFailure=!0;const n=e[MB](t);A[bC](n.html,n.bbox),i[JC].noLayoutFailure=a,e[_C]=s}class GQ extends Kh{constructor(A){super(BQ,"appearanceFilter"),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||""}}class NQ extends Mh{constructor(A){super(BQ,"arc",!0),this.circular=PB({data:A.circular,defaultValue:0,validate:A=>1===A}),this.hand=OB(A.hand,["even","left","right"]),this.id=A.id||"",this.startAngle=WB({data:A.startAngle,defaultValue:0,validate:A=>!0}),this.sweepAngle=WB({data:A.sweepAngle,defaultValue:360,validate:A=>!0}),this.use=A.use||"",this.usehref=A.usehref||"",this.edge=null,this.fill=null}[MB](){const A=this.edge||new cl({}),e=A[JB](),t=Object.create(null);let i;"visible"===this.fill?.presence?Object.assign(t,this.fill[JB]()):t.fill="transparent",t.strokeWidth=Wh("visible"===A.presence?A.thickness:0),t.stroke=e.color;const a={xmlns:hQ,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)i={name:"ellipse",attributes:{xmlns:hQ,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:t}};else{const A=this.startAngle*Math.PI/180,e=this.sweepAngle*Math.PI/180,s=this.sweepAngle>180?1:0,[n,g,r,o]=[50*(1+Math.cos(A)),50*(1-Math.sin(A)),50*(1+Math.cos(A+e)),50*(1-Math.sin(A+e))];i={name:"path",attributes:{xmlns:hQ,d:`M ${n} ${g} A 50 50 0 ${s} 0 ${r} ${o}`,vectorEffect:"non-scaling-stroke",style:t}},Object.assign(a,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const s={name:"svg",children:[i],attributes:a};return dQ(this[$C]()[$C]())?zB.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[s]}):(s.attributes.style.position="absolute",zB.success(s))}}class xQ extends Mh{constructor(A){super(BQ,"area",!0),this.colSpan=PB({data:A.colSpan,defaultValue:1,validate:A=>A>=1||-1===A}),this.id=A.id||"",this.name=A.name||"",this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.x=XB(A.x,"0pt"),this.y=XB(A.y,"0pt"),this.desc=null,this.extras=null,this.area=new Lh,this.draw=new Lh,this.exObject=new Lh,this.exclGroup=new Lh,this.field=new Lh,this.subform=new Lh,this.subformSet=new Lh}*[jC](){yield*pQ(this)}[BB](){return!0}[gB](){return!0}[bC](A,e){const[t,i,a,s]=e;this[JC].width=Math.max(this[JC].width,t+a),this[JC].height=Math.max(this[JC].height,i+s),this[JC].children.push(A)}[qC](){return this[JC].availableSpace}[MB](A){const e=$h(this,"position"),t={style:e,id:this[HB],class:["xfaArea"]};iQ(this)&&t.class.push("xfaPrintOnly"),this.name&&(t.xfaName=this.name);const i=[];this[JC]={children:i,width:0,height:0,availableSpace:A};const a=this[FC]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!a.success)return a.isBreak()?a:(delete this[JC],zB.FAILURE);e.width=Wh(this[JC].width),e.height=Wh(this[JC].height);const s={name:"div",attributes:t,children:i},n=[this.x,this.y,this[JC].width,this[JC].height];return delete this[JC],zB.success(s,n)}}class UQ extends Mh{constructor(A){super(BQ,"assist",!0),this.id=A.id||"",this.role=A.role||"",this.use=A.use||"",this.usehref=A.usehref||"",this.speak=null,this.toolTip=null}[MB](){return this.toolTip?.[UC]||null}}class MQ extends Mh{constructor(A){super(BQ,"barcode",!0),this.charEncoding=ZB({data:A.charEncoding?A.charEncoding.toLowerCase():"",defaultValue:"",validate:A=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(A)||A.match(/iso-8859-\d{2}/)}),this.checksum=OB(A.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=PB({data:A.dataColumnCount,defaultValue:-1,validate:A=>A>=0}),this.dataLength=PB({data:A.dataLength,defaultValue:-1,validate:A=>A>=0}),this.dataPrep=OB(A.dataPrep,["none","flateCompress"]),this.dataRowCount=PB({data:A.dataRowCount,defaultValue:-1,validate:A=>A>=0}),this.endChar=A.endChar||"",this.errorCorrectionLevel=PB({data:A.errorCorrectionLevel,defaultValue:-1,validate:A=>A>=0&&A<=8}),this.id=A.id||"",this.moduleHeight=XB(A.moduleHeight,"5mm"),this.moduleWidth=XB(A.moduleWidth,"0.25mm"),this.printCheckDigit=PB({data:A.printCheckDigit,defaultValue:0,validate:A=>1===A}),this.rowColumnRatio=VB(A.rowColumnRatio),this.startChar=A.startChar||"",this.textLocation=OB(A.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=PB({data:A.truncate,defaultValue:0,validate:A=>1===A}),this.type=OB(A.type?A.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),this.upsMode=OB(A.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=A.use||"",this.usehref=A.usehref||"",this.wideNarrowRatio=VB(A.wideNarrowRatio),this.encrypt=null,this.extras=null}}class LQ extends Mh{constructor(A){super(BQ,"bind",!0),this.match=OB(A.match,["once","dataRef","global","none"]),this.ref=A.ref||"",this.picture=null}}class JQ extends Mh{constructor(A){super(BQ,"bindItems"),this.connection=A.connection||"",this.labelRef=A.labelRef||"",this.ref=A.ref||"",this.valueRef=A.valueRef||""}}class HQ extends Mh{constructor(A){super(BQ,"bookend"),this.id=A.id||"",this.leader=A.leader||"",this.trailer=A.trailer||"",this.use=A.use||"",this.usehref=A.usehref||""}}class YQ extends Th{constructor(A){super(BQ,"boolean"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[MB](A){return bQ(1===this[UC]?"1":"0")}}class vQ extends Mh{constructor(A){super(BQ,"border",!0),this.break=OB(A.break,["close","open"]),this.hand=OB(A.hand,["even","left","right"]),this.id=A.id||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.corner=new Lh(4),this.edge=new Lh(4),this.extras=null,this.fill=null,this.margin=null}[OC](){if(!this[JC]){const A=this.edge.children.slice();if(A.length<4){const e=A.at(-1)||new cl({});for(let t=A.length;t<4;t++)A.push(e)}const e=A.map(A=>A.thickness),t=[0,0,0,0];this.margin&&(t[0]=this.margin.topInset,t[1]=this.margin.rightInset,t[2]=this.margin.bottomInset,t[3]=this.margin.leftInset),this[JC]={widths:e,insets:t,edges:A}}return this[JC]}[JB](){const{edges:A}=this[OC](),e=A.map(A=>{const e=A[JB]();return e.color||="#000000",e}),t=Object.create(null);if(this.margin&&Object.assign(t,this.margin[JB]()),"visible"===this.fill?.presence&&Object.assign(t,this.fill[JB]()),this.corner.children.some(A=>0!==A.radius)){const A=this.corner.children.map(A=>A[JB]());if(2===A.length||3===A.length){const e=A.at(-1);for(let t=A.length;t<4;t++)A.push(e)}t.borderRadius=A.map(A=>A.radius).join(" ")}switch(this.presence){case"invisible":case"hidden":t.borderStyle="";break;case"inactive":t.borderStyle="none";break;default:t.borderStyle=e.map(A=>A.style).join(" ")}return t.borderWidth=e.map(A=>A.width).join(" "),t.borderColor=e.map(A=>A.color).join(" "),t}}class KQ extends Mh{constructor(A){super(BQ,"break",!0),this.after=OB(A.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=A.afterTarget||"",this.before=OB(A.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=A.beforeTarget||"",this.bookendLeader=A.bookendLeader||"",this.bookendTrailer=A.bookendTrailer||"",this.id=A.id||"",this.overflowLeader=A.overflowLeader||"",this.overflowTarget=A.overflowTarget||"",this.overflowTrailer=A.overflowTrailer||"",this.startNew=PB({data:A.startNew,defaultValue:0,validate:A=>1===A}),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}}class qQ extends Mh{constructor(A){super(BQ,"breakAfter",!0),this.id=A.id||"",this.leader=A.leader||"",this.startNew=PB({data:A.startNew,defaultValue:0,validate:A=>1===A}),this.target=A.target||"",this.targetType=OB(A.targetType,["auto","contentArea","pageArea"]),this.trailer=A.trailer||"",this.use=A.use||"",this.usehref=A.usehref||"",this.script=null}}class TQ extends Mh{constructor(A){super(BQ,"breakBefore",!0),this.id=A.id||"",this.leader=A.leader||"",this.startNew=PB({data:A.startNew,defaultValue:0,validate:A=>1===A}),this.target=A.target||"",this.targetType=OB(A.targetType,["auto","contentArea","pageArea"]),this.trailer=A.trailer||"",this.use=A.use||"",this.usehref=A.usehref||"",this.script=null}[MB](A){return this[JC]={},zB.FAILURE}}class PQ extends Mh{constructor(A){super(BQ,"button",!0),this.highlight=OB(A.highlight,["inverted","none","outline","push"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}[MB](A){const e=this[$C]()[$C](),t={name:"button",attributes:{id:this[HB],class:["xfaButton"],style:{}},children:[]};for(const A of e.event.children){if("click"!==A.activity||!A.script)continue;const e=Li(A.script[UC]);if(!e)continue;const i=gQ(e.url);i&&t.children.push({name:"a",attributes:{id:"link"+this[HB],href:i,newWindow:e.newWindow,class:["xfaLink"],style:{}},children:[]})}return zB.success(t)}}class WQ extends Mh{constructor(A){super(BQ,"calculate",!0),this.id=A.id||"",this.override=OB(A.override,["disabled","error","ignore","warning"]),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.message=null,this.script=null}}class ZQ extends Mh{constructor(A){super(BQ,"caption",!0),this.id=A.id||"",this.placement=OB(A.placement,["left","bottom","inline","right","top"]),this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil(XB(A.reserve)),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[GB](A){fQ(this,A)}[OC](A){if(!this[JC]){let{width:e,height:t}=A;switch(this.placement){case"left":case"right":case"inline":e=this.reserve<=0?e:this.reserve;break;case"top":case"bottom":t=this.reserve<=0?t:this.reserve}this[JC]=Vh(this,{width:e,height:t})}return this[JC]}[MB](A){if(!this.value)return zB.EMPTY;this[wB]();const e=this.value[MB](A).html;if(!e)return this[yB](),zB.EMPTY;const t=this.reserve;if(this.reserve<=0){const{w:e,h:t}=this[OC](A);switch(this.placement){case"left":case"right":case"inline":this.reserve=e;break;case"top":case"bottom":this.reserve=t}}const i=[];"string"==typeof e?i.push({name:"#text",value:e}):i.push(e);const a=$h(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(a.width=Wh(this.reserve));break;case"top":case"bottom":this.reserve>0&&(a.height=Wh(this.reserve))}return sQ(this,null,e),this[yB](),this.reserve=t,zB.success({name:"div",attributes:{style:a,class:["xfaCaption"]},children:i})}}class OQ extends Kh{constructor(A){super(BQ,"certificate"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class XQ extends Mh{constructor(A){super(BQ,"certificates",!0),this.credentialServerPolicy=OB(A.credentialServerPolicy,["optional","required"]),this.id=A.id||"",this.url=A.url||"",this.urlPolicy=A.urlPolicy||"",this.use=A.use||"",this.usehref=A.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}}class VQ extends Mh{constructor(A){super(BQ,"checkButton",!0),this.id=A.id||"",this.mark=OB(A.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=OB(A.shape,["square","round"]),this.size=XB(A.size,"10pt"),this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.extras=null,this.margin=null}[MB](A){const e=$h("margin"),t=Wh(this.size);let i,a,s;e.width=e.height=t;const n=this[$C]()[$C](),g=n.items.children.length&&n.items.children[0][MB]().html||[],r={on:(void 0!==g[0]?g[0]:"on").toString(),off:(void 0!==g[1]?g[1]:"off").toString()},o=(n.value?.[xB]()||"off")===r.on||void 0,I=n[_C](),c=n[HB];let C;I instanceof ml?(s=I[HB],i="radio",a="xfaRadio",C=I[MC]?.[HB]||I[HB]):(i="checkbox",a="xfaCheckbox",C=n[MC]?.[HB]||n[HB]);const B={name:"input",attributes:{class:[a],style:e,fieldId:c,dataId:C,type:i,checked:o,xfaOn:r.on,xfaOff:r.off,"aria-label":DQ(n),"aria-required":!1}};return s&&(B.attributes.name=s),mQ(n)&&(B.attributes["aria-required"]=!0,B.attributes.required=!0),zB.success({name:"label",attributes:{class:["xfaLabel"]},children:[B]})}}class jQ extends Mh{constructor(A){super(BQ,"choiceList",!0),this.commitOn=OB(A.commitOn,["select","exit"]),this.id=A.id||"",this.open=OB(A.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=PB({data:A.textEntry,defaultValue:0,validate:A=>1===A}),this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.extras=null,this.margin=null}[MB](A){const e=$h(this,"border","margin"),t=this[$C]()[$C](),i={fontSize:`calc(${t.font?.size||10}px * var(--scale-factor))`},a=[];if(t.items.children.length>0){const A=t.items;let e=0,s=0;2===A.children.length&&(e=A.children[0].save,s=1-e);const n=A.children[e][MB]().html,g=A.children[s][MB]().html;let r=!1;const o=t.value?.[xB]()||"";for(let A=0,e=n.length;A<e;A++){const e={name:"option",attributes:{value:g[A]||n[A],style:i},value:n[A]};g[A]===o&&(e.attributes.selected=r=!0),a.push(e)}r||a.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const s={class:["xfaSelect"],fieldId:t[HB],dataId:t[MC]?.[HB]||t[HB],style:e,"aria-label":DQ(t),"aria-required":!1};return mQ(t)&&(s["aria-required"]=!0,s.required=!0),"multiSelect"===this.open&&(s.multiple=!0),zB.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:a,attributes:s}]})}}class zQ extends Mh{constructor(A){super(BQ,"color",!0),this.cSpace=OB(A.cSpace,["SRGB"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.value=A.value?function(A,e=[0,0,0]){let[t,i,a]=e;if(!A)return{r:t,g:i,b:a};const s=A.trim().split(/\s*,\s*/).map(A=>Math.min(Math.max(0,parseInt(A.trim(),10)),255)).map(A=>isNaN(A)?0:A);return s.length<3||([t,i,a]=s),{r:t,g:i,b:a}}(A.value):"",this.extras=null}[tB](){return!1}[JB](){return this.value?bt.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class _Q extends Mh{constructor(A){super(BQ,"comb"),this.id=A.id||"",this.numberOfCells=PB({data:A.numberOfCells,defaultValue:0,validate:A=>A>=0}),this.use=A.use||"",this.usehref=A.usehref||""}}class $Q extends Mh{constructor(A){super(BQ,"connect",!0),this.connection=A.connection||"",this.id=A.id||"",this.ref=A.ref||"",this.usage=OB(A.usage,["exportAndImport","exportOnly","importOnly"]),this.use=A.use||"",this.usehref=A.usehref||"",this.picture=null}}class Al extends Mh{constructor(A){super(BQ,"contentArea",!0),this.h=XB(A.h),this.id=A.id||"",this.name=A.name||"",this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.w=XB(A.w),this.x=XB(A.x,"0pt"),this.y=XB(A.y,"0pt"),this.desc=null,this.extras=null}[MB](A){const e={left:Wh(this.x),top:Wh(this.y),width:Wh(this.w),height:Wh(this.h)},t=["xfaContentarea"];return iQ(this)&&t.push("xfaPrintOnly"),zB.success({name:"div",children:[],attributes:{style:e,class:t,id:this[HB]}})}}class el extends Mh{constructor(A){super(BQ,"corner",!0),this.id=A.id||"",this.inverted=PB({data:A.inverted,defaultValue:0,validate:A=>1===A}),this.join=OB(A.join,["square","round"]),this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.radius=XB(A.radius),this.stroke=OB(A.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=XB(A.thickness,"0.5pt"),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null}[JB](){const A=$h(this,"visibility");return A.radius=Wh("square"===this.join?0:this.radius),A}}class tl extends Yh{constructor(A){super(BQ,"date"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){const A=this[UC].trim();this[UC]=A?new Date(A):null}[MB](A){return bQ(this[UC]?this[UC].toString():"")}}class il extends Yh{constructor(A){super(BQ,"dateTime"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){const A=this[UC].trim();this[UC]=A?new Date(A):null}[MB](A){return bQ(this[UC]?this[UC].toString():"")}}class al extends Mh{constructor(A){super(BQ,"dateTimeEdit",!0),this.hScrollPolicy=OB(A.hScrollPolicy,["auto","off","on"]),this.id=A.id||"",this.picker=OB(A.picker,["host","none"]),this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[MB](A){const e=$h(this,"border","font","margin"),t=this[$C]()[$C](),i={name:"input",attributes:{type:"text",fieldId:t[HB],dataId:t[MC]?.[HB]||t[HB],class:["xfaTextfield"],style:e,"aria-label":DQ(t),"aria-required":!1}};return mQ(t)&&(i.attributes["aria-required"]=!0,i.attributes.required=!0),zB.success({name:"label",attributes:{class:["xfaLabel"]},children:[i]})}}class sl extends Yh{constructor(A){super(BQ,"decimal"),this.fracDigits=PB({data:A.fracDigits,defaultValue:2,validate:A=>!0}),this.id=A.id||"",this.leadDigits=PB({data:A.leadDigits,defaultValue:-1,validate:A=>!0}),this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){const A=parseFloat(this[UC].trim());this[UC]=isNaN(A)?null:A}[MB](A){return bQ(null!==this[UC]?this[UC].toString():"")}}class nl extends Mh{constructor(A){super(BQ,"defaultUi",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}}class gl extends Mh{constructor(A){super(BQ,"desc",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.boolean=new Lh,this.date=new Lh,this.dateTime=new Lh,this.decimal=new Lh,this.exData=new Lh,this.float=new Lh,this.image=new Lh,this.integer=new Lh,this.text=new Lh,this.time=new Lh}}class rl extends vh{constructor(A){super(BQ,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||""}}class ol extends Mh{constructor(A){super(BQ,"digestMethods",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.digestMethod=new Lh}}class Il extends Mh{constructor(A){super(BQ,"draw",!0),this.anchorType=OB(A.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=PB({data:A.colSpan,defaultValue:1,validate:A=>A>=1||-1===A}),this.h=A.h?XB(A.h):"",this.hAlign=OB(A.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=A.id||"",this.locale=A.locale||"",this.maxH=XB(A.maxH,"0pt"),this.maxW=XB(A.maxW,"0pt"),this.minH=XB(A.minH,"0pt"),this.minW=XB(A.minW,"0pt"),this.name=A.name||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.relevant=jB(A.relevant),this.rotate=PB({data:A.rotate,defaultValue:0,validate:A=>A%90==0}),this.use=A.use||"",this.usehref=A.usehref||"",this.w=A.w?XB(A.w):"",this.x=XB(A.x,"0pt"),this.y=XB(A.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new Lh}[GB](A){fQ(this,A)}[MB](A){if(yQ(this),"hidden"===this.presence||"inactive"===this.presence)return zB.EMPTY;zh(this),this[wB]();const e=this.w,t=this.h,{w:i,h:a,isBroken:s}=Vh(this,A);if(i&&""===this.w){if(s&&this[_C]()[CB]())return this[yB](),zB.FAILURE;this.w=i}if(a&&""===this.h&&(this.h=a),kQ(this),!CQ(this,A))return this.w=e,this.h=t,this[yB](),zB.FAILURE;FQ(this);const n=$h(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");Oh(this,n),n.margin&&(n.padding=n.margin,delete n.margin);const g=["xfaDraw"];this.font&&g.push("xfaFont"),iQ(this)&&g.push("xfaPrintOnly");const r={style:n,id:this[HB],class:g};this.name&&(r.xfaName=this.name);const o={name:"div",attributes:r,children:[]};wQ(this,r);const I=jh(this,o,A),c=this.value?this.value[MB](A).html:null;return null===c?(this.w=e,this.h=t,this[yB](),zB.success(AQ(this,o),I)):(o.children.push(c),sQ(this,n,c),this.w=e,this.h=t,this[yB](),zB.success(AQ(this,o),I))}}class cl extends Mh{constructor(A){super(BQ,"edge",!0),this.cap=OB(A.cap,["square","butt","round"]),this.id=A.id||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.stroke=OB(A.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=XB(A.thickness,"0.5pt"),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null}[JB](){const A=$h(this,"visibility");if(Object.assign(A,{linecap:this.cap,width:Wh(this.thickness),color:this.color?this.color[JB]():"#000000",style:""}),"visible"!==this.presence)A.style="none";else switch(this.stroke){case"solid":A.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":A.style="dashed";break;case"dotted":A.style="dotted";break;case"embossed":A.style="ridge";break;case"etched":A.style="groove";break;case"lowered":A.style="inset";break;case"raised":A.style="outset"}return A}}class Cl extends vh{constructor(A){super(BQ,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||""}}class Bl extends Mh{constructor(A){super(BQ,"encodings",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.encoding=new Lh}}class hl extends Mh{constructor(A){super(BQ,"encrypt",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.certificate=null}}class Ql extends Mh{constructor(A){super(BQ,"encryptData",!0),this.id=A.id||"",this.operation=OB(A.operation,["encrypt","decrypt"]),this.target=A.target||"",this.use=A.use||"",this.usehref=A.usehref||"",this.filter=null,this.manifest=null}}class ll extends Mh{constructor(A){super(BQ,"encryption",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.certificate=new Lh}}class El extends vh{constructor(A){super(BQ,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||""}}class ul extends Mh{constructor(A){super(BQ,"encryptionMethods",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.encryptionMethod=new Lh}}class dl extends Mh{constructor(A){super(BQ,"event",!0),this.activity=OB(A.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),this.id=A.id||"",this.listen=OB(A.listen,["refOnly","refAndDescendents"]),this.name=A.name||"",this.ref=A.ref||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}}class fl extends Yh{constructor(A){super(BQ,"exData"),this.contentType=A.contentType||"",this.href=A.href||"",this.id=A.id||"",this.maxLength=PB({data:A.maxLength,defaultValue:-1,validate:A=>A>=-1}),this.name=A.name||"",this.rid=A.rid||"",this.transferEncoding=OB(A.transferEncoding,["none","base64","package"]),this.use=A.use||"",this.usehref=A.usehref||""}[nB](){return"text/html"===this.contentType}[dB](A){return("text/html"===this.contentType&&A[lB]===vB.xhtml.id||"text/xml"===this.contentType)&&(this[UC]=A,!0)}[MB](A){return"text/html"===this.contentType&&this[UC]?this[UC][MB](A):zB.EMPTY}}class pl extends Mh{constructor(A){super(BQ,"exObject",!0),this.archive=A.archive||"",this.classId=A.classId||"",this.codeBase=A.codeBase||"",this.codeType=A.codeType||"",this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.boolean=new Lh,this.date=new Lh,this.dateTime=new Lh,this.decimal=new Lh,this.exData=new Lh,this.exObject=new Lh,this.float=new Lh,this.image=new Lh,this.integer=new Lh,this.text=new Lh,this.time=new Lh}}class ml extends Mh{constructor(A){super(BQ,"exclGroup",!0),this.access=OB(A.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=A.accessKey||"",this.anchorType=OB(A.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=PB({data:A.colSpan,defaultValue:1,validate:A=>A>=1||-1===A}),this.h=A.h?XB(A.h):"",this.hAlign=OB(A.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=A.id||"",this.layout=OB(A.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=XB(A.maxH,"0pt"),this.maxW=XB(A.maxW,"0pt"),this.minH=XB(A.minH,"0pt"),this.minW=XB(A.minW,"0pt"),this.name=A.name||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.w=A.w?XB(A.w):"",this.x=XB(A.x,"0pt"),this.y=XB(A.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new Lh,this.event=new Lh,this.field=new Lh,this.setProperty=new Lh}[gB](){return!0}[tB](){return!0}[GB](A){for(const e of this.field.children){if(!e.value){const A=new UE({});e[kC](A),e.value=A}e.value[GB](A)}}[CB](){return this.layout.endsWith("-tb")&&0===this[JC].attempt&&this[JC].numberInLine>0||this[$C]()[CB]()}[cB](){const A=this[_C]();return!!A[cB]()&&(void 0!==this[JC]._isSplittable?this[JC]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[JC]._isSplittable=!1,!1):(!A.layout?.endsWith("-tb")||0===A[JC].numberInLine)&&(this[JC]._isSplittable=!0,!0))}[YC](){return oQ(this)}[bC](A,e){IQ(this,A,e)}[qC](){return cQ(this)}[MB](A){if(yQ(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return zB.EMPTY;zh(this);const e=[],t={id:this[HB],class:[]};tQ(this,t.class),this[JC]||(this[JC]=Object.create(null)),Object.assign(this[JC],{children:e,attributes:t,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,A.width),height:Math.min(this.h||1/0,A.height)},width:0,height:0,prevHeight:0,currentWidth:0});const i=this[cB]();if(i||kQ(this),!CQ(this,A))return zB.FAILURE;const a=new Set(["field"]);if(this.layout.includes("row")){const A=this[_C]().columnWidths;Array.isArray(A)&&A.length>0&&(this[JC].columnWidths=A,this[JC].currentColumn=0)}const s=$h(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),n=["xfaExclgroup"],g=_h(this);g&&n.push(g),iQ(this)&&n.push("xfaPrintOnly"),t.style=s,t.class=n,this.name&&(t.xfaName=this.name),this[wB]();const r="lr-tb"===this.layout||"rl-tb"===this.layout,o=r?2:1;for(;this[JC].attempt<o;this[JC].attempt++){r&&1===this[JC].attempt&&(this[JC].numberInLine=0);const A=this[FC]({filter:a,include:!0});if(A.success)break;if(A.isBreak())return this[yB](),A;if(r&&0===this[JC].attempt&&0===this[JC].numberInLine&&!this[AB]()[JC].noLayoutFailure){this[JC].attempt=o;break}}if(this[yB](),i||FQ(this),this[JC].attempt===o)return i||delete this[JC],zB.FAILURE;let I=0,c=0;this.margin&&(I=this.margin.leftInset+this.margin.rightInset,c=this.margin.topInset+this.margin.bottomInset);const C=Math.max(this[JC].width+I,this.w||0),B=Math.max(this[JC].height+c,this.h||0),h=[this.x,this.y,C,B];""===this.w&&(s.width=Wh(C)),""===this.h&&(s.height=Wh(B));const Q={name:"div",attributes:t,children:e};return wQ(this,t),delete this[JC],zB.success(AQ(this,Q),h)}}class yl extends Mh{constructor(A){super(BQ,"execute"),this.connection=A.connection||"",this.executeType=OB(A.executeType,["import","remerge"]),this.id=A.id||"",this.runAt=OB(A.runAt,["client","both","server"]),this.use=A.use||"",this.usehref=A.usehref||""}}class wl extends Mh{constructor(A){super(BQ,"extras",!0),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||"",this.boolean=new Lh,this.date=new Lh,this.dateTime=new Lh,this.decimal=new Lh,this.exData=new Lh,this.extras=new Lh,this.float=new Lh,this.image=new Lh,this.integer=new Lh,this.text=new Lh,this.time=new Lh}}class Dl extends Mh{constructor(A){super(BQ,"field",!0),this.access=OB(A.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=A.accessKey||"",this.anchorType=OB(A.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=PB({data:A.colSpan,defaultValue:1,validate:A=>A>=1||-1===A}),this.h=A.h?XB(A.h):"",this.hAlign=OB(A.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=A.id||"",this.locale=A.locale||"",this.maxH=XB(A.maxH,"0pt"),this.maxW=XB(A.maxW,"0pt"),this.minH=XB(A.minH,"0pt"),this.minW=XB(A.minW,"0pt"),this.name=A.name||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.relevant=jB(A.relevant),this.rotate=PB({data:A.rotate,defaultValue:0,validate:A=>A%90==0}),this.use=A.use||"",this.usehref=A.usehref||"",this.w=A.w?XB(A.w):"",this.x=XB(A.x,"0pt"),this.y=XB(A.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new Lh(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new Lh,this.connect=new Lh,this.event=new Lh,this.setProperty=new Lh}[gB](){return!0}[GB](A){fQ(this,A)}[MB](A){if(yQ(this),!this.ui){let A;switch(this.ui=new NE({}),this.ui[eB]=this[eB],this[kC](this.ui),this.items.children.length){case 0:A=new bE({}),this.ui.textEdit=A;break;case 1:A=new VQ({}),this.ui.checkButton=A;break;case 2:A=new jQ({}),this.ui.choiceList=A}this.ui[kC](A)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return zB.EMPTY;this.caption&&delete this.caption[JC],this[wB]();const e=this.caption?this.caption[MB](A).html:null,t=this.w,i=this.h;let a=0,s=0;this.margin&&(a=this.margin.leftInset+this.margin.rightInset,s=this.margin.topInset+this.margin.bottomInset);let n=null;if(""===this.w||""===this.h){let e=null,t=null,i=0,g=0;if(this.ui.checkButton)i=g=this.ui.checkButton.size;else{const{w:e,h:t}=Vh(this,A);null!==e?(i=e,g=t):g=function(A,e=!1){let t=null;if(A){const e=TB(A.typeface),i=A[eB].fontFinder.find(e);t=$B(A,i)}if(!t)return{lineHeight:12,lineGap:2,lineNoGap:10};const i=A.size||10,a=t.lineHeight?Math.max(e?0:1.2,t.lineHeight):1.2,s=void 0===t.lineGap?.2:t.lineGap;return{lineHeight:a*i,lineGap:s*i,lineNoGap:Math.max(1,a-s)*i}}(this.font,!0).lineNoGap}if(n=uQ(this.ui[OC]()),i+=n.w,g+=n.h,this.caption){const{w:a,h:s,isBroken:n}=this.caption[OC](A);if(n&&this[_C]()[CB]())return this[yB](),zB.FAILURE;switch(e=a,t=s,this.caption.placement){case"left":case"right":case"inline":e+=i;break;case"top":case"bottom":t+=g}}else e=i,t=g;e&&""===this.w&&(e+=a,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<e?e:this.minW)),t&&""===this.h&&(t+=s,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<t?t:this.minH))}if(this[yB](),zh(this),kQ(this),!CQ(this,A))return this.w=t,this.h=i,this[yB](),zB.FAILURE;FQ(this);const g=$h(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");Oh(this,g);const r=["xfaField"];this.font&&r.push("xfaFont"),iQ(this)&&r.push("xfaPrintOnly");const o={style:g,id:this[HB],class:r};g.margin&&(g.padding=g.margin,delete g.margin),tQ(this,r),this.name&&(o.xfaName=this.name);const I=[],c={name:"div",attributes:o,children:I};wQ(this,o);const C=this.border?this.border[JB]():null,B=jh(this,c,A),h=this.ui[MB]().html;if(!h)return Object.assign(g,C),zB.success(AQ(this,c),B);this[NB]&&(h.children?.[0]?h.children[0].attributes.tabindex=this[NB]:h.attributes.tabindex=this[NB]),h.attributes.style||(h.attributes.style=Object.create(null));let Q=null;if(this.ui.button?(1===h.children.length&&([Q]=h.children.splice(0,1)),Object.assign(h.attributes.style,C)):Object.assign(g,C),I.push(h),this.value)if(this.ui.imageEdit)h.children.push(this.value[MB]().html);else if(!this.ui.button){let A="";if(this.value.exData)A=this.value.exData[xB]();else if(this.value.text)A=this.value.text[OC]();else{const e=this.value[MB]().html;null!==e&&(A=e.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(h.children[0].attributes.maxLength=this.value.text.maxChars),A&&(this.ui.numericEdit&&(A=parseFloat(A),A=isNaN(A)?"":A.toString()),"textarea"===h.children[0].name?h.children[0].attributes.textContent=A:h.children[0].attributes.value=A)}if(!this.ui.imageEdit&&h.children?.[0]&&this.h){n=n||uQ(this.ui[OC]());let e=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){e=this.caption.reserve,e<=0&&(e=this.caption[OC](A).h);const t=this.h-e-s-n.h;h.children[0].attributes.style.height=Wh(t)}else h.children[0].attributes.style.height="100%"}if(Q&&h.children.push(Q),!e)return h.attributes.class&&h.attributes.class.push("xfaLeft"),this.w=t,this.h=i,zB.success(AQ(this,c),B);if(this.ui.button)return g.padding&&delete g.padding,"div"===e.name&&(e.name="span"),h.children.push(e),zB.success(c,B);switch(this.ui.checkButton&&(e.attributes.class[0]="xfaCaptionForCheckButton"),h.attributes.class||(h.attributes.class=[]),h.children.splice(0,0,e),this.caption.placement){case"left":case"inline":h.attributes.class.push("xfaLeft");break;case"right":h.attributes.class.push("xfaRight");break;case"top":h.attributes.class.push("xfaTop");break;case"bottom":h.attributes.class.push("xfaBottom")}return this.w=t,this.h=i,zB.success(AQ(this,c),B)}}class bl extends Mh{constructor(A){super(BQ,"fill",!0),this.id=A.id||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[JB](){const A=this[$C](),e=A[$C]()[$C](),t=Object.create(null);let i="color",a=i;A instanceof vQ&&(i="background-color",a="background",e instanceof NE&&(t.backgroundColor="white")),(A instanceof oE||A instanceof NQ)&&(i=a="fill",t.fill="white");for(const A of Object.getOwnPropertyNames(this)){if("extras"===A||"color"===A)continue;const e=this[A];if(!(e instanceof Mh))continue;const s=e[JB](this.color);return s&&(t[s.startsWith("#")?i:a]=s),t}if(this.color?.value){const A=this.color[JB]();t[A.startsWith("#")?i:a]=A}return t}}class kl extends Mh{constructor(A){super(BQ,"filter",!0),this.addRevocationInfo=OB(A.addRevocationInfo,["","required","optional","none"]),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||"",this.version=PB({data:this.version,defaultValue:5,validate:A=>A>=1&&A<=5}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}}class Fl extends Yh{constructor(A){super(BQ,"float"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){const A=parseFloat(this[UC].trim());this[UC]=isNaN(A)?null:A}[MB](A){return bQ(null!==this[UC]?this[UC].toString():"")}}class Sl extends Mh{constructor(A){super(BQ,"font",!0),this.baselineShift=XB(A.baselineShift),this.fontHorizontalScale=WB({data:A.fontHorizontalScale,defaultValue:100,validate:A=>A>=0}),this.fontVerticalScale=WB({data:A.fontVerticalScale,defaultValue:100,validate:A=>A>=0}),this.id=A.id||"",this.kerningMode=OB(A.kerningMode,["none","pair"]),this.letterSpacing=XB(A.letterSpacing,"0"),this.lineThrough=PB({data:A.lineThrough,defaultValue:0,validate:A=>1===A||2===A}),this.lineThroughPeriod=OB(A.lineThroughPeriod,["all","word"]),this.overline=PB({data:A.overline,defaultValue:0,validate:A=>1===A||2===A}),this.overlinePeriod=OB(A.overlinePeriod,["all","word"]),this.posture=OB(A.posture,["normal","italic"]),this.size=XB(A.size,"10pt"),this.typeface=A.typeface||"Courier",this.underline=PB({data:A.underline,defaultValue:0,validate:A=>1===A||2===A}),this.underlinePeriod=OB(A.underlinePeriod,["all","word"]),this.use=A.use||"",this.usehref=A.usehref||"",this.weight=OB(A.weight,["normal","bold"]),this.extras=null,this.fill=null}[SC](A){super[SC](A),this[eB].usedTypefaces.add(this.typeface)}[JB](){const A=$h(this,"fill"),e=A.color;return e&&("#000000"===e?delete A.color:e.startsWith("#")||(A.background=e,A.backgroundClip="text",A.color="transparent")),this.baselineShift&&(A.verticalAlign=Wh(this.baselineShift)),A.fontKerning="none"===this.kerningMode?"none":"normal",A.letterSpacing=Wh(this.letterSpacing),0!==this.lineThrough&&(A.textDecoration="line-through",2===this.lineThrough&&(A.textDecorationStyle="double")),0!==this.overline&&(A.textDecoration="overline",2===this.overline&&(A.textDecorationStyle="double")),A.fontStyle=this.posture,A.fontSize=Wh(.99*this.size),nQ(this,this,this[eB].fontFinder,A),0!==this.underline&&(A.textDecoration="underline",2===this.underline&&(A.textDecorationStyle="double")),A.fontWeight=this.weight,A}}class Rl extends Mh{constructor(A){super(BQ,"format",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.picture=null}}class Gl extends Kh{constructor(A){super(BQ,"handler"),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||""}}class Nl extends Mh{constructor(A){super(BQ,"hyphenation"),this.excludeAllCaps=PB({data:A.excludeAllCaps,defaultValue:0,validate:A=>1===A}),this.excludeInitialCap=PB({data:A.excludeInitialCap,defaultValue:0,validate:A=>1===A}),this.hyphenate=PB({data:A.hyphenate,defaultValue:0,validate:A=>1===A}),this.id=A.id||"",this.pushCharacterCount=PB({data:A.pushCharacterCount,defaultValue:3,validate:A=>A>=0}),this.remainCharacterCount=PB({data:A.remainCharacterCount,defaultValue:3,validate:A=>A>=0}),this.use=A.use||"",this.usehref=A.usehref||"",this.wordCharacterCount=PB({data:A.wordCharacterCount,defaultValue:7,validate:A=>A>=0})}}class xl extends Kh{constructor(A){super(BQ,"image"),this.aspect=OB(A.aspect,["fit","actual","height","none","width"]),this.contentType=A.contentType||"",this.href=A.href||"",this.id=A.id||"",this.name=A.name||"",this.transferEncoding=OB(A.transferEncoding,["base64","none","package"]),this.use=A.use||"",this.usehref=A.usehref||""}[MB](){if(this.contentType&&!lQ.has(this.contentType.toLowerCase()))return zB.EMPTY;let A=this[eB].images&&this[eB].images.get(this.href);if(!A&&(this.href||!this[UC]))return zB.EMPTY;if(A||"base64"!==this.transferEncoding||(A=pt(atob(this[UC]))),!A)return zB.EMPTY;if(!this.contentType){for(const[e,t]of EQ)if(A.length>e.length&&e.every((e,t)=>e===A[t])){this.contentType=t;break}if(!this.contentType)return zB.EMPTY}const e=new Blob([A],{type:this.contentType});let t;switch(this.aspect){case"fit":case"actual":break;case"height":t={height:"100%",objectFit:"fill"};break;case"none":t={width:"100%",height:"100%",objectFit:"fill"};break;case"width":t={width:"100%",objectFit:"fill"}}const i=this[$C]();return zB.success({name:"img",attributes:{class:["xfaImage"],style:t,src:URL.createObjectURL(e),alt:i?DQ(i[$C]()):null}})}}class Ul extends Mh{constructor(A){super(BQ,"imageEdit",!0),this.data=OB(A.data,["link","embed"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.extras=null,this.margin=null}[MB](A){return"embed"===this.data?zB.success({name:"div",children:[],attributes:{}}):zB.EMPTY}}class Ml extends Yh{constructor(A){super(BQ,"integer"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){const A=parseInt(this[UC].trim(),10);this[UC]=isNaN(A)?null:A}[MB](A){return bQ(null!==this[UC]?this[UC].toString():"")}}class Ll extends Mh{constructor(A){super(BQ,"issuers",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.certificate=new Lh}}class Jl extends Mh{constructor(A){super(BQ,"items",!0),this.id=A.id||"",this.name=A.name||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.ref=A.ref||"",this.save=PB({data:A.save,defaultValue:0,validate:A=>1===A}),this.use=A.use||"",this.usehref=A.usehref||"",this.boolean=new Lh,this.date=new Lh,this.dateTime=new Lh,this.decimal=new Lh,this.exData=new Lh,this.float=new Lh,this.image=new Lh,this.integer=new Lh,this.text=new Lh,this.time=new Lh}[MB](){const A=[];for(const e of this[VC]())A.push(e[xB]());return zB.success(A)}}class Hl extends Mh{constructor(A){super(BQ,"keep",!0),this.id=A.id||"";const e=["none","contentArea","pageArea"];this.intact=OB(A.intact,e),this.next=OB(A.next,e),this.previous=OB(A.previous,e),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}}class Yl extends Mh{constructor(A){super(BQ,"keyUsage");const e=["","yes","no"];this.crlSign=OB(A.crlSign,e),this.dataEncipherment=OB(A.dataEncipherment,e),this.decipherOnly=OB(A.decipherOnly,e),this.digitalSignature=OB(A.digitalSignature,e),this.encipherOnly=OB(A.encipherOnly,e),this.id=A.id||"",this.keyAgreement=OB(A.keyAgreement,e),this.keyCertSign=OB(A.keyCertSign,e),this.keyEncipherment=OB(A.keyEncipherment,e),this.nonRepudiation=OB(A.nonRepudiation,e),this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||""}}class vl extends Mh{constructor(A){super(BQ,"line",!0),this.hand=OB(A.hand,["even","left","right"]),this.id=A.id||"",this.slope=OB(A.slope,["\\","/"]),this.use=A.use||"",this.usehref=A.usehref||"",this.edge=null}[MB](){const A=this[$C]()[$C](),e=this.edge||new cl({}),t=e[JB](),i=Object.create(null),a="visible"===e.presence?e.thickness:0;let s,n,g,r;i.strokeWidth=Wh(a),i.stroke=t.color;let o="100%",I="100%";A.w<=a?([s,n,g,r]=["50%",0,"50%","100%"],o=i.strokeWidth):A.h<=a?([s,n,g,r]=[0,"50%","100%","50%"],I=i.strokeWidth):"\\"===this.slope?[s,n,g,r]=[0,0,"100%","100%"]:[s,n,g,r]=[0,"100%","100%",0];const c={name:"svg",children:[{name:"line",attributes:{xmlns:hQ,x1:s,y1:n,x2:g,y2:r,style:i}}],attributes:{xmlns:hQ,width:o,height:I,style:{overflow:"visible"}}};return dQ(A)?zB.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[c]}):(c.attributes.style.position="absolute",zB.success(c))}}class Kl extends Mh{constructor(A){super(BQ,"linear",!0),this.id=A.id||"",this.type=OB(A.type,["toRight","toBottom","toLeft","toTop"]),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null}[JB](A){A=A?A[JB]():"#FFFFFF";return`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${A}, ${this.color?this.color[JB]():"#000000"})`}}class ql extends Yh{constructor(A){super(BQ,"lockDocument"),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||""}[HC](){this[UC]=OB(this[UC],["auto","0","1"])}}class Tl extends Mh{constructor(A){super(BQ,"manifest",!0),this.action=OB(A.action,["include","all","exclude"]),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.ref=new Lh}}class Pl extends Mh{constructor(A){super(BQ,"margin",!0),this.bottomInset=XB(A.bottomInset,"0"),this.id=A.id||"",this.leftInset=XB(A.leftInset,"0"),this.rightInset=XB(A.rightInset,"0"),this.topInset=XB(A.topInset,"0"),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}[JB](){return{margin:Wh(this.topInset)+" "+Wh(this.rightInset)+" "+Wh(this.bottomInset)+" "+Wh(this.leftInset)}}}class Wl extends Mh{constructor(A){super(BQ,"mdp"),this.id=A.id||"",this.permissions=PB({data:A.permissions,defaultValue:2,validate:A=>1===A||3===A}),this.signatureType=OB(A.signatureType,["filler","author"]),this.use=A.use||"",this.usehref=A.usehref||""}}class Zl extends Mh{constructor(A){super(BQ,"medium"),this.id=A.id||"",this.imagingBBox=function(A){const e=-1;if(!A)return{x:e,y:e,width:e,height:e};const t=A.trim().split(/\s*,\s*/).map(A=>XB(A,"-1"));if(t.length<4||t[2]<0||t[3]<0)return{x:e,y:e,width:e,height:e};const[i,a,s,n]=t;return{x:i,y:a,width:s,height:n}}(A.imagingBBox),this.long=XB(A.long),this.orientation=OB(A.orientation,["portrait","landscape"]),this.short=XB(A.short),this.stock=A.stock||"",this.trayIn=OB(A.trayIn,["auto","delegate","pageFront"]),this.trayOut=OB(A.trayOut,["auto","delegate"]),this.use=A.use||"",this.usehref=A.usehref||""}}class Ol extends Mh{constructor(A){super(BQ,"message",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.text=new Lh}}class Xl extends Mh{constructor(A){super(BQ,"numericEdit",!0),this.hScrollPolicy=OB(A.hScrollPolicy,["auto","off","on"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[MB](A){const e=$h(this,"border","font","margin"),t=this[$C]()[$C](),i={name:"input",attributes:{type:"text",fieldId:t[HB],dataId:t[MC]?.[HB]||t[HB],class:["xfaTextfield"],style:e,"aria-label":DQ(t),"aria-required":!1}};return mQ(t)&&(i.attributes["aria-required"]=!0,i.attributes.required=!0),zB.success({name:"label",attributes:{class:["xfaLabel"]},children:[i]})}}class Vl extends Mh{constructor(A){super(BQ,"occur",!0),this.id=A.id||"",this.initial=""!==A.initial?PB({data:A.initial,defaultValue:"",validate:A=>!0}):"",this.max=""!==A.max?PB({data:A.max,defaultValue:1,validate:A=>!0}):"",this.min=""!==A.min?PB({data:A.min,defaultValue:1,validate:A=>!0}):"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}[SC](){const A=this[$C](),e=this.min;""===this.min&&(this.min=A instanceof $l||A instanceof AE?0:1),""===this.max&&(this.max=""===e?A instanceof $l||A instanceof AE?-1:1:this.min),-1!==this.max&&this.max<this.min&&(this.max=this.min),""===this.initial&&(this.initial=A instanceof wE?1:this.min)}}class jl extends Kh{constructor(A){super(BQ,"oid"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class zl extends Mh{constructor(A){super(BQ,"oids",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.oid=new Lh}}class _l extends Mh{constructor(A){super(BQ,"overflow"),this.id=A.id||"",this.leader=A.leader||"",this.target=A.target||"",this.trailer=A.trailer||"",this.use=A.use||"",this.usehref=A.usehref||""}[OC](){if(!this[JC]){const A=this[$C](),e=this[AB](),t=e[FB](this.target,A),i=e[FB](this.leader,A),a=e[FB](this.trailer,A);this[JC]={target:t?.[0]||null,leader:i?.[0]||null,trailer:a?.[0]||null,addLeader:!1,addTrailer:!1}}return this[JC]}}class $l extends Mh{constructor(A){super(BQ,"pageArea",!0),this.blankOrNotBlank=OB(A.blankOrNotBlank,["any","blank","notBlank"]),this.id=A.id||"",this.initialNumber=PB({data:A.initialNumber,defaultValue:1,validate:A=>!0}),this.name=A.name||"",this.numbered=PB({data:A.numbered,defaultValue:1,validate:A=>!0}),this.oddOrEven=OB(A.oddOrEven,["any","even","odd"]),this.pagePosition=OB(A.pagePosition,["any","first","last","only","rest"]),this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new Lh,this.contentArea=new Lh,this.draw=new Lh,this.exclGroup=new Lh,this.field=new Lh,this.subform=new Lh}[hB](){return this[JC]?!this.occur||-1===this.occur.max||this[JC].numberOfUse<this.occur.max:(this[JC]={numberOfUse:0},!0)}[RC](){delete this[JC]}[zC](){this[JC]||(this[JC]={numberOfUse:0});const A=this[$C]();return"orderedOccurrence"===A.relation&&this[hB]()?(this[JC].numberOfUse+=1,this):A[zC]()}[qC](){return this[JC].space||{width:0,height:0}}[MB](){this[JC]||(this[JC]={numberOfUse:1});const A=[];this[JC].children=A;const e=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(e.width=Wh(this.medium.short),e.height=Wh(this.medium.long),this[JC].space={width:this.medium.short,height:this.medium.long},"landscape"===this.medium.orientation){const A=e.width;e.width=e.height,e.height=A,this[JC].space={width:this.medium.long,height:this.medium.short}}}else gt("XFA - No medium specified in pageArea: please file a bug.");return this[FC]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[FC]({filter:new Set(["contentArea"]),include:!0}),zB.success({name:"div",children:A,attributes:{class:["xfaPage"],id:this[HB],style:e,xfaName:this.name}})}}class AE extends Mh{constructor(A){super(BQ,"pageSet",!0),this.duplexImposition=OB(A.duplexImposition,["longEdge","shortEdge"]),this.id=A.id||"",this.name=A.name||"",this.relation=OB(A.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.occur=null,this.pageArea=new Lh,this.pageSet=new Lh}[RC](){for(const A of this.pageArea.children)A[RC]();for(const A of this.pageSet.children)A[RC]()}[hB](){return!this.occur||-1===this.occur.max||this[JC].numberOfUse<this.occur.max}[zC](){if(this[JC]||(this[JC]={numberOfUse:1,pageIndex:-1,pageSetIndex:-1}),"orderedOccurrence"===this.relation){if(this[JC].pageIndex+1<this.pageArea.children.length){this[JC].pageIndex+=1;return this.pageArea.children[this[JC].pageIndex][zC]()}if(this[JC].pageSetIndex+1<this.pageSet.children.length)return this[JC].pageSetIndex+=1,this.pageSet.children[this[JC].pageSetIndex][zC]();if(this[hB]())return this[JC].numberOfUse+=1,this[JC].pageIndex=-1,this[JC].pageSetIndex=-1,this[zC]();const A=this[$C]();return A instanceof AE?A[zC]():(this[RC](),this[zC]())}const A=this[AB]()[JC].pageNumber,e=A%2==0?"even":"odd",t=0===A?"first":"rest";let i=this.pageArea.children.find(A=>A.oddOrEven===e&&A.pagePosition===t);return i||(i=this.pageArea.children.find(A=>"any"===A.oddOrEven&&A.pagePosition===t),i||(i=this.pageArea.children.find(A=>"any"===A.oddOrEven&&"any"===A.pagePosition),i||this.pageArea.children[0]))}}class eE extends Mh{constructor(A){super(BQ,"para",!0),this.hAlign=OB(A.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=A.id||"",this.lineHeight=A.lineHeight?XB(A.lineHeight,"0pt"):"",this.marginLeft=A.marginLeft?XB(A.marginLeft,"0pt"):"",this.marginRight=A.marginRight?XB(A.marginRight,"0pt"):"",this.orphans=PB({data:A.orphans,defaultValue:0,validate:A=>A>=0}),this.preserve=A.preserve||"",this.radixOffset=A.radixOffset?XB(A.radixOffset,"0pt"):"",this.spaceAbove=A.spaceAbove?XB(A.spaceAbove,"0pt"):"",this.spaceBelow=A.spaceBelow?XB(A.spaceBelow,"0pt"):"",this.tabDefault=A.tabDefault?XB(this.tabDefault):"",this.tabStops=(A.tabStops||"").trim().split(/\s+/).map((A,e)=>e%2==1?XB(A):A),this.textIndent=A.textIndent?XB(A.textIndent,"0pt"):"",this.use=A.use||"",this.usehref=A.usehref||"",this.vAlign=OB(A.vAlign,["top","bottom","middle"]),this.widows=PB({data:A.widows,defaultValue:0,validate:A=>A>=0}),this.hyphenation=null}[JB](){const A=$h(this,"hAlign");return""!==this.marginLeft&&(A.paddingLeft=Wh(this.marginLeft)),""!==this.marginRight&&(A.paddingight=Wh(this.marginRight)),""!==this.spaceAbove&&(A.paddingTop=Wh(this.spaceAbove)),""!==this.spaceBelow&&(A.paddingBottom=Wh(this.spaceBelow)),""!==this.textIndent&&(A.textIndent=Wh(this.textIndent),eQ(A)),this.lineHeight>0&&(A.lineHeight=Wh(this.lineHeight)),""!==this.tabDefault&&(A.tabSize=Wh(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(A,this.hyphenatation[JB]()),A}}class tE extends Mh{constructor(A){super(BQ,"passwordEdit",!0),this.hScrollPolicy=OB(A.hScrollPolicy,["auto","off","on"]),this.id=A.id||"",this.passwordChar=A.passwordChar||"*",this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.extras=null,this.margin=null}}class iE extends Mh{constructor(A){super(BQ,"pattern",!0),this.id=A.id||"",this.type=OB(A.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null}[JB](A){A=A?A[JB]():"#FFFFFF";const e=this.color?this.color[JB]():"#000000",t="repeating-linear-gradient",i=`${A},${A} 5px,${e} 5px,${e} 10px`;switch(this.type){case"crossHatch":return`${t}(to top,${i}) ${t}(to right,${i})`;case"crossDiagonal":return`${t}(45deg,${i}) ${t}(-45deg,${i})`;case"diagonalLeft":return`${t}(45deg,${i})`;case"diagonalRight":return`${t}(-45deg,${i})`;case"horizontal":return`${t}(to top,${i})`;case"vertical":return`${t}(to right,${i})`}return""}}class aE extends Kh{constructor(A){super(BQ,"picture"),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||""}}class sE extends Mh{constructor(A){super(BQ,"proto",!0),this.appearanceFilter=new Lh,this.arc=new Lh,this.area=new Lh,this.assist=new Lh,this.barcode=new Lh,this.bindItems=new Lh,this.bookend=new Lh,this.boolean=new Lh,this.border=new Lh,this.break=new Lh,this.breakAfter=new Lh,this.breakBefore=new Lh,this.button=new Lh,this.calculate=new Lh,this.caption=new Lh,this.certificate=new Lh,this.certificates=new Lh,this.checkButton=new Lh,this.choiceList=new Lh,this.color=new Lh,this.comb=new Lh,this.connect=new Lh,this.contentArea=new Lh,this.corner=new Lh,this.date=new Lh,this.dateTime=new Lh,this.dateTimeEdit=new Lh,this.decimal=new Lh,this.defaultUi=new Lh,this.desc=new Lh,this.digestMethod=new Lh,this.digestMethods=new Lh,this.draw=new Lh,this.edge=new Lh,this.encoding=new Lh,this.encodings=new Lh,this.encrypt=new Lh,this.encryptData=new Lh,this.encryption=new Lh,this.encryptionMethod=new Lh,this.encryptionMethods=new Lh,this.event=new Lh,this.exData=new Lh,this.exObject=new Lh,this.exclGroup=new Lh,this.execute=new Lh,this.extras=new Lh,this.field=new Lh,this.fill=new Lh,this.filter=new Lh,this.float=new Lh,this.font=new Lh,this.format=new Lh,this.handler=new Lh,this.hyphenation=new Lh,this.image=new Lh,this.imageEdit=new Lh,this.integer=new Lh,this.issuers=new Lh,this.items=new Lh,this.keep=new Lh,this.keyUsage=new Lh,this.line=new Lh,this.linear=new Lh,this.lockDocument=new Lh,this.manifest=new Lh,this.margin=new Lh,this.mdp=new Lh,this.medium=new Lh,this.message=new Lh,this.numericEdit=new Lh,this.occur=new Lh,this.oid=new Lh,this.oids=new Lh,this.overflow=new Lh,this.pageArea=new Lh,this.pageSet=new Lh,this.para=new Lh,this.passwordEdit=new Lh,this.pattern=new Lh,this.picture=new Lh,this.radial=new Lh,this.reason=new Lh,this.reasons=new Lh,this.rectangle=new Lh,this.ref=new Lh,this.script=new Lh,this.setProperty=new Lh,this.signData=new Lh,this.signature=new Lh,this.signing=new Lh,this.solid=new Lh,this.speak=new Lh,this.stipple=new Lh,this.subform=new Lh,this.subformSet=new Lh,this.subjectDN=new Lh,this.subjectDNs=new Lh,this.submit=new Lh,this.text=new Lh,this.textEdit=new Lh,this.time=new Lh,this.timeStamp=new Lh,this.toolTip=new Lh,this.traversal=new Lh,this.traverse=new Lh,this.ui=new Lh,this.validate=new Lh,this.value=new Lh,this.variables=new Lh}}class nE extends Mh{constructor(A){super(BQ,"radial",!0),this.id=A.id||"",this.type=OB(A.type,["toEdge","toCenter"]),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null}[JB](A){A=A?A[JB]():"#FFFFFF";const e=this.color?this.color[JB]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${A},${e}`:`${e},${A}`})`}}class gE extends Kh{constructor(A){super(BQ,"reason"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class rE extends Mh{constructor(A){super(BQ,"reasons",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.reason=new Lh}}class oE extends Mh{constructor(A){super(BQ,"rectangle",!0),this.hand=OB(A.hand,["even","left","right"]),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.corner=new Lh(4),this.edge=new Lh(4),this.fill=null}[MB](){const A=this.edge.children.length?this.edge.children[0]:new cl({}),e=A[JB](),t=Object.create(null);"visible"===this.fill?.presence?Object.assign(t,this.fill[JB]()):t.fill="transparent",t.strokeWidth=Wh("visible"===A.presence?A.thickness:0),t.stroke=e.color;const i=(this.corner.children.length?this.corner.children[0]:new el({}))[JB](),a={name:"svg",children:[{name:"rect",attributes:{xmlns:hQ,width:"100%",height:"100%",x:0,y:0,rx:i.radius,ry:i.radius,style:t}}],attributes:{xmlns:hQ,style:{overflow:"visible"},width:"100%",height:"100%"}};return dQ(this[$C]()[$C]())?zB.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[a]}):(a.attributes.style.position="absolute",zB.success(a))}}class IE extends Kh{constructor(A){super(BQ,"ref"),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||""}}class cE extends Kh{constructor(A){super(BQ,"script"),this.binding=A.binding||"",this.contentType=A.contentType||"",this.id=A.id||"",this.name=A.name||"",this.runAt=OB(A.runAt,["client","both","server"]),this.use=A.use||"",this.usehref=A.usehref||""}}class CE extends Mh{constructor(A){super(BQ,"setProperty"),this.connection=A.connection||"",this.ref=A.ref||"",this.target=A.target||""}}class BE extends Mh{constructor(A){super(BQ,"signData",!0),this.id=A.id||"",this.operation=OB(A.operation,["sign","clear","verify"]),this.ref=A.ref||"",this.target=A.target||"",this.use=A.use||"",this.usehref=A.usehref||"",this.filter=null,this.manifest=null}}class hE extends Mh{constructor(A){super(BQ,"signature",!0),this.id=A.id||"",this.type=OB(A.type,["PDF1.3","PDF1.6"]),this.use=A.use||"",this.usehref=A.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}}class QE extends Mh{constructor(A){super(BQ,"signing",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.certificate=new Lh}}class lE extends Mh{constructor(A){super(BQ,"solid",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null}[JB](A){return A?A[JB]():"#FFFFFF"}}class EE extends Kh{constructor(A){super(BQ,"speak"),this.disable=PB({data:A.disable,defaultValue:0,validate:A=>1===A}),this.id=A.id||"",this.priority=OB(A.priority,["custom","caption","name","toolTip"]),this.rid=A.rid||"",this.use=A.use||"",this.usehref=A.usehref||""}}class uE extends Mh{constructor(A){super(BQ,"stipple",!0),this.id=A.id||"",this.rate=PB({data:A.rate,defaultValue:50,validate:A=>A>=0&&A<=100}),this.use=A.use||"",this.usehref=A.usehref||"",this.color=null,this.extras=null}[JB](A){const e=this.rate/100;return bt.makeHexColor(Math.round(A.value.r*(1-e)+this.value.r*e),Math.round(A.value.g*(1-e)+this.value.g*e),Math.round(A.value.b*(1-e)+this.value.b*e))}}class dE extends Mh{constructor(A){super(BQ,"subform",!0),this.access=OB(A.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=PB({data:A.allowMacro,defaultValue:0,validate:A=>1===A}),this.anchorType=OB(A.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=PB({data:A.colSpan,defaultValue:1,validate:A=>A>=1||-1===A}),this.columnWidths=(A.columnWidths||"").trim().split(/\s+/).map(A=>"-1"===A?-1:XB(A)),this.h=A.h?XB(A.h):"",this.hAlign=OB(A.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=A.id||"",this.layout=OB(A.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=A.locale||"",this.maxH=XB(A.maxH,"0pt"),this.maxW=XB(A.maxW,"0pt"),this.mergeMode=OB(A.mergeMode,["consumeData","matchTemplate"]),this.minH=XB(A.minH,"0pt"),this.minW=XB(A.minW,"0pt"),this.name=A.name||"",this.presence=OB(A.presence,["visible","hidden","inactive","invisible"]),this.relevant=jB(A.relevant),this.restoreState=OB(A.restoreState,["manual","auto"]),this.scope=OB(A.scope,["name","none"]),this.use=A.use||"",this.usehref=A.usehref||"",this.w=A.w?XB(A.w):"",this.x=XB(A.x,"0pt"),this.y=XB(A.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new Lh,this.breakAfter=new Lh,this.breakBefore=new Lh,this.connect=new Lh,this.draw=new Lh,this.event=new Lh,this.exObject=new Lh,this.exclGroup=new Lh,this.field=new Lh,this.proto=new Lh,this.setProperty=new Lh,this.subform=new Lh,this.subformSet=new Lh}[_C](){const A=this[$C]();return A instanceof fE?A[_C]():A}[gB](){return!0}[CB](){return this.layout.endsWith("-tb")&&0===this[JC].attempt&&this[JC].numberInLine>0||this[$C]()[CB]()}*[jC](){yield*pQ(this)}[YC](){return oQ(this)}[bC](A,e){IQ(this,A,e)}[qC](){return cQ(this)}[cB](){const A=this[_C]();return!!A[cB]()&&(void 0!==this[JC]._isSplittable?this[JC]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[JC]._isSplittable=!1,!1):(!A.layout?.endsWith("-tb")||0===A[JC].numberInLine)&&(this[JC]._isSplittable=!0,!0))}[MB](A){if(yQ(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const A=new qQ({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});A[eB]=this[eB],this[kC](A),this.breakAfter.push(A)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const A=new TQ({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});A[eB]=this[eB],this[kC](A),this.breakBefore.push(A)}if(""!==this.break.overflowTarget){const A=new _l({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});A[eB]=this[eB],this[kC](A),this.overflow.push(A)}this[DB](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return zB.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&gt("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){const A=this.breakBefore.children[0];if(SQ(A))return zB.breakNode(A)}if(this[JC]?.afterBreakAfter)return zB.EMPTY;zh(this);const e=[],t={id:this[HB],class:[]};tQ(this,t.class),this[JC]||(this[JC]=Object.create(null)),Object.assign(this[JC],{children:e,line:null,attributes:t,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,A.width),height:Math.min(this.h||1/0,A.height)},width:0,height:0,prevHeight:0,currentWidth:0});const i=this[AB](),a=i[JC].noLayoutFailure,s=this[cB]();if(s||kQ(this),!CQ(this,A))return zB.FAILURE;const n=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const A=this[_C]().columnWidths;Array.isArray(A)&&A.length>0&&(this[JC].columnWidths=A,this[JC].currentColumn=0)}const g=$h(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),r=["xfaSubform"],o=_h(this);if(o&&r.push(o),t.style=g,t.class=r,this.name&&(t.xfaName=this.name),this.overflow){const e=this.overflow[OC]();e.addLeader&&(e.addLeader=!1,RQ(this,e.leader,A))}this[wB]();const I="lr-tb"===this.layout||"rl-tb"===this.layout,c=I?2:1;for(;this[JC].attempt<c;this[JC].attempt++){I&&1===this[JC].attempt&&(this[JC].numberInLine=0);const A=this[FC]({filter:n,include:!0});if(A.success)break;if(A.isBreak())return this[yB](),A;if(I&&0===this[JC].attempt&&0===this[JC].numberInLine&&!i[JC].noLayoutFailure){this[JC].attempt=c;break}}if(this[yB](),s||FQ(this),i[JC].noLayoutFailure=a,this[JC].attempt===c)return this.overflow&&(this[AB]()[JC].overflowNode=this.overflow),s||delete this[JC],zB.FAILURE;if(this.overflow){const e=this.overflow[OC]();e.addTrailer&&(e.addTrailer=!1,RQ(this,e.trailer,A))}let C=0,B=0;this.margin&&(C=this.margin.leftInset+this.margin.rightInset,B=this.margin.topInset+this.margin.bottomInset);const h=Math.max(this[JC].width+C,this.w||0),Q=Math.max(this[JC].height+B,this.h||0),l=[this.x,this.y,h,Q];if(""===this.w&&(g.width=Wh(h)),""===this.h&&(g.height=Wh(Q)),("0px"===g.width||"0px"===g.height)&&0===e.length)return zB.EMPTY;const E={name:"div",attributes:t,children:e};wQ(this,t);const u=zB.success(AQ(this,E),l);if(this.breakAfter.children.length>=1){const A=this.breakAfter.children[0];if(SQ(A))return this[JC].afterBreakAfter=u,zB.breakNode(A)}return delete this[JC],u}}class fE extends Mh{constructor(A){super(BQ,"subformSet",!0),this.id=A.id||"",this.name=A.name||"",this.relation=OB(A.relation,["ordered","choice","unordered"]),this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new Lh,this.breakBefore=new Lh,this.subform=new Lh,this.subformSet=new Lh}*[jC](){yield*pQ(this)}[_C](){let A=this[$C]();for(;!(A instanceof dE);)A=A[$C]();return A}[gB](){return!0}}class pE extends Yh{constructor(A){super(BQ,"subjectDN"),this.delimiter=A.delimiter||",",this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){this[UC]=new Map(this[UC].split(this.delimiter).map(A=>((A=A.split("=",2))[0]=A[0].trim(),A)))}}class mE extends Mh{constructor(A){super(BQ,"subjectDNs",!0),this.id=A.id||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||"",this.subjectDN=new Lh}}class yE extends Mh{constructor(A){super(BQ,"submit",!0),this.embedPDF=PB({data:A.embedPDF,defaultValue:0,validate:A=>1===A}),this.format=OB(A.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=A.id||"",this.target=A.target||"",this.textEncoding=ZB({data:A.textEncoding?A.textEncoding.toLowerCase():"",defaultValue:"",validate:A=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(A)||A.match(/iso-8859-\d{2}/)}),this.use=A.use||"",this.usehref=A.usehref||"",this.xdpContent=A.xdpContent||"",this.encrypt=null,this.encryptData=new Lh,this.signData=new Lh}}class wE extends Mh{constructor(A){super(BQ,"template",!0),this.baseProfile=OB(A.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new Lh}[HC](){0===this.subform.children.length&&gt("XFA - No subforms in template node."),this.subform.children.length>=2&&gt("XFA - Several subforms in template node: please file a bug."),this[NB]=5e3}[cB](){return!0}[FB](A,e){return A.startsWith("#")?[this[iB].get(A.slice(1))]:hh(this,e,A,!0,!0)}*[UB](){if(!this.subform.children.length)return zB.success({name:"div",children:[]});this[JC]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const A=this.subform.children[0];A.pageSet[RC]();const e=A.pageSet.pageArea.children,t={name:"div",children:[]};let i=null,a=null,s=null;if(A.breakBefore.children.length>=1?(a=A.breakBefore.children[0],s=a.target):A.subform.children.length>=1&&A.subform.children[0].breakBefore.children.length>=1?(a=A.subform.children[0].breakBefore.children[0],s=a.target):A.break?.beforeTarget?(a=A.break,s=a.beforeTarget):A.subform.children.length>=1&&A.subform.children[0].break?.beforeTarget&&(a=A.subform.children[0].break,s=a.beforeTarget),a){const A=this[FB](s,a[$C]());A instanceof $l&&(i=A,a[JC]={})}i||(i=e[0]),i[JC]={numberOfUse:1};const n=i[$C]();let g;n[JC]={numberOfUse:1,pageIndex:n.pageArea.children.indexOf(i),pageSetIndex:0};let r=null,o=null,I=!0,c=0,C=0;for(;;){if(I)c=0;else if(t.children.pop(),3===++c)return gt("XFA - Something goes wrong: please file a bug."),t;g=null,this[JC].currentPageArea=i;const e=i[MB]().html;t.children.push(e),r&&(this[JC].noLayoutFailure=!0,e.children.push(r[MB](i[JC].space).html),r=null),o&&(this[JC].noLayoutFailure=!0,e.children.push(o[MB](i[JC].space).html),o=null);const a=i.contentArea.children,s=e.children.filter(A=>A.attributes.class.includes("xfaContentarea"));I=!1,this[JC].firstUnsplittable=null,this[JC].noLayoutFailure=!1;const n=e=>{const t=A[YC]();t&&(I||=t.children?.length>0,s[e].children.push(t))};for(let e=C,i=a.length;e<i;e++){const i=this[JC].currentContentArea=a[e],c={width:i.w,height:i.h};C=0,r&&(s[e].children.push(r[MB](c).html),r=null),o&&(s[e].children.push(o[MB](c).html),o=null);const B=A[MB](c);if(B.success)return B.html?(I||=B.html.children?.length>0,s[e].children.push(B.html)):!I&&t.children.length>1&&t.children.pop(),t;if(B.isBreak()){const A=B.breakNode;if(n(e),"auto"===A.targetType)continue;A.leader&&(r=this[FB](A.leader,A[$C]()),r=r?r[0]:null),A.trailer&&(o=this[FB](A.trailer,A[$C]()),o=o?o[0]:null),"pageArea"===A.targetType?(g=A[JC].target,e=1/0):A[JC].target?(g=A[JC].target,C=A[JC].index+1,e=1/0):e=A[JC].index;continue}if(this[JC].overflowNode){const A=this[JC].overflowNode;this[JC].overflowNode=null;const t=A[OC](),i=t.target;t.addLeader=null!==t.leader,t.addTrailer=null!==t.trailer,n(e);const s=e;if(e=1/0,i instanceof $l)g=i;else if(i instanceof Al){const A=a.indexOf(i);-1!==A?A>s?e=A-1:C=A:(g=i[$C](),C=g.contentArea.children.indexOf(i))}continue}n(e)}this[JC].pageNumber+=1,g&&(g[hB]()?g[JC].numberOfUse+=1:g=null),i=g||i[zC](),yield null}}}class DE extends Yh{constructor(A){super(BQ,"text"),this.id=A.id||"",this.maxChars=PB({data:A.maxChars,defaultValue:0,validate:A=>A>=0}),this.name=A.name||"",this.rid=A.rid||"",this.use=A.use||"",this.usehref=A.usehref||""}[DC](){return!0}[dB](A){return A[lB]===vB.xhtml.id?(this[UC]=A,!0):(gt(`XFA - Invalid content in Text: ${A[EB]}.`),!1)}[pB](A){this[UC]instanceof Mh||super[pB](A)}[HC](){"string"==typeof this[UC]&&(this[UC]=this[UC].replaceAll("\r\n","\n"))}[OC](){return"string"==typeof this[UC]?this[UC].split(/[\u2029\u2028\n]/).reduce((A,e)=>(e&&A.push(e),A),[]).join("\n"):this[UC][xB]()}[MB](A){if("string"==typeof this[UC]){const A=bQ(this[UC]).html;return this[UC].includes("\u2029")?(A.name="div",A.children=[],this[UC].split("\u2029").map(A=>A.split(/[\u2028\n]/).reduce((A,e)=>(A.push({name:"span",value:e},{name:"br"}),A),[])).forEach(e=>{A.children.push({name:"p",children:e})})):/[\u2028\n]/.test(this[UC])&&(A.name="div",A.children=[],this[UC].split(/[\u2028\n]/).forEach(e=>{A.children.push({name:"span",value:e},{name:"br"})})),zB.success(A)}return this[UC][MB](A)}}class bE extends Mh{constructor(A){super(BQ,"textEdit",!0),this.allowRichText=PB({data:A.allowRichText,defaultValue:0,validate:A=>1===A}),this.hScrollPolicy=OB(A.hScrollPolicy,["auto","off","on"]),this.id=A.id||"",this.multiLine=PB({data:A.multiLine,defaultValue:"",validate:A=>0===A||1===A}),this.use=A.use||"",this.usehref=A.usehref||"",this.vScrollPolicy=OB(A.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[MB](A){const e=$h(this,"border","font","margin");let t;const i=this[$C]()[$C]();return""===this.multiLine&&(this.multiLine=i instanceof Il?1:0),t=1===this.multiLine?{name:"textarea",attributes:{dataId:i[MC]?.[HB]||i[HB],fieldId:i[HB],class:["xfaTextfield"],style:e,"aria-label":DQ(i),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:i[MC]?.[HB]||i[HB],fieldId:i[HB],class:["xfaTextfield"],style:e,"aria-label":DQ(i),"aria-required":!1}},mQ(i)&&(t.attributes["aria-required"]=!0,t.attributes.required=!0),zB.success({name:"label",attributes:{class:["xfaLabel"]},children:[t]})}}class kE extends Kh{constructor(A){super(BQ,"time"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}[HC](){const A=this[UC].trim();this[UC]=A?new Date(A):null}[MB](A){return bQ(this[UC]?this[UC].toString():"")}}class FE extends Mh{constructor(A){super(BQ,"timeStamp"),this.id=A.id||"",this.server=A.server||"",this.type=OB(A.type,["optional","required"]),this.use=A.use||"",this.usehref=A.usehref||""}}class SE extends Kh{constructor(A){super(BQ,"toolTip"),this.id=A.id||"",this.rid=A.rid||"",this.use=A.use||"",this.usehref=A.usehref||""}}class RE extends Mh{constructor(A){super(BQ,"traversal",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.traverse=new Lh}}class GE extends Mh{constructor(A){super(BQ,"traverse",!0),this.id=A.id||"",this.operation=OB(A.operation,["next","back","down","first","left","right","up"]),this.ref=A.ref||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[BB](){return!1}}class NE extends Mh{constructor(A){super(BQ,"ui",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[OC](){if(void 0===this[JC]){for(const A of Object.getOwnPropertyNames(this)){if("extras"===A||"picture"===A)continue;const e=this[A];if(e instanceof Mh)return this[JC]=e,e}this[JC]=null}return this[JC]}[MB](A){const e=this[OC]();return e?e[MB](A):zB.EMPTY}}class xE extends Mh{constructor(A){super(BQ,"validate",!0),this.formatTest=OB(A.formatTest,["warning","disabled","error"]),this.id=A.id||"",this.nullTest=OB(A.nullTest,["disabled","error","warning"]),this.scriptTest=OB(A.scriptTest,["error","disabled","warning"]),this.use=A.use||"",this.usehref=A.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class UE extends Mh{constructor(A){super(BQ,"value",!0),this.id=A.id||"",this.override=PB({data:A.override,defaultValue:0,validate:A=>1===A}),this.relevant=jB(A.relevant),this.use=A.use||"",this.usehref=A.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[GB](A){const e=this[$C]();if(e instanceof Dl&&e.ui?.imageEdit)return this.image||(this.image=new xl({}),this[kC](this.image)),void(this.image[UC]=A[UC]);const t=A[EB];if(null===this[t]){for(const A of Object.getOwnPropertyNames(this)){const e=this[A];e instanceof Mh&&(this[A]=null,this[DB](e))}this[A[EB]]=A,this[kC](A)}else this[t][UC]=A[UC]}[xB](){if(this.exData)return"string"==typeof this.exData[UC]?this.exData[UC].trim():this.exData[UC][xB]().trim();for(const A of Object.getOwnPropertyNames(this)){if("image"===A)continue;const e=this[A];if(e instanceof Mh)return(e[UC]||"").toString().trim()}return null}[MB](A){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];if(t instanceof Mh)return t[MB](A)}return zB.EMPTY}}class ME extends Mh{constructor(A){super(BQ,"variables",!0),this.id=A.id||"",this.use=A.use||"",this.usehref=A.usehref||"",this.boolean=new Lh,this.date=new Lh,this.dateTime=new Lh,this.decimal=new Lh,this.exData=new Lh,this.float=new Lh,this.image=new Lh,this.integer=new Lh,this.manifest=new Lh,this.script=new Lh,this.text=new Lh,this.time=new Lh}[BB](){return!0}}class LE{static[YB](A,e){if(LE.hasOwnProperty(A)){const t=LE[A](e);return t[RB](e),t}}static appearanceFilter(A){return new GQ(A)}static arc(A){return new NQ(A)}static area(A){return new xQ(A)}static assist(A){return new UQ(A)}static barcode(A){return new MQ(A)}static bind(A){return new LQ(A)}static bindItems(A){return new JQ(A)}static bookend(A){return new HQ(A)}static boolean(A){return new YQ(A)}static border(A){return new vQ(A)}static break(A){return new KQ(A)}static breakAfter(A){return new qQ(A)}static breakBefore(A){return new TQ(A)}static button(A){return new PQ(A)}static calculate(A){return new WQ(A)}static caption(A){return new ZQ(A)}static certificate(A){return new OQ(A)}static certificates(A){return new XQ(A)}static checkButton(A){return new VQ(A)}static choiceList(A){return new jQ(A)}static color(A){return new zQ(A)}static comb(A){return new _Q(A)}static connect(A){return new $Q(A)}static contentArea(A){return new Al(A)}static corner(A){return new el(A)}static date(A){return new tl(A)}static dateTime(A){return new il(A)}static dateTimeEdit(A){return new al(A)}static decimal(A){return new sl(A)}static defaultUi(A){return new nl(A)}static desc(A){return new gl(A)}static digestMethod(A){return new rl(A)}static digestMethods(A){return new ol(A)}static draw(A){return new Il(A)}static edge(A){return new cl(A)}static encoding(A){return new Cl(A)}static encodings(A){return new Bl(A)}static encrypt(A){return new hl(A)}static encryptData(A){return new Ql(A)}static encryption(A){return new ll(A)}static encryptionMethod(A){return new El(A)}static encryptionMethods(A){return new ul(A)}static event(A){return new dl(A)}static exData(A){return new fl(A)}static exObject(A){return new pl(A)}static exclGroup(A){return new ml(A)}static execute(A){return new yl(A)}static extras(A){return new wl(A)}static field(A){return new Dl(A)}static fill(A){return new bl(A)}static filter(A){return new kl(A)}static float(A){return new Fl(A)}static font(A){return new Sl(A)}static format(A){return new Rl(A)}static handler(A){return new Gl(A)}static hyphenation(A){return new Nl(A)}static image(A){return new xl(A)}static imageEdit(A){return new Ul(A)}static integer(A){return new Ml(A)}static issuers(A){return new Ll(A)}static items(A){return new Jl(A)}static keep(A){return new Hl(A)}static keyUsage(A){return new Yl(A)}static line(A){return new vl(A)}static linear(A){return new Kl(A)}static lockDocument(A){return new ql(A)}static manifest(A){return new Tl(A)}static margin(A){return new Pl(A)}static mdp(A){return new Wl(A)}static medium(A){return new Zl(A)}static message(A){return new Ol(A)}static numericEdit(A){return new Xl(A)}static occur(A){return new Vl(A)}static oid(A){return new jl(A)}static oids(A){return new zl(A)}static overflow(A){return new _l(A)}static pageArea(A){return new $l(A)}static pageSet(A){return new AE(A)}static para(A){return new eE(A)}static passwordEdit(A){return new tE(A)}static pattern(A){return new iE(A)}static picture(A){return new aE(A)}static proto(A){return new sE(A)}static radial(A){return new nE(A)}static reason(A){return new gE(A)}static reasons(A){return new rE(A)}static rectangle(A){return new oE(A)}static ref(A){return new IE(A)}static script(A){return new cE(A)}static setProperty(A){return new CE(A)}static signData(A){return new BE(A)}static signature(A){return new hE(A)}static signing(A){return new QE(A)}static solid(A){return new lE(A)}static speak(A){return new EE(A)}static stipple(A){return new uE(A)}static subform(A){return new dE(A)}static subformSet(A){return new fE(A)}static subjectDN(A){return new pE(A)}static subjectDNs(A){return new mE(A)}static submit(A){return new yE(A)}static template(A){return new wE(A)}static text(A){return new DE(A)}static textEdit(A){return new bE(A)}static time(A){return new kE(A)}static timeStamp(A){return new FE(A)}static toolTip(A){return new SE(A)}static traversal(A){return new RE(A)}static traverse(A){return new GE(A)}static ui(A){return new NE(A)}static validate(A){return new xE(A)}static value(A){return new UE(A)}static variables(A){return new ME(A)}}const JE=vB.datasets.id;function HE(A){const e=new DE({});return e[UC]=A,e}class YE{constructor(A){this.root=A,this.datasets=A.datasets,this.data=A.datasets?.data||new Hh(vB.datasets.id,"data"),this.emptyMerge=0===this.data[VC]().length,this.root.form=this.form=A.template[NC]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(A,e,t){if(A[MC]=e,A[tB]())if(e[rB]()){const t=e[ZC]();A[GB](HE(t))}else if(A instanceof Dl&&"multiSelect"===A.ui?.choiceList?.open){const t=e[VC]().map(A=>A[UC].trim()).join("\n");A[GB](HE(t))}else this._isConsumeData()&&gt("XFA - Nodes haven't the same type.");else!e[rB]()||this._isMatchTemplate()?this._bindElement(A,e):gt("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(A,e,t,i){if(!A)return null;let a,s;for(let i=0;i<3;i++){for(a=t[XC](A,!1,!0);s=a.next().value,s;)if(e===s[rB]())return s;if(t[lB]===vB.datasets.id&&"data"===t[EB])break;t=t[$C]()}return i?(a=this.data[XC](A,!0,!1),s=a.next().value,s||(a=this.data[vC](A,!0),s=a.next().value,s?.[rB]()?s:null)):null}_setProperties(A,e){if(A.hasOwnProperty("setProperty"))for(const{ref:t,target:i,connection:a}of A.setProperty.children){if(a)continue;if(!t)continue;const s=hh(this.root,e,t,!1,!1);if(!s){gt(`XFA - Invalid reference: ${t}.`);continue}const[n]=s;if(!n[oB](this.data)){gt("XFA - Invalid node: must be a data node.");continue}const g=hh(this.root,A,i,!1,!1);if(!g){gt(`XFA - Invalid target: ${i}.`);continue}const[r]=g;if(!r[oB](A)){gt("XFA - Invalid target: must be a property or subproperty.");continue}const o=r[$C]();if(r instanceof CE||o instanceof CE){gt("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(r instanceof JQ||o instanceof JQ){gt("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const I=n[xB](),c=r[EB];if(r instanceof Jh){const A=Object.create(null);A[c]=I;const e=Reflect.construct(Object.getPrototypeOf(o).constructor,[A]);o[c]=e[c];continue}r.hasOwnProperty(UC)?(r[MC]=n,r[UC]=I,r[HC]()):gt("XFA - Invalid node to use in setProperty")}}_bindItems(A,e){if(!A.hasOwnProperty("items")||!A.hasOwnProperty("bindItems")||A.bindItems.isEmpty())return;for(const e of A.items.children)A[DB](e);A.items.clear();const t=new Jl({}),i=new Jl({});A[kC](t),A.items.push(t),A[kC](i),A.items.push(i);for(const{ref:a,labelRef:s,valueRef:n,connection:g}of A.bindItems.children){if(g)continue;if(!a)continue;const A=hh(this.root,e,a,!1,!1);if(A)for(const e of A){if(!e[oB](this.datasets)){gt(`XFA - Invalid ref (${a}): must be a datasets child.`);continue}const A=hh(this.root,e,s,!0,!1);if(!A){gt(`XFA - Invalid label: ${s}.`);continue}const[g]=A;if(!g[oB](this.datasets)){gt("XFA - Invalid label: must be a datasets child.");continue}const r=hh(this.root,e,n,!0,!1);if(!r){gt(`XFA - Invalid value: ${n}.`);continue}const[o]=r;if(!o[oB](this.datasets)){gt("XFA - Invalid value: must be a datasets child.");continue}const I=HE(g[xB]()),c=HE(o[xB]());t[kC](I),t.text.push(I),i[kC](c),i.text.push(c)}else gt(`XFA - Invalid reference: ${a}.`)}}_bindOccurrences(A,e,t){let i;if(e.length>1&&(i=A[NC](),i[DB](i.occur),i.occur=null),this._bindValue(A,e[0],t),this._setProperties(A,e[0]),this._bindItems(A,e[0]),1===e.length)return;const a=A[$C](),s=A[EB],n=a[aB](A);for(let A=1,g=e.length;A<g;A++){const g=e[A],r=i[NC]();a[s].push(r),a[sB](n+A,r),this._bindValue(r,g,t),this._setProperties(r,g),this._bindItems(r,g)}}_createOccurrences(A){if(!this.emptyMerge)return;const{occur:e}=A;if(!e||e.initial<=1)return;const t=A[$C](),i=A[EB];if(!(t[i]instanceof Lh))return;let a;a=A.name?t[i].children.filter(e=>e.name===A.name).length:t[i].children.length;const s=t[aB](A)+1,n=e.initial-a;if(n){const e=A[NC]();e[DB](e.occur),e.occur=null,t[i].push(e),t[sB](s,e);for(let A=1;A<n;A++){const a=e[NC]();t[i].push(a),t[sB](s+A,a)}}}_getOccurInfo(A){const{name:e,occur:t}=A;if(!t||!e)return[1,1];const i=-1===t.max?1/0:t.max;return[t.min,i]}_setAndBind(A,e){this._setProperties(A,e),this._bindItems(A,e),this._bindElement(A,e)}_bindElement(A,e){const t=[];this._createOccurrences(A);for(const i of A[VC]()){if(i[MC])continue;if(void 0===this._mergeMode&&"subform"===i[EB]){this._mergeMode="consumeData"===i.mergeMode;const A=e[VC]();if(A.length>0)this._bindOccurrences(i,[A[0]],null);else if(this.emptyMerge){const A=e[lB]===JE?-1:e[lB],t=i[MC]=new Hh(A,i.name||"root");e[kC](t),this._bindElement(i,t)}continue}if(!i[gB]())continue;let A=!1,a=null,s=null,n=null;if(i.bind){switch(i.bind.match){case"none":this._setAndBind(i,e);continue;case"global":A=!0;break;case"dataRef":if(!i.bind.ref){gt(`XFA - ref is empty in node ${i[EB]}.`),this._setAndBind(i,e);continue}s=i.bind.ref}i.bind.picture&&(a=i.bind.picture[UC])}const[g,r]=this._getOccurInfo(i);if(s){if(n=hh(this.root,e,s,!0,!1),null===n){if(n=Qh(this.data,e,s),!n)continue;this._isConsumeData()&&(n[xC]=!0),this._setAndBind(i,n);continue}this._isConsumeData()&&(n=n.filter(A=>!A[xC])),n.length>r?n=n.slice(0,r):0===n.length&&(n=null),n&&this._isConsumeData()&&n.forEach(A=>{A[xC]=!0})}else{if(!i.name){this._setAndBind(i,e);continue}if(this._isConsumeData()){const t=[];for(;t.length<r;){const a=this._findDataByNameToConsume(i.name,i[tB](),e,A);if(!a)break;a[xC]=!0,t.push(a)}n=t.length>0?t:null}else{if(n=e[XC](i.name,!1,this.emptyMerge).next().value,!n){if(0===g){t.push(i);continue}const A=e[lB]===JE?-1:e[lB];n=i[MC]=new Hh(A,i.name),this.emptyMerge&&(n[xC]=!0),e[kC](n),this._setAndBind(i,n);continue}this.emptyMerge&&(n[xC]=!0),n=[n]}}n?this._bindOccurrences(i,n,a):g>0?this._setAndBind(i,e):t.push(i)}t.forEach(A=>A[$C]()[DB](A))}}class vE{constructor(A,e){this.data=e,this.dataset=A.datasets||null}serialize(A){const e=[[-1,this.data[VC]()]];for(;e.length>0;){const t=e.at(-1),[i,a]=t;if(i+1===a.length){e.pop();continue}const s=a[++t[0]],n=A.get(s[HB]);if(n)s[GB](n);else{const e=s[KC]();for(const t of e.values()){const e=A.get(t[HB]);if(e){t[GB](e);break}}}const g=s[VC]();g.length>0&&e.push([-1,g])}const t=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const A of this.dataset[VC]())"data"!==A[EB]&&A[LB](t);return this.data[LB](t),t.push("</xfa:datasets>"),t.join("")}}const KE=vB.config.id;class qE extends Mh{constructor(A){super(KE,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new Lh}}class TE extends Mh{constructor(A){super(KE,"acrobat7",!0),this.dynamicRender=null}}class PE extends vh{constructor(A){super(KE,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class WE extends vh{constructor(A){super(KE,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class ZE extends Th{constructor(A){super(KE,"addSilentPrint")}}class OE extends Th{constructor(A){super(KE,"addViewerPreferences")}}class XE extends Ph{constructor(A){super(KE,"adjustData")}}class VE extends qh{constructor(A){super(KE,"adobeExtensionLevel",0,A=>A>=1&&A<=8)}}class jE extends Mh{constructor(A){super(KE,"agent",!0),this.name=A.name?A.name.trim():"",this.common=new Lh}}class zE extends Yh{constructor(A){super(KE,"alwaysEmbed")}}class _E extends Kh{constructor(A){super(KE,"amd")}}class $E extends Mh{constructor(A){super(KE,"area"),this.level=PB({data:A.level,defaultValue:0,validate:A=>A>=1&&A<=3}),this.name=OB(A.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class Au extends vh{constructor(A){super(KE,"attributes",["preserve","delegate","ignore"])}}class eu extends vh{constructor(A){super(KE,"autoSave",["disabled","enabled"])}}class tu extends Kh{constructor(A){super(KE,"base")}}class iu extends Mh{constructor(A){super(KE,"batchOutput"),this.format=OB(A.format,["none","concat","zip","zipCompress"])}}class au extends Yh{constructor(A){super(KE,"behaviorOverride")}[HC](){this[UC]=new Map(this[UC].trim().split(/\s+/).filter(A=>A.includes(":")).map(A=>A.split(":",2)))}}class su extends Mh{constructor(A){super(KE,"cache",!0),this.templateCache=null}}class nu extends Th{constructor(A){super(KE,"change")}}class gu extends Mh{constructor(A){super(KE,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new Lh}}class ru extends Mh{constructor(A){super(KE,"compress"),this.scope=OB(A.scope,["imageOnly","document"])}}class ou extends Th{constructor(A){super(KE,"compressLogicalStructure")}}class Iu extends Ph{constructor(A){super(KE,"compressObjectStream")}}class cu extends Mh{constructor(A){super(KE,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class Cu extends Mh{constructor(A){super(KE,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new Lh}}class Bu extends vh{constructor(A){super(KE,"conformance",["A","B"])}}class hu extends Th{constructor(A){super(KE,"contentCopy")}}class Qu extends qh{constructor(A){super(KE,"copies",1,A=>A>=1)}}class lu extends Kh{constructor(A){super(KE,"creator")}}class Eu extends qh{constructor(A){super(KE,"currentPage",0,A=>A>=0)}}class uu extends Mh{constructor(A){super(KE,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new Lh,this.transform=new Lh}}class du extends Mh{constructor(A){super(KE,"debug",!0),this.uri=null}}class fu extends Yh{constructor(A){super(KE,"defaultTypeface"),this.writingScript=OB(A.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class pu extends vh{constructor(A){super(KE,"destination",["pdf","pcl","ps","webClient","zpl"])}}class mu extends Th{constructor(A){super(KE,"documentAssembly")}}class yu extends Mh{constructor(A){super(KE,"driver",!0),this.name=A.name?A.name.trim():"",this.fontInfo=null,this.xdc=null}}class wu extends vh{constructor(A){super(KE,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class Du extends vh{constructor(A){super(KE,"dynamicRender",["forbidden","required"])}}class bu extends Th{constructor(A){super(KE,"embed")}}class ku extends Th{constructor(A){super(KE,"encrypt")}}class Fu extends Mh{constructor(A){super(KE,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class Su extends vh{constructor(A){super(KE,"encryptionLevel",["40bit","128bit"])}}class Ru extends Kh{constructor(A){super(KE,"enforce")}}class Gu extends Mh{constructor(A){super(KE,"equate"),this.force=PB({data:A.force,defaultValue:1,validate:A=>0===A}),this.from=A.from||"",this.to=A.to||""}}class Nu extends Mh{constructor(A){super(KE,"equateRange"),this.from=A.from||"",this.to=A.to||"",this._unicodeRange=A.unicodeRange||""}get unicodeRange(){const A=[],e=/U\+([0-9a-fA-F]+)/,t=this._unicodeRange;for(let i of t.split(",").map(A=>A.trim()).filter(A=>!!A))i=i.split("-",2).map(A=>{const t=A.match(e);return t?parseInt(t[1],16):0}),1===i.length&&i.push(i[0]),A.push(i);return ct(this,"unicodeRange",A)}}class xu extends Yh{constructor(A){super(KE,"exclude")}[HC](){this[UC]=this[UC].trim().split(/\s+/).filter(A=>A&&["calculate","close","enter","exit","initialize","ready","validate"].includes(A))}}class Uu extends Kh{constructor(A){super(KE,"excludeNS")}}class Mu extends vh{constructor(A){super(KE,"flipLabel",["usePrinterSetting","on","off"])}}class Lu extends Mh{constructor(A){super(KE,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new Lh,this.defaultTypeface=new Lh,this.neverEmbed=new Lh}}class Ju extends Th{constructor(A){super(KE,"formFieldFilling")}}class Hu extends Kh{constructor(A){super(KE,"groupParent")}}class Yu extends vh{constructor(A){super(KE,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class vu extends Kh{constructor(A){super(KE,"includeXDPContent")}}class Ku extends vh{constructor(A){super(KE,"incrementalLoad",["none","forwardOnly"])}}class qu extends Th{constructor(A){super(KE,"incrementalMerge")}}class Tu extends Th{constructor(A){super(KE,"interactive")}}class Pu extends vh{constructor(A){super(KE,"jog",["usePrinterSetting","none","pageSet"])}}class Wu extends Mh{constructor(A){super(KE,"labelPrinter",!0),this.name=OB(A.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class Zu extends vh{constructor(A){super(KE,"layout",["paginate","panel"])}}class Ou extends qh{constructor(A){super(KE,"level",0,A=>A>0)}}class Xu extends Th{constructor(A){super(KE,"linearized")}}class Vu extends Kh{constructor(A){super(KE,"locale")}}class ju extends Kh{constructor(A){super(KE,"localeSet")}}class zu extends Mh{constructor(A){super(KE,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}}class _u extends Mh{constructor(A){super(KE,"map",!0),this.equate=new Lh,this.equateRange=new Lh}}class $u extends Mh{constructor(A){super(KE,"mediumInfo",!0),this.map=null}}class Ad extends Mh{constructor(A){super(KE,"message",!0),this.msgId=null,this.severity=null}}class ed extends Mh{constructor(A){super(KE,"messaging",!0),this.message=new Lh}}class td extends vh{constructor(A){super(KE,"mode",["append","overwrite"])}}class id extends Th{constructor(A){super(KE,"modifyAnnots")}}class ad extends qh{constructor(A){super(KE,"msgId",1,A=>A>=1)}}class sd extends Kh{constructor(A){super(KE,"nameAttr")}}class nd extends Yh{constructor(A){super(KE,"neverEmbed")}}class gd extends qh{constructor(A){super(KE,"numberOfCopies",null,A=>A>=2&&A<=5)}}class rd extends Mh{constructor(A){super(KE,"openAction",!0),this.destination=null}}class od extends Mh{constructor(A){super(KE,"output",!0),this.to=null,this.type=null,this.uri=null}}class Id extends Kh{constructor(A){super(KE,"outputBin")}}class cd extends Mh{constructor(A){super(KE,"outputXSL",!0),this.uri=null}}class Cd extends vh{constructor(A){super(KE,"overprint",["none","both","draw","field"])}}class Bd extends Kh{constructor(A){super(KE,"packets")}[HC](){"*"!==this[UC]&&(this[UC]=this[UC].trim().split(/\s+/).filter(A=>["config","datasets","template","xfdf","xslt"].includes(A)))}}class hd extends Mh{constructor(A){super(KE,"pageOffset"),this.x=PB({data:A.x,defaultValue:"useXDCSetting",validate:A=>!0}),this.y=PB({data:A.y,defaultValue:"useXDCSetting",validate:A=>!0})}}class Qd extends Kh{constructor(A){super(KE,"pageRange")}[HC](){const A=this[UC].trim().split(/\s+/).map(A=>parseInt(A,10)),e=[];for(let t=0,i=A.length;t<i;t+=2)e.push(A.slice(t,t+2));this[UC]=e}}class ld extends vh{constructor(A){super(KE,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class Ed extends vh{constructor(A){super(KE,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class ud extends qh{constructor(A){super(KE,"part",1,A=>!1)}}class dd extends Mh{constructor(A){super(KE,"pcl",!0),this.name=A.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}}class fd extends Mh{constructor(A){super(KE,"pdf",!0),this.name=A.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}}class pd extends Mh{constructor(A){super(KE,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class md extends Mh{constructor(A){super(KE,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}}class yd extends Th{constructor(A){super(KE,"pickTrayByPDFSize")}}class wd extends Kh{constructor(A){super(KE,"picture")}}class Dd extends Th{constructor(A){super(KE,"plaintextMetadata")}}class bd extends vh{constructor(A){super(KE,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class kd extends Mh{constructor(A){super(KE,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new Lh,this.labelPrinter=new Lh,this.pcl=new Lh,this.pdf=new Lh,this.ps=new Lh,this.submitUrl=new Lh,this.webClient=new Lh,this.zpl=new Lh}}class Fd extends Th{constructor(A){super(KE,"print")}}class Sd extends Th{constructor(A){super(KE,"printHighQuality")}}class Rd extends vh{constructor(A){super(KE,"printScaling",["appdefault","noScaling"])}}class Gd extends Kh{constructor(A){super(KE,"printerName")}}class Nd extends Kh{constructor(A){super(KE,"producer")}}class xd extends Mh{constructor(A){super(KE,"ps",!0),this.name=A.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}class Ud extends Yh{constructor(A){super(KE,"range")}[HC](){this[UC]=this[UC].trim().split(/\s*,\s*/,2).map(A=>A.split("-").map(A=>parseInt(A.trim(),10))).filter(A=>A.every(A=>!isNaN(A))).map(A=>(1===A.length&&A.push(A[0]),A))}}class Md extends Yh{constructor(A){super(KE,"record")}[HC](){this[UC]=this[UC].trim();const A=parseInt(this[UC],10);!isNaN(A)&&A>=0&&(this[UC]=A)}}class Ld extends Yh{constructor(A){super(KE,"relevant")}[HC](){this[UC]=this[UC].trim().split(/\s+/)}}class Jd extends Yh{constructor(A){super(KE,"rename")}[HC](){this[UC]=this[UC].trim(),(this[UC].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[UC]))&&gt("XFA - Rename: invalid XFA name")}}class Hd extends vh{constructor(A){super(KE,"renderPolicy",["server","client"])}}class Yd extends vh{constructor(A){super(KE,"runScripts",["both","client","none","server"])}}class vd extends Mh{constructor(A){super(KE,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class Kd extends vh{constructor(A){super(KE,"scriptModel",["XFA","none"])}}class qd extends vh{constructor(A){super(KE,"severity",["ignore","error","information","trace","warning"])}}class Td extends Mh{constructor(A){super(KE,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class Pd extends Mh{constructor(A){super(KE,"staple"),this.mode=OB(A.mode,["usePrinterSetting","on","off"])}}class Wd extends Kh{constructor(A){super(KE,"startNode")}}class Zd extends qh{constructor(A){super(KE,"startPage",0,A=>!0)}}class Od extends vh{constructor(A){super(KE,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class Xd extends Kh{constructor(A){super(KE,"submitUrl")}}class Vd extends qh{constructor(A){super(KE,"subsetBelow",100,A=>A>=0&&A<=100)}}class jd extends Th{constructor(A){super(KE,"suppressBanner")}}class zd extends Th{constructor(A){super(KE,"tagged")}}class _d extends Mh{constructor(A){super(KE,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class $d extends vh{constructor(A){super(KE,"threshold",["trace","error","information","warning"])}}class Af extends vh{constructor(A){super(KE,"to",["null","memory","stderr","stdout","system","uri"])}}class ef extends Mh{constructor(A){super(KE,"templateCache"),this.maxEntries=PB({data:A.maxEntries,defaultValue:5,validate:A=>A>=0})}}class tf extends Mh{constructor(A){super(KE,"trace",!0),this.area=new Lh}}class af extends Mh{constructor(A){super(KE,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class sf extends vh{constructor(A){super(KE,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class nf extends Kh{constructor(A){super(KE,"uri")}}class gf extends vh{constructor(A){super(KE,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class rf extends Yh{constructor(A){super(KE,"validateApprovalSignatures")}[HC](){this[UC]=this[UC].trim().split(/\s+/).filter(A=>["docReady","postSign"].includes(A))}}class of extends vh{constructor(A){super(KE,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class If extends vh{constructor(A){super(KE,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class cf extends Mh{constructor(A){super(KE,"VersionControl"),this.outputBelow=OB(A.outputBelow,["warn","error","update"]),this.sourceAbove=OB(A.sourceAbove,["warn","error"]),this.sourceBelow=OB(A.sourceBelow,["update","maintain"])}}class Cf extends Mh{constructor(A){super(KE,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}}class Bf extends Mh{constructor(A){super(KE,"webClient",!0),this.name=A.name?A.name.trim():"",this.fontInfo=null,this.xdc=null}}class hf extends vh{constructor(A){super(KE,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Qf extends Yh{constructor(A){super(KE,"window")}[HC](){const A=this[UC].trim().split(/\s*,\s*/,2).map(A=>parseInt(A,10));A.some(A=>isNaN(A))?this[UC]=[0,0]:(1===A.length&&A.push(A[0]),this[UC]=A)}}class lf extends Mh{constructor(A){super(KE,"xdc",!0),this.uri=new Lh,this.xsl=new Lh}}class Ef extends Mh{constructor(A){super(KE,"xdp",!0),this.packets=null}}class uf extends Mh{constructor(A){super(KE,"xsl",!0),this.debug=null,this.uri=null}}class df extends Mh{constructor(A){super(KE,"zpl",!0),this.name=A.name?A.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class ff{static[YB](A,e){if(ff.hasOwnProperty(A))return ff[A](e)}static acrobat(A){return new qE(A)}static acrobat7(A){return new TE(A)}static ADBE_JSConsole(A){return new PE(A)}static ADBE_JSDebugger(A){return new WE(A)}static addSilentPrint(A){return new ZE(A)}static addViewerPreferences(A){return new OE(A)}static adjustData(A){return new XE(A)}static adobeExtensionLevel(A){return new VE(A)}static agent(A){return new jE(A)}static alwaysEmbed(A){return new zE(A)}static amd(A){return new _E(A)}static area(A){return new $E(A)}static attributes(A){return new Au(A)}static autoSave(A){return new eu(A)}static base(A){return new tu(A)}static batchOutput(A){return new iu(A)}static behaviorOverride(A){return new au(A)}static cache(A){return new su(A)}static change(A){return new nu(A)}static common(A){return new gu(A)}static compress(A){return new ru(A)}static compressLogicalStructure(A){return new ou(A)}static compressObjectStream(A){return new Iu(A)}static compression(A){return new cu(A)}static config(A){return new Cu(A)}static conformance(A){return new Bu(A)}static contentCopy(A){return new hu(A)}static copies(A){return new Qu(A)}static creator(A){return new lu(A)}static currentPage(A){return new Eu(A)}static data(A){return new uu(A)}static debug(A){return new du(A)}static defaultTypeface(A){return new fu(A)}static destination(A){return new pu(A)}static documentAssembly(A){return new mu(A)}static driver(A){return new yu(A)}static duplexOption(A){return new wu(A)}static dynamicRender(A){return new Du(A)}static embed(A){return new bu(A)}static encrypt(A){return new ku(A)}static encryption(A){return new Fu(A)}static encryptionLevel(A){return new Su(A)}static enforce(A){return new Ru(A)}static equate(A){return new Gu(A)}static equateRange(A){return new Nu(A)}static exclude(A){return new xu(A)}static excludeNS(A){return new Uu(A)}static flipLabel(A){return new Mu(A)}static fontInfo(A){return new Lu(A)}static formFieldFilling(A){return new Ju(A)}static groupParent(A){return new Hu(A)}static ifEmpty(A){return new Yu(A)}static includeXDPContent(A){return new vu(A)}static incrementalLoad(A){return new Ku(A)}static incrementalMerge(A){return new qu(A)}static interactive(A){return new Tu(A)}static jog(A){return new Pu(A)}static labelPrinter(A){return new Wu(A)}static layout(A){return new Zu(A)}static level(A){return new Ou(A)}static linearized(A){return new Xu(A)}static locale(A){return new Vu(A)}static localeSet(A){return new ju(A)}static log(A){return new zu(A)}static map(A){return new _u(A)}static mediumInfo(A){return new $u(A)}static message(A){return new Ad(A)}static messaging(A){return new ed(A)}static mode(A){return new td(A)}static modifyAnnots(A){return new id(A)}static msgId(A){return new ad(A)}static nameAttr(A){return new sd(A)}static neverEmbed(A){return new nd(A)}static numberOfCopies(A){return new gd(A)}static openAction(A){return new rd(A)}static output(A){return new od(A)}static outputBin(A){return new Id(A)}static outputXSL(A){return new cd(A)}static overprint(A){return new Cd(A)}static packets(A){return new Bd(A)}static pageOffset(A){return new hd(A)}static pageRange(A){return new Qd(A)}static pagination(A){return new ld(A)}static paginationOverride(A){return new Ed(A)}static part(A){return new ud(A)}static pcl(A){return new dd(A)}static pdf(A){return new fd(A)}static pdfa(A){return new pd(A)}static permissions(A){return new md(A)}static pickTrayByPDFSize(A){return new yd(A)}static picture(A){return new wd(A)}static plaintextMetadata(A){return new Dd(A)}static presence(A){return new bd(A)}static present(A){return new kd(A)}static print(A){return new Fd(A)}static printHighQuality(A){return new Sd(A)}static printScaling(A){return new Rd(A)}static printerName(A){return new Gd(A)}static producer(A){return new Nd(A)}static ps(A){return new xd(A)}static range(A){return new Ud(A)}static record(A){return new Md(A)}static relevant(A){return new Ld(A)}static rename(A){return new Jd(A)}static renderPolicy(A){return new Hd(A)}static runScripts(A){return new Yd(A)}static script(A){return new vd(A)}static scriptModel(A){return new Kd(A)}static severity(A){return new qd(A)}static silentPrint(A){return new Td(A)}static staple(A){return new Pd(A)}static startNode(A){return new Wd(A)}static startPage(A){return new Zd(A)}static submitFormat(A){return new Od(A)}static submitUrl(A){return new Xd(A)}static subsetBelow(A){return new Vd(A)}static suppressBanner(A){return new jd(A)}static tagged(A){return new zd(A)}static template(A){return new _d(A)}static templateCache(A){return new ef(A)}static threshold(A){return new $d(A)}static to(A){return new Af(A)}static trace(A){return new tf(A)}static transform(A){return new af(A)}static type(A){return new sf(A)}static uri(A){return new nf(A)}static validate(A){return new gf(A)}static validateApprovalSignatures(A){return new rf(A)}static validationMessaging(A){return new of(A)}static version(A){return new If(A)}static versionControl(A){return new cf(A)}static viewerPreferences(A){return new Cf(A)}static webClient(A){return new Bf(A)}static whitespace(A){return new hf(A)}static window(A){return new Qf(A)}static xdc(A){return new lf(A)}static xdp(A){return new Ef(A)}static xsl(A){return new uf(A)}static zpl(A){return new df(A)}}const pf=vB.connectionSet.id;class mf extends Mh{constructor(A){super(pf,"connectionSet",!0),this.wsdlConnection=new Lh,this.xmlConnection=new Lh,this.xsdConnection=new Lh}}class yf extends Mh{constructor(A){super(pf,"effectiveInputPolicy"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class wf extends Mh{constructor(A){super(pf,"effectiveOutputPolicy"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class Df extends Kh{constructor(A){super(pf,"operation"),this.id=A.id||"",this.input=A.input||"",this.name=A.name||"",this.output=A.output||"",this.use=A.use||"",this.usehref=A.usehref||""}}class bf extends Kh{constructor(A){super(pf,"rootElement"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class kf extends Kh{constructor(A){super(pf,"soapAction"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class Ff extends Kh{constructor(A){super(pf,"soapAddress"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class Sf extends Kh{constructor(A){super(pf,"uri"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class Rf extends Kh{constructor(A){super(pf,"wsdlAddress"),this.id=A.id||"",this.name=A.name||"",this.use=A.use||"",this.usehref=A.usehref||""}}class Gf extends Mh{constructor(A){super(pf,"wsdlConnection",!0),this.dataDescription=A.dataDescription||"",this.name=A.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class Nf extends Mh{constructor(A){super(pf,"xmlConnection",!0),this.dataDescription=A.dataDescription||"",this.name=A.name||"",this.uri=null}}class xf extends Mh{constructor(A){super(pf,"xsdConnection",!0),this.dataDescription=A.dataDescription||"",this.name=A.name||"",this.rootElement=null,this.uri=null}}class Uf{static[YB](A,e){if(Uf.hasOwnProperty(A))return Uf[A](e)}static connectionSet(A){return new mf(A)}static effectiveInputPolicy(A){return new yf(A)}static effectiveOutputPolicy(A){return new wf(A)}static operation(A){return new Df(A)}static rootElement(A){return new bf(A)}static soapAction(A){return new kf(A)}static soapAddress(A){return new Ff(A)}static uri(A){return new Sf(A)}static wsdlAddress(A){return new Rf(A)}static wsdlConnection(A){return new Gf(A)}static xmlConnection(A){return new Nf(A)}static xsdConnection(A){return new xf(A)}}const Mf=vB.datasets.id;class Lf extends Hh{constructor(A){super(Mf,"data",A)}[IB](){return!0}}class Jf extends Mh{constructor(A){super(Mf,"datasets",!0),this.data=null,this.Signature=null}[dB](A){const e=A[EB];("data"===e&&A[lB]===Mf||"Signature"===e&&A[lB]===vB.signature.id)&&(this[e]=A),this[kC](A)}}class Hf{static[YB](A,e){if(Hf.hasOwnProperty(A))return Hf[A](e)}static datasets(A){return new Jf(A)}static data(A){return new Lf(A)}}const Yf=vB.localeSet.id;class vf extends Mh{constructor(A){super(Yf,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new Lh(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new Lh(2)}}class Kf extends Kh{constructor(A){super(Yf,"currencySymbol"),this.name=OB(A.name,["symbol","isoname","decimal"])}}class qf extends Mh{constructor(A){super(Yf,"currencySymbols",!0),this.currencySymbol=new Lh(3)}}class Tf extends Kh{constructor(A){super(Yf,"datePattern"),this.name=OB(A.name,["full","long","med","short"])}}class Pf extends Mh{constructor(A){super(Yf,"datePatterns",!0),this.datePattern=new Lh(4)}}class Wf extends Yh{constructor(A){super(Yf,"dateTimeSymbols")}}class Zf extends Kh{constructor(A){super(Yf,"day")}}class Of extends Mh{constructor(A){super(Yf,"dayNames",!0),this.abbr=PB({data:A.abbr,defaultValue:0,validate:A=>1===A}),this.day=new Lh(7)}}class Xf extends Kh{constructor(A){super(Yf,"era")}}class Vf extends Mh{constructor(A){super(Yf,"eraNames",!0),this.era=new Lh(2)}}class jf extends Mh{constructor(A){super(Yf,"locale",!0),this.desc=A.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}}class zf extends Mh{constructor(A){super(Yf,"localeSet",!0),this.locale=new Lh}}class _f extends Kh{constructor(A){super(Yf,"meridiem")}}class $f extends Mh{constructor(A){super(Yf,"meridiemNames",!0),this.meridiem=new Lh(2)}}class Ap extends Kh{constructor(A){super(Yf,"month")}}class ep extends Mh{constructor(A){super(Yf,"monthNames",!0),this.abbr=PB({data:A.abbr,defaultValue:0,validate:A=>1===A}),this.month=new Lh(12)}}class tp extends Kh{constructor(A){super(Yf,"numberPattern"),this.name=OB(A.name,["full","long","med","short"])}}class ip extends Mh{constructor(A){super(Yf,"numberPatterns",!0),this.numberPattern=new Lh(4)}}class ap extends Kh{constructor(A){super(Yf,"numberSymbol"),this.name=OB(A.name,["decimal","grouping","percent","minus","zero"])}}class sp extends Mh{constructor(A){super(Yf,"numberSymbols",!0),this.numberSymbol=new Lh(5)}}class np extends Kh{constructor(A){super(Yf,"timePattern"),this.name=OB(A.name,["full","long","med","short"])}}class gp extends Mh{constructor(A){super(Yf,"timePatterns",!0),this.timePattern=new Lh(4)}}class rp extends Mh{constructor(A){super(Yf,"typeFace",!0),this.name=""|A.name}}class op extends Mh{constructor(A){super(Yf,"typeFaces",!0),this.typeFace=new Lh}}class Ip{static[YB](A,e){if(Ip.hasOwnProperty(A))return Ip[A](e)}static calendarSymbols(A){return new vf(A)}static currencySymbol(A){return new Kf(A)}static currencySymbols(A){return new qf(A)}static datePattern(A){return new Tf(A)}static datePatterns(A){return new Pf(A)}static dateTimeSymbols(A){return new Wf(A)}static day(A){return new Zf(A)}static dayNames(A){return new Of(A)}static era(A){return new Xf(A)}static eraNames(A){return new Vf(A)}static locale(A){return new jf(A)}static localeSet(A){return new zf(A)}static meridiem(A){return new _f(A)}static meridiemNames(A){return new $f(A)}static month(A){return new Ap(A)}static monthNames(A){return new ep(A)}static numberPattern(A){return new tp(A)}static numberPatterns(A){return new ip(A)}static numberSymbol(A){return new ap(A)}static numberSymbols(A){return new sp(A)}static timePattern(A){return new np(A)}static timePatterns(A){return new gp(A)}static typeFace(A){return new rp(A)}static typeFaces(A){return new op(A)}}const cp=vB.signature.id;class Cp extends Mh{constructor(A){super(cp,"signature",!0)}}class Bp{static[YB](A,e){if(Bp.hasOwnProperty(A))return Bp[A](e)}static signature(A){return new Cp(A)}}const hp=vB.stylesheet.id;class Qp extends Mh{constructor(A){super(hp,"stylesheet",!0)}}class lp{static[YB](A,e){if(lp.hasOwnProperty(A))return lp[A](e)}static stylesheet(A){return new Qp(A)}}const Ep=vB.xdp.id;class up extends Mh{constructor(A){super(Ep,"xdp",!0),this.uuid=A.uuid||"",this.timeStamp=A.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new Lh,this.template=null}[fB](A){const e=vB[A[EB]];return e&&A[lB]===e.id}}class dp{static[YB](A,e){if(dp.hasOwnProperty(A))return dp[A](e)}static xdp(A){return new up(A)}}const fp=vB.xhtml.id,pp=Symbol(),mp=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),yp=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",A=>"none"===A?"none":"normal"],["xfa-font-horizontal-scale",A=>`scaleX(${Math.max(0,Math.min(parseInt(A)/100)).toFixed(2)})`],["xfa-font-vertical-scale",A=>`scaleY(${Math.max(0,Math.min(parseInt(A)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(A,e)=>Wh(.99*(A=e.fontSize=XB(A)))],["letter-spacing",A=>Wh(XB(A))],["line-height",A=>Wh(XB(A))],["margin",A=>Wh(XB(A))],["margin-bottom",A=>Wh(XB(A))],["margin-left",A=>Wh(XB(A))],["margin-right",A=>Wh(XB(A))],["margin-top",A=>Wh(XB(A))],["text-indent",A=>Wh(XB(A))],["font-family",A=>A],["vertical-align",A=>Wh(XB(A))]]),wp=/\s+/g,Dp=/[\r\n]+/g,bp=/\r\n?/g;function kp(A,e,t){const i=Object.create(null);if(!A)return i;const a=Object.create(null);for(const[e,t]of A.split(";").map(A=>A.split(":",2))){const A=yp.get(e);if(""===A)continue;let s=t;A&&(s="string"==typeof A?A:A(t,a)),e.endsWith("scale")?i.transform=i.transform?`${i[e]} ${s}`:s:i[e.replaceAll(/-([a-zA-Z])/g,(A,e)=>e.toUpperCase())]=s}if(i.fontFamily&&nQ({typeface:i.fontFamily,weight:i.fontWeight||"normal",posture:i.fontStyle||"normal",size:a.fontSize||0},e,e[eB].fontFinder,i),t&&i.verticalAlign&&"0px"!==i.verticalAlign&&i.fontSize){const A=.583,e=.333,t=XB(i.fontSize);i.fontSize=Wh(t*A),i.verticalAlign=Wh(Math.sign(XB(i.verticalAlign))*t*e)}return t&&i.fontSize&&(i.fontSize=`calc(${i.fontSize} * var(--scale-factor))`),eQ(i),i}const Fp=new Set(["body","html"]);class Sp extends Hh{constructor(A,e){super(fp,e),this[pp]=!1,this.style=A.style||""}[SC](A){var e;super[SC](A),this.style=(e=this).style?e.style.trim().split(/\s*;\s*/).filter(A=>!!A).map(A=>A.split(/\s*:\s*/,2)).filter(([A,t])=>("font-family"===A&&e[eB].usedTypefaces.add(t),mp.has(A))).map(A=>A.join(":")).join(";"):""}[DC](){return!Fp.has(this[EB])}[pB](A,e=!1){e?this[pp]=!0:(A=A.replaceAll(Dp,""),this.style.includes("xfa-spacerun:yes")||(A=A.replaceAll(wp," "))),A&&(this[UC]+=A)}[mB](A,e=!0){const t=Object.create(null),i={top:NaN,bottom:NaN,left:NaN,right:NaN};let a=null;for(const[A,e]of this.style.split(";").map(A=>A.split(":",2)))switch(A){case"font-family":t.typeface=TB(e);break;case"font-size":t.size=XB(e);break;case"font-weight":t.weight=e;break;case"font-style":t.posture=e;break;case"letter-spacing":t.letterSpacing=XB(e);break;case"margin":const A=e.split(/ \t/).map(A=>XB(A));switch(A.length){case 1:i.top=i.bottom=i.left=i.right=A[0];break;case 2:i.top=i.bottom=A[0],i.left=i.right=A[1];break;case 3:i.top=A[0],i.bottom=A[2],i.left=i.right=A[1];break;case 4:i.top=A[0],i.left=A[1],i.bottom=A[2],i.right=A[3]}break;case"margin-top":i.top=XB(e);break;case"margin-bottom":i.bottom=XB(e);break;case"margin-left":i.left=XB(e);break;case"margin-right":i.right=XB(e);break;case"line-height":a=XB(e)}if(A.pushData(t,i,a),this[UC])A.addString(this[UC]);else for(const e of this[VC]())"#text"!==e[EB]?e[mB](A):A.addString(e[UC]);e&&A.popFont()}[MB](A){const e=[];if(this[JC]={children:e},this[FC]({}),0===e.length&&!this[UC])return zB.EMPTY;let t;return t=this[pp]?this[UC]?this[UC].replaceAll(bp,"\n"):void 0:this[UC]||void 0,zB.success({name:this[EB],attributes:{href:this.href,style:kp(this.style,this,this[pp])},children:e,value:t})}}class Rp extends Sp{constructor(A){super(A,"a"),this.href=gQ(A.href)||""}}class Gp extends Sp{constructor(A){super(A,"b")}[mB](A){A.pushFont({weight:"bold"}),super[mB](A),A.popFont()}}class Np extends Sp{constructor(A){super(A,"body")}[MB](A){const e=super[MB](A),{html:t}=e;return t?(t.name="div",t.attributes.class=["xfaRich"],e):zB.EMPTY}}class xp extends Sp{constructor(A){super(A,"br")}[xB](){return"\n"}[mB](A){A.addString("\n")}[MB](A){return zB.success({name:"br"})}}class Up extends Sp{constructor(A){super(A,"html")}[MB](A){const e=[];if(this[JC]={children:e},this[FC]({}),0===e.length)return zB.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[UC]||""});if(1===e.length){const A=e[0];if(A.attributes?.class.includes("xfaRich"))return zB.success(A)}return zB.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:e})}}class Mp extends Sp{constructor(A){super(A,"i")}[mB](A){A.pushFont({posture:"italic"}),super[mB](A),A.popFont()}}class Lp extends Sp{constructor(A){super(A,"li")}}class Jp extends Sp{constructor(A){super(A,"ol")}}class Hp extends Sp{constructor(A){super(A,"p")}[mB](A){super[mB](A,!1),A.addString("\n"),A.addPara(),A.popFont()}[xB](){return this[$C]()[VC]().at(-1)===this?super[xB]():super[xB]()+"\n"}}class Yp extends Sp{constructor(A){super(A,"span")}}class vp extends Sp{constructor(A){super(A,"sub")}}class Kp extends Sp{constructor(A){super(A,"sup")}}class qp extends Sp{constructor(A){super(A,"ul")}}class Tp{static[YB](A,e){if(Tp.hasOwnProperty(A))return Tp[A](e)}static a(A){return new Rp(A)}static b(A){return new Gp(A)}static body(A){return new Np(A)}static br(A){return new xp(A)}static html(A){return new Up(A)}static i(A){return new Mp(A)}static li(A){return new Lp(A)}static ol(A){return new Jp(A)}static p(A){return new Hp(A)}static span(A){return new Yp(A)}static sub(A){return new vp(A)}static sup(A){return new Kp(A)}static ul(A){return new qp(A)}}const Pp={config:ff,connection:Uf,datasets:Hf,localeSet:Ip,signature:Bp,stylesheet:lp,template:LE,xdp:dp,xhtml:Tp};class Wp{constructor(A){this.namespaceId=A}[YB](A,e){return new Hh(this.namespaceId,A,e)}}class Zp extends Mh{constructor(A){super(-1,"root",Object.create(null)),this.element=null,this[iB]=A}[dB](A){return this.element=A,!0}[HC](){super[HC](),this.element.template instanceof wE&&(this[iB].set(bB,this.element),this.element.template[kB](this[iB]),this.element.template[iB]=this[iB])}}class Op extends Mh{constructor(){super(-1,"",Object.create(null))}[dB](A){return!1}}class Xp{constructor(A=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(vB).map(({id:A})=>A)),this._currentNamespace=A||new Wp(++this._nextNsId)}buildRoot(A){return new Zp(A)}build({nsPrefix:A,name:e,attributes:t,namespace:i,prefixes:a}){const s=null!==i;if(s&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(i)),a&&this._addNamespacePrefix(a),t.hasOwnProperty(uB)){const A=Pp.datasets,e=t[uB];let i=null;for(const[t,a]of Object.entries(e)){if(this._getNamespaceToUse(t)===A){i={xfa:a};break}}i?t[uB]=i:delete t[uB]}const n=this._getNamespaceToUse(A),g=n?.[YB](e,t)||new Op;return g[IB]()&&this._nsAgnosticLevel++,(s||a||g[IB]())&&(g[GC]={hasNamespace:s,prefixes:a,nsAgnostic:g[IB]()}),g}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(A){let e=this._namespaces.get(A);if(e)return e;for(const[t,{check:i}]of Object.entries(vB))if(i(A)){if(e=Pp[t],e)return this._namespaces.set(A,e),e;break}return e=new Wp(++this._nextNsId),this._namespaces.set(A,e),e}_addNamespacePrefix(A){for(const{prefix:e,value:t}of A){const A=this._searchNamespace(t);let i=this._namespacePrefixes.get(e);i||(i=[],this._namespacePrefixes.set(e,i)),i.push(A)}}_getNamespaceToUse(A){if(!A)return this._currentNamespace;const e=this._namespacePrefixes.get(A);return e?.length>0?e.at(-1):(gt(`Unknown namespace prefix: ${A}.`),null)}clean(A){const{hasNamespace:e,prefixes:t,nsAgnostic:i}=A;e&&(this._currentNamespace=this._namespaceStack.pop()),t&&t.forEach(({prefix:A})=>{this._namespacePrefixes.get(A).pop()}),i&&this._nsAgnosticLevel--}}class Vp extends xc{constructor(A=null,e=!1){super(),this._builder=new Xp(A),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=Dc,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=e}parse(A){if(this.parseXml(A),this._errorCode===Dc)return this._current[HC](),this._current.element}onText(A){A=A.replace(this._nbsps,A=>A.slice(1)+" "),this._richText||this._current[DC]()?this._current[pB](A,this._richText):this._whiteRegex.test(A)||this._current[pB](A.trim())}onCdata(A){this._current[pB](A)}_mkAttributes(A,e){let t=null,i=null;const a=Object.create({});for(const{name:s,value:n}of A)if("xmlns"===s)t?gt(`XFA - multiple namespace definition in <${e}>`):t=n;else if(s.startsWith("xmlns:")){const A=s.substring(6);i||(i=[]),i.push({prefix:A,value:n})}else{const A=s.indexOf(":");if(-1===A)a[s]=n;else{let e=a[uB];e||(e=a[uB]=Object.create(null));const[t,i]=[s.slice(0,A),s.slice(A+1)];(e[t]||=Object.create(null))[i]=n}}return[t,i,a]}_getNameAndPrefix(A,e){const t=A.indexOf(":");return-1===t?[A,null]:[A.substring(t+1),e?"":A.substring(0,t)]}onBeginElement(A,e,t){const[i,a,s]=this._mkAttributes(e,A),[n,g]=this._getNameAndPrefix(A,this._builder.isNsAgnostic()),r=this._builder.build({nsPrefix:g,name:n,attributes:s,namespace:i,prefixes:a});if(r[eB]=this._globalData,t)return r[HC](),this._current[dB](r)&&r[SB](this._ids),void r[SC](this._builder);this._stack.push(this._current),this._current=r}onEndElement(A){const e=this._current;if(e[nB]()&&"string"==typeof e[UC]){const A=new Vp;A._globalData=this._globalData;const t=A.parse(e[UC]);e[UC]=null,e[dB](t)}e[HC](),this._current=this._stack.pop(),this._current[dB](e)&&e[SB](this._ids),e[SC](this._builder)}onError(A){this._errorCode=A}}class jp{constructor(A){try{this.root=(new Vp).parse(jp._createDocument(A));const e=new YE(this.root);this.form=e.bind(),this.dataHandler=new vE(this.root,e.getData()),this.form[eB].template=this.form}catch(A){gt(`XFA - an error occurred during parsing and binding: ${A}`)}}isValid(){return this.root&&this.form}_createPagesHelper(){const A=this.form[UB]();return new Promise((e,t)=>{const i=()=>{try{const t=A.next();t.done?e(t.value):setTimeout(i,0)}catch(A){t(A)}};setTimeout(i,0)})}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map(A=>{const{width:e,height:t}=A.attributes.style;return[0,0,parseInt(e),parseInt(t)]})}catch(A){gt(`XFA - an error occurred during layout: ${A}`)}}getBoundingBox(A){return this.dims[A]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(A){this.form[eB].images=A}setFonts(A){this.form[eB].fontFinder=new _B(A);const e=[];for(let A of this.form[eB].usedTypefaces){A=TB(A);this.form[eB].fontFinder.find(A)||e.push(A)}return e.length>0?e:null}appendFonts(A,e){this.form[eB].fontFinder.add(A,e)}async getPages(){this.pages||await this._createPages();const A=this.pages;return this.pages=null,A}serializeData(A){return this.dataHandler.serialize(A)}static _createDocument(A){return A["/xdp:xdp"]?Object.values(A).join(""):A["xdp:xdp"]}static getRichTextAsHtml(A){if(!A||"string"!=typeof A)return null;try{let e=new Vp(Tp,!0).parse(A);if(!["body","xhtml"].includes(e[EB])){const A=Tp.body({});A[kC](e),e=A}const t=e[MB]();if(!t.success)return null;const{html:i}=t,{attributes:a}=i;return a&&(a.class&&(a.class=a.class.filter(A=>!A.startsWith("xfa"))),a.dir="auto"),{html:i,str:e[xB]()}}catch(A){gt(`XFA - an error occurred during parsing of rich text: ${A}`)}return null}}class zp{static createGlobals(A){return Promise.all([A.ensureCatalog("acroForm"),A.ensureDoc("xfaDatasets"),A.ensureCatalog("structTreeRoot"),A.ensureCatalog("baseUrl"),A.ensureCatalog("attachments")]).then(([e,t,i,a,s])=>({pdfManager:A,acroForm:e instanceof _t?e:_t.empty,xfaDatasets:t,structTreeRoot:i,baseUrl:a,attachments:s}),A=>(gt(`createGlobals: "${A}".`),null))}static async create(A,e,t,i,a,s){const n=a?await this._getPageIndex(A,e,t.pdfManager):null;return t.pdfManager.ensure(this,"_create",[A,e,t,i,a,n,s])}static _create(A,e,t,i,a=!1,s=null,n=null){const g=A.fetchIfRef(e);if(!(g instanceof _t))return;const{acroForm:r,pdfManager:o}=t,I=e instanceof $t?e.toString():`annot_${i.createObjId()}`;let c=g.get("Subtype");c=c instanceof Vt?c.name:null;const C={xref:A,ref:e,dict:g,subtype:c,id:I,annotationGlobals:t,collectFields:a,needAppearances:!a&&!0===r.get("NeedAppearances"),pageIndex:s,evaluatorOptions:o.evaluatorOptions,pageRef:n};switch(c){case"Link":return new cm(C);case"Text":return new Im(C);case"Widget":let A=hi({dict:g,key:"FT"});switch(A=A instanceof Vt?A.name:null,A){case"Tx":return new nm(C);case"Btn":return new gm(C);case"Ch":return new rm(C);case"Sig":return new om(C)}return gt(`Unimplemented widget field type "${A}", falling back to base field type.`),new sm(C);case"Popup":return new Cm(C);case"FreeText":return new Bm(C);case"Line":return new hm(C);case"Square":return new Qm(C);case"Circle":return new lm(C);case"PolyLine":return new Em(C);case"Polygon":return new um(C);case"Caret":return new dm(C);case"Ink":return new fm(C);case"Highlight":return new pm(C);case"Underline":return new mm(C);case"Squiggly":return new ym(C);case"StrikeOut":return new wm(C);case"Stamp":return new Dm(C);case"FileAttachment":return new bm(C);default:return a||gt(c?`Unimplemented annotation type "${c}", falling back to base annotation.`:"Annotation is missing the required /Subtype."),new tm(C)}}static async _getPageIndex(A,e,t){try{const i=await A.fetchIfRefAsync(e);if(!(i instanceof _t))return-1;const a=i.getRaw("P");if(a instanceof $t)try{return await t.ensureCatalog("getPageIndex",[a])}catch(A){nt(`_getPageIndex -- not a valid page reference: "${A}".`)}if(i.has("Kids"))return-1;const s=await t.ensureDoc("numPages");for(let A=0;A<s;A++){const i=await t.getPage(A),a=await t.ensure(i,"annotations");for(const t of a)if(t instanceof $t&&si(t,e))return A}}catch(A){gt(`_getPageIndex: "${A}".`)}return-1}static generateImages(A,e,t){if(!t)return gt("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."),null;let i;for(const{bitmapId:t,bitmap:a}of A)a&&(i||=new Map,i.set(t,Dm.createImage(a,e)));return i}static async saveNewAnnotations(A,e,t,i){const a=A.xref;let s;const n=[],g=[],{isOffscreenCanvasSupported:r}=A.options;for(const o of t)if(!o.deleted)switch(o.annotationType){case l:if(!s){const A=new _t(a);A.set("BaseFont",Vt.get("Helvetica")),A.set("Type",Vt.get("Font")),A.set("Subtype",Vt.get("Type1")),A.set("Encoding",Vt.get("WinAnsiEncoding"));const e=[];s=a.getNewTemporaryRef(),await _c(s,A,e,a),n.push({ref:s,data:e.join("")})}g.push(Bm.createNewAnnotation(a,o,n,{evaluator:A,task:e,baseFontRef:s}));break;case E:o.quadPoints?g.push(pm.createNewAnnotation(a,o,n)):g.push(fm.createNewAnnotation(a,o,n));break;case d:g.push(fm.createNewAnnotation(a,o,n));break;case u:if(!r)break;const t=await i.get(o.bitmapId);if(t.imageStream){const{imageStream:A,smaskStream:e}=t,i=[];if(e){const t=a.getNewTemporaryRef();await _c(t,e,i,a),n.push({ref:t,data:i.join("")}),A.dict.set("SMask",t),i.length=0}const s=t.imageRef=a.getNewTemporaryRef();await _c(s,A,i,a),n.push({ref:s,data:i.join("")}),t.imageStream=t.smaskStream=null}g.push(Dm.createNewAnnotation(a,o,n,{image:t}))}return{annotations:await Promise.all(g),dependencies:n}}static async printNewAnnotations(A,e,t,i,a){if(!i)return null;const{options:s,xref:n}=e,g=[];for(const r of i)if(!r.deleted)switch(r.annotationType){case l:g.push(Bm.createNewPrintAnnotation(A,n,r,{evaluator:e,task:t,evaluatorOptions:s}));break;case E:r.quadPoints?g.push(pm.createNewPrintAnnotation(A,n,r,{evaluatorOptions:s})):g.push(fm.createNewPrintAnnotation(A,n,r,{evaluatorOptions:s}));break;case d:g.push(fm.createNewPrintAnnotation(A,n,r,{evaluatorOptions:s}));break;case u:if(!s.isOffscreenCanvasSupported)break;const i=await a.get(r.bitmapId);if(i.imageStream){const{imageStream:A,smaskStream:e}=i;e&&A.dict.set("SMask",e),i.imageRef=new xs(A,A.length),i.imageStream=i.smaskStream=null}g.push(Dm.createNewPrintAnnotation(A,n,r,{image:i,evaluatorOptions:s}))}return Promise.all(g)}}function _p(A,e=new Uint8ClampedArray(3)){if(!Array.isArray(A))return e;const t=e||new Uint8ClampedArray(3);switch(A.length){case 0:return null;case 1:return Vi.singletons.gray.getRgbItem(A,0,t,0),t;case 3:return Vi.singletons.rgb.getRgbItem(A,0,t,0),t;case 4:return Vi.singletons.cmyk.getRgbItem(A,0,t,0),t;default:return e}}function $p(A){return Array.from(A,A=>A/255)}function Am(A,e){const t=A.getArray("QuadPoints");if(!mi(t,null)||0===t.length||t.length%8>0)return null;const i=new Float32Array(t.length);for(let A=0,a=t.length;A<a;A+=8){const[a,s,n,g,r,o,I,c]=t.slice(A,A+8),C=Math.min(a,n,r,I),B=Math.max(a,n,r,I),h=Math.min(s,g,o,c),Q=Math.max(s,g,o,c);if(null!==e&&(C<e[0]||B>e[2]||h<e[1]||Q>e[3]))return null;i.set([C,Q,B,Q,C,h,B,h],A)}return i}function em(A,e,t){const[i,a,s,n]=bt.getAxialAlignedBoundingBox(e,t);if(i===s||a===n)return[1,0,0,1,A[0],A[1]];const g=(A[2]-A[0])/(s-i),r=(A[3]-A[1])/(n-a);return[g,0,0,r,A[0]-i*g,A[1]-a*r]}class tm{constructor(A){const{dict:e,xref:t,annotationGlobals:i}=A;this.setTitle(e.get("T")),this.setContents(e.get("Contents")),this.setModificationDate(e.get("M")),this.setFlags(e.get("F")),this.setRectangle(e.getArray("Rect")),this.setColor(e.getArray("C")),this.setBorderStyle(e),this.setAppearance(e),this.setOptionalContent(e);const a=e.get("MK");this.setBorderAndBackgroundColors(a),this.setRotation(a,e),this.ref=A.ref instanceof $t?A.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);const s=!!(this.flags&z),n=!!(this.flags&_);if(i.structTreeRoot){let t=e.get("StructParent");t=Number.isInteger(t)&&t>=0?t:-1,i.structTreeRoot.addAnnotationIdToPage(A.pageRef,t)}if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:A.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:A.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&V),noHTML:s&&n},A.collectFields){const i=e.get("Kids");if(Array.isArray(i)){const A=[];for(const e of i)e instanceof $t&&A.push(e.toString());0!==A.length&&(this.data.kidIds=A)}this.data.actions=Ri(t,e,QA),this.data.fieldName=this._constructFieldName(e),this.data.pageIndex=A.pageIndex}this._isOffscreenCanvasSupported=A.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(A,e){return!!(A&e)}_isViewable(A){return!this._hasFlag(A,Z)&&!this._hasFlag(A,j)}_isPrintable(A){return this._hasFlag(A,X)&&!this._hasFlag(A,O)&&!this._hasFlag(A,Z)}mustBeViewed(A,e){const t=A?.get(this.data.id)?.noView;return void 0!==t?!t:this.viewable&&!this._hasFlag(this.flags,O)}mustBePrinted(A){const e=A?.get(this.data.id)?.noPrint;return void 0!==e?!e:this.printable}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}_parseStringHelper(A){const e="string"==typeof A?Ft(A):"";return{str:e,dir:e&&"rtl"===NI(e).dir?"rtl":"ltr"}}setDefaultAppearance(A){const{dict:e,annotationGlobals:t}=A,i=hi({dict:e,key:"DA"})||t.acroForm.get("DA");this._defaultAppearance="string"==typeof i?i:"",this.data.defaultAppearanceData=Qc(this._defaultAppearance)}setTitle(A){this._title=this._parseStringHelper(A)}setContents(A){this._contents=this._parseStringHelper(A)}setModificationDate(A){this.modificationDate="string"==typeof A?A:null}setFlags(A){this.flags=Number.isInteger(A)&&A>0?A:0,this.flags&Z&&"Annotation"!==this.constructor.name&&(this.flags^=Z)}hasFlag(A){return this._hasFlag(this.flags,A)}setRectangle(A){this.rectangle=Di(A,[0,0,0,0])}setColor(A){this.color=_p(A)}setLineEndings(A){if(this.lineEndings=["None","None"],Array.isArray(A)&&2===A.length)for(let e=0;e<2;e++){const t=A[e];if(t instanceof Vt)switch(t.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[e]=t.name;continue}gt(`Ignoring invalid lineEnding: ${t}`)}}setRotation(A,e){this.rotation=0;let t=A instanceof _t?A.get("R")||0:e.get("Rotate")||0;Number.isInteger(t)&&0!==t&&(t%=360,t<0&&(t+=360),t%90==0&&(this.rotation=t))}setBorderAndBackgroundColors(A){A instanceof _t?(this.borderColor=_p(A.getArray("BC"),null),this.backgroundColor=_p(A.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(A){if(this.borderStyle=new im,A instanceof _t)if(A.has("BS")){const e=A.get("BS");if(e instanceof _t){const A=e.get("Type");A&&!ti(A,"Border")||(this.borderStyle.setWidth(e.get("W"),this.rectangle),this.borderStyle.setStyle(e.get("S")),this.borderStyle.setDashArray(e.getArray("D")))}}else if(A.has("Border")){const e=A.getArray("Border");Array.isArray(e)&&e.length>=3&&(this.borderStyle.setHorizontalCornerRadius(e[0]),this.borderStyle.setVerticalCornerRadius(e[1]),this.borderStyle.setWidth(e[2],this.rectangle),4===e.length&&this.borderStyle.setDashArray(e[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(A){this.appearance=null;const e=A.get("AP");if(!(e instanceof _t))return;const t=e.get("N");if(t instanceof ni)return void(this.appearance=t);if(!(t instanceof _t))return;const i=A.get("AS");if(!(i instanceof Vt&&t.has(i.name)))return;const a=t.get(i.name);a instanceof ni&&(this.appearance=a)}setOptionalContent(A){this.oc=null;const e=A.get("OC");e instanceof Vt?gt("setOptionalContent: Support for /Name-entry is not implemented."):e instanceof _t&&(this.oc=e)}loadResources(A,e){return e.dict.getAsync("Resources").then(e=>{if(!e)return;return new wC(e,A,e.xref).load().then(function(){return e})})}async getOperatorList(A,e,t,a,s){const{hasOwnCanvas:n,id:g,rect:r}=this.data;let I=this.appearance;const c=!!(n&&t&o);if(c&&(r[0]===r[2]||r[1]===r[3]))return this.data.hasOwnCanvas=!1,{opList:new zI,separateForm:!1,separateCanvas:!1};if(!I){if(!c)return{opList:new zI,separateForm:!1,separateCanvas:!1};I=new Wi(""),I.dict=new _t}const C=I.dict,B=await this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],I),h=wi(C.getArray("BBox"),[0,0,1,1]),Q=yi(C.getArray("Matrix"),i),l=em(r,h,Q),E=new zI;let u;return this.oc&&(u=await A.parseMarkedContentProps(this.oc,null)),void 0!==u&&E.addOp(Je,["OC",u]),E.addOp(We,[g,r,l,Q,c]),await A.getOperatorList({stream:I,task:e,resources:B,operatorList:E,fallbackFontDict:this._fallbackFontDict}),E.addOp(Ze,[]),void 0!==u&&E.addOp(He,[]),this.reset(),{opList:E,separateForm:!1,separateCanvas:c}}async save(A,e,t){return null}get hasTextContent(){return!1}async extractTextContent(A,e,t){if(!this.appearance)return;const i=await this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance),a=[],s=[];let n=null;const g={desiredSize:Math.Infinity,ready:!0,enqueue(A,e){for(const e of A.items)void 0!==e.str&&(n||=e.transform.slice(-2),s.push(e.str),e.hasEOL&&(a.push(s.join("").trimEnd()),s.length=0))}};if(await A.getTextContent({stream:this.appearance,task:e,resources:i,includeMarkedContent:!0,keepWhiteSpace:!0,sink:g,viewBox:t}),this.reset(),s.length&&a.push(s.join("").trimEnd()),a.length>1||a[0]){const A=this.appearance.dict,e=wi(A.getArray("BBox"),null),t=yi(A.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(n,e,t),this.data.textContent=a}}_transformPoint(A,e,t){const{rect:i}=this.data;e||=[0,0,1,1],t||=[1,0,0,1,0,0];const a=em(i,e,t);return a[4]-=i[0],a[5]-=i[1],A=bt.applyTransform(A,a),bt.applyTransform(A,t)}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const A of this._streams)A.reset()}_constructFieldName(A){if(!A.has("T")&&!A.has("Parent"))return gt("Unknown field name, falling back to empty field name."),"";if(!A.has("Parent"))return Ft(A.get("T"));const e=[];A.has("T")&&e.unshift(Ft(A.get("T")));let t=A;const i=new Ai;for(A.objId&&i.put(A.objId);t.has("Parent")&&(t=t.get("Parent"),t instanceof _t&&(!t.objId||!i.has(t.objId)));)t.objId&&i.put(t.objId),t.has("T")&&e.unshift(Ft(t.get("T")));return e.join(".")}}class im{constructor(){this.width=1,this.style=IA,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(A,e=[0,0,0,0]){if(A instanceof Vt)this.width=0;else if("number"==typeof A){if(A>0){const t=(e[2]-e[0])/2,i=(e[3]-e[1])/2;t>0&&i>0&&(A>t||A>i)&&(gt(`AnnotationBorderStyle.setWidth - ignoring width: ${A}`),A=1)}this.width=A}}setStyle(A){if(A instanceof Vt)switch(A.name){case"S":this.style=IA;break;case"D":this.style=cA;break;case"B":this.style=CA;break;case"I":this.style=BA;break;case"U":this.style=hA}}setDashArray(A,e=!1){if(Array.isArray(A)){let t=!0,i=!0;for(const e of A){if(!(+e>=0)){t=!1;break}e>0&&(i=!1)}0===A.length||t&&!i?(this.dashArray=A,e&&this.setStyle(Vt.get("D"))):this.width=0}else A&&(this.width=0)}setHorizontalCornerRadius(A){Number.isInteger(A)&&(this.horizontalCornerRadius=A)}setVerticalCornerRadius(A){Number.isInteger(A)&&(this.verticalCornerRadius=A)}}class am extends tm{constructor(A){super(A);const{dict:e}=A;if(e.has("IRT")){const A=e.getRaw("IRT");this.data.inReplyTo=A instanceof $t?A.toString():null;const t=e.get("RT");this.data.replyType=t instanceof Vt?t.name:W}let t=null;if(this.data.replyType===P){const A=e.get("IRT");this.setTitle(A.get("T")),this.data.titleObj=this._title,this.setContents(A.get("Contents")),this.data.contentsObj=this._contents,A.has("CreationDate")?(this.setCreationDate(A.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,A.has("M")?(this.setModificationDate(A.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,t=A.getRaw("Popup"),A.has("C")?(this.setColor(A.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(e.get("CreationDate")),this.data.creationDate=this.creationDate,t=e.getRaw("Popup"),e.has("C")||(this.data.color=null);this.data.popupRef=t instanceof $t?t.toString():null,e.has("RC")&&(this.data.richText=jp.getRichTextAsHtml(e.get("RC")))}setCreationDate(A){this.creationDate="string"==typeof A?A:null}_setDefaultAppearance({xref:A,extra:e,strokeColor:t,fillColor:i,blendMode:a,strokeAlpha:s,fillAlpha:n,pointsCallback:g}){let r=Number.MAX_VALUE,o=Number.MAX_VALUE,I=Number.MIN_VALUE,c=Number.MIN_VALUE;const C=["q"];e&&C.push(e),t&&C.push(`${t[0]} ${t[1]} ${t[2]} RG`),i&&C.push(`${i[0]} ${i[1]} ${i[2]} rg`);let B=this.data.quadPoints;B||(B=Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]));for(let A=0,e=B.length;A<e;A+=8){const[e,t,i,a]=g(C,B.subarray(A,A+8));r=Math.min(r,e),I=Math.max(I,t),o=Math.min(o,i),c=Math.max(c,a)}C.push("Q");const h=new _t(A),Q=new _t(A);Q.set("Subtype",Vt.get("Form"));const l=new Wi(C.join(" "));l.dict=Q,h.set("Fm0",l);const E=new _t(A);a&&E.set("BM",Vt.get(a)),"number"==typeof s&&E.set("CA",s),"number"==typeof n&&E.set("ca",n);const u=new _t(A);u.set("GS0",E);const d=new _t(A);d.set("ExtGState",u),d.set("XObject",h);const f=new _t(A);f.set("Resources",d);const p=this.data.rect=[r,o,I,c];f.set("BBox",p),this.appearance=new Wi("/GS0 gs /Fm0 Do"),this.appearance.dict=f,this._streams.push(this.appearance,l)}static async createNewAnnotation(A,e,t,i){const a=e.ref||=A.getNewTemporaryRef(),s=await this.createNewAppearanceStream(e,A,i),n=[];let g;if(s){const i=A.getNewTemporaryRef();g=this.createNewDict(e,A,{apRef:i}),await _c(i,s,n,A),t.push({ref:i,data:n.join("")})}else g=this.createNewDict(e,A,{});return Number.isInteger(e.parentTreeId)&&g.set("StructParent",e.parentTreeId),n.length=0,await _c(a,g,n,A),{ref:a,data:n.join("")}}static async createNewPrintAnnotation(A,e,t,i){const a=await this.createNewAppearanceStream(t,e,i),s=this.createNewDict(t,e,{ap:a}),n=new this.prototype.constructor({dict:s,xref:e,annotationGlobals:A,evaluatorOptions:i.evaluatorOptions});return t.ref&&(n.ref=n.refToReplace=t.ref),n}}class sm extends tm{constructor(A){super(A);const{dict:e,xref:t,annotationGlobals:i}=A,a=this.data;this._needAppearances=A.needAppearances,a.annotationType=T,void 0===a.fieldName&&(a.fieldName=this._constructFieldName(e)),void 0===a.actions&&(a.actions=Ri(t,e,QA));let s=hi({dict:e,key:"V",getArray:!0});a.fieldValue=this._decodeFormValue(s);const n=hi({dict:e,key:"DV",getArray:!0});if(a.defaultFieldValue=this._decodeFormValue(n),void 0===s&&i.xfaDatasets){const A=this._title.str;A&&(this._hasValueFromXFA=!0,a.fieldValue=s=i.xfaDatasets.getValue(A))}void 0===s&&null!==a.defaultFieldValue&&(a.fieldValue=a.defaultFieldValue),a.alternativeText=Ft(e.get("TU")||""),this.setDefaultAppearance(A),a.hasAppearance||=this._needAppearances&&void 0!==a.fieldValue&&null!==a.fieldValue;const g=hi({dict:e,key:"FT"});a.fieldType=g instanceof Vt?g.name:null;const r=hi({dict:e,key:"DR"}),o=i.acroForm.get("DR"),I=this.appearance?.dict.get("Resources");this._fieldResources={localResources:r,acroFormResources:o,appearanceResources:I,mergedResources:_t.merge({xref:t,dictArray:[r,I,o],mergeSubDicts:!0})},a.fieldFlags=hi({dict:e,key:"Ff"}),(!Number.isInteger(a.fieldFlags)||a.fieldFlags<0)&&(a.fieldFlags=0),a.readOnly=this.hasFieldFlag($),a.required=this.hasFieldFlag(AA),a.hidden=this._hasFlag(a.annotationFlags,O)||this._hasFlag(a.annotationFlags,j)}_decodeFormValue(A){return Array.isArray(A)?A.filter(A=>"string"==typeof A).map(A=>Ft(A)):A instanceof Vt?Ft(A.name):"string"==typeof A?Ft(A):null}hasFieldFlag(A){return!!(this.data.fieldFlags&A)}_isViewable(A){return!0}mustBeViewed(A,e){return e?this.viewable:super.mustBeViewed(A,e)&&!this._hasFlag(this.flags,j)}getRotationMatrix(A){let e=A?.get(this.data.id)?.rotation;if(void 0===e&&(e=this.rotation),0===e)return i;return qi(e,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1])}getBorderAndBackgroundAppearances(A){let e=A?.get(this.data.id)?.rotation;if(void 0===e&&(e=this.rotation),!this.backgroundColor&&!this.borderColor)return"";const t=this.data.rect[2]-this.data.rect[0],i=this.data.rect[3]-this.data.rect[1],a=0===e||180===e?`0 0 ${t} ${i} re`:`0 0 ${i} ${t} re`;let s="";if(this.backgroundColor&&(s=`${Ec(this.backgroundColor,!0)} ${a} f `),this.borderColor){s+=`${this.borderStyle.width||1} w ${Ec(this.borderColor,!1)} ${a} S `}return s}async getOperatorList(A,e,t,i,a){if(i&&!(this instanceof om)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new zI,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(A,e,t,i,a);const s=await this._getAppearance(A,e,t,a);if(this.appearance&&null===s)return super.getOperatorList(A,e,t,i,a);const n=new zI;if(!this._defaultAppearance||null===s)return{opList:n,separateForm:!1,separateCanvas:!1};const g=!!(this.data.hasOwnCanvas&&t&o),r=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],I=em(this.data.rect,r,[1,0,0,1,0,0]);let c;this.oc&&(c=await A.parseMarkedContentProps(this.oc,null)),void 0!==c&&n.addOp(Je,["OC",c]),n.addOp(We,[this.data.id,this.data.rect,I,this.getRotationMatrix(a),g]);const C=new Wi(s);return await A.getOperatorList({stream:C,task:e,resources:this._fieldResources.mergedResources,operatorList:n}),n.addOp(Ze,[]),void 0!==c&&n.addOp(He,[]),{opList:n,separateForm:!1,separateCanvas:g}}_getMKDict(A){const e=new _t(null);return A&&e.set("R",A),this.borderColor&&e.set("BC",$p(this.borderColor)),this.backgroundColor&&e.set("BG",$p(this.backgroundColor)),e.size>0?e:null}amendSavedDict(A,e){}async save(A,e,t){const a=t?.get(this.data.id);let s=a?.value,n=a?.rotation;if(s===this.data.fieldValue||void 0===s){if(!this._hasValueFromXFA&&void 0===n)return null;s||=this.data.fieldValue}if(void 0===n&&!this._hasValueFromXFA&&Array.isArray(s)&&Array.isArray(this.data.fieldValue)&&s.length===this.data.fieldValue.length&&s.every((A,e)=>A===this.data.fieldValue[e]))return null;void 0===n&&(n=this.rotation);let g=null;if(!this._needAppearances&&(g=await this._getAppearance(A,e,c,t),null===g))return null;let r=!1;g?.needAppearances&&(r=!0,g=null);const{xref:o}=A,I=o.fetchIfRef(this.ref);if(!(I instanceof _t))return null;const C=new _t(o);for(const A of I.getKeys())"AP"!==A&&C.set(A,I.getRaw(A));const B={path:this.data.fieldName,value:s},h=A=>Yi(A)?A:Ki(A,!0);C.set("V",Array.isArray(s)?s.map(h):h(s)),this.amendSavedDict(t,C);const Q=this._getMKDict(n);Q&&C.set("MK",Q);const l=[],E=[{ref:this.ref,data:"",xfa:B,needAppearances:r}];if(null!==g){const A=o.getNewTemporaryRef(),e=new _t(o);C.set("AP",e),e.set("N",A);const a=this._getSaveFieldResources(o),s=new Wi(g),n=s.dict=new _t(o);n.set("Subtype",Vt.get("Form")),n.set("Resources",a),n.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]);const r=this.getRotationMatrix(t);r!==i&&n.set("Matrix",r),await _c(A,s,l,o),E.push({ref:A,data:l.join(""),xfa:null,needAppearances:!1}),l.length=0}return C.set("M",`D:${Nt()}`),await _c(this.ref,C,l,o),E[0].data=l.join(""),E}async _getAppearance(A,e,t,i){if(this.hasFieldFlag(tA))return null;const a=i?.get(this.data.id);let s,n;if(a&&(s=a.formattedValue||a.value,n=a.rotation),void 0===n&&void 0===s&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const r=this.getBorderAndBackgroundAppearances(i);if(void 0===s&&(s=this.data.fieldValue,!s))return`/Tx BMC q ${r}Q EMC`;if(Array.isArray(s)&&1===s.length&&(s=s[0]),ot("string"==typeof s,"Expected `value` to be a string."),s=s.trim(),this.data.combo){const A=this.data.options.find(({exportValue:A})=>s===A);s=A?.displayValue||s}if(""===s)return`/Tx BMC q ${r}Q EMC`;void 0===n&&(n=this.rotation);let o,I=-1;this.data.multiLine?(o=s.split(/\r\n?|\n/).map(A=>A.normalize("NFC")),I=o.length):o=[s.replace(/\r\n?|\n/,"").normalize("NFC")];let C=this.data.rect[3]-this.data.rect[1],B=this.data.rect[2]-this.data.rect[0];90!==n&&270!==n||([B,C]=[C,B]),this._defaultAppearance||(this.data.defaultAppearanceData=Qc(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let h,Q,l,E=await sm._getFontData(A,e,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const u=[];let d=!1;for(const A of o){const e=E.encodeString(A);e.length>1&&(d=!0),u.push(e.join(""))}if(d&&t&c)return{needAppearances:!0};if(d&&this._isOffscreenCanvasSupported){const t=this.data.comb?"monospace":"sans-serif",i=new uc(A.xref,t),a=i.createFontResources(o.join("")),n=a.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const A=this._fieldResources.mergedResources.get("Font");for(const e of n.getKeys())A.set(e,n.getRaw(e))}else this._fieldResources.mergedResources.set("Font",n);const g=i.fontName.name;E=await sm._getFontData(A,e,{fontName:g,fontSize:0},a);for(let A=0,e=u.length;A<e;A++)u[A]=Ki(o[A]);const r=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=g,[h,Q,l]=this._computeFontSize(C-2,B-4,s,E,I),this.data.defaultAppearanceData=r}else this._isOffscreenCanvasSupported||gt("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."),[h,Q,l]=this._computeFontSize(C-2,B-4,s,E,I);let f=E.descent;f=isNaN(f)?g*l:Math.max(g*l,Math.abs(f)*Q);const p=Math.min(Math.floor((C-Q)/2),1),m=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(h,u,E,Q,B,C,m,2,p,f,l,i);if(this.data.comb)return this._getCombAppearance(h,E,u[0],Q,B,C,2,p,f,l,i);const y=p+f;if(0===m||m>2)return`/Tx BMC q ${r}BT `+h+` 1 0 0 1 ${Ji(2)} ${Ji(y)} Tm (${Fi(u[0])}) Tj ET Q EMC`;return`/Tx BMC q ${r}BT `+h+` 1 0 0 1 0 0 Tm ${this._renderText(u[0],E,Q,B,m,{shift:0},2,y)} ET Q EMC`}static async _getFontData(A,e,t,i){const a=new zI,s={font:null,clone(){return this}},{fontName:n,fontSize:g}=t;return await A.handleSetFont(i,[n&&Vt.get(n),g],null,a,e,s,null),s.font}_getTextWidth(A,e){return e.charsToGlyphs(A).reduce((A,e)=>A+e.width,0)/1e3}_computeFontSize(A,e,t,i,a){let{fontSize:n}=this.data.defaultAppearanceData,g=(n||12)*s,r=Math.round(A/g);if(!n){const o=A=>Math.floor(100*A)/100;if(-1===a){const a=this._getTextWidth(t,i);n=o(Math.min(A/s,a>e?e/a:1/0)),r=1}else{const I=t.split(/\r\n?|\n/),c=[];for(const A of I){const e=i.encodeString(A).join(""),t=i.charsToGlyphs(e),a=i.getCharPositions(e);c.push({line:e,glyphs:t,positions:a})}const C=t=>{let a=0;for(const s of c){if(a+=this._splitLine(null,i,t,e,s).length*t,a>A)return!0}return!1};for(r=Math.max(r,a);g=A/r,n=o(g/s),C(n);)r++}const{fontName:I,fontColor:c}=this.data.defaultAppearanceData;this._defaultAppearance=function({fontSize:A,fontName:e,fontColor:t}){return`/${ki(e)} ${A} Tf ${Ec(t,!0)}`}({fontSize:n,fontName:I,fontColor:c})}return[this._defaultAppearance,n,A/r]}_renderText(A,e,t,i,a,s,n,g){let r;if(1===a){r=(i-this._getTextWidth(A,e)*t)/2}else if(2===a){r=i-this._getTextWidth(A,e)*t-n}else r=n;const o=Ji(r-s.shift);return s.shift=r,`${o} ${g=Ji(g)} Td (${Fi(A)}) Tj`}_getSaveFieldResources(A){const{localResources:e,appearanceResources:t,acroFormResources:i}=this._fieldResources,a=this.data.defaultAppearanceData?.fontName;if(!a)return e||_t.empty;for(const A of[e,t])if(A instanceof _t){const e=A.get("Font");if(e instanceof _t&&e.has(a))return A}if(i instanceof _t){const t=i.get("Font");if(t instanceof _t&&t.has(a)){const i=new _t(A);i.set(a,t.getRaw(a));const s=new _t(A);return s.set("Font",i),_t.merge({xref:A,dictArray:[s,e],mergeSubDicts:!0})}}return e||_t.empty}getFieldObject(){return null}}class nm extends sm{constructor(A){super(A);const{dict:e}=A;e.has("PMD")&&(this.flags|=O,this.data.hidden=!0,gt("Barcodes are not supported")),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0,"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let t=hi({dict:e,key:"Q"});(!Number.isInteger(t)||t<0||t>2)&&(t=null),this.data.textAlignment=t;let i=hi({dict:e,key:"MaxLen"});(!Number.isInteger(i)||i<0)&&(i=0),this.data.maxLen=i,this.data.multiLine=this.hasFieldFlag(eA),this.data.comb=this.hasFieldFlag(oA)&&!this.hasFieldFlag(eA)&&!this.hasFieldFlag(tA)&&!this.hasFieldFlag(nA)&&0!==this.data.maxLen,this.data.doNotScroll=this.hasFieldFlag(rA)}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(A,e,t,i,a,s,n,g,r,o,I){const c=a/this.data.maxLen,C=this.getBorderAndBackgroundAppearances(I),B=[],h=e.getCharPositions(t);for(const[A,e]of h)B.push(`(${Fi(t.substring(A,e))}) Tj`);const Q=B.join(` ${Ji(c)} 0 Td `);return`/Tx BMC q ${C}BT `+A+` 1 0 0 1 ${Ji(n)} ${Ji(g+r)} Tm ${Q} ET Q EMC`}_getMultilineAppearance(A,e,t,i,a,s,n,g,r,o,I,c){const C=[],B=a-2*g,h={shift:0};for(let A=0,s=e.length;A<s;A++){const s=e[A],c=this._splitLine(s,t,i,B);for(let e=0,s=c.length;e<s;e++){const s=c[e],B=0===A&&0===e?-r-(I-o):-I;C.push(this._renderText(s,t,i,a,n,h,g,B))}}const Q=this.getBorderAndBackgroundAppearances(c),l=C.join("\n");return`/Tx BMC q ${Q}BT `+A+` 1 0 0 1 0 ${Ji(s)} Tm ${l} ET Q EMC`}_splitLine(A,e,t,i,a={}){A=a.line||A;const s=a.glyphs||e.charsToGlyphs(A);if(s.length<=1)return[A];const n=a.positions||e.getCharPositions(A),g=t/1e3,r=[];let o=-1,I=-1,c=-1,C=0,B=0;for(let e=0,t=s.length;e<t;e++){const[t,a]=n[e],h=s[e],Q=h.width*g;" "===h.unicode?B+Q>i?(r.push(A.substring(C,t)),C=t,B=Q,o=-1,c=-1):(B+=Q,o=t,I=a,c=e):B+Q>i?-1!==o?(r.push(A.substring(C,I)),C=I,e=c+1,o=-1,B=0):(r.push(A.substring(C,t)),C=t,B=Q):B+=Q}return C<A.length&&r.push(A.substring(C,A.length)),r}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.hasFieldFlag(tA),charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:"text"}}}class gm extends sm{constructor(A){super(A),this.checkedAppearance=null,this.uncheckedAppearance=null,this.data.checkBox=!this.hasFieldFlag(iA)&&!this.hasFieldFlag(aA),this.data.radioButton=this.hasFieldFlag(iA)&&!this.hasFieldFlag(aA),this.data.pushButton=this.hasFieldFlag(aA),this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(A):this.data.radioButton?this._processRadioButton(A):this.data.pushButton?(this.data.hasOwnCanvas=!0,this.data.noHTML=!1,this._processPushButton(A)):gt("Invalid field flags for button widget annotation")}async getOperatorList(A,e,t,a,s){if(this.data.pushButton)return super.getOperatorList(A,e,t,!1,s);let n=null,g=null;if(s){const A=s.get(this.data.id);n=A?A.value:null,g=A?A.rotation:null}if(null===n&&this.appearance)return super.getOperatorList(A,e,t,a,s);null==n&&(n=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const r=n?this.checkedAppearance:this.uncheckedAppearance;if(r){const n=this.appearance,o=yi(r.dict.getArray("Matrix"),i);g&&r.dict.set("Matrix",this.getRotationMatrix(s)),this.appearance=r;const I=super.getOperatorList(A,e,t,a,s);return this.appearance=n,r.dict.set("Matrix",o),I}return{opList:new zI,separateForm:!1,separateCanvas:!1}}async save(A,e,t){return this.data.checkBox?this._saveCheckbox(A,e,t):this.data.radioButton?this._saveRadioButton(A,e,t):null}async _saveCheckbox(A,e,t){if(!t)return null;const i=t.get(this.data.id);let a=i?.rotation,s=i?.value;if(void 0===a){if(void 0===s)return null;if(this.data.fieldValue===this.data.exportValue===s)return null}const n=A.xref.fetchIfRef(this.ref);if(!(n instanceof _t))return null;void 0===a&&(a=this.rotation),void 0===s&&(s=this.data.fieldValue===this.data.exportValue);const g={path:this.data.fieldName,value:s?this.data.exportValue:""},r=Vt.get(s?this.data.exportValue:"Off");n.set("V",r),n.set("AS",r),n.set("M",`D:${Nt()}`);const o=this._getMKDict(a);o&&n.set("MK",o);const I=[];return await _c(this.ref,n,I,A.xref),[{ref:this.ref,data:I.join(""),xfa:g}]}async _saveRadioButton(A,e,t){if(!t)return null;const i=t.get(this.data.id);let a=i?.rotation,s=i?.value;if(void 0===a){if(void 0===s)return null;if(this.data.fieldValue===this.data.buttonValue===s)return null}const n=A.xref.fetchIfRef(this.ref);if(!(n instanceof _t))return null;void 0===s&&(s=this.data.fieldValue===this.data.buttonValue),void 0===a&&(a=this.rotation);const g={path:this.data.fieldName,value:s?this.data.buttonValue:""},r=Vt.get(s?this.data.buttonValue:"Off"),o=[];let I=null;if(s)if(this.parent instanceof $t){const e=A.xref.fetch(this.parent);e.set("V",r),await _c(this.parent,e,o,A.xref),I=o.join(""),o.length=0}else this.parent instanceof _t&&this.parent.set("V",r);n.set("AS",r),n.set("M",`D:${Nt()}`);const c=this._getMKDict(a);c&&n.set("MK",c),await _c(this.ref,n,o,A.xref);const C=[{ref:this.ref,data:o.join(""),xfa:g}];return I&&C.push({ref:this.parent,data:I,xfa:null}),C}_getDefaultCheckedAppearance(A,e){const t=this.data.rect[2]-this.data.rect[0],i=this.data.rect[3]-this.data.rect[1],a=[0,0,t,i],s=.8*Math.min(t,i);let n,g;"check"===e?(n={width:.755*s,height:.705*s},g="3"):"disc"===e?(n={width:.791*s,height:.705*s},g="l"):rt(`_getDefaultCheckedAppearance - unsupported type: ${e}`);const r=`q BT /PdfJsZaDb ${s} Tf 0 g ${Ji((t-n.width)/2)} ${Ji((i-n.height)/2)} Td (${g}) Tj ET Q`,o=new _t(A.xref);o.set("FormType",1),o.set("Subtype",Vt.get("Form")),o.set("Type",Vt.get("XObject")),o.set("BBox",a),o.set("Matrix",[1,0,0,1,0,0]),o.set("Length",r.length);const I=new _t(A.xref),c=new _t(A.xref);c.set("PdfJsZaDb",this.fallbackFontDict),I.set("Font",c),o.set("Resources",I),this.checkedAppearance=new Wi(r),this.checkedAppearance.dict=o,this._streams.push(this.checkedAppearance)}_processCheckBox(A){const e=A.dict.get("AP");if(!(e instanceof _t))return;const t=e.get("N");if(!(t instanceof _t))return;const i=this._decodeFormValue(A.dict.get("AS"));"string"==typeof i&&(this.data.fieldValue=i);const a=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",s=t.getKeys();if(0===s.length)s.push("Off",a);else if(1===s.length)"Off"===s[0]?s.push(a):s.unshift("Off");else if(s.includes(a))s.length=0,s.push("Off",a);else{const A=s.find(A=>"Off"!==A);s.length=0,s.push("Off",A)}s.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=s[1];const n=t.get(this.data.exportValue);this.checkedAppearance=n instanceof ni?n:null;const g=t.get("Off");this.uncheckedAppearance=g instanceof ni?g:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(A,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(A){this.data.buttonValue=null;const e=A.dict.get("Parent");if(e instanceof _t){this.parent=A.dict.getRaw("Parent");const t=e.get("V");t instanceof Vt&&(this.data.fieldValue=this._decodeFormValue(t))}const t=A.dict.get("AP");if(!(t instanceof _t))return;const i=t.get("N");if(!(i instanceof _t))return;for(const A of i.getKeys())if("Off"!==A){this.data.buttonValue=this._decodeFormValue(A);break}const a=i.get(this.data.buttonValue);this.checkedAppearance=a instanceof ni?a:null;const s=i.get("Off");this.uncheckedAppearance=s instanceof ni?s:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(A,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(A){const{dict:e,annotationGlobals:t}=A;e.has("A")||e.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!e.has("A")&&!e.has("AA"),pC.parseDestDictionary({destDict:e,resultObj:this.data,docBaseUrl:t.baseUrl,docAttachments:t.attachments})):gt("Push buttons without action dictionaries are not supported")}getFieldObject(){let A,e="button";return this.data.checkBox?(e="checkbox",A=this.data.exportValue):this.data.radioButton&&(e="radiobutton",A=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:A,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}get fallbackFontDict(){const A=new _t;return A.set("BaseFont",Vt.get("ZapfDingbats")),A.set("Type",Vt.get("FallbackType")),A.set("Subtype",Vt.get("FallbackType")),A.set("Encoding",Vt.get("ZapfDingbatsEncoding")),ct(this,"fallbackFontDict",A)}}class rm extends sm{constructor(A){super(A);const{dict:e,xref:t}=A;this.indices=e.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];const i=hi({dict:e,key:"Opt"});if(Array.isArray(i))for(let A=0,e=i.length;A<e;A++){const e=t.fetchIfRef(i[A]),a=Array.isArray(e);this.data.options[A]={exportValue:this._decodeFormValue(a?t.fetchIfRef(e[0]):e),displayValue:this._decodeFormValue(a?t.fetchIfRef(e[1]):e)}}if(this.hasIndices){this.data.fieldValue=[];const A=this.data.options.length;for(const e of this.indices)Number.isInteger(e)&&e>=0&&e<A&&this.data.fieldValue.push(this.data.options[e].exportValue)}else"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||(this.data.fieldValue=[]);this.data.combo=this.hasFieldFlag(sA),this.data.multiSelect=this.hasFieldFlag(gA),this._hasText=!0}getFieldObject(){const A=this.data.combo?"combobox":"listbox",e=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:e,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:A}}amendSavedDict(A,e){if(!this.hasIndices)return;let t=A?.get(this.data.id)?.value;Array.isArray(t)||(t=[t]);const i=[],{options:a}=this.data;for(let A=0,e=0,s=a.length;A<s;A++)a[A].exportValue===t[e]&&(i.push(A),e+=1);e.set("I",i)}async _getAppearance(A,e,t,i){if(this.data.combo)return super._getAppearance(A,e,t,i);let a,n;const g=i?.get(this.data.id);if(g&&(n=g.rotation,a=g.value),void 0===n&&void 0===a&&!this._needAppearances)return null;void 0===a?a=this.data.fieldValue:Array.isArray(a)||(a=[a]);let r=this.data.rect[3]-this.data.rect[1],o=this.data.rect[2]-this.data.rect[0];90!==n&&270!==n||([o,r]=[r,o]);const I=this.data.options.length,c=[];for(let A=0;A<I;A++){const{exportValue:e}=this.data.options[A];a.includes(e)&&c.push(A)}this._defaultAppearance||(this.data.defaultAppearanceData=Qc(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const C=await sm._getFontData(A,e,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let B,{fontSize:h}=this.data.defaultAppearanceData;if(h)B=this._defaultAppearance;else{const A=(r-1)/I;let e,t=-1;for(const{displayValue:A}of this.data.options){const i=this._getTextWidth(A,C);i>t&&(t=i,e=A)}[B,h]=this._computeFontSize(A,o-4,e,C,-1)}const Q=h*s,l=(Q-h)/2,E=Math.floor(r/Q);let u=0;if(c.length>0){const A=Math.min(...c),e=Math.max(...c);u=Math.max(0,e-E+1),u>A&&(u=A)}const d=Math.min(u+E+1,I),f=["/Tx BMC q",`1 1 ${o} ${r} re W n`];if(c.length){f.push("0.600006 0.756866 0.854904 rg");for(const A of c)u<=A&&A<d&&f.push(`1 ${r-(A-u+1)*Q} ${o} ${Q} re f`)}f.push("BT",B,`1 0 0 1 0 ${r} Tm`);const p={shift:0};for(let A=u;A<d;A++){const{displayValue:e}=this.data.options[A],t=A===u?l:0;f.push(this._renderText(e,C,h,o,0,p,2,-Q+t))}return f.push("ET Q EMC"),f.join("\n")}}class om extends sm{constructor(A){super(A),this.data.fieldValue=null,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!this.data.hasOwnCanvas}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class Im extends am{constructor(A){super(A),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;const{dict:e}=A;this.data.annotationType=b,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=e.has("Name")?e.get("Name").name:"Note"),e.has("State")?(this.data.state=e.get("State")||null,this.data.stateModel=e.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}}class cm extends tm{constructor(A){super(A);const{dict:e,annotationGlobals:t}=A;this.data.annotationType=k,this.data.noHTML=!1;const i=Am(e,this.rectangle);i&&(this.data.quadPoints=i),this.data.borderColor||=this.data.color,pC.parseDestDictionary({destDict:e,resultObj:this.data,docBaseUrl:t.baseUrl,docAttachments:t.attachments})}}class Cm extends tm{constructor(A){super(A);const{dict:e}=A;this.data.annotationType=K,this.data.noHTML=!1,this.data.rect[0]!==this.data.rect[2]&&this.data.rect[1]!==this.data.rect[3]||(this.data.rect=null);let t=e.get("Parent");if(!t)return void gt("Popup annotation has a missing or invalid parent annotation.");this.data.parentRect=Di(t.getArray("Rect"),null);if(ti(t.get("RT"),P)&&(t=t.get("IRT")),t.has("M")?(this.setModificationDate(t.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,t.has("C")?(this.setColor(t.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){const A=t.get("F");this._isViewable(A)&&this.setFlags(A)}this.setTitle(t.get("T")),this.data.titleObj=this._title,this.setContents(t.get("Contents")),this.data.contentsObj=this._contents,t.has("RC")&&(this.data.richText=jp.getRichTextAsHtml(t.get("RC"))),this.data.open=!!e.get("Open")}}class Bm extends am{constructor(A){super(A),this.data.hasOwnCanvas=!this.data.noHTML,this.data.noHTML=!1;const{evaluatorOptions:e,xref:t}=A;if(this.data.annotationType=F,this.setDefaultAppearance(A),this._hasAppearance=!!this.appearance,this._hasAppearance){const{fontColor:A,fontSize:i}=function(A,e,t){return new lc(A,e,t).parse()}(this.appearance,e,t);this.data.defaultAppearanceData.fontColor=A,this.data.defaultAppearanceData.fontSize=i||10}else{this.data.defaultAppearanceData.fontSize||=10;const{fontColor:e,fontSize:i}=this.data.defaultAppearanceData;if(this._contents.str){this.data.textContent=this._contents.str.split(/\r\n?|\n/).map(A=>A.trimEnd());const{coords:A,bbox:e,matrix:t}=uc.getFirstPositionInfo(this.rectangle,this.rotation,i);this.data.textPosition=this._transformPoint(A,e,t)}if(this._isOffscreenCanvasSupported){const a=A.dict.get("CA"),s=new uc(t,"sans-serif");this.appearance=s.createAppearance(this._contents.str,this.rectangle,this.rotation,i,e,a),this._streams.push(this.appearance)}else gt("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}}get hasTextContent(){return this._hasAppearance}static createNewDict(A,e,{apRef:t,ap:i}){const{color:a,fontSize:s,rect:n,rotation:g,user:r,value:o}=A,I=new _t(e);I.set("Type",Vt.get("Annot")),I.set("Subtype",Vt.get("FreeText")),I.set("CreationDate",`D:${Nt()}`),I.set("Rect",n);const c=`/Helv ${s} Tf ${Ec(a,!0)}`;if(I.set("DA",c),I.set("Contents",Yi(o)?o:Ki(o,!0)),I.set("F",4),I.set("Border",[0,0,0]),I.set("Rotate",g),r&&I.set("T",Yi(r)?r:Ki(r,!0)),t||i){const A=new _t(e);I.set("AP",A),t?A.set("N",t):A.set("N",i)}return I}static async createNewAppearanceStream(A,e,t){const{baseFontRef:i,evaluator:a,task:n}=t,{color:g,fontSize:r,rect:o,rotation:I,value:c}=A,C=new _t(e),B=new _t(e);if(i)B.set("Helv",i);else{const A=new _t(e);A.set("BaseFont",Vt.get("Helvetica")),A.set("Type",Vt.get("Font")),A.set("Subtype",Vt.get("Type1")),A.set("Encoding",Vt.get("WinAnsiEncoding")),B.set("Helv",A)}C.set("Font",B);const h=await sm._getFontData(a,n,{fontName:"Helv",fontSize:r},C),[Q,l,E,u]=o;let d=E-Q,f=u-l;I%180!=0&&([d,f]=[f,d]);const p=c.split("\n"),m=r/1e3;let y=-1/0;const w=[];for(let A of p){const e=h.encodeString(A);if(e.length>1)return null;A=e.join(""),w.push(A);let t=0;const i=h.charsToGlyphs(A);for(const A of i)t+=A.width*m;y=Math.max(y,t)}let D=1;y>d&&(D=d/y);let b=1;const k=s*r,F=1*r,S=k*p.length;S>f&&(b=f/S);const R=r*Math.min(D,b);let G,N,x;switch(I){case 0:x=[1,0,0,1],N=[o[0],o[1],d,f],G=[o[0],o[3]-F];break;case 90:x=[0,1,-1,0],N=[o[1],-o[2],d,f],G=[o[1],-o[0]-F];break;case 180:x=[-1,0,0,-1],N=[-o[2],-o[3],d,f],G=[-o[2],-o[1]-F];break;case 270:x=[0,-1,1,0],N=[-o[3],o[0],d,f],G=[-o[3],o[2]-F]}const U=["q",`${x.join(" ")} 0 0 cm`,`${N.join(" ")} re W n`,"BT",`${Ec(g,!0)}`,`0 Tc /Helv ${Ji(R)} Tf`];U.push(`${G.join(" ")} Td (${Fi(w[0])}) Tj`);const M=Ji(k);for(let A=1,e=w.length;A<e;A++){const e=w[A];U.push(`0 -${M} Td (${Fi(e)}) Tj`)}U.push("ET","Q");const L=U.join("\n"),J=new _t(e);J.set("FormType",1),J.set("Subtype",Vt.get("Form")),J.set("Type",Vt.get("XObject")),J.set("BBox",o),J.set("Resources",C),J.set("Matrix",[1,0,0,1,-o[0],-o[1]]);const H=new Wi(L);return H.dict=J,H}}class hm extends am{constructor(A){super(A);const{dict:e,xref:t}=A;this.data.annotationType=S,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;const i=wi(e.getArray("L"),[0,0,0,0]);if(this.data.lineCoordinates=bt.normalizeRect(i),this.setLineEndings(e.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){const A=this.color?$p(this.color):[0,0,0],a=e.get("CA"),s=_p(e.getArray("IC"),null),n=s?$p(s):null,g=n?a:null,r=this.borderStyle.width||1,o=2*r,I=[this.data.lineCoordinates[0]-o,this.data.lineCoordinates[1]-o,this.data.lineCoordinates[2]+o,this.data.lineCoordinates[3]+o];bt.intersect(this.rectangle,I)||(this.rectangle=I),this._setDefaultAppearance({xref:t,extra:`${r} w`,strokeColor:A,fillColor:n,strokeAlpha:a,fillAlpha:g,pointsCallback:(A,e)=>(A.push(`${i[0]} ${i[1]} m`,`${i[2]} ${i[3]} l`,"S"),[e[0]-r,e[2]+r,e[7]-r,e[3]+r])})}}}class Qm extends am{constructor(A){super(A);const{dict:e,xref:t}=A;if(this.data.annotationType=R,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA"),a=_p(e.getArray("IC"),null),s=a?$p(a):null,n=s?i:null;if(0===this.borderStyle.width&&!s)return;this._setDefaultAppearance({xref:t,extra:`${this.borderStyle.width} w`,strokeColor:A,fillColor:s,strokeAlpha:i,fillAlpha:n,pointsCallback:(A,e)=>{const t=e[4]+this.borderStyle.width/2,i=e[5]+this.borderStyle.width/2,a=e[6]-e[4]-this.borderStyle.width,n=e[3]-e[7]-this.borderStyle.width;return A.push(`${t} ${i} ${a} ${n} re`),s?A.push("B"):A.push("S"),[e[0],e[2],e[7],e[3]]}})}}}class lm extends am{constructor(A){super(A);const{dict:e,xref:t}=A;if(this.data.annotationType=G,!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA"),a=_p(e.getArray("IC"),null),s=a?$p(a):null,n=s?i:null;if(0===this.borderStyle.width&&!s)return;const g=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:t,extra:`${this.borderStyle.width} w`,strokeColor:A,fillColor:s,strokeAlpha:i,fillAlpha:n,pointsCallback:(A,e)=>{const t=e[0]+this.borderStyle.width/2,i=e[1]-this.borderStyle.width/2,a=e[6]-this.borderStyle.width/2,n=e[7]+this.borderStyle.width/2,r=t+(a-t)/2,o=i+(n-i)/2,I=(a-t)/2*g,c=(n-i)/2*g;return A.push(`${r} ${n} m`,`${r+I} ${n} ${a} ${o+c} ${a} ${o} c`,`${a} ${o-c} ${r+I} ${i} ${r} ${i} c`,`${r-I} ${i} ${t} ${o-c} ${t} ${o} c`,`${t} ${o+c} ${r-I} ${n} ${r} ${n} c`,"h"),s?A.push("B"):A.push("S"),[e[0],e[2],e[7],e[3]]}})}}}class Em extends am{constructor(A){super(A);const{dict:e,xref:t}=A;this.data.annotationType=x,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.vertices=null,this instanceof um||(this.setLineEndings(e.getArray("LE")),this.data.lineEndings=this.lineEndings);const i=e.getArray("Vertices");if(!mi(i,null))return;const a=this.data.vertices=Float32Array.from(i);if(!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA"),s=this.borderStyle.width||1,n=2*s,g=[1/0,1/0,-1/0,-1/0];for(let A=0,e=a.length;A<e;A+=2)g[0]=Math.min(g[0],a[A]-n),g[1]=Math.min(g[1],a[A+1]-n),g[2]=Math.max(g[2],a[A]+n),g[3]=Math.max(g[3],a[A+1]+n);bt.intersect(this.rectangle,g)||(this.rectangle=g),this._setDefaultAppearance({xref:t,extra:`${s} w`,strokeColor:A,strokeAlpha:i,pointsCallback:(A,e)=>{for(let e=0,t=a.length;e<t;e+=2)A.push(`${a[e]} ${a[e+1]} ${0===e?"m":"l"}`);return A.push("S"),[e[0],e[2],e[7],e[3]]}})}}}class um extends Em{constructor(A){super(A),this.data.annotationType=N}}class dm extends am{constructor(A){super(A),this.data.annotationType=Y}}class fm extends am{constructor(A){super(A),this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;const{dict:e,xref:t}=A;this.data.annotationType=v,this.data.inkLists=[];const i=e.getArray("InkList");if(Array.isArray(i)){for(let A=0,e=i.length;A<e;++A){if(!Array.isArray(i[A]))continue;const e=new Float32Array(i[A].length);this.data.inkLists.push(e);for(let a=0,s=i[A].length;a<s;a+=2){const s=t.fetchIfRef(i[A][a]),n=t.fetchIfRef(i[A][a+1]);"number"==typeof s&&"number"==typeof n&&(e[a]=s,e[a+1]=n)}}if(!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA"),a=this.borderStyle.width||1,s=2*a,n=[1/0,1/0,-1/0,-1/0];for(const A of this.data.inkLists)for(let e=0,t=A.length;e<t;e+=2)n[0]=Math.min(n[0],A[e]-s),n[1]=Math.min(n[1],A[e+1]-s),n[2]=Math.max(n[2],A[e]+s),n[3]=Math.max(n[3],A[e+1]+s);bt.intersect(this.rectangle,n)||(this.rectangle=n),this._setDefaultAppearance({xref:t,extra:`${a} w`,strokeColor:A,strokeAlpha:i,pointsCallback:(A,e)=>{for(const e of this.data.inkLists){for(let t=0,i=e.length;t<i;t+=2)A.push(`${e[t]} ${e[t+1]} ${0===t?"m":"l"}`);A.push("S")}return[e[0],e[2],e[7],e[3]]}})}}}static createNewDict(A,e,{apRef:t,ap:i}){const{color:a,opacity:s,paths:n,outlines:g,rect:r,rotation:o,thickness:I}=A,c=new _t(e);c.set("Type",Vt.get("Annot")),c.set("Subtype",Vt.get("Ink")),c.set("CreationDate",`D:${Nt()}`),c.set("Rect",r),c.set("InkList",g?.points||n.map(A=>A.points)),c.set("F",4),c.set("Rotate",o),g&&c.set("IT",Vt.get("InkHighlight"));const C=new _t(e);c.set("BS",C),C.set("W",I),c.set("C",Array.from(a,A=>A/255)),c.set("CA",s);const B=new _t(e);return c.set("AP",B),t?B.set("N",t):B.set("N",i),c}static async createNewAppearanceStream(A,e,t){if(A.outlines)return this.createNewAppearanceStreamForHighlight(A,e,t);const{color:i,rect:a,paths:s,thickness:n,opacity:g}=A,r=[`${n} w 1 J 1 j`,`${Ec(i,!1)}`];1!==g&&r.push("/R0 gs");const o=[];for(const{bezier:A}of s){if(o.length=0,o.push(`${Ji(A[0])} ${Ji(A[1])} m`),2===A.length)o.push(`${Ji(A[0])} ${Ji(A[1])} l S`);else{for(let e=2,t=A.length;e<t;e+=6){const t=A.slice(e,e+6).map(Ji).join(" ");o.push(`${t} c`)}o.push("S")}r.push(o.join("\n"))}const I=r.join("\n"),c=new _t(e);if(c.set("FormType",1),c.set("Subtype",Vt.get("Form")),c.set("Type",Vt.get("XObject")),c.set("BBox",a),c.set("Length",I.length),1!==g){const A=new _t(e),t=new _t(e),i=new _t(e);i.set("CA",g),i.set("Type",Vt.get("ExtGState")),t.set("R0",i),A.set("ExtGState",t),c.set("Resources",A)}const C=new Wi(I);return C.dict=c,C}static async createNewAppearanceStreamForHighlight(A,e,t){const{color:i,rect:a,outlines:{outline:s},opacity:n}=A,g=[`${Ec(i,!0)}`,"/R0 gs"];g.push(`${Ji(s[4])} ${Ji(s[5])} m`);for(let A=6,e=s.length;A<e;A+=6)if(isNaN(s[A])||null===s[A])g.push(`${Ji(s[A+4])} ${Ji(s[A+5])} l`);else{const e=s.slice(A,A+6).map(Ji).join(" ");g.push(`${e} c`)}g.push("h f");const r=g.join("\n"),o=new _t(e);o.set("FormType",1),o.set("Subtype",Vt.get("Form")),o.set("Type",Vt.get("XObject")),o.set("BBox",a),o.set("Length",r.length);const I=new _t(e),c=new _t(e);I.set("ExtGState",c),o.set("Resources",I);const C=new _t(e);c.set("R0",C),C.set("BM",Vt.get("Multiply")),1!==n&&(C.set("ca",n),C.set("Type",Vt.get("ExtGState")));const B=new Wi(r);return B.dict=o,B}}class pm extends am{constructor(A){super(A);const{dict:e,xref:t}=A;this.data.annotationType=U;if(this.data.quadPoints=Am(e,null)){const A=this.appearance?.dict.get("Resources");if(!this.appearance||!A?.has("ExtGState")){this.appearance&&gt("HighlightAnnotation - ignoring built-in appearance stream.");const A=this.color?$p(this.color):[1,1,0],i=e.get("CA");this._setDefaultAppearance({xref:t,fillColor:A,blendMode:"Multiply",fillAlpha:i,pointsCallback:(A,e)=>(A.push(`${e[0]} ${e[1]} m`,`${e[2]} ${e[3]} l`,`${e[6]} ${e[7]} l`,`${e[4]} ${e[5]} l`,"f"),[e[0],e[2],e[7],e[3]])})}}else this.data.popupRef=null}static createNewDict(A,e,{apRef:t,ap:i}){const{color:a,opacity:s,rect:n,rotation:g,user:r,quadPoints:o}=A,I=new _t(e);if(I.set("Type",Vt.get("Annot")),I.set("Subtype",Vt.get("Highlight")),I.set("CreationDate",`D:${Nt()}`),I.set("Rect",n),I.set("F",4),I.set("Border",[0,0,0]),I.set("Rotate",g),I.set("QuadPoints",o),I.set("C",Array.from(a,A=>A/255)),I.set("CA",s),r&&I.set("T",Yi(r)?r:Ki(r,!0)),t||i){const A=new _t(e);I.set("AP",A),A.set("N",t||i)}return I}static async createNewAppearanceStream(A,e,t){const{color:i,rect:a,outlines:s,opacity:n}=A,g=[`${Ec(i,!0)}`,"/R0 gs"],r=[];for(const A of s){r.length=0,r.push(`${Ji(A[0])} ${Ji(A[1])} m`);for(let e=2,t=A.length;e<t;e+=2)r.push(`${Ji(A[e])} ${Ji(A[e+1])} l`);r.push("h"),g.push(r.join("\n"))}g.push("f*");const o=g.join("\n"),I=new _t(e);I.set("FormType",1),I.set("Subtype",Vt.get("Form")),I.set("Type",Vt.get("XObject")),I.set("BBox",a),I.set("Length",o.length);const c=new _t(e),C=new _t(e);c.set("ExtGState",C),I.set("Resources",c);const B=new _t(e);C.set("R0",B),B.set("BM",Vt.get("Multiply")),1!==n&&(B.set("ca",n),B.set("Type",Vt.get("ExtGState")));const h=new Wi(o);return h.dict=I,h}}class mm extends am{constructor(A){super(A);const{dict:e,xref:t}=A;this.data.annotationType=M;if(this.data.quadPoints=Am(e,null)){if(!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA");this._setDefaultAppearance({xref:t,extra:"[] 0 d 0.571 w",strokeColor:A,strokeAlpha:i,pointsCallback:(A,e)=>(A.push(`${e[4]} ${e[5]+1.3} m`,`${e[6]} ${e[7]+1.3} l`,"S"),[e[0],e[2],e[7],e[3]])})}}else this.data.popupRef=null}}class ym extends am{constructor(A){super(A);const{dict:e,xref:t}=A;this.data.annotationType=L;if(this.data.quadPoints=Am(e,null)){if(!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA");this._setDefaultAppearance({xref:t,extra:"[] 0 d 1 w",strokeColor:A,strokeAlpha:i,pointsCallback:(A,e)=>{const t=(e[1]-e[5])/6;let i=t,a=e[4];const s=e[5],n=e[6];A.push(`${a} ${s+i} m`);do{a+=2,i=0===i?t:0,A.push(`${a} ${s+i} l`)}while(a<n);return A.push("S"),[e[4],n,s-2*t,s+2*t]}})}}else this.data.popupRef=null}}class wm extends am{constructor(A){super(A);const{dict:e,xref:t}=A;this.data.annotationType=J;if(this.data.quadPoints=Am(e,null)){if(!this.appearance){const A=this.color?$p(this.color):[0,0,0],i=e.get("CA");this._setDefaultAppearance({xref:t,extra:"[] 0 d 1 w",strokeColor:A,strokeAlpha:i,pointsCallback:(A,e)=>(A.push((e[0]+e[4])/2+" "+(e[1]+e[5])/2+" m",(e[2]+e[6])/2+" "+(e[3]+e[7])/2+" l","S"),[e[0],e[2],e[7],e[3]])})}}else this.data.popupRef=null}}class Dm extends am{constructor(A){super(A),this.data.annotationType=H,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1}static async createImage(A,e){const{width:t,height:i}=A,a=new OffscreenCanvas(t,i),s=a.getContext("2d",{alpha:!0});s.drawImage(A,0,0);const n=s.getImageData(0,0,t,i).data,g=new Uint32Array(n.buffer),r=g.some(wt.isLittleEndian?A=>A>>>24!=255:A=>!!(255&~A));r&&(s.fillStyle="white",s.fillRect(0,0,t,i),s.drawImage(A,0,0));const o=a.convertToBlob({type:"image/jpeg",quality:1}).then(A=>A.arrayBuffer()),I=Vt.get("XObject"),c=Vt.get("Image"),C=new _t(e);C.set("Type",I),C.set("Subtype",c),C.set("BitsPerComponent",8),C.set("ColorSpace",Vt.get("DeviceRGB")),C.set("Filter",Vt.get("DCTDecode")),C.set("BBox",[0,0,t,i]),C.set("Width",t),C.set("Height",i);let B=null;if(r){const A=new Uint8Array(g.length);if(wt.isLittleEndian)for(let e=0,t=g.length;e<t;e++)A[e]=g[e]>>>24;else for(let e=0,t=g.length;e<t;e++)A[e]=255&g[e];const a=new _t(e);a.set("Type",I),a.set("Subtype",c),a.set("BitsPerComponent",8),a.set("ColorSpace",Vt.get("DeviceGray")),a.set("Width",t),a.set("Height",i),B=new Pi(A,0,0,a)}return{imageStream:new Pi(await o,0,0,C),smaskStream:B,width:t,height:i}}static createNewDict(A,e,{apRef:t,ap:i}){const{rect:a,rotation:s,user:n}=A,g=new _t(e);if(g.set("Type",Vt.get("Annot")),g.set("Subtype",Vt.get("Stamp")),g.set("CreationDate",`D:${Nt()}`),g.set("Rect",a),g.set("F",4),g.set("Border",[0,0,0]),g.set("Rotate",s),n&&g.set("T",Yi(n)?n:Ki(n,!0)),t||i){const A=new _t(e);g.set("AP",A),t?A.set("N",t):A.set("N",i)}return g}static async createNewAppearanceStream(A,e,t){const{rotation:i}=A,{imageRef:a,width:s,height:n}=t.image,g=new _t(e),r=new _t(e);g.set("XObject",r),r.set("Im0",a);const o=`q ${s} 0 0 ${n} 0 0 cm /Im0 Do Q`,I=new _t(e);if(I.set("FormType",1),I.set("Subtype",Vt.get("Form")),I.set("Type",Vt.get("XObject")),I.set("BBox",[0,0,s,n]),I.set("Resources",g),i){const A=qi(i,s,n);I.set("Matrix",A)}const c=new Wi(o);return c.dict=I,c}}class bm extends am{constructor(A){super(A);const{dict:e,xref:t}=A,i=new wc(e.get("FS"),t);this.data.annotationType=q,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.file=i.serializable;const a=e.get("Name");this.data.name=a instanceof Vt?Ft(a.name):"PushPin";const s=e.get("ca");this.data.fillAlpha="number"==typeof s&&s>=0&&s<=1?s:null}}function km(A){try{return St(A)}catch(e){return gt(`UTF-8 decoding failed: "${e}".`),A}}class Fm extends Mc{constructor(A){super(A),this.node=null}onEndElement(A){const e=super.onEndElement(A);if(e&&"xfa:datasets"===A)throw this.node=e,new Error("Aborting DatasetXMLParser.")}}class Sm{constructor(A){if(A.datasets)this.node=new Mc({hasAttributes:!0}).parseFromString(A.datasets).documentElement;else{const e=new Fm({hasAttributes:!0});try{e.parseFromString(A["xdp:xdp"])}catch{}this.node=e.node}}getValue(A){if(!this.node||!A)return"";const e=this.node.searchNode(bi(A),0);if(!e)return"";const t=e.firstChild;return"value"===t?.nodeName?e.children.map(A=>km(A.textContent)):km(e.textContent)}}class Rm{#K=null;constructor(A,e){this.stream=A,this.pdfManager=e,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new Ai,this._newPersistentRefNum=null,this._newTemporaryRefNum=null,this._persistentRefsCache=null}getNewPersistentRef(A){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);const e=this._newPersistentRefNum++;return this._cacheMap.set(e,A),$t.get(e,0)}getNewTemporaryRef(){if(null===this._newTemporaryRefNum&&(this._newTemporaryRefNum=this.entries.length||1,this._newPersistentRefNum)){this._persistentRefsCache=new Map;for(let A=this._newTemporaryRefNum;A<this._newPersistentRefNum;A++)this._persistentRefsCache.set(A,this._cacheMap.get(A)),this._cacheMap.delete(A)}return $t.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){if(this._newTemporaryRefNum=null,this._persistentRefsCache)for(const[A,e]of this._persistentRefsCache)this._cacheMap.set(A,e);this._persistentRefsCache=null}setStartXRef(A){this.startXRefQueue=[A]}parse(A=!1){let e,t,i;A?(gt("Indexing all PDF objects"),e=this.indexObjects()):e=this.readXRef(),e.assignXref(this),this.trailer=e;try{t=e.get("Encrypt")}catch(A){if(A instanceof oi)throw A;gt(`XRef.parse - Invalid "Encrypt" reference: "${A}".`)}if(t instanceof _t){const A=e.get("ID"),i=A?.length?A[0]:"";t.suppressEncryption=!0,this.encrypt=new zc(t,i,this.pdfManager.password)}try{i=e.get("Root")}catch(A){if(A instanceof oi)throw A;gt(`XRef.parse - Invalid "Root" reference: "${A}".`)}if(i instanceof _t)try{if(i.get("Pages")instanceof _t)return void(this.root=i)}catch(A){if(A instanceof oi)throw A;gt(`XRef.parse - Invalid "Pages" reference: "${A}".`)}if(!A)throw new Ci;throw new Qt("Invalid Root reference.")}processXRefTable(A){"tableState"in this||(this.tableState={entryNum:0,streamPos:A.lexer.stream.pos,parserBuf1:A.buf1,parserBuf2:A.buf2});if(!ii(this.readXRefTable(A),"trailer"))throw new ut("Invalid XRef table: could not find trailer dictionary");let e=A.getObj();if(e instanceof _t||!e.dict||(e=e.dict),!(e instanceof _t))throw new ut("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,e}readXRefTable(A){const e=A.lexer.stream,t=this.tableState;let i;for(e.pos=t.streamPos,A.buf1=t.parserBuf1,A.buf2=t.parserBuf2;;){if(!("firstEntryNum"in t)||!("entryCount"in t)){if(ii(i=A.getObj(),"trailer"))break;t.firstEntryNum=i,t.entryCount=A.getObj()}let a=t.firstEntryNum;const s=t.entryCount;if(!Number.isInteger(a)||!Number.isInteger(s))throw new ut("Invalid XRef table: wrong types in subsection header");for(let i=t.entryNum;i<s;i++){t.streamPos=e.pos,t.entryNum=i,t.parserBuf1=A.buf1,t.parserBuf2=A.buf2;const n={};n.offset=A.getObj(),n.gen=A.getObj();const g=A.getObj();if(g instanceof jt)switch(g.cmd){case"f":n.free=!0;break;case"n":n.uncompressed=!0}if(!Number.isInteger(n.offset)||!Number.isInteger(n.gen)||!n.free&&!n.uncompressed)throw new ut(`Invalid entry in XRef subsection: ${a}, ${s}`);0===i&&n.free&&1===a&&(a=0),this.entries[i+a]||(this.entries[i+a]=n)}t.entryNum=0,t.streamPos=e.pos,t.parserBuf1=A.buf1,t.parserBuf2=A.buf2,delete t.firstEntryNum,delete t.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new ut("Invalid XRef table: unexpected first object");return i}processXRefStream(A){if(!("streamState"in this)){const e=A.dict,t=e.get("W");let i=e.get("Index");i||(i=[0,e.get("Size")]),this.streamState={entryRanges:i,byteWidths:t,entryNum:0,streamPos:A.pos}}return this.readXRefStream(A),delete this.streamState,A.dict}readXRefStream(A){const e=this.streamState;A.pos=e.streamPos;const[t,i,a]=e.byteWidths,s=e.entryRanges;for(;s.length>0;){const[n,g]=s;if(!Number.isInteger(n)||!Number.isInteger(g))throw new ut(`Invalid XRef range fields: ${n}, ${g}`);if(!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(a))throw new ut(`Invalid XRef entry fields length: ${n}, ${g}`);for(let s=e.entryNum;s<g;++s){e.entryNum=s,e.streamPos=A.pos;let g=0,r=0,o=0;for(let e=0;e<t;++e){const e=A.getByte();if(-1===e)throw new ut("Invalid XRef byteWidths 'type'.");g=g<<8|e}0===t&&(g=1);for(let e=0;e<i;++e){const e=A.getByte();if(-1===e)throw new ut("Invalid XRef byteWidths 'offset'.");r=r<<8|e}for(let e=0;e<a;++e){const e=A.getByte();if(-1===e)throw new ut("Invalid XRef byteWidths 'generation'.");o=o<<8|e}const I={};switch(I.offset=r,I.gen=o,g){case 0:I.free=!0;break;case 1:I.uncompressed=!0;break;case 2:break;default:throw new ut(`Invalid XRef entry type: ${g}`)}this.entries[n+s]||(this.entries[n+s]=I)}e.entryNum=0,e.streamPos=A.pos,s.splice(0,2)}}indexObjects(){function A(A,e){let t="",i=A[e];for(;10!==i&&13!==i&&60!==i&&!(++e>=A.length);)t+=String.fromCharCode(i),i=A[e];return t}function e(A,e,t){const i=t.length,a=A.length;let s=0;for(;e<a;){let a=0;for(;a<i&&A[e+a]===t[a];)++a;if(a>=i)break;e++,s++}return s}const t=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,i=/\b(startxref|\d+\s+\d+\s+obj)\b/g,a=/^(\d+)\s+(\d+)\s+obj\b/,s=new Uint8Array([116,114,97,105,108,101,114]),n=new Uint8Array([115,116,97,114,116,120,114,101,102]),g=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();const r=this.stream;r.pos=0;const o=r.getBytes(),I=ft(o),c=o.length;let C=r.start;const B=[],h=[];for(;C<c;){let Q=o[C];if(9===Q||10===Q||13===Q||32===Q){++C;continue}if(37===Q){do{if(++C,C>=c)break;Q=o[C]}while(10!==Q&&13!==Q);continue}const l=A(o,C);let E;if(l.startsWith("xref")&&(4===l.length||/\s/.test(l[4])))C+=e(o,C,s),B.push(C),C+=e(o,C,n);else if(E=a.exec(l)){const A=0|E[1],i=0|E[2],a=C+l.length;let s,n=!1;if(this.entries[A]){if(this.entries[A].gen===i)try{new Ts({lexer:new Zs(r.makeSubStream(a))}).getObj(),n=!0}catch(A){A instanceof Ii?gt(`indexObjects -- checking object (${l}): "${A}".`):n=!0}}else n=!0;n&&(this.entries[A]={offset:C-r.start,gen:i,uncompressed:!0}),t.lastIndex=a;const B=t.exec(I);if(B){s=t.lastIndex+1-C,"endobj"!==B[1]&&(gt(`indexObjects: Found "${B[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`),s-=B[1].length+1)}else s=c-C;const Q=o.subarray(C,C+s),u=e(Q,0,g);u<s&&Q[u+5]<64&&(h.push(C-r.start),this._xrefStms.add(C-r.start)),C+=s}else if(l.startsWith("trailer")&&(7===l.length||/\s/.test(l[7]))){B.push(C);const A=C+l.length;let e;i.lastIndex=A;const t=i.exec(I);if(t){e=i.lastIndex+1-C,"startxref"!==t[1]&&(gt(`indexObjects: Found "${t[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`),e-=t[1].length+1)}else e=c-C;C+=e}else C+=l.length+1}for(const A of h)this.startXRefQueue.push(A),this.readXRef(!0);const Q=[];let l,E,u=!1;for(const A of B){r.pos=A;const e=new Ts({lexer:new Zs(r),xref:this,allowStreams:!0,recoveryMode:!0});if(!ii(e.getObj(),"trailer"))continue;const t=e.getObj();t instanceof _t&&(Q.push(t),t.has("Encrypt")&&(u=!0))}for(const A of[...Q,"genFallback",...Q]){if("genFallback"===A){if(!E)break;this._generationFallback=!0;continue}let e=!1;try{const t=A.get("Root");if(!(t instanceof _t))continue;const i=t.get("Pages");if(!(i instanceof _t))continue;const a=i.get("Count");Number.isInteger(a)&&(e=!0)}catch(A){E=A;continue}if(e&&(!u||A.has("Encrypt"))&&A.has("ID"))return A;l=A}if(l)return l;if(this.topDict)return this.topDict;throw new Qt("Invalid PDF structure.")}readXRef(A=!1){const e=this.stream,t=new Set;for(;this.startXRefQueue.length;){try{const A=this.startXRefQueue[0];if(t.has(A)){gt("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}t.add(A),e.pos=A+e.start;const i=new Ts({lexer:new Zs(e),xref:this,allowStreams:!0});let a,s=i.getObj();if(ii(s,"xref"))a=this.processXRefTable(i),this.topDict||(this.topDict=a),s=a.get("XRefStm"),Number.isInteger(s)&&!this._xrefStms.has(s)&&(this._xrefStms.add(s),this.startXRefQueue.push(s),this.#K??=s);else{if(!Number.isInteger(s))throw new ut("Invalid XRef stream header");if(!(Number.isInteger(i.getObj())&&ii(i.getObj(),"obj")&&(s=i.getObj())instanceof ni))throw new ut("Invalid XRef stream");if(a=this.processXRefStream(s),this.topDict||(this.topDict=a),!a)throw new ut("Failed to read XRef stream")}s=a.get("Prev"),Number.isInteger(s)?this.startXRefQueue.push(s):s instanceof $t&&this.startXRefQueue.push(s.num)}catch(A){if(A instanceof oi)throw A;nt("(while reading XRef): "+A)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!A)throw new Ci}get lastXRefStreamPos(){return this.#K??(this._xrefStms.size>0?Math.max(...this._xrefStms):null)}getEntry(A){const e=this.entries[A];return e&&!e.free&&e.offset?e:null}fetchIfRef(A,e=!1){return A instanceof $t?this.fetch(A,e):A}fetch(A,e=!1){if(!(A instanceof $t))throw new Error("ref object is not a reference");const t=A.num,i=this._cacheMap.get(t);if(void 0!==i)return i instanceof _t&&!i.objId&&(i.objId=A.toString()),i;let a=this.getEntry(t);if(null===a)return this._cacheMap.set(t,a),a;if(this._pendingRefs.has(A))return this._pendingRefs.remove(A),gt(`Ignoring circular reference: ${A}.`),Pt;this._pendingRefs.put(A);try{a=a.uncompressed?this.fetchUncompressed(A,a,e):this.fetchCompressed(A,a,e),this._pendingRefs.remove(A)}catch(e){throw this._pendingRefs.remove(A),e}return a instanceof _t?a.objId=A.toString():a instanceof ni&&(a.dict.objId=A.toString()),a}fetchUncompressed(A,e,t=!1){const i=A.gen;let a=A.num;if(e.gen!==i){const s=`Inconsistent generation in XRef: ${A}`;if(this._generationFallback&&e.gen<i)return gt(s),this.fetchUncompressed($t.get(a,e.gen),e,t);throw new ci(s)}const s=this.stream.makeSubStream(e.offset+this.stream.start),n=new Ts({lexer:new Zs(s),xref:this,allowStreams:!0}),g=n.getObj(),r=n.getObj(),o=n.getObj();if(g!==a||r!==i||!(o instanceof jt))throw new ci(`Bad (uncompressed) XRef entry: ${A}`);if("obj"!==o.cmd){if(o.cmd.startsWith("obj")&&(a=parseInt(o.cmd.substring(3),10),!Number.isNaN(a)))return a;throw new ci(`Bad (uncompressed) XRef entry: ${A}`)}return(e=this.encrypt&&!t?n.getObj(this.encrypt.createCipherTransform(a,i)):n.getObj())instanceof ni||this._cacheMap.set(a,e),e}fetchCompressed(A,e,t=!1){const i=e.offset,a=this.fetch($t.get(i,0));if(!(a instanceof ni))throw new ut("bad ObjStm stream");const s=a.dict.get("First"),n=a.dict.get("N");if(!Number.isInteger(s)||!Number.isInteger(n))throw new ut("invalid first and n parameters for ObjStm stream");let g=new Ts({lexer:new Zs(a),xref:this,allowStreams:!0});const r=new Array(n),o=new Array(n);for(let A=0;A<n;++A){const e=g.getObj();if(!Number.isInteger(e))throw new ut(`invalid object number in the ObjStm stream: ${e}`);const t=g.getObj();if(!Number.isInteger(t))throw new ut(`invalid object offset in the ObjStm stream: ${t}`);r[A]=e,o[A]=t}const I=(a.start||0)+s,c=new Array(n);for(let A=0;A<n;++A){const e=A<n-1?o[A+1]-o[A]:void 0;if(e<0)throw new ut("Invalid offset in the ObjStm stream.");g=new Ts({lexer:new Zs(a.makeSubStream(I+o[A],e,a.dict)),xref:this,allowStreams:!0});const t=g.getObj();if(c[A]=t,t instanceof ni)continue;const s=r[A],C=this.entries[s];C&&C.offset===i&&C.gen===A&&this._cacheMap.set(s,t)}if(void 0===(e=c[e.gen]))throw new ci(`Bad (compressed) XRef entry: ${A}`);return e}async fetchIfRefAsync(A,e){return A instanceof $t?this.fetchAsync(A,e):A}async fetchAsync(A,e){try{return this.fetch(A,e)}catch(t){if(!(t instanceof oi))throw t;return await this.pdfManager.requestRange(t.begin,t.end),this.fetchAsync(A,e)}}getCatalogObj(){return this.root}}const Gm=[0,0,612,792];class Nm{constructor({pdfManager:A,xref:e,pageIndex:t,pageDict:i,ref:a,globalIdFactory:s,fontCache:n,builtInCMapCache:g,standardFontDataCache:r,globalImageCache:o,systemFontCache:I,nonBlendModesSet:c,xfaFactory:C}){this.pdfManager=A,this.pageIndex=t,this.pageDict=i,this.xref=e,this.ref=a,this.fontCache=n,this.builtInCMapCache=g,this.standardFontDataCache=r,this.globalImageCache=o,this.systemFontCache=I,this.nonBlendModesSet=c,this.evaluatorOptions=A.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=C;const B={obj:0};this._localIdFactory=class extends s{static createObjId(){return`p${t}_${++B.obj}`}static getPageObjId(){return`p${a.toString()}`}}}_getInheritableProperty(A,e=!1){const t=hi({dict:this.pageDict,key:A,getArray:e,stopWhenFound:!1});return Array.isArray(t)?1!==t.length&&t[0]instanceof _t?_t.merge({xref:this.xref,dictArray:t}):t[0]:t}get content(){return this.pageDict.getArray("Contents")}get resources(){const A=this._getInheritableProperty("Resources");return ct(this,"resources",A instanceof _t?A:_t.empty)}_getBoundingBox(A){if(this.xfaData)return this.xfaData.bbox;const e=Di(this._getInheritableProperty(A,!0),null);if(e){if(e[2]-e[0]>0&&e[3]-e[1]>0)return e;gt(`Empty, or invalid, /${A} entry.`)}return null}get mediaBox(){return ct(this,"mediaBox",this._getBoundingBox("MediaBox")||Gm)}get cropBox(){return ct(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){let A=this.pageDict.get("UserUnit");return("number"!=typeof A||A<=0)&&(A=1),ct(this,"userUnit",A)}get view(){const{cropBox:A,mediaBox:e}=this;if(A!==e&&!Gt(A,e)){const t=bt.intersect(A,e);if(t&&t[2]-t[0]>0&&t[3]-t[1]>0)return ct(this,"view",t);gt("Empty /CropBox and /MediaBox intersection.")}return ct(this,"view",e)}get rotate(){let A=this._getInheritableProperty("Rotate")||0;return A%90!=0?A=0:A>=360?A%=360:A<0&&(A=(A%360+360)%360),ct(this,"rotate",A)}_onSubStreamError(A,e){if(!this.evaluatorOptions.ignoreErrors)throw A;gt(`getContentStream - ignoring sub-stream (${e}): "${A}".`)}getContentStream(){return this.pdfManager.ensure(this,"content").then(A=>A instanceof ni?A:Array.isArray(A)?new Qa(A,this._onSubStreamError.bind(this)):new Zi)}get xfaData(){return ct(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}#q(A,e,t){for(const i of A)if(i.id){const A=$t.fromString(i.id);if(!A){gt(`A non-linked annotation cannot be modified: ${i.id}`);continue}if(i.deleted){e.put(A,A);continue}t?.put(A),i.ref=A,delete i.id}}async saveNewAnnotations(A,e,t,i){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const a=new rc({xref:this.xref,handler:A,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),s=new ei,n=new Ai;this.#q(t,s,n);const g=this.pageDict,r=this.annotations.filter(A=>!(A instanceof $t&&s.has(A))),o=await zp.saveNewAnnotations(a,e,t,i);for(const{ref:A}of o.annotations)A instanceof $t&&!n.has(A)&&r.push(A);const I=g.get("Annots");g.set("Annots",r);const c=[];await _c(this.ref,g,c,this.xref),I&&g.set("Annots",I);const C=o.dependencies;C.push({ref:this.ref,data:c.join("")},...o.annotations);for(const A of s)C.push({ref:A,data:null});return C}save(A,e,t){const i=new rc({xref:this.xref,handler:A,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions});return this._parsedAnnotations.then(function(A){const a=[];for(const s of A)s.mustBePrinted(t)&&a.push(s.save(i,e,t).catch(function(A){return gt(`save - ignoring annotation data during "${e.name}" task: "${A}".`),null}));return Promise.all(a).then(function(A){return A.filter(A=>!!A)})})}loadResources(A){return this.resourcesPromise||=this.pdfManager.ensure(this,"resources"),this.resourcesPromise.then(()=>new wC(this.resources,A,this.xref).load())}getOperatorList({handler:A,sink:e,task:t,intent:i,cacheKey:a,annotationStorage:s=null}){const n=this.getContentStream(),g=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),c=new rc({xref:this.xref,handler:A,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),h=this.xfaFactory?null:Hi(s),l=h?.get(this.pageIndex);let E=Promise.resolve(null),u=null;if(l){const A=this.pdfManager.ensureDoc("annotationGlobals");let e;const i=new Set;for(const{bitmapId:A,bitmap:e}of l)!A||e||i.has(A)||i.add(A);const{isOffscreenCanvasSupported:a}=this.evaluatorOptions;if(i.size>0){const A=l.slice();for(const[e,t]of s)e.startsWith(Q)&&t.bitmap&&i.has(t.bitmapId)&&A.push(t);e=zp.generateImages(A,this.xref,a)}else e=zp.generateImages(l,this.xref,a);u=new Ai,this.#q(l,u,null),E=A.then(A=>A?zp.printNewAnnotations(A,c,t,l,e):null)}const d=Promise.all([n,g]).then(([s])=>{const n=new zI(i,e);return A.send("StartRenderPage",{transparency:c.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:a}),c.getOperatorList({stream:s,task:t,resources:this.resources,operatorList:n}).then(function(){return n})});return Promise.all([d,this._parsedAnnotations,E]).then(function([A,e,a]){if(a){e=e.filter(A=>!(A.ref&&u.has(A.ref)));for(let A=0,t=a.length;A<t;A++){const i=a[A];if(i.refToReplace){const s=e.findIndex(A=>A.ref&&si(A.ref,i.refToReplace));s>=0&&(e.splice(s,1,i),a.splice(A--,1),t--)}}e=e.concat(a)}if(0===e.length||i&B)return A.flush(!0),{length:A.totalLength};const n=!!(i&C),g=!!(i&r),h=!!(i&o),Q=!!(i&I),l=[];for(const A of e)(g||h&&A.mustBeViewed(s,n)||Q&&A.mustBePrinted(s))&&l.push(A.getOperatorList(c,t,i,n,s).catch(function(A){return gt(`getOperatorList - ignoring annotation data during "${t.name}" task: "${A}".`),{opList:null,separateForm:!1,separateCanvas:!1}}));return Promise.all(l).then(function(e){let t=!1,i=!1;for(const{opList:a,separateForm:s,separateCanvas:n}of e)A.addOpList(a),t||=s,i||=n;return A.flush(!0,{form:t,canvas:i}),{length:A.totalLength}})})}async extractTextContent({handler:A,task:e,includeMarkedContent:t,disableNormalization:i,sink:a}){const s=this.getContentStream(),n=this.loadResources(["ExtGState","Font","Properties","XObject"]),g=this.pdfManager.ensureCatalog("lang"),[r,,o]=await Promise.all([s,n,g]);return new rc({xref:this.xref,handler:A,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}).getTextContent({stream:r,task:e,resources:this.resources,includeMarkedContent:t,disableNormalization:i,sink:a,viewBox:this.view,lang:o})}async getStructTree(){const A=await this.pdfManager.ensureCatalog("structTreeRoot");if(!A)return null;await this._parsedAnnotations;return(await this.pdfManager.ensure(this,"_parseStructTree",[A])).serializable}_parseStructTree(A){const e=new EC(A,this.pageDict);return e.parse(this.ref),e}async getAnnotationsData(A,e,t){const i=await this._parsedAnnotations;if(0===i.length)return i;const a=[],s=[];let n;const g=!!(t&r),c=!!(t&o),C=!!(t&I);for(const t of i){const i=g||c&&t.viewable;(i||C&&t.printable)&&a.push(t.data),t.hasTextContent&&i&&(n||=new rc({xref:this.xref,handler:A,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),s.push(t.extractTextContent(n,e,[-1/0,-1/0,1/0,1/0]).catch(function(A){gt(`getAnnotationsData - ignoring textContent during "${e.name}" task: "${A}".`)})))}return await Promise.all(s),a}get annotations(){const A=this._getInheritableProperty("Annots");return ct(this,"annotations",Array.isArray(A)?A:[])}get _parsedAnnotations(){return ct(this,"_parsedAnnotations",this.pdfManager.ensure(this,"annotations").then(async A=>{if(0===A.length)return A;const e=await this.pdfManager.ensureDoc("annotationGlobals");if(!e)return[];const t=[];for(const i of A)t.push(zp.create(this.xref,i,e,this._localIdFactory,!1,this.ref).catch(function(A){return gt(`_parsedAnnotations: "${A}".`),null}));const i=[];let a,s;for(const A of await Promise.all(t))A&&(A instanceof sm?(s||=[]).push(A):A instanceof Cm?(a||=[]).push(A):i.push(A));return s&&i.push(...s),a&&i.push(...a),i}))}get jsActions(){return ct(this,"jsActions",Ri(this.xref,this.pageDict,EA))}}const xm=new Uint8Array([37,80,68,70,45]),Um=new Uint8Array([115,116,97,114,116,120,114,101,102]),Mm=new Uint8Array([101,110,100,111,98,106]);function Lm(A,e,t=1024,i=!1){const a=e.length,s=A.peekBytes(t),n=s.length-a;if(n<=0)return!1;if(i){const t=a-1;let i=s.length-1;for(;i>=t;){let n=0;for(;n<a&&s[i-n]===e[t-n];)n++;if(n>=a)return A.pos+=i-t,!0;i--}}else{let t=0;for(;t<=n;){let i=0;for(;i<a&&s[t+i]===e[i];)i++;if(i>=a)return A.pos+=t,!0;t++}}return!1}class Jm{constructor(A,e){if(e.length<=0)throw new Qt("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=A,this.stream=e,this.xref=new Rm(e,A),this._pagePromises=new Map,this._version=null;const t={font:0};this._globalIdFactory=class{static getDocId(){return`g_${A.docId}`}static createFontId(){return"f"+ ++t.font}static createObjId(){rt("Abstract method `createObjId` called.")}static getPageObjId(){rt("Abstract method `getPageObjId` called.")}}}parse(A){this.xref.parse(A),this.catalog=new pC(this.pdfManager,this.xref)}get linearization(){let A=null;try{A=Os.create(this.stream)}catch(A){if(A instanceof oi)throw A;nt(A)}return ct(this,"linearization",A)}get startXRef(){const A=this.stream;let e=0;if(this.linearization){if(A.reset(),Lm(A,Mm)){A.skip(6);let t=A.peekByte();for(;pi(t);)A.pos++,t=A.peekByte();e=A.pos-A.start}}else{const t=1024,i=Um.length;let a=!1,s=A.end;for(;!a&&s>0;)s-=t-i,s<0&&(s=0),A.pos=s,a=Lm(A,Um,t,!0);if(a){let t;A.skip(9);do{t=A.getByte()}while(pi(t));let i="";for(;t>=32&&t<=57;)i+=String.fromCharCode(t),t=A.getByte();e=parseInt(i,10),isNaN(e)&&(e=0)}}return ct(this,"startXRef",e)}checkHeader(){const A=this.stream;if(A.reset(),!Lm(A,xm))return;A.moveStart(),A.skip(xm.length);let e,t="";for(;(e=A.getByte())>32&&t.length<7;)t+=String.fromCharCode(e);gi.test(t)?this._version=t:gt(`Invalid PDF header version: ${t}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let A=0;return A=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,ct(this,"numPages",A)}_hasOnlyDocumentSignatures(A,e=0){return!!Array.isArray(A)&&A.every(A=>{if(!((A=this.xref.fetchIfRef(A))instanceof _t))return!1;if(A.has("Kids"))return++e>10?(gt("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this._hasOnlyDocumentSignatures(A.get("Kids"),e);const t=ti(A.get("FT"),"Sig"),i=A.get("Rect"),a=Array.isArray(i)&&i.every(A=>0===A);return t&&a})}get _xfaStreams(){const A=this.catalog.acroForm;if(!A)return null;const e=A.get("XFA"),t={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(e instanceof ni&&!e.isEmpty)return t["xdp:xdp"]=e,t;if(!Array.isArray(e)||0===e.length)return null;for(let A=0,i=e.length;A<i;A+=2){let a;if(a=0===A?"xdp:xdp":A===i-2?"/xdp:xdp":e[A],!t.hasOwnProperty(a))continue;const s=this.xref.fetchIfRef(e[A+1]);s instanceof ni&&!s.isEmpty&&(t[a]=s)}return t}get xfaDatasets(){const A=this._xfaStreams;if(!A)return ct(this,"xfaDatasets",null);for(const e of["datasets","xdp:xdp"]){const t=A[e];if(t)try{const A=St(t.getString());return ct(this,"xfaDatasets",new Sm({[e]:A}))}catch{gt("XFA - Invalid utf-8 string.");break}}return ct(this,"xfaDatasets",null)}get xfaData(){const A=this._xfaStreams;if(!A)return null;const e=Object.create(null);for(const[t,i]of Object.entries(A))if(i)try{e[t]=St(i.getString())}catch{return gt("XFA - Invalid utf-8 string."),null}return e}get xfaFactory(){let A;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(A=this.xfaData),ct(this,"xfaFactory",A?new jp(A):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async loadXfaImages(){const A=await this.pdfManager.ensureCatalog("xfaImages");if(!A)return;const e=A.getKeys(),t=new wC(A,e,this.xref);await t.load();const i=new Map;for(const t of e){const e=A.get(t);e instanceof ni&&i.set(t,e.getBytes())}this.xfaFactory.setImages(i)}async loadXfaFonts(A,e){const t=await this.pdfManager.ensureCatalog("acroForm");if(!t)return;const i=await t.getAsync("DR");if(!(i instanceof _t))return;const a=new wC(i,["Font"],this.xref);await a.load();const s=i.get("Font");if(!(s instanceof _t))return;const n=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions);n.useSystemFonts=!1;const g=new rc({xref:this.xref,handler:A,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache,standardFontDataCache:this.catalog.standardFontDataCache,options:n}),r=new zI,o=[],I={get font(){return o.at(-1)},set font(A){o.push(A)},clone(){return this}},c=new Map;s.forEach((A,e)=>{c.set(A,e)});const C=[];for(const[A,t]of c){const a=t.get("FontDescriptor");if(!(a instanceof _t))continue;let s=a.get("FontFamily");s=s.replaceAll(/[ ]+(\d)/g,"$1");const n={fontFamily:s,fontWeight:a.get("FontWeight"),italicAngle:-a.get("ItalicAngle")};Mi(n)&&C.push(g.handleSetFont(i,[Vt.get(A),1],null,r,e,I,null,n).catch(function(A){return gt(`loadXfaFonts: "${A}".`),null}))}await Promise.all(C);const B=this.xfaFactory.setFonts(o);if(!B)return;n.ignoreErrors=!0,C.length=0,o.length=0;const h=new Set;for(const A of B)To(`${A}-Regular`)||h.add(A);h.size&&B.push("PdfJS-Fallback");for(const A of B)if(!h.has(A))for(const t of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const a=`${A}-${t.name}`,s=Po(a);C.push(g.handleSetFont(i,[Vt.get(a),1],null,r,e,I,s,{fontFamily:A,fontWeight:t.fontWeight,italicAngle:t.italicAngle}).catch(function(A){return gt(`loadXfaFonts: "${A}".`),null}))}await Promise.all(C),this.xfaFactory.appendFonts(o,h)}async serializeXfaData(A){return this.xfaFactory?this.xfaFactory.serializeData(A):null}get version(){return this.catalog.version||this._version}get formInfo(){const A={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},e=this.catalog.acroForm;if(!e)return ct(this,"formInfo",A);try{const t=e.get("Fields"),i=Array.isArray(t)&&t.length>0;A.hasFields=i;const a=e.get("XFA");A.hasXfa=Array.isArray(a)&&a.length>0||a instanceof ni&&!a.isEmpty;const s=!!(1&e.get("SigFlags")),n=s&&this._hasOnlyDocumentSignatures(t);A.hasAcroForm=i&&!n,A.hasSignatures=s}catch(A){if(A instanceof oi)throw A;gt(`Cannot fetch form information: "${A}".`)}return ct(this,"formInfo",A)}get documentInfo(){const A={PDFFormatVersion:this.version,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};let e;try{e=this.xref.trailer.get("Info")}catch(A){if(A instanceof oi)throw A;nt("The document information dictionary is invalid.")}if(!(e instanceof _t))return ct(this,"documentInfo",A);for(const t of e.getKeys()){const i=e.get(t);switch(t){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof i){A[t]=Ft(i);continue}break;case"Trapped":if(i instanceof Vt){A[t]=i;continue}break;default:let e;switch(typeof i){case"string":e=Ft(i);break;case"number":case"boolean":e=i;break;default:i instanceof Vt&&(e=i)}if(void 0===e){gt(`Bad value, for custom key "${t}", in Info: ${i}.`);continue}A.Custom||(A.Custom=Object.create(null)),A.Custom[t]=e;continue}gt(`Bad value, for key "${t}", in Info: ${i}.`)}return ct(this,"documentInfo",A)}get fingerprints(){function A(A){return"string"==typeof A&&A.length>0&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==A}function e(A){const e=[];for(const t of A){const A=t.toString(16);e.push(A.padStart(2,"0"))}return e.join("")}const t=this.xref.trailer.get("ID");let i,a;return Array.isArray(t)&&A(t[0])?(i=pt(t[0]),t[1]!==t[0]&&A(t[1])&&(a=pt(t[1]))):i=Yc(this.stream.getByteRange(0,1024),0,1024),ct(this,"fingerprints",[e(i),a?e(a):null])}async _getLinearizationPage(A){const{catalog:e,linearization:t,xref:i}=this,a=$t.get(t.objectNumberFirst,0);try{const A=await i.fetchAsync(a);if(A instanceof _t){let t=A.getRaw("Type");if(t instanceof $t&&(t=await i.fetchAsync(t)),ti(t,"Page")||!A.has("Type")&&!A.has("Kids")&&A.has("Contents"))return e.pageKidsCountCache.has(a)||e.pageKidsCountCache.put(a,1),e.pageIndexCache.has(a)||e.pageIndexCache.put(a,0),[A,a]}throw new ut("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(t){return gt(`_getLinearizationPage: "${t.message}".`),e.getPageDict(A)}}getPage(A){const e=this._pagePromises.get(A);if(e)return e;const{catalog:t,linearization:i,xfaFactory:a}=this;let s;return s=a?Promise.resolve([_t.empty,null]):i?.pageFirst===A?this._getLinearizationPage(A):t.getPageDict(A),s=s.then(([e,i])=>new Nm({pdfManager:this.pdfManager,xref:this.xref,pageIndex:A,pageDict:e,ref:i,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalImageCache:t.globalImageCache,systemFontCache:t.systemFontCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:a})),this._pagePromises.set(A,s),s}async checkFirstPage(A=!1){if(!A)try{await this.getPage(0)}catch(A){if(A instanceof ci)throw this._pagePromises.delete(0),await this.cleanup(),new Ci}}async checkLastPage(A=!1){const{catalog:e,pdfManager:t}=this;let i;e.setActualNumPages();try{if(await Promise.all([t.ensureDoc("xfaFactory"),t.ensureDoc("linearization"),t.ensureCatalog("numPages")]),this.xfaFactory)return;if(i=this.linearization?this.linearization.numPages:e.numPages,!Number.isInteger(i))throw new ut("Page count is not an integer.");if(i<=1)return;await this.getPage(i-1)}catch(a){if(this._pagePromises.delete(i-1),await this.cleanup(),a instanceof ci&&!A)throw new Ci;let s;gt(`checkLastPage - invalid /Pages tree /Count: ${i}.`);try{s=await e.getAllPageDicts(A)}catch(t){if(t instanceof ci&&!A)throw new Ci;return void e.setActualNumPages(1)}for(const[A,[i,a]]of s){let s;i instanceof Error?(s=Promise.reject(i),s.catch(()=>{})):s=Promise.resolve(new Nm({pdfManager:t,xref:this.xref,pageIndex:A,pageDict:i,ref:a,globalIdFactory:this._globalIdFactory,fontCache:e.fontCache,builtInCMapCache:e.builtInCMapCache,standardFontDataCache:e.standardFontDataCache,globalImageCache:e.globalImageCache,systemFontCache:e.systemFontCache,nonBlendModesSet:e.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(A,s)}e.setActualNumPages(s.size)}}fontFallback(A,e){return this.catalog.fontFallback(A,e)}async cleanup(A=!1){return this.catalog?this.catalog.cleanup(A):mc()}async#T(A,e,t,i,a){const{xref:s}=this;if(!(e instanceof $t)||a.has(e))return;a.put(e);const n=await s.fetchAsync(e);if(!(n instanceof _t))return;if(n.has("T")){const e=Ft(await n.getAsync("T"));A=""===A?e:`${A}.${e}`}else{let e=n;for(;;){if(e=e.getRaw("Parent"),e instanceof $t){if(a.has(e))break;e=await s.fetchAsync(e)}if(!(e instanceof _t))break;if(e.has("T")){const t=Ft(await e.getAsync("T"));A=""===A?t:`${A}.${t}`;break}}}if(t.has(A)||t.set(A,[]),t.get(A).push(zp.create(s,e,i,null,!0,null).then(A=>A?.getFieldObject()).catch(function(A){return gt(`#collectFieldObjects: "${A}".`),null})),!n.has("Kids"))return;const g=await n.getAsync("Kids");if(Array.isArray(g))for(const e of g)await this.#T(A,e,t,i,a)}get fieldObjects(){if(!this.formInfo.hasFields)return ct(this,"fieldObjects",Promise.resolve(null));return ct(this,"fieldObjects",Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureCatalog("acroForm")]).then(async([A,e])=>{if(!A)return null;const t=new Ai,i=Object.create(null),a=new Map;for(const i of await e.getAsync("Fields"))await this.#T("",i,a,A,t);const s=[];for(const[A,e]of a)s.push(Promise.all(e).then(e=>{(e=e.filter(A=>!!A)).length>0&&(i[A]=e)}));return await Promise.all(s),i}))}get hasJSActions(){return ct(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){const[A,e]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!A||!!e&&Object.values(e).some(A=>A.some(A=>null!==A.actions))}get calculationOrderIds(){const A=this.catalog.acroForm;if(!A?.has("CO"))return ct(this,"calculationOrderIds",null);const e=A.get("CO");if(!Array.isArray(e)||0===e.length)return ct(this,"calculationOrderIds",null);const t=[];for(const A of e)A instanceof $t&&t.push(A.toString());return 0===t.length?ct(this,"calculationOrderIds",null):ct(this,"calculationOrderIds",t)}get annotationGlobals(){return ct(this,"annotationGlobals",zp.createGlobals(this.pdfManager))}}class Hm{constructor(A){this.constructor===Hm&&rt("Cannot initialize BasePdfManager."),this._docBaseUrl=function(A){if(A){const e=It(A);if(e)return e.href;gt(`Invalid absolute docBaseUrl: "${A}".`)}return null}(A.docBaseUrl),this._docId=A.docId,this._password=A.password,this.enableXfa=A.enableXfa,A.evaluatorOptions.isOffscreenCanvasSupported&&=wt.isOffscreenCanvasSupported,this.evaluatorOptions=Object.freeze(A.evaluatorOptions)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}get catalog(){return this.pdfDocument.catalog}ensureDoc(A,e){return this.ensure(this.pdfDocument,A,e)}ensureXRef(A,e){return this.ensure(this.pdfDocument.xref,A,e)}ensureCatalog(A,e){return this.ensure(this.pdfDocument.catalog,A,e)}getPage(A){return this.pdfDocument.getPage(A)}fontFallback(A,e){return this.pdfDocument.fontFallback(A,e)}loadXfaFonts(A,e){return this.pdfDocument.loadXfaFonts(A,e)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(A){return this.pdfDocument.serializeXfaData(A)}cleanup(A=!1){return this.pdfDocument.cleanup(A)}async ensure(A,e,t){rt("Abstract method `ensure` called")}requestRange(A,e){rt("Abstract method `requestRange` called")}requestLoadedStream(A=!1){rt("Abstract method `requestLoadedStream` called")}sendProgressiveData(A){rt("Abstract method `sendProgressiveData` called")}updatePassword(A){this._password=A}terminate(A){rt("Abstract method `terminate` called")}}class Ym extends Hm{constructor(A){super(A);const e=new Pi(A.source);this.pdfDocument=new Jm(this,e),this._loadedStreamPromise=Promise.resolve(e)}async ensure(A,e,t){const i=A[e];return"function"==typeof i?i.apply(A,t):i}requestRange(A,e){return Promise.resolve()}requestLoadedStream(A=!1){return this._loadedStreamPromise}terminate(A){}}class vm extends Hm{constructor(A){super(A),this.streamManager=new Xi(A.source,{msgHandler:A.handler,length:A.length,disableAutoFetch:A.disableAutoFetch,rangeChunkSize:A.rangeChunkSize}),this.pdfDocument=new Jm(this,this.streamManager.getStream())}async ensure(A,e,t){try{const i=A[e];return"function"==typeof i?i.apply(A,t):i}catch(i){if(!(i instanceof oi))throw i;return await this.requestRange(i.begin,i.end),this.ensure(A,e,t)}}requestRange(A,e){return this.streamManager.requestRange(A,e)}requestLoadedStream(A=!1){return this.streamManager.requestAllChunks(A)}sendProgressiveData(A){this.streamManager.onReceiveData({chunk:A})}terminate(A){this.streamManager.abort(A)}}const Km=1,qm=2,Tm=1,Pm=2,Wm=3,Zm=4,Om=5,Xm=6,Vm=7,jm=8;function zm(A){switch(A instanceof Error||"object"==typeof A&&null!==A||rt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),A.name){case"AbortException":return new dt(A.message);case"MissingPDFException":return new lt(A.message);case"PasswordException":return new Bt(A.message,A.code);case"UnexpectedResponseException":return new Et(A.message,A.status);case"UnknownErrorException":return new ht(A.message,A.details);default:return new ht(A.message,A.toString())}}class _m{constructor(A,e,t){this.sourceName=A,this.targetName=e,this.comObj=t,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),this._onComObjOnMessage=A=>{const e=A.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#P(e);if(e.callback){const A=e.callbackId,t=this.callbackCapabilities[A];if(!t)throw new Error(`Cannot resolve callback ${A}`);if(delete this.callbackCapabilities[A],e.callback===Km)t.resolve(e.data);else{if(e.callback!==qm)throw new Error("Unexpected callback case");t.reject(zm(e.reason))}return}const i=this.actionHandler[e.action];if(!i)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const A=this.sourceName,a=e.sourceName;return void new Promise(function(A){A(i(e.data))}).then(function(i){t.postMessage({sourceName:A,targetName:a,callback:Km,callbackId:e.callbackId,data:i})},function(i){t.postMessage({sourceName:A,targetName:a,callback:qm,callbackId:e.callbackId,reason:zm(i)})})}e.streamId?this.#W(e):i(e.data)},t.addEventListener("message",this._onComObjOnMessage)}on(A,e){const t=this.actionHandler;if(t[A])throw new Error(`There is already an actionName called "${A}"`);t[A]=e}send(A,e,t){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:A,data:e},t)}sendWithPromise(A,e,t){const i=this.callbackId++,a=Promise.withResolvers();this.callbackCapabilities[i]=a;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:A,callbackId:i,data:e},t)}catch(A){a.reject(A)}return a.promise}sendWithStream(A,e,t,i){const a=this.streamId++,s=this.sourceName,n=this.targetName,g=this.comObj;return new ReadableStream({start:t=>{const r=Promise.withResolvers();return this.streamControllers[a]={controller:t,startCall:r,pullCall:null,cancelCall:null,isClosed:!1},g.postMessage({sourceName:s,targetName:n,action:A,streamId:a,data:e,desiredSize:t.desiredSize},i),r.promise},pull:A=>{const e=Promise.withResolvers();return this.streamControllers[a].pullCall=e,g.postMessage({sourceName:s,targetName:n,stream:Xm,streamId:a,desiredSize:A.desiredSize}),e.promise},cancel:A=>{ot(A instanceof Error,"cancel must have a valid reason");const e=Promise.withResolvers();return this.streamControllers[a].cancelCall=e,this.streamControllers[a].isClosed=!0,g.postMessage({sourceName:s,targetName:n,stream:Tm,streamId:a,reason:zm(A)}),e.promise}},t)}#W(A){const e=A.streamId,t=this.sourceName,i=A.sourceName,a=this.comObj,s=this,n=this.actionHandler[A.action],g={enqueue(A,s=1,n){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=s,g>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:t,targetName:i,stream:Zm,streamId:e,chunk:A},n)},close(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:t,targetName:i,stream:Wm,streamId:e}),delete s.streamSinks[e])},error(A){ot(A instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:t,targetName:i,stream:Om,streamId:e,reason:zm(A)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:A.desiredSize,ready:null};g.sinkCapability.resolve(),g.ready=g.sinkCapability.promise,this.streamSinks[e]=g,new Promise(function(e){e(n(A.data,g))}).then(function(){a.postMessage({sourceName:t,targetName:i,stream:jm,streamId:e,success:!0})},function(A){a.postMessage({sourceName:t,targetName:i,stream:jm,streamId:e,reason:zm(A)})})}#P(A){const e=A.streamId,t=this.sourceName,i=A.sourceName,a=this.comObj,s=this.streamControllers[e],n=this.streamSinks[e];switch(A.stream){case jm:A.success?s.startCall.resolve():s.startCall.reject(zm(A.reason));break;case Vm:A.success?s.pullCall.resolve():s.pullCall.reject(zm(A.reason));break;case Xm:if(!n){a.postMessage({sourceName:t,targetName:i,stream:Vm,streamId:e,success:!0});break}n.desiredSize<=0&&A.desiredSize>0&&n.sinkCapability.resolve(),n.desiredSize=A.desiredSize,new Promise(function(A){A(n.onPull?.())}).then(function(){a.postMessage({sourceName:t,targetName:i,stream:Vm,streamId:e,success:!0})},function(A){a.postMessage({sourceName:t,targetName:i,stream:Vm,streamId:e,reason:zm(A)})});break;case Zm:if(ot(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(A.chunk);break;case Wm:if(ot(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this.#Z(s,e);break;case Om:ot(s,"error should have stream controller"),s.controller.error(zm(A.reason)),this.#Z(s,e);break;case Pm:A.success?s.cancelCall.resolve():s.cancelCall.reject(zm(A.reason)),this.#Z(s,e);break;case Tm:if(!n)break;new Promise(function(e){e(n.onCancel?.(zm(A.reason)))}).then(function(){a.postMessage({sourceName:t,targetName:i,stream:Pm,streamId:e,success:!0})},function(A){a.postMessage({sourceName:t,targetName:i,stream:Pm,streamId:e,reason:zm(A)})}),n.sinkCapability.reject(zm(A.reason)),n.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async#Z(A,e){await Promise.allSettled([A.startCall?.promise,A.pullCall?.promise,A.cancelCall?.promise]),delete this.streamControllers[e]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}class $m{constructor(A){this._msgHandler=A,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return ot(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new Ay(this._msgHandler),this._fullRequestReader}getRangeReader(A,e){const t=new ey(A,e,this._msgHandler);return this._rangeRequestReaders.push(t),t}cancelAllRequests(A){this._fullRequestReader?.cancel(A);for(const e of this._rangeRequestReaders.slice(0))e.cancel(A)}}class Ay{constructor(A){this._msgHandler=A,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;const e=this._msgHandler.sendWithStream("GetReader");this._reader=e.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then(A=>{this._isStreamingSupported=A.isStreamingSupported,this._isRangeSupported=A.isRangeSupported,this._contentLength=A.contentLength})}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:A,done:e}=await this._reader.read();return e?{value:void 0,done:!0}:{value:A.buffer,done:!1}}cancel(A){this._reader.cancel(A)}}class ey{constructor(A,e,t){this._msgHandler=t,this.onProgress=null;const i=this._msgHandler.sendWithStream("GetRangeReader",{begin:A,end:e});this._reader=i.getReader()}get isStreamingSupported(){return!1}async read(){const{value:A,done:e}=await this._reader.read();return e?{value:void 0,done:!0}:{value:A.buffer,done:!1}}cancel(A){this._reader.cancel(A)}}class ty{constructor(A){this.name=A,this.terminated=!1,this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}class iy{static setup(A,e){let t=!1;A.on("test",function(e){t||(t=!0,A.send("test",e instanceof Uint8Array))}),A.on("configure",function(A){var e;e=A.verbosity,Number.isInteger(e)&&(at=e)}),A.on("GetDocRequest",function(A){return iy.createDocumentHandler(A,e)})}static createDocumentHandler(A,e){let t,i=!1,a=null;const s=new Set,n=st(),{docId:g,apiVersion:r}=A,o="4.4.168";if(r!==o)throw new Error(`The API version "${r}" does not match the Worker version "${o}".`);const I=[];for(const A in[])I.push(A);if(I.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+I.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");const c=g+"_worker";let C=new _m(c,g,e);function B(){if(i)throw new Error("Worker was terminated")}function h(A){s.add(A)}function Q(A){A.finish(),s.delete(A)}async function l(A){await t.ensureDoc("checkHeader"),await t.ensureDoc("parseStartXRef"),await t.ensureDoc("parse",[A]),await t.ensureDoc("checkFirstPage",[A]),await t.ensureDoc("checkLastPage",[A]);const e=await t.ensureDoc("isPureXfa");if(e){const A=new ty("loadXfaFonts");h(A),await Promise.all([t.loadXfaFonts(C,A).catch(A=>{}).then(()=>Q(A)),t.loadXfaImages()])}const[i,a]=await Promise.all([t.ensureDoc("numPages"),t.ensureDoc("fingerprints")]);return{numPages:i,fingerprints:a,htmlForXfa:e?await t.ensureDoc("htmlForXfa"):null}}function E({data:A,password:e,disableAutoFetch:t,rangeChunkSize:i,length:s,docBaseUrl:n,enableXfa:r,evaluatorOptions:o}){const I={source:null,disableAutoFetch:t,docBaseUrl:n,docId:g,enableXfa:r,evaluatorOptions:o,handler:C,length:s,password:e,rangeChunkSize:i},c=Promise.withResolvers();let h;if(A){try{I.source=A,h=new Ym(I),c.resolve(h)}catch(A){c.reject(A)}return c.promise}let Q,l=[];try{Q=new $m(C)}catch(A){return c.reject(A),c.promise}const E=Q.getFullReader();E.headersReady.then(function(){if(E.isRangeSupported){I.source=Q,I.length=E.contentLength,I.disableAutoFetch||=E.isStreamingSupported,h=new vm(I);for(const A of l)h.sendProgressiveData(A);l=[],c.resolve(h),a=null}}).catch(function(A){c.reject(A),a=null});let u=0;return new Promise(function(A,e){const t=function({value:A,done:i}){try{if(B(),i)return h||function(){const A=Bi(l);s&&A.length!==s&&gt("reported HTTP length is different from actual");try{I.source=A,h=new Ym(I),c.resolve(h)}catch(A){c.reject(A)}l=[]}(),void(a=null);u+=A.byteLength,E.isStreamingSupported||C.send("DocProgress",{loaded:u,total:Math.max(u,E.contentLength||0)}),h?h.sendProgressiveData(A):l.push(A),E.read().then(t,e)}catch(A){e(A)}};E.read().then(t,e)}).catch(function(A){c.reject(A),a=null}),a=function(A){Q.cancelAllRequests(A)},c.promise}return C.on("GetPage",function(A){return t.getPage(A.pageIndex).then(function(A){return Promise.all([t.ensure(A,"rotate"),t.ensure(A,"ref"),t.ensure(A,"userUnit"),t.ensure(A,"view")]).then(function([A,e,t,i]){return{rotate:A,ref:e,refStr:e?.toString()??null,userUnit:t,view:i}})})}),C.on("GetPageIndex",function(A){const e=$t.get(A.num,A.gen);return t.ensureCatalog("getPageIndex",[e])}),C.on("GetDestinations",function(A){return t.ensureCatalog("destinations")}),C.on("GetDestination",function(A){return t.ensureCatalog("getDestination",[A.id])}),C.on("GetPageLabels",function(A){return t.ensureCatalog("pageLabels")}),C.on("GetPageLayout",function(A){return t.ensureCatalog("pageLayout")}),C.on("GetPageMode",function(A){return t.ensureCatalog("pageMode")}),C.on("GetViewerPreferences",function(A){return t.ensureCatalog("viewerPreferences")}),C.on("GetOpenAction",function(A){return t.ensureCatalog("openAction")}),C.on("GetAttachments",function(A){return t.ensureCatalog("attachments")}),C.on("GetDocJSActions",function(A){return t.ensureCatalog("jsActions")}),C.on("GetPageJSActions",function({pageIndex:A}){return t.getPage(A).then(function(A){return t.ensure(A,"jsActions")})}),C.on("GetOutline",function(A){return t.ensureCatalog("documentOutline")}),C.on("GetOptionalContentConfig",function(A){return t.ensureCatalog("optionalContentConfig")}),C.on("GetPermissions",function(A){return t.ensureCatalog("permissions")}),C.on("GetMetadata",function(A){return Promise.all([t.ensureDoc("documentInfo"),t.ensureCatalog("metadata")])}),C.on("GetMarkInfo",function(A){return t.ensureCatalog("markInfo")}),C.on("GetData",function(A){return t.requestLoadedStream().then(function(A){return A.bytes})}),C.on("GetAnnotations",function({pageIndex:A,intent:e}){return t.getPage(A).then(function(t){const i=new ty(`GetAnnotations: page ${A}`);return h(i),t.getAnnotationsData(C,i,e).then(A=>(Q(i),A),A=>{throw Q(i),A})})}),C.on("GetFieldObjects",function(A){return t.ensureDoc("fieldObjects")}),C.on("HasJSActions",function(A){return t.ensureDoc("hasJSActions")}),C.on("GetCalculationOrderIds",function(A){return t.ensureDoc("calculationOrderIds")}),C.on("SaveDocument",async function({isPureXfa:A,numPages:e,annotationStorage:i,filename:a}){const s=[t.requestLoadedStream(),t.ensureCatalog("acroForm"),t.ensureCatalog("acroFormRef"),t.ensureDoc("startXRef"),t.ensureDoc("xref"),t.ensureDoc("linearization"),t.ensureCatalog("structTreeRoot")],n=[],g=A?null:Hi(i),[r,o,I,c,B,h,l]=await Promise.all(s),E=B.trailer.getRaw("Root")||null;let u;if(g){l?await l.canUpdateStructTree({pdfManager:t,xref:B,newAnnotationsByPage:g})&&(u=l):await hC.canCreateStructureTree({catalogRef:E,pdfManager:t,newAnnotationsByPage:g})&&(u=null);const A=zp.generateImages(i.values(),B,t.evaluatorOptions.isOffscreenCanvasSupported),e=void 0===u?n:[];for(const[i,a]of g)e.push(t.getPage(i).then(e=>{const t=new ty(`Save (editor): page ${i}`);return e.saveNewAnnotations(C,t,a,A).finally(function(){Q(t)})}));null===u?n.push(Promise.all(e).then(async A=>(await hC.createStructureTree({newAnnotationsByPage:g,xref:B,catalogRef:E,pdfManager:t,newRefs:A}),A))):u&&n.push(Promise.all(e).then(async A=>(await u.updateStructureTree({newAnnotationsByPage:g,pdfManager:t,newRefs:A}),A)))}if(A)n.push(t.serializeXfaData(i));else for(let A=0;A<e;A++)n.push(t.getPage(A).then(function(e){const t=new ty(`Save: page ${A}`);return e.save(C,t,i).finally(function(){Q(t)})}));const d=await Promise.all(n);let f=[],p=null;if(A){if(p=d[0],!p)return r.bytes}else if(f=d.flat(2),0===f.length)return r.bytes;const m=I&&o instanceof _t&&f.some(A=>A.needAppearances),y=o instanceof _t&&o.get("XFA")||null;let w=null,D=!1;if(Array.isArray(y)){for(let A=0,e=y.length;A<e;A+=2)"datasets"===y[A]&&(w=y[A+1],D=!0);null===w&&(w=B.getNewTemporaryRef())}else y&&gt("Unsupported XFA type.");let b=Object.create(null);if(B.trailer){const A=Object.create(null),e=B.trailer.get("Info")||null;e instanceof _t&&e.forEach((e,t)=>{"string"==typeof t&&(A[e]=Ft(t))}),b={rootRef:E,encryptRef:B.trailer.getRaw("Encrypt")||null,newRef:B.getNewTemporaryRef(),infoRef:B.trailer.getRaw("Info")||null,info:A,fileIds:B.trailer.get("ID")||null,startXRef:h?c:B.lastXRefStreamPos??c,filename:a}}return rC({originalData:r.bytes,xrefInfo:b,newRefs:f,xref:B,hasXfa:!!y,xfaDatasetsRef:w,hasXfaDatasetsEntry:D,needAppearances:m,acroFormRef:I,acroForm:o,xfaData:p,useXrefStream:ai(B.topDict,"XRef")}).finally(()=>{B.resetNewTemporaryRef()})}),C.on("GetOperatorList",function(A,e){const i=A.pageIndex;t.getPage(i).then(function(t){const a=new ty(`GetOperatorList: page ${i}`);h(a);const s=n>=dA?Date.now():0;t.getOperatorList({handler:C,sink:e,task:a,intent:A.intent,cacheKey:A.cacheKey,annotationStorage:A.annotationStorage}).then(function(A){Q(a),s&&nt(`page=${i+1} - getOperatorList: time=${Date.now()-s}ms, len=${A.length}`),e.close()},function(A){Q(a),a.terminated||e.error(A)})})}),C.on("GetTextContent",function(A,e){const{pageIndex:i,includeMarkedContent:a,disableNormalization:s}=A;t.getPage(i).then(function(A){const t=new ty("GetTextContent: page "+i);h(t);const g=n>=dA?Date.now():0;A.extractTextContent({handler:C,task:t,sink:e,includeMarkedContent:a,disableNormalization:s}).then(function(){Q(t),g&&nt(`page=${i+1} - getTextContent: time=`+(Date.now()-g)+"ms"),e.close()},function(A){Q(t),t.terminated||e.error(A)})})}),C.on("GetStructTree",function(A){return t.getPage(A.pageIndex).then(function(A){return t.ensure(A,"getStructTree")})}),C.on("FontFallback",function(A){return t.fontFallback(A.id,C)}),C.on("Cleanup",function(A){return t.cleanup(!0)}),C.on("Terminate",function(A){i=!0;const e=[];if(t){t.terminate(new dt("Worker was terminated."));const A=t.cleanup();e.push(A),t=null}else mc();a&&a(new dt("Worker was terminated."));for(const A of s)e.push(A.finished),A.terminate();return Promise.all(e).then(function(){C.destroy(),C=null})}),C.on("Ready",function(e){!function(A){function e(A){B(),C.send("GetDoc",{pdfInfo:A})}function a(A){if(B(),A instanceof Bt){const e=new ty(`PasswordException: response ${A.code}`);h(e),C.sendWithPromise("PasswordRequest",A).then(function({password:A}){Q(e),t.updatePassword(A),s()}).catch(function(){Q(e),C.send("DocException",A)})}else A instanceof Qt||A instanceof lt||A instanceof Et||A instanceof ht?C.send("DocException",A):C.send("DocException",new ht(A.message,A.toString()))}function s(){B(),l(!1).then(e,function(A){B(),A instanceof Ci?t.requestLoadedStream().then(function(){B(),l(!0).then(e,a)}):a(A)})}B(),E(A).then(function(A){if(i)throw A.terminate(new dt("Worker was terminated.")),new Error("Worker was terminated");t=A,t.requestLoadedStream(!0).then(A=>{C.send("DataLoaded",{length:A.bytes.byteLength})})}).then(s,a)}(A),A=null}),c}static initializeFromPort(A){const e=new _m("worker","main",A);iy.setup(e,A),e.send("ready",null)}}var ay;"undefined"==typeof window&&!t&&"undefined"!=typeof self&&("function"==typeof(ay=self).postMessage&&"onmessage"in ay)&&iy.initializeFromPort(self);var sy=e.WorkerMessageHandler;export{sy as WorkerMessageHandler};