@splinetool/viewer
Version:
Spline is a collaborative design platform for creating production-ready interactive experiences in multiple dimensions. © 2024 Spline, Inc.
1 lines • 177 kB
JavaScript
var va=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Ne=va(()=>{});String.prototype.codePointAt||function(){var e=function(){try{var t={},a=Object.defineProperty,n=a(t,t,t)&&a}catch{}return n}(),r=function(t){if(this==null)throw TypeError();var a=String(this),n=a.length,s=t?Number(t):0;if(s!=s&&(s=0),!(s<0||s>=n)){var i=a.charCodeAt(s),u;return i>=55296&&i<=56319&&n>s+1&&(u=a.charCodeAt(s+1),u>=56320&&u<=57343)?(i-55296)*1024+u-56320+65536:i}};e?e(String.prototype,"codePointAt",{value:r,configurable:!0,writable:!0}):String.prototype.codePointAt=r}();var Sr=0,xt=-3;function Le(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function da(e,r){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new Le,this.dtree=new Le}var bt=new Le,St=new Le,Tr=new Uint8Array(30),kr=new Uint16Array(30),Tt=new Uint8Array(30),kt=new Uint16Array(30),ga=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Br=new Le,se=new Uint8Array(288+32);function Ft(e,r,t,a){var n,s;for(n=0;n<t;++n)e[n]=0;for(n=0;n<30-t;++n)e[n+t]=n/t|0;for(s=a,n=0;n<30;++n)r[n]=s,s+=1<<e[n]}function ma(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[24+144+t]=280+t;for(t=0;t<112;++t)e.trans[24+144+8+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 Ir=new Uint16Array(16);function ar(e,r,t,a){var n,s;for(n=0;n<16;++n)e.table[n]=0;for(n=0;n<a;++n)e.table[r[t+n]]++;for(e.table[0]=0,s=0,n=0;n<16;++n)Ir[n]=s,s+=e.table[n];for(n=0;n<a;++n)r[t+n]&&(e.trans[Ir[r[t+n]]++]=n)}function ya(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var r=e.tag&1;return e.tag>>>=1,r}function ie(e,r,t){if(!r)return t;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var a=e.tag&65535>>>16-r;return e.tag>>>=r,e.bitcount-=r,a+t}function hr(e,r){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var t=0,a=0,n=0,s=e.tag;do a=2*a+(s&1),s>>>=1,++n,t+=r.table[n],a-=r.table[n];while(a>=0);return e.tag=s,e.bitcount-=n,r.trans[t+a]}function xa(e,r,t){var a,n,s,i,u,o;for(a=ie(e,5,257),n=ie(e,5,1),s=ie(e,4,4),i=0;i<19;++i)se[i]=0;for(i=0;i<s;++i){var l=ie(e,3,0);se[ga[i]]=l}for(ar(Br,se,0,19),u=0;u<a+n;){var f=hr(e,Br);switch(f){case 16:var h=se[u-1];for(o=ie(e,2,3);o;--o)se[u++]=h;break;case 17:for(o=ie(e,3,3);o;--o)se[u++]=0;break;case 18:for(o=ie(e,7,11);o;--o)se[u++]=0;break;default:se[u++]=f;break}}ar(r,se,0,a),ar(t,se,a,n)}function Mr(e,r,t){for(;;){var a=hr(e,r);if(a===256)return Sr;if(a<256)e.dest[e.destLen++]=a;else{var n,s,i,u;for(a-=257,n=ie(e,Tr[a],kr[a]),s=hr(e,t),i=e.destLen-ie(e,Tt[s],kt[s]),u=i;u<i+n;++u)e.dest[e.destLen++]=e.dest[u]}}}function ba(e){for(var r,t,a;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 xt;for(e.sourceIndex+=4,a=r;a;--a)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,Sr}function Sa(e,r){var t=new da(e,r),a,n,s;do{switch(a=ya(t),n=ie(t,2,0),n){case 0:s=ba(t);break;case 1:s=Mr(t,bt,St);break;case 2:xa(t,t.ltree,t.dtree),s=Mr(t,t.ltree,t.dtree);break;default:s=xt}if(s!==Sr)throw new Error("Data error")}while(!a);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}ma(bt,St);Ft(Tr,kr,4,3);Ft(Tt,kt,2,1);Tr[28]=0;kr[28]=258;var Ta=Sa;function Te(e,r,t,a,n){return Math.pow(1-n,3)*e+3*Math.pow(1-n,2)*n*r+3*(1-n)*Math.pow(n,2)*t+Math.pow(n,3)*a}function pe(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}pe.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)};pe.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))};pe.prototype.addX=function(e){this.addPoint(e,null)};pe.prototype.addY=function(e){this.addPoint(null,e)};pe.prototype.addBezier=function(e,r,t,a,n,s,i,u){var o=[e,r],l=[t,a],f=[n,s],h=[i,u];this.addPoint(e,r),this.addPoint(i,u);for(var p=0;p<=1;p++){var c=6*o[p]-12*l[p]+6*f[p],d=-3*o[p]+9*l[p]-9*f[p]+3*h[p],x=3*l[p]-3*o[p];if(d===0){if(c===0)continue;var m=-x/c;0<m&&m<1&&(p===0&&this.addX(Te(o[p],l[p],f[p],h[p],m)),p===1&&this.addY(Te(o[p],l[p],f[p],h[p],m)));continue}var y=Math.pow(c,2)-4*x*d;if(!(y<0)){var C=(-c+Math.sqrt(y))/(2*d);0<C&&C<1&&(p===0&&this.addX(Te(o[p],l[p],f[p],h[p],C)),p===1&&this.addY(Te(o[p],l[p],f[p],h[p],C)));var S=(-c-Math.sqrt(y))/(2*d);0<S&&S<1&&(p===0&&this.addX(Te(o[p],l[p],f[p],h[p],S)),p===1&&this.addY(Te(o[p],l[p],f[p],h[p],S)))}}};pe.prototype.addQuad=function(e,r,t,a,n,s){var i=e+.6666666666666666*(t-e),u=r+2/3*(a-r),o=i+1/3*(n-e),l=u+1/3*(s-r);this.addBezier(e,r,i,u,o,l,n,s)};function P(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}P.prototype.moveTo=function(e,r){this.commands.push({type:"M",x:e,y:r})};P.prototype.lineTo=function(e,r){this.commands.push({type:"L",x:e,y:r})};P.prototype.curveTo=P.prototype.bezierCurveTo=function(e,r,t,a,n,s){this.commands.push({type:"C",x1:e,y1:r,x2:t,y2:a,x:n,y:s})};P.prototype.quadTo=P.prototype.quadraticCurveTo=function(e,r,t,a){this.commands.push({type:"Q",x1:e,y1:r,x:t,y:a})};P.prototype.close=P.prototype.closePath=function(){this.commands.push({type:"Z"})};P.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof pe){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)};P.prototype.getBoundingBox=function(){for(var e=new pe,r=0,t=0,a=0,n=0,s=0;s<this.commands.length;s++){var i=this.commands[s];switch(i.type){case"M":e.addPoint(i.x,i.y),r=a=i.x,t=n=i.y;break;case"L":e.addPoint(i.x,i.y),a=i.x,n=i.y;break;case"Q":e.addQuad(a,n,i.x1,i.y1,i.x,i.y),a=i.x,n=i.y;break;case"C":e.addBezier(a,n,i.x1,i.y1,i.x2,i.y2,i.x,i.y),a=i.x,n=i.y;break;case"Z":a=r,n=t;break;default:throw new Error("Unexpected path command "+i.type)}}return e.isEmpty()&&e.addPoint(0,0),e};P.prototype.draw=function(e){e.beginPath();for(var r=0;r<this.commands.length;r+=1){var t=this.commands[r];t.type==="M"?e.moveTo(t.x,t.y):t.type==="L"?e.lineTo(t.x,t.y):t.type==="C"?e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y):t.type==="Q"?e.quadraticCurveTo(t.x1,t.y1,t.x,t.y):t.type==="Z"&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())};P.prototype.toPathData=function(e){e=e!==void 0?e:2;function r(i){return Math.round(i)===i?""+Math.round(i):i.toFixed(e)}function t(){for(var i=arguments,u="",o=0;o<arguments.length;o+=1){var l=i[o];l>=0&&o>0&&(u+=" "),u+=r(l)}return u}for(var a="",n=0;n<this.commands.length;n+=1){var s=this.commands[n];s.type==="M"?a+="M"+t(s.x,s.y):s.type==="L"?a+="L"+t(s.x,s.y):s.type==="C"?a+="C"+t(s.x1,s.y1,s.x2,s.y2,s.x,s.y):s.type==="Q"?a+="Q"+t(s.x1,s.y1,s.x,s.y):s.type==="Z"&&(a+="Z")}return a};P.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};P.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 Ut(e){throw new Error(e)}function Pr(e,r){e||Ut(r)}var U={fail:Ut,argument:Pr,assert:Pr},Gr=32768,Nr=2147483648,Fe={},g={},E={};function ae(e){return function(){return e}}g.BYTE=function(e){return U.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]};E.BYTE=ae(1);g.CHAR=function(e){return[e.charCodeAt(0)]};E.CHAR=ae(1);g.CHARARRAY=function(e){typeof e>"u"&&(e="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var r=[],t=0;t<e.length;t+=1)r[t]=e.charCodeAt(t);return r};E.CHARARRAY=function(e){return typeof e>"u"?0:e.length};g.USHORT=function(e){return[e>>8&255,e&255]};E.USHORT=ae(2);g.SHORT=function(e){return e>=Gr&&(e=-(2*Gr-e)),[e>>8&255,e&255]};E.SHORT=ae(2);g.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]};E.UINT24=ae(3);g.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]};E.ULONG=ae(4);g.LONG=function(e){return e>=Nr&&(e=-(2*Nr-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]};E.LONG=ae(4);g.FIXED=g.ULONG;E.FIXED=E.ULONG;g.FWORD=g.SHORT;E.FWORD=E.SHORT;g.UFWORD=g.USHORT;E.UFWORD=E.USHORT;g.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]};E.LONGDATETIME=ae(8);g.TAG=function(e){return U.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]};E.TAG=ae(4);g.Card8=g.BYTE;E.Card8=E.BYTE;g.Card16=g.USHORT;E.Card16=E.USHORT;g.OffSize=g.BYTE;E.OffSize=E.BYTE;g.SID=g.USHORT;E.SID=E.USHORT;g.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?g.NUMBER16(e):g.NUMBER32(e)};E.NUMBER=function(e){return g.NUMBER(e).length};g.NUMBER16=function(e){return[28,e>>8&255,e&255]};E.NUMBER16=ae(3);g.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]};E.NUMBER32=ae(5);g.REAL=function(e){var r=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(r);if(t){var a=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));r=(Math.round(e*a)/a).toString()}for(var n="",s=0,i=r.length;s<i;s+=1){var u=r[s];u==="e"?n+=r[++s]==="-"?"c":"b":u==="."?n+="a":u==="-"?n+="e":n+=u}n+=n.length&1?"f":"ff";for(var o=[30],l=0,f=n.length;l<f;l+=2)o.push(parseInt(n.substr(l,2),16));return o};E.REAL=function(e){return g.REAL(e).length};g.NAME=g.CHARARRAY;E.NAME=E.CHARARRAY;g.STRING=g.CHARARRAY;E.STRING=E.CHARARRAY;Fe.UTF8=function(e,r,t){for(var a=[],n=t,s=0;s<n;s++,r+=1)a[s]=e.getUint8(r);return String.fromCharCode.apply(null,a)};Fe.UTF16=function(e,r,t){for(var a=[],n=t/2,s=0;s<n;s++,r+=2)a[s]=e.getUint16(r);return String.fromCharCode.apply(null,a)};g.UTF16=function(e){for(var r=[],t=0;t<e.length;t+=1){var a=e.charCodeAt(t);r[r.length]=a>>8&255,r[r.length]=a&255}return r};E.UTF16=function(e){return e.length*2};var cr={"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"};Fe.MACSTRING=function(e,r,t,a){var n=cr[a];if(n!==void 0){for(var s="",i=0;i<t;i++){var u=e.getUint8(r+i);u<=127?s+=String.fromCharCode(u):s+=n[u&127]}return s}};var He=typeof WeakMap=="function"&&new WeakMap,ze,ka=function(e){if(!ze){ze={};for(var r in cr)ze[r]=new String(r)}var t=ze[e];if(t!==void 0){if(He){var a=He.get(t);if(a!==void 0)return a}var n=cr[e];if(n!==void 0){for(var s={},i=0;i<n.length;i++)s[n.charCodeAt(i)]=i+128;return He&&He.set(t,s),s}}};g.MACSTRING=function(e,r){var t=ka(r);if(t!==void 0){for(var a=[],n=0;n<e.length;n++){var s=e.charCodeAt(n);if(s>=128&&(s=t[s],s===void 0))return;a[n]=s}return a}};E.MACSTRING=function(e,r){var t=g.MACSTRING(e,r);return t!==void 0?t.length:0};function vr(e){return e>=-128&&e<=127}function Fa(e,r,t){for(var a=0,n=e.length;r<n&&a<64&&e[r]===0;)++r,++a;return t.push(128|a-1),r}function Ua(e,r,t){for(var a=0,n=e.length,s=r;s<n&&a<64;){var i=e[s];if(!vr(i)||i===0&&s+1<n&&e[s+1]===0)break;++s,++a}t.push(a-1);for(var u=r;u<s;++u)t.push(e[u]+256&255);return s}function Ca(e,r,t){for(var a=0,n=e.length,s=r;s<n&&a<64;){var i=e[s];if(i===0||vr(i)&&s+1<n&&vr(e[s+1]))break;++s,++a}t.push(64|a-1);for(var u=r;u<s;++u){var o=e[u];t.push(o+65536>>8&255,o+256&255)}return s}g.VARDELTAS=function(e){for(var r=0,t=[];r<e.length;){var a=e[r];a===0?r=Fa(e,r,t):a>=-128&&a<=127?r=Ua(e,r,t):r=Ca(e,r,t)}return t};g.INDEX=function(e){for(var r=1,t=[r],a=[],n=0;n<e.length;n+=1){var s=g.OBJECT(e[n]);Array.prototype.push.apply(a,s),r+=s.length,t.push(r)}if(a.length===0)return[0,0];for(var i=[],u=1+Math.floor(Math.log(r)/Math.log(2))/8|0,o=[void 0,g.BYTE,g.USHORT,g.UINT24,g.ULONG][u],l=0;l<t.length;l+=1){var f=o(t[l]);Array.prototype.push.apply(i,f)}return Array.prototype.concat(g.Card16(e.length),g.OffSize(u),i,a)};E.INDEX=function(e){return g.INDEX(e).length};g.DICT=function(e){for(var r=[],t=Object.keys(e),a=t.length,n=0;n<a;n+=1){var s=parseInt(t[n],0),i=e[s];r=r.concat(g.OPERAND(i.value,i.type)),r=r.concat(g.OPERATOR(s))}return r};E.DICT=function(e){return g.DICT(e).length};g.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]};g.OPERAND=function(e,r){var t=[];if(Array.isArray(r))for(var a=0;a<r.length;a+=1)U.argument(e.length===r.length,"Not enough arguments given for type"+r),t=t.concat(g.OPERAND(e[a],r[a]));else if(r==="SID")t=t.concat(g.NUMBER(e));else if(r==="offset")t=t.concat(g.NUMBER32(e));else if(r==="number")t=t.concat(g.NUMBER(e));else if(r==="real")t=t.concat(g.REAL(e));else throw new Error("Unknown operand type "+r);return t};g.OP=g.BYTE;E.OP=E.BYTE;var We=typeof WeakMap=="function"&&new WeakMap;g.CHARSTRING=function(e){if(We){var r=We.get(e);if(r!==void 0)return r}for(var t=[],a=e.length,n=0;n<a;n+=1){var s=e[n];t=t.concat(g[s.type](s.value))}return We&&We.set(e,t),t};E.CHARSTRING=function(e){return g.CHARSTRING(e).length};g.OBJECT=function(e){var r=g[e.type];return U.argument(r!==void 0,"No encoding function for type "+e.type),r(e.value)};E.OBJECT=function(e){var r=E[e.type];return U.argument(r!==void 0,"No sizeOf function for type "+e.type),r(e.value)};g.TABLE=function(e){for(var r=[],t=e.fields.length,a=[],n=[],s=0;s<t;s+=1){var i=e.fields[s],u=g[i.type];U.argument(u!==void 0,"No encoding function for field type "+i.type+" ("+i.name+")");var o=e[i.name];o===void 0&&(o=i.value);var l=u(o);i.type==="TABLE"?(n.push(r.length),r=r.concat([0,0]),a.push(l)):r=r.concat(l)}for(var f=0;f<a.length;f+=1){var h=n[f],p=r.length;U.argument(p<65536,"Table "+e.tableName+" too big."),r[h]=p>>8,r[h+1]=p&255,r=r.concat(a[f])}return r};E.TABLE=function(e){for(var r=0,t=e.fields.length,a=0;a<t;a+=1){var n=e.fields[a],s=E[n.type];U.argument(s!==void 0,"No sizeOf function for field type "+n.type+" ("+n.name+")");var i=e[n.name];i===void 0&&(i=n.value),r+=s(i),n.type==="TABLE"&&(r+=2)}return r};g.RECORD=g.TABLE;E.RECORD=E.TABLE;g.LITERAL=function(e){return e};E.LITERAL=function(e){return e.length};function z(e,r,t){if(r.length&&(r[0].name!=="coverageFormat"||r[0].value===1))for(var a=0;a<r.length;a+=1){var n=r[a];this[n.name]=n.value}if(this.tableName=e,this.fields=r,t)for(var s=Object.keys(t),i=0;i<s.length;i+=1){var u=s[i],o=t[u];this[u]!==void 0&&(this[u]=o)}}z.prototype.encode=function(){return g.TABLE(this)};z.prototype.sizeOf=function(){return E.TABLE(this)};function Re(e,r,t){t===void 0&&(t=r.length);var a=new Array(r.length+1);a[0]={name:e+"Count",type:"USHORT",value:t};for(var n=0;n<r.length;n++)a[n+1]={name:e+n,type:"USHORT",value:r[n]};return a}function dr(e,r,t){var a=r.length,n=new Array(a+1);n[0]={name:e+"Count",type:"USHORT",value:a};for(var s=0;s<a;s++)n[s+1]={name:e+s,type:"TABLE",value:t(r[s],s)};return n}function we(e,r,t){var a=r.length,n=[];n[0]={name:e+"Count",type:"USHORT",value:a};for(var s=0;s<a;s++)n=n.concat(t(r[s],s));return n}function Ye(e){e.format===1?z.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(Re("glyph",e.glyphs))):e.format===2?z.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(we("rangeRecord",e.ranges,function(r){return[{name:"startGlyphID",type:"USHORT",value:r.start},{name:"endGlyphID",type:"USHORT",value:r.end},{name:"startCoverageIndex",type:"USHORT",value:r.index}]}))):U.assert(!1,"Coverage format must be 1 or 2.")}Ye.prototype=Object.create(z.prototype);Ye.prototype.constructor=Ye;function Ze(e){z.call(this,"scriptListTable",we("scriptRecord",e,function(r,t){var a=r.script,n=a.defaultLangSys;return U.assert(!!n,"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 z("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new z("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(Re("featureIndex",n.featureIndexes)))}].concat(we("langSys",a.langSysRecords,function(s,i){var u=s.langSys;return[{name:"langSysTag"+i,type:"TAG",value:s.tag},{name:"langSys"+i,type:"TABLE",value:new z("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:u.reqFeatureIndex}].concat(Re("featureIndex",u.featureIndexes)))}]})))}]}))}Ze.prototype=Object.create(z.prototype);Ze.prototype.constructor=Ze;function Qe(e){z.call(this,"featureListTable",we("featureRecord",e,function(r,t){var a=r.feature;return[{name:"featureTag"+t,type:"TAG",value:r.tag},{name:"feature"+t,type:"TABLE",value:new z("featureTable",[{name:"featureParams",type:"USHORT",value:a.featureParams}].concat(Re("lookupListIndex",a.lookupListIndexes)))}]}))}Qe.prototype=Object.create(z.prototype);Qe.prototype.constructor=Qe;function Ke(e,r){z.call(this,"lookupListTable",dr("lookup",e,function(t){var a=r[t.lookupType];return U.assert(!!a,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new z("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(dr("subtable",t.subtables,a)))}))}Ke.prototype=Object.create(z.prototype);Ke.prototype.constructor=Ke;var b={Table:z,Record:z,Coverage:Ye,ScriptList:Ze,FeatureList:Qe,LookupList:Ke,ushortList:Re,tableList:dr,recordList:we};function Hr(e,r){return e.getUint8(r)}function Je(e,r){return e.getUint16(r,!1)}function Ea(e,r){return e.getInt16(r,!1)}function Fr(e,r){return e.getUint32(r,!1)}function Ct(e,r){var t=e.getInt16(r,!1),a=e.getUint16(r+2,!1);return t+a/65535}function Oa(e,r){for(var t="",a=r;a<r+4;a+=1)t+=String.fromCharCode(e.getInt8(a));return t}function La(e,r,t){for(var a=0,n=0;n<t;n+=1)a<<=8,a+=e.getUint8(r+n);return a}function Ra(e,r,t){for(var a=[],n=r;n<t;n+=1)a.push(e.getUint8(n));return a}function wa(e){for(var r="",t=0;t<e.length;t+=1)r+=String.fromCharCode(e[t]);return r}var Da={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function v(e,r){this.data=e,this.offset=r,this.relativeOffset=0}v.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e};v.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e};v.prototype.parseCard8=v.prototype.parseByte;v.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e};v.prototype.parseCard16=v.prototype.parseUShort;v.prototype.parseSID=v.prototype.parseUShort;v.prototype.parseOffset16=v.prototype.parseUShort;v.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e};v.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e};v.prototype.parseULong=function(){var e=Fr(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e};v.prototype.parseOffset32=v.prototype.parseULong;v.prototype.parseFixed=function(){var e=Ct(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e};v.prototype.parseString=function(e){var r=this.data,t=this.offset+this.relativeOffset,a="";this.relativeOffset+=e;for(var n=0;n<e;n++)a+=String.fromCharCode(r.getUint8(t+n));return a};v.prototype.parseTag=function(){return this.parseString(4)};v.prototype.parseLongDateTime=function(){var e=Fr(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e};v.prototype.parseVersion=function(e){var r=Je(this.data,this.offset+this.relativeOffset),t=Je(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),r+t/e/10};v.prototype.skip=function(e,r){r===void 0&&(r=1),this.relativeOffset+=Da[e]*r};v.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var r=new Array(e),t=this.data,a=this.offset+this.relativeOffset,n=0;n<e;n++)r[n]=t.getUint32(a),a+=4;return this.relativeOffset+=e*4,r};v.prototype.parseOffset16List=v.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var r=new Array(e),t=this.data,a=this.offset+this.relativeOffset,n=0;n<e;n++)r[n]=t.getUint16(a),a+=2;return this.relativeOffset+=e*2,r};v.prototype.parseShortList=function(e){for(var r=new Array(e),t=this.data,a=this.offset+this.relativeOffset,n=0;n<e;n++)r[n]=t.getInt16(a),a+=2;return this.relativeOffset+=e*2,r};v.prototype.parseByteList=function(e){for(var r=new Array(e),t=this.data,a=this.offset+this.relativeOffset,n=0;n<e;n++)r[n]=t.getUint8(a++);return this.relativeOffset+=e,r};v.prototype.parseList=function(e,r){r||(r=e,e=this.parseUShort());for(var t=new Array(e),a=0;a<e;a++)t[a]=r.call(this);return t};v.prototype.parseList32=function(e,r){r||(r=e,e=this.parseULong());for(var t=new Array(e),a=0;a<e;a++)t[a]=r.call(this);return t};v.prototype.parseRecordList=function(e,r){r||(r=e,e=this.parseUShort());for(var t=new Array(e),a=Object.keys(r),n=0;n<e;n++){for(var s={},i=0;i<a.length;i++){var u=a[i],o=r[u];s[u]=o.call(this)}t[n]=s}return t};v.prototype.parseRecordList32=function(e,r){r||(r=e,e=this.parseULong());for(var t=new Array(e),a=Object.keys(r),n=0;n<e;n++){for(var s={},i=0;i<a.length;i++){var u=a[i],o=r[u];s[u]=o.call(this)}t[n]=s}return t};v.prototype.parseStruct=function(e){if(typeof e=="function")return e.call(this);for(var r=Object.keys(e),t={},a=0;a<r.length;a++){var n=r[a],s=e[n];t[n]=s.call(this)}return t};v.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}};v.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),r=this.parseUShort(),t=new Array(r),a=0;a<r;a++)t[a]=this.parseValueRecord(e);return t};v.prototype.parsePointer=function(e){var r=this.parseOffset16();if(r>0)return new v(this.data,this.offset+r).parseStruct(e)};v.prototype.parsePointer32=function(e){var r=this.parseOffset32();if(r>0)return new v(this.data,this.offset+r).parseStruct(e)};v.prototype.parseListOfLists=function(e){for(var r=this.parseOffset16List(),t=r.length,a=this.relativeOffset,n=new Array(t),s=0;s<t;s++){var i=r[s];if(i===0){n[s]=void 0;continue}if(this.relativeOffset=i,e){for(var u=this.parseOffset16List(),o=new Array(u.length),l=0;l<u.length;l++)this.relativeOffset=i+u[l],o[l]=e.call(this);n[s]=o}else n[s]=this.parseUShortList()}return this.relativeOffset=a,n};v.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,r=this.parseUShort(),t=this.parseUShort();if(r===1)return{format:1,glyphs:this.parseUShortList(t)};if(r===2){for(var a=new Array(t),n=0;n<t;n++)a[n]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:a}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")};v.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:v.uShort,end:v.uShort,classId:v.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")};v.list=function(e,r){return function(){return this.parseList(e,r)}};v.list32=function(e,r){return function(){return this.parseList32(e,r)}};v.recordList=function(e,r){return function(){return this.parseRecordList(e,r)}};v.recordList32=function(e,r){return function(){return this.parseRecordList32(e,r)}};v.pointer=function(e){return function(){return this.parsePointer(e)}};v.pointer32=function(e){return function(){return this.parsePointer32(e)}};v.tag=v.prototype.parseTag;v.byte=v.prototype.parseByte;v.uShort=v.offset16=v.prototype.parseUShort;v.uShortList=v.prototype.parseUShortList;v.uLong=v.offset32=v.prototype.parseULong;v.uLongList=v.prototype.parseULongList;v.struct=v.prototype.parseStruct;v.coverage=v.prototype.parseCoverage;v.classDef=v.prototype.parseClassDef;var zr={reserved:v.uShort,reqFeatureIndex:v.uShort,featureIndexes:v.uShortList};v.prototype.parseScriptList=function(){return this.parsePointer(v.recordList({tag:v.tag,script:v.pointer({defaultLangSys:v.pointer(zr),langSysRecords:v.recordList({tag:v.tag,langSys:v.pointer(zr)})})}))||[]};v.prototype.parseFeatureList=function(){return this.parsePointer(v.recordList({tag:v.tag,feature:v.pointer({featureParams:v.offset16,lookupListIndexes:v.uShortList})}))||[]};v.prototype.parseLookupList=function(e){return this.parsePointer(v.list(v.pointer(function(){var r=this.parseUShort();U.argument(1<=r&&r<=9,"GPOS/GSUB lookup type "+r+" unknown.");var t=this.parseUShort(),a=t&16;return{lookupType:r,lookupFlag:t,subtables:this.parseList(v.pointer(e[r])),markFilteringSet:a?this.parseUShort():void 0}})))||[]};v.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),r=this.parseUShort();U.argument(e===1&&r<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:v.offset32,featureTableSubstitutionOffset:v.offset32});return t})||[]};var k={getByte:Hr,getCard8:Hr,getUShort:Je,getCard16:Je,getShort:Ea,getULong:Fr,getFixed:Ct,getTag:Oa,getOffset:La,getBytes:Ra,bytesToString:wa,Parser:v};function Aa(e,r){r.parseUShort(),e.length=r.parseULong(),e.language=r.parseULong();var t;e.groupCount=t=r.parseULong(),e.glyphIndexMap={};for(var a=0;a<t;a+=1)for(var n=r.parseULong(),s=r.parseULong(),i=r.parseULong(),u=n;u<=s;u+=1)e.glyphIndexMap[u]=i,i++}function Ba(e,r,t,a,n){e.length=r.parseUShort(),e.language=r.parseUShort();var s;e.segCount=s=r.parseUShort()>>1,r.skip("uShort",3),e.glyphIndexMap={};for(var i=new k.Parser(t,a+n+14),u=new k.Parser(t,a+n+16+s*2),o=new k.Parser(t,a+n+16+s*4),l=new k.Parser(t,a+n+16+s*6),f=a+n+16+s*8,h=0;h<s-1;h+=1)for(var p=void 0,c=i.parseUShort(),d=u.parseUShort(),x=o.parseShort(),m=l.parseUShort(),y=d;y<=c;y+=1)m!==0?(f=l.offset+l.relativeOffset-2,f+=m,f+=(y-d)*2,p=k.getUShort(t,f),p!==0&&(p=p+x&65535)):p=y+x&65535,e.glyphIndexMap[y]=p}function Ia(e,r){var t={};t.version=k.getUShort(e,r),U.argument(t.version===0,"cmap table version should be 0."),t.numTables=k.getUShort(e,r+2);for(var a=-1,n=t.numTables-1;n>=0;n-=1){var s=k.getUShort(e,r+4+n*8),i=k.getUShort(e,r+4+n*8+2);if(s===3&&(i===0||i===1||i===10)||s===0&&(i===0||i===1||i===2||i===3||i===4)){a=k.getULong(e,r+4+n*8+4);break}}if(a===-1)throw new Error("No valid cmap sub-tables found.");var u=new k.Parser(e,r+a);if(t.format=u.parseUShort(),t.format===12)Aa(t,u);else if(t.format===4)Ba(t,u,e,r,a);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function Ma(e,r,t){e.segments.push({end:r,start:r,delta:-(r-t),offset:0,glyphIndex:t})}function Pa(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Ga(e){var r=!0,t;for(t=e.length-1;t>0;t-=1){var a=e.get(t);if(a.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}}var n=[{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:12+8}];r||(n=n.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),n=n.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 s=new b.Table("cmap",n);for(s.segments=[],t=0;t<e.length;t+=1){for(var i=e.get(t),u=0;u<i.unicodes.length;u+=1)Ma(s,i.unicodes[u],t);s.segments=s.segments.sort(function(C,S){return C.start-S.start})}Pa(s);var o=s.segments.length,l=0,f=[],h=[],p=[],c=[],d=[],x=[];for(t=0;t<o;t+=1){var m=s.segments[t];m.end<=65535&&m.start<=65535?(f=f.concat({name:"end_"+t,type:"USHORT",value:m.end}),h=h.concat({name:"start_"+t,type:"USHORT",value:m.start}),p=p.concat({name:"idDelta_"+t,type:"SHORT",value:m.delta}),c=c.concat({name:"idRangeOffset_"+t,type:"USHORT",value:m.offset}),m.glyphId!==void 0&&(d=d.concat({name:"glyph_"+t,type:"USHORT",value:m.glyphId}))):l+=1,!r&&m.glyphIndex!==void 0&&(x=x.concat({name:"cmap12Start_"+t,type:"ULONG",value:m.start}),x=x.concat({name:"cmap12End_"+t,type:"ULONG",value:m.end}),x=x.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:m.glyphIndex}))}if(s.segCountX2=(o-l)*2,s.searchRange=Math.pow(2,Math.floor(Math.log(o-l)/Math.log(2)))*2,s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(f),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(h),s.fields=s.fields.concat(p),s.fields=s.fields.concat(c),s.fields=s.fields.concat(d),s.cmap4Length=14+f.length*2+2+h.length*2+p.length*2+c.length*2+d.length*2,!r){var y=16+x.length*4;s.cmap12Offset=12+2*2+4+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:y},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:x.length/3}]),s.fields=s.fields.concat(x)}return s}var Et={parse:Ia,make:Ga},qe=[".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"],Na=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],Ha=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"],xe=[".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 Ot(e){this.font=e}Ot.prototype.charToGlyphIndex=function(e){var r=e.codePointAt(0),t=this.font.glyphs;if(t){for(var a=0;a<t.length;a+=1)for(var n=t.get(a),s=0;s<n.unicodes.length;s+=1)if(n.unicodes[s]===r)return a}return null};function Lt(e){this.cmap=e}Lt.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0};function je(e,r){this.encoding=e,this.charset=r}je.prototype.charToGlyphIndex=function(e){var r=e.codePointAt(0),t=this.encoding[r];return this.charset.indexOf(t)};function Ur(e){switch(e.version){case 1:this.names=xe.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var r=0;r<e.numberOfGlyphs;r++)e.glyphNameIndex[r]<xe.length?this.names[r]=xe[e.glyphNameIndex[r]]:this.names[r]=e.names[e.glyphNameIndex[r]-xe.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)this.names[t]=xe[t+e.glyphNameIndex[t]];break;case 3:this.names=[];break;default:this.names=[];break}}Ur.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)};Ur.prototype.glyphIndexToName=function(e){return this.names[e]};function za(e){for(var r,t=e.tables.cmap.glyphIndexMap,a=Object.keys(t),n=0;n<a.length;n+=1){var s=a[n],i=t[s];r=e.glyphs.get(i),r.addUnicode(parseInt(s))}for(var u=0;u<e.glyphs.length;u+=1)r=e.glyphs.get(u),e.cffEncoding?e.isCIDFont?r.name="gid"+u:r.name=e.cffEncoding.charset[u]:e.glyphNames.names&&(r.name=e.glyphNames.glyphIndexToName(u))}function Wa(e){e._IndexToUnicodeMap={};for(var r=e.tables.cmap.glyphIndexMap,t=Object.keys(r),a=0;a<t.length;a+=1){var n=t[a],s=r[n];e._IndexToUnicodeMap[s]===void 0?e._IndexToUnicodeMap[s]={unicodes:[parseInt(n)]}:e._IndexToUnicodeMap[s].unicodes.push(parseInt(n))}}function _a(e,r){r.lowMemory?Wa(e):za(e)}function Va(e,r,t,a,n){e.beginPath(),e.moveTo(r,t),e.lineTo(a,n),e.stroke()}var ye={line:Va};function qa(e,r){var t=r||new P;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(a){t=a}}}function Q(e){this.bindConstructorValues(e)}Q.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]:[],"xMin"in e&&(this.xMin=e.xMin),"yMin"in e&&(this.yMin=e.yMin),"xMax"in e&&(this.xMax=e.xMax),"yMax"in e&&(this.yMax=e.yMax),"advanceWidth"in e&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",qa(this,e.path))};Q.prototype.addUnicode=function(e){this.unicodes.length===0&&(this.unicod