@mlightcad/mtext-renderer 0.5.0 → 0.5.1

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as R from "three";
2
- import { ShapePath as Fa, ExtrudeGeometry as Ta, BufferGeometry as ut, BufferAttribute as wa } from "three";
2
+ import { ShapePath as Ta, ExtrudeGeometry as wa, BufferGeometry as ot, BufferAttribute as Ca } from "three";
3
3
  class xr {
4
4
  constructor() {
5
5
  this.listeners = [];
@@ -34,7 +34,7 @@ class xr {
34
34
  n.call(null, e, ...r);
35
35
  }
36
36
  }
37
- class Ca {
37
+ class Ea {
38
38
  constructor() {
39
39
  this.cache = /* @__PURE__ */ new Map();
40
40
  }
@@ -90,9 +90,9 @@ class Ca {
90
90
  return `${e}_${r}`;
91
91
  }
92
92
  }
93
- class kn {
93
+ class Fn {
94
94
  constructor() {
95
- this.unsupportedChars = {}, this.cache = new Ca();
95
+ this.unsupportedChars = {}, this.cache = new Ea();
96
96
  }
97
97
  /**
98
98
  * Records an unsupported character in the font.
@@ -103,7 +103,7 @@ class kn {
103
103
  this.unsupportedChars[e] || (this.unsupportedChars[e] = 0), this.unsupportedChars[e]++;
104
104
  }
105
105
  }
106
- class Fn extends R.Shape {
106
+ class Tn extends R.Shape {
107
107
  /**
108
108
  * Creates a new instance of BaseTextShape
109
109
  * @param char - The character this shape represents */
@@ -111,9 +111,9 @@ class Fn extends R.Shape {
111
111
  super(), this.width = 0, this.char = e;
112
112
  }
113
113
  }
114
- const Ht = (t, e) => e.some((r) => t instanceof r);
114
+ const _t = (t, e) => e.some((r) => t instanceof r);
115
115
  let br, Sr;
116
- function Ea() {
116
+ function Oa() {
117
117
  return br || (br = [
118
118
  IDBDatabase,
119
119
  IDBObjectStore,
@@ -122,15 +122,15 @@ function Ea() {
122
122
  IDBTransaction
123
123
  ]);
124
124
  }
125
- function Oa() {
125
+ function Ua() {
126
126
  return Sr || (Sr = [
127
127
  IDBCursor.prototype.advance,
128
128
  IDBCursor.prototype.continue,
129
129
  IDBCursor.prototype.continuePrimaryKey
130
130
  ]);
131
131
  }
132
- const zt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap();
133
- function Ua(t) {
132
+ const Ht = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap();
133
+ function La(t) {
134
134
  const e = new Promise((r, n) => {
135
135
  const a = () => {
136
136
  t.removeEventListener("success", s), t.removeEventListener("error", i);
@@ -141,10 +141,10 @@ function Ua(t) {
141
141
  };
142
142
  t.addEventListener("success", s), t.addEventListener("error", i);
143
143
  });
144
- return mt.set(e, t), e;
144
+ return vt.set(e, t), e;
145
145
  }
146
- function La(t) {
147
- if (zt.has(t))
146
+ function Ra(t) {
147
+ if (Ht.has(t))
148
148
  return;
149
149
  const e = new Promise((r, n) => {
150
150
  const a = () => {
@@ -156,13 +156,13 @@ function La(t) {
156
156
  };
157
157
  t.addEventListener("complete", s), t.addEventListener("error", i), t.addEventListener("abort", i);
158
158
  });
159
- zt.set(t, e);
159
+ Ht.set(t, e);
160
160
  }
161
- let Wt = {
161
+ let zt = {
162
162
  get(t, e, r) {
163
163
  if (t instanceof IDBTransaction) {
164
164
  if (e === "done")
165
- return zt.get(t);
165
+ return Ht.get(t);
166
166
  if (e === "store")
167
167
  return r.objectStoreNames[1] ? void 0 : r.objectStore(r.objectStoreNames[0]);
168
168
  }
@@ -175,29 +175,29 @@ let Wt = {
175
175
  return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
176
176
  }
177
177
  };
178
- function Tn(t) {
179
- Wt = t(Wt);
178
+ function wn(t) {
179
+ zt = t(zt);
180
180
  }
181
- function Ra(t) {
182
- return Oa().includes(t) ? function(...e) {
183
- return t.apply(Vt(this), e), Re(this.request);
181
+ function Aa(t) {
182
+ return Ua().includes(t) ? function(...e) {
183
+ return t.apply(Wt(this), e), Re(this.request);
184
184
  } : function(...e) {
185
- return Re(t.apply(Vt(this), e));
185
+ return Re(t.apply(Wt(this), e));
186
186
  };
187
187
  }
188
- function Aa(t) {
189
- return typeof t == "function" ? Ra(t) : (t instanceof IDBTransaction && La(t), Ht(t, Ea()) ? new Proxy(t, Wt) : t);
188
+ function Ma(t) {
189
+ return typeof t == "function" ? Aa(t) : (t instanceof IDBTransaction && Ra(t), _t(t, Oa()) ? new Proxy(t, zt) : t);
190
190
  }
191
191
  function Re(t) {
192
192
  if (t instanceof IDBRequest)
193
- return Ua(t);
194
- if (kt.has(t))
195
- return kt.get(t);
196
- const e = Aa(t);
197
- return e !== t && (kt.set(t, e), mt.set(e, t)), e;
198
- }
199
- const Vt = (t) => mt.get(t);
200
- function Ma(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
193
+ return La(t);
194
+ if (St.has(t))
195
+ return St.get(t);
196
+ const e = Ma(t);
197
+ return e !== t && (St.set(t, e), vt.set(e, t)), e;
198
+ }
199
+ const Wt = (t) => vt.get(t);
200
+ function Pa(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
201
201
  const i = indexedDB.open(t, e), o = Re(i);
202
202
  return n && i.addEventListener("upgradeneeded", (u) => {
203
203
  n(Re(i.result), u.oldVersion, u.newVersion, Re(i.transaction), u);
@@ -211,16 +211,16 @@ function Ma(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
211
211
  }).catch(() => {
212
212
  }), o;
213
213
  }
214
- const Pa = ["get", "getKey", "getAll", "getAllKeys", "count"], Ba = ["put", "add", "delete", "clear"], Ft = /* @__PURE__ */ new Map();
214
+ const Ba = ["get", "getKey", "getAll", "getAllKeys", "count"], Ia = ["put", "add", "delete", "clear"], kt = /* @__PURE__ */ new Map();
215
215
  function kr(t, e) {
216
216
  if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
217
217
  return;
218
- if (Ft.get(e))
219
- return Ft.get(e);
220
- const r = e.replace(/FromIndex$/, ""), n = e !== r, a = Ba.includes(r);
218
+ if (kt.get(e))
219
+ return kt.get(e);
220
+ const r = e.replace(/FromIndex$/, ""), n = e !== r, a = Ia.includes(r);
221
221
  if (
222
222
  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
223
- !(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(a || Pa.includes(r))
223
+ !(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(a || Ba.includes(r))
224
224
  )
225
225
  return;
226
226
  const s = async function(i, ...o) {
@@ -231,39 +231,39 @@ function kr(t, e) {
231
231
  a && u.done
232
232
  ]))[0];
233
233
  };
234
- return Ft.set(e, s), s;
234
+ return kt.set(e, s), s;
235
235
  }
236
- Tn((t) => ({
236
+ wn((t) => ({
237
237
  ...t,
238
238
  get: (e, r, n) => kr(e, r) || t.get(e, r, n),
239
239
  has: (e, r) => !!kr(e, r) || t.has(e, r)
240
240
  }));
241
- const Ia = ["continue", "continuePrimaryKey", "advance"], Fr = {}, qt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Da = {
241
+ const Da = ["continue", "continuePrimaryKey", "advance"], Fr = {}, Vt = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Ga = {
242
242
  get(t, e) {
243
- if (!Ia.includes(e))
243
+ if (!Da.includes(e))
244
244
  return t[e];
245
245
  let r = Fr[e];
246
246
  return r || (r = Fr[e] = function(...n) {
247
- qt.set(this, wn.get(this)[e](...n));
247
+ Vt.set(this, Cn.get(this)[e](...n));
248
248
  }), r;
249
249
  }
250
250
  };
251
- async function* Ga(...t) {
251
+ async function* Na(...t) {
252
252
  let e = this;
253
253
  if (e instanceof IDBCursor || (e = await e.openCursor(...t)), !e)
254
254
  return;
255
255
  e = e;
256
- const r = new Proxy(e, Da);
257
- for (wn.set(r, e), mt.set(r, Vt(e)); e; )
258
- yield r, e = await (qt.get(r) || e.continue()), qt.delete(r);
256
+ const r = new Proxy(e, Ga);
257
+ for (Cn.set(r, e), vt.set(r, Wt(e)); e; )
258
+ yield r, e = await (Vt.get(r) || e.continue()), Vt.delete(r);
259
259
  }
260
260
  function Tr(t, e) {
261
- return e === Symbol.asyncIterator && Ht(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && Ht(t, [IDBIndex, IDBObjectStore]);
261
+ return e === Symbol.asyncIterator && _t(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && _t(t, [IDBIndex, IDBObjectStore]);
262
262
  }
263
- Tn((t) => ({
263
+ wn((t) => ({
264
264
  ...t,
265
265
  get(e, r, n) {
266
- return Tr(e, r) ? Ga : t.get(e, r, n);
266
+ return Tr(e, r) ? Na : t.get(e, r, n);
267
267
  },
268
268
  has(e, r) {
269
269
  return Tr(e, r) || t.has(e, r);
@@ -271,7 +271,7 @@ Tn((t) => ({
271
271
  }));
272
272
  const Pe = {
273
273
  fonts: "fonts"
274
- }, Tt = [
274
+ }, Ft = [
275
275
  {
276
276
  version: 1,
277
277
  stores: [
@@ -361,7 +361,7 @@ const Pe = {
361
361
  async getDatabase() {
362
362
  if (this.isClosing)
363
363
  throw new Error("Cannot perform operation while database is closing");
364
- return this.db ? this.db : (this.db = await Ma(
364
+ return this.db ? this.db : (this.db = await Pa(
365
365
  ee.DATABASE_NAME,
366
366
  ee.DATABASE_VERSION,
367
367
  {
@@ -384,7 +384,7 @@ const Pe = {
384
384
  * @param newVersion The new version of the database
385
385
  */
386
386
  handleUpgrade(e, r, n) {
387
- const a = Tt.filter(
387
+ const a = Ft.filter(
388
388
  (s) => s.version > r && (!n || s.version <= n)
389
389
  );
390
390
  for (const s of a)
@@ -400,16 +400,16 @@ const Pe = {
400
400
  e.objectStoreNames.contains(n.name) || e.createObjectStore(n.name, { keyPath: n.keyPath });
401
401
  }
402
402
  };
403
- ee.DATABASE_NAME = "mlightcad", ee.DATABASE_VERSION = Tt[Tt.length - 1].version;
403
+ ee.DATABASE_NAME = "mlightcad", ee.DATABASE_VERSION = Ft[Ft.length - 1].version;
404
404
  let ze = ee;
405
- const Na = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").pop(), wr = (t) => {
406
- const e = Cn(t);
405
+ const _a = (t) => t.substring(t.lastIndexOf(".") + 1), En = (t) => t.split("/").pop(), wr = (t) => {
406
+ const e = En(t);
407
407
  if (e) {
408
408
  const r = e.lastIndexOf(".");
409
409
  return r === -1 ? e : e.substring(0, r);
410
410
  }
411
411
  return t;
412
- }, _a = [
412
+ }, Ha = [
413
413
  0,
414
414
  16711680,
415
415
  16776960,
@@ -667,19 +667,19 @@ const Na = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").
667
667
  14079702,
668
668
  16777215,
669
669
  0
670
- ], Ha = (t) => _a[t];
671
- let za = class {
670
+ ], za = (t) => Ha[t];
671
+ let Wa = class {
672
672
  constructor(e) {
673
673
  this.isFont = !0, this.type = "Font", this.data = e;
674
674
  }
675
675
  generateShapes(e, r = 100) {
676
- const n = [], a = Wa(e, r, this.data);
676
+ const n = [], a = Va(e, r, this.data);
677
677
  for (let s = 0, i = a.length; s < i; s++)
678
678
  n.push(...a[s].toShapes());
679
679
  return n;
680
680
  }
681
681
  };
682
- function Wa(t, e, r) {
682
+ function Va(t, e, r) {
683
683
  const n = Array.from(t), a = e / r.resolution, s = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * a, i = [];
684
684
  let o = 0, u = 0;
685
685
  for (let l = 0; l < n.length; l++) {
@@ -688,19 +688,19 @@ function Wa(t, e, r) {
688
688
  `)
689
689
  o = 0, u -= s;
690
690
  else {
691
- const f = Va(h, a, o, u, r);
691
+ const f = qa(h, a, o, u, r);
692
692
  o += f.offsetX, i.push(f.path);
693
693
  }
694
694
  }
695
695
  return i;
696
696
  }
697
- function Va(t, e, r, n, a) {
697
+ function qa(t, e, r, n, a) {
698
698
  const s = a.glyphs[t] || a.glyphs["?"];
699
699
  if (!s) {
700
700
  console.error('THREE.Font: character "' + t + '" does not exists in font family ' + a.familyName + ".");
701
701
  return;
702
702
  }
703
- const i = new Fa();
703
+ const i = new Ta();
704
704
  let o, u, l, h, f, c, p, d;
705
705
  if (s.o) {
706
706
  const v = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
@@ -749,14 +749,14 @@ String.prototype.codePointAt || function() {
749
749
  writable: !0
750
750
  }) : String.prototype.codePointAt = e;
751
751
  }();
752
- var rr = 0, En = -3;
752
+ var rr = 0, On = -3;
753
753
  function Ve() {
754
754
  this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
755
755
  }
756
- function qa(t, e) {
756
+ function Xa(t, e) {
757
757
  this.source = t, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new Ve(), this.dtree = new Ve();
758
758
  }
759
- var On = new Ve(), Un = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Ln = new Uint8Array(30), Rn = new Uint16Array(30), Xa = new Uint8Array([
759
+ var Un = new Ve(), Ln = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Rn = new Uint8Array(30), An = new Uint16Array(30), Ya = new Uint8Array([
760
760
  16,
761
761
  17,
762
762
  18,
@@ -777,7 +777,7 @@ var On = new Ve(), Un = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(
777
777
  1,
778
778
  15
779
779
  ]), Cr = new Ve(), ce = new Uint8Array(320);
780
- function An(t, e, r, n) {
780
+ function Mn(t, e, r, n) {
781
781
  var a, s;
782
782
  for (a = 0; a < r; ++a)
783
783
  t[a] = 0;
@@ -786,7 +786,7 @@ function An(t, e, r, n) {
786
786
  for (s = n, a = 0; a < 30; ++a)
787
787
  e[a] = s, s += 1 << t[a];
788
788
  }
789
- function Ya(t, e) {
789
+ function Za(t, e) {
790
790
  var r;
791
791
  for (r = 0; r < 7; ++r)
792
792
  t.table[r] = 0;
@@ -804,7 +804,7 @@ function Ya(t, e) {
804
804
  e.trans[r] = r;
805
805
  }
806
806
  var Er = new Uint16Array(16);
807
- function wt(t, e, r, n) {
807
+ function Tt(t, e, r, n) {
808
808
  var a, s;
809
809
  for (a = 0; a < 16; ++a)
810
810
  t.table[a] = 0;
@@ -815,7 +815,7 @@ function wt(t, e, r, n) {
815
815
  for (a = 0; a < n; ++a)
816
816
  e[r + a] && (t.trans[Er[e[r + a]]++] = a);
817
817
  }
818
- function Za(t) {
818
+ function ja(t) {
819
819
  t.bitcount-- || (t.tag = t.source[t.sourceIndex++], t.bitcount = 7);
820
820
  var e = t.tag & 1;
821
821
  return t.tag >>>= 1, e;
@@ -828,7 +828,7 @@ function fe(t, e, r) {
828
828
  var n = t.tag & 65535 >>> 16 - e;
829
829
  return t.tag >>>= e, t.bitcount -= e, n + r;
830
830
  }
831
- function Xt(t, e) {
831
+ function qt(t, e) {
832
832
  for (; t.bitcount < 24; )
833
833
  t.tag |= t.source[t.sourceIndex++] << t.bitcount, t.bitcount += 8;
834
834
  var r = 0, n = 0, a = 0, s = t.tag;
@@ -837,16 +837,16 @@ function Xt(t, e) {
837
837
  while (n >= 0);
838
838
  return t.tag = s, t.bitcount -= a, e.trans[r + n];
839
839
  }
840
- function ja(t, e, r) {
840
+ function Ka(t, e, r) {
841
841
  var n, a, s, i, o, u;
842
842
  for (n = fe(t, 5, 257), a = fe(t, 5, 1), s = fe(t, 4, 4), i = 0; i < 19; ++i)
843
843
  ce[i] = 0;
844
844
  for (i = 0; i < s; ++i) {
845
845
  var l = fe(t, 3, 0);
846
- ce[Xa[i]] = l;
846
+ ce[Ya[i]] = l;
847
847
  }
848
- for (wt(Cr, ce, 0, 19), o = 0; o < n + a; ) {
849
- var h = Xt(t, Cr);
848
+ for (Tt(Cr, ce, 0, 19), o = 0; o < n + a; ) {
849
+ var h = qt(t, Cr);
850
850
  switch (h) {
851
851
  case 16:
852
852
  var f = ce[o - 1];
@@ -866,58 +866,58 @@ function ja(t, e, r) {
866
866
  break;
867
867
  }
868
868
  }
869
- wt(e, ce, 0, n), wt(r, ce, n, a);
869
+ Tt(e, ce, 0, n), Tt(r, ce, n, a);
870
870
  }
871
871
  function Or(t, e, r) {
872
872
  for (; ; ) {
873
- var n = Xt(t, e);
873
+ var n = qt(t, e);
874
874
  if (n === 256)
875
875
  return rr;
876
876
  if (n < 256)
877
877
  t.dest[t.destLen++] = n;
878
878
  else {
879
879
  var a, s, i, o;
880
- for (n -= 257, a = fe(t, nr[n], ar[n]), s = Xt(t, r), i = t.destLen - fe(t, Ln[s], Rn[s]), o = i; o < i + a; ++o)
880
+ for (n -= 257, a = fe(t, nr[n], ar[n]), s = qt(t, r), i = t.destLen - fe(t, Rn[s], An[s]), o = i; o < i + a; ++o)
881
881
  t.dest[t.destLen++] = t.dest[o];
882
882
  }
883
883
  }
884
884
  }
885
- function Ka(t) {
885
+ function Qa(t) {
886
886
  for (var e, r, n; t.bitcount > 8; )
887
887
  t.sourceIndex--, t.bitcount -= 8;
888
888
  if (e = t.source[t.sourceIndex + 1], e = 256 * e + t.source[t.sourceIndex], r = t.source[t.sourceIndex + 3], r = 256 * r + t.source[t.sourceIndex + 2], e !== (~r & 65535))
889
- return En;
889
+ return On;
890
890
  for (t.sourceIndex += 4, n = e; n; --n)
891
891
  t.dest[t.destLen++] = t.source[t.sourceIndex++];
892
892
  return t.bitcount = 0, rr;
893
893
  }
894
- function Qa(t, e) {
895
- var r = new qa(t, e), n, a, s;
894
+ function $a(t, e) {
895
+ var r = new Xa(t, e), n, a, s;
896
896
  do {
897
- switch (n = Za(r), a = fe(r, 2, 0), a) {
897
+ switch (n = ja(r), a = fe(r, 2, 0), a) {
898
898
  case 0:
899
- s = Ka(r);
899
+ s = Qa(r);
900
900
  break;
901
901
  case 1:
902
- s = Or(r, On, Un);
902
+ s = Or(r, Un, Ln);
903
903
  break;
904
904
  case 2:
905
- ja(r, r.ltree, r.dtree), s = Or(r, r.ltree, r.dtree);
905
+ Ka(r, r.ltree, r.dtree), s = Or(r, r.ltree, r.dtree);
906
906
  break;
907
907
  default:
908
- s = En;
908
+ s = On;
909
909
  }
910
910
  if (s !== rr)
911
911
  throw new Error("Data error");
912
912
  } while (!n);
913
913
  return r.destLen < r.dest.length ? typeof r.dest.slice == "function" ? r.dest.slice(0, r.destLen) : r.dest.subarray(0, r.destLen) : r.dest;
914
914
  }
915
- Ya(On, Un);
916
- An(nr, ar, 4, 3);
917
- An(Ln, Rn, 2, 1);
915
+ Za(Un, Ln);
916
+ Mn(nr, ar, 4, 3);
917
+ Mn(Rn, An, 2, 1);
918
918
  nr[28] = 0;
919
919
  ar[28] = 258;
920
- var $a = Qa;
920
+ var Ja = $a;
921
921
  function Me(t, e, r, n, a) {
922
922
  return Math.pow(1 - a, 3) * t + 3 * Math.pow(1 - a, 2) * a * e + 3 * (1 - a) * Math.pow(a, 2) * r + Math.pow(a, 3) * n;
923
923
  }
@@ -1072,13 +1072,13 @@ V.prototype.toDOMElement = function(t) {
1072
1072
  var e = this.toPathData(t), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
1073
1073
  return r.setAttribute("d", e), r;
1074
1074
  };
1075
- function Mn(t) {
1075
+ function Pn(t) {
1076
1076
  throw new Error(t);
1077
1077
  }
1078
1078
  function Ur(t, e) {
1079
- t || Mn(e);
1079
+ t || Pn(e);
1080
1080
  }
1081
- var U = { fail: Mn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, De = {}, k = {}, L = {};
1081
+ var U = { fail: Pn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, De = {}, k = {}, L = {};
1082
1082
  function le(t) {
1083
1083
  return function() {
1084
1084
  return t;
@@ -1204,7 +1204,7 @@ k.UTF16 = function(t) {
1204
1204
  L.UTF16 = function(t) {
1205
1205
  return t.length * 2;
1206
1206
  };
1207
- var Yt = {
1207
+ var Xt = {
1208
1208
  "x-mac-croatian": (
1209
1209
  // Python: 'mac_croatian'
1210
1210
  "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
@@ -1247,7 +1247,7 @@ var Yt = {
1247
1247
  )
1248
1248
  };
1249
1249
  De.MACSTRING = function(t, e, r, n) {
1250
- var a = Yt[n];
1250
+ var a = Xt[n];
1251
1251
  if (a !== void 0) {
1252
1252
  for (var s = "", i = 0; i < r; i++) {
1253
1253
  var o = t.getUint8(e + i);
@@ -1256,29 +1256,29 @@ De.MACSTRING = function(t, e, r, n) {
1256
1256
  return s;
1257
1257
  }
1258
1258
  };
1259
- var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, Ja = function(t) {
1260
- if (!at) {
1261
- at = {};
1262
- for (var e in Yt)
1263
- at[e] = new String(e);
1259
+ var rt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), nt, es = function(t) {
1260
+ if (!nt) {
1261
+ nt = {};
1262
+ for (var e in Xt)
1263
+ nt[e] = new String(e);
1264
1264
  }
1265
- var r = at[t];
1265
+ var r = nt[t];
1266
1266
  if (r !== void 0) {
1267
- if (nt) {
1268
- var n = nt.get(r);
1267
+ if (rt) {
1268
+ var n = rt.get(r);
1269
1269
  if (n !== void 0)
1270
1270
  return n;
1271
1271
  }
1272
- var a = Yt[t];
1272
+ var a = Xt[t];
1273
1273
  if (a !== void 0) {
1274
1274
  for (var s = {}, i = 0; i < a.length; i++)
1275
1275
  s[a.charCodeAt(i)] = i + 128;
1276
- return nt && nt.set(r, s), s;
1276
+ return rt && rt.set(r, s), s;
1277
1277
  }
1278
1278
  }
1279
1279
  };
1280
1280
  k.MACSTRING = function(t, e) {
1281
- var r = Ja(e);
1281
+ var r = es(e);
1282
1282
  if (r !== void 0) {
1283
1283
  for (var n = [], a = 0; a < t.length; a++) {
1284
1284
  var s = t.charCodeAt(a);
@@ -1293,18 +1293,18 @@ L.MACSTRING = function(t, e) {
1293
1293
  var r = k.MACSTRING(t, e);
1294
1294
  return r !== void 0 ? r.length : 0;
1295
1295
  };
1296
- function Zt(t) {
1296
+ function Yt(t) {
1297
1297
  return t >= -128 && t <= 127;
1298
1298
  }
1299
- function es(t, e, r) {
1299
+ function ts(t, e, r) {
1300
1300
  for (var n = 0, a = t.length; e < a && n < 64 && t[e] === 0; )
1301
1301
  ++e, ++n;
1302
1302
  return r.push(128 | n - 1), e;
1303
1303
  }
1304
- function ts(t, e, r) {
1304
+ function rs(t, e, r) {
1305
1305
  for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
1306
1306
  var i = t[s];
1307
- if (!Zt(i) || i === 0 && s + 1 < a && t[s + 1] === 0)
1307
+ if (!Yt(i) || i === 0 && s + 1 < a && t[s + 1] === 0)
1308
1308
  break;
1309
1309
  ++s, ++n;
1310
1310
  }
@@ -1313,10 +1313,10 @@ function ts(t, e, r) {
1313
1313
  r.push(t[o] + 256 & 255);
1314
1314
  return s;
1315
1315
  }
1316
- function rs(t, e, r) {
1316
+ function ns(t, e, r) {
1317
1317
  for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
1318
1318
  var i = t[s];
1319
- if (i === 0 || Zt(i) && s + 1 < a && Zt(t[s + 1]))
1319
+ if (i === 0 || Yt(i) && s + 1 < a && Yt(t[s + 1]))
1320
1320
  break;
1321
1321
  ++s, ++n;
1322
1322
  }
@@ -1330,7 +1330,7 @@ function rs(t, e, r) {
1330
1330
  k.VARDELTAS = function(t) {
1331
1331
  for (var e = 0, r = []; e < t.length; ) {
1332
1332
  var n = t[e];
1333
- n === 0 ? e = es(t, e, r) : n >= -128 && n <= 127 ? e = ts(t, e, r) : e = rs(t, e, r);
1333
+ n === 0 ? e = ts(t, e, r) : n >= -128 && n <= 127 ? e = rs(t, e, r) : e = ns(t, e, r);
1334
1334
  }
1335
1335
  return r;
1336
1336
  };
@@ -1387,10 +1387,10 @@ k.OPERAND = function(t, e) {
1387
1387
  };
1388
1388
  k.OP = k.BYTE;
1389
1389
  L.OP = L.BYTE;
1390
- var st = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap();
1390
+ var at = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap();
1391
1391
  k.CHARSTRING = function(t) {
1392
- if (st) {
1393
- var e = st.get(t);
1392
+ if (at) {
1393
+ var e = at.get(t);
1394
1394
  if (e !== void 0)
1395
1395
  return e;
1396
1396
  }
@@ -1398,7 +1398,7 @@ k.CHARSTRING = function(t) {
1398
1398
  var s = t[a];
1399
1399
  r = r.concat(k[s.type](s.value));
1400
1400
  }
1401
- return st && st.set(t, r), r;
1401
+ return at && at.set(t, r), r;
1402
1402
  };
1403
1403
  L.CHARSTRING = function(t) {
1404
1404
  return k.CHARSTRING(t).length;
@@ -1469,7 +1469,7 @@ function qe(t, e, r) {
1469
1469
  n[a + 1] = { name: t + a, type: "USHORT", value: e[a] };
1470
1470
  return n;
1471
1471
  }
1472
- function jt(t, e, r) {
1472
+ function Zt(t, e, r) {
1473
1473
  var n = e.length, a = new Array(n + 1);
1474
1474
  a[0] = { name: t + "Count", type: "USHORT", value: n };
1475
1475
  for (var s = 0; s < n; s++)
@@ -1483,7 +1483,7 @@ function Xe(t, e, r) {
1483
1483
  a = a.concat(r(e[s], s));
1484
1484
  return a;
1485
1485
  }
1486
- function ct(t) {
1486
+ function ht(t) {
1487
1487
  t.format === 1 ? X.call(
1488
1488
  this,
1489
1489
  "coverageTable",
@@ -1500,9 +1500,9 @@ function ct(t) {
1500
1500
  }))
1501
1501
  ) : U.assert(!1, "Coverage format must be 1 or 2.");
1502
1502
  }
1503
- ct.prototype = Object.create(X.prototype);
1504
- ct.prototype.constructor = ct;
1505
- function ft(t) {
1503
+ ht.prototype = Object.create(X.prototype);
1504
+ ht.prototype.constructor = ht;
1505
+ function ct(t) {
1506
1506
  X.call(
1507
1507
  this,
1508
1508
  "scriptListTable",
@@ -1529,9 +1529,9 @@ function ft(t) {
1529
1529
  })
1530
1530
  );
1531
1531
  }
1532
- ft.prototype = Object.create(X.prototype);
1533
- ft.prototype.constructor = ft;
1534
- function pt(t) {
1532
+ ct.prototype = Object.create(X.prototype);
1533
+ ct.prototype.constructor = ct;
1534
+ function ft(t) {
1535
1535
  X.call(
1536
1536
  this,
1537
1537
  "featureListTable",
@@ -1546,67 +1546,67 @@ function pt(t) {
1546
1546
  })
1547
1547
  );
1548
1548
  }
1549
- pt.prototype = Object.create(X.prototype);
1550
- pt.prototype.constructor = pt;
1551
- function dt(t, e) {
1552
- X.call(this, "lookupListTable", jt("lookup", t, function(r) {
1549
+ ft.prototype = Object.create(X.prototype);
1550
+ ft.prototype.constructor = ft;
1551
+ function pt(t, e) {
1552
+ X.call(this, "lookupListTable", Zt("lookup", t, function(r) {
1553
1553
  var n = e[r.lookupType];
1554
1554
  return U.assert(!!n, "Unable to write GSUB lookup type " + r.lookupType + " tables."), new X("lookupTable", [
1555
1555
  { name: "lookupType", type: "USHORT", value: r.lookupType },
1556
1556
  { name: "lookupFlag", type: "USHORT", value: r.lookupFlag }
1557
- ].concat(jt("subtable", r.subtables, n)));
1557
+ ].concat(Zt("subtable", r.subtables, n)));
1558
1558
  }));
1559
1559
  }
1560
- dt.prototype = Object.create(X.prototype);
1561
- dt.prototype.constructor = dt;
1560
+ pt.prototype = Object.create(X.prototype);
1561
+ pt.prototype.constructor = pt;
1562
1562
  var F = {
1563
1563
  Table: X,
1564
1564
  Record: X,
1565
- Coverage: ct,
1566
- ScriptList: ft,
1567
- FeatureList: pt,
1568
- LookupList: dt,
1565
+ Coverage: ht,
1566
+ ScriptList: ct,
1567
+ FeatureList: ft,
1568
+ LookupList: pt,
1569
1569
  ushortList: qe,
1570
- tableList: jt,
1570
+ tableList: Zt,
1571
1571
  recordList: Xe
1572
1572
  };
1573
1573
  function Ar(t, e) {
1574
1574
  return t.getUint8(e);
1575
1575
  }
1576
- function gt(t, e) {
1576
+ function dt(t, e) {
1577
1577
  return t.getUint16(e, !1);
1578
1578
  }
1579
- function ns(t, e) {
1579
+ function as(t, e) {
1580
1580
  return t.getInt16(e, !1);
1581
1581
  }
1582
1582
  function sr(t, e) {
1583
1583
  return t.getUint32(e, !1);
1584
1584
  }
1585
- function Pn(t, e) {
1585
+ function Bn(t, e) {
1586
1586
  var r = t.getInt16(e, !1), n = t.getUint16(e + 2, !1);
1587
1587
  return r + n / 65535;
1588
1588
  }
1589
- function as(t, e) {
1589
+ function ss(t, e) {
1590
1590
  for (var r = "", n = e; n < e + 4; n += 1)
1591
1591
  r += String.fromCharCode(t.getInt8(n));
1592
1592
  return r;
1593
1593
  }
1594
- function ss(t, e, r) {
1594
+ function is(t, e, r) {
1595
1595
  for (var n = 0, a = 0; a < r; a += 1)
1596
1596
  n <<= 8, n += t.getUint8(e + a);
1597
1597
  return n;
1598
1598
  }
1599
- function is(t, e, r) {
1599
+ function os(t, e, r) {
1600
1600
  for (var n = [], a = e; a < r; a += 1)
1601
1601
  n.push(t.getUint8(a));
1602
1602
  return n;
1603
1603
  }
1604
- function os(t) {
1604
+ function us(t) {
1605
1605
  for (var e = "", r = 0; r < t.length; r += 1)
1606
1606
  e += String.fromCharCode(t[r]);
1607
1607
  return e;
1608
1608
  }
1609
- var us = {
1609
+ var ls = {
1610
1610
  byte: 1,
1611
1611
  uShort: 2,
1612
1612
  short: 2,
@@ -1648,7 +1648,7 @@ g.prototype.parseULong = function() {
1648
1648
  };
1649
1649
  g.prototype.parseOffset32 = g.prototype.parseULong;
1650
1650
  g.prototype.parseFixed = function() {
1651
- var t = Pn(this.data, this.offset + this.relativeOffset);
1651
+ var t = Bn(this.data, this.offset + this.relativeOffset);
1652
1652
  return this.relativeOffset += 4, t;
1653
1653
  };
1654
1654
  g.prototype.parseString = function(t) {
@@ -1666,11 +1666,11 @@ g.prototype.parseLongDateTime = function() {
1666
1666
  return t -= 2082844800, this.relativeOffset += 8, t;
1667
1667
  };
1668
1668
  g.prototype.parseVersion = function(t) {
1669
- var e = gt(this.data, this.offset + this.relativeOffset), r = gt(this.data, this.offset + this.relativeOffset + 2);
1669
+ var e = dt(this.data, this.offset + this.relativeOffset), r = dt(this.data, this.offset + this.relativeOffset + 2);
1670
1670
  return this.relativeOffset += 4, t === void 0 && (t = 4096), e + r / t / 10;
1671
1671
  };
1672
1672
  g.prototype.skip = function(t, e) {
1673
- e === void 0 && (e = 1), this.relativeOffset += us[t] * e;
1673
+ e === void 0 && (e = 1), this.relativeOffset += ls[t] * e;
1674
1674
  };
1675
1675
  g.prototype.parseULongList = function(t) {
1676
1676
  t === void 0 && (t = this.parseULong());
@@ -1906,18 +1906,18 @@ g.prototype.parseFeatureVariationsList = function() {
1906
1906
  var E = {
1907
1907
  getByte: Ar,
1908
1908
  getCard8: Ar,
1909
- getUShort: gt,
1910
- getCard16: gt,
1911
- getShort: ns,
1909
+ getUShort: dt,
1910
+ getCard16: dt,
1911
+ getShort: as,
1912
1912
  getULong: sr,
1913
- getFixed: Pn,
1914
- getTag: as,
1915
- getOffset: ss,
1916
- getBytes: is,
1917
- bytesToString: os,
1913
+ getFixed: Bn,
1914
+ getTag: ss,
1915
+ getOffset: is,
1916
+ getBytes: os,
1917
+ bytesToString: us,
1918
1918
  Parser: g
1919
1919
  };
1920
- function ls(t, e) {
1920
+ function hs(t, e) {
1921
1921
  e.parseUShort(), t.length = e.parseULong(), t.language = e.parseULong();
1922
1922
  var r;
1923
1923
  t.groupCount = r = e.parseULong(), t.glyphIndexMap = {};
@@ -1925,7 +1925,7 @@ function ls(t, e) {
1925
1925
  for (var a = e.parseULong(), s = e.parseULong(), i = e.parseULong(), o = a; o <= s; o += 1)
1926
1926
  t.glyphIndexMap[o] = i, i++;
1927
1927
  }
1928
- function hs(t, e, r, n, a) {
1928
+ function cs(t, e, r, n, a) {
1929
1929
  t.length = e.parseUShort(), t.language = e.parseUShort();
1930
1930
  var s;
1931
1931
  t.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
@@ -1933,7 +1933,7 @@ function hs(t, e, r, n, a) {
1933
1933
  for (var c = void 0, p = i.parseUShort(), d = o.parseUShort(), v = u.parseShort(), y = l.parseUShort(), m = d; m <= p; m += 1)
1934
1934
  y !== 0 ? (h = l.offset + l.relativeOffset - 2, h += y, h += (m - d) * 2, c = E.getUShort(r, h), c !== 0 && (c = c + v & 65535)) : c = m + v & 65535, t.glyphIndexMap[m] = c;
1935
1935
  }
1936
- function cs(t, e) {
1936
+ function fs(t, e) {
1937
1937
  var r = {};
1938
1938
  r.version = E.getUShort(t, e), U.argument(r.version === 0, "cmap table version should be 0."), r.numTables = E.getUShort(t, e + 2);
1939
1939
  for (var n = -1, a = r.numTables - 1; a >= 0; a -= 1) {
@@ -1947,14 +1947,14 @@ function cs(t, e) {
1947
1947
  throw new Error("No valid cmap sub-tables found.");
1948
1948
  var o = new E.Parser(t, e + n);
1949
1949
  if (r.format = o.parseUShort(), r.format === 12)
1950
- ls(r, o);
1950
+ hs(r, o);
1951
1951
  else if (r.format === 4)
1952
- hs(r, o, t, e, n);
1952
+ cs(r, o, t, e, n);
1953
1953
  else
1954
1954
  throw new Error("Only format 4 and 12 cmap tables are supported (found format " + r.format + ").");
1955
1955
  return r;
1956
1956
  }
1957
- function fs(t, e, r) {
1957
+ function ps(t, e, r) {
1958
1958
  t.segments.push({
1959
1959
  end: e,
1960
1960
  start: e,
@@ -1963,7 +1963,7 @@ function fs(t, e, r) {
1963
1963
  glyphIndex: r
1964
1964
  });
1965
1965
  }
1966
- function ps(t) {
1966
+ function ds(t) {
1967
1967
  t.segments.push({
1968
1968
  end: 65535,
1969
1969
  start: 65535,
@@ -1971,7 +1971,7 @@ function ps(t) {
1971
1971
  offset: 0
1972
1972
  });
1973
1973
  }
1974
- function ds(t) {
1974
+ function gs(t) {
1975
1975
  var e = !0, r;
1976
1976
  for (r = t.length - 1; r > 0; r -= 1) {
1977
1977
  var n = t.get(r);
@@ -2007,12 +2007,12 @@ function ds(t) {
2007
2007
  var s = new F.Table("cmap", a);
2008
2008
  for (s.segments = [], r = 0; r < t.length; r += 1) {
2009
2009
  for (var i = t.get(r), o = 0; o < i.unicodes.length; o += 1)
2010
- fs(s, i.unicodes[o], r);
2010
+ ps(s, i.unicodes[o], r);
2011
2011
  s.segments = s.segments.sort(function(b, x) {
2012
2012
  return b.start - x.start;
2013
2013
  });
2014
2014
  }
2015
- ps(s);
2015
+ ds(s);
2016
2016
  var u = s.segments.length, l = 0, h = [], f = [], c = [], p = [], d = [], v = [];
2017
2017
  for (r = 0; r < u; r += 1) {
2018
2018
  var y = s.segments[r];
@@ -2033,7 +2033,7 @@ function ds(t) {
2033
2033
  }
2034
2034
  return s;
2035
2035
  }
2036
- var Bn = { parse: cs, make: ds }, lt = [
2036
+ var In = { parse: fs, make: gs }, ut = [
2037
2037
  ".notdef",
2038
2038
  "space",
2039
2039
  "exclam",
@@ -2425,7 +2425,7 @@ var Bn = { parse: cs, make: ds }, lt = [
2425
2425
  "Regular",
2426
2426
  "Roman",
2427
2427
  "Semibold"
2428
- ], gs = [
2428
+ ], vs = [
2429
2429
  "",
2430
2430
  "",
2431
2431
  "",
@@ -2678,7 +2678,7 @@ var Bn = { parse: cs, make: ds }, lt = [
2678
2678
  "oslash",
2679
2679
  "oe",
2680
2680
  "germandbls"
2681
- ], vs = [
2681
+ ], ms = [
2682
2682
  "",
2683
2683
  "",
2684
2684
  "",
@@ -3194,10 +3194,10 @@ var Bn = { parse: cs, make: ds }, lt = [
3194
3194
  "ccaron",
3195
3195
  "dcroat"
3196
3196
  ];
3197
- function In(t) {
3197
+ function Dn(t) {
3198
3198
  this.font = t;
3199
3199
  }
3200
- In.prototype.charToGlyphIndex = function(t) {
3200
+ Dn.prototype.charToGlyphIndex = function(t) {
3201
3201
  var e = t.codePointAt(0), r = this.font.glyphs;
3202
3202
  if (r) {
3203
3203
  for (var n = 0; n < r.length; n += 1)
@@ -3207,16 +3207,16 @@ In.prototype.charToGlyphIndex = function(t) {
3207
3207
  }
3208
3208
  return null;
3209
3209
  };
3210
- function Dn(t) {
3210
+ function Gn(t) {
3211
3211
  this.cmap = t;
3212
3212
  }
3213
- Dn.prototype.charToGlyphIndex = function(t) {
3213
+ Gn.prototype.charToGlyphIndex = function(t) {
3214
3214
  return this.cmap.glyphIndexMap[t.codePointAt(0)] || 0;
3215
3215
  };
3216
- function vt(t, e) {
3216
+ function gt(t, e) {
3217
3217
  this.encoding = t, this.charset = e;
3218
3218
  }
3219
- vt.prototype.charToGlyphIndex = function(t) {
3219
+ gt.prototype.charToGlyphIndex = function(t) {
3220
3220
  var e = t.codePointAt(0), r = this.encoding[e];
3221
3221
  return this.charset.indexOf(r);
3222
3222
  };
@@ -3249,7 +3249,7 @@ ir.prototype.nameToGlyphIndex = function(t) {
3249
3249
  ir.prototype.glyphIndexToName = function(t) {
3250
3250
  return this.names[t];
3251
3251
  };
3252
- function ms(t) {
3252
+ function ys(t) {
3253
3253
  for (var e, r = t.tables.cmap.glyphIndexMap, n = Object.keys(r), a = 0; a < n.length; a += 1) {
3254
3254
  var s = n[a], i = r[s];
3255
3255
  e = t.glyphs.get(i), e.addUnicode(parseInt(s));
@@ -3257,7 +3257,7 @@ function ms(t) {
3257
3257
  for (var o = 0; o < t.glyphs.length; o += 1)
3258
3258
  e = t.glyphs.get(o), t.cffEncoding ? t.isCIDFont ? e.name = "gid" + o : e.name = t.cffEncoding.charset[o] : t.glyphNames.names && (e.name = t.glyphNames.glyphIndexToName(o));
3259
3259
  }
3260
- function ys(t) {
3260
+ function xs(t) {
3261
3261
  t._IndexToUnicodeMap = {};
3262
3262
  for (var e = t.tables.cmap.glyphIndexMap, r = Object.keys(e), n = 0; n < r.length; n += 1) {
3263
3263
  var a = r[n], s = e[a];
@@ -3266,14 +3266,14 @@ function ys(t) {
3266
3266
  } : t._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
3267
3267
  }
3268
3268
  }
3269
- function xs(t, e) {
3270
- e.lowMemory ? ys(t) : ms(t);
3269
+ function bs(t, e) {
3270
+ e.lowMemory ? xs(t) : ys(t);
3271
3271
  }
3272
- function bs(t, e, r, n, a) {
3272
+ function Ss(t, e, r, n, a) {
3273
3273
  t.beginPath(), t.moveTo(e, r), t.lineTo(n, a), t.stroke();
3274
3274
  }
3275
- var Ce = { line: bs };
3276
- function Ss(t, e) {
3275
+ var Ce = { line: Ss };
3276
+ function ks(t, e) {
3277
3277
  var r = e || new V();
3278
3278
  return {
3279
3279
  configurable: !0,
@@ -3289,7 +3289,7 @@ function ae(t) {
3289
3289
  this.bindConstructorValues(t);
3290
3290
  }
3291
3291
  ae.prototype.bindConstructorValues = function(t) {
3292
- this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path", Ss(this, t.path));
3292
+ this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path", ks(this, t.path));
3293
3293
  };
3294
3294
  ae.prototype.addUnicode = function(t) {
3295
3295
  this.unicodes.length === 0 && (this.unicode = t), this.unicodes.push(t);
@@ -3373,7 +3373,7 @@ ae.prototype.drawMetrics = function(t, e, r, n) {
3373
3373
  var s = this.xMin || 0, i = this.yMin || 0, o = this.xMax || 0, u = this.yMax || 0, l = this.advanceWidth || 0;
3374
3374
  t.strokeStyle = "blue", Ce.line(t, e + s * a, -1e4, e + s * a, 1e4), Ce.line(t, e + o * a, -1e4, e + o * a, 1e4), Ce.line(t, -1e4, r + -i * a, 1e4, r + -i * a), Ce.line(t, -1e4, r + -u * a, 1e4, r + -u * a), t.strokeStyle = "green", Ce.line(t, e + l * a, -1e4, e + l * a, 1e4);
3375
3375
  };
3376
- function it(t, e, r) {
3376
+ function st(t, e, r) {
3377
3377
  Object.defineProperty(t, e, {
3378
3378
  get: function() {
3379
3379
  return t.path, t[r];
@@ -3408,20 +3408,20 @@ or.prototype.get = function(t) {
3408
3408
  or.prototype.push = function(t, e) {
3409
3409
  this.glyphs[t] = e, this.length++;
3410
3410
  };
3411
- function ks(t, e) {
3411
+ function Fs(t, e) {
3412
3412
  return new ae({ index: e, font: t });
3413
3413
  }
3414
- function Fs(t, e, r, n, a, s) {
3414
+ function Ts(t, e, r, n, a, s) {
3415
3415
  return function() {
3416
3416
  var i = new ae({ index: e, font: t });
3417
3417
  return i.path = function() {
3418
3418
  r(i, n, a);
3419
3419
  var o = s(t.glyphs, i);
3420
3420
  return o.unitsPerEm = t.unitsPerEm, o;
3421
- }, it(i, "xMin", "_xMin"), it(i, "xMax", "_xMax"), it(i, "yMin", "_yMin"), it(i, "yMax", "_yMax"), i;
3421
+ }, st(i, "xMin", "_xMin"), st(i, "xMax", "_xMax"), st(i, "yMin", "_yMin"), st(i, "yMax", "_yMax"), i;
3422
3422
  };
3423
3423
  }
3424
- function Ts(t, e, r, n) {
3424
+ function ws(t, e, r, n) {
3425
3425
  return function() {
3426
3426
  var a = new ae({ index: e, font: t });
3427
3427
  return a.path = function() {
@@ -3430,21 +3430,21 @@ function Ts(t, e, r, n) {
3430
3430
  }, a;
3431
3431
  };
3432
3432
  }
3433
- var ge = { GlyphSet: or, glyphLoader: ks, ttfGlyphLoader: Fs, cffGlyphLoader: Ts };
3434
- function Gn(t, e) {
3433
+ var ge = { GlyphSet: or, glyphLoader: Fs, ttfGlyphLoader: Ts, cffGlyphLoader: ws };
3434
+ function Nn(t, e) {
3435
3435
  if (t === e)
3436
3436
  return !0;
3437
3437
  if (Array.isArray(t) && Array.isArray(e)) {
3438
3438
  if (t.length !== e.length)
3439
3439
  return !1;
3440
3440
  for (var r = 0; r < t.length; r += 1)
3441
- if (!Gn(t[r], e[r]))
3441
+ if (!Nn(t[r], e[r]))
3442
3442
  return !1;
3443
3443
  return !0;
3444
3444
  } else
3445
3445
  return !1;
3446
3446
  }
3447
- function Kt(t) {
3447
+ function jt(t) {
3448
3448
  var e;
3449
3449
  return t.length < 1240 ? e = 107 : t.length < 33900 ? e = 1131 : e = 32768, e;
3450
3450
  }
@@ -3464,7 +3464,7 @@ function be(t, e, r) {
3464
3464
  }
3465
3465
  return { objects: a, startOffset: e, endOffset: o };
3466
3466
  }
3467
- function ws(t, e) {
3467
+ function Cs(t, e) {
3468
3468
  var r = [], n = E.getCard16(t, e), a, s;
3469
3469
  if (n !== 0) {
3470
3470
  var i = E.getByte(t, e + 2);
@@ -3476,7 +3476,7 @@ function ws(t, e) {
3476
3476
  s = e + 2;
3477
3477
  return { offsets: r, startOffset: e, endOffset: s };
3478
3478
  }
3479
- function Cs(t, e, r, n, a) {
3479
+ function Es(t, e, r, n, a) {
3480
3480
  var s = E.getCard16(r, n), i = 0;
3481
3481
  if (s !== 0) {
3482
3482
  var o = E.getByte(r, n + 2);
@@ -3485,7 +3485,7 @@ function Cs(t, e, r, n, a) {
3485
3485
  var u = E.getBytes(r, i + e[t], i + e[t + 1]);
3486
3486
  return u;
3487
3487
  }
3488
- function Es(t) {
3488
+ function Os(t) {
3489
3489
  for (var e = "", r = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
3490
3490
  var a = t.parseByte(), s = a >> 4, i = a & 15;
3491
3491
  if (s === r || (e += n[s], i === r))
@@ -3494,14 +3494,14 @@ function Es(t) {
3494
3494
  }
3495
3495
  return parseFloat(e);
3496
3496
  }
3497
- function Os(t, e) {
3497
+ function Us(t, e) {
3498
3498
  var r, n, a, s;
3499
3499
  if (e === 28)
3500
3500
  return r = t.parseByte(), n = t.parseByte(), r << 8 | n;
3501
3501
  if (e === 29)
3502
3502
  return r = t.parseByte(), n = t.parseByte(), a = t.parseByte(), s = t.parseByte(), r << 24 | n << 16 | a << 8 | s;
3503
3503
  if (e === 30)
3504
- return Es(t);
3504
+ return Os(t);
3505
3505
  if (e >= 32 && e <= 246)
3506
3506
  return e - 139;
3507
3507
  if (e >= 247 && e <= 250)
@@ -3510,7 +3510,7 @@ function Os(t, e) {
3510
3510
  return r = t.parseByte(), -(e - 251) * 256 - r - 108;
3511
3511
  throw new Error("Invalid b0 " + e);
3512
3512
  }
3513
- function Us(t) {
3513
+ function Ls(t) {
3514
3514
  for (var e = {}, r = 0; r < t.length; r += 1) {
3515
3515
  var n = t[r][0], a = t[r][1], s = void 0;
3516
3516
  if (a.length === 1 ? s = a[0] : s = a, e.hasOwnProperty(n) && !isNaN(e[n]))
@@ -3519,19 +3519,19 @@ function Us(t) {
3519
3519
  }
3520
3520
  return e;
3521
3521
  }
3522
- function Nn(t, e, r) {
3522
+ function _n(t, e, r) {
3523
3523
  e = e !== void 0 ? e : 0;
3524
3524
  var n = new E.Parser(t, e), a = [], s = [];
3525
3525
  for (r = r !== void 0 ? r : t.length; n.relativeOffset < r; ) {
3526
3526
  var i = n.parseByte();
3527
- i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(Os(n, i));
3527
+ i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(Us(n, i));
3528
3528
  }
3529
- return Us(a);
3529
+ return Ls(a);
3530
3530
  }
3531
3531
  function We(t, e) {
3532
- return e <= 390 ? e = lt[e] : e = t[e - 391], e;
3532
+ return e <= 390 ? e = ut[e] : e = t[e - 391], e;
3533
3533
  }
3534
- function _n(t, e, r) {
3534
+ function Hn(t, e, r) {
3535
3535
  for (var n = {}, a, s = 0; s < e.length; s += 1) {
3536
3536
  var i = e[s];
3537
3537
  if (Array.isArray(i.type)) {
@@ -3545,11 +3545,11 @@ function _n(t, e, r) {
3545
3545
  }
3546
3546
  return n;
3547
3547
  }
3548
- function Ls(t, e) {
3548
+ function Rs(t, e) {
3549
3549
  var r = {};
3550
3550
  return r.formatMajor = E.getCard8(t, e), r.formatMinor = E.getCard8(t, e + 1), r.size = E.getCard8(t, e + 2), r.offsetSize = E.getCard8(t, e + 3), r.startOffset = e, r.endOffset = e + 4, r;
3551
3551
  }
3552
- var Hn = [
3552
+ var zn = [
3553
3553
  { name: "version", op: 0, type: "SID" },
3554
3554
  { name: "notice", op: 1, type: "SID" },
3555
3555
  { name: "copyright", op: 1200, type: "SID" },
@@ -3585,29 +3585,29 @@ var Hn = [
3585
3585
  { name: "fdArray", op: 1236, type: "offset" },
3586
3586
  { name: "fdSelect", op: 1237, type: "offset" },
3587
3587
  { name: "fontName", op: 1238, type: "SID" }
3588
- ], zn = [
3588
+ ], Wn = [
3589
3589
  { name: "subrs", op: 19, type: "offset", value: 0 },
3590
3590
  { name: "defaultWidthX", op: 20, type: "number", value: 0 },
3591
3591
  { name: "nominalWidthX", op: 21, type: "number", value: 0 }
3592
3592
  ];
3593
- function Rs(t, e) {
3594
- var r = Nn(t, 0, t.byteLength);
3595
- return _n(r, Hn, e);
3593
+ function As(t, e) {
3594
+ var r = _n(t, 0, t.byteLength);
3595
+ return Hn(r, zn, e);
3596
3596
  }
3597
- function Wn(t, e, r, n) {
3598
- var a = Nn(t, e, r);
3599
- return _n(a, zn, n);
3597
+ function Vn(t, e, r, n) {
3598
+ var a = _n(t, e, r);
3599
+ return Hn(a, Wn, n);
3600
3600
  }
3601
3601
  function Pr(t, e, r, n) {
3602
3602
  for (var a = [], s = 0; s < r.length; s += 1) {
3603
- var i = new DataView(new Uint8Array(r[s]).buffer), o = Rs(i, n);
3603
+ var i = new DataView(new Uint8Array(r[s]).buffer), o = As(i, n);
3604
3604
  o._subrs = [], o._subrsBias = 0, o._defaultWidthX = 0, o._nominalWidthX = 0;
3605
3605
  var u = o.private[0], l = o.private[1];
3606
3606
  if (u !== 0 && l !== 0) {
3607
- var h = Wn(t, l + e, u, n);
3607
+ var h = Vn(t, l + e, u, n);
3608
3608
  if (o._defaultWidthX = h.defaultWidthX, o._nominalWidthX = h.nominalWidthX, h.subrs !== 0) {
3609
3609
  var f = l + h.subrs, c = be(t, f + e);
3610
- o._subrs = c.objects, o._subrsBias = Kt(o._subrs);
3610
+ o._subrs = c.objects, o._subrsBias = jt(o._subrs);
3611
3611
  }
3612
3612
  o._privateDict = h;
3613
3613
  }
@@ -3615,7 +3615,7 @@ function Pr(t, e, r, n) {
3615
3615
  }
3616
3616
  return a;
3617
3617
  }
3618
- function As(t, e, r, n) {
3618
+ function Ms(t, e, r, n) {
3619
3619
  var a, s, i = new E.Parser(t, e);
3620
3620
  r -= 1;
3621
3621
  var o = [".notdef"], u = i.parseCard8();
@@ -3638,7 +3638,7 @@ function As(t, e, r, n) {
3638
3638
  throw new Error("Unknown charset format " + u);
3639
3639
  return o;
3640
3640
  }
3641
- function Ms(t, e, r) {
3641
+ function Ps(t, e, r) {
3642
3642
  var n, a = {}, s = new E.Parser(t, e), i = s.parseCard8();
3643
3643
  if (i === 0)
3644
3644
  for (var o = s.parseCard8(), u = 0; u < o; u += 1)
@@ -3651,7 +3651,7 @@ function Ms(t, e, r) {
3651
3651
  a[p] = n, n += 1;
3652
3652
  } else
3653
3653
  throw new Error("Unknown encoding format " + i);
3654
- return new vt(a, r);
3654
+ return new gt(a, r);
3655
3655
  }
3656
3656
  function Br(t, e, r) {
3657
3657
  var n, a, s, i, o = new V(), u = [], l = 0, h = !1, f = !1, c = 0, p = 0, d, v, y, m;
@@ -3778,7 +3778,7 @@ function Br(t, e, r) {
3778
3778
  }
3779
3779
  return O(r), e.advanceWidth = T, o;
3780
3780
  }
3781
- function Ps(t, e, r, n) {
3781
+ function Bs(t, e, r, n) {
3782
3782
  var a = [], s, i = new E.Parser(t, e), o = i.parseCard8();
3783
3783
  if (o === 0)
3784
3784
  for (var u = 0; u < r; u++) {
@@ -3805,10 +3805,10 @@ function Ps(t, e, r, n) {
3805
3805
  throw new Error("CFF Table CID Font FDSelect table has unsupported format " + o);
3806
3806
  return a;
3807
3807
  }
3808
- function Bs(t, e, r, n) {
3808
+ function Is(t, e, r, n) {
3809
3809
  r.tables.cff = {};
3810
- var a = Ls(t, e), s = be(t, a.endOffset, E.bytesToString), i = be(t, s.endOffset), o = be(t, i.endOffset, E.bytesToString), u = be(t, o.endOffset);
3811
- r.gsubrs = u.objects, r.gsubrsBias = Kt(r.gsubrs);
3810
+ var a = Rs(t, e), s = be(t, a.endOffset, E.bytesToString), i = be(t, s.endOffset), o = be(t, i.endOffset, E.bytesToString), u = be(t, o.endOffset);
3811
+ r.gsubrs = u.objects, r.gsubrsBias = jt(r.gsubrs);
3812
3812
  var l = Pr(t, e, i.objects, o.objects);
3813
3813
  if (l.length !== 1)
3814
3814
  throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + l.length);
@@ -3819,20 +3819,20 @@ function Bs(t, e, r, n) {
3819
3819
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
3820
3820
  f += e;
3821
3821
  var p = be(t, f), d = Pr(t, e, p.objects, o.objects);
3822
- h._fdArray = d, c += e, h._fdSelect = Ps(t, c, r.numGlyphs, d.length);
3822
+ h._fdArray = d, c += e, h._fdSelect = Bs(t, c, r.numGlyphs, d.length);
3823
3823
  }
3824
- var v = e + h.private[1], y = Wn(t, v, h.private[0], o.objects);
3824
+ var v = e + h.private[1], y = Vn(t, v, h.private[0], o.objects);
3825
3825
  if (r.defaultWidthX = y.defaultWidthX, r.nominalWidthX = y.nominalWidthX, y.subrs !== 0) {
3826
3826
  var m = v + y.subrs, b = be(t, m);
3827
- r.subrs = b.objects, r.subrsBias = Kt(r.subrs);
3827
+ r.subrs = b.objects, r.subrsBias = jt(r.subrs);
3828
3828
  } else
3829
3829
  r.subrs = [], r.subrsBias = 0;
3830
3830
  var x;
3831
- n.lowMemory ? (x = ws(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = be(t, e + h.charStrings), r.nGlyphs = x.objects.length);
3832
- var T = As(t, e + h.charset, r.nGlyphs, o.objects);
3833
- if (h.encoding === 0 ? r.cffEncoding = new vt(gs, T) : h.encoding === 1 ? r.cffEncoding = new vt(vs, T) : r.cffEncoding = Ms(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new ge.GlyphSet(r), n.lowMemory)
3831
+ n.lowMemory ? (x = Cs(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = be(t, e + h.charStrings), r.nGlyphs = x.objects.length);
3832
+ var T = Ms(t, e + h.charset, r.nGlyphs, o.objects);
3833
+ if (h.encoding === 0 ? r.cffEncoding = new gt(vs, T) : h.encoding === 1 ? r.cffEncoding = new gt(ms, T) : r.cffEncoding = Ps(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new ge.GlyphSet(r), n.lowMemory)
3834
3834
  r._push = function(O) {
3835
- var w = Cs(O, x.offsets, t, e + h.charStrings);
3835
+ var w = Es(O, x.offsets, t, e + h.charStrings);
3836
3836
  r.glyphs.push(O, ge.cffGlyphLoader(r, O, Br, w));
3837
3837
  };
3838
3838
  else
@@ -3841,11 +3841,11 @@ function Bs(t, e, r, n) {
3841
3841
  r.glyphs.push(S, ge.cffGlyphLoader(r, S, Br, A));
3842
3842
  }
3843
3843
  }
3844
- function Vn(t, e) {
3845
- var r, n = lt.indexOf(t);
3846
- return n >= 0 && (r = n), n = e.indexOf(t), n >= 0 ? r = n + lt.length : (r = lt.length + e.length, e.push(t)), r;
3844
+ function qn(t, e) {
3845
+ var r, n = ut.indexOf(t);
3846
+ return n >= 0 && (r = n), n = e.indexOf(t), n >= 0 ? r = n + ut.length : (r = ut.length + e.length, e.push(t)), r;
3847
3847
  }
3848
- function Is() {
3848
+ function Ds() {
3849
3849
  return new F.Record("Header", [
3850
3850
  { name: "major", type: "Card8", value: 1 },
3851
3851
  { name: "minor", type: "Card8", value: 0 },
@@ -3853,7 +3853,7 @@ function Is() {
3853
3853
  { name: "major", type: "Card8", value: 1 }
3854
3854
  ]);
3855
3855
  }
3856
- function Ds(t) {
3856
+ function Gs(t) {
3857
3857
  var e = new F.Record("Name INDEX", [
3858
3858
  { name: "names", type: "INDEX", value: [] }
3859
3859
  ]);
@@ -3862,10 +3862,10 @@ function Ds(t) {
3862
3862
  e.names.push({ name: "name_" + r, type: "NAME", value: t[r] });
3863
3863
  return e;
3864
3864
  }
3865
- function qn(t, e, r) {
3865
+ function Xn(t, e, r) {
3866
3866
  for (var n = {}, a = 0; a < t.length; a += 1) {
3867
3867
  var s = t[a], i = e[s.name];
3868
- i !== void 0 && !Gn(i, s.value) && (s.type === "SID" && (i = Vn(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
3868
+ i !== void 0 && !Nn(i, s.value) && (s.type === "SID" && (i = qn(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
3869
3869
  }
3870
3870
  return n;
3871
3871
  }
@@ -3873,7 +3873,7 @@ function Ir(t, e) {
3873
3873
  var r = new F.Record("Top DICT", [
3874
3874
  { name: "dict", type: "DICT", value: {} }
3875
3875
  ]);
3876
- return r.dict = qn(Hn, t, e), r;
3876
+ return r.dict = Xn(zn, t, e), r;
3877
3877
  }
3878
3878
  function Dr(t) {
3879
3879
  var e = new F.Record("Top DICT INDEX", [
@@ -3881,7 +3881,7 @@ function Dr(t) {
3881
3881
  ]);
3882
3882
  return e.topDicts = [{ name: "topDict_0", type: "TABLE", value: t }], e;
3883
3883
  }
3884
- function Gs(t) {
3884
+ function Ns(t) {
3885
3885
  var e = new F.Record("String INDEX", [
3886
3886
  { name: "strings", type: "INDEX", value: [] }
3887
3887
  ]);
@@ -3890,21 +3890,21 @@ function Gs(t) {
3890
3890
  e.strings.push({ name: "string_" + r, type: "STRING", value: t[r] });
3891
3891
  return e;
3892
3892
  }
3893
- function Ns() {
3893
+ function _s() {
3894
3894
  return new F.Record("Global Subr INDEX", [
3895
3895
  { name: "subrs", type: "INDEX", value: [] }
3896
3896
  ]);
3897
3897
  }
3898
- function _s(t, e) {
3898
+ function Hs(t, e) {
3899
3899
  for (var r = new F.Record("Charsets", [
3900
3900
  { name: "format", type: "Card8", value: 0 }
3901
3901
  ]), n = 0; n < t.length; n += 1) {
3902
- var a = t[n], s = Vn(a, e);
3902
+ var a = t[n], s = qn(a, e);
3903
3903
  r.fields.push({ name: "glyph_" + n, type: "SID", value: s });
3904
3904
  }
3905
3905
  return r;
3906
3906
  }
3907
- function Hs(t) {
3907
+ function zs(t) {
3908
3908
  var e = [], r = t.path;
3909
3909
  e.push({ name: "width", type: "NUMBER", value: t.advanceWidth });
3910
3910
  for (var n = 0, a = 0, s = 0; s < r.commands.length; s += 1) {
@@ -3932,22 +3932,22 @@ function Hs(t) {
3932
3932
  }
3933
3933
  return e.push({ name: "endchar", type: "OP", value: 14 }), e;
3934
3934
  }
3935
- function zs(t) {
3935
+ function Ws(t) {
3936
3936
  for (var e = new F.Record("CharStrings INDEX", [
3937
3937
  { name: "charStrings", type: "INDEX", value: [] }
3938
3938
  ]), r = 0; r < t.length; r += 1) {
3939
- var n = t.get(r), a = Hs(n);
3939
+ var n = t.get(r), a = zs(n);
3940
3940
  e.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
3941
3941
  }
3942
3942
  return e;
3943
3943
  }
3944
- function Ws(t, e) {
3944
+ function Vs(t, e) {
3945
3945
  var r = new F.Record("Private DICT", [
3946
3946
  { name: "dict", type: "DICT", value: {} }
3947
3947
  ]);
3948
- return r.dict = qn(zn, t, e), r;
3948
+ return r.dict = Xn(Wn, t, e), r;
3949
3949
  }
3950
- function Vs(t, e) {
3950
+ function qs(t, e) {
3951
3951
  for (var r = new F.Table("CFF ", [
3952
3952
  { name: "header", type: "RECORD" },
3953
3953
  { name: "nameIndex", type: "RECORD" },
@@ -3971,18 +3971,18 @@ function Vs(t, e) {
3971
3971
  }, s = {}, i = [], o, u = 1; u < t.length; u += 1)
3972
3972
  o = t.get(u), i.push(o.name);
3973
3973
  var l = [];
3974
- r.header = Is(), r.nameIndex = Ds([e.postScriptName]);
3974
+ r.header = Ds(), r.nameIndex = Gs([e.postScriptName]);
3975
3975
  var h = Ir(a, l);
3976
- r.topDictIndex = Dr(h), r.globalSubrIndex = Ns(), r.charsets = _s(i, l), r.charStringsIndex = zs(t), r.privateDict = Ws(s, l), r.stringIndex = Gs(l);
3976
+ r.topDictIndex = Dr(h), r.globalSubrIndex = _s(), r.charsets = Hs(i, l), r.charStringsIndex = Ws(t), r.privateDict = Vs(s, l), r.stringIndex = Ns(l);
3977
3977
  var f = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
3978
3978
  return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Ir(a, l), r.topDictIndex = Dr(h), r;
3979
3979
  }
3980
- var Xn = { parse: Bs, make: Vs };
3981
- function qs(t, e) {
3980
+ var Yn = { parse: Is, make: qs };
3981
+ function Xs(t, e) {
3982
3982
  var r = {}, n = new E.Parser(t, e);
3983
3983
  return r.version = n.parseVersion(), r.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, r.checkSumAdjustment = n.parseULong(), r.magicNumber = n.parseULong(), U.argument(r.magicNumber === 1594834165, "Font header has wrong magic number."), r.flags = n.parseUShort(), r.unitsPerEm = n.parseUShort(), r.created = n.parseLongDateTime(), r.modified = n.parseLongDateTime(), r.xMin = n.parseShort(), r.yMin = n.parseShort(), r.xMax = n.parseShort(), r.yMax = n.parseShort(), r.macStyle = n.parseUShort(), r.lowestRecPPEM = n.parseUShort(), r.fontDirectionHint = n.parseShort(), r.indexToLocFormat = n.parseShort(), r.glyphDataFormat = n.parseShort(), r;
3984
3984
  }
3985
- function Xs(t) {
3985
+ function Ys(t) {
3986
3986
  var e = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, r = e;
3987
3987
  return t.createdTimestamp && (r = t.createdTimestamp + 2082844800), new F.Table("head", [
3988
3988
  { name: "version", type: "FIXED", value: 65536 },
@@ -4004,12 +4004,12 @@ function Xs(t) {
4004
4004
  { name: "glyphDataFormat", type: "SHORT", value: 0 }
4005
4005
  ], t);
4006
4006
  }
4007
- var Yn = { parse: qs, make: Xs };
4008
- function Ys(t, e) {
4007
+ var Zn = { parse: Xs, make: Ys };
4008
+ function Zs(t, e) {
4009
4009
  var r = {}, n = new E.Parser(t, e);
4010
4010
  return r.version = n.parseVersion(), r.ascender = n.parseShort(), r.descender = n.parseShort(), r.lineGap = n.parseShort(), r.advanceWidthMax = n.parseUShort(), r.minLeftSideBearing = n.parseShort(), r.minRightSideBearing = n.parseShort(), r.xMaxExtent = n.parseShort(), r.caretSlopeRise = n.parseShort(), r.caretSlopeRun = n.parseShort(), r.caretOffset = n.parseShort(), n.relativeOffset += 8, r.metricDataFormat = n.parseShort(), r.numberOfHMetrics = n.parseUShort(), r;
4011
4011
  }
4012
- function Zs(t) {
4012
+ function js(t) {
4013
4013
  return new F.Table("hhea", [
4014
4014
  { name: "version", type: "FIXED", value: 65536 },
4015
4015
  { name: "ascender", type: "FWORD", value: 0 },
@@ -4030,15 +4030,15 @@ function Zs(t) {
4030
4030
  { name: "numberOfHMetrics", type: "USHORT", value: 0 }
4031
4031
  ], t);
4032
4032
  }
4033
- var Zn = { parse: Ys, make: Zs };
4034
- function js(t, e, r, n, a) {
4033
+ var jn = { parse: Zs, make: js };
4034
+ function Ks(t, e, r, n, a) {
4035
4035
  for (var s, i, o = new E.Parser(t, e), u = 0; u < n; u += 1) {
4036
4036
  u < r && (s = o.parseUShort(), i = o.parseShort());
4037
4037
  var l = a.get(u);
4038
4038
  l.advanceWidth = s, l.leftSideBearing = i;
4039
4039
  }
4040
4040
  }
4041
- function Ks(t, e, r, n, a) {
4041
+ function Qs(t, e, r, n, a) {
4042
4042
  t._hmtxTableData = {};
4043
4043
  for (var s, i, o = new E.Parser(e, r), u = 0; u < a; u += 1)
4044
4044
  u < n && (s = o.parseUShort(), i = o.parseShort()), t._hmtxTableData[u] = {
@@ -4046,18 +4046,18 @@ function Ks(t, e, r, n, a) {
4046
4046
  leftSideBearing: i
4047
4047
  };
4048
4048
  }
4049
- function Qs(t, e, r, n, a, s, i) {
4050
- i.lowMemory ? Ks(t, e, r, n, a) : js(e, r, n, a, s);
4049
+ function $s(t, e, r, n, a, s, i) {
4050
+ i.lowMemory ? Qs(t, e, r, n, a) : Ks(e, r, n, a, s);
4051
4051
  }
4052
- function $s(t) {
4052
+ function Js(t) {
4053
4053
  for (var e = new F.Table("hmtx", []), r = 0; r < t.length; r += 1) {
4054
4054
  var n = t.get(r), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
4055
4055
  e.fields.push({ name: "advanceWidth_" + r, type: "USHORT", value: a }), e.fields.push({ name: "leftSideBearing_" + r, type: "SHORT", value: s });
4056
4056
  }
4057
4057
  return e;
4058
4058
  }
4059
- var jn = { parse: Qs, make: $s };
4060
- function Js(t) {
4059
+ var Kn = { parse: $s, make: Js };
4060
+ function ei(t) {
4061
4061
  for (var e = new F.Table("ltag", [
4062
4062
  { name: "version", type: "ULONG", value: 1 },
4063
4063
  { name: "flags", type: "ULONG", value: 0 },
@@ -4068,7 +4068,7 @@ function Js(t) {
4068
4068
  }
4069
4069
  return e.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), e;
4070
4070
  }
4071
- function ei(t, e) {
4071
+ function ti(t, e) {
4072
4072
  var r = new E.Parser(t, e), n = r.parseULong();
4073
4073
  U.argument(n === 1, "Unsupported ltag table version."), r.skip("uLong", 1);
4074
4074
  for (var a = r.parseULong(), s = [], i = 0; i < a; i++) {
@@ -4078,18 +4078,18 @@ function ei(t, e) {
4078
4078
  }
4079
4079
  return s;
4080
4080
  }
4081
- var Kn = { make: Js, parse: ei };
4082
- function ti(t, e) {
4081
+ var Qn = { make: ei, parse: ti };
4082
+ function ri(t, e) {
4083
4083
  var r = {}, n = new E.Parser(t, e);
4084
4084
  return r.version = n.parseVersion(), r.numGlyphs = n.parseUShort(), r.version === 1 && (r.maxPoints = n.parseUShort(), r.maxContours = n.parseUShort(), r.maxCompositePoints = n.parseUShort(), r.maxCompositeContours = n.parseUShort(), r.maxZones = n.parseUShort(), r.maxTwilightPoints = n.parseUShort(), r.maxStorage = n.parseUShort(), r.maxFunctionDefs = n.parseUShort(), r.maxInstructionDefs = n.parseUShort(), r.maxStackElements = n.parseUShort(), r.maxSizeOfInstructions = n.parseUShort(), r.maxComponentElements = n.parseUShort(), r.maxComponentDepth = n.parseUShort()), r;
4085
4085
  }
4086
- function ri(t) {
4086
+ function ni(t) {
4087
4087
  return new F.Table("maxp", [
4088
4088
  { name: "version", type: "FIXED", value: 20480 },
4089
4089
  { name: "numGlyphs", type: "USHORT", value: t }
4090
4090
  ]);
4091
4091
  }
4092
- var Qn = { parse: ti, make: ri }, $n = [
4092
+ var $n = { parse: ri, make: ni }, Jn = [
4093
4093
  "copyright",
4094
4094
  // 0
4095
4095
  "fontFamily",
@@ -4136,7 +4136,7 @@ var Qn = { parse: ti, make: ri }, $n = [
4136
4136
  // 21
4137
4137
  "wwsSubfamily"
4138
4138
  // 22
4139
- ], Jn = {
4139
+ ], ea = {
4140
4140
  0: "en",
4141
4141
  1: "fr",
4142
4142
  2: "de",
@@ -4256,7 +4256,7 @@ var Qn = { parse: ti, make: ri }, $n = [
4256
4256
  149: "kl",
4257
4257
  150: "az",
4258
4258
  151: "nn"
4259
- }, ni = {
4259
+ }, ai = {
4260
4260
  0: 0,
4261
4261
  // langEnglish → smRoman
4262
4262
  1: 0,
@@ -4495,7 +4495,7 @@ var Qn = { parse: ti, make: ri }, $n = [
4495
4495
  // langAzerbaijanRoman → smRoman
4496
4496
  151: 0
4497
4497
  // langNynorsk → smRoman
4498
- }, ea = {
4498
+ }, ta = {
4499
4499
  1078: "af",
4500
4500
  1052: "sq",
4501
4501
  1156: "gsw",
@@ -4709,7 +4709,7 @@ var Qn = { parse: ti, make: ri }, $n = [
4709
4709
  1144: "ii",
4710
4710
  1130: "yo"
4711
4711
  };
4712
- function ai(t, e, r) {
4712
+ function si(t, e, r) {
4713
4713
  switch (t) {
4714
4714
  case 0:
4715
4715
  if (e === 65535)
@@ -4718,12 +4718,12 @@ function ai(t, e, r) {
4718
4718
  return r[e];
4719
4719
  break;
4720
4720
  case 1:
4721
- return Jn[e];
4722
- case 3:
4723
4721
  return ea[e];
4722
+ case 3:
4723
+ return ta[e];
4724
4724
  }
4725
4725
  }
4726
- var Qt = "utf-16", si = {
4726
+ var Kt = "utf-16", ii = {
4727
4727
  0: "macintosh",
4728
4728
  // smRoman
4729
4729
  1: "x-mac-japanese",
@@ -4782,7 +4782,7 @@ var Qt = "utf-16", si = {
4782
4782
  // smVietnamese
4783
4783
  31: "x-mac-extarabic"
4784
4784
  // smExtArabic
4785
- }, ii = {
4785
+ }, oi = {
4786
4786
  15: "x-mac-icelandic",
4787
4787
  // langIcelandic
4788
4788
  17: "x-mac-turkish",
@@ -4814,24 +4814,24 @@ var Qt = "utf-16", si = {
4814
4814
  146: "x-mac-gaelic"
4815
4815
  // langIrishGaelicScript
4816
4816
  };
4817
- function ta(t, e, r) {
4817
+ function ra(t, e, r) {
4818
4818
  switch (t) {
4819
4819
  case 0:
4820
- return Qt;
4820
+ return Kt;
4821
4821
  case 1:
4822
- return ii[r] || si[e];
4822
+ return oi[r] || ii[e];
4823
4823
  case 3:
4824
4824
  if (e === 1 || e === 10)
4825
- return Qt;
4825
+ return Kt;
4826
4826
  break;
4827
4827
  }
4828
4828
  }
4829
- function oi(t, e, r) {
4829
+ function ui(t, e, r) {
4830
4830
  for (var n = {}, a = new E.Parser(t, e), s = a.parseUShort(), i = a.parseUShort(), o = a.offset + a.parseUShort(), u = 0; u < i; u++) {
4831
- var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = $n[c] || c, d = a.parseUShort(), v = a.parseUShort(), y = ai(l, f, r), m = ta(l, h, f);
4831
+ var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = Jn[c] || c, d = a.parseUShort(), v = a.parseUShort(), y = si(l, f, r), m = ra(l, h, f);
4832
4832
  if (m !== void 0 && y !== void 0) {
4833
4833
  var b = void 0;
4834
- if (m === Qt ? b = De.UTF16(t, o + v, d) : b = De.MACSTRING(t, o + v, d, m), b) {
4834
+ if (m === Kt ? b = De.UTF16(t, o + v, d) : b = De.MACSTRING(t, o + v, d, m), b) {
4835
4835
  var x = n[p];
4836
4836
  x === void 0 && (x = n[p] = {}), x[y] = b;
4837
4837
  }
@@ -4839,7 +4839,7 @@ function oi(t, e, r) {
4839
4839
  }
4840
4840
  return s === 1 && a.parseUShort(), n;
4841
4841
  }
4842
- function Ct(t) {
4842
+ function wt(t) {
4843
4843
  var e = {};
4844
4844
  for (var r in t)
4845
4845
  e[t[r]] = parseInt(r);
@@ -4855,7 +4855,7 @@ function Gr(t, e, r, n, a, s) {
4855
4855
  { name: "offset", type: "USHORT", value: s }
4856
4856
  ]);
4857
4857
  }
4858
- function ui(t, e) {
4858
+ function li(t, e) {
4859
4859
  var r = t.length, n = e.length - r + 1;
4860
4860
  e:
4861
4861
  for (var a = 0; a < n; a++)
@@ -4868,7 +4868,7 @@ function ui(t, e) {
4868
4868
  return -1;
4869
4869
  }
4870
4870
  function Nr(t, e) {
4871
- var r = ui(t, e);
4871
+ var r = li(t, e);
4872
4872
  if (r < 0) {
4873
4873
  r = e.length;
4874
4874
  for (var n = 0, a = t.length; n < a; ++n)
@@ -4876,19 +4876,19 @@ function Nr(t, e) {
4876
4876
  }
4877
4877
  return r;
4878
4878
  }
4879
- function li(t, e) {
4880
- var r, n = [], a = {}, s = Ct($n);
4879
+ function hi(t, e) {
4880
+ var r, n = [], a = {}, s = wt(Jn);
4881
4881
  for (var i in t) {
4882
4882
  var o = s[i];
4883
4883
  if (o === void 0 && (o = i), r = parseInt(o), isNaN(r))
4884
4884
  throw new Error('Name table entry "' + i + '" does not exist, see nameTableNames for complete list.');
4885
4885
  a[r] = t[i], n.push(r);
4886
4886
  }
4887
- for (var u = Ct(Jn), l = Ct(ea), h = [], f = [], c = 0; c < n.length; c++) {
4887
+ for (var u = wt(ea), l = wt(ta), h = [], f = [], c = 0; c < n.length; c++) {
4888
4888
  r = n[c];
4889
4889
  var p = a[r];
4890
4890
  for (var d in p) {
4891
- var v = p[d], y = 1, m = u[d], b = ni[m], x = ta(y, b, m), T = k.MACSTRING(v, x);
4891
+ var v = p[d], y = 1, m = u[d], b = ai[m], x = ra(y, b, m), T = k.MACSTRING(v, x);
4892
4892
  T === void 0 && (y = 0, m = e.indexOf(d), m < 0 && (m = e.length, e.push(d)), b = 4, T = k.UTF16(v));
4893
4893
  var S = Nr(T, f);
4894
4894
  h.push(Gr(
@@ -4924,7 +4924,7 @@ function li(t, e) {
4924
4924
  M.fields.push({ name: "record_" + N, type: "RECORD", value: h[N] });
4925
4925
  return M.fields.push({ name: "strings", type: "LITERAL", value: f }), M;
4926
4926
  }
4927
- var ra = { parse: oi, make: li }, $t = [
4927
+ var na = { parse: ui, make: hi }, Qt = [
4928
4928
  { begin: 0, end: 127 },
4929
4929
  // Basic Latin
4930
4930
  { begin: 128, end: 255 },
@@ -5172,22 +5172,22 @@ var ra = { parse: oi, make: li }, $t = [
5172
5172
  { begin: 127024, end: 127135 }
5173
5173
  // Domino Tiles
5174
5174
  ];
5175
- function hi(t) {
5176
- for (var e = 0; e < $t.length; e += 1) {
5177
- var r = $t[e];
5175
+ function ci(t) {
5176
+ for (var e = 0; e < Qt.length; e += 1) {
5177
+ var r = Qt[e];
5178
5178
  if (t >= r.begin && t < r.end)
5179
5179
  return e;
5180
5180
  }
5181
5181
  return -1;
5182
5182
  }
5183
- function ci(t, e) {
5183
+ function fi(t, e) {
5184
5184
  var r = {}, n = new E.Parser(t, e);
5185
5185
  r.version = n.parseUShort(), r.xAvgCharWidth = n.parseShort(), r.usWeightClass = n.parseUShort(), r.usWidthClass = n.parseUShort(), r.fsType = n.parseUShort(), r.ySubscriptXSize = n.parseShort(), r.ySubscriptYSize = n.parseShort(), r.ySubscriptXOffset = n.parseShort(), r.ySubscriptYOffset = n.parseShort(), r.ySuperscriptXSize = n.parseShort(), r.ySuperscriptYSize = n.parseShort(), r.ySuperscriptXOffset = n.parseShort(), r.ySuperscriptYOffset = n.parseShort(), r.yStrikeoutSize = n.parseShort(), r.yStrikeoutPosition = n.parseShort(), r.sFamilyClass = n.parseShort(), r.panose = [];
5186
5186
  for (var a = 0; a < 10; a++)
5187
5187
  r.panose[a] = n.parseByte();
5188
5188
  return r.ulUnicodeRange1 = n.parseULong(), r.ulUnicodeRange2 = n.parseULong(), r.ulUnicodeRange3 = n.parseULong(), r.ulUnicodeRange4 = n.parseULong(), r.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), r.fsSelection = n.parseUShort(), r.usFirstCharIndex = n.parseUShort(), r.usLastCharIndex = n.parseUShort(), r.sTypoAscender = n.parseShort(), r.sTypoDescender = n.parseShort(), r.sTypoLineGap = n.parseShort(), r.usWinAscent = n.parseUShort(), r.usWinDescent = n.parseUShort(), r.version >= 1 && (r.ulCodePageRange1 = n.parseULong(), r.ulCodePageRange2 = n.parseULong()), r.version >= 2 && (r.sxHeight = n.parseShort(), r.sCapHeight = n.parseShort(), r.usDefaultChar = n.parseUShort(), r.usBreakChar = n.parseUShort(), r.usMaxContent = n.parseUShort()), r;
5189
5189
  }
5190
- function fi(t) {
5190
+ function pi(t) {
5191
5191
  return new F.Table("OS/2", [
5192
5192
  { name: "version", type: "USHORT", value: 3 },
5193
5193
  { name: "xAvgCharWidth", type: "SHORT", value: 0 },
@@ -5237,8 +5237,8 @@ function fi(t) {
5237
5237
  { name: "usMaxContext", type: "USHORT", value: 0 }
5238
5238
  ], t);
5239
5239
  }
5240
- var Jt = { parse: ci, make: fi, unicodeRanges: $t, getUnicodeRange: hi };
5241
- function pi(t, e) {
5240
+ var $t = { parse: fi, make: pi, unicodeRanges: Qt, getUnicodeRange: ci };
5241
+ function di(t, e) {
5242
5242
  var r = {}, n = new E.Parser(t, e);
5243
5243
  switch (r.version = n.parseVersion(), r.italicAngle = n.parseFixed(), r.underlinePosition = n.parseShort(), r.underlineThickness = n.parseShort(), r.isFixedPitch = n.parseULong(), r.minMemType42 = n.parseULong(), r.maxMemType42 = n.parseULong(), r.minMemType1 = n.parseULong(), r.maxMemType1 = n.parseULong(), r.version) {
5244
5244
  case 1:
@@ -5263,7 +5263,7 @@ function pi(t, e) {
5263
5263
  }
5264
5264
  return r;
5265
5265
  }
5266
- function di() {
5266
+ function gi() {
5267
5267
  return new F.Table("post", [
5268
5268
  { name: "version", type: "FIXED", value: 196608 },
5269
5269
  { name: "italicAngle", type: "FIXED", value: 0 },
@@ -5276,7 +5276,7 @@ function di() {
5276
5276
  { name: "maxMemType1", type: "ULONG", value: 0 }
5277
5277
  ]);
5278
5278
  }
5279
- var na = { parse: pi, make: di }, ie = new Array(9);
5279
+ var aa = { parse: di, make: gi }, ie = new Array(9);
5280
5280
  ie[1] = function() {
5281
5281
  var e = this.offset + this.relativeOffset, r = this.parseUShort();
5282
5282
  if (r === 1)
@@ -5424,7 +5424,7 @@ ie[8] = function() {
5424
5424
  substitutes: this.parseUShortList()
5425
5425
  };
5426
5426
  };
5427
- function gi(t, e) {
5427
+ function vi(t, e) {
5428
5428
  e = e || 0;
5429
5429
  var r = new g(t, e), n = r.parseVersion(1);
5430
5430
  return U.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
@@ -5514,7 +5514,7 @@ Ge[6] = function(e) {
5514
5514
  }
5515
5515
  U.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
5516
5516
  };
5517
- function vi(t) {
5517
+ function mi(t) {
5518
5518
  return new F.Table("GSUB", [
5519
5519
  { name: "version", type: "ULONG", value: 65536 },
5520
5520
  { name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
@@ -5522,8 +5522,8 @@ function vi(t) {
5522
5522
  { name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ge) }
5523
5523
  ]);
5524
5524
  }
5525
- var aa = { parse: gi, make: vi };
5526
- function mi(t, e) {
5525
+ var sa = { parse: vi, make: mi };
5526
+ function yi(t, e) {
5527
5527
  var r = new E.Parser(t, e), n = r.parseULong();
5528
5528
  U.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
5529
5529
  for (var a = r.parseULong(), s = {}, i = 0; i < a; i++) {
@@ -5532,7 +5532,7 @@ function mi(t, e) {
5532
5532
  }
5533
5533
  return s;
5534
5534
  }
5535
- function yi(t) {
5535
+ function xi(t) {
5536
5536
  var e = Object.keys(t).length, r = "", n = 16 + e * 12, a = new F.Table("meta", [
5537
5537
  { name: "version", type: "ULONG", value: 1 },
5538
5538
  { name: "flags", type: "ULONG", value: 0 },
@@ -5545,7 +5545,7 @@ function yi(t) {
5545
5545
  }
5546
5546
  return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), a;
5547
5547
  }
5548
- var sa = { parse: mi, make: yi };
5548
+ var ia = { parse: yi, make: xi };
5549
5549
  function _r(t) {
5550
5550
  return Math.log(t) / Math.log(2) | 0;
5551
5551
  }
@@ -5564,7 +5564,7 @@ function Hr(t, e, r, n) {
5564
5564
  { name: "length", type: "ULONG", value: n !== void 0 ? n : 0 }
5565
5565
  ]);
5566
5566
  }
5567
- function ia(t) {
5567
+ function oa(t) {
5568
5568
  var e = new F.Table("sfnt", [
5569
5569
  { name: "version", type: "TAG", value: "OTTO" },
5570
5570
  { name: "numTables", type: "USHORT", value: 0 },
@@ -5598,18 +5598,18 @@ function zr(t, e, r) {
5598
5598
  }
5599
5599
  return r;
5600
5600
  }
5601
- function xi(t) {
5601
+ function bi(t) {
5602
5602
  for (var e = 0, r = 0; r < t.length; r += 1)
5603
5603
  e += t[r];
5604
5604
  return e / t.length;
5605
5605
  }
5606
- function bi(t) {
5606
+ function Si(t) {
5607
5607
  for (var e = [], r = [], n = [], a = [], s = [], i = [], o = [], u, l = 0, h = 0, f = 0, c = 0, p = 0, d = 0; d < t.glyphs.length; d += 1) {
5608
5608
  var v = t.glyphs.get(d), y = v.unicode | 0;
5609
5609
  if (isNaN(v.advanceWidth))
5610
5610
  throw new Error("Glyph " + v.name + " (" + d + "): advanceWidth is not a number.");
5611
5611
  (u > y || u === void 0) && y > 0 && (u = y), l < y && (l = y);
5612
- var m = Jt.getUnicodeRange(y);
5612
+ var m = $t.getUnicodeRange(y);
5613
5613
  if (m < 32)
5614
5614
  h |= 1 << m;
5615
5615
  else if (m < 64)
@@ -5631,13 +5631,13 @@ function bi(t) {
5631
5631
  xMax: Math.max.apply(null, n),
5632
5632
  yMax: Math.max.apply(null, a),
5633
5633
  advanceWidthMax: Math.max.apply(null, s),
5634
- advanceWidthAvg: xi(s),
5634
+ advanceWidthAvg: bi(s),
5635
5635
  minLeftSideBearing: Math.min.apply(null, i),
5636
5636
  maxLeftSideBearing: Math.max.apply(null, i),
5637
5637
  minRightSideBearing: Math.min.apply(null, o)
5638
5638
  };
5639
5639
  x.ascender = t.ascender, x.descender = t.descender;
5640
- var T = Yn.make({
5640
+ var T = Zn.make({
5641
5641
  flags: 3,
5642
5642
  // 00000011 (baseline for font at y=0; left sidebearing point at x=0)
5643
5643
  unitsPerEm: t.unitsPerEm,
@@ -5647,7 +5647,7 @@ function bi(t) {
5647
5647
  yMax: x.yMax,
5648
5648
  lowestRecPPEM: 3,
5649
5649
  createdTimestamp: t.createdTimestamp
5650
- }), S = Zn.make({
5650
+ }), S = jn.make({
5651
5651
  ascender: x.ascender,
5652
5652
  descender: x.descender,
5653
5653
  advanceWidthMax: x.advanceWidthMax,
@@ -5655,7 +5655,7 @@ function bi(t) {
5655
5655
  minRightSideBearing: x.minRightSideBearing,
5656
5656
  xMaxExtent: x.maxLeftSideBearing + (x.xMax - x.xMin),
5657
5657
  numberOfHMetrics: t.glyphs.length
5658
- }), A = Qn.make(t.glyphs.length), O = Jt.make(Object.assign({
5658
+ }), A = $n.make(t.glyphs.length), O = $t.make(Object.assign({
5659
5659
  xAvgCharWidth: Math.round(x.advanceWidthAvg),
5660
5660
  usFirstCharIndex: u,
5661
5661
  usLastCharIndex: l,
@@ -5680,13 +5680,13 @@ function bi(t) {
5680
5680
  // Use space as the default character, if available.
5681
5681
  usBreakChar: t.hasChar(" ") ? 32 : 0
5682
5682
  // Use space as the break character, if available.
5683
- }, t.tables.os2)), w = jn.make(t.glyphs), M = Bn.make(t.glyphs), N = t.getEnglishName("fontFamily"), K = t.getEnglishName("fontSubfamily"), $ = N + " " + K, Y = t.getEnglishName("postScriptName");
5683
+ }, t.tables.os2)), w = Kn.make(t.glyphs), M = In.make(t.glyphs), N = t.getEnglishName("fontFamily"), K = t.getEnglishName("fontSubfamily"), $ = N + " " + K, Y = t.getEnglishName("postScriptName");
5684
5684
  Y || (Y = N.replace(/\s/g, "") + "-" + K);
5685
5685
  var I = {};
5686
5686
  for (var _ in t.names)
5687
5687
  I[_] = t.names[_];
5688
5688
  I.uniqueID || (I.uniqueID = { en: t.getEnglishName("manufacturer") + ":" + $ }), I.postScriptName || (I.postScriptName = { en: Y }), I.preferredFamily || (I.preferredFamily = t.names.fontFamily), I.preferredSubfamily || (I.preferredSubfamily = t.names.fontSubfamily);
5689
- var D = [], W = ra.make(I, D), Z = D.length > 0 ? Kn.make(D) : void 0, q = na.make(), Q = Xn.make(t.glyphs, {
5689
+ var D = [], W = na.make(I, D), Z = D.length > 0 ? Qn.make(D) : void 0, q = aa.make(), Q = Yn.make(t.glyphs, {
5690
5690
  version: t.getEnglishName("version"),
5691
5691
  fullName: $,
5692
5692
  familyName: N,
@@ -5694,19 +5694,19 @@ function bi(t) {
5694
5694
  postScriptName: Y,
5695
5695
  unitsPerEm: t.unitsPerEm,
5696
5696
  fontBBox: [0, x.yMin, x.ascender, x.advanceWidthMax]
5697
- }), B = t.metas && Object.keys(t.metas).length > 0 ? sa.make(t.metas) : void 0, j = [T, S, A, O, W, M, q, Q, w];
5698
- Z && j.push(Z), t.tables.gsub && j.push(aa.make(t.tables.gsub)), B && j.push(B);
5699
- for (var bt = ia(j), Sa = bt.encode(), ka = ur(Sa), St = bt.fields, yr = !1, rt = 0; rt < St.length; rt += 1)
5700
- if (St[rt].name === "head table") {
5701
- St[rt].value.checkSumAdjustment = 2981146554 - ka, yr = !0;
5697
+ }), B = t.metas && Object.keys(t.metas).length > 0 ? ia.make(t.metas) : void 0, j = [T, S, A, O, W, M, q, Q, w];
5698
+ Z && j.push(Z), t.tables.gsub && j.push(sa.make(t.tables.gsub)), B && j.push(B);
5699
+ for (var xt = oa(j), ka = xt.encode(), Fa = ur(ka), bt = xt.fields, yr = !1, tt = 0; tt < bt.length; tt += 1)
5700
+ if (bt[tt].name === "head table") {
5701
+ bt[tt].value.checkSumAdjustment = 2981146554 - Fa, yr = !0;
5702
5702
  break;
5703
5703
  }
5704
5704
  if (!yr)
5705
5705
  throw new Error("Could not find head table with checkSum to adjust.");
5706
- return bt;
5706
+ return xt;
5707
5707
  }
5708
- var Si = { make: ia, fontToTable: bi, computeCheckSum: ur };
5709
- function Et(t, e) {
5708
+ var ki = { make: oa, fontToTable: Si, computeCheckSum: ur };
5709
+ function Ct(t, e) {
5710
5710
  for (var r = 0, n = t.length - 1; r <= n; ) {
5711
5711
  var a = r + n >>> 1, s = t[a].tag;
5712
5712
  if (s === e)
@@ -5736,10 +5736,10 @@ function Vr(t, e) {
5736
5736
  if (n > 0)
5737
5737
  return r = t[n - 1], e > r.end ? 0 : r;
5738
5738
  }
5739
- function Ke(t, e) {
5739
+ function je(t, e) {
5740
5740
  this.font = t, this.tableName = e;
5741
5741
  }
5742
- Ke.prototype = {
5742
+ je.prototype = {
5743
5743
  /**
5744
5744
  * Binary search an object by "tag" property
5745
5745
  * @instance
@@ -5749,7 +5749,7 @@ Ke.prototype = {
5749
5749
  * @param {string} tag
5750
5750
  * @return {number}
5751
5751
  */
5752
- searchTag: Et,
5752
+ searchTag: Ct,
5753
5753
  /**
5754
5754
  * Binary search in a list of numbers
5755
5755
  * @instance
@@ -5810,7 +5810,7 @@ Ke.prototype = {
5810
5810
  var r = this.getTable(e);
5811
5811
  if (r) {
5812
5812
  t = t || "DFLT";
5813
- var n = r.scripts, a = Et(r.scripts, t);
5813
+ var n = r.scripts, a = Ct(r.scripts, t);
5814
5814
  if (a >= 0)
5815
5815
  return n[a].script;
5816
5816
  if (e) {
@@ -5838,7 +5838,7 @@ Ke.prototype = {
5838
5838
  if (n) {
5839
5839
  if (!e || e === "dflt" || e === "DFLT")
5840
5840
  return n.defaultLangSys;
5841
- var a = Et(n.langSysRecords, e);
5841
+ var a = Ct(n.langSysRecords, e);
5842
5842
  if (a >= 0)
5843
5843
  return n.langSysRecords[a].langSys;
5844
5844
  if (r) {
@@ -5952,15 +5952,15 @@ Ke.prototype = {
5952
5952
  return e;
5953
5953
  }
5954
5954
  };
5955
- function Qe(t) {
5956
- Ke.call(this, t, "gpos");
5955
+ function Ke(t) {
5956
+ je.call(this, t, "gpos");
5957
5957
  }
5958
- Qe.prototype = Ke.prototype;
5959
- Qe.prototype.init = function() {
5958
+ Ke.prototype = je.prototype;
5959
+ Ke.prototype.init = function() {
5960
5960
  var t = this.getDefaultScriptName();
5961
5961
  this.defaultKerningTables = this.getKerningTables(t);
5962
5962
  };
5963
- Qe.prototype.getKerningValue = function(t, e, r) {
5963
+ Ke.prototype.getKerningValue = function(t, e, r) {
5964
5964
  for (var n = 0; n < t.length; n++)
5965
5965
  for (var a = t[n].subtables, s = 0; s < a.length; s++) {
5966
5966
  var i = a[s], o = this.getCoverageIndex(i.coverage, e);
@@ -5980,14 +5980,14 @@ Qe.prototype.getKerningValue = function(t, e, r) {
5980
5980
  }
5981
5981
  return 0;
5982
5982
  };
5983
- Qe.prototype.getKerningTables = function(t, e) {
5983
+ Ke.prototype.getKerningTables = function(t, e) {
5984
5984
  if (this.font.tables.gpos)
5985
5985
  return this.getLookupTables(t, e, "kern", 2);
5986
5986
  };
5987
5987
  function re(t) {
5988
- Ke.call(this, t, "gsub");
5988
+ je.call(this, t, "gsub");
5989
5989
  }
5990
- function ki(t, e) {
5990
+ function Fi(t, e) {
5991
5991
  var r = t.length;
5992
5992
  if (r !== e.length)
5993
5993
  return !1;
@@ -6005,7 +6005,7 @@ function lr(t, e, r) {
6005
6005
  if (r)
6006
6006
  return n.push(r), r;
6007
6007
  }
6008
- re.prototype = Ke.prototype;
6008
+ re.prototype = je.prototype;
6009
6009
  re.prototype.createDefaultTable = function() {
6010
6010
  return {
6011
6011
  version: 1,
@@ -6117,7 +6117,7 @@ re.prototype.addLigature = function(t, e, r, n) {
6117
6117
  }, l = this.binSearch(s.coverage.glyphs, i);
6118
6118
  if (l >= 0) {
6119
6119
  for (var h = s.ligatureSets[l], f = 0; f < h.length; f++)
6120
- if (ki(h[f].components, o))
6120
+ if (Fi(h[f].components, o))
6121
6121
  return;
6122
6122
  h.push(u);
6123
6123
  } else
@@ -6155,10 +6155,10 @@ re.prototype.add = function(t, e, r, n) {
6155
6155
  return e.by instanceof Array ? this.addMultiple(t, e, r, n) : this.addLigature(t, e, r, n);
6156
6156
  }
6157
6157
  };
6158
- function Fi() {
6158
+ function Ti() {
6159
6159
  return typeof window < "u";
6160
6160
  }
6161
- function Ti(t) {
6161
+ function wi(t) {
6162
6162
  for (var e = new Buffer(t.byteLength), r = new Uint8Array(t), n = 0; n < e.length; ++n)
6163
6163
  e[n] = r[n];
6164
6164
  return e;
@@ -6171,7 +6171,7 @@ function qr(t, e, r, n, a) {
6171
6171
  var s;
6172
6172
  return (e & n) > 0 ? (s = t.parseByte(), e & a || (s = -s), s = r + s) : (e & a) > 0 ? s = r : s = r + t.parseShort(), s;
6173
6173
  }
6174
- function oa(t, e, r) {
6174
+ function ua(t, e, r) {
6175
6175
  var n = new E.Parser(e, r);
6176
6176
  t.numberOfContours = n.parseShort(), t._xMin = n.parseShort(), t._yMin = n.parseShort(), t._xMax = n.parseShort(), t._yMax = n.parseShort();
6177
6177
  var a, s;
@@ -6224,7 +6224,7 @@ function oa(t, e, r) {
6224
6224
  }
6225
6225
  }
6226
6226
  }
6227
- function Ot(t, e) {
6227
+ function Et(t, e) {
6228
6228
  for (var r = [], n = 0; n < t.length; n += 1) {
6229
6229
  var a = t[n], s = {
6230
6230
  x: e.xScale * a.x + e.scale01 * a.y + e.dx,
@@ -6236,18 +6236,18 @@ function Ot(t, e) {
6236
6236
  }
6237
6237
  return r;
6238
6238
  }
6239
- function wi(t) {
6239
+ function Ci(t) {
6240
6240
  for (var e = [], r = [], n = 0; n < t.length; n += 1) {
6241
6241
  var a = t[n];
6242
6242
  r.push(a), a.lastPointOfContour && (e.push(r), r = []);
6243
6243
  }
6244
6244
  return U.argument(r.length === 0, "There are still points left in the current contour."), e;
6245
6245
  }
6246
- function ua(t) {
6246
+ function la(t) {
6247
6247
  var e = new V();
6248
6248
  if (!t)
6249
6249
  return e;
6250
- for (var r = wi(t), n = 0; n < r.length; ++n) {
6250
+ for (var r = Ci(t), n = 0; n < r.length; ++n) {
6251
6251
  var a = r[n], s = null, i = a[a.length - 1], o = a[0];
6252
6252
  if (i.onCurve)
6253
6253
  e.moveTo(i.x, i.y);
@@ -6268,14 +6268,14 @@ function ua(t) {
6268
6268
  }
6269
6269
  return e;
6270
6270
  }
6271
- function la(t, e) {
6271
+ function ha(t, e) {
6272
6272
  if (e.isComposite)
6273
6273
  for (var r = 0; r < e.components.length; r += 1) {
6274
6274
  var n = e.components[r], a = t.get(n.glyphIndex);
6275
6275
  if (a.getPath(), a.points) {
6276
6276
  var s = void 0;
6277
6277
  if (n.matchedPoints === void 0)
6278
- s = Ot(a.points, n);
6278
+ s = Et(a.points, n);
6279
6279
  else {
6280
6280
  if (n.matchedPoints[0] > e.points.length - 1 || n.matchedPoints[1] > a.points.length - 1)
6281
6281
  throw Error("Matched points out of range in " + e.name);
@@ -6287,55 +6287,55 @@ function la(t, e) {
6287
6287
  dx: 0,
6288
6288
  dy: 0
6289
6289
  };
6290
- o = Ot([o], u)[0], u.dx = i.x - o.x, u.dy = i.y - o.y, s = Ot(a.points, u);
6290
+ o = Et([o], u)[0], u.dx = i.x - o.x, u.dy = i.y - o.y, s = Et(a.points, u);
6291
6291
  }
6292
6292
  e.points = e.points.concat(s);
6293
6293
  }
6294
6294
  }
6295
- return ua(e.points);
6295
+ return la(e.points);
6296
6296
  }
6297
- function Ci(t, e, r, n) {
6297
+ function Ei(t, e, r, n) {
6298
6298
  for (var a = new ge.GlyphSet(n), s = 0; s < r.length - 1; s += 1) {
6299
6299
  var i = r[s], o = r[s + 1];
6300
- i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, ge.glyphLoader(n, s));
6300
+ i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, ua, t, e + i, ha)) : a.push(s, ge.glyphLoader(n, s));
6301
6301
  }
6302
6302
  return a;
6303
6303
  }
6304
- function Ei(t, e, r, n) {
6304
+ function Oi(t, e, r, n) {
6305
6305
  var a = new ge.GlyphSet(n);
6306
6306
  return n._push = function(s) {
6307
6307
  var i = r[s], o = r[s + 1];
6308
- i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, ge.glyphLoader(n, s));
6308
+ i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, ua, t, e + i, ha)) : a.push(s, ge.glyphLoader(n, s));
6309
6309
  }, a;
6310
6310
  }
6311
- function Oi(t, e, r, n, a) {
6312
- return a.lowMemory ? Ei(t, e, r, n) : Ci(t, e, r, n);
6311
+ function Ui(t, e, r, n, a) {
6312
+ return a.lowMemory ? Oi(t, e, r, n) : Ei(t, e, r, n);
6313
6313
  }
6314
- var ha = { getPath: ua, parse: Oi }, ca, Ae, fa, er;
6315
- function pa(t) {
6314
+ var ca = { getPath: la, parse: Ui }, fa, Ae, pa, Jt;
6315
+ function da(t) {
6316
6316
  this.font = t, this.getCommands = function(e) {
6317
- return ha.getPath(e).commands;
6317
+ return ca.getPath(e).commands;
6318
6318
  }, this._fpgmState = this._prepState = void 0, this._errorState = 0;
6319
6319
  }
6320
- function Ui(t) {
6320
+ function Li(t) {
6321
6321
  return t;
6322
6322
  }
6323
- function da(t) {
6323
+ function ga(t) {
6324
6324
  return Math.sign(t) * Math.round(Math.abs(t));
6325
6325
  }
6326
- function Li(t) {
6326
+ function Ri(t) {
6327
6327
  return Math.sign(t) * Math.round(Math.abs(t * 2)) / 2;
6328
6328
  }
6329
- function Ri(t) {
6329
+ function Ai(t) {
6330
6330
  return Math.sign(t) * (Math.round(Math.abs(t) + 0.5) - 0.5);
6331
6331
  }
6332
- function Ai(t) {
6332
+ function Mi(t) {
6333
6333
  return Math.sign(t) * Math.ceil(Math.abs(t));
6334
6334
  }
6335
- function Mi(t) {
6335
+ function Pi(t) {
6336
6336
  return Math.sign(t) * Math.floor(Math.abs(t));
6337
6337
  }
6338
- var ga = function(t) {
6338
+ var va = function(t) {
6339
6339
  var e = this.srPeriod, r = this.srPhase, n = this.srThreshold, a = 1;
6340
6340
  return t < 0 && (t = -t, a = -1), t += n - r, t = Math.trunc(t / e) * e, t += r, t < 0 ? r * a : t * a;
6341
6341
  }, pe = {
@@ -6469,13 +6469,13 @@ var ga = function(t) {
6469
6469
  };
6470
6470
  Object.freeze(pe);
6471
6471
  Object.freeze(ve);
6472
- function $e(t, e) {
6472
+ function Qe(t, e) {
6473
6473
  this.x = t, this.y = e, this.axis = void 0, this.slope = e / t, this.normalSlope = -t / e, Object.freeze(this);
6474
6474
  }
6475
- $e.prototype.distance = function(t, e, r, n) {
6475
+ Qe.prototype.distance = function(t, e, r, n) {
6476
6476
  return this.x * pe.distance(t, e, r, n) + this.y * ve.distance(t, e, r, n);
6477
6477
  };
6478
- $e.prototype.interpolate = function(t, e, r, n) {
6478
+ Qe.prototype.interpolate = function(t, e, r, n) {
6479
6479
  var a, s, i, o, u, l, h;
6480
6480
  if (i = n.distance(t, e, !0, !0), o = n.distance(t, r, !0, !0), a = n.distance(e, e, !1, !0), s = n.distance(r, r, !1, !0), u = Math.abs(i), l = Math.abs(o), h = u + l, h === 0) {
6481
6481
  this.setRelative(t, t, (a + s) / 2, n, !0);
@@ -6483,17 +6483,17 @@ $e.prototype.interpolate = function(t, e, r, n) {
6483
6483
  }
6484
6484
  this.setRelative(t, t, (a * l + s * u) / h, n, !0);
6485
6485
  };
6486
- $e.prototype.setRelative = function(t, e, r, n, a) {
6486
+ Qe.prototype.setRelative = function(t, e, r, n, a) {
6487
6487
  n = n || this;
6488
6488
  var s = a ? e.xo : e.x, i = a ? e.yo : e.y, o = s + r * n.x, u = i + r * n.y, l = n.normalSlope, h = this.slope, f = t.x, c = t.y;
6489
6489
  t.x = (h * f - l * o + u - c) / (h - l), t.y = h * (t.x - f) + c;
6490
6490
  };
6491
- $e.prototype.touch = function(t) {
6491
+ Qe.prototype.touch = function(t) {
6492
6492
  t.xTouched = !0, t.yTouched = !0;
6493
6493
  };
6494
- function Je(t, e) {
6494
+ function $e(t, e) {
6495
6495
  var r = Math.sqrt(t * t + e * e);
6496
- return t /= r, e /= r, t === 1 && e === 0 ? pe : t === 0 && e === 1 ? ve : new $e(t, e);
6496
+ return t /= r, e /= r, t === 1 && e === 0 ? pe : t === 0 && e === 1 ? ve : new Qe(t, e);
6497
6497
  }
6498
6498
  function me(t, e, r, n) {
6499
6499
  this.x = this.xo = Math.round(t * 64) / 64, this.y = this.yo = Math.round(e * 64) / 64, this.lastPointOfContour = r, this.onCurve = n, this.prevPointOnContour = void 0, this.nextPointOnContour = void 0, this.xTouched = !1, this.yTouched = !1, Object.preventExtensions(this);
@@ -6508,7 +6508,7 @@ me.prototype.prevTouched = function(t) {
6508
6508
  e = e.prevPointOnContour;
6509
6509
  return e;
6510
6510
  };
6511
- var Ye = Object.freeze(new me(0, 0)), Pi = {
6511
+ var Ye = Object.freeze(new me(0, 0)), Bi = {
6512
6512
  cvCutIn: 17 / 16,
6513
6513
  // control value cut in
6514
6514
  deltaBase: 9,
@@ -6524,10 +6524,10 @@ function Se(t, e) {
6524
6524
  case "glyf":
6525
6525
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
6526
6526
  case "prep":
6527
- this.fv = this.pv = this.dpv = pe, this.round = da;
6527
+ this.fv = this.pv = this.dpv = pe, this.round = ga;
6528
6528
  }
6529
6529
  }
6530
- pa.prototype.exec = function(t, e) {
6530
+ da.prototype.exec = function(t, e) {
6531
6531
  if (typeof e != "number")
6532
6532
  throw new Error("Point size is not a number!");
6533
6533
  if (!(this._errorState > 2)) {
@@ -6535,7 +6535,7 @@ pa.prototype.exec = function(t, e) {
6535
6535
  if (!n || n.ppem !== e) {
6536
6536
  var a = this._fpgmState;
6537
6537
  if (!a) {
6538
- Se.prototype = Pi, a = this._fpgmState = new Se("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
6538
+ Se.prototype = Bi, a = this._fpgmState = new Se("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
6539
6539
  try {
6540
6540
  Ae(a);
6541
6541
  } catch (l) {
@@ -6559,23 +6559,23 @@ pa.prototype.exec = function(t, e) {
6559
6559
  }
6560
6560
  if (!(this._errorState > 1))
6561
6561
  try {
6562
- return fa(t, n);
6562
+ return pa(t, n);
6563
6563
  } catch (l) {
6564
6564
  this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
6565
6565
  return;
6566
6566
  }
6567
6567
  }
6568
6568
  };
6569
- fa = function(t, e) {
6569
+ pa = function(t, e) {
6570
6570
  var r = e.ppem / e.font.unitsPerEm, n = r, a = t.components, s, i, o;
6571
6571
  if (Se.prototype = e, !a)
6572
- o = new Se("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), er(t, o, r, n), i = o.gZone;
6572
+ o = new Se("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), Jt(t, o, r, n), i = o.gZone;
6573
6573
  else {
6574
6574
  var u = e.font;
6575
6575
  i = [], s = [];
6576
6576
  for (var l = 0; l < a.length; l++) {
6577
6577
  var h = a[l], f = u.glyphs.get(h.glyphIndex);
6578
- o = new Se("glyf", f.instructions), exports.DEBUG && (console.log("---EXEC COMP " + l + "---"), o.step = -1), er(f, o, r, n);
6578
+ o = new Se("glyf", f.instructions), exports.DEBUG && (console.log("---EXEC COMP " + l + "---"), o.step = -1), Jt(f, o, r, n);
6579
6579
  for (var c = Math.round(h.dx * r), p = Math.round(h.dy * n), d = o.gZone, v = o.contours, y = 0; y < d.length; y++) {
6580
6580
  var m = d[y];
6581
6581
  m.xTouched = m.yTouched = !1, m.xo = m.x = m.x + c, m.yo = m.y = m.y + p;
@@ -6592,7 +6592,7 @@ fa = function(t, e) {
6592
6592
  }
6593
6593
  return i;
6594
6594
  };
6595
- er = function(t, e, r, n) {
6595
+ Jt = function(t, e, r, n) {
6596
6596
  for (var a = t.points || [], s = a.length, i = e.gZone = e.z0 = e.z1 = e.z2 = [], o = e.contours = [], u, l = 0; l < s; l++)
6597
6597
  u = a[l], i[l] = new me(
6598
6598
  u.x * r,
@@ -6623,7 +6623,7 @@ Ae = function(t) {
6623
6623
  if (e) {
6624
6624
  var r = e.length, n;
6625
6625
  for (t.ip = 0; t.ip < r; t.ip++) {
6626
- if (exports.DEBUG && t.step++, n = ca[e[t.ip]], !n)
6626
+ if (exports.DEBUG && t.step++, n = fa[e[t.ip]], !n)
6627
6627
  throw new Error(
6628
6628
  "unknown instruction: 0x" + Number(e[t.ip]).toString(16)
6629
6629
  );
@@ -6631,11 +6631,11 @@ Ae = function(t) {
6631
6631
  }
6632
6632
  }
6633
6633
  };
6634
- function yt(t) {
6634
+ function mt(t) {
6635
6635
  for (var e = t.tZone = new Array(t.gZone.length), r = 0; r < e.length; r++)
6636
6636
  e[r] = new me(0, 0);
6637
6637
  }
6638
- function va(t, e) {
6638
+ function ma(t, e) {
6639
6639
  var r = t.prog, n = t.ip, a = 1, s;
6640
6640
  do
6641
6641
  if (s = r[++n], s === 88)
@@ -6668,53 +6668,53 @@ function jr(t, e) {
6668
6668
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
6669
6669
  exports.DEBUG && console.log("SPVTL[" + t + "]", n, a);
6670
6670
  var o, u;
6671
- t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.pv = e.dpv = Je(o, u);
6671
+ t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.pv = e.dpv = $e(o, u);
6672
6672
  }
6673
6673
  function Kr(t, e) {
6674
6674
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
6675
6675
  exports.DEBUG && console.log("SFVTL[" + t + "]", n, a);
6676
6676
  var o, u;
6677
- t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.fv = Je(o, u);
6678
- }
6679
- function Bi(t) {
6680
- var e = t.stack, r = e.pop(), n = e.pop();
6681
- exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.pv = t.dpv = Je(n, r);
6677
+ t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.fv = $e(o, u);
6682
6678
  }
6683
6679
  function Ii(t) {
6684
6680
  var e = t.stack, r = e.pop(), n = e.pop();
6685
- exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.fv = Je(n, r);
6681
+ exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.pv = t.dpv = $e(n, r);
6686
6682
  }
6687
6683
  function Di(t) {
6684
+ var e = t.stack, r = e.pop(), n = e.pop();
6685
+ exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.fv = $e(n, r);
6686
+ }
6687
+ function Gi(t) {
6688
6688
  var e = t.stack, r = t.pv;
6689
6689
  exports.DEBUG && console.log(t.step, "GPV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
6690
6690
  }
6691
- function Gi(t) {
6691
+ function Ni(t) {
6692
6692
  var e = t.stack, r = t.fv;
6693
6693
  exports.DEBUG && console.log(t.step, "GFV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
6694
6694
  }
6695
- function Ni(t) {
6695
+ function _i(t) {
6696
6696
  t.fv = t.pv, exports.DEBUG && console.log(t.step, "SFVTPV[]");
6697
6697
  }
6698
- function _i(t) {
6698
+ function Hi(t) {
6699
6699
  var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), s = e.pop(), i = e.pop(), o = t.z0, u = t.z1, l = o[r], h = o[n], f = u[a], c = u[s], p = t.z2[i];
6700
6700
  exports.DEBUG && console.log("ISECT[], ", r, n, a, s, i);
6701
6701
  var d = l.x, v = l.y, y = h.x, m = h.y, b = f.x, x = f.y, T = c.x, S = c.y, A = (d - y) * (x - S) - (v - m) * (b - T), O = d * m - v * y, w = b * S - x * T;
6702
6702
  p.x = (O * (b - T) - w * (d - y)) / A, p.y = (O * (x - S) - w * (v - m)) / A;
6703
6703
  }
6704
- function Hi(t) {
6704
+ function zi(t) {
6705
6705
  t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
6706
6706
  }
6707
- function zi(t) {
6707
+ function Wi(t) {
6708
6708
  t.rp1 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP1[]", t.rp1);
6709
6709
  }
6710
- function Wi(t) {
6710
+ function Vi(t) {
6711
6711
  t.rp2 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP2[]", t.rp2);
6712
6712
  }
6713
- function Vi(t) {
6713
+ function qi(t) {
6714
6714
  var e = t.stack.pop();
6715
6715
  switch (exports.DEBUG && console.log(t.step, "SZP0[]", e), t.zp0 = e, e) {
6716
6716
  case 0:
6717
- t.tZone || yt(t), t.z0 = t.tZone;
6717
+ t.tZone || mt(t), t.z0 = t.tZone;
6718
6718
  break;
6719
6719
  case 1:
6720
6720
  t.z0 = t.gZone;
@@ -6723,11 +6723,11 @@ function Vi(t) {
6723
6723
  throw new Error("Invalid zone pointer");
6724
6724
  }
6725
6725
  }
6726
- function qi(t) {
6726
+ function Xi(t) {
6727
6727
  var e = t.stack.pop();
6728
6728
  switch (exports.DEBUG && console.log(t.step, "SZP1[]", e), t.zp1 = e, e) {
6729
6729
  case 0:
6730
- t.tZone || yt(t), t.z1 = t.tZone;
6730
+ t.tZone || mt(t), t.z1 = t.tZone;
6731
6731
  break;
6732
6732
  case 1:
6733
6733
  t.z1 = t.gZone;
@@ -6736,11 +6736,11 @@ function qi(t) {
6736
6736
  throw new Error("Invalid zone pointer");
6737
6737
  }
6738
6738
  }
6739
- function Xi(t) {
6739
+ function Yi(t) {
6740
6740
  var e = t.stack.pop();
6741
6741
  switch (exports.DEBUG && console.log(t.step, "SZP2[]", e), t.zp2 = e, e) {
6742
6742
  case 0:
6743
- t.tZone || yt(t), t.z2 = t.tZone;
6743
+ t.tZone || mt(t), t.z2 = t.tZone;
6744
6744
  break;
6745
6745
  case 1:
6746
6746
  t.z2 = t.gZone;
@@ -6749,11 +6749,11 @@ function Xi(t) {
6749
6749
  throw new Error("Invalid zone pointer");
6750
6750
  }
6751
6751
  }
6752
- function Yi(t) {
6752
+ function Zi(t) {
6753
6753
  var e = t.stack.pop();
6754
6754
  switch (exports.DEBUG && console.log(t.step, "SZPS[]", e), t.zp0 = t.zp1 = t.zp2 = e, e) {
6755
6755
  case 0:
6756
- t.tZone || yt(t), t.z0 = t.z1 = t.z2 = t.tZone;
6756
+ t.tZone || mt(t), t.z0 = t.z1 = t.z2 = t.tZone;
6757
6757
  break;
6758
6758
  case 1:
6759
6759
  t.z0 = t.z1 = t.z2 = t.gZone;
@@ -6762,49 +6762,49 @@ function Yi(t) {
6762
6762
  throw new Error("Invalid zone pointer");
6763
6763
  }
6764
6764
  }
6765
- function Zi(t) {
6766
- t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
6767
- }
6768
6765
  function ji(t) {
6769
- exports.DEBUG && console.log(t.step, "RTG[]"), t.round = da;
6766
+ t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
6770
6767
  }
6771
6768
  function Ki(t) {
6772
- exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Ri;
6769
+ exports.DEBUG && console.log(t.step, "RTG[]"), t.round = ga;
6773
6770
  }
6774
6771
  function Qi(t) {
6775
- var e = t.stack.pop();
6776
- exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
6772
+ exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Ai;
6777
6773
  }
6778
6774
  function $i(t) {
6779
- exports.DEBUG && console.log(t.step, "ELSE[]"), va(t, !1);
6775
+ var e = t.stack.pop();
6776
+ exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
6780
6777
  }
6781
6778
  function Ji(t) {
6779
+ exports.DEBUG && console.log(t.step, "ELSE[]"), ma(t, !1);
6780
+ }
6781
+ function eo(t) {
6782
6782
  var e = t.stack.pop();
6783
6783
  exports.DEBUG && console.log(t.step, "JMPR[]", e), t.ip += e - 1;
6784
6784
  }
6785
- function eo(t) {
6785
+ function to(t) {
6786
6786
  var e = t.stack.pop();
6787
6787
  exports.DEBUG && console.log(t.step, "SCVTCI[]", e), t.cvCutIn = e / 64;
6788
6788
  }
6789
- function to(t) {
6789
+ function ro(t) {
6790
6790
  var e = t.stack;
6791
6791
  exports.DEBUG && console.log(t.step, "DUP[]"), e.push(e[e.length - 1]);
6792
6792
  }
6793
- function Ut(t) {
6793
+ function Ot(t) {
6794
6794
  exports.DEBUG && console.log(t.step, "POP[]"), t.stack.pop();
6795
6795
  }
6796
- function ro(t) {
6796
+ function no(t) {
6797
6797
  exports.DEBUG && console.log(t.step, "CLEAR[]"), t.stack.length = 0;
6798
6798
  }
6799
- function no(t) {
6799
+ function ao(t) {
6800
6800
  var e = t.stack, r = e.pop(), n = e.pop();
6801
6801
  exports.DEBUG && console.log(t.step, "SWAP[]"), e.push(r), e.push(n);
6802
6802
  }
6803
- function ao(t) {
6803
+ function so(t) {
6804
6804
  var e = t.stack;
6805
6805
  exports.DEBUG && console.log(t.step, "DEPTH[]"), e.push(e.length);
6806
6806
  }
6807
- function so(t) {
6807
+ function io(t) {
6808
6808
  var e = t.stack, r = e.pop(), n = e.pop();
6809
6809
  exports.DEBUG && console.log(t.step, "LOOPCALL[]", r, n);
6810
6810
  var a = t.ip, s = t.prog;
@@ -6817,21 +6817,21 @@ function so(t) {
6817
6817
  );
6818
6818
  t.ip = a, t.prog = s;
6819
6819
  }
6820
- function io(t) {
6820
+ function oo(t) {
6821
6821
  var e = t.stack.pop();
6822
6822
  exports.DEBUG && console.log(t.step, "CALL[]", e);
6823
6823
  var r = t.ip, n = t.prog;
6824
6824
  t.prog = t.funcs[e], Ae(t), t.ip = r, t.prog = n, exports.DEBUG && console.log(++t.step, "returning from", e);
6825
6825
  }
6826
- function oo(t) {
6826
+ function uo(t) {
6827
6827
  var e = t.stack, r = e.pop();
6828
6828
  exports.DEBUG && console.log(t.step, "CINDEX[]", r), e.push(e[e.length - r]);
6829
6829
  }
6830
- function uo(t) {
6830
+ function lo(t) {
6831
6831
  var e = t.stack, r = e.pop();
6832
6832
  exports.DEBUG && console.log(t.step, "MINDEX[]", r), e.push(e.splice(e.length - r, 1)[0]);
6833
6833
  }
6834
- function lo(t) {
6834
+ function ho(t) {
6835
6835
  if (t.env !== "fpgm")
6836
6836
  throw new Error("FDEF not allowed here");
6837
6837
  var e = t.stack, r = t.prog, n = t.ip, a = e.pop(), s = n;
@@ -6887,7 +6887,7 @@ function tn(t, e) {
6887
6887
  for (var l, h = i.distance(a, a, !1, !0), f = u.length - 2, c = 0; c < f; c++)
6888
6888
  l = u[c], s.setRelative(l, l, h, i);
6889
6889
  }
6890
- function ho(t) {
6890
+ function co(t) {
6891
6891
  for (var e = t.stack, r = t.loop, n = t.fv, a = e.pop() / 64, s = t.z2; r--; ) {
6892
6892
  var i = e.pop(), o = s[i];
6893
6893
  exports.DEBUG && console.log(
@@ -6899,7 +6899,7 @@ function ho(t) {
6899
6899
  }
6900
6900
  t.loop = 1;
6901
6901
  }
6902
- function co(t) {
6902
+ function fo(t) {
6903
6903
  for (var e = t.stack, r = t.rp1, n = t.rp2, a = t.loop, s = t.z0[r], i = t.z1[n], o = t.fv, u = t.dpv, l = t.z2; a--; ) {
6904
6904
  var h = e.pop(), f = l[h];
6905
6905
  exports.DEBUG && console.log(
@@ -6917,7 +6917,7 @@ function rn(t, e) {
6917
6917
  var r = e.stack, n = r.pop() / 64, a = r.pop(), s = e.z1[a], i = e.z0[e.rp0], o = e.fv, u = e.pv;
6918
6918
  o.setRelative(s, i, n, u), o.touch(s), exports.DEBUG && console.log(e.step, "MSIRP[" + t + "]", n, a), e.rp1 = e.rp0, e.rp2 = a, t && (e.rp0 = a);
6919
6919
  }
6920
- function fo(t) {
6920
+ function po(t) {
6921
6921
  for (var e = t.stack, r = t.rp0, n = t.z0[r], a = t.loop, s = t.fv, i = t.pv, o = t.z1; a--; ) {
6922
6922
  var u = e.pop(), l = o[u];
6923
6923
  exports.DEBUG && console.log(
@@ -6928,8 +6928,8 @@ function fo(t) {
6928
6928
  }
6929
6929
  t.loop = 1;
6930
6930
  }
6931
- function po(t) {
6932
- exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Li;
6931
+ function go(t) {
6932
+ exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Ri;
6933
6933
  }
6934
6934
  function nn(t, e) {
6935
6935
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z0[a], i = e.fv, o = e.pv, u = e.cvt[n];
@@ -6945,14 +6945,14 @@ function nn(t, e) {
6945
6945
  var l = o.distance(s, Ye);
6946
6946
  t && (Math.abs(l - u) < e.cvCutIn && (l = u), l = e.round(l)), i.setRelative(s, Ye, l, o), e.zp0 === 0 && (s.xo = s.x, s.yo = s.y), i.touch(s), e.rp0 = e.rp1 = a;
6947
6947
  }
6948
- function go(t) {
6948
+ function vo(t) {
6949
6949
  var e = t.prog, r = t.ip, n = t.stack, a = e[++r];
6950
6950
  exports.DEBUG && console.log(t.step, "NPUSHB[]", a);
6951
6951
  for (var s = 0; s < a; s++)
6952
6952
  n.push(e[++r]);
6953
6953
  t.ip = r;
6954
6954
  }
6955
- function vo(t) {
6955
+ function mo(t) {
6956
6956
  var e = t.ip, r = t.prog, n = t.stack, a = r[++e];
6957
6957
  exports.DEBUG && console.log(t.step, "NPUSHW[]", a);
6958
6958
  for (var s = 0; s < a; s++) {
@@ -6961,23 +6961,23 @@ function vo(t) {
6961
6961
  }
6962
6962
  t.ip = e;
6963
6963
  }
6964
- function mo(t) {
6964
+ function yo(t) {
6965
6965
  var e = t.stack, r = t.store;
6966
6966
  r || (r = t.store = []);
6967
6967
  var n = e.pop(), a = e.pop();
6968
6968
  exports.DEBUG && console.log(t.step, "WS", n, a), r[a] = n;
6969
6969
  }
6970
- function yo(t) {
6970
+ function xo(t) {
6971
6971
  var e = t.stack, r = t.store, n = e.pop();
6972
6972
  exports.DEBUG && console.log(t.step, "RS", n);
6973
6973
  var a = r && r[n] || 0;
6974
6974
  e.push(a);
6975
6975
  }
6976
- function xo(t) {
6976
+ function bo(t) {
6977
6977
  var e = t.stack, r = e.pop(), n = e.pop();
6978
6978
  exports.DEBUG && console.log(t.step, "WCVTP", r, n), t.cvt[n] = r / 64;
6979
6979
  }
6980
- function bo(t) {
6980
+ function So(t) {
6981
6981
  var e = t.stack, r = e.pop();
6982
6982
  exports.DEBUG && console.log(t.step, "RCVT", r), e.push(t.cvt[r] * 64);
6983
6983
  }
@@ -6989,64 +6989,64 @@ function sn(t, e) {
6989
6989
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z1[n], i = e.z0[a], o = e.dpv.distance(i, s, t, t);
6990
6990
  exports.DEBUG && console.log(e.step, "MD[" + t + "]", n, a, "->", o), e.stack.push(Math.round(o * 64));
6991
6991
  }
6992
- function So(t) {
6992
+ function ko(t) {
6993
6993
  exports.DEBUG && console.log(t.step, "MPPEM[]"), t.stack.push(t.ppem);
6994
6994
  }
6995
- function ko(t) {
6995
+ function Fo(t) {
6996
6996
  exports.DEBUG && console.log(t.step, "FLIPON[]"), t.autoFlip = !0;
6997
6997
  }
6998
- function Fo(t) {
6998
+ function To(t) {
6999
6999
  var e = t.stack, r = e.pop(), n = e.pop();
7000
7000
  exports.DEBUG && console.log(t.step, "LT[]", r, n), e.push(n < r ? 1 : 0);
7001
7001
  }
7002
- function To(t) {
7002
+ function wo(t) {
7003
7003
  var e = t.stack, r = e.pop(), n = e.pop();
7004
7004
  exports.DEBUG && console.log(t.step, "LTEQ[]", r, n), e.push(n <= r ? 1 : 0);
7005
7005
  }
7006
- function wo(t) {
7006
+ function Co(t) {
7007
7007
  var e = t.stack, r = e.pop(), n = e.pop();
7008
7008
  exports.DEBUG && console.log(t.step, "GT[]", r, n), e.push(n > r ? 1 : 0);
7009
7009
  }
7010
- function Co(t) {
7010
+ function Eo(t) {
7011
7011
  var e = t.stack, r = e.pop(), n = e.pop();
7012
7012
  exports.DEBUG && console.log(t.step, "GTEQ[]", r, n), e.push(n >= r ? 1 : 0);
7013
7013
  }
7014
- function Eo(t) {
7014
+ function Oo(t) {
7015
7015
  var e = t.stack, r = e.pop(), n = e.pop();
7016
7016
  exports.DEBUG && console.log(t.step, "EQ[]", r, n), e.push(r === n ? 1 : 0);
7017
7017
  }
7018
- function Oo(t) {
7018
+ function Uo(t) {
7019
7019
  var e = t.stack, r = e.pop(), n = e.pop();
7020
7020
  exports.DEBUG && console.log(t.step, "NEQ[]", r, n), e.push(r !== n ? 1 : 0);
7021
7021
  }
7022
- function Uo(t) {
7022
+ function Lo(t) {
7023
7023
  var e = t.stack, r = e.pop();
7024
7024
  exports.DEBUG && console.log(t.step, "ODD[]", r), e.push(Math.trunc(r) % 2 ? 1 : 0);
7025
7025
  }
7026
- function Lo(t) {
7026
+ function Ro(t) {
7027
7027
  var e = t.stack, r = e.pop();
7028
7028
  exports.DEBUG && console.log(t.step, "EVEN[]", r), e.push(Math.trunc(r) % 2 ? 0 : 1);
7029
7029
  }
7030
- function Ro(t) {
7030
+ function Ao(t) {
7031
7031
  var e = t.stack.pop();
7032
- exports.DEBUG && console.log(t.step, "IF[]", e), e || (va(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
7032
+ exports.DEBUG && console.log(t.step, "IF[]", e), e || (ma(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
7033
7033
  }
7034
- function Ao(t) {
7034
+ function Mo(t) {
7035
7035
  exports.DEBUG && console.log(t.step, "EIF[]");
7036
7036
  }
7037
- function Mo(t) {
7037
+ function Po(t) {
7038
7038
  var e = t.stack, r = e.pop(), n = e.pop();
7039
7039
  exports.DEBUG && console.log(t.step, "AND[]", r, n), e.push(r && n ? 1 : 0);
7040
7040
  }
7041
- function Po(t) {
7041
+ function Bo(t) {
7042
7042
  var e = t.stack, r = e.pop(), n = e.pop();
7043
7043
  exports.DEBUG && console.log(t.step, "OR[]", r, n), e.push(r || n ? 1 : 0);
7044
7044
  }
7045
- function Bo(t) {
7045
+ function Io(t) {
7046
7046
  var e = t.stack, r = e.pop();
7047
7047
  exports.DEBUG && console.log(t.step, "NOT[]", r), e.push(r ? 0 : 1);
7048
7048
  }
7049
- function Lt(t, e) {
7049
+ function Ut(t, e) {
7050
7050
  var r = e.stack, n = r.pop(), a = e.fv, s = e.pv, i = e.ppem, o = e.deltaBase + (t - 1) * 16, u = e.deltaShift, l = e.z0;
7051
7051
  exports.DEBUG && console.log(e.step, "DELTAP[" + t + "]", n, r);
7052
7052
  for (var h = 0; h < n; h++) {
@@ -7059,55 +7059,55 @@ function Lt(t, e) {
7059
7059
  }
7060
7060
  }
7061
7061
  }
7062
- function Io(t) {
7062
+ function Do(t) {
7063
7063
  var e = t.stack, r = e.pop();
7064
7064
  exports.DEBUG && console.log(t.step, "SDB[]", r), t.deltaBase = r;
7065
7065
  }
7066
- function Do(t) {
7066
+ function Go(t) {
7067
7067
  var e = t.stack, r = e.pop();
7068
7068
  exports.DEBUG && console.log(t.step, "SDS[]", r), t.deltaShift = Math.pow(0.5, r);
7069
7069
  }
7070
- function Go(t) {
7070
+ function No(t) {
7071
7071
  var e = t.stack, r = e.pop(), n = e.pop();
7072
7072
  exports.DEBUG && console.log(t.step, "ADD[]", r, n), e.push(n + r);
7073
7073
  }
7074
- function No(t) {
7074
+ function _o(t) {
7075
7075
  var e = t.stack, r = e.pop(), n = e.pop();
7076
7076
  exports.DEBUG && console.log(t.step, "SUB[]", r, n), e.push(n - r);
7077
7077
  }
7078
- function _o(t) {
7078
+ function Ho(t) {
7079
7079
  var e = t.stack, r = e.pop(), n = e.pop();
7080
7080
  exports.DEBUG && console.log(t.step, "DIV[]", r, n), e.push(n * 64 / r);
7081
7081
  }
7082
- function Ho(t) {
7082
+ function zo(t) {
7083
7083
  var e = t.stack, r = e.pop(), n = e.pop();
7084
7084
  exports.DEBUG && console.log(t.step, "MUL[]", r, n), e.push(n * r / 64);
7085
7085
  }
7086
- function zo(t) {
7086
+ function Wo(t) {
7087
7087
  var e = t.stack, r = e.pop();
7088
7088
  exports.DEBUG && console.log(t.step, "ABS[]", r), e.push(Math.abs(r));
7089
7089
  }
7090
- function Wo(t) {
7090
+ function Vo(t) {
7091
7091
  var e = t.stack, r = e.pop();
7092
7092
  exports.DEBUG && console.log(t.step, "NEG[]", r), e.push(-r);
7093
7093
  }
7094
- function Vo(t) {
7094
+ function qo(t) {
7095
7095
  var e = t.stack, r = e.pop();
7096
7096
  exports.DEBUG && console.log(t.step, "FLOOR[]", r), e.push(Math.floor(r / 64) * 64);
7097
7097
  }
7098
- function qo(t) {
7098
+ function Xo(t) {
7099
7099
  var e = t.stack, r = e.pop();
7100
7100
  exports.DEBUG && console.log(t.step, "CEILING[]", r), e.push(Math.ceil(r / 64) * 64);
7101
7101
  }
7102
- function ot(t, e) {
7102
+ function it(t, e) {
7103
7103
  var r = e.stack, n = r.pop();
7104
7104
  exports.DEBUG && console.log(e.step, "ROUND[]"), r.push(e.round(n / 64) * 64);
7105
7105
  }
7106
- function Xo(t) {
7106
+ function Yo(t) {
7107
7107
  var e = t.stack, r = e.pop(), n = e.pop();
7108
7108
  exports.DEBUG && console.log(t.step, "WCVTF[]", r, n), t.cvt[n] = r * t.ppem / t.font.unitsPerEm;
7109
7109
  }
7110
- function Rt(t, e) {
7110
+ function Lt(t, e) {
7111
7111
  var r = e.stack, n = r.pop(), a = e.ppem, s = e.deltaBase + (t - 1) * 16, i = e.deltaShift;
7112
7112
  exports.DEBUG && console.log(e.step, "DELTAC[" + t + "]", n, r);
7113
7113
  for (var o = 0; o < n; o++) {
@@ -7120,9 +7120,9 @@ function Rt(t, e) {
7120
7120
  }
7121
7121
  }
7122
7122
  }
7123
- function Yo(t) {
7123
+ function Zo(t) {
7124
7124
  var e = t.stack.pop();
7125
- exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = ga;
7125
+ exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = va;
7126
7126
  var r;
7127
7127
  switch (e & 192) {
7128
7128
  case 0:
@@ -7155,9 +7155,9 @@ function Yo(t) {
7155
7155
  }
7156
7156
  e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
7157
7157
  }
7158
- function Zo(t) {
7158
+ function jo(t) {
7159
7159
  var e = t.stack.pop();
7160
- exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = ga;
7160
+ exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = va;
7161
7161
  var r;
7162
7162
  switch (e & 192) {
7163
7163
  case 0:
@@ -7190,16 +7190,16 @@ function Zo(t) {
7190
7190
  }
7191
7191
  e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
7192
7192
  }
7193
- function jo(t) {
7194
- exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Ui;
7195
- }
7196
7193
  function Ko(t) {
7197
- exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Ai;
7194
+ exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Li;
7198
7195
  }
7199
7196
  function Qo(t) {
7200
- exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Mi;
7197
+ exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Mi;
7201
7198
  }
7202
7199
  function $o(t) {
7200
+ exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Pi;
7201
+ }
7202
+ function Jo(t) {
7203
7203
  var e = t.stack.pop();
7204
7204
  exports.DEBUG && console.log(t.step, "SCANCTRL[]", e);
7205
7205
  }
@@ -7207,29 +7207,29 @@ function on(t, e) {
7207
7207
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
7208
7208
  exports.DEBUG && console.log(e.step, "SDPVTL[" + t + "]", n, a);
7209
7209
  var o, u;
7210
- t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.dpv = Je(o, u);
7210
+ t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.dpv = $e(o, u);
7211
7211
  }
7212
- function Jo(t) {
7212
+ function eu(t) {
7213
7213
  var e = t.stack, r = e.pop(), n = 0;
7214
7214
  exports.DEBUG && console.log(t.step, "GETINFO[]", r), r & 1 && (n = 35), r & 32 && (n |= 4096), e.push(n);
7215
7215
  }
7216
- function eu(t) {
7216
+ function tu(t) {
7217
7217
  var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop();
7218
7218
  exports.DEBUG && console.log(t.step, "ROLL[]"), e.push(n), e.push(r), e.push(a);
7219
7219
  }
7220
- function tu(t) {
7220
+ function ru(t) {
7221
7221
  var e = t.stack, r = e.pop(), n = e.pop();
7222
7222
  exports.DEBUG && console.log(t.step, "MAX[]", r, n), e.push(Math.max(n, r));
7223
7223
  }
7224
- function ru(t) {
7224
+ function nu(t) {
7225
7225
  var e = t.stack, r = e.pop(), n = e.pop();
7226
7226
  exports.DEBUG && console.log(t.step, "MIN[]", r, n), e.push(Math.min(n, r));
7227
7227
  }
7228
- function nu(t) {
7228
+ function au(t) {
7229
7229
  var e = t.stack.pop();
7230
7230
  exports.DEBUG && console.log(t.step, "SCANTYPE[]", e);
7231
7231
  }
7232
- function au(t) {
7232
+ function su(t) {
7233
7233
  var e = t.stack.pop(), r = t.stack.pop();
7234
7234
  switch (exports.DEBUG && console.log(t.step, "INSTCTRL[]", e, r), e) {
7235
7235
  case 1:
@@ -7272,7 +7272,7 @@ function C(t, e, r, n, a, s) {
7272
7272
  ")"
7273
7273
  ), s.rp1 = s.rp0, s.rp2 = u, e && (s.rp0 = u);
7274
7274
  }
7275
- ca = [
7275
+ fa = [
7276
7276
  /* 0x00 */
7277
7277
  Xr.bind(void 0, ve),
7278
7278
  /* 0x01 */
@@ -7294,45 +7294,45 @@ ca = [
7294
7294
  /* 0x09 */
7295
7295
  Kr.bind(void 0, 1),
7296
7296
  /* 0x0A */
7297
- Bi,
7298
- /* 0x0B */
7299
7297
  Ii,
7300
- /* 0x0C */
7298
+ /* 0x0B */
7301
7299
  Di,
7302
- /* 0x0D */
7300
+ /* 0x0C */
7303
7301
  Gi,
7304
- /* 0x0E */
7302
+ /* 0x0D */
7305
7303
  Ni,
7306
- /* 0x0F */
7304
+ /* 0x0E */
7307
7305
  _i,
7308
- /* 0x10 */
7306
+ /* 0x0F */
7309
7307
  Hi,
7310
- /* 0x11 */
7308
+ /* 0x10 */
7311
7309
  zi,
7312
- /* 0x12 */
7310
+ /* 0x11 */
7313
7311
  Wi,
7314
- /* 0x13 */
7312
+ /* 0x12 */
7315
7313
  Vi,
7316
- /* 0x14 */
7314
+ /* 0x13 */
7317
7315
  qi,
7318
- /* 0x15 */
7316
+ /* 0x14 */
7319
7317
  Xi,
7320
- /* 0x16 */
7318
+ /* 0x15 */
7321
7319
  Yi,
7322
- /* 0x17 */
7320
+ /* 0x16 */
7323
7321
  Zi,
7324
- /* 0x18 */
7322
+ /* 0x17 */
7325
7323
  ji,
7326
- /* 0x19 */
7324
+ /* 0x18 */
7327
7325
  Ki,
7328
- /* 0x1A */
7326
+ /* 0x19 */
7329
7327
  Qi,
7330
- /* 0x1B */
7328
+ /* 0x1A */
7331
7329
  $i,
7332
- /* 0x1C */
7330
+ /* 0x1B */
7333
7331
  Ji,
7334
- /* 0x1D */
7332
+ /* 0x1C */
7335
7333
  eo,
7334
+ /* 0x1D */
7335
+ to,
7336
7336
  /* 0x1E */
7337
7337
  void 0,
7338
7338
  // TODO SSWCI
@@ -7340,19 +7340,19 @@ ca = [
7340
7340
  void 0,
7341
7341
  // TODO SSW
7342
7342
  /* 0x20 */
7343
- to,
7343
+ ro,
7344
7344
  /* 0x21 */
7345
- Ut,
7345
+ Ot,
7346
7346
  /* 0x22 */
7347
- ro,
7348
- /* 0x23 */
7349
7347
  no,
7350
- /* 0x24 */
7348
+ /* 0x23 */
7351
7349
  ao,
7350
+ /* 0x24 */
7351
+ so,
7352
7352
  /* 0x25 */
7353
- oo,
7354
- /* 0x26 */
7355
7353
  uo,
7354
+ /* 0x26 */
7355
+ lo,
7356
7356
  /* 0x27 */
7357
7357
  void 0,
7358
7358
  // TODO ALIGNPTS
@@ -7362,11 +7362,11 @@ ca = [
7362
7362
  void 0,
7363
7363
  // TODO UTP
7364
7364
  /* 0x2A */
7365
- so,
7366
- /* 0x2B */
7367
7365
  io,
7366
+ /* 0x2B */
7367
+ oo,
7368
7368
  /* 0x2C */
7369
- lo,
7369
+ ho,
7370
7370
  /* 0x2D */
7371
7371
  void 0,
7372
7372
  // ENDF (eaten by FDEF)
@@ -7391,33 +7391,33 @@ ca = [
7391
7391
  /* 0x37 */
7392
7392
  tn.bind(void 0, 1),
7393
7393
  /* 0x38 */
7394
- ho,
7395
- /* 0x39 */
7396
7394
  co,
7395
+ /* 0x39 */
7396
+ fo,
7397
7397
  /* 0x3A */
7398
7398
  rn.bind(void 0, 0),
7399
7399
  /* 0x3B */
7400
7400
  rn.bind(void 0, 1),
7401
7401
  /* 0x3C */
7402
- fo,
7403
- /* 0x3D */
7404
7402
  po,
7403
+ /* 0x3D */
7404
+ go,
7405
7405
  /* 0x3E */
7406
7406
  nn.bind(void 0, 0),
7407
7407
  /* 0x3F */
7408
7408
  nn.bind(void 0, 1),
7409
7409
  /* 0x40 */
7410
- go,
7411
- /* 0x41 */
7412
7410
  vo,
7413
- /* 0x42 */
7411
+ /* 0x41 */
7414
7412
  mo,
7415
- /* 0x43 */
7413
+ /* 0x42 */
7416
7414
  yo,
7417
- /* 0x44 */
7415
+ /* 0x43 */
7418
7416
  xo,
7419
- /* 0x45 */
7417
+ /* 0x44 */
7420
7418
  bo,
7419
+ /* 0x45 */
7420
+ So,
7421
7421
  /* 0x46 */
7422
7422
  an.bind(void 0, 0),
7423
7423
  /* 0x47 */
@@ -7430,12 +7430,12 @@ ca = [
7430
7430
  /* 0x4A */
7431
7431
  sn.bind(void 0, 1),
7432
7432
  /* 0x4B */
7433
- So,
7433
+ ko,
7434
7434
  /* 0x4C */
7435
7435
  void 0,
7436
7436
  // TODO MPS
7437
7437
  /* 0x4D */
7438
- ko,
7438
+ Fo,
7439
7439
  /* 0x4E */
7440
7440
  void 0,
7441
7441
  // TODO FLIPOFF
@@ -7443,61 +7443,61 @@ ca = [
7443
7443
  void 0,
7444
7444
  // TODO DEBUG
7445
7445
  /* 0x50 */
7446
- Fo,
7447
- /* 0x51 */
7448
7446
  To,
7449
- /* 0x52 */
7447
+ /* 0x51 */
7450
7448
  wo,
7451
- /* 0x53 */
7449
+ /* 0x52 */
7452
7450
  Co,
7453
- /* 0x54 */
7451
+ /* 0x53 */
7454
7452
  Eo,
7455
- /* 0x55 */
7453
+ /* 0x54 */
7456
7454
  Oo,
7457
- /* 0x56 */
7455
+ /* 0x55 */
7458
7456
  Uo,
7459
- /* 0x57 */
7457
+ /* 0x56 */
7460
7458
  Lo,
7461
- /* 0x58 */
7459
+ /* 0x57 */
7462
7460
  Ro,
7463
- /* 0x59 */
7461
+ /* 0x58 */
7464
7462
  Ao,
7465
- /* 0x5A */
7463
+ /* 0x59 */
7466
7464
  Mo,
7467
- /* 0x5B */
7465
+ /* 0x5A */
7468
7466
  Po,
7469
- /* 0x5C */
7467
+ /* 0x5B */
7470
7468
  Bo,
7469
+ /* 0x5C */
7470
+ Io,
7471
7471
  /* 0x5D */
7472
- Lt.bind(void 0, 1),
7472
+ Ut.bind(void 0, 1),
7473
7473
  /* 0x5E */
7474
- Io,
7475
- /* 0x5F */
7476
7474
  Do,
7477
- /* 0x60 */
7475
+ /* 0x5F */
7478
7476
  Go,
7479
- /* 0x61 */
7477
+ /* 0x60 */
7480
7478
  No,
7481
- /* 0x62 */
7479
+ /* 0x61 */
7482
7480
  _o,
7483
- /* 0x63 */
7481
+ /* 0x62 */
7484
7482
  Ho,
7485
- /* 0x64 */
7483
+ /* 0x63 */
7486
7484
  zo,
7487
- /* 0x65 */
7485
+ /* 0x64 */
7488
7486
  Wo,
7489
- /* 0x66 */
7487
+ /* 0x65 */
7490
7488
  Vo,
7491
- /* 0x67 */
7489
+ /* 0x66 */
7492
7490
  qo,
7491
+ /* 0x67 */
7492
+ Xo,
7493
7493
  /* 0x68 */
7494
- ot.bind(void 0, 0),
7494
+ it.bind(void 0, 0),
7495
7495
  /* 0x69 */
7496
- ot.bind(void 0, 1),
7496
+ it.bind(void 0, 1),
7497
7497
  /* 0x6A */
7498
- ot.bind(void 0, 2),
7498
+ it.bind(void 0, 2),
7499
7499
  /* 0x6B */
7500
- ot.bind(void 0, 3),
7500
+ it.bind(void 0, 3),
7501
7501
  /* 0x6C */
7502
7502
  void 0,
7503
7503
  // TODO NROUND[ab]
@@ -7511,21 +7511,21 @@ ca = [
7511
7511
  void 0,
7512
7512
  // TODO NROUND[ab]
7513
7513
  /* 0x70 */
7514
- Xo,
7514
+ Yo,
7515
7515
  /* 0x71 */
7516
- Lt.bind(void 0, 2),
7516
+ Ut.bind(void 0, 2),
7517
7517
  /* 0x72 */
7518
- Lt.bind(void 0, 3),
7518
+ Ut.bind(void 0, 3),
7519
7519
  /* 0x73 */
7520
- Rt.bind(void 0, 1),
7520
+ Lt.bind(void 0, 1),
7521
7521
  /* 0x74 */
7522
- Rt.bind(void 0, 2),
7522
+ Lt.bind(void 0, 2),
7523
7523
  /* 0x75 */
7524
- Rt.bind(void 0, 3),
7524
+ Lt.bind(void 0, 3),
7525
7525
  /* 0x76 */
7526
- Yo,
7527
- /* 0x77 */
7528
7526
  Zo,
7527
+ /* 0x77 */
7528
+ jo,
7529
7529
  /* 0x78 */
7530
7530
  void 0,
7531
7531
  // TODO JROT[]
@@ -7533,18 +7533,18 @@ ca = [
7533
7533
  void 0,
7534
7534
  // TODO JROF[]
7535
7535
  /* 0x7A */
7536
- jo,
7536
+ Ko,
7537
7537
  /* 0x7B */
7538
7538
  void 0,
7539
7539
  /* 0x7C */
7540
- Ko,
7541
- /* 0x7D */
7542
7540
  Qo,
7541
+ /* 0x7D */
7542
+ $o,
7543
7543
  /* 0x7E */
7544
- Ut,
7544
+ Ot,
7545
7545
  // actually SANGW, supposed to do only a pop though
7546
7546
  /* 0x7F */
7547
- Ut,
7547
+ Ot,
7548
7548
  // actually AA, supposed to do only a pop though
7549
7549
  /* 0x80 */
7550
7550
  void 0,
@@ -7560,26 +7560,26 @@ ca = [
7560
7560
  /* 0x84 */
7561
7561
  void 0,
7562
7562
  /* 0x85 */
7563
- $o,
7563
+ Jo,
7564
7564
  /* 0x86 */
7565
7565
  on.bind(void 0, 0),
7566
7566
  /* 0x87 */
7567
7567
  on.bind(void 0, 1),
7568
7568
  /* 0x88 */
7569
- Jo,
7569
+ eu,
7570
7570
  /* 0x89 */
7571
7571
  void 0,
7572
7572
  // TODO IDEF
7573
7573
  /* 0x8A */
7574
- eu,
7575
- /* 0x8B */
7576
7574
  tu,
7577
- /* 0x8C */
7575
+ /* 0x8B */
7578
7576
  ru,
7579
- /* 0x8D */
7577
+ /* 0x8C */
7580
7578
  nu,
7581
- /* 0x8E */
7579
+ /* 0x8D */
7582
7580
  au,
7581
+ /* 0x8E */
7582
+ su,
7583
7583
  /* 0x8F */
7584
7584
  void 0,
7585
7585
  /* 0x90 */
@@ -7813,16 +7813,16 @@ function Ne(t) {
7813
7813
  function hr(t, e, r) {
7814
7814
  this.contextName = r, this.startIndex = t, this.endOffset = e;
7815
7815
  }
7816
- function su(t, e, r) {
7816
+ function iu(t, e, r) {
7817
7817
  this.contextName = t, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = r;
7818
7818
  }
7819
7819
  function oe(t, e) {
7820
7820
  this.context = t, this.index = e, this.length = t.length, this.current = t[e], this.backtrack = t.slice(0, e), this.lookahead = t.slice(e + 1);
7821
7821
  }
7822
- function xt(t) {
7822
+ function yt(t) {
7823
7823
  this.eventId = t, this.subscribers = [];
7824
7824
  }
7825
- function iu(t) {
7825
+ function ou(t) {
7826
7826
  var e = this, r = [
7827
7827
  "start",
7828
7828
  "end",
@@ -7840,7 +7840,7 @@ function iu(t) {
7840
7840
  ];
7841
7841
  r.forEach(function(a) {
7842
7842
  Object.defineProperty(e.events, a, {
7843
- value: new xt(a)
7843
+ value: new yt(a)
7844
7844
  });
7845
7845
  }), t && r.forEach(function(a) {
7846
7846
  var s = t[a];
@@ -7861,7 +7861,7 @@ function iu(t) {
7861
7861
  });
7862
7862
  }
7863
7863
  function G(t) {
7864
- this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], iu.call(this, t);
7864
+ this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], ou.call(this, t);
7865
7865
  }
7866
7866
  Ne.prototype.setState = function(t, e) {
7867
7867
  return this.state[t] = e, this.activeState = { key: t, value: this.state[t] }, this.activeState;
@@ -7940,10 +7940,10 @@ G.prototype.registerModifier = function(t, e, r) {
7940
7940
  }
7941
7941
  }), this.registeredModifiers.push(t);
7942
7942
  };
7943
- xt.prototype.subscribe = function(t) {
7943
+ yt.prototype.subscribe = function(t) {
7944
7944
  return typeof t == "function" ? this.subscribers.push(t) - 1 : { FAIL: "invalid '" + this.eventId + "' event handler" };
7945
7945
  };
7946
- xt.prototype.unsubscribe = function(t) {
7946
+ yt.prototype.unsubscribe = function(t) {
7947
7947
  this.subscribers.splice(t, 1);
7948
7948
  };
7949
7949
  oe.prototype.setCurrentIndex = function(t) {
@@ -7982,7 +7982,7 @@ G.prototype.on = function(t, e) {
7982
7982
  };
7983
7983
  G.prototype.dispatch = function(t, e) {
7984
7984
  var r = this, n = this.events[t];
7985
- n instanceof xt && n.subscribers.forEach(function(a) {
7985
+ n instanceof yt && n.subscribers.forEach(function(a) {
7986
7986
  a.apply(r, e || []);
7987
7987
  });
7988
7988
  };
@@ -7999,7 +7999,7 @@ G.prototype.registerContextChecker = function(t, e, r) {
7999
7999
  return {
8000
8000
  FAIL: "missing context end check."
8001
8001
  };
8002
- var n = new su(
8002
+ var n = new iu(
8003
8003
  t,
8004
8004
  e,
8005
8005
  r
@@ -8063,16 +8063,16 @@ G.prototype.tokenize = function(t) {
8063
8063
  function Fe(t) {
8064
8064
  return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(t);
8065
8065
  }
8066
- function ma(t) {
8066
+ function ya(t) {
8067
8067
  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(t);
8068
8068
  }
8069
8069
  function Te(t) {
8070
8070
  return /[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(t);
8071
8071
  }
8072
- function ht(t) {
8072
+ function lt(t) {
8073
8073
  return /[A-z]/.test(t);
8074
8074
  }
8075
- function ou(t) {
8075
+ function uu(t) {
8076
8076
  return /\s/.test(t);
8077
8077
  }
8078
8078
  function ne(t) {
@@ -8081,7 +8081,7 @@ function ne(t) {
8081
8081
  function Le(t) {
8082
8082
  this.id = t.id, this.tag = t.tag, this.substitution = t.substitution;
8083
8083
  }
8084
- function et(t, e) {
8084
+ function Je(t, e) {
8085
8085
  if (!t)
8086
8086
  return -1;
8087
8087
  switch (e.format) {
@@ -8101,28 +8101,28 @@ function et(t, e) {
8101
8101
  }
8102
8102
  return -1;
8103
8103
  }
8104
- function uu(t, e) {
8105
- var r = et(t, e.coverage);
8104
+ function lu(t, e) {
8105
+ var r = Je(t, e.coverage);
8106
8106
  return r === -1 ? null : t + e.deltaGlyphId;
8107
8107
  }
8108
- function lu(t, e) {
8109
- var r = et(t, e.coverage);
8108
+ function hu(t, e) {
8109
+ var r = Je(t, e.coverage);
8110
8110
  return r === -1 ? null : e.substitute[r];
8111
8111
  }
8112
- function At(t, e) {
8112
+ function Rt(t, e) {
8113
8113
  for (var r = [], n = 0; n < t.length; n++) {
8114
8114
  var a = t[n], s = e.current;
8115
8115
  s = Array.isArray(s) ? s[0] : s;
8116
- var i = et(s, a);
8116
+ var i = Je(s, a);
8117
8117
  i !== -1 && r.push(i);
8118
8118
  }
8119
8119
  return r.length !== t.length ? -1 : r;
8120
8120
  }
8121
- function hu(t, e) {
8121
+ function cu(t, e) {
8122
8122
  var r = e.inputCoverage.length + e.lookaheadCoverage.length + e.backtrackCoverage.length;
8123
8123
  if (t.context.length < r)
8124
8124
  return [];
8125
- var n = At(
8125
+ var n = Rt(
8126
8126
  e.inputCoverage,
8127
8127
  t
8128
8128
  );
@@ -8133,7 +8133,7 @@ function hu(t, e) {
8133
8133
  return [];
8134
8134
  for (var s = t.lookahead.slice(a); s.length && Te(s[0].char); )
8135
8135
  s.shift();
8136
- var i = new oe(s, 0), o = At(
8136
+ var i = new oe(s, 0), o = Rt(
8137
8137
  e.lookaheadCoverage,
8138
8138
  i
8139
8139
  ), u = [].concat(t.backtrack);
@@ -8141,7 +8141,7 @@ function hu(t, e) {
8141
8141
  u.shift();
8142
8142
  if (u.length < e.backtrackCoverage.length)
8143
8143
  return [];
8144
- var l = new oe(u, 0), h = At(
8144
+ var l = new oe(u, 0), h = Rt(
8145
8145
  e.backtrackCoverage,
8146
8146
  l
8147
8147
  ), f = n.length === e.inputCoverage.length && o.length === e.lookaheadCoverage.length && h.length === e.backtrackCoverage.length, c = [];
@@ -8157,8 +8157,8 @@ function hu(t, e) {
8157
8157
  }
8158
8158
  return c;
8159
8159
  }
8160
- function cu(t, e) {
8161
- var r = t.current, n = et(r, e.coverage);
8160
+ function fu(t, e) {
8161
+ var r = t.current, n = Je(r, e.coverage);
8162
8162
  if (n === -1)
8163
8163
  return null;
8164
8164
  for (var a, s = e.ligatureSets[n], i = 0; i < s.length; i++) {
@@ -8173,8 +8173,8 @@ function cu(t, e) {
8173
8173
  }
8174
8174
  return null;
8175
8175
  }
8176
- function fu(t, e) {
8177
- var r = et(t, e.coverage);
8176
+ function pu(t, e) {
8177
+ var r = Je(t, e.coverage);
8178
8178
  return r === -1 ? null : e.sequences[r];
8179
8179
  }
8180
8180
  ne.prototype.getDefaultScriptFeaturesIndexes = function() {
@@ -8235,35 +8235,35 @@ ne.prototype.getLookupMethod = function(t, e) {
8235
8235
  switch (n) {
8236
8236
  case "11":
8237
8237
  return function(a) {
8238
- return uu.apply(
8238
+ return lu.apply(
8239
8239
  r,
8240
8240
  [a, e]
8241
8241
  );
8242
8242
  };
8243
8243
  case "12":
8244
8244
  return function(a) {
8245
- return lu.apply(
8245
+ return hu.apply(
8246
8246
  r,
8247
8247
  [a, e]
8248
8248
  );
8249
8249
  };
8250
8250
  case "63":
8251
8251
  return function(a) {
8252
- return hu.apply(
8252
+ return cu.apply(
8253
8253
  r,
8254
8254
  [a, e]
8255
8255
  );
8256
8256
  };
8257
8257
  case "41":
8258
8258
  return function(a) {
8259
- return cu.apply(
8259
+ return fu.apply(
8260
8260
  r,
8261
8261
  [a, e]
8262
8262
  );
8263
8263
  };
8264
8264
  case "21":
8265
8265
  return function(a) {
8266
- return fu.apply(
8266
+ return pu.apply(
8267
8267
  r,
8268
8268
  [a, e]
8269
8269
  );
@@ -8356,7 +8356,7 @@ ne.prototype.getFeature = function(e) {
8356
8356
  var r = this.features[e.script];
8357
8357
  return r ? r.tags[e.tag] ? this.features[e.script].tags[e.tag] : null : { FAIL: "No feature for script " + e.script };
8358
8358
  };
8359
- function pu(t) {
8359
+ function du(t) {
8360
8360
  var e = t.current, r = t.get(-1);
8361
8361
  return (
8362
8362
  // ? arabic first char
@@ -8364,7 +8364,7 @@ function pu(t) {
8364
8364
  !Fe(r) && Fe(e)
8365
8365
  );
8366
8366
  }
8367
- function du(t) {
8367
+ function gu(t) {
8368
8368
  var e = t.get(1);
8369
8369
  return (
8370
8370
  // ? last arabic char
@@ -8372,24 +8372,24 @@ function du(t) {
8372
8372
  !Fe(e)
8373
8373
  );
8374
8374
  }
8375
- var gu = {
8376
- startCheck: pu,
8377
- endCheck: du
8375
+ var vu = {
8376
+ startCheck: du,
8377
+ endCheck: gu
8378
8378
  };
8379
- function vu(t) {
8379
+ function mu(t) {
8380
8380
  var e = t.current, r = t.get(-1);
8381
8381
  return (
8382
8382
  // ? an arabic char preceded with a non arabic char
8383
8383
  (Fe(e) || Te(e)) && !Fe(r)
8384
8384
  );
8385
8385
  }
8386
- function mu(t) {
8386
+ function yu(t) {
8387
8387
  var e = t.get(1);
8388
8388
  switch (!0) {
8389
8389
  case e === null:
8390
8390
  return !0;
8391
8391
  case (!Fe(e) && !Te(e)):
8392
- var r = ou(e);
8392
+ var r = uu(e);
8393
8393
  if (!r)
8394
8394
  return !0;
8395
8395
  if (r) {
@@ -8406,40 +8406,40 @@ function mu(t) {
8406
8406
  return !1;
8407
8407
  }
8408
8408
  }
8409
- var yu = {
8410
- startCheck: vu,
8411
- endCheck: mu
8409
+ var xu = {
8410
+ startCheck: mu,
8411
+ endCheck: yu
8412
8412
  };
8413
- function xu(t, e, r) {
8414
- e[r].setState(t.tag, t.substitution);
8415
- }
8416
8413
  function bu(t, e, r) {
8417
8414
  e[r].setState(t.tag, t.substitution);
8418
8415
  }
8419
8416
  function Su(t, e, r) {
8417
+ e[r].setState(t.tag, t.substitution);
8418
+ }
8419
+ function ku(t, e, r) {
8420
8420
  t.substitution.forEach(function(n, a) {
8421
8421
  var s = e[r + a];
8422
8422
  s.setState(t.tag, n);
8423
8423
  });
8424
8424
  }
8425
- function ku(t, e, r) {
8425
+ function Fu(t, e, r) {
8426
8426
  var n = e[r];
8427
8427
  n.setState(t.tag, t.substitution.ligGlyph);
8428
8428
  for (var a = t.substitution.components.length, s = 0; s < a; s++)
8429
8429
  n = e[r + s + 1], n.setState("deleted", !0);
8430
8430
  }
8431
8431
  var un = {
8432
- 11: xu,
8433
- 12: bu,
8434
- 63: Su,
8435
- 41: ku
8432
+ 11: bu,
8433
+ 12: Su,
8434
+ 63: ku,
8435
+ 41: Fu
8436
8436
  };
8437
8437
  function cr(t, e, r) {
8438
8438
  t instanceof Le && un[t.id] && un[t.id](t, e, r);
8439
8439
  }
8440
- function Fu(t) {
8440
+ function Tu(t) {
8441
8441
  for (var e = [].concat(t.backtrack), r = e.length - 1; r >= 0; r--) {
8442
- var n = e[r], a = ma(n), s = Te(n);
8442
+ var n = e[r], a = ya(n), s = Te(n);
8443
8443
  if (!a && !s)
8444
8444
  return !0;
8445
8445
  if (a)
@@ -8447,8 +8447,8 @@ function Fu(t) {
8447
8447
  }
8448
8448
  return !1;
8449
8449
  }
8450
- function Tu(t) {
8451
- if (ma(t.current))
8450
+ function wu(t) {
8451
+ if (ya(t.current))
8452
8452
  return !1;
8453
8453
  for (var e = 0; e < t.lookahead.length; e++) {
8454
8454
  var r = t.lookahead[e], n = Te(r);
@@ -8457,7 +8457,7 @@ function Tu(t) {
8457
8457
  }
8458
8458
  return !1;
8459
8459
  }
8460
- function wu(t) {
8460
+ function Cu(t) {
8461
8461
  var e = this, r = "arab", n = this.featuresTags[r], a = this.tokenizer.getRangeTokens(t);
8462
8462
  if (a.length !== 1) {
8463
8463
  var s = new oe(
@@ -8479,7 +8479,7 @@ function wu(t) {
8479
8479
  if (!Te(o.char)) {
8480
8480
  s.setCurrentIndex(u), i.setCurrentIndex(u);
8481
8481
  var l = 0;
8482
- Fu(i) && (l |= 1), Tu(i) && (l |= 2);
8482
+ Tu(i) && (l |= 1), wu(i) && (l |= 2);
8483
8483
  var h;
8484
8484
  switch (l) {
8485
8485
  case 1:
@@ -8514,7 +8514,7 @@ function ln(t, e) {
8514
8514
  });
8515
8515
  return new oe(r, 0);
8516
8516
  }
8517
- function Cu(t) {
8517
+ function Eu(t) {
8518
8518
  var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a = ln(n);
8519
8519
  a.context.forEach(function(s, i) {
8520
8520
  a.setCurrentIndex(i);
@@ -8530,25 +8530,25 @@ function Cu(t) {
8530
8530
  ), a = ln(n));
8531
8531
  });
8532
8532
  }
8533
- function Eu(t) {
8533
+ function Ou(t) {
8534
8534
  var e = t.current, r = t.get(-1);
8535
8535
  return (
8536
8536
  // ? latin first char
8537
- r === null && ht(e) || // ? latin char preceded with a non latin char
8538
- !ht(r) && ht(e)
8537
+ r === null && lt(e) || // ? latin char preceded with a non latin char
8538
+ !lt(r) && lt(e)
8539
8539
  );
8540
8540
  }
8541
- function Ou(t) {
8541
+ function Uu(t) {
8542
8542
  var e = t.get(1);
8543
8543
  return (
8544
8544
  // ? last latin char
8545
8545
  e === null || // ? next char is not latin
8546
- !ht(e)
8546
+ !lt(e)
8547
8547
  );
8548
8548
  }
8549
- var Uu = {
8550
- startCheck: Eu,
8551
- endCheck: Ou
8549
+ var Lu = {
8550
+ startCheck: Ou,
8551
+ endCheck: Uu
8552
8552
  };
8553
8553
  function hn(t, e) {
8554
8554
  var r = t.map(function(n) {
@@ -8556,7 +8556,7 @@ function hn(t, e) {
8556
8556
  });
8557
8557
  return new oe(r, 0);
8558
8558
  }
8559
- function Lu(t) {
8559
+ function Ru(t) {
8560
8560
  var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a = hn(n);
8561
8561
  a.context.forEach(function(s, i) {
8562
8562
  a.setCurrentIndex(i);
@@ -8579,11 +8579,11 @@ he.prototype.setText = function(t) {
8579
8579
  this.text = t;
8580
8580
  };
8581
8581
  he.prototype.contextChecks = {
8582
- latinWordCheck: Uu,
8583
- arabicWordCheck: gu,
8584
- arabicSentenceCheck: yu
8582
+ latinWordCheck: Lu,
8583
+ arabicWordCheck: vu,
8584
+ arabicSentenceCheck: xu
8585
8585
  };
8586
- function Mt(t) {
8586
+ function At(t) {
8587
8587
  var e = this.contextChecks[t + "Check"];
8588
8588
  return this.tokenizer.registerContextChecker(
8589
8589
  t,
@@ -8591,10 +8591,10 @@ function Mt(t) {
8591
8591
  e.endCheck
8592
8592
  );
8593
8593
  }
8594
- function Ru() {
8595
- return Mt.call(this, "latinWord"), Mt.call(this, "arabicWord"), Mt.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
8596
- }
8597
8594
  function Au() {
8595
+ return At.call(this, "latinWord"), At.call(this, "arabicWord"), At.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
8596
+ }
8597
+ function Mu() {
8598
8598
  var t = this, e = this.tokenizer.getContextRanges("arabicSentence");
8599
8599
  e.forEach(function(r) {
8600
8600
  var n = t.tokenizer.getRangeTokens(r);
@@ -8633,17 +8633,17 @@ function fr() {
8633
8633
  "glyphIndex modifier is required to apply arabic presentation features."
8634
8634
  );
8635
8635
  }
8636
- function Mu() {
8636
+ function Pu() {
8637
8637
  var t = this, e = "arab";
8638
8638
  if (this.featuresTags.hasOwnProperty(e)) {
8639
8639
  fr.call(this);
8640
8640
  var r = this.tokenizer.getContextRanges("arabicWord");
8641
8641
  r.forEach(function(n) {
8642
- wu.call(t, n);
8642
+ Cu.call(t, n);
8643
8643
  });
8644
8644
  }
8645
8645
  }
8646
- function Pu() {
8646
+ function Bu() {
8647
8647
  var t = this, e = "arab";
8648
8648
  if (this.featuresTags.hasOwnProperty(e)) {
8649
8649
  var r = this.featuresTags[e];
@@ -8651,12 +8651,12 @@ function Pu() {
8651
8651
  fr.call(this);
8652
8652
  var n = this.tokenizer.getContextRanges("arabicWord");
8653
8653
  n.forEach(function(a) {
8654
- Cu.call(t, a);
8654
+ Eu.call(t, a);
8655
8655
  });
8656
8656
  }
8657
8657
  }
8658
8658
  }
8659
- function Bu() {
8659
+ function Iu() {
8660
8660
  var t = this, e = "latn";
8661
8661
  if (this.featuresTags.hasOwnProperty(e)) {
8662
8662
  var r = this.featuresTags[e];
@@ -8664,7 +8664,7 @@ function Bu() {
8664
8664
  fr.call(this);
8665
8665
  var n = this.tokenizer.getContextRanges("latinWord");
8666
8666
  n.forEach(function(a) {
8667
- Lu.call(t, a);
8667
+ Ru.call(t, a);
8668
8668
  });
8669
8669
  }
8670
8670
  }
@@ -8673,10 +8673,10 @@ he.prototype.checkContextReady = function(t) {
8673
8673
  return !!this.tokenizer.getContext(t);
8674
8674
  };
8675
8675
  he.prototype.applyFeaturesToContexts = function() {
8676
- this.checkContextReady("arabicWord") && (Mu.call(this), Pu.call(this)), this.checkContextReady("latinWord") && Bu.call(this), this.checkContextReady("arabicSentence") && Au.call(this);
8676
+ this.checkContextReady("arabicWord") && (Pu.call(this), Bu.call(this)), this.checkContextReady("latinWord") && Iu.call(this), this.checkContextReady("arabicSentence") && Mu.call(this);
8677
8677
  };
8678
8678
  he.prototype.processText = function(t) {
8679
- (!this.text || this.text !== t) && (this.setText(t), Ru.call(this), this.applyFeaturesToContexts());
8679
+ (!this.text || this.text !== t) && (this.setText(t), Au.call(this), this.applyFeaturesToContexts());
8680
8680
  };
8681
8681
  he.prototype.getBidiText = function(t) {
8682
8682
  return this.processText(t), this.tokenizer.getText();
@@ -8715,12 +8715,12 @@ function P(t) {
8715
8715
  usWidthClass: t.widthClass || this.usWidthClasses.MEDIUM,
8716
8716
  fsSelection: t.fsSelection || this.fsSelectionValues.REGULAR
8717
8717
  }, t.tables.os2)
8718
- })), this.supported = !0, this.glyphs = new ge.GlyphSet(this, t.glyphs || []), this.encoding = new In(this), this.position = new Qe(this), this.substitution = new re(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8718
+ })), this.supported = !0, this.glyphs = new ge.GlyphSet(this, t.glyphs || []), this.encoding = new Dn(this), this.position = new Ke(this), this.substitution = new re(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8719
8719
  get: function() {
8720
8720
  if (this._hinting)
8721
8721
  return this._hinting;
8722
8722
  if (this.outlinesFormat === "truetype")
8723
- return this._hinting = new pa(this);
8723
+ return this._hinting = new da(this);
8724
8724
  }
8725
8725
  });
8726
8726
  }
@@ -8845,7 +8845,7 @@ P.prototype.validate = function() {
8845
8845
  r("fontFamily"), r("weightName"), r("manufacturer"), r("copyright"), r("version"), this.unitsPerEm > 0;
8846
8846
  };
8847
8847
  P.prototype.toTables = function() {
8848
- return Si.fontToTable(this);
8848
+ return ki.fontToTable(this);
8849
8849
  };
8850
8850
  P.prototype.toBuffer = function() {
8851
8851
  return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
@@ -8859,7 +8859,7 @@ P.prototype.download = function(t) {
8859
8859
  var e = this.getEnglishName("fontFamily"), r = this.getEnglishName("fontSubfamily");
8860
8860
  t = t || e.replace(/\s/g, "") + "-" + r + ".otf";
8861
8861
  var n = this.toArrayBuffer();
8862
- if (Fi())
8862
+ if (Ti())
8863
8863
  if (window.URL = window.URL || window.webkitURL, window.URL) {
8864
8864
  var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), i = document.createElement("a");
8865
8865
  i.href = window.URL.createObjectURL(s), i.download = t;
@@ -8868,7 +8868,7 @@ P.prototype.download = function(t) {
8868
8868
  } else
8869
8869
  console.warn("Font file could not be downloaded. Try using a different browser.");
8870
8870
  else {
8871
- var u = require("fs"), l = Ti(n);
8871
+ var u = require("fs"), l = wi(n);
8872
8872
  u.writeFileSync(t, l);
8873
8873
  }
8874
8874
  };
@@ -8916,7 +8916,7 @@ P.prototype.usWeightClasses = {
8916
8916
  EXTRA_BOLD: 800,
8917
8917
  BLACK: 900
8918
8918
  };
8919
- function ya(t, e) {
8919
+ function xa(t, e) {
8920
8920
  var r = JSON.stringify(t), n = 256;
8921
8921
  for (var a in e) {
8922
8922
  var s = parseInt(a);
@@ -8928,8 +8928,8 @@ function ya(t, e) {
8928
8928
  }
8929
8929
  return e[n] = t, n;
8930
8930
  }
8931
- function Iu(t, e, r) {
8932
- var n = ya(e.name, r);
8931
+ function Du(t, e, r) {
8932
+ var n = xa(e.name, r);
8933
8933
  return [
8934
8934
  { name: "tag_" + t, type: "TAG", value: e.tag },
8935
8935
  { name: "minValue_" + t, type: "FIXED", value: e.minValue << 16 },
@@ -8939,12 +8939,12 @@ function Iu(t, e, r) {
8939
8939
  { name: "nameID_" + t, type: "USHORT", value: n }
8940
8940
  ];
8941
8941
  }
8942
- function Du(t, e, r) {
8942
+ function Gu(t, e, r) {
8943
8943
  var n = {}, a = new E.Parser(t, e);
8944
8944
  return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = r[a.parseUShort()] || {}, n;
8945
8945
  }
8946
- function Gu(t, e, r, n) {
8947
- for (var a = ya(e.name, n), s = [
8946
+ function Nu(t, e, r, n) {
8947
+ for (var a = xa(e.name, n), s = [
8948
8948
  { name: "nameID_" + t, type: "USHORT", value: a },
8949
8949
  { name: "flags_" + t, type: "USHORT", value: 0 }
8950
8950
  ], i = 0; i < r.length; ++i) {
@@ -8957,14 +8957,14 @@ function Gu(t, e, r, n) {
8957
8957
  }
8958
8958
  return s;
8959
8959
  }
8960
- function Nu(t, e, r, n) {
8960
+ function _u(t, e, r, n) {
8961
8961
  var a = {}, s = new E.Parser(t, e);
8962
8962
  a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
8963
8963
  for (var i = 0; i < r.length; ++i)
8964
8964
  a.coordinates[r[i].tag] = s.parseFixed();
8965
8965
  return a;
8966
8966
  }
8967
- function _u(t, e) {
8967
+ function Hu(t, e) {
8968
8968
  var r = new F.Table("fvar", [
8969
8969
  { name: "version", type: "ULONG", value: 65536 },
8970
8970
  { name: "offsetToData", type: "USHORT", value: 0 },
@@ -8976,28 +8976,28 @@ function _u(t, e) {
8976
8976
  ]);
8977
8977
  r.offsetToData = r.sizeOf();
8978
8978
  for (var n = 0; n < t.axes.length; n++)
8979
- r.fields = r.fields.concat(Iu(n, t.axes[n], e));
8979
+ r.fields = r.fields.concat(Du(n, t.axes[n], e));
8980
8980
  for (var a = 0; a < t.instances.length; a++)
8981
- r.fields = r.fields.concat(Gu(a, t.instances[a], t.axes, e));
8981
+ r.fields = r.fields.concat(Nu(a, t.instances[a], t.axes, e));
8982
8982
  return r;
8983
8983
  }
8984
- function Hu(t, e, r) {
8984
+ function zu(t, e, r) {
8985
8985
  var n = new E.Parser(t, e), a = n.parseULong();
8986
8986
  U.argument(a === 65536, "Unsupported fvar table version.");
8987
8987
  var s = n.parseOffset16();
8988
8988
  n.skip("uShort", 1);
8989
8989
  for (var i = n.parseUShort(), o = n.parseUShort(), u = n.parseUShort(), l = n.parseUShort(), h = [], f = 0; f < i; f++)
8990
- h.push(Du(t, e + s + f * o, r));
8990
+ h.push(Gu(t, e + s + f * o, r));
8991
8991
  for (var c = [], p = e + s + i * o, d = 0; d < u; d++)
8992
- c.push(Nu(t, p + d * l, h, r));
8992
+ c.push(_u(t, p + d * l, h, r));
8993
8993
  return { axes: h, instances: c };
8994
8994
  }
8995
- var zu = { make: _u, parse: Hu }, Wu = function() {
8995
+ var Wu = { make: Hu, parse: zu }, Vu = function() {
8996
8996
  return {
8997
8997
  coverage: this.parsePointer(g.coverage),
8998
8998
  attachPoints: this.parseList(g.pointer(g.uShortList))
8999
8999
  };
9000
- }, Vu = function() {
9000
+ }, qu = function() {
9001
9001
  var t = this.parseUShort();
9002
9002
  if (U.argument(
9003
9003
  t === 1 || t === 2 || t === 3,
@@ -9008,17 +9008,17 @@ var zu = { make: _u, parse: Hu }, Wu = function() {
9008
9008
  return { pointindex: this.parseShort() };
9009
9009
  if (t === 3)
9010
9010
  return { coordinate: this.parseShort() };
9011
- }, qu = function() {
9012
- return this.parseList(g.pointer(Vu));
9013
9011
  }, Xu = function() {
9012
+ return this.parseList(g.pointer(qu));
9013
+ }, Yu = function() {
9014
9014
  return {
9015
9015
  coverage: this.parsePointer(g.coverage),
9016
- ligGlyphs: this.parseList(g.pointer(qu))
9016
+ ligGlyphs: this.parseList(g.pointer(Xu))
9017
9017
  };
9018
- }, Yu = function() {
9018
+ }, Zu = function() {
9019
9019
  return this.parseUShort(), this.parseList(g.pointer(g.coverage));
9020
9020
  };
9021
- function Zu(t, e) {
9021
+ function ju(t, e) {
9022
9022
  e = e || 0;
9023
9023
  var r = new g(t, e), n = r.parseVersion(1);
9024
9024
  U.argument(
@@ -9028,13 +9028,13 @@ function Zu(t, e) {
9028
9028
  var a = {
9029
9029
  version: n,
9030
9030
  classDef: r.parsePointer(g.classDef),
9031
- attachList: r.parsePointer(Wu),
9032
- ligCaretList: r.parsePointer(Xu),
9031
+ attachList: r.parsePointer(Vu),
9032
+ ligCaretList: r.parsePointer(Yu),
9033
9033
  markAttachClassDef: r.parsePointer(g.classDef)
9034
9034
  };
9035
- return n >= 1.2 && (a.markGlyphSets = r.parsePointer(Yu)), a;
9035
+ return n >= 1.2 && (a.markGlyphSets = r.parsePointer(Zu)), a;
9036
9036
  }
9037
- var ju = { parse: Zu }, ue = new Array(10);
9037
+ var Ku = { parse: ju }, ue = new Array(10);
9038
9038
  ue[1] = function() {
9039
9039
  var e = this.offset + this.relativeOffset, r = this.parseUShort();
9040
9040
  if (r === 1)
@@ -9112,7 +9112,7 @@ ue[8] = function() {
9112
9112
  ue[9] = function() {
9113
9113
  return { error: "GPOS Lookup 9 not supported" };
9114
9114
  };
9115
- function Ku(t, e) {
9115
+ function Qu(t, e) {
9116
9116
  e = e || 0;
9117
9117
  var r = new g(t, e), n = r.parseVersion(1);
9118
9118
  return U.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
@@ -9128,17 +9128,17 @@ function Ku(t, e) {
9128
9128
  variations: r.parseFeatureVariationsList()
9129
9129
  };
9130
9130
  }
9131
- var Qu = new Array(10);
9132
- function $u(t) {
9131
+ var $u = new Array(10);
9132
+ function Ju(t) {
9133
9133
  return new F.Table("GPOS", [
9134
9134
  { name: "version", type: "ULONG", value: 65536 },
9135
9135
  { name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
9136
9136
  { name: "features", type: "TABLE", value: new F.FeatureList(t.features) },
9137
- { name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Qu) }
9137
+ { name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, $u) }
9138
9138
  ]);
9139
9139
  }
9140
- var Ju = { parse: Ku, make: $u };
9141
- function el(t) {
9140
+ var el = { parse: Qu, make: Ju };
9141
+ function tl(t) {
9142
9142
  var e = {};
9143
9143
  t.skip("uShort");
9144
9144
  var r = t.parseUShort();
@@ -9151,7 +9151,7 @@ function el(t) {
9151
9151
  }
9152
9152
  return e;
9153
9153
  }
9154
- function tl(t) {
9154
+ function rl(t) {
9155
9155
  var e = {};
9156
9156
  t.skip("uShort");
9157
9157
  var r = t.parseULong();
@@ -9167,23 +9167,23 @@ function tl(t) {
9167
9167
  }
9168
9168
  return e;
9169
9169
  }
9170
- function rl(t, e) {
9170
+ function nl(t, e) {
9171
9171
  var r = new E.Parser(t, e), n = r.parseUShort();
9172
9172
  if (n === 0)
9173
- return el(r);
9174
- if (n === 1)
9175
9173
  return tl(r);
9174
+ if (n === 1)
9175
+ return rl(r);
9176
9176
  throw new Error("Unsupported kern table version (" + n + ").");
9177
9177
  }
9178
- var nl = { parse: rl };
9179
- function al(t, e, r, n) {
9178
+ var al = { parse: nl };
9179
+ function sl(t, e, r, n) {
9180
9180
  for (var a = new E.Parser(t, e), s = n ? a.parseUShort : a.parseULong, i = [], o = 0; o < r + 1; o += 1) {
9181
9181
  var u = s.call(a);
9182
9182
  n && (u *= 2), i.push(u);
9183
9183
  }
9184
9184
  return i;
9185
9185
  }
9186
- var sl = { parse: al };
9186
+ var il = { parse: sl };
9187
9187
  function cn(t, e) {
9188
9188
  for (var r = [], n = 12, a = 0; a < e; a += 1) {
9189
9189
  var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12);
@@ -9191,7 +9191,7 @@ function cn(t, e) {
9191
9191
  }
9192
9192
  return r;
9193
9193
  }
9194
- function il(t, e) {
9194
+ function ol(t, e) {
9195
9195
  for (var r = [], n = 44, a = 0; a < e; a += 1) {
9196
9196
  var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12), l = void 0;
9197
9197
  o < u ? l = "WOFF" : l = !1, r.push({
@@ -9207,14 +9207,14 @@ function il(t, e) {
9207
9207
  function H(t, e) {
9208
9208
  if (e.compression === "WOFF") {
9209
9209
  var r = new Uint8Array(t.buffer, e.offset + 2, e.compressedLength - 2), n = new Uint8Array(e.length);
9210
- if ($a(r, n), n.byteLength !== e.length)
9210
+ if (Ja(r, n), n.byteLength !== e.length)
9211
9211
  throw new Error("Decompression error: " + e.tag + " decompressed length doesn't match recorded length");
9212
9212
  var a = new DataView(n.buffer, 0);
9213
9213
  return { data: a, offset: 0 };
9214
9214
  } else
9215
9215
  return { data: t, offset: e.offset };
9216
9216
  }
9217
- function ol(t, e) {
9217
+ function ul(t, e) {
9218
9218
  e = e ?? {};
9219
9219
  var r, n, a = new P({ empty: !0 }), s = new DataView(t, 0), i, o = [], u = E.getTag(s, 0);
9220
9220
  if (u === "\0\0\0" || u === "true" || u === "typ1")
@@ -9229,14 +9229,14 @@ function ol(t, e) {
9229
9229
  a.outlinesFormat = "cff";
9230
9230
  else
9231
9231
  throw new Error("Unsupported OpenType flavor " + u);
9232
- i = E.getUShort(s, 12), o = il(s, i);
9232
+ i = E.getUShort(s, 12), o = ol(s, i);
9233
9233
  } else
9234
9234
  throw new Error("Unsupported OpenType signature " + u);
9235
9235
  for (var h, f, c, p, d, v, y, m, b, x, T, S, A = 0; A < i; A += 1) {
9236
9236
  var O = o[A], w = void 0;
9237
9237
  switch (O.tag) {
9238
9238
  case "cmap":
9239
- w = H(s, O), a.tables.cmap = Bn.parse(w.data, w.offset), a.encoding = new Dn(a.tables.cmap);
9239
+ w = H(s, O), a.tables.cmap = In.parse(w.data, w.offset), a.encoding = new Gn(a.tables.cmap);
9240
9240
  break;
9241
9241
  case "cvt ":
9242
9242
  w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.cvt = S.parseShortList(O.length / 2);
@@ -9248,28 +9248,28 @@ function ol(t, e) {
9248
9248
  w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.fpgm = S.parseByteList(O.length);
9249
9249
  break;
9250
9250
  case "head":
9251
- w = H(s, O), a.tables.head = Yn.parse(w.data, w.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
9251
+ w = H(s, O), a.tables.head = Zn.parse(w.data, w.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
9252
9252
  break;
9253
9253
  case "hhea":
9254
- w = H(s, O), a.tables.hhea = Zn.parse(w.data, w.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
9254
+ w = H(s, O), a.tables.hhea = jn.parse(w.data, w.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
9255
9255
  break;
9256
9256
  case "hmtx":
9257
9257
  y = O;
9258
9258
  break;
9259
9259
  case "ltag":
9260
- w = H(s, O), n = Kn.parse(w.data, w.offset);
9260
+ w = H(s, O), n = Qn.parse(w.data, w.offset);
9261
9261
  break;
9262
9262
  case "maxp":
9263
- w = H(s, O), a.tables.maxp = Qn.parse(w.data, w.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
9263
+ w = H(s, O), a.tables.maxp = $n.parse(w.data, w.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
9264
9264
  break;
9265
9265
  case "name":
9266
9266
  x = O;
9267
9267
  break;
9268
9268
  case "OS/2":
9269
- w = H(s, O), a.tables.os2 = Jt.parse(w.data, w.offset);
9269
+ w = H(s, O), a.tables.os2 = $t.parse(w.data, w.offset);
9270
9270
  break;
9271
9271
  case "post":
9272
- w = H(s, O), a.tables.post = na.parse(w.data, w.offset), a.glyphNames = new ir(a.tables.post);
9272
+ w = H(s, O), a.tables.post = aa.parse(w.data, w.offset), a.glyphNames = new ir(a.tables.post);
9273
9273
  break;
9274
9274
  case "prep":
9275
9275
  w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.prep = S.parseByteList(O.length);
@@ -9301,43 +9301,43 @@ function ol(t, e) {
9301
9301
  }
9302
9302
  }
9303
9303
  var M = H(s, x);
9304
- if (a.tables.name = ra.parse(M.data, M.offset, n), a.names = a.tables.name, c && b) {
9305
- var N = r === 0, K = H(s, b), $ = sl.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
9306
- a.glyphs = ha.parse(Y.data, Y.offset, $, a, e);
9304
+ if (a.tables.name = na.parse(M.data, M.offset, n), a.names = a.tables.name, c && b) {
9305
+ var N = r === 0, K = H(s, b), $ = il.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
9306
+ a.glyphs = ca.parse(Y.data, Y.offset, $, a, e);
9307
9307
  } else if (h) {
9308
9308
  var I = H(s, h);
9309
- Xn.parse(I.data, I.offset, a, e);
9309
+ Yn.parse(I.data, I.offset, a, e);
9310
9310
  } else
9311
9311
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
9312
9312
  var _ = H(s, y);
9313
- if (jn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), xs(a, e), m) {
9313
+ if (Kn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), bs(a, e), m) {
9314
9314
  var D = H(s, m);
9315
- a.kerningPairs = nl.parse(D.data, D.offset);
9315
+ a.kerningPairs = al.parse(D.data, D.offset);
9316
9316
  } else
9317
9317
  a.kerningPairs = {};
9318
9318
  if (p) {
9319
9319
  var W = H(s, p);
9320
- a.tables.gdef = ju.parse(W.data, W.offset);
9320
+ a.tables.gdef = Ku.parse(W.data, W.offset);
9321
9321
  }
9322
9322
  if (d) {
9323
9323
  var Z = H(s, d);
9324
- a.tables.gpos = Ju.parse(Z.data, Z.offset), a.position.init();
9324
+ a.tables.gpos = el.parse(Z.data, Z.offset), a.position.init();
9325
9325
  }
9326
9326
  if (v) {
9327
9327
  var q = H(s, v);
9328
- a.tables.gsub = aa.parse(q.data, q.offset);
9328
+ a.tables.gsub = sa.parse(q.data, q.offset);
9329
9329
  }
9330
9330
  if (f) {
9331
9331
  var Q = H(s, f);
9332
- a.tables.fvar = zu.parse(Q.data, Q.offset, a.names);
9332
+ a.tables.fvar = Wu.parse(Q.data, Q.offset, a.names);
9333
9333
  }
9334
9334
  if (T) {
9335
9335
  var B = H(s, T);
9336
- a.tables.meta = sa.parse(B.data, B.offset), a.metas = a.tables.meta;
9336
+ a.tables.meta = ia.parse(B.data, B.offset), a.metas = a.tables.meta;
9337
9337
  }
9338
9338
  return a;
9339
9339
  }
9340
- function ul(t) {
9340
+ function ll(t) {
9341
9341
  return ((r, n) => {
9342
9342
  const a = Math.round, s = {}, i = r.encoding.cmap.glyphIndexMap, o = Object.keys(i), u = r.glyphs.glyphs[i[65]];
9343
9343
  let l = 1;
@@ -9373,9 +9373,9 @@ function ul(t) {
9373
9373
  scaleFactor: l,
9374
9374
  original_font_information: r.tables.name
9375
9375
  };
9376
- })(ol(t));
9376
+ })(ul(t));
9377
9377
  }
9378
- class ll extends Ta {
9378
+ class hl extends wa {
9379
9379
  constructor(e, r = {}) {
9380
9380
  const n = r.font;
9381
9381
  if (n === void 0)
@@ -9388,7 +9388,7 @@ class ll extends Ta {
9388
9388
  }
9389
9389
  }
9390
9390
  function fn(t, e = !1) {
9391
- const r = t[0].index !== null, n = new Set(Object.keys(t[0].attributes)), a = new Set(Object.keys(t[0].morphAttributes)), s = {}, i = {}, o = t[0].morphTargetsRelative, u = new ut();
9391
+ const r = t[0].index !== null, n = new Set(Object.keys(t[0].attributes)), a = new Set(Object.keys(t[0].morphAttributes)), s = {}, i = {}, o = t[0].morphTargetsRelative, u = new ot();
9392
9392
  let l = 0;
9393
9393
  for (let h = 0; h < t.length; ++h) {
9394
9394
  const f = t[h];
@@ -9467,7 +9467,7 @@ function pn(t) {
9467
9467
  return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
9468
9468
  s += h.count * r;
9469
9469
  }
9470
- const i = new e(s), o = new wa(i, r, n);
9470
+ const i = new e(s), o = new Ca(i, r, n);
9471
9471
  let u = 0;
9472
9472
  for (let l = 0; l < t.length; ++l) {
9473
9473
  const h = t[l];
@@ -9484,7 +9484,7 @@ function pn(t) {
9484
9484
  }
9485
9485
  return a !== void 0 && (o.gpuType = a), o;
9486
9486
  }
9487
- function hl(t, e = 1e-4) {
9487
+ function cl(t, e = 1e-4) {
9488
9488
  e = Math.max(e, Number.EPSILON);
9489
9489
  const r = {}, n = t.getIndex(), a = t.getAttribute("position"), s = n ? n.count : a.count;
9490
9490
  let i = 0;
@@ -9558,13 +9558,13 @@ const mr = class mr {
9558
9558
  * will do nothing until {@link restore} is called.
9559
9559
  */
9560
9560
  static disable() {
9561
- ut.prototype.computeVertexNormals = this.dummyComputeVertexNormals;
9561
+ ot.prototype.computeVertexNormals = this.dummyComputeVertexNormals;
9562
9562
  }
9563
9563
  /**
9564
9564
  * Restore the original `computeVertexNormals` implementation.
9565
9565
  */
9566
9566
  static restore() {
9567
- ut.prototype.computeVertexNormals = this.originalComputeVertexNormals;
9567
+ ot.prototype.computeVertexNormals = this.originalComputeVertexNormals;
9568
9568
  }
9569
9569
  /**
9570
9570
  * Execute a function with normal computation disabled,
@@ -9591,10 +9591,10 @@ const mr = class mr {
9591
9591
  }
9592
9592
  }
9593
9593
  };
9594
- mr.originalComputeVertexNormals = ut.prototype.computeVertexNormals;
9595
- let tr = mr;
9594
+ mr.originalComputeVertexNormals = ot.prototype.computeVertexNormals;
9595
+ let er = mr;
9596
9596
  const Ee = new R.Vector2();
9597
- class dn extends Fn {
9597
+ class dn extends Tn {
9598
9598
  constructor(e, r, n) {
9599
9599
  super(e), this.isFound = !1, this.fontSize = r, this.font = n, this.width = this.getCharWidth(e, r, n);
9600
9600
  }
@@ -9605,8 +9605,8 @@ class dn extends Fn {
9605
9605
  */
9606
9606
  toGeometry() {
9607
9607
  let e = this.font.cache.getGeometry(this.char, this.fontSize);
9608
- return e == null && (e = tr.runWithoutNormals(() => {
9609
- const r = new ll(this.char, {
9608
+ return e == null && (e = er.runWithoutNormals(() => {
9609
+ const r = new hl(this.char, {
9610
9610
  font: this.font.font,
9611
9611
  depth: 0,
9612
9612
  size: this.fontSize,
@@ -9620,7 +9620,7 @@ class dn extends Fn {
9620
9620
  generateSideWallUV: () => [Ee, Ee, Ee, Ee]
9621
9621
  }
9622
9622
  });
9623
- return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"), hl(r, 1e-6);
9623
+ return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"), cl(r, 1e-6);
9624
9624
  })), e;
9625
9625
  }
9626
9626
  /**
@@ -9635,13 +9635,13 @@ class dn extends Fn {
9635
9635
  return a ? (this.isFound = !0, a.ha * r / n.data.resolution) : (this.isFound = !1, 0);
9636
9636
  }
9637
9637
  }
9638
- class gn extends kn {
9638
+ class gn extends Fn {
9639
9639
  /**
9640
9640
  * Creates a new instance of MeshFont.
9641
9641
  * @param data - Either a MeshFontData object containing font information or an ArrayBuffer containing raw font data
9642
9642
  */
9643
9643
  constructor(e) {
9644
- super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = ul(e) : this.data = e, this.font = new za(this.data);
9644
+ super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = ll(e) : this.data = e, this.font = new Wa(this.data);
9645
9645
  }
9646
9646
  /**
9647
9647
  * Return true if this font contains glyph of the specified character. Otherwise, return false.
@@ -9848,7 +9848,7 @@ class J {
9848
9848
  }
9849
9849
  }
9850
9850
  var te = /* @__PURE__ */ ((t) => (t.SHAPES = "shapes", t.BIGFONT = "bigfont", t.UNIFONT = "unifont", t))(te || {});
9851
- let cl = class {
9851
+ let fl = class {
9852
9852
  parse(e) {
9853
9853
  const r = this.parseHeader(e).split(" "), n = r[1].toLocaleLowerCase();
9854
9854
  if (!Object.values(te).includes(n))
@@ -9875,7 +9875,7 @@ let cl = class {
9875
9875
  return r.trim();
9876
9876
  }
9877
9877
  };
9878
- class fl {
9878
+ class pl {
9879
9879
  parse(e) {
9880
9880
  try {
9881
9881
  e.readBytes(4);
@@ -9891,7 +9891,11 @@ class fl {
9891
9891
  for (const i of n)
9892
9892
  try {
9893
9893
  const o = e.readBytes(i.length);
9894
- o.length === i.length && (a[i.code] = o);
9894
+ if (o.length === i.length) {
9895
+ const u = o.indexOf(0);
9896
+ let l = 0;
9897
+ u >= 0 && u < o.length && (l = u + 1), l < o.length && (a[i.code] = o.subarray(l));
9898
+ }
9895
9899
  } catch {
9896
9900
  console.warn(`Failed to read shape data for code ${i.code}`);
9897
9901
  }
@@ -9927,7 +9931,7 @@ class fl {
9927
9931
  }
9928
9932
  }
9929
9933
  }
9930
- class pl {
9934
+ class dl {
9931
9935
  parse(e) {
9932
9936
  try {
9933
9937
  e.readInt16();
@@ -10012,7 +10016,7 @@ class pl {
10012
10016
  return r;
10013
10017
  }
10014
10018
  }
10015
- class dl {
10019
+ class gl {
10016
10020
  parse(e) {
10017
10021
  try {
10018
10022
  const r = e.readInt32();
@@ -10039,7 +10043,11 @@ class dl {
10039
10043
  const u = e.readUint16(), l = e.readUint16();
10040
10044
  if (l > 0) {
10041
10045
  const h = e.readBytes(l);
10042
- h.length === l && (i[u] = h);
10046
+ if (h.length === l) {
10047
+ const f = h.indexOf(0);
10048
+ let c = 0;
10049
+ f >= 0 && f < h.length && (c = f + 1), c < h.length && (i[u] = h.subarray(c));
10050
+ }
10043
10051
  }
10044
10052
  } catch {
10045
10053
  console.warn("Failed to read unifont character data");
@@ -10058,15 +10066,15 @@ class dl {
10058
10066
  }
10059
10067
  }
10060
10068
  }
10061
- class gl {
10069
+ class vl {
10062
10070
  static createParser(e) {
10063
10071
  switch (e) {
10064
10072
  case te.SHAPES:
10065
- return new fl();
10066
- case te.BIGFONT:
10067
10073
  return new pl();
10068
- case te.UNIFONT:
10074
+ case te.BIGFONT:
10069
10075
  return new dl();
10076
+ case te.UNIFONT:
10077
+ return new gl();
10070
10078
  default:
10071
10079
  throw new Error(`Unsupported font type: ${e}`);
10072
10080
  }
@@ -10173,7 +10181,7 @@ class z {
10173
10181
  }
10174
10182
  }
10175
10183
  const vn = Math.PI / 4;
10176
- class Ze {
10184
+ let mn = class tr {
10177
10185
  /**
10178
10186
  * Creates a bulge-defined arc
10179
10187
  * @param start Start point
@@ -10182,7 +10190,7 @@ class Ze {
10182
10190
  */
10183
10191
  static fromBulge(e, r, n) {
10184
10192
  const a = Math.max(-1, Math.min(1, n));
10185
- return new Ze({
10193
+ return new tr({
10186
10194
  start: e,
10187
10195
  end: r,
10188
10196
  bulge: a
@@ -10197,7 +10205,7 @@ class Ze {
10197
10205
  * @param isClockwise Whether the arc goes clockwise
10198
10206
  */
10199
10207
  static fromOctant(e, r, n, a, s) {
10200
- return new Ze({
10208
+ return new tr({
10201
10209
  center: e,
10202
10210
  radius: r,
10203
10211
  startOctant: n,
@@ -10255,8 +10263,7 @@ class Ze {
10255
10263
  )
10256
10264
  ), r;
10257
10265
  }
10258
- }
10259
- let Pt = class xa {
10266
+ }, Mt = class ba {
10260
10267
  constructor(e, r = []) {
10261
10268
  this.lastPoint = e, this.polylines = r;
10262
10269
  }
@@ -10280,7 +10287,7 @@ let Pt = class xa {
10280
10287
  */
10281
10288
  offset(e, r = !0) {
10282
10289
  var n, a;
10283
- return r ? new xa(
10290
+ return r ? new ba(
10284
10291
  (n = this.lastPoint) == null ? void 0 : n.clone().add(e),
10285
10292
  this.polylines.map((s) => s.map((i) => i.clone().add(e)))
10286
10293
  ) : ((a = this.lastPoint) == null || a.add(e), this.polylines.forEach((s) => s.forEach((i) => i.add(e))), this);
@@ -10313,8 +10320,8 @@ let Pt = class xa {
10313
10320
  return `<svg width="100%" height="100%" viewBox="${s}" preserveAspectRatio="xMidYMid meet">${i}</svg>`;
10314
10321
  }
10315
10322
  };
10316
- const vl = Math.PI / 18, mn = 12;
10317
- let ml = class {
10323
+ const ml = Math.PI / 18, yn = 12;
10324
+ let yl = class {
10318
10325
  constructor(e) {
10319
10326
  this.shapeCache = /* @__PURE__ */ new Map(), this.shapeData = /* @__PURE__ */ new Map(), this.fontData = e;
10320
10327
  }
@@ -10340,12 +10347,12 @@ let ml = class {
10340
10347
  const s = this.fontData.content.data;
10341
10348
  let i;
10342
10349
  if (!this.shapeData.has(e) && s[e]) {
10343
- const o = s[e], u = mn / this.fontData.content.baseUp;
10350
+ const o = s[e], u = yn / this.fontData.content.baseUp;
10344
10351
  i = this.parseShape(o, u), this.shapeData.set(e, i);
10345
10352
  }
10346
10353
  if (this.shapeData.has(e)) {
10347
- const o = r / mn, u = this.shapeData.get(e);
10348
- i = new Pt(
10354
+ const o = r / yn, u = this.shapeData.get(e);
10355
+ i = new Mt(
10349
10356
  (n = u.lastPoint) == null ? void 0 : n.clone().multiply(o),
10350
10357
  u.polylines.map((l) => l.map((h) => h.clone().multiply(o)))
10351
10358
  );
@@ -10371,7 +10378,7 @@ let ml = class {
10371
10378
  const s = e[a];
10372
10379
  s <= 15 ? a = this.handleSpecialCommand(s, e, a, n) : this.handleVectorCommand(s, n);
10373
10380
  }
10374
- return new Pt(n.currentPoint, n.polylines);
10381
+ return new Mt(n.currentPoint, n.polylines);
10375
10382
  }
10376
10383
  /**
10377
10384
  * Please refer to special codes reference in the following link for more information.
@@ -10510,7 +10517,7 @@ let ml = class {
10510
10517
  a++, s = e[a], s === 0 && (a++, s = e[a++] | e[a++] << 8, l.x = e[a++] * n.scale, l.y = e[a++] * n.scale, this.fontData.content.isExtended && (u = e[a++] * n.scale), o = e[a] * n.scale);
10511
10518
  break;
10512
10519
  case te.UNIFONT:
10513
- a++, s = e[a++] | e[a++] << 8;
10520
+ a++, s = e[a++] << 8 | e[a++];
10514
10521
  break;
10515
10522
  }
10516
10523
  return s !== 0 && (i = this.getShapeByCodeWithOffset(s, u, o, l), i && (n.polylines.push(...i.polylines.slice()), n.currentPoint = i.lastPoint ? i.lastPoint.clone() : l.clone())), n.currentPolyline = [], a;
@@ -10535,7 +10542,7 @@ let ml = class {
10535
10542
  let s = r;
10536
10543
  const i = e[++s] * n.scale, o = J.byteToSByte(e[++s]), u = (o & 112) >> 4;
10537
10544
  let l = o & 7;
10538
- const h = o < 0, f = Math.PI / 4 * u, c = n.currentPoint.clone().subtract(new z(Math.cos(f) * i, Math.sin(f) * i)), p = Ze.fromOctant(c, i, u, l, h);
10545
+ const h = o < 0, f = Math.PI / 4 * u, c = n.currentPoint.clone().subtract(new z(Math.cos(f) * i, Math.sin(f) * i)), p = mn.fromOctant(c, i, u, l, h);
10539
10546
  if (n.isPenDown) {
10540
10547
  const d = p.tessellate();
10541
10548
  n.currentPolyline.pop(), n.currentPolyline.push(...d.slice());
@@ -10548,7 +10555,7 @@ let ml = class {
10548
10555
  let c = h & 7;
10549
10556
  c === 0 && (c = 8), i !== 0 && c--;
10550
10557
  const p = Math.PI / 4;
10551
- let d = p * c, v = vl, y = 1;
10558
+ let d = p * c, v = ml, y = 1;
10552
10559
  h < 0 && (v = -v, d = -d, y = -1);
10553
10560
  let m = p * f, b = m + d;
10554
10561
  m += p * s / 256 * y, b += p * i / 256 * y;
@@ -10673,7 +10680,7 @@ let ml = class {
10673
10680
  const o = (s = i.lastPoint) == null ? void 0 : s.clone();
10674
10681
  o && (o.x *= r / n);
10675
10682
  const u = i.polylines.map((l) => l.map((h) => h.clone()));
10676
- return u.forEach((l) => l.forEach((h) => h.x *= r / n)), new Pt(
10683
+ return u.forEach((l) => l.forEach((h) => h.x *= r / n)), new Mt(
10677
10684
  o == null ? void 0 : o.add(a),
10678
10685
  u.map((l) => l.map((h) => h.add(a)))
10679
10686
  );
@@ -10697,13 +10704,13 @@ let ml = class {
10697
10704
  if (n === 0)
10698
10705
  i.push(o.clone().add(r));
10699
10706
  else {
10700
- const u = o.clone().add(r), l = Ze.fromBulge(o, u, n / 127).tessellate();
10707
+ const u = o.clone().add(r), l = mn.fromBulge(o, u, n / 127).tessellate();
10701
10708
  i.push(...l.slice(1));
10702
10709
  }
10703
10710
  return o.add(r), o;
10704
10711
  }
10705
10712
  };
10706
- class yl {
10713
+ class xl {
10707
10714
  /**
10708
10715
  * Creates a new ShxFont instance.
10709
10716
  * @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData)
@@ -10711,14 +10718,14 @@ class yl {
10711
10718
  */
10712
10719
  constructor(e) {
10713
10720
  if (e instanceof ArrayBuffer) {
10714
- const r = new J(e), n = new cl().parse(r), a = gl.createParser(n.fontType).parse(r);
10721
+ const r = new J(e), n = new fl().parse(r), a = vl.createParser(n.fontType).parse(r);
10715
10722
  this.fontData = {
10716
10723
  header: n,
10717
10724
  content: a
10718
10725
  };
10719
10726
  } else
10720
10727
  this.fontData = e;
10721
- this.shapeParser = new ml(this.fontData);
10728
+ this.shapeParser = new yl(this.fontData);
10722
10729
  }
10723
10730
  /**
10724
10731
  * Return true if this font contains glyph of the specified character. Otherwise, return false.
@@ -10745,7 +10752,7 @@ class yl {
10745
10752
  this.shapeParser.release();
10746
10753
  }
10747
10754
  }
10748
- class pr extends Fn {
10755
+ class pr extends Tn {
10749
10756
  /**
10750
10757
  * Creates a new instance of ShxTextShape
10751
10758
  * @param char - The character this shape represents
@@ -10791,9 +10798,9 @@ class pr extends Fn {
10791
10798
  return e;
10792
10799
  }
10793
10800
  }
10794
- class yn extends kn {
10801
+ class xn extends Fn {
10795
10802
  constructor(e) {
10796
- super(), this.type = "shx", this.font = new yl(e), this.data = this.font.fontData;
10803
+ super(), this.type = "shx", this.font = new xl(e), this.data = this.font.fontData;
10797
10804
  }
10798
10805
  /**
10799
10806
  * Return true if this font contains glyph of the specified character. Otherwise, return false.
@@ -10874,7 +10881,7 @@ class ke {
10874
10881
  */
10875
10882
  createFont(e) {
10876
10883
  if (e.type === "shx")
10877
- return new yn(e.data);
10884
+ return new xn(e.data);
10878
10885
  if (e.type === "mesh")
10879
10886
  return new gn(e.data);
10880
10887
  throw new Error("Unsupported font data type");
@@ -10889,9 +10896,9 @@ class ke {
10889
10896
  * @throws {Error} If the file type is not supported
10890
10897
  */
10891
10898
  createFontFromBuffer(e, r) {
10892
- const n = Na(e).toLowerCase();
10899
+ const n = _a(e).toLowerCase();
10893
10900
  if (n === "shx")
10894
- return new yn(r);
10901
+ return new xn(r);
10895
10902
  if (["ttf", "otf", "woff"].includes(n))
10896
10903
  return new gn(r);
10897
10904
  throw new Error(`Unsupported font file type: ${n}`);
@@ -10904,7 +10911,7 @@ class de {
10904
10911
  fontNotFound: new xr(),
10905
10912
  /** Event triggered when a font is successfully loaded */
10906
10913
  fontLoaded: new xr()
10907
- }, this.loader = new R.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new xl();
10914
+ }, this.loader = new R.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new bl();
10908
10915
  }
10909
10916
  /**
10910
10917
  * Gets the singleton instance of the FontManager
@@ -11089,7 +11096,7 @@ class de {
11089
11096
  * @param url - The URL of the font file to load
11090
11097
  */
11091
11098
  async loadFont(e) {
11092
- const r = Cn(e);
11099
+ const r = En(e);
11093
11100
  if (!r)
11094
11101
  throw new Error(`Invalid font url: ${e}`);
11095
11102
  const n = wr(e).toLowerCase(), a = await ze.instance.get(n);
@@ -11148,7 +11155,7 @@ class de {
11148
11155
  return e == null ? (this.fontMap.clear(), !0) : this.fontMap.delete(e);
11149
11156
  }
11150
11157
  }
11151
- class xl {
11158
+ class bl {
11152
11159
  /**
11153
11160
  * Creates a new instance of DefaultFontLoader
11154
11161
  */
@@ -11221,11 +11228,11 @@ class xl {
11221
11228
  }
11222
11229
  }
11223
11230
  var Be = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.WORD = 1] = "WORD", t[t.STACK = 2] = "STACK", t[t.SPACE = 3] = "SPACE", t[t.NBSP = 4] = "NBSP", t[t.TABULATOR = 5] = "TABULATOR", t[t.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", t[t.NEW_COLUMN = 7] = "NEW_COLUMN", t[t.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", t[t.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", t))(Be || {}), He = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.MIDDLE = 1] = "MIDDLE", t[t.TOP = 2] = "TOP", t))(He || {}), se = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.CENTER = 3] = "CENTER", t[t.JUSTIFIED = 4] = "JUSTIFIED", t[t.DISTRIBUTED = 5] = "DISTRIBUTED", t))(se || {});
11224
- const bl = {
11231
+ const Sl = {
11225
11232
  c: "Ø",
11226
11233
  d: "°",
11227
11234
  p: "±"
11228
- }, Sl = {
11235
+ }, kl = {
11229
11236
  l: 1,
11230
11237
  r: 2,
11231
11238
  c: 3,
@@ -11233,14 +11240,14 @@ const bl = {
11233
11240
  d: 5
11234
11241
  /* DISTRIBUTED */
11235
11242
  };
11236
- function kl(t, e = !1) {
11243
+ function Fl(t, e = !1) {
11237
11244
  const r = /* @__PURE__ */ new Set(), n = /\\[fF](.*?)[;|]/g;
11238
11245
  return [...t.matchAll(n)].forEach((a) => {
11239
11246
  let s = a[1].toLowerCase();
11240
11247
  e && (s = s.replace(/\.(ttf|otf|woff|shx)$/, "")), r.add(s);
11241
11248
  }), r;
11242
11249
  }
11243
- class Fl {
11250
+ class Tl {
11244
11251
  /**
11245
11252
  * Creates a new ContextStack with an initial context.
11246
11253
  * @param initial The initial MTextContext to use as the base of the stack.
@@ -11292,7 +11299,7 @@ class Fl {
11292
11299
  this.stack[this.stack.length - 1] = e;
11293
11300
  }
11294
11301
  }
11295
- class Tl {
11302
+ class wl {
11296
11303
  /**
11297
11304
  * Creates a new MTextParser instance
11298
11305
  * @param content - The MText content to parse
@@ -11300,9 +11307,9 @@ class Tl {
11300
11307
  * @param options - Parser options
11301
11308
  */
11302
11309
  constructor(e, r, n = {}) {
11303
- this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Bt(e);
11304
- const a = r ?? new tt();
11305
- this.ctxStack = new Fl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
11310
+ this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Pt(e);
11311
+ const a = r ?? new et();
11312
+ this.ctxStack = new Tl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
11306
11313
  }
11307
11314
  /**
11308
11315
  * Decode multi-byte character from hex code
@@ -11340,7 +11347,7 @@ class Tl {
11340
11347
  * @returns Tuple of [TokenType.STACK, [numerator, denominator, type]]
11341
11348
  */
11342
11349
  parseStacking() {
11343
- const e = new Bt(this.extractExpression(!0));
11350
+ const e = new Pt(this.extractExpression(!0));
11344
11351
  let r = "", n = "", a = "";
11345
11352
  const s = () => {
11346
11353
  let u = e.peek(), l = !1;
@@ -11630,7 +11637,7 @@ class Tl {
11630
11637
  * @param ctx - The context to update
11631
11638
  */
11632
11639
  parseParagraphProperties(e) {
11633
- const r = new Bt(this.extractExpression());
11640
+ const r = new Pt(this.extractExpression());
11634
11641
  let n = e.paragraph.indent, a = e.paragraph.left, s = e.paragraph.right, i = e.paragraph.align, o = [];
11635
11642
  const u = () => {
11636
11643
  const l = r.tail.match(/^[+-]?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/);
@@ -11657,7 +11664,7 @@ class Tl {
11657
11664
  break;
11658
11665
  case "q": {
11659
11666
  const l = r.get();
11660
- for (i = Sl[l] || 0; r.peek() === ","; )
11667
+ for (i = kl[l] || 0; r.peek() === ","; )
11661
11668
  r.consume(1);
11662
11669
  break;
11663
11670
  }
@@ -11795,7 +11802,7 @@ class Tl {
11795
11802
  continue;
11796
11803
  }
11797
11804
  if (o === "%" && this.scanner.peek(1) === "%") {
11798
- const l = this.scanner.peek(2).toLowerCase(), h = bl[l];
11805
+ const l = this.scanner.peek(2).toLowerCase(), h = Sl[l];
11799
11806
  if (h) {
11800
11807
  this.scanner.consume(3), s += h;
11801
11808
  continue;
@@ -11854,21 +11861,21 @@ class Tl {
11854
11861
  for (; ; ) {
11855
11862
  const [a, s] = n.call(this);
11856
11863
  if (a) {
11857
- if (yield new It(a, this.ctxStack.current.copy(), s), a === 6 && this.resetParagraphParameters) {
11864
+ if (yield new Bt(a, this.ctxStack.current.copy(), s), a === 6 && this.resetParagraphParameters) {
11858
11865
  const i = this.ctxStack.current, o = r(i);
11859
- this.yieldPropertyCommands && Object.keys(o).length > 0 && (yield new It(9, i.copy(), {
11866
+ this.yieldPropertyCommands && Object.keys(o).length > 0 && (yield new Bt(9, i.copy(), {
11860
11867
  command: void 0,
11861
11868
  changes: { paragraph: o },
11862
11869
  depth: this.ctxStack.depth
11863
11870
  }));
11864
11871
  }
11865
- e && (yield new It(e, this.ctxStack.current.copy(), null), e = null);
11872
+ e && (yield new Bt(e, this.ctxStack.current.copy(), null), e = null);
11866
11873
  } else
11867
11874
  break;
11868
11875
  }
11869
11876
  }
11870
11877
  }
11871
- class Bt {
11878
+ class Pt {
11872
11879
  /**
11873
11880
  * Create a new text scanner
11874
11881
  * @param text - The text to scan
@@ -12063,7 +12070,7 @@ class dr {
12063
12070
  return this._aci === e._aci && this._rgbValue === e._rgbValue;
12064
12071
  }
12065
12072
  }
12066
- class tt {
12073
+ class et {
12067
12074
  constructor() {
12068
12075
  this._stroke = 0, this.continueStroke = !1, this.color = new dr(), this.align = 0, this.fontFace = { family: "", style: "Regular", weight: 400 }, this._capHeight = { value: 1, isRelative: !1 }, this._widthFactor = { value: 1, isRelative: !1 }, this._charTrackingFactor = { value: 1, isRelative: !1 }, this.oblique = 0, this.paragraph = {
12069
12076
  indent: 0,
@@ -12235,11 +12242,11 @@ class tt {
12235
12242
  * @returns A new context with the same properties
12236
12243
  */
12237
12244
  copy() {
12238
- const e = new tt();
12245
+ const e = new et();
12239
12246
  return e._stroke = this._stroke, e.continueStroke = this.continueStroke, e.color = this.color.copy(), e.align = this.align, e.fontFace = { ...this.fontFace }, e._capHeight = { ...this._capHeight }, e._widthFactor = { ...this._widthFactor }, e._charTrackingFactor = { ...this._charTrackingFactor }, e.oblique = this.oblique, e.paragraph = { ...this.paragraph }, e;
12240
12247
  }
12241
12248
  }
12242
- class It {
12249
+ class Bt {
12243
12250
  /**
12244
12251
  * Create a new MText token
12245
12252
  * @param type - The token type
@@ -12250,9 +12257,9 @@ class It {
12250
12257
  this.type = e, this.ctx = r, this.data = n;
12251
12258
  }
12252
12259
  }
12253
- var je = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(je || {}), wl = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(wl || {});
12254
- const Cl = /* @__PURE__ */ new R.Vector3(), El = 1.666666;
12255
- class gr extends tt {
12260
+ var Ze = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(Ze || {}), Cl = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(Cl || {});
12261
+ const El = /* @__PURE__ */ new R.Vector3(), Ol = 1.666666;
12262
+ class gr extends et {
12256
12263
  /**
12257
12264
  * Creates a new RenderContext instance with optional initial values.
12258
12265
  * @param init - Partial object containing initial values for context properties
@@ -12274,7 +12281,7 @@ class gr extends tt {
12274
12281
  * @returns The color as a hex number (0xRRGGBB)
12275
12282
  */
12276
12283
  getColorAsHex() {
12277
- return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? Ha(this.color.aci) : 16777215;
12284
+ return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? za(this.color.aci) : 16777215;
12278
12285
  }
12279
12286
  /**
12280
12287
  * Set the color using a hex value for rendering purposes.
@@ -12285,7 +12292,7 @@ class gr extends tt {
12285
12292
  this.color.rgb = [r, n, a];
12286
12293
  }
12287
12294
  }
12288
- class Ol {
12295
+ class Ul {
12289
12296
  /**
12290
12297
  * Construct one instance of this class and initialize some properties with default values.
12291
12298
  * @param style Input text style
@@ -12384,7 +12391,7 @@ class Ol {
12384
12391
  * The height of current line of texts
12385
12392
  */
12386
12393
  get currentLineHeight() {
12387
- return this.defaultLineSpaceFactor * this.currentFontSize * El + this.currentMaxFontSize;
12394
+ return this.defaultLineSpaceFactor * this.currentFontSize * Ol + this.currentMaxFontSize;
12388
12395
  }
12389
12396
  /**
12390
12397
  * The maximum font size in current line. Characters in one line may have different font and font
@@ -12675,7 +12682,7 @@ class Ol {
12675
12682
  }
12676
12683
  const o = this.fontManager.getFontType(this.currentFont);
12677
12684
  this._currentContext.bold && o === "mesh" && s.scale(1.06, 1.06, 1), this.hOffset > (this.maxLineWidth || 1 / 0) && this.startNewLine();
12678
- const u = this.hOffset, l = this.flowDirection == je.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.currentFontSize, h = a.width * this.currentWidthFactor, f = this.currentFontSize;
12685
+ const u = this.hOffset, l = this.flowDirection == Ze.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.currentFontSize, h = a.width * this.currentWidthFactor, f = this.currentFontSize;
12679
12686
  s.translate(u, l, 0), this.currentHorizontalAlignment == se.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, r.push(s);
12680
12687
  const c = f * 0.05, p = 1e-3;
12681
12688
  if (this._currentContext.underline) {
@@ -12771,7 +12778,7 @@ class Ol {
12771
12778
  )), r || (r = this.fontManager.getCharShape(e, "", this.currentFontSize)), r || (r = this.fontManager.getNotFoundTextShape(this.currentFontSize)), this.currentFontSize > this._maxFontSize && (this._maxFontSize = this.currentFontSize), r;
12772
12779
  }
12773
12780
  startNewLine() {
12774
- this._hOffset = 0, this.flowDirection == je.BOTTOM_TO_TOP ? this._vOffset += this.currentLineHeight : this._vOffset -= this.currentLineHeight, this._lineCount++, this.processAlignment(), this._currentLineObjects = [], this._lineCount == 2 ? this._totalHeight = this.currentMaxFontSize : this._totalHeight = this._totalHeight + this.currentLineHeight, this._maxFontSize = 0;
12781
+ this._hOffset = 0, this.flowDirection == Ze.BOTTOM_TO_TOP ? this._vOffset += this.currentLineHeight : this._vOffset -= this.currentLineHeight, this._lineCount++, this.processAlignment(), this._currentLineObjects = [], this._lineCount == 2 ? this._totalHeight = this.currentMaxFontSize : this._totalHeight = this._totalHeight + this.currentLineHeight, this._maxFontSize = 0;
12775
12782
  }
12776
12783
  /**
12777
12784
  * Apply translation on the specified buffer geometries according to text alignment setting
@@ -12787,7 +12794,7 @@ class Ol {
12787
12794
  if (e.forEach((n, a) => {
12788
12795
  n.boundingBox || n.computeBoundingBox(), a === 0 ? r = n.boundingBox : r.union(n.boundingBox);
12789
12796
  }), r) {
12790
- const n = r.getSize(Cl);
12797
+ const n = r.getSize(El);
12791
12798
  switch (this.currentHorizontalAlignment) {
12792
12799
  case se.LEFT:
12793
12800
  e.forEach(
@@ -12866,7 +12873,7 @@ class Ol {
12866
12873
  this._currentContext.fontSize = e * this._currentContext.fontScaleFactor * this._currentContext.fontSizeScaleFactor, this.calcuateLineParams();
12867
12874
  }
12868
12875
  }
12869
- const Dt = /* @__PURE__ */ new R.Vector3(), Oe = /* @__PURE__ */ new R.Vector3(), Gt = /* @__PURE__ */ new R.Vector3(), Nt = /* @__PURE__ */ new R.Quaternion(), _t = /* @__PURE__ */ new R.Matrix4(), xn = /* @__PURE__ */ new R.Matrix4(), bn = /* @__PURE__ */ new R.Vector3(1, 0, 0);
12876
+ const It = /* @__PURE__ */ new R.Vector3(), Oe = /* @__PURE__ */ new R.Vector3(), Dt = /* @__PURE__ */ new R.Vector3(), Gt = /* @__PURE__ */ new R.Quaternion(), Nt = /* @__PURE__ */ new R.Matrix4(), bn = /* @__PURE__ */ new R.Matrix4(), Sn = /* @__PURE__ */ new R.Vector3(1, 0, 0);
12870
12877
  class vr extends R.Object3D {
12871
12878
  /**
12872
12879
  * Extracts all unique font names used in an MText string.
@@ -12884,7 +12891,7 @@ class vr extends R.Object3D {
12884
12891
  * ```
12885
12892
  */
12886
12893
  static getFonts(e, r = !1) {
12887
- return kl(e, r);
12894
+ return Fl(e, r);
12888
12895
  }
12889
12896
  /**
12890
12897
  * Creates a new instance of MText.
@@ -12956,11 +12963,11 @@ class vr extends R.Object3D {
12956
12963
  */
12957
12964
  raycast(e, r) {
12958
12965
  this._boxes.forEach((n) => {
12959
- if (e.ray.intersectBox(n, Dt)) {
12960
- const a = e.ray.origin.distanceTo(Dt);
12966
+ if (e.ray.intersectBox(n, It)) {
12967
+ const a = e.ray.origin.distanceTo(It);
12961
12968
  r.push({
12962
12969
  distance: a,
12963
- point: Dt.clone(),
12970
+ point: It.clone(),
12964
12971
  object: this,
12965
12972
  face: null,
12966
12973
  faceIndex: void 0,
@@ -12979,7 +12986,7 @@ class vr extends R.Object3D {
12979
12986
  const { object: n, height: a } = this.createMTextGroup(e, r);
12980
12987
  if (!n)
12981
12988
  return;
12982
- n.matrix.decompose(Oe, Nt, Gt), e.position && (Oe.x += e.position.x, Oe.y += e.position.y, n.matrix.compose(Oe, Nt, Gt));
12989
+ n.matrix.decompose(Oe, Gt, Dt), e.position && (Oe.x += e.position.x, Oe.y += e.position.y, n.matrix.compose(Oe, Gt, Dt));
12983
12990
  const s = e.width, i = this.calculateAnchorPoint(
12984
12991
  s,
12985
12992
  a,
@@ -12991,12 +12998,12 @@ class vr extends R.Object3D {
12991
12998
  });
12992
12999
  let o = e.rotation || 0;
12993
13000
  if (e.directionVector) {
12994
- const l = e.directionVector, h = new R.Vector3(l.x, l.y, l.z), f = h.clone().cross(bn), c = bn.angleTo(h);
13001
+ const l = e.directionVector, h = new R.Vector3(l.x, l.y, l.z), f = h.clone().cross(Sn), c = Sn.angleTo(h);
12995
13002
  o = f.z > 0 ? -c : c;
12996
13003
  }
12997
- n.matrix.compose(Oe, Nt, Gt);
13004
+ n.matrix.compose(Oe, Gt, Dt);
12998
13005
  const u = e.position ? Oe.clone().sub(e.position) : Oe;
12999
- return _t.makeTranslation(-u.x, -u.y, 0), xn.makeRotationZ(o), n.matrix.multiply(_t), n.matrix.multiply(xn), n.matrix.multiply(_t.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
13006
+ return Nt.makeTranslation(-u.x, -u.y, 0), bn.makeRotationZ(o), n.matrix.multiply(Nt), n.matrix.multiply(bn), n.matrix.multiply(Nt.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
13000
13007
  }
13001
13008
  /**
13002
13009
  * Creates a group of text elements from MText data.
@@ -13014,7 +13021,7 @@ class vr extends R.Object3D {
13014
13021
  e.width && e.attachmentPoint && ([1, 4, 7].includes(e.attachmentPoint) ? a = se.LEFT : [2, 5, 8].includes(e.attachmentPoint) ? a = se.CENTER : [3, 6, 9].includes(e.attachmentPoint) && (a = se.RIGHT));
13015
13022
  let s = He.BOTTOM;
13016
13023
  e.attachmentPoint && ([1, 2, 3].includes(e.attachmentPoint) ? s = He.TOP : [4, 5, 6].includes(e.attachmentPoint) ? s = He.MIDDLE : [7, 8, 9].includes(e.attachmentPoint) && (s = He.BOTTOM));
13017
- const i = e.height || 0, o = e.lineSpaceFactor || 0.3, u = e.drawingDirection ?? je.LEFT_TO_RIGHT, l = {
13024
+ const i = e.height || 0, o = e.lineSpaceFactor || 0.3, u = e.drawingDirection ?? Ze.LEFT_TO_RIGHT, l = {
13018
13025
  fontSize: i,
13019
13026
  widthFactor: e.widthFactor ?? 1,
13020
13027
  lineSpaceFactor: o,
@@ -13024,17 +13031,17 @@ class vr extends R.Object3D {
13024
13031
  byBlockColor: this._colorSettings.byBlockColor,
13025
13032
  byLayerColor: this._colorSettings.byLayerColor,
13026
13033
  removeFontExtension: !0
13027
- }, h = new tt();
13034
+ }, h = new et();
13028
13035
  h.fontFace.family = r.font, h.capHeight = { value: e.height || 1, isRelative: !0 }, h.widthFactor = {
13029
13036
  value: e.widthFactor ?? 1,
13030
13037
  isRelative: !0
13031
13038
  }, h.align = s, h.paragraph.align = a;
13032
- const f = new Ol(
13039
+ const f = new Ul(
13033
13040
  r,
13034
13041
  this.styleManager,
13035
13042
  this.fontManager,
13036
13043
  l
13037
- ), p = new Tl(e.text, h, {
13044
+ ), p = new wl(e.text, h, {
13038
13045
  resetParagraphParameters: !0,
13039
13046
  yieldPropertyCommands: !0
13040
13047
  }).parse();
@@ -13083,7 +13090,7 @@ class vr extends R.Object3D {
13083
13090
  s -= e, i += r;
13084
13091
  break;
13085
13092
  }
13086
- return a == je.BOTTOM_TO_TOP && (i -= r), { x: s, y: i };
13093
+ return a == Ze.BOTTOM_TO_TOP && (i -= r), { x: s, y: i };
13087
13094
  }
13088
13095
  /**
13089
13096
  * Recursively calculates bounding boxes for an object and its children.
@@ -13102,7 +13109,7 @@ class vr extends R.Object3D {
13102
13109
  this.getBoxes(n[a], r);
13103
13110
  }
13104
13111
  }
13105
- class ba {
13112
+ class Sa {
13106
13113
  constructor() {
13107
13114
  this.lineBasicMaterials = {}, this.meshBasicMaterials = {}, this.unsupportedTextStyles = {};
13108
13115
  }
@@ -13117,12 +13124,12 @@ class ba {
13117
13124
  })), this.lineBasicMaterials[e];
13118
13125
  }
13119
13126
  }
13120
- class Sn {
13127
+ class kn {
13121
13128
  constructor(e = { isLoadFontsOnDemand: !0 }) {
13122
13129
  this.workers = [], this.inFlightPerWorker = [], this.pendingRequests = /* @__PURE__ */ new Map(), this.requestId = 0, this.readyPromise = null, this.poolSize = e.poolSize ?? Math.max(
13123
13130
  1,
13124
13131
  navigator.hardwareConcurrency ? Math.min(4, navigator.hardwareConcurrency) : 2
13125
- ), this.isLoadFontsOnDemand = !!e.isLoadFontsOnDemand, this.styleManager = new ba();
13132
+ ), this.isLoadFontsOnDemand = !!e.isLoadFontsOnDemand, this.styleManager = new Sa();
13126
13133
  const r = e.workerUrl ?? "./mtext-renderer-worker.js";
13127
13134
  this.timeOut = e.timeOut ?? 12e4;
13128
13135
  for (let n = 0; n < this.poolSize; n++) {
@@ -13347,9 +13354,9 @@ class Sn {
13347
13354
  this.terminate();
13348
13355
  }
13349
13356
  }
13350
- class Ul {
13357
+ class Ll {
13351
13358
  constructor() {
13352
- this.fontManager = de.instance, this.styleManager = new ba(), this.isInitialized = !1;
13359
+ this.fontManager = de.instance, this.styleManager = new Sa(), this.isInitialized = !1;
13353
13360
  }
13354
13361
  /**
13355
13362
  * Render MText directly in the main thread
@@ -13386,7 +13393,7 @@ class Ul {
13386
13393
  this.isInitialized || (await this.loadFonts([de.instance.defaultFont]), this.isInitialized = !0);
13387
13394
  }
13388
13395
  }
13389
- class Pl {
13396
+ class Bl {
13390
13397
  /**
13391
13398
  * Constructor
13392
13399
  *
@@ -13395,14 +13402,14 @@ class Pl {
13395
13402
  * when render mode is 'worker'.
13396
13403
  */
13397
13404
  constructor(e = "main", r = {}) {
13398
- this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ul(), this.adapter = this.mainThreadRenderer, this.workerConfig = r, e === "worker" && (this.workerManager = new Sn(r), this.adapter = this.workerManager);
13405
+ this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ll(), this.adapter = this.mainThreadRenderer, this.workerConfig = r, e === "worker" && (this.workerManager = new kn(r), this.adapter = this.workerManager);
13399
13406
  }
13400
13407
  /**
13401
13408
  * Switch between main thread and worker rendering modes
13402
13409
  * @param mode The rendering mode to switch to
13403
13410
  */
13404
13411
  switchMode(e) {
13405
- this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new Sn(this.workerConfig), this.adapter = this.workerManager) : this.adapter = this.mainThreadRenderer);
13412
+ this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new kn(this.workerConfig), this.adapter = this.workerManager) : this.adapter = this.mainThreadRenderer);
13406
13413
  }
13407
13414
  /**
13408
13415
  * Get current rendering mode
@@ -13439,17 +13446,17 @@ class Pl {
13439
13446
  }
13440
13447
  }
13441
13448
  export {
13442
- kn as BaseFont,
13443
- Fn as BaseTextShape,
13444
- xl as DefaultFontLoader,
13449
+ Fn as BaseFont,
13450
+ Tn as BaseTextShape,
13451
+ bl as DefaultFontLoader,
13445
13452
  xr as EventManager,
13446
13453
  ke as FontFactory,
13447
13454
  de as FontManager,
13448
13455
  vr as MText,
13449
- wl as MTextAttachmentPoint,
13450
- je as MTextFlowDirection,
13451
- Ul as MainThreadRenderer,
13452
- ba as StyleManager,
13453
- Pl as UnifiedRenderer,
13454
- Sn as WebWorkerRenderer
13456
+ Cl as MTextAttachmentPoint,
13457
+ Ze as MTextFlowDirection,
13458
+ Ll as MainThreadRenderer,
13459
+ Sa as StyleManager,
13460
+ Bl as UnifiedRenderer,
13461
+ kn as WebWorkerRenderer
13455
13462
  };