F[1].offset-V[1].offset),Y={};for(let[F,V]of Z)await x.skip(V.offset-x.offset),Y[F]=await x.read(V.length);let J=[];if(Y.ltag&&(J=y.ltag.parse(Y.ltag)),!Y.name)throw new Error(`missing required OpenType table 'name' in font file: ${M}`);return{names:y.name.parse(Y.name,J),os2:Y.os2&&y.os2.parse(Y.os2),head:Y.head&&y.head.parse(Y.head),post:Y.post&&y.post.parse(Y.post)};case w.Woff:default:throw new Error("provided font type is not supported yet")}}finally{D.unpipe(x),k||(D.destroy(),x.destroy())}})().then(b,E)})};let C={one:Buffer.from([0,1,0,0]),otto:Buffer.from("OTTO"),true:Buffer.from("true"),typ1:Buffer.from("typ1"),woff:Buffer.from("wOFF")}},731:(l,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let p=u(980);n.default=function(f){return{version:p.formatFixed(f.readUInt16BE(0),f.readUInt16BE(2)),fontRevision:p.formatFixed(f.readUInt16BE(4),f.readUInt16BE(6)),checkSumAdjustment:f.readUInt32BE(8),magicNumber:f.readUInt32BE(12),flags:f.readUInt16BE(16),unitsPerEm:f.readUInt16BE(18),created:p.formatLongDateTime(f.readUInt32BE(20),f.readUInt32BE(24)),modified:p.formatLongDateTime(f.readUInt32BE(28),f.readUInt32BE(32)),xMin:f.readInt16BE(36),yMin:f.readInt16BE(38),xMax:f.readInt16BE(40),yMax:f.readInt16BE(42),macStyle:f.readUInt16BE(44),lowestRecPPEM:f.readUInt16BE(46),fontDirectionHint:f.readInt16BE(48),indexToLocFormat:f.readInt16BE(50),glyphDataFormat:f.readInt16BE(52)}}},879:(l,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(u){if(u.readUInt32BE(0)!==1)throw new Error("Unsupported ltag table version.");let p=u.readUInt32BE(8),f=[];for(let g=0;g{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let u=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],p={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},f={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function g(C,M,b){switch(C){case 0:if(M===65535)return"und";if(b)return b[M];break;case 1:return p[M];case 3:return f[M]}}let h="utf-16",v={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},d={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function m(C,M,b){switch(C){case 0:return h;case 1:return d[b]||v[M];case 3:if(M===1||M===10)return h}}n.default=function(C,M){let b={},E=C.readUInt16BE(2),x=C.readUInt16BE(4),D=6;for(let k=0;k{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(u){let p={version:u.readUInt16BE(0),xAvgCharWidth:u.readUInt16BE(2),usWeightClass:u.readUInt16BE(4),usWidthClass:u.readUInt16BE(6),fsType:u.readUInt16BE(8),ySubscriptXSize:u.readInt16BE(10),ySubscriptYSize:u.readInt16BE(12),ySubscriptXOffset:u.readInt16BE(14),ySubscriptYOffset:u.readInt16BE(16),ySuperscriptXSize:u.readInt16BE(18),ySuperscriptYSize:u.readInt16BE(20),ySuperscriptXOffset:u.readInt16BE(22),ySuperscriptYOffset:u.readInt16BE(24),yStrikeoutSize:u.readInt16BE(26),yStrikeoutPosition:u.readInt16BE(28),sFamilyClass:u.readInt16BE(30),panose:[u.readUInt8(32),u.readUInt8(33),u.readUInt8(34),u.readUInt8(35),u.readUInt8(36),u.readUInt8(37),u.readUInt8(38),u.readUInt8(39),u.readUInt8(40),u.readUInt8(41)],ulUnicodeRange1:u.readUInt32BE(42),ulUnicodeRange2:u.readUInt32BE(46),ulUnicodeRange3:u.readUInt32BE(50),ulUnicodeRange4:u.readUInt32BE(54),achVendID:String.fromCharCode(u.readUInt8(58),u.readUInt8(59),u.readUInt8(60),u.readUInt8(61)),fsSelection:u.readUInt16BE(62),usFirstCharIndex:u.readUInt16BE(64),usLastCharIndex:u.readUInt16BE(66),sTypoAscender:u.readInt16BE(68),sTypoDescender:u.readInt16BE(70),sTypoLineGap:u.readInt16BE(72),usWinAscent:u.readUInt16BE(74),usWinDescent:u.readUInt16BE(76)};return p.version>=1&&(p.ulCodePageRange1=u.readUInt32BE(78),p.ulCodePageRange2=u.readUInt32BE(82)),p.version>=2&&(p.sxHeight=u.readInt16BE(86),p.sCapHeight=u.readInt16BE(88),p.usDefaultChar=u.readUInt16BE(90),p.usBreakChar=u.readUInt16BE(92),p.usMaxContent=u.readUInt16BE(94)),p}},954:(l,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let p=u(980);n.default=function(f){return{version:p.formatFixed(f.readUInt16BE(0),f.readUInt16BE(2)),italicAngle:p.formatFixed(f.readUInt16BE(4),f.readUInt16BE(6)),underlinePosition:f.readInt16BE(8),underlineThickness:f.readInt16BE(10),isFixedPitch:f.readUInt32BE(12),minMemType42:f.readUInt32BE(16),maxMemType42:f.readUInt32BE(20),minMemType1:f.readUInt32BE(24),maxMemType1:f.readUInt32BE(28)}}},980:(l,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatFixed=function(u,p){return u+p/65536},n.formatLongDateTime=function(u,p){return 1e3*(u*4294967296+p-2082844800)}},459:(l,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let p=u(56),f=u(456),g=u(49),h={win32:()=>process.env.WINDIR?[p.join(process.env.WINDIR,"Fonts")]:["C:\\Windows\\Fonts"],darwin:()=>{let d=f.homedir();return[...d?[p.join(d,"/Library/Fonts")]:[],"/Library/Fonts","/Network/Library/Fonts","/System/Library/Fonts","/System Folder/Fonts"]},linux:()=>{let d=f.homedir();return["/usr/share/fonts","/usr/local/share/fonts",...d?[p.join(d,".fonts"),p.join(d,".local/share/fonts")]:[]]}};function v(d){let m=Object.assign({extensions:["ttf","otf","ttc","woff","woff2"],additionalFolders:[]},d),w=f.platform(),y=h[w];if(!y)throw new Error(`Unsupported platform: ${w}`);let C=y();return g.default([...C,...m.additionalFolders],m.extensions)}l.exports=Object.assign(v,{default:v}),n.default=v},49:(l,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let p=u(89),f=u(269),g=u(56),h=f.promisify(p.readdir),v=f.promisify(p.stat);async function d(m,w,y=10){if(y<=0)return[];let C;try{C=await h(m)}catch(b){return[]}let M=[];return await Promise.all(C.map(async b=>{let E=g.join(m,b),x;try{x=await v(E)}catch(D){return}x.isFile()&&w.test(E)?M.push(E):x.isDirectory()&&M.push(...await d(E,w,y-1))})),M}n.default=async function(m,w){let y=new Set;return await Promise.all(m.map(async C=>{let M=await d(g.resolve(C),new RegExp(`\\.${w.map(b=>`(?:${b})`).join("|")}$`));for(let b of M)y.add(b)})),[...y]}},593:(l,n,u)=>{"use strict";let p=u(411),f=Symbol("max"),g=Symbol("length"),h=Symbol("lengthCalculator"),v=Symbol("allowStale"),d=Symbol("maxAge"),m=Symbol("dispose"),w=Symbol("noDisposeOnSet"),y=Symbol("lruList"),C=Symbol("cache"),M=Symbol("updateAgeOnGet"),b=()=>1,E=(O,Z,Y)=>{let J=O[C].get(Z);if(J){let F=J.value;if(x(O,F)){if(k(O,J),!O[v])return}else Y&&(O[M]&&(J.value.now=Date.now()),O[y].unshiftNode(J));return F.value}},x=(O,Z)=>{if(!Z||!Z.maxAge&&!O[d])return!1;let Y=Date.now()-Z.now;return Z.maxAge?Y>Z.maxAge:O[d]&&Y>O[d]},D=O=>{if(O[g]>O[f])for(let Z=O[y].tail;O[g]>O[f]&&Z!==null;){let Y=Z.prev;k(O,Z),Z=Y}},k=(O,Z)=>{if(Z){let Y=Z.value;O[m]&&O[m](Y.key,Y.value),O[g]-=Y.length,O[C].delete(Y.key),O[y].removeNode(Z)}};class _{constructor(Z,Y,J,F,V){this.key=Z,this.value=Y,this.length=J,this.now=F,this.maxAge=V||0}}let U=(O,Z,Y,J)=>{let F=Y.value;x(O,F)&&(k(O,Y),O[v]||(F=void 0)),F&&Z.call(J,F.value,F.key,O)};l.exports=class{constructor(O){if(typeof O=="number"&&(O={max:O}),O||(O={}),O.max&&(typeof O.max!="number"||O.max<0))throw new TypeError("max must be a non-negative number");this[f]=O.max||1/0;let Z=O.length||b;if(this[h]=typeof Z!="function"?b:Z,this[v]=O.stale||!1,O.maxAge&&typeof O.maxAge!="number")throw new TypeError("maxAge must be a number");this[d]=O.maxAge||0,this[m]=O.dispose,this[w]=O.noDisposeOnSet||!1,this[M]=O.updateAgeOnGet||!1,this.reset()}set max(O){if(typeof O!="number"||O<0)throw new TypeError("max must be a non-negative number");this[f]=O||1/0,D(this)}get max(){return this[f]}set allowStale(O){this[v]=!!O}get allowStale(){return this[v]}set maxAge(O){if(typeof O!="number")throw new TypeError("maxAge must be a non-negative number");this[d]=O,D(this)}get maxAge(){return this[d]}set lengthCalculator(O){typeof O!="function"&&(O=b),O!==this[h]&&(this[h]=O,this[g]=0,this[y].forEach(Z=>{Z.length=this[h](Z.value,Z.key),this[g]+=Z.length})),D(this)}get lengthCalculator(){return this[h]}get length(){return this[g]}get itemCount(){return this[y].length}rforEach(O,Z){Z=Z||this;for(let Y=this[y].tail;Y!==null;){let J=Y.prev;U(this,O,Y,Z),Y=J}}forEach(O,Z){Z=Z||this;for(let Y=this[y].head;Y!==null;){let J=Y.next;U(this,O,Y,Z),Y=J}}keys(){return this[y].toArray().map(O=>O.key)}values(){return this[y].toArray().map(O=>O.value)}reset(){this[m]&&this[y]&&this[y].length&&this[y].forEach(O=>this[m](O.key,O.value)),this[C]=new Map,this[y]=new p,this[g]=0}dump(){return this[y].map(O=>!x(this,O)&&{k:O.key,v:O.value,e:O.now+(O.maxAge||0)}).toArray().filter(O=>O)}dumpLru(){return this[y]}set(O,Z,Y){if((Y=Y||this[d])&&typeof Y!="number")throw new TypeError("maxAge must be a number");let J=Y?Date.now():0,F=this[h](Z,O);if(this[C].has(O)){if(F>this[f])return k(this,this[C].get(O)),!1;let W=this[C].get(O).value;return this[m]&&(this[w]||this[m](O,W.value)),W.now=J,W.maxAge=Y,W.value=Z,this[g]+=F-W.length,W.length=F,this.get(O),D(this),!0}let V=new _(O,Z,F,J,Y);return V.length>this[f]?(this[m]&&this[m](O,Z),!1):(this[g]+=V.length,this[y].unshift(V),this[C].set(O,this[y].head),D(this),!0)}has(O){if(!this[C].has(O))return!1;let Z=this[C].get(O).value;return!x(this,Z)}get(O){return E(this,O,!0)}peek(O){return E(this,O,!1)}pop(){let O=this[y].tail;return O?(k(this,O),O.value):null}del(O){k(this,this[C].get(O))}load(O){this.reset();let Z=Date.now();for(let Y=O.length-1;Y>=0;Y--){let J=O[Y],F=J.e||0;if(F===0)this.set(J.k,J.v);else{let V=F-Z;V>0&&this.set(J.k,J.v,V)}}}prune(){this[C].forEach((O,Z)=>E(this,Z,!1))}}},602:(l,n,u)=>{"use strict";u.r(n),u.d(n,{BoundingBox:()=>v,Font:()=>jm,Glyph:()=>b3,Path:()=>m,_parse:()=>E1,load:()=>ZO,loadSync:()=>jO,parse:()=>ln});var p=u(311),f=u.n(p);function g(A,z,L,B,I){return Math.pow(1-I,3)*A+3*Math.pow(1-I,2)*I*z+3*(1-I)*Math.pow(I,2)*L+Math.pow(I,3)*B}function h(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}h.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},h.prototype.addPoint=function(A,z){typeof A=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=A,this.x2=A),Athis.x2&&(this.x2=A)),typeof z=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=z,this.y2=z),zthis.y2&&(this.y2=z))},h.prototype.addX=function(A){this.addPoint(A,null)},h.prototype.addY=function(A){this.addPoint(null,A)},h.prototype.addBezier=function(A,z,L,B,I,H,G,P){let K=[A,z],q=[L,B],e1=[I,H],a1=[G,P];this.addPoint(A,z),this.addPoint(G,P);for(let c1=0;c1<=1;c1++){let y1=6*K[c1]-12*q[c1]+6*e1[c1],d1=-3*K[c1]+9*q[c1]-9*e1[c1]+3*a1[c1],Y1=3*q[c1]-3*K[c1];if(d1===0){if(y1===0)continue;let n0=-Y1/y1;0=0&&H>0&&(I+=" "),I+=z(G)}return I}A=A!==void 0?A:2;let B="";for(let I=0;I",z},d.prototype.toDOMElement=function(A){let z=this.toPathData(A),L=document.createElementNS("http://www.w3.org/2000/svg","path");return L.setAttribute("d",z),L};let m=d;function w(A){throw new Error(A)}function y(A,z){A||w(z)}let C={fail:w,argument:y,assert:y},M=2147483648,b={},E={},x={};function D(A){return function(){return A}}E.BYTE=function(A){return C.argument(A>=0&&A<=255,"Byte value should be between 0 and 255."),[A]},x.BYTE=D(1),E.CHAR=function(A){return[A.charCodeAt(0)]},x.CHAR=D(1),E.CHARARRAY=function(A){let z=[];for(let L=0;L>8&255,255&A]},x.USHORT=D(2),E.SHORT=function(A){return A>=32768&&(A=-(65536-A)),[A>>8&255,255&A]},x.SHORT=D(2),E.UINT24=function(A){return[A>>16&255,A>>8&255,255&A]},x.UINT24=D(3),E.ULONG=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]},x.ULONG=D(4),E.LONG=function(A){return A>=M&&(A=-(2*M-A)),[A>>24&255,A>>16&255,A>>8&255,255&A]},x.LONG=D(4),E.FIXED=E.ULONG,x.FIXED=x.ULONG,E.FWORD=E.SHORT,x.FWORD=x.SHORT,E.UFWORD=E.USHORT,x.UFWORD=x.USHORT,E.LONGDATETIME=function(A){return[0,0,0,0,A>>24&255,A>>16&255,A>>8&255,255&A]},x.LONGDATETIME=D(8),E.TAG=function(A){return C.argument(A.length===4,"Tag should be exactly 4 ASCII characters."),[A.charCodeAt(0),A.charCodeAt(1),A.charCodeAt(2),A.charCodeAt(3)]},x.TAG=D(4),E.Card8=E.BYTE,x.Card8=x.BYTE,E.Card16=E.USHORT,x.Card16=x.USHORT,E.OffSize=E.BYTE,x.OffSize=x.BYTE,E.SID=E.USHORT,x.SID=x.USHORT,E.NUMBER=function(A){return 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?E.NUMBER16(A):E.NUMBER32(A)},x.NUMBER=function(A){return E.NUMBER(A).length},E.NUMBER16=function(A){return[28,A>>8&255,255&A]},x.NUMBER16=D(3),E.NUMBER32=function(A){return[29,A>>24&255,A>>16&255,A>>8&255,255&A]},x.NUMBER32=D(5),E.REAL=function(A){let z=A.toString(),L=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(z);if(L){let H=parseFloat("1e"+((L[2]?+L[2]:0)+L[1].length));z=(Math.round(A*H)/H).toString()}let B="";for(let H=0,G=z.length;H>8&255,z[z.length]=255&B}return z},x.UTF16=function(A){return 2*A.length};let k={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};b.MACSTRING=function(A,z,L,B){let I=k[B];if(I===void 0)return;let H="";for(let G=0;G=-128&&A<=127}function Z(A,z,L){let B=0,I=A.length;for(;z>8&255,P+256&255)}return H}E.MACSTRING=function(A,z){let L=function(I){if(!U){U={};for(let K in k)U[K]=new String(K)}let H=U[I];if(H===void 0)return;if(_){let K=_.get(H);if(K!==void 0)return K}let G=k[I];if(G===void 0)return;let P={};for(let K=0;K=128&&(H=L[H],H===void 0))return;B[I]=H}return B},x.MACSTRING=function(A,z){let L=E.MACSTRING(A,z);return L!==void 0?L.length:0},E.VARDELTAS=function(A){let z=0,L=[];for(;z=-128&&B<=127?Y(A,z,L):J(A,z,L)}return L},E.INDEX=function(A){let z=1,L=[z],B=[];for(let P=0;P>8,z[G+1]=255&P,z=z.concat(B[H])}return z},x.TABLE=function(A){let z=0,L=A.fields.length;for(let B=0;B0)return new s1(this.data,this.offset+z).parseStruct(A)},s1.prototype.parsePointer32=function(A){let z=this.parseOffset32();if(z>0)return new s1(this.data,this.offset+z).parseStruct(A)},s1.prototype.parseListOfLists=function(A){let z=this.parseOffset16List(),L=z.length,B=this.relativeOffset,I=new Array(L);for(let H=0;H=0;H-=1){let G=E1.getUShort(A,z+4+8*H),P=E1.getUShort(A,z+4+8*H+2);if(G===3&&(P===0||P===1||P===10)){B=E1.getULong(A,z+4+8*H+4);break}}if(B===-1)throw new Error("No valid cmap sub-tables found.");let I=new E1.Parser(A,z+B);if(L.format=I.parseUShort(),L.format===12)(function(H,G){let P;G.parseUShort(),H.length=G.parseULong(),H.language=G.parseULong(),H.groupCount=P=G.parseULong(),H.glyphIndexMap={};for(let K=0;K>1,G.skip("uShort",3),H.glyphIndexMap={};let a1=new E1.Parser(P,K+q+14),c1=new E1.Parser(P,K+q+16+2*e1),y1=new E1.Parser(P,K+q+16+4*e1),d1=new E1.Parser(P,K+q+16+6*e1),Y1=K+q+16+8*e1;for(let g1=0;g10;z-=1)if(A.get(z).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),L=!1;break}let B=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:L?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:L?12:20}];L||(B=B.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),B=B.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);let I=new j.Table("cmap",B);for(I.segments=[],z=0;z0?(H=A.parseByte(),(z&I)==0&&(H=-H),H=L+H):H=(z&I)>0?L:L+A.parseShort(),H}function a2(A,z,L){let B=new E1.Parser(z,L),I,H;if(A.numberOfContours=B.parseShort(),A._xMin=B.parseShort(),A._yMin=B.parseShort(),A._xMax=B.parseShort(),A._yMax=B.parseShort(),A.numberOfContours>0){let G=A.endPointIndices=[];for(let K=0;K0){let q=B.parseByte();for(let e1=0;e10){let K=[],q;if(P>0){for(let c1=0;c1=0,K.push(q);let e1=0;for(let c1=0;c1
0?(2&I)>0?(P.dx=B.parseShort(),P.dy=B.parseShort()):P.matchedPoints=[B.parseUShort(),B.parseUShort()]:(2&I)>0?(P.dx=B.parseChar(),P.dy=B.parseChar()):P.matchedPoints=[B.parseByte(),B.parseByte()],(8&I)>0?P.xScale=P.yScale=B.parseF2Dot14():(64&I)>0?(P.xScale=B.parseF2Dot14(),P.yScale=B.parseF2Dot14()):(128&I)>0&&(P.xScale=B.parseF2Dot14(),P.scale01=B.parseF2Dot14(),P.scale10=B.parseF2Dot14(),P.yScale=B.parseF2Dot14()),A.components.push(P),G=!!(32&I)}if(256&I){A.instructionLength=B.parseUShort(),A.instructions=[];for(let P=0;Pz.points.length-1||B.matchedPoints[1]>I.points.length-1)throw Error("Matched points out of range in "+z.name);let G=z.points[B.matchedPoints[0]],P=I.points[B.matchedPoints[1]],K={xScale:B.xScale,scale01:B.scale01,scale10:B.scale10,yScale:B.yScale,dx:0,dy:0};P=A0([P],K)[0],K.dx=G.x-P.x,K.dy=G.y-P.y,H=A0(I.points,K)}z.points=z.points.concat(H)}}return s0(z.points)}let g4={getPath:s0,parse:function(A,z,L,B){let I=new h5.GlyphSet(B);for(let H=0;H>4,a1=15&q;if(e1===15||(P+=K[e1],a1===15))break;P+=K[a1]}return parseFloat(P)}(A);if(z>=32&&z<=246)return z-139;if(z>=247&&z<=250)return L=A.parseByte(),256*(z-247)+L+108;if(z>=251&&z<=254)return L=A.parseByte(),256*-(z-251)-L-108;throw new Error("Invalid b0 "+z)}function E8(A,z,L){z=z!==void 0?z:0;let B=new E1.Parser(A,z),I=[],H=[];for(L=L!==void 0?L:A.length;B.relativeOffset>1,K.length=0,d1=!0}return function B1(b1){let k1,H0,p0,p2,P2,M3,_2,r3,y2,Y2,F2,U3,r2=0;for(;r21&&!d1&&(U1=K.shift()+c1,d1=!0),v1+=K.pop(),n0(g1,v1);break;case 5:for(;K.length>0;)g1+=K.shift(),v1+=K.shift(),P.lineTo(g1,v1);break;case 6:for(;K.length>0&&(g1+=K.shift(),P.lineTo(g1,v1),K.length!==0);)v1+=K.shift(),P.lineTo(g1,v1);break;case 7:for(;K.length>0&&(v1+=K.shift(),P.lineTo(g1,v1),K.length!==0);)g1+=K.shift(),P.lineTo(g1,v1);break;case 8:for(;K.length>0;)B=g1+K.shift(),I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),g1=H+K.shift(),v1=G+K.shift(),P.curveTo(B,I,H,G,g1,v1);break;case 10:P2=K.pop()+e1,M3=q[P2],M3&&B1(M3);break;case 11:return;case 12:switch(i3=b1[r2],r2+=1,i3){case 35:B=g1+K.shift(),I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),_2=H+K.shift(),r3=G+K.shift(),y2=_2+K.shift(),Y2=r3+K.shift(),F2=y2+K.shift(),U3=Y2+K.shift(),g1=F2+K.shift(),v1=U3+K.shift(),K.shift(),P.curveTo(B,I,H,G,_2,r3),P.curveTo(y2,Y2,F2,U3,g1,v1);break;case 34:B=g1+K.shift(),I=v1,H=B+K.shift(),G=I+K.shift(),_2=H+K.shift(),r3=G,y2=_2+K.shift(),Y2=G,F2=y2+K.shift(),U3=v1,g1=F2+K.shift(),P.curveTo(B,I,H,G,_2,r3),P.curveTo(y2,Y2,F2,U3,g1,v1);break;case 36:B=g1+K.shift(),I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),_2=H+K.shift(),r3=G,y2=_2+K.shift(),Y2=G,F2=y2+K.shift(),U3=Y2+K.shift(),g1=F2+K.shift(),P.curveTo(B,I,H,G,_2,r3),P.curveTo(y2,Y2,F2,U3,g1,v1);break;case 37:B=g1+K.shift(),I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),_2=H+K.shift(),r3=G+K.shift(),y2=_2+K.shift(),Y2=r3+K.shift(),F2=y2+K.shift(),U3=Y2+K.shift(),Math.abs(F2-g1)>Math.abs(U3-v1)?g1=F2+K.shift():v1=U3+K.shift(),P.curveTo(B,I,H,G,_2,r3),P.curveTo(y2,Y2,F2,U3,g1,v1);break;default:console.log("Glyph "+z.index+": unknown operator 1200"+i3),K.length=0}break;case 14:K.length>0&&!d1&&(U1=K.shift()+c1,d1=!0),Y1&&(P.closePath(),Y1=!1);break;case 19:case 20:C0(),r2+=y1+7>>3;break;case 21:K.length>2&&!d1&&(U1=K.shift()+c1,d1=!0),v1+=K.pop(),g1+=K.pop(),n0(g1,v1);break;case 22:K.length>1&&!d1&&(U1=K.shift()+c1,d1=!0),g1+=K.pop(),n0(g1,v1);break;case 24:for(;K.length>2;)B=g1+K.shift(),I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),g1=H+K.shift(),v1=G+K.shift(),P.curveTo(B,I,H,G,g1,v1);g1+=K.shift(),v1+=K.shift(),P.lineTo(g1,v1);break;case 25:for(;K.length>6;)g1+=K.shift(),v1+=K.shift(),P.lineTo(g1,v1);B=g1+K.shift(),I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),g1=H+K.shift(),v1=G+K.shift(),P.curveTo(B,I,H,G,g1,v1);break;case 26:for(K.length%2&&(g1+=K.shift());K.length>0;)B=g1,I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),g1=H,v1=G+K.shift(),P.curveTo(B,I,H,G,g1,v1);break;case 27:for(K.length%2&&(v1+=K.shift());K.length>0;)B=g1+K.shift(),I=v1,H=B+K.shift(),G=I+K.shift(),g1=H+K.shift(),v1=G,P.curveTo(B,I,H,G,g1,v1);break;case 28:k1=b1[r2],H0=b1[r2+1],K.push((k1<<24|H0<<16)>>16),r2+=2;break;case 29:P2=K.pop()+A.gsubrsBias,M3=A.gsubrs[P2],M3&&B1(M3);break;case 30:for(;K.length>0&&(B=g1,I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),g1=H+K.shift(),v1=G+(K.length===1?K.shift():0),P.curveTo(B,I,H,G,g1,v1),K.length!==0);)B=g1+K.shift(),I=v1,H=B+K.shift(),G=I+K.shift(),v1=G+K.shift(),g1=H+(K.length===1?K.shift():0),P.curveTo(B,I,H,G,g1,v1);break;case 31:for(;K.length>0&&(B=g1+K.shift(),I=v1,H=B+K.shift(),G=I+K.shift(),v1=G+K.shift(),g1=H+(K.length===1?K.shift():0),P.curveTo(B,I,H,G,g1,v1),K.length!==0);)B=g1,I=v1+K.shift(),H=B+K.shift(),G=I+K.shift(),g1=H+K.shift(),v1=G+(K.length===1?K.shift():0),P.curveTo(B,I,H,G,g1,v1);break;default:i3<32?console.log("Glyph "+z.index+": unknown operator "+i3):i3<247?K.push(i3-139):i3<251?(k1=b1[r2],r2+=1,K.push(256*(i3-247)+k1+108)):i3<255?(k1=b1[r2],r2+=1,K.push(256*-(i3-251)-k1-108)):(k1=b1[r2],H0=b1[r2+1],p0=b1[r2+2],p2=b1[r2+3],r2+=4,K.push((k1<<24|H0<<16|p0<<8|p2)/65536))}}}(L),z.advanceWidth=U1,P}function qp(A,z){let L,B=z3.indexOf(A);return B>=0&&(L=B),B=z.indexOf(A),B>=0?L=B+z3.length:(L=z3.length+z.length,z.push(A)),L}function Xp(A,z,L){let B={};for(let I=0;I=C0)throw new Error("CFF table CID Font FDSelect has bad FD index value "+b1+" (FD count "+C0+")");B1.push(b1)}else{if(H0!==3)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+H0);{let p0=k1.parseCard16(),p2,P2=k1.parseCard16();if(P2!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+P2);for(let M3=0;M3=C0)throw new Error("CFF table CID Font FDSelect has bad FD index value "+b1+" (FD count "+C0+")");if(p2>n0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+p2);for(;P2=1&&(L.ulCodePageRange1=B.parseULong(),L.ulCodePageRange2=B.parseULong()),L.version>=2&&(L.sxHeight=B.parseShort(),L.sCapHeight=B.parseShort(),L.usDefaultChar=B.parseUShort(),L.usBreakChar=B.parseUShort(),L.usMaxContent=B.parseUShort()),L},make:function(A){return new j.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],A)},unicodeRanges:tn,getUnicodeRange:function(A){for(let z=0;z=L.begin&&A=L1.length){let H=B.parseChar();L.names.push(B.parseString(H))}break;case 2.5:L.numberOfGlyphs=B.parseUShort(),L.offset=new Array(L.numberOfGlyphs);for(let I=0;IP.value.tag?1:-1}),z.fields=z.fields.concat(B),z.fields=z.fields.concat(I),z}function wm(A,z,L){for(let B=0;B0)return A.glyphs.get(I).getMetrics()}return L}function yO(A){let z=0;for(let L=0;LB8||K===void 0)&&B8>0&&(K=B8),q 123 are reserved for internal usage");y1|=1<0?im.make(p2):void 0,_2=mm.make(),r3=tm.make(A.glyphs,{version:A.getEnglishName("version"),fullName:k1,familyName:B1,weightName:b1,postScriptName:H0,unitsPerEm:A.unitsPerEm,fontBBox:[0,d1.yMin,d1.ascender,d1.advanceWidthMax]}),y2=A.metas&&Object.keys(A.metas).length>0?vm.make(A.metas):void 0,Y2=[Y1,g1,v1,U1,P2,C0,_2,r3,n0];M3&&Y2.push(M3),A.tables.gsub&&Y2.push(dm.make(A.tables.gsub)),y2&&Y2.push(y2);let F2=bO(Y2),U3=Am(F2.encode()),r2=F2.fields,i3=!1;for(let p4=0;p4>>1,H=A[I].tag;if(H===z)return I;H>>1,H=A[I];if(H===z)return I;H>>1;L=A[H];let G=L.start;if(G===z)return L;G0)return L=A[B-1],z>L.end?0:L}function ym(A,z){this.font=A,this.tableName=z}ym.prototype={searchTag:an,binSearch:zm,getTable:function(A){let z=this.font.tables[this.tableName];return!z&&A&&(z=this.font.tables[this.tableName]=this.createDefaultTable()),z},getScriptNames:function(){let A=this.getTable();return A?A.scripts.map(function(z){return z.tag}):[]},getDefaultScriptName:function(){let A=this.getTable();if(!A)return;let z=!1;for(let L=0;L=0)return B[I].script;if(z){let H={tag:A,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return B.splice(-1-I,0,H),H.script}}},getLangSysTable:function(A,z,L){let B=this.getScriptTable(A,L);if(B){if(!z||z==="dflt"||z==="DFLT")return B.defaultLangSys;let I=an(B.langSysRecords,z);if(I>=0)return B.langSysRecords[I].langSys;if(L){let H={tag:z,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return B.langSysRecords.splice(-1-I,0,H),H.langSys}}},getFeatureTable:function(A,z,L,B){let I=this.getLangSysTable(A,z,B);if(I){let H,G=I.featureIndexes,P=this.font.tables[this.tableName].features;for(let K=0;K=P[K-1].tag,"Features must be added in alphabetical order."),H={tag:L,feature:{params:0,lookupListIndexes:[]}},P.push(H),G.push(K),H.feature}}},getLookupTables:function(A,z,L,B,I){let H=this.getFeatureTable(A,z,L,I),G=[];if(H){let P,K=H.lookupListIndexes,q=this.font.tables[this.tableName].lookups;for(let e1=0;e1=0?L:-1;case 2:let B=bm(A.ranges,z);return B?B.index+z-B.start:-1}},expandCoverage:function(A){if(A.format===1)return A.glyphs;{let z=[],L=A.ranges;for(let B=0;B=0){let e1=H.ligatureSets[q];for(let a1=0;a1=176&&B<=183)I+=B-176+1;else if(B>=184&&B<=191)I+=2*(B-184+1);else if(z&&H===1&&B===27)break;while(H>0);A.ip=I}function Dm(A,z){m1.DEBUG&&console.log(z.step,"SVTCA["+A.axis+"]"),z.fv=z.pv=z.dpv=A}function Hm(A,z){m1.DEBUG&&console.log(z.step,"SPVTCA["+A.axis+"]"),z.pv=z.dpv=A}function _m(A,z){m1.DEBUG&&console.log(z.step,"SFVTCA["+A.axis+"]"),z.fv=A}function Fm(A,z){let L=z.stack,B=L.pop(),I=L.pop(),H=z.z2[B],G=z.z1[I],P,K;m1.DEBUG&&console.log("SPVTL["+A+"]",B,I),A?(P=H.y-G.y,K=G.x-H.x):(P=G.x-H.x,K=G.y-H.y),z.pv=z.dpv=Ge(P,K)}function Tm(A,z){let L=z.stack,B=L.pop(),I=L.pop(),H=z.z2[B],G=z.z1[I],P,K;m1.DEBUG&&console.log("SFVTL["+A+"]",B,I),A?(P=H.y-G.y,K=G.x-H.x):(P=G.x-H.x,K=G.y-H.y),z.fv=Ge(P,K)}function cn(A){m1.DEBUG&&console.log(A.step,"POP[]"),A.stack.pop()}function Om(A,z){let L=z.stack.pop(),B=z.z0[L],I=z.fv,H=z.pv;m1.DEBUG&&console.log(z.step,"MDAP["+A+"]",L);let G=H.distance(B,Ke);A&&(G=z.round(G)),I.setRelative(B,Ke,G,H),I.touch(B),z.rp0=z.rp1=L}function Rm(A,z){let L=z.z2,B=L.length-2,I,H,G;m1.DEBUG&&console.log(z.step,"IUP["+A.axis+"]");for(let P=0;P1?"loop "+(z.loop-P)+": ":"")+"SHP["+(A?"rp1":"rp2")+"]",q)}z.loop=1}function Gm(A,z){let L=z.stack,B=A?z.rp1:z.rp2,I=(A?z.z0:z.z1)[B],H=z.fv,G=z.pv,P=L.pop(),K=z.z2[z.contours[P]],q=K;m1.DEBUG&&console.log(z.step,"SHC["+A+"]",P);let e1=G.distance(I,I,!1,!0);do q!==I&&H.setRelative(q,q,e1,G),q=q.nextPointOnContour;while(q!==K)}function Km(A,z){let L=z.stack,B=A?z.rp1:z.rp2,I=(A?z.z0:z.z1)[B],H=z.fv,G=z.pv,P=L.pop(),K,q;switch(m1.DEBUG&&console.log(z.step,"SHZ["+A+"]",P),P){case 0:K=z.tZone;break;case 1:K=z.gZone;break;default:throw new Error("Invalid zone")}let e1=G.distance(I,I,!1,!0),a1=K.length-2;for(let c1=0;c1",P),z.stack.push(Math.round(64*P))}function on(A,z){let L=z.stack,B=L.pop(),I=z.fv,H=z.pv,G=z.ppem,P=z.deltaBase+16*(A-1),K=z.deltaShift,q=z.z0;m1.DEBUG&&console.log(z.step,"DELTAP["+A+"]",B,L);for(let e1=0;e1>4)!==G)continue;let y1=(15&c1)-8;y1>=0&&y1++,m1.DEBUG&&console.log(z.step,"DELTAPFIX",a1,"by",y1*K);let d1=q[a1];I.setRelative(d1,d1,y1*K,H)}}function Ka(A,z){let L=z.stack,B=L.pop();m1.DEBUG&&console.log(z.step,"ROUND[]"),L.push(64*z.round(B/64))}function nn(A,z){let L=z.stack,B=L.pop(),I=z.ppem,H=z.deltaBase+16*(A-1),G=z.deltaShift;m1.DEBUG&&console.log(z.step,"DELTAC["+A+"]",B,L);for(let P=0;P>4)!==I)continue;let e1=(15&q)-8;e1>=0&&e1++;let a1=e1*G;m1.DEBUG&&console.log(z.step,"DELTACFIX",K,"by",a1),z.cvt[K]+=a1}}function Zm(A,z){let L=z.stack,B=L.pop(),I=L.pop(),H=z.z2[B],G=z.z1[I],P,K;m1.DEBUG&&console.log(z.step,"SDPVTL["+A+"]",B,I),A?(P=H.y-G.y,K=G.x-H.x):(P=G.x-H.x,K=G.y-H.y),z.dpv=Ge(P,K)}function y6(A,z){let L=z.stack,B=z.prog,I=z.ip;m1.DEBUG&&console.log(z.step,"PUSHB["+A+"]");for(let H=0;H=0?1:-1,g1=Math.abs(g1),A&&(U1=H.cvt[P],B&&Math.abs(g1-U1)":"_")+(B?"R":"_")+(I===0?"Gr":I===1?"Bl":I===2?"Wh":"")+"]",A?P+"("+H.cvt[P]+","+U1+")":"",K,"(d =",Y1,"->",v1*g1,")"),H.rp1=H.rp0,H.rp2=K,z&&(H.rp0=K)}Lm.prototype.exec=function(A,z){if(typeof z!="number")throw new Error("Point size is not a number!");if(this._errorState>2)return;let L=this.font,B=this._prepState;if(!B||B.ppem!==z){let I=this._fpgmState;if(!I){b6.prototype=HO,I=this._fpgmState=new b6("fpgm",L.tables.fpgm),I.funcs=[],I.font=L,m1.DEBUG&&(console.log("---EXEC FPGM---"),I.step=-1);try{_7(I)}catch(G){return console.log("Hinting error in FPGM:"+G),void(this._errorState=3)}}b6.prototype=I,B=this._prepState=new b6("prep",L.tables.prep),B.ppem=z;let H=L.tables.cvt;if(H){let G=B.cvt=new Array(H.length),P=z/L.unitsPerEm;for(let K=0;K1))try{return xm(A,B)}catch(I){return this._errorState<1&&(console.log("Hinting error:"+I),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}},xm=function(A,z){let L=z.ppem/z.font.unitsPerEm,B=L,I,H,G,P=A.components;if(b6.prototype=z,P){let K=z.font;H=[],I=[];for(let q=0;q1?"loop "+(A.loop-L)+": ":"")+"SHPIX[]",G,I),B.setRelative(P,P,I),B.touch(P)}A.loop=1},function(A){let z=A.stack,L=A.rp1,B=A.rp2,I=A.loop,H=A.z0[L],G=A.z1[B],P=A.fv,K=A.dpv,q=A.z2;for(;I--;){let e1=z.pop(),a1=q[e1];m1.DEBUG&&console.log(A.step,(A.loop>1?"loop "+(A.loop-I)+": ":"")+"IP[]",e1,L,"<->",B),P.interpolate(a1,H,G,K),P.touch(a1)}A.loop=1},Um.bind(void 0,0),Um.bind(void 0,1),function(A){let z=A.stack,L=A.rp0,B=A.z0[L],I=A.loop,H=A.fv,G=A.pv,P=A.z1;for(;I--;){let K=z.pop(),q=P[K];m1.DEBUG&&console.log(A.step,(A.loop>1?"loop "+(A.loop-I)+": ":"")+"ALIGNRP[]",K),H.setRelative(q,B,0,G),H.touch(q)}A.loop=1},function(A){m1.DEBUG&&console.log(A.step,"RTDG[]"),A.round=BO},Vm.bind(void 0,0),Vm.bind(void 0,1),function(A){let z=A.prog,L=A.ip,B=A.stack,I=z[++L];m1.DEBUG&&console.log(A.step,"NPUSHB[]",I);for(let H=0;HL?1:0)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"GTEQ[]",L,B),z.push(B>=L?1:0)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"EQ[]",L,B),z.push(L===B?1:0)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"NEQ[]",L,B),z.push(L!==B?1:0)},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"ODD[]",L),z.push(Math.trunc(L)%2?1:0)},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"EVEN[]",L),z.push(Math.trunc(L)%2?0:1)},function(A){let z=A.stack.pop();m1.DEBUG&&console.log(A.step,"IF[]",z),z||(km(A,!0),m1.DEBUG&&console.log(A.step,"EIF[]"))},function(A){m1.DEBUG&&console.log(A.step,"EIF[]")},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"AND[]",L,B),z.push(L&&B?1:0)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"OR[]",L,B),z.push(L||B?1:0)},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"NOT[]",L),z.push(L?0:1)},on.bind(void 0,1),function(A){let z=A.stack.pop();m1.DEBUG&&console.log(A.step,"SDB[]",z),A.deltaBase=z},function(A){let z=A.stack.pop();m1.DEBUG&&console.log(A.step,"SDS[]",z),A.deltaShift=Math.pow(.5,z)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"ADD[]",L,B),z.push(B+L)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"SUB[]",L,B),z.push(B-L)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"DIV[]",L,B),z.push(64*B/L)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"MUL[]",L,B),z.push(B*L/64)},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"ABS[]",L),z.push(Math.abs(L))},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"NEG[]",L),z.push(-L)},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"FLOOR[]",L),z.push(64*Math.floor(L/64))},function(A){let z=A.stack,L=z.pop();m1.DEBUG&&console.log(A.step,"CEILING[]",L),z.push(64*Math.ceil(L/64))},Ka.bind(void 0,0),Ka.bind(void 0,1),Ka.bind(void 0,2),Ka.bind(void 0,3),void 0,void 0,void 0,void 0,function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"WCVTF[]",L,B),A.cvt[B]=L*A.ppem/A.font.unitsPerEm},on.bind(void 0,2),on.bind(void 0,3),nn.bind(void 0,1),nn.bind(void 0,2),nn.bind(void 0,3),function(A){let z,L=A.stack.pop();switch(m1.DEBUG&&console.log(A.step,"SROUND[]",L),A.round=Im,192&L){case 0:z=.5;break;case 64:z=1;break;case 128:z=2;break;default:throw new Error("invalid SROUND value")}switch(A.srPeriod=z,48&L){case 0:A.srPhase=0;break;case 16:A.srPhase=.25*z;break;case 32:A.srPhase=.5*z;break;case 48:A.srPhase=.75*z;break;default:throw new Error("invalid SROUND value")}L&=15,A.srThreshold=L===0?0:(L/8-.5)*z},function(A){let z,L=A.stack.pop();switch(m1.DEBUG&&console.log(A.step,"S45ROUND[]",L),A.round=Im,192&L){case 0:z=Math.sqrt(2)/2;break;case 64:z=Math.sqrt(2);break;case 128:z=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(A.srPeriod=z,48&L){case 0:A.srPhase=0;break;case 16:A.srPhase=.25*z;break;case 32:A.srPhase=.5*z;break;case 48:A.srPhase=.75*z;break;default:throw new Error("invalid S45ROUND value")}L&=15,A.srThreshold=L===0?0:(L/8-.5)*z},void 0,void 0,function(A){m1.DEBUG&&console.log(A.step,"ROFF[]"),A.round=LO},void 0,function(A){m1.DEBUG&&console.log(A.step,"RUTG[]"),A.round=kO},function(A){m1.DEBUG&&console.log(A.step,"RDTG[]"),A.round=DO},cn,cn,void 0,void 0,void 0,void 0,void 0,function(A){let z=A.stack.pop();m1.DEBUG&&console.log(A.step,"SCANCTRL[]",z)},Zm.bind(void 0,0),Zm.bind(void 0,1),function(A){let z=A.stack,L=z.pop(),B=0;m1.DEBUG&&console.log(A.step,"GETINFO[]",L),1&L&&(B=35),32&L&&(B|=4096),z.push(B)},void 0,function(A){let z=A.stack,L=z.pop(),B=z.pop(),I=z.pop();m1.DEBUG&&console.log(A.step,"ROLL[]"),z.push(B),z.push(L),z.push(I)},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"MAX[]",L,B),z.push(Math.max(B,L))},function(A){let z=A.stack,L=z.pop(),B=z.pop();m1.DEBUG&&console.log(A.step,"MIN[]",L,B),z.push(Math.min(B,L))},function(A){let z=A.stack.pop();m1.DEBUG&&console.log(A.step,"SCANTYPE[]",z)},function(A){let z=A.stack.pop(),L=A.stack.pop();switch(m1.DEBUG&&console.log(A.step,"INSTCTRL[]",z,L),z){case 1:return void(A.inhibitGridFit=!!L);case 2:return void(A.ignoreCvt=!!L);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,y6.bind(void 0,1),y6.bind(void 0,2),y6.bind(void 0,3),y6.bind(void 0,4),y6.bind(void 0,5),y6.bind(void 0,6),y6.bind(void 0,7),y6.bind(void 0,8),M6.bind(void 0,1),M6.bind(void 0,2),M6.bind(void 0,3),M6.bind(void 0,4),M6.bind(void 0,5),M6.bind(void 0,6),M6.bind(void 0,7),M6.bind(void 0,8),R1.bind(void 0,0,0,0,0,0),R1.bind(void 0,0,0,0,0,1),R1.bind(void 0,0,0,0,0,2),R1.bind(void 0,0,0,0,0,3),R1.bind(void 0,0,0,0,1,0),R1.bind(void 0,0,0,0,1,1),R1.bind(void 0,0,0,0,1,2),R1.bind(void 0,0,0,0,1,3),R1.bind(void 0,0,0,1,0,0),R1.bind(void 0,0,0,1,0,1),R1.bind(void 0,0,0,1,0,2),R1.bind(void 0,0,0,1,0,3),R1.bind(void 0,0,0,1,1,0),R1.bind(void 0,0,0,1,1,1),R1.bind(void 0,0,0,1,1,2),R1.bind(void 0,0,0,1,1,3),R1.bind(void 0,0,1,0,0,0),R1.bind(void 0,0,1,0,0,1),R1.bind(void 0,0,1,0,0,2),R1.bind(void 0,0,1,0,0,3),R1.bind(void 0,0,1,0,1,0),R1.bind(void 0,0,1,0,1,1),R1.bind(void 0,0,1,0,1,2),R1.bind(void 0,0,1,0,1,3),R1.bind(void 0,0,1,1,0,0),R1.bind(void 0,0,1,1,0,1),R1.bind(void 0,0,1,1,0,2),R1.bind(void 0,0,1,1,0,3),R1.bind(void 0,0,1,1,1,0),R1.bind(void 0,0,1,1,1,1),R1.bind(void 0,0,1,1,1,2),R1.bind(void 0,0,1,1,1,3),R1.bind(void 0,1,0,0,0,0),R1.bind(void 0,1,0,0,0,1),R1.bind(void 0,1,0,0,0,2),R1.bind(void 0,1,0,0,0,3),R1.bind(void 0,1,0,0,1,0),R1.bind(void 0,1,0,0,1,1),R1.bind(void 0,1,0,0,1,2),R1.bind(void 0,1,0,0,1,3),R1.bind(void 0,1,0,1,0,0),R1.bind(void 0,1,0,1,0,1),R1.bind(void 0,1,0,1,0,2),R1.bind(void 0,1,0,1,0,3),R1.bind(void 0,1,0,1,1,0),R1.bind(void 0,1,0,1,1,1),R1.bind(void 0,1,0,1,1,2),R1.bind(void 0,1,0,1,1,3),R1.bind(void 0,1,1,0,0,0),R1.bind(void 0,1,1,0,0,1),R1.bind(void 0,1,1,0,0,2),R1.bind(void 0,1,1,0,0,3),R1.bind(void 0,1,1,0,1,0),R1.bind(void 0,1,1,0,1,1),R1.bind(void 0,1,1,0,1,2),R1.bind(void 0,1,1,0,1,3),R1.bind(void 0,1,1,1,0,0),R1.bind(void 0,1,1,1,0,1),R1.bind(void 0,1,1,1,0,2),R1.bind(void 0,1,1,1,0,3),R1.bind(void 0,1,1,1,1,0),R1.bind(void 0,1,1,1,1,1),R1.bind(void 0,1,1,1,1,2),R1.bind(void 0,1,1,1,1,3)];let _O=Lm;function O0(A){(A=A||{}).empty||(x8(A.familyName,"When creating a new Font object, familyName is required."),x8(A.styleName,"When creating a new Font object, styleName is required."),x8(A.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),x8(A.ascender,"When creating a new Font object, ascender is required."),x8(A.descender,"When creating a new Font object, descender is required."),x8(A.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:A.familyName||" "},fontSubfamily:{en:A.styleName||" "},fullName:{en:A.fullName||A.familyName+" "+A.styleName},postScriptName:{en:A.postScriptName||A.familyName+A.styleName},designer:{en:A.designer||" "},designerURL:{en:A.designerURL||" "},manufacturer:{en:A.manufacturer||" "},manufacturerURL:{en:A.manufacturerURL||" "},license:{en:A.license||" "},licenseURL:{en:A.licenseURL||" "},version:{en:A.version||"Version 0.1"},description:{en:A.description||" "},copyright:{en:A.copyright||" "},trademark:{en:A.trademark||" "}},this.unitsPerEm=A.unitsPerEm||1e3,this.ascender=A.ascender,this.descender=A.descender,this.createdTimestamp=A.createdTimestamp,this.tables={os2:{usWeightClass:A.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:A.widthClass||this.usWidthClasses.MEDIUM,fsSelection:A.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new h5.GlyphSet(this,A.glyphs||[]),this.encoding=new h1(this),this.position=new EO(this),this.substitution=new xO(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:this.outlinesFormat==="truetype"?this._hinting=new _O(this):void 0}})}O0.prototype.hasChar=function(A){return this.encoding.charToGlyphIndex(A)!==null},O0.prototype.charToGlyphIndex=function(A){return this.encoding.charToGlyphIndex(A)},O0.prototype.charToGlyph=function(A){let z=this.charToGlyphIndex(A),L=this.glyphs.get(z);return L||(L=this.glyphs.get(0)),L},O0.prototype.stringToGlyphs=function(A,z){z=z||this.defaultRenderOptions;let L=[];for(let G=0;G0,"No English "+I+" specified.")}B("fontFamily"),B("weightName"),B("manufacturer"),B("copyright"),B("version"),L(this.unitsPerEm>0,"No unitsPerEm specified.")},O0.prototype.toTables=function(){return MO(this)},O0.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},O0.prototype.toArrayBuffer=function(){let A=this.toTables().encode(),z=new ArrayBuffer(A.length),L=new Uint8Array(z);for(let B=0;B1&&console.warn("Only the first kern subtable is supported."),I.skip("uLong");let G=255&I.parseUShort();if(I.skip("uShort"),G===0){let P=I.parseUShort();I.skip("uShort",3);for(let K=0;K{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let p=u(978);class f extends p.Writable{constructor(){super(...arguments),this.offset=0,this._waiters=[],this._closed=!1}_write(v,d,m){let w=0,y=()=>{for(;this._waiters.length>0;){let C=this._waiters[0];if(this._buffer){let M=this._buffer.size-this._buffer.offset;if(!(M+v.length>=C.size)){if(!C.skip){let b=Buffer.alloc(M+v.length);this._buffer.buf.copy(b,0,this._buffer.offset,this._buffer.size),v.copy(b,M,0,v.length),this._buffer.buf=b}this._buffer.offset=0,this._buffer.size=M+v.length,m();break}if(C.skip)this._buffer=void 0,C.resolve();else{let b=Math.min(M,C.size),E=Buffer.alloc(C.size);this._buffer.buf.copy(E,0,this._buffer.offset,this._buffer.offset+b),v.copy(E,b,0,C.size-b),C.resolve(E)}if(this.offset+=C.size,this._waiters.shift(),this._buffer=void 0,M+v.length===C.size){m();break}w+=C.size-M}else{if(!(v.length-w>=C.size)){this._buffer={buf:C.skip?void 0:v.slice(w),offset:0,size:v.length-w},w=v.length,m();break}if(C.skip?C.resolve():C.resolve(v.slice(w,w+C.size)),this.offset+=C.size,this._waiters.shift(),w+=C.size,v.length===w){m();break}}}this._processTrigger=v.length-w>0?y:void 0};y()}_destroy(v,d){this._processTrigger=void 0;for(let m of this._waiters)m.reject(v||new Error("stream destroyed"));this._waiters=[],this._closed=!0}_final(v){this._processTrigger=void 0;for(let d of this._waiters)d.reject(new Error("not enough data in stream"));this._waiters=[],this._closed=!0}read(v){return new Promise((d,m)=>{this._closed&&m(new Error("stream is closed")),this._waiters.push({resolve:d,reject:m,size:v,skip:!1}),this._processTrigger&&this._processTrigger()})}skip(v){return new Promise((d,m)=>{this._closed&&m(new Error("stream is closed")),this._waiters.push({resolve:d,reject:m,size:v,skip:!0}),this._processTrigger&&this._processTrigger()})}}function g(){return new f}l.exports=Object.assign(g,{default:g}),n.default=g},311:l=>{function n(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function u(O,Z){this.source=O,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=Z,this.destLen=0,this.ltree=new n,this.dtree=new n}var p=new n,f=new n,g=new Uint8Array(30),h=new Uint16Array(30),v=new Uint8Array(30),d=new Uint16Array(30),m=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w=new n,y=new Uint8Array(320);function C(O,Z,Y,J){var F,V;for(F=0;F>>=1,Z}function x(O,Z,Y){if(!Z)return Y;for(;O.bitcount<24;)O.tag|=O.source[O.sourceIndex++]<>>16-Z;return O.tag>>>=Z,O.bitcount-=Z,J+Y}function D(O,Z){for(;O.bitcount<24;)O.tag|=O.source[O.sourceIndex++]<>>=1,++F,Y+=Z.table[F],J-=Z.table[F];while(J>=0);return O.tag=V,O.bitcount-=F,Z.trans[Y+J]}function k(O,Z,Y){var J,F,V,W,X,r1;for(J=x(O,5,257),F=x(O,5,1),V=x(O,4,4),W=0;W<19;++W)y[W]=0;for(W=0;W8;)O.sourceIndex--,O.bitcount-=8;if((Z=256*(Z=O.source[O.sourceIndex+1])+O.source[O.sourceIndex])!==(65535&~(256*O.source[O.sourceIndex+3]+O.source[O.sourceIndex+2])))return-3;for(O.sourceIndex+=4,Y=Z;Y;--Y)O.dest[O.destLen++]=O.source[O.sourceIndex++];return O.bitcount=0,0}(function(O,Z){var Y;for(Y=0;Y<7;++Y)O.table[Y]=0;for(O.table[7]=24,O.table[8]=152,O.table[9]=112,Y=0;Y<24;++Y)O.trans[Y]=256+Y;for(Y=0;Y<144;++Y)O.trans[24+Y]=Y;for(Y=0;Y<8;++Y)O.trans[168+Y]=280+Y;for(Y=0;Y<112;++Y)O.trans[176+Y]=144+Y;for(Y=0;Y<5;++Y)Z.table[Y]=0;for(Z.table[5]=32,Y=0;Y<32;++Y)Z.trans[Y]=Y})(p,f),C(g,h,4,3),C(v,d,2,1),g[28]=0,h[28]=258,l.exports=function(O,Z){var Y,J,F=new u(O,Z);do{switch(Y=E(F),x(F,2,0)){case 0:J=U(F);break;case 1:J=_(F,p,f);break;case 2:k(F,F.ltree,F.dtree),J=_(F,F.ltree,F.dtree);break;default:J=-3}if(J!==0)throw new Error("Data error")}while(!Y);return F.destLen{"use strict";l.exports=function(n){n.prototype[Symbol.iterator]=function*(){for(let u=this.head;u;u=u.next)yield u.value}}},411:(l,n,u)=>{"use strict";function p(d){var m=this;if(m instanceof p||(m=new p),m.tail=null,m.head=null,m.length=0,d&&typeof d.forEach=="function")d.forEach(function(C){m.push(C)});else if(arguments.length>0)for(var w=0,y=arguments.length;w1)w=m;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");y=this.head.next,w=this.head.value}for(var C=0;y!==null;C++)w=d(w,y.value,C),y=y.next;return w},p.prototype.reduceReverse=function(d,m){var w,y=this.tail;if(arguments.length>1)w=m;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");y=this.tail.prev,w=this.tail.value}for(var C=this.length-1;y!==null;C--)w=d(w,y.value,C),y=y.prev;return w},p.prototype.toArray=function(){for(var d=new Array(this.length),m=0,w=this.head;w!==null;m++)d[m]=w.value,w=w.next;return d},p.prototype.toArrayReverse=function(){for(var d=new Array(this.length),m=0,w=this.tail;w!==null;m++)d[m]=w.value,w=w.prev;return d},p.prototype.slice=function(d,m){(m=m||this.length)<0&&(m+=this.length),(d=d||0)<0&&(d+=this.length);var w=new p;if(mthis.length&&(m=this.length);for(var y=0,C=this.head;C!==null&&ythis.length&&(m=this.length);for(var y=this.length,C=this.tail;C!==null&&y>m;y--)C=C.prev;for(;C!==null&&y>d;y--,C=C.prev)w.push(C.value);return w},p.prototype.splice=function(d,m,...w){d>this.length&&(d=this.length-1),d<0&&(d=this.length+d);for(var y=0,C=this.head;C!==null&&y{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let p=u(98),f=u(104),g;n.default=async function(v,d){var m,w;if(!g){if(typeof navigator!="undefined"&&"fonts"in navigator){try{let M=await((w=(m=navigator.permissions).request)===null||w===void 0?void 0:w.call(m,{name:"local-fonts"}));if(M&&M.state!=="granted")throw new Error("Permission to access local fonts not granted.")}catch(M){if(M.name!=="TypeError")throw M}let C={};try{let M=await navigator.fonts.query();for(let b of M)C.hasOwnProperty(b.family)||(C[b.family]=[]),C[b.family].push(b);g=Promise.resolve(C)}catch(M){console.error(M.name,M.message)}}else if(typeof window!="undefined"&&"queryLocalFonts"in window){let C={};try{let M=await window.queryLocalFonts();for(let b of M)C.hasOwnProperty(b.family)||(C[b.family]=[]),C[b.family].push(b);g=Promise.resolve(C)}catch(M){console.error(M.name,M.message)}}g||(g=Promise.resolve({}))}let y=await g;for(let C of(0,f.default)(v)){if(h.includes(C))return;if(y.hasOwnProperty(C)&&y[C].length>0){let M=y[C][0];if("blob"in M){let b=await M.blob(),E=await b.arrayBuffer();return(0,p.loadBuffer)(E,{cacheSize:d})}return}}};let h=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"]},833:(l,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.enableLigatures=void 0;let p=u(109);n.enableLigatures=function(f,g=[]){let h,v,d,m=0;return f.registerCharacterJoiner(w=>{let y=f.options.fontFamily;if(y&&(m===0||h!==y)){v=void 0,m=1,h=y;let C=h;(0,p.default)(C,1e5).then(M=>{C===f.options.fontFamily&&(m=2,v=M,M&&f.refresh(0,f.rows-1))}).catch(M=>{C===f.options.fontFamily&&(m=3,f.options.logLevel==="debug"&&console.debug(d,new Error("Failure while loading font")),v=void 0,d=M)})}return v&&m===2?v.findLigatureRanges(w).map(C=>[C[0],C[1]]):function(C,M){let b=[];for(let E=0;E{"use strict";function u(h,v){let d="",m=!1;for(;h.offset=6||!/[\dA-Fa-f]/.test(d))return h.offset--,g(v);v+=d}return g(v)}function g(h){return String.fromCodePoint(parseInt(h,16))}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(h){if(typeof h!="string")throw new Error("Font family must be a string");let v={input:h,offset:0},d=[],m="";for(;v.offset{"use strict";l.exports=e},56:l=>{"use strict";l.exports=t},978:l=>{"use strict";l.exports=r},269:l=>{"use strict";l.exports=s},82:()=>{},456:()=>{}},a={};function c(l){var n=a[l];if(n!==void 0)return n.exports;var u=a[l]={exports:{}};return i[l].call(u.exports,u,u.exports,c),u.exports}c.n=l=>{var n=l&&l.__esModule?()=>l.default:()=>l;return c.d(n,{a:n}),n},c.d=(l,n)=>{for(var u in n)c.o(n,u)&&!c.o(l,u)&&Object.defineProperty(l,u,{enumerable:!0,get:n[u]})},c.o=(l,n)=>Object.prototype.hasOwnProperty.call(l,n),c.r=l=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var o={};return(()=>{"use strict";var l=o;Object.defineProperty(l,"__esModule",{value:!0}),l.LigaturesAddon=void 0;let n=c(833);l.LigaturesAddon=class{constructor(u){this._fallbackLigatures=((u==null?void 0:u.fallbackLigatures)||["<--","<---","<<-","<-","->","->>","-->","--->","<==","<===","<<=","<=","=>","=>>","==>","===>",">=",">>=","<->","<-->","<--->","<---->","<=>","<==>","<===>","<====>","-------->","<~~","<~","~>","~~>","::",":::","==","!=","===","!==",":=",":-",":+","<*","<*>","*>","<|","<|>","|>","+:","-:","=:",":>","++","+++","";let m="#000000",w="#ffffff";this._options.includeGlobalBackground&&(m=(M=(C=this._terminal.options.theme)==null?void 0:C.foreground)!=null?M:"#ffffff",w=(E=(b=this._terminal.options.theme)==null?void 0:b.background)!=null?E:"#000000");let y=[];y.push("color: "+m+";"),y.push("background-color: "+w+";"),y.push("font-family: "+this._terminal.options.fontFamily+";"),y.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+=""}_afterSerialize(){this._htmlContent+="
",this._htmlContent+="