@xterm/addon-ligatures 0.11.0-beta.9 → 0.11.0-beta.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,6 @@
14
14
  * Copyright (c) Microsoft Corporation. All rights reserved.
15
15
  * Licensed under the MIT License. See License.txt in the project root for license information.
16
16
  *--------------------------------------------------------------------------------------------*/
17
- var rl=Object.create;var Fa=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var nl=Object.getOwnPropertyNames;var al=Object.getPrototypeOf,sl=Object.prototype.hasOwnProperty;var me=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(o,c)=>(typeof require<"u"?require:o)[c]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var q=(s,o)=>()=>(o||s((o={exports:{}}).exports,o),o.exports);var il=(s,o,c,h)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of nl(o))!sl.call(s,p)&&p!==c&&Fa(s,p,{get:()=>o[p],enumerable:!(h=tl(o,p))||h.enumerable});return s};var ol=(s,o,c)=>(c=s!=null?rl(al(s)):{},il(o||!s||!s.__esModule?Fa(c,"default",{value:s,enumerable:!0}):c,s));var Ua=q((Pr,Ta)=>{(function(s,o){typeof Pr=="object"&&typeof Ta<"u"?o(Pr):typeof define=="function"&&define.amd?define(["exports"],o):o(s.opentype=s.opentype||{})})(Pr,function(s){"use strict";var o=0,c=-3;function h(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function p(e,r){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new h,this.dtree=new h}var m=new h,b=new h,F=new Uint8Array(30),U=new Uint16Array(30),I=new Uint8Array(30),z=new Uint16Array(30),B=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W=new h,X=new Uint8Array(320);function Z(e,r,t,n){var a,i;for(a=0;a<t;++a)e[a]=0;for(a=0;a<30-t;++a)e[a+t]=a/t|0;for(i=n,a=0;a<30;++a)r[a]=i,i+=1<<e[a]}function xe(e,r){var t;for(t=0;t<7;++t)e.table[t]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,t=0;t<24;++t)e.trans[t]=256+t;for(t=0;t<144;++t)e.trans[24+t]=t;for(t=0;t<8;++t)e.trans[168+t]=280+t;for(t=0;t<112;++t)e.trans[176+t]=144+t;for(t=0;t<5;++t)r.table[t]=0;for(r.table[5]=32,t=0;t<32;++t)r.trans[t]=t}var Ne=new Uint16Array(16);function Ee(e,r,t,n){var a,i;for(a=0;a<16;++a)e.table[a]=0;for(a=0;a<n;++a)e.table[r[t+a]]++;for(e.table[0]=0,i=0,a=0;a<16;++a)Ne[a]=i,i+=e.table[a];for(a=0;a<n;++a)r[t+a]&&(e.trans[Ne[r[t+a]]++]=a)}function yr(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var r=e.tag&1;return e.tag>>>=1,r}function ue(e,r,t){if(!r)return t;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-r;return e.tag>>>=r,e.bitcount-=r,n+t}function Qr(e,r){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var t=0,n=0,a=0,i=e.tag;do n=2*n+(i&1),i>>>=1,++a,t+=r.table[a],n-=r.table[a];while(n>=0);return e.tag=i,e.bitcount-=a,r.trans[t+n]}function ks(e,r,t){var n,a,i,u,f,l;for(n=ue(e,5,257),a=ue(e,5,1),i=ue(e,4,4),u=0;u<19;++u)X[u]=0;for(u=0;u<i;++u){var d=ue(e,3,0);X[B[u]]=d}for(Ee(W,X,0,19),f=0;f<n+a;){var v=Qr(e,W);switch(v){case 16:var x=X[f-1];for(l=ue(e,2,3);l;--l)X[f++]=x;break;case 17:for(l=ue(e,3,3);l;--l)X[f++]=0;break;case 18:for(l=ue(e,7,11);l;--l)X[f++]=0;break;default:X[f++]=v;break}}Ee(r,X,0,n),Ee(t,X,n,a)}function tn(e,r,t){for(;;){var n=Qr(e,r);if(n===256)return o;if(n<256)e.dest[e.destLen++]=n;else{var a,i,u,f;for(n-=257,a=ue(e,F[n],U[n]),i=Qr(e,t),u=e.destLen-ue(e,I[i],z[i]),f=u;f<u+a;++f)e.dest[e.destLen++]=e.dest[f]}}}function Os(e){for(var r,t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(r=e.source[e.sourceIndex+1],r=256*r+e.source[e.sourceIndex],t=e.source[e.sourceIndex+3],t=256*t+e.source[e.sourceIndex+2],r!==(~t&65535))return c;for(e.sourceIndex+=4,n=r;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,o}function ws(e,r){var t=new p(e,r),n,a,i;do{switch(n=yr(t),a=ue(t,2,0),a){case 0:i=Os(t);break;case 1:i=tn(t,m,b);break;case 2:ks(t,t.ltree,t.dtree),i=tn(t,t.ltree,t.dtree);break;default:i=c}if(i!==o)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}xe(m,b),Z(F,U,4,3),Z(I,z,2,1),F[28]=0,U[28]=258;var Cs=ws;function Ze(e,r,t,n,a){return Math.pow(1-a,3)*e+3*Math.pow(1-a,2)*a*r+3*(1-a)*Math.pow(a,2)*t+Math.pow(a,3)*n}function we(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}we.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},we.prototype.addPoint=function(e,r){typeof e=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))},we.prototype.addX=function(e){this.addPoint(e,null)},we.prototype.addY=function(e){this.addPoint(null,e)},we.prototype.addBezier=function(e,r,t,n,a,i,u,f){var l=this,d=[e,r],v=[t,n],x=[a,i],g=[u,f];this.addPoint(e,r),this.addPoint(u,f);for(var y=0;y<=1;y++){var T=6*d[y]-12*v[y]+6*x[y],w=-3*d[y]+9*v[y]-9*x[y]+3*g[y],E=3*v[y]-3*d[y];if(w===0){if(T===0)continue;var O=-E/T;0<O&&O<1&&(y===0&&l.addX(Ze(d[y],v[y],x[y],g[y],O)),y===1&&l.addY(Ze(d[y],v[y],x[y],g[y],O)));continue}var G=Math.pow(T,2)-4*E*w;if(!(G<0)){var C=(-T+Math.sqrt(G))/(2*w);0<C&&C<1&&(y===0&&l.addX(Ze(d[y],v[y],x[y],g[y],C)),y===1&&l.addY(Ze(d[y],v[y],x[y],g[y],C)));var _=(-T-Math.sqrt(G))/(2*w);0<_&&_<1&&(y===0&&l.addX(Ze(d[y],v[y],x[y],g[y],_)),y===1&&l.addY(Ze(d[y],v[y],x[y],g[y],_)))}}},we.prototype.addQuad=function(e,r,t,n,a,i){var u=e+.6666666666666666*(t-e),f=r+2/3*(n-r),l=u+1/3*(a-e),d=f+1/3*(i-r);this.addBezier(e,r,u,f,l,d,a,i)};function Q(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Q.prototype.moveTo=function(e,r){this.commands.push({type:"M",x:e,y:r})},Q.prototype.lineTo=function(e,r){this.commands.push({type:"L",x:e,y:r})},Q.prototype.curveTo=Q.prototype.bezierCurveTo=function(e,r,t,n,a,i){this.commands.push({type:"C",x1:e,y1:r,x2:t,y2:n,x:a,y:i})},Q.prototype.quadTo=Q.prototype.quadraticCurveTo=function(e,r,t,n){this.commands.push({type:"Q",x1:e,y1:r,x:t,y:n})},Q.prototype.close=Q.prototype.closePath=function(){this.commands.push({type:"Z"})},Q.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof we){var r=e;this.moveTo(r.x1,r.y1),this.lineTo(r.x2,r.y1),this.lineTo(r.x2,r.y2),this.lineTo(r.x1,r.y2),this.close();return}Array.prototype.push.apply(this.commands,e)},Q.prototype.getBoundingBox=function(){for(var e=this,r=new we,t=0,n=0,a=0,i=0,u=0;u<this.commands.length;u++){var f=e.commands[u];switch(f.type){case"M":r.addPoint(f.x,f.y),t=a=f.x,n=i=f.y;break;case"L":r.addPoint(f.x,f.y),a=f.x,i=f.y;break;case"Q":r.addQuad(a,i,f.x1,f.y1,f.x,f.y),a=f.x,i=f.y;break;case"C":r.addBezier(a,i,f.x1,f.y1,f.x2,f.y2,f.x,f.y),a=f.x,i=f.y;break;case"Z":a=t,i=n;break;default:throw new Error("Unexpected path command "+f.type)}}return r.isEmpty()&&r.addPoint(0,0),r},Q.prototype.draw=function(e){var r=this;e.beginPath();for(var t=0;t<this.commands.length;t+=1){var n=r.commands[t];n.type==="M"?e.moveTo(n.x,n.y):n.type==="L"?e.lineTo(n.x,n.y):n.type==="C"?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):n.type==="Q"?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):n.type==="Z"&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},Q.prototype.toPathData=function(e){var r=this;e=e!==void 0?e:2;function t(f){return Math.round(f)===f?""+Math.round(f):f.toFixed(e)}function n(){for(var f=arguments,l="",d=0;d<arguments.length;d+=1){var v=f[d];v>=0&&d>0&&(l+=" "),l+=t(v)}return l}for(var a="",i=0;i<this.commands.length;i+=1){var u=r.commands[i];u.type==="M"?a+="M"+n(u.x,u.y):u.type==="L"?a+="L"+n(u.x,u.y):u.type==="C"?a+="C"+n(u.x1,u.y1,u.x2,u.y2,u.x,u.y):u.type==="Q"?a+="Q"+n(u.x1,u.y1,u.x,u.y):u.type==="Z"&&(a+="Z")}return a},Q.prototype.toSVG=function(e){var r='<path d="';return r+=this.toPathData(e),r+='"',this.fill&&this.fill!=="black"&&(this.fill===null?r+=' fill="none"':r+=' fill="'+this.fill+'"'),this.stroke&&(r+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),r+="/>",r},Q.prototype.toDOMElement=function(e){var r=this.toPathData(e),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",r),t};function nn(e){throw new Error(e)}function an(e,r){e||nn(r)}var N={fail:nn,argument:an,assert:an},sn=32768,on=2147483648,Qe={},k={},P={};function be(e){return function(){return e}}k.BYTE=function(e){return N.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},P.BYTE=be(1),k.CHAR=function(e){return[e.charCodeAt(0)]},P.CHAR=be(1),k.CHARARRAY=function(e){for(var r=[],t=0;t<e.length;t+=1)r[t]=e.charCodeAt(t);return r},P.CHARARRAY=function(e){return e.length},k.USHORT=function(e){return[e>>8&255,e&255]},P.USHORT=be(2),k.SHORT=function(e){return e>=sn&&(e=-(2*sn-e)),[e>>8&255,e&255]},P.SHORT=be(2),k.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},P.UINT24=be(3),k.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},P.ULONG=be(4),k.LONG=function(e){return e>=on&&(e=-(2*on-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},P.LONG=be(4),k.FIXED=k.ULONG,P.FIXED=P.ULONG,k.FWORD=k.SHORT,P.FWORD=P.SHORT,k.UFWORD=k.USHORT,P.UFWORD=P.USHORT,k.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},P.LONGDATETIME=be(8),k.TAG=function(e){return N.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},P.TAG=be(4),k.Card8=k.BYTE,P.Card8=P.BYTE,k.Card16=k.USHORT,P.Card16=P.USHORT,k.OffSize=k.BYTE,P.OffSize=P.BYTE,k.SID=k.USHORT,P.SID=P.USHORT,k.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?(e=e-108,[(e>>8)+247,e&255]):e>=-1131&&e<=-108?(e=-e-108,[(e>>8)+251,e&255]):e>=-32768&&e<=32767?k.NUMBER16(e):k.NUMBER32(e)},P.NUMBER=function(e){return k.NUMBER(e).length},k.NUMBER16=function(e){return[28,e>>8&255,e&255]},P.NUMBER16=be(3),k.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},P.NUMBER32=be(5),k.REAL=function(e){var r=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(r);if(t){var n=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));r=(Math.round(e*n)/n).toString()}for(var a="",i=0,u=r.length;i<u;i+=1){var f=r[i];f==="e"?a+=r[++i]==="-"?"c":"b":f==="."?a+="a":f==="-"?a+="e":a+=f}a+=a.length&1?"f":"ff";for(var l=[30],d=0,v=a.length;d<v;d+=2)l.push(parseInt(a.substr(d,2),16));return l},P.REAL=function(e){return k.REAL(e).length},k.NAME=k.CHARARRAY,P.NAME=P.CHARARRAY,k.STRING=k.CHARARRAY,P.STRING=P.CHARARRAY,Qe.UTF8=function(e,r,t){for(var n=[],a=t,i=0;i<a;i++,r+=1)n[i]=e.getUint8(r);return String.fromCharCode.apply(null,n)},Qe.UTF16=function(e,r,t){for(var n=[],a=t/2,i=0;i<a;i++,r+=2)n[i]=e.getUint16(r);return String.fromCharCode.apply(null,n)},k.UTF16=function(e){for(var r=[],t=0;t<e.length;t+=1){var n=e.charCodeAt(t);r[r.length]=n>>8&255,r[r.length]=n&255}return r},P.UTF16=function(e){return e.length*2};var Jr={"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"};Qe.MACSTRING=function(e,r,t,n){var a=Jr[n];if(a!==void 0){for(var i="",u=0;u<t;u++){var f=e.getUint8(r+u);f<=127?i+=String.fromCharCode(f):i+=a[f&127]}return i}};var xr=typeof WeakMap=="function"&&new WeakMap,br,Ls=function(e){if(!br){br={};for(var r in Jr)br[r]=new String(r)}var t=br[e];if(t!==void 0){if(xr){var n=xr.get(t);if(n!==void 0)return n}var a=Jr[e];if(a!==void 0){for(var i={},u=0;u<a.length;u++)i[a.charCodeAt(u)]=u+128;return xr&&xr.set(t,i),i}}};k.MACSTRING=function(e,r){var t=Ls(r);if(t!==void 0){for(var n=[],a=0;a<e.length;a++){var i=e.charCodeAt(a);if(i>=128&&(i=t[i],i===void 0))return;n[a]=i}return n}},P.MACSTRING=function(e,r){var t=k.MACSTRING(e,r);return t!==void 0?t.length:0};function Kr(e){return e>=-128&&e<=127}function Is(e,r,t){for(var n=0,a=e.length;r<a&&n<64&&e[r]===0;)++r,++n;return t.push(128|n-1),r}function As(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var u=e[i];if(!Kr(u)||u===0&&i+1<a&&e[i+1]===0)break;++i,++n}t.push(n-1);for(var f=r;f<i;++f)t.push(e[f]+256&255);return i}function Bs(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var u=e[i];if(u===0||Kr(u)&&i+1<a&&Kr(e[i+1]))break;++i,++n}t.push(64|n-1);for(var f=r;f<i;++f){var l=e[f];t.push(l+65536>>8&255,l+256&255)}return i}k.VARDELTAS=function(e){for(var r=0,t=[];r<e.length;){var n=e[r];n===0?r=Is(e,r,t):n>=-128&&n<=127?r=As(e,r,t):r=Bs(e,r,t)}return t},k.INDEX=function(e){for(var r=1,t=[r],n=[],a=0;a<e.length;a+=1){var i=k.OBJECT(e[a]);Array.prototype.push.apply(n,i),r+=i.length,t.push(r)}if(n.length===0)return[0,0];for(var u=[],f=1+Math.floor(Math.log(r)/Math.log(2))/8|0,l=[void 0,k.BYTE,k.USHORT,k.UINT24,k.ULONG][f],d=0;d<t.length;d+=1){var v=l(t[d]);Array.prototype.push.apply(u,v)}return Array.prototype.concat(k.Card16(e.length),k.OffSize(f),u,n)},P.INDEX=function(e){return k.INDEX(e).length},k.DICT=function(e){for(var r=[],t=Object.keys(e),n=t.length,a=0;a<n;a+=1){var i=parseInt(t[a],0),u=e[i];r=r.concat(k.OPERAND(u.value,u.type)),r=r.concat(k.OPERATOR(i))}return r},P.DICT=function(e){return k.DICT(e).length},k.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},k.OPERAND=function(e,r){var t=[];if(Array.isArray(r))for(var n=0;n<r.length;n+=1)N.argument(e.length===r.length,"Not enough arguments given for type"+r),t=t.concat(k.OPERAND(e[n],r[n]));else if(r==="SID")t=t.concat(k.NUMBER(e));else if(r==="offset")t=t.concat(k.NUMBER32(e));else if(r==="number")t=t.concat(k.NUMBER(e));else if(r==="real")t=t.concat(k.REAL(e));else throw new Error("Unknown operand type "+r);return t},k.OP=k.BYTE,P.OP=P.BYTE;var Sr=typeof WeakMap=="function"&&new WeakMap;k.CHARSTRING=function(e){if(Sr){var r=Sr.get(e);if(r!==void 0)return r}for(var t=[],n=e.length,a=0;a<n;a+=1){var i=e[a];t=t.concat(k[i.type](i.value))}return Sr&&Sr.set(e,t),t},P.CHARSTRING=function(e){return k.CHARSTRING(e).length},k.OBJECT=function(e){var r=k[e.type];return N.argument(r!==void 0,"No encoding function for type "+e.type),r(e.value)},P.OBJECT=function(e){var r=P[e.type];return N.argument(r!==void 0,"No sizeOf function for type "+e.type),r(e.value)},k.TABLE=function(e){for(var r=[],t=e.fields.length,n=[],a=[],i=0;i<t;i+=1){var u=e.fields[i],f=k[u.type];N.argument(f!==void 0,"No encoding function for field type "+u.type+" ("+u.name+")");var l=e[u.name];l===void 0&&(l=u.value);var d=f(l);u.type==="TABLE"?(a.push(r.length),r=r.concat([0,0]),n.push(d)):r=r.concat(d)}for(var v=0;v<n.length;v+=1){var x=a[v],g=r.length;N.argument(g<65536,"Table "+e.tableName+" too big."),r[x]=g>>8,r[x+1]=g&255,r=r.concat(n[v])}return r},P.TABLE=function(e){for(var r=0,t=e.fields.length,n=0;n<t;n+=1){var a=e.fields[n],i=P[a.type];N.argument(i!==void 0,"No sizeOf function for field type "+a.type+" ("+a.name+")");var u=e[a.name];u===void 0&&(u=a.value),r+=i(u),a.type==="TABLE"&&(r+=2)}return r},k.RECORD=k.TABLE,P.RECORD=P.TABLE,k.LITERAL=function(e){return e},P.LITERAL=function(e){return e.length};function te(e,r,t){for(var n=this,a=0;a<r.length;a+=1){var i=r[a];n[i.name]=i.value}if(this.tableName=e,this.fields=r,t)for(var u=Object.keys(t),f=0;f<u.length;f+=1){var l=u[f],d=t[l];n[l]!==void 0&&(n[l]=d)}}te.prototype.encode=function(){return k.TABLE(this)},te.prototype.sizeOf=function(){return P.TABLE(this)};function or(e,r,t){t===void 0&&(t=r.length);var n=new Array(r.length+1);n[0]={name:e+"Count",type:"USHORT",value:t};for(var a=0;a<r.length;a++)n[a+1]={name:e+a,type:"USHORT",value:r[a]};return n}function $r(e,r,t){var n=r.length,a=new Array(n+1);a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a[i+1]={name:e+i,type:"TABLE",value:t(r[i],i)};return a}function Fr(e,r,t){var n=r.length,a=[];a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a=a.concat(t(r[i],i));return a}function Tr(e){e.format===1?te.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(or("glyph",e.glyphs))):N.assert(!1,"Can't create coverage table format 2 yet.")}Tr.prototype=Object.create(te.prototype),Tr.prototype.constructor=Tr;function Ur(e){te.call(this,"scriptListTable",Fr("scriptRecord",e,function(r,t){var n=r.script,a=n.defaultLangSys;return N.assert(!!a,"Unable to write GSUB: script "+r.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:r.tag},{name:"script"+t,type:"TABLE",value:new te("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new te("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(or("featureIndex",a.featureIndexes)))}].concat(Fr("langSys",n.langSysRecords,function(i,u){var f=i.langSys;return[{name:"langSysTag"+u,type:"TAG",value:i.tag},{name:"langSys"+u,type:"TABLE",value:new te("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:f.reqFeatureIndex}].concat(or("featureIndex",f.featureIndexes)))}]})))}]}))}Ur.prototype=Object.create(te.prototype),Ur.prototype.constructor=Ur;function Er(e){te.call(this,"featureListTable",Fr("featureRecord",e,function(r,t){var n=r.feature;return[{name:"featureTag"+t,type:"TAG",value:r.tag},{name:"feature"+t,type:"TABLE",value:new te("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(or("lookupListIndex",n.lookupListIndexes)))}]}))}Er.prototype=Object.create(te.prototype),Er.prototype.constructor=Er;function kr(e,r){te.call(this,"lookupListTable",$r("lookup",e,function(t){var n=r[t.lookupType];return N.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new te("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat($r("subtable",t.subtables,n)))}))}kr.prototype=Object.create(te.prototype),kr.prototype.constructor=kr;var D={Table:te,Record:te,Coverage:Tr,ScriptList:Ur,FeatureList:Er,LookupList:kr,ushortList:or,tableList:$r,recordList:Fr};function un(e,r){return e.getUint8(r)}function Or(e,r){return e.getUint16(r,!1)}function Rs(e,r){return e.getInt16(r,!1)}function et(e,r){return e.getUint32(r,!1)}function ln(e,r){var t=e.getInt16(r,!1),n=e.getUint16(r+2,!1);return t+n/65535}function Ds(e,r){for(var t="",n=r;n<r+4;n+=1)t+=String.fromCharCode(e.getInt8(n));return t}function Ps(e,r,t){for(var n=0,a=0;a<t;a+=1)n<<=8,n+=e.getUint8(r+a);return n}function Ms(e,r,t){for(var n=[],a=r;a<t;a+=1)n.push(e.getUint8(a));return n}function Gs(e){for(var r="",t=0;t<e.length;t+=1)r+=String.fromCharCode(e[t]);return r}var Ns={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function S(e,r){this.data=e,this.offset=r,this.relativeOffset=0}S.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},S.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},S.prototype.parseCard8=S.prototype.parseByte,S.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},S.prototype.parseCard16=S.prototype.parseUShort,S.prototype.parseSID=S.prototype.parseUShort,S.prototype.parseOffset16=S.prototype.parseUShort,S.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},S.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},S.prototype.parseULong=function(){var e=et(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},S.prototype.parseOffset32=S.prototype.parseULong,S.prototype.parseFixed=function(){var e=ln(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},S.prototype.parseString=function(e){var r=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var a=0;a<e;a++)n+=String.fromCharCode(r.getUint8(t+a));return n},S.prototype.parseTag=function(){return this.parseString(4)},S.prototype.parseLongDateTime=function(){var e=et(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},S.prototype.parseVersion=function(e){var r=Or(this.data,this.offset+this.relativeOffset),t=Or(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),r+t/e/10},S.prototype.skip=function(e,r){r===void 0&&(r=1),this.relativeOffset+=Ns[e]*r},S.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint32(n),n+=4;return this.relativeOffset+=e*4,r},S.prototype.parseOffset16List=S.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint16(n),n+=2;return this.relativeOffset+=e*2,r},S.prototype.parseShortList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getInt16(n),n+=2;return this.relativeOffset+=e*2,r},S.prototype.parseByteList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint8(n++);return this.relativeOffset+=e,r},S.prototype.parseList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},S.prototype.parseList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},S.prototype.parseRecordList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var u={},f=0;f<a.length;f++){var l=a[f],d=r[l];u[l]=d.call(t)}n[i]=u}return n},S.prototype.parseRecordList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var u={},f=0;f<a.length;f++){var l=a[f],d=r[l];u[l]=d.call(t)}n[i]=u}return n},S.prototype.parseStruct=function(e){var r=this;if(typeof e=="function")return e.call(this);for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var i=t[a],u=e[i];n[i]=u.call(r)}return n},S.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e!==0){var r={};return e&1&&(r.xPlacement=this.parseShort()),e&2&&(r.yPlacement=this.parseShort()),e&4&&(r.xAdvance=this.parseShort()),e&8&&(r.yAdvance=this.parseShort()),e&16&&(r.xPlaDevice=void 0,this.parseShort()),e&32&&(r.yPlaDevice=void 0,this.parseShort()),e&64&&(r.xAdvDevice=void 0,this.parseShort()),e&128&&(r.yAdvDevice=void 0,this.parseShort()),r}},S.prototype.parseValueRecordList=function(){for(var e=this,r=this.parseUShort(),t=this.parseUShort(),n=new Array(t),a=0;a<t;a++)n[a]=e.parseValueRecord(r);return n},S.prototype.parsePointer=function(e){var r=this.parseOffset16();if(r>0)return new S(this.data,this.offset+r).parseStruct(e)},S.prototype.parsePointer32=function(e){var r=this.parseOffset32();if(r>0)return new S(this.data,this.offset+r).parseStruct(e)},S.prototype.parseListOfLists=function(e){for(var r=this,t=this.parseOffset16List(),n=t.length,a=this.relativeOffset,i=new Array(n),u=0;u<n;u++){var f=t[u];if(f===0){i[u]=void 0;continue}if(r.relativeOffset=f,e){for(var l=r.parseOffset16List(),d=new Array(l.length),v=0;v<l.length;v++)r.relativeOffset=f+l[v],d[v]=e.call(r);i[u]=d}else i[u]=r.parseUShortList()}return this.relativeOffset=a,i},S.prototype.parseCoverage=function(){var e=this,r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(t===1)return{format:1,glyphs:this.parseUShortList(n)};if(t===2){for(var a=new Array(n),i=0;i<n;i++)a[i]={start:e.parseUShort(),end:e.parseUShort(),index:e.parseUShort()};return{format:2,ranges:a}}throw new Error("0x"+r.toString(16)+": Coverage format must be 1 or 2.")},S.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,r=this.parseUShort();if(r===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(r===2)return{format:2,ranges:this.parseRecordList({start:S.uShort,end:S.uShort,classId:S.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},S.list=function(e,r){return function(){return this.parseList(e,r)}},S.list32=function(e,r){return function(){return this.parseList32(e,r)}},S.recordList=function(e,r){return function(){return this.parseRecordList(e,r)}},S.recordList32=function(e,r){return function(){return this.parseRecordList32(e,r)}},S.pointer=function(e){return function(){return this.parsePointer(e)}},S.pointer32=function(e){return function(){return this.parsePointer32(e)}},S.tag=S.prototype.parseTag,S.byte=S.prototype.parseByte,S.uShort=S.offset16=S.prototype.parseUShort,S.uShortList=S.prototype.parseUShortList,S.uLong=S.offset32=S.prototype.parseULong,S.uLongList=S.prototype.parseULongList,S.struct=S.prototype.parseStruct,S.coverage=S.prototype.parseCoverage,S.classDef=S.prototype.parseClassDef;var fn={reserved:S.uShort,reqFeatureIndex:S.uShort,featureIndexes:S.uShortList};S.prototype.parseScriptList=function(){return this.parsePointer(S.recordList({tag:S.tag,script:S.pointer({defaultLangSys:S.pointer(fn),langSysRecords:S.recordList({tag:S.tag,langSys:S.pointer(fn)})})}))||[]},S.prototype.parseFeatureList=function(){return this.parsePointer(S.recordList({tag:S.tag,feature:S.pointer({featureParams:S.offset16,lookupListIndexes:S.uShortList})}))||[]},S.prototype.parseLookupList=function(e){return this.parsePointer(S.list(S.pointer(function(){var r=this.parseUShort();N.argument(1<=r&&r<=9,"GPOS/GSUB lookup type "+r+" unknown.");var t=this.parseUShort(),n=t&16;return{lookupType:r,lookupFlag:t,subtables:this.parseList(S.pointer(e[r])),markFilteringSet:n?this.parseUShort():void 0}})))||[]},S.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),r=this.parseUShort();N.argument(e===1&&r<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:S.offset32,featureTableSubstitutionOffset:S.offset32});return t})||[]};var A={getByte:un,getCard8:un,getUShort:Or,getCard16:Or,getShort:Rs,getULong:et,getFixed:ln,getTag:Ds,getOffset:Ps,getBytes:Ms,bytesToString:Gs,Parser:S};function _s(e,r){r.parseUShort(),e.length=r.parseULong(),e.language=r.parseULong();var t;e.groupCount=t=r.parseULong(),e.glyphIndexMap={};for(var n=0;n<t;n+=1)for(var a=r.parseULong(),i=r.parseULong(),u=r.parseULong(),f=a;f<=i;f+=1)e.glyphIndexMap[f]=u,u++}function Hs(e,r,t,n,a){e.length=r.parseUShort(),e.language=r.parseUShort();var i;e.segCount=i=r.parseUShort()>>1,r.skip("uShort",3),e.glyphIndexMap={};for(var u=new A.Parser(t,n+a+14),f=new A.Parser(t,n+a+16+i*2),l=new A.Parser(t,n+a+16+i*4),d=new A.Parser(t,n+a+16+i*6),v=n+a+16+i*8,x=0;x<i-1;x+=1)for(var g=void 0,y=u.parseUShort(),T=f.parseUShort(),w=l.parseShort(),E=d.parseUShort(),O=T;O<=y;O+=1)E!==0?(v=d.offset+d.relativeOffset-2,v+=E,v+=(O-T)*2,g=A.getUShort(t,v),g!==0&&(g=g+w&65535)):g=O+w&65535,e.glyphIndexMap[O]=g}function zs(e,r){var t={};t.version=A.getUShort(e,r),N.argument(t.version===0,"cmap table version should be 0."),t.numTables=A.getUShort(e,r+2);for(var n=-1,a=t.numTables-1;a>=0;a-=1){var i=A.getUShort(e,r+4+a*8),u=A.getUShort(e,r+4+a*8+2);if(i===3&&(u===0||u===1||u===10)){n=A.getULong(e,r+4+a*8+4);break}}if(n===-1)throw new Error("No valid cmap sub-tables found.");var f=new A.Parser(e,r+n);if(t.format=f.parseUShort(),t.format===12)_s(t,f);else if(t.format===4)Hs(t,f,e,r,n);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function qs(e,r,t){e.segments.push({end:r,start:r,delta:-(r-t),offset:0,glyphIndex:t})}function Ws(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Vs(e){var r=!0,t;for(t=e.length-1;t>0;t-=1){var n=e.get(t);if(n.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}}var a=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:r?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:r?12:20}];r||(a=a.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),a=a.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}]);var i=new D.Table("cmap",a);for(i.segments=[],t=0;t<e.length;t+=1){for(var u=e.get(t),f=0;f<u.unicodes.length;f+=1)qs(i,u.unicodes[f],t);i.segments=i.segments.sort(function(G,C){return G.start-C.start})}Ws(i);var l=i.segments.length,d=0,v=[],x=[],g=[],y=[],T=[],w=[];for(t=0;t<l;t+=1){var E=i.segments[t];E.end<=65535&&E.start<=65535?(v=v.concat({name:"end_"+t,type:"USHORT",value:E.end}),x=x.concat({name:"start_"+t,type:"USHORT",value:E.start}),g=g.concat({name:"idDelta_"+t,type:"SHORT",value:E.delta}),y=y.concat({name:"idRangeOffset_"+t,type:"USHORT",value:E.offset}),E.glyphId!==void 0&&(T=T.concat({name:"glyph_"+t,type:"USHORT",value:E.glyphId}))):d+=1,!r&&E.glyphIndex!==void 0&&(w=w.concat({name:"cmap12Start_"+t,type:"ULONG",value:E.start}),w=w.concat({name:"cmap12End_"+t,type:"ULONG",value:E.end}),w=w.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:E.glyphIndex}))}if(i.segCountX2=(l-d)*2,i.searchRange=Math.pow(2,Math.floor(Math.log(l-d)/Math.log(2)))*2,i.entrySelector=Math.log(i.searchRange/2)/Math.log(2),i.rangeShift=i.segCountX2-i.searchRange,i.fields=i.fields.concat(v),i.fields.push({name:"reservedPad",type:"USHORT",value:0}),i.fields=i.fields.concat(x),i.fields=i.fields.concat(g),i.fields=i.fields.concat(y),i.fields=i.fields.concat(T),i.cmap4Length=14+v.length*2+2+x.length*2+g.length*2+y.length*2+T.length*2,!r){var O=16+w.length*4;i.cmap12Offset=12+2*2+4+i.cmap4Length,i.fields=i.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:O},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:w.length/3}]),i.fields=i.fields.concat(w)}return i}var cn={parse:zs,make:Vs},wr=[".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","266 ff","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"],Xs=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Ys=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],_e=[".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 hn(e){this.font=e}hn.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.font.glyphs;if(t){for(var n=0;n<t.length;n+=1)for(var a=t.get(n),i=0;i<a.unicodes.length;i+=1)if(a.unicodes[i]===r)return n}return null};function pn(e){this.cmap=e}pn.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.charCodeAt(0)]||0};function Cr(e,r){this.encoding=e,this.charset=r}Cr.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.encoding[r];return this.charset.indexOf(t)};function rt(e){var r=this;switch(e.version){case 1:this.names=_e.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<_e.length?r.names[t]=_e[e.glyphNameIndex[t]]:r.names[t]=e.names[e.glyphNameIndex[t]-_e.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var n=0;n<e.numberOfGlyphs;n++)r.names[n]=_e[n+e.glyphNameIndex[n]];break;case 3:this.names=[];break;default:this.names=[];break}}rt.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},rt.prototype.glyphIndexToName=function(e){return this.names[e]};function js(e){for(var r,t=e.tables.cmap.glyphIndexMap,n=Object.keys(t),a=0;a<n.length;a+=1){var i=n[a],u=t[i];r=e.glyphs.get(u),r.addUnicode(parseInt(i))}for(var f=0;f<e.glyphs.length;f+=1)r=e.glyphs.get(f),e.cffEncoding?e.isCIDFont?r.name="gid"+f:r.name=e.cffEncoding.charset[f]:e.glyphNames.names&&(r.name=e.glyphNames.glyphIndexToName(f))}function Zs(e,r,t,n,a){e.beginPath(),e.moveTo(r,t),e.lineTo(n,a),e.stroke()}var He={line:Zs};function dn(e,r,t,n,a){var i;return(r&n)>0?(i=e.parseByte(),(r&a)===0&&(i=-i),i=t+i):(r&a)>0?i=t:i=t+e.parseShort(),i}function Qs(e,r,t){var n=new A.Parser(r,t);e.numberOfContours=n.parseShort(),e._xMin=n.parseShort(),e._yMin=n.parseShort(),e._xMax=n.parseShort(),e._yMax=n.parseShort();var a,i;if(e.numberOfContours>0){for(var u=e.endPointIndices=[],f=0;f<e.numberOfContours;f+=1)u.push(n.parseUShort());e.instructionLength=n.parseUShort(),e.instructions=[];for(var l=0;l<e.instructionLength;l+=1)e.instructions.push(n.parseByte());var d=u[u.length-1]+1;a=[];for(var v=0;v<d;v+=1)if(i=n.parseByte(),a.push(i),(i&8)>0)for(var x=n.parseByte(),g=0;g<x;g+=1)a.push(i),v+=1;if(N.argument(a.length===d,"Bad flags."),u.length>0){var y=[],T;if(d>0){for(var w=0;w<d;w+=1)i=a[w],T={},T.onCurve=!!(i&1),T.lastPointOfContour=u.indexOf(w)>=0,y.push(T);for(var E=0,O=0;O<d;O+=1)i=a[O],T=y[O],T.x=dn(n,i,E,2,16),E=T.x;for(var G=0,C=0;C<d;C+=1)i=a[C],T=y[C],T.y=dn(n,i,G,4,32),G=T.y}e.points=y}else e.points=[]}else if(e.numberOfContours===0)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var _=!0;_;){a=n.parseUShort();var R={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(a&1)>0?(a&2)>0?(R.dx=n.parseShort(),R.dy=n.parseShort()):R.matchedPoints=[n.parseUShort(),n.parseUShort()]:(a&2)>0?(R.dx=n.parseChar(),R.dy=n.parseChar()):R.matchedPoints=[n.parseByte(),n.parseByte()],(a&8)>0?R.xScale=R.yScale=n.parseF2Dot14():(a&64)>0?(R.xScale=n.parseF2Dot14(),R.yScale=n.parseF2Dot14()):(a&128)>0&&(R.xScale=n.parseF2Dot14(),R.scale01=n.parseF2Dot14(),R.scale10=n.parseF2Dot14(),R.yScale=n.parseF2Dot14()),e.components.push(R),_=!!(a&32)}if(a&256){e.instructionLength=n.parseUShort(),e.instructions=[];for(var M=0;M<e.instructionLength;M+=1)e.instructions.push(n.parseByte())}}}function tt(e,r){for(var t=[],n=0;n<e.length;n+=1){var a=e[n],i={x:r.xScale*a.x+r.scale01*a.y+r.dx,y:r.scale10*a.x+r.yScale*a.y+r.dy,onCurve:a.onCurve,lastPointOfContour:a.lastPointOfContour};t.push(i)}return t}function Js(e){for(var r=[],t=[],n=0;n<e.length;n+=1){var a=e[n];t.push(a),a.lastPointOfContour&&(r.push(t),t=[])}return N.argument(t.length===0,"There are still points left in the current contour."),r}function vn(e){var r=new Q;if(!e)return r;for(var t=Js(e),n=0;n<t.length;++n){var a=t[n],i=null,u=a[a.length-1],f=a[0];if(u.onCurve)r.moveTo(u.x,u.y);else if(f.onCurve)r.moveTo(f.x,f.y);else{var l={x:(u.x+f.x)*.5,y:(u.y+f.y)*.5};r.moveTo(l.x,l.y)}for(var d=0;d<a.length;++d)if(i=u,u=f,f=a[(d+1)%a.length],u.onCurve)r.lineTo(u.x,u.y);else{var v=i,x=f;i.onCurve||(v={x:(u.x+i.x)*.5,y:(u.y+i.y)*.5},r.lineTo(v.x,v.y)),f.onCurve||(x={x:(u.x+f.x)*.5,y:(u.y+f.y)*.5}),r.lineTo(v.x,v.y),r.quadraticCurveTo(u.x,u.y,x.x,x.y)}r.closePath()}return r}function Ks(e,r){if(r.isComposite)for(var t=0;t<r.components.length;t+=1){var n=r.components[t],a=e.get(n.glyphIndex);if(a.getPath(),a.points){var i=void 0;if(n.matchedPoints===void 0)i=tt(a.points,n);else{if(n.matchedPoints[0]>r.points.length-1||n.matchedPoints[1]>a.points.length-1)throw Error("Matched points out of range in "+r.name);var u=r.points[n.matchedPoints[0]],f=a.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};f=tt([f],l)[0],l.dx=u.x-f.x,l.dy=u.y-f.y,i=tt(a.points,l)}r.points=r.points.concat(i)}}return vn(r.points)}function $s(e,r,t,n){for(var a=new Je.GlyphSet(n),i=0;i<t.length-1;i+=1){var u=t[i],f=t[i+1];u!==f?a.push(i,Je.ttfGlyphLoader(n,i,Qs,e,r+u,Ks)):a.push(i,Je.glyphLoader(n,i))}return a}var gn={getPath:vn,parse:$s};function ei(e,r){var t=r||new Q;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(n){t=n}}}function pe(e){this.bindConstructorValues(e)}pe.prototype.bindConstructorValues=function(e){this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||e.unicode!==void 0?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",ei(this,e.path))},pe.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)},pe.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},pe.prototype.getPath=function(e,r,t,n,a){e=e!==void 0?e:0,r=r!==void 0?r:0,t=t!==void 0?t:72;var i,u;n||(n={});var f=n.xScale,l=n.yScale;if(n.hinting&&a&&a.hinting&&(u=this.path&&a.hinting.exec(this,t)),u)i=gn.getPath(u).commands,e=Math.round(e),r=Math.round(r),f=l=1;else{i=this.path.commands;var d=1/this.path.unitsPerEm*t;f===void 0&&(f=d),l===void 0&&(l=d)}for(var v=new Q,x=0;x<i.length;x+=1){var g=i[x];g.type==="M"?v.moveTo(e+g.x*f,r+-g.y*l):g.type==="L"?v.lineTo(e+g.x*f,r+-g.y*l):g.type==="Q"?v.quadraticCurveTo(e+g.x1*f,r+-g.y1*l,e+g.x*f,r+-g.y*l):g.type==="C"?v.curveTo(e+g.x1*f,r+-g.y1*l,e+g.x2*f,r+-g.y2*l,e+g.x*f,r+-g.y*l):g.type==="Z"&&v.closePath()}return v},pe.prototype.getContours=function(){var e=this;if(this.points===void 0)return[];for(var r=[],t=[],n=0;n<this.points.length;n+=1){var a=e.points[n];t.push(a),a.lastPointOfContour&&(r.push(t),t=[])}return N.argument(t.length===0,"There are still points left in the current contour."),r},pe.prototype.getMetrics=function(){for(var e=this.path.commands,r=[],t=[],n=0;n<e.length;n+=1){var a=e[n];a.type!=="Z"&&(r.push(a.x),t.push(a.y)),(a.type==="Q"||a.type==="C")&&(r.push(a.x1),t.push(a.y1)),a.type==="C"&&(r.push(a.x2),t.push(a.y2))}var i={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,t),leftSideBearing:this.leftSideBearing};return isFinite(i.xMin)||(i.xMin=0),isFinite(i.xMax)||(i.xMax=this.advanceWidth),isFinite(i.yMin)||(i.yMin=0),isFinite(i.yMax)||(i.yMax=0),i.rightSideBearing=this.advanceWidth-i.leftSideBearing-(i.xMax-i.xMin),i},pe.prototype.draw=function(e,r,t,n,a){this.getPath(r,t,n,a).draw(e)},pe.prototype.drawPoints=function(e,r,t,n){function a(x,g,y,T){var w=Math.PI*2;e.beginPath();for(var E=0;E<x.length;E+=1)e.moveTo(g+x[E].x*T,y+x[E].y*T),e.arc(g+x[E].x*T,y+x[E].y*T,2,0,w,!1);e.closePath(),e.fill()}r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:24;for(var i=1/this.path.unitsPerEm*n,u=[],f=[],l=this.path,d=0;d<l.commands.length;d+=1){var v=l.commands[d];v.x!==void 0&&u.push({x:v.x,y:-v.y}),v.x1!==void 0&&f.push({x:v.x1,y:-v.y1}),v.x2!==void 0&&f.push({x:v.x2,y:-v.y2})}e.fillStyle="blue",a(u,r,t,i),e.fillStyle="red",a(f,r,t,i)},pe.prototype.drawMetrics=function(e,r,t,n){var a;r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:24,a=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",He.line(e,r,-1e4,r,1e4),He.line(e,-1e4,t,1e4,t);var i=this.xMin||0,u=this.yMin||0,f=this.xMax||0,l=this.yMax||0,d=this.advanceWidth||0;e.strokeStyle="blue",He.line(e,r+i*a,-1e4,r+i*a,1e4),He.line(e,r+f*a,-1e4,r+f*a,1e4),He.line(e,-1e4,t+-u*a,1e4,t+-u*a),He.line(e,-1e4,t+-l*a,1e4,t+-l*a),e.strokeStyle="green",He.line(e,r+d*a,-1e4,r+d*a,1e4)};function Lr(e,r,t){Object.defineProperty(e,r,{get:function(){return e.path,e[t]},set:function(n){e[t]=n},enumerable:!0,configurable:!0})}function nt(e,r){var t=this;if(this.font=e,this.glyphs={},Array.isArray(r))for(var n=0;n<r.length;n++)t.glyphs[n]=r[n];this.length=r&&r.length||0}nt.prototype.get=function(e){return typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},nt.prototype.push=function(e,r){this.glyphs[e]=r,this.length++};function ri(e,r){return new pe({index:r,font:e})}function ti(e,r,t,n,a,i){return function(){var u=new pe({index:r,font:e});return u.path=function(){t(u,n,a);var f=i(e.glyphs,u);return f.unitsPerEm=e.unitsPerEm,f},Lr(u,"xMin","_xMin"),Lr(u,"xMax","_xMax"),Lr(u,"yMin","_yMin"),Lr(u,"yMax","_yMax"),u}}function ni(e,r,t,n){return function(){var a=new pe({index:r,font:e});return a.path=function(){var i=t(e,a,n);return i.unitsPerEm=e.unitsPerEm,i},a}}var Je={GlyphSet:nt,glyphLoader:ri,ttfGlyphLoader:ti,cffGlyphLoader:ni};function mn(e,r){if(e===r)return!0;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t+=1)if(!mn(e[t],r[t]))return!1;return!0}else return!1}function at(e){var r;return e.length<1240?r=107:e.length<33900?r=1131:r=32768,r}function Re(e,r,t){var n=[],a=[],i=A.getCard16(e,r),u,f;if(i!==0){var l=A.getByte(e,r+2);u=r+(i+1)*l+2;for(var d=r+3,v=0;v<i+1;v+=1)n.push(A.getOffset(e,d,l)),d+=l;f=u+n[i]}else f=r+2;for(var x=0;x<n.length-1;x+=1){var g=A.getBytes(e,u+n[x],u+n[x+1]);t&&(g=t(g)),a.push(g)}return{objects:a,startOffset:r,endOffset:f}}function ai(e){for(var r="",t=15,n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var a=e.parseByte(),i=a>>4,u=a&15;if(i===t||(r+=n[i],u===t))break;r+=n[u]}return parseFloat(r)}function si(e,r){var t,n,a,i;if(r===28)return t=e.parseByte(),n=e.parseByte(),t<<8|n;if(r===29)return t=e.parseByte(),n=e.parseByte(),a=e.parseByte(),i=e.parseByte(),t<<24|n<<16|a<<8|i;if(r===30)return ai(e);if(r>=32&&r<=246)return r-139;if(r>=247&&r<=250)return t=e.parseByte(),(r-247)*256+t+108;if(r>=251&&r<=254)return t=e.parseByte(),-(r-251)*256-t-108;throw new Error("Invalid b0 "+r)}function ii(e){for(var r={},t=0;t<e.length;t+=1){var n=e[t][0],a=e[t][1],i=void 0;if(a.length===1?i=a[0]:i=a,r.hasOwnProperty(n)&&!isNaN(r[n]))throw new Error("Object "+r+" already has key "+n);r[n]=i}return r}function yn(e,r,t){r=r!==void 0?r:0;var n=new A.Parser(e,r),a=[],i=[];for(t=t!==void 0?t:e.length;n.relativeOffset<t;){var u=n.parseByte();u<=21?(u===12&&(u=1200+n.parseByte()),a.push([u,i]),i=[]):i.push(si(n,u))}return ii(a)}function ur(e,r){return r<=390?r=wr[r]:r=e[r-391],r}function xn(e,r,t){for(var n={},a,i=0;i<r.length;i+=1){var u=r[i];if(Array.isArray(u.type)){var f=[];f.length=u.type.length;for(var l=0;l<u.type.length;l++)a=e[u.op]!==void 0?e[u.op][l]:void 0,a===void 0&&(a=u.value!==void 0&&u.value[l]!==void 0?u.value[l]:null),u.type[l]==="SID"&&(a=ur(t,a)),f[l]=a;n[u.name]=f}else a=e[u.op],a===void 0&&(a=u.value!==void 0?u.value:null),u.type==="SID"&&(a=ur(t,a)),n[u.name]=a}return n}function oi(e,r){var t={};return t.formatMajor=A.getCard8(e,r),t.formatMinor=A.getCard8(e,r+1),t.size=A.getCard8(e,r+2),t.offsetSize=A.getCard8(e,r+3),t.startOffset=r,t.endOffset=r+4,t}var bn=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Sn=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function ui(e,r){var t=yn(e,0,e.byteLength);return xn(t,bn,r)}function Fn(e,r,t,n){var a=yn(e,r,t);return xn(a,Sn,n)}function Tn(e,r,t,n){for(var a=[],i=0;i<t.length;i+=1){var u=new DataView(new Uint8Array(t[i]).buffer),f=ui(u,n);f._subrs=[],f._subrsBias=0;var l=f.private[0],d=f.private[1];if(l!==0&&d!==0){var v=Fn(e,d+r,l,n);if(f._defaultWidthX=v.defaultWidthX,f._nominalWidthX=v.nominalWidthX,v.subrs!==0){var x=d+v.subrs,g=Re(e,x+r);f._subrs=g.objects,f._subrsBias=at(f._subrs)}f._privateDict=v}a.push(f)}return a}function li(e,r,t,n){var a,i,u=new A.Parser(e,r);t-=1;var f=[".notdef"],l=u.parseCard8();if(l===0)for(var d=0;d<t;d+=1)a=u.parseSID(),f.push(ur(n,a));else if(l===1)for(;f.length<=t;){a=u.parseSID(),i=u.parseCard8();for(var v=0;v<=i;v+=1)f.push(ur(n,a)),a+=1}else if(l===2)for(;f.length<=t;){a=u.parseSID(),i=u.parseCard16();for(var x=0;x<=i;x+=1)f.push(ur(n,a)),a+=1}else throw new Error("Unknown charset format "+l);return f}function fi(e,r,t){var n,a={},i=new A.Parser(e,r),u=i.parseCard8();if(u===0)for(var f=i.parseCard8(),l=0;l<f;l+=1)n=i.parseCard8(),a[n]=l;else if(u===1){var d=i.parseCard8();n=1;for(var v=0;v<d;v+=1)for(var x=i.parseCard8(),g=i.parseCard8(),y=x;y<=x+g;y+=1)a[y]=n,n+=1}else throw new Error("Unknown encoding format "+u);return new Cr(a,t)}function ci(e,r,t){var n,a,i,u,f=new Q,l=[],d=0,v=!1,x=!1,g=0,y=0,T,w,E,O;if(e.isCIDFont){var G=e.tables.cff.topDict._fdSelect[r.index],C=e.tables.cff.topDict._fdArray[G];T=C._subrs,w=C._subrsBias,E=C._defaultWidthX,O=C._nominalWidthX}else T=e.tables.cff.topDict._subrs,w=e.tables.cff.topDict._subrsBias,E=e.tables.cff.topDict._defaultWidthX,O=e.tables.cff.topDict._nominalWidthX;var _=E;function R(Y,$){x&&f.closePath(),f.moveTo(Y,$),x=!0}function M(){var Y;Y=l.length%2!==0,Y&&!v&&(_=l.shift()+O),d+=l.length>>1,l.length=0,v=!0}function ce(Y){for(var $,le,he,de,ge,K,ee,ne,ae,se,fe,ve,j=0;j<Y.length;){var ie=Y[j];switch(j+=1,ie){case 1:M();break;case 3:M();break;case 4:l.length>1&&!v&&(_=l.shift()+O,v=!0),y+=l.pop(),R(g,y);break;case 5:for(;l.length>0;)g+=l.shift(),y+=l.shift(),f.lineTo(g,y);break;case 6:for(;l.length>0&&(g+=l.shift(),f.lineTo(g,y),l.length!==0);)y+=l.shift(),f.lineTo(g,y);break;case 7:for(;l.length>0&&(y+=l.shift(),f.lineTo(g,y),l.length!==0);)g+=l.shift(),f.lineTo(g,y);break;case 8:for(;l.length>0;)n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+l.shift(),f.curveTo(n,a,i,u,g,y);break;case 10:ge=l.pop()+w,K=T[ge],K&&ce(K);break;case 11:return;case 12:switch(ie=Y[j],j+=1,ie){case 35:n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u+l.shift(),ae=ee+l.shift(),se=ne+l.shift(),fe=ae+l.shift(),ve=se+l.shift(),g=fe+l.shift(),y=ve+l.shift(),l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;case 34:n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u,ae=ee+l.shift(),se=u,fe=ae+l.shift(),ve=y,g=fe+l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;case 36:n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u,ae=ee+l.shift(),se=u,fe=ae+l.shift(),ve=se+l.shift(),g=fe+l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;case 37:n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),ee=i+l.shift(),ne=u+l.shift(),ae=ee+l.shift(),se=ne+l.shift(),fe=ae+l.shift(),ve=se+l.shift(),Math.abs(fe-g)>Math.abs(ve-y)?g=fe+l.shift():y=ve+l.shift(),f.curveTo(n,a,i,u,ee,ne),f.curveTo(ae,se,fe,ve,g,y);break;default:console.log("Glyph "+r.index+": unknown operator 1200"+ie),l.length=0}break;case 14:l.length>0&&!v&&(_=l.shift()+O,v=!0),x&&(f.closePath(),x=!1);break;case 18:M();break;case 19:case 20:M(),j+=d+7>>3;break;case 21:l.length>2&&!v&&(_=l.shift()+O,v=!0),y+=l.pop(),g+=l.pop(),R(g,y);break;case 22:l.length>1&&!v&&(_=l.shift()+O,v=!0),g+=l.pop(),R(g,y);break;case 23:M();break;case 24:for(;l.length>2;)n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+l.shift(),f.curveTo(n,a,i,u,g,y);g+=l.shift(),y+=l.shift(),f.lineTo(g,y);break;case 25:for(;l.length>6;)g+=l.shift(),y+=l.shift(),f.lineTo(g,y);n=g+l.shift(),a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+l.shift(),f.curveTo(n,a,i,u,g,y);break;case 26:for(l.length%2&&(g+=l.shift());l.length>0;)n=g,a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i,y=u+l.shift(),f.curveTo(n,a,i,u,g,y);break;case 27:for(l.length%2&&(y+=l.shift());l.length>0;)n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u,f.curveTo(n,a,i,u,g,y);break;case 28:$=Y[j],le=Y[j+1],l.push(($<<24|le<<16)>>16),j+=2;break;case 29:ge=l.pop()+e.gsubrsBias,K=e.gsubrs[ge],K&&ce(K);break;case 30:for(;l.length>0&&(n=g,a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y),l.length!==0);)n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),y=u+l.shift(),g=i+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y);break;case 31:for(;l.length>0&&(n=g+l.shift(),a=y,i=n+l.shift(),u=a+l.shift(),y=u+l.shift(),g=i+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y),l.length!==0);)n=g,a=y+l.shift(),i=n+l.shift(),u=a+l.shift(),g=i+l.shift(),y=u+(l.length===1?l.shift():0),f.curveTo(n,a,i,u,g,y);break;default:ie<32?console.log("Glyph "+r.index+": unknown operator "+ie):ie<247?l.push(ie-139):ie<251?($=Y[j],j+=1,l.push((ie-247)*256+$+108)):ie<255?($=Y[j],j+=1,l.push(-(ie-251)*256-$-108)):($=Y[j],le=Y[j+1],he=Y[j+2],de=Y[j+3],j+=4,l.push(($<<24|le<<16|he<<8|de)/65536))}}}return ce(t),r.advanceWidth=_,f}function hi(e,r,t,n){var a=[],i,u=new A.Parser(e,r),f=u.parseCard8();if(f===0)for(var l=0;l<t;l++){if(i=u.parseCard8(),i>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+n+")");a.push(i)}else if(f===3){var d=u.parseCard16(),v=u.parseCard16();if(v!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+v);for(var x,g=0;g<d;g++){if(i=u.parseCard8(),x=u.parseCard16(),i>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+n+")");if(x>t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+x);for(;v<x;v++)a.push(i);v=x}if(x!==t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+x)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+f);return a}function pi(e,r,t){t.tables.cff={};var n=oi(e,r),a=Re(e,n.endOffset,A.bytesToString),i=Re(e,a.endOffset),u=Re(e,i.endOffset,A.bytesToString),f=Re(e,u.endOffset);t.gsubrs=f.objects,t.gsubrsBias=at(t.gsubrs);var l=Tn(e,r,i.objects,u.objects);if(l.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var d=l[0];if(t.tables.cff.topDict=d,d._privateDict&&(t.defaultWidthX=d._privateDict.defaultWidthX,t.nominalWidthX=d._privateDict.nominalWidthX),d.ros[0]!==void 0&&d.ros[1]!==void 0&&(t.isCIDFont=!0),t.isCIDFont){var v=d.fdArray,x=d.fdSelect;if(v===0||x===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");v+=r;var g=Re(e,v),y=Tn(e,r,g.objects,u.objects);d._fdArray=y,x+=r,d._fdSelect=hi(e,x,t.numGlyphs,y.length)}var T=r+d.private[1],w=Fn(e,T,d.private[0],u.objects);if(t.defaultWidthX=w.defaultWidthX,t.nominalWidthX=w.nominalWidthX,w.subrs!==0){var E=T+w.subrs,O=Re(e,E);t.subrs=O.objects,t.subrsBias=at(t.subrs)}else t.subrs=[],t.subrsBias=0;var G=Re(e,r+d.charStrings);t.nGlyphs=G.objects.length;var C=li(e,r+d.charset,t.nGlyphs,u.objects);d.encoding===0?t.cffEncoding=new Cr(Xs,C):d.encoding===1?t.cffEncoding=new Cr(Ys,C):t.cffEncoding=fi(e,r+d.encoding,C),t.encoding=t.encoding||t.cffEncoding,t.glyphs=new Je.GlyphSet(t);for(var _=0;_<t.nGlyphs;_+=1){var R=G.objects[_];t.glyphs.push(_,Je.cffGlyphLoader(t,_,ci,R))}}function Un(e,r){var t,n=wr.indexOf(e);return n>=0&&(t=n),n=r.indexOf(e),n>=0?t=n+wr.length:(t=wr.length+r.length,r.push(e)),t}function di(){return new D.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function vi(e){var r=new D.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);r.names=[];for(var t=0;t<e.length;t+=1)r.names.push({name:"name_"+t,type:"NAME",value:e[t]});return r}function En(e,r,t){for(var n={},a=0;a<e.length;a+=1){var i=e[a],u=r[i.name];u!==void 0&&!mn(u,i.value)&&(i.type==="SID"&&(u=Un(u,t)),n[i.op]={name:i.name,type:i.type,value:u})}return n}function kn(e,r){var t=new D.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=En(bn,e,r),t}function On(e){var r=new D.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return r.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],r}function gi(e){var r=new D.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);r.strings=[];for(var t=0;t<e.length;t+=1)r.strings.push({name:"string_"+t,type:"STRING",value:e[t]});return r}function mi(){return new D.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function yi(e,r){for(var t=new D.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var a=e[n],i=Un(a,r);t.fields.push({name:"glyph_"+n,type:"SID",value:i})}return t}function xi(e){var r=[],t=e.path;r.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,a=0,i=0;i<t.commands.length;i+=1){var u=void 0,f=void 0,l=t.commands[i];if(l.type==="Q"){var d=.3333333333333333,v=2/3;l={type:"C",x:l.x,y:l.y,x1:d*n+v*l.x1,y1:d*a+v*l.y1,x2:d*l.x+v*l.x1,y2:d*l.y+v*l.y1}}if(l.type==="M")u=Math.round(l.x-n),f=Math.round(l.y-a),r.push({name:"dx",type:"NUMBER",value:u}),r.push({name:"dy",type:"NUMBER",value:f}),r.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),a=Math.round(l.y);else if(l.type==="L")u=Math.round(l.x-n),f=Math.round(l.y-a),r.push({name:"dx",type:"NUMBER",value:u}),r.push({name:"dy",type:"NUMBER",value:f}),r.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),a=Math.round(l.y);else if(l.type==="C"){var x=Math.round(l.x1-n),g=Math.round(l.y1-a),y=Math.round(l.x2-l.x1),T=Math.round(l.y2-l.y1);u=Math.round(l.x-l.x2),f=Math.round(l.y-l.y2),r.push({name:"dx1",type:"NUMBER",value:x}),r.push({name:"dy1",type:"NUMBER",value:g}),r.push({name:"dx2",type:"NUMBER",value:y}),r.push({name:"dy2",type:"NUMBER",value:T}),r.push({name:"dx",type:"NUMBER",value:u}),r.push({name:"dy",type:"NUMBER",value:f}),r.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),a=Math.round(l.y)}}return r.push({name:"endchar",type:"OP",value:14}),r}function bi(e){for(var r=new D.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),t=0;t<e.length;t+=1){var n=e.get(t),a=xi(n);r.charStrings.push({name:n.name,type:"CHARSTRING",value:a})}return r}function Si(e,r){var t=new D.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=En(Sn,e,r),t}function Fi(e,r){for(var t=new D.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/r.unitsPerEm,a={version:r.version,fullName:r.fullName,familyName:r.familyName,weight:r.weightName,fontBBox:r.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},i={},u=[],f,l=1;l<e.length;l+=1)f=e.get(l),u.push(f.name);var d=[];t.header=di(),t.nameIndex=vi([r.postScriptName]);var v=kn(a,d);t.topDictIndex=On(v),t.globalSubrIndex=mi(),t.charsets=yi(u,d),t.charStringsIndex=bi(e),t.privateDict=Si(i,d),t.stringIndex=gi(d);var x=t.header.sizeOf()+t.nameIndex.sizeOf()+t.topDictIndex.sizeOf()+t.stringIndex.sizeOf()+t.globalSubrIndex.sizeOf();return a.charset=x,a.encoding=0,a.charStrings=a.charset+t.charsets.sizeOf(),a.private[1]=a.charStrings+t.charStringsIndex.sizeOf(),v=kn(a,d),t.topDictIndex=On(v),t}var wn={parse:pi,make:Fi};function Ti(e,r){var t={},n=new A.Parser(e,r);return t.version=n.parseVersion(),t.fontRevision=Math.round(n.parseFixed()*1e3)/1e3,t.checkSumAdjustment=n.parseULong(),t.magicNumber=n.parseULong(),N.argument(t.magicNumber===1594834165,"Font header has wrong magic number."),t.flags=n.parseUShort(),t.unitsPerEm=n.parseUShort(),t.created=n.parseLongDateTime(),t.modified=n.parseLongDateTime(),t.xMin=n.parseShort(),t.yMin=n.parseShort(),t.xMax=n.parseShort(),t.yMax=n.parseShort(),t.macStyle=n.parseUShort(),t.lowestRecPPEM=n.parseUShort(),t.fontDirectionHint=n.parseShort(),t.indexToLocFormat=n.parseShort(),t.glyphDataFormat=n.parseShort(),t}function Ui(e){var r=Math.round(new Date().getTime()/1e3)+2082844800,t=r;return e.createdTimestamp&&(t=e.createdTimestamp+2082844800),new D.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:t},{name:"modified",type:"LONGDATETIME",value:r},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}var Cn={parse:Ti,make:Ui};function Ei(e,r){var t={},n=new A.Parser(e,r);return t.version=n.parseVersion(),t.ascender=n.parseShort(),t.descender=n.parseShort(),t.lineGap=n.parseShort(),t.advanceWidthMax=n.parseUShort(),t.minLeftSideBearing=n.parseShort(),t.minRightSideBearing=n.parseShort(),t.xMaxExtent=n.parseShort(),t.caretSlopeRise=n.parseShort(),t.caretSlopeRun=n.parseShort(),t.caretOffset=n.parseShort(),n.relativeOffset+=8,t.metricDataFormat=n.parseShort(),t.numberOfHMetrics=n.parseUShort(),t}function ki(e){return new D.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}var Ln={parse:Ei,make:ki};function Oi(e,r,t,n,a){for(var i,u,f=new A.Parser(e,r),l=0;l<n;l+=1){l<t&&(i=f.parseUShort(),u=f.parseShort());var d=a.get(l);d.advanceWidth=i,d.leftSideBearing=u}}function wi(e){for(var r=new D.Table("hmtx",[]),t=0;t<e.length;t+=1){var n=e.get(t),a=n.advanceWidth||0,i=n.leftSideBearing||0;r.fields.push({name:"advanceWidth_"+t,type:"USHORT",value:a}),r.fields.push({name:"leftSideBearing_"+t,type:"SHORT",value:i})}return r}var In={parse:Oi,make:wi};function Ci(e){for(var r=new D.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),t="",n=12+e.length*4,a=0;a<e.length;++a){var i=t.indexOf(e[a]);i<0&&(i=t.length,t+=e[a]),r.fields.push({name:"offset "+a,type:"USHORT",value:n+i}),r.fields.push({name:"length "+a,type:"USHORT",value:e[a].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),r}function Li(e,r){var t=new A.Parser(e,r),n=t.parseULong();N.argument(n===1,"Unsupported ltag table version."),t.skip("uLong",1);for(var a=t.parseULong(),i=[],u=0;u<a;u++){for(var f="",l=r+t.parseUShort(),d=t.parseUShort(),v=l;v<l+d;++v)f+=String.fromCharCode(e.getInt8(v));i.push(f)}return i}var An={make:Ci,parse:Li};function Ii(e,r){var t={},n=new A.Parser(e,r);return t.version=n.parseVersion(),t.numGlyphs=n.parseUShort(),t.version===1&&(t.maxPoints=n.parseUShort(),t.maxContours=n.parseUShort(),t.maxCompositePoints=n.parseUShort(),t.maxCompositeContours=n.parseUShort(),t.maxZones=n.parseUShort(),t.maxTwilightPoints=n.parseUShort(),t.maxStorage=n.parseUShort(),t.maxFunctionDefs=n.parseUShort(),t.maxInstructionDefs=n.parseUShort(),t.maxStackElements=n.parseUShort(),t.maxSizeOfInstructions=n.parseUShort(),t.maxComponentElements=n.parseUShort(),t.maxComponentDepth=n.parseUShort()),t}function Ai(e){return new D.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}var Bn={parse:Ii,make:Ai},Rn=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Dn={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"},Bi={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},Pn={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 Ri(e,r,t){switch(e){case 0:if(r===65535)return"und";if(t)return t[r];break;case 1:return Dn[r];case 3:return Pn[r]}}var st="utf-16",Di={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"},Pi={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 Mn(e,r,t){switch(e){case 0:return st;case 1:return Pi[t]||Di[r];case 3:if(r===1||r===10)return st;break}}function Mi(e,r,t){for(var n={},a=new A.Parser(e,r),i=a.parseUShort(),u=a.parseUShort(),f=a.offset+a.parseUShort(),l=0;l<u;l++){var d=a.parseUShort(),v=a.parseUShort(),x=a.parseUShort(),g=a.parseUShort(),y=Rn[g]||g,T=a.parseUShort(),w=a.parseUShort(),E=Ri(d,x,t),O=Mn(d,v,x);if(O!==void 0&&E!==void 0){var G=void 0;if(O===st?G=Qe.UTF16(e,f+w,T):G=Qe.MACSTRING(e,f+w,T,O),G){var C=n[y];C===void 0&&(C=n[y]={}),C[E]=G}}}var _=0;return i===1&&(_=a.parseUShort()),n}function it(e){var r={};for(var t in e)r[e[t]]=parseInt(t);return r}function Gn(e,r,t,n,a,i){return new D.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:r},{name:"languageID",type:"USHORT",value:t},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:a},{name:"offset",type:"USHORT",value:i}])}function Gi(e,r){var t=e.length,n=r.length-t+1;e:for(var a=0;a<n;a++)for(;a<n;a++){for(var i=0;i<t;i++)if(r[a+i]!==e[i])continue e;return a}return-1}function Nn(e,r){var t=Gi(e,r);if(t<0){t=r.length;for(var n=0,a=e.length;n<a;++n)r.push(e[n])}return t}function Ni(e,r){var t,n=[],a={},i=it(Rn);for(var u in e){var f=i[u];if(f===void 0&&(f=u),t=parseInt(f),isNaN(t))throw new Error('Name table entry "'+u+'" does not exist, see nameTableNames for complete list.');a[t]=e[u],n.push(t)}for(var l=it(Dn),d=it(Pn),v=[],x=[],g=0;g<n.length;g++){t=n[g];var y=a[t];for(var T in y){var w=y[T],E=1,O=l[T],G=Bi[O],C=Mn(E,G,O),_=k.MACSTRING(w,C);_===void 0&&(E=0,O=r.indexOf(T),O<0&&(O=r.length,r.push(T)),G=4,_=k.UTF16(w));var R=Nn(_,x);v.push(Gn(E,G,O,t,_.length,R));var M=d[T];if(M!==void 0){var ce=k.UTF16(w),Y=Nn(ce,x);v.push(Gn(3,1,M,t,ce.length,Y))}}}v.sort(function(he,de){return he.platformID-de.platformID||he.encodingID-de.encodingID||he.languageID-de.languageID||he.nameID-de.nameID});for(var $=new D.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:v.length},{name:"stringOffset",type:"USHORT",value:6+v.length*12}]),le=0;le<v.length;le++)$.fields.push({name:"record_"+le,type:"RECORD",value:v[le]});return $.fields.push({name:"strings",type:"LITERAL",value:x}),$}var _n={parse:Mi,make:Ni},ot=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function _i(e){for(var r=0;r<ot.length;r+=1){var t=ot[r];if(e>=t.begin&&e<t.end)return r}return-1}function Hi(e,r){var t={},n=new A.Parser(e,r);t.version=n.parseUShort(),t.xAvgCharWidth=n.parseShort(),t.usWeightClass=n.parseUShort(),t.usWidthClass=n.parseUShort(),t.fsType=n.parseUShort(),t.ySubscriptXSize=n.parseShort(),t.ySubscriptYSize=n.parseShort(),t.ySubscriptXOffset=n.parseShort(),t.ySubscriptYOffset=n.parseShort(),t.ySuperscriptXSize=n.parseShort(),t.ySuperscriptYSize=n.parseShort(),t.ySuperscriptXOffset=n.parseShort(),t.ySuperscriptYOffset=n.parseShort(),t.yStrikeoutSize=n.parseShort(),t.yStrikeoutPosition=n.parseShort(),t.sFamilyClass=n.parseShort(),t.panose=[];for(var a=0;a<10;a++)t.panose[a]=n.parseByte();return t.ulUnicodeRange1=n.parseULong(),t.ulUnicodeRange2=n.parseULong(),t.ulUnicodeRange3=n.parseULong(),t.ulUnicodeRange4=n.parseULong(),t.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),t.fsSelection=n.parseUShort(),t.usFirstCharIndex=n.parseUShort(),t.usLastCharIndex=n.parseUShort(),t.sTypoAscender=n.parseShort(),t.sTypoDescender=n.parseShort(),t.sTypoLineGap=n.parseShort(),t.usWinAscent=n.parseUShort(),t.usWinDescent=n.parseUShort(),t.version>=1&&(t.ulCodePageRange1=n.parseULong(),t.ulCodePageRange2=n.parseULong()),t.version>=2&&(t.sxHeight=n.parseShort(),t.sCapHeight=n.parseShort(),t.usDefaultChar=n.parseUShort(),t.usBreakChar=n.parseUShort(),t.usMaxContent=n.parseUShort()),t}function zi(e){return new D.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}],e)}var ut={parse:Hi,make:zi,unicodeRanges:ot,getUnicodeRange:_i};function qi(e,r){var t={},n=new A.Parser(e,r);switch(t.version=n.parseVersion(),t.italicAngle=n.parseFixed(),t.underlinePosition=n.parseShort(),t.underlineThickness=n.parseShort(),t.isFixedPitch=n.parseULong(),t.minMemType42=n.parseULong(),t.maxMemType42=n.parseULong(),t.minMemType1=n.parseULong(),t.maxMemType1=n.parseULong(),t.version){case 1:t.names=_e.slice();break;case 2:t.numberOfGlyphs=n.parseUShort(),t.glyphNameIndex=new Array(t.numberOfGlyphs);for(var a=0;a<t.numberOfGlyphs;a++)t.glyphNameIndex[a]=n.parseUShort();t.names=[];for(var i=0;i<t.numberOfGlyphs;i++)if(t.glyphNameIndex[i]>=_e.length){var u=n.parseChar();t.names.push(n.parseString(u))}break;case 2.5:t.numberOfGlyphs=n.parseUShort(),t.offset=new Array(t.numberOfGlyphs);for(var f=0;f<t.numberOfGlyphs;f++)t.offset[f]=n.parseChar();break}return t}function Wi(){return new D.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}var Hn={parse:qi,make:Wi},Se=new Array(9);Se[1]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(S.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(S.coverage),substitute:this.parseOffset16List()};N.assert(!1,"0x"+r.toString(16)+": lookup type 1 format must be 1 or 2.")},Se[2]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),sequences:this.parseListOfLists()}},Se[3]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),alternateSets:this.parseListOfLists()}},Se[4]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB ligature table identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var Ke={sequenceIndex:S.uShort,lookupListIndex:S.uShort};Se[5]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(S.coverage),ruleSets:this.parseListOfLists(function(){var i=this.parseUShort(),u=this.parseUShort();return{input:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(u,Ke)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(S.coverage),classDef:this.parsePointer(S.classDef),classSets:this.parseListOfLists(function(){var i=this.parseUShort(),u=this.parseUShort();return{classes:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(u,Ke)}})};if(t===3){var n=this.parseUShort(),a=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,S.pointer(S.coverage)),lookupRecords:this.parseRecordList(a,Ke)}}N.assert(!1,"0x"+r.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},Se[6]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(S.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Ke)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(S.coverage),backtrackClassDef:this.parsePointer(S.classDef),inputClassDef:this.parsePointer(S.classDef),lookaheadClassDef:this.parsePointer(S.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Ke)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(S.pointer(S.coverage)),inputCoverage:this.parseList(S.pointer(S.coverage)),lookaheadCoverage:this.parseList(S.pointer(S.coverage)),lookupRecords:this.parseRecordList(Ke)};N.assert(!1,"0x"+r.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},Se[7]=function(){var r=this.parseUShort();N.argument(r===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new S(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:Se[t].call(n)}},Se[8]=function(){var r=this.parseUShort();return N.argument(r===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(S.coverage),backtrackCoverage:this.parseList(S.pointer(S.coverage)),lookaheadCoverage:this.parseList(S.pointer(S.coverage)),substitutes:this.parseUShortList()}};function Vi(e,r){r=r||0;var t=new S(e,r),n=t.parseVersion(1);return N.argument(n===1||n===1.1,"Unsupported GSUB table version."),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Se)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Se),variations:t.parseFeatureVariationsList()}}var Ir=new Array(9);Ir[1]=function(r){return r.substFormat===1?new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)},{name:"deltaGlyphID",type:"USHORT",value:r.deltaGlyphId}]):new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)}].concat(D.ushortList("substitute",r.substitute)))},Ir[3]=function(r){return N.assert(r.substFormat===1,"Lookup type 3 substFormat must be 1."),new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)}].concat(D.tableList("altSet",r.alternateSets,function(t){return new D.Table("alternateSetTable",D.ushortList("alternate",t))})))},Ir[4]=function(r){return N.assert(r.substFormat===1,"Lookup type 4 substFormat must be 1."),new D.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new D.Coverage(r.coverage)}].concat(D.tableList("ligSet",r.ligatureSets,function(t){return new D.Table("ligatureSetTable",D.tableList("ligature",t,function(n){return new D.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat(D.ushortList("component",n.components,n.components.length+1)))}))})))};function Xi(e){return new D.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new D.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new D.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new D.LookupList(e.lookups,Ir)}])}var zn={parse:Vi,make:Xi};function Yi(e,r){var t=new A.Parser(e,r),n=t.parseULong();N.argument(n===1,"Unsupported META table version."),t.parseULong(),t.parseULong();for(var a=t.parseULong(),i={},u=0;u<a;u++){var f=t.parseTag(),l=t.parseULong(),d=t.parseULong(),v=Qe.UTF8(e,r+l,d);i[f]=v}return i}function ji(e){var r=Object.keys(e).length,t="",n=16+r*12,a=new D.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:r}]);for(var i in e){var u=t.length;t+=e[i],a.fields.push({name:"tag "+i,type:"TAG",value:i}),a.fields.push({name:"offset "+i,type:"ULONG",value:n+u}),a.fields.push({name:"length "+i,type:"ULONG",value:e[i].length})}return a.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),a}var qn={parse:Yi,make:ji};function Wn(e){return Math.log(e)/Math.log(2)|0}function lt(e){for(;e.length%4!==0;)e.push(0);for(var r=0,t=0;t<e.length;t+=4)r+=(e[t]<<24)+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];return r%=Math.pow(2,32),r}function Vn(e,r,t,n){return new D.Record("Table Record",[{name:"tag",type:"TAG",value:e!==void 0?e:""},{name:"checkSum",type:"ULONG",value:r!==void 0?r:0},{name:"offset",type:"ULONG",value:t!==void 0?t:0},{name:"length",type:"ULONG",value:n!==void 0?n:0}])}function Xn(e){var r=new D.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);r.tables=e,r.numTables=e.length;var t=Math.pow(2,Wn(r.numTables));r.searchRange=16*t,r.entrySelector=Wn(t),r.rangeShift=r.numTables*16-r.searchRange;for(var n=[],a=[],i=r.sizeOf()+Vn().sizeOf()*r.numTables;i%4!==0;)i+=1,a.push({name:"padding",type:"BYTE",value:0});for(var u=0;u<e.length;u+=1){var f=e[u];N.argument(f.tableName.length===4,"Table name"+f.tableName+" is invalid.");var l=f.sizeOf(),d=Vn(f.tableName,lt(f.encode()),i,l);for(n.push({name:d.tag+" Table Record",type:"RECORD",value:d}),a.push({name:f.tableName+" table",type:"RECORD",value:f}),i+=l,N.argument(!isNaN(i),"Something went wrong calculating the offset.");i%4!==0;)i+=1,a.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(v,x){return v.value.tag>x.value.tag?1:-1}),r.fields=r.fields.concat(n),r.fields=r.fields.concat(a),r}function Yn(e,r,t){for(var n=0;n<r.length;n+=1){var a=e.charToGlyphIndex(r[n]);if(a>0){var i=e.glyphs.get(a);return i.getMetrics()}}return t}function Zi(e){for(var r=0,t=0;t<e.length;t+=1)r+=e[t];return r/e.length}function Qi(e){for(var r=[],t=[],n=[],a=[],i=[],u=[],f=[],l,d=0,v=0,x=0,g=0,y=0,T=0;T<e.glyphs.length;T+=1){var w=e.glyphs.get(T),E=w.unicode|0;if(isNaN(w.advanceWidth))throw new Error("Glyph "+w.name+" ("+T+"): advanceWidth is not a number.");(l>E||l===void 0)&&E>0&&(l=E),d<E&&(d=E);var O=ut.getUnicodeRange(E);if(O<32)v|=1<<O;else if(O<64)x|=1<<O-32;else if(O<96)g|=1<<O-64;else if(O<123)y|=1<<O-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(w.name!==".notdef"){var G=w.getMetrics();r.push(G.xMin),t.push(G.yMin),n.push(G.xMax),a.push(G.yMax),u.push(G.leftSideBearing),f.push(G.rightSideBearing),i.push(w.advanceWidth)}}var C={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,a),advanceWidthMax:Math.max.apply(null,i),advanceWidthAvg:Zi(i),minLeftSideBearing:Math.min.apply(null,u),maxLeftSideBearing:Math.max.apply(null,u),minRightSideBearing:Math.min.apply(null,f)};C.ascender=e.ascender,C.descender=e.descender;var _=Cn.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:C.xMin,yMin:C.yMin,xMax:C.xMax,yMax:C.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),R=Ln.make({ascender:C.ascender,descender:C.descender,advanceWidthMax:C.advanceWidthMax,minLeftSideBearing:C.minLeftSideBearing,minRightSideBearing:C.minRightSideBearing,xMaxExtent:C.maxLeftSideBearing+(C.xMax-C.xMin),numberOfHMetrics:e.glyphs.length}),M=Bn.make(e.glyphs.length),ce=ut.make({xAvgCharWidth:Math.round(C.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:l,usLastCharIndex:d,ulUnicodeRange1:v,ulUnicodeRange2:x,ulUnicodeRange3:g,ulUnicodeRange4:y,fsSelection:e.tables.os2.fsSelection,sTypoAscender:C.ascender,sTypoDescender:C.descender,sTypoLineGap:0,usWinAscent:C.yMax,usWinDescent:Math.abs(C.yMin),ulCodePageRange1:1,sxHeight:Yn(e,"xyvw",{yMax:Math.round(C.ascender/2)}).yMax,sCapHeight:Yn(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",C).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),Y=In.make(e.glyphs),$=cn.make(e.glyphs),le=e.getEnglishName("fontFamily"),he=e.getEnglishName("fontSubfamily"),de=le+" "+he,ge=e.getEnglishName("postScriptName");ge||(ge=le.replace(/\s/g,"")+"-"+he);var K={};for(var ee in e.names)K[ee]=e.names[ee];K.uniqueID||(K.uniqueID={en:e.getEnglishName("manufacturer")+":"+de}),K.postScriptName||(K.postScriptName={en:ge}),K.preferredFamily||(K.preferredFamily=e.names.fontFamily),K.preferredSubfamily||(K.preferredSubfamily=e.names.fontSubfamily);var ne=[],ae=_n.make(K,ne),se=ne.length>0?An.make(ne):void 0,fe=Hn.make(),ve=wn.make(e.glyphs,{version:e.getEnglishName("version"),fullName:de,familyName:le,weightName:he,postScriptName:ge,unitsPerEm:e.unitsPerEm,fontBBox:[0,C.yMin,C.ascender,C.advanceWidthMax]}),j=e.metas&&Object.keys(e.metas).length>0?qn.make(e.metas):void 0,ie=[_,R,M,ce,ae,$,fe,ve,Y];se&&ie.push(se),e.tables.gsub&&ie.push(zn.make(e.tables.gsub)),j&&ie.push(j);for(var gt=Xn(ie),$u=gt.encode(),el=lt($u),mt=gt.fields,Sa=!1,Dr=0;Dr<mt.length;Dr+=1)if(mt[Dr].name==="head table"){mt[Dr].value.checkSumAdjustment=2981146554-el,Sa=!0;break}if(!Sa)throw new Error("Could not find head table with checkSum to adjust.");return gt}var Ji={make:Xn,fontToTable:Qi,computeCheckSum:lt};function ft(e,r){for(var t=0,n=e.length-1;t<=n;){var a=t+n>>>1,i=e[a].tag;if(i===r)return a;i<r?t=a+1:n=a-1}return-t-1}function jn(e,r){for(var t=0,n=e.length-1;t<=n;){var a=t+n>>>1,i=e[a];if(i===r)return a;i<r?t=a+1:n=a-1}return-t-1}function Zn(e,r){for(var t,n=0,a=e.length-1;n<=a;){var i=n+a>>>1;t=e[i];var u=t.start;if(u===r)return t;u<r?n=i+1:a=i-1}if(n>0)return t=e[n-1],r>t.end?0:t}function lr(e,r){this.font=e,this.tableName=r}lr.prototype={searchTag:ft,binSearch:jn,getTable:function(e){var r=this.font.tables[this.tableName];return!r&&e&&(r=this.font.tables[this.tableName]=this.createDefaultTable()),r},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(r){return r.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var r=!1,t=0;t<e.scripts.length;t++){var n=e.scripts[t].tag;if(n==="DFLT")return n;n==="latn"&&(r=!0)}if(r)return"latn"}},getScriptTable:function(e,r){var t=this.getTable(r);if(t){e=e||"DFLT";var n=t.scripts,a=ft(t.scripts,e);if(a>=0)return n[a].script;if(r){var i={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-a,0,i),i.script}}},getLangSysTable:function(e,r,t){var n=this.getScriptTable(e,t);if(n){if(!r||r==="dflt"||r==="DFLT")return n.defaultLangSys;var a=ft(n.langSysRecords,r);if(a>=0)return n.langSysRecords[a].langSys;if(t){var i={tag:r,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-a,0,i),i.langSys}}},getFeatureTable:function(e,r,t,n){var a=this.getLangSysTable(e,r,n);if(a){for(var i,u=a.featureIndexes,f=this.font.tables[this.tableName].features,l=0;l<u.length;l++)if(i=f[u[l]],i.tag===t)return i.feature;if(n){var d=f.length;return N.assert(d===0||t>=f[d-1].tag,"Features must be added in alphabetical order."),i={tag:t,feature:{params:0,lookupListIndexes:[]}},f.push(i),u.push(d),i.feature}}},getLookupTables:function(e,r,t,n,a){var i=this.getFeatureTable(e,r,t,a),u=[];if(i){for(var f,l=i.lookupListIndexes,d=this.font.tables[this.tableName].lookups,v=0;v<l.length;v++)f=d[l[v]],f.lookupType===n&&u.push(f);if(u.length===0&&a){f={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var x=d.length;return d.push(f),l.push(x),[f]}}return u},getGlyphClass:function(e,r){switch(e.format){case 1:return e.startGlyph<=r&&r<e.startGlyph+e.classes.length?e.classes[r-e.startGlyph]:0;case 2:var t=Zn(e.ranges,r);return t?t.classId:0}},getCoverageIndex:function(e,r){switch(e.format){case 1:var t=jn(e.glyphs,r);return t>=0?t:-1;case 2:var n=Zn(e.ranges,r);return n?n.index+r-n.start:-1}},expandCoverage:function(e){if(e.format===1)return e.glyphs;for(var r=[],t=e.ranges,n=0;n<t.length;n++)for(var a=t[n],i=a.start,u=a.end,f=i;f<=u;f++)r.push(f);return r}};function Ar(e){lr.call(this,e,"gpos")}Ar.prototype=lr.prototype,Ar.prototype.getKerningValue=function(e,r,t){for(var n=this,a=0;a<e.length;a++)for(var i=e[a].subtables,u=0;u<i.length;u++){var f=i[u],l=n.getCoverageIndex(f.coverage,r);if(!(l<0))switch(f.posFormat){case 1:for(var d=f.pairSets[l],v=0;v<d.length;v++){var x=d[v];if(x.secondGlyph===t)return x.value1&&x.value1.xAdvance||0}break;case 2:var g=n.getGlyphClass(f.classDef1,r),y=n.getGlyphClass(f.classDef2,t),T=f.classRecords[g][y];return T.value1&&T.value1.xAdvance||0}}return 0},Ar.prototype.getKerningTables=function(e,r){if(this.font.tables.gpos)return this.getLookupTables(e,r,"kern",2)};function Fe(e){lr.call(this,e,"gsub")}function Ki(e,r){var t=e.length;if(t!==r.length)return!1;for(var n=0;n<t;n++)if(e[n]!==r[n])return!1;return!0}function Qn(e,r,t){for(var n=e.subtables,a=0;a<n.length;a++){var i=n[a];if(i.substFormat===r)return i}if(t)return n.push(t),t}Fe.prototype=lr.prototype,Fe.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Fe.prototype.getSingle=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,1),u=0;u<i.length;u++)for(var f=i[u].subtables,l=0;l<f.length;l++){var d=f[l],v=n.expandCoverage(d.coverage),x=void 0;if(d.substFormat===1){var g=d.deltaGlyphId;for(x=0;x<v.length;x++){var y=v[x];a.push({sub:y,by:y+g})}}else{var T=d.substitute;for(x=0;x<v.length;x++)a.push({sub:v[x],by:T[x]})}}return a},Fe.prototype.getAlternates=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,3),u=0;u<i.length;u++)for(var f=i[u].subtables,l=0;l<f.length;l++)for(var d=f[l],v=n.expandCoverage(d.coverage),x=d.alternateSets,g=0;g<v.length;g++)a.push({sub:v[g],by:x[g]});return a},Fe.prototype.getLigatures=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,4),u=0;u<i.length;u++)for(var f=i[u].subtables,l=0;l<f.length;l++)for(var d=f[l],v=n.expandCoverage(d.coverage),x=d.ligatureSets,g=0;g<v.length;g++)for(var y=v[g],T=x[g],w=0;w<T.length;w++){var E=T[w];a.push({sub:[y].concat(E.components),by:E.ligGlyph})}return a},Fe.prototype.addSingle=function(e,r,t,n){var a=this.getLookupTables(t,n,e,1,!0)[0],i=Qn(a,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});N.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var u=r.sub,f=this.binSearch(i.coverage.glyphs,u);f<0&&(f=-1-f,i.coverage.glyphs.splice(f,0,u),i.substitute.splice(f,0,0)),i.substitute[f]=r.by},Fe.prototype.addAlternate=function(e,r,t,n){var a=this.getLookupTables(t,n,e,3,!0)[0],i=Qn(a,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});N.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var u=r.sub,f=this.binSearch(i.coverage.glyphs,u);f<0&&(f=-1-f,i.coverage.glyphs.splice(f,0,u),i.alternateSets.splice(f,0,0)),i.alternateSets[f]=r.by},Fe.prototype.addLigature=function(e,r,t,n){var a=this.getLookupTables(t,n,e,4,!0)[0],i=a.subtables[0];i||(i={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},a.subtables[0]=i),N.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var u=r.sub[0],f=r.sub.slice(1),l={ligGlyph:r.by,components:f},d=this.binSearch(i.coverage.glyphs,u);if(d>=0){for(var v=i.ligatureSets[d],x=0;x<v.length;x++)if(Ki(v[x].components,f))return;v.push(l)}else d=-1-d,i.coverage.glyphs.splice(d,0,u),i.ligatureSets.splice(d,0,[l])},Fe.prototype.getFeature=function(e,r,t){if(/ss\d\d/.test(e))return this.getSingle(e,r,t);switch(e){case"aalt":case"salt":return this.getSingle(e,r,t).concat(this.getAlternates(e,r,t));case"dlig":case"liga":case"rlig":return this.getLigatures(e,r,t)}},Fe.prototype.add=function(e,r,t,n){if(/ss\d\d/.test(e))return this.addSingle(e,r,t,n);switch(e){case"aalt":case"salt":return typeof r.by=="number"?this.addSingle(e,r,t,n):this.addAlternate(e,r,t,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,r,t,n)}};function $i(){return typeof window<"u"}function Jn(e){for(var r=new ArrayBuffer(e.length),t=new Uint8Array(r),n=0;n<e.length;++n)t[n]=e[n];return r}function eo(e){for(var r=new Buffer(e.byteLength),t=new Uint8Array(e),n=0;n<r.length;++n)r[n]=t[n];return r}function $e(e,r){if(!e)throw r}var Kn,ze,$n,ct;function ea(e){this.font=e,this._fpgmState=this._prepState=void 0,this._errorState=0}function ro(e){return e}function ra(e){return Math.sign(e)*Math.round(Math.abs(e))}function to(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function no(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function ao(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function so(e){return Math.sign(e)*Math.floor(Math.abs(e))}var ta=function(e){var r=this.srPeriod,t=this.srPhase,n=this.srThreshold,a=1;return e<0&&(e=-e,a=-1),e+=n-t,e=Math.trunc(e/r)*r,e+=t,e<0?t*a:e*a},ke={x:1,y:0,axis:"x",distance:function(e,r,t,n){return(t?e.xo:e.x)-(n?r.xo:r.x)},interpolate:function(e,r,t,n){var a,i,u,f,l,d,v;if(!n||n===this){if(a=e.xo-r.xo,i=e.xo-t.xo,l=r.x-r.xo,d=t.x-t.xo,u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){e.x=e.xo+(l+d)/2;return}e.x=e.xo+(l*f+d*u)/v;return}if(a=n.distance(e,r,!0,!0),i=n.distance(e,t,!0,!0),l=n.distance(r,r,!1,!0),d=n.distance(t,t,!1,!0),u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){ke.setRelative(e,e,(l+d)/2,n,!0);return}ke.setRelative(e,e,(l*f+d*u)/v,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,r,t,n,a){if(!n||n===this){e.x=(a?r.xo:r.x)+t;return}var i=a?r.xo:r.x,u=a?r.yo:r.y,f=i+t*n.x,l=u+t*n.y;e.x=f+(e.y-l)/n.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},Ce={x:0,y:1,axis:"y",distance:function(e,r,t,n){return(t?e.yo:e.y)-(n?r.yo:r.y)},interpolate:function(e,r,t,n){var a,i,u,f,l,d,v;if(!n||n===this){if(a=e.yo-r.yo,i=e.yo-t.yo,l=r.y-r.yo,d=t.y-t.yo,u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){e.y=e.yo+(l+d)/2;return}e.y=e.yo+(l*f+d*u)/v;return}if(a=n.distance(e,r,!0,!0),i=n.distance(e,t,!0,!0),l=n.distance(r,r,!1,!0),d=n.distance(t,t,!1,!0),u=Math.abs(a),f=Math.abs(i),v=u+f,v===0){Ce.setRelative(e,e,(l+d)/2,n,!0);return}Ce.setRelative(e,e,(l*f+d*u)/v,n,!0)},normalSlope:0,setRelative:function(e,r,t,n,a){if(!n||n===this){e.y=(a?r.yo:r.y)+t;return}var i=a?r.xo:r.x,u=a?r.yo:r.y,f=i+t*n.x,l=u+t*n.y;e.y=l+n.normalSlope*(e.x-f)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(ke),Object.freeze(Ce);function fr(e,r){this.x=e,this.y=r,this.axis=void 0,this.slope=r/e,this.normalSlope=-e/r,Object.freeze(this)}fr.prototype.distance=function(e,r,t,n){return this.x*ke.distance(e,r,t,n)+this.y*Ce.distance(e,r,t,n)},fr.prototype.interpolate=function(e,r,t,n){var a,i,u,f,l,d,v;if(u=n.distance(e,r,!0,!0),f=n.distance(e,t,!0,!0),a=n.distance(r,r,!1,!0),i=n.distance(t,t,!1,!0),l=Math.abs(u),d=Math.abs(f),v=l+d,v===0){this.setRelative(e,e,(a+i)/2,n,!0);return}this.setRelative(e,e,(a*d+i*l)/v,n,!0)},fr.prototype.setRelative=function(e,r,t,n,a){n=n||this;var i=a?r.xo:r.x,u=a?r.yo:r.y,f=i+t*n.x,l=u+t*n.y,d=n.normalSlope,v=this.slope,x=e.x,g=e.y;e.x=(v*x-d*f+l-g)/(v-d),e.y=v*(e.x-x)+g},fr.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function cr(e,r){var t=Math.sqrt(e*e+r*r);return e/=t,r/=t,e===1&&r===0?ke:e===0&&r===1?Ce:new fr(e,r)}function Le(e,r,t,n){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(r*64)/64,this.lastPointOfContour=t,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Le.prototype.nextTouched=function(e){for(var r=this.nextPointOnContour;!e.touched(r)&&r!==this;)r=r.nextPointOnContour;return r},Le.prototype.prevTouched=function(e){for(var r=this.prevPointOnContour;!e.touched(r)&&r!==this;)r=r.prevPointOnContour;return r};var hr=Object.freeze(new Le(0,0)),io={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function De(e,r){switch(this.env=e,this.stack=[],this.prog=r,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=ke,this.round=ra}}ea.prototype.exec=function(e,r){if(typeof r!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var t=this.font,n=this._prepState;if(!n||n.ppem!==r){var a=this._fpgmState;if(!a){De.prototype=io,a=this._fpgmState=new De("fpgm",t.tables.fpgm),a.funcs=[],a.font=t,s.DEBUG&&(console.log("---EXEC FPGM---"),a.step=-1);try{ze(a)}catch(d){console.log("Hinting error in FPGM:"+d),this._errorState=3;return}}De.prototype=a,n=this._prepState=new De("prep",t.tables.prep),n.ppem=r;var i=t.tables.cvt;if(i)for(var u=n.cvt=new Array(i.length),f=r/t.unitsPerEm,l=0;l<i.length;l++)u[l]=i[l]*f;else n.cvt=[];s.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{ze(n)}catch(d){this._errorState<2&&console.log("Hinting error in PREP:"+d),this._errorState=2}}if(!(this._errorState>1))try{return $n(e,n)}catch(d){this._errorState<1&&(console.log("Hinting error:"+d),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}},$n=function(e,r){var t=r.ppem/r.font.unitsPerEm,n=t,a=e.components,i,u,f;if(De.prototype=r,!a)f=new De("glyf",e.instructions),s.DEBUG&&(console.log("---EXEC GLYPH---"),f.step=-1),ct(e,f,t,n),u=f.gZone;else{var l=r.font;u=[],i=[];for(var d=0;d<a.length;d++){var v=a[d],x=l.glyphs.get(v.glyphIndex);f=new De("glyf",x.instructions),s.DEBUG&&(console.log("---EXEC COMP "+d+"---"),f.step=-1),ct(x,f,t,n);for(var g=Math.round(v.dx*t),y=Math.round(v.dy*n),T=f.gZone,w=f.contours,E=0;E<T.length;E++){var O=T[E];O.xTouched=O.yTouched=!1,O.xo=O.x=O.x+g,O.yo=O.y=O.y+y}var G=u.length;u.push.apply(u,T);for(var C=0;C<w.length;C++)i.push(w[C]+G)}e.instructions&&!f.inhibitGridFit&&(f=new De("glyf",e.instructions),f.gZone=f.z0=f.z1=f.z2=u,f.contours=i,u.push(new Le(0,0),new Le(Math.round(e.advanceWidth*t),0)),s.DEBUG&&(console.log("---EXEC COMPOSITE---"),f.step=-1),ze(f),u.length-=2)}return u},ct=function(e,r,t,n){for(var a=e.points||[],i=a.length,u=r.gZone=r.z0=r.z1=r.z2=[],f=r.contours=[],l,d=0;d<i;d++)l=a[d],u[d]=new Le(l.x*t,l.y*n,l.lastPointOfContour,l.onCurve);for(var v,x,g=0;g<i;g++)l=u[g],v||(v=l,f.push(g)),l.lastPointOfContour?(l.nextPointOnContour=v,v.prevPointOnContour=l,v=void 0):(x=u[g+1],l.nextPointOnContour=x,x.prevPointOnContour=l);if(!r.inhibitGridFit){if(s.DEBUG){console.log("PROCESSING GLYPH",r.stack);for(var y=0;y<i;y++)console.log(y,u[y].x,u[y].y)}if(u.push(new Le(0,0),new Le(Math.round(e.advanceWidth*t),0)),ze(r),u.length-=2,s.DEBUG){console.log("FINISHED GLYPH",r.stack);for(var T=0;T<i;T++)console.log(T,u[T].x,u[T].y)}}},ze=function(e){var r=e.prog;if(r){var t=r.length,n;for(e.ip=0;e.ip<t;e.ip++){if(s.DEBUG&&e.step++,n=Kn[r[e.ip]],!n)throw new Error("unknown instruction: 0x"+Number(r[e.ip]).toString(16));n(e)}}};function Br(e){for(var r=e.tZone=new Array(e.gZone.length),t=0;t<r.length;t++)r[t]=new Le(0,0)}function na(e,r){var t=e.prog,n=e.ip,a=1,i;do if(i=t[++n],i===88)a++;else if(i===89)a--;else if(i===64)n+=t[n+1]+1;else if(i===65)n+=2*t[n+1]+1;else if(i>=176&&i<=183)n+=i-176+1;else if(i>=184&&i<=191)n+=(i-184+1)*2;else if(r&&a===1&&i===27)break;while(a>0);e.ip=n}function aa(e,r){s.DEBUG&&console.log(r.step,"SVTCA["+e.axis+"]"),r.fv=r.pv=r.dpv=e}function sa(e,r){s.DEBUG&&console.log(r.step,"SPVTCA["+e.axis+"]"),r.pv=r.dpv=e}function ia(e,r){s.DEBUG&&console.log(r.step,"SFVTCA["+e.axis+"]"),r.fv=e}function oa(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],u=r.z1[a];s.DEBUG&&console.log("SPVTL["+e+"]",n,a);var f,l;e?(f=i.y-u.y,l=u.x-i.x):(f=u.x-i.x,l=u.y-i.y),r.pv=r.dpv=cr(f,l)}function ua(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],u=r.z1[a];s.DEBUG&&console.log("SFVTL["+e+"]",n,a);var f,l;e?(f=i.y-u.y,l=u.x-i.x):(f=u.x-i.x,l=u.y-i.y),r.fv=cr(f,l)}function oo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SPVFS[]",t,n),e.pv=e.dpv=cr(n,t)}function uo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SPVFS[]",t,n),e.fv=cr(n,t)}function lo(e){var r=e.stack,t=e.pv;s.DEBUG&&console.log(e.step,"GPV[]"),r.push(t.x*16384),r.push(t.y*16384)}function fo(e){var r=e.stack,t=e.fv;s.DEBUG&&console.log(e.step,"GFV[]"),r.push(t.x*16384),r.push(t.y*16384)}function co(e){e.fv=e.pv,s.DEBUG&&console.log(e.step,"SFVTPV[]")}function ho(e){var r=e.stack,t=r.pop(),n=r.pop(),a=r.pop(),i=r.pop(),u=r.pop(),f=e.z0,l=e.z1,d=f[t],v=f[n],x=l[a],g=l[i],y=e.z2[u];s.DEBUG&&console.log("ISECT[], ",t,n,a,i,u);var T=d.x,w=d.y,E=v.x,O=v.y,G=x.x,C=x.y,_=g.x,R=g.y,M=(T-E)*(C-R)-(w-O)*(G-_),ce=T*O-w*E,Y=G*R-C*_;y.x=(ce*(G-_)-Y*(T-E))/M,y.y=(ce*(C-R)-Y*(w-O))/M}function po(e){e.rp0=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)}function vo(e){e.rp1=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)}function go(e){e.rp2=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)}function mo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP0[]",r),e.zp0=r,r){case 0:e.tZone||Br(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function yo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP1[]",r),e.zp1=r,r){case 0:e.tZone||Br(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function xo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP2[]",r),e.zp2=r,r){case 0:e.tZone||Br(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function bo(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZPS[]",r),e.zp0=e.zp1=e.zp2=r,r){case 0:e.tZone||Br(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function So(e){e.loop=e.stack.pop(),s.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)}function Fo(e){s.DEBUG&&console.log(e.step,"RTG[]"),e.round=ra}function To(e){s.DEBUG&&console.log(e.step,"RTHG[]"),e.round=no}function Uo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SMD[]",r),e.minDis=r/64}function Eo(e){s.DEBUG&&console.log(e.step,"ELSE[]"),na(e,!1)}function ko(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"JMPR[]",r),e.ip+=r-1}function Oo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCVTCI[]",r),e.cvCutIn=r/64}function wo(e){var r=e.stack;s.DEBUG&&console.log(e.step,"DUP[]"),r.push(r[r.length-1])}function ht(e){s.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function Co(e){s.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0}function Lo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SWAP[]"),r.push(t),r.push(n)}function Io(e){var r=e.stack;s.DEBUG&&console.log(e.step,"DEPTH[]"),r.push(r.length)}function Ao(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LOOPCALL[]",t,n);var a=e.ip,i=e.prog;e.prog=e.funcs[t];for(var u=0;u<n;u++)ze(e),s.DEBUG&&console.log(++e.step,u+1<n?"next loopcall":"done loopcall",u);e.ip=a,e.prog=i}function Bo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"CALL[]",r);var t=e.ip,n=e.prog;e.prog=e.funcs[r],ze(e),e.ip=t,e.prog=n,s.DEBUG&&console.log(++e.step,"returning from",r)}function Ro(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"CINDEX[]",t),r.push(r[r.length-t])}function Do(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"MINDEX[]",t),r.push(r.splice(r.length-t,1)[0])}function Po(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");var r=e.stack,t=e.prog,n=e.ip,a=r.pop(),i=n;for(s.DEBUG&&console.log(e.step,"FDEF[]",a);t[++n]!==45;);e.ip=n,e.funcs[a]=t.slice(i+1,n)}function la(e,r){var t=r.stack.pop(),n=r.z0[t],a=r.fv,i=r.pv;s.DEBUG&&console.log(r.step,"MDAP["+e+"]",t);var u=i.distance(n,hr);e&&(u=r.round(u)),a.setRelative(n,hr,u,i),a.touch(n),r.rp0=r.rp1=t}function fa(e,r){var t=r.z2,n=t.length-2,a,i,u;s.DEBUG&&console.log(r.step,"IUP["+e.axis+"]");for(var f=0;f<n;f++)a=t[f],!e.touched(a)&&(i=a.prevTouched(e),i!==a&&(u=a.nextTouched(e),i===u&&e.setRelative(a,a,e.distance(i,i,!1,!0),e,!0),e.interpolate(a,i,u,e)))}function ca(e,r){for(var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,u=r.pv,f=r.loop,l=r.z2;f--;){var d=t.pop(),v=l[d],x=u.distance(a,a,!1,!0);i.setRelative(v,v,x,u),i.touch(v),s.DEBUG&&console.log(r.step,(r.loop>1?"loop "+(r.loop-f)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",d)}r.loop=1}function ha(e,r){var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,u=r.pv,f=t.pop(),l=r.z2[r.contours[f]],d=l;s.DEBUG&&console.log(r.step,"SHC["+e+"]",f);var v=u.distance(a,a,!1,!0);do d!==a&&i.setRelative(d,d,v,u),d=d.nextPointOnContour;while(d!==l)}function pa(e,r){var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,u=r.pv,f=t.pop();s.DEBUG&&console.log(r.step,"SHZ["+e+"]",f);var l;switch(f){case 0:l=r.tZone;break;case 1:l=r.gZone;break;default:throw new Error("Invalid zone")}for(var d,v=u.distance(a,a,!1,!0),x=l.length-2,g=0;g<x;g++)d=l[g],i.setRelative(d,d,v,u)}function Mo(e){for(var r=e.stack,t=e.loop,n=e.fv,a=r.pop()/64,i=e.z2;t--;){var u=r.pop(),f=i[u];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-t)+": ":"")+"SHPIX[]",u,a),n.setRelative(f,f,a),n.touch(f)}e.loop=1}function Go(e){for(var r=e.stack,t=e.rp1,n=e.rp2,a=e.loop,i=e.z0[t],u=e.z1[n],f=e.fv,l=e.dpv,d=e.z2;a--;){var v=r.pop(),x=d[v];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"IP[]",v,t,"<->",n),f.interpolate(x,i,u,l),f.touch(x)}e.loop=1}function da(e,r){var t=r.stack,n=t.pop()/64,a=t.pop(),i=r.z1[a],u=r.z0[r.rp0],f=r.fv,l=r.pv;f.setRelative(i,u,n,l),f.touch(i),s.DEBUG&&console.log(r.step,"MSIRP["+e+"]",n,a),r.rp1=r.rp0,r.rp2=a,e&&(r.rp0=a)}function No(e){for(var r=e.stack,t=e.rp0,n=e.z0[t],a=e.loop,i=e.fv,u=e.pv,f=e.z1;a--;){var l=r.pop(),d=f[l];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"ALIGNRP[]",l),i.setRelative(d,n,0,u),i.touch(d)}e.loop=1}function _o(e){s.DEBUG&&console.log(e.step,"RTDG[]"),e.round=to}function va(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z0[a],u=r.fv,f=r.pv,l=r.cvt[n];s.DEBUG&&console.log(r.step,"MIAP["+e+"]",n,"(",l,")",a);var d=f.distance(i,hr);e&&(Math.abs(d-l)<r.cvCutIn&&(d=l),d=r.round(d)),u.setRelative(i,hr,d,f),r.zp0===0&&(i.xo=i.x,i.yo=i.y),u.touch(i),r.rp0=r.rp1=a}function Ho(e){var r=e.prog,t=e.ip,n=e.stack,a=r[++t];s.DEBUG&&console.log(e.step,"NPUSHB[]",a);for(var i=0;i<a;i++)n.push(r[++t]);e.ip=t}function zo(e){var r=e.ip,t=e.prog,n=e.stack,a=t[++r];s.DEBUG&&console.log(e.step,"NPUSHW[]",a);for(var i=0;i<a;i++){var u=t[++r]<<8|t[++r];u&32768&&(u=-((u^65535)+1)),n.push(u)}e.ip=r}function qo(e){var r=e.stack,t=e.store;t||(t=e.store=[]);var n=r.pop(),a=r.pop();s.DEBUG&&console.log(e.step,"WS",n,a),t[a]=n}function Wo(e){var r=e.stack,t=e.store,n=r.pop();s.DEBUG&&console.log(e.step,"RS",n);var a=t&&t[n]||0;r.push(a)}function Vo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"WCVTP",t,n),e.cvt[n]=t/64}function Xo(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"RCVT",t),r.push(e.cvt[t]*64)}function ga(e,r){var t=r.stack,n=t.pop(),a=r.z2[n];s.DEBUG&&console.log(r.step,"GC["+e+"]",n),t.push(r.dpv.distance(a,hr,e,!1)*64)}function ma(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z1[n],u=r.z0[a],f=r.dpv.distance(u,i,e,e);s.DEBUG&&console.log(r.step,"MD["+e+"]",n,a,"->",f),r.stack.push(Math.round(f*64))}function Yo(e){s.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)}function jo(e){s.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0}function Zo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LT[]",t,n),r.push(n<t?1:0)}function Qo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LTEQ[]",t,n),r.push(n<=t?1:0)}function Jo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"GT[]",t,n),r.push(n>t?1:0)}function Ko(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"GTEQ[]",t,n),r.push(n>=t?1:0)}function $o(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"EQ[]",t,n),r.push(t===n?1:0)}function eu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"NEQ[]",t,n),r.push(t!==n?1:0)}function ru(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"ODD[]",t),r.push(Math.trunc(t)%2?1:0)}function tu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"EVEN[]",t),r.push(Math.trunc(t)%2?0:1)}function nu(e){var r=e.stack.pop(),t;s.DEBUG&&console.log(e.step,"IF[]",r),r||(na(e,!0),s.DEBUG&&console.log(e.step,t===27?"ELSE[]":"EIF[]"))}function au(e){s.DEBUG&&console.log(e.step,"EIF[]")}function su(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"AND[]",t,n),r.push(t&&n?1:0)}function iu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"OR[]",t,n),r.push(t||n?1:0)}function ou(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"NOT[]",t),r.push(t?0:1)}function pt(e,r){var t=r.stack,n=t.pop(),a=r.fv,i=r.pv,u=r.ppem,f=r.deltaBase+(e-1)*16,l=r.deltaShift,d=r.z0;s.DEBUG&&console.log(r.step,"DELTAP["+e+"]",n,t);for(var v=0;v<n;v++){var x=t.pop(),g=t.pop(),y=f+((g&240)>>4);if(y===u){var T=(g&15)-8;T>=0&&T++,s.DEBUG&&console.log(r.step,"DELTAPFIX",x,"by",T*l);var w=d[x];a.setRelative(w,w,T*l,i)}}}function uu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t}function lu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)}function fu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"ADD[]",t,n),r.push(n+t)}function cu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SUB[]",t,n),r.push(n-t)}function hu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"DIV[]",t,n),r.push(n*64/t)}function pu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MUL[]",t,n),r.push(n*t/64)}function du(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"ABS[]",t),r.push(Math.abs(t))}function vu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"NEG[]",t),r.push(-t)}function gu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"FLOOR[]",t),r.push(Math.floor(t/64)*64)}function mu(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"CEILING[]",t),r.push(Math.ceil(t/64)*64)}function Rr(e,r){var t=r.stack,n=t.pop();s.DEBUG&&console.log(r.step,"ROUND[]"),t.push(r.round(n/64)*64)}function yu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"WCVTF[]",t,n),e.cvt[n]=t*e.ppem/e.font.unitsPerEm}function dt(e,r){var t=r.stack,n=t.pop(),a=r.ppem,i=r.deltaBase+(e-1)*16,u=r.deltaShift;s.DEBUG&&console.log(r.step,"DELTAC["+e+"]",n,t);for(var f=0;f<n;f++){var l=t.pop(),d=t.pop(),v=i+((d&240)>>4);if(v===a){var x=(d&15)-8;x>=0&&x++;var g=x*u;s.DEBUG&&console.log(r.step,"DELTACFIX",l,"by",g),r.cvt[l]+=g}}}function xu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SROUND[]",r),e.round=ta;var t;switch(r&192){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,r&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}r&=15,r===0?e.srThreshold=0:e.srThreshold=(r/8-.5)*t}function bu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"S45ROUND[]",r),e.round=ta;var t;switch(r&192){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,r&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}r&=15,r===0?e.srThreshold=0:e.srThreshold=(r/8-.5)*t}function Su(e){s.DEBUG&&console.log(e.step,"ROFF[]"),e.round=ro}function Fu(e){s.DEBUG&&console.log(e.step,"RUTG[]"),e.round=ao}function Tu(e){s.DEBUG&&console.log(e.step,"RDTG[]"),e.round=so}function Uu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCANCTRL[]",r)}function ya(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],u=r.z1[a];s.DEBUG&&console.log(r.step,"SDPVTL["+e+"]",n,a);var f,l;e?(f=i.y-u.y,l=u.x-i.x):(f=u.x-i.x,l=u.y-i.y),r.dpv=cr(f,l)}function Eu(e){var r=e.stack,t=r.pop(),n=0;s.DEBUG&&console.log(e.step,"GETINFO[]",t),t&1&&(n=35),t&32&&(n|=4096),r.push(n)}function ku(e){var r=e.stack,t=r.pop(),n=r.pop(),a=r.pop();s.DEBUG&&console.log(e.step,"ROLL[]"),r.push(n),r.push(t),r.push(a)}function Ou(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MAX[]",t,n),r.push(Math.max(n,t))}function wu(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MIN[]",t,n),r.push(Math.min(n,t))}function Cu(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCANTYPE[]",r)}function Lu(e){var r=e.stack.pop(),t=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"INSTCTRL[]",r,t),r){case 1:e.inhibitGridFit=!!t;return;case 2:e.ignoreCvt=!!t;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Pe(e,r){var t=r.stack,n=r.prog,a=r.ip;s.DEBUG&&console.log(r.step,"PUSHB["+e+"]");for(var i=0;i<e;i++)t.push(n[++a]);r.ip=a}function Me(e,r){var t=r.ip,n=r.prog,a=r.stack;s.DEBUG&&console.log(r.ip,"PUSHW["+e+"]");for(var i=0;i<e;i++){var u=n[++t]<<8|n[++t];u&32768&&(u=-((u^65535)+1)),a.push(u)}r.ip=t}function L(e,r,t,n,a,i){var u=i.stack,f=e&&u.pop(),l=u.pop(),d=i.rp0,v=i.z0[d],x=i.z1[l],g=i.minDis,y=i.fv,T=i.dpv,w,E,O,G;E=w=T.distance(x,v,!0,!0),O=E>=0?1:-1,E=Math.abs(E),e&&(G=i.cvt[f],n&&Math.abs(E-G)<i.cvCutIn&&(E=G)),t&&E<g&&(E=g),n&&(E=i.round(E)),y.setRelative(x,v,O*E,T),y.touch(x),s.DEBUG&&console.log(i.step,(e?"MIRP[":"MDRP[")+(r?"M":"m")+(t?">":"_")+(n?"R":"_")+(a===0?"Gr":a===1?"Bl":a===2?"Wh":"")+"]",e?f+"("+i.cvt[f]+","+G+")":"",l,"(d =",w,"->",O*E,")"),i.rp1=i.rp0,i.rp2=l,r&&(i.rp0=l)}Kn=[aa.bind(void 0,Ce),aa.bind(void 0,ke),sa.bind(void 0,Ce),sa.bind(void 0,ke),ia.bind(void 0,Ce),ia.bind(void 0,ke),oa.bind(void 0,0),oa.bind(void 0,1),ua.bind(void 0,0),ua.bind(void 0,1),oo,uo,lo,fo,co,ho,po,vo,go,mo,yo,xo,bo,So,Fo,To,Uo,Eo,ko,Oo,void 0,void 0,wo,ht,Co,Lo,Io,Ro,Do,void 0,void 0,void 0,Ao,Bo,Po,void 0,la.bind(void 0,0),la.bind(void 0,1),fa.bind(void 0,Ce),fa.bind(void 0,ke),ca.bind(void 0,0),ca.bind(void 0,1),ha.bind(void 0,0),ha.bind(void 0,1),pa.bind(void 0,0),pa.bind(void 0,1),Mo,Go,da.bind(void 0,0),da.bind(void 0,1),No,_o,va.bind(void 0,0),va.bind(void 0,1),Ho,zo,qo,Wo,Vo,Xo,ga.bind(void 0,0),ga.bind(void 0,1),void 0,ma.bind(void 0,0),ma.bind(void 0,1),Yo,void 0,jo,void 0,void 0,Zo,Qo,Jo,Ko,$o,eu,ru,tu,nu,au,su,iu,ou,pt.bind(void 0,1),uu,lu,fu,cu,hu,pu,du,vu,gu,mu,Rr.bind(void 0,0),Rr.bind(void 0,1),Rr.bind(void 0,2),Rr.bind(void 0,3),void 0,void 0,void 0,void 0,yu,pt.bind(void 0,2),pt.bind(void 0,3),dt.bind(void 0,1),dt.bind(void 0,2),dt.bind(void 0,3),xu,bu,void 0,void 0,Su,void 0,Fu,Tu,ht,ht,void 0,void 0,void 0,void 0,void 0,Uu,ya.bind(void 0,0),ya.bind(void 0,1),Eu,void 0,ku,Ou,wu,Cu,Lu,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,Pe.bind(void 0,1),Pe.bind(void 0,2),Pe.bind(void 0,3),Pe.bind(void 0,4),Pe.bind(void 0,5),Pe.bind(void 0,6),Pe.bind(void 0,7),Pe.bind(void 0,8),Me.bind(void 0,1),Me.bind(void 0,2),Me.bind(void 0,3),Me.bind(void 0,4),Me.bind(void 0,5),Me.bind(void 0,6),Me.bind(void 0,7),Me.bind(void 0,8),L.bind(void 0,0,0,0,0,0),L.bind(void 0,0,0,0,0,1),L.bind(void 0,0,0,0,0,2),L.bind(void 0,0,0,0,0,3),L.bind(void 0,0,0,0,1,0),L.bind(void 0,0,0,0,1,1),L.bind(void 0,0,0,0,1,2),L.bind(void 0,0,0,0,1,3),L.bind(void 0,0,0,1,0,0),L.bind(void 0,0,0,1,0,1),L.bind(void 0,0,0,1,0,2),L.bind(void 0,0,0,1,0,3),L.bind(void 0,0,0,1,1,0),L.bind(void 0,0,0,1,1,1),L.bind(void 0,0,0,1,1,2),L.bind(void 0,0,0,1,1,3),L.bind(void 0,0,1,0,0,0),L.bind(void 0,0,1,0,0,1),L.bind(void 0,0,1,0,0,2),L.bind(void 0,0,1,0,0,3),L.bind(void 0,0,1,0,1,0),L.bind(void 0,0,1,0,1,1),L.bind(void 0,0,1,0,1,2),L.bind(void 0,0,1,0,1,3),L.bind(void 0,0,1,1,0,0),L.bind(void 0,0,1,1,0,1),L.bind(void 0,0,1,1,0,2),L.bind(void 0,0,1,1,0,3),L.bind(void 0,0,1,1,1,0),L.bind(void 0,0,1,1,1,1),L.bind(void 0,0,1,1,1,2),L.bind(void 0,0,1,1,1,3),L.bind(void 0,1,0,0,0,0),L.bind(void 0,1,0,0,0,1),L.bind(void 0,1,0,0,0,2),L.bind(void 0,1,0,0,0,3),L.bind(void 0,1,0,0,1,0),L.bind(void 0,1,0,0,1,1),L.bind(void 0,1,0,0,1,2),L.bind(void 0,1,0,0,1,3),L.bind(void 0,1,0,1,0,0),L.bind(void 0,1,0,1,0,1),L.bind(void 0,1,0,1,0,2),L.bind(void 0,1,0,1,0,3),L.bind(void 0,1,0,1,1,0),L.bind(void 0,1,0,1,1,1),L.bind(void 0,1,0,1,1,2),L.bind(void 0,1,0,1,1,3),L.bind(void 0,1,1,0,0,0),L.bind(void 0,1,1,0,0,1),L.bind(void 0,1,1,0,0,2),L.bind(void 0,1,1,0,0,3),L.bind(void 0,1,1,0,1,0),L.bind(void 0,1,1,0,1,1),L.bind(void 0,1,1,0,1,2),L.bind(void 0,1,1,0,1,3),L.bind(void 0,1,1,1,0,0),L.bind(void 0,1,1,1,0,1),L.bind(void 0,1,1,1,0,2),L.bind(void 0,1,1,1,0,3),L.bind(void 0,1,1,1,1,0),L.bind(void 0,1,1,1,1,1),L.bind(void 0,1,1,1,1,2),L.bind(void 0,1,1,1,1,3)];function V(e){e=e||{},e.empty||($e(e.familyName,"When creating a new Font object, familyName is required."),$e(e.styleName,"When creating a new Font object, styleName is required."),$e(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),$e(e.ascender,"When creating a new Font object, ascender is required."),$e(e.descender,"When creating a new Font object, descender is required."),$e(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||e.familyName+e.styleName},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Je.GlyphSet(this,e.glyphs||[]),this.encoding=new hn(this),this.position=new Ar(this),this.substitution=new Fe(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new ea(this)}})}V.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)!==null},V.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},V.prototype.charToGlyph=function(e){var r=this.charToGlyphIndex(e),t=this.glyphs.get(r);return t||(t=this.glyphs.get(0)),t},V.prototype.stringToGlyphs=function(e,r){var t=this;r=r||this.defaultRenderOptions;for(var n=[],a=0;a<e.length;a+=1){var i=e[a];n.push(t.charToGlyphIndex(i))}var u=n.length;if(r.features){var f=r.script||this.substitution.getDefaultScriptName(),l=[];r.features.liga&&(l=l.concat(this.substitution.getFeature("liga",f,r.language))),r.features.rlig&&(l=l.concat(this.substitution.getFeature("rlig",f,r.language)));for(var d=0;d<u;d+=1)for(var v=0;v<l.length;v++){for(var x=l[v],g=x.sub,y=g.length,T=0;T<y&&g[T]===n[d+T];)T++;T===y&&(n.splice(d,y,x.by),u=u-y+1)}}for(var w=new Array(u),E=this.glyphs.get(0),O=0;O<u;O+=1)w[O]=t.glyphs.get(n[O])||E;return w},V.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},V.prototype.nameToGlyph=function(e){var r=this.nameToGlyphIndex(e),t=this.glyphs.get(r);return t||(t=this.glyphs.get(0)),t},V.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},V.prototype.getKerningValue=function(e,r){return e=e.index||e,r=r.index||r,this.kerningPairs[e+","+r]||0},V.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},V.prototype.forEachGlyph=function(e,r,t,n,a,i){var u=this;r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:72,a=a||this.defaultRenderOptions;var f=1/this.unitsPerEm*n,l=this.stringToGlyphs(e,a),d;if(a.kerning){var v=a.script||this.position.getDefaultScriptName();d=this.position.getKerningTables(v,a.language)}for(var x=0;x<l.length;x+=1){var g=l[x];if(i.call(u,g,r,t,n,a),g.advanceWidth&&(r+=g.advanceWidth*f),a.kerning&&x<l.length-1){var y=d?u.position.getKerningValue(d,g.index,l[x+1].index):u.getKerningValue(g,l[x+1]);r+=y*f}a.letterSpacing?r+=a.letterSpacing*n:a.tracking&&(r+=a.tracking/1e3*n)}return r},V.prototype.getPath=function(e,r,t,n,a){var i=new Q;return this.forEachGlyph(e,r,t,n,a,function(u,f,l,d){var v=u.getPath(f,l,d,a,this);i.extend(v)}),i},V.prototype.getPaths=function(e,r,t,n,a){var i=[];return this.forEachGlyph(e,r,t,n,a,function(u,f,l,d){var v=u.getPath(f,l,d,a,this);i.push(v)}),i},V.prototype.getAdvanceWidth=function(e,r,t){return this.forEachGlyph(e,0,0,r,t,function(){})},V.prototype.draw=function(e,r,t,n,a,i){this.getPath(r,t,n,a,i).draw(e)},V.prototype.drawPoints=function(e,r,t,n,a,i){this.forEachGlyph(r,t,n,a,i,function(u,f,l,d){u.drawPoints(e,f,l,d)})},V.prototype.drawMetrics=function(e,r,t,n,a,i){this.forEachGlyph(r,t,n,a,i,function(u,f,l,d){u.drawMetrics(e,f,l,d)})},V.prototype.getEnglishName=function(e){var r=this.names[e];if(r)return r.en},V.prototype.validate=function(){var e=[],r=this;function t(a,i){a||e.push(i)}function n(a){var i=r.getEnglishName(a);t(i&&i.trim().length>0,"No English "+a+" specified.")}n("fontFamily"),n("weightName"),n("manufacturer"),n("copyright"),n("version"),t(this.unitsPerEm>0,"No unitsPerEm specified.")},V.prototype.toTables=function(){return Ji.fontToTable(this)},V.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},V.prototype.toArrayBuffer=function(){for(var e=this.toTables(),r=e.encode(),t=new ArrayBuffer(r.length),n=new Uint8Array(t),a=0;a<r.length;a++)n[a]=r[a];return t},V.prototype.download=function(e){var r=this.getEnglishName("fontFamily"),t=this.getEnglishName("fontSubfamily");e=e||r.replace(/\s/g,"")+"-"+t+".otf";var n=this.toArrayBuffer();if($i())window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,n.byteLength,function(u){u.root.getFile(e,{create:!0},function(f){f.createWriter(function(l){var d=new DataView(n),v=new Blob([d],{type:"font/opentype"});l.write(v),l.addEventListener("writeend",function(){location.href=f.toURL()},!1)})})},function(u){throw new Error(u.name+": "+u.message)});else{var a=me("fs"),i=eo(n);a.writeFileSync(e,i)}},V.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},V.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},V.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function xa(e,r){var t=JSON.stringify(e),n=256;for(var a in r){var i=parseInt(a);if(!(!i||i<256)){if(JSON.stringify(r[a])===t)return i;n<=i&&(n=i+1)}}return r[n]=e,n}function Iu(e,r,t){var n=xa(r.name,t);return[{name:"tag_"+e,type:"TAG",value:r.tag},{name:"minValue_"+e,type:"FIXED",value:r.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:r.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:r.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:n}]}function Au(e,r,t){var n={},a=new A.Parser(e,r);return n.tag=a.parseTag(),n.minValue=a.parseFixed(),n.defaultValue=a.parseFixed(),n.maxValue=a.parseFixed(),a.skip("uShort",1),n.name=t[a.parseUShort()]||{},n}function Bu(e,r,t,n){for(var a=xa(r.name,n),i=[{name:"nameID_"+e,type:"USHORT",value:a},{name:"flags_"+e,type:"USHORT",value:0}],u=0;u<t.length;++u){var f=t[u].tag;i.push({name:"axis_"+e+" "+f,type:"FIXED",value:r.coordinates[f]<<16})}return i}function Ru(e,r,t,n){var a={},i=new A.Parser(e,r);a.name=n[i.parseUShort()]||{},i.skip("uShort",1),a.coordinates={};for(var u=0;u<t.length;++u)a.coordinates[t[u].tag]=i.parseFixed();return a}function Du(e,r){var t=new D.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+e.axes.length*4}]);t.offsetToData=t.sizeOf();for(var n=0;n<e.axes.length;n++)t.fields=t.fields.concat(Iu(n,e.axes[n],r));for(var a=0;a<e.instances.length;a++)t.fields=t.fields.concat(Bu(a,e.instances[a],e.axes,r));return t}function Pu(e,r,t){var n=new A.Parser(e,r),a=n.parseULong();N.argument(a===65536,"Unsupported fvar table version.");var i=n.parseOffset16();n.skip("uShort",1);for(var u=n.parseUShort(),f=n.parseUShort(),l=n.parseUShort(),d=n.parseUShort(),v=[],x=0;x<u;x++)v.push(Au(e,r+i+x*f,t));for(var g=[],y=r+i+u*f,T=0;T<l;T++)g.push(Ru(e,y+T*d,v,t));return{axes:v,instances:g}}var Mu={make:Du,parse:Pu},Te=new Array(10);Te[1]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(S.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(S.coverage),values:this.parseValueRecordList()};N.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Te[2]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parsePointer(S.coverage),a=this.parseUShort(),i=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:a,valueFormat2:i,pairSets:this.parseList(S.pointer(S.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(a),value2:this.parseValueRecord(i)}})))};if(t===2){var u=this.parsePointer(S.classDef),f=this.parsePointer(S.classDef),l=this.parseUShort(),d=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:a,valueFormat2:i,classDef1:u,classDef2:f,class1Count:l,class2Count:d,classRecords:this.parseList(l,S.list(d,function(){return{value1:this.parseValueRecord(a),value2:this.parseValueRecord(i)}}))}}N.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 2 format must be 1 or 2.")},Te[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Te[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Te[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Te[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Te[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Te[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Te[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function Gu(e,r){r=r||0;var t=new S(e,r),n=t.parseVersion(1);return N.argument(n===1||n===1.1,"Unsupported GPOS table version "+n),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Te)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(Te),variations:t.parseFeatureVariationsList()}}var Nu=new Array(10);function _u(e){return new D.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new D.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new D.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new D.LookupList(e.lookups,Nu)}])}var Hu={parse:Gu,make:_u};function zu(e){var r={};e.skip("uShort");var t=e.parseUShort();N.argument(t===0,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var a=0;a<n;a+=1){var i=e.parseUShort(),u=e.parseUShort(),f=e.parseShort();r[i+","+u]=f}return r}function qu(e){var r={};e.skip("uShort");var t=e.parseULong();t>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var n=e.parseUShort(),a=n&255;if(e.skip("uShort"),a===0){var i=e.parseUShort();e.skip("uShort",3);for(var u=0;u<i;u+=1){var f=e.parseUShort(),l=e.parseUShort(),d=e.parseShort();r[f+","+l]=d}}return r}function Wu(e,r){var t=new A.Parser(e,r),n=t.parseUShort();if(n===0)return zu(t);if(n===1)return qu(t);throw new Error("Unsupported kern table version ("+n+").")}var Vu={parse:Wu};function Xu(e,r,t,n){for(var a=new A.Parser(e,r),i=n?a.parseUShort:a.parseULong,u=[],f=0;f<t+1;f+=1){var l=i.call(a);n&&(l*=2),u.push(l)}return u}var Yu={parse:Xu};function ju(e,r){var t=me("fs");t.readFile(e,function(n,a){if(n)return r(n.message);r(null,Jn(a))})}function Zu(e,r){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.onload=function(){return t.response?r(null,t.response):r("Font could not be loaded: "+t.statusText)},t.onerror=function(){r("Font could not be loaded")},t.send()}function ba(e,r){for(var t=[],n=12,a=0;a<r;a+=1){var i=A.getTag(e,n),u=A.getULong(e,n+4),f=A.getULong(e,n+8),l=A.getULong(e,n+12);t.push({tag:i,checksum:u,offset:f,length:l,compression:!1}),n+=16}return t}function Qu(e,r){for(var t=[],n=44,a=0;a<r;a+=1){var i=A.getTag(e,n),u=A.getULong(e,n+4),f=A.getULong(e,n+8),l=A.getULong(e,n+12),d=void 0;f<l?d="WOFF":d=!1,t.push({tag:i,offset:u,compression:d,compressedLength:f,length:l}),n+=20}return t}function J(e,r){if(r.compression==="WOFF"){var t=new Uint8Array(e.buffer,r.offset+2,r.compressedLength-2),n=new Uint8Array(r.length);if(Cs(t,n),n.byteLength!==r.length)throw new Error("Decompression error: "+r.tag+" decompressed length doesn't match recorded length");var a=new DataView(n.buffer,0);return{data:a,offset:0}}else return{data:e,offset:r.offset}}function vt(e){var r,t,n=new V({empty:!0}),a=new DataView(e,0),i,u=[],f=A.getTag(a,0);if(f==="\0\0\0"||f==="true"||f==="typ1")n.outlinesFormat="truetype",i=A.getUShort(a,4),u=ba(a,i);else if(f==="OTTO")n.outlinesFormat="cff",i=A.getUShort(a,4),u=ba(a,i);else if(f==="wOFF"){var l=A.getTag(a,4);if(l==="\0\0\0")n.outlinesFormat="truetype";else if(l==="OTTO")n.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+f);i=A.getUShort(a,12),u=Qu(a,i)}else throw new Error("Unsupported OpenType signature "+f);for(var d,v,x,g,y,T,w,E,O,G,C,_=0;_<i;_+=1){var R=u[_],M=void 0;switch(R.tag){case"cmap":M=J(a,R),n.tables.cmap=cn.parse(M.data,M.offset),n.encoding=new pn(n.tables.cmap);break;case"cvt ":M=J(a,R),C=new A.Parser(M.data,M.offset),n.tables.cvt=C.parseShortList(R.length/2);break;case"fvar":v=R;break;case"fpgm":M=J(a,R),C=new A.Parser(M.data,M.offset),n.tables.fpgm=C.parseByteList(R.length);break;case"head":M=J(a,R),n.tables.head=Cn.parse(M.data,M.offset),n.unitsPerEm=n.tables.head.unitsPerEm,r=n.tables.head.indexToLocFormat;break;case"hhea":M=J(a,R),n.tables.hhea=Ln.parse(M.data,M.offset),n.ascender=n.tables.hhea.ascender,n.descender=n.tables.hhea.descender,n.numberOfHMetrics=n.tables.hhea.numberOfHMetrics;break;case"hmtx":T=R;break;case"ltag":M=J(a,R),t=An.parse(M.data,M.offset);break;case"maxp":M=J(a,R),n.tables.maxp=Bn.parse(M.data,M.offset),n.numGlyphs=n.tables.maxp.numGlyphs;break;case"name":O=R;break;case"OS/2":M=J(a,R),n.tables.os2=ut.parse(M.data,M.offset);break;case"post":M=J(a,R),n.tables.post=Hn.parse(M.data,M.offset),n.glyphNames=new rt(n.tables.post);break;case"prep":M=J(a,R),C=new A.Parser(M.data,M.offset),n.tables.prep=C.parseByteList(R.length);break;case"glyf":x=R;break;case"loca":E=R;break;case"CFF ":d=R;break;case"kern":w=R;break;case"GPOS":g=R;break;case"GSUB":y=R;break;case"meta":G=R;break}}var ce=J(a,O);if(n.tables.name=_n.parse(ce.data,ce.offset,t),n.names=n.tables.name,x&&E){var Y=r===0,$=J(a,E),le=Yu.parse($.data,$.offset,n.numGlyphs,Y),he=J(a,x);n.glyphs=gn.parse(he.data,he.offset,le,n)}else if(d){var de=J(a,d);wn.parse(de.data,de.offset,n)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var ge=J(a,T);if(In.parse(ge.data,ge.offset,n.numberOfHMetrics,n.numGlyphs,n.glyphs),js(n),w){var K=J(a,w);n.kerningPairs=Vu.parse(K.data,K.offset)}else n.kerningPairs={};if(g){var ee=J(a,g);n.tables.gpos=Hu.parse(ee.data,ee.offset)}if(y){var ne=J(a,y);n.tables.gsub=zn.parse(ne.data,ne.offset)}if(v){var ae=J(a,v);n.tables.fvar=Mu.parse(ae.data,ae.offset,n.names)}if(G){var se=J(a,G);n.tables.meta=qn.parse(se.data,se.offset),n.metas=n.tables.meta}return n}function Ju(e,r){var t=typeof window>"u",n=t?ju:Zu;n(e,function(a,i){if(a)return r(a);var u;try{u=vt(i)}catch(f){return r(f,null)}return r(null,u)})}function Ku(e){var r=me("fs"),t=r.readFileSync(e);return vt(Jn(t))}s.Font=V,s.Glyph=pe,s.Path=Q,s.BoundingBox=we,s._parse=A,s.parse=vt,s.load=Ju,s.loadSync=Ku,Object.defineProperty(s,"__esModule",{value:!0})})});var ka=q((_f,Ea)=>{"use strict";Ea.exports=function(s){s.prototype[Symbol.iterator]=function*(){for(let o=this.head;o;o=o.next)yield o.value}}});var wa=q((Hf,Oa)=>{"use strict";Oa.exports=H;H.Node=qe;H.create=H;function H(s){var o=this;if(o instanceof H||(o=new H),o.tail=null,o.head=null,o.length=0,s&&typeof s.forEach=="function")s.forEach(function(p){o.push(p)});else if(arguments.length>0)for(var c=0,h=arguments.length;c<h;c++)o.push(arguments[c]);return o}H.prototype.removeNode=function(s){if(s.list!==this)throw new Error("removing node which does not belong to this list");var o=s.next,c=s.prev;return o&&(o.prev=c),c&&(c.next=o),s===this.head&&(this.head=o),s===this.tail&&(this.tail=c),s.list.length--,s.next=null,s.prev=null,s.list=null,o};H.prototype.unshiftNode=function(s){if(s!==this.head){s.list&&s.list.removeNode(s);var o=this.head;s.list=this,s.next=o,o&&(o.prev=s),this.head=s,this.tail||(this.tail=s),this.length++}};H.prototype.pushNode=function(s){if(s!==this.tail){s.list&&s.list.removeNode(s);var o=this.tail;s.list=this,s.prev=o,o&&(o.next=s),this.tail=s,this.head||(this.head=s),this.length++}};H.prototype.push=function(){for(var s=0,o=arguments.length;s<o;s++)ll(this,arguments[s]);return this.length};H.prototype.unshift=function(){for(var s=0,o=arguments.length;s<o;s++)fl(this,arguments[s]);return this.length};H.prototype.pop=function(){if(this.tail){var s=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,s}};H.prototype.shift=function(){if(this.head){var s=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,s}};H.prototype.forEach=function(s,o){o=o||this;for(var c=this.head,h=0;c!==null;h++)s.call(o,c.value,h,this),c=c.next};H.prototype.forEachReverse=function(s,o){o=o||this;for(var c=this.tail,h=this.length-1;c!==null;h--)s.call(o,c.value,h,this),c=c.prev};H.prototype.get=function(s){for(var o=0,c=this.head;c!==null&&o<s;o++)c=c.next;if(o===s&&c!==null)return c.value};H.prototype.getReverse=function(s){for(var o=0,c=this.tail;c!==null&&o<s;o++)c=c.prev;if(o===s&&c!==null)return c.value};H.prototype.map=function(s,o){o=o||this;for(var c=new H,h=this.head;h!==null;)c.push(s.call(o,h.value,this)),h=h.next;return c};H.prototype.mapReverse=function(s,o){o=o||this;for(var c=new H,h=this.tail;h!==null;)c.push(s.call(o,h.value,this)),h=h.prev;return c};H.prototype.reduce=function(s,o){var c,h=this.head;if(arguments.length>1)c=o;else if(this.head)h=this.head.next,c=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var p=0;h!==null;p++)c=s(c,h.value,p),h=h.next;return c};H.prototype.reduceReverse=function(s,o){var c,h=this.tail;if(arguments.length>1)c=o;else if(this.tail)h=this.tail.prev,c=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var p=this.length-1;h!==null;p--)c=s(c,h.value,p),h=h.prev;return c};H.prototype.toArray=function(){for(var s=new Array(this.length),o=0,c=this.head;c!==null;o++)s[o]=c.value,c=c.next;return s};H.prototype.toArrayReverse=function(){for(var s=new Array(this.length),o=0,c=this.tail;c!==null;o++)s[o]=c.value,c=c.prev;return s};H.prototype.slice=function(s,o){o=o||this.length,o<0&&(o+=this.length),s=s||0,s<0&&(s+=this.length);var c=new H;if(o<s||o<0)return c;s<0&&(s=0),o>this.length&&(o=this.length);for(var h=0,p=this.head;p!==null&&h<s;h++)p=p.next;for(;p!==null&&h<o;h++,p=p.next)c.push(p.value);return c};H.prototype.sliceReverse=function(s,o){o=o||this.length,o<0&&(o+=this.length),s=s||0,s<0&&(s+=this.length);var c=new H;if(o<s||o<0)return c;s<0&&(s=0),o>this.length&&(o=this.length);for(var h=this.length,p=this.tail;p!==null&&h>o;h--)p=p.prev;for(;p!==null&&h>s;h--,p=p.prev)c.push(p.value);return c};H.prototype.splice=function(s,o,...c){s>this.length&&(s=this.length-1),s<0&&(s=this.length+s);for(var h=0,p=this.head;p!==null&&h<s;h++)p=p.next;for(var m=[],h=0;p&&h<o;h++)m.push(p.value),p=this.removeNode(p);p===null&&(p=this.tail),p!==this.head&&p!==this.tail&&(p=p.prev);for(var h=0;h<c.length;h++)p=ul(this,p,c[h]);return m};H.prototype.reverse=function(){for(var s=this.head,o=this.tail,c=s;c!==null;c=c.prev){var h=c.prev;c.prev=c.next,c.next=h}return this.head=o,this.tail=s,this};function ul(s,o,c){var h=o===s.head?new qe(c,null,o,s):new qe(c,o,o.next,s);return h.next===null&&(s.tail=h),h.prev===null&&(s.head=h),s.length++,h}function ll(s,o){s.tail=new qe(o,s.tail,null,s),s.head||(s.head=s.tail),s.length++}function fl(s,o){s.head=new qe(o,null,s.head,s),s.tail||(s.tail=s.head),s.length++}function qe(s,o,c,h){if(!(this instanceof qe))return new qe(s,o,c,h);this.list=h,this.value=s,o?(o.next=this,this.prev=o):this.prev=null,c?(c.prev=this,this.next=c):this.next=null}try{ka()(H)}catch{}});var Ba=q((zf,Aa)=>{"use strict";var cl=wa(),We=Symbol("max"),Ae=Symbol("length"),er=Symbol("lengthCalculator"),dr=Symbol("allowStale"),Ve=Symbol("maxAge"),Ie=Symbol("dispose"),Ca=Symbol("noDisposeOnSet"),re=Symbol("lruList"),Ue=Symbol("cache"),Ia=Symbol("updateAgeOnGet"),yt=()=>1,bt=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");let c=this[We]=o.max||1/0,h=o.length||yt;if(this[er]=typeof h!="function"?yt:h,this[dr]=o.stale||!1,o.maxAge&&typeof o.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ve]=o.maxAge||0,this[Ie]=o.dispose,this[Ca]=o.noDisposeOnSet||!1,this[Ia]=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[We]=o||1/0,pr(this)}get max(){return this[We]}set allowStale(o){this[dr]=!!o}get allowStale(){return this[dr]}set maxAge(o){if(typeof o!="number")throw new TypeError("maxAge must be a non-negative number");this[Ve]=o,pr(this)}get maxAge(){return this[Ve]}set lengthCalculator(o){typeof o!="function"&&(o=yt),o!==this[er]&&(this[er]=o,this[Ae]=0,this[re].forEach(c=>{c.length=this[er](c.value,c.key),this[Ae]+=c.length})),pr(this)}get lengthCalculator(){return this[er]}get length(){return this[Ae]}get itemCount(){return this[re].length}rforEach(o,c){c=c||this;for(let h=this[re].tail;h!==null;){let p=h.prev;La(this,o,h,c),h=p}}forEach(o,c){c=c||this;for(let h=this[re].head;h!==null;){let p=h.next;La(this,o,h,c),h=p}}keys(){return this[re].toArray().map(o=>o.key)}values(){return this[re].toArray().map(o=>o.value)}reset(){this[Ie]&&this[re]&&this[re].length&&this[re].forEach(o=>this[Ie](o.key,o.value)),this[Ue]=new Map,this[re]=new cl,this[Ae]=0}dump(){return this[re].map(o=>Mr(this,o)?!1:{k:o.key,v:o.value,e:o.now+(o.maxAge||0)}).toArray().filter(o=>o)}dumpLru(){return this[re]}set(o,c,h){if(h=h||this[Ve],h&&typeof h!="number")throw new TypeError("maxAge must be a number");let p=h?Date.now():0,m=this[er](c,o);if(this[Ue].has(o)){if(m>this[We])return rr(this,this[Ue].get(o)),!1;let U=this[Ue].get(o).value;return this[Ie]&&(this[Ca]||this[Ie](o,U.value)),U.now=p,U.maxAge=h,U.value=c,this[Ae]+=m-U.length,U.length=m,this.get(o),pr(this),!0}let b=new St(o,c,m,p,h);return b.length>this[We]?(this[Ie]&&this[Ie](o,c),!1):(this[Ae]+=b.length,this[re].unshift(b),this[Ue].set(o,this[re].head),pr(this),!0)}has(o){if(!this[Ue].has(o))return!1;let c=this[Ue].get(o).value;return!Mr(this,c)}get(o){return xt(this,o,!0)}peek(o){return xt(this,o,!1)}pop(){let o=this[re].tail;return o?(rr(this,o),o.value):null}del(o){rr(this,this[Ue].get(o))}load(o){this.reset();let c=Date.now();for(let h=o.length-1;h>=0;h--){let p=o[h],m=p.e||0;if(m===0)this.set(p.k,p.v);else{let b=m-c;b>0&&this.set(p.k,p.v,b)}}}prune(){this[Ue].forEach((o,c)=>xt(this,c,!1))}},xt=(s,o,c)=>{let h=s[Ue].get(o);if(h){let p=h.value;if(Mr(s,p)){if(rr(s,h),!s[dr])return}else c&&(s[Ia]&&(h.value.now=Date.now()),s[re].unshiftNode(h));return p.value}},Mr=(s,o)=>{if(!o||!o.maxAge&&!s[Ve])return!1;let c=Date.now()-o.now;return o.maxAge?c>o.maxAge:s[Ve]&&c>s[Ve]},pr=s=>{if(s[Ae]>s[We])for(let o=s[re].tail;s[Ae]>s[We]&&o!==null;){let c=o.prev;rr(s,o),o=c}},rr=(s,o)=>{if(o){let c=o.value;s[Ie]&&s[Ie](c.key,c.value),s[Ae]-=c.length,s[Ue].delete(c.key),s[re].removeNode(o)}},St=class{constructor(o,c,h,p,m){this.key=o,this.value=c,this.length=h,this.now=p,this.maxAge=m||0}},La=(s,o,c,h)=>{let p=c.value;Mr(s,p)&&(rr(s,c),s[dr]||(p=void 0)),p&&o.call(h,p.value,p.key,s)};Aa.exports=bt});var Et=q(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});function hl(s){let o={individual:{},range:[]};for(let c of s)Tt(o,c);return o}Ut.default=hl;function Tt(s,o){for(let[c,h]of Object.entries(o.individual))if(s.individual[c])tr(s.individual[c],h);else{let p=!1;for(let[m,{range:b,entry:F}]of s.range.entries()){let U=Ft(Number(c),b);if(U.both!==null){p=!0,s.individual[c]=h,tr(s.individual[c],oe(F)),s.range.splice(m,1);for(let I of U.second)Array.isArray(I)?s.range.push({range:I,entry:oe(F)}):s.individual[I]=oe(F)}}p||(s.individual[c]=h)}for(let{range:c,entry:h}of o.range){let p=[c];for(let m=0;m<s.range.length;m++){let{range:b,entry:F}=s.range[m];for(let[U,I]of p.entries())if(Array.isArray(I)){let z=pl(I,b);if(z.both===null)continue;s.range.splice(m,1),m--;let B=oe(F);Array.isArray(z.both)?s.range.push({range:z.both,entry:B}):s.individual[z.both]=B,tr(B,oe(h));for(let W of z.second)Array.isArray(W)?s.range.push({range:W,entry:oe(F)}):s.individual[W]=oe(F);p=z.first}else{let z=Ft(I,b);if(z.both===null)continue;s.individual[I]=oe(h),tr(s.individual[I],oe(F)),s.range.splice(m,1),m--;for(let B of z.second)Array.isArray(B)?s.range.push({range:B,entry:oe(F)}):s.individual[B]=oe(F);p.splice(U,1,...z.first);break}}for(let m of Object.keys(s.individual))for(let[b,F]of p.entries())if(Array.isArray(F)){let U=Ft(Number(m),F);if(U.both===null)continue;tr(s.individual[m],oe(h)),p.splice(b,1,...U.second);break}else if(Number(m)===F){tr(s.individual[m],oe(h));break}for(let m of p)Array.isArray(m)?s.range.push({range:m,entry:oe(h)}):s.individual[m]=oe(h)}}function tr(s,o){o.lookup&&(!s.lookup||s.lookup.index>o.lookup.index||s.lookup.index===o.lookup.index&&s.lookup.subIndex>o.lookup.subIndex)&&(s.lookup=o.lookup),o.forward&&(s.forward?Tt(s.forward,o.forward):s.forward=o.forward),o.reverse&&(s.reverse?Tt(s.reverse,o.reverse):s.reverse=o.reverse)}function pl(s,o){let c={first:[],second:[],both:null};if(s[0]<o[1]&&o[0]<s[1]){let h=Math.max(s[0],o[0]),p=Math.min(s[1],o[1]);c.both=Xe(h,p)}if(s[0]<o[0]){let h=s[0],p=Math.min(o[0],s[1]);c.first.push(Xe(h,p))}else if(o[0]<s[0]){let h=o[0],p=Math.min(o[1],s[0]);c.second.push(Xe(h,p))}if(s[1]>o[1]){let h=Math.max(s[0],o[1]),p=s[1];c.first.push(Xe(h,p))}else if(o[1]>s[1]){let h=Math.max(s[1],o[0]),p=o[1];c.second.push(Xe(h,p))}return c}function Ft(s,o){if(s<o[0]||s>o[1])return{first:[s],second:[o],both:null};let c={first:[],second:[],both:s};return o[0]<s&&c.second.push(Xe(o[0],s)),o[1]>s&&c.second.push(Xe(s+1,o[1])),c}function Xe(s,o){return o-s===1?s:[s,o]}function oe(s){let o={};return s.forward&&(o.forward=Ra(s.forward)),s.reverse&&(o.reverse=Ra(s.reverse)),s.lookup&&(o.lookup={contextRange:s.lookup.contextRange.slice(),index:s.lookup.index,length:s.lookup.length,subIndex:s.lookup.subIndex,substitutions:s.lookup.substitutions.slice()}),o}function Ra(s){let o={};for(let[c,h]of Object.entries(s.individual))o[c]=oe(h);return{individual:o,range:s.range.map(({range:c,entry:h})=>({range:c.slice(),entry:oe(h)}))}}});var Pa=q(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});function Da(s,o,c,h){let p=o[h],m=s[p];if(!m)return;let b=m.lookup;if(m.reverse){let U=dl(m.reverse,o,c);(!b&&U||U&&b&&(b.index>U.index||b.index===U.index&&b.subIndex>U.subIndex))&&(b=U)}if(++h>=o.length||!m.forward)return b;let F=Da(m.forward,o,c,h);return(!b&&F||F&&b&&(b.index>F.index||b.index===F.index&&b.subIndex>F.subIndex))&&(b=F),b}kt.default=Da;function dl(s,o,c){let h=s[o[--c]],p=h&&h.lookup;for(;h&&((!p&&h.lookup||h.lookup&&p&&p.index>h.lookup.index)&&(p=h.lookup),!(--c<0||!h.reverse));)h=h.reverse[o[c]];return p}});var Ma=q(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});function vl(s,o,c){let h=!1;for(let p=0;p<s.length;p++){let m=s[p];if(h){if(c<=m[0])return s[p-1][1]=c,s;if(c<=m[1])return s[p-1][1]=Math.max(c,m[1]),s.splice(p,1),h=!1,s;s.splice(p,1),p--}else{if(c<=m[0])return s.splice(p,0,[o,c]),s;if(c<=m[1])return m[0]=Math.min(o,m[0]),s;if(o<m[1])m[0]=Math.min(o,m[0]),h=!0;else continue}}return h?s[s.length-1][1]=c:s.push([o,c]),s}Ot.default=vl});var nr=q(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});function gl(s,o){switch(s.format){case 1:let c=s.glyphs.indexOf(o);return c!==-1?c:null;case 2:let h=s.ranges.find(p=>p.start<=o&&p.end>=o);return h?h.index:null}}Gr.default=gl;function ml(s){switch(s.format){case 1:return s.glyphs.map((c,h)=>({glyphId:c,index:h}));case 2:let o=[];for(let[c,h]of s.ranges.entries())h.end===h.start?o.push({glyphId:h.start,index:c}):o.push({glyphId:[h.start,h.end+1],index:c});return o}}Gr.listGlyphsByIndex=ml});var Ga=q(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});var yl=nr();function xl(s,o){let c=o[0],h=wt(s,c),p=o[0]+1,m=new Map;for(;p<o[1];)wt(s,p)!==h&&(p-c<=1?m.set(c,h):m.set([c,p],h)),p++;return p-c<=1?m.set(c,h):m.set([c,p],h),m}Nr.getRangeSubstitutionGlyphs=xl;function wt(s,o){let c=yl.default(s.coverage,o);if(c===null)return null;switch(s.substFormat){case 1:return(o+s.deltaGlyphId)%2**16;case 2:return s.substitute[c]!=null?s.substitute[c]:null}}Nr.getIndividualSubstitutionGlyph=wt});var vr=q(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});var Na=Ga();function bl(s,o,c,h,p){let m=[];for(let b of c){b.entry.forward={individual:{},range:[]};for(let F of s)m.push(..._a(b.entry.forward,h,p,o,F).map(({entry:U,substitution:I})=>({entry:U,substitutions:[...b.substitutions,I]})))}return m}ar.processInputPosition=bl;function Sl(s,o){let c=[];for(let h of o)for(let p of s){let m={};h.entry.forward||(h.entry.forward={individual:{},range:[]}),c.push({entry:m,substitutions:h.substitutions}),Array.isArray(p)?h.entry.forward.range.push({entry:m,range:p}):h.entry.forward.individual[p]=m}return c}ar.processLookaheadPosition=Sl;function Fl(s,o){let c=[];for(let h of o)for(let p of s){let m={};h.entry.reverse||(h.entry.reverse={individual:{},range:[]}),c.push({entry:m,substitutions:h.substitutions}),Array.isArray(p)?h.entry.reverse.range.push({entry:m,range:p}):h.entry.reverse.individual[p]=m}return c}ar.processBacktrackPosition=Fl;function _a(s,o,c,h,p){let m=[];if(!Array.isArray(p))s.individual[p]={},m.push({entry:s.individual[p],substitution:Ul(o,c,h,p)});else{let b=Tl(o,c,h,p);for(let[F,U]of b){let I={};Array.isArray(F)?s.range.push({range:F,entry:I}):s.individual[F]={},m.push({entry:I,substitution:U})}}return m}ar.getInputTree=_a;function Tl(s,o,c,h){for(let p of s.filter(m=>m.sequenceIndex===c))for(let m of o[p.lookupListIndex].subtables){let b=Na.getRangeSubstitutionGlyphs(m,h);if(!Array.from(b.values()).every(F=>F!==null))return b}return new Map([[h,null]])}function Ul(s,o,c,h){for(let p of s.filter(m=>m.sequenceIndex===c))for(let m of o[p.lookupListIndex].subtables){let b=Na.getIndividualSubstitutionGlyph(m,h);if(b!==null)return b}return null}});var Ha=q(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});var El=nr(),_r=vr();function kl(s,o,c){let h={individual:{},range:[]},p=El.listGlyphsByIndex(s.coverage);for(let{glyphId:m,index:b}of p){let F=s.chainRuleSets[b];if(F)for(let[U,I]of F.entries()){let z=_r.getInputTree(h,I.lookupRecords,o,0,m).map(({entry:B,substitution:W})=>({entry:B,substitutions:[W]}));for(let[B,W]of I.input.entries())z=_r.processInputPosition([W],B+1,z,I.lookupRecords,o);for(let B of I.lookahead)z=_r.processLookaheadPosition([B],z);for(let B of I.backtrack)z=_r.processBacktrackPosition([B],z);for(let{entry:B,substitutions:W}of z)B.lookup={substitutions:W,length:I.input.length+1,index:c,subIndex:U,contextRange:[-1*I.backtrack.length,1+I.input.length+I.lookahead.length]}}}return h}Ct.default=kl});var za=q(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});function Ol(s,o){switch(s.format){case 2:return Array.isArray(o)?wl(s,o):new Map([[o,Lt(s,o)]]);default:return new Map([[o,null]])}}Hr.default=Ol;function wl(s,o){let c=o[0],h=Lt(s,c),p=o[0]+1,m=new Map;for(;p<o[1];)Lt(s,p)!==h&&(p-c<=1?m.set(c,h):m.set([c,p],h)),p++;return p-c<=1?m.set(c,h):m.set([c,p],h),m}function Lt(s,o){for(let c of s.ranges)if(c.start<=o&&c.end>=o)return c.classId;return null}function Cl(s,o){switch(s.format){case 2:let c=[];for(let h of s.ranges)h.classId===o&&(h.end===h.start?c.push(h.start):c.push([h.start,h.end+1]));return c;default:return[]}}Hr.listClassGlyphs=Cl});var qa=q(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});var Ll=Et(),Il=nr(),zr=za(),qr=vr();function Al(s,o,c){let h=[],p=Il.listGlyphsByIndex(s.coverage);for(let{glyphId:m}of p){let b=zr.default(s.inputClassDef,m);for(let[F,U]of b.entries()){if(U===null)continue;let I=s.chainClassSet[U];if(I)for(let[z,B]of I.entries()){let W={individual:{},range:[]},X=qr.getInputTree(W,B.lookupRecords,o,0,F).map(({entry:Z,substitution:xe})=>({entry:Z,substitutions:[xe]}));for(let[Z,xe]of B.input.entries())X=qr.processInputPosition(zr.listClassGlyphs(s.inputClassDef,xe),Z+1,X,B.lookupRecords,o);for(let Z of B.lookahead)X=qr.processLookaheadPosition(zr.listClassGlyphs(s.lookaheadClassDef,Z),X);for(let Z of B.backtrack)X=qr.processBacktrackPosition(zr.listClassGlyphs(s.backtrackClassDef,Z),X);for(let{entry:Z,substitutions:xe}of X)Z.lookup={substitutions:xe,index:c,subIndex:z,length:B.input.length+1,contextRange:[-1*B.backtrack.length,1+B.input.length+B.lookahead.length]};h.push(W)}}}return Ll.default(h)}It.default=Al});var Wa=q(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});var Wr=nr(),Vr=vr();function Bl(s,o,c){let h={individual:{},range:[]},p=Wr.listGlyphsByIndex(s.inputCoverage[0]);for(let{glyphId:m}of p){let b=Vr.getInputTree(h,s.lookupRecords,o,0,m).map(({entry:F,substitution:U})=>({entry:F,substitutions:[U]}));for(let[F,U]of s.inputCoverage.slice(1).entries())b=Vr.processInputPosition(Wr.listGlyphsByIndex(U).map(I=>I.glyphId),F+1,b,s.lookupRecords,o);for(let F of s.lookaheadCoverage)b=Vr.processLookaheadPosition(Wr.listGlyphsByIndex(F).map(U=>U.glyphId),b);for(let F of s.backtrackCoverage)b=Vr.processBacktrackPosition(Wr.listGlyphsByIndex(F).map(U=>U.glyphId),b);for(let{entry:F,substitutions:U}of b)F.lookup={substitutions:U,index:c,subIndex:0,length:s.inputCoverage.length,contextRange:[-1*s.backtrackCoverage.length,s.inputCoverage.length+s.lookaheadCoverage.length]}}return h}At.default=Bl});var Xa=q(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});var Bt=nr(),Va=vr();function Rl(s,o){let c={individual:{},range:[]},h=Bt.listGlyphsByIndex(s.coverage);for(let{glyphId:p,index:m}of h){let b={};Array.isArray(p)?c.range.push({entry:b,range:p}):c.individual[p]=b;let F=[{entry:b,substitutions:[s.substitutes[m]]}];for(let U of s.lookaheadCoverage)F=Va.processLookaheadPosition(Bt.listGlyphsByIndex(U).map(I=>I.glyphId),F);for(let U of s.backtrackCoverage)F=Va.processBacktrackPosition(Bt.listGlyphsByIndex(U).map(I=>I.glyphId),F);for(let{entry:U,substitutions:I}of F)U.lookup={substitutions:I,index:o,subIndex:0,length:1,contextRange:[-1*s.backtrackCoverage.length,1+s.lookaheadCoverage.length]}}return c}Rt.default=Rl});var ja=q(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});function Dt(s){let o={};for(let[c,h]of Object.entries(s.individual))o[c]=Ya(h);for(let{range:c,entry:h}of s.range){let p=Ya(h);for(let m=c[0];m<c[1];m++)o[m]=p}return o}Pt.default=Dt;function Ya(s){let o={};return s.forward&&(o.forward=Dt(s.forward)),s.reverse&&(o.reverse=Dt(s.reverse)),s.lookup&&(o.lookup=s.lookup),o}});var $a=q(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});var Za=me("fs"),Qa=me("util"),Ja=me("path"),Dl=Qa.promisify(Za.readdir),Pl=Qa.promisify(Za.stat);async function Ml(s,o){let c=new Set;return await Promise.all(s.map(async h=>{let p=await Ka(Ja.resolve(h),new RegExp(`\\.${o.map(m=>`(?:${m})`).join("|")}$`,"i"));for(let m of p)c.add(m)})),[...c]}Mt.default=Ml;async function Ka(s,o,c=10){if(c<=0)return[];let h;try{h=await Dl(s)}catch{return[]}let p=[];return await Promise.all(h.map(async m=>{let b=Ja.join(s,m),F;try{F=await Pl(b)}catch{return}F.isFile()&&o.test(b)?p.push(b):F.isDirectory()&&p.push(...await Ka(b,o,c-1))})),p}});var rs=q((_t,es)=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});var Ye=me("path"),Gt=me("os"),Gl=$a(),Nl={win32:()=>{let s=Ye.join(process.env.WINDIR||"C:\\Windows","Fonts"),o="Microsoft\\Windows\\Fonts",c;return process.env.LOCALAPPDATA?c=Ye.join(process.env.LOCALAPPDATA,o):process.env.APPDATA?c=Ye.join(process.env.APPDATA,"Local",o):process.env.USERPROFILE&&(c=Ye.join(process.env.USERPROFILE,"AppData","Local",o)),c?[s,c]:[s]},darwin:()=>{let s=Gt.homedir();return[...s?[Ye.join(s,"/Library/Fonts")]:[],"/Library/Fonts","/Network/Library/Fonts","/System/Library/Fonts","/System Folder/Fonts"]},linux:()=>{let s=Gt.homedir();return["/usr/share/fonts","/usr/local/share/fonts",...s?[Ye.join(s,".fonts"),Ye.join(s,".local/share/fonts")]:[]]}};function Nt(s){let o=Object.assign({extensions:["ttf","otf","ttc","woff","woff2"],additionalFolders:[]},s),c=Gt.platform(),h=Nl[c];if(!h)throw new Error(`Unsupported platform: ${c}`);let p=h();return Gl.default([...p,...o.additionalFolders],o.extensions)}es.exports=Object.assign(Nt,{default:Nt});_t.default=Nt});var ns=q((qt,ts)=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});var _l=me("stream"),Ht=class extends _l.Writable{constructor(){super(...arguments),this.offset=0,this._waiters=[],this._closed=!1}_write(o,c,h){let p=0,m=()=>{for(;this._waiters.length>0;){let b=this._waiters[0];if(this._buffer){let F=this._buffer.size-this._buffer.offset;if(F+o.length>=b.size){if(b.skip)this._buffer=void 0,b.resolve();else{let U=Math.min(F,b.size),I=Buffer.alloc(b.size);this._buffer.buf.copy(I,0,this._buffer.offset,this._buffer.offset+U),o.copy(I,U,0,b.size-U),b.resolve(I)}if(this.offset+=b.size,this._waiters.shift(),this._buffer=void 0,F+o.length===b.size){h();break}else p+=b.size-F}else{if(!b.skip){let U=Buffer.alloc(F+o.length);this._buffer.buf.copy(U,0,this._buffer.offset,this._buffer.size),o.copy(U,F,0,o.length),this._buffer.buf=U}this._buffer.offset=0,this._buffer.size=F+o.length,h();break}}else if(o.length-p>=b.size){if(b.skip?b.resolve():b.resolve(o.slice(p,p+b.size)),this.offset+=b.size,this._waiters.shift(),p+=b.size,o.length===p){h();break}}else{this._buffer={buf:b.skip?void 0:o.slice(p),offset:0,size:o.length-p},p=o.length,h();break}}this._processTrigger=o.length-p>0?m:void 0};m()}_destroy(o,c){this._processTrigger=void 0;for(let h of this._waiters)h.reject(o||new Error("stream destroyed"));this._waiters=[],this._closed=!0}_final(o){this._processTrigger=void 0;for(let c of this._waiters)c.reject(new Error("not enough data in stream"));this._waiters=[],this._closed=!0}read(o){return new Promise((c,h)=>{this._closed&&h(new Error("stream is closed")),this._waiters.push({resolve:c,reject:h,size:o,skip:!1}),this._processTrigger&&this._processTrigger()})}skip(o){return new Promise((c,h)=>{this._closed&&h(new Error("stream is closed")),this._waiters.push({resolve:c,reject:h,size:o,skip:!0}),this._processTrigger&&this._processTrigger()})}};function zt(){return new Ht}ts.exports=Object.assign(zt,{default:zt});qt.default=zt});var as=q(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});var Hl=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],zl={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"},ql={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 Wl(s,o,c){switch(s){case 0:if(o===65535)return"und";if(c)return c[o];break;case 1:return zl[o];case 3:return ql[o]}}var Wt="utf-16",Vl={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"},Xl={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 Yl(s,o,c){switch(s){case 0:return Wt;case 1:return Xl[c]||Vl[o];case 3:if(o===1||o===10)return Wt;break}}function jl(s,o){let c={},h=s.readUInt16BE(2),p=s.readUInt16BE(4),m=6;for(let b=0;b<h;b++){let F=s.readUInt16BE(m+0),U=s.readUInt16BE(m+2),I=s.readUInt16BE(m+4),z=s.readUInt16BE(m+6),B=Hl[z]||String(z),W=s.readUInt16BE(m+8),X=s.readUInt16BE(m+10),Z=Wl(F,I,o),xe=Yl(F,U,I);if(m+=12,xe!==void 0&&Z!==void 0){let Ne;if(xe===Wt){let Ee=W/2,yr=Array(Ee);for(let ue=0;ue<Ee;ue++)yr[ue]=s.readUInt16BE(p+X+ue*2);Ne=String.fromCharCode(...yr)}else Ne=Ql(s,p+X,W,xe);if(Ne){let Ee=c[B];Ee===void 0&&(Ee=c[B]={}),Ee[Z]=Ne}}}return c}Vt.default=jl;var Zl={"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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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"};function Ql(s,o,c,h){let p=Zl[h];if(p===void 0)return;let m="";for(let b=0;b<c;b++){let F=s.readUInt8(o+b);F<=127?m+=String.fromCharCode(F):m+=p[F&127]}return m}});var ss=q(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});function Jl(s){if(s.readUInt32BE(0)!==1)throw new Error("Unsupported ltag table version.");let c=s.readUInt32BE(8),h=[];for(let p=0;p<c;p++){let m="",b=s.readUInt16BE(12+p*4),F=s.readUInt16BE(14+p*4);for(let U=b;U<b+F;++U)m+=String.fromCharCode(s.readInt8(U));h.push(m)}return h}Xt.default=Jl});var is=q(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});function Kl(s){if(s.length<78)return;let o={version:s.readUInt16BE(0),xAvgCharWidth:s.readUInt16BE(2),usWeightClass:s.readUInt16BE(4),usWidthClass:s.readUInt16BE(6),fsType:s.readUInt16BE(8),ySubscriptXSize:s.readInt16BE(10),ySubscriptYSize:s.readInt16BE(12),ySubscriptXOffset:s.readInt16BE(14),ySubscriptYOffset:s.readInt16BE(16),ySuperscriptXSize:s.readInt16BE(18),ySuperscriptYSize:s.readInt16BE(20),ySuperscriptXOffset:s.readInt16BE(22),ySuperscriptYOffset:s.readInt16BE(24),yStrikeoutSize:s.readInt16BE(26),yStrikeoutPosition:s.readInt16BE(28),sFamilyClass:s.readInt16BE(30),panose:[s.readUInt8(32),s.readUInt8(33),s.readUInt8(34),s.readUInt8(35),s.readUInt8(36),s.readUInt8(37),s.readUInt8(38),s.readUInt8(39),s.readUInt8(40),s.readUInt8(41)],ulUnicodeRange1:s.readUInt32BE(42),ulUnicodeRange2:s.readUInt32BE(46),ulUnicodeRange3:s.readUInt32BE(50),ulUnicodeRange4:s.readUInt32BE(54),achVendID:String.fromCharCode(s.readUInt8(58),s.readUInt8(59),s.readUInt8(60),s.readUInt8(61)),fsSelection:s.readUInt16BE(62),usFirstCharIndex:s.readUInt16BE(64),usLastCharIndex:s.readUInt16BE(66),sTypoAscender:s.readInt16BE(68),sTypoDescender:s.readInt16BE(70),sTypoLineGap:s.readInt16BE(72),usWinAscent:s.readUInt16BE(74),usWinDescent:s.readUInt16BE(76)};return o.version>=1&&s.length>=86&&(o.ulCodePageRange1=s.readUInt32BE(78),o.ulCodePageRange2=s.readUInt32BE(82)),o.version>=2&&s.length>=96&&(o.sxHeight=s.readInt16BE(86),o.sCapHeight=s.readInt16BE(88),o.usDefaultChar=s.readUInt16BE(90),o.usBreakChar=s.readUInt16BE(92),o.usMaxContent=s.readUInt16BE(94)),o}Yt.default=Kl});var jt=q(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});function $l(s,o){return s+o/2**16}Xr.formatFixed=$l;function ef(s,o){return(s*2**32+o-2082844800)*1e3}Xr.formatLongDateTime=ef});var os=q(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});var Yr=jt();function rf(s){return{version:Yr.formatFixed(s.readUInt16BE(0),s.readUInt16BE(2)),fontRevision:Yr.formatFixed(s.readUInt16BE(4),s.readUInt16BE(6)),checkSumAdjustment:s.readUInt32BE(8),magicNumber:s.readUInt32BE(12),flags:s.readUInt16BE(16),unitsPerEm:s.readUInt16BE(18),created:Yr.formatLongDateTime(s.readUInt32BE(20),s.readUInt32BE(24)),modified:Yr.formatLongDateTime(s.readUInt32BE(28),s.readUInt32BE(32)),xMin:s.readInt16BE(36),yMin:s.readInt16BE(38),xMax:s.readInt16BE(40),yMax:s.readInt16BE(42),macStyle:s.readUInt16BE(44),lowestRecPPEM:s.readUInt16BE(46),fontDirectionHint:s.readInt16BE(48),indexToLocFormat:s.readInt16BE(50),glyphDataFormat:s.readInt16BE(52)}}Zt.default=rf});var ls=q(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});var us=jt();function tf(s){return{version:us.formatFixed(s.readUInt16BE(0),s.readUInt16BE(2)),italicAngle:us.formatFixed(s.readUInt16BE(4),s.readUInt16BE(6)),underlinePosition:s.readInt16BE(8),underlineThickness:s.readInt16BE(10),isFixedPitch:s.readUInt32BE(12),minMemType42:s.readUInt32BE(16),maxMemType42:s.readUInt32BE(20),minMemType1:s.readUInt32BE(24),maxMemType1:s.readUInt32BE(28)}}Qt.default=tf});var fs=q(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});var nf=me("fs"),af=ns(),sf=as(),of=ss(),uf=is(),lf=os(),ff=ls(),Ge;(function(s){s[s.TrueType=0]="TrueType",s[s.CFF=1]="CFF",s[s.Woff=2]="Woff"})(Ge||(Ge={}));var sr={name:{tag:Buffer.from("name"),parse:sf.default},ltag:{tag:Buffer.from("ltag"),parse:of.default},os2:{tag:Buffer.from("OS/2"),parse:uf.default},head:{tag:Buffer.from("head"),parse:lf.default},post:{tag:Buffer.from("post"),parse:ff.default}};async function cf(s){return new Promise((o,c)=>{(async()=>{let h=af.default(),p=nf.createReadStream(s),m=!1,b=()=>{m=!0};p.once("close",b),p.once("end",b),p.once("error",F=>{m=!0,c(F)}),p.pipe(h);try{switch(hf(await h.read(4))){case Ge.TrueType:case Ge.CFF:let U=(await h.read(2)).readUInt16BE(0);await h.skip(6);let I=await pf(h,U),z=Object.entries(I).sort((X,Z)=>X[1].offset-Z[1].offset),B={};for(let[X,Z]of z)await h.skip(Z.offset-h.offset),B[X]=await h.read(Z.length);let W=[];if(B.ltag&&(W=sr.ltag.parse(B.ltag)),!B.name)throw new Error(`missing required OpenType table 'name' in font file: ${s}`);return{names:sr.name.parse(B.name,W),os2:B.os2&&sr.os2.parse(B.os2),head:B.head&&sr.head.parse(B.head),post:B.post&&sr.post.parse(B.post)};case Ge.Woff:default:throw new Error("provided font type is not supported yet")}}finally{p.unpipe(h),m||(p.destroy(),h.destroy())}})().then(o,c)})}Jt.default=cf;var gr={one:Buffer.from([0,1,0,0]),otto:Buffer.from("OTTO"),true:Buffer.from("true"),typ1:Buffer.from("typ1"),woff:Buffer.from("wOFF")};function hf(s){if(s.equals(gr.one)||s.equals(gr.true)||s.equals(gr.typ1))return Ge.TrueType;if(s.equals(gr.otto))return Ge.CFF;if(s.equals(gr.woff))return Ge.Woff;throw new Error(`Unsupported signature type: ${s}`)}async function pf(s,o){let c={};for(let h=0;h<o;h++){let p=await s.read(4),m=await s.read(12);for(let[b,F]of Object.entries(sr))if(p.equals(F.tag)&&(c[b]={offset:m.readUInt32BE(4),length:m.readUInt32BE(8)},c.name&&c.ltag&&c.os2))return c}return c}});var Kt=q(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});var df=me("os"),je;(function(s){s.Serif="serif",s.SansSerif="sansSerif",s.Monospace="monospace",s.Cursive="cursive",s.Unknown="unknown"})(je=Oe.Type||(Oe.Type={}));var ye;(function(s){s.Regular="regular",s.Italic="italic",s.Oblique="oblique",s.Bold="bold",s.BoldItalic="boldItalic",s.BoldOblique="boldOblique",s.Other="other"})(ye=Oe.Style||(Oe.Style={}));var vf=[" Regular"," Bold"," Bold Italic"," Bold Oblique"," Italic"," Oblique"];function gf(s,o){let c=s.names.preferredFamily&&s.names.preferredFamily[o]?s.names.preferredFamily[o]:s.names.fontFamily[o];if(df.platform()==="win32"){let h=s.names.preferredSubfamily&&s.names.preferredSubfamily[o]?s.names.preferredSubfamily[o]:s.names.fontSubfamily[o],p=`${c} ${h}`,m=-1;for(let b of vf){let F=p.lastIndexOf(b);if(F!==-1){m=F;break}}return m!==-1?p.substring(0,m):p}return c}Oe.name=gf;function mf(s){if(s.os2)switch(s.os2.panose[0]){case 2:return s.os2.panose[3]===9?je.Monospace:s.os2.panose[1]>=11&&s.os2.panose[1]<=15||s.os2.panose[1]===0?je.SansSerif:je.Serif;case 3:return je.Cursive}else if(s.post&&s.post.isFixedPitch)return je.Monospace;return je.Unknown}Oe.type=mf;function cs(s){if(!s.os2&&!s.head)return ye.Other;let o=s.os2?s.os2.fsSelection&32:s.head.macStyle&1,c=s.os2?s.os2.fsSelection&1:s.post?s.post.italicAngle<0:s.head.macStyle&2,h=s.os2?s.os2.fsSelection&512:s.post?s.post.italicAngle>0:0,p=s.os2?s.os2.fsSelection&320:1;return o?h?ye.BoldOblique:c?ye.BoldItalic:ye.Bold:h?ye.Oblique:c?ye.Italic:p?ye.Regular:ye.Other}Oe.style=cs;var yf=[ye.Bold,ye.BoldItalic,ye.BoldOblique];function xf(s){return s.os2?s.os2.usWeightClass:yf.includes(cs(s))?700:400}Oe.weight=xf});var gs=q(Be=>{"use strict";var bf=Be&&Be.__rest||function(s,o){var c={};for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&o.indexOf(h)<0&&(c[h]=s[h]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,h=Object.getOwnPropertySymbols(s);p<h.length;p++)o.indexOf(h[p])<0&&(c[h[p]]=s[h[p]]);return c};Object.defineProperty(Be,"__esModule",{value:!0});var Sf=rs(),hs=fs(),jr=Kt(),ps=Kt();Be.Type=ps.Type;Be.Style=ps.Style;async function ds(s){let o=Object.assign({concurrency:4,language:"en",onFontError:null},s),c=await Sf.default({extensions:["ttf","otf"]}),h=await Uf(async m=>{try{let b=await hs.default(m);return vs(m,b,o.language)}catch(b){o.onFontError&&o.onFontError(m,b)}},c,o.concurrency),p={};for(let m of h.filter(b=>b)){let{name:b}=m,F=bf(m,["name"]);p[b]||(p[b]=[]),p[b].push(F)}return p}Be.list=ds;async function Ff(s,o){return(await ds(o))[s]||[]}Be.listVariants=Ff;async function Tf(s,o){let c=Object.assign({language:"en"},o),h=await hs.default(s);return vs(s,h,c.language)}Be.get=Tf;function vs(s,o,c){return{name:jr.name(o,c),path:s,type:jr.type(o),weight:jr.weight(o),style:jr.style(o)}}async function Uf(s,o,c){let h=[],p=0,m=async F=>{h.push(await s(o[F])),p<o.length&&await m(p++)},b=[];for(;p<o.length&&p<c;p++)b.push(m(p));return await Promise.all(b),h}});var Ss=q(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});var xs=Ua(),Ef=Ba(),kf=Et(),ms=Pa(),ys=Ma(),Of=Ha(),wf=qa(),Cf=Wa(),Lf=Xa(),If=ja(),Zr=class{constructor(o,c){this._lookupTrees=[],this._glyphLookups={},this._font=o,c.cacheSize>0&&(this._cache=new Ef({max:c.cacheSize,length:(F,U)=>U.length}));let p=(this._font.tables.gsub&&this._font.tables.gsub.features.filter(F=>F.tag==="calt")||[]).reduce((F,U)=>[...F,...U.feature.lookupListIndexes],[]),m=this._font.tables.gsub&&this._font.tables.gsub.lookups||[],b=m.filter((F,U)=>p.some(I=>I===U));for(let[F,U]of b.entries()){let I=[];switch(U.lookupType){case 6:for(let[B,W]of U.subtables.entries())switch(W.substFormat){case 1:I.push(Of.default(W,m,B));break;case 2:I.push(wf.default(W,m,B));break;case 3:I.push(Cf.default(W,m,B));break}break;case 8:for(let[B,W]of U.subtables.entries())I.push(Lf.default(W,B));break}let z=If.default(kf.default(I));this._lookupTrees.push({tree:z,processForward:U.lookupType!==8});for(let B of Object.keys(z))this._glyphLookups[B]||(this._glyphLookups[B]=[]),this._glyphLookups[B].push(F)}}findLigatures(o){let c=this._cache&&this._cache.get(o);if(c&&!Array.isArray(c))return c;let h=[];for(let b of o)h.push(this._font.charToGlyphIndex(b));if(this._lookupTrees.length===0)return{inputGlyphs:h,outputGlyphs:h,contextRanges:[]};let p=this._findInternal(h.slice()),m={inputGlyphs:h,outputGlyphs:p.sequence,contextRanges:p.ranges};return this._cache&&this._cache.set(o,m),m}findLigatureRanges(o){if(this._lookupTrees.length===0)return[];let c=this._cache&&this._cache.get(o);if(c)return Array.isArray(c)?c:c.contextRanges;let h=[];for(let m of o)h.push(this._font.charToGlyphIndex(m));let p=this._findInternal(h);return this._cache&&this._cache.set(o,p.ranges),p.ranges}_findInternal(o){let c=[],h=this._getNextLookup(o,0);for(;h.index!==null;){let p=this._lookupTrees[h.index];if(p.processForward){let m=h.last;for(let b=h.first;b<m;b++){let F=ms.default(p.tree,o,b,b);if(F){for(let U=0;U<F.substitutions.length;U++){let I=F.substitutions[U];I!==null&&(o[b+U]=I)}ys.default(c,F.contextRange[0]+b,F.contextRange[1]+b),b+F.length>=m&&(m=b+F.length+1),b+=F.length-1}}}else for(let m=h.last-1;m>=h.first;m--){let b=ms.default(p.tree,o,m,m);if(b){for(let F=0;F<b.substitutions.length;F++){let U=b.substitutions[F];U!==null&&(o[m+F]=U)}ys.default(c,b.contextRange[0]+m,b.contextRange[1]+m),m-=b.length-1}}h=this._getNextLookup(o,h.index+1)}return{sequence:o,ranges:c}}_getNextLookup(o,c){let h={index:null,first:1/0,last:-1};for(let p=0;p<o.length;p++){let m=this._glyphLookups[o[p]];if(m)for(let b=0;b<m.length;b++){let F=m[b];if(F>=c){(h.index===null||F<=h.index)&&(h.index=F,h.first>p&&(h.first=p),h.last=p+1);break}}}return h}};async function Af(s,o){let[c]=await Promise.resolve().then(()=>gs()).then(h=>h.listVariants(s));if(!c)throw new Error(`Font ${s} not found`);return bs(c.path,o)}mr.load=Af;async function bs(s,o){let c=await Promise.resolve().then(()=>me("util")).then(h=>h.promisify(xs.load)(s));return new Zr(c,Object.assign({cacheSize:0},o))}mr.loadFile=bs;function Bf(s,o){let c=xs.parse(s);return new Zr(c,Object.assign({cacheSize:0},o))}mr.loadBuffer=Bf});var Ts=ol(Ss());function en(s){if(typeof s!="string")throw new Error("Font family must be a string");let o={input:s,offset:0},c=[],h="";for(;o.offset<o.input.length;){let p=o.input[o.offset++];switch(p){case"'":case'"':h+=Rf(o,p);break;case",":c.push(h),h="";break;default:/\s/.test(p)||(o.offset--,h+=Df(o),c.push(h),h="")}}return c}function Rf(s,o){let c="",h=!1;for(;s.offset<s.input.length;){let p=s.input[s.offset++];if(h)/[\dA-Fa-f]/.test(p)?(s.offset--,c+=Fs(s)):p!==`
18
- `&&(c+=p),h=!1;else switch(p){case o:return c;case"\\":h=!0;break;default:c+=p}}throw new Error("Unterminated string")}function Df(s){let o="",c=!1;for(;s.offset<s.input.length;){let h=s.input[s.offset++];if(c)/[\dA-Fa-f]/.test(h)?(s.offset--,o+=Fs(s)):o+=h,c=!1;else switch(h){case"\\":c=!0;break;case",":return o;default:/\s/.test(h)?o.endsWith(" ")||(o+=" "):o+=h}}return o}function Fs(s){let o="";for(;s.offset<s.input.length;){let c=s.input[s.offset++];if(/\s/.test(c))return $t(o);if(o.length>=6||!/[\dA-Fa-f]/.test(c))return s.offset--,$t(o);o+=c}return $t(o)}function $t(s){return String.fromCodePoint(parseInt(s,16))}var ir;async function rn(s,o){if(!ir){if(typeof navigator<"u"&&"fonts"in navigator){try{let p=await navigator.permissions.request?.({name:"local-fonts"});if(p&&p.state!=="granted")throw new Error("Permission to access local fonts not granted.")}catch(p){if(p.name!=="TypeError")throw p}let h={};try{let p=await navigator.fonts.query();for(let m of p)h.hasOwnProperty(m.family)||(h[m.family]=[]),h[m.family].push(m);ir=Promise.resolve(h)}catch(p){console.error(p.name,p.message)}}else if(typeof window<"u"&&"queryLocalFonts"in window){let h={};try{let p=await window.queryLocalFonts();for(let m of p)h.hasOwnProperty(m.family)||(h[m.family]=[]),h[m.family].push(m);ir=Promise.resolve(h)}catch(p){console.error(p.name,p.message)}}ir||(ir=Promise.resolve({}))}let c=await ir;for(let h of en(s)){if(Pf.includes(h))return;if(c.hasOwnProperty(h)&&c[h].length>0){let p=c[h][0];if("blob"in p){let b=await(await p.blob()).arrayBuffer();return(0,Ts.loadBuffer)(b,{cacheSize:o})}return}}}var Pf=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"];var Mf=1e5;function Us(s,o=[]){let c,h,p=0,m;return s.registerCharacterJoiner(b=>{let F=s.options.fontFamily;if(F&&(p===0||c!==F)){h=void 0,p=1,c=F;let U=c;rn(U,Mf).then(I=>{U===s.options.fontFamily&&(p=2,h=I,I&&s.refresh(0,s.rows-1))}).catch(I=>{U===s.options.fontFamily&&(p=3,s.options.logLevel==="debug"&&console.debug(m,new Error("Failure while loading font")),h=void 0,m=I)})}return h&&p===2?h.findLigatureRanges(b).map(U=>[U[0],U[1]]):Gf(b,o)})}function Gf(s,o){let c=[];for(let h=0;h<s.length;h++)for(let p=0;p<o.length;p++)if(s.startsWith(o[p],h)){c.push([h,h+o[p].length]),h+=o[p].length-1;break}return c}var Es=class{constructor(o){this._fallbackLigatures=(o?.fallbackLigatures||["<--","<---","<<-","<-","->","->>","-->","--->","<==","<===","<<=","<=","=>","=>>","==>","===>",">=",">>=","<->","<-->","<--->","<---->","<=>","<==>","<===>","<====>","::",":::","<~~","</","</>","/>","~~>","==","!=","/=","~=","<>","===","!==","!===","<:",":=","*=","*+","<*","<*>","*>","<|","<|>","|>","+*","=*","=:",":>","/*","*/","+++","<!--","<!---"]).sort((c,h)=>h.length-c.length),this._fontFeatureSettings=o?.fontFeatureSettings}activate(o){if(!o.element)throw new Error("Cannot activate LigaturesAddon before open is called");this._terminal=o,this._characterJoinerId=Us(o,this._fallbackLigatures),o.element.style.fontFeatureSettings=this._fontFeatureSettings??'"calt" on'}dispose(){this._characterJoinerId!==void 0&&(this._terminal?.deregisterCharacterJoiner(this._characterJoinerId),this._characterJoinerId=void 0),this._terminal?.element&&(this._terminal.element.style.fontFeatureSettings="")}};export{Es as LigaturesAddon};
17
+ var Po=Object.create;var _n=Object.defineProperty;var Go=Object.getOwnPropertyDescriptor;var No=Object.getOwnPropertyNames;var Ho=Object.getPrototypeOf,_o=Object.prototype.hasOwnProperty;var tt=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(f,p)=>(typeof require<"u"?require:f)[p]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var Ur=(s,f)=>()=>(f||s((f={exports:{}}).exports,f),f.exports);var zo=(s,f,p,h)=>{if(f&&typeof f=="object"||typeof f=="function")for(let v of No(f))!_o.call(s,v)&&v!==p&&_n(s,v,{get:()=>f[v],enumerable:!(h=Go(f,v))||h.enumerable});return s};var Wo=(s,f,p)=>(p=s!=null?Po(Ho(s)):{},zo(f||!s||!s.__esModule?_n(p,"default",{value:s,enumerable:!0}):p,s));var Wn=Ur((Or,zn)=>{(function(s,f){typeof Or=="object"&&typeof zn<"u"?f(Or):typeof define=="function"&&define.amd?define(["exports"],f):f(s.opentype=s.opentype||{})})(Or,(function(s){"use strict";var f=0,p=-3;function h(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function v(e,r){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new h,this.dtree=new h}var x=new h,S=new h,L=new Uint8Array(30),k=new Uint16Array(30),D=new Uint8Array(30),V=new Uint16Array(30),N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W=new h,X=new Uint8Array(320);function ve(e,r,t,n){var a,i;for(a=0;a<t;++a)e[a]=0;for(a=0;a<30-t;++a)e[a+t]=a/t|0;for(i=n,a=0;a<30;++a)r[a]=i,i+=1<<e[a]}function Ae(e,r){var t;for(t=0;t<7;++t)e.table[t]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,t=0;t<24;++t)e.trans[t]=256+t;for(t=0;t<144;++t)e.trans[24+t]=t;for(t=0;t<8;++t)e.trans[168+t]=280+t;for(t=0;t<112;++t)e.trans[176+t]=144+t;for(t=0;t<5;++t)r.table[t]=0;for(r.table[5]=32,t=0;t<32;++t)r.trans[t]=t}var xt=new Uint16Array(16);function Dr(e,r,t,n){var a,i;for(a=0;a<16;++a)e.table[a]=0;for(a=0;a<n;++a)e.table[r[t+a]]++;for(e.table[0]=0,i=0,a=0;a<16;++a)xt[a]=i,i+=e.table[a];for(a=0;a<n;++a)r[t+a]&&(e.trans[xt[r[t+a]]++]=a)}function oa(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var r=e.tag&1;return e.tag>>>=1,r}function Se(e,r,t){if(!r)return t;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-r;return e.tag>>>=r,e.bitcount-=r,n+t}function Ar(e,r){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var t=0,n=0,a=0,i=e.tag;do n=2*n+(i&1),i>>>=1,++a,t+=r.table[a],n-=r.table[a];while(n>=0);return e.tag=i,e.bitcount-=a,r.trans[t+n]}function ua(e,r,t){var n,a,i,o,l,u;for(n=Se(e,5,257),a=Se(e,5,1),i=Se(e,4,4),o=0;o<19;++o)X[o]=0;for(o=0;o<i;++o){var c=Se(e,3,0);X[N[o]]=c}for(Dr(W,X,0,19),l=0;l<n+a;){var d=Ar(e,W);switch(d){case 16:var y=X[l-1];for(u=Se(e,2,3);u;--u)X[l++]=y;break;case 17:for(u=Se(e,3,3);u;--u)X[l++]=0;break;case 18:for(u=Se(e,7,11);u;--u)X[l++]=0;break;default:X[l++]=d;break}}Dr(r,X,0,n),Dr(t,X,n,a)}function St(e,r,t){for(;;){var n=Ar(e,r);if(n===256)return f;if(n<256)e.dest[e.destLen++]=n;else{var a,i,o,l;for(n-=257,a=Se(e,L[n],k[n]),i=Ar(e,t),o=e.destLen-Se(e,D[i],V[i]),l=o;l<o+a;++l)e.dest[e.destLen++]=e.dest[l]}}}function la(e){for(var r,t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(r=e.source[e.sourceIndex+1],r=256*r+e.source[e.sourceIndex],t=e.source[e.sourceIndex+3],t=256*t+e.source[e.sourceIndex+2],r!==(~t&65535))return p;for(e.sourceIndex+=4,n=r;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,f}function fa(e,r){var t=new v(e,r),n,a,i;do{switch(n=oa(t),a=Se(t,2,0),a){case 0:i=la(t);break;case 1:i=St(t,x,S);break;case 2:ua(t,t.ltree,t.dtree),i=St(t,t.ltree,t.dtree);break;default:i=p}if(i!==f)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}Ae(x,S),ve(L,k,4,3),ve(D,V,2,1),L[28]=0,k[28]=258;var pa=fa;function We(e,r,t,n,a){return Math.pow(1-a,3)*e+3*Math.pow(1-a,2)*a*r+3*(1-a)*Math.pow(a,2)*t+Math.pow(a,3)*n}function ke(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}ke.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},ke.prototype.addPoint=function(e,r){typeof e=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))},ke.prototype.addX=function(e){this.addPoint(e,null)},ke.prototype.addY=function(e){this.addPoint(null,e)},ke.prototype.addBezier=function(e,r,t,n,a,i,o,l){var u=this,c=[e,r],d=[t,n],y=[a,i],g=[o,l];this.addPoint(e,r),this.addPoint(o,l);for(var m=0;m<=1;m++){var T=6*c[m]-12*d[m]+6*y[m],O=-3*c[m]+9*d[m]-9*y[m]+3*g[m],F=3*d[m]-3*c[m];if(O===0){if(T===0)continue;var U=-F/T;0<U&&U<1&&(m===0&&u.addX(We(c[m],d[m],y[m],g[m],U)),m===1&&u.addY(We(c[m],d[m],y[m],g[m],U)));continue}var P=Math.pow(T,2)-4*F*O;if(!(P<0)){var I=(-T+Math.sqrt(P))/(2*O);0<I&&I<1&&(m===0&&u.addX(We(c[m],d[m],y[m],g[m],I)),m===1&&u.addY(We(c[m],d[m],y[m],g[m],I)));var H=(-T-Math.sqrt(P))/(2*O);0<H&&H<1&&(m===0&&u.addX(We(c[m],d[m],y[m],g[m],H)),m===1&&u.addY(We(c[m],d[m],y[m],g[m],H)))}}},ke.prototype.addQuad=function(e,r,t,n,a,i){var o=e+.6666666666666666*(t-e),l=r+2/3*(n-r),u=o+1/3*(a-e),c=l+1/3*(i-r);this.addBezier(e,r,o,l,u,c,a,i)};function Z(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Z.prototype.moveTo=function(e,r){this.commands.push({type:"M",x:e,y:r})},Z.prototype.lineTo=function(e,r){this.commands.push({type:"L",x:e,y:r})},Z.prototype.curveTo=Z.prototype.bezierCurveTo=function(e,r,t,n,a,i){this.commands.push({type:"C",x1:e,y1:r,x2:t,y2:n,x:a,y:i})},Z.prototype.quadTo=Z.prototype.quadraticCurveTo=function(e,r,t,n){this.commands.push({type:"Q",x1:e,y1:r,x:t,y:n})},Z.prototype.close=Z.prototype.closePath=function(){this.commands.push({type:"Z"})},Z.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof ke){var r=e;this.moveTo(r.x1,r.y1),this.lineTo(r.x2,r.y1),this.lineTo(r.x2,r.y2),this.lineTo(r.x1,r.y2),this.close();return}Array.prototype.push.apply(this.commands,e)},Z.prototype.getBoundingBox=function(){for(var e=this,r=new ke,t=0,n=0,a=0,i=0,o=0;o<this.commands.length;o++){var l=e.commands[o];switch(l.type){case"M":r.addPoint(l.x,l.y),t=a=l.x,n=i=l.y;break;case"L":r.addPoint(l.x,l.y),a=l.x,i=l.y;break;case"Q":r.addQuad(a,i,l.x1,l.y1,l.x,l.y),a=l.x,i=l.y;break;case"C":r.addBezier(a,i,l.x1,l.y1,l.x2,l.y2,l.x,l.y),a=l.x,i=l.y;break;case"Z":a=t,i=n;break;default:throw new Error("Unexpected path command "+l.type)}}return r.isEmpty()&&r.addPoint(0,0),r},Z.prototype.draw=function(e){var r=this;e.beginPath();for(var t=0;t<this.commands.length;t+=1){var n=r.commands[t];n.type==="M"?e.moveTo(n.x,n.y):n.type==="L"?e.lineTo(n.x,n.y):n.type==="C"?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):n.type==="Q"?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):n.type==="Z"&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},Z.prototype.toPathData=function(e){var r=this;e=e!==void 0?e:2;function t(l){return Math.round(l)===l?""+Math.round(l):l.toFixed(e)}function n(){for(var l=arguments,u="",c=0;c<arguments.length;c+=1){var d=l[c];d>=0&&c>0&&(u+=" "),u+=t(d)}return u}for(var a="",i=0;i<this.commands.length;i+=1){var o=r.commands[i];o.type==="M"?a+="M"+n(o.x,o.y):o.type==="L"?a+="L"+n(o.x,o.y):o.type==="C"?a+="C"+n(o.x1,o.y1,o.x2,o.y2,o.x,o.y):o.type==="Q"?a+="Q"+n(o.x1,o.y1,o.x,o.y):o.type==="Z"&&(a+="Z")}return a},Z.prototype.toSVG=function(e){var r='<path d="';return r+=this.toPathData(e),r+='"',this.fill&&this.fill!=="black"&&(this.fill===null?r+=' fill="none"':r+=' fill="'+this.fill+'"'),this.stroke&&(r+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),r+="/>",r},Z.prototype.toDOMElement=function(e){var r=this.toPathData(e),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",r),t};function Tt(e){throw new Error(e)}function kt(e,r){e||Tt(r)}var G={fail:Tt,argument:kt,assert:kt},Ft=32768,Lt=2147483648,Ve={},E={},M={};function ge(e){return function(){return e}}E.BYTE=function(e){return G.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},M.BYTE=ge(1),E.CHAR=function(e){return[e.charCodeAt(0)]},M.CHAR=ge(1),E.CHARARRAY=function(e){for(var r=[],t=0;t<e.length;t+=1)r[t]=e.charCodeAt(t);return r},M.CHARARRAY=function(e){return e.length},E.USHORT=function(e){return[e>>8&255,e&255]},M.USHORT=ge(2),E.SHORT=function(e){return e>=Ft&&(e=-(2*Ft-e)),[e>>8&255,e&255]},M.SHORT=ge(2),E.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},M.UINT24=ge(3),E.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},M.ULONG=ge(4),E.LONG=function(e){return e>=Lt&&(e=-(2*Lt-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},M.LONG=ge(4),E.FIXED=E.ULONG,M.FIXED=M.ULONG,E.FWORD=E.SHORT,M.FWORD=M.SHORT,E.UFWORD=E.USHORT,M.UFWORD=M.USHORT,E.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},M.LONGDATETIME=ge(8),E.TAG=function(e){return G.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},M.TAG=ge(4),E.Card8=E.BYTE,M.Card8=M.BYTE,E.Card16=E.USHORT,M.Card16=M.USHORT,E.OffSize=E.BYTE,M.OffSize=M.BYTE,E.SID=E.USHORT,M.SID=M.USHORT,E.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?(e=e-108,[(e>>8)+247,e&255]):e>=-1131&&e<=-108?(e=-e-108,[(e>>8)+251,e&255]):e>=-32768&&e<=32767?E.NUMBER16(e):E.NUMBER32(e)},M.NUMBER=function(e){return E.NUMBER(e).length},E.NUMBER16=function(e){return[28,e>>8&255,e&255]},M.NUMBER16=ge(3),E.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},M.NUMBER32=ge(5),E.REAL=function(e){var r=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(r);if(t){var n=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));r=(Math.round(e*n)/n).toString()}for(var a="",i=0,o=r.length;i<o;i+=1){var l=r[i];l==="e"?a+=r[++i]==="-"?"c":"b":l==="."?a+="a":l==="-"?a+="e":a+=l}a+=a.length&1?"f":"ff";for(var u=[30],c=0,d=a.length;c<d;c+=2)u.push(parseInt(a.substr(c,2),16));return u},M.REAL=function(e){return E.REAL(e).length},E.NAME=E.CHARARRAY,M.NAME=M.CHARARRAY,E.STRING=E.CHARARRAY,M.STRING=M.CHARARRAY,Ve.UTF8=function(e,r,t){for(var n=[],a=t,i=0;i<a;i++,r+=1)n[i]=e.getUint8(r);return String.fromCharCode.apply(null,n)},Ve.UTF16=function(e,r,t){for(var n=[],a=t/2,i=0;i<a;i++,r+=2)n[i]=e.getUint16(r);return String.fromCharCode.apply(null,n)},E.UTF16=function(e){for(var r=[],t=0;t<e.length;t+=1){var n=e.charCodeAt(t);r[r.length]=n>>8&255,r[r.length]=n&255}return r},M.UTF16=function(e){return e.length*2};var Mr={"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"};Ve.MACSTRING=function(e,r,t,n){var a=Mr[n];if(a!==void 0){for(var i="",o=0;o<t;o++){var l=e.getUint8(r+o);l<=127?i+=String.fromCharCode(l):i+=a[l&127]}return i}};var fr=typeof WeakMap=="function"&&new WeakMap,pr,ha=function(e){if(!pr){pr={};for(var r in Mr)pr[r]=new String(r)}var t=pr[e];if(t!==void 0){if(fr){var n=fr.get(t);if(n!==void 0)return n}var a=Mr[e];if(a!==void 0){for(var i={},o=0;o<a.length;o++)i[a.charCodeAt(o)]=o+128;return fr&&fr.set(t,i),i}}};E.MACSTRING=function(e,r){var t=ha(r);if(t!==void 0){for(var n=[],a=0;a<e.length;a++){var i=e.charCodeAt(a);if(i>=128&&(i=t[i],i===void 0))return;n[a]=i}return n}},M.MACSTRING=function(e,r){var t=E.MACSTRING(e,r);return t!==void 0?t.length:0};function Br(e){return e>=-128&&e<=127}function ca(e,r,t){for(var n=0,a=e.length;r<a&&n<64&&e[r]===0;)++r,++n;return t.push(128|n-1),r}function va(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var o=e[i];if(!Br(o)||o===0&&i+1<a&&e[i+1]===0)break;++i,++n}t.push(n-1);for(var l=r;l<i;++l)t.push(e[l]+256&255);return i}function da(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var o=e[i];if(o===0||Br(o)&&i+1<a&&Br(e[i+1]))break;++i,++n}t.push(64|n-1);for(var l=r;l<i;++l){var u=e[l];t.push(u+65536>>8&255,u+256&255)}return i}E.VARDELTAS=function(e){for(var r=0,t=[];r<e.length;){var n=e[r];n===0?r=ca(e,r,t):n>=-128&&n<=127?r=va(e,r,t):r=da(e,r,t)}return t},E.INDEX=function(e){for(var r=1,t=[r],n=[],a=0;a<e.length;a+=1){var i=E.OBJECT(e[a]);Array.prototype.push.apply(n,i),r+=i.length,t.push(r)}if(n.length===0)return[0,0];for(var o=[],l=1+Math.floor(Math.log(r)/Math.log(2))/8|0,u=[void 0,E.BYTE,E.USHORT,E.UINT24,E.ULONG][l],c=0;c<t.length;c+=1){var d=u(t[c]);Array.prototype.push.apply(o,d)}return Array.prototype.concat(E.Card16(e.length),E.OffSize(l),o,n)},M.INDEX=function(e){return E.INDEX(e).length},E.DICT=function(e){for(var r=[],t=Object.keys(e),n=t.length,a=0;a<n;a+=1){var i=parseInt(t[a],0),o=e[i];r=r.concat(E.OPERAND(o.value,o.type)),r=r.concat(E.OPERATOR(i))}return r},M.DICT=function(e){return E.DICT(e).length},E.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},E.OPERAND=function(e,r){var t=[];if(Array.isArray(r))for(var n=0;n<r.length;n+=1)G.argument(e.length===r.length,"Not enough arguments given for type"+r),t=t.concat(E.OPERAND(e[n],r[n]));else if(r==="SID")t=t.concat(E.NUMBER(e));else if(r==="offset")t=t.concat(E.NUMBER32(e));else if(r==="number")t=t.concat(E.NUMBER(e));else if(r==="real")t=t.concat(E.REAL(e));else throw new Error("Unknown operand type "+r);return t},E.OP=E.BYTE,M.OP=M.BYTE;var hr=typeof WeakMap=="function"&&new WeakMap;E.CHARSTRING=function(e){if(hr){var r=hr.get(e);if(r!==void 0)return r}for(var t=[],n=e.length,a=0;a<n;a+=1){var i=e[a];t=t.concat(E[i.type](i.value))}return hr&&hr.set(e,t),t},M.CHARSTRING=function(e){return E.CHARSTRING(e).length},E.OBJECT=function(e){var r=E[e.type];return G.argument(r!==void 0,"No encoding function for type "+e.type),r(e.value)},M.OBJECT=function(e){var r=M[e.type];return G.argument(r!==void 0,"No sizeOf function for type "+e.type),r(e.value)},E.TABLE=function(e){for(var r=[],t=e.fields.length,n=[],a=[],i=0;i<t;i+=1){var o=e.fields[i],l=E[o.type];G.argument(l!==void 0,"No encoding function for field type "+o.type+" ("+o.name+")");var u=e[o.name];u===void 0&&(u=o.value);var c=l(u);o.type==="TABLE"?(a.push(r.length),r=r.concat([0,0]),n.push(c)):r=r.concat(c)}for(var d=0;d<n.length;d+=1){var y=a[d],g=r.length;G.argument(g<65536,"Table "+e.tableName+" too big."),r[y]=g>>8,r[y+1]=g&255,r=r.concat(n[d])}return r},M.TABLE=function(e){for(var r=0,t=e.fields.length,n=0;n<t;n+=1){var a=e.fields[n],i=M[a.type];G.argument(i!==void 0,"No sizeOf function for field type "+a.type+" ("+a.name+")");var o=e[a.name];o===void 0&&(o=a.value),r+=i(o),a.type==="TABLE"&&(r+=2)}return r},E.RECORD=E.TABLE,M.RECORD=M.TABLE,E.LITERAL=function(e){return e},M.LITERAL=function(e){return e.length};function ee(e,r,t){for(var n=this,a=0;a<r.length;a+=1){var i=r[a];n[i.name]=i.value}if(this.tableName=e,this.fields=r,t)for(var o=Object.keys(t),l=0;l<o.length;l+=1){var u=o[l],c=t[u];n[u]!==void 0&&(n[u]=c)}}ee.prototype.encode=function(){return E.TABLE(this)},ee.prototype.sizeOf=function(){return M.TABLE(this)};function $e(e,r,t){t===void 0&&(t=r.length);var n=new Array(r.length+1);n[0]={name:e+"Count",type:"USHORT",value:t};for(var a=0;a<r.length;a++)n[a+1]={name:e+a,type:"USHORT",value:r[a]};return n}function Pr(e,r,t){var n=r.length,a=new Array(n+1);a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a[i+1]={name:e+i,type:"TABLE",value:t(r[i],i)};return a}function cr(e,r,t){var n=r.length,a=[];a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a=a.concat(t(r[i],i));return a}function vr(e){e.format===1?ee.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat($e("glyph",e.glyphs))):G.assert(!1,"Can't create coverage table format 2 yet.")}vr.prototype=Object.create(ee.prototype),vr.prototype.constructor=vr;function dr(e){ee.call(this,"scriptListTable",cr("scriptRecord",e,function(r,t){var n=r.script,a=n.defaultLangSys;return G.assert(!!a,"Unable to write GSUB: script "+r.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:r.tag},{name:"script"+t,type:"TABLE",value:new ee("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new ee("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat($e("featureIndex",a.featureIndexes)))}].concat(cr("langSys",n.langSysRecords,function(i,o){var l=i.langSys;return[{name:"langSysTag"+o,type:"TAG",value:i.tag},{name:"langSys"+o,type:"TABLE",value:new ee("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:l.reqFeatureIndex}].concat($e("featureIndex",l.featureIndexes)))}]})))}]}))}dr.prototype=Object.create(ee.prototype),dr.prototype.constructor=dr;function gr(e){ee.call(this,"featureListTable",cr("featureRecord",e,function(r,t){var n=r.feature;return[{name:"featureTag"+t,type:"TAG",value:r.tag},{name:"feature"+t,type:"TABLE",value:new ee("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat($e("lookupListIndex",n.lookupListIndexes)))}]}))}gr.prototype=Object.create(ee.prototype),gr.prototype.constructor=gr;function mr(e,r){ee.call(this,"lookupListTable",Pr("lookup",e,function(t){var n=r[t.lookupType];return G.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new ee("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(Pr("subtable",t.subtables,n)))}))}mr.prototype=Object.create(ee.prototype),mr.prototype.constructor=mr;var A={Table:ee,Record:ee,Coverage:vr,ScriptList:dr,FeatureList:gr,LookupList:mr,ushortList:$e,tableList:Pr,recordList:cr};function Et(e,r){return e.getUint8(r)}function yr(e,r){return e.getUint16(r,!1)}function ga(e,r){return e.getInt16(r,!1)}function Gr(e,r){return e.getUint32(r,!1)}function Ut(e,r){var t=e.getInt16(r,!1),n=e.getUint16(r+2,!1);return t+n/65535}function ma(e,r){for(var t="",n=r;n<r+4;n+=1)t+=String.fromCharCode(e.getInt8(n));return t}function ya(e,r,t){for(var n=0,a=0;a<t;a+=1)n<<=8,n+=e.getUint8(r+a);return n}function ba(e,r,t){for(var n=[],a=r;a<t;a+=1)n.push(e.getUint8(a));return n}function xa(e){for(var r="",t=0;t<e.length;t+=1)r+=String.fromCharCode(e[t]);return r}var Sa={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function b(e,r){this.data=e,this.offset=r,this.relativeOffset=0}b.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},b.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},b.prototype.parseCard8=b.prototype.parseByte,b.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},b.prototype.parseCard16=b.prototype.parseUShort,b.prototype.parseSID=b.prototype.parseUShort,b.prototype.parseOffset16=b.prototype.parseUShort,b.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},b.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},b.prototype.parseULong=function(){var e=Gr(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},b.prototype.parseOffset32=b.prototype.parseULong,b.prototype.parseFixed=function(){var e=Ut(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},b.prototype.parseString=function(e){var r=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var a=0;a<e;a++)n+=String.fromCharCode(r.getUint8(t+a));return n},b.prototype.parseTag=function(){return this.parseString(4)},b.prototype.parseLongDateTime=function(){var e=Gr(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},b.prototype.parseVersion=function(e){var r=yr(this.data,this.offset+this.relativeOffset),t=yr(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),r+t/e/10},b.prototype.skip=function(e,r){r===void 0&&(r=1),this.relativeOffset+=Sa[e]*r},b.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint32(n),n+=4;return this.relativeOffset+=e*4,r},b.prototype.parseOffset16List=b.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint16(n),n+=2;return this.relativeOffset+=e*2,r},b.prototype.parseShortList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getInt16(n),n+=2;return this.relativeOffset+=e*2,r},b.prototype.parseByteList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint8(n++);return this.relativeOffset+=e,r},b.prototype.parseList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},b.prototype.parseList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},b.prototype.parseRecordList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var o={},l=0;l<a.length;l++){var u=a[l],c=r[u];o[u]=c.call(t)}n[i]=o}return n},b.prototype.parseRecordList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var o={},l=0;l<a.length;l++){var u=a[l],c=r[u];o[u]=c.call(t)}n[i]=o}return n},b.prototype.parseStruct=function(e){var r=this;if(typeof e=="function")return e.call(this);for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var i=t[a],o=e[i];n[i]=o.call(r)}return n},b.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e!==0){var r={};return e&1&&(r.xPlacement=this.parseShort()),e&2&&(r.yPlacement=this.parseShort()),e&4&&(r.xAdvance=this.parseShort()),e&8&&(r.yAdvance=this.parseShort()),e&16&&(r.xPlaDevice=void 0,this.parseShort()),e&32&&(r.yPlaDevice=void 0,this.parseShort()),e&64&&(r.xAdvDevice=void 0,this.parseShort()),e&128&&(r.yAdvDevice=void 0,this.parseShort()),r}},b.prototype.parseValueRecordList=function(){for(var e=this,r=this.parseUShort(),t=this.parseUShort(),n=new Array(t),a=0;a<t;a++)n[a]=e.parseValueRecord(r);return n},b.prototype.parsePointer=function(e){var r=this.parseOffset16();if(r>0)return new b(this.data,this.offset+r).parseStruct(e)},b.prototype.parsePointer32=function(e){var r=this.parseOffset32();if(r>0)return new b(this.data,this.offset+r).parseStruct(e)},b.prototype.parseListOfLists=function(e){for(var r=this,t=this.parseOffset16List(),n=t.length,a=this.relativeOffset,i=new Array(n),o=0;o<n;o++){var l=t[o];if(l===0){i[o]=void 0;continue}if(r.relativeOffset=l,e){for(var u=r.parseOffset16List(),c=new Array(u.length),d=0;d<u.length;d++)r.relativeOffset=l+u[d],c[d]=e.call(r);i[o]=c}else i[o]=r.parseUShortList()}return this.relativeOffset=a,i},b.prototype.parseCoverage=function(){var e=this,r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(t===1)return{format:1,glyphs:this.parseUShortList(n)};if(t===2){for(var a=new Array(n),i=0;i<n;i++)a[i]={start:e.parseUShort(),end:e.parseUShort(),index:e.parseUShort()};return{format:2,ranges:a}}throw new Error("0x"+r.toString(16)+": Coverage format must be 1 or 2.")},b.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,r=this.parseUShort();if(r===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(r===2)return{format:2,ranges:this.parseRecordList({start:b.uShort,end:b.uShort,classId:b.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},b.list=function(e,r){return function(){return this.parseList(e,r)}},b.list32=function(e,r){return function(){return this.parseList32(e,r)}},b.recordList=function(e,r){return function(){return this.parseRecordList(e,r)}},b.recordList32=function(e,r){return function(){return this.parseRecordList32(e,r)}},b.pointer=function(e){return function(){return this.parsePointer(e)}},b.pointer32=function(e){return function(){return this.parsePointer32(e)}},b.tag=b.prototype.parseTag,b.byte=b.prototype.parseByte,b.uShort=b.offset16=b.prototype.parseUShort,b.uShortList=b.prototype.parseUShortList,b.uLong=b.offset32=b.prototype.parseULong,b.uLongList=b.prototype.parseULongList,b.struct=b.prototype.parseStruct,b.coverage=b.prototype.parseCoverage,b.classDef=b.prototype.parseClassDef;var Ot={reserved:b.uShort,reqFeatureIndex:b.uShort,featureIndexes:b.uShortList};b.prototype.parseScriptList=function(){return this.parsePointer(b.recordList({tag:b.tag,script:b.pointer({defaultLangSys:b.pointer(Ot),langSysRecords:b.recordList({tag:b.tag,langSys:b.pointer(Ot)})})}))||[]},b.prototype.parseFeatureList=function(){return this.parsePointer(b.recordList({tag:b.tag,feature:b.pointer({featureParams:b.offset16,lookupListIndexes:b.uShortList})}))||[]},b.prototype.parseLookupList=function(e){return this.parsePointer(b.list(b.pointer(function(){var r=this.parseUShort();G.argument(1<=r&&r<=9,"GPOS/GSUB lookup type "+r+" unknown.");var t=this.parseUShort(),n=t&16;return{lookupType:r,lookupFlag:t,subtables:this.parseList(b.pointer(e[r])),markFilteringSet:n?this.parseUShort():void 0}})))||[]},b.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),r=this.parseUShort();G.argument(e===1&&r<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:b.offset32,featureTableSubstitutionOffset:b.offset32});return t})||[]};var w={getByte:Et,getCard8:Et,getUShort:yr,getCard16:yr,getShort:ga,getULong:Gr,getFixed:Ut,getTag:ma,getOffset:ya,getBytes:ba,bytesToString:xa,Parser:b};function Ta(e,r){r.parseUShort(),e.length=r.parseULong(),e.language=r.parseULong();var t;e.groupCount=t=r.parseULong(),e.glyphIndexMap={};for(var n=0;n<t;n+=1)for(var a=r.parseULong(),i=r.parseULong(),o=r.parseULong(),l=a;l<=i;l+=1)e.glyphIndexMap[l]=o,o++}function ka(e,r,t,n,a){e.length=r.parseUShort(),e.language=r.parseUShort();var i;e.segCount=i=r.parseUShort()>>1,r.skip("uShort",3),e.glyphIndexMap={};for(var o=new w.Parser(t,n+a+14),l=new w.Parser(t,n+a+16+i*2),u=new w.Parser(t,n+a+16+i*4),c=new w.Parser(t,n+a+16+i*6),d=n+a+16+i*8,y=0;y<i-1;y+=1)for(var g=void 0,m=o.parseUShort(),T=l.parseUShort(),O=u.parseShort(),F=c.parseUShort(),U=T;U<=m;U+=1)F!==0?(d=c.offset+c.relativeOffset-2,d+=F,d+=(U-T)*2,g=w.getUShort(t,d),g!==0&&(g=g+O&65535)):g=U+O&65535,e.glyphIndexMap[U]=g}function Fa(e,r){var t={};t.version=w.getUShort(e,r),G.argument(t.version===0,"cmap table version should be 0."),t.numTables=w.getUShort(e,r+2);for(var n=-1,a=t.numTables-1;a>=0;a-=1){var i=w.getUShort(e,r+4+a*8),o=w.getUShort(e,r+4+a*8+2);if(i===3&&(o===0||o===1||o===10)){n=w.getULong(e,r+4+a*8+4);break}}if(n===-1)throw new Error("No valid cmap sub-tables found.");var l=new w.Parser(e,r+n);if(t.format=l.parseUShort(),t.format===12)Ta(t,l);else if(t.format===4)ka(t,l,e,r,n);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function La(e,r,t){e.segments.push({end:r,start:r,delta:-(r-t),offset:0,glyphIndex:t})}function Ea(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Ua(e){var r=!0,t;for(t=e.length-1;t>0;t-=1){var n=e.get(t);if(n.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}}var a=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:r?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:r?12:20}];r||(a=a.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),a=a.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}]);var i=new A.Table("cmap",a);for(i.segments=[],t=0;t<e.length;t+=1){for(var o=e.get(t),l=0;l<o.unicodes.length;l+=1)La(i,o.unicodes[l],t);i.segments=i.segments.sort(function(P,I){return P.start-I.start})}Ea(i);var u=i.segments.length,c=0,d=[],y=[],g=[],m=[],T=[],O=[];for(t=0;t<u;t+=1){var F=i.segments[t];F.end<=65535&&F.start<=65535?(d=d.concat({name:"end_"+t,type:"USHORT",value:F.end}),y=y.concat({name:"start_"+t,type:"USHORT",value:F.start}),g=g.concat({name:"idDelta_"+t,type:"SHORT",value:F.delta}),m=m.concat({name:"idRangeOffset_"+t,type:"USHORT",value:F.offset}),F.glyphId!==void 0&&(T=T.concat({name:"glyph_"+t,type:"USHORT",value:F.glyphId}))):c+=1,!r&&F.glyphIndex!==void 0&&(O=O.concat({name:"cmap12Start_"+t,type:"ULONG",value:F.start}),O=O.concat({name:"cmap12End_"+t,type:"ULONG",value:F.end}),O=O.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:F.glyphIndex}))}if(i.segCountX2=(u-c)*2,i.searchRange=Math.pow(2,Math.floor(Math.log(u-c)/Math.log(2)))*2,i.entrySelector=Math.log(i.searchRange/2)/Math.log(2),i.rangeShift=i.segCountX2-i.searchRange,i.fields=i.fields.concat(d),i.fields.push({name:"reservedPad",type:"USHORT",value:0}),i.fields=i.fields.concat(y),i.fields=i.fields.concat(g),i.fields=i.fields.concat(m),i.fields=i.fields.concat(T),i.cmap4Length=14+d.length*2+2+y.length*2+g.length*2+m.length*2+T.length*2,!r){var U=16+O.length*4;i.cmap12Offset=20+i.cmap4Length,i.fields=i.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:U},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:O.length/3}]),i.fields=i.fields.concat(O)}return i}var It={parse:Fa,make:Ua},br=[".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","266 ff","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"],Oa=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Ia=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Me=[".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 Ct(e){this.font=e}Ct.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.font.glyphs;if(t){for(var n=0;n<t.length;n+=1)for(var a=t.get(n),i=0;i<a.unicodes.length;i+=1)if(a.unicodes[i]===r)return n}return null};function wt(e){this.cmap=e}wt.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.charCodeAt(0)]||0};function xr(e,r){this.encoding=e,this.charset=r}xr.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.encoding[r];return this.charset.indexOf(t)};function Nr(e){var r=this;switch(e.version){case 1:this.names=Me.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<Me.length?r.names[t]=Me[e.glyphNameIndex[t]]:r.names[t]=e.names[e.glyphNameIndex[t]-Me.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var n=0;n<e.numberOfGlyphs;n++)r.names[n]=Me[n+e.glyphNameIndex[n]];break;case 3:this.names=[];break;default:this.names=[];break}}Nr.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},Nr.prototype.glyphIndexToName=function(e){return this.names[e]};function Ca(e){for(var r,t=e.tables.cmap.glyphIndexMap,n=Object.keys(t),a=0;a<n.length;a+=1){var i=n[a],o=t[i];r=e.glyphs.get(o),r.addUnicode(parseInt(i))}for(var l=0;l<e.glyphs.length;l+=1)r=e.glyphs.get(l),e.cffEncoding?e.isCIDFont?r.name="gid"+l:r.name=e.cffEncoding.charset[l]:e.glyphNames.names&&(r.name=e.glyphNames.glyphIndexToName(l))}function wa(e,r,t,n,a){e.beginPath(),e.moveTo(r,t),e.lineTo(n,a),e.stroke()}var Be={line:wa};function Rt(e,r,t,n,a){var i;return(r&n)>0?(i=e.parseByte(),(r&a)===0&&(i=-i),i=t+i):(r&a)>0?i=t:i=t+e.parseShort(),i}function Ra(e,r,t){var n=new w.Parser(r,t);e.numberOfContours=n.parseShort(),e._xMin=n.parseShort(),e._yMin=n.parseShort(),e._xMax=n.parseShort(),e._yMax=n.parseShort();var a,i;if(e.numberOfContours>0){for(var o=e.endPointIndices=[],l=0;l<e.numberOfContours;l+=1)o.push(n.parseUShort());e.instructionLength=n.parseUShort(),e.instructions=[];for(var u=0;u<e.instructionLength;u+=1)e.instructions.push(n.parseByte());var c=o[o.length-1]+1;a=[];for(var d=0;d<c;d+=1)if(i=n.parseByte(),a.push(i),(i&8)>0)for(var y=n.parseByte(),g=0;g<y;g+=1)a.push(i),d+=1;if(G.argument(a.length===c,"Bad flags."),o.length>0){var m=[],T;if(c>0){for(var O=0;O<c;O+=1)i=a[O],T={},T.onCurve=!!(i&1),T.lastPointOfContour=o.indexOf(O)>=0,m.push(T);for(var F=0,U=0;U<c;U+=1)i=a[U],T=m[U],T.x=Rt(n,i,F,2,16),F=T.x;for(var P=0,I=0;I<c;I+=1)i=a[I],T=m[I],T.y=Rt(n,i,P,4,32),P=T.y}e.points=m}else e.points=[]}else if(e.numberOfContours===0)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var H=!0;H;){a=n.parseUShort();var R={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(a&1)>0?(a&2)>0?(R.dx=n.parseShort(),R.dy=n.parseShort()):R.matchedPoints=[n.parseUShort(),n.parseUShort()]:(a&2)>0?(R.dx=n.parseChar(),R.dy=n.parseChar()):R.matchedPoints=[n.parseByte(),n.parseByte()],(a&8)>0?R.xScale=R.yScale=n.parseF2Dot14():(a&64)>0?(R.xScale=n.parseF2Dot14(),R.yScale=n.parseF2Dot14()):(a&128)>0&&(R.xScale=n.parseF2Dot14(),R.scale01=n.parseF2Dot14(),R.scale10=n.parseF2Dot14(),R.yScale=n.parseF2Dot14()),e.components.push(R),H=!!(a&32)}if(a&256){e.instructionLength=n.parseUShort(),e.instructions=[];for(var B=0;B<e.instructionLength;B+=1)e.instructions.push(n.parseByte())}}}function Hr(e,r){for(var t=[],n=0;n<e.length;n+=1){var a=e[n],i={x:r.xScale*a.x+r.scale01*a.y+r.dx,y:r.scale10*a.x+r.yScale*a.y+r.dy,onCurve:a.onCurve,lastPointOfContour:a.lastPointOfContour};t.push(i)}return t}function Da(e){for(var r=[],t=[],n=0;n<e.length;n+=1){var a=e[n];t.push(a),a.lastPointOfContour&&(r.push(t),t=[])}return G.argument(t.length===0,"There are still points left in the current contour."),r}function Dt(e){var r=new Z;if(!e)return r;for(var t=Da(e),n=0;n<t.length;++n){var a=t[n],i=null,o=a[a.length-1],l=a[0];if(o.onCurve)r.moveTo(o.x,o.y);else if(l.onCurve)r.moveTo(l.x,l.y);else{var u={x:(o.x+l.x)*.5,y:(o.y+l.y)*.5};r.moveTo(u.x,u.y)}for(var c=0;c<a.length;++c)if(i=o,o=l,l=a[(c+1)%a.length],o.onCurve)r.lineTo(o.x,o.y);else{var d=i,y=l;i.onCurve||(d={x:(o.x+i.x)*.5,y:(o.y+i.y)*.5},r.lineTo(d.x,d.y)),l.onCurve||(y={x:(o.x+l.x)*.5,y:(o.y+l.y)*.5}),r.lineTo(d.x,d.y),r.quadraticCurveTo(o.x,o.y,y.x,y.y)}r.closePath()}return r}function Aa(e,r){if(r.isComposite)for(var t=0;t<r.components.length;t+=1){var n=r.components[t],a=e.get(n.glyphIndex);if(a.getPath(),a.points){var i=void 0;if(n.matchedPoints===void 0)i=Hr(a.points,n);else{if(n.matchedPoints[0]>r.points.length-1||n.matchedPoints[1]>a.points.length-1)throw Error("Matched points out of range in "+r.name);var o=r.points[n.matchedPoints[0]],l=a.points[n.matchedPoints[1]],u={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};l=Hr([l],u)[0],u.dx=o.x-l.x,u.dy=o.y-l.y,i=Hr(a.points,u)}r.points=r.points.concat(i)}}return Dt(r.points)}function Ma(e,r,t,n){for(var a=new qe.GlyphSet(n),i=0;i<t.length-1;i+=1){var o=t[i],l=t[i+1];o!==l?a.push(i,qe.ttfGlyphLoader(n,i,Ra,e,r+o,Aa)):a.push(i,qe.glyphLoader(n,i))}return a}var At={getPath:Dt,parse:Ma};function Ba(e,r){var t=r||new Z;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(n){t=n}}}function fe(e){this.bindConstructorValues(e)}fe.prototype.bindConstructorValues=function(e){this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||e.unicode!==void 0?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",Ba(this,e.path))},fe.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicode=e),this.unicodes.push(e)},fe.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},fe.prototype.getPath=function(e,r,t,n,a){e=e!==void 0?e:0,r=r!==void 0?r:0,t=t!==void 0?t:72;var i,o;n||(n={});var l=n.xScale,u=n.yScale;if(n.hinting&&a&&a.hinting&&(o=this.path&&a.hinting.exec(this,t)),o)i=At.getPath(o).commands,e=Math.round(e),r=Math.round(r),l=u=1;else{i=this.path.commands;var c=1/this.path.unitsPerEm*t;l===void 0&&(l=c),u===void 0&&(u=c)}for(var d=new Z,y=0;y<i.length;y+=1){var g=i[y];g.type==="M"?d.moveTo(e+g.x*l,r+-g.y*u):g.type==="L"?d.lineTo(e+g.x*l,r+-g.y*u):g.type==="Q"?d.quadraticCurveTo(e+g.x1*l,r+-g.y1*u,e+g.x*l,r+-g.y*u):g.type==="C"?d.curveTo(e+g.x1*l,r+-g.y1*u,e+g.x2*l,r+-g.y2*u,e+g.x*l,r+-g.y*u):g.type==="Z"&&d.closePath()}return d},fe.prototype.getContours=function(){var e=this;if(this.points===void 0)return[];for(var r=[],t=[],n=0;n<this.points.length;n+=1){var a=e.points[n];t.push(a),a.lastPointOfContour&&(r.push(t),t=[])}return G.argument(t.length===0,"There are still points left in the current contour."),r},fe.prototype.getMetrics=function(){for(var e=this.path.commands,r=[],t=[],n=0;n<e.length;n+=1){var a=e[n];a.type!=="Z"&&(r.push(a.x),t.push(a.y)),(a.type==="Q"||a.type==="C")&&(r.push(a.x1),t.push(a.y1)),a.type==="C"&&(r.push(a.x2),t.push(a.y2))}var i={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,t),leftSideBearing:this.leftSideBearing};return isFinite(i.xMin)||(i.xMin=0),isFinite(i.xMax)||(i.xMax=this.advanceWidth),isFinite(i.yMin)||(i.yMin=0),isFinite(i.yMax)||(i.yMax=0),i.rightSideBearing=this.advanceWidth-i.leftSideBearing-(i.xMax-i.xMin),i},fe.prototype.draw=function(e,r,t,n,a){this.getPath(r,t,n,a).draw(e)},fe.prototype.drawPoints=function(e,r,t,n){function a(y,g,m,T){var O=Math.PI*2;e.beginPath();for(var F=0;F<y.length;F+=1)e.moveTo(g+y[F].x*T,m+y[F].y*T),e.arc(g+y[F].x*T,m+y[F].y*T,2,0,O,!1);e.closePath(),e.fill()}r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:24;for(var i=1/this.path.unitsPerEm*n,o=[],l=[],u=this.path,c=0;c<u.commands.length;c+=1){var d=u.commands[c];d.x!==void 0&&o.push({x:d.x,y:-d.y}),d.x1!==void 0&&l.push({x:d.x1,y:-d.y1}),d.x2!==void 0&&l.push({x:d.x2,y:-d.y2})}e.fillStyle="blue",a(o,r,t,i),e.fillStyle="red",a(l,r,t,i)},fe.prototype.drawMetrics=function(e,r,t,n){var a;r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:24,a=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",Be.line(e,r,-1e4,r,1e4),Be.line(e,-1e4,t,1e4,t);var i=this.xMin||0,o=this.yMin||0,l=this.xMax||0,u=this.yMax||0,c=this.advanceWidth||0;e.strokeStyle="blue",Be.line(e,r+i*a,-1e4,r+i*a,1e4),Be.line(e,r+l*a,-1e4,r+l*a,1e4),Be.line(e,-1e4,t+-o*a,1e4,t+-o*a),Be.line(e,-1e4,t+-u*a,1e4,t+-u*a),e.strokeStyle="green",Be.line(e,r+c*a,-1e4,r+c*a,1e4)};function Sr(e,r,t){Object.defineProperty(e,r,{get:function(){return e.path,e[t]},set:function(n){e[t]=n},enumerable:!0,configurable:!0})}function _r(e,r){var t=this;if(this.font=e,this.glyphs={},Array.isArray(r))for(var n=0;n<r.length;n++)t.glyphs[n]=r[n];this.length=r&&r.length||0}_r.prototype.get=function(e){return typeof this.glyphs[e]=="function"&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},_r.prototype.push=function(e,r){this.glyphs[e]=r,this.length++};function Pa(e,r){return new fe({index:r,font:e})}function Ga(e,r,t,n,a,i){return function(){var o=new fe({index:r,font:e});return o.path=function(){t(o,n,a);var l=i(e.glyphs,o);return l.unitsPerEm=e.unitsPerEm,l},Sr(o,"xMin","_xMin"),Sr(o,"xMax","_xMax"),Sr(o,"yMin","_yMin"),Sr(o,"yMax","_yMax"),o}}function Na(e,r,t,n){return function(){var a=new fe({index:r,font:e});return a.path=function(){var i=t(e,a,n);return i.unitsPerEm=e.unitsPerEm,i},a}}var qe={GlyphSet:_r,glyphLoader:Pa,ttfGlyphLoader:Ga,cffGlyphLoader:Na};function Mt(e,r){if(e===r)return!0;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t+=1)if(!Mt(e[t],r[t]))return!1;return!0}else return!1}function zr(e){var r;return e.length<1240?r=107:e.length<33900?r=1131:r=32768,r}function Oe(e,r,t){var n=[],a=[],i=w.getCard16(e,r),o,l;if(i!==0){var u=w.getByte(e,r+2);o=r+(i+1)*u+2;for(var c=r+3,d=0;d<i+1;d+=1)n.push(w.getOffset(e,c,u)),c+=u;l=o+n[i]}else l=r+2;for(var y=0;y<n.length-1;y+=1){var g=w.getBytes(e,o+n[y],o+n[y+1]);t&&(g=t(g)),a.push(g)}return{objects:a,startOffset:r,endOffset:l}}function Ha(e){for(var r="",t=15,n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var a=e.parseByte(),i=a>>4,o=a&15;if(i===t||(r+=n[i],o===t))break;r+=n[o]}return parseFloat(r)}function _a(e,r){var t,n,a,i;if(r===28)return t=e.parseByte(),n=e.parseByte(),t<<8|n;if(r===29)return t=e.parseByte(),n=e.parseByte(),a=e.parseByte(),i=e.parseByte(),t<<24|n<<16|a<<8|i;if(r===30)return Ha(e);if(r>=32&&r<=246)return r-139;if(r>=247&&r<=250)return t=e.parseByte(),(r-247)*256+t+108;if(r>=251&&r<=254)return t=e.parseByte(),-(r-251)*256-t-108;throw new Error("Invalid b0 "+r)}function za(e){for(var r={},t=0;t<e.length;t+=1){var n=e[t][0],a=e[t][1],i=void 0;if(a.length===1?i=a[0]:i=a,r.hasOwnProperty(n)&&!isNaN(r[n]))throw new Error("Object "+r+" already has key "+n);r[n]=i}return r}function Bt(e,r,t){r=r!==void 0?r:0;var n=new w.Parser(e,r),a=[],i=[];for(t=t!==void 0?t:e.length;n.relativeOffset<t;){var o=n.parseByte();o<=21?(o===12&&(o=1200+n.parseByte()),a.push([o,i]),i=[]):i.push(_a(n,o))}return za(a)}function er(e,r){return r<=390?r=br[r]:r=e[r-391],r}function Pt(e,r,t){for(var n={},a,i=0;i<r.length;i+=1){var o=r[i];if(Array.isArray(o.type)){var l=[];l.length=o.type.length;for(var u=0;u<o.type.length;u++)a=e[o.op]!==void 0?e[o.op][u]:void 0,a===void 0&&(a=o.value!==void 0&&o.value[u]!==void 0?o.value[u]:null),o.type[u]==="SID"&&(a=er(t,a)),l[u]=a;n[o.name]=l}else a=e[o.op],a===void 0&&(a=o.value!==void 0?o.value:null),o.type==="SID"&&(a=er(t,a)),n[o.name]=a}return n}function Wa(e,r){var t={};return t.formatMajor=w.getCard8(e,r),t.formatMinor=w.getCard8(e,r+1),t.size=w.getCard8(e,r+2),t.offsetSize=w.getCard8(e,r+3),t.startOffset=r,t.endOffset=r+4,t}var Gt=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Nt=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Va(e,r){var t=Bt(e,0,e.byteLength);return Pt(t,Gt,r)}function Ht(e,r,t,n){var a=Bt(e,r,t);return Pt(a,Nt,n)}function _t(e,r,t,n){for(var a=[],i=0;i<t.length;i+=1){var o=new DataView(new Uint8Array(t[i]).buffer),l=Va(o,n);l._subrs=[],l._subrsBias=0;var u=l.private[0],c=l.private[1];if(u!==0&&c!==0){var d=Ht(e,c+r,u,n);if(l._defaultWidthX=d.defaultWidthX,l._nominalWidthX=d.nominalWidthX,d.subrs!==0){var y=c+d.subrs,g=Oe(e,y+r);l._subrs=g.objects,l._subrsBias=zr(l._subrs)}l._privateDict=d}a.push(l)}return a}function qa(e,r,t,n){var a,i,o=new w.Parser(e,r);t-=1;var l=[".notdef"],u=o.parseCard8();if(u===0)for(var c=0;c<t;c+=1)a=o.parseSID(),l.push(er(n,a));else if(u===1)for(;l.length<=t;){a=o.parseSID(),i=o.parseCard8();for(var d=0;d<=i;d+=1)l.push(er(n,a)),a+=1}else if(u===2)for(;l.length<=t;){a=o.parseSID(),i=o.parseCard16();for(var y=0;y<=i;y+=1)l.push(er(n,a)),a+=1}else throw new Error("Unknown charset format "+u);return l}function Xa(e,r,t){var n,a={},i=new w.Parser(e,r),o=i.parseCard8();if(o===0)for(var l=i.parseCard8(),u=0;u<l;u+=1)n=i.parseCard8(),a[n]=u;else if(o===1){var c=i.parseCard8();n=1;for(var d=0;d<c;d+=1)for(var y=i.parseCard8(),g=i.parseCard8(),m=y;m<=y+g;m+=1)a[m]=n,n+=1}else throw new Error("Unknown encoding format "+o);return new xr(a,t)}function Ya(e,r,t){var n,a,i,o,l=new Z,u=[],c=0,d=!1,y=!1,g=0,m=0,T,O,F,U;if(e.isCIDFont){var P=e.tables.cff.topDict._fdSelect[r.index],I=e.tables.cff.topDict._fdArray[P];T=I._subrs,O=I._subrsBias,F=I._defaultWidthX,U=I._nominalWidthX}else T=e.tables.cff.topDict._subrs,O=e.tables.cff.topDict._subrsBias,F=e.tables.cff.topDict._defaultWidthX,U=e.tables.cff.topDict._nominalWidthX;var H=F;function R(q,K){y&&l.closePath(),l.moveTo(q,K),y=!0}function B(){var q;q=u.length%2!==0,q&&!d&&(H=u.shift()+U),c+=u.length>>1,u.length=0,d=!0}function ue(q){for(var K,se,le,pe,de,J,j,re,te,ne,oe,he,Y=0;Y<q.length;){var ae=q[Y];switch(Y+=1,ae){case 1:B();break;case 3:B();break;case 4:u.length>1&&!d&&(H=u.shift()+U,d=!0),m+=u.pop(),R(g,m);break;case 5:for(;u.length>0;)g+=u.shift(),m+=u.shift(),l.lineTo(g,m);break;case 6:for(;u.length>0&&(g+=u.shift(),l.lineTo(g,m),u.length!==0);)m+=u.shift(),l.lineTo(g,m);break;case 7:for(;u.length>0&&(m+=u.shift(),l.lineTo(g,m),u.length!==0);)g+=u.shift(),l.lineTo(g,m);break;case 8:for(;u.length>0;)n=g+u.shift(),a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),g=i+u.shift(),m=o+u.shift(),l.curveTo(n,a,i,o,g,m);break;case 10:de=u.pop()+O,J=T[de],J&&ue(J);break;case 11:return;case 12:switch(ae=q[Y],Y+=1,ae){case 35:n=g+u.shift(),a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),j=i+u.shift(),re=o+u.shift(),te=j+u.shift(),ne=re+u.shift(),oe=te+u.shift(),he=ne+u.shift(),g=oe+u.shift(),m=he+u.shift(),u.shift(),l.curveTo(n,a,i,o,j,re),l.curveTo(te,ne,oe,he,g,m);break;case 34:n=g+u.shift(),a=m,i=n+u.shift(),o=a+u.shift(),j=i+u.shift(),re=o,te=j+u.shift(),ne=o,oe=te+u.shift(),he=m,g=oe+u.shift(),l.curveTo(n,a,i,o,j,re),l.curveTo(te,ne,oe,he,g,m);break;case 36:n=g+u.shift(),a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),j=i+u.shift(),re=o,te=j+u.shift(),ne=o,oe=te+u.shift(),he=ne+u.shift(),g=oe+u.shift(),l.curveTo(n,a,i,o,j,re),l.curveTo(te,ne,oe,he,g,m);break;case 37:n=g+u.shift(),a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),j=i+u.shift(),re=o+u.shift(),te=j+u.shift(),ne=re+u.shift(),oe=te+u.shift(),he=ne+u.shift(),Math.abs(oe-g)>Math.abs(he-m)?g=oe+u.shift():m=he+u.shift(),l.curveTo(n,a,i,o,j,re),l.curveTo(te,ne,oe,he,g,m);break;default:console.log("Glyph "+r.index+": unknown operator 1200"+ae),u.length=0}break;case 14:u.length>0&&!d&&(H=u.shift()+U,d=!0),y&&(l.closePath(),y=!1);break;case 18:B();break;case 19:case 20:B(),Y+=c+7>>3;break;case 21:u.length>2&&!d&&(H=u.shift()+U,d=!0),m+=u.pop(),g+=u.pop(),R(g,m);break;case 22:u.length>1&&!d&&(H=u.shift()+U,d=!0),g+=u.pop(),R(g,m);break;case 23:B();break;case 24:for(;u.length>2;)n=g+u.shift(),a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),g=i+u.shift(),m=o+u.shift(),l.curveTo(n,a,i,o,g,m);g+=u.shift(),m+=u.shift(),l.lineTo(g,m);break;case 25:for(;u.length>6;)g+=u.shift(),m+=u.shift(),l.lineTo(g,m);n=g+u.shift(),a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),g=i+u.shift(),m=o+u.shift(),l.curveTo(n,a,i,o,g,m);break;case 26:for(u.length%2&&(g+=u.shift());u.length>0;)n=g,a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),g=i,m=o+u.shift(),l.curveTo(n,a,i,o,g,m);break;case 27:for(u.length%2&&(m+=u.shift());u.length>0;)n=g+u.shift(),a=m,i=n+u.shift(),o=a+u.shift(),g=i+u.shift(),m=o,l.curveTo(n,a,i,o,g,m);break;case 28:K=q[Y],se=q[Y+1],u.push((K<<24|se<<16)>>16),Y+=2;break;case 29:de=u.pop()+e.gsubrsBias,J=e.gsubrs[de],J&&ue(J);break;case 30:for(;u.length>0&&(n=g,a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),g=i+u.shift(),m=o+(u.length===1?u.shift():0),l.curveTo(n,a,i,o,g,m),u.length!==0);)n=g+u.shift(),a=m,i=n+u.shift(),o=a+u.shift(),m=o+u.shift(),g=i+(u.length===1?u.shift():0),l.curveTo(n,a,i,o,g,m);break;case 31:for(;u.length>0&&(n=g+u.shift(),a=m,i=n+u.shift(),o=a+u.shift(),m=o+u.shift(),g=i+(u.length===1?u.shift():0),l.curveTo(n,a,i,o,g,m),u.length!==0);)n=g,a=m+u.shift(),i=n+u.shift(),o=a+u.shift(),g=i+u.shift(),m=o+(u.length===1?u.shift():0),l.curveTo(n,a,i,o,g,m);break;default:ae<32?console.log("Glyph "+r.index+": unknown operator "+ae):ae<247?u.push(ae-139):ae<251?(K=q[Y],Y+=1,u.push((ae-247)*256+K+108)):ae<255?(K=q[Y],Y+=1,u.push(-(ae-251)*256-K-108)):(K=q[Y],se=q[Y+1],le=q[Y+2],pe=q[Y+3],Y+=4,u.push((K<<24|se<<16|le<<8|pe)/65536))}}}return ue(t),r.advanceWidth=H,l}function Za(e,r,t,n){var a=[],i,o=new w.Parser(e,r),l=o.parseCard8();if(l===0)for(var u=0;u<t;u++){if(i=o.parseCard8(),i>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+n+")");a.push(i)}else if(l===3){var c=o.parseCard16(),d=o.parseCard16();if(d!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+d);for(var y,g=0;g<c;g++){if(i=o.parseCard8(),y=o.parseCard16(),i>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+n+")");if(y>t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+y);for(;d<y;d++)a.push(i);d=y}if(y!==t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+y)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+l);return a}function Qa(e,r,t){t.tables.cff={};var n=Wa(e,r),a=Oe(e,n.endOffset,w.bytesToString),i=Oe(e,a.endOffset),o=Oe(e,i.endOffset,w.bytesToString),l=Oe(e,o.endOffset);t.gsubrs=l.objects,t.gsubrsBias=zr(t.gsubrs);var u=_t(e,r,i.objects,o.objects);if(u.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+u.length);var c=u[0];if(t.tables.cff.topDict=c,c._privateDict&&(t.defaultWidthX=c._privateDict.defaultWidthX,t.nominalWidthX=c._privateDict.nominalWidthX),c.ros[0]!==void 0&&c.ros[1]!==void 0&&(t.isCIDFont=!0),t.isCIDFont){var d=c.fdArray,y=c.fdSelect;if(d===0||y===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");d+=r;var g=Oe(e,d),m=_t(e,r,g.objects,o.objects);c._fdArray=m,y+=r,c._fdSelect=Za(e,y,t.numGlyphs,m.length)}var T=r+c.private[1],O=Ht(e,T,c.private[0],o.objects);if(t.defaultWidthX=O.defaultWidthX,t.nominalWidthX=O.nominalWidthX,O.subrs!==0){var F=T+O.subrs,U=Oe(e,F);t.subrs=U.objects,t.subrsBias=zr(t.subrs)}else t.subrs=[],t.subrsBias=0;var P=Oe(e,r+c.charStrings);t.nGlyphs=P.objects.length;var I=qa(e,r+c.charset,t.nGlyphs,o.objects);c.encoding===0?t.cffEncoding=new xr(Oa,I):c.encoding===1?t.cffEncoding=new xr(Ia,I):t.cffEncoding=Xa(e,r+c.encoding,I),t.encoding=t.encoding||t.cffEncoding,t.glyphs=new qe.GlyphSet(t);for(var H=0;H<t.nGlyphs;H+=1){var R=P.objects[H];t.glyphs.push(H,qe.cffGlyphLoader(t,H,Ya,R))}}function zt(e,r){var t,n=br.indexOf(e);return n>=0&&(t=n),n=r.indexOf(e),n>=0?t=n+br.length:(t=br.length+r.length,r.push(e)),t}function Ja(){return new A.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function Ka(e){var r=new A.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);r.names=[];for(var t=0;t<e.length;t+=1)r.names.push({name:"name_"+t,type:"NAME",value:e[t]});return r}function Wt(e,r,t){for(var n={},a=0;a<e.length;a+=1){var i=e[a],o=r[i.name];o!==void 0&&!Mt(o,i.value)&&(i.type==="SID"&&(o=zt(o,t)),n[i.op]={name:i.name,type:i.type,value:o})}return n}function Vt(e,r){var t=new A.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=Wt(Gt,e,r),t}function qt(e){var r=new A.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return r.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],r}function ja(e){var r=new A.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);r.strings=[];for(var t=0;t<e.length;t+=1)r.strings.push({name:"string_"+t,type:"STRING",value:e[t]});return r}function $a(){return new A.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function ei(e,r){for(var t=new A.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var a=e[n],i=zt(a,r);t.fields.push({name:"glyph_"+n,type:"SID",value:i})}return t}function ri(e){var r=[],t=e.path;r.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,a=0,i=0;i<t.commands.length;i+=1){var o=void 0,l=void 0,u=t.commands[i];if(u.type==="Q"){var c=.3333333333333333,d=2/3;u={type:"C",x:u.x,y:u.y,x1:c*n+d*u.x1,y1:c*a+d*u.y1,x2:c*u.x+d*u.x1,y2:c*u.y+d*u.y1}}if(u.type==="M")o=Math.round(u.x-n),l=Math.round(u.y-a),r.push({name:"dx",type:"NUMBER",value:o}),r.push({name:"dy",type:"NUMBER",value:l}),r.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(u.x),a=Math.round(u.y);else if(u.type==="L")o=Math.round(u.x-n),l=Math.round(u.y-a),r.push({name:"dx",type:"NUMBER",value:o}),r.push({name:"dy",type:"NUMBER",value:l}),r.push({name:"rlineto",type:"OP",value:5}),n=Math.round(u.x),a=Math.round(u.y);else if(u.type==="C"){var y=Math.round(u.x1-n),g=Math.round(u.y1-a),m=Math.round(u.x2-u.x1),T=Math.round(u.y2-u.y1);o=Math.round(u.x-u.x2),l=Math.round(u.y-u.y2),r.push({name:"dx1",type:"NUMBER",value:y}),r.push({name:"dy1",type:"NUMBER",value:g}),r.push({name:"dx2",type:"NUMBER",value:m}),r.push({name:"dy2",type:"NUMBER",value:T}),r.push({name:"dx",type:"NUMBER",value:o}),r.push({name:"dy",type:"NUMBER",value:l}),r.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(u.x),a=Math.round(u.y)}}return r.push({name:"endchar",type:"OP",value:14}),r}function ti(e){for(var r=new A.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),t=0;t<e.length;t+=1){var n=e.get(t),a=ri(n);r.charStrings.push({name:n.name,type:"CHARSTRING",value:a})}return r}function ni(e,r){var t=new A.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=Wt(Nt,e,r),t}function ai(e,r){for(var t=new A.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/r.unitsPerEm,a={version:r.version,fullName:r.fullName,familyName:r.familyName,weight:r.weightName,fontBBox:r.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},i={},o=[],l,u=1;u<e.length;u+=1)l=e.get(u),o.push(l.name);var c=[];t.header=Ja(),t.nameIndex=Ka([r.postScriptName]);var d=Vt(a,c);t.topDictIndex=qt(d),t.globalSubrIndex=$a(),t.charsets=ei(o,c),t.charStringsIndex=ti(e),t.privateDict=ni(i,c),t.stringIndex=ja(c);var y=t.header.sizeOf()+t.nameIndex.sizeOf()+t.topDictIndex.sizeOf()+t.stringIndex.sizeOf()+t.globalSubrIndex.sizeOf();return a.charset=y,a.encoding=0,a.charStrings=a.charset+t.charsets.sizeOf(),a.private[1]=a.charStrings+t.charStringsIndex.sizeOf(),d=Vt(a,c),t.topDictIndex=qt(d),t}var Xt={parse:Qa,make:ai};function ii(e,r){var t={},n=new w.Parser(e,r);return t.version=n.parseVersion(),t.fontRevision=Math.round(n.parseFixed()*1e3)/1e3,t.checkSumAdjustment=n.parseULong(),t.magicNumber=n.parseULong(),G.argument(t.magicNumber===1594834165,"Font header has wrong magic number."),t.flags=n.parseUShort(),t.unitsPerEm=n.parseUShort(),t.created=n.parseLongDateTime(),t.modified=n.parseLongDateTime(),t.xMin=n.parseShort(),t.yMin=n.parseShort(),t.xMax=n.parseShort(),t.yMax=n.parseShort(),t.macStyle=n.parseUShort(),t.lowestRecPPEM=n.parseUShort(),t.fontDirectionHint=n.parseShort(),t.indexToLocFormat=n.parseShort(),t.glyphDataFormat=n.parseShort(),t}function si(e){var r=Math.round(new Date().getTime()/1e3)+2082844800,t=r;return e.createdTimestamp&&(t=e.createdTimestamp+2082844800),new A.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:t},{name:"modified",type:"LONGDATETIME",value:r},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}var Yt={parse:ii,make:si};function oi(e,r){var t={},n=new w.Parser(e,r);return t.version=n.parseVersion(),t.ascender=n.parseShort(),t.descender=n.parseShort(),t.lineGap=n.parseShort(),t.advanceWidthMax=n.parseUShort(),t.minLeftSideBearing=n.parseShort(),t.minRightSideBearing=n.parseShort(),t.xMaxExtent=n.parseShort(),t.caretSlopeRise=n.parseShort(),t.caretSlopeRun=n.parseShort(),t.caretOffset=n.parseShort(),n.relativeOffset+=8,t.metricDataFormat=n.parseShort(),t.numberOfHMetrics=n.parseUShort(),t}function ui(e){return new A.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}var Zt={parse:oi,make:ui};function li(e,r,t,n,a){for(var i,o,l=new w.Parser(e,r),u=0;u<n;u+=1){u<t&&(i=l.parseUShort(),o=l.parseShort());var c=a.get(u);c.advanceWidth=i,c.leftSideBearing=o}}function fi(e){for(var r=new A.Table("hmtx",[]),t=0;t<e.length;t+=1){var n=e.get(t),a=n.advanceWidth||0,i=n.leftSideBearing||0;r.fields.push({name:"advanceWidth_"+t,type:"USHORT",value:a}),r.fields.push({name:"leftSideBearing_"+t,type:"SHORT",value:i})}return r}var Qt={parse:li,make:fi};function pi(e){for(var r=new A.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),t="",n=12+e.length*4,a=0;a<e.length;++a){var i=t.indexOf(e[a]);i<0&&(i=t.length,t+=e[a]),r.fields.push({name:"offset "+a,type:"USHORT",value:n+i}),r.fields.push({name:"length "+a,type:"USHORT",value:e[a].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),r}function hi(e,r){var t=new w.Parser(e,r),n=t.parseULong();G.argument(n===1,"Unsupported ltag table version."),t.skip("uLong",1);for(var a=t.parseULong(),i=[],o=0;o<a;o++){for(var l="",u=r+t.parseUShort(),c=t.parseUShort(),d=u;d<u+c;++d)l+=String.fromCharCode(e.getInt8(d));i.push(l)}return i}var Jt={make:pi,parse:hi};function ci(e,r){var t={},n=new w.Parser(e,r);return t.version=n.parseVersion(),t.numGlyphs=n.parseUShort(),t.version===1&&(t.maxPoints=n.parseUShort(),t.maxContours=n.parseUShort(),t.maxCompositePoints=n.parseUShort(),t.maxCompositeContours=n.parseUShort(),t.maxZones=n.parseUShort(),t.maxTwilightPoints=n.parseUShort(),t.maxStorage=n.parseUShort(),t.maxFunctionDefs=n.parseUShort(),t.maxInstructionDefs=n.parseUShort(),t.maxStackElements=n.parseUShort(),t.maxSizeOfInstructions=n.parseUShort(),t.maxComponentElements=n.parseUShort(),t.maxComponentDepth=n.parseUShort()),t}function vi(e){return new A.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}var Kt={parse:ci,make:vi},jt=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],$t={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"},di={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},en={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 gi(e,r,t){switch(e){case 0:if(r===65535)return"und";if(t)return t[r];break;case 1:return $t[r];case 3:return en[r]}}var Wr="utf-16",mi={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"},yi={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 rn(e,r,t){switch(e){case 0:return Wr;case 1:return yi[t]||mi[r];case 3:if(r===1||r===10)return Wr;break}}function bi(e,r,t){for(var n={},a=new w.Parser(e,r),i=a.parseUShort(),o=a.parseUShort(),l=a.offset+a.parseUShort(),u=0;u<o;u++){var c=a.parseUShort(),d=a.parseUShort(),y=a.parseUShort(),g=a.parseUShort(),m=jt[g]||g,T=a.parseUShort(),O=a.parseUShort(),F=gi(c,y,t),U=rn(c,d,y);if(U!==void 0&&F!==void 0){var P=void 0;if(U===Wr?P=Ve.UTF16(e,l+O,T):P=Ve.MACSTRING(e,l+O,T,U),P){var I=n[m];I===void 0&&(I=n[m]={}),I[F]=P}}}var H=0;return i===1&&(H=a.parseUShort()),n}function Vr(e){var r={};for(var t in e)r[e[t]]=parseInt(t);return r}function tn(e,r,t,n,a,i){return new A.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:r},{name:"languageID",type:"USHORT",value:t},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:a},{name:"offset",type:"USHORT",value:i}])}function xi(e,r){var t=e.length,n=r.length-t+1;e:for(var a=0;a<n;a++)for(;a<n;a++){for(var i=0;i<t;i++)if(r[a+i]!==e[i])continue e;return a}return-1}function nn(e,r){var t=xi(e,r);if(t<0){t=r.length;for(var n=0,a=e.length;n<a;++n)r.push(e[n])}return t}function Si(e,r){var t,n=[],a={},i=Vr(jt);for(var o in e){var l=i[o];if(l===void 0&&(l=o),t=parseInt(l),isNaN(t))throw new Error('Name table entry "'+o+'" does not exist, see nameTableNames for complete list.');a[t]=e[o],n.push(t)}for(var u=Vr($t),c=Vr(en),d=[],y=[],g=0;g<n.length;g++){t=n[g];var m=a[t];for(var T in m){var O=m[T],F=1,U=u[T],P=di[U],I=rn(F,P,U),H=E.MACSTRING(O,I);H===void 0&&(F=0,U=r.indexOf(T),U<0&&(U=r.length,r.push(T)),P=4,H=E.UTF16(O));var R=nn(H,y);d.push(tn(F,P,U,t,H.length,R));var B=c[T];if(B!==void 0){var ue=E.UTF16(O),q=nn(ue,y);d.push(tn(3,1,B,t,ue.length,q))}}}d.sort(function(le,pe){return le.platformID-pe.platformID||le.encodingID-pe.encodingID||le.languageID-pe.languageID||le.nameID-pe.nameID});for(var K=new A.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:d.length},{name:"stringOffset",type:"USHORT",value:6+d.length*12}]),se=0;se<d.length;se++)K.fields.push({name:"record_"+se,type:"RECORD",value:d[se]});return K.fields.push({name:"strings",type:"LITERAL",value:y}),K}var an={parse:bi,make:Si},qr=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function Ti(e){for(var r=0;r<qr.length;r+=1){var t=qr[r];if(e>=t.begin&&e<t.end)return r}return-1}function ki(e,r){var t={},n=new w.Parser(e,r);t.version=n.parseUShort(),t.xAvgCharWidth=n.parseShort(),t.usWeightClass=n.parseUShort(),t.usWidthClass=n.parseUShort(),t.fsType=n.parseUShort(),t.ySubscriptXSize=n.parseShort(),t.ySubscriptYSize=n.parseShort(),t.ySubscriptXOffset=n.parseShort(),t.ySubscriptYOffset=n.parseShort(),t.ySuperscriptXSize=n.parseShort(),t.ySuperscriptYSize=n.parseShort(),t.ySuperscriptXOffset=n.parseShort(),t.ySuperscriptYOffset=n.parseShort(),t.yStrikeoutSize=n.parseShort(),t.yStrikeoutPosition=n.parseShort(),t.sFamilyClass=n.parseShort(),t.panose=[];for(var a=0;a<10;a++)t.panose[a]=n.parseByte();return t.ulUnicodeRange1=n.parseULong(),t.ulUnicodeRange2=n.parseULong(),t.ulUnicodeRange3=n.parseULong(),t.ulUnicodeRange4=n.parseULong(),t.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),t.fsSelection=n.parseUShort(),t.usFirstCharIndex=n.parseUShort(),t.usLastCharIndex=n.parseUShort(),t.sTypoAscender=n.parseShort(),t.sTypoDescender=n.parseShort(),t.sTypoLineGap=n.parseShort(),t.usWinAscent=n.parseUShort(),t.usWinDescent=n.parseUShort(),t.version>=1&&(t.ulCodePageRange1=n.parseULong(),t.ulCodePageRange2=n.parseULong()),t.version>=2&&(t.sxHeight=n.parseShort(),t.sCapHeight=n.parseShort(),t.usDefaultChar=n.parseUShort(),t.usBreakChar=n.parseUShort(),t.usMaxContent=n.parseUShort()),t}function Fi(e){return new A.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}],e)}var Xr={parse:ki,make:Fi,unicodeRanges:qr,getUnicodeRange:Ti};function Li(e,r){var t={},n=new w.Parser(e,r);switch(t.version=n.parseVersion(),t.italicAngle=n.parseFixed(),t.underlinePosition=n.parseShort(),t.underlineThickness=n.parseShort(),t.isFixedPitch=n.parseULong(),t.minMemType42=n.parseULong(),t.maxMemType42=n.parseULong(),t.minMemType1=n.parseULong(),t.maxMemType1=n.parseULong(),t.version){case 1:t.names=Me.slice();break;case 2:t.numberOfGlyphs=n.parseUShort(),t.glyphNameIndex=new Array(t.numberOfGlyphs);for(var a=0;a<t.numberOfGlyphs;a++)t.glyphNameIndex[a]=n.parseUShort();t.names=[];for(var i=0;i<t.numberOfGlyphs;i++)if(t.glyphNameIndex[i]>=Me.length){var o=n.parseChar();t.names.push(n.parseString(o))}break;case 2.5:t.numberOfGlyphs=n.parseUShort(),t.offset=new Array(t.numberOfGlyphs);for(var l=0;l<t.numberOfGlyphs;l++)t.offset[l]=n.parseChar();break}return t}function Ei(){return new A.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}var sn={parse:Li,make:Ei},me=new Array(9);me[1]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(b.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(b.coverage),substitute:this.parseOffset16List()};G.assert(!1,"0x"+r.toString(16)+": lookup type 1 format must be 1 or 2.")},me[2]=function(){var r=this.parseUShort();return G.argument(r===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(b.coverage),sequences:this.parseListOfLists()}},me[3]=function(){var r=this.parseUShort();return G.argument(r===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(b.coverage),alternateSets:this.parseListOfLists()}},me[4]=function(){var r=this.parseUShort();return G.argument(r===1,"GSUB ligature table identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(b.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var Xe={sequenceIndex:b.uShort,lookupListIndex:b.uShort};me[5]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(b.coverage),ruleSets:this.parseListOfLists(function(){var i=this.parseUShort(),o=this.parseUShort();return{input:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(o,Xe)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(b.coverage),classDef:this.parsePointer(b.classDef),classSets:this.parseListOfLists(function(){var i=this.parseUShort(),o=this.parseUShort();return{classes:this.parseUShortList(i-1),lookupRecords:this.parseRecordList(o,Xe)}})};if(t===3){var n=this.parseUShort(),a=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,b.pointer(b.coverage)),lookupRecords:this.parseRecordList(a,Xe)}}G.assert(!1,"0x"+r.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},me[6]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(b.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Xe)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(b.coverage),backtrackClassDef:this.parsePointer(b.classDef),inputClassDef:this.parsePointer(b.classDef),lookaheadClassDef:this.parsePointer(b.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(Xe)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(b.pointer(b.coverage)),inputCoverage:this.parseList(b.pointer(b.coverage)),lookaheadCoverage:this.parseList(b.pointer(b.coverage)),lookupRecords:this.parseRecordList(Xe)};G.assert(!1,"0x"+r.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},me[7]=function(){var r=this.parseUShort();G.argument(r===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new b(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:me[t].call(n)}},me[8]=function(){var r=this.parseUShort();return G.argument(r===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:r,coverage:this.parsePointer(b.coverage),backtrackCoverage:this.parseList(b.pointer(b.coverage)),lookaheadCoverage:this.parseList(b.pointer(b.coverage)),substitutes:this.parseUShortList()}};function Ui(e,r){r=r||0;var t=new b(e,r),n=t.parseVersion(1);return G.argument(n===1||n===1.1,"Unsupported GSUB table version."),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(me)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(me),variations:t.parseFeatureVariationsList()}}var Tr=new Array(9);Tr[1]=function(r){return r.substFormat===1?new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(r.coverage)},{name:"deltaGlyphID",type:"USHORT",value:r.deltaGlyphId}]):new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new A.Coverage(r.coverage)}].concat(A.ushortList("substitute",r.substitute)))},Tr[3]=function(r){return G.assert(r.substFormat===1,"Lookup type 3 substFormat must be 1."),new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(r.coverage)}].concat(A.tableList("altSet",r.alternateSets,function(t){return new A.Table("alternateSetTable",A.ushortList("alternate",t))})))},Tr[4]=function(r){return G.assert(r.substFormat===1,"Lookup type 4 substFormat must be 1."),new A.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new A.Coverage(r.coverage)}].concat(A.tableList("ligSet",r.ligatureSets,function(t){return new A.Table("ligatureSetTable",A.tableList("ligature",t,function(n){return new A.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat(A.ushortList("component",n.components,n.components.length+1)))}))})))};function Oi(e){return new A.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new A.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new A.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new A.LookupList(e.lookups,Tr)}])}var on={parse:Ui,make:Oi};function Ii(e,r){var t=new w.Parser(e,r),n=t.parseULong();G.argument(n===1,"Unsupported META table version."),t.parseULong(),t.parseULong();for(var a=t.parseULong(),i={},o=0;o<a;o++){var l=t.parseTag(),u=t.parseULong(),c=t.parseULong(),d=Ve.UTF8(e,r+u,c);i[l]=d}return i}function Ci(e){var r=Object.keys(e).length,t="",n=16+r*12,a=new A.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:r}]);for(var i in e){var o=t.length;t+=e[i],a.fields.push({name:"tag "+i,type:"TAG",value:i}),a.fields.push({name:"offset "+i,type:"ULONG",value:n+o}),a.fields.push({name:"length "+i,type:"ULONG",value:e[i].length})}return a.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),a}var un={parse:Ii,make:Ci};function ln(e){return Math.log(e)/Math.log(2)|0}function Yr(e){for(;e.length%4!==0;)e.push(0);for(var r=0,t=0;t<e.length;t+=4)r+=(e[t]<<24)+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];return r%=Math.pow(2,32),r}function fn(e,r,t,n){return new A.Record("Table Record",[{name:"tag",type:"TAG",value:e!==void 0?e:""},{name:"checkSum",type:"ULONG",value:r!==void 0?r:0},{name:"offset",type:"ULONG",value:t!==void 0?t:0},{name:"length",type:"ULONG",value:n!==void 0?n:0}])}function pn(e){var r=new A.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);r.tables=e,r.numTables=e.length;var t=Math.pow(2,ln(r.numTables));r.searchRange=16*t,r.entrySelector=ln(t),r.rangeShift=r.numTables*16-r.searchRange;for(var n=[],a=[],i=r.sizeOf()+fn().sizeOf()*r.numTables;i%4!==0;)i+=1,a.push({name:"padding",type:"BYTE",value:0});for(var o=0;o<e.length;o+=1){var l=e[o];G.argument(l.tableName.length===4,"Table name"+l.tableName+" is invalid.");var u=l.sizeOf(),c=fn(l.tableName,Yr(l.encode()),i,u);for(n.push({name:c.tag+" Table Record",type:"RECORD",value:c}),a.push({name:l.tableName+" table",type:"RECORD",value:l}),i+=u,G.argument(!isNaN(i),"Something went wrong calculating the offset.");i%4!==0;)i+=1,a.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(d,y){return d.value.tag>y.value.tag?1:-1}),r.fields=r.fields.concat(n),r.fields=r.fields.concat(a),r}function hn(e,r,t){for(var n=0;n<r.length;n+=1){var a=e.charToGlyphIndex(r[n]);if(a>0){var i=e.glyphs.get(a);return i.getMetrics()}}return t}function wi(e){for(var r=0,t=0;t<e.length;t+=1)r+=e[t];return r/e.length}function Ri(e){for(var r=[],t=[],n=[],a=[],i=[],o=[],l=[],u,c=0,d=0,y=0,g=0,m=0,T=0;T<e.glyphs.length;T+=1){var O=e.glyphs.get(T),F=O.unicode|0;if(isNaN(O.advanceWidth))throw new Error("Glyph "+O.name+" ("+T+"): advanceWidth is not a number.");(u>F||u===void 0)&&F>0&&(u=F),c<F&&(c=F);var U=Xr.getUnicodeRange(F);if(U<32)d|=1<<U;else if(U<64)y|=1<<U-32;else if(U<96)g|=1<<U-64;else if(U<123)m|=1<<U-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(O.name!==".notdef"){var P=O.getMetrics();r.push(P.xMin),t.push(P.yMin),n.push(P.xMax),a.push(P.yMax),o.push(P.leftSideBearing),l.push(P.rightSideBearing),i.push(O.advanceWidth)}}var I={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,a),advanceWidthMax:Math.max.apply(null,i),advanceWidthAvg:wi(i),minLeftSideBearing:Math.min.apply(null,o),maxLeftSideBearing:Math.max.apply(null,o),minRightSideBearing:Math.min.apply(null,l)};I.ascender=e.ascender,I.descender=e.descender;var H=Yt.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:I.xMin,yMin:I.yMin,xMax:I.xMax,yMax:I.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),R=Zt.make({ascender:I.ascender,descender:I.descender,advanceWidthMax:I.advanceWidthMax,minLeftSideBearing:I.minLeftSideBearing,minRightSideBearing:I.minRightSideBearing,xMaxExtent:I.maxLeftSideBearing+(I.xMax-I.xMin),numberOfHMetrics:e.glyphs.length}),B=Kt.make(e.glyphs.length),ue=Xr.make({xAvgCharWidth:Math.round(I.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:u,usLastCharIndex:c,ulUnicodeRange1:d,ulUnicodeRange2:y,ulUnicodeRange3:g,ulUnicodeRange4:m,fsSelection:e.tables.os2.fsSelection,sTypoAscender:I.ascender,sTypoDescender:I.descender,sTypoLineGap:0,usWinAscent:I.yMax,usWinDescent:Math.abs(I.yMin),ulCodePageRange1:1,sxHeight:hn(e,"xyvw",{yMax:Math.round(I.ascender/2)}).yMax,sCapHeight:hn(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",I).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),q=Qt.make(e.glyphs),K=It.make(e.glyphs),se=e.getEnglishName("fontFamily"),le=e.getEnglishName("fontSubfamily"),pe=se+" "+le,de=e.getEnglishName("postScriptName");de||(de=se.replace(/\s/g,"")+"-"+le);var J={};for(var j in e.names)J[j]=e.names[j];J.uniqueID||(J.uniqueID={en:e.getEnglishName("manufacturer")+":"+pe}),J.postScriptName||(J.postScriptName={en:de}),J.preferredFamily||(J.preferredFamily=e.names.fontFamily),J.preferredSubfamily||(J.preferredSubfamily=e.names.fontSubfamily);var re=[],te=an.make(J,re),ne=re.length>0?Jt.make(re):void 0,oe=sn.make(),he=Xt.make(e.glyphs,{version:e.getEnglishName("version"),fullName:pe,familyName:se,weightName:le,postScriptName:de,unitsPerEm:e.unitsPerEm,fontBBox:[0,I.yMin,I.ascender,I.advanceWidthMax]}),Y=e.metas&&Object.keys(e.metas).length>0?un.make(e.metas):void 0,ae=[H,R,B,ue,te,K,oe,he,q];ne&&ae.push(ne),e.tables.gsub&&ae.push(on.make(e.tables.gsub)),Y&&ae.push(Y);for(var et=pn(ae),Mo=et.encode(),Bo=Yr(Mo),rt=et.fields,Hn=!1,Er=0;Er<rt.length;Er+=1)if(rt[Er].name==="head table"){rt[Er].value.checkSumAdjustment=2981146554-Bo,Hn=!0;break}if(!Hn)throw new Error("Could not find head table with checkSum to adjust.");return et}var Di={make:pn,fontToTable:Ri,computeCheckSum:Yr};function Zr(e,r){for(var t=0,n=e.length-1;t<=n;){var a=t+n>>>1,i=e[a].tag;if(i===r)return a;i<r?t=a+1:n=a-1}return-t-1}function cn(e,r){for(var t=0,n=e.length-1;t<=n;){var a=t+n>>>1,i=e[a];if(i===r)return a;i<r?t=a+1:n=a-1}return-t-1}function vn(e,r){for(var t,n=0,a=e.length-1;n<=a;){var i=n+a>>>1;t=e[i];var o=t.start;if(o===r)return t;o<r?n=i+1:a=i-1}if(n>0)return t=e[n-1],r>t.end?0:t}function rr(e,r){this.font=e,this.tableName=r}rr.prototype={searchTag:Zr,binSearch:cn,getTable:function(e){var r=this.font.tables[this.tableName];return!r&&e&&(r=this.font.tables[this.tableName]=this.createDefaultTable()),r},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(r){return r.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var r=!1,t=0;t<e.scripts.length;t++){var n=e.scripts[t].tag;if(n==="DFLT")return n;n==="latn"&&(r=!0)}if(r)return"latn"}},getScriptTable:function(e,r){var t=this.getTable(r);if(t){e=e||"DFLT";var n=t.scripts,a=Zr(t.scripts,e);if(a>=0)return n[a].script;if(r){var i={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-a,0,i),i.script}}},getLangSysTable:function(e,r,t){var n=this.getScriptTable(e,t);if(n){if(!r||r==="dflt"||r==="DFLT")return n.defaultLangSys;var a=Zr(n.langSysRecords,r);if(a>=0)return n.langSysRecords[a].langSys;if(t){var i={tag:r,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-a,0,i),i.langSys}}},getFeatureTable:function(e,r,t,n){var a=this.getLangSysTable(e,r,n);if(a){for(var i,o=a.featureIndexes,l=this.font.tables[this.tableName].features,u=0;u<o.length;u++)if(i=l[o[u]],i.tag===t)return i.feature;if(n){var c=l.length;return G.assert(c===0||t>=l[c-1].tag,"Features must be added in alphabetical order."),i={tag:t,feature:{params:0,lookupListIndexes:[]}},l.push(i),o.push(c),i.feature}}},getLookupTables:function(e,r,t,n,a){var i=this.getFeatureTable(e,r,t,a),o=[];if(i){for(var l,u=i.lookupListIndexes,c=this.font.tables[this.tableName].lookups,d=0;d<u.length;d++)l=c[u[d]],l.lookupType===n&&o.push(l);if(o.length===0&&a){l={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var y=c.length;return c.push(l),u.push(y),[l]}}return o},getGlyphClass:function(e,r){switch(e.format){case 1:return e.startGlyph<=r&&r<e.startGlyph+e.classes.length?e.classes[r-e.startGlyph]:0;case 2:var t=vn(e.ranges,r);return t?t.classId:0}},getCoverageIndex:function(e,r){switch(e.format){case 1:var t=cn(e.glyphs,r);return t>=0?t:-1;case 2:var n=vn(e.ranges,r);return n?n.index+r-n.start:-1}},expandCoverage:function(e){if(e.format===1)return e.glyphs;for(var r=[],t=e.ranges,n=0;n<t.length;n++)for(var a=t[n],i=a.start,o=a.end,l=i;l<=o;l++)r.push(l);return r}};function kr(e){rr.call(this,e,"gpos")}kr.prototype=rr.prototype,kr.prototype.getKerningValue=function(e,r,t){for(var n=this,a=0;a<e.length;a++)for(var i=e[a].subtables,o=0;o<i.length;o++){var l=i[o],u=n.getCoverageIndex(l.coverage,r);if(!(u<0))switch(l.posFormat){case 1:for(var c=l.pairSets[u],d=0;d<c.length;d++){var y=c[d];if(y.secondGlyph===t)return y.value1&&y.value1.xAdvance||0}break;case 2:var g=n.getGlyphClass(l.classDef1,r),m=n.getGlyphClass(l.classDef2,t),T=l.classRecords[g][m];return T.value1&&T.value1.xAdvance||0}}return 0},kr.prototype.getKerningTables=function(e,r){if(this.font.tables.gpos)return this.getLookupTables(e,r,"kern",2)};function ye(e){rr.call(this,e,"gsub")}function Ai(e,r){var t=e.length;if(t!==r.length)return!1;for(var n=0;n<t;n++)if(e[n]!==r[n])return!1;return!0}function dn(e,r,t){for(var n=e.subtables,a=0;a<n.length;a++){var i=n[a];if(i.substFormat===r)return i}if(t)return n.push(t),t}ye.prototype=rr.prototype,ye.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},ye.prototype.getSingle=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,1),o=0;o<i.length;o++)for(var l=i[o].subtables,u=0;u<l.length;u++){var c=l[u],d=n.expandCoverage(c.coverage),y=void 0;if(c.substFormat===1){var g=c.deltaGlyphId;for(y=0;y<d.length;y++){var m=d[y];a.push({sub:m,by:m+g})}}else{var T=c.substitute;for(y=0;y<d.length;y++)a.push({sub:d[y],by:T[y]})}}return a},ye.prototype.getAlternates=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,3),o=0;o<i.length;o++)for(var l=i[o].subtables,u=0;u<l.length;u++)for(var c=l[u],d=n.expandCoverage(c.coverage),y=c.alternateSets,g=0;g<d.length;g++)a.push({sub:d[g],by:y[g]});return a},ye.prototype.getLigatures=function(e,r,t){for(var n=this,a=[],i=this.getLookupTables(r,t,e,4),o=0;o<i.length;o++)for(var l=i[o].subtables,u=0;u<l.length;u++)for(var c=l[u],d=n.expandCoverage(c.coverage),y=c.ligatureSets,g=0;g<d.length;g++)for(var m=d[g],T=y[g],O=0;O<T.length;O++){var F=T[O];a.push({sub:[m].concat(F.components),by:F.ligGlyph})}return a},ye.prototype.addSingle=function(e,r,t,n){var a=this.getLookupTables(t,n,e,1,!0)[0],i=dn(a,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});G.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var o=r.sub,l=this.binSearch(i.coverage.glyphs,o);l<0&&(l=-1-l,i.coverage.glyphs.splice(l,0,o),i.substitute.splice(l,0,0)),i.substitute[l]=r.by},ye.prototype.addAlternate=function(e,r,t,n){var a=this.getLookupTables(t,n,e,3,!0)[0],i=dn(a,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});G.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var o=r.sub,l=this.binSearch(i.coverage.glyphs,o);l<0&&(l=-1-l,i.coverage.glyphs.splice(l,0,o),i.alternateSets.splice(l,0,0)),i.alternateSets[l]=r.by},ye.prototype.addLigature=function(e,r,t,n){var a=this.getLookupTables(t,n,e,4,!0)[0],i=a.subtables[0];i||(i={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},a.subtables[0]=i),G.assert(i.coverage.format===1,"Ligature: unable to modify coverage table format "+i.coverage.format);var o=r.sub[0],l=r.sub.slice(1),u={ligGlyph:r.by,components:l},c=this.binSearch(i.coverage.glyphs,o);if(c>=0){for(var d=i.ligatureSets[c],y=0;y<d.length;y++)if(Ai(d[y].components,l))return;d.push(u)}else c=-1-c,i.coverage.glyphs.splice(c,0,o),i.ligatureSets.splice(c,0,[u])},ye.prototype.getFeature=function(e,r,t){if(/ss\d\d/.test(e))return this.getSingle(e,r,t);switch(e){case"aalt":case"salt":return this.getSingle(e,r,t).concat(this.getAlternates(e,r,t));case"dlig":case"liga":case"rlig":return this.getLigatures(e,r,t)}},ye.prototype.add=function(e,r,t,n){if(/ss\d\d/.test(e))return this.addSingle(e,r,t,n);switch(e){case"aalt":case"salt":return typeof r.by=="number"?this.addSingle(e,r,t,n):this.addAlternate(e,r,t,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,r,t,n)}};function Mi(){return typeof window<"u"}function gn(e){for(var r=new ArrayBuffer(e.length),t=new Uint8Array(r),n=0;n<e.length;++n)t[n]=e[n];return r}function Bi(e){for(var r=new Buffer(e.byteLength),t=new Uint8Array(e),n=0;n<r.length;++n)r[n]=t[n];return r}function Ye(e,r){if(!e)throw r}var mn,Pe,yn,Qr;function bn(e){this.font=e,this._fpgmState=this._prepState=void 0,this._errorState=0}function Pi(e){return e}function xn(e){return Math.sign(e)*Math.round(Math.abs(e))}function Gi(e){return Math.sign(e)*Math.round(Math.abs(e*2))/2}function Ni(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function Hi(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function _i(e){return Math.sign(e)*Math.floor(Math.abs(e))}var Sn=function(e){var r=this.srPeriod,t=this.srPhase,n=this.srThreshold,a=1;return e<0&&(e=-e,a=-1),e+=n-t,e=Math.trunc(e/r)*r,e+=t,e<0?t*a:e*a},Te={x:1,y:0,axis:"x",distance:function(e,r,t,n){return(t?e.xo:e.x)-(n?r.xo:r.x)},interpolate:function(e,r,t,n){var a,i,o,l,u,c,d;if(!n||n===this){if(a=e.xo-r.xo,i=e.xo-t.xo,u=r.x-r.xo,c=t.x-t.xo,o=Math.abs(a),l=Math.abs(i),d=o+l,d===0){e.x=e.xo+(u+c)/2;return}e.x=e.xo+(u*l+c*o)/d;return}if(a=n.distance(e,r,!0,!0),i=n.distance(e,t,!0,!0),u=n.distance(r,r,!1,!0),c=n.distance(t,t,!1,!0),o=Math.abs(a),l=Math.abs(i),d=o+l,d===0){Te.setRelative(e,e,(u+c)/2,n,!0);return}Te.setRelative(e,e,(u*l+c*o)/d,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,r,t,n,a){if(!n||n===this){e.x=(a?r.xo:r.x)+t;return}var i=a?r.xo:r.x,o=a?r.yo:r.y,l=i+t*n.x,u=o+t*n.y;e.x=l+(e.y-u)/n.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},Fe={x:0,y:1,axis:"y",distance:function(e,r,t,n){return(t?e.yo:e.y)-(n?r.yo:r.y)},interpolate:function(e,r,t,n){var a,i,o,l,u,c,d;if(!n||n===this){if(a=e.yo-r.yo,i=e.yo-t.yo,u=r.y-r.yo,c=t.y-t.yo,o=Math.abs(a),l=Math.abs(i),d=o+l,d===0){e.y=e.yo+(u+c)/2;return}e.y=e.yo+(u*l+c*o)/d;return}if(a=n.distance(e,r,!0,!0),i=n.distance(e,t,!0,!0),u=n.distance(r,r,!1,!0),c=n.distance(t,t,!1,!0),o=Math.abs(a),l=Math.abs(i),d=o+l,d===0){Fe.setRelative(e,e,(u+c)/2,n,!0);return}Fe.setRelative(e,e,(u*l+c*o)/d,n,!0)},normalSlope:0,setRelative:function(e,r,t,n,a){if(!n||n===this){e.y=(a?r.yo:r.y)+t;return}var i=a?r.xo:r.x,o=a?r.yo:r.y,l=i+t*n.x,u=o+t*n.y;e.y=u+n.normalSlope*(e.x-l)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};Object.freeze(Te),Object.freeze(Fe);function tr(e,r){this.x=e,this.y=r,this.axis=void 0,this.slope=r/e,this.normalSlope=-e/r,Object.freeze(this)}tr.prototype.distance=function(e,r,t,n){return this.x*Te.distance(e,r,t,n)+this.y*Fe.distance(e,r,t,n)},tr.prototype.interpolate=function(e,r,t,n){var a,i,o,l,u,c,d;if(o=n.distance(e,r,!0,!0),l=n.distance(e,t,!0,!0),a=n.distance(r,r,!1,!0),i=n.distance(t,t,!1,!0),u=Math.abs(o),c=Math.abs(l),d=u+c,d===0){this.setRelative(e,e,(a+i)/2,n,!0);return}this.setRelative(e,e,(a*c+i*u)/d,n,!0)},tr.prototype.setRelative=function(e,r,t,n,a){n=n||this;var i=a?r.xo:r.x,o=a?r.yo:r.y,l=i+t*n.x,u=o+t*n.y,c=n.normalSlope,d=this.slope,y=e.x,g=e.y;e.x=(d*y-c*l+u-g)/(d-c),e.y=d*(e.x-y)+g},tr.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0};function nr(e,r){var t=Math.sqrt(e*e+r*r);return e/=t,r/=t,e===1&&r===0?Te:e===0&&r===1?Fe:new tr(e,r)}function Le(e,r,t,n){this.x=this.xo=Math.round(e*64)/64,this.y=this.yo=Math.round(r*64)/64,this.lastPointOfContour=t,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Le.prototype.nextTouched=function(e){for(var r=this.nextPointOnContour;!e.touched(r)&&r!==this;)r=r.nextPointOnContour;return r},Le.prototype.prevTouched=function(e){for(var r=this.prevPointOnContour;!e.touched(r)&&r!==this;)r=r.prevPointOnContour;return r};var ar=Object.freeze(new Le(0,0)),zi={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Ie(e,r){switch(this.env=e,this.stack=[],this.prog=r,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Te,this.round=xn}}bn.prototype.exec=function(e,r){if(typeof r!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var t=this.font,n=this._prepState;if(!n||n.ppem!==r){var a=this._fpgmState;if(!a){Ie.prototype=zi,a=this._fpgmState=new Ie("fpgm",t.tables.fpgm),a.funcs=[],a.font=t,s.DEBUG&&(console.log("---EXEC FPGM---"),a.step=-1);try{Pe(a)}catch(c){console.log("Hinting error in FPGM:"+c),this._errorState=3;return}}Ie.prototype=a,n=this._prepState=new Ie("prep",t.tables.prep),n.ppem=r;var i=t.tables.cvt;if(i)for(var o=n.cvt=new Array(i.length),l=r/t.unitsPerEm,u=0;u<i.length;u++)o[u]=i[u]*l;else n.cvt=[];s.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{Pe(n)}catch(c){this._errorState<2&&console.log("Hinting error in PREP:"+c),this._errorState=2}}if(!(this._errorState>1))try{return yn(e,n)}catch(c){this._errorState<1&&(console.log("Hinting error:"+c),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}},yn=function(e,r){var t=r.ppem/r.font.unitsPerEm,n=t,a=e.components,i,o,l;if(Ie.prototype=r,!a)l=new Ie("glyf",e.instructions),s.DEBUG&&(console.log("---EXEC GLYPH---"),l.step=-1),Qr(e,l,t,n),o=l.gZone;else{var u=r.font;o=[],i=[];for(var c=0;c<a.length;c++){var d=a[c],y=u.glyphs.get(d.glyphIndex);l=new Ie("glyf",y.instructions),s.DEBUG&&(console.log("---EXEC COMP "+c+"---"),l.step=-1),Qr(y,l,t,n);for(var g=Math.round(d.dx*t),m=Math.round(d.dy*n),T=l.gZone,O=l.contours,F=0;F<T.length;F++){var U=T[F];U.xTouched=U.yTouched=!1,U.xo=U.x=U.x+g,U.yo=U.y=U.y+m}var P=o.length;o.push.apply(o,T);for(var I=0;I<O.length;I++)i.push(O[I]+P)}e.instructions&&!l.inhibitGridFit&&(l=new Ie("glyf",e.instructions),l.gZone=l.z0=l.z1=l.z2=o,l.contours=i,o.push(new Le(0,0),new Le(Math.round(e.advanceWidth*t),0)),s.DEBUG&&(console.log("---EXEC COMPOSITE---"),l.step=-1),Pe(l),o.length-=2)}return o},Qr=function(e,r,t,n){for(var a=e.points||[],i=a.length,o=r.gZone=r.z0=r.z1=r.z2=[],l=r.contours=[],u,c=0;c<i;c++)u=a[c],o[c]=new Le(u.x*t,u.y*n,u.lastPointOfContour,u.onCurve);for(var d,y,g=0;g<i;g++)u=o[g],d||(d=u,l.push(g)),u.lastPointOfContour?(u.nextPointOnContour=d,d.prevPointOnContour=u,d=void 0):(y=o[g+1],u.nextPointOnContour=y,y.prevPointOnContour=u);if(!r.inhibitGridFit){if(s.DEBUG){console.log("PROCESSING GLYPH",r.stack);for(var m=0;m<i;m++)console.log(m,o[m].x,o[m].y)}if(o.push(new Le(0,0),new Le(Math.round(e.advanceWidth*t),0)),Pe(r),o.length-=2,s.DEBUG){console.log("FINISHED GLYPH",r.stack);for(var T=0;T<i;T++)console.log(T,o[T].x,o[T].y)}}},Pe=function(e){var r=e.prog;if(r){var t=r.length,n;for(e.ip=0;e.ip<t;e.ip++){if(s.DEBUG&&e.step++,n=mn[r[e.ip]],!n)throw new Error("unknown instruction: 0x"+Number(r[e.ip]).toString(16));n(e)}}};function Fr(e){for(var r=e.tZone=new Array(e.gZone.length),t=0;t<r.length;t++)r[t]=new Le(0,0)}function Tn(e,r){var t=e.prog,n=e.ip,a=1,i;do if(i=t[++n],i===88)a++;else if(i===89)a--;else if(i===64)n+=t[n+1]+1;else if(i===65)n+=2*t[n+1]+1;else if(i>=176&&i<=183)n+=i-176+1;else if(i>=184&&i<=191)n+=(i-184+1)*2;else if(r&&a===1&&i===27)break;while(a>0);e.ip=n}function kn(e,r){s.DEBUG&&console.log(r.step,"SVTCA["+e.axis+"]"),r.fv=r.pv=r.dpv=e}function Fn(e,r){s.DEBUG&&console.log(r.step,"SPVTCA["+e.axis+"]"),r.pv=r.dpv=e}function Ln(e,r){s.DEBUG&&console.log(r.step,"SFVTCA["+e.axis+"]"),r.fv=e}function En(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],o=r.z1[a];s.DEBUG&&console.log("SPVTL["+e+"]",n,a);var l,u;e?(l=i.y-o.y,u=o.x-i.x):(l=o.x-i.x,u=o.y-i.y),r.pv=r.dpv=nr(l,u)}function Un(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],o=r.z1[a];s.DEBUG&&console.log("SFVTL["+e+"]",n,a);var l,u;e?(l=i.y-o.y,u=o.x-i.x):(l=o.x-i.x,u=o.y-i.y),r.fv=nr(l,u)}function Wi(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SPVFS[]",t,n),e.pv=e.dpv=nr(n,t)}function Vi(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SPVFS[]",t,n),e.fv=nr(n,t)}function qi(e){var r=e.stack,t=e.pv;s.DEBUG&&console.log(e.step,"GPV[]"),r.push(t.x*16384),r.push(t.y*16384)}function Xi(e){var r=e.stack,t=e.fv;s.DEBUG&&console.log(e.step,"GFV[]"),r.push(t.x*16384),r.push(t.y*16384)}function Yi(e){e.fv=e.pv,s.DEBUG&&console.log(e.step,"SFVTPV[]")}function Zi(e){var r=e.stack,t=r.pop(),n=r.pop(),a=r.pop(),i=r.pop(),o=r.pop(),l=e.z0,u=e.z1,c=l[t],d=l[n],y=u[a],g=u[i],m=e.z2[o];s.DEBUG&&console.log("ISECT[], ",t,n,a,i,o);var T=c.x,O=c.y,F=d.x,U=d.y,P=y.x,I=y.y,H=g.x,R=g.y,B=(T-F)*(I-R)-(O-U)*(P-H),ue=T*U-O*F,q=P*R-I*H;m.x=(ue*(P-H)-q*(T-F))/B,m.y=(ue*(I-R)-q*(O-U))/B}function Qi(e){e.rp0=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)}function Ji(e){e.rp1=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)}function Ki(e){e.rp2=e.stack.pop(),s.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)}function ji(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP0[]",r),e.zp0=r,r){case 0:e.tZone||Fr(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function $i(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP1[]",r),e.zp1=r,r){case 0:e.tZone||Fr(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function es(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZP2[]",r),e.zp2=r,r){case 0:e.tZone||Fr(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function rs(e){var r=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"SZPS[]",r),e.zp0=e.zp1=e.zp2=r,r){case 0:e.tZone||Fr(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}}function ts(e){e.loop=e.stack.pop(),s.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)}function ns(e){s.DEBUG&&console.log(e.step,"RTG[]"),e.round=xn}function as(e){s.DEBUG&&console.log(e.step,"RTHG[]"),e.round=Ni}function is(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SMD[]",r),e.minDis=r/64}function ss(e){s.DEBUG&&console.log(e.step,"ELSE[]"),Tn(e,!1)}function os(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"JMPR[]",r),e.ip+=r-1}function us(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCVTCI[]",r),e.cvCutIn=r/64}function ls(e){var r=e.stack;s.DEBUG&&console.log(e.step,"DUP[]"),r.push(r[r.length-1])}function Jr(e){s.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function fs(e){s.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0}function ps(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SWAP[]"),r.push(t),r.push(n)}function hs(e){var r=e.stack;s.DEBUG&&console.log(e.step,"DEPTH[]"),r.push(r.length)}function cs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LOOPCALL[]",t,n);var a=e.ip,i=e.prog;e.prog=e.funcs[t];for(var o=0;o<n;o++)Pe(e),s.DEBUG&&console.log(++e.step,o+1<n?"next loopcall":"done loopcall",o);e.ip=a,e.prog=i}function vs(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"CALL[]",r);var t=e.ip,n=e.prog;e.prog=e.funcs[r],Pe(e),e.ip=t,e.prog=n,s.DEBUG&&console.log(++e.step,"returning from",r)}function ds(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"CINDEX[]",t),r.push(r[r.length-t])}function gs(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"MINDEX[]",t),r.push(r.splice(r.length-t,1)[0])}function ms(e){if(e.env!=="fpgm")throw new Error("FDEF not allowed here");var r=e.stack,t=e.prog,n=e.ip,a=r.pop(),i=n;for(s.DEBUG&&console.log(e.step,"FDEF[]",a);t[++n]!==45;);e.ip=n,e.funcs[a]=t.slice(i+1,n)}function On(e,r){var t=r.stack.pop(),n=r.z0[t],a=r.fv,i=r.pv;s.DEBUG&&console.log(r.step,"MDAP["+e+"]",t);var o=i.distance(n,ar);e&&(o=r.round(o)),a.setRelative(n,ar,o,i),a.touch(n),r.rp0=r.rp1=t}function In(e,r){var t=r.z2,n=t.length-2,a,i,o;s.DEBUG&&console.log(r.step,"IUP["+e.axis+"]");for(var l=0;l<n;l++)a=t[l],!e.touched(a)&&(i=a.prevTouched(e),i!==a&&(o=a.nextTouched(e),i===o&&e.setRelative(a,a,e.distance(i,i,!1,!0),e,!0),e.interpolate(a,i,o,e)))}function Cn(e,r){for(var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,o=r.pv,l=r.loop,u=r.z2;l--;){var c=t.pop(),d=u[c],y=o.distance(a,a,!1,!0);i.setRelative(d,d,y,o),i.touch(d),s.DEBUG&&console.log(r.step,(r.loop>1?"loop "+(r.loop-l)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",c)}r.loop=1}function wn(e,r){var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,o=r.pv,l=t.pop(),u=r.z2[r.contours[l]],c=u;s.DEBUG&&console.log(r.step,"SHC["+e+"]",l);var d=o.distance(a,a,!1,!0);do c!==a&&i.setRelative(c,c,d,o),c=c.nextPointOnContour;while(c!==u)}function Rn(e,r){var t=r.stack,n=e?r.rp1:r.rp2,a=(e?r.z0:r.z1)[n],i=r.fv,o=r.pv,l=t.pop();s.DEBUG&&console.log(r.step,"SHZ["+e+"]",l);var u;switch(l){case 0:u=r.tZone;break;case 1:u=r.gZone;break;default:throw new Error("Invalid zone")}for(var c,d=o.distance(a,a,!1,!0),y=u.length-2,g=0;g<y;g++)c=u[g],i.setRelative(c,c,d,o)}function ys(e){for(var r=e.stack,t=e.loop,n=e.fv,a=r.pop()/64,i=e.z2;t--;){var o=r.pop(),l=i[o];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-t)+": ":"")+"SHPIX[]",o,a),n.setRelative(l,l,a),n.touch(l)}e.loop=1}function bs(e){for(var r=e.stack,t=e.rp1,n=e.rp2,a=e.loop,i=e.z0[t],o=e.z1[n],l=e.fv,u=e.dpv,c=e.z2;a--;){var d=r.pop(),y=c[d];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"IP[]",d,t,"<->",n),l.interpolate(y,i,o,u),l.touch(y)}e.loop=1}function Dn(e,r){var t=r.stack,n=t.pop()/64,a=t.pop(),i=r.z1[a],o=r.z0[r.rp0],l=r.fv,u=r.pv;l.setRelative(i,o,n,u),l.touch(i),s.DEBUG&&console.log(r.step,"MSIRP["+e+"]",n,a),r.rp1=r.rp0,r.rp2=a,e&&(r.rp0=a)}function xs(e){for(var r=e.stack,t=e.rp0,n=e.z0[t],a=e.loop,i=e.fv,o=e.pv,l=e.z1;a--;){var u=r.pop(),c=l[u];s.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"ALIGNRP[]",u),i.setRelative(c,n,0,o),i.touch(c)}e.loop=1}function Ss(e){s.DEBUG&&console.log(e.step,"RTDG[]"),e.round=Gi}function An(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z0[a],o=r.fv,l=r.pv,u=r.cvt[n];s.DEBUG&&console.log(r.step,"MIAP["+e+"]",n,"(",u,")",a);var c=l.distance(i,ar);e&&(Math.abs(c-u)<r.cvCutIn&&(c=u),c=r.round(c)),o.setRelative(i,ar,c,l),r.zp0===0&&(i.xo=i.x,i.yo=i.y),o.touch(i),r.rp0=r.rp1=a}function Ts(e){var r=e.prog,t=e.ip,n=e.stack,a=r[++t];s.DEBUG&&console.log(e.step,"NPUSHB[]",a);for(var i=0;i<a;i++)n.push(r[++t]);e.ip=t}function ks(e){var r=e.ip,t=e.prog,n=e.stack,a=t[++r];s.DEBUG&&console.log(e.step,"NPUSHW[]",a);for(var i=0;i<a;i++){var o=t[++r]<<8|t[++r];o&32768&&(o=-((o^65535)+1)),n.push(o)}e.ip=r}function Fs(e){var r=e.stack,t=e.store;t||(t=e.store=[]);var n=r.pop(),a=r.pop();s.DEBUG&&console.log(e.step,"WS",n,a),t[a]=n}function Ls(e){var r=e.stack,t=e.store,n=r.pop();s.DEBUG&&console.log(e.step,"RS",n);var a=t&&t[n]||0;r.push(a)}function Es(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"WCVTP",t,n),e.cvt[n]=t/64}function Us(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"RCVT",t),r.push(e.cvt[t]*64)}function Mn(e,r){var t=r.stack,n=t.pop(),a=r.z2[n];s.DEBUG&&console.log(r.step,"GC["+e+"]",n),t.push(r.dpv.distance(a,ar,e,!1)*64)}function Bn(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z1[n],o=r.z0[a],l=r.dpv.distance(o,i,e,e);s.DEBUG&&console.log(r.step,"MD["+e+"]",n,a,"->",l),r.stack.push(Math.round(l*64))}function Os(e){s.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)}function Is(e){s.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0}function Cs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LT[]",t,n),r.push(n<t?1:0)}function ws(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"LTEQ[]",t,n),r.push(n<=t?1:0)}function Rs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"GT[]",t,n),r.push(n>t?1:0)}function Ds(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"GTEQ[]",t,n),r.push(n>=t?1:0)}function As(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"EQ[]",t,n),r.push(t===n?1:0)}function Ms(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"NEQ[]",t,n),r.push(t!==n?1:0)}function Bs(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"ODD[]",t),r.push(Math.trunc(t)%2?1:0)}function Ps(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"EVEN[]",t),r.push(Math.trunc(t)%2?0:1)}function Gs(e){var r=e.stack.pop(),t;s.DEBUG&&console.log(e.step,"IF[]",r),r||(Tn(e,!0),s.DEBUG&&console.log(e.step,t===27?"ELSE[]":"EIF[]"))}function Ns(e){s.DEBUG&&console.log(e.step,"EIF[]")}function Hs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"AND[]",t,n),r.push(t&&n?1:0)}function _s(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"OR[]",t,n),r.push(t||n?1:0)}function zs(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"NOT[]",t),r.push(t?0:1)}function Kr(e,r){var t=r.stack,n=t.pop(),a=r.fv,i=r.pv,o=r.ppem,l=r.deltaBase+(e-1)*16,u=r.deltaShift,c=r.z0;s.DEBUG&&console.log(r.step,"DELTAP["+e+"]",n,t);for(var d=0;d<n;d++){var y=t.pop(),g=t.pop(),m=l+((g&240)>>4);if(m===o){var T=(g&15)-8;T>=0&&T++,s.DEBUG&&console.log(r.step,"DELTAPFIX",y,"by",T*u);var O=c[y];a.setRelative(O,O,T*u,i)}}}function Ws(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t}function Vs(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)}function qs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"ADD[]",t,n),r.push(n+t)}function Xs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"SUB[]",t,n),r.push(n-t)}function Ys(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"DIV[]",t,n),r.push(n*64/t)}function Zs(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MUL[]",t,n),r.push(n*t/64)}function Qs(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"ABS[]",t),r.push(Math.abs(t))}function Js(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"NEG[]",t),r.push(-t)}function Ks(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"FLOOR[]",t),r.push(Math.floor(t/64)*64)}function js(e){var r=e.stack,t=r.pop();s.DEBUG&&console.log(e.step,"CEILING[]",t),r.push(Math.ceil(t/64)*64)}function Lr(e,r){var t=r.stack,n=t.pop();s.DEBUG&&console.log(r.step,"ROUND[]"),t.push(r.round(n/64)*64)}function $s(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"WCVTF[]",t,n),e.cvt[n]=t*e.ppem/e.font.unitsPerEm}function jr(e,r){var t=r.stack,n=t.pop(),a=r.ppem,i=r.deltaBase+(e-1)*16,o=r.deltaShift;s.DEBUG&&console.log(r.step,"DELTAC["+e+"]",n,t);for(var l=0;l<n;l++){var u=t.pop(),c=t.pop(),d=i+((c&240)>>4);if(d===a){var y=(c&15)-8;y>=0&&y++;var g=y*o;s.DEBUG&&console.log(r.step,"DELTACFIX",u,"by",g),r.cvt[u]+=g}}}function eo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SROUND[]",r),e.round=Sn;var t;switch(r&192){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,r&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}r&=15,r===0?e.srThreshold=0:e.srThreshold=(r/8-.5)*t}function ro(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"S45ROUND[]",r),e.round=Sn;var t;switch(r&192){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,r&48){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}r&=15,r===0?e.srThreshold=0:e.srThreshold=(r/8-.5)*t}function to(e){s.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Pi}function no(e){s.DEBUG&&console.log(e.step,"RUTG[]"),e.round=Hi}function ao(e){s.DEBUG&&console.log(e.step,"RDTG[]"),e.round=_i}function io(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCANCTRL[]",r)}function Pn(e,r){var t=r.stack,n=t.pop(),a=t.pop(),i=r.z2[n],o=r.z1[a];s.DEBUG&&console.log(r.step,"SDPVTL["+e+"]",n,a);var l,u;e?(l=i.y-o.y,u=o.x-i.x):(l=o.x-i.x,u=o.y-i.y),r.dpv=nr(l,u)}function so(e){var r=e.stack,t=r.pop(),n=0;s.DEBUG&&console.log(e.step,"GETINFO[]",t),t&1&&(n=35),t&32&&(n|=4096),r.push(n)}function oo(e){var r=e.stack,t=r.pop(),n=r.pop(),a=r.pop();s.DEBUG&&console.log(e.step,"ROLL[]"),r.push(n),r.push(t),r.push(a)}function uo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MAX[]",t,n),r.push(Math.max(n,t))}function lo(e){var r=e.stack,t=r.pop(),n=r.pop();s.DEBUG&&console.log(e.step,"MIN[]",t,n),r.push(Math.min(n,t))}function fo(e){var r=e.stack.pop();s.DEBUG&&console.log(e.step,"SCANTYPE[]",r)}function po(e){var r=e.stack.pop(),t=e.stack.pop();switch(s.DEBUG&&console.log(e.step,"INSTCTRL[]",r,t),r){case 1:e.inhibitGridFit=!!t;return;case 2:e.ignoreCvt=!!t;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Ce(e,r){var t=r.stack,n=r.prog,a=r.ip;s.DEBUG&&console.log(r.step,"PUSHB["+e+"]");for(var i=0;i<e;i++)t.push(n[++a]);r.ip=a}function we(e,r){var t=r.ip,n=r.prog,a=r.stack;s.DEBUG&&console.log(r.ip,"PUSHW["+e+"]");for(var i=0;i<e;i++){var o=n[++t]<<8|n[++t];o&32768&&(o=-((o^65535)+1)),a.push(o)}r.ip=t}function C(e,r,t,n,a,i){var o=i.stack,l=e&&o.pop(),u=o.pop(),c=i.rp0,d=i.z0[c],y=i.z1[u],g=i.minDis,m=i.fv,T=i.dpv,O,F,U,P;F=O=T.distance(y,d,!0,!0),U=F>=0?1:-1,F=Math.abs(F),e&&(P=i.cvt[l],n&&Math.abs(F-P)<i.cvCutIn&&(F=P)),t&&F<g&&(F=g),n&&(F=i.round(F)),m.setRelative(y,d,U*F,T),m.touch(y),s.DEBUG&&console.log(i.step,(e?"MIRP[":"MDRP[")+(r?"M":"m")+(t?">":"_")+(n?"R":"_")+(a===0?"Gr":a===1?"Bl":a===2?"Wh":"")+"]",e?l+"("+i.cvt[l]+","+P+")":"",u,"(d =",O,"->",U*F,")"),i.rp1=i.rp0,i.rp2=u,r&&(i.rp0=u)}mn=[kn.bind(void 0,Fe),kn.bind(void 0,Te),Fn.bind(void 0,Fe),Fn.bind(void 0,Te),Ln.bind(void 0,Fe),Ln.bind(void 0,Te),En.bind(void 0,0),En.bind(void 0,1),Un.bind(void 0,0),Un.bind(void 0,1),Wi,Vi,qi,Xi,Yi,Zi,Qi,Ji,Ki,ji,$i,es,rs,ts,ns,as,is,ss,os,us,void 0,void 0,ls,Jr,fs,ps,hs,ds,gs,void 0,void 0,void 0,cs,vs,ms,void 0,On.bind(void 0,0),On.bind(void 0,1),In.bind(void 0,Fe),In.bind(void 0,Te),Cn.bind(void 0,0),Cn.bind(void 0,1),wn.bind(void 0,0),wn.bind(void 0,1),Rn.bind(void 0,0),Rn.bind(void 0,1),ys,bs,Dn.bind(void 0,0),Dn.bind(void 0,1),xs,Ss,An.bind(void 0,0),An.bind(void 0,1),Ts,ks,Fs,Ls,Es,Us,Mn.bind(void 0,0),Mn.bind(void 0,1),void 0,Bn.bind(void 0,0),Bn.bind(void 0,1),Os,void 0,Is,void 0,void 0,Cs,ws,Rs,Ds,As,Ms,Bs,Ps,Gs,Ns,Hs,_s,zs,Kr.bind(void 0,1),Ws,Vs,qs,Xs,Ys,Zs,Qs,Js,Ks,js,Lr.bind(void 0,0),Lr.bind(void 0,1),Lr.bind(void 0,2),Lr.bind(void 0,3),void 0,void 0,void 0,void 0,$s,Kr.bind(void 0,2),Kr.bind(void 0,3),jr.bind(void 0,1),jr.bind(void 0,2),jr.bind(void 0,3),eo,ro,void 0,void 0,to,void 0,no,ao,Jr,Jr,void 0,void 0,void 0,void 0,void 0,io,Pn.bind(void 0,0),Pn.bind(void 0,1),so,void 0,oo,uo,lo,fo,po,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,Ce.bind(void 0,1),Ce.bind(void 0,2),Ce.bind(void 0,3),Ce.bind(void 0,4),Ce.bind(void 0,5),Ce.bind(void 0,6),Ce.bind(void 0,7),Ce.bind(void 0,8),we.bind(void 0,1),we.bind(void 0,2),we.bind(void 0,3),we.bind(void 0,4),we.bind(void 0,5),we.bind(void 0,6),we.bind(void 0,7),we.bind(void 0,8),C.bind(void 0,0,0,0,0,0),C.bind(void 0,0,0,0,0,1),C.bind(void 0,0,0,0,0,2),C.bind(void 0,0,0,0,0,3),C.bind(void 0,0,0,0,1,0),C.bind(void 0,0,0,0,1,1),C.bind(void 0,0,0,0,1,2),C.bind(void 0,0,0,0,1,3),C.bind(void 0,0,0,1,0,0),C.bind(void 0,0,0,1,0,1),C.bind(void 0,0,0,1,0,2),C.bind(void 0,0,0,1,0,3),C.bind(void 0,0,0,1,1,0),C.bind(void 0,0,0,1,1,1),C.bind(void 0,0,0,1,1,2),C.bind(void 0,0,0,1,1,3),C.bind(void 0,0,1,0,0,0),C.bind(void 0,0,1,0,0,1),C.bind(void 0,0,1,0,0,2),C.bind(void 0,0,1,0,0,3),C.bind(void 0,0,1,0,1,0),C.bind(void 0,0,1,0,1,1),C.bind(void 0,0,1,0,1,2),C.bind(void 0,0,1,0,1,3),C.bind(void 0,0,1,1,0,0),C.bind(void 0,0,1,1,0,1),C.bind(void 0,0,1,1,0,2),C.bind(void 0,0,1,1,0,3),C.bind(void 0,0,1,1,1,0),C.bind(void 0,0,1,1,1,1),C.bind(void 0,0,1,1,1,2),C.bind(void 0,0,1,1,1,3),C.bind(void 0,1,0,0,0,0),C.bind(void 0,1,0,0,0,1),C.bind(void 0,1,0,0,0,2),C.bind(void 0,1,0,0,0,3),C.bind(void 0,1,0,0,1,0),C.bind(void 0,1,0,0,1,1),C.bind(void 0,1,0,0,1,2),C.bind(void 0,1,0,0,1,3),C.bind(void 0,1,0,1,0,0),C.bind(void 0,1,0,1,0,1),C.bind(void 0,1,0,1,0,2),C.bind(void 0,1,0,1,0,3),C.bind(void 0,1,0,1,1,0),C.bind(void 0,1,0,1,1,1),C.bind(void 0,1,0,1,1,2),C.bind(void 0,1,0,1,1,3),C.bind(void 0,1,1,0,0,0),C.bind(void 0,1,1,0,0,1),C.bind(void 0,1,1,0,0,2),C.bind(void 0,1,1,0,0,3),C.bind(void 0,1,1,0,1,0),C.bind(void 0,1,1,0,1,1),C.bind(void 0,1,1,0,1,2),C.bind(void 0,1,1,0,1,3),C.bind(void 0,1,1,1,0,0),C.bind(void 0,1,1,1,0,1),C.bind(void 0,1,1,1,0,2),C.bind(void 0,1,1,1,0,3),C.bind(void 0,1,1,1,1,0),C.bind(void 0,1,1,1,1,1),C.bind(void 0,1,1,1,1,2),C.bind(void 0,1,1,1,1,3)];function z(e){e=e||{},e.empty||(Ye(e.familyName,"When creating a new Font object, familyName is required."),Ye(e.styleName,"When creating a new Font object, styleName is required."),Ye(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Ye(e.ascender,"When creating a new Font object, ascender is required."),Ye(e.descender,"When creating a new Font object, descender is required."),Ye(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||e.familyName+e.styleName},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new qe.GlyphSet(this,e.glyphs||[]),this.encoding=new Ct(this),this.position=new kr(this),this.substitution=new ye(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new bn(this)}})}z.prototype.hasChar=function(e){return this.encoding.charToGlyphIndex(e)!==null},z.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},z.prototype.charToGlyph=function(e){var r=this.charToGlyphIndex(e),t=this.glyphs.get(r);return t||(t=this.glyphs.get(0)),t},z.prototype.stringToGlyphs=function(e,r){var t=this;r=r||this.defaultRenderOptions;for(var n=[],a=0;a<e.length;a+=1){var i=e[a];n.push(t.charToGlyphIndex(i))}var o=n.length;if(r.features){var l=r.script||this.substitution.getDefaultScriptName(),u=[];r.features.liga&&(u=u.concat(this.substitution.getFeature("liga",l,r.language))),r.features.rlig&&(u=u.concat(this.substitution.getFeature("rlig",l,r.language)));for(var c=0;c<o;c+=1)for(var d=0;d<u.length;d++){for(var y=u[d],g=y.sub,m=g.length,T=0;T<m&&g[T]===n[c+T];)T++;T===m&&(n.splice(c,m,y.by),o=o-m+1)}}for(var O=new Array(o),F=this.glyphs.get(0),U=0;U<o;U+=1)O[U]=t.glyphs.get(n[U])||F;return O},z.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},z.prototype.nameToGlyph=function(e){var r=this.nameToGlyphIndex(e),t=this.glyphs.get(r);return t||(t=this.glyphs.get(0)),t},z.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},z.prototype.getKerningValue=function(e,r){return e=e.index||e,r=r.index||r,this.kerningPairs[e+","+r]||0},z.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},z.prototype.forEachGlyph=function(e,r,t,n,a,i){var o=this;r=r!==void 0?r:0,t=t!==void 0?t:0,n=n!==void 0?n:72,a=a||this.defaultRenderOptions;var l=1/this.unitsPerEm*n,u=this.stringToGlyphs(e,a),c;if(a.kerning){var d=a.script||this.position.getDefaultScriptName();c=this.position.getKerningTables(d,a.language)}for(var y=0;y<u.length;y+=1){var g=u[y];if(i.call(o,g,r,t,n,a),g.advanceWidth&&(r+=g.advanceWidth*l),a.kerning&&y<u.length-1){var m=c?o.position.getKerningValue(c,g.index,u[y+1].index):o.getKerningValue(g,u[y+1]);r+=m*l}a.letterSpacing?r+=a.letterSpacing*n:a.tracking&&(r+=a.tracking/1e3*n)}return r},z.prototype.getPath=function(e,r,t,n,a){var i=new Z;return this.forEachGlyph(e,r,t,n,a,function(o,l,u,c){var d=o.getPath(l,u,c,a,this);i.extend(d)}),i},z.prototype.getPaths=function(e,r,t,n,a){var i=[];return this.forEachGlyph(e,r,t,n,a,function(o,l,u,c){var d=o.getPath(l,u,c,a,this);i.push(d)}),i},z.prototype.getAdvanceWidth=function(e,r,t){return this.forEachGlyph(e,0,0,r,t,function(){})},z.prototype.draw=function(e,r,t,n,a,i){this.getPath(r,t,n,a,i).draw(e)},z.prototype.drawPoints=function(e,r,t,n,a,i){this.forEachGlyph(r,t,n,a,i,function(o,l,u,c){o.drawPoints(e,l,u,c)})},z.prototype.drawMetrics=function(e,r,t,n,a,i){this.forEachGlyph(r,t,n,a,i,function(o,l,u,c){o.drawMetrics(e,l,u,c)})},z.prototype.getEnglishName=function(e){var r=this.names[e];if(r)return r.en},z.prototype.validate=function(){var e=[],r=this;function t(a,i){a||e.push(i)}function n(a){var i=r.getEnglishName(a);t(i&&i.trim().length>0,"No English "+a+" specified.")}n("fontFamily"),n("weightName"),n("manufacturer"),n("copyright"),n("version"),t(this.unitsPerEm>0,"No unitsPerEm specified.")},z.prototype.toTables=function(){return Di.fontToTable(this)},z.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},z.prototype.toArrayBuffer=function(){for(var e=this.toTables(),r=e.encode(),t=new ArrayBuffer(r.length),n=new Uint8Array(t),a=0;a<r.length;a++)n[a]=r[a];return t},z.prototype.download=function(e){var r=this.getEnglishName("fontFamily"),t=this.getEnglishName("fontSubfamily");e=e||r.replace(/\s/g,"")+"-"+t+".otf";var n=this.toArrayBuffer();if(Mi())window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,n.byteLength,function(o){o.root.getFile(e,{create:!0},function(l){l.createWriter(function(u){var c=new DataView(n),d=new Blob([c],{type:"font/opentype"});u.write(d),u.addEventListener("writeend",function(){location.href=l.toURL()},!1)})})},function(o){throw new Error(o.name+": "+o.message)});else{var a=tt("fs"),i=Bi(n);a.writeFileSync(e,i)}},z.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},z.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},z.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function Gn(e,r){var t=JSON.stringify(e),n=256;for(var a in r){var i=parseInt(a);if(!(!i||i<256)){if(JSON.stringify(r[a])===t)return i;n<=i&&(n=i+1)}}return r[n]=e,n}function ho(e,r,t){var n=Gn(r.name,t);return[{name:"tag_"+e,type:"TAG",value:r.tag},{name:"minValue_"+e,type:"FIXED",value:r.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:r.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:r.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:n}]}function co(e,r,t){var n={},a=new w.Parser(e,r);return n.tag=a.parseTag(),n.minValue=a.parseFixed(),n.defaultValue=a.parseFixed(),n.maxValue=a.parseFixed(),a.skip("uShort",1),n.name=t[a.parseUShort()]||{},n}function vo(e,r,t,n){for(var a=Gn(r.name,n),i=[{name:"nameID_"+e,type:"USHORT",value:a},{name:"flags_"+e,type:"USHORT",value:0}],o=0;o<t.length;++o){var l=t[o].tag;i.push({name:"axis_"+e+" "+l,type:"FIXED",value:r.coordinates[l]<<16})}return i}function go(e,r,t,n){var a={},i=new w.Parser(e,r);a.name=n[i.parseUShort()]||{},i.skip("uShort",1),a.coordinates={};for(var o=0;o<t.length;++o)a.coordinates[t[o].tag]=i.parseFixed();return a}function mo(e,r){var t=new A.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+e.axes.length*4}]);t.offsetToData=t.sizeOf();for(var n=0;n<e.axes.length;n++)t.fields=t.fields.concat(ho(n,e.axes[n],r));for(var a=0;a<e.instances.length;a++)t.fields=t.fields.concat(vo(a,e.instances[a],e.axes,r));return t}function yo(e,r,t){var n=new w.Parser(e,r),a=n.parseULong();G.argument(a===65536,"Unsupported fvar table version.");var i=n.parseOffset16();n.skip("uShort",1);for(var o=n.parseUShort(),l=n.parseUShort(),u=n.parseUShort(),c=n.parseUShort(),d=[],y=0;y<o;y++)d.push(co(e,r+i+y*l,t));for(var g=[],m=r+i+o*l,T=0;T<u;T++)g.push(go(e,m+T*c,d,t));return{axes:d,instances:g}}var bo={make:mo,parse:yo},be=new Array(10);be[1]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(b.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(b.coverage),values:this.parseValueRecordList()};G.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},be[2]=function(){var r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parsePointer(b.coverage),a=this.parseUShort(),i=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:a,valueFormat2:i,pairSets:this.parseList(b.pointer(b.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(a),value2:this.parseValueRecord(i)}})))};if(t===2){var o=this.parsePointer(b.classDef),l=this.parsePointer(b.classDef),u=this.parseUShort(),c=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:a,valueFormat2:i,classDef1:o,classDef2:l,class1Count:u,class2Count:c,classRecords:this.parseList(u,b.list(c,function(){return{value1:this.parseValueRecord(a),value2:this.parseValueRecord(i)}}))}}G.assert(!1,"0x"+r.toString(16)+": GPOS lookup type 2 format must be 1 or 2.")},be[3]=function(){return{error:"GPOS Lookup 3 not supported"}},be[4]=function(){return{error:"GPOS Lookup 4 not supported"}},be[5]=function(){return{error:"GPOS Lookup 5 not supported"}},be[6]=function(){return{error:"GPOS Lookup 6 not supported"}},be[7]=function(){return{error:"GPOS Lookup 7 not supported"}},be[8]=function(){return{error:"GPOS Lookup 8 not supported"}},be[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function xo(e,r){r=r||0;var t=new b(e,r),n=t.parseVersion(1);return G.argument(n===1||n===1.1,"Unsupported GPOS table version "+n),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(be)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(be),variations:t.parseFeatureVariationsList()}}var So=new Array(10);function To(e){return new A.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new A.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new A.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new A.LookupList(e.lookups,So)}])}var ko={parse:xo,make:To};function Fo(e){var r={};e.skip("uShort");var t=e.parseUShort();G.argument(t===0,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var a=0;a<n;a+=1){var i=e.parseUShort(),o=e.parseUShort(),l=e.parseShort();r[i+","+o]=l}return r}function Lo(e){var r={};e.skip("uShort");var t=e.parseULong();t>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var n=e.parseUShort(),a=n&255;if(e.skip("uShort"),a===0){var i=e.parseUShort();e.skip("uShort",3);for(var o=0;o<i;o+=1){var l=e.parseUShort(),u=e.parseUShort(),c=e.parseShort();r[l+","+u]=c}}return r}function Eo(e,r){var t=new w.Parser(e,r),n=t.parseUShort();if(n===0)return Fo(t);if(n===1)return Lo(t);throw new Error("Unsupported kern table version ("+n+").")}var Uo={parse:Eo};function Oo(e,r,t,n){for(var a=new w.Parser(e,r),i=n?a.parseUShort:a.parseULong,o=[],l=0;l<t+1;l+=1){var u=i.call(a);n&&(u*=2),o.push(u)}return o}var Io={parse:Oo};function Co(e,r){var t=tt("fs");t.readFile(e,function(n,a){if(n)return r(n.message);r(null,gn(a))})}function wo(e,r){var t=new XMLHttpRequest;t.open("get",e,!0),t.responseType="arraybuffer",t.onload=function(){return t.response?r(null,t.response):r("Font could not be loaded: "+t.statusText)},t.onerror=function(){r("Font could not be loaded")},t.send()}function Nn(e,r){for(var t=[],n=12,a=0;a<r;a+=1){var i=w.getTag(e,n),o=w.getULong(e,n+4),l=w.getULong(e,n+8),u=w.getULong(e,n+12);t.push({tag:i,checksum:o,offset:l,length:u,compression:!1}),n+=16}return t}function Ro(e,r){for(var t=[],n=44,a=0;a<r;a+=1){var i=w.getTag(e,n),o=w.getULong(e,n+4),l=w.getULong(e,n+8),u=w.getULong(e,n+12),c=void 0;l<u?c="WOFF":c=!1,t.push({tag:i,offset:o,compression:c,compressedLength:l,length:u}),n+=20}return t}function Q(e,r){if(r.compression==="WOFF"){var t=new Uint8Array(e.buffer,r.offset+2,r.compressedLength-2),n=new Uint8Array(r.length);if(pa(t,n),n.byteLength!==r.length)throw new Error("Decompression error: "+r.tag+" decompressed length doesn't match recorded length");var a=new DataView(n.buffer,0);return{data:a,offset:0}}else return{data:e,offset:r.offset}}function $r(e){var r,t,n=new z({empty:!0}),a=new DataView(e,0),i,o=[],l=w.getTag(a,0);if(l==="\0\0\0"||l==="true"||l==="typ1")n.outlinesFormat="truetype",i=w.getUShort(a,4),o=Nn(a,i);else if(l==="OTTO")n.outlinesFormat="cff",i=w.getUShort(a,4),o=Nn(a,i);else if(l==="wOFF"){var u=w.getTag(a,4);if(u==="\0\0\0")n.outlinesFormat="truetype";else if(u==="OTTO")n.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+l);i=w.getUShort(a,12),o=Ro(a,i)}else throw new Error("Unsupported OpenType signature "+l);for(var c,d,y,g,m,T,O,F,U,P,I,H=0;H<i;H+=1){var R=o[H],B=void 0;switch(R.tag){case"cmap":B=Q(a,R),n.tables.cmap=It.parse(B.data,B.offset),n.encoding=new wt(n.tables.cmap);break;case"cvt ":B=Q(a,R),I=new w.Parser(B.data,B.offset),n.tables.cvt=I.parseShortList(R.length/2);break;case"fvar":d=R;break;case"fpgm":B=Q(a,R),I=new w.Parser(B.data,B.offset),n.tables.fpgm=I.parseByteList(R.length);break;case"head":B=Q(a,R),n.tables.head=Yt.parse(B.data,B.offset),n.unitsPerEm=n.tables.head.unitsPerEm,r=n.tables.head.indexToLocFormat;break;case"hhea":B=Q(a,R),n.tables.hhea=Zt.parse(B.data,B.offset),n.ascender=n.tables.hhea.ascender,n.descender=n.tables.hhea.descender,n.numberOfHMetrics=n.tables.hhea.numberOfHMetrics;break;case"hmtx":T=R;break;case"ltag":B=Q(a,R),t=Jt.parse(B.data,B.offset);break;case"maxp":B=Q(a,R),n.tables.maxp=Kt.parse(B.data,B.offset),n.numGlyphs=n.tables.maxp.numGlyphs;break;case"name":U=R;break;case"OS/2":B=Q(a,R),n.tables.os2=Xr.parse(B.data,B.offset);break;case"post":B=Q(a,R),n.tables.post=sn.parse(B.data,B.offset),n.glyphNames=new Nr(n.tables.post);break;case"prep":B=Q(a,R),I=new w.Parser(B.data,B.offset),n.tables.prep=I.parseByteList(R.length);break;case"glyf":y=R;break;case"loca":F=R;break;case"CFF ":c=R;break;case"kern":O=R;break;case"GPOS":g=R;break;case"GSUB":m=R;break;case"meta":P=R;break}}var ue=Q(a,U);if(n.tables.name=an.parse(ue.data,ue.offset,t),n.names=n.tables.name,y&&F){var q=r===0,K=Q(a,F),se=Io.parse(K.data,K.offset,n.numGlyphs,q),le=Q(a,y);n.glyphs=At.parse(le.data,le.offset,se,n)}else if(c){var pe=Q(a,c);Xt.parse(pe.data,pe.offset,n)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var de=Q(a,T);if(Qt.parse(de.data,de.offset,n.numberOfHMetrics,n.numGlyphs,n.glyphs),Ca(n),O){var J=Q(a,O);n.kerningPairs=Uo.parse(J.data,J.offset)}else n.kerningPairs={};if(g){var j=Q(a,g);n.tables.gpos=ko.parse(j.data,j.offset)}if(m){var re=Q(a,m);n.tables.gsub=on.parse(re.data,re.offset)}if(d){var te=Q(a,d);n.tables.fvar=bo.parse(te.data,te.offset,n.names)}if(P){var ne=Q(a,P);n.tables.meta=un.parse(ne.data,ne.offset),n.metas=n.tables.meta}return n}function Do(e,r){var t=typeof window>"u",n=t?Co:wo;n(e,function(a,i){if(a)return r(a);var o;try{o=$r(i)}catch(l){return r(l,null)}return r(null,o)})}function Ao(e){var r=tt("fs"),t=r.readFileSync(e);return $r(gn(t))}s.Font=z,s.Glyph=fe,s.Path=Z,s.BoundingBox=ke,s._parse=w,s.parse=$r,s.load=Do,s.loadSync=Ao,Object.defineProperty(s,"__esModule",{value:!0})}))});var Zn=Ur((Au,Yn)=>{"use strict";Yn.exports=function(s){s.prototype[Symbol.iterator]=function*(){for(let f=this.head;f;f=f.next)yield f.value}}});var Jn=Ur((Mu,Qn)=>{"use strict";Qn.exports=_;_.Node=He;_.create=_;function _(s){var f=this;if(f instanceof _||(f=new _),f.tail=null,f.head=null,f.length=0,s&&typeof s.forEach=="function")s.forEach(function(v){f.push(v)});else if(arguments.length>0)for(var p=0,h=arguments.length;p<h;p++)f.push(arguments[p]);return f}_.prototype.removeNode=function(s){if(s.list!==this)throw new Error("removing node which does not belong to this list");var f=s.next,p=s.prev;return f&&(f.prev=p),p&&(p.next=f),s===this.head&&(this.head=f),s===this.tail&&(this.tail=p),s.list.length--,s.next=null,s.prev=null,s.list=null,f};_.prototype.unshiftNode=function(s){if(s!==this.head){s.list&&s.list.removeNode(s);var f=this.head;s.list=this,s.next=f,f&&(f.prev=s),this.head=s,this.tail||(this.tail=s),this.length++}};_.prototype.pushNode=function(s){if(s!==this.tail){s.list&&s.list.removeNode(s);var f=this.tail;s.list=this,s.prev=f,f&&(f.next=s),this.tail=s,this.head||(this.head=s),this.length++}};_.prototype.push=function(){for(var s=0,f=arguments.length;s<f;s++)Jo(this,arguments[s]);return this.length};_.prototype.unshift=function(){for(var s=0,f=arguments.length;s<f;s++)Ko(this,arguments[s]);return this.length};_.prototype.pop=function(){if(this.tail){var s=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,s}};_.prototype.shift=function(){if(this.head){var s=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,s}};_.prototype.forEach=function(s,f){f=f||this;for(var p=this.head,h=0;p!==null;h++)s.call(f,p.value,h,this),p=p.next};_.prototype.forEachReverse=function(s,f){f=f||this;for(var p=this.tail,h=this.length-1;p!==null;h--)s.call(f,p.value,h,this),p=p.prev};_.prototype.get=function(s){for(var f=0,p=this.head;p!==null&&f<s;f++)p=p.next;if(f===s&&p!==null)return p.value};_.prototype.getReverse=function(s){for(var f=0,p=this.tail;p!==null&&f<s;f++)p=p.prev;if(f===s&&p!==null)return p.value};_.prototype.map=function(s,f){f=f||this;for(var p=new _,h=this.head;h!==null;)p.push(s.call(f,h.value,this)),h=h.next;return p};_.prototype.mapReverse=function(s,f){f=f||this;for(var p=new _,h=this.tail;h!==null;)p.push(s.call(f,h.value,this)),h=h.prev;return p};_.prototype.reduce=function(s,f){var p,h=this.head;if(arguments.length>1)p=f;else if(this.head)h=this.head.next,p=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var v=0;h!==null;v++)p=s(p,h.value,v),h=h.next;return p};_.prototype.reduceReverse=function(s,f){var p,h=this.tail;if(arguments.length>1)p=f;else if(this.tail)h=this.tail.prev,p=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var v=this.length-1;h!==null;v--)p=s(p,h.value,v),h=h.prev;return p};_.prototype.toArray=function(){for(var s=new Array(this.length),f=0,p=this.head;p!==null;f++)s[f]=p.value,p=p.next;return s};_.prototype.toArrayReverse=function(){for(var s=new Array(this.length),f=0,p=this.tail;p!==null;f++)s[f]=p.value,p=p.prev;return s};_.prototype.slice=function(s,f){f=f||this.length,f<0&&(f+=this.length),s=s||0,s<0&&(s+=this.length);var p=new _;if(f<s||f<0)return p;s<0&&(s=0),f>this.length&&(f=this.length);for(var h=0,v=this.head;v!==null&&h<s;h++)v=v.next;for(;v!==null&&h<f;h++,v=v.next)p.push(v.value);return p};_.prototype.sliceReverse=function(s,f){f=f||this.length,f<0&&(f+=this.length),s=s||0,s<0&&(s+=this.length);var p=new _;if(f<s||f<0)return p;s<0&&(s=0),f>this.length&&(f=this.length);for(var h=this.length,v=this.tail;v!==null&&h>f;h--)v=v.prev;for(;v!==null&&h>s;h--,v=v.prev)p.push(v.value);return p};_.prototype.splice=function(s,f,...p){s>this.length&&(s=this.length-1),s<0&&(s=this.length+s);for(var h=0,v=this.head;v!==null&&h<s;h++)v=v.next;for(var x=[],h=0;v&&h<f;h++)x.push(v.value),v=this.removeNode(v);v===null&&(v=this.tail),v!==this.head&&v!==this.tail&&(v=v.prev);for(var h=0;h<p.length;h++)v=Qo(this,v,p[h]);return x};_.prototype.reverse=function(){for(var s=this.head,f=this.tail,p=s;p!==null;p=p.prev){var h=p.prev;p.prev=p.next,p.next=h}return this.head=f,this.tail=s,this};function Qo(s,f,p){var h=f===s.head?new He(p,null,f,s):new He(p,f,f.next,s);return h.next===null&&(s.tail=h),h.prev===null&&(s.head=h),s.length++,h}function Jo(s,f){s.tail=new He(f,s.tail,null,s),s.head||(s.head=s.tail),s.length++}function Ko(s,f){s.head=new He(f,null,s.head,s),s.tail||(s.tail=s.head),s.length++}function He(s,f,p,h){if(!(this instanceof He))return new He(s,f,p,h);this.list=h,this.value=s,f?(f.next=this,this.prev=f):this.prev=null,p?(p.prev=this,this.next=p):this.next=null}try{Zn()(_)}catch{}});var ra=Ur((Bu,ea)=>{"use strict";var jo=Jn(),_e=Symbol("max"),Ue=Symbol("length"),Je=Symbol("lengthCalculator"),lr=Symbol("allowStale"),ze=Symbol("maxAge"),Ee=Symbol("dispose"),Kn=Symbol("noDisposeOnSet"),$=Symbol("lruList"),xe=Symbol("cache"),$n=Symbol("updateAgeOnGet"),ht=()=>1,vt=class{constructor(f){if(typeof f=="number"&&(f={max:f}),f||(f={}),f.max&&(typeof f.max!="number"||f.max<0))throw new TypeError("max must be a non-negative number");let p=this[_e]=f.max||1/0,h=f.length||ht;if(this[Je]=typeof h!="function"?ht:h,this[lr]=f.stale||!1,f.maxAge&&typeof f.maxAge!="number")throw new TypeError("maxAge must be a number");this[ze]=f.maxAge||0,this[Ee]=f.dispose,this[Kn]=f.noDisposeOnSet||!1,this[$n]=f.updateAgeOnGet||!1,this.reset()}set max(f){if(typeof f!="number"||f<0)throw new TypeError("max must be a non-negative number");this[_e]=f||1/0,ur(this)}get max(){return this[_e]}set allowStale(f){this[lr]=!!f}get allowStale(){return this[lr]}set maxAge(f){if(typeof f!="number")throw new TypeError("maxAge must be a non-negative number");this[ze]=f,ur(this)}get maxAge(){return this[ze]}set lengthCalculator(f){typeof f!="function"&&(f=ht),f!==this[Je]&&(this[Je]=f,this[Ue]=0,this[$].forEach(p=>{p.length=this[Je](p.value,p.key),this[Ue]+=p.length})),ur(this)}get lengthCalculator(){return this[Je]}get length(){return this[Ue]}get itemCount(){return this[$].length}rforEach(f,p){p=p||this;for(let h=this[$].tail;h!==null;){let v=h.prev;jn(this,f,h,p),h=v}}forEach(f,p){p=p||this;for(let h=this[$].head;h!==null;){let v=h.next;jn(this,f,h,p),h=v}}keys(){return this[$].toArray().map(f=>f.key)}values(){return this[$].toArray().map(f=>f.value)}reset(){this[Ee]&&this[$]&&this[$].length&&this[$].forEach(f=>this[Ee](f.key,f.value)),this[xe]=new Map,this[$]=new jo,this[Ue]=0}dump(){return this[$].map(f=>Rr(this,f)?!1:{k:f.key,v:f.value,e:f.now+(f.maxAge||0)}).toArray().filter(f=>f)}dumpLru(){return this[$]}set(f,p,h){if(h=h||this[ze],h&&typeof h!="number")throw new TypeError("maxAge must be a number");let v=h?Date.now():0,x=this[Je](p,f);if(this[xe].has(f)){if(x>this[_e])return Ke(this,this[xe].get(f)),!1;let k=this[xe].get(f).value;return this[Ee]&&(this[Kn]||this[Ee](f,k.value)),k.now=v,k.maxAge=h,k.value=p,this[Ue]+=x-k.length,k.length=x,this.get(f),ur(this),!0}let S=new dt(f,p,x,v,h);return S.length>this[_e]?(this[Ee]&&this[Ee](f,p),!1):(this[Ue]+=S.length,this[$].unshift(S),this[xe].set(f,this[$].head),ur(this),!0)}has(f){if(!this[xe].has(f))return!1;let p=this[xe].get(f).value;return!Rr(this,p)}get(f){return ct(this,f,!0)}peek(f){return ct(this,f,!1)}pop(){let f=this[$].tail;return f?(Ke(this,f),f.value):null}del(f){Ke(this,this[xe].get(f))}load(f){this.reset();let p=Date.now();for(let h=f.length-1;h>=0;h--){let v=f[h],x=v.e||0;if(x===0)this.set(v.k,v.v);else{let S=x-p;S>0&&this.set(v.k,v.v,S)}}}prune(){this[xe].forEach((f,p)=>ct(this,p,!1))}},ct=(s,f,p)=>{let h=s[xe].get(f);if(h){let v=h.value;if(Rr(s,v)){if(Ke(s,h),!s[lr])return}else p&&(s[$n]&&(h.value.now=Date.now()),s[$].unshiftNode(h));return v.value}},Rr=(s,f)=>{if(!f||!f.maxAge&&!s[ze])return!1;let p=Date.now()-f.now;return f.maxAge?p>f.maxAge:s[ze]&&p>s[ze]},ur=s=>{if(s[Ue]>s[_e])for(let f=s[$].tail;s[Ue]>s[_e]&&f!==null;){let p=f.prev;Ke(s,f),f=p}},Ke=(s,f)=>{if(f){let p=f.value;s[Ee]&&s[Ee](p.key,p.value),s[Ue]-=p.length,s[xe].delete(p.key),s[$].removeNode(f)}},dt=class{constructor(f,p,h,v,x){this.key=f,this.value=p,this.length=h,this.now=v,this.maxAge=x||0}},jn=(s,f,p,h)=>{let v=p.value;Rr(s,v)&&(Ke(s,p),s[lr]||(v=void 0)),v&&f.call(h,v.value,v.key,s)};ea.exports=vt});var ta=Wo(Wn());function ir(s){let f={individual:{},range:[]},p=new WeakMap;for(let h of s)at(f,h,p);return f}function at(s,f,p){for(let[h,v]of Object.entries(f.individual))if(s.individual[h])Ze(s.individual[h],v,p);else{let x=!1;for(let[S,{range:L,entry:k}]of s.range.entries()){let D=nt(Number(h),L);if(D.both!==null){x=!0,s.individual[h]=v,Ze(s.individual[h],ie(k),p),s.range.splice(S,1);for(let V of D.second)Array.isArray(V)?s.range.push({range:V,entry:ie(k)}):s.individual[V]=ie(k)}}x||(s.individual[h]=v)}for(let{range:h,entry:v}of f.range){let x=[h];for(let S=0;S<s.range.length;S++){let{range:L,entry:k}=s.range[S];for(let[D,V]of x.entries())if(Array.isArray(V)){let N=Vo(V,L);if(N.both===null)continue;s.range.splice(S,1),S--;let W=ie(k);Array.isArray(N.both)?s.range.push({range:N.both,entry:W}):s.individual[N.both]=W,Ze(W,ie(v),p);for(let X of N.second)Array.isArray(X)?s.range.push({range:X,entry:ie(k)}):s.individual[X]=ie(k);x=N.first}else{let N=nt(V,L);if(N.both===null)continue;s.individual[V]=ie(v),Ze(s.individual[V],ie(k),p),s.range.splice(S,1),S--;for(let W of N.second)Array.isArray(W)?s.range.push({range:W,entry:ie(k)}):s.individual[W]=ie(k);x.splice(D,1,...N.first);break}}for(let S of Object.keys(s.individual))for(let[L,k]of x.entries())if(Array.isArray(k)){let D=nt(Number(S),k);if(D.both===null)continue;Ze(s.individual[S],ie(v),p),x.splice(L,1,...D.second);break}else if(Number(S)===k){Ze(s.individual[S],ie(v),p);break}for(let S of x)Array.isArray(S)?s.range.push({range:S,entry:ie(v)}):s.individual[S]=ie(v)}}function Ze(s,f,p){let h=p.get(s);h?.has(f)||(h||(h=new Set,p.set(s,h)),h.add(f),f.lookup&&(!s.lookup||s.lookup.index>f.lookup.index||s.lookup.index===f.lookup.index&&s.lookup.subIndex>f.lookup.subIndex)&&(s.lookup=f.lookup),f.forward&&(s.forward?at(s.forward,f.forward,p):s.forward=f.forward),f.reverse&&(s.reverse?at(s.reverse,f.reverse,p):s.reverse=f.reverse))}function Vo(s,f){let p={first:[],second:[],both:null};if(s[0]<f[1]&&f[0]<s[1]){let h=Math.max(s[0],f[0]),v=Math.min(s[1],f[1]);p.both=Ge(h,v)}if(s[0]<f[0]){let h=s[0],v=Math.min(f[0],s[1]);p.first.push(Ge(h,v))}else if(f[0]<s[0]){let h=f[0],v=Math.min(f[1],s[0]);p.second.push(Ge(h,v))}if(s[1]>f[1]){let h=Math.max(s[0],f[1]),v=s[1];p.first.push(Ge(h,v))}else if(f[1]>s[1]){let h=Math.max(s[1],f[0]),v=f[1];p.second.push(Ge(h,v))}return p}function nt(s,f){if(s<f[0]||s>f[1])return{first:[s],second:[f],both:null};let p={first:[],second:[],both:s};return f[0]<s&&p.second.push(Ge(f[0],s)),f[1]>s&&p.second.push(Ge(s+1,f[1])),p}function Ge(s,f){return f-s===1?s:[s,f]}function ie(s,f=new Map){if(f.has(s))return f.get(s);let p={};return f.set(s,p),s.forward&&(p.forward=Vn(s.forward,f)),s.reverse&&(p.reverse=Vn(s.reverse,f)),s.lookup&&(p.lookup={contextRange:s.lookup.contextRange.slice(),index:s.lookup.index,length:s.lookup.length,subIndex:s.lookup.subIndex,substitutions:s.lookup.substitutions.slice()}),p}function Vn(s,f=new Map){let p={};for(let[h,v]of Object.entries(s.individual))p[h]=ie(v,f);return{individual:p,range:s.range.map(({range:h,entry:v})=>({range:h.slice(),entry:ie(v,f)}))}}function sr(s,f,p,h){let v=f[h],x=s[v];if(!x)return;let S=x.lookup;if(x.reverse){let k=qo(x.reverse,f,p);(!S&&k||k&&S&&(S.index>k.index||S.index===k.index&&S.subIndex>k.subIndex))&&(S=k)}if(++h>=f.length||!x.forward)return S;let L=sr(x.forward,f,p,h);return(!S&&L||L&&S&&(S.index>L.index||S.index===L.index&&S.subIndex>L.subIndex))&&(S=L),S}function qo(s,f,p){let h=s[f[--p]],v=h&&h.lookup;for(;h&&((!v&&h.lookup||h.lookup&&v&&v.index>h.lookup.index)&&(v=h.lookup),!(--p<0||!h.reverse));)h=h.reverse[f[p]];return v}function Ir(s,f,p){let h=!1;for(let v=0;v<s.length;v++){let x=s[v];if(h){if(p<=x[0])return s[v-1][1]=p,s;if(p<=x[1])return s[v-1][1]=Math.max(p,x[1]),s.splice(v,1),h=!1,s;s.splice(v,1),v--}else{if(p<=x[0])return s.splice(v,0,[f,p]),s;if(p<=x[1])return x[0]=Math.min(f,x[0]),s;if(f<x[1])x[0]=Math.min(f,x[0]),h=!0;else continue}}return h?s[s.length-1][1]=p:s.push([f,p]),s}function it(s,f){switch(s.format){case 1:let p=s.glyphs.indexOf(f);return p!==-1?p:null;case 2:let h=s.ranges.find(v=>v.start<=f&&v.end>=f);return h?h.index:null}}function ce(s){switch(s.format){case 1:return s.glyphs.map((p,h)=>({glyphId:p,index:h}));case 2:let f=[];for(let[p,h]of s.ranges.entries())h.end===h.start?f.push({glyphId:h.start,index:p}):f.push({glyphId:[h.start,h.end+1],index:p});return f}}function qn(s,f){let p=f[0],h=Cr(s,p),v=f[0]+1,x=new Map;for(;v<f[1];)Cr(s,v)!==h&&(v-p<=1?x.set(p,h):x.set([p,v],h)),v++;return v-p<=1?x.set(p,h):x.set([p,v],h),x}function Cr(s,f){let p=it(s.coverage,f);if(p===null)return null;switch(s.substFormat){case 1:return(f+s.deltaGlyphId)%2**16;case 2:return s.substitute[p]!=null?s.substitute[p]:null}}function Qe(s,f,p,h,v){let x=[];for(let S of p){S.entry.forward={individual:{},range:[]};for(let L of s)x.push(...Ne(S.entry.forward,h,v,f,L).map(({entry:k,substitution:D})=>({entry:k,substitutions:[...S.substitutions,D]})))}return x}function Re(s,f){let p=[],h=new Set;for(let v of f){if(h.has(v.entry))continue;h.add(v.entry),v.entry.forward||(v.entry.forward={individual:{},range:[]});let x={};for(let S of s)Array.isArray(S)?v.entry.forward.range.push({entry:x,range:S}):v.entry.forward.individual[S]=x;p.push({entry:x,substitutions:v.substitutions})}return p}function De(s,f){let p=[],h=new Set;for(let v of f){if(h.has(v.entry))continue;h.add(v.entry),v.entry.reverse||(v.entry.reverse={individual:{},range:[]});let x={};for(let S of s)Array.isArray(S)?v.entry.reverse.range.push({entry:x,range:S}):v.entry.reverse.individual[S]=x;p.push({entry:x,substitutions:v.substitutions})}return p}function Ne(s,f,p,h,v){let x=[];if(!Array.isArray(v))s.individual[v]={},x.push({entry:s.individual[v],substitution:Yo(f,p,h,v)});else{let S=Xo(f,p,h,v);for(let[L,k]of S){let D={};Array.isArray(L)?s.range.push({range:L,entry:D}):s.individual[L]={},x.push({entry:D,substitution:k})}}return x}function Xo(s,f,p,h){for(let v of s.filter(x=>x.sequenceIndex===p))for(let x of f[v.lookupListIndex].subtables){let S=qn(x,h);if(!Array.from(S.values()).every(L=>L!==null))return S}return new Map([[h,null]])}function Yo(s,f,p,h){for(let v of s.filter(x=>x.sequenceIndex===p))for(let x of f[v.lookupListIndex].subtables){let S=Cr(x,h);if(S!==null)return S}return null}function st(s,f,p){let h={individual:{},range:[]},v=ce(s.coverage);for(let{glyphId:x,index:S}of v){let L=s.chainRuleSets[S];if(L)for(let[k,D]of L.entries()){let V=Ne(h,D.lookupRecords,f,0,x).map(({entry:N,substitution:W})=>({entry:N,substitutions:[W]}));for(let[N,W]of D.input.entries())V=Qe([W],N+1,V,D.lookupRecords,f);for(let N of D.lookahead)V=Re([N],V);for(let N of D.backtrack)V=De([N],V);for(let{entry:N,substitutions:W}of V)N.lookup={substitutions:W,length:D.input.length+1,index:p,subIndex:k,contextRange:[-1*D.backtrack.length,1+D.input.length+D.lookahead.length]}}}return h}function ut(s,f){switch(s.format){case 2:return Array.isArray(f)?Zo(s,f):new Map([[f,ot(s,f)]]);default:return new Map([[f,null]])}}function Zo(s,f){let p=f[0],h=ot(s,p),v=f[0]+1,x=new Map;for(;v<f[1];)ot(s,v)!==h&&(v-p<=1?x.set(p,h):x.set([p,v],h)),v++;return v-p<=1?x.set(p,h):x.set([p,v],h),x}function ot(s,f){for(let p of s.ranges)if(p.start<=f&&p.end>=f)return p.classId;return null}function wr(s,f){switch(s.format){case 2:let p=[];for(let h of s.ranges)h.classId===f&&(h.end===h.start?p.push(h.start):p.push([h.start,h.end+1]));return p;default:return[]}}function lt(s,f,p){let h=[],v=ce(s.coverage);for(let{glyphId:x}of v){let S=ut(s.inputClassDef,x);for(let[L,k]of S.entries()){if(k===null)continue;let D=s.chainClassSet[k];if(D)for(let[V,N]of D.entries()){let W={individual:{},range:[]},X=Ne(W,N.lookupRecords,f,0,L).map(({entry:ve,substitution:Ae})=>({entry:ve,substitutions:[Ae]}));for(let[ve,Ae]of N.input.entries())X=Qe(wr(s.inputClassDef,Ae),ve+1,X,N.lookupRecords,f);for(let ve of N.lookahead)X=Re(wr(s.lookaheadClassDef,ve),X);for(let ve of N.backtrack)X=De(wr(s.backtrackClassDef,ve),X);for(let{entry:ve,substitutions:Ae}of X)ve.lookup={substitutions:Ae,index:p,subIndex:V,length:N.input.length+1,contextRange:[-1*N.backtrack.length,1+N.input.length+N.lookahead.length]};h.push(W)}}}return ir(h)}function ft(s,f,p){let h={individual:{},range:[]},v=ce(s.inputCoverage[0]);for(let{glyphId:x}of v){let S=Ne(h,s.lookupRecords,f,0,x).map(({entry:L,substitution:k})=>({entry:L,substitutions:[k]}));for(let[L,k]of s.inputCoverage.slice(1).entries())S=Qe(ce(k).map(D=>D.glyphId),L+1,S,s.lookupRecords,f);for(let L of s.lookaheadCoverage)S=Re(ce(L).map(k=>k.glyphId),S);for(let L of s.backtrackCoverage)S=De(ce(L).map(k=>k.glyphId),S);for(let{entry:L,substitutions:k}of S)L.lookup={substitutions:k,index:p,subIndex:0,length:s.inputCoverage.length,contextRange:[-1*s.backtrackCoverage.length,s.inputCoverage.length+s.lookaheadCoverage.length]}}return h}function pt(s,f){let p={individual:{},range:[]},h=ce(s.coverage);for(let{glyphId:v,index:x}of h){let S={};Array.isArray(v)?p.range.push({entry:S,range:v}):p.individual[v]=S;let L=[{entry:S,substitutions:[s.substitutes[x]]}];for(let k of s.lookaheadCoverage)L=Re(ce(k).map(D=>D.glyphId),L);for(let k of s.backtrackCoverage)L=De(ce(k).map(D=>D.glyphId),L);for(let{entry:k,substitutions:D}of L)k.lookup={substitutions:D,index:f,subIndex:0,length:1,contextRange:[-1*s.backtrackCoverage.length,1+s.lookaheadCoverage.length]}}return p}function or(s,f=new Map){let p={};for(let[h,v]of Object.entries(s.individual))p[h]=Xn(v,f);for(let{range:h,entry:v}of s.range){let x=Xn(v,f);for(let S=h[0];S<h[1];S++)p[S]=x}return p}function Xn(s,f){if(f.has(s))return f.get(s);let p={};return f.set(s,p),s.forward&&(p.forward=or(s.forward,f)),s.reverse&&(p.reverse=or(s.reverse,f)),s.lookup&&(p.lookup=s.lookup),p}var $o=ra(),gt=class{constructor(f,p){this._lookupTrees=[];this._glyphLookups={};this._font=f,p.cacheSize>0&&(this._cache=new $o({max:p.cacheSize,length:((L,k)=>k.length)}));let v=(this._font.tables.gsub&&this._font.tables.gsub.features.filter(L=>L.tag==="calt")||[]).reduce((L,k)=>[...L,...k.feature.lookupListIndexes],[]),x=this._font.tables.gsub&&this._font.tables.gsub.lookups||[],S=x.filter((L,k)=>v.some(D=>D===k));for(let[L,k]of S.entries()){let D=[];switch(k.lookupType){case 6:for(let[N,W]of k.subtables.entries())switch(W.substFormat){case 1:D.push(st(W,x,N));break;case 2:D.push(lt(W,x,N));break;case 3:D.push(ft(W,x,N));break}break;case 8:for(let[N,W]of k.subtables.entries())D.push(pt(W,N));break}let V=or(ir(D));this._lookupTrees.push({tree:V,processForward:k.lookupType!==8});for(let N of Object.keys(V))this._glyphLookups[N]||(this._glyphLookups[N]=[]),this._glyphLookups[N].push(L)}}findLigatures(f){let p=this._cache&&this._cache.get(f);if(p&&!Array.isArray(p))return p;let h=[];for(let S of f)h.push(this._font.charToGlyphIndex(S));if(this._lookupTrees.length===0)return{inputGlyphs:h,outputGlyphs:h,contextRanges:[]};let v=this._findInternal(h.slice()),x={inputGlyphs:h,outputGlyphs:v.sequence,contextRanges:v.ranges};return this._cache&&this._cache.set(f,x),x}findLigatureRanges(f){if(this._lookupTrees.length===0)return[];let p=this._cache&&this._cache.get(f);if(p)return Array.isArray(p)?p:p.contextRanges;let h=[];for(let x of f)h.push(this._font.charToGlyphIndex(x));let v=this._findInternal(h);return this._cache&&this._cache.set(f,v.ranges),v.ranges}_findInternal(f){let p=[],h=this._getNextLookup(f,0);for(;h.index!==null;){let v=this._lookupTrees[h.index];if(v.processForward){let x=h.last;for(let S=h.first;S<x;S++){let L=sr(v.tree,f,S,S);if(L){for(let k=0;k<L.substitutions.length;k++){let D=L.substitutions[k];D!==null&&(f[S+k]=D)}Ir(p,L.contextRange[0]+S,L.contextRange[1]+S),S+L.length>=x&&(x=S+L.length+1),S+=L.length-1}}}else for(let x=h.last-1;x>=h.first;x--){let S=sr(v.tree,f,x,x);if(S){for(let L=0;L<S.substitutions.length;L++){let k=S.substitutions[L];k!==null&&(f[x+L]=k)}Ir(p,S.contextRange[0]+x,S.contextRange[1]+x),x-=S.length-1}}h=this._getNextLookup(f,h.index+1)}return{sequence:f,ranges:p}}_getNextLookup(f,p){let h={index:null,first:1/0,last:-1};for(let v=0;v<f.length;v++){let x=this._glyphLookups[f[v]];if(x)for(let S=0;S<x.length;S++){let L=x[S];if(L>=p){(h.index===null||L<=h.index)&&(h.index=L,h.first>v&&(h.first=v),h.last=v+1);break}}}return h}};function na(s,f){let p=ta.parse(s);return new gt(p,{cacheSize:0,...f})}function yt(s){if(typeof s!="string")throw new Error("Font family must be a string");let f={input:s,offset:0},p=[],h="";for(;f.offset<f.input.length;){let v=f.input[f.offset++];switch(v){case"'":case'"':h+=eu(f,v);break;case",":p.push(h),h="";break;default:/\s/.test(v)||(f.offset--,h+=ru(f),p.push(h),h="")}}return p}function eu(s,f){let p="",h=!1;for(;s.offset<s.input.length;){let v=s.input[s.offset++];if(h)/[\dA-Fa-f]/.test(v)?(s.offset--,p+=aa(s)):v!==`
18
+ `&&(p+=v),h=!1;else switch(v){case f:return p;case"\\":h=!0;break;default:p+=v}}throw new Error("Unterminated string")}function ru(s){let f="",p=!1;for(;s.offset<s.input.length;){let h=s.input[s.offset++];if(p)/[\dA-Fa-f]/.test(h)?(s.offset--,f+=aa(s)):f+=h,p=!1;else switch(h){case"\\":p=!0;break;case",":return f;default:/\s/.test(h)?f.endsWith(" ")||(f+=" "):f+=h}}return f}function aa(s){let f="";for(;s.offset<s.input.length;){let p=s.input[s.offset++];if(/\s/.test(p))return mt(f);if(f.length>=6||!/[\dA-Fa-f]/.test(p))return s.offset--,mt(f);f+=p}return mt(f)}function mt(s){return String.fromCodePoint(parseInt(s,16))}var je;async function bt(s,f){if(!je){if(typeof navigator<"u"&&"fonts"in navigator){try{let v=await navigator.permissions.request?.({name:"local-fonts"});if(v&&v.state!=="granted")throw new Error("Permission to access local fonts not granted.")}catch(v){if(v.name!=="TypeError")throw v}let h={};try{let v=await navigator.fonts.query();for(let x of v)h.hasOwnProperty(x.family)||(h[x.family]=[]),h[x.family].push(x);je=Promise.resolve(h)}catch(v){console.error(v.name,v.message)}}else if(typeof window<"u"&&"queryLocalFonts"in window){let h={};try{let v=await window.queryLocalFonts();for(let x of v)h.hasOwnProperty(x.family)||(h[x.family]=[]),h[x.family].push(x);je=Promise.resolve(h)}catch(v){console.error(v.name,v.message)}}je||(je=Promise.resolve({}))}let p=await je;for(let h of yt(s)){if(tu.includes(h))return;if(p.hasOwnProperty(h)&&p[h].length>0){let v=p[h][0];if("blob"in v){let S=await(await v.blob()).arrayBuffer();return na(S,{cacheSize:f})}return}}}var tu=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"];var nu=1e5;function ia(s,f=[]){let p,h,v=0,x;return s.registerCharacterJoiner(S=>{let L=s.options.fontFamily;if(L&&(v===0||p!==L)){h=void 0,v=1,p=L;let k=p;bt(k,nu).then(D=>{k===s.options.fontFamily&&(v=2,h=D,D&&s.refresh(0,s.rows-1))}).catch(D=>{k===s.options.fontFamily&&(v=3,s.options.logLevel==="debug"&&console.debug(x,new Error("Failure while loading font")),h=void 0,x=D)})}return h&&v===2?h.findLigatureRanges(S).map(k=>[k[0],k[1]]):au(S,f)})}function au(s,f){let p=[];for(let h=0;h<s.length;h++)for(let v=0;v<f.length;v++)if(s.startsWith(f[v],h)){p.push([h,h+f[v].length]),h+=f[v].length-1;break}return p}var sa=class{constructor(f){this._fallbackLigatures=(f?.fallbackLigatures||["<--","<---","<<-","<-","->","->>","-->","--->","<==","<===","<<=","<=","=>","=>>","==>","===>",">=",">>=","<->","<-->","<--->","<---->","<=>","<==>","<===>","<====>","::",":::","<~~","</","</>","/>","~~>","==","!=","/=","~=","<>","===","!==","!===","<:",":=","*=","*+","<*","<*>","*>","<|","<|>","|>","+*","=*","=:",":>","/*","*/","+++","<!--","<!---"]).sort((p,h)=>h.length-p.length),this._fontFeatureSettings=f?.fontFeatureSettings}activate(f){if(!f.element)throw new Error("Cannot activate LigaturesAddon before open is called");this._terminal=f,this._characterJoinerId=ia(f,this._fallbackLigatures),f.element.style.fontFeatureSettings=this._fontFeatureSettings??'"calt" on'}dispose(){this._characterJoinerId!==void 0&&(this._terminal?.deregisterCharacterJoiner(this._characterJoinerId),this._characterJoinerId=void 0),this._terminal?.element&&(this._terminal.element.style.fontFeatureSettings="")}};export{sa as LigaturesAddon};
19
19
  //# sourceMappingURL=addon-ligatures.mjs.map