@unmade/text-renderer 0.1.11 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { svgPathProperties as Wn } from "svg-path-properties";
2
- import { DOMParser as zn } from "linkedom";
1
+ import { svgPathProperties as _n } from "svg-path-properties";
2
+ import { DOMParser as Vn } from "linkedom";
3
3
  import "node:path";
4
- import _n from "@thednp/dommatrix";
4
+ import qn from "@thednp/dommatrix";
5
5
  String.prototype.codePointAt || (function() {
6
6
  var e = (function() {
7
7
  try {
@@ -28,14 +28,14 @@ String.prototype.codePointAt || (function() {
28
28
  writable: !0
29
29
  }) : String.prototype.codePointAt = r;
30
30
  })();
31
- var Gr = 0, Ht = -3;
31
+ var Gr = 0, Wt = -3;
32
32
  function Ne() {
33
33
  this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
34
34
  }
35
- function Vn(e, r) {
35
+ function Xn(e, r) {
36
36
  this.source = e, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = r, this.destLen = 0, this.ltree = new Ne(), this.dtree = new Ne();
37
37
  }
38
- var Wt = new Ne(), zt = new Ne(), Nr = new Uint8Array(30), Hr = new Uint16Array(30), _t = new Uint8Array(30), Vt = new Uint16Array(30), qn = new Uint8Array([
38
+ var zt = new Ne(), _t = new Ne(), Nr = new Uint8Array(30), Hr = new Uint16Array(30), Vt = new Uint8Array(30), qt = new Uint16Array(30), Yn = new Uint8Array([
39
39
  16,
40
40
  17,
41
41
  18,
@@ -56,7 +56,7 @@ var Wt = new Ne(), zt = new Ne(), Nr = new Uint8Array(30), Hr = new Uint16Array(
56
56
  1,
57
57
  15
58
58
  ]), Qr = new Ne(), oe = new Uint8Array(320);
59
- function qt(e, r, t, n) {
59
+ function Xt(e, r, t, n) {
60
60
  var a, s;
61
61
  for (a = 0; a < t; ++a)
62
62
  e[a] = 0;
@@ -65,7 +65,7 @@ function qt(e, r, t, n) {
65
65
  for (s = n, a = 0; a < 30; ++a)
66
66
  r[a] = s, s += 1 << e[a];
67
67
  }
68
- function Xn(e, r) {
68
+ function $n(e, r) {
69
69
  var t;
70
70
  for (t = 0; t < 7; ++t)
71
71
  e.table[t] = 0;
@@ -94,7 +94,7 @@ function dr(e, r, t, n) {
94
94
  for (a = 0; a < n; ++a)
95
95
  r[t + a] && (e.trans[Kr[r[t + a]]++] = a);
96
96
  }
97
- function Yn(e) {
97
+ function Zn(e) {
98
98
  e.bitcount-- || (e.tag = e.source[e.sourceIndex++], e.bitcount = 7);
99
99
  var r = e.tag & 1;
100
100
  return e.tag >>>= 1, r;
@@ -116,13 +116,13 @@ function wr(e, r) {
116
116
  while (n >= 0);
117
117
  return e.tag = s, e.bitcount -= a, r.trans[t + n];
118
118
  }
119
- function $n(e, r, t) {
119
+ function Qn(e, r, t) {
120
120
  var n, a, s, o, u, i;
121
121
  for (n = ie(e, 5, 257), a = ie(e, 5, 1), s = ie(e, 4, 4), o = 0; o < 19; ++o)
122
122
  oe[o] = 0;
123
123
  for (o = 0; o < s; ++o) {
124
124
  var l = ie(e, 3, 0);
125
- oe[qn[o]] = l;
125
+ oe[Yn[o]] = l;
126
126
  }
127
127
  for (dr(Qr, oe, 0, 19), u = 0; u < n + a; ) {
128
128
  var f = wr(e, Qr);
@@ -156,47 +156,47 @@ function jr(e, r, t) {
156
156
  e.dest[e.destLen++] = n;
157
157
  else {
158
158
  var a, s, o, u;
159
- for (n -= 257, a = ie(e, Nr[n], Hr[n]), s = wr(e, t), o = e.destLen - ie(e, _t[s], Vt[s]), u = o; u < o + a; ++u)
159
+ for (n -= 257, a = ie(e, Nr[n], Hr[n]), s = wr(e, t), o = e.destLen - ie(e, Vt[s], qt[s]), u = o; u < o + a; ++u)
160
160
  e.dest[e.destLen++] = e.dest[u];
161
161
  }
162
162
  }
163
163
  }
164
- function Zn(e) {
164
+ function Kn(e) {
165
165
  for (var r, t, n; e.bitcount > 8; )
166
166
  e.sourceIndex--, e.bitcount -= 8;
167
167
  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))
168
- return Ht;
168
+ return Wt;
169
169
  for (e.sourceIndex += 4, n = r; n; --n)
170
170
  e.dest[e.destLen++] = e.source[e.sourceIndex++];
171
171
  return e.bitcount = 0, Gr;
172
172
  }
173
- function Qn(e, r) {
174
- var t = new Vn(e, r), n, a, s;
173
+ function jn(e, r) {
174
+ var t = new Xn(e, r), n, a, s;
175
175
  do {
176
- switch (n = Yn(t), a = ie(t, 2, 0), a) {
176
+ switch (n = Zn(t), a = ie(t, 2, 0), a) {
177
177
  case 0:
178
- s = Zn(t);
178
+ s = Kn(t);
179
179
  break;
180
180
  case 1:
181
- s = jr(t, Wt, zt);
181
+ s = jr(t, zt, _t);
182
182
  break;
183
183
  case 2:
184
- $n(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
184
+ Qn(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
185
185
  break;
186
186
  default:
187
- s = Ht;
187
+ s = Wt;
188
188
  }
189
189
  if (s !== Gr)
190
190
  throw new Error("Data error");
191
191
  } while (!n);
192
192
  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;
193
193
  }
194
- Xn(Wt, zt);
195
- qt(Nr, Hr, 4, 3);
196
- qt(_t, Vt, 2, 1);
194
+ $n(zt, _t);
195
+ Xt(Nr, Hr, 4, 3);
196
+ Xt(Vt, qt, 2, 1);
197
197
  Nr[28] = 0;
198
198
  Hr[28] = 258;
199
- var Kn = Qn;
199
+ var Jn = jn;
200
200
  function we(e, r, t, n, a) {
201
201
  return Math.pow(1 - a, 3) * e + 3 * Math.pow(1 - a, 2) * a * r + 3 * (1 - a) * Math.pow(a, 2) * t + Math.pow(a, 3) * n;
202
202
  }
@@ -351,13 +351,13 @@ X.prototype.toDOMElement = function(e) {
351
351
  var r = this.toPathData(e), t = document.createElementNS("http://www.w3.org/2000/svg", "path");
352
352
  return t.setAttribute("d", r), t;
353
353
  };
354
- function Xt(e) {
354
+ function Yt(e) {
355
355
  throw new Error(e);
356
356
  }
357
357
  function Jr(e, r) {
358
- e || Xt(r);
358
+ e || Yt(r);
359
359
  }
360
- var E = { fail: Xt, argument: Jr, assert: Jr }, et = 32768, rt = 2147483648, Oe = {}, b = {}, O = {};
360
+ var E = { fail: Yt, argument: Jr, assert: Jr }, et = 32768, rt = 2147483648, Oe = {}, b = {}, O = {};
361
361
  function ne(e) {
362
362
  return function() {
363
363
  return e;
@@ -535,7 +535,7 @@ Oe.MACSTRING = function(e, r, t, n) {
535
535
  return s;
536
536
  }
537
537
  };
538
- var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, jn = function(e) {
538
+ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, ea = function(e) {
539
539
  if (!Qe) {
540
540
  Qe = {};
541
541
  for (var r in Er)
@@ -557,7 +557,7 @@ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, jn =
557
557
  }
558
558
  };
559
559
  b.MACSTRING = function(e, r) {
560
- var t = jn(r);
560
+ var t = ea(r);
561
561
  if (t !== void 0) {
562
562
  for (var n = [], a = 0; a < e.length; a++) {
563
563
  var s = e.charCodeAt(a);
@@ -575,12 +575,12 @@ O.MACSTRING = function(e, r) {
575
575
  function Or(e) {
576
576
  return e >= -128 && e <= 127;
577
577
  }
578
- function Jn(e, r, t) {
578
+ function ra(e, r, t) {
579
579
  for (var n = 0, a = e.length; r < a && n < 64 && e[r] === 0; )
580
580
  ++r, ++n;
581
581
  return t.push(128 | n - 1), r;
582
582
  }
583
- function ea(e, r, t) {
583
+ function ta(e, r, t) {
584
584
  for (var n = 0, a = e.length, s = r; s < a && n < 64; ) {
585
585
  var o = e[s];
586
586
  if (!Or(o) || o === 0 && s + 1 < a && e[s + 1] === 0)
@@ -592,7 +592,7 @@ function ea(e, r, t) {
592
592
  t.push(e[u] + 256 & 255);
593
593
  return s;
594
594
  }
595
- function ra(e, r, t) {
595
+ function na(e, r, t) {
596
596
  for (var n = 0, a = e.length, s = r; s < a && n < 64; ) {
597
597
  var o = e[s];
598
598
  if (o === 0 || Or(o) && s + 1 < a && Or(e[s + 1]))
@@ -609,7 +609,7 @@ function ra(e, r, t) {
609
609
  b.VARDELTAS = function(e) {
610
610
  for (var r = 0, t = []; r < e.length; ) {
611
611
  var n = e[r];
612
- n === 0 ? r = Jn(e, r, t) : n >= -128 && n <= 127 ? r = ea(e, r, t) : r = ra(e, r, t);
612
+ n === 0 ? r = ra(e, r, t) : n >= -128 && n <= 127 ? r = ta(e, r, t) : r = na(e, r, t);
613
613
  }
614
614
  return t;
615
615
  };
@@ -722,7 +722,7 @@ b.LITERAL = function(e) {
722
722
  O.LITERAL = function(e) {
723
723
  return e.length;
724
724
  };
725
- function Z(e, r, t) {
725
+ function Q(e, r, t) {
726
726
  if (r.length && (r[0].name !== "coverageFormat" || r[0].value === 1))
727
727
  for (var n = 0; n < r.length; n += 1) {
728
728
  var a = r[n];
@@ -734,10 +734,10 @@ function Z(e, r, t) {
734
734
  this[u] !== void 0 && (this[u] = i);
735
735
  }
736
736
  }
737
- Z.prototype.encode = function() {
737
+ Q.prototype.encode = function() {
738
738
  return b.TABLE(this);
739
739
  };
740
- Z.prototype.sizeOf = function() {
740
+ Q.prototype.sizeOf = function() {
741
741
  return O.TABLE(this);
742
742
  };
743
743
  function He(e, r, t) {
@@ -763,11 +763,11 @@ function We(e, r, t) {
763
763
  return a;
764
764
  }
765
765
  function tr(e) {
766
- e.format === 1 ? Z.call(
766
+ e.format === 1 ? Q.call(
767
767
  this,
768
768
  "coverageTable",
769
769
  [{ name: "coverageFormat", type: "USHORT", value: 1 }].concat(He("glyph", e.glyphs))
770
- ) : e.format === 2 ? Z.call(
770
+ ) : e.format === 2 ? Q.call(
771
771
  this,
772
772
  "coverageTable",
773
773
  [{ name: "coverageFormat", type: "USHORT", value: 2 }].concat(We("rangeRecord", e.ranges, function(r) {
@@ -779,18 +779,18 @@ function tr(e) {
779
779
  }))
780
780
  ) : E.assert(!1, "Coverage format must be 1 or 2.");
781
781
  }
782
- tr.prototype = Object.create(Z.prototype);
782
+ tr.prototype = Object.create(Q.prototype);
783
783
  tr.prototype.constructor = tr;
784
784
  function nr(e) {
785
- Z.call(
785
+ Q.call(
786
786
  this,
787
787
  "scriptListTable",
788
788
  We("scriptRecord", e, function(r, t) {
789
789
  var n = r.script, a = n.defaultLangSys;
790
790
  return E.assert(!!a, "Unable to write GSUB: script " + r.tag + " has no default language system."), [
791
791
  { name: "scriptTag" + t, type: "TAG", value: r.tag },
792
- { name: "script" + t, type: "TABLE", value: new Z("scriptTable", [
793
- { name: "defaultLangSys", type: "TABLE", value: new Z("defaultLangSys", [
792
+ { name: "script" + t, type: "TABLE", value: new Q("scriptTable", [
793
+ { name: "defaultLangSys", type: "TABLE", value: new Q("defaultLangSys", [
794
794
  { name: "lookupOrder", type: "USHORT", value: 0 },
795
795
  { name: "reqFeatureIndex", type: "USHORT", value: a.reqFeatureIndex }
796
796
  ].concat(He("featureIndex", a.featureIndexes))) }
@@ -798,7 +798,7 @@ function nr(e) {
798
798
  var u = s.langSys;
799
799
  return [
800
800
  { name: "langSysTag" + o, type: "TAG", value: s.tag },
801
- { name: "langSys" + o, type: "TABLE", value: new Z("langSys", [
801
+ { name: "langSys" + o, type: "TABLE", value: new Q("langSys", [
802
802
  { name: "lookupOrder", type: "USHORT", value: 0 },
803
803
  { name: "reqFeatureIndex", type: "USHORT", value: u.reqFeatureIndex }
804
804
  ].concat(He("featureIndex", u.featureIndexes))) }
@@ -808,39 +808,39 @@ function nr(e) {
808
808
  })
809
809
  );
810
810
  }
811
- nr.prototype = Object.create(Z.prototype);
811
+ nr.prototype = Object.create(Q.prototype);
812
812
  nr.prototype.constructor = nr;
813
813
  function ar(e) {
814
- Z.call(
814
+ Q.call(
815
815
  this,
816
816
  "featureListTable",
817
817
  We("featureRecord", e, function(r, t) {
818
818
  var n = r.feature;
819
819
  return [
820
820
  { name: "featureTag" + t, type: "TAG", value: r.tag },
821
- { name: "feature" + t, type: "TABLE", value: new Z("featureTable", [
821
+ { name: "feature" + t, type: "TABLE", value: new Q("featureTable", [
822
822
  { name: "featureParams", type: "USHORT", value: n.featureParams }
823
823
  ].concat(He("lookupListIndex", n.lookupListIndexes))) }
824
824
  ];
825
825
  })
826
826
  );
827
827
  }
828
- ar.prototype = Object.create(Z.prototype);
828
+ ar.prototype = Object.create(Q.prototype);
829
829
  ar.prototype.constructor = ar;
830
830
  function sr(e, r) {
831
- Z.call(this, "lookupListTable", Lr("lookup", e, function(t) {
831
+ Q.call(this, "lookupListTable", Lr("lookup", e, function(t) {
832
832
  var n = r[t.lookupType];
833
- return E.assert(!!n, "Unable to write GSUB lookup type " + t.lookupType + " tables."), new Z("lookupTable", [
833
+ return E.assert(!!n, "Unable to write GSUB lookup type " + t.lookupType + " tables."), new Q("lookupTable", [
834
834
  { name: "lookupType", type: "USHORT", value: t.lookupType },
835
835
  { name: "lookupFlag", type: "USHORT", value: t.lookupFlag }
836
836
  ].concat(Lr("subtable", t.subtables, n)));
837
837
  }));
838
838
  }
839
- sr.prototype = Object.create(Z.prototype);
839
+ sr.prototype = Object.create(Q.prototype);
840
840
  sr.prototype.constructor = sr;
841
841
  var S = {
842
- Table: Z,
843
- Record: Z,
842
+ Table: Q,
843
+ Record: Q,
844
844
  Coverage: tr,
845
845
  ScriptList: nr,
846
846
  FeatureList: ar,
@@ -855,37 +855,37 @@ function tt(e, r) {
855
855
  function or(e, r) {
856
856
  return e.getUint16(r, !1);
857
857
  }
858
- function ta(e, r) {
858
+ function aa(e, r) {
859
859
  return e.getInt16(r, !1);
860
860
  }
861
861
  function Wr(e, r) {
862
862
  return e.getUint32(r, !1);
863
863
  }
864
- function Yt(e, r) {
864
+ function $t(e, r) {
865
865
  var t = e.getInt16(r, !1), n = e.getUint16(r + 2, !1);
866
866
  return t + n / 65535;
867
867
  }
868
- function na(e, r) {
868
+ function sa(e, r) {
869
869
  for (var t = "", n = r; n < r + 4; n += 1)
870
870
  t += String.fromCharCode(e.getInt8(n));
871
871
  return t;
872
872
  }
873
- function aa(e, r, t) {
873
+ function oa(e, r, t) {
874
874
  for (var n = 0, a = 0; a < t; a += 1)
875
875
  n <<= 8, n += e.getUint8(r + a);
876
876
  return n;
877
877
  }
878
- function sa(e, r, t) {
878
+ function ia(e, r, t) {
879
879
  for (var n = [], a = r; a < t; a += 1)
880
880
  n.push(e.getUint8(a));
881
881
  return n;
882
882
  }
883
- function oa(e) {
883
+ function ua(e) {
884
884
  for (var r = "", t = 0; t < e.length; t += 1)
885
885
  r += String.fromCharCode(e[t]);
886
886
  return r;
887
887
  }
888
- var ia = {
888
+ var la = {
889
889
  byte: 1,
890
890
  uShort: 2,
891
891
  short: 2,
@@ -927,7 +927,7 @@ v.prototype.parseULong = function() {
927
927
  };
928
928
  v.prototype.parseOffset32 = v.prototype.parseULong;
929
929
  v.prototype.parseFixed = function() {
930
- var e = Yt(this.data, this.offset + this.relativeOffset);
930
+ var e = $t(this.data, this.offset + this.relativeOffset);
931
931
  return this.relativeOffset += 4, e;
932
932
  };
933
933
  v.prototype.parseString = function(e) {
@@ -949,7 +949,7 @@ v.prototype.parseVersion = function(e) {
949
949
  return this.relativeOffset += 4, e === void 0 && (e = 4096), r + t / e / 10;
950
950
  };
951
951
  v.prototype.skip = function(e, r) {
952
- r === void 0 && (r = 1), this.relativeOffset += ia[e] * r;
952
+ r === void 0 && (r = 1), this.relativeOffset += la[e] * r;
953
953
  };
954
954
  v.prototype.parseULongList = function(e) {
955
955
  e === void 0 && (e = this.parseULong());
@@ -1187,16 +1187,16 @@ var k = {
1187
1187
  getCard8: tt,
1188
1188
  getUShort: or,
1189
1189
  getCard16: or,
1190
- getShort: ta,
1190
+ getShort: aa,
1191
1191
  getULong: Wr,
1192
- getFixed: Yt,
1193
- getTag: na,
1194
- getOffset: aa,
1195
- getBytes: sa,
1196
- bytesToString: oa,
1192
+ getFixed: $t,
1193
+ getTag: sa,
1194
+ getOffset: oa,
1195
+ getBytes: ia,
1196
+ bytesToString: ua,
1197
1197
  Parser: v
1198
1198
  };
1199
- function ua(e, r) {
1199
+ function fa(e, r) {
1200
1200
  r.parseUShort(), e.length = r.parseULong(), e.language = r.parseULong();
1201
1201
  var t;
1202
1202
  e.groupCount = t = r.parseULong(), e.glyphIndexMap = {};
@@ -1204,7 +1204,7 @@ function ua(e, r) {
1204
1204
  for (var a = r.parseULong(), s = r.parseULong(), o = r.parseULong(), u = a; u <= s; u += 1)
1205
1205
  e.glyphIndexMap[u] = o, o++;
1206
1206
  }
1207
- function la(e, r, t, n, a) {
1207
+ function pa(e, r, t, n, a) {
1208
1208
  e.length = r.parseUShort(), e.language = r.parseUShort();
1209
1209
  var s;
1210
1210
  e.segCount = s = r.parseUShort() >> 1, r.skip("uShort", 3), e.glyphIndexMap = {};
@@ -1212,7 +1212,7 @@ function la(e, r, t, n, a) {
1212
1212
  for (var p = void 0, h = o.parseUShort(), d = u.parseUShort(), g = i.parseShort(), m = l.parseUShort(), x = d; x <= h; x += 1)
1213
1213
  m !== 0 ? (f = l.offset + l.relativeOffset - 2, f += m, f += (x - d) * 2, p = k.getUShort(t, f), p !== 0 && (p = p + g & 65535)) : p = x + g & 65535, e.glyphIndexMap[x] = p;
1214
1214
  }
1215
- function fa(e, r) {
1215
+ function ca(e, r) {
1216
1216
  var t = {};
1217
1217
  t.version = k.getUShort(e, r), E.argument(t.version === 0, "cmap table version should be 0."), t.numTables = k.getUShort(e, r + 2);
1218
1218
  for (var n = -1, a = t.numTables - 1; a >= 0; a -= 1) {
@@ -1226,14 +1226,14 @@ function fa(e, r) {
1226
1226
  throw new Error("No valid cmap sub-tables found.");
1227
1227
  var u = new k.Parser(e, r + n);
1228
1228
  if (t.format = u.parseUShort(), t.format === 12)
1229
- ua(t, u);
1229
+ fa(t, u);
1230
1230
  else if (t.format === 4)
1231
- la(t, u, e, r, n);
1231
+ pa(t, u, e, r, n);
1232
1232
  else
1233
1233
  throw new Error("Only format 4 and 12 cmap tables are supported (found format " + t.format + ").");
1234
1234
  return t;
1235
1235
  }
1236
- function pa(e, r, t) {
1236
+ function ha(e, r, t) {
1237
1237
  e.segments.push({
1238
1238
  end: r,
1239
1239
  start: r,
@@ -1242,7 +1242,7 @@ function pa(e, r, t) {
1242
1242
  glyphIndex: t
1243
1243
  });
1244
1244
  }
1245
- function ca(e) {
1245
+ function va(e) {
1246
1246
  e.segments.push({
1247
1247
  end: 65535,
1248
1248
  start: 65535,
@@ -1250,7 +1250,7 @@ function ca(e) {
1250
1250
  offset: 0
1251
1251
  });
1252
1252
  }
1253
- function ha(e) {
1253
+ function da(e) {
1254
1254
  var r = !0, t;
1255
1255
  for (t = e.length - 1; t > 0; t -= 1) {
1256
1256
  var n = e.get(t);
@@ -1286,12 +1286,12 @@ function ha(e) {
1286
1286
  var s = new S.Table("cmap", a);
1287
1287
  for (s.segments = [], t = 0; t < e.length; t += 1) {
1288
1288
  for (var o = e.get(t), u = 0; u < o.unicodes.length; u += 1)
1289
- pa(s, o.unicodes[u], t);
1289
+ ha(s, o.unicodes[u], t);
1290
1290
  s.segments = s.segments.sort(function(U, y) {
1291
1291
  return U.start - y.start;
1292
1292
  });
1293
1293
  }
1294
- ca(s);
1294
+ va(s);
1295
1295
  var i = s.segments.length, l = 0, f = [], c = [], p = [], h = [], d = [], g = [];
1296
1296
  for (t = 0; t < i; t += 1) {
1297
1297
  var m = s.segments[t];
@@ -1312,7 +1312,7 @@ function ha(e) {
1312
1312
  }
1313
1313
  return s;
1314
1314
  }
1315
- var $t = { parse: fa, make: ha }, er = [
1315
+ var Zt = { parse: ca, make: da }, er = [
1316
1316
  ".notdef",
1317
1317
  "space",
1318
1318
  "exclam",
@@ -1704,7 +1704,7 @@ var $t = { parse: fa, make: ha }, er = [
1704
1704
  "Regular",
1705
1705
  "Roman",
1706
1706
  "Semibold"
1707
- ], va = [
1707
+ ], ga = [
1708
1708
  "",
1709
1709
  "",
1710
1710
  "",
@@ -1957,7 +1957,7 @@ var $t = { parse: fa, make: ha }, er = [
1957
1957
  "oslash",
1958
1958
  "oe",
1959
1959
  "germandbls"
1960
- ], da = [
1960
+ ], ma = [
1961
1961
  "",
1962
1962
  "",
1963
1963
  "",
@@ -2473,10 +2473,10 @@ var $t = { parse: fa, make: ha }, er = [
2473
2473
  "ccaron",
2474
2474
  "dcroat"
2475
2475
  ];
2476
- function Zt(e) {
2476
+ function Qt(e) {
2477
2477
  this.font = e;
2478
2478
  }
2479
- Zt.prototype.charToGlyphIndex = function(e) {
2479
+ Qt.prototype.charToGlyphIndex = function(e) {
2480
2480
  var r = e.codePointAt(0), t = this.font.glyphs;
2481
2481
  if (t) {
2482
2482
  for (var n = 0; n < t.length; n += 1)
@@ -2486,10 +2486,10 @@ Zt.prototype.charToGlyphIndex = function(e) {
2486
2486
  }
2487
2487
  return null;
2488
2488
  };
2489
- function Qt(e) {
2489
+ function Kt(e) {
2490
2490
  this.cmap = e;
2491
2491
  }
2492
- Qt.prototype.charToGlyphIndex = function(e) {
2492
+ Kt.prototype.charToGlyphIndex = function(e) {
2493
2493
  return this.cmap.glyphIndexMap[e.codePointAt(0)] || 0;
2494
2494
  };
2495
2495
  function ir(e, r) {
@@ -2528,7 +2528,7 @@ zr.prototype.nameToGlyphIndex = function(e) {
2528
2528
  zr.prototype.glyphIndexToName = function(e) {
2529
2529
  return this.names[e];
2530
2530
  };
2531
- function ga(e) {
2531
+ function ya(e) {
2532
2532
  for (var r, t = e.tables.cmap.glyphIndexMap, n = Object.keys(t), a = 0; a < n.length; a += 1) {
2533
2533
  var s = n[a], o = t[s];
2534
2534
  r = e.glyphs.get(o), r.addUnicode(parseInt(s));
@@ -2536,7 +2536,7 @@ function ga(e) {
2536
2536
  for (var u = 0; u < e.glyphs.length; u += 1)
2537
2537
  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));
2538
2538
  }
2539
- function ma(e) {
2539
+ function xa(e) {
2540
2540
  e._IndexToUnicodeMap = {};
2541
2541
  for (var r = e.tables.cmap.glyphIndexMap, t = Object.keys(r), n = 0; n < t.length; n += 1) {
2542
2542
  var a = t[n], s = r[a];
@@ -2545,14 +2545,14 @@ function ma(e) {
2545
2545
  } : e._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
2546
2546
  }
2547
2547
  }
2548
- function ya(e, r) {
2549
- r.lowMemory ? ma(e) : ga(e);
2548
+ function ba(e, r) {
2549
+ r.lowMemory ? xa(e) : ya(e);
2550
2550
  }
2551
- function xa(e, r, t, n, a) {
2551
+ function Sa(e, r, t, n, a) {
2552
2552
  e.beginPath(), e.moveTo(r, t), e.lineTo(n, a), e.stroke();
2553
2553
  }
2554
- var Te = { line: xa };
2555
- function ba(e, r) {
2554
+ var Te = { line: Sa };
2555
+ function Ta(e, r) {
2556
2556
  var t = r || new X();
2557
2557
  return {
2558
2558
  configurable: !0,
@@ -2568,7 +2568,7 @@ function K(e) {
2568
2568
  this.bindConstructorValues(e);
2569
2569
  }
2570
2570
  K.prototype.bindConstructorValues = function(e) {
2571
- 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", ba(this, e.path));
2571
+ 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", Ta(this, e.path));
2572
2572
  };
2573
2573
  K.prototype.addUnicode = function(e) {
2574
2574
  this.unicodes.length === 0 && (this.unicode = e), this.unicodes.push(e);
@@ -2687,10 +2687,10 @@ _r.prototype.get = function(e) {
2687
2687
  _r.prototype.push = function(e, r) {
2688
2688
  this.glyphs[e] = r, this.length++;
2689
2689
  };
2690
- function Sa(e, r) {
2690
+ function ka(e, r) {
2691
2691
  return new K({ index: r, font: e });
2692
2692
  }
2693
- function Ta(e, r, t, n, a, s) {
2693
+ function Fa(e, r, t, n, a, s) {
2694
2694
  return function() {
2695
2695
  var o = new K({ index: r, font: e });
2696
2696
  return o.path = function() {
@@ -2700,7 +2700,7 @@ function Ta(e, r, t, n, a, s) {
2700
2700
  }, je(o, "xMin", "_xMin"), je(o, "xMax", "_xMax"), je(o, "yMin", "_yMin"), je(o, "yMax", "_yMax"), o;
2701
2701
  };
2702
2702
  }
2703
- function ka(e, r, t, n) {
2703
+ function Ua(e, r, t, n) {
2704
2704
  return function() {
2705
2705
  var a = new K({ index: r, font: e });
2706
2706
  return a.path = function() {
@@ -2709,15 +2709,15 @@ function ka(e, r, t, n) {
2709
2709
  }, a;
2710
2710
  };
2711
2711
  }
2712
- var le = { GlyphSet: _r, glyphLoader: Sa, ttfGlyphLoader: Ta, cffGlyphLoader: ka };
2713
- function Kt(e, r) {
2712
+ var le = { GlyphSet: _r, glyphLoader: ka, ttfGlyphLoader: Fa, cffGlyphLoader: Ua };
2713
+ function jt(e, r) {
2714
2714
  if (e === r)
2715
2715
  return !0;
2716
2716
  if (Array.isArray(e) && Array.isArray(r)) {
2717
2717
  if (e.length !== r.length)
2718
2718
  return !1;
2719
2719
  for (var t = 0; t < e.length; t += 1)
2720
- if (!Kt(e[t], r[t]))
2720
+ if (!jt(e[t], r[t]))
2721
2721
  return !1;
2722
2722
  return !0;
2723
2723
  } else
@@ -2743,7 +2743,7 @@ function ye(e, r, t) {
2743
2743
  }
2744
2744
  return { objects: a, startOffset: r, endOffset: u };
2745
2745
  }
2746
- function Fa(e, r) {
2746
+ function Ca(e, r) {
2747
2747
  var t = [], n = k.getCard16(e, r), a, s;
2748
2748
  if (n !== 0) {
2749
2749
  var o = k.getByte(e, r + 2);
@@ -2755,7 +2755,7 @@ function Fa(e, r) {
2755
2755
  s = r + 2;
2756
2756
  return { offsets: t, startOffset: r, endOffset: s };
2757
2757
  }
2758
- function Ua(e, r, t, n, a) {
2758
+ function wa(e, r, t, n, a) {
2759
2759
  var s = k.getCard16(t, n), o = 0;
2760
2760
  if (s !== 0) {
2761
2761
  var u = k.getByte(t, n + 2);
@@ -2764,7 +2764,7 @@ function Ua(e, r, t, n, a) {
2764
2764
  var i = k.getBytes(t, o + r[e], o + r[e + 1]);
2765
2765
  return i;
2766
2766
  }
2767
- function Ca(e) {
2767
+ function Ea(e) {
2768
2768
  for (var r = "", t = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
2769
2769
  var a = e.parseByte(), s = a >> 4, o = a & 15;
2770
2770
  if (s === t || (r += n[s], o === t))
@@ -2773,14 +2773,14 @@ function Ca(e) {
2773
2773
  }
2774
2774
  return parseFloat(r);
2775
2775
  }
2776
- function wa(e, r) {
2776
+ function Oa(e, r) {
2777
2777
  var t, n, a, s;
2778
2778
  if (r === 28)
2779
2779
  return t = e.parseByte(), n = e.parseByte(), t << 8 | n;
2780
2780
  if (r === 29)
2781
2781
  return t = e.parseByte(), n = e.parseByte(), a = e.parseByte(), s = e.parseByte(), t << 24 | n << 16 | a << 8 | s;
2782
2782
  if (r === 30)
2783
- return Ca(e);
2783
+ return Ea(e);
2784
2784
  if (r >= 32 && r <= 246)
2785
2785
  return r - 139;
2786
2786
  if (r >= 247 && r <= 250)
@@ -2789,7 +2789,7 @@ function wa(e, r) {
2789
2789
  return t = e.parseByte(), -(r - 251) * 256 - t - 108;
2790
2790
  throw new Error("Invalid b0 " + r);
2791
2791
  }
2792
- function Ea(e) {
2792
+ function La(e) {
2793
2793
  for (var r = {}, t = 0; t < e.length; t += 1) {
2794
2794
  var n = e[t][0], a = e[t][1], s = void 0;
2795
2795
  if (a.length === 1 ? s = a[0] : s = a, r.hasOwnProperty(n) && !isNaN(r[n]))
@@ -2798,19 +2798,19 @@ function Ea(e) {
2798
2798
  }
2799
2799
  return r;
2800
2800
  }
2801
- function jt(e, r, t) {
2801
+ function Jt(e, r, t) {
2802
2802
  r = r !== void 0 ? r : 0;
2803
2803
  var n = new k.Parser(e, r), a = [], s = [];
2804
2804
  for (t = t !== void 0 ? t : e.length; n.relativeOffset < t; ) {
2805
2805
  var o = n.parseByte();
2806
- o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(wa(n, o));
2806
+ o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(Oa(n, o));
2807
2807
  }
2808
- return Ea(a);
2808
+ return La(a);
2809
2809
  }
2810
2810
  function Ge(e, r) {
2811
2811
  return r <= 390 ? r = er[r] : r = e[r - 391], r;
2812
2812
  }
2813
- function Jt(e, r, t) {
2813
+ function en(e, r, t) {
2814
2814
  for (var n = {}, a, s = 0; s < r.length; s += 1) {
2815
2815
  var o = r[s];
2816
2816
  if (Array.isArray(o.type)) {
@@ -2824,11 +2824,11 @@ function Jt(e, r, t) {
2824
2824
  }
2825
2825
  return n;
2826
2826
  }
2827
- function Oa(e, r) {
2827
+ function Ra(e, r) {
2828
2828
  var t = {};
2829
2829
  return t.formatMajor = k.getCard8(e, r), t.formatMinor = k.getCard8(e, r + 1), t.size = k.getCard8(e, r + 2), t.offsetSize = k.getCard8(e, r + 3), t.startOffset = r, t.endOffset = r + 4, t;
2830
2830
  }
2831
- var en = [
2831
+ var rn = [
2832
2832
  { name: "version", op: 0, type: "SID" },
2833
2833
  { name: "notice", op: 1, type: "SID" },
2834
2834
  { name: "copyright", op: 1200, type: "SID" },
@@ -2864,26 +2864,26 @@ var en = [
2864
2864
  { name: "fdArray", op: 1236, type: "offset" },
2865
2865
  { name: "fdSelect", op: 1237, type: "offset" },
2866
2866
  { name: "fontName", op: 1238, type: "SID" }
2867
- ], rn = [
2867
+ ], tn = [
2868
2868
  { name: "subrs", op: 19, type: "offset", value: 0 },
2869
2869
  { name: "defaultWidthX", op: 20, type: "number", value: 0 },
2870
2870
  { name: "nominalWidthX", op: 21, type: "number", value: 0 }
2871
2871
  ];
2872
- function La(e, r) {
2873
- var t = jt(e, 0, e.byteLength);
2874
- return Jt(t, en, r);
2872
+ function Da(e, r) {
2873
+ var t = Jt(e, 0, e.byteLength);
2874
+ return en(t, rn, r);
2875
2875
  }
2876
- function tn(e, r, t, n) {
2877
- var a = jt(e, r, t);
2878
- return Jt(a, rn, n);
2876
+ function nn(e, r, t, n) {
2877
+ var a = Jt(e, r, t);
2878
+ return en(a, tn, n);
2879
2879
  }
2880
2880
  function at(e, r, t, n) {
2881
2881
  for (var a = [], s = 0; s < t.length; s += 1) {
2882
- var o = new DataView(new Uint8Array(t[s]).buffer), u = La(o, n);
2882
+ var o = new DataView(new Uint8Array(t[s]).buffer), u = Da(o, n);
2883
2883
  u._subrs = [], u._subrsBias = 0, u._defaultWidthX = 0, u._nominalWidthX = 0;
2884
2884
  var i = u.private[0], l = u.private[1];
2885
2885
  if (i !== 0 && l !== 0) {
2886
- var f = tn(e, l + r, i, n);
2886
+ var f = nn(e, l + r, i, n);
2887
2887
  if (u._defaultWidthX = f.defaultWidthX, u._nominalWidthX = f.nominalWidthX, f.subrs !== 0) {
2888
2888
  var c = l + f.subrs, p = ye(e, c + r);
2889
2889
  u._subrs = p.objects, u._subrsBias = Rr(u._subrs);
@@ -2894,7 +2894,7 @@ function at(e, r, t, n) {
2894
2894
  }
2895
2895
  return a;
2896
2896
  }
2897
- function Ra(e, r, t, n) {
2897
+ function Aa(e, r, t, n) {
2898
2898
  var a, s, o = new k.Parser(e, r);
2899
2899
  t -= 1;
2900
2900
  var u = [".notdef"], i = o.parseCard8();
@@ -2917,7 +2917,7 @@ function Ra(e, r, t, n) {
2917
2917
  throw new Error("Unknown charset format " + i);
2918
2918
  return u;
2919
2919
  }
2920
- function Da(e, r, t) {
2920
+ function Ba(e, r, t) {
2921
2921
  var n, a = {}, s = new k.Parser(e, r), o = s.parseCard8();
2922
2922
  if (o === 0)
2923
2923
  for (var u = s.parseCard8(), i = 0; i < u; i += 1)
@@ -2940,15 +2940,15 @@ function st(e, r, t) {
2940
2940
  } else
2941
2941
  d = e.tables.cff.topDict._subrs, g = e.tables.cff.topDict._subrsBias, m = e.tables.cff.topDict._defaultWidthX, x = e.tables.cff.topDict._nominalWidthX;
2942
2942
  var L = m;
2943
- function w(F, D) {
2944
- c && u.closePath(), u.moveTo(F, D), c = !0;
2943
+ function w(F, R) {
2944
+ c && u.closePath(), u.moveTo(F, R), c = !0;
2945
2945
  }
2946
2946
  function B() {
2947
2947
  var F;
2948
2948
  F = i.length % 2 !== 0, F && !f && (L = i.shift() + x), l += i.length >> 1, i.length = 0, f = !0;
2949
2949
  }
2950
2950
  function C(F) {
2951
- for (var D, R, A, H, Q, G, z, Y, _, P, V, $, M = 0; M < F.length; ) {
2951
+ for (var R, A, D, H, Z, G, z, Y, _, P, V, $, M = 0; M < F.length; ) {
2952
2952
  var q = F[M];
2953
2953
  switch (M += 1, q) {
2954
2954
  case 1:
@@ -2977,7 +2977,7 @@ function st(e, r, t) {
2977
2977
  n = p + i.shift(), a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o + i.shift(), u.curveTo(n, a, s, o, p, h);
2978
2978
  break;
2979
2979
  case 10:
2980
- Q = i.pop() + g, G = d[Q], G && C(G);
2980
+ Z = i.pop() + g, G = d[Z], G && C(G);
2981
2981
  break;
2982
2982
  case 11:
2983
2983
  return;
@@ -3038,10 +3038,10 @@ function st(e, r, t) {
3038
3038
  n = p + i.shift(), a = h, s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o, u.curveTo(n, a, s, o, p, h);
3039
3039
  break;
3040
3040
  case 28:
3041
- D = F[M], R = F[M + 1], i.push((D << 24 | R << 16) >> 16), M += 2;
3041
+ R = F[M], A = F[M + 1], i.push((R << 24 | A << 16) >> 16), M += 2;
3042
3042
  break;
3043
3043
  case 29:
3044
- Q = i.pop() + e.gsubrsBias, G = e.gsubrs[Q], G && C(G);
3044
+ Z = i.pop() + e.gsubrsBias, G = e.gsubrs[Z], G && C(G);
3045
3045
  break;
3046
3046
  case 30:
3047
3047
  for (; i.length > 0 && (n = p, a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o + (i.length === 1 ? i.shift() : 0), u.curveTo(n, a, s, o, p, h), i.length !== 0); )
@@ -3052,13 +3052,13 @@ function st(e, r, t) {
3052
3052
  n = p, a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o + (i.length === 1 ? i.shift() : 0), u.curveTo(n, a, s, o, p, h);
3053
3053
  break;
3054
3054
  default:
3055
- q < 32 ? console.log("Glyph " + r.index + ": unknown operator " + q) : q < 247 ? i.push(q - 139) : q < 251 ? (D = F[M], M += 1, i.push((q - 247) * 256 + D + 108)) : q < 255 ? (D = F[M], M += 1, i.push(-(q - 251) * 256 - D - 108)) : (D = F[M], R = F[M + 1], A = F[M + 2], H = F[M + 3], M += 4, i.push((D << 24 | R << 16 | A << 8 | H) / 65536));
3055
+ q < 32 ? console.log("Glyph " + r.index + ": unknown operator " + q) : q < 247 ? i.push(q - 139) : q < 251 ? (R = F[M], M += 1, i.push((q - 247) * 256 + R + 108)) : q < 255 ? (R = F[M], M += 1, i.push(-(q - 251) * 256 - R - 108)) : (R = F[M], A = F[M + 1], D = F[M + 2], H = F[M + 3], M += 4, i.push((R << 24 | A << 16 | D << 8 | H) / 65536));
3056
3056
  }
3057
3057
  }
3058
3058
  }
3059
3059
  return C(t), r.advanceWidth = L, u;
3060
3060
  }
3061
- function Aa(e, r, t, n) {
3061
+ function Ma(e, r, t, n) {
3062
3062
  var a = [], s, o = new k.Parser(e, r), u = o.parseCard8();
3063
3063
  if (u === 0)
3064
3064
  for (var i = 0; i < t; i++) {
@@ -3085,9 +3085,9 @@ function Aa(e, r, t, n) {
3085
3085
  throw new Error("CFF Table CID Font FDSelect table has unsupported format " + u);
3086
3086
  return a;
3087
3087
  }
3088
- function Ba(e, r, t, n) {
3088
+ function Ia(e, r, t, n) {
3089
3089
  t.tables.cff = {};
3090
- var a = Oa(e, r), s = ye(e, a.endOffset, k.bytesToString), o = ye(e, s.endOffset), u = ye(e, o.endOffset, k.bytesToString), i = ye(e, u.endOffset);
3090
+ var a = Ra(e, r), s = ye(e, a.endOffset, k.bytesToString), o = ye(e, s.endOffset), u = ye(e, o.endOffset, k.bytesToString), i = ye(e, u.endOffset);
3091
3091
  t.gsubrs = i.objects, t.gsubrsBias = Rr(t.gsubrs);
3092
3092
  var l = at(e, r, o.objects, u.objects);
3093
3093
  if (l.length !== 1)
@@ -3099,20 +3099,20 @@ function Ba(e, r, t, n) {
3099
3099
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
3100
3100
  c += r;
3101
3101
  var h = ye(e, c), d = at(e, r, h.objects, u.objects);
3102
- f._fdArray = d, p += r, f._fdSelect = Aa(e, p, t.numGlyphs, d.length);
3102
+ f._fdArray = d, p += r, f._fdSelect = Ma(e, p, t.numGlyphs, d.length);
3103
3103
  }
3104
- var g = r + f.private[1], m = tn(e, g, f.private[0], u.objects);
3104
+ var g = r + f.private[1], m = nn(e, g, f.private[0], u.objects);
3105
3105
  if (t.defaultWidthX = m.defaultWidthX, t.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
3106
3106
  var x = g + m.subrs, U = ye(e, x);
3107
3107
  t.subrs = U.objects, t.subrsBias = Rr(t.subrs);
3108
3108
  } else
3109
3109
  t.subrs = [], t.subrsBias = 0;
3110
3110
  var y;
3111
- n.lowMemory ? (y = Fa(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3112
- var L = Ra(e, r + f.charset, t.nGlyphs, u.objects);
3113
- if (f.encoding === 0 ? t.cffEncoding = new ir(va, L) : f.encoding === 1 ? t.cffEncoding = new ir(da, L) : t.cffEncoding = Da(e, r + f.encoding, L), t.encoding = t.encoding || t.cffEncoding, t.glyphs = new le.GlyphSet(t), n.lowMemory)
3111
+ n.lowMemory ? (y = Ca(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3112
+ var L = Aa(e, r + f.charset, t.nGlyphs, u.objects);
3113
+ if (f.encoding === 0 ? t.cffEncoding = new ir(ga, L) : f.encoding === 1 ? t.cffEncoding = new ir(ma, L) : t.cffEncoding = Ba(e, r + f.encoding, L), t.encoding = t.encoding || t.cffEncoding, t.glyphs = new le.GlyphSet(t), n.lowMemory)
3114
3114
  t._push = function(C) {
3115
- var F = Ua(C, y.offsets, e, r + f.charStrings);
3115
+ var F = wa(C, y.offsets, e, r + f.charStrings);
3116
3116
  t.glyphs.push(C, le.cffGlyphLoader(t, C, st, F));
3117
3117
  };
3118
3118
  else
@@ -3121,11 +3121,11 @@ function Ba(e, r, t, n) {
3121
3121
  t.glyphs.push(w, le.cffGlyphLoader(t, w, st, B));
3122
3122
  }
3123
3123
  }
3124
- function nn(e, r) {
3124
+ function an(e, r) {
3125
3125
  var t, n = er.indexOf(e);
3126
3126
  return n >= 0 && (t = n), n = r.indexOf(e), n >= 0 ? t = n + er.length : (t = er.length + r.length, r.push(e)), t;
3127
3127
  }
3128
- function Ma() {
3128
+ function Pa() {
3129
3129
  return new S.Record("Header", [
3130
3130
  { name: "major", type: "Card8", value: 1 },
3131
3131
  { name: "minor", type: "Card8", value: 0 },
@@ -3133,7 +3133,7 @@ function Ma() {
3133
3133
  { name: "major", type: "Card8", value: 1 }
3134
3134
  ]);
3135
3135
  }
3136
- function Ia(e) {
3136
+ function Ga(e) {
3137
3137
  var r = new S.Record("Name INDEX", [
3138
3138
  { name: "names", type: "INDEX", value: [] }
3139
3139
  ]);
@@ -3142,10 +3142,10 @@ function Ia(e) {
3142
3142
  r.names.push({ name: "name_" + t, type: "NAME", value: e[t] });
3143
3143
  return r;
3144
3144
  }
3145
- function an(e, r, t) {
3145
+ function sn(e, r, t) {
3146
3146
  for (var n = {}, a = 0; a < e.length; a += 1) {
3147
3147
  var s = e[a], o = r[s.name];
3148
- o !== void 0 && !Kt(o, s.value) && (s.type === "SID" && (o = nn(o, t)), n[s.op] = { name: s.name, type: s.type, value: o });
3148
+ o !== void 0 && !jt(o, s.value) && (s.type === "SID" && (o = an(o, t)), n[s.op] = { name: s.name, type: s.type, value: o });
3149
3149
  }
3150
3150
  return n;
3151
3151
  }
@@ -3153,7 +3153,7 @@ function ot(e, r) {
3153
3153
  var t = new S.Record("Top DICT", [
3154
3154
  { name: "dict", type: "DICT", value: {} }
3155
3155
  ]);
3156
- return t.dict = an(en, e, r), t;
3156
+ return t.dict = sn(rn, e, r), t;
3157
3157
  }
3158
3158
  function it(e) {
3159
3159
  var r = new S.Record("Top DICT INDEX", [
@@ -3161,7 +3161,7 @@ function it(e) {
3161
3161
  ]);
3162
3162
  return r.topDicts = [{ name: "topDict_0", type: "TABLE", value: e }], r;
3163
3163
  }
3164
- function Pa(e) {
3164
+ function Na(e) {
3165
3165
  var r = new S.Record("String INDEX", [
3166
3166
  { name: "strings", type: "INDEX", value: [] }
3167
3167
  ]);
@@ -3170,21 +3170,21 @@ function Pa(e) {
3170
3170
  r.strings.push({ name: "string_" + t, type: "STRING", value: e[t] });
3171
3171
  return r;
3172
3172
  }
3173
- function Ga() {
3173
+ function Ha() {
3174
3174
  return new S.Record("Global Subr INDEX", [
3175
3175
  { name: "subrs", type: "INDEX", value: [] }
3176
3176
  ]);
3177
3177
  }
3178
- function Na(e, r) {
3178
+ function Wa(e, r) {
3179
3179
  for (var t = new S.Record("Charsets", [
3180
3180
  { name: "format", type: "Card8", value: 0 }
3181
3181
  ]), n = 0; n < e.length; n += 1) {
3182
- var a = e[n], s = nn(a, r);
3182
+ var a = e[n], s = an(a, r);
3183
3183
  t.fields.push({ name: "glyph_" + n, type: "SID", value: s });
3184
3184
  }
3185
3185
  return t;
3186
3186
  }
3187
- function Ha(e) {
3187
+ function za(e) {
3188
3188
  var r = [], t = e.path;
3189
3189
  r.push({ name: "width", type: "NUMBER", value: e.advanceWidth });
3190
3190
  for (var n = 0, a = 0, s = 0; s < t.commands.length; s += 1) {
@@ -3212,22 +3212,22 @@ function Ha(e) {
3212
3212
  }
3213
3213
  return r.push({ name: "endchar", type: "OP", value: 14 }), r;
3214
3214
  }
3215
- function Wa(e) {
3215
+ function _a(e) {
3216
3216
  for (var r = new S.Record("CharStrings INDEX", [
3217
3217
  { name: "charStrings", type: "INDEX", value: [] }
3218
3218
  ]), t = 0; t < e.length; t += 1) {
3219
- var n = e.get(t), a = Ha(n);
3219
+ var n = e.get(t), a = za(n);
3220
3220
  r.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
3221
3221
  }
3222
3222
  return r;
3223
3223
  }
3224
- function za(e, r) {
3224
+ function Va(e, r) {
3225
3225
  var t = new S.Record("Private DICT", [
3226
3226
  { name: "dict", type: "DICT", value: {} }
3227
3227
  ]);
3228
- return t.dict = an(rn, e, r), t;
3228
+ return t.dict = sn(tn, e, r), t;
3229
3229
  }
3230
- function _a(e, r) {
3230
+ function qa(e, r) {
3231
3231
  for (var t = new S.Table("CFF ", [
3232
3232
  { name: "header", type: "RECORD" },
3233
3233
  { name: "nameIndex", type: "RECORD" },
@@ -3251,18 +3251,18 @@ function _a(e, r) {
3251
3251
  }, s = {}, o = [], u, i = 1; i < e.length; i += 1)
3252
3252
  u = e.get(i), o.push(u.name);
3253
3253
  var l = [];
3254
- t.header = Ma(), t.nameIndex = Ia([r.postScriptName]);
3254
+ t.header = Pa(), t.nameIndex = Ga([r.postScriptName]);
3255
3255
  var f = ot(a, l);
3256
- t.topDictIndex = it(f), t.globalSubrIndex = Ga(), t.charsets = Na(o, l), t.charStringsIndex = Wa(e), t.privateDict = za(s, l), t.stringIndex = Pa(l);
3256
+ t.topDictIndex = it(f), t.globalSubrIndex = Ha(), t.charsets = Wa(o, l), t.charStringsIndex = _a(e), t.privateDict = Va(s, l), t.stringIndex = Na(l);
3257
3257
  var c = t.header.sizeOf() + t.nameIndex.sizeOf() + t.topDictIndex.sizeOf() + t.stringIndex.sizeOf() + t.globalSubrIndex.sizeOf();
3258
3258
  return a.charset = c, a.encoding = 0, a.charStrings = a.charset + t.charsets.sizeOf(), a.private[1] = a.charStrings + t.charStringsIndex.sizeOf(), f = ot(a, l), t.topDictIndex = it(f), t;
3259
3259
  }
3260
- var sn = { parse: Ba, make: _a };
3261
- function Va(e, r) {
3260
+ var on = { parse: Ia, make: qa };
3261
+ function Xa(e, r) {
3262
3262
  var t = {}, n = new k.Parser(e, r);
3263
3263
  return t.version = n.parseVersion(), t.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, t.checkSumAdjustment = n.parseULong(), t.magicNumber = n.parseULong(), E.argument(t.magicNumber === 1594834165, "Font header has wrong magic number."), t.flags = n.parseUShort(), t.unitsPerEm = n.parseUShort(), t.created = n.parseLongDateTime(), t.modified = n.parseLongDateTime(), t.xMin = n.parseShort(), t.yMin = n.parseShort(), t.xMax = n.parseShort(), t.yMax = n.parseShort(), t.macStyle = n.parseUShort(), t.lowestRecPPEM = n.parseUShort(), t.fontDirectionHint = n.parseShort(), t.indexToLocFormat = n.parseShort(), t.glyphDataFormat = n.parseShort(), t;
3264
3264
  }
3265
- function qa(e) {
3265
+ function Ya(e) {
3266
3266
  var r = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, t = r;
3267
3267
  return e.createdTimestamp && (t = e.createdTimestamp + 2082844800), new S.Table("head", [
3268
3268
  { name: "version", type: "FIXED", value: 65536 },
@@ -3284,12 +3284,12 @@ function qa(e) {
3284
3284
  { name: "glyphDataFormat", type: "SHORT", value: 0 }
3285
3285
  ], e);
3286
3286
  }
3287
- var on = { parse: Va, make: qa };
3288
- function Xa(e, r) {
3287
+ var un = { parse: Xa, make: Ya };
3288
+ function $a(e, r) {
3289
3289
  var t = {}, n = new k.Parser(e, r);
3290
3290
  return t.version = n.parseVersion(), t.ascender = n.parseShort(), t.descender = n.parseShort(), t.lineGap = n.parseShort(), t.advanceWidthMax = n.parseUShort(), t.minLeftSideBearing = n.parseShort(), t.minRightSideBearing = n.parseShort(), t.xMaxExtent = n.parseShort(), t.caretSlopeRise = n.parseShort(), t.caretSlopeRun = n.parseShort(), t.caretOffset = n.parseShort(), n.relativeOffset += 8, t.metricDataFormat = n.parseShort(), t.numberOfHMetrics = n.parseUShort(), t;
3291
3291
  }
3292
- function Ya(e) {
3292
+ function Za(e) {
3293
3293
  return new S.Table("hhea", [
3294
3294
  { name: "version", type: "FIXED", value: 65536 },
3295
3295
  { name: "ascender", type: "FWORD", value: 0 },
@@ -3310,15 +3310,15 @@ function Ya(e) {
3310
3310
  { name: "numberOfHMetrics", type: "USHORT", value: 0 }
3311
3311
  ], e);
3312
3312
  }
3313
- var un = { parse: Xa, make: Ya };
3314
- function $a(e, r, t, n, a) {
3313
+ var ln = { parse: $a, make: Za };
3314
+ function Qa(e, r, t, n, a) {
3315
3315
  for (var s, o, u = new k.Parser(e, r), i = 0; i < n; i += 1) {
3316
3316
  i < t && (s = u.parseUShort(), o = u.parseShort());
3317
3317
  var l = a.get(i);
3318
3318
  l.advanceWidth = s, l.leftSideBearing = o;
3319
3319
  }
3320
3320
  }
3321
- function Za(e, r, t, n, a) {
3321
+ function Ka(e, r, t, n, a) {
3322
3322
  e._hmtxTableData = {};
3323
3323
  for (var s, o, u = new k.Parser(r, t), i = 0; i < a; i += 1)
3324
3324
  i < n && (s = u.parseUShort(), o = u.parseShort()), e._hmtxTableData[i] = {
@@ -3326,18 +3326,18 @@ function Za(e, r, t, n, a) {
3326
3326
  leftSideBearing: o
3327
3327
  };
3328
3328
  }
3329
- function Qa(e, r, t, n, a, s, o) {
3330
- o.lowMemory ? Za(e, r, t, n, a) : $a(r, t, n, a, s);
3329
+ function ja(e, r, t, n, a, s, o) {
3330
+ o.lowMemory ? Ka(e, r, t, n, a) : Qa(r, t, n, a, s);
3331
3331
  }
3332
- function Ka(e) {
3332
+ function Ja(e) {
3333
3333
  for (var r = new S.Table("hmtx", []), t = 0; t < e.length; t += 1) {
3334
3334
  var n = e.get(t), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
3335
3335
  r.fields.push({ name: "advanceWidth_" + t, type: "USHORT", value: a }), r.fields.push({ name: "leftSideBearing_" + t, type: "SHORT", value: s });
3336
3336
  }
3337
3337
  return r;
3338
3338
  }
3339
- var ln = { parse: Qa, make: Ka };
3340
- function ja(e) {
3339
+ var fn = { parse: ja, make: Ja };
3340
+ function es(e) {
3341
3341
  for (var r = new S.Table("ltag", [
3342
3342
  { name: "version", type: "ULONG", value: 1 },
3343
3343
  { name: "flags", type: "ULONG", value: 0 },
@@ -3348,7 +3348,7 @@ function ja(e) {
3348
3348
  }
3349
3349
  return r.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), r;
3350
3350
  }
3351
- function Ja(e, r) {
3351
+ function rs(e, r) {
3352
3352
  var t = new k.Parser(e, r), n = t.parseULong();
3353
3353
  E.argument(n === 1, "Unsupported ltag table version."), t.skip("uLong", 1);
3354
3354
  for (var a = t.parseULong(), s = [], o = 0; o < a; o++) {
@@ -3358,18 +3358,18 @@ function Ja(e, r) {
3358
3358
  }
3359
3359
  return s;
3360
3360
  }
3361
- var fn = { make: ja, parse: Ja };
3362
- function es(e, r) {
3361
+ var pn = { make: es, parse: rs };
3362
+ function ts(e, r) {
3363
3363
  var t = {}, n = new k.Parser(e, r);
3364
3364
  return t.version = n.parseVersion(), t.numGlyphs = n.parseUShort(), t.version === 1 && (t.maxPoints = n.parseUShort(), t.maxContours = n.parseUShort(), t.maxCompositePoints = n.parseUShort(), t.maxCompositeContours = n.parseUShort(), t.maxZones = n.parseUShort(), t.maxTwilightPoints = n.parseUShort(), t.maxStorage = n.parseUShort(), t.maxFunctionDefs = n.parseUShort(), t.maxInstructionDefs = n.parseUShort(), t.maxStackElements = n.parseUShort(), t.maxSizeOfInstructions = n.parseUShort(), t.maxComponentElements = n.parseUShort(), t.maxComponentDepth = n.parseUShort()), t;
3365
3365
  }
3366
- function rs(e) {
3366
+ function ns(e) {
3367
3367
  return new S.Table("maxp", [
3368
3368
  { name: "version", type: "FIXED", value: 20480 },
3369
3369
  { name: "numGlyphs", type: "USHORT", value: e }
3370
3370
  ]);
3371
3371
  }
3372
- var pn = { parse: es, make: rs }, cn = [
3372
+ var cn = { parse: ts, make: ns }, hn = [
3373
3373
  "copyright",
3374
3374
  // 0
3375
3375
  "fontFamily",
@@ -3416,7 +3416,7 @@ var pn = { parse: es, make: rs }, cn = [
3416
3416
  // 21
3417
3417
  "wwsSubfamily"
3418
3418
  // 22
3419
- ], hn = {
3419
+ ], vn = {
3420
3420
  0: "en",
3421
3421
  1: "fr",
3422
3422
  2: "de",
@@ -3536,7 +3536,7 @@ var pn = { parse: es, make: rs }, cn = [
3536
3536
  149: "kl",
3537
3537
  150: "az",
3538
3538
  151: "nn"
3539
- }, ts = {
3539
+ }, as = {
3540
3540
  0: 0,
3541
3541
  // langEnglish → smRoman
3542
3542
  1: 0,
@@ -3775,7 +3775,7 @@ var pn = { parse: es, make: rs }, cn = [
3775
3775
  // langAzerbaijanRoman → smRoman
3776
3776
  151: 0
3777
3777
  // langNynorsk → smRoman
3778
- }, vn = {
3778
+ }, dn = {
3779
3779
  1078: "af",
3780
3780
  1052: "sq",
3781
3781
  1156: "gsw",
@@ -3989,7 +3989,7 @@ var pn = { parse: es, make: rs }, cn = [
3989
3989
  1144: "ii",
3990
3990
  1130: "yo"
3991
3991
  };
3992
- function ns(e, r, t) {
3992
+ function ss(e, r, t) {
3993
3993
  switch (e) {
3994
3994
  case 0:
3995
3995
  if (r === 65535)
@@ -3998,12 +3998,12 @@ function ns(e, r, t) {
3998
3998
  return t[r];
3999
3999
  break;
4000
4000
  case 1:
4001
- return hn[r];
4002
- case 3:
4003
4001
  return vn[r];
4002
+ case 3:
4003
+ return dn[r];
4004
4004
  }
4005
4005
  }
4006
- var Dr = "utf-16", as = {
4006
+ var Dr = "utf-16", os = {
4007
4007
  0: "macintosh",
4008
4008
  // smRoman
4009
4009
  1: "x-mac-japanese",
@@ -4062,7 +4062,7 @@ var Dr = "utf-16", as = {
4062
4062
  // smVietnamese
4063
4063
  31: "x-mac-extarabic"
4064
4064
  // smExtArabic
4065
- }, ss = {
4065
+ }, is = {
4066
4066
  15: "x-mac-icelandic",
4067
4067
  // langIcelandic
4068
4068
  17: "x-mac-turkish",
@@ -4094,21 +4094,21 @@ var Dr = "utf-16", as = {
4094
4094
  146: "x-mac-gaelic"
4095
4095
  // langIrishGaelicScript
4096
4096
  };
4097
- function dn(e, r, t) {
4097
+ function gn(e, r, t) {
4098
4098
  switch (e) {
4099
4099
  case 0:
4100
4100
  return Dr;
4101
4101
  case 1:
4102
- return ss[t] || as[r];
4102
+ return is[t] || os[r];
4103
4103
  case 3:
4104
4104
  if (r === 1 || r === 10)
4105
4105
  return Dr;
4106
4106
  break;
4107
4107
  }
4108
4108
  }
4109
- function os(e, r, t) {
4109
+ function us(e, r, t) {
4110
4110
  for (var n = {}, a = new k.Parser(e, r), s = a.parseUShort(), o = a.parseUShort(), u = a.offset + a.parseUShort(), i = 0; i < o; i++) {
4111
- var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = cn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = ns(l, c, t), x = dn(l, f, c);
4111
+ var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = hn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = ss(l, c, t), x = gn(l, f, c);
4112
4112
  if (x !== void 0 && m !== void 0) {
4113
4113
  var U = void 0;
4114
4114
  if (x === Dr ? U = Oe.UTF16(e, u + g, d) : U = Oe.MACSTRING(e, u + g, d, x), U) {
@@ -4135,7 +4135,7 @@ function ut(e, r, t, n, a, s) {
4135
4135
  { name: "offset", type: "USHORT", value: s }
4136
4136
  ]);
4137
4137
  }
4138
- function is(e, r) {
4138
+ function ls(e, r) {
4139
4139
  var t = e.length, n = r.length - t + 1;
4140
4140
  e:
4141
4141
  for (var a = 0; a < n; a++)
@@ -4148,7 +4148,7 @@ function is(e, r) {
4148
4148
  return -1;
4149
4149
  }
4150
4150
  function lt(e, r) {
4151
- var t = is(e, r);
4151
+ var t = ls(e, r);
4152
4152
  if (t < 0) {
4153
4153
  t = r.length;
4154
4154
  for (var n = 0, a = e.length; n < a; ++n)
@@ -4156,19 +4156,19 @@ function lt(e, r) {
4156
4156
  }
4157
4157
  return t;
4158
4158
  }
4159
- function us(e, r) {
4160
- var t, n = [], a = {}, s = gr(cn);
4159
+ function fs(e, r) {
4160
+ var t, n = [], a = {}, s = gr(hn);
4161
4161
  for (var o in e) {
4162
4162
  var u = s[o];
4163
4163
  if (u === void 0 && (u = o), t = parseInt(u), isNaN(t))
4164
4164
  throw new Error('Name table entry "' + o + '" does not exist, see nameTableNames for complete list.');
4165
4165
  a[t] = e[o], n.push(t);
4166
4166
  }
4167
- for (var i = gr(hn), l = gr(vn), f = [], c = [], p = 0; p < n.length; p++) {
4167
+ for (var i = gr(vn), l = gr(dn), f = [], c = [], p = 0; p < n.length; p++) {
4168
4168
  t = n[p];
4169
4169
  var h = a[t];
4170
4170
  for (var d in h) {
4171
- var g = h[d], m = 1, x = i[d], U = ts[x], y = dn(m, U, x), L = b.MACSTRING(g, y);
4171
+ var g = h[d], m = 1, x = i[d], U = as[x], y = gn(m, U, x), L = b.MACSTRING(g, y);
4172
4172
  L === void 0 && (m = 0, x = r.indexOf(d), x < 0 && (x = r.length, r.push(d)), U = 4, L = b.UTF16(g));
4173
4173
  var w = lt(L, c);
4174
4174
  f.push(ut(
@@ -4193,18 +4193,18 @@ function us(e, r) {
4193
4193
  }
4194
4194
  }
4195
4195
  }
4196
- f.sort(function(A, H) {
4197
- return A.platformID - H.platformID || A.encodingID - H.encodingID || A.languageID - H.languageID || A.nameID - H.nameID;
4196
+ f.sort(function(D, H) {
4197
+ return D.platformID - H.platformID || D.encodingID - H.encodingID || D.languageID - H.languageID || D.nameID - H.nameID;
4198
4198
  });
4199
- for (var D = new S.Table("name", [
4199
+ for (var R = new S.Table("name", [
4200
4200
  { name: "format", type: "USHORT", value: 0 },
4201
4201
  { name: "count", type: "USHORT", value: f.length },
4202
4202
  { name: "stringOffset", type: "USHORT", value: 6 + f.length * 12 }
4203
- ]), R = 0; R < f.length; R++)
4204
- D.fields.push({ name: "record_" + R, type: "RECORD", value: f[R] });
4205
- return D.fields.push({ name: "strings", type: "LITERAL", value: c }), D;
4203
+ ]), A = 0; A < f.length; A++)
4204
+ R.fields.push({ name: "record_" + A, type: "RECORD", value: f[A] });
4205
+ return R.fields.push({ name: "strings", type: "LITERAL", value: c }), R;
4206
4206
  }
4207
- var gn = { parse: os, make: us }, Ar = [
4207
+ var mn = { parse: us, make: fs }, Ar = [
4208
4208
  { begin: 0, end: 127 },
4209
4209
  // Basic Latin
4210
4210
  { begin: 128, end: 255 },
@@ -4452,7 +4452,7 @@ var gn = { parse: os, make: us }, Ar = [
4452
4452
  { begin: 127024, end: 127135 }
4453
4453
  // Domino Tiles
4454
4454
  ];
4455
- function ls(e) {
4455
+ function ps(e) {
4456
4456
  for (var r = 0; r < Ar.length; r += 1) {
4457
4457
  var t = Ar[r];
4458
4458
  if (e >= t.begin && e < t.end)
@@ -4460,14 +4460,14 @@ function ls(e) {
4460
4460
  }
4461
4461
  return -1;
4462
4462
  }
4463
- function fs(e, r) {
4463
+ function cs(e, r) {
4464
4464
  var t = {}, n = new k.Parser(e, r);
4465
4465
  t.version = n.parseUShort(), t.xAvgCharWidth = n.parseShort(), t.usWeightClass = n.parseUShort(), t.usWidthClass = n.parseUShort(), t.fsType = n.parseUShort(), t.ySubscriptXSize = n.parseShort(), t.ySubscriptYSize = n.parseShort(), t.ySubscriptXOffset = n.parseShort(), t.ySubscriptYOffset = n.parseShort(), t.ySuperscriptXSize = n.parseShort(), t.ySuperscriptYSize = n.parseShort(), t.ySuperscriptXOffset = n.parseShort(), t.ySuperscriptYOffset = n.parseShort(), t.yStrikeoutSize = n.parseShort(), t.yStrikeoutPosition = n.parseShort(), t.sFamilyClass = n.parseShort(), t.panose = [];
4466
4466
  for (var a = 0; a < 10; a++)
4467
4467
  t.panose[a] = n.parseByte();
4468
4468
  return t.ulUnicodeRange1 = n.parseULong(), t.ulUnicodeRange2 = n.parseULong(), t.ulUnicodeRange3 = n.parseULong(), t.ulUnicodeRange4 = n.parseULong(), t.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), t.fsSelection = n.parseUShort(), t.usFirstCharIndex = n.parseUShort(), t.usLastCharIndex = n.parseUShort(), t.sTypoAscender = n.parseShort(), t.sTypoDescender = n.parseShort(), t.sTypoLineGap = n.parseShort(), t.usWinAscent = n.parseUShort(), t.usWinDescent = n.parseUShort(), t.version >= 1 && (t.ulCodePageRange1 = n.parseULong(), t.ulCodePageRange2 = n.parseULong()), t.version >= 2 && (t.sxHeight = n.parseShort(), t.sCapHeight = n.parseShort(), t.usDefaultChar = n.parseUShort(), t.usBreakChar = n.parseUShort(), t.usMaxContent = n.parseUShort()), t;
4469
4469
  }
4470
- function ps(e) {
4470
+ function hs(e) {
4471
4471
  return new S.Table("OS/2", [
4472
4472
  { name: "version", type: "USHORT", value: 3 },
4473
4473
  { name: "xAvgCharWidth", type: "SHORT", value: 0 },
@@ -4517,8 +4517,8 @@ function ps(e) {
4517
4517
  { name: "usMaxContext", type: "USHORT", value: 0 }
4518
4518
  ], e);
4519
4519
  }
4520
- var Br = { parse: fs, make: ps, unicodeRanges: Ar, getUnicodeRange: ls };
4521
- function cs(e, r) {
4520
+ var Br = { parse: cs, make: hs, unicodeRanges: Ar, getUnicodeRange: ps };
4521
+ function vs(e, r) {
4522
4522
  var t = {}, n = new k.Parser(e, r);
4523
4523
  switch (t.version = n.parseVersion(), t.italicAngle = n.parseFixed(), t.underlinePosition = n.parseShort(), t.underlineThickness = n.parseShort(), t.isFixedPitch = n.parseULong(), t.minMemType42 = n.parseULong(), t.maxMemType42 = n.parseULong(), t.minMemType1 = n.parseULong(), t.maxMemType1 = n.parseULong(), t.version) {
4524
4524
  case 1:
@@ -4543,7 +4543,7 @@ function cs(e, r) {
4543
4543
  }
4544
4544
  return t;
4545
4545
  }
4546
- function hs() {
4546
+ function ds() {
4547
4547
  return new S.Table("post", [
4548
4548
  { name: "version", type: "FIXED", value: 196608 },
4549
4549
  { name: "italicAngle", type: "FIXED", value: 0 },
@@ -4556,7 +4556,7 @@ function hs() {
4556
4556
  { name: "maxMemType1", type: "ULONG", value: 0 }
4557
4557
  ]);
4558
4558
  }
4559
- var mn = { parse: cs, make: hs }, ee = new Array(9);
4559
+ var yn = { parse: vs, make: ds }, ee = new Array(9);
4560
4560
  ee[1] = function() {
4561
4561
  var r = this.offset + this.relativeOffset, t = this.parseUShort();
4562
4562
  if (t === 1)
@@ -4704,7 +4704,7 @@ ee[8] = function() {
4704
4704
  substitutes: this.parseUShortList()
4705
4705
  };
4706
4706
  };
4707
- function vs(e, r) {
4707
+ function gs(e, r) {
4708
4708
  r = r || 0;
4709
4709
  var t = new v(e, r), n = t.parseVersion(1);
4710
4710
  return E.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
@@ -4794,7 +4794,7 @@ Le[6] = function(r) {
4794
4794
  }
4795
4795
  E.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
4796
4796
  };
4797
- function ds(e) {
4797
+ function ms(e) {
4798
4798
  return new S.Table("GSUB", [
4799
4799
  { name: "version", type: "ULONG", value: 65536 },
4800
4800
  { name: "scripts", type: "TABLE", value: new S.ScriptList(e.scripts) },
@@ -4802,8 +4802,8 @@ function ds(e) {
4802
4802
  { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Le) }
4803
4803
  ]);
4804
4804
  }
4805
- var yn = { parse: vs, make: ds };
4806
- function gs(e, r) {
4805
+ var xn = { parse: gs, make: ms };
4806
+ function ys(e, r) {
4807
4807
  var t = new k.Parser(e, r), n = t.parseULong();
4808
4808
  E.argument(n === 1, "Unsupported META table version."), t.parseULong(), t.parseULong();
4809
4809
  for (var a = t.parseULong(), s = {}, o = 0; o < a; o++) {
@@ -4812,7 +4812,7 @@ function gs(e, r) {
4812
4812
  }
4813
4813
  return s;
4814
4814
  }
4815
- function ms(e) {
4815
+ function xs(e) {
4816
4816
  var r = Object.keys(e).length, t = "", n = 16 + r * 12, a = new S.Table("meta", [
4817
4817
  { name: "version", type: "ULONG", value: 1 },
4818
4818
  { name: "flags", type: "ULONG", value: 0 },
@@ -4825,7 +4825,7 @@ function ms(e) {
4825
4825
  }
4826
4826
  return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), a;
4827
4827
  }
4828
- var xn = { parse: gs, make: ms };
4828
+ var bn = { parse: ys, make: xs };
4829
4829
  function ft(e) {
4830
4830
  return Math.log(e) / Math.log(2) | 0;
4831
4831
  }
@@ -4844,7 +4844,7 @@ function pt(e, r, t, n) {
4844
4844
  { name: "length", type: "ULONG", value: n !== void 0 ? n : 0 }
4845
4845
  ]);
4846
4846
  }
4847
- function bn(e) {
4847
+ function Sn(e) {
4848
4848
  var r = new S.Table("sfnt", [
4849
4849
  { name: "version", type: "TAG", value: "OTTO" },
4850
4850
  { name: "numTables", type: "USHORT", value: 0 },
@@ -4878,12 +4878,12 @@ function ct(e, r, t) {
4878
4878
  }
4879
4879
  return t;
4880
4880
  }
4881
- function ys(e) {
4881
+ function bs(e) {
4882
4882
  for (var r = 0, t = 0; t < e.length; t += 1)
4883
4883
  r += e[t];
4884
4884
  return r / e.length;
4885
4885
  }
4886
- function xs(e) {
4886
+ function Ss(e) {
4887
4887
  for (var r = [], t = [], n = [], a = [], s = [], o = [], u = [], i, l = 0, f = 0, c = 0, p = 0, h = 0, d = 0; d < e.glyphs.length; d += 1) {
4888
4888
  var g = e.glyphs.get(d), m = g.unicode | 0;
4889
4889
  if (isNaN(g.advanceWidth))
@@ -4911,13 +4911,13 @@ function xs(e) {
4911
4911
  xMax: Math.max.apply(null, n),
4912
4912
  yMax: Math.max.apply(null, a),
4913
4913
  advanceWidthMax: Math.max.apply(null, s),
4914
- advanceWidthAvg: ys(s),
4914
+ advanceWidthAvg: bs(s),
4915
4915
  minLeftSideBearing: Math.min.apply(null, o),
4916
4916
  maxLeftSideBearing: Math.max.apply(null, o),
4917
4917
  minRightSideBearing: Math.min.apply(null, u)
4918
4918
  };
4919
4919
  y.ascender = e.ascender, y.descender = e.descender;
4920
- var L = on.make({
4920
+ var L = un.make({
4921
4921
  flags: 3,
4922
4922
  // 00000011 (baseline for font at y=0; left sidebearing point at x=0)
4923
4923
  unitsPerEm: e.unitsPerEm,
@@ -4927,7 +4927,7 @@ function xs(e) {
4927
4927
  yMax: y.yMax,
4928
4928
  lowestRecPPEM: 3,
4929
4929
  createdTimestamp: e.createdTimestamp
4930
- }), w = un.make({
4930
+ }), w = ln.make({
4931
4931
  ascender: y.ascender,
4932
4932
  descender: y.descender,
4933
4933
  advanceWidthMax: y.advanceWidthMax,
@@ -4935,7 +4935,7 @@ function xs(e) {
4935
4935
  minRightSideBearing: y.minRightSideBearing,
4936
4936
  xMaxExtent: y.maxLeftSideBearing + (y.xMax - y.xMin),
4937
4937
  numberOfHMetrics: e.glyphs.length
4938
- }), B = pn.make(e.glyphs.length), C = Br.make(Object.assign({
4938
+ }), B = cn.make(e.glyphs.length), C = Br.make(Object.assign({
4939
4939
  xAvgCharWidth: Math.round(y.advanceWidthAvg),
4940
4940
  usFirstCharIndex: i,
4941
4941
  usLastCharIndex: l,
@@ -4960,23 +4960,23 @@ function xs(e) {
4960
4960
  // Use space as the default character, if available.
4961
4961
  usBreakChar: e.hasChar(" ") ? 32 : 0
4962
4962
  // Use space as the break character, if available.
4963
- }, e.tables.os2)), F = ln.make(e.glyphs), D = $t.make(e.glyphs), R = e.getEnglishName("fontFamily"), A = e.getEnglishName("fontSubfamily"), H = R + " " + A, Q = e.getEnglishName("postScriptName");
4964
- Q || (Q = R.replace(/\s/g, "") + "-" + A);
4963
+ }, e.tables.os2)), F = fn.make(e.glyphs), R = Zt.make(e.glyphs), A = e.getEnglishName("fontFamily"), D = e.getEnglishName("fontSubfamily"), H = A + " " + D, Z = e.getEnglishName("postScriptName");
4964
+ Z || (Z = A.replace(/\s/g, "") + "-" + D);
4965
4965
  var G = {};
4966
4966
  for (var z in e.names)
4967
4967
  G[z] = e.names[z];
4968
- G.uniqueID || (G.uniqueID = { en: e.getEnglishName("manufacturer") + ":" + H }), G.postScriptName || (G.postScriptName = { en: Q }), G.preferredFamily || (G.preferredFamily = e.names.fontFamily), G.preferredSubfamily || (G.preferredSubfamily = e.names.fontSubfamily);
4969
- var Y = [], _ = gn.make(G, Y), P = Y.length > 0 ? fn.make(Y) : void 0, V = mn.make(), $ = sn.make(e.glyphs, {
4968
+ G.uniqueID || (G.uniqueID = { en: e.getEnglishName("manufacturer") + ":" + H }), G.postScriptName || (G.postScriptName = { en: Z }), G.preferredFamily || (G.preferredFamily = e.names.fontFamily), G.preferredSubfamily || (G.preferredSubfamily = e.names.fontSubfamily);
4969
+ var Y = [], _ = mn.make(G, Y), P = Y.length > 0 ? pn.make(Y) : void 0, V = yn.make(), $ = on.make(e.glyphs, {
4970
4970
  version: e.getEnglishName("version"),
4971
4971
  fullName: H,
4972
- familyName: R,
4973
- weightName: A,
4974
- postScriptName: Q,
4972
+ familyName: A,
4973
+ weightName: D,
4974
+ postScriptName: Z,
4975
4975
  unitsPerEm: e.unitsPerEm,
4976
4976
  fontBBox: [0, y.yMin, y.ascender, y.advanceWidthMax]
4977
- }), M = e.metas && Object.keys(e.metas).length > 0 ? xn.make(e.metas) : void 0, q = [L, w, B, C, _, D, V, $, F];
4978
- P && q.push(P), e.tables.gsub && q.push(yn.make(e.tables.gsub)), M && q.push(M);
4979
- for (var De = bn(q), cr = De.encode(), Ae = Vr(cr), Be = De.fields, Me = !1, Ce = 0; Ce < Be.length; Ce += 1)
4977
+ }), M = e.metas && Object.keys(e.metas).length > 0 ? bn.make(e.metas) : void 0, q = [L, w, B, C, _, R, V, $, F];
4978
+ P && q.push(P), e.tables.gsub && q.push(xn.make(e.tables.gsub)), M && q.push(M);
4979
+ for (var De = Sn(q), cr = De.encode(), Ae = Vr(cr), Be = De.fields, Me = !1, Ce = 0; Ce < Be.length; Ce += 1)
4980
4980
  if (Be[Ce].name === "head table") {
4981
4981
  Be[Ce].value.checkSumAdjustment = 2981146554 - Ae, Me = !0;
4982
4982
  break;
@@ -4985,7 +4985,7 @@ function xs(e) {
4985
4985
  throw new Error("Could not find head table with checkSum to adjust.");
4986
4986
  return De;
4987
4987
  }
4988
- var bs = { make: bn, fontToTable: xs, computeCheckSum: Vr };
4988
+ var Ts = { make: Sn, fontToTable: Ss, computeCheckSum: Vr };
4989
4989
  function mr(e, r) {
4990
4990
  for (var t = 0, n = e.length - 1; t <= n; ) {
4991
4991
  var a = t + n >>> 1, s = e[a].tag;
@@ -5268,7 +5268,7 @@ Ve.prototype.getKerningTables = function(e, r) {
5268
5268
  function j(e) {
5269
5269
  _e.call(this, e, "gsub");
5270
5270
  }
5271
- function Ss(e, r) {
5271
+ function ks(e, r) {
5272
5272
  var t = e.length;
5273
5273
  if (t !== r.length)
5274
5274
  return !1;
@@ -5398,7 +5398,7 @@ j.prototype.addLigature = function(e, r, t, n) {
5398
5398
  }, l = this.binSearch(s.coverage.glyphs, o);
5399
5399
  if (l >= 0) {
5400
5400
  for (var f = s.ligatureSets[l], c = 0; c < f.length; c++)
5401
- if (Ss(f[c].components, u))
5401
+ if (ks(f[c].components, u))
5402
5402
  return;
5403
5403
  f.push(i);
5404
5404
  } else
@@ -5436,15 +5436,15 @@ j.prototype.add = function(e, r, t, n) {
5436
5436
  return r.by instanceof Array ? this.addMultiple(e, r, t, n) : this.addLigature(e, r, t, n);
5437
5437
  }
5438
5438
  };
5439
- function Ts() {
5439
+ function Fs() {
5440
5440
  return typeof window < "u";
5441
5441
  }
5442
- function Sn(e) {
5442
+ function Tn(e) {
5443
5443
  for (var r = new ArrayBuffer(e.length), t = new Uint8Array(r), n = 0; n < e.length; ++n)
5444
5444
  t[n] = e[n];
5445
5445
  return r;
5446
5446
  }
5447
- function ks(e) {
5447
+ function Us(e) {
5448
5448
  for (var r = new Buffer(e.byteLength), t = new Uint8Array(e), n = 0; n < r.length; ++n)
5449
5449
  r[n] = t[n];
5450
5450
  return r;
@@ -5457,7 +5457,7 @@ function dt(e, r, t, n, a) {
5457
5457
  var s;
5458
5458
  return (r & n) > 0 ? (s = e.parseByte(), (r & a) === 0 && (s = -s), s = t + s) : (r & a) > 0 ? s = t : s = t + e.parseShort(), s;
5459
5459
  }
5460
- function Tn(e, r, t) {
5460
+ function kn(e, r, t) {
5461
5461
  var n = new k.Parser(r, t);
5462
5462
  e.numberOfContours = n.parseShort(), e._xMin = n.parseShort(), e._yMin = n.parseShort(), e._xMax = n.parseShort(), e._yMax = n.parseShort();
5463
5463
  var a, s;
@@ -5522,18 +5522,18 @@ function yr(e, r) {
5522
5522
  }
5523
5523
  return t;
5524
5524
  }
5525
- function Fs(e) {
5525
+ function Cs(e) {
5526
5526
  for (var r = [], t = [], n = 0; n < e.length; n += 1) {
5527
5527
  var a = e[n];
5528
5528
  t.push(a), a.lastPointOfContour && (r.push(t), t = []);
5529
5529
  }
5530
5530
  return E.argument(t.length === 0, "There are still points left in the current contour."), r;
5531
5531
  }
5532
- function kn(e) {
5532
+ function Fn(e) {
5533
5533
  var r = new X();
5534
5534
  if (!e)
5535
5535
  return r;
5536
- for (var t = Fs(e), n = 0; n < t.length; ++n) {
5536
+ for (var t = Cs(e), n = 0; n < t.length; ++n) {
5537
5537
  var a = t[n], s = null, o = a[a.length - 1], u = a[0];
5538
5538
  if (o.onCurve)
5539
5539
  r.moveTo(o.x, o.y);
@@ -5554,7 +5554,7 @@ function kn(e) {
5554
5554
  }
5555
5555
  return r;
5556
5556
  }
5557
- function Fn(e, r) {
5557
+ function Un(e, r) {
5558
5558
  if (r.isComposite)
5559
5559
  for (var t = 0; t < r.components.length; t += 1) {
5560
5560
  var n = r.components[t], a = e.get(n.glyphIndex);
@@ -5578,50 +5578,50 @@ function Fn(e, r) {
5578
5578
  r.points = r.points.concat(s);
5579
5579
  }
5580
5580
  }
5581
- return kn(r.points);
5581
+ return Fn(r.points);
5582
5582
  }
5583
- function Us(e, r, t, n) {
5583
+ function ws(e, r, t, n) {
5584
5584
  for (var a = new le.GlyphSet(n), s = 0; s < t.length - 1; s += 1) {
5585
5585
  var o = t[s], u = t[s + 1];
5586
- o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5586
+ o !== u ? a.push(s, le.ttfGlyphLoader(n, s, kn, e, r + o, Un)) : a.push(s, le.glyphLoader(n, s));
5587
5587
  }
5588
5588
  return a;
5589
5589
  }
5590
- function Cs(e, r, t, n) {
5590
+ function Es(e, r, t, n) {
5591
5591
  var a = new le.GlyphSet(n);
5592
5592
  return n._push = function(s) {
5593
5593
  var o = t[s], u = t[s + 1];
5594
- o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5594
+ o !== u ? a.push(s, le.ttfGlyphLoader(n, s, kn, e, r + o, Un)) : a.push(s, le.glyphLoader(n, s));
5595
5595
  }, a;
5596
5596
  }
5597
- function ws(e, r, t, n, a) {
5598
- return a.lowMemory ? Cs(e, r, t, n) : Us(e, r, t, n);
5597
+ function Os(e, r, t, n, a) {
5598
+ return a.lowMemory ? Es(e, r, t, n) : ws(e, r, t, n);
5599
5599
  }
5600
- var Un = { getPath: kn, parse: ws }, Cn, Ue, wn, Mr;
5601
- function En(e) {
5600
+ var Cn = { getPath: Fn, parse: Os }, wn, Ue, En, Mr;
5601
+ function On(e) {
5602
5602
  this.font = e, this.getCommands = function(r) {
5603
- return Un.getPath(r).commands;
5603
+ return Cn.getPath(r).commands;
5604
5604
  }, this._fpgmState = this._prepState = void 0, this._errorState = 0;
5605
5605
  }
5606
- function Es(e) {
5606
+ function Ls(e) {
5607
5607
  return e;
5608
5608
  }
5609
- function On(e) {
5609
+ function Ln(e) {
5610
5610
  return Math.sign(e) * Math.round(Math.abs(e));
5611
5611
  }
5612
- function Os(e) {
5612
+ function Rs(e) {
5613
5613
  return Math.sign(e) * Math.round(Math.abs(e * 2)) / 2;
5614
5614
  }
5615
- function Ls(e) {
5615
+ function Ds(e) {
5616
5616
  return Math.sign(e) * (Math.round(Math.abs(e) + 0.5) - 0.5);
5617
5617
  }
5618
- function Rs(e) {
5618
+ function As(e) {
5619
5619
  return Math.sign(e) * Math.ceil(Math.abs(e));
5620
5620
  }
5621
- function Ds(e) {
5621
+ function Bs(e) {
5622
5622
  return Math.sign(e) * Math.floor(Math.abs(e));
5623
5623
  }
5624
- var Ln = function(e) {
5624
+ var Rn = function(e) {
5625
5625
  var r = this.srPeriod, t = this.srPhase, n = this.srThreshold, a = 1;
5626
5626
  return e < 0 && (e = -e, a = -1), e += n - t, e = Math.trunc(e / r) * r, e += t, e < 0 ? t * a : e * a;
5627
5627
  }, ue = {
@@ -5794,7 +5794,7 @@ ce.prototype.prevTouched = function(e) {
5794
5794
  r = r.prevPointOnContour;
5795
5795
  return r;
5796
5796
  };
5797
- var ze = Object.freeze(new ce(0, 0)), As = {
5797
+ var ze = Object.freeze(new ce(0, 0)), Ms = {
5798
5798
  cvCutIn: 17 / 16,
5799
5799
  // control value cut in
5800
5800
  deltaBase: 9,
@@ -5811,10 +5811,10 @@ function xe(e, r) {
5811
5811
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
5812
5812
  /* fall through */
5813
5813
  case "prep":
5814
- this.fv = this.pv = this.dpv = ue, this.round = On;
5814
+ this.fv = this.pv = this.dpv = ue, this.round = Ln;
5815
5815
  }
5816
5816
  }
5817
- En.prototype.exec = function(e, r) {
5817
+ On.prototype.exec = function(e, r) {
5818
5818
  if (typeof r != "number")
5819
5819
  throw new Error("Point size is not a number!");
5820
5820
  if (!(this._errorState > 2)) {
@@ -5822,7 +5822,7 @@ En.prototype.exec = function(e, r) {
5822
5822
  if (!n || n.ppem !== r) {
5823
5823
  var a = this._fpgmState;
5824
5824
  if (!a) {
5825
- xe.prototype = As, a = this._fpgmState = new xe("fpgm", t.tables.fpgm), a.funcs = [], a.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
5825
+ xe.prototype = Ms, a = this._fpgmState = new xe("fpgm", t.tables.fpgm), a.funcs = [], a.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
5826
5826
  try {
5827
5827
  Ue(a);
5828
5828
  } catch (l) {
@@ -5846,14 +5846,14 @@ En.prototype.exec = function(e, r) {
5846
5846
  }
5847
5847
  if (!(this._errorState > 1))
5848
5848
  try {
5849
- return wn(e, n);
5849
+ return En(e, n);
5850
5850
  } catch (l) {
5851
5851
  this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
5852
5852
  return;
5853
5853
  }
5854
5854
  }
5855
5855
  };
5856
- wn = function(e, r) {
5856
+ En = function(e, r) {
5857
5857
  var t = r.ppem / r.font.unitsPerEm, n = t, a = e.components, s, o, u;
5858
5858
  if (xe.prototype = r, !a)
5859
5859
  u = new xe("glyf", e.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), u.step = -1), Mr(e, u, t, n), o = u.gZone;
@@ -5910,7 +5910,7 @@ Ue = function(e) {
5910
5910
  if (r) {
5911
5911
  var t = r.length, n;
5912
5912
  for (e.ip = 0; e.ip < t; e.ip++) {
5913
- if (exports.DEBUG && e.step++, n = Cn[r[e.ip]], !n)
5913
+ if (exports.DEBUG && e.step++, n = wn[r[e.ip]], !n)
5914
5914
  throw new Error(
5915
5915
  "unknown instruction: 0x" + Number(r[e.ip]).toString(16)
5916
5916
  );
@@ -5922,7 +5922,7 @@ function lr(e) {
5922
5922
  for (var r = e.tZone = new Array(e.gZone.length), t = 0; t < r.length; t++)
5923
5923
  r[t] = new ce(0, 0);
5924
5924
  }
5925
- function Rn(e, r) {
5925
+ function Dn(e, r) {
5926
5926
  var t = e.prog, n = e.ip, a = 1, s;
5927
5927
  do
5928
5928
  if (s = t[++n], s === 88)
@@ -5963,41 +5963,41 @@ function bt(e, r) {
5963
5963
  var u, i;
5964
5964
  e ? (u = s.y - o.y, i = o.x - s.x) : (u = o.x - s.x, i = o.y - s.y), r.fv = Xe(u, i);
5965
5965
  }
5966
- function Bs(e) {
5966
+ function Is(e) {
5967
5967
  var r = e.stack, t = r.pop(), n = r.pop();
5968
5968
  exports.DEBUG && console.log(e.step, "SPVFS[]", t, n), e.pv = e.dpv = Xe(n, t);
5969
5969
  }
5970
- function Ms(e) {
5970
+ function Ps(e) {
5971
5971
  var r = e.stack, t = r.pop(), n = r.pop();
5972
5972
  exports.DEBUG && console.log(e.step, "SPVFS[]", t, n), e.fv = Xe(n, t);
5973
5973
  }
5974
- function Is(e) {
5974
+ function Gs(e) {
5975
5975
  var r = e.stack, t = e.pv;
5976
5976
  exports.DEBUG && console.log(e.step, "GPV[]"), r.push(t.x * 16384), r.push(t.y * 16384);
5977
5977
  }
5978
- function Ps(e) {
5978
+ function Ns(e) {
5979
5979
  var r = e.stack, t = e.fv;
5980
5980
  exports.DEBUG && console.log(e.step, "GFV[]"), r.push(t.x * 16384), r.push(t.y * 16384);
5981
5981
  }
5982
- function Gs(e) {
5982
+ function Hs(e) {
5983
5983
  e.fv = e.pv, exports.DEBUG && console.log(e.step, "SFVTPV[]");
5984
5984
  }
5985
- function Ns(e) {
5985
+ function Ws(e) {
5986
5986
  var r = e.stack, t = r.pop(), n = r.pop(), a = r.pop(), s = r.pop(), o = r.pop(), u = e.z0, i = e.z1, l = u[t], f = u[n], c = i[a], p = i[s], h = e.z2[o];
5987
5987
  exports.DEBUG && console.log("ISECT[], ", t, n, a, s, o);
5988
5988
  var d = l.x, g = l.y, m = f.x, x = f.y, U = c.x, y = c.y, L = p.x, w = p.y, B = (d - m) * (y - w) - (g - x) * (U - L), C = d * x - g * m, F = U * w - y * L;
5989
5989
  h.x = (C * (U - L) - F * (d - m)) / B, h.y = (C * (y - w) - F * (g - x)) / B;
5990
5990
  }
5991
- function Hs(e) {
5991
+ function zs(e) {
5992
5992
  e.rp0 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
5993
5993
  }
5994
- function Ws(e) {
5994
+ function _s(e) {
5995
5995
  e.rp1 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
5996
5996
  }
5997
- function zs(e) {
5997
+ function Vs(e) {
5998
5998
  e.rp2 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
5999
5999
  }
6000
- function _s(e) {
6000
+ function qs(e) {
6001
6001
  var r = e.stack.pop();
6002
6002
  switch (exports.DEBUG && console.log(e.step, "SZP0[]", r), e.zp0 = r, r) {
6003
6003
  case 0:
@@ -6010,7 +6010,7 @@ function _s(e) {
6010
6010
  throw new Error("Invalid zone pointer");
6011
6011
  }
6012
6012
  }
6013
- function Vs(e) {
6013
+ function Xs(e) {
6014
6014
  var r = e.stack.pop();
6015
6015
  switch (exports.DEBUG && console.log(e.step, "SZP1[]", r), e.zp1 = r, r) {
6016
6016
  case 0:
@@ -6023,7 +6023,7 @@ function Vs(e) {
6023
6023
  throw new Error("Invalid zone pointer");
6024
6024
  }
6025
6025
  }
6026
- function qs(e) {
6026
+ function Ys(e) {
6027
6027
  var r = e.stack.pop();
6028
6028
  switch (exports.DEBUG && console.log(e.step, "SZP2[]", r), e.zp2 = r, r) {
6029
6029
  case 0:
@@ -6036,7 +6036,7 @@ function qs(e) {
6036
6036
  throw new Error("Invalid zone pointer");
6037
6037
  }
6038
6038
  }
6039
- function Xs(e) {
6039
+ function $s(e) {
6040
6040
  var r = e.stack.pop();
6041
6041
  switch (exports.DEBUG && console.log(e.step, "SZPS[]", r), e.zp0 = e.zp1 = e.zp2 = r, r) {
6042
6042
  case 0:
@@ -6049,49 +6049,49 @@ function Xs(e) {
6049
6049
  throw new Error("Invalid zone pointer");
6050
6050
  }
6051
6051
  }
6052
- function Ys(e) {
6052
+ function Zs(e) {
6053
6053
  e.loop = e.stack.pop(), exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
6054
6054
  }
6055
- function $s(e) {
6056
- exports.DEBUG && console.log(e.step, "RTG[]"), e.round = On;
6055
+ function Qs(e) {
6056
+ exports.DEBUG && console.log(e.step, "RTG[]"), e.round = Ln;
6057
6057
  }
6058
- function Zs(e) {
6059
- exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Ls;
6058
+ function Ks(e) {
6059
+ exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Ds;
6060
6060
  }
6061
- function Qs(e) {
6061
+ function js(e) {
6062
6062
  var r = e.stack.pop();
6063
6063
  exports.DEBUG && console.log(e.step, "SMD[]", r), e.minDis = r / 64;
6064
6064
  }
6065
- function Ks(e) {
6066
- exports.DEBUG && console.log(e.step, "ELSE[]"), Rn(e, !1);
6065
+ function Js(e) {
6066
+ exports.DEBUG && console.log(e.step, "ELSE[]"), Dn(e, !1);
6067
6067
  }
6068
- function js(e) {
6068
+ function eo(e) {
6069
6069
  var r = e.stack.pop();
6070
6070
  exports.DEBUG && console.log(e.step, "JMPR[]", r), e.ip += r - 1;
6071
6071
  }
6072
- function Js(e) {
6072
+ function ro(e) {
6073
6073
  var r = e.stack.pop();
6074
6074
  exports.DEBUG && console.log(e.step, "SCVTCI[]", r), e.cvCutIn = r / 64;
6075
6075
  }
6076
- function eo(e) {
6076
+ function to(e) {
6077
6077
  var r = e.stack;
6078
6078
  exports.DEBUG && console.log(e.step, "DUP[]"), r.push(r[r.length - 1]);
6079
6079
  }
6080
6080
  function xr(e) {
6081
6081
  exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop();
6082
6082
  }
6083
- function ro(e) {
6083
+ function no(e) {
6084
6084
  exports.DEBUG && console.log(e.step, "CLEAR[]"), e.stack.length = 0;
6085
6085
  }
6086
- function to(e) {
6086
+ function ao(e) {
6087
6087
  var r = e.stack, t = r.pop(), n = r.pop();
6088
6088
  exports.DEBUG && console.log(e.step, "SWAP[]"), r.push(t), r.push(n);
6089
6089
  }
6090
- function no(e) {
6090
+ function so(e) {
6091
6091
  var r = e.stack;
6092
6092
  exports.DEBUG && console.log(e.step, "DEPTH[]"), r.push(r.length);
6093
6093
  }
6094
- function ao(e) {
6094
+ function oo(e) {
6095
6095
  var r = e.stack, t = r.pop(), n = r.pop();
6096
6096
  exports.DEBUG && console.log(e.step, "LOOPCALL[]", t, n);
6097
6097
  var a = e.ip, s = e.prog;
@@ -6104,21 +6104,21 @@ function ao(e) {
6104
6104
  );
6105
6105
  e.ip = a, e.prog = s;
6106
6106
  }
6107
- function so(e) {
6107
+ function io(e) {
6108
6108
  var r = e.stack.pop();
6109
6109
  exports.DEBUG && console.log(e.step, "CALL[]", r);
6110
6110
  var t = e.ip, n = e.prog;
6111
6111
  e.prog = e.funcs[r], Ue(e), e.ip = t, e.prog = n, exports.DEBUG && console.log(++e.step, "returning from", r);
6112
6112
  }
6113
- function oo(e) {
6113
+ function uo(e) {
6114
6114
  var r = e.stack, t = r.pop();
6115
6115
  exports.DEBUG && console.log(e.step, "CINDEX[]", t), r.push(r[r.length - t]);
6116
6116
  }
6117
- function io(e) {
6117
+ function lo(e) {
6118
6118
  var r = e.stack, t = r.pop();
6119
6119
  exports.DEBUG && console.log(e.step, "MINDEX[]", t), r.push(r.splice(r.length - t, 1)[0]);
6120
6120
  }
6121
- function uo(e) {
6121
+ function fo(e) {
6122
6122
  if (e.env !== "fpgm")
6123
6123
  throw new Error("FDEF not allowed here");
6124
6124
  var r = e.stack, t = e.prog, n = e.ip, a = r.pop(), s = n;
@@ -6174,7 +6174,7 @@ function Ut(e, r) {
6174
6174
  for (var l, f = o.distance(a, a, !1, !0), c = i.length - 2, p = 0; p < c; p++)
6175
6175
  l = i[p], s.setRelative(l, l, f, o);
6176
6176
  }
6177
- function lo(e) {
6177
+ function po(e) {
6178
6178
  for (var r = e.stack, t = e.loop, n = e.fv, a = r.pop() / 64, s = e.z2; t--; ) {
6179
6179
  var o = r.pop(), u = s[o];
6180
6180
  exports.DEBUG && console.log(
@@ -6186,7 +6186,7 @@ function lo(e) {
6186
6186
  }
6187
6187
  e.loop = 1;
6188
6188
  }
6189
- function fo(e) {
6189
+ function co(e) {
6190
6190
  for (var r = e.stack, t = e.rp1, n = e.rp2, a = e.loop, s = e.z0[t], o = e.z1[n], u = e.fv, i = e.dpv, l = e.z2; a--; ) {
6191
6191
  var f = r.pop(), c = l[f];
6192
6192
  exports.DEBUG && console.log(
@@ -6204,7 +6204,7 @@ function Ct(e, r) {
6204
6204
  var t = r.stack, n = t.pop() / 64, a = t.pop(), s = r.z1[a], o = r.z0[r.rp0], u = r.fv, i = r.pv;
6205
6205
  u.setRelative(s, o, n, i), u.touch(s), exports.DEBUG && console.log(r.step, "MSIRP[" + e + "]", n, a), r.rp1 = r.rp0, r.rp2 = a, e && (r.rp0 = a);
6206
6206
  }
6207
- function po(e) {
6207
+ function ho(e) {
6208
6208
  for (var r = e.stack, t = e.rp0, n = e.z0[t], a = e.loop, s = e.fv, o = e.pv, u = e.z1; a--; ) {
6209
6209
  var i = r.pop(), l = u[i];
6210
6210
  exports.DEBUG && console.log(
@@ -6215,8 +6215,8 @@ function po(e) {
6215
6215
  }
6216
6216
  e.loop = 1;
6217
6217
  }
6218
- function co(e) {
6219
- exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Os;
6218
+ function vo(e) {
6219
+ exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Rs;
6220
6220
  }
6221
6221
  function wt(e, r) {
6222
6222
  var t = r.stack, n = t.pop(), a = t.pop(), s = r.z0[a], o = r.fv, u = r.pv, i = r.cvt[n];
@@ -6232,14 +6232,14 @@ function wt(e, r) {
6232
6232
  var l = u.distance(s, ze);
6233
6233
  e && (Math.abs(l - i) < r.cvCutIn && (l = i), l = r.round(l)), o.setRelative(s, ze, l, u), r.zp0 === 0 && (s.xo = s.x, s.yo = s.y), o.touch(s), r.rp0 = r.rp1 = a;
6234
6234
  }
6235
- function ho(e) {
6235
+ function go(e) {
6236
6236
  var r = e.prog, t = e.ip, n = e.stack, a = r[++t];
6237
6237
  exports.DEBUG && console.log(e.step, "NPUSHB[]", a);
6238
6238
  for (var s = 0; s < a; s++)
6239
6239
  n.push(r[++t]);
6240
6240
  e.ip = t;
6241
6241
  }
6242
- function vo(e) {
6242
+ function mo(e) {
6243
6243
  var r = e.ip, t = e.prog, n = e.stack, a = t[++r];
6244
6244
  exports.DEBUG && console.log(e.step, "NPUSHW[]", a);
6245
6245
  for (var s = 0; s < a; s++) {
@@ -6248,23 +6248,23 @@ function vo(e) {
6248
6248
  }
6249
6249
  e.ip = r;
6250
6250
  }
6251
- function go(e) {
6251
+ function yo(e) {
6252
6252
  var r = e.stack, t = e.store;
6253
6253
  t || (t = e.store = []);
6254
6254
  var n = r.pop(), a = r.pop();
6255
6255
  exports.DEBUG && console.log(e.step, "WS", n, a), t[a] = n;
6256
6256
  }
6257
- function mo(e) {
6257
+ function xo(e) {
6258
6258
  var r = e.stack, t = e.store, n = r.pop();
6259
6259
  exports.DEBUG && console.log(e.step, "RS", n);
6260
6260
  var a = t && t[n] || 0;
6261
6261
  r.push(a);
6262
6262
  }
6263
- function yo(e) {
6263
+ function bo(e) {
6264
6264
  var r = e.stack, t = r.pop(), n = r.pop();
6265
6265
  exports.DEBUG && console.log(e.step, "WCVTP", t, n), e.cvt[n] = t / 64;
6266
6266
  }
6267
- function xo(e) {
6267
+ function So(e) {
6268
6268
  var r = e.stack, t = r.pop();
6269
6269
  exports.DEBUG && console.log(e.step, "RCVT", t), r.push(e.cvt[t] * 64);
6270
6270
  }
@@ -6276,60 +6276,60 @@ function Ot(e, r) {
6276
6276
  var t = r.stack, n = t.pop(), a = t.pop(), s = r.z1[n], o = r.z0[a], u = r.dpv.distance(o, s, e, e);
6277
6277
  exports.DEBUG && console.log(r.step, "MD[" + e + "]", n, a, "->", u), r.stack.push(Math.round(u * 64));
6278
6278
  }
6279
- function bo(e) {
6279
+ function To(e) {
6280
6280
  exports.DEBUG && console.log(e.step, "MPPEM[]"), e.stack.push(e.ppem);
6281
6281
  }
6282
- function So(e) {
6282
+ function ko(e) {
6283
6283
  exports.DEBUG && console.log(e.step, "FLIPON[]"), e.autoFlip = !0;
6284
6284
  }
6285
- function To(e) {
6285
+ function Fo(e) {
6286
6286
  var r = e.stack, t = r.pop(), n = r.pop();
6287
6287
  exports.DEBUG && console.log(e.step, "LT[]", t, n), r.push(n < t ? 1 : 0);
6288
6288
  }
6289
- function ko(e) {
6289
+ function Uo(e) {
6290
6290
  var r = e.stack, t = r.pop(), n = r.pop();
6291
6291
  exports.DEBUG && console.log(e.step, "LTEQ[]", t, n), r.push(n <= t ? 1 : 0);
6292
6292
  }
6293
- function Fo(e) {
6293
+ function Co(e) {
6294
6294
  var r = e.stack, t = r.pop(), n = r.pop();
6295
6295
  exports.DEBUG && console.log(e.step, "GT[]", t, n), r.push(n > t ? 1 : 0);
6296
6296
  }
6297
- function Uo(e) {
6297
+ function wo(e) {
6298
6298
  var r = e.stack, t = r.pop(), n = r.pop();
6299
6299
  exports.DEBUG && console.log(e.step, "GTEQ[]", t, n), r.push(n >= t ? 1 : 0);
6300
6300
  }
6301
- function Co(e) {
6301
+ function Eo(e) {
6302
6302
  var r = e.stack, t = r.pop(), n = r.pop();
6303
6303
  exports.DEBUG && console.log(e.step, "EQ[]", t, n), r.push(t === n ? 1 : 0);
6304
6304
  }
6305
- function wo(e) {
6305
+ function Oo(e) {
6306
6306
  var r = e.stack, t = r.pop(), n = r.pop();
6307
6307
  exports.DEBUG && console.log(e.step, "NEQ[]", t, n), r.push(t !== n ? 1 : 0);
6308
6308
  }
6309
- function Eo(e) {
6309
+ function Lo(e) {
6310
6310
  var r = e.stack, t = r.pop();
6311
6311
  exports.DEBUG && console.log(e.step, "ODD[]", t), r.push(Math.trunc(t) % 2 ? 1 : 0);
6312
6312
  }
6313
- function Oo(e) {
6313
+ function Ro(e) {
6314
6314
  var r = e.stack, t = r.pop();
6315
6315
  exports.DEBUG && console.log(e.step, "EVEN[]", t), r.push(Math.trunc(t) % 2 ? 0 : 1);
6316
6316
  }
6317
- function Lo(e) {
6317
+ function Do(e) {
6318
6318
  var r = e.stack.pop();
6319
- exports.DEBUG && console.log(e.step, "IF[]", r), r || (Rn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
6319
+ exports.DEBUG && console.log(e.step, "IF[]", r), r || (Dn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
6320
6320
  }
6321
- function Ro(e) {
6321
+ function Ao(e) {
6322
6322
  exports.DEBUG && console.log(e.step, "EIF[]");
6323
6323
  }
6324
- function Do(e) {
6324
+ function Bo(e) {
6325
6325
  var r = e.stack, t = r.pop(), n = r.pop();
6326
6326
  exports.DEBUG && console.log(e.step, "AND[]", t, n), r.push(t && n ? 1 : 0);
6327
6327
  }
6328
- function Ao(e) {
6328
+ function Mo(e) {
6329
6329
  var r = e.stack, t = r.pop(), n = r.pop();
6330
6330
  exports.DEBUG && console.log(e.step, "OR[]", t, n), r.push(t || n ? 1 : 0);
6331
6331
  }
6332
- function Bo(e) {
6332
+ function Io(e) {
6333
6333
  var r = e.stack, t = r.pop();
6334
6334
  exports.DEBUG && console.log(e.step, "NOT[]", t), r.push(t ? 0 : 1);
6335
6335
  }
@@ -6346,43 +6346,43 @@ function br(e, r) {
6346
6346
  }
6347
6347
  }
6348
6348
  }
6349
- function Mo(e) {
6349
+ function Po(e) {
6350
6350
  var r = e.stack, t = r.pop();
6351
6351
  exports.DEBUG && console.log(e.step, "SDB[]", t), e.deltaBase = t;
6352
6352
  }
6353
- function Io(e) {
6353
+ function Go(e) {
6354
6354
  var r = e.stack, t = r.pop();
6355
6355
  exports.DEBUG && console.log(e.step, "SDS[]", t), e.deltaShift = Math.pow(0.5, t);
6356
6356
  }
6357
- function Po(e) {
6357
+ function No(e) {
6358
6358
  var r = e.stack, t = r.pop(), n = r.pop();
6359
6359
  exports.DEBUG && console.log(e.step, "ADD[]", t, n), r.push(n + t);
6360
6360
  }
6361
- function Go(e) {
6361
+ function Ho(e) {
6362
6362
  var r = e.stack, t = r.pop(), n = r.pop();
6363
6363
  exports.DEBUG && console.log(e.step, "SUB[]", t, n), r.push(n - t);
6364
6364
  }
6365
- function No(e) {
6365
+ function Wo(e) {
6366
6366
  var r = e.stack, t = r.pop(), n = r.pop();
6367
6367
  exports.DEBUG && console.log(e.step, "DIV[]", t, n), r.push(n * 64 / t);
6368
6368
  }
6369
- function Ho(e) {
6369
+ function zo(e) {
6370
6370
  var r = e.stack, t = r.pop(), n = r.pop();
6371
6371
  exports.DEBUG && console.log(e.step, "MUL[]", t, n), r.push(n * t / 64);
6372
6372
  }
6373
- function Wo(e) {
6373
+ function _o(e) {
6374
6374
  var r = e.stack, t = r.pop();
6375
6375
  exports.DEBUG && console.log(e.step, "ABS[]", t), r.push(Math.abs(t));
6376
6376
  }
6377
- function zo(e) {
6377
+ function Vo(e) {
6378
6378
  var r = e.stack, t = r.pop();
6379
6379
  exports.DEBUG && console.log(e.step, "NEG[]", t), r.push(-t);
6380
6380
  }
6381
- function _o(e) {
6381
+ function qo(e) {
6382
6382
  var r = e.stack, t = r.pop();
6383
6383
  exports.DEBUG && console.log(e.step, "FLOOR[]", t), r.push(Math.floor(t / 64) * 64);
6384
6384
  }
6385
- function Vo(e) {
6385
+ function Xo(e) {
6386
6386
  var r = e.stack, t = r.pop();
6387
6387
  exports.DEBUG && console.log(e.step, "CEILING[]", t), r.push(Math.ceil(t / 64) * 64);
6388
6388
  }
@@ -6390,7 +6390,7 @@ function Je(e, r) {
6390
6390
  var t = r.stack, n = t.pop();
6391
6391
  exports.DEBUG && console.log(r.step, "ROUND[]"), t.push(r.round(n / 64) * 64);
6392
6392
  }
6393
- function qo(e) {
6393
+ function Yo(e) {
6394
6394
  var r = e.stack, t = r.pop(), n = r.pop();
6395
6395
  exports.DEBUG && console.log(e.step, "WCVTF[]", t, n), e.cvt[n] = t * e.ppem / e.font.unitsPerEm;
6396
6396
  }
@@ -6407,9 +6407,9 @@ function Sr(e, r) {
6407
6407
  }
6408
6408
  }
6409
6409
  }
6410
- function Xo(e) {
6410
+ function $o(e) {
6411
6411
  var r = e.stack.pop();
6412
- exports.DEBUG && console.log(e.step, "SROUND[]", r), e.round = Ln;
6412
+ exports.DEBUG && console.log(e.step, "SROUND[]", r), e.round = Rn;
6413
6413
  var t;
6414
6414
  switch (r & 192) {
6415
6415
  case 0:
@@ -6442,9 +6442,9 @@ function Xo(e) {
6442
6442
  }
6443
6443
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6444
6444
  }
6445
- function Yo(e) {
6445
+ function Zo(e) {
6446
6446
  var r = e.stack.pop();
6447
- exports.DEBUG && console.log(e.step, "S45ROUND[]", r), e.round = Ln;
6447
+ exports.DEBUG && console.log(e.step, "S45ROUND[]", r), e.round = Rn;
6448
6448
  var t;
6449
6449
  switch (r & 192) {
6450
6450
  case 0:
@@ -6477,16 +6477,16 @@ function Yo(e) {
6477
6477
  }
6478
6478
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6479
6479
  }
6480
- function $o(e) {
6481
- exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Es;
6482
- }
6483
- function Zo(e) {
6484
- exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Rs;
6485
- }
6486
6480
  function Qo(e) {
6487
- exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Ds;
6481
+ exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Ls;
6488
6482
  }
6489
6483
  function Ko(e) {
6484
+ exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = As;
6485
+ }
6486
+ function jo(e) {
6487
+ exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Bs;
6488
+ }
6489
+ function Jo(e) {
6490
6490
  var r = e.stack.pop();
6491
6491
  exports.DEBUG && console.log(e.step, "SCANCTRL[]", r);
6492
6492
  }
@@ -6496,27 +6496,27 @@ function Lt(e, r) {
6496
6496
  var u, i;
6497
6497
  e ? (u = s.y - o.y, i = o.x - s.x) : (u = o.x - s.x, i = o.y - s.y), r.dpv = Xe(u, i);
6498
6498
  }
6499
- function jo(e) {
6499
+ function ei(e) {
6500
6500
  var r = e.stack, t = r.pop(), n = 0;
6501
6501
  exports.DEBUG && console.log(e.step, "GETINFO[]", t), t & 1 && (n = 35), t & 32 && (n |= 4096), r.push(n);
6502
6502
  }
6503
- function Jo(e) {
6503
+ function ri(e) {
6504
6504
  var r = e.stack, t = r.pop(), n = r.pop(), a = r.pop();
6505
6505
  exports.DEBUG && console.log(e.step, "ROLL[]"), r.push(n), r.push(t), r.push(a);
6506
6506
  }
6507
- function ei(e) {
6507
+ function ti(e) {
6508
6508
  var r = e.stack, t = r.pop(), n = r.pop();
6509
6509
  exports.DEBUG && console.log(e.step, "MAX[]", t, n), r.push(Math.max(n, t));
6510
6510
  }
6511
- function ri(e) {
6511
+ function ni(e) {
6512
6512
  var r = e.stack, t = r.pop(), n = r.pop();
6513
6513
  exports.DEBUG && console.log(e.step, "MIN[]", t, n), r.push(Math.min(n, t));
6514
6514
  }
6515
- function ti(e) {
6515
+ function ai(e) {
6516
6516
  var r = e.stack.pop();
6517
6517
  exports.DEBUG && console.log(e.step, "SCANTYPE[]", r);
6518
6518
  }
6519
- function ni(e) {
6519
+ function si(e) {
6520
6520
  var r = e.stack.pop(), t = e.stack.pop();
6521
6521
  switch (exports.DEBUG && console.log(e.step, "INSTCTRL[]", r, t), r) {
6522
6522
  case 1:
@@ -6559,7 +6559,7 @@ function T(e, r, t, n, a, s) {
6559
6559
  ")"
6560
6560
  ), s.rp1 = s.rp0, s.rp2 = i, r && (s.rp0 = i);
6561
6561
  }
6562
- Cn = [
6562
+ wn = [
6563
6563
  /* 0x00 */
6564
6564
  gt.bind(void 0, pe),
6565
6565
  /* 0x01 */
@@ -6581,45 +6581,45 @@ Cn = [
6581
6581
  /* 0x09 */
6582
6582
  bt.bind(void 0, 1),
6583
6583
  /* 0x0A */
6584
- Bs,
6584
+ Is,
6585
6585
  /* 0x0B */
6586
- Ms,
6586
+ Ps,
6587
6587
  /* 0x0C */
6588
- Is,
6588
+ Gs,
6589
6589
  /* 0x0D */
6590
- Ps,
6590
+ Ns,
6591
6591
  /* 0x0E */
6592
- Gs,
6592
+ Hs,
6593
6593
  /* 0x0F */
6594
- Ns,
6594
+ Ws,
6595
6595
  /* 0x10 */
6596
- Hs,
6596
+ zs,
6597
6597
  /* 0x11 */
6598
- Ws,
6598
+ _s,
6599
6599
  /* 0x12 */
6600
- zs,
6600
+ Vs,
6601
6601
  /* 0x13 */
6602
- _s,
6602
+ qs,
6603
6603
  /* 0x14 */
6604
- Vs,
6604
+ Xs,
6605
6605
  /* 0x15 */
6606
- qs,
6606
+ Ys,
6607
6607
  /* 0x16 */
6608
- Xs,
6608
+ $s,
6609
6609
  /* 0x17 */
6610
- Ys,
6610
+ Zs,
6611
6611
  /* 0x18 */
6612
- $s,
6612
+ Qs,
6613
6613
  /* 0x19 */
6614
- Zs,
6614
+ Ks,
6615
6615
  /* 0x1A */
6616
- Qs,
6616
+ js,
6617
6617
  /* 0x1B */
6618
- Ks,
6618
+ Js,
6619
6619
  /* 0x1C */
6620
- js,
6620
+ eo,
6621
6621
  /* 0x1D */
6622
- Js,
6622
+ ro,
6623
6623
  /* 0x1E */
6624
6624
  void 0,
6625
6625
  // TODO SSWCI
@@ -6627,19 +6627,19 @@ Cn = [
6627
6627
  void 0,
6628
6628
  // TODO SSW
6629
6629
  /* 0x20 */
6630
- eo,
6630
+ to,
6631
6631
  /* 0x21 */
6632
6632
  xr,
6633
6633
  /* 0x22 */
6634
- ro,
6634
+ no,
6635
6635
  /* 0x23 */
6636
- to,
6636
+ ao,
6637
6637
  /* 0x24 */
6638
- no,
6638
+ so,
6639
6639
  /* 0x25 */
6640
- oo,
6640
+ uo,
6641
6641
  /* 0x26 */
6642
- io,
6642
+ lo,
6643
6643
  /* 0x27 */
6644
6644
  void 0,
6645
6645
  // TODO ALIGNPTS
@@ -6649,11 +6649,11 @@ Cn = [
6649
6649
  void 0,
6650
6650
  // TODO UTP
6651
6651
  /* 0x2A */
6652
- ao,
6652
+ oo,
6653
6653
  /* 0x2B */
6654
- so,
6654
+ io,
6655
6655
  /* 0x2C */
6656
- uo,
6656
+ fo,
6657
6657
  /* 0x2D */
6658
6658
  void 0,
6659
6659
  // ENDF (eaten by FDEF)
@@ -6678,33 +6678,33 @@ Cn = [
6678
6678
  /* 0x37 */
6679
6679
  Ut.bind(void 0, 1),
6680
6680
  /* 0x38 */
6681
- lo,
6681
+ po,
6682
6682
  /* 0x39 */
6683
- fo,
6683
+ co,
6684
6684
  /* 0x3A */
6685
6685
  Ct.bind(void 0, 0),
6686
6686
  /* 0x3B */
6687
6687
  Ct.bind(void 0, 1),
6688
6688
  /* 0x3C */
6689
- po,
6689
+ ho,
6690
6690
  /* 0x3D */
6691
- co,
6691
+ vo,
6692
6692
  /* 0x3E */
6693
6693
  wt.bind(void 0, 0),
6694
6694
  /* 0x3F */
6695
6695
  wt.bind(void 0, 1),
6696
6696
  /* 0x40 */
6697
- ho,
6697
+ go,
6698
6698
  /* 0x41 */
6699
- vo,
6699
+ mo,
6700
6700
  /* 0x42 */
6701
- go,
6701
+ yo,
6702
6702
  /* 0x43 */
6703
- mo,
6703
+ xo,
6704
6704
  /* 0x44 */
6705
- yo,
6705
+ bo,
6706
6706
  /* 0x45 */
6707
- xo,
6707
+ So,
6708
6708
  /* 0x46 */
6709
6709
  Et.bind(void 0, 0),
6710
6710
  /* 0x47 */
@@ -6717,12 +6717,12 @@ Cn = [
6717
6717
  /* 0x4A */
6718
6718
  Ot.bind(void 0, 1),
6719
6719
  /* 0x4B */
6720
- bo,
6720
+ To,
6721
6721
  /* 0x4C */
6722
6722
  void 0,
6723
6723
  // TODO MPS
6724
6724
  /* 0x4D */
6725
- So,
6725
+ ko,
6726
6726
  /* 0x4E */
6727
6727
  void 0,
6728
6728
  // TODO FLIPOFF
@@ -6730,53 +6730,53 @@ Cn = [
6730
6730
  void 0,
6731
6731
  // TODO DEBUG
6732
6732
  /* 0x50 */
6733
- To,
6733
+ Fo,
6734
6734
  /* 0x51 */
6735
- ko,
6735
+ Uo,
6736
6736
  /* 0x52 */
6737
- Fo,
6737
+ Co,
6738
6738
  /* 0x53 */
6739
- Uo,
6739
+ wo,
6740
6740
  /* 0x54 */
6741
- Co,
6741
+ Eo,
6742
6742
  /* 0x55 */
6743
- wo,
6743
+ Oo,
6744
6744
  /* 0x56 */
6745
- Eo,
6745
+ Lo,
6746
6746
  /* 0x57 */
6747
- Oo,
6747
+ Ro,
6748
6748
  /* 0x58 */
6749
- Lo,
6749
+ Do,
6750
6750
  /* 0x59 */
6751
- Ro,
6751
+ Ao,
6752
6752
  /* 0x5A */
6753
- Do,
6753
+ Bo,
6754
6754
  /* 0x5B */
6755
- Ao,
6755
+ Mo,
6756
6756
  /* 0x5C */
6757
- Bo,
6757
+ Io,
6758
6758
  /* 0x5D */
6759
6759
  br.bind(void 0, 1),
6760
6760
  /* 0x5E */
6761
- Mo,
6761
+ Po,
6762
6762
  /* 0x5F */
6763
- Io,
6763
+ Go,
6764
6764
  /* 0x60 */
6765
- Po,
6765
+ No,
6766
6766
  /* 0x61 */
6767
- Go,
6767
+ Ho,
6768
6768
  /* 0x62 */
6769
- No,
6769
+ Wo,
6770
6770
  /* 0x63 */
6771
- Ho,
6771
+ zo,
6772
6772
  /* 0x64 */
6773
- Wo,
6773
+ _o,
6774
6774
  /* 0x65 */
6775
- zo,
6775
+ Vo,
6776
6776
  /* 0x66 */
6777
- _o,
6777
+ qo,
6778
6778
  /* 0x67 */
6779
- Vo,
6779
+ Xo,
6780
6780
  /* 0x68 */
6781
6781
  Je.bind(void 0, 0),
6782
6782
  /* 0x69 */
@@ -6798,7 +6798,7 @@ Cn = [
6798
6798
  void 0,
6799
6799
  // TODO NROUND[ab]
6800
6800
  /* 0x70 */
6801
- qo,
6801
+ Yo,
6802
6802
  /* 0x71 */
6803
6803
  br.bind(void 0, 2),
6804
6804
  /* 0x72 */
@@ -6810,9 +6810,9 @@ Cn = [
6810
6810
  /* 0x75 */
6811
6811
  Sr.bind(void 0, 3),
6812
6812
  /* 0x76 */
6813
- Xo,
6813
+ $o,
6814
6814
  /* 0x77 */
6815
- Yo,
6815
+ Zo,
6816
6816
  /* 0x78 */
6817
6817
  void 0,
6818
6818
  // TODO JROT[]
@@ -6820,13 +6820,13 @@ Cn = [
6820
6820
  void 0,
6821
6821
  // TODO JROF[]
6822
6822
  /* 0x7A */
6823
- $o,
6823
+ Qo,
6824
6824
  /* 0x7B */
6825
6825
  void 0,
6826
6826
  /* 0x7C */
6827
- Zo,
6827
+ Ko,
6828
6828
  /* 0x7D */
6829
- Qo,
6829
+ jo,
6830
6830
  /* 0x7E */
6831
6831
  xr,
6832
6832
  // actually SANGW, supposed to do only a pop though
@@ -6847,26 +6847,26 @@ Cn = [
6847
6847
  /* 0x84 */
6848
6848
  void 0,
6849
6849
  /* 0x85 */
6850
- Ko,
6850
+ Jo,
6851
6851
  /* 0x86 */
6852
6852
  Lt.bind(void 0, 0),
6853
6853
  /* 0x87 */
6854
6854
  Lt.bind(void 0, 1),
6855
6855
  /* 0x88 */
6856
- jo,
6856
+ ei,
6857
6857
  /* 0x89 */
6858
6858
  void 0,
6859
6859
  // TODO IDEF
6860
6860
  /* 0x8A */
6861
- Jo,
6861
+ ri,
6862
6862
  /* 0x8B */
6863
- ei,
6863
+ ti,
6864
6864
  /* 0x8C */
6865
- ri,
6865
+ ni,
6866
6866
  /* 0x8D */
6867
- ti,
6867
+ ai,
6868
6868
  /* 0x8E */
6869
- ni,
6869
+ si,
6870
6870
  /* 0x8F */
6871
6871
  void 0,
6872
6872
  /* 0x90 */
@@ -7100,7 +7100,7 @@ function Re(e) {
7100
7100
  function Xr(e, r, t) {
7101
7101
  this.contextName = t, this.startIndex = e, this.endOffset = r;
7102
7102
  }
7103
- function ai(e, r, t) {
7103
+ function oi(e, r, t) {
7104
7104
  this.contextName = e, this.openRange = null, this.ranges = [], this.checkStart = r, this.checkEnd = t;
7105
7105
  }
7106
7106
  function re(e, r) {
@@ -7109,7 +7109,7 @@ function re(e, r) {
7109
7109
  function fr(e) {
7110
7110
  this.eventId = e, this.subscribers = [];
7111
7111
  }
7112
- function si(e) {
7112
+ function ii(e) {
7113
7113
  var r = this, t = [
7114
7114
  "start",
7115
7115
  "end",
@@ -7148,7 +7148,7 @@ function si(e) {
7148
7148
  });
7149
7149
  }
7150
7150
  function N(e) {
7151
- this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], si.call(this, e);
7151
+ this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], ii.call(this, e);
7152
7152
  }
7153
7153
  Re.prototype.setState = function(e, r) {
7154
7154
  return this.state[e] = r, this.activeState = { key: e, value: this.state[e] }, this.activeState;
@@ -7286,7 +7286,7 @@ N.prototype.registerContextChecker = function(e, r, t) {
7286
7286
  return {
7287
7287
  FAIL: "missing context end check."
7288
7288
  };
7289
- var n = new ai(
7289
+ var n = new oi(
7290
7290
  e,
7291
7291
  r,
7292
7292
  t
@@ -7350,7 +7350,7 @@ N.prototype.tokenize = function(e) {
7350
7350
  function be(e) {
7351
7351
  return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e);
7352
7352
  }
7353
- function Dn(e) {
7353
+ function An(e) {
7354
7354
  return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e);
7355
7355
  }
7356
7356
  function Se(e) {
@@ -7359,7 +7359,7 @@ function Se(e) {
7359
7359
  function rr(e) {
7360
7360
  return /[A-z]/.test(e);
7361
7361
  }
7362
- function oi(e) {
7362
+ function ui(e) {
7363
7363
  return /\s/.test(e);
7364
7364
  }
7365
7365
  function J(e) {
@@ -7388,11 +7388,11 @@ function Ye(e, r) {
7388
7388
  }
7389
7389
  return -1;
7390
7390
  }
7391
- function ii(e, r) {
7391
+ function li(e, r) {
7392
7392
  var t = Ye(e, r.coverage);
7393
7393
  return t === -1 ? null : e + r.deltaGlyphId;
7394
7394
  }
7395
- function ui(e, r) {
7395
+ function fi(e, r) {
7396
7396
  var t = Ye(e, r.coverage);
7397
7397
  return t === -1 ? null : r.substitute[t];
7398
7398
  }
@@ -7405,7 +7405,7 @@ function Tr(e, r) {
7405
7405
  }
7406
7406
  return t.length !== e.length ? -1 : t;
7407
7407
  }
7408
- function li(e, r) {
7408
+ function pi(e, r) {
7409
7409
  var t = r.inputCoverage.length + r.lookaheadCoverage.length + r.backtrackCoverage.length;
7410
7410
  if (e.context.length < t)
7411
7411
  return [];
@@ -7444,7 +7444,7 @@ function li(e, r) {
7444
7444
  }
7445
7445
  return p;
7446
7446
  }
7447
- function fi(e, r) {
7447
+ function ci(e, r) {
7448
7448
  var t = e.current, n = Ye(t, r.coverage);
7449
7449
  if (n === -1)
7450
7450
  return null;
@@ -7460,7 +7460,7 @@ function fi(e, r) {
7460
7460
  }
7461
7461
  return null;
7462
7462
  }
7463
- function pi(e, r) {
7463
+ function hi(e, r) {
7464
7464
  var t = Ye(e, r.coverage);
7465
7465
  return t === -1 ? null : r.sequences[t];
7466
7466
  }
@@ -7522,35 +7522,35 @@ J.prototype.getLookupMethod = function(e, r) {
7522
7522
  switch (n) {
7523
7523
  case "11":
7524
7524
  return function(a) {
7525
- return ii.apply(
7525
+ return li.apply(
7526
7526
  t,
7527
7527
  [a, r]
7528
7528
  );
7529
7529
  };
7530
7530
  case "12":
7531
7531
  return function(a) {
7532
- return ui.apply(
7532
+ return fi.apply(
7533
7533
  t,
7534
7534
  [a, r]
7535
7535
  );
7536
7536
  };
7537
7537
  case "63":
7538
7538
  return function(a) {
7539
- return li.apply(
7539
+ return pi.apply(
7540
7540
  t,
7541
7541
  [a, r]
7542
7542
  );
7543
7543
  };
7544
7544
  case "41":
7545
7545
  return function(a) {
7546
- return fi.apply(
7546
+ return ci.apply(
7547
7547
  t,
7548
7548
  [a, r]
7549
7549
  );
7550
7550
  };
7551
7551
  case "21":
7552
7552
  return function(a) {
7553
- return pi.apply(
7553
+ return hi.apply(
7554
7554
  t,
7555
7555
  [a, r]
7556
7556
  );
@@ -7643,7 +7643,7 @@ J.prototype.getFeature = function(r) {
7643
7643
  var t = this.features[r.script];
7644
7644
  return t ? t.tags[r.tag] ? this.features[r.script].tags[r.tag] : null : { FAIL: "No feature for script " + r.script };
7645
7645
  };
7646
- function ci(e) {
7646
+ function vi(e) {
7647
7647
  var r = e.current, t = e.get(-1);
7648
7648
  return (
7649
7649
  // ? arabic first char
@@ -7651,7 +7651,7 @@ function ci(e) {
7651
7651
  !be(t) && be(r)
7652
7652
  );
7653
7653
  }
7654
- function hi(e) {
7654
+ function di(e) {
7655
7655
  var r = e.get(1);
7656
7656
  return (
7657
7657
  // ? last arabic char
@@ -7659,24 +7659,24 @@ function hi(e) {
7659
7659
  !be(r)
7660
7660
  );
7661
7661
  }
7662
- var vi = {
7663
- startCheck: ci,
7664
- endCheck: hi
7662
+ var gi = {
7663
+ startCheck: vi,
7664
+ endCheck: di
7665
7665
  };
7666
- function di(e) {
7666
+ function mi(e) {
7667
7667
  var r = e.current, t = e.get(-1);
7668
7668
  return (
7669
7669
  // ? an arabic char preceded with a non arabic char
7670
7670
  (be(r) || Se(r)) && !be(t)
7671
7671
  );
7672
7672
  }
7673
- function gi(e) {
7673
+ function yi(e) {
7674
7674
  var r = e.get(1);
7675
7675
  switch (!0) {
7676
7676
  case r === null:
7677
7677
  return !0;
7678
7678
  case (!be(r) && !Se(r)):
7679
- var t = oi(r);
7679
+ var t = ui(r);
7680
7680
  if (!t)
7681
7681
  return !0;
7682
7682
  if (t) {
@@ -7693,40 +7693,40 @@ function gi(e) {
7693
7693
  return !1;
7694
7694
  }
7695
7695
  }
7696
- var mi = {
7697
- startCheck: di,
7698
- endCheck: gi
7696
+ var xi = {
7697
+ startCheck: mi,
7698
+ endCheck: yi
7699
7699
  };
7700
- function yi(e, r, t) {
7700
+ function bi(e, r, t) {
7701
7701
  r[t].setState(e.tag, e.substitution);
7702
7702
  }
7703
- function xi(e, r, t) {
7703
+ function Si(e, r, t) {
7704
7704
  r[t].setState(e.tag, e.substitution);
7705
7705
  }
7706
- function bi(e, r, t) {
7706
+ function Ti(e, r, t) {
7707
7707
  e.substitution.forEach(function(n, a) {
7708
7708
  var s = r[t + a];
7709
7709
  s.setState(e.tag, n);
7710
7710
  });
7711
7711
  }
7712
- function Si(e, r, t) {
7712
+ function ki(e, r, t) {
7713
7713
  var n = r[t];
7714
7714
  n.setState(e.tag, e.substitution.ligGlyph);
7715
7715
  for (var a = e.substitution.components.length, s = 0; s < a; s++)
7716
7716
  n = r[t + s + 1], n.setState("deleted", !0);
7717
7717
  }
7718
7718
  var Rt = {
7719
- 11: yi,
7720
- 12: xi,
7721
- 63: bi,
7722
- 41: Si
7719
+ 11: bi,
7720
+ 12: Si,
7721
+ 63: Ti,
7722
+ 41: ki
7723
7723
  };
7724
7724
  function Yr(e, r, t) {
7725
7725
  e instanceof Fe && Rt[e.id] && Rt[e.id](e, r, t);
7726
7726
  }
7727
- function Ti(e) {
7727
+ function Fi(e) {
7728
7728
  for (var r = [].concat(e.backtrack), t = r.length - 1; t >= 0; t--) {
7729
- var n = r[t], a = Dn(n), s = Se(n);
7729
+ var n = r[t], a = An(n), s = Se(n);
7730
7730
  if (!a && !s)
7731
7731
  return !0;
7732
7732
  if (a)
@@ -7734,8 +7734,8 @@ function Ti(e) {
7734
7734
  }
7735
7735
  return !1;
7736
7736
  }
7737
- function ki(e) {
7738
- if (Dn(e.current))
7737
+ function Ui(e) {
7738
+ if (An(e.current))
7739
7739
  return !1;
7740
7740
  for (var r = 0; r < e.lookahead.length; r++) {
7741
7741
  var t = e.lookahead[r], n = Se(t);
@@ -7744,7 +7744,7 @@ function ki(e) {
7744
7744
  }
7745
7745
  return !1;
7746
7746
  }
7747
- function Fi(e) {
7747
+ function Ci(e) {
7748
7748
  var r = this, t = "arab", n = this.featuresTags[t], a = this.tokenizer.getRangeTokens(e);
7749
7749
  if (a.length !== 1) {
7750
7750
  var s = new re(
@@ -7766,7 +7766,7 @@ function Fi(e) {
7766
7766
  if (!Se(u.char)) {
7767
7767
  s.setCurrentIndex(i), o.setCurrentIndex(i);
7768
7768
  var l = 0;
7769
- Ti(o) && (l |= 1), ki(o) && (l |= 2);
7769
+ Fi(o) && (l |= 1), Ui(o) && (l |= 2);
7770
7770
  var f;
7771
7771
  switch (l) {
7772
7772
  case 1:
@@ -7801,7 +7801,7 @@ function Dt(e, r) {
7801
7801
  });
7802
7802
  return new re(t, 0);
7803
7803
  }
7804
- function Ui(e) {
7804
+ function wi(e) {
7805
7805
  var r = this, t = "arab", n = this.tokenizer.getRangeTokens(e), a = Dt(n);
7806
7806
  a.context.forEach(function(s, o) {
7807
7807
  a.setCurrentIndex(o);
@@ -7817,7 +7817,7 @@ function Ui(e) {
7817
7817
  ), a = Dt(n));
7818
7818
  });
7819
7819
  }
7820
- function Ci(e) {
7820
+ function Ei(e) {
7821
7821
  var r = e.current, t = e.get(-1);
7822
7822
  return (
7823
7823
  // ? latin first char
@@ -7825,7 +7825,7 @@ function Ci(e) {
7825
7825
  !rr(t) && rr(r)
7826
7826
  );
7827
7827
  }
7828
- function wi(e) {
7828
+ function Oi(e) {
7829
7829
  var r = e.get(1);
7830
7830
  return (
7831
7831
  // ? last latin char
@@ -7833,9 +7833,9 @@ function wi(e) {
7833
7833
  !rr(r)
7834
7834
  );
7835
7835
  }
7836
- var Ei = {
7837
- startCheck: Ci,
7838
- endCheck: wi
7836
+ var Li = {
7837
+ startCheck: Ei,
7838
+ endCheck: Oi
7839
7839
  };
7840
7840
  function At(e, r) {
7841
7841
  var t = e.map(function(n) {
@@ -7843,7 +7843,7 @@ function At(e, r) {
7843
7843
  });
7844
7844
  return new re(t, 0);
7845
7845
  }
7846
- function Oi(e) {
7846
+ function Ri(e) {
7847
7847
  var r = this, t = "latn", n = this.tokenizer.getRangeTokens(e), a = At(n);
7848
7848
  a.context.forEach(function(s, o) {
7849
7849
  a.setCurrentIndex(o);
@@ -7866,9 +7866,9 @@ ae.prototype.setText = function(e) {
7866
7866
  this.text = e;
7867
7867
  };
7868
7868
  ae.prototype.contextChecks = {
7869
- latinWordCheck: Ei,
7870
- arabicWordCheck: vi,
7871
- arabicSentenceCheck: mi
7869
+ latinWordCheck: Li,
7870
+ arabicWordCheck: gi,
7871
+ arabicSentenceCheck: xi
7872
7872
  };
7873
7873
  function kr(e) {
7874
7874
  var r = this.contextChecks[e + "Check"];
@@ -7878,10 +7878,10 @@ function kr(e) {
7878
7878
  r.endCheck
7879
7879
  );
7880
7880
  }
7881
- function Li() {
7881
+ function Di() {
7882
7882
  return kr.call(this, "latinWord"), kr.call(this, "arabicWord"), kr.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
7883
7883
  }
7884
- function Ri() {
7884
+ function Ai() {
7885
7885
  var e = this, r = this.tokenizer.getContextRanges("arabicSentence");
7886
7886
  r.forEach(function(t) {
7887
7887
  var n = e.tokenizer.getRangeTokens(t);
@@ -7920,17 +7920,17 @@ function $r() {
7920
7920
  "glyphIndex modifier is required to apply arabic presentation features."
7921
7921
  );
7922
7922
  }
7923
- function Di() {
7923
+ function Bi() {
7924
7924
  var e = this, r = "arab";
7925
7925
  if (this.featuresTags.hasOwnProperty(r)) {
7926
7926
  $r.call(this);
7927
7927
  var t = this.tokenizer.getContextRanges("arabicWord");
7928
7928
  t.forEach(function(n) {
7929
- Fi.call(e, n);
7929
+ Ci.call(e, n);
7930
7930
  });
7931
7931
  }
7932
7932
  }
7933
- function Ai() {
7933
+ function Mi() {
7934
7934
  var e = this, r = "arab";
7935
7935
  if (this.featuresTags.hasOwnProperty(r)) {
7936
7936
  var t = this.featuresTags[r];
@@ -7938,12 +7938,12 @@ function Ai() {
7938
7938
  $r.call(this);
7939
7939
  var n = this.tokenizer.getContextRanges("arabicWord");
7940
7940
  n.forEach(function(a) {
7941
- Ui.call(e, a);
7941
+ wi.call(e, a);
7942
7942
  });
7943
7943
  }
7944
7944
  }
7945
7945
  }
7946
- function Bi() {
7946
+ function Ii() {
7947
7947
  var e = this, r = "latn";
7948
7948
  if (this.featuresTags.hasOwnProperty(r)) {
7949
7949
  var t = this.featuresTags[r];
@@ -7951,7 +7951,7 @@ function Bi() {
7951
7951
  $r.call(this);
7952
7952
  var n = this.tokenizer.getContextRanges("latinWord");
7953
7953
  n.forEach(function(a) {
7954
- Oi.call(e, a);
7954
+ Ri.call(e, a);
7955
7955
  });
7956
7956
  }
7957
7957
  }
@@ -7960,10 +7960,10 @@ ae.prototype.checkContextReady = function(e) {
7960
7960
  return !!this.tokenizer.getContext(e);
7961
7961
  };
7962
7962
  ae.prototype.applyFeaturesToContexts = function() {
7963
- this.checkContextReady("arabicWord") && (Di.call(this), Ai.call(this)), this.checkContextReady("latinWord") && Bi.call(this), this.checkContextReady("arabicSentence") && Ri.call(this);
7963
+ this.checkContextReady("arabicWord") && (Bi.call(this), Mi.call(this)), this.checkContextReady("latinWord") && Ii.call(this), this.checkContextReady("arabicSentence") && Ai.call(this);
7964
7964
  };
7965
7965
  ae.prototype.processText = function(e) {
7966
- (!this.text || this.text !== e) && (this.setText(e), Li.call(this), this.applyFeaturesToContexts());
7966
+ (!this.text || this.text !== e) && (this.setText(e), Di.call(this), this.applyFeaturesToContexts());
7967
7967
  };
7968
7968
  ae.prototype.getBidiText = function(e) {
7969
7969
  return this.processText(e), this.tokenizer.getText();
@@ -8002,12 +8002,12 @@ function I(e) {
8002
8002
  usWidthClass: e.widthClass || this.usWidthClasses.MEDIUM,
8003
8003
  fsSelection: e.fsSelection || this.fsSelectionValues.REGULAR
8004
8004
  }, e.tables.os2)
8005
- })), this.supported = !0, this.glyphs = new le.GlyphSet(this, e.glyphs || []), this.encoding = new Zt(this), this.position = new Ve(this), this.substitution = new j(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8005
+ })), this.supported = !0, this.glyphs = new le.GlyphSet(this, e.glyphs || []), this.encoding = new Qt(this), this.position = new Ve(this), this.substitution = new j(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8006
8006
  get: function() {
8007
8007
  if (this._hinting)
8008
8008
  return this._hinting;
8009
8009
  if (this.outlinesFormat === "truetype")
8010
- return this._hinting = new En(this);
8010
+ return this._hinting = new On(this);
8011
8011
  }
8012
8012
  });
8013
8013
  }
@@ -8132,7 +8132,7 @@ I.prototype.validate = function() {
8132
8132
  t("fontFamily"), t("weightName"), t("manufacturer"), t("copyright"), t("version"), this.unitsPerEm > 0;
8133
8133
  };
8134
8134
  I.prototype.toTables = function() {
8135
- return bs.fontToTable(this);
8135
+ return Ts.fontToTable(this);
8136
8136
  };
8137
8137
  I.prototype.toBuffer = function() {
8138
8138
  return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
@@ -8146,7 +8146,7 @@ I.prototype.download = function(e) {
8146
8146
  var r = this.getEnglishName("fontFamily"), t = this.getEnglishName("fontSubfamily");
8147
8147
  e = e || r.replace(/\s/g, "") + "-" + t + ".otf";
8148
8148
  var n = this.toArrayBuffer();
8149
- if (Ts())
8149
+ if (Fs())
8150
8150
  if (window.URL = window.URL || window.webkitURL, window.URL) {
8151
8151
  var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), o = document.createElement("a");
8152
8152
  o.href = window.URL.createObjectURL(s), o.download = e;
@@ -8155,7 +8155,7 @@ I.prototype.download = function(e) {
8155
8155
  } else
8156
8156
  console.warn("Font file could not be downloaded. Try using a different browser.");
8157
8157
  else {
8158
- var i = require("fs"), l = ks(n);
8158
+ var i = require("fs"), l = Us(n);
8159
8159
  i.writeFileSync(e, l);
8160
8160
  }
8161
8161
  };
@@ -8203,7 +8203,7 @@ I.prototype.usWeightClasses = {
8203
8203
  EXTRA_BOLD: 800,
8204
8204
  BLACK: 900
8205
8205
  };
8206
- function An(e, r) {
8206
+ function Bn(e, r) {
8207
8207
  var t = JSON.stringify(e), n = 256;
8208
8208
  for (var a in r) {
8209
8209
  var s = parseInt(a);
@@ -8215,8 +8215,8 @@ function An(e, r) {
8215
8215
  }
8216
8216
  return r[n] = e, n;
8217
8217
  }
8218
- function Mi(e, r, t) {
8219
- var n = An(r.name, t);
8218
+ function Pi(e, r, t) {
8219
+ var n = Bn(r.name, t);
8220
8220
  return [
8221
8221
  { name: "tag_" + e, type: "TAG", value: r.tag },
8222
8222
  { name: "minValue_" + e, type: "FIXED", value: r.minValue << 16 },
@@ -8226,12 +8226,12 @@ function Mi(e, r, t) {
8226
8226
  { name: "nameID_" + e, type: "USHORT", value: n }
8227
8227
  ];
8228
8228
  }
8229
- function Ii(e, r, t) {
8229
+ function Gi(e, r, t) {
8230
8230
  var n = {}, a = new k.Parser(e, r);
8231
8231
  return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = t[a.parseUShort()] || {}, n;
8232
8232
  }
8233
- function Pi(e, r, t, n) {
8234
- for (var a = An(r.name, n), s = [
8233
+ function Ni(e, r, t, n) {
8234
+ for (var a = Bn(r.name, n), s = [
8235
8235
  { name: "nameID_" + e, type: "USHORT", value: a },
8236
8236
  { name: "flags_" + e, type: "USHORT", value: 0 }
8237
8237
  ], o = 0; o < t.length; ++o) {
@@ -8244,14 +8244,14 @@ function Pi(e, r, t, n) {
8244
8244
  }
8245
8245
  return s;
8246
8246
  }
8247
- function Gi(e, r, t, n) {
8247
+ function Hi(e, r, t, n) {
8248
8248
  var a = {}, s = new k.Parser(e, r);
8249
8249
  a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
8250
8250
  for (var o = 0; o < t.length; ++o)
8251
8251
  a.coordinates[t[o].tag] = s.parseFixed();
8252
8252
  return a;
8253
8253
  }
8254
- function Ni(e, r) {
8254
+ function Wi(e, r) {
8255
8255
  var t = new S.Table("fvar", [
8256
8256
  { name: "version", type: "ULONG", value: 65536 },
8257
8257
  { name: "offsetToData", type: "USHORT", value: 0 },
@@ -8263,28 +8263,28 @@ function Ni(e, r) {
8263
8263
  ]);
8264
8264
  t.offsetToData = t.sizeOf();
8265
8265
  for (var n = 0; n < e.axes.length; n++)
8266
- t.fields = t.fields.concat(Mi(n, e.axes[n], r));
8266
+ t.fields = t.fields.concat(Pi(n, e.axes[n], r));
8267
8267
  for (var a = 0; a < e.instances.length; a++)
8268
- t.fields = t.fields.concat(Pi(a, e.instances[a], e.axes, r));
8268
+ t.fields = t.fields.concat(Ni(a, e.instances[a], e.axes, r));
8269
8269
  return t;
8270
8270
  }
8271
- function Hi(e, r, t) {
8271
+ function zi(e, r, t) {
8272
8272
  var n = new k.Parser(e, r), a = n.parseULong();
8273
8273
  E.argument(a === 65536, "Unsupported fvar table version.");
8274
8274
  var s = n.parseOffset16();
8275
8275
  n.skip("uShort", 1);
8276
8276
  for (var o = n.parseUShort(), u = n.parseUShort(), i = n.parseUShort(), l = n.parseUShort(), f = [], c = 0; c < o; c++)
8277
- f.push(Ii(e, r + s + c * u, t));
8277
+ f.push(Gi(e, r + s + c * u, t));
8278
8278
  for (var p = [], h = r + s + o * u, d = 0; d < i; d++)
8279
- p.push(Gi(e, h + d * l, f, t));
8279
+ p.push(Hi(e, h + d * l, f, t));
8280
8280
  return { axes: f, instances: p };
8281
8281
  }
8282
- var Wi = { make: Ni, parse: Hi }, zi = function() {
8282
+ var _i = { make: Wi, parse: zi }, Vi = function() {
8283
8283
  return {
8284
8284
  coverage: this.parsePointer(v.coverage),
8285
8285
  attachPoints: this.parseList(v.pointer(v.uShortList))
8286
8286
  };
8287
- }, _i = function() {
8287
+ }, qi = function() {
8288
8288
  var e = this.parseUShort();
8289
8289
  if (E.argument(
8290
8290
  e === 1 || e === 2 || e === 3,
@@ -8295,17 +8295,17 @@ var Wi = { make: Ni, parse: Hi }, zi = function() {
8295
8295
  return { pointindex: this.parseShort() };
8296
8296
  if (e === 3)
8297
8297
  return { coordinate: this.parseShort() };
8298
- }, Vi = function() {
8299
- return this.parseList(v.pointer(_i));
8300
- }, qi = function() {
8298
+ }, Xi = function() {
8299
+ return this.parseList(v.pointer(qi));
8300
+ }, Yi = function() {
8301
8301
  return {
8302
8302
  coverage: this.parsePointer(v.coverage),
8303
- ligGlyphs: this.parseList(v.pointer(Vi))
8303
+ ligGlyphs: this.parseList(v.pointer(Xi))
8304
8304
  };
8305
- }, Xi = function() {
8305
+ }, $i = function() {
8306
8306
  return this.parseUShort(), this.parseList(v.pointer(v.coverage));
8307
8307
  };
8308
- function Yi(e, r) {
8308
+ function Zi(e, r) {
8309
8309
  r = r || 0;
8310
8310
  var t = new v(e, r), n = t.parseVersion(1);
8311
8311
  E.argument(
@@ -8315,13 +8315,13 @@ function Yi(e, r) {
8315
8315
  var a = {
8316
8316
  version: n,
8317
8317
  classDef: t.parsePointer(v.classDef),
8318
- attachList: t.parsePointer(zi),
8319
- ligCaretList: t.parsePointer(qi),
8318
+ attachList: t.parsePointer(Vi),
8319
+ ligCaretList: t.parsePointer(Yi),
8320
8320
  markAttachClassDef: t.parsePointer(v.classDef)
8321
8321
  };
8322
- return n >= 1.2 && (a.markGlyphSets = t.parsePointer(Xi)), a;
8322
+ return n >= 1.2 && (a.markGlyphSets = t.parsePointer($i)), a;
8323
8323
  }
8324
- var $i = { parse: Yi }, te = new Array(10);
8324
+ var Qi = { parse: Zi }, te = new Array(10);
8325
8325
  te[1] = function() {
8326
8326
  var r = this.offset + this.relativeOffset, t = this.parseUShort();
8327
8327
  if (t === 1)
@@ -8399,7 +8399,7 @@ te[8] = function() {
8399
8399
  te[9] = function() {
8400
8400
  return { error: "GPOS Lookup 9 not supported" };
8401
8401
  };
8402
- function Zi(e, r) {
8402
+ function Ki(e, r) {
8403
8403
  r = r || 0;
8404
8404
  var t = new v(e, r), n = t.parseVersion(1);
8405
8405
  return E.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
@@ -8415,17 +8415,17 @@ function Zi(e, r) {
8415
8415
  variations: t.parseFeatureVariationsList()
8416
8416
  };
8417
8417
  }
8418
- var Qi = new Array(10);
8419
- function Ki(e) {
8418
+ var ji = new Array(10);
8419
+ function Ji(e) {
8420
8420
  return new S.Table("GPOS", [
8421
8421
  { name: "version", type: "ULONG", value: 65536 },
8422
8422
  { name: "scripts", type: "TABLE", value: new S.ScriptList(e.scripts) },
8423
8423
  { name: "features", type: "TABLE", value: new S.FeatureList(e.features) },
8424
- { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Qi) }
8424
+ { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, ji) }
8425
8425
  ]);
8426
8426
  }
8427
- var ji = { parse: Zi, make: Ki };
8428
- function Ji(e) {
8427
+ var eu = { parse: Ki, make: Ji };
8428
+ function ru(e) {
8429
8429
  var r = {};
8430
8430
  e.skip("uShort");
8431
8431
  var t = e.parseUShort();
@@ -8438,7 +8438,7 @@ function Ji(e) {
8438
8438
  }
8439
8439
  return r;
8440
8440
  }
8441
- function eu(e) {
8441
+ function tu(e) {
8442
8442
  var r = {};
8443
8443
  e.skip("uShort");
8444
8444
  var t = e.parseULong();
@@ -8454,32 +8454,32 @@ function eu(e) {
8454
8454
  }
8455
8455
  return r;
8456
8456
  }
8457
- function ru(e, r) {
8457
+ function nu(e, r) {
8458
8458
  var t = new k.Parser(e, r), n = t.parseUShort();
8459
8459
  if (n === 0)
8460
- return Ji(t);
8460
+ return ru(t);
8461
8461
  if (n === 1)
8462
- return eu(t);
8462
+ return tu(t);
8463
8463
  throw new Error("Unsupported kern table version (" + n + ").");
8464
8464
  }
8465
- var tu = { parse: ru };
8466
- function nu(e, r, t, n) {
8465
+ var au = { parse: nu };
8466
+ function su(e, r, t, n) {
8467
8467
  for (var a = new k.Parser(e, r), s = n ? a.parseUShort : a.parseULong, o = [], u = 0; u < t + 1; u += 1) {
8468
8468
  var i = s.call(a);
8469
8469
  n && (i *= 2), o.push(i);
8470
8470
  }
8471
8471
  return o;
8472
8472
  }
8473
- var au = { parse: nu };
8474
- function su(e, r) {
8473
+ var ou = { parse: su };
8474
+ function iu(e, r) {
8475
8475
  var t = require("fs");
8476
8476
  t.readFile(e, function(n, a) {
8477
8477
  if (n)
8478
8478
  return r(n.message);
8479
- r(null, Sn(a));
8479
+ r(null, Tn(a));
8480
8480
  });
8481
8481
  }
8482
- function ou(e, r) {
8482
+ function uu(e, r) {
8483
8483
  var t = new XMLHttpRequest();
8484
8484
  t.open("get", e, !0), t.responseType = "arraybuffer", t.onload = function() {
8485
8485
  return t.response ? r(null, t.response) : r("Font could not be loaded: " + t.statusText);
@@ -8494,7 +8494,7 @@ function Bt(e, r) {
8494
8494
  }
8495
8495
  return t;
8496
8496
  }
8497
- function iu(e, r) {
8497
+ function lu(e, r) {
8498
8498
  for (var t = [], n = 44, a = 0; a < r; a += 1) {
8499
8499
  var s = k.getTag(e, n), o = k.getULong(e, n + 4), u = k.getULong(e, n + 8), i = k.getULong(e, n + 12), l = void 0;
8500
8500
  u < i ? l = "WOFF" : l = !1, t.push({
@@ -8510,7 +8510,7 @@ function iu(e, r) {
8510
8510
  function W(e, r) {
8511
8511
  if (r.compression === "WOFF") {
8512
8512
  var t = new Uint8Array(e.buffer, r.offset + 2, r.compressedLength - 2), n = new Uint8Array(r.length);
8513
- if (Kn(t, n), n.byteLength !== r.length)
8513
+ if (Jn(t, n), n.byteLength !== r.length)
8514
8514
  throw new Error("Decompression error: " + r.tag + " decompressed length doesn't match recorded length");
8515
8515
  var a = new DataView(n.buffer, 0);
8516
8516
  return { data: a, offset: 0 };
@@ -8532,14 +8532,14 @@ function Zr(e, r) {
8532
8532
  a.outlinesFormat = "cff";
8533
8533
  else
8534
8534
  throw new Error("Unsupported OpenType flavor " + i);
8535
- o = k.getUShort(s, 12), u = iu(s, o);
8535
+ o = k.getUShort(s, 12), u = lu(s, o);
8536
8536
  } else
8537
8537
  throw new Error("Unsupported OpenType signature " + i);
8538
8538
  for (var f, c, p, h, d, g, m, x, U, y, L, w, B = 0; B < o; B += 1) {
8539
8539
  var C = u[B], F = void 0;
8540
8540
  switch (C.tag) {
8541
8541
  case "cmap":
8542
- F = W(s, C), a.tables.cmap = $t.parse(F.data, F.offset), a.encoding = new Qt(a.tables.cmap);
8542
+ F = W(s, C), a.tables.cmap = Zt.parse(F.data, F.offset), a.encoding = new Kt(a.tables.cmap);
8543
8543
  break;
8544
8544
  case "cvt ":
8545
8545
  F = W(s, C), w = new k.Parser(F.data, F.offset), a.tables.cvt = w.parseShortList(C.length / 2);
@@ -8551,19 +8551,19 @@ function Zr(e, r) {
8551
8551
  F = W(s, C), w = new k.Parser(F.data, F.offset), a.tables.fpgm = w.parseByteList(C.length);
8552
8552
  break;
8553
8553
  case "head":
8554
- F = W(s, C), a.tables.head = on.parse(F.data, F.offset), a.unitsPerEm = a.tables.head.unitsPerEm, t = a.tables.head.indexToLocFormat;
8554
+ F = W(s, C), a.tables.head = un.parse(F.data, F.offset), a.unitsPerEm = a.tables.head.unitsPerEm, t = a.tables.head.indexToLocFormat;
8555
8555
  break;
8556
8556
  case "hhea":
8557
- F = W(s, C), a.tables.hhea = un.parse(F.data, F.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
8557
+ F = W(s, C), a.tables.hhea = ln.parse(F.data, F.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
8558
8558
  break;
8559
8559
  case "hmtx":
8560
8560
  m = C;
8561
8561
  break;
8562
8562
  case "ltag":
8563
- F = W(s, C), n = fn.parse(F.data, F.offset);
8563
+ F = W(s, C), n = pn.parse(F.data, F.offset);
8564
8564
  break;
8565
8565
  case "maxp":
8566
- F = W(s, C), a.tables.maxp = pn.parse(F.data, F.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
8566
+ F = W(s, C), a.tables.maxp = cn.parse(F.data, F.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
8567
8567
  break;
8568
8568
  case "name":
8569
8569
  y = C;
@@ -8572,7 +8572,7 @@ function Zr(e, r) {
8572
8572
  F = W(s, C), a.tables.os2 = Br.parse(F.data, F.offset);
8573
8573
  break;
8574
8574
  case "post":
8575
- F = W(s, C), a.tables.post = mn.parse(F.data, F.offset), a.glyphNames = new zr(a.tables.post);
8575
+ F = W(s, C), a.tables.post = yn.parse(F.data, F.offset), a.glyphNames = new zr(a.tables.post);
8576
8576
  break;
8577
8577
  case "prep":
8578
8578
  F = W(s, C), w = new k.Parser(F.data, F.offset), a.tables.prep = w.parseByteList(C.length);
@@ -8603,46 +8603,46 @@ function Zr(e, r) {
8603
8603
  break;
8604
8604
  }
8605
8605
  }
8606
- var D = W(s, y);
8607
- if (a.tables.name = gn.parse(D.data, D.offset, n), a.names = a.tables.name, p && U) {
8608
- var R = t === 0, A = W(s, U), H = au.parse(A.data, A.offset, a.numGlyphs, R), Q = W(s, p);
8609
- a.glyphs = Un.parse(Q.data, Q.offset, H, a, r);
8606
+ var R = W(s, y);
8607
+ if (a.tables.name = mn.parse(R.data, R.offset, n), a.names = a.tables.name, p && U) {
8608
+ var A = t === 0, D = W(s, U), H = ou.parse(D.data, D.offset, a.numGlyphs, A), Z = W(s, p);
8609
+ a.glyphs = Cn.parse(Z.data, Z.offset, H, a, r);
8610
8610
  } else if (f) {
8611
8611
  var G = W(s, f);
8612
- sn.parse(G.data, G.offset, a, r);
8612
+ on.parse(G.data, G.offset, a, r);
8613
8613
  } else
8614
8614
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
8615
8615
  var z = W(s, m);
8616
- if (ln.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), ya(a, r), x) {
8616
+ if (fn.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), ba(a, r), x) {
8617
8617
  var Y = W(s, x);
8618
- a.kerningPairs = tu.parse(Y.data, Y.offset);
8618
+ a.kerningPairs = au.parse(Y.data, Y.offset);
8619
8619
  } else
8620
8620
  a.kerningPairs = {};
8621
8621
  if (h) {
8622
8622
  var _ = W(s, h);
8623
- a.tables.gdef = $i.parse(_.data, _.offset);
8623
+ a.tables.gdef = Qi.parse(_.data, _.offset);
8624
8624
  }
8625
8625
  if (d) {
8626
8626
  var P = W(s, d);
8627
- a.tables.gpos = ji.parse(P.data, P.offset), a.position.init();
8627
+ a.tables.gpos = eu.parse(P.data, P.offset), a.position.init();
8628
8628
  }
8629
8629
  if (g) {
8630
8630
  var V = W(s, g);
8631
- a.tables.gsub = yn.parse(V.data, V.offset);
8631
+ a.tables.gsub = xn.parse(V.data, V.offset);
8632
8632
  }
8633
8633
  if (c) {
8634
8634
  var $ = W(s, c);
8635
- a.tables.fvar = Wi.parse($.data, $.offset, a.names);
8635
+ a.tables.fvar = _i.parse($.data, $.offset, a.names);
8636
8636
  }
8637
8637
  if (L) {
8638
8638
  var M = W(s, L);
8639
- a.tables.meta = xn.parse(M.data, M.offset), a.metas = a.tables.meta;
8639
+ a.tables.meta = bn.parse(M.data, M.offset), a.metas = a.tables.meta;
8640
8640
  }
8641
8641
  return a;
8642
8642
  }
8643
- function uu(e, r, t) {
8643
+ function fu(e, r, t) {
8644
8644
  t = t ?? {};
8645
- var n = typeof window > "u", a = n && !t.isUrl ? su : ou;
8645
+ var n = typeof window > "u", a = n && !t.isUrl ? iu : uu;
8646
8646
  return new Promise(function(s, o) {
8647
8647
  a(e, function(u, i) {
8648
8648
  if (u) {
@@ -8664,11 +8664,11 @@ function uu(e, r, t) {
8664
8664
  });
8665
8665
  });
8666
8666
  }
8667
- function lu(e, r) {
8667
+ function pu(e, r) {
8668
8668
  var t = require("fs"), n = t.readFileSync(e);
8669
- return Zr(Sn(n), r);
8669
+ return Zr(Tn(n), r);
8670
8670
  }
8671
- var fu = /* @__PURE__ */ Object.freeze({
8671
+ var cu = /* @__PURE__ */ Object.freeze({
8672
8672
  __proto__: null,
8673
8673
  Font: I,
8674
8674
  Glyph: K,
@@ -8676,10 +8676,10 @@ var fu = /* @__PURE__ */ Object.freeze({
8676
8676
  BoundingBox: he,
8677
8677
  _parse: k,
8678
8678
  parse: Zr,
8679
- load: uu,
8680
- loadSync: lu
8679
+ load: fu,
8680
+ loadSync: pu
8681
8681
  });
8682
- function pu(e, r) {
8682
+ function hu(e, r) {
8683
8683
  const t = { svgGlyphs: r };
8684
8684
  return new Proxy(e, {
8685
8685
  get(n, a, s) {
@@ -8696,7 +8696,7 @@ function pu(e, r) {
8696
8696
  }
8697
8697
  });
8698
8698
  }
8699
- const Ir = /* @__PURE__ */ new Map(), Zu = () => Ir, cu = async (e, r = !1) => {
8699
+ const Ir = /* @__PURE__ */ new Map(), Zu = () => Ir, vu = async (e, r = !1) => {
8700
8700
  const t = Ir.get(e);
8701
8701
  if (t) {
8702
8702
  if (r && !t.svgGlyphs) {
@@ -8715,16 +8715,16 @@ const Ir = /* @__PURE__ */ new Map(), Zu = () => Ir, cu = async (e, r = !1) => {
8715
8715
  throw new Error(
8716
8716
  `Failed to load font from ${e}: ${n.status} ${n.statusText}`
8717
8717
  );
8718
- const a = await n.arrayBuffer(), s = fu.parse(a);
8718
+ const a = await n.arrayBuffer(), s = cu.parse(a);
8719
8719
  let o;
8720
8720
  if (r) {
8721
8721
  const { extractSVGGlyphs: i } = await import("../index-F17NutRZ.js");
8722
8722
  o = await i(a);
8723
8723
  }
8724
- const u = pu(s, o);
8724
+ const u = hu(s, o);
8725
8725
  return Ir.set(e, u), u;
8726
- }, hu = 0.03125, Bn = 1.1, vu = 0.2, $e = {
8727
- outlineWidth: hu,
8726
+ }, du = 0.03125, Mn = 1.1, gu = 0.2, $e = {
8727
+ outlineWidth: du,
8728
8728
  letterSpacing: 0,
8729
8729
  letterSpacingOutline: 0
8730
8730
  };
@@ -8742,18 +8742,18 @@ class fe {
8742
8742
  return `${this.x} ${this.y}`;
8743
8743
  }
8744
8744
  }
8745
- function du(e, r, t = new fe(0, 0)) {
8745
+ function mu(e, r, t = new fe(0, 0)) {
8746
8746
  const n = e.X - t.X, a = e.Y - t.Y, s = r / 180 * Math.PI, o = Math.cos(s), u = Math.sin(s), i = n * o - a * u, l = n * u + a * o;
8747
8747
  return new fe(i + t.X, l + t.Y);
8748
8748
  }
8749
- const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curved" ? { type: "curved" } : e, mu = (e) => {
8749
+ const yu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curved" ? { type: "curved" } : e, xu = (e) => {
8750
8750
  if (!e || !e.trim())
8751
8751
  throw new Error("Custom baseline path must be a non-empty SVG path string");
8752
8752
  if (!e.trim().startsWith("M"))
8753
8753
  throw new Error(
8754
8754
  "Custom baseline path must start with an M (moveto) command"
8755
8755
  );
8756
- }, yu = ({
8756
+ }, bu = ({
8757
8757
  boxDimensions: e,
8758
8758
  totalTextHeight: r,
8759
8759
  baseline: t,
@@ -8773,16 +8773,16 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8773
8773
  break;
8774
8774
  }
8775
8775
  }
8776
- return l += s * (n * Bn), `M 0 ${l} L ${o} ${l}`;
8777
- }, Mn = ({
8776
+ return l += s * (n * Mn), `M 0 ${l} L ${o} ${l}`;
8777
+ }, In = ({
8778
8778
  boxDimensions: e,
8779
8779
  baseline: r,
8780
8780
  textHeight: t,
8781
8781
  verticalAlignment: n
8782
8782
  }) => {
8783
- const { width: a, height: s } = e, o = t * vu, u = t + o, i = n === "top" ? 0 : s / 2 - u / 2, l = r + i, f = l + o;
8783
+ const { width: a, height: s } = e, o = t * gu, u = t + o, i = n === "top" ? 0 : s / 2 - u / 2, l = r + i, f = l + o;
8784
8784
  if (n !== "top" && (f > s || l - t < 0))
8785
- return Mn({
8785
+ return In({
8786
8786
  boxDimensions: e,
8787
8787
  baseline: r,
8788
8788
  textHeight: t,
@@ -8796,7 +8796,7 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8796
8796
  r + i
8797
8797
  ), U = `M ${p.toSVGString()}`, y = `Q ${m.toSVGString()} ${h.toSVGString()}`, L = `Q ${x.toSVGString()} ${d.toSVGString()}`;
8798
8798
  return `${U} ${y} ${L}`;
8799
- }, xu = (e) => {
8799
+ }, Pn = (e) => {
8800
8800
  const r = ["I", "l", "1"];
8801
8801
  for (const t of r) {
8802
8802
  const n = e.charToGlyph(t);
@@ -8806,7 +8806,7 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8806
8806
  return console.error(
8807
8807
  'No standard character found for fixed height calculation. Using "I" as default.'
8808
8808
  ), "I";
8809
- }, Fr = 100, bu = ({
8809
+ }, Fr = 100, Su = ({
8810
8810
  font: e,
8811
8811
  boxDimensions: r,
8812
8812
  physicalSize: t,
@@ -8817,7 +8817,7 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8817
8817
  throw new Error(
8818
8818
  `Mismatched units between physicalFontSize (${a[1]}) and boxDimensions (${r.physicalUnits})`
8819
8819
  );
8820
- const { outlineWidth: s } = n, o = xu(e), i = e.getPath(
8820
+ const { outlineWidth: s } = n, o = Pn(e), i = e.getPath(
8821
8821
  o,
8822
8822
  0,
8823
8823
  0,
@@ -8830,7 +8830,7 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8830
8830
  }
8831
8831
  const c = l / r.height * r.physicalHeight, p = a[0] / c;
8832
8832
  return Fr * p;
8833
- }, Su = ({
8833
+ }, Mt = ({
8834
8834
  font: e,
8835
8835
  text: r,
8836
8836
  fontSize: t,
@@ -8842,7 +8842,7 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8842
8842
  height: h,
8843
8843
  baseline: d
8844
8844
  };
8845
- }, pr = zn, Tu = _n, ku = () => new pr().parseFromString("<svg></svg>", "image/svg+xml"), Fu = ku();
8845
+ }, pr = Vn, Tu = qn, ku = () => new pr().parseFromString("<svg></svg>", "image/svg+xml"), Fu = ku();
8846
8846
  Fu.readyState = "complete";
8847
8847
  const Uu = {
8848
8848
  aliceblue: "#f0f8ff",
@@ -8999,7 +8999,7 @@ const Uu = {
8999
8999
  }, Ur = (e) => {
9000
9000
  const r = typeof e == "string" ? Number.parseInt(e, 10) : e;
9001
9001
  return Math.max(0, Math.min(255, Math.round(r))).toString(16).padStart(2, "0");
9002
- }, Mt = (...e) => {
9002
+ }, It = (...e) => {
9003
9003
  const [r, t, n] = Array.isArray(e[0]) ? e[0] : e;
9004
9004
  return `#${Ur(r)}${Ur(t)}${Ur(n)}`;
9005
9005
  }, wu = (e, r, t) => {
@@ -9014,7 +9014,7 @@ const Uu = {
9014
9014
  Math.round((i + o) * 255),
9015
9015
  Math.round((l + o) * 255)
9016
9016
  ];
9017
- }, Eu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), In = (e) => {
9017
+ }, Eu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), Gn = (e) => {
9018
9018
  const r = e.trim().toLowerCase();
9019
9019
  if (r.startsWith("#") || /^[0-9a-f]{3}([0-9a-f]{3})?$/.test(r))
9020
9020
  return Eu(r) ? Cu(r) : void 0;
@@ -9022,7 +9022,7 @@ const Uu = {
9022
9022
  const n = r.match(
9023
9023
  /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+\s*)?\)/
9024
9024
  );
9025
- return n ? Mt(
9025
+ return n ? It(
9026
9026
  Number.parseInt(n[1], 10),
9027
9027
  Number.parseInt(n[2], 10),
9028
9028
  Number.parseInt(n[3], 10)
@@ -9034,7 +9034,7 @@ const Uu = {
9034
9034
  );
9035
9035
  if (!n) return;
9036
9036
  const a = Number.parseInt(n[1], 10), s = Number.parseFloat(n[2]) / 100, o = Number.parseFloat(n[3]) / 100, [u, i, l] = wu(a, s, o);
9037
- return Mt(u, i, l);
9037
+ return It(u, i, l);
9038
9038
  }
9039
9039
  const t = Uu[r];
9040
9040
  if (t) return t;
@@ -9072,7 +9072,7 @@ const Uu = {
9072
9072
  return r === "none" || !r ? !1 : r;
9073
9073
  }, Cr = (e) => {
9074
9074
  if (!(e === "none" || e === "transparent" || e.startsWith("url(")))
9075
- return In(e);
9075
+ return Gn(e);
9076
9076
  }, Du = (e) => {
9077
9077
  const r = Lu(e).reduce(
9078
9078
  (t, n) => {
@@ -9098,11 +9098,11 @@ const Uu = {
9098
9098
  const r = new pr().parseFromString(e, "image/svg+xml").querySelector("svg");
9099
9099
  return r ? Du(r) : [];
9100
9100
  };
9101
- function Pn(e) {
9101
+ function Nn(e) {
9102
9102
  const r = e.trim(), t = r.startsWith("<svg") || r.startsWith("<?xml"), n = t ? r : `<svg>${r}</svg>`;
9103
9103
  return { doc: new pr().parseFromString(n, "image/svg+xml"), wasWrapped: !t };
9104
9104
  }
9105
- function Gn(e, r) {
9105
+ function Hn(e, r) {
9106
9106
  const t = e.querySelector("svg");
9107
9107
  return t ? r ? t.innerHTML : t.outerHTML : "";
9108
9108
  }
@@ -9125,7 +9125,7 @@ function Mu(e) {
9125
9125
  }
9126
9126
  const Iu = ["fill", "stroke", "clip-path", "mask", "filter"];
9127
9127
  function Pu(e, r) {
9128
- const { doc: t, wasWrapped: n } = Pn(e), a = /* @__PURE__ */ new Map();
9128
+ const { doc: t, wasWrapped: n } = Nn(e), a = /* @__PURE__ */ new Map();
9129
9129
  for (const s of t.querySelectorAll("[id]")) {
9130
9130
  const o = s.getAttribute("id");
9131
9131
  if (!o) continue;
@@ -9153,16 +9153,16 @@ function Pu(e, r) {
9153
9153
  l && s.setAttribute(o, `#${l}`);
9154
9154
  }
9155
9155
  }
9156
- return Gn(t, n);
9156
+ return Hn(t, n);
9157
9157
  }
9158
9158
  const Gu = ["fill", "stroke", "stop-color"], Nu = ["path", "rect", "circle", "ellipse", "polygon", "polyline", "text"];
9159
9159
  function Hu(e, r) {
9160
- const { doc: t, wasWrapped: n } = Pn(e);
9160
+ const { doc: t, wasWrapped: n } = Nn(e);
9161
9161
  for (const s of Gu)
9162
9162
  for (const o of t.querySelectorAll(`[${s}]`)) {
9163
9163
  const u = o.getAttribute(s);
9164
9164
  if (!u || !Bu(u)) continue;
9165
- const i = In(u), l = i ? r[i] : void 0;
9165
+ const i = Gn(u), l = i ? r[i] : void 0;
9166
9166
  l && o.setAttribute(s, l.hex);
9167
9167
  }
9168
9168
  const a = r["#000000"];
@@ -9171,7 +9171,7 @@ function Hu(e, r) {
9171
9171
  for (const o of t.querySelectorAll(s))
9172
9172
  o.setAttribute("fill", a.hex);
9173
9173
  }
9174
- return Gn(t, n);
9174
+ return Hn(t, n);
9175
9175
  }
9176
9176
  const Wu = (e = [1, 0, 0, 1, 0, 0]) => {
9177
9177
  const r = `matrix(${e.join(",")})`, t = new Tu(r);
@@ -9182,7 +9182,7 @@ const Wu = (e = [1, 0, 0, 1, 0, 0]) => {
9182
9182
  function zu(e) {
9183
9183
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
9184
9184
  }
9185
- const It = (e, r, t) => e / t * r, _u = ({
9185
+ const Pt = (e, r, t) => e / t * r, _u = ({
9186
9186
  font: e,
9187
9187
  baselinePath: r,
9188
9188
  text: t,
@@ -9191,75 +9191,75 @@ const It = (e, r, t) => e / t * r, _u = ({
9191
9191
  horizontalAlignment: s = "centre",
9192
9192
  colourMap: o
9193
9193
  }) => {
9194
- const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new Wn(r), c = u ? n * u * 2 : 0, p = f.getTotalLength(), h = e.getPaths(t, 0, 0, n, { drawSVG: !1 }), g = e.getPath(t, 0, 0, n, { drawSVG: !1 }).getBoundingBox(), m = g.x1 - c / 2, U = g.x2 + c / 2 - m, y = u > 0 ? l : i;
9194
+ const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new _n(r), c = u ? n * u * 2 : 0, p = f.getTotalLength(), h = e.getPaths(t, 0, 0, n, { drawSVG: !1 }), g = e.getPath(t, 0, 0, n, { drawSVG: !1 }).getBoundingBox(), m = g.x1 - c / 2, U = g.x2 + c / 2 - m, y = u > 0 ? l : i;
9195
9195
  let L = y ? y * n : 0;
9196
9196
  s === "distributed" && (L = t.length === 1 ? 0 : (p - U) / (t.length - 1));
9197
9197
  const w = L * (t.length - 1), B = U + w;
9198
9198
  let C = 0 - m;
9199
9199
  s === "centre" ? C = (p - B) / 2 - m : s === "right" && (C = p - U - m - w);
9200
9200
  const F = [];
9201
- for (let D = 0; D < h.length; D++) {
9202
- const R = h[D], A = R.getBoundingBox(), H = e.charToGlyph(t[D]), { advanceWidth: Q } = H;
9203
- if (!Q)
9201
+ for (let R = 0; R < h.length; R++) {
9202
+ const A = h[R], D = A.getBoundingBox(), H = e.charToGlyph(t[R]), { advanceWidth: Z } = H;
9203
+ if (!Z)
9204
9204
  throw new Error(
9205
- `No advance width for character: ${t[D]} in font ${e.names.fontFamily}`
9205
+ `No advance width for character: ${t[R]} in font ${e.names.fontFamily}`
9206
9206
  );
9207
- const { x1: G, x2: z } = H.getBoundingBox(), Y = It(
9208
- Q,
9207
+ const { x1: G, x2: z } = H.getBoundingBox(), Y = Pt(
9208
+ Z,
9209
9209
  n,
9210
9210
  e.unitsPerEm
9211
- ), _ = It(z - G, n, e.unitsPerEm);
9212
- let P = C + A.x1;
9213
- if (D > 0 && (P += L * D), P + _ > p)
9211
+ ), _ = Pt(z - G, n, e.unitsPerEm);
9212
+ let P = C + D.x1;
9213
+ if (R > 0 && (P += L * R), P + _ > p)
9214
9214
  throw new Error(
9215
- `TOO_WIDE: character "${t[D]}" at index ${D} exceeds baseline path length (${Math.round(P + _)} > ${Math.round(p)})`
9215
+ `TOO_WIDE: character "${t[R]}" at index ${R} exceeds baseline path length (${Math.round(P + _)} > ${Math.round(p)})`
9216
9216
  );
9217
- const V = P + Y / 2, $ = f.getTangentAtLength(V), M = Math.atan2($.y, $.x) * 180 / Math.PI, q = f.getPointAtLength(P), De = q.x, cr = q.y, Ae = A.x2 - A.x1, Be = new fe(A.x1 + Ae / 2, 0), Me = du(
9218
- new fe(A.x1, 0),
9217
+ const V = P + Y / 2, $ = f.getTangentAtLength(V), M = Math.atan2($.y, $.x) * 180 / Math.PI, q = f.getPointAtLength(P), De = q.x, cr = q.y, Ae = D.x2 - D.x1, Be = new fe(D.x1 + Ae / 2, 0), Me = mu(
9218
+ new fe(D.x1, 0),
9219
9219
  M,
9220
9220
  Be
9221
- ), Ce = De - Me.X, Nn = cr - Me.Y;
9221
+ ), Ce = De - Me.X, Wn = cr - Me.Y;
9222
9222
  let se = Wu();
9223
- se = se.translate(Ce, Nn), M && (se = se.translate(A.x1 + Ae / 2, 0), se = se.rotate(M), se = se.translate(-A.x1 - Ae / 2, 0));
9224
- const Hn = se.toString();
9225
- let ve = R.toPathData(2);
9223
+ se = se.translate(Ce, Wn), M && (se = se.translate(D.x1 + Ae / 2, 0), se = se.rotate(M), se = se.translate(-D.x1 - Ae / 2, 0));
9224
+ const zn = se.toString();
9225
+ let ve = A.toPathData(2);
9226
9226
  ve.length && !ve.endsWith("Z") && (ve += "Z", ve = ve.replace(/M/g, "ZM"), ve = ve.substring(1));
9227
9227
  let hr;
9228
9228
  if (e.svgGlyphs) {
9229
9229
  const vr = e.svgGlyphs.get(H.index);
9230
9230
  if (vr) {
9231
9231
  let Ie = Mu(vr.svg);
9232
- Ie = Pu(Ie, `g${H.index}-${D}`), o && (Ie = Hu(Ie, o)), hr = {
9232
+ Ie = Pu(Ie, `g${H.index}-${R}`), o && (Ie = Hu(Ie, o)), hr = {
9233
9233
  content: Ie,
9234
9234
  viewBox: vr.viewbox,
9235
- x: A.x1,
9236
- y: A.y1,
9237
- width: A.x2 - A.x1,
9238
- height: A.y2 - A.y1,
9235
+ x: D.x1,
9236
+ y: D.y1,
9237
+ width: D.x2 - D.x1,
9238
+ height: D.y2 - D.y1,
9239
9239
  glyphIndex: H.index
9240
9240
  };
9241
9241
  }
9242
9242
  }
9243
9243
  F.push({
9244
- path: R,
9244
+ path: A,
9245
9245
  matrix: se,
9246
9246
  attributes: {
9247
9247
  d: ve,
9248
- "data-character": zu(t[D]),
9249
- transform: Hn
9248
+ "data-character": zu(t[R]),
9249
+ transform: zn
9250
9250
  },
9251
9251
  glyphData: {
9252
9252
  index: H.index,
9253
- bbox: A
9253
+ bbox: D
9254
9254
  },
9255
9255
  ...hr ? { svgGlyph: hr } : {}
9256
9256
  });
9257
9257
  }
9258
9258
  return F;
9259
- }, Pt = { hex: "#FFFFFF" }, Pr = (e, r) => {
9259
+ }, Gt = { hex: "#FFFFFF" }, Pr = (e, r) => {
9260
9260
  const t = `data-${e}-colour-url`, n = [`${e}="${r.hex}"`];
9261
9261
  return r.reference && n.push(`${t}="${r.reference}"`), n.join(" ");
9262
- }, Gt = (e, r) => {
9262
+ }, Nt = (e, r) => {
9263
9263
  const { attributes: t, svgGlyph: n } = e;
9264
9264
  return n ? `<g transform="${t.transform}" data-character="${t["data-character"]}"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${n.viewBox}" width="${n.width}" height="${n.height}" x="${n.x}" y="${n.y}" data-glyph-index="${n.glyphIndex}">${n.content}</svg></g>` : `<path d="${t.d}" ${Pr("fill", r)} transform="${t.transform}" data-character="${t["data-character"]}"/>`;
9265
9265
  }, Vu = ({
@@ -9267,8 +9267,8 @@ const It = (e, r, t) => e / t * r, _u = ({
9267
9267
  paths: r,
9268
9268
  spacing: t = $e,
9269
9269
  fontSize: n = 0,
9270
- fillColour: a = Pt,
9271
- strokeColour: s = Pt
9270
+ fillColour: a = Gt,
9271
+ strokeColour: s = Gt
9272
9272
  }) => {
9273
9273
  const { width: o, height: u } = e, { outlineWidth: i } = t, l = i > 0 && n > 0;
9274
9274
  let f;
@@ -9276,18 +9276,18 @@ const It = (e, r, t) => e / t * r, _u = ({
9276
9276
  const p = n * i * 2, h = r.filter((g) => !g.svgGlyph).map(
9277
9277
  ({ attributes: g }) => `<path d="${g.d}" ${Pr("fill", s)} ${Pr("stroke", s)} stroke-width="${p}" stroke-linejoin="round" transform="${g.transform}" data-character="${g["data-character"]}"/>`
9278
9278
  ).join(`
9279
- `), d = r.map((g) => Gt(g, a)).join(`
9279
+ `), d = r.map((g) => Nt(g, a)).join(`
9280
9280
  `);
9281
9281
  f = `${h}
9282
9282
  ${d}`;
9283
9283
  } else
9284
- f = r.map((p) => Gt(p, a)).join(`
9284
+ f = r.map((p) => Nt(p, a)).join(`
9285
9285
  `);
9286
9286
  const c = f ? `
9287
9287
  ${f}
9288
9288
  ` : "";
9289
9289
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${u}" viewBox="0 0 ${o} ${u}">${c}</svg>`;
9290
- }, Nt = (e) => {
9290
+ }, Ht = (e) => {
9291
9291
  const {
9292
9292
  text: r,
9293
9293
  font: t,
@@ -9314,85 +9314,92 @@ const It = (e, r, t) => e / t * r, _u = ({
9314
9314
  throw new Error(
9315
9315
  `physicalSize height must be positive (got ${n[0]})`
9316
9316
  );
9317
- const x = a ?? bu({
9317
+ const x = a ?? Su({
9318
9318
  font: t,
9319
9319
  boxDimensions: s,
9320
9320
  physicalSize: n,
9321
9321
  spacing: o
9322
- }), U = gu(i);
9322
+ }), U = yu(i);
9323
9323
  let y = r.split(`
9324
- `).filter((R) => R.length > 0);
9324
+ `).filter((A) => A.length > 0);
9325
9325
  y.length || (y = [""]), (U.type === "curved" || U.type === "custom") && (y = [y.join("")]);
9326
9326
  const L = y.map(
9327
- (R) => Su({ font: t, text: R, fontSize: x, spacing: o })
9328
- ), w = Math.max(...L.map((R) => R.baseline)), B = Math.max(...L.map((R) => R.height - R.baseline)), C = w + B, F = y.length === 1 ? C : C + C * (y.length - 1) * Bn, D = [];
9329
- for (let R = 0; R < y.length; R++) {
9330
- let A;
9327
+ (A) => Mt({ font: t, text: A, fontSize: x, spacing: o })
9328
+ ), w = Math.max(...L.map((A) => A.baseline)), B = Math.max(...L.map((A) => A.height - A.baseline)), C = w + B, F = y.length === 1 ? C : C + C * (y.length - 1) * Mn, R = [];
9329
+ for (let A = 0; A < y.length; A++) {
9330
+ let D;
9331
9331
  switch (U.type) {
9332
9332
  case "custom":
9333
- mu(U.path), A = U.path;
9333
+ xu(U.path), D = U.path;
9334
9334
  break;
9335
- case "curved":
9336
- A = Mn({
9335
+ case "curved": {
9336
+ const Z = Mt({
9337
+ font: t,
9338
+ text: Pn(t),
9339
+ fontSize: x,
9340
+ spacing: o
9341
+ });
9342
+ D = In({
9337
9343
  boxDimensions: s,
9338
- baseline: L[R].baseline,
9339
- textHeight: L[R].height,
9344
+ baseline: Z.baseline,
9345
+ textHeight: Z.height,
9340
9346
  verticalAlignment: u
9341
9347
  });
9342
9348
  break;
9349
+ }
9343
9350
  case "flat":
9344
- A = yu({
9351
+ D = bu({
9345
9352
  boxDimensions: s,
9346
9353
  totalTextHeight: F,
9347
9354
  baseline: w,
9348
9355
  lineHeight: C,
9349
9356
  verticalAlignment: u,
9350
- lineNumber: R
9357
+ lineNumber: A
9351
9358
  });
9352
9359
  break;
9353
9360
  }
9354
9361
  const H = _u({
9355
9362
  font: t,
9356
- baselinePath: A,
9357
- text: y[R],
9363
+ baselinePath: D,
9364
+ text: y[A],
9358
9365
  fontSize: x,
9359
9366
  spacing: o,
9360
9367
  horizontalAlignment: l,
9361
9368
  colourMap: p
9362
9369
  });
9363
- D.push(...H);
9370
+ R.push(...H);
9364
9371
  }
9365
9372
  return Vu({
9366
9373
  boxDimensions: s,
9367
- paths: D,
9374
+ paths: R,
9368
9375
  spacing: o,
9369
9376
  fontSize: x,
9370
9377
  fillColour: f,
9371
9378
  strokeColour: c
9372
9379
  });
9373
9380
  }, Ku = async (e) => {
9374
- const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await cu(r, a);
9381
+ const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await vu(r, a);
9375
9382
  try {
9376
- return Nt({ ...n, font: s });
9383
+ return Ht({ ...n, font: s });
9377
9384
  } catch (o) {
9378
9385
  if (t != null && o instanceof Error && o.message.startsWith("TOO_WIDE"))
9379
- return Nt({ ...n, font: s, fontSize: t });
9386
+ return Ht({ ...n, font: s, fontSize: t });
9380
9387
  throw o;
9381
9388
  }
9382
9389
  };
9383
9390
  export {
9384
- hu as DEFAULT_OUTLINE_FACTOR,
9391
+ du as DEFAULT_OUTLINE_FACTOR,
9385
9392
  $e as DEFAULT_SPACING,
9386
- Bn as LINE_HEIGHT,
9387
- Mn as generateCurvedBaseline,
9388
- yu as generateFlatBaseline,
9393
+ Mn as LINE_HEIGHT,
9394
+ In as generateCurvedBaseline,
9395
+ bu as generateFlatBaseline,
9389
9396
  Zu as getFontCache,
9390
9397
  Qu as getFontColours,
9391
- bu as getFontSizeFromPhysicalSize,
9398
+ Su as getFontSizeFromPhysicalSize,
9392
9399
  Ku as getRenderedText,
9393
- Su as getTextMetricsAtFontSize,
9394
- cu as loadOpentypeFont,
9395
- gu as normaliseBaselineOption,
9396
- Nt as renderText,
9397
- mu as validateCustomBaselinePath
9400
+ Mt as getTextMetricsAtFontSize,
9401
+ vu as loadOpentypeFont,
9402
+ yu as normaliseBaselineOption,
9403
+ Ht as renderText,
9404
+ xu as validateCustomBaselinePath
9398
9405
  };