x_ite
Version:
X_ITE X3D Browser, view and manipulate X3D, VRML, glTF and other 3D sources in HTML.
2 lines • 261 kB
JavaScript
/* X_ITE v11.6.6 */
const e=window[Symbol.for("X_ITE.X3D-11.6.6")];(()=>{var t={254:t=>{t.exports=e.jquery}},n={};function s(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,s),o.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=e.Components;var o=s.n(r);const a=e.Fields;var i=s.n(a);const l=e.X3DFieldDefinition;var u=s.n(l);const c=e.FieldDefinitionArray;var p=s.n(c);const h=e.X3DNode;var f=s.n(h);const d=e.X3DUrlObject;var g=s.n(d);const m=e.Namespace;var y=s.n(m);let v=0;const b={BEGIN:++v,FIRST:++v,MIDDLE:++v,END:++v},S=y().add("TextAlignment",b),x=e.X3DConstants;var T=s.n(x);const O=e.URLs;var k=s.n(O),w=s(254);const I=new Map([["SERIF",new Map([["PLAIN",k().getFontsURL("Droid/DroidSerif-Regular.woff2")],["ITALIC",k().getFontsURL("Droid/DroidSerif-Italic.woff2")],["BOLD",k().getFontsURL("Droid/DroidSerif-Bold.woff2")],["BOLDITALIC",k().getFontsURL("Droid/DroidSerif-BoldItalic.woff2")]])],["SANS",new Map([["PLAIN",k().getFontsURL("Ubuntu/Ubuntu-R.woff2")],["ITALIC",k().getFontsURL("Ubuntu/Ubuntu-RI.woff2")],["BOLD",k().getFontsURL("Ubuntu/Ubuntu-B.woff2")],["BOLDITALIC",k().getFontsURL("Ubuntu/Ubuntu-BI.woff2")]])],["TYPEWRITER",new Map([["PLAIN",k().getFontsURL("Ubuntu/UbuntuMono-R.woff2")],["ITALIC",k().getFontsURL("Ubuntu/UbuntuMono-RI.woff2")],["BOLD",k().getFontsURL("Ubuntu/UbuntuMono-B.woff2")],["BOLDITALIC",k().getFontsURL("Ubuntu/UbuntuMono-BI.woff2")]])]]);function U(e){f().call(this,e),g().call(this,e),this.addType(T().X3DFontStyleNode),this.addChildObjects(T().inputOutput,"description",new(i().SFString),T().inputOutput,"url",new(i().MFString),T().inputOutput,"load",new(i().SFBool)(!0),T().inputOutput,"autoRefresh",new(i().SFTime)(0),T().inputOutput,"autoRefreshTimeLimit",new(i().SFTime)(3600)),this.alignments=[]}Object.assign(Object.setPrototypeOf(U.prototype,f().prototype),g().prototype,{initialize(){f().prototype.initialize.call(this),g().prototype.initialize.call(this),this._family.addInterest("set_url__",this),this._style.addInterest("set_url__",this),this._justify.addInterest("set_justify__",this),this.set_justify__(),this.requestImmediateLoad().catch(Function.prototype)},set_justify__(){const e=this._horizontal.getValue()?this._leftToRight.getValue():this._topToBottom.getValue();this.alignments[0]=this._justify.length>0?this.getAlignment(0,e):e?S.BEGIN:S.END;const t=this._horizontal.getValue()?this._topToBottom.getValue():this._leftToRight.getValue();this.alignments[1]=this._justify.length>1?this.getAlignment(1,t):t?S.FIRST:S.END},getAllowEmptyUrl:()=>!0,getFont(){return this.font},getDefaultFont(e,t){const n=I.get(e);return n?.get(t)??n?.get("PLAIN")},getMajorAlignment(){return this.alignments[0]},getMinorAlignment(){return this.alignments[1]},getAlignment(e,t){if(t)switch(this._justify[e]){case"FIRST":return S.FIRST;case"BEGIN":return S.BEGIN;case"MIDDLE":return S.MIDDLE;case"END":return S.END}else switch(this._justify[e]){case"FIRST":case"BEGIN":return S.END;case"MIDDLE":return S.MIDDLE;case"END":return S.BEGIN}return e?S.FIRST:S.BEGIN},async loadData(){await w.sleep(0);const e=this.getBrowser(),t=this.getExecutionContext(),n=this._family.copy(),s=this._style.getValue();n.push("SERIF"),this.font=null;for(const r of n){const n=this.getDefaultFont(r,s);if(n){const t=await e.loadFont(new URL(n),!0);if(t){this.font=t;break}}const o=await e.getFont(t,r,s);if(o){this.font=o;break}const a=new URL(r,t.getBaseURL());if("data:"===a.protocol||a.pathname.match(/\.(?:woff2|woff|otf|ttf)$/i)){t.getSpecificationVersion()>=4.1&&console.warn("Loading a font file via family field is depreciated, please use new FontLibrary node instead.");const n=await e.loadFont(a,this.getCache());if(n){this.font=n;break}}else console.warn(`Couldn't find font family '${r}' with style '${s}'.`)}this.setLoadState(this.font?T().COMPLETE_STATE:T().FAILED_STATE),this.addNodeEvent()},dispose(){g().prototype.dispose.call(this),f().prototype.dispose.call(this)}}),Object.defineProperties(U,f().getStaticProperties("X3DFontStyleNode","Text",1));const R=U,L=y().add("X3DFontStyleNode",R),C=e.PrimitiveQuality;var E=s.n(C);const D=e.TextCompression;var M=s.n(D);const F=e.Box2;var A=s.n(F);const N=e.Box3;var P=s.n(N);const B=e.Vector2;var G=s.n(B);const H=e.Vector3;var _=s.n(H);const V=e.Matrix3;var z=s.n(V);const j=new(A()),q=new(A()),W=new(G()),$=new(G()),X=new(G()),Y=new(G()),Z=new(_()),Q=new(_()),K=new(G()),J=new(G()),ee=new(G()),te=new(G()),ne=new(G()),se=new(G()),re=new(_()),oe=new(A()),ae=new(G()),ie=new(_());function le(e,t){this.browser=e.getBrowser(),this.text=e,this.fontStyle=t,this.glyphs=[],this.minorAlignment=new(G()),this.lineIndices=[],this.translations=[],this.charSpacings=[],this.scales=[],this.bearing=new(G()),this.bbox=new(P())}Object.assign(le.prototype,{getBrowser(){return this.browser},getText(){return this.text},getFontStyle(){return this.fontStyle},getGlyphs(){return this.glyphs},getMinorAlignment(){return this.minorAlignment},getTranslations(){return this.translations},getCharSpacings(){return this.charSpacings},getScales(){return this.scales},getBearing(){return this.bearing},getBBox(){return this.bbox},update(){const e=this.text,t=this.fontStyle,n=e._string.length;if(e._lineBounds.length=n,this.glyphs.length=0,0===n||!t.getFont())return e._origin.setValue(ie),e._textBounds.setValue(ae),void this.bbox.set();if(t._horizontal.getValue())this.resizeArray(this.translations,n),this.lineIndices.length=0,this.charSpacings.length=n,this.scales.length=n,this.horizontal(e,t);else{const s=e._string.reduce((e,t)=>e+t.length,0);this.resizeArray(this.translations,s),this.lineIndices.length=s,this.charSpacings.length=n,this.scales.length=n,this.vertical(e,t)}},resizeArray(e,t){for(var n=e.length;n<t;++n)e.push(new(G()));e.length=t},horizontal(e,t){const n=t.getFont(),s=e._string,r=s.length,o=Math.max(0,e._maxExtent.getValue()),a=t._topToBottom.getValue(),i=t.getScale(),l=t.getContentScale(),u=t._spacing.getValue(),c=this.getBrowser().getBrowserOptions().getTextCompression();j.set();const p=a?r:-1,h=a?1:-1;for(let o=a?0:r-1,f=0;o!==p;o+=h,++f){const r=s[o],a=this.getHorizontalLineExtents(t,r,W,$,f);K.assign($).subtract(W);const p=e.getLength(o)*l,h=K.x*i;let d=0;switch(se.set(h,0==f?$.y-n.descender/n.unitsPerEm*i:u),p&&(c===M().CHAR_SPACING&&a.length>1&&(d=(p-se.x)/(a.length-1)),se.x=p,K.x=p/i),this.charSpacings[f]=d,this.scales[f]=c===M().SCALING?se.x/h:1,e._lineBounds[o]=se,t.getMajorAlignment()){case S.BEGIN:case S.FIRST:this.translations[f].set(0,-f*u);break;case S.MIDDLE:this.translations[f].set(-W.x-K.x/2,-f*u);break;case S.END:this.translations[f].set(-W.x-K.x,-f*u)}this.translations[f].multiply(i),J.assign(W).add(ee.assign(K).divide(2)),j.add(oe.set(K.multiply(i),J.multiply(i).add(this.translations[f])))}if(o){const t=e._lineBounds.reduce((e,t)=>Math.max(e,t.x),0);if(t>o){const n=o*l/t;switch(c){case M().CHAR_SPACING:for(const t of this.charSpacings.keys())e._string[t].length<2||(this.charSpacings[t]-=(e._lineBounds[t].x-e._lineBounds[t].x*n)/(e._string[t].length-1));break;case M().SCALING:for(const e of this.scales.keys())this.scales[e]*=n}for(const e of this.translations.keys())this.translations[e].x*=n;for(const t of e._lineBounds.keys())e._lineBounds[t].x*=n;j.multRight(new(z())(n,0,0,0,1,0,0,0,0))}}switch(j.getExtents(W,$),K.assign($).subtract(W),e._textBounds=K,this.bearing.set(0,-$.y),t.getMinorAlignment()){case S.BEGIN:this.minorAlignment.assign(this.bearing);break;case S.FIRST:this.minorAlignment.set(0);break;case S.MIDDLE:this.minorAlignment.set(0,K.y/2-$.y);break;case S.END:this.minorAlignment.set(0,(r-1)*u*i)}W.add(this.minorAlignment),$.add(this.minorAlignment),e._origin.setValue(re.set(W.x,$.y,0)),this.bbox.setExtents(Z.set(W.x,W.y,0),Q.set($.x,$.y,0))},vertical(e,t){const n=t.getFont(),s=e._string,r=s.length,o=Math.max(0,e._maxExtent.getValue()),a=t._leftToRight.getValue(),i=t._topToBottom.getValue(),l=t.getScale(),u=t.getContentScale(),c=t._spacing.getValue(),p=this.getBrowser().getBrowserOptions().getPrimitiveQuality(),h=this.getBrowser().getBrowserOptions().getTextCompression();j.set();const f=a?r:-1,d=a?1:-1;let g=0;for(let o=a?0:r-1;o!==f;o+=d){const f=this.stringToGlyphs(n,s[o],!0,o),d=g,m=f.length;q.set();const y=i?m:-1,v=i?1:-1;for(let e=i?0:m-1;e!==y;e+=v,++g){const t=f[e];this.getGlyphExtents(n,t,p,W,$),K.assign($).subtract(W);const s=i?e:m-e-1;this.lineIndices[g]=o,this.translations[g].set((c-K.x-W.x)/2,-s),J.assign(W).add(ee.assign(K).divide(2)).add(this.translations[g]),q.add(oe.set(K,J))}q.getExtents(W,$),K.assign($).subtract(W);const b=a?o:r-o-1,x=(c-K.x)/2,T=e.getLength(o)*u;let O=0;se.set(0===o?c-x:c,m?K.y:0).multiply(l);const k=se.y;switch(T&&(h===M().CHAR_SPACING&&f.length>1&&(O=(T-se.y)/(f.length-1)),se.y=T,K.y=T/l,W.y=$.y-K.y),this.charSpacings[o]=O,this.scales[o]=h===M().SCALING?se.y/k:1,e._lineBounds[o]=se,t.getMajorAlignment()){case S.BEGIN:case S.FIRST:ne.assign(te.set(b*c,-$.y));break;case S.MIDDLE:ne.assign(te.set(b*c,K.y/2-$.y));break;case S.END:te.set(b*c,K.y/this.scales[o]-$.y),ne.set(b*c,K.y-$.y)}for(let e=d;e<g;++e)this.translations[e].add(te).multiply(l);J.assign(W).add(ee.assign(K).divide(2)),j.add(oe.set(K.multiply(l),J.add(ne).multiply(l)))}if(o){const n=e._lineBounds.reduce((e,t)=>Math.max(e,t.y),0);if(n>o){const s=o*u/n;switch(h){case M().CHAR_SPACING:for(const t of this.charSpacings.keys())e._string[t].length<2||(this.charSpacings[t]-=(e._lineBounds[t].y-e._lineBounds[t].y*s)/(e._string[t].length-1));switch(t.getMajorAlignment()){case S.MIDDLE:for(const t of this.translations.keys()){const n=this.lineIndices[t];this.translations[t].y-=(e._lineBounds[n].y-e._lineBounds[n].y*s)/2}break;case S.END:for(const t of this.translations.keys()){const n=this.lineIndices[t];this.translations[t].y-=e._lineBounds[n].y-e._lineBounds[n].y*s}}break;case M().SCALING:for(const e of this.scales.keys())this.scales[e]*=s}for(const t of e._lineBounds.keys())e._lineBounds[t].y*=s;j.multRight(new(z())(1,0,0,0,s,0,0,0,0))}}switch(j.getExtents(W,$),K.assign($).subtract(W),e._textBounds=K,t.getMajorAlignment()){case S.BEGIN:case S.FIRST:this.bearing.set(-W.x,$.y);break;case S.MIDDLE:this.bearing.set(-W.x,0);break;case S.END:this.bearing.set(-W.x,W.y)}switch(t.getMinorAlignment()){case S.BEGIN:case S.FIRST:this.minorAlignment.set(-W.x,0);break;case S.MIDDLE:this.minorAlignment.set(-W.x-K.x/2,0);break;case S.END:this.minorAlignment.set(-W.x-K.x,0)}W.add(this.minorAlignment),$.add(this.minorAlignment),e._origin.setValue(re.set(W.x,$.y,0)),this.bbox.setExtents(Z.set(W.x,W.y,0),Q.set($.x,$.y,0))},stringToGlyphs(e,t,n,s){const r=this.glyphs[s]??(this.glyphs[s]=[]);r.length=t.length;const o=n?0:t.length-1,a=n?t.length:-1,i=n?1:-1;for(let n=o,s=0;n!==a;n+=i,++s)r[s]=e.charToGlyph(t[n]);return r},getHorizontalLineExtents(e,t,n,s,r){const o=e.getFont(),a=e._horizontal.getValue()?e._leftToRight.getValue():e._topToBottom.getValue(),i=this.stringToGlyphs(o,t,a,r),l=i.length,u=this.getBrowser().getBrowserOptions().getPrimitiveQuality();let c=0,p=0,h=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY;for(let e=0;e<l;++e){const t=i[e],n=i[e+1],s=n?o.getKerningValue(t,n):0;this.getGlyphExtents(o,t,u,X,Y),p+=e<l-1?t.advanceWidth+s:Y.x*o.unitsPerEm,h=Math.min(h,X.y),f=Math.max(f,Y.y)}switch(i.length?(this.getGlyphExtents(o,i[0],u,X,Y),c=X.x):(h=0,f=0),n.set(c,h),s.set(p/o.unitsPerEm,f),e.getMajorAlignment()){case S.BEGIN:case S.FIRST:n.x=0}return i},traverse(e,t){}});const ue=le,ce=y().add("X3DTextGeometry",ue),pe=e.Matrix4;var he=s.n(pe);const fe=e.Bezier;var de=s.n(fe);const ge=e.libtess;var me=s.n(ge);const ye=Symbol();function ve(e,t){ce.call(this,e,t),e.setTransparent(!1)}Object.assign(Object.setPrototypeOf(ve.prototype,ce.prototype),{getMatrix:()=>he().Identity,build:(()=>{const e=new(_()),t=new(_());return function(){const n=this.getFontStyle(),s=n.getFont();if(!s)return;const r=this.getText(),o=this.getGlyphs(),a=this.getMinorAlignment(),i=this.getTranslations(),l=this.getCharSpacings(),u=this.getScales(),c=n.getScale(),p=n._spacing.getValue(),h=r._origin.getValue(),f=c/s.unitsPerEm,d=this.getBrowser().getBrowserOptions().getPrimitiveQuality(),g=r.getTexCoords(),m=r.getNormals(),y=r.getVertices();if(r.getMultiTexCoords().push(g),this.getBBox().getExtents(e,t),r.getMin().assign(e),r.getMax().assign(t),n._horizontal.getValue())for(let e=0,t=o.length;e<t;++e){const t=o[e],n=i[e],r=l[e],v=u[e];let b=0;for(let e=0,o=t.length;e<o;++e){const o=t[e],i=this.getGlyphGeometry(s,o,d),l=a.x+n.x+b*v+e*r,u=a.y+n.y;for(const{x:e,y:t}of i){const n=e*c*v+l,s=t*c+u;g.push((n-h.x)/p,(s-h.y)/p,0,1),m.push(0,0,1),y.push(n,s,0,1)}let S=0;e+1<t.length&&(S=s.getKerningValue(o,t[e+1])),b+=(o.advanceWidth+S)*f}}else{const e=n._leftToRight.getValue(),t=n._topToBottom.getValue(),f=e?0:r._string.length-1,v=e?r._string.length:-1,b=e?1:-1;for(let e=f,n=0;e!==v;e+=b){const r=o[e],f=r.length,v=t?0:f-1,b=t?f:-1,S=t?1:-1,x=l[e],T=u[e];for(let e=v;e!==b;e+=S,++n){const t=i[n],o=this.getGlyphGeometry(s,r[e],d);for(const{x:n,y:s}of o){const r=n*c+a.x+t.x,o=s*c*T+a.y+t.y*T-e*x;g.push((r-h.x)/p,(o-h.y)/p,0,1),m.push(0,0,1),y.push(r,o,0,1)}}}}}})(),getGlyph(e,t,n){const s=e[ye]??=[],r=s[t]??=[];return r[n]??={}},getGlyphExtents(e,t,n,s,r){const o=this.getGlyph(e,n,t.index),a=o.extents;if(a)s.assign(a.min),r.assign(a.max);else{const a=this.getGlyphGeometry(e,t,n);a.length?(s.assign(a[0]).min(...a),r.assign(a[0]).max(...a)):(s.set(0),r.set(0));const i=o.extents={};i.min=s.copy(),i.max=r.copy()}},getGlyphGeometry(e,t,n){const s=this.getGlyph(e,n,t.index);return s.geometry??=this.createGlyphGeometry(t,n)},createGlyphGeometry(e,t){const n=this.getBezierSteps(t),s=e.getPath(0,0,1),r=[];let o=[],a=0,i=0;s.commands.push({type:"Z"});for(const{type:e,x1:t,y1:l,x2:u,y2:c,x:p,y:h}of s.commands){switch(e){case"M":case"Z":o.length>2&&r.push(o),o=[],"M"===e&&o.push(new(_())(p,-h,0));break;case"L":o.push(new(_())(p,-h,0));break;case"Q":de().quadric(a,-i,0,t,-l,0,p,-h,0,n,o);break;case"C":de().cubic(a,-i,0,t,-l,0,u,-c,0,p,-h,0,n,o);break;default:continue}a=p,i=h}return this.triangulatePolygon(r,[])},getBezierSteps(e){switch(e){case E().LOW:return 3;case E().HIGH:return 7;default:return 5}},triangulatePolygon:(()=>{const e=new(me().GluTesselator);return e.gluTessCallback(me().gluEnum.GLU_TESS_VERTEX_DATA,function(e,t){t.push(e)}),e.gluTessCallback(me().gluEnum.GLU_TESS_COMBINE,function(e,t,n){return new(_())(...e)}),e.gluTessProperty(me().gluEnum.GLU_TESS_WINDING_RULE,me().windingRule.GLU_TESS_WINDING_NONZERO),e.gluTessNormal(0,0,1),function(t,n){e.gluTessBeginPolygon(n);for(const n of t){e.gluTessBeginContour();for(const t of n)e.gluTessVertex(t,t);e.gluTessEndContour()}return e.gluTessEndPolygon(),n}})(),displaySimple(e,t){},display(e,t){},transformLine(e){},transformMatrix(e){}});const be=ve,Se=y().add("PolygonText",be);function xe(e){L.call(this,e),this.addType(T().FontStyle),this._size.setUnit("length")}Object.assign(Object.setPrototypeOf(xe.prototype,L.prototype),{getTextGeometry(e){return new Se(e,this)},getScale(){return this._size.getValue()},getContentScale:()=>1}),Object.defineProperties(xe,{...f().getStaticProperties("FontStyle","Text",1,"fontStyle","2.0"),fieldDefinitions:{value:new(p())([new(u())(T().inputOutput,"metadata",new(i().SFNode)),new(u())(T().inputOutput,"language",new(i().SFString)),new(u())(T().inputOutput,"family",new(i().MFString)("SERIF")),new(u())(T().inputOutput,"style",new(i().SFString)("PLAIN")),new(u())(T().inputOutput,"size",new(i().SFFloat)(1)),new(u())(T().inputOutput,"spacing",new(i().SFFloat)(1)),new(u())(T().inputOutput,"horizontal",new(i().SFBool)(!0)),new(u())(T().inputOutput,"leftToRight",new(i().SFBool)(!0)),new(u())(T().inputOutput,"topToBottom",new(i().SFBool)(!0)),new(u())(T().inputOutput,"justify",new(i().MFString)("BEGIN"))]),enumerable:!0}});const Te=xe,Oe=y().add("FontStyle",Te);function ke(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function we(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new ke,this.dtree=new ke}var Ie=new ke,Ue=new ke,Re=new Uint8Array(30),Le=new Uint16Array(30),Ce=new Uint8Array(30),Ee=new Uint16Array(30),De=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Me=new ke,Fe=new Uint8Array(320);function Ae(e,t,n,s){var r,o;for(r=0;r<n;++r)e[r]=0;for(r=0;r<30-n;++r)e[r+n]=r/n|0;for(o=s,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}var Ne=new Uint16Array(16);function Pe(e,t,n,s){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<s;++r)e.table[t[n+r]]++;for(e.table[0]=0,o=0,r=0;r<16;++r)Ne[r]=o,o+=e.table[r];for(r=0;r<s;++r)t[n+r]&&(e.trans[Ne[t[n+r]]++]=r)}function Be(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function Ge(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var s=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,s+n}function He(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,s=0,r=0,o=e.tag;do{s=2*s+(1&o),o>>>=1,++r,n+=t.table[r],s-=t.table[r]}while(s>=0);return e.tag=o,e.bitcount-=r,t.trans[n+s]}function _e(e,t,n){var s,r,o,a,i,l;for(s=Ge(e,5,257),r=Ge(e,5,1),o=Ge(e,4,4),a=0;a<19;++a)Fe[a]=0;for(a=0;a<o;++a){var u=Ge(e,3,0);Fe[De[a]]=u}for(Pe(Me,Fe,0,19),i=0;i<s+r;){var c=He(e,Me);switch(c){case 16:var p=Fe[i-1];for(l=Ge(e,2,3);l;--l)Fe[i++]=p;break;case 17:for(l=Ge(e,3,3);l;--l)Fe[i++]=0;break;case 18:for(l=Ge(e,7,11);l;--l)Fe[i++]=0;break;default:Fe[i++]=c}}Pe(t,Fe,0,s),Pe(n,Fe,s,r)}function Ve(e,t,n){for(;;){var s,r,o,a,i=He(e,t);if(256===i)return 0;if(i<256)e.dest[e.destLen++]=i;else for(s=Ge(e,Re[i-=257],Le[i]),r=He(e,n),a=o=e.destLen-Ge(e,Ce[r],Ee[r]);a<o+s;++a)e.dest[e.destLen++]=e.dest[a]}}function ze(e){for(var t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,n=t;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}function je(e,t){var n,s,r=new we(e,t);do{switch(n=Be(r),Ge(r,2,0)){case 0:s=ze(r);break;case 1:s=Ve(r,Ie,Ue);break;case 2:_e(r,r.ltree,r.dtree),s=Ve(r,r.ltree,r.dtree);break;default:s=-3}if(0!==s)throw new Error("Data error")}while(!n);return r.destLen<r.dest.length?"function"==typeof r.dest.slice?r.dest.slice(0,r.destLen):r.dest.subarray(0,r.destLen):r.dest}function qe(e,t,n,s,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*n+Math.pow(r,3)*s}function We(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}!function(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}(Ie,Ue),Ae(Re,Le,4,3),Ae(Ce,Ee,2,1),Re[28]=0,Le[28]=258,We.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},We.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},We.prototype.addX=function(e){this.addPoint(e,null)},We.prototype.addY=function(e){this.addPoint(null,e)},We.prototype.addBezier=function(e,t,n,s,r,o,a,i){const l=[e,t],u=[n,s],c=[r,o],p=[a,i];this.addPoint(e,t),this.addPoint(a,i);for(let e=0;e<=1;e++){const t=6*l[e]-12*u[e]+6*c[e],n=-3*l[e]+9*u[e]-9*c[e]+3*p[e],s=3*u[e]-3*l[e];if(0===n){if(0===t)continue;const n=-s/t;0<n&&n<1&&(0===e&&this.addX(qe(l[e],u[e],c[e],p[e],n)),1===e&&this.addY(qe(l[e],u[e],c[e],p[e],n)));continue}const r=Math.pow(t,2)-4*s*n;if(r<0)continue;const o=(-t+Math.sqrt(r))/(2*n);0<o&&o<1&&(0===e&&this.addX(qe(l[e],u[e],c[e],p[e],o)),1===e&&this.addY(qe(l[e],u[e],c[e],p[e],o)));const a=(-t-Math.sqrt(r))/(2*n);0<a&&a<1&&(0===e&&this.addX(qe(l[e],u[e],c[e],p[e],a)),1===e&&this.addY(qe(l[e],u[e],c[e],p[e],a)))}},We.prototype.addQuad=function(e,t,n,s,r,o){const a=e+2/3*(n-e),i=t+2/3*(s-t),l=a+1/3*(r-e),u=i+1/3*(o-t);this.addBezier(e,t,a,i,l,u,r,o)};var $e=We;function Xe(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}var Ye={};function Ze(e,t){const n=Math.floor(e),s=e-n;if(Ye[t]||(Ye[t]={}),void 0!==Ye[t][s]){return n+Ye[t][s]}const r=+(Math.round(s+"e+"+t)+"e-"+t);return Ye[t][s]=r,n+r}function Qe(e){let t=[[]],n=0,s=0;for(let r=0;r<e.length;r+=1){const o=t[t.length-1],a=e[r],i=o[0],l=o[1],u=o[o.length-1],c=e[r+1];o.push(a),"M"===a.type?(n=a.x,s=a.y):"L"!==a.type||c&&"Z"!==c.command?"L"===a.type&&u&&u.x===a.x&&u.y===a.y?o.pop():"Z"===a.type&&(i&&l&&u&&"M"===i.type&&"L"===l.type&&"L"===u.type&&u.x===i.x&&u.y===i.y&&(o.shift(),o[0].type="M"),r+1<e.length&&t.push([])):Math.abs(a.x-n)>1||Math.abs(a.y-s)>1||o.pop()}return e=[].concat.apply([],t)}Xe.prototype.fromSVG=function(e,t={}){"undefined"!=typeof SVGPathElement&&e instanceof SVGPathElement&&(e=e.getAttribute("d")),t=function(e){return Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0,scale:1,x:0,y:0},e)}(t),this.commands=[];const n="MmLlQqCcZzHhVv";let s={},r=[""],o=!1;function a(e){if(!this.commands.length)return e;const t=this.commands[this.commands.length-1];for(let n=0;n<e.length;n++)e[n]+=t[1&n?"y":"x"];return e}function i(){if(void 0===s.type)return;const e=s.type.toUpperCase(),n="Z"!==e&&s.type.toUpperCase()!==s.type;let o=r.filter(e=>e.length).map(e=>{let n=parseFloat(e);return(t.decimalPlaces||0===t.decimalPlaces)&&(n=Ze(n,t.decimalPlaces)),n});if(r=[""],!o.length&&"Z"!==e)return;n&&"H"!==e&&"V"!==e&&(o=a.apply(this,[o]));const i=this.commands.length&&this.commands[this.commands.length-1].x||0,l=this.commands.length&&this.commands[this.commands.length-1].y||0;switch(e){case"M":this.moveTo(...o);break;case"L":this.lineTo(...o);break;case"V":for(let e=0;e<o.length;e++){let t=0;n&&(t=this.commands.length&&this.commands[this.commands.length-1].y||0),this.lineTo(i,o[e]+t)}break;case"H":for(let e=0;e<o.length;e++){let t=0;n&&(t=this.commands.length&&this.commands[this.commands.length-1].x||0),this.lineTo(o[e]+t,l)}break;case"C":this.bezierCurveTo(...o);break;case"Q":this.quadraticCurveTo(...o);break;case"Z":(this.commands.length<1||"Z"!==this.commands[this.commands.length-1].type)&&this.close()}if(this.commands.length)for(const e in this.commands[this.commands.length-1])void 0===this.commands[this.commands.length-1][e]&&(this.commands[this.commands.length-1][e]=0)}for(let t=0;t<e.length;t++){const a=e.charAt(t),l=r[r.length-1];if("0123456789".indexOf(a)>-1)r[r.length-1]+=a;else if("-+".indexOf(a)>-1)if(s.type||this.commands.length||(s.type="L"),"-"===a)!s.type||l.indexOf("-")>0?o=!0:l.length?r.push("-"):r[r.length-1]=a;else{if(s.type&&!(l.length>0))continue;o=!0}else if(n.indexOf(a)>-1)s.type?(i.apply(this),s={type:a}):s.type=a;else{if("SsTtAa".indexOf(a)>-1)throw new Error("Unsupported path command: "+a+". Currently supported commands are "+n.split("").join(", ")+".");" ,\t\n\r\f\v".indexOf(a)>-1?r.push(""):"."===a?!s.type||l.indexOf(a)>-1?o=!0:r[r.length-1]+=a:o=!0}if(o)throw new Error("Unexpected character: "+a+" at offset "+t)}i.apply(this),t.optimize&&(this.commands=Qe(this.commands));const l=t.flipY;let u=t.flipYBase;if(!0===l&&void 0===t.flipYBase){const e=this.getBoundingBox();u=e.y1+e.y2}for(const e in this.commands){const n=this.commands[e];for(const s in n)["x","x1","x2"].includes(s)?this.commands[e][s]=t.x+n[s]*t.scale:["y","y1","y2"].includes(s)&&(this.commands[e][s]=t.y+(l?u-n[s]:n[s])*t.scale)}return this},Xe.fromSVG=function(e,t){return(new Xe).fromSVG(e,t)},Xe.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},Xe.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},Xe.prototype.curveTo=Xe.prototype.bezierCurveTo=function(e,t,n,s,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:s,x:r,y:o})},Xe.prototype.quadTo=Xe.prototype.quadraticCurveTo=function(e,t,n,s){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:s})},Xe.prototype.close=Xe.prototype.closePath=function(){this.commands.push({type:"Z"})},Xe.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof $e){const t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},Xe.prototype.getBoundingBox=function(){const e=new $e;let t=0,n=0,s=0,r=0;for(let o=0;o<this.commands.length;o++){const a=this.commands[o];switch(a.type){case"M":e.addPoint(a.x,a.y),t=s=a.x,n=r=a.y;break;case"L":e.addPoint(a.x,a.y),s=a.x,r=a.y;break;case"Q":e.addQuad(s,r,a.x1,a.y1,a.x,a.y),s=a.x,r=a.y;break;case"C":e.addBezier(s,r,a.x1,a.y1,a.x2,a.y2,a.x,a.y),s=a.x,r=a.y;break;case"Z":s=t,r=n;break;default:throw new Error("Unexpected path command "+a.type)}}return e.isEmpty()&&e.addPoint(0,0),e},Xe.prototype.draw=function(e){const t=this._layers;if(t&&t.length){for(let n=0;n<t.length;n++)this.draw.call(t[n],e);return}const n=this._image;if(n)e.drawImage(n.image,n.x,n.y,n.width,n.height);else{e.beginPath();for(let t=0;t<this.commands.length;t+=1){const n=this.commands[t];"M"===n.type?e.moveTo(n.x,n.y):"L"===n.type?e.lineTo(n.x,n.y):"C"===n.type?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):"Q"===n.type?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):"Z"===n.type&&this.stroke&&this.strokeWidth&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())}},Xe.prototype.toPathData=function(e){function t(t){const n=Ze(t,e.decimalPlaces);return Math.round(t)===n?""+n:n.toFixed(e.decimalPlaces)}function n(){let e="";for(let n=0;n<arguments.length;n+=1){const s=arguments[n];s>=0&&n>0&&(e+=" "),e+=t(s)}return e}e=function(e){return parseInt(e)===e&&(e={decimalPlaces:e,flipY:!1}),Object.assign({},{decimalPlaces:2,optimize:!0,flipY:!0,flipYBase:void 0},e)}(e);let s=this.commands;e.optimize&&(s=JSON.parse(JSON.stringify(this.commands)),s=Qe(s));const r=e.flipY;let o=e.flipYBase;if(!0===r&&void 0===o){const e=new Xe;e.extend(s);const t=e.getBoundingBox();o=t.y1+t.y2}let a="";for(let e=0;e<s.length;e+=1){const t=s[e];"M"===t.type?a+="M"+n(t.x,r?o-t.y:t.y):"L"===t.type?a+="L"+n(t.x,r?o-t.y:t.y):"C"===t.type?a+="C"+n(t.x1,r?o-t.y1:t.y1,t.x2,r?o-t.y2:t.y2,t.x,r?o-t.y:t.y):"Q"===t.type?a+="Q"+n(t.x1,r?o-t.y1:t.y1,t.x,r?o-t.y:t.y):"Z"===t.type&&(a+="Z")}return a},Xe.prototype.toSVG=function(e,t){this._layers&&this._layers.length&&console.warn("toSVG() does not support colr font layers yet"),this._image&&console.warn("toSVG() does not support SVG glyphs yet"),t||(t=this.toPathData(e));let n='<path d="';return n+=t,n+='"',void 0!==this.fill&&"black"!==this.fill&&(null===this.fill?n+=' fill="none"':n+=' fill="'+this.fill+'"'),this.stroke&&(n+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),n+="/>",n},Xe.prototype.toDOMElement=function(e,t){this._layers&&this._layers.length&&console.warn("toDOMElement() does not support colr font layers yet"),t||(t=this.toPathData(e));const n=t,s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",n),void 0!==this.fill&&"black"!==this.fill&&(null===this.fill?s.setAttribute("fill","none"):s.setAttribute("fill",this.fill)),this.stroke&&(s.setAttribute("stroke",this.stroke),s.setAttribute("stroke-width",this.strokeWidth)),s};var Ke=Xe;function Je(e){throw new Error(e)}function et(e,t){e||Je(t)}var tt={fail:Je,argument:et,assert:et},nt=2147483648,st={},rt={},ot={};function at(e){return function(){return e}}rt.BYTE=function(e){return tt.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},ot.BYTE=at(1),rt.CHAR=function(e){return[e.charCodeAt(0)]},ot.CHAR=at(1),rt.CHARARRAY=function(e){null==e&&(e="",console.warn("CHARARRAY with undefined or null value encountered and treated as an empty string. This is probably caused by a missing glyph name."));const t=[];for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},ot.CHARARRAY=function(e){return void 0===e?0:e.length},rt.USHORT=function(e){return[e>>8&255,255&e]},ot.USHORT=at(2),rt.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},ot.SHORT=at(2),rt.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},ot.UINT24=at(3),rt.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},ot.ULONG=at(4),rt.LONG=function(e){return e>=nt&&(e=-(2*nt-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},ot.LONG=at(4),rt.FLOAT=function(e){if(e>32767.00001525879||e<-32768)throw new Error(`Value ${e} is outside the range of representable values in 16.16 format`);const t=Math.round(65536*e)|0;return rt.ULONG(t)},ot.FLOAT=ot.ULONG,rt.FIXED=rt.ULONG,ot.FIXED=ot.ULONG,rt.FWORD=rt.SHORT,ot.FWORD=ot.SHORT,rt.UFWORD=rt.USHORT,ot.UFWORD=ot.USHORT,rt.F2DOT14=function(e){return rt.USHORT(16384*e)},ot.F2DOT14=ot.USHORT,rt.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},ot.LONGDATETIME=at(8),rt.TAG=function(e){return tt.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},ot.TAG=at(4),rt.Card8=rt.BYTE,ot.Card8=ot.BYTE,rt.Card16=rt.USHORT,ot.Card16=ot.USHORT,rt.OffSize=rt.BYTE,ot.OffSize=ot.BYTE,rt.SID=rt.USHORT,ot.SID=ot.USHORT,rt.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?rt.NUMBER16(e):rt.NUMBER32(e)},ot.NUMBER=function(e){return rt.NUMBER(e).length},rt.NUMBER16=function(e){return[28,e>>8&255,255&e]},ot.NUMBER16=at(3),rt.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},ot.NUMBER32=at(5),rt.REAL=function(e){let t=e.toString();const n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){const s=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*s)/s).toString()}let s="";for(let e=0,n=t.length;e<n;e+=1){const n=t[e];s+="e"===n?"-"===t[++e]?"c":"b":"."===n?"a":"-"===n?"e":n}s+=1&s.length?"f":"ff";const r=[30];for(let e=0,t=s.length;e<t;e+=2)r.push(parseInt(s.substr(e,2),16));return r},ot.REAL=function(e){return rt.REAL(e).length},rt.NAME=rt.CHARARRAY,ot.NAME=ot.CHARARRAY,rt.STRING=rt.CHARARRAY,ot.STRING=ot.CHARARRAY,st.UTF8=function(e,t,n){const s=[],r=n;for(let n=0;n<r;n++,t+=1)s[n]=e.getUint8(t);return String.fromCharCode.apply(null,s)},st.UTF16=function(e,t,n){const s=[],r=n/2;for(let n=0;n<r;n++,t+=2)s[n]=e.getUint16(t);return String.fromCharCode.apply(null,s)},rt.UTF16=function(e){const t=[];for(let n=0;n<e.length;n+=1){const s=e.charCodeAt(n);t[t.length]=s>>8&255,t[t.length]=255&s}return t},ot.UTF16=function(e){return 2*e.length};var it={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};st.MACSTRING=function(e,t,n,s){const r=it[s];if(void 0===r)return;let o="";for(let s=0;s<n;s++){const n=e.getUint8(t+s);o+=n<=127?String.fromCharCode(n):r[127&n]}return o};var lt,ut="function"==typeof WeakMap&&new WeakMap;function ct(e){return e>=-128&&e<=127}function pt(e,t,n){let s=0;const r=e.length;for(;t<r&&s<64&&0===e[t];)++t,++s;return n.push(128|s-1),t}function ht(e,t,n){let s=0;const r=e.length;let o=t;for(;o<r&&s<64;){const t=e[o];if(!ct(t))break;if(0===t&&o+1<r&&0===e[o+1])break;++o,++s}n.push(s-1);for(let s=t;s<o;++s)n.push(e[s]+256&255);return o}function ft(e,t,n){let s=0;const r=e.length;let o=t;for(;o<r&&s<64;){const t=e[o];if(0===t)break;if(ct(t)&&o+1<r&&ct(e[o+1]))break;++o,++s}n.push(64|s-1);for(let s=t;s<o;++s){const t=e[s];n.push(t+65536>>8&255,t+256&255)}return o}rt.MACSTRING=function(e,t){const n=function(e){if(!lt){lt={};for(let e in it)lt[e]=new String(e)}const t=lt[e];if(void 0===t)return;if(ut){const e=ut.get(t);if(void 0!==e)return e}const n=it[e];if(void 0===n)return;const s={};for(let e=0;e<n.length;e++)s[n.charCodeAt(e)]=e+128;return ut&&ut.set(t,s),s}(t);if(void 0===n)return;const s=[];for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>=128&&(r=n[r],void 0===r))return;s[t]=r}return s},ot.MACSTRING=function(e,t){const n=rt.MACSTRING(e,t);return void 0!==n?n.length:0},rt.VARDELTAS=function(e){let t=0;const n=[];for(;t<e.length;){const s=e[t];t=0===s?pt(e,t,n):s>=-128&&s<=127?ht(e,t,n):ft(e,t,n)}return n},rt.INDEX=function(e){let t=1;const n=[t],s=[];for(let r=0;r<e.length;r+=1){const o=rt.OBJECT(e[r]);Array.prototype.push.apply(s,o),t+=o.length,n.push(t)}if(0===s.length)return[0,0];const r=[],o=1+Math.floor(Math.log(t)/Math.log(2))/8|0,a=[void 0,rt.BYTE,rt.USHORT,rt.UINT24,rt.ULONG][o];for(let e=0;e<n.length;e+=1){const t=a(n[e]);Array.prototype.push.apply(r,t)}return Array.prototype.concat(rt.Card16(e.length),rt.OffSize(o),r,s)},ot.INDEX=function(e){return rt.INDEX(e).length},rt.DICT=function(e){let t=[];const n=Object.keys(e),s=n.length;for(let r=0;r<s;r+=1){const s=parseInt(n[r],0),o=e[s],a=rt.OPERAND(o.value,o.type),i=rt.OPERATOR(s);for(let e=0;e<a.length;e++)t.push(a[e]);for(let e=0;e<i.length;e++)t.push(i[e])}return t},ot.DICT=function(e){return rt.DICT(e).length},rt.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},rt.OPERAND=function(e,t){let n=[];if(Array.isArray(t))for(let s=0;s<t.length;s+=1){tt.argument(e.length===t.length,"Not enough arguments given for type"+t);const r=rt.OPERAND(e[s],t[s]);for(let e=0;e<r.length;e++)n.push(r[e])}else if("SID"===t){const t=rt.NUMBER(e);for(let e=0;e<t.length;e++)n.push(t[e])}else if("offset"===t){const t=rt.NUMBER32(e);for(let e=0;e<t.length;e++)n.push(t[e])}else if("number"===t){const t=rt.NUMBER(e);for(let e=0;e<t.length;e++)n.push(t[e])}else{if("real"!==t)throw new Error("Unknown operand type "+t);{const t=rt.REAL(e);for(let e=0;e<t.length;e++)n.push(t[e])}}return n},rt.OP=rt.BYTE,ot.OP=ot.BYTE;var dt="function"==typeof WeakMap&&new WeakMap;function gt(e,t,n){if(t&&t.length)for(let e=0;e<t.length;e+=1){const n=t[e];this[n.name]=n.value}if(this.tableName=e,this.fields=t,n){const e=Object.keys(n);for(let t=0;t<e.length;t+=1){const s=e[t],r=n[s];void 0!==this[s]&&(this[s]=r)}}}function mt(e,t,n){void 0===n&&(n=t.length);const s=new Array(t.length+1);s[0]={name:e+"Count",type:"USHORT",value:n};for(let n=0;n<t.length;n++)s[n+1]={name:e+n,type:"USHORT",value:t[n]};return s}function yt(e,t,n){const s=t.length,r=new Array(s+1);r[0]={name:e+"Count",type:"USHORT",value:s};for(let o=0;o<s;o++)r[o+1]={name:e+o,type:"TABLE",value:n(t[o],o)};return r}function vt(e,t,n){const s=t.length;let r=[];r[0]={name:e+"Count",type:"USHORT",value:s};for(let e=0;e<s;e++)r=r.concat(n(t[e],e));return r}function bt(e){1===e.format?gt.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(mt("glyph",e.glyphs))):2===e.format?gt.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(vt("rangeRecord",e.ranges,function(e,t){return[{name:"startGlyphID"+t,type:"USHORT",value:e.start},{name:"endGlyphID"+t,type:"USHORT",value:e.end},{name:"startCoverageIndex"+t,type:"USHORT",value:e.index}]}))):tt.assert(!1,"Coverage format must be 1 or 2.")}function St(e){gt.call(this,"scriptListTable",vt("scriptRecord",e,function(e,t){const n=e.script;let s=n.defaultLangSys;return tt.assert(!!s,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new gt("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new gt("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:s.reqFeatureIndex}].concat(mt("featureIndex",s.featureIndexes)))}].concat(vt("langSys",n.langSysRecords,function(e,t){const n=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new gt("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(mt("featureIndex",n.featureIndexes)))}]})))}]}))}function xt(e){gt.call(this,"featureListTable",vt("featureRecord",e,function(e,t){const n=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new gt("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(mt("lookupListIndex",n.lookupListIndexes)))}]}))}function Tt(e,t){gt.call(this,"lookupListTable",yt("lookup",e,function(e){let n=t[e.lookupType];return tt.assert(!!n,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new gt("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(yt("subtable",e.subtables,n)))}))}function Ot(e){1===e.format?gt.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:1},{name:"startGlyphID",type:"USHORT",value:e.startGlyph}].concat(mt("glyph",e.classes))):2===e.format?gt.call(this,"classDefTable",[{name:"classFormat",type:"USHORT",value:2}].concat(vt("rangeRecord",e.ranges,function(e,t){return[{name:"startGlyphID"+t,type:"USHORT",value:e.start},{name:"endGlyphID"+t,type:"USHORT",value:e.end},{name:"class"+t,type:"USHORT",value:e.classId}]}))):tt.assert(!1,"Class format must be 1 or 2.")}rt.CHARSTRING=function(e){if(dt){const t=dt.get(e);if(void 0!==t)return t}let t=[];const n=e.length;for(let s=0;s<n;s+=1){const n=e[s],r=rt[n.type](n.value);for(let e=0;e<r.length;e++)t.push(r[e])}return dt&&dt.set(e,t),t},ot.CHARSTRING=function(e){return rt.CHARSTRING(e).length},rt.OBJECT=function(e){const t=rt[e.type];return tt.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},ot.OBJECT=function(e){const t=ot[e.type];return tt.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},rt.TABLE=function(e){let t=[];const n=(e.fields||[]).length,s=[],r=[];for(let o=0;o<n;o+=1){const n=e.fields[o],a=rt[n.type];tt.argument(void 0!==a,"No encoding function for field type "+n.type+" ("+n.name+")");let i=e[n.name];void 0===i&&(i=n.value);const l=a(i);if("TABLE"===n.type)null!==i.fields&&(r.push(t.length),s.push(l)),t.push(0,0);else for(let e=0;e<l.length;e++)t.push(l[e])}for(let n=0;n<s.length;n+=1){const o=r[n],a=t.length;tt.argument(a<65536,"Table "+e.tableName+" too big."),t[o]=a>>8,t[o+1]=255&a;for(let e=0;e<s[n].length;e++)t.push(s[n][e])}return t},ot.TABLE=function(e){let t=0;const n=(e.fields||[]).length;for(let s=0;s<n;s+=1){const n=e.fields[s],r=ot[n.type];tt.argument(void 0!==r,"No sizeOf function for field type "+n.type+" ("+n.name+")");let o=e[n.name];void 0===o&&(o=n.value),t+=r(o),"TABLE"===n.type&&(t+=2)}return t},rt.RECORD=rt.TABLE,ot.RECORD=ot.TABLE,rt.LITERAL=function(e){return e},ot.LITERAL=function(e){return e.length},gt.prototype.encode=function(){return rt.TABLE(this)},gt.prototype.sizeOf=function(){return ot.TABLE(this)},bt.prototype=Object.create(gt.prototype),bt.prototype.constructor=bt,St.prototype=Object.create(gt.prototype),St.prototype.constructor=St,xt.prototype=Object.create(gt.prototype),xt.prototype.constructor=xt,Tt.prototype=Object.create(gt.prototype),Tt.prototype.constructor=Tt,Ot.prototype=Object.create(gt.prototype),Ot.prototype.constructor=Ot;var kt={Table:gt,Record:gt,Coverage:bt,ClassDef:Ot,ScriptList:St,FeatureList:xt,LookupList:Tt,ushortList:mt,tableList:yt,recordList:vt};function wt(e,t){return e.getUint8(t)}function It(e,t){return e.getUint16(t,!1)}function Ut(e,t){return(e.getUint16(t)<<8)+e.getUint8(t+2)}function Rt(e,t){return e.getUint32(t,!1)}function Lt(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var Ct={byte:1,uShort:2,f2dot14:2,short:2,uInt24:3,uLong:4,fixed:4,longDateTime:8,tag:4},Et=32768,Dt=32767,Mt=32768,Ft=4095,At=32768,Nt=16384,Pt=8192,Bt=4095,Gt=128,Ht=127,_t=128,Vt=64,zt=63,jt=15,qt=48;function Wt(e,t){this.data=e,this.offset=t,this.relativeOffset=0}Wt.prototype.parseByte=function(){const e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},Wt.prototype.parseChar=function(){const e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},Wt.prototype.parseCard8=Wt.prototype.parseByte,Wt.prototype.parseUShort=function(){const e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},Wt.prototype.parseCard16=Wt.prototype.parseUShort,Wt.prototype.parseSID=Wt.prototype.parseUShort,Wt.prototype.parseOffset16=Wt.prototype.parseUShort,Wt.prototype.parseShort=function(){const e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},Wt.prototype.parseF2Dot14=function(){const e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},Wt.prototype.parseUInt24=function(){const e=Ut(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=3,e},Wt.prototype.parseULong=function(){const e=Rt(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},Wt.prototype.parseLong=function(){const e=(t=this.data,n=this.offset+this.relativeOffset,t.getInt32(n,!1));var t,n;return this.relativeOffset+=4,e},Wt.prototype.parseOffset32=Wt.prototype.parseULong,Wt.prototype.parseFixed=function(){const e=Lt(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},Wt.prototype.parseString=function(e){const t=this.data,n=this.offset+this.relativeOffset;let s="";this.relativeOffset+=e;for(let r=0;r<e;r++)s+=String.fromCharCode(t.getUint8(n+r));return s},Wt.prototype.parseTag=function(){return this.parseString(4)},Wt.prototype.parseLongDateTime=function(){let e=Rt(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},Wt.prototype.parseVersion=function(e){const t=It(this.data,this.offset+this.relativeOffset),n=It(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+n/e/10},Wt.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=Ct[e]*t},Wt.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint32(s),s+=4;return this.relativeOffset+=4*e,t},Wt.prototype.parseOffset16List=Wt.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint16(s),s+=2;return this.relativeOffset+=2*e,t},Wt.prototype.parseShortList=function(e){const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getInt16(s),s+=2;return this.relativeOffset+=2*e,t},Wt.prototype.parseByteList=function(e){const t=new Array(e),n=this.data;let s=this.offset+this.relativeOffset;for(let r=0;r<e;r++)t[r]=n.getUint8(s++);return this.relativeOffset+=e,t},Wt.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e);for(let s=0;s<e;s++)n[s]=t.call(this);return n},Wt.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e);for(let s=0;s<e;s++)n[s]=t.call(this);return n},Wt.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e),s=Object.keys(t);for(let r=0;r<e;r++){const e={};for(let n=0;n<s.length;n++){const r=s[n],o=t[r];e[r]=o.call(this)}n[r]=e}return n},Wt.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e),s=Object.keys(t);for(let r=0;r<e;r++){const e={};for(let n=0;n<s.length;n++){const r=s[n],o=t[r];e[r]=o.call(this)}n[r]=e}return n},Wt.prototype.parseTupleRecords=function(e,t){let n=[];for(let s=0;s<e;s++){let e=[];for(let n=0;n<t;n++)e.push(this.parseF2Dot14());n.push(e)}return n},Wt.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);{const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const r=t[s],o=e[r];n[r]=o.call(this)}return n}},Wt.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0===e)return;const t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t},Wt.prototype.parseValueRecordList=function(){const e=this.parseUShort(),t=this.parseUShort(),n=new Array(t);for(let s=0;s<t;s++)n[s]=this.parseValueRecord(e);return n},Wt.prototype.parsePointer=function(e){const t=this.parseOffset16();if(t>0)return new Wt(this.data,this.offset+t).parseStruct(e)},Wt.prototype.parsePointer32=function(e){const t=this.parseOffset32();if(t>0)return new Wt(this.data,this.offset+t).parseStruct(e)},Wt.prototype.parseListOfLists=function(e){const t=this.parseOffset16List(),n=t.length,s=this.relativeOffset,r=new Array(n);for(let s=0;s<n;s++){const n=t[s];if(0!==n)if(this.relativeOffset=n,e){const t=this.parseOffset16List(),o=new Array(t.length);for(let s=0;s<t.length;s++)this.relativeOffset=n+t[s],o[s]=e.call(this);r[s]=o}else r[s]=this.parseUShortList();else r[s]=void 0}return this.relativeOffset=s,r},Wt.prototype.parseCoverage=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(n)};if(2===t){const e=new Array(n);for(let t=0;t<n;t++)e[t]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:e}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},Wt.prototype.parseClassDef=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()}:2===t?{format:2,ranges:this.parseRecordList({start:Wt.uShort,end:Wt.uShort,classId:Wt.uShort})}:(console.warn(`0x${e.toString(16)}: This font file uses an invalid ClassDef format of ${t}. It might be corrupted and should be reacquired if it doesn't display as intended.`),{format:t})},Wt.list=function(e,t){return function(){return this.parseList(e,t)}},Wt.list32=function(e,t){return function(){return this.parseList32(e,t)}},Wt.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},Wt.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},Wt.pointer=function(e){return function(){return this.parsePointer(e)}},Wt.pointer32=function(e){return function(){return this.parsePointer32(e)}},Wt.tag=Wt.prototype.parseTag,Wt.byte=Wt.prototype.parseByte,Wt.uShort=Wt.offset16=Wt.prototype.parseUShort,Wt.uShortList=Wt.prototype.parseUShortList,Wt.uInt24=Wt.prototype.parseUInt24,Wt.uLong=Wt.offset32=Wt.prototype.parseULong,Wt.uLongList=Wt.prototype.parseULongList,Wt.fixed=Wt.prototype.parseFixed,Wt.f2Dot14=Wt.prototype.parseF2Dot14,Wt.struct=Wt.prototype.parseStruct,Wt.coverage=Wt.prototype.parseCoverage,Wt.classDef=Wt.prototype.parseClassDef;var $t={reserved:Wt.uShort,reqFeatureIndex:Wt.uShort,featureIndexes:Wt.uShortList};Wt.prototype.parseScriptList=function(){return this.parsePointer(Wt.recordList({tag:Wt.tag,script:Wt.pointer({defaultLangSys:Wt.pointer($t),langSysRecords:Wt.recordList({tag:Wt.tag,langSys:Wt.pointer($t)})})}))||[]},Wt.prototype.parseFeatureList=function(){return this.parsePointer(Wt.recordList({tag:Wt.tag,feature:Wt.pointer({featureParams:Wt.offset16,lookupListIndexes:Wt.uShortList})}))||[]},Wt.prototype.parseLookupList=function(e){return this.parsePointer(Wt.list(Wt.pointer(function(){const t=this.parseUShort();tt.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");const n=this.parseUShort(),s=16&n;return{lookupType:t,lookupFlag:n,subtables:this.parseList(Wt.pointer(e[t])),markFilteringSet:s?this.parseUShort():void 0}})))||[]},Wt.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){const e=this.parseUShort(),t=this.parseUShort();tt.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown.");return this.parseRecordList32({conditionSetOffset:Wt.offset32,featureTableSubstitutionOffset:Wt.offset32})})||[]},Wt.prototype.parseVariationStore=function(){const e=this.relativeOffset,t=this.parseUShort(),n={itemVariationStore:this.parseItemVariationStore()};return this.relativeOffset=e+t+2,n},Wt.prototype.parseItemVariationStore=function(){const e=this.relativeOffset,t={format:this.parseUShort(),variationRegions:[],itemVariationSubtables:[]},n=this.parseOffset32(),s=this.parseUShort(),r=this.parseULongList(s);this.r