pdfmake 0.2.10 → 0.2.12

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/build/pdfmake.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! pdfmake v0.2.10, @license MIT, @link http://pdfmake.org */
1
+ /*! pdfmake v0.2.12, @license MIT, @link http://pdfmake.org */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory();
@@ -200,9 +200,9 @@ __webpack_require__(61726);
200
200
  __webpack_require__(57114);
201
201
  __webpack_require__(58281);
202
202
  __webpack_require__(94712);
203
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
204
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
205
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
203
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
204
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
205
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
206
206
  var _require = __webpack_require__(63787),
207
207
  NumberT = _require.Number;
208
208
  var utils = __webpack_require__(76949);
@@ -521,8 +521,8 @@ __webpack_require__(41584);
521
521
  __webpack_require__(20731);
522
522
  __webpack_require__(61726);
523
523
  __webpack_require__(46467);
524
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
525
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
524
+ function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
525
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
526
526
  var iconv;
527
527
  var stream = __webpack_require__(9760);
528
528
  var DecodeStream = __webpack_require__(78984);
@@ -530,7 +530,6 @@ try {
530
530
  iconv = __webpack_require__(54171);
531
531
  } catch (error) {}
532
532
  var EncodeStream = /*#__PURE__*/function (_stream$Readable) {
533
- _inheritsLoose(EncodeStream, _stream$Readable);
534
533
  function EncodeStream(bufferSize) {
535
534
  var _this;
536
535
  if (bufferSize === void 0) {
@@ -544,6 +543,7 @@ var EncodeStream = /*#__PURE__*/function (_stream$Readable) {
544
543
  }
545
544
 
546
545
  // do nothing, required by node
546
+ _inheritsLoose(EncodeStream, _stream$Readable);
547
547
  var _proto = EncodeStream.prototype;
548
548
  _proto._read = function _read() {};
549
549
  _proto.ensure = function ensure(bytes) {
@@ -697,8 +697,8 @@ module.exports = Enum;
697
697
 
698
698
  __webpack_require__(14032);
699
699
  __webpack_require__(68067);
700
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
701
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
700
+ function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
701
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
702
702
  var ArrayT = __webpack_require__(38637);
703
703
  var _require = __webpack_require__(63787),
704
704
  NumberT = _require.Number;
@@ -706,10 +706,10 @@ var utils = __webpack_require__(76949);
706
706
  var _require2 = __webpack_require__(7187),
707
707
  _inspect = _require2.inspect;
708
708
  var LazyArrayT = /*#__PURE__*/function (_ArrayT) {
709
- _inheritsLoose(LazyArrayT, _ArrayT);
710
709
  function LazyArrayT() {
711
710
  return _ArrayT.apply(this, arguments) || this;
712
711
  }
712
+ _inheritsLoose(LazyArrayT, _ArrayT);
713
713
  var _proto = LazyArrayT.prototype;
714
714
  _proto.decode = function decode(stream, parent) {
715
715
  var pos = stream.pos;
@@ -784,8 +784,8 @@ module.exports = LazyArrayT;
784
784
  "use strict";
785
785
 
786
786
 
787
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
788
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
787
+ function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
788
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
789
789
  var DecodeStream = __webpack_require__(78984);
790
790
  var NumberT = /*#__PURE__*/function () {
791
791
  function NumberT(type, endian) {
@@ -831,7 +831,6 @@ exports.floatle = new NumberT('Float', 'LE');
831
831
  exports.doublebe = exports.double = new NumberT('Double', 'BE');
832
832
  exports.doublele = new NumberT('Double', 'LE');
833
833
  var Fixed = /*#__PURE__*/function (_NumberT) {
834
- _inheritsLoose(Fixed, _NumberT);
835
834
  function Fixed(size, endian, fracBits) {
836
835
  var _this;
837
836
  if (fracBits === void 0) {
@@ -841,6 +840,7 @@ var Fixed = /*#__PURE__*/function (_NumberT) {
841
840
  _this._point = 1 << fracBits;
842
841
  return _this;
843
842
  }
843
+ _inheritsLoose(Fixed, _NumberT);
844
844
  var _proto2 = Fixed.prototype;
845
845
  _proto2.decode = function decode(stream) {
846
846
  return _NumberT.prototype.decode.call(this, stream) / this._point;
@@ -1331,8 +1331,8 @@ module.exports = Struct;
1331
1331
 
1332
1332
 
1333
1333
  __webpack_require__(14032);
1334
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
1335
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1334
+ function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
1335
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
1336
1336
  var Struct = __webpack_require__(2731);
1337
1337
  var getPath = function getPath(object, pathArray) {
1338
1338
  return pathArray.reduce(function (prevObj, key) {
@@ -1340,7 +1340,6 @@ var getPath = function getPath(object, pathArray) {
1340
1340
  }, object);
1341
1341
  };
1342
1342
  var VersionedStruct = /*#__PURE__*/function (_Struct) {
1343
- _inheritsLoose(VersionedStruct, _Struct);
1344
1343
  function VersionedStruct(type, versions) {
1345
1344
  var _this;
1346
1345
  if (versions === void 0) {
@@ -1354,6 +1353,7 @@ var VersionedStruct = /*#__PURE__*/function (_Struct) {
1354
1353
  }
1355
1354
  return _this;
1356
1355
  }
1356
+ _inheritsLoose(VersionedStruct, _Struct);
1357
1357
  var _proto = VersionedStruct.prototype;
1358
1358
  _proto.decode = function decode(stream, parent, length) {
1359
1359
  if (length === void 0) {
@@ -1561,14 +1561,12 @@ __webpack_require__(84538);
1561
1561
  __webpack_require__(64793);
1562
1562
  __webpack_require__(74202);
1563
1563
  __webpack_require__(52529);
1564
- __webpack_require__(41863);
1565
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1566
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1567
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
1564
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
1565
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
1566
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
1568
1567
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1569
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1570
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
1571
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1568
+ function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
1569
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
1572
1570
  var base64 = __webpack_require__(32504);
1573
1571
  var ieee754 = __webpack_require__(89029);
1574
1572
  var customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation
@@ -3055,12 +3053,11 @@ Buffer.prototype.fill = function fill(val, start, end, encoding) {
3055
3053
  var errors = {};
3056
3054
  function E(sym, getMessage, Base) {
3057
3055
  errors[sym] = /*#__PURE__*/function (_Base) {
3058
- _inheritsLoose(NodeError, _Base);
3059
3056
  function NodeError() {
3060
3057
  var _this;
3061
3058
  _this = _Base.call(this) || this;
3062
- Object.defineProperty(_assertThisInitialized(_this), 'message', {
3063
- value: getMessage.apply(_assertThisInitialized(_this), arguments),
3059
+ Object.defineProperty(_this, 'message', {
3060
+ value: getMessage.apply(_this, arguments),
3064
3061
  writable: true,
3065
3062
  configurable: true
3066
3063
  });
@@ -3074,11 +3071,12 @@ function E(sym, getMessage, Base) {
3074
3071
  delete _this.name;
3075
3072
  return _this;
3076
3073
  }
3074
+ _inheritsLoose(NodeError, _Base);
3077
3075
  var _proto = NodeError.prototype;
3078
3076
  _proto.toString = function toString() {
3079
3077
  return this.name + " [" + sym + "]: " + this.message;
3080
3078
  };
3081
- _createClass(NodeError, [{
3079
+ return _createClass(NodeError, [{
3082
3080
  key: "code",
3083
3081
  get: function get() {
3084
3082
  return sym;
@@ -3092,7 +3090,6 @@ function E(sym, getMessage, Base) {
3092
3090
  });
3093
3091
  }
3094
3092
  }]);
3095
- return NodeError;
3096
3093
  }(Base);
3097
3094
  }
3098
3095
  E('ERR_BUFFER_OUT_OF_BOUNDS', function (name) {
@@ -5044,6 +5041,7 @@ __webpack_require__(81755);
5044
5041
  __webpack_require__(94845);
5045
5042
  __webpack_require__(20731);
5046
5043
  __webpack_require__(23913);
5044
+ __webpack_require__(10720);
5047
5045
  __webpack_require__(14032);
5048
5046
  __webpack_require__(57114);
5049
5047
  __webpack_require__(59735);
@@ -10319,6 +10317,8 @@ __webpack_require__(20731);
10319
10317
  "use strict";
10320
10318
 
10321
10319
 
10320
+ __webpack_require__(65292);
10321
+ __webpack_require__(73844);
10322
10322
  __webpack_require__(35877);
10323
10323
  __webpack_require__(38178);
10324
10324
  __webpack_require__(11765);
@@ -10329,8 +10329,6 @@ __webpack_require__(71950);
10329
10329
  __webpack_require__(68067);
10330
10330
  __webpack_require__(57114);
10331
10331
  __webpack_require__(42437);
10332
- __webpack_require__(65292);
10333
- __webpack_require__(73844);
10334
10332
  __webpack_require__(69330);
10335
10333
  __webpack_require__(81755);
10336
10334
  __webpack_require__(20731);
@@ -10339,10 +10337,10 @@ __webpack_require__(61726);
10339
10337
  __webpack_require__(58281);
10340
10338
  __webpack_require__(6422);
10341
10339
  __webpack_require__(94712);
10342
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10343
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10344
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
10345
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10340
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10341
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
10342
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
10343
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10346
10344
  var INITIAL_STATE = 1;
10347
10345
  var FAIL_STATE = 0;
10348
10346
  /**
@@ -10487,18 +10485,6 @@ __webpack_require__(68067);
10487
10485
  var fs = __webpack_require__(48181);
10488
10486
  var zlib = __webpack_require__(6729);
10489
10487
  module.exports = /*#__PURE__*/function () {
10490
- PNG.decode = function decode(path, fn) {
10491
- return fs.readFile(path, function (err, file) {
10492
- var png = new PNG(file);
10493
- return png.decode(function (pixels) {
10494
- return fn(pixels);
10495
- });
10496
- });
10497
- };
10498
- PNG.load = function load(path) {
10499
- var file = fs.readFileSync(path);
10500
- return new PNG(file);
10501
- };
10502
10488
  function PNG(data) {
10503
10489
  var i;
10504
10490
  this.data = data;
@@ -10606,6 +10592,18 @@ module.exports = /*#__PURE__*/function () {
10606
10592
  }
10607
10593
  }
10608
10594
  }
10595
+ PNG.decode = function decode(path, fn) {
10596
+ return fs.readFile(path, function (err, file) {
10597
+ var png = new PNG(file);
10598
+ return png.decode(function (pixels) {
10599
+ return fn(pixels);
10600
+ });
10601
+ });
10602
+ };
10603
+ PNG.load = function load(path) {
10604
+ var file = fs.readFileSync(path);
10605
+ return new PNG(file);
10606
+ };
10609
10607
  var _proto = PNG.prototype;
10610
10608
  _proto.read = function read(bytes) {
10611
10609
  var result = new Array(bytes);
@@ -10824,6 +10822,7 @@ module.exports = /*#__PURE__*/function () {
10824
10822
 
10825
10823
  __webpack_require__(41584);
10826
10824
  __webpack_require__(81755);
10825
+ __webpack_require__(10720);
10827
10826
  __webpack_require__(14032);
10828
10827
  __webpack_require__(56912);
10829
10828
  __webpack_require__(73663);
@@ -10923,7 +10922,6 @@ module.exports = safer;
10923
10922
 
10924
10923
 
10925
10924
  __webpack_require__(65292);
10926
- __webpack_require__(73844);
10927
10925
  __webpack_require__(5597);
10928
10926
  __webpack_require__(49063);
10929
10927
  __webpack_require__(20731);
@@ -11256,6 +11254,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
11256
11254
 
11257
11255
  __webpack_require__(81755);
11258
11256
  __webpack_require__(20731);
11257
+ __webpack_require__(10720);
11259
11258
  __webpack_require__(14032);
11260
11259
  __webpack_require__(56912);
11261
11260
  __webpack_require__(59735);
@@ -11424,6 +11423,7 @@ module.exports = UnicodeTrie;
11424
11423
 
11425
11424
 
11426
11425
  __webpack_require__(81755);
11426
+ __webpack_require__(10720);
11427
11427
  __webpack_require__(14032);
11428
11428
  __webpack_require__(56912);
11429
11429
  __webpack_require__(59735);
@@ -12443,7 +12443,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
12443
12443
  result,
12444
12444
  child,
12445
12445
  error = false;
12446
- var recursive = function recursive() {
12446
+ var _recursive = function recursive() {
12447
12447
  var temp, child;
12448
12448
  if (temp = parser.match(/^<([\w:.-]+)\s*/, true)) {
12449
12449
  // Opening tag
@@ -12467,7 +12467,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
12467
12467
  }
12468
12468
  if (parser.match(/^>/)) {
12469
12469
  // End of opening tag
12470
- while (child = recursive()) {
12470
+ while (child = _recursive()) {
12471
12471
  node.childNodes.push(child);
12472
12472
  child.parentNode = node;
12473
12473
  node.textContent += child.nodeType === 3 || child.nodeType === 4 ? child.nodeValue : child.textContent;
@@ -12510,7 +12510,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
12510
12510
  return new SvgNode('#text', 3, decodeEntities(temp[1]), error);
12511
12511
  }
12512
12512
  };
12513
- while (child = recursive()) {
12513
+ while (child = _recursive()) {
12514
12514
  if (child.nodeType === 1 && !result) {
12515
12515
  result = child;
12516
12516
  } else if (child.nodeType === 1 || child.nodeType === 3 && child.nodeValue.trim() !== '') {
@@ -12603,7 +12603,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
12603
12603
  return ctm;
12604
12604
  }
12605
12605
  function getPageBBox() {
12606
- return new SvgShape().M(0, 0).L(doc.page.width, 0).L(doc.page.width, doc.page.height).L(0, doc.page.height).transform(inverseMatrix(getGlobalMatrix())).getBoundingBox();
12606
+ return new _SvgShape().M(0, 0).L(doc.page.width, 0).L(doc.page.width, doc.page.height).L(0, doc.page.height).transform(inverseMatrix(getGlobalMatrix())).getBoundingBox();
12607
12607
  }
12608
12608
  function inverseMatrix(m) {
12609
12609
  var dt = m[0] * m[3] - m[1] * m[2];
@@ -13131,7 +13131,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13131
13131
  }
13132
13132
  };
13133
13133
  };
13134
- var SvgShape = function SvgShape() {
13134
+ var _SvgShape = function SvgShape() {
13135
13135
  this.pathCommands = [];
13136
13136
  this.pathSegments = [];
13137
13137
  this.startPoint = null;
@@ -13397,7 +13397,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13397
13397
  return this;
13398
13398
  };
13399
13399
  this.clone = function () {
13400
- return new SvgShape().mergeShape(this);
13400
+ return new _SvgShape().mergeShape(this);
13401
13401
  };
13402
13402
  this.insertInDocument = function () {
13403
13403
  for (var i = 0; i < this.pathCommands.length; i++) {
@@ -13421,13 +13421,13 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13421
13421
  };
13422
13422
  this.getSubPaths = function () {
13423
13423
  var subPaths = [],
13424
- shape = new SvgShape();
13424
+ shape = new _SvgShape();
13425
13425
  for (var i = 0; i < this.pathCommands.length; i++) {
13426
13426
  var data = this.pathCommands[i],
13427
13427
  command = this.pathCommands[i][0];
13428
13428
  if (command === 'move' && i !== 0) {
13429
13429
  subPaths.push(shape);
13430
- shape = new SvgShape();
13430
+ shape = new _SvgShape();
13431
13431
  }
13432
13432
  shape.addCommand(data);
13433
13433
  }
@@ -13715,9 +13715,9 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13715
13715
  if (object == null) {
13716
13716
  result = fallbackColor;
13717
13717
  } else if (object.nodeName === 'linearGradient' || object.nodeName === 'radialGradient') {
13718
- result = new SvgElemGradient(object, null, fallbackColor);
13718
+ result = new _SvgElemGradient(object, null, fallbackColor);
13719
13719
  } else if (object.nodeName === 'pattern') {
13720
- result = new SvgElemPattern(object, null, fallbackColor);
13720
+ result = new _SvgElemPattern(object, null, fallbackColor);
13721
13721
  } else {
13722
13722
  result = fallbackColor;
13723
13723
  }
@@ -13842,7 +13842,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13842
13842
  return DefaultColors.white;
13843
13843
  }
13844
13844
  if (fill !== 'none' && opacity && fillOpacity) {
13845
- if (fill instanceof SvgElemGradient || fill instanceof SvgElemPattern) {
13845
+ if (fill instanceof _SvgElemGradient || fill instanceof _SvgElemPattern) {
13846
13846
  return fill.getPaint(this.getBoundingBox(), fillOpacity * opacity, isClip, isMask);
13847
13847
  }
13848
13848
  return opacityToColor(fill, fillOpacity * opacity, isMask);
@@ -13856,7 +13856,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13856
13856
  return;
13857
13857
  }
13858
13858
  if (stroke !== 'none' && opacity && strokeOpacity) {
13859
- if (stroke instanceof SvgElemGradient || stroke instanceof SvgElemPattern) {
13859
+ if (stroke instanceof _SvgElemGradient || stroke instanceof _SvgElemPattern) {
13860
13860
  return stroke.getPaint(this.getBoundingBox(), strokeOpacity * opacity, isClip, isMask);
13861
13861
  }
13862
13862
  return opacityToColor(stroke, strokeOpacity * opacity, isMask);
@@ -13867,7 +13867,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
13867
13867
  SvgElemStylable.call(this, obj, inherits);
13868
13868
  this.allowedChildren = ['use', 'g', 'a', 'svg', 'image', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon', 'path', 'text'];
13869
13869
  this.getBoundingShape = function () {
13870
- var shape = new SvgShape(),
13870
+ var shape = new _SvgShape(),
13871
13871
  children = this.getChildren();
13872
13872
  for (var i = 0; i < children.length; i++) {
13873
13873
  if (children[i].get('display') !== 'none') {
@@ -14012,7 +14012,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14012
14012
  this.drawInDocument = function (isClip, isMask) {
14013
14013
  doc.save();
14014
14014
  if (this.get('overflow') === 'hidden') {
14015
- new SvgShape().M(x, y).L(x + width, y).L(x + width, y + height).L(x, y + height).Z().transform(this.get('transform')).insertInDocument();
14015
+ new _SvgShape().M(x, y).L(x + width, y).L(x + width, y + height).L(x, y + height).Z().transform(this.get('transform')).insertInDocument();
14016
14016
  doc.clip();
14017
14017
  }
14018
14018
  this.drawContent(isClip, isMask);
@@ -14055,7 +14055,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14055
14055
  return this.get('transform');
14056
14056
  };
14057
14057
  this.getBoundingShape = function () {
14058
- return new SvgShape().M(x, y).L(x + width, y).M(x + width, y + height).L(x, y + height);
14058
+ return new _SvgShape().M(x, y).L(x + width, y).M(x + width, y + height).L(x, y + height);
14059
14059
  };
14060
14060
  this.drawInDocument = function (isClip, isMask) {
14061
14061
  if (this.get('visibility') === 'hidden' || !image) {
@@ -14080,12 +14080,12 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14080
14080
  doc.restore();
14081
14081
  };
14082
14082
  };
14083
- var SvgElemPattern = function SvgElemPattern(obj, inherits, fallback) {
14083
+ var _SvgElemPattern = function SvgElemPattern(obj, inherits, fallback) {
14084
14084
  SvgElemHasChildren.call(this, obj, inherits);
14085
14085
  this.ref = function () {
14086
14086
  var ref = this.getUrl('href') || this.getUrl('xlink:href');
14087
14087
  if (ref && ref.nodeName === obj.nodeName) {
14088
- return new SvgElemPattern(ref, inherits, fallback);
14088
+ return new _SvgElemPattern(ref, inherits, fallback);
14089
14089
  }
14090
14090
  }.call(this);
14091
14091
  var _attr = this.attr;
@@ -14152,13 +14152,13 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14152
14152
  return this.getViewbox('viewBox', [0, 0, 0, height])[3];
14153
14153
  };
14154
14154
  };
14155
- var SvgElemGradient = function SvgElemGradient(obj, inherits, fallback) {
14155
+ var _SvgElemGradient = function SvgElemGradient(obj, inherits, fallback) {
14156
14156
  SvgElem.call(this, obj, inherits);
14157
14157
  this.allowedChildren = ['stop'];
14158
14158
  this.ref = function () {
14159
14159
  var ref = this.getUrl('href') || this.getUrl('xlink:href');
14160
14160
  if (ref && ref.nodeName === obj.nodeName) {
14161
- return new SvgElemGradient(ref, inherits, fallback);
14161
+ return new _SvgElemGradient(ref, inherits, fallback);
14162
14162
  }
14163
14163
  }.call(this);
14164
14164
  var _attr = this.attr;
@@ -14408,12 +14408,12 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14408
14408
  if (rx && ry) {
14409
14409
  rx = Math.min(rx, 0.5 * w);
14410
14410
  ry = Math.min(ry, 0.5 * h);
14411
- this.shape = new SvgShape().M(x + rx, y).L(x + w - rx, y).A(rx, ry, 0, 0, 1, x + w, y + ry).L(x + w, y + h - ry).A(rx, ry, 0, 0, 1, x + w - rx, y + h).L(x + rx, y + h).A(rx, ry, 0, 0, 1, x, y + h - ry).L(x, y + ry).A(rx, ry, 0, 0, 1, x + rx, y).Z();
14411
+ this.shape = new _SvgShape().M(x + rx, y).L(x + w - rx, y).A(rx, ry, 0, 0, 1, x + w, y + ry).L(x + w, y + h - ry).A(rx, ry, 0, 0, 1, x + w - rx, y + h).L(x + rx, y + h).A(rx, ry, 0, 0, 1, x, y + h - ry).L(x, y + ry).A(rx, ry, 0, 0, 1, x + rx, y).Z();
14412
14412
  } else {
14413
- this.shape = new SvgShape().M(x, y).L(x + w, y).L(x + w, y + h).L(x, y + h).Z();
14413
+ this.shape = new _SvgShape().M(x, y).L(x + w, y).L(x + w, y + h).L(x, y + h).Z();
14414
14414
  }
14415
14415
  } else {
14416
- this.shape = new SvgShape();
14416
+ this.shape = new _SvgShape();
14417
14417
  }
14418
14418
  };
14419
14419
  var SvgElemCircle = function SvgElemCircle(obj, inherits) {
@@ -14422,9 +14422,9 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14422
14422
  cy = this.getLength('cy', this.getVHeight(), 0),
14423
14423
  r = this.getLength('r', this.getViewport(), 0);
14424
14424
  if (r > 0) {
14425
- this.shape = new SvgShape().M(cx + r, cy).A(r, r, 0, 0, 1, cx - r, cy).A(r, r, 0, 0, 1, cx + r, cy).Z();
14425
+ this.shape = new _SvgShape().M(cx + r, cy).A(r, r, 0, 0, 1, cx - r, cy).A(r, r, 0, 0, 1, cx + r, cy).Z();
14426
14426
  } else {
14427
- this.shape = new SvgShape();
14427
+ this.shape = new _SvgShape();
14428
14428
  }
14429
14429
  };
14430
14430
  var SvgElemEllipse = function SvgElemEllipse(obj, inherits) {
@@ -14434,9 +14434,9 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14434
14434
  rx = this.getLength('rx', this.getVWidth(), 0),
14435
14435
  ry = this.getLength('ry', this.getVHeight(), 0);
14436
14436
  if (rx > 0 && ry > 0) {
14437
- this.shape = new SvgShape().M(cx + rx, cy).A(rx, ry, 0, 0, 1, cx - rx, cy).A(rx, ry, 0, 0, 1, cx + rx, cy).Z();
14437
+ this.shape = new _SvgShape().M(cx + rx, cy).A(rx, ry, 0, 0, 1, cx - rx, cy).A(rx, ry, 0, 0, 1, cx + rx, cy).Z();
14438
14438
  } else {
14439
- this.shape = new SvgShape();
14439
+ this.shape = new _SvgShape();
14440
14440
  }
14441
14441
  };
14442
14442
  var SvgElemLine = function SvgElemLine(obj, inherits) {
@@ -14445,12 +14445,12 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14445
14445
  y1 = this.getLength('y1', this.getVHeight(), 0),
14446
14446
  x2 = this.getLength('x2', this.getVWidth(), 0),
14447
14447
  y2 = this.getLength('y2', this.getVHeight(), 0);
14448
- this.shape = new SvgShape().M(x1, y1).L(x2, y2);
14448
+ this.shape = new _SvgShape().M(x1, y1).L(x2, y2);
14449
14449
  };
14450
14450
  var SvgElemPolyline = function SvgElemPolyline(obj, inherits) {
14451
14451
  SvgElemBasicShape.call(this, obj, inherits);
14452
14452
  var points = this.getNumberList('points');
14453
- this.shape = new SvgShape();
14453
+ this.shape = new _SvgShape();
14454
14454
  for (var i = 0; i < points.length - 1; i += 2) {
14455
14455
  if (i === 0) {
14456
14456
  this.shape.M(points[i], points[i + 1]);
@@ -14468,7 +14468,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14468
14468
  var SvgElemPolygon = function SvgElemPolygon(obj, inherits) {
14469
14469
  SvgElemBasicShape.call(this, obj, inherits);
14470
14470
  var points = this.getNumberList('points');
14471
- this.shape = new SvgShape();
14471
+ this.shape = new _SvgShape();
14472
14472
  for (var i = 0; i < points.length - 1; i += 2) {
14473
14473
  if (i === 0) {
14474
14474
  this.shape.M(points[i], points[i + 1]);
@@ -14486,7 +14486,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14486
14486
  };
14487
14487
  var SvgElemPath = function SvgElemPath(obj, inherits) {
14488
14488
  SvgElemBasicShape.call(this, obj, inherits);
14489
- this.shape = new SvgShape().path(this.attr('d'));
14489
+ this.shape = new _SvgShape().path(this.attr('d'));
14490
14490
  var pathLength = this.getLength('pathLength', this.getViewport());
14491
14491
  this.pathLength = pathLength > 0 ? pathLength : undefined;
14492
14492
  this.dashScale = this.pathLength !== undefined ? this.shape.totalLength / this.pathLength : 1;
@@ -14578,7 +14578,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14578
14578
  this.allowedChildren = ['tspan', '#text', '#cdata-section', 'a'];
14579
14579
  this.isText = true;
14580
14580
  this.getBoundingShape = function () {
14581
- var shape = new SvgShape();
14581
+ var shape = new _SvgShape();
14582
14582
  for (var i = 0; i < this._pos.length; i++) {
14583
14583
  var pos = this._pos[i];
14584
14584
  if (!pos.hidden) {
@@ -14680,7 +14680,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14680
14680
  dy1 = -(linePosition - lineWidth / 2) * Math.cos(pos[j].rotate),
14681
14681
  dx2 = pos[j].width * Math.cos(pos[j].rotate),
14682
14682
  dy2 = pos[j].width * Math.sin(pos[j].rotate);
14683
- new SvgShape().M(pos[j].x + dx0, pos[j].y + dy0).L(pos[j].x + dx0 + dx2, pos[j].y + dy0 + dy2).L(pos[j].x + dx1 + dx2, pos[j].y + dy1 + dy2).L(pos[j].x + dx1, pos[j].y + dy1).Z().insertInDocument();
14683
+ new _SvgShape().M(pos[j].x + dx0, pos[j].y + dy0).L(pos[j].x + dx0 + dx2, pos[j].y + dy0 + dy2).L(pos[j].x + dx1 + dx2, pos[j].y + dy1 + dy2).L(pos[j].x + dx1, pos[j].y + dy1).Z().insertInDocument();
14684
14684
  if (fill && stroke) {
14685
14685
  doc.fillAndStroke();
14686
14686
  } else if (fill) {
@@ -14704,7 +14704,7 @@ var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
14704
14704
  var pathObject, pathLength, temp;
14705
14705
  if ((temp = this.attr('path')) && temp.trim() !== '') {
14706
14706
  var _pathLength = this.getLength('pathLength', this.getViewport());
14707
- this.pathObject = new SvgShape().path(temp);
14707
+ this.pathObject = new _SvgShape().path(temp);
14708
14708
  this.pathLength = _pathLength > 0 ? _pathLength : this.pathObject.totalLength;
14709
14709
  this.pathScale = this.pathObject.totalLength / this.pathLength;
14710
14710
  } else if ((temp = this.getUrl('href') || this.getUrl('xlink:href')) && temp.nodeName === 'path') {
@@ -15135,7 +15135,7 @@ if ( true && module && typeof module.exports !== 'undefined') {
15135
15135
 
15136
15136
  /***/ }),
15137
15137
 
15138
- /***/ 48585:
15138
+ /***/ 82759:
15139
15139
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
15140
15140
 
15141
15141
  "use strict";
@@ -15162,7 +15162,6 @@ __webpack_require__(20731);
15162
15162
  __webpack_require__(45337);
15163
15163
  __webpack_require__(10720);
15164
15164
  __webpack_require__(24863);
15165
- __webpack_require__(7283);
15166
15165
  __webpack_require__(70095);
15167
15166
  __webpack_require__(10849);
15168
15167
  __webpack_require__(18756);
@@ -15218,7 +15217,7 @@ var _fontkit = _interopRequireDefault(__webpack_require__(60421));
15218
15217
  var _events = __webpack_require__(64785);
15219
15218
  var _linebreak = _interopRequireDefault(__webpack_require__(19304));
15220
15219
  var _pngJs = _interopRequireDefault(__webpack_require__(80646));
15221
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15220
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15222
15221
  var fs = __webpack_require__(48181);
15223
15222
  function _classCallCheck(instance, Constructor) {
15224
15223
  if (!(instance instanceof Constructor)) {
@@ -35687,25 +35686,6 @@ for (var COLLECTION_NAME in DOMIterables) {
35687
35686
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
35688
35687
 
35689
35688
 
35690
- /***/ }),
35691
-
35692
- /***/ 41863:
35693
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
35694
-
35695
- "use strict";
35696
-
35697
- var $ = __webpack_require__(56475);
35698
- var call = __webpack_require__(2834);
35699
-
35700
- // `URL.prototype.toJSON` method
35701
- // https://url.spec.whatwg.org/#dom-url-tojson
35702
- $({ target: 'URL', proto: true, enumerable: true }, {
35703
- toJSON: function toJSON() {
35704
- return call(URL.prototype.toString, this);
35705
- }
35706
- });
35707
-
35708
-
35709
35689
  /***/ }),
35710
35690
 
35711
35691
  /***/ 90780:
@@ -47481,6 +47461,12 @@ module.exports = function shimFlags() {
47481
47461
  parser.ns = Object.create(rootNS)
47482
47462
  }
47483
47463
 
47464
+ // disallow unquoted attribute values if not otherwise configured
47465
+ // and strict mode is true
47466
+ if (parser.opt.unquotedAttributeValues === undefined) {
47467
+ parser.opt.unquotedAttributeValues = !strict;
47468
+ }
47469
+
47484
47470
  // mostly just for error reporting
47485
47471
  parser.trackPosition = parser.opt.position !== false
47486
47472
  if (parser.trackPosition) {
@@ -48500,15 +48486,22 @@ module.exports = function shimFlags() {
48500
48486
  continue
48501
48487
 
48502
48488
  case S.SGML_DECL:
48503
- if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
48489
+ if (parser.sgmlDecl + c === '--') {
48490
+ parser.state = S.COMMENT
48491
+ parser.comment = ''
48492
+ parser.sgmlDecl = ''
48493
+ continue;
48494
+ }
48495
+
48496
+ if (parser.doctype && parser.doctype !== true && parser.sgmlDecl) {
48497
+ parser.state = S.DOCTYPE_DTD
48498
+ parser.doctype += '<!' + parser.sgmlDecl + c
48499
+ parser.sgmlDecl = ''
48500
+ } else if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
48504
48501
  emitNode(parser, 'onopencdata')
48505
48502
  parser.state = S.CDATA
48506
48503
  parser.sgmlDecl = ''
48507
48504
  parser.cdata = ''
48508
- } else if (parser.sgmlDecl + c === '--') {
48509
- parser.state = S.COMMENT
48510
- parser.comment = ''
48511
- parser.sgmlDecl = ''
48512
48505
  } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
48513
48506
  parser.state = S.DOCTYPE
48514
48507
  if (parser.doctype || parser.sawRoot) {
@@ -48562,12 +48555,18 @@ module.exports = function shimFlags() {
48562
48555
  continue
48563
48556
 
48564
48557
  case S.DOCTYPE_DTD:
48565
- parser.doctype += c
48566
48558
  if (c === ']') {
48559
+ parser.doctype += c
48567
48560
  parser.state = S.DOCTYPE
48561
+ } else if (c === '<') {
48562
+ parser.state = S.OPEN_WAKA
48563
+ parser.startTagPosition = parser.position
48568
48564
  } else if (isQuote(c)) {
48565
+ parser.doctype += c
48569
48566
  parser.state = S.DOCTYPE_DTD_QUOTED
48570
48567
  parser.q = c
48568
+ } else {
48569
+ parser.doctype += c
48571
48570
  }
48572
48571
  continue
48573
48572
 
@@ -48608,6 +48607,8 @@ module.exports = function shimFlags() {
48608
48607
  // which is a comment of " blah -- bloo "
48609
48608
  parser.comment += '--' + c
48610
48609
  parser.state = S.COMMENT
48610
+ } else if (parser.doctype && parser.doctype !== true) {
48611
+ parser.state = S.DOCTYPE_DTD
48611
48612
  } else {
48612
48613
  parser.state = S.TEXT
48613
48614
  }
@@ -48775,7 +48776,9 @@ module.exports = function shimFlags() {
48775
48776
  parser.q = c
48776
48777
  parser.state = S.ATTRIB_VALUE_QUOTED
48777
48778
  } else {
48778
- strictFail(parser, 'Unquoted attribute value')
48779
+ if (!parser.opt.unquotedAttributeValues) {
48780
+ error(parser, 'Unquoted attribute value')
48781
+ }
48779
48782
  parser.state = S.ATTRIB_VALUE_UNQUOTED
48780
48783
  parser.attribValue = c
48781
48784
  }
@@ -48893,13 +48896,13 @@ module.exports = function shimFlags() {
48893
48896
  }
48894
48897
 
48895
48898
  if (c === ';') {
48896
- if (parser.opt.unparsedEntities) {
48897
- var parsedEntity = parseEntity(parser)
48899
+ var parsedEntity = parseEntity(parser)
48900
+ if (parser.opt.unparsedEntities && !Object.values(sax.XML_ENTITIES).includes(parsedEntity)) {
48898
48901
  parser.entity = ''
48899
48902
  parser.state = returnState
48900
48903
  parser.write(parsedEntity)
48901
48904
  } else {
48902
- parser[buffer] += parseEntity(parser)
48905
+ parser[buffer] += parsedEntity
48903
48906
  parser.entity = ''
48904
48907
  parser.state = returnState
48905
48908
  }
@@ -49000,9 +49003,7 @@ var gOPD = __webpack_require__(68109);
49000
49003
  var $TypeError = __webpack_require__(96785);
49001
49004
  var $floor = GetIntrinsic('%Math.floor%');
49002
49005
 
49003
- /** @typedef {(...args: unknown[]) => unknown} Func */
49004
-
49005
- /** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
49006
+ /** @type {import('.')} */
49006
49007
  module.exports = function setFunctionLength(fn, length) {
49007
49008
  if (typeof fn !== 'function') {
49008
49009
  throw new $TypeError('`fn` is not a function');
@@ -53772,6 +53773,7 @@ var callBind = __webpack_require__(26601);
53772
53773
  var callBound = __webpack_require__(67913);
53773
53774
  var gOPD = __webpack_require__(68109);
53774
53775
 
53776
+ /** @type {(O: object) => string} */
53775
53777
  var $toString = callBound('Object.prototype.toString');
53776
53778
  var hasToStringTag = __webpack_require__(26626)();
53777
53779
 
@@ -53781,7 +53783,8 @@ var typedArrays = availableTypedArrays();
53781
53783
  var $slice = callBound('String.prototype.slice');
53782
53784
  var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
53783
53785
 
53784
- var $indexOf = callBound('Array.prototype.indexOf', true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ function indexOf(array, value) {
53786
+ /** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */
53787
+ var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
53785
53788
  for (var i = 0; i < array.length; i += 1) {
53786
53789
  if (array[i] === value) {
53787
53790
  return i;
@@ -53790,9 +53793,8 @@ var $indexOf = callBound('Array.prototype.indexOf', true) || /** @type {(array:
53790
53793
  return -1;
53791
53794
  };
53792
53795
 
53793
- /** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */
53794
- /** @typedef {'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array'} TypedArrayName */
53795
- /** @type {{ [k in `\$${TypedArrayName}`]?: (receiver: TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call } & { __proto__: null }} */
53796
+ /** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */
53797
+ /** @type {{ [k in `\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */
53796
53798
  var cache = { __proto__: null };
53797
53799
  if (hasToStringTag && gOPD && getPrototypeOf) {
53798
53800
  forEach(typedArrays, function (typedArray) {
@@ -53821,13 +53823,14 @@ if (hasToStringTag && gOPD && getPrototypeOf) {
53821
53823
  });
53822
53824
  }
53823
53825
 
53824
- /** @type {import('.')} */
53826
+ /** @type {(value: object) => false | import('.').TypedArrayName} */
53825
53827
  var tryTypedArrays = function tryAllTypedArrays(value) {
53826
- /** @type {ReturnType<tryAllTypedArrays>} */ var found = false;
53828
+ /** @type {ReturnType<typeof tryAllTypedArrays>} */ var found = false;
53827
53829
  forEach(
53828
53830
  // eslint-disable-next-line no-extra-parens
53829
- /** @type {Record<`\$${TypedArrayName}`, typeof cache>} */ /** @type {any} */ (cache),
53830
- /** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ function (getter, typedArray) {
53831
+ /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),
53832
+ /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
53833
+ function (getter, typedArray) {
53831
53834
  if (!found) {
53832
53835
  try {
53833
53836
  // @ts-expect-error TODO: fix
@@ -53841,16 +53844,16 @@ var tryTypedArrays = function tryAllTypedArrays(value) {
53841
53844
  return found;
53842
53845
  };
53843
53846
 
53844
- /** @type {import('.')} */
53847
+ /** @type {(value: object) => false | import('.').TypedArrayName} */
53845
53848
  var trySlices = function tryAllSlices(value) {
53846
- /** @type {ReturnType<tryAllSlices>} */ var found = false;
53849
+ /** @type {ReturnType<typeof tryAllSlices>} */ var found = false;
53847
53850
  forEach(
53848
53851
  // eslint-disable-next-line no-extra-parens
53849
- /** @type {any} */ (cache),
53850
- /** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ function (getter, name) {
53852
+ /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),
53853
+ /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {
53851
53854
  if (!found) {
53852
53855
  try {
53853
- // @ts-expect-error TODO: fix
53856
+ // @ts-expect-error TODO: fix
53854
53857
  getter(value);
53855
53858
  found = $slice(name, 1);
53856
53859
  } catch (e) { /**/ }
@@ -53864,6 +53867,7 @@ var trySlices = function tryAllSlices(value) {
53864
53867
  module.exports = function whichTypedArray(value) {
53865
53868
  if (!value || typeof value !== 'object') { return false; }
53866
53869
  if (!hasToStringTag) {
53870
+ /** @type {string} */
53867
53871
  var tag = $slice($toString(value), 8, -1);
53868
53872
  if ($indexOf(typedArrays, tag) > -1) {
53869
53873
  return tag;
@@ -54425,7 +54429,7 @@ module.exports = URLBrowserResolver;
54425
54429
  var isFunction = (__webpack_require__(91867).isFunction);
54426
54430
  var isUndefined = (__webpack_require__(91867).isUndefined);
54427
54431
  var isNull = (__webpack_require__(91867).isNull);
54428
- var FileSaver = __webpack_require__(44134);
54432
+ var FileSaver = __webpack_require__(42616);
54429
54433
  var saveAs = FileSaver.saveAs;
54430
54434
 
54431
54435
  var defaultClientFonts = {
@@ -54826,7 +54830,7 @@ module.exports = new VirtualFileSystem();
54826
54830
 
54827
54831
  var isString = (__webpack_require__(91867).isString);
54828
54832
 
54829
- function buildColumnWidths(columns, availableWidth) {
54833
+ function buildColumnWidths(columns, availableWidth, offsetTotal = 0, tableNode) {
54830
54834
  var autoColumns = [],
54831
54835
  autoMin = 0, autoMax = 0,
54832
54836
  starColumns = [],
@@ -54849,10 +54853,31 @@ function buildColumnWidths(columns, availableWidth) {
54849
54853
  }
54850
54854
  });
54851
54855
 
54852
- fixedColumns.forEach(function (col) {
54856
+ fixedColumns.forEach(function (col, colIndex) {
54853
54857
  // width specified as %
54854
54858
  if (isString(col.width) && /\d+%/.test(col.width)) {
54855
- col.width = parseFloat(col.width) * initial_availableWidth / 100;
54859
+ // In tables we have to take into consideration the reserved width for paddings and borders
54860
+ var reservedWidth = 0;
54861
+ if (tableNode) {
54862
+ var paddingLeft = tableNode._layout.paddingLeft(colIndex, tableNode);
54863
+ var paddingRight = tableNode._layout.paddingRight(colIndex, tableNode);
54864
+ var borderLeft = tableNode._layout.vLineWidth(colIndex, tableNode);
54865
+ var borderRight = tableNode._layout.vLineWidth(colIndex + 1, tableNode);
54866
+ if (colIndex === 0) {
54867
+ // first column assumes whole borderLeft and half of border right
54868
+ reservedWidth = paddingLeft + paddingRight + borderLeft + (borderRight / 2);
54869
+
54870
+ } else if (colIndex === fixedColumns.length - 1) {
54871
+ // last column assumes whole borderRight and half of border left
54872
+ reservedWidth = paddingLeft + paddingRight + (borderLeft / 2) + borderRight;
54873
+
54874
+ } else {
54875
+ // Columns in the middle assume half of each border
54876
+ reservedWidth = paddingLeft + paddingRight + (borderLeft / 2) + (borderRight / 2);
54877
+ }
54878
+ }
54879
+ var totalAvailableWidth = initial_availableWidth + offsetTotal;
54880
+ col.width = (parseFloat(col.width) * totalAvailableWidth / 100) - reservedWidth;
54856
54881
  }
54857
54882
  if (col.width < (col._minWidth) && col.elasticWidth) {
54858
54883
  col._calcWidth = col._minWidth;
@@ -55477,16 +55502,16 @@ DocMeasure.prototype.measureOrderedList = function (node) {
55477
55502
  if (item.listMarker._inlines) {
55478
55503
  node._gapSize.width = Math.max(node._gapSize.width, item.listMarker._inlines[0].width);
55479
55504
  }
55480
- } // TODO: else - nested lists numbering
55505
+
55506
+ if (node.reversed) {
55507
+ counter--;
55508
+ } else {
55509
+ counter++;
55510
+ }
55511
+ }
55481
55512
 
55482
55513
  node._minWidth = Math.max(node._minWidth, items[i]._minWidth);
55483
55514
  node._maxWidth = Math.max(node._maxWidth, items[i]._maxWidth);
55484
-
55485
- if (node.reversed) {
55486
- counter--;
55487
- } else {
55488
- counter++;
55489
- }
55490
55515
  }
55491
55516
 
55492
55517
  node._minWidth += node._gapSize.width;
@@ -56069,8 +56094,6 @@ function DocumentContext(pageSize, pageMargins) {
56069
56094
 
56070
56095
  this.snapshots = [];
56071
56096
 
56072
- this.endingCell = null;
56073
-
56074
56097
  this.tracker = new TraversalTracker();
56075
56098
 
56076
56099
  this.backgroundLength = [];
@@ -56092,7 +56115,6 @@ DocumentContext.prototype.beginColumnGroup = function () {
56092
56115
  availableWidth: this.availableWidth,
56093
56116
  page: this.page
56094
56117
  },
56095
- endingCell: this.endingCell,
56096
56118
  lastColumnWidth: this.lastColumnWidth
56097
56119
  });
56098
56120
 
@@ -56102,9 +56124,8 @@ DocumentContext.prototype.beginColumnGroup = function () {
56102
56124
  DocumentContext.prototype.beginColumn = function (width, offset, endingCell) {
56103
56125
  var saved = this.snapshots[this.snapshots.length - 1];
56104
56126
 
56105
- this.calculateBottomMost(saved);
56127
+ this.calculateBottomMost(saved, endingCell);
56106
56128
 
56107
- this.endingCell = endingCell;
56108
56129
  this.page = saved.page;
56109
56130
  this.x = this.x + this.lastColumnWidth + (offset || 0);
56110
56131
  this.y = saved.y;
@@ -56114,10 +56135,9 @@ DocumentContext.prototype.beginColumn = function (width, offset, endingCell) {
56114
56135
  this.lastColumnWidth = width;
56115
56136
  };
56116
56137
 
56117
- DocumentContext.prototype.calculateBottomMost = function (destContext) {
56118
- if (this.endingCell) {
56119
- this.saveContextInEndingCell(this.endingCell);
56120
- this.endingCell = null;
56138
+ DocumentContext.prototype.calculateBottomMost = function (destContext, endingCell) {
56139
+ if (endingCell) {
56140
+ this.saveContextInEndingCell(endingCell);
56121
56141
  } else {
56122
56142
  destContext.bottomMost = bottomMostContext(this, destContext.bottomMost);
56123
56143
  }
@@ -56143,12 +56163,11 @@ DocumentContext.prototype.saveContextInEndingCell = function (endingCell) {
56143
56163
  };
56144
56164
  };
56145
56165
 
56146
- DocumentContext.prototype.completeColumnGroup = function (height) {
56166
+ DocumentContext.prototype.completeColumnGroup = function (height, endingCell) {
56147
56167
  var saved = this.snapshots.pop();
56148
56168
 
56149
- this.calculateBottomMost(saved);
56169
+ this.calculateBottomMost(saved, endingCell);
56150
56170
 
56151
- this.endingCell = null;
56152
56171
  this.x = saved.x;
56153
56172
 
56154
56173
  var y = saved.bottomMost.y;
@@ -56225,7 +56244,6 @@ DocumentContext.prototype.beginDetachedBlock = function () {
56225
56244
  availableHeight: this.availableHeight,
56226
56245
  availableWidth: this.availableWidth,
56227
56246
  page: this.page,
56228
- endingCell: this.endingCell,
56229
56247
  lastColumnWidth: this.lastColumnWidth
56230
56248
  });
56231
56249
  };
@@ -56238,7 +56256,6 @@ DocumentContext.prototype.endDetachedBlock = function () {
56238
56256
  this.availableWidth = saved.availableWidth;
56239
56257
  this.availableHeight = saved.availableHeight;
56240
56258
  this.page = saved.page;
56241
- this.endingCell = saved.endingCell;
56242
56259
  this.lastColumnWidth = saved.lastColumnWidth;
56243
56260
  };
56244
56261
 
@@ -56810,6 +56827,17 @@ function isUndefined(variable) {
56810
56827
  return variable === undefined;
56811
56828
  }
56812
56829
 
56830
+ /**
56831
+ * @param {any} variable
56832
+ * @returns {boolean}
56833
+ */
56834
+ function isPositiveInteger(variable) {
56835
+ if (!isNumber(variable) || !Number.isInteger(variable) || variable <= 0) {
56836
+ return false;
56837
+ }
56838
+ return true;
56839
+ }
56840
+
56813
56841
  function pack() {
56814
56842
  var result = {};
56815
56843
 
@@ -56895,6 +56923,7 @@ module.exports = {
56895
56923
  isObject: isObject,
56896
56924
  isNull: isNull,
56897
56925
  isUndefined: isUndefined,
56926
+ isPositiveInteger: isPositiveInteger,
56898
56927
  pack: pack,
56899
56928
  fontStringify: fontStringify,
56900
56929
  offsetVector: offsetVector,
@@ -56911,57 +56940,61 @@ module.exports = {
56911
56940
 
56912
56941
  "use strict";
56913
56942
  /* provided dependency */ var Buffer = __webpack_require__(50621)["Buffer"];
56914
-
56915
-
56916
- var fs = __webpack_require__(48181);
56917
-
56918
- function ImageMeasure(pdfKitDoc, imageDictionary) {
56919
- this.pdfKitDoc = pdfKitDoc;
56920
- this.imageDictionary = imageDictionary || {};
56921
- }
56922
-
56923
- ImageMeasure.prototype.measureImage = function (src) {
56924
- var image;
56925
- var that = this;
56926
-
56927
- if (!this.pdfKitDoc._imageRegistry[src]) {
56928
- try {
56929
- image = this.pdfKitDoc.openImage(realImageSrc(src));
56930
- if (!image) {
56931
- throw 'No image';
56932
- }
56933
- } catch (error) {
56934
- throw 'Invalid image: ' + error.toString() + '\nImages dictionary should contain dataURL entries (or local file paths in node.js)';
56935
- }
56936
- image.embed(this.pdfKitDoc);
56937
- this.pdfKitDoc._imageRegistry[src] = image;
56938
- } else {
56939
- image = this.pdfKitDoc._imageRegistry[src];
56940
- }
56941
-
56942
- return { width: image.width, height: image.height };
56943
-
56944
- function realImageSrc(src) {
56945
- var img = that.imageDictionary[src];
56946
-
56947
- if (!img) {
56948
- return src;
56949
- }
56950
-
56951
- if (fs.existsSync(img)) {
56952
- return fs.readFileSync(img);
56953
- }
56954
-
56955
- var index = img.indexOf('base64,');
56956
- if (index < 0) {
56957
- return that.imageDictionary[src];
56958
- }
56959
-
56960
- return Buffer.from(img.substring(index + 7), 'base64');
56961
- }
56962
- };
56963
-
56964
- module.exports = ImageMeasure;
56943
+
56944
+
56945
+ var fs = __webpack_require__(48181);
56946
+
56947
+ function ImageMeasure(pdfKitDoc, imageDictionary) {
56948
+ this.pdfKitDoc = pdfKitDoc;
56949
+ this.imageDictionary = imageDictionary || {};
56950
+ }
56951
+
56952
+ ImageMeasure.prototype.measureImage = function (src) {
56953
+ var image;
56954
+ var that = this;
56955
+
56956
+ if (!this.pdfKitDoc._imageRegistry[src]) {
56957
+ try {
56958
+ image = this.pdfKitDoc.openImage(realImageSrc(src));
56959
+ if (!image) {
56960
+ throw 'No image';
56961
+ }
56962
+ } catch (error) {
56963
+ throw 'Invalid image: ' + error.toString() + '\nImages dictionary should contain dataURL entries (or local file paths in node.js)';
56964
+ }
56965
+ image.embed(this.pdfKitDoc);
56966
+ this.pdfKitDoc._imageRegistry[src] = image;
56967
+ } else {
56968
+ image = this.pdfKitDoc._imageRegistry[src];
56969
+ }
56970
+
56971
+ return { width: image.width, height: image.height };
56972
+
56973
+ function realImageSrc(src) {
56974
+ var img = that.imageDictionary[src];
56975
+
56976
+ if (!img) {
56977
+ return src;
56978
+ }
56979
+
56980
+ if (typeof img === 'object') {
56981
+ throw 'Not supported image definition: ' + JSON.stringify(img);
56982
+ }
56983
+
56984
+ if (fs.existsSync(img)) {
56985
+ return fs.readFileSync(img);
56986
+ }
56987
+
56988
+ var index = img.indexOf('base64,');
56989
+ if (index < 0) {
56990
+ return that.imageDictionary[src];
56991
+ }
56992
+
56993
+ return Buffer.from(img.substring(index + 7), 'base64');
56994
+ }
56995
+ };
56996
+
56997
+ module.exports = ImageMeasure;
56965
56998
 
56966
56999
 
56967
57000
  /***/ }),
@@ -57483,6 +57516,21 @@ LayoutBuilder.prototype.processColumns = function (columnNode) {
57483
57516
  }
57484
57517
  };
57485
57518
 
57519
+ LayoutBuilder.prototype.findStartingSpanCell = function (arr, i) {
57520
+ let requiredColspan = 1;
57521
+ for (let index = i - 1; index >= 0; index--) {
57522
+ if (!arr[index]._span) {
57523
+ if (arr[index].rowSpan > 1 && (arr[index].colSpan || 1) === requiredColspan) {
57524
+ return arr[index];
57525
+ } else {
57526
+ return null;
57527
+ }
57528
+ }
57529
+ requiredColspan++;
57530
+ }
57531
+ return null;
57532
+ }
57533
+
57486
57534
  LayoutBuilder.prototype.processRow = function (columns, widths, gaps, tableBody, tableRow, height) {
57487
57535
  var self = this;
57488
57536
  var pageBreaks = [], positions = [];
@@ -57503,17 +57551,52 @@ LayoutBuilder.prototype.processRow = function (columns, widths, gaps, tableBody,
57503
57551
  }
57504
57552
  }
57505
57553
 
57506
- self.writer.context().beginColumn(width, leftOffset, getEndingCell(column, i));
57554
+ // if rowspan starts in this cell, we retrieve the last cell affected by the rowspan
57555
+ var endingCell = getEndingCell(column, i);
57556
+ if (endingCell) {
57557
+ // We store a reference of the ending cell in the first cell of the rowspan
57558
+ column._endingCell = endingCell;
57559
+ }
57560
+
57561
+ // Check if exists and retrieve the cell that started the rowspan in case we are in the cell just after
57562
+ var startingSpanCell = self.findStartingSpanCell(columns, i);
57563
+ var endingSpanCell = null;
57564
+ if (startingSpanCell && startingSpanCell._endingCell) {
57565
+ // Reference to the last cell of the rowspan
57566
+ endingSpanCell = startingSpanCell._endingCell;
57567
+ }
57568
+
57569
+ // We pass the endingSpanCell reference to store the context just after processing rowspan cell
57570
+ self.writer.context().beginColumn(width, leftOffset, endingSpanCell);
57507
57571
  if (!column._span) {
57508
57572
  self.processNode(column);
57509
57573
  addAll(positions, column.positions);
57510
57574
  } else if (column._columnEndingContext) {
57511
57575
  // row-span ending
57576
+ // Recover the context after processing the rowspanned cell
57512
57577
  self.writer.context().markEnding(column);
57513
57578
  }
57514
57579
  }
57515
57580
 
57516
- self.writer.context().completeColumnGroup(height);
57581
+ // Check if last cell is part of a span
57582
+ var endingSpanCell = null;
57583
+ var lastColumn = columns.length > 0 ? columns[columns.length - 1] : null;
57584
+ if (lastColumn) {
57585
+ // Previous column cell has a rowspan
57586
+ if (lastColumn._endingCell) {
57587
+ endingSpanCell = lastColumn._endingCell;
57588
+ // Previous column cell is part of a span
57589
+ } else if (lastColumn._span === true) {
57590
+ // We get the cell that started the span where we set a reference to the ending cell
57591
+ var startingSpanCell = self.findStartingSpanCell(columns, columns.length);
57592
+ if (startingSpanCell) {
57593
+ // Context will be stored here (ending cell)
57594
+ endingSpanCell = startingSpanCell._endingCell;
57595
+ }
57596
+ }
57597
+ }
57598
+
57599
+ self.writer.context().completeColumnGroup(height, endingSpanCell);
57517
57600
  });
57518
57601
 
57519
57602
  return { pageBreaks: pageBreaks, positions: positions };
@@ -58072,7 +58155,7 @@ function _interopDefault(ex) {
58072
58155
  return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex;
58073
58156
  }
58074
58157
 
58075
- var PdfKit = _interopDefault(__webpack_require__(48585));
58158
+ var PdfKit = _interopDefault(__webpack_require__(82759));
58076
58159
 
58077
58160
  function getEngineInstance() {
58078
58161
  return PdfKit;
@@ -59759,50 +59842,9 @@ StyleContextStack.prototype.autopush = function (item) {
59759
59842
  this.push(styleNames[i]);
59760
59843
  }
59761
59844
 
59762
- var styleProperties = [
59763
- 'font',
59764
- 'fontSize',
59765
- 'fontFeatures',
59766
- 'bold',
59767
- 'italics',
59768
- 'alignment',
59769
- 'color',
59770
- 'columnGap',
59771
- 'fillColor',
59772
- 'fillOpacity',
59773
- 'decoration',
59774
- 'decorationStyle',
59775
- 'decorationColor',
59776
- 'background',
59777
- 'lineHeight',
59778
- 'characterSpacing',
59779
- 'noWrap',
59780
- 'markerColor',
59781
- 'leadingIndent',
59782
- 'sup',
59783
- 'sub'
59784
- //'tableCellPadding'
59785
- // 'cellBorder',
59786
- // 'headerCellBorder',
59787
- // 'oddRowCellBorder',
59788
- // 'evenRowCellBorder',
59789
- // 'tableBorder'
59790
- ];
59791
- var styleOverrideObject = {};
59792
- var pushStyleOverrideObject = false;
59793
-
59794
- styleProperties.forEach(function (key) {
59795
- if (!isUndefined(item[key]) && !isNull(item[key])) {
59796
- styleOverrideObject[key] = item[key];
59797
- pushStyleOverrideObject = true;
59798
- }
59799
- });
59800
-
59801
- if (pushStyleOverrideObject) {
59802
- this.push(styleOverrideObject);
59803
- }
59804
-
59805
- return styleNames.length + (pushStyleOverrideObject ? 1 : 0);
59845
+ // rather than spend significant time making a styleOverrideObject, just add item
59846
+ this.push(item);
59847
+ return styleNames.length + 1;
59806
59848
  };
59807
59849
 
59808
59850
  /**
@@ -59943,6 +59985,7 @@ module.exports = SVGMeasure;
59943
59985
  var ColumnCalculator = __webpack_require__(77530);
59944
59986
  var isFunction = (__webpack_require__(91867).isFunction);
59945
59987
  var isNumber = (__webpack_require__(91867).isNumber);
59988
+ var isPositiveInteger = (__webpack_require__(91867).isPositiveInteger);
59946
59989
 
59947
59990
  function TableProcessor(tableNode) {
59948
59991
  this.tableNode = tableNode;
@@ -59958,18 +60001,34 @@ TableProcessor.prototype.beginTable = function (writer) {
59958
60001
  this.layout = tableNode._layout;
59959
60002
 
59960
60003
  availableWidth = writer.context().availableWidth - this.offsets.total;
59961
- ColumnCalculator.buildColumnWidths(tableNode.table.widths, availableWidth);
60004
+ ColumnCalculator.buildColumnWidths(tableNode.table.widths, availableWidth, this.offsets.total, tableNode);
59962
60005
 
59963
60006
  this.tableWidth = tableNode._offsets.total + getTableInnerContentWidth();
59964
60007
  this.rowSpanData = prepareRowSpanData();
59965
60008
  this.cleanUpRepeatables = false;
59966
60009
 
59967
- this.headerRows = tableNode.table.headerRows || 0;
59968
- if (this.headerRows > tableNode.table.body.length) {
59969
- throw new Error(`Too few rows in the table. Property headerRows requires at least ${this.headerRows}, contains only ${tableNode.table.body.length}`);
60010
+ // headersRows and rowsWithoutPageBreak (headerRows + keepWithHeaderRows)
60011
+ this.headerRows = 0;
60012
+ this.rowsWithoutPageBreak = 0;
60013
+
60014
+ var headerRows = tableNode.table.headerRows;
60015
+
60016
+ if (isPositiveInteger(headerRows)) {
60017
+ this.headerRows = headerRows;
60018
+
60019
+ if (this.headerRows > tableNode.table.body.length) {
60020
+ throw new Error(`Too few rows in the table. Property headerRows requires at least ${this.headerRows}, contains only ${tableNode.table.body.length}`);
60021
+ }
60022
+
60023
+ this.rowsWithoutPageBreak = this.headerRows;
60024
+
60025
+ const keepWithHeaderRows = tableNode.table.keepWithHeaderRows;
60026
+
60027
+ if (isPositiveInteger(keepWithHeaderRows)) {
60028
+ this.rowsWithoutPageBreak += keepWithHeaderRows;
60029
+ }
59970
60030
  }
59971
60031
 
59972
- this.rowsWithoutPageBreak = this.headerRows + (tableNode.table.keepWithHeaderRows || 0);
59973
60032
  this.dontBreakRows = tableNode.table.dontBreakRows || false;
59974
60033
 
59975
60034
  if (this.rowsWithoutPageBreak) {
@@ -61108,7 +61167,7 @@ module.exports = TraversalTracker;
61108
61167
 
61109
61168
  /***/ }),
61110
61169
 
61111
- /***/ 44134:
61170
+ /***/ 42616:
61112
61171
  /***/ (function(module, exports, __webpack_require__) {
61113
61172
 
61114
61173
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(a,b){if(true)!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (b),
@@ -61141,6 +61200,7 @@ __webpack_require__(80055);
61141
61200
  __webpack_require__(20731);
61142
61201
  __webpack_require__(45337);
61143
61202
  __webpack_require__(23913);
61203
+ __webpack_require__(10720);
61144
61204
  __webpack_require__(24863);
61145
61205
  __webpack_require__(18828);
61146
61206
  __webpack_require__(7283);
@@ -61188,15 +61248,15 @@ __webpack_require__(52529);
61188
61248
  __webpack_require__(42437);
61189
61249
  __webpack_require__(94712);
61190
61250
  var _;
61191
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
61192
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
61193
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
61251
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
61252
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
61253
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
61194
61254
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
61195
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
61196
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
61197
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
61198
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
61199
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
61255
+ function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
61256
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
61257
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
61258
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
61259
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
61200
61260
  function _interopDefault(ex) {
61201
61261
  return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;
61202
61262
  }
@@ -62626,7 +62686,6 @@ var CFFDict = /*#__PURE__*/function () {
62626
62686
  return CFFDict;
62627
62687
  }();
62628
62688
  var CFFPointer = /*#__PURE__*/function (_r$Pointer) {
62629
- _inheritsLoose(CFFPointer, _r$Pointer);
62630
62689
  function CFFPointer(type, options) {
62631
62690
  if (options === void 0) {
62632
62691
  options = {};
@@ -62636,6 +62695,7 @@ var CFFPointer = /*#__PURE__*/function (_r$Pointer) {
62636
62695
  }
62637
62696
  return _r$Pointer.call(this, null, type, options) || this;
62638
62697
  }
62698
+ _inheritsLoose(CFFPointer, _r$Pointer);
62639
62699
  var _proto3 = CFFPointer.prototype;
62640
62700
  _proto3.decode = function decode(stream, parent, operands) {
62641
62701
  this.offsetType = {
@@ -63008,10 +63068,10 @@ var PredefinedOp = /*#__PURE__*/function () {
63008
63068
  return PredefinedOp;
63009
63069
  }();
63010
63070
  var CFFEncodingVersion = /*#__PURE__*/function (_r$Number) {
63011
- _inheritsLoose(CFFEncodingVersion, _r$Number);
63012
63071
  function CFFEncodingVersion() {
63013
63072
  return _r$Number.call(this, 'UInt8') || this;
63014
63073
  }
63074
+ _inheritsLoose(CFFEncodingVersion, _r$Number);
63015
63075
  var _proto6 = CFFEncodingVersion.prototype;
63016
63076
  _proto6.decode = function decode(stream) {
63017
63077
  return r.uint8.decode(stream) & 0x7f;
@@ -63041,10 +63101,10 @@ var CFFEncoding = new PredefinedOp([StandardEncoding, ExpertEncoding], new CFFPo
63041
63101
  })); // Decodes an array of ranges until the total
63042
63102
  // length is equal to the provided length.
63043
63103
  var RangeArray = /*#__PURE__*/function (_r$Array) {
63044
- _inheritsLoose(RangeArray, _r$Array);
63045
63104
  function RangeArray() {
63046
63105
  return _r$Array.apply(this, arguments) || this;
63047
63106
  }
63107
+ _inheritsLoose(RangeArray, _r$Array);
63048
63108
  var _proto7 = RangeArray.prototype;
63049
63109
  _proto7.decode = function decode(stream, parent) {
63050
63110
  var length = utils.resolveLength(this.length, stream, parent);
@@ -63259,7 +63319,7 @@ var CFFFont = /*#__PURE__*/function () {
63259
63319
  }
63260
63320
  return this.topDict.FDArray[0].Private;
63261
63321
  };
63262
- _createClass(CFFFont, [{
63322
+ return _createClass(CFFFont, [{
63263
63323
  key: "postscriptName",
63264
63324
  get: function get() {
63265
63325
  if (this.version < 2) {
@@ -63278,7 +63338,6 @@ var CFFFont = /*#__PURE__*/function () {
63278
63338
  return this.string(this.topDict.FamilyName);
63279
63339
  }
63280
63340
  }]);
63281
- return CFFFont;
63282
63341
  }();
63283
63342
  var VerticalOrigin = new r.Struct({
63284
63343
  glyphIndex: r.uint16,
@@ -64327,10 +64386,10 @@ var UnboundedArrayAccessor = /*#__PURE__*/function () {
64327
64386
  return UnboundedArrayAccessor;
64328
64387
  }();
64329
64388
  var UnboundedArray = /*#__PURE__*/function (_r$Array2) {
64330
- _inheritsLoose(UnboundedArray, _r$Array2);
64331
64389
  function UnboundedArray(type) {
64332
64390
  return _r$Array2.call(this, type, 0) || this;
64333
64391
  }
64392
+ _inheritsLoose(UnboundedArray, _r$Array2);
64334
64393
  var _proto13 = UnboundedArray.prototype;
64335
64394
  _proto13.decode = function decode(stream, parent) {
64336
64395
  return new UnboundedArrayAccessor(this.type, stream, parent);
@@ -65520,7 +65579,7 @@ var BBox = /*#__PURE__*/function () {
65520
65579
  _proto18.copy = function copy() {
65521
65580
  return new BBox(this.minX, this.minY, this.maxX, this.maxY);
65522
65581
  };
65523
- _createClass(BBox, [{
65582
+ return _createClass(BBox, [{
65524
65583
  key: "width",
65525
65584
  get: function get() {
65526
65585
  return this.maxX - this.minX;
@@ -65535,7 +65594,6 @@ var BBox = /*#__PURE__*/function () {
65535
65594
  return this.maxY - this.minY;
65536
65595
  }
65537
65596
  }]);
65538
- return BBox;
65539
65597
  }(); // Data from http://www.microsoft.com/typography/otspec/scripttags.htm
65540
65598
  // and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.
65541
65599
  var UNICODE_SCRIPTS = {
@@ -65831,7 +65889,7 @@ var GlyphRun = /*#__PURE__*/function () {
65831
65889
  * The total advance width of the run.
65832
65890
  * @type {number}
65833
65891
  */
65834
- _createClass(GlyphRun, [{
65892
+ return _createClass(GlyphRun, [{
65835
65893
  key: "advanceWidth",
65836
65894
  get: function get() {
65837
65895
  var width = 0;
@@ -65877,7 +65935,6 @@ var GlyphRun = /*#__PURE__*/function () {
65877
65935
  return bbox;
65878
65936
  }
65879
65937
  }]);
65880
- return GlyphRun;
65881
65938
  }();
65882
65939
  /**
65883
65940
  * Represents positioning information for a glyph in a GlyphRun.
@@ -67310,10 +67367,10 @@ var STATE_TABLE = [
67310
67367
  * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc
67311
67368
  */
67312
67369
  var ArabicShaper = /*#__PURE__*/function (_DefaultShaper) {
67313
- _inheritsLoose(ArabicShaper, _DefaultShaper);
67314
67370
  function ArabicShaper() {
67315
67371
  return _DefaultShaper.apply(this, arguments) || this;
67316
67372
  }
67373
+ _inheritsLoose(ArabicShaper, _DefaultShaper);
67317
67374
  ArabicShaper.planFeatures = function planFeatures(plan) {
67318
67375
  plan.add(['ccmp', 'locl']);
67319
67376
  for (var i = 0; i < FEATURES.length; i++) {
@@ -67436,13 +67493,12 @@ var GlyphIterator = /*#__PURE__*/function () {
67436
67493
  }
67437
67494
  return this.glyphs[this.index];
67438
67495
  };
67439
- _createClass(GlyphIterator, [{
67496
+ return _createClass(GlyphIterator, [{
67440
67497
  key: "cur",
67441
67498
  get: function get() {
67442
67499
  return this.glyphs[this.index] || null;
67443
67500
  }
67444
67501
  }]);
67445
- return GlyphIterator;
67446
67502
  }();
67447
67503
  var DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];
67448
67504
  var OTProcessor = /*#__PURE__*/function () {
@@ -67847,7 +67903,7 @@ var GlyphInfo = /*#__PURE__*/function () {
67847
67903
  _proto26.copy = function copy() {
67848
67904
  return new GlyphInfo(this._font, this.id, this.codePoints, this.features);
67849
67905
  };
67850
- _createClass(GlyphInfo, [{
67906
+ return _createClass(GlyphInfo, [{
67851
67907
  key: "id",
67852
67908
  get: function get() {
67853
67909
  return this._id;
@@ -67871,7 +67927,6 @@ var GlyphInfo = /*#__PURE__*/function () {
67871
67927
  }
67872
67928
  }
67873
67929
  }]);
67874
- return GlyphInfo;
67875
67930
  }();
67876
67931
  /**
67877
67932
  * This is a shaper for the Hangul script, used by the Korean language.
@@ -67896,10 +67951,10 @@ var GlyphInfo = /*#__PURE__*/function () {
67896
67951
  * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf
67897
67952
  */
67898
67953
  var HangulShaper = /*#__PURE__*/function (_DefaultShaper2) {
67899
- _inheritsLoose(HangulShaper, _DefaultShaper2);
67900
67954
  function HangulShaper() {
67901
67955
  return _DefaultShaper2.apply(this, arguments) || this;
67902
67956
  }
67957
+ _inheritsLoose(HangulShaper, _DefaultShaper2);
67903
67958
  HangulShaper.planFeatures = function planFeatures(plan) {
67904
67959
  plan.add(['ljmo', 'vjmo', 'tjmo'], false);
67905
67960
  };
@@ -68394,10 +68449,10 @@ var stateMachine = new StateMachine(indicMachine);
68394
68449
  * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc
68395
68450
  */
68396
68451
  var IndicShaper = /*#__PURE__*/function (_DefaultShaper3) {
68397
- _inheritsLoose(IndicShaper, _DefaultShaper3);
68398
68452
  function IndicShaper() {
68399
68453
  return _DefaultShaper3.apply(this, arguments) || this;
68400
68454
  }
68455
+ _inheritsLoose(IndicShaper, _DefaultShaper3);
68401
68456
  IndicShaper.planFeatures = function planFeatures(plan) {
68402
68457
  plan.addStage(setupSyllables);
68403
68458
  plan.addStage(['locl', 'ccmp']);
@@ -69173,10 +69228,10 @@ var stateMachine$1 = new StateMachine(useData);
69173
69228
  * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.
69174
69229
  */
69175
69230
  var UniversalShaper = /*#__PURE__*/function (_DefaultShaper4) {
69176
- _inheritsLoose(UniversalShaper, _DefaultShaper4);
69177
69231
  function UniversalShaper() {
69178
69232
  return _DefaultShaper4.apply(this, arguments) || this;
69179
69233
  }
69234
+ _inheritsLoose(UniversalShaper, _DefaultShaper4);
69180
69235
  UniversalShaper.planFeatures = function planFeatures(plan) {
69181
69236
  plan.addStage(setupSyllables$1); // Default glyph pre-processing group
69182
69237
 
@@ -69489,10 +69544,10 @@ function choose(script) {
69489
69544
  return DefaultShaper;
69490
69545
  }
69491
69546
  var GSUBProcessor = /*#__PURE__*/function (_OTProcessor) {
69492
- _inheritsLoose(GSUBProcessor, _OTProcessor);
69493
69547
  function GSUBProcessor() {
69494
69548
  return _OTProcessor.apply(this, arguments) || this;
69495
69549
  }
69550
+ _inheritsLoose(GSUBProcessor, _OTProcessor);
69496
69551
  var _proto27 = GSUBProcessor.prototype;
69497
69552
  _proto27.applyLookup = function applyLookup(lookupType, table) {
69498
69553
  var _this7 = this;
@@ -69673,10 +69728,10 @@ var GSUBProcessor = /*#__PURE__*/function (_OTProcessor) {
69673
69728
  return GSUBProcessor;
69674
69729
  }(OTProcessor);
69675
69730
  var GPOSProcessor = /*#__PURE__*/function (_OTProcessor2) {
69676
- _inheritsLoose(GPOSProcessor, _OTProcessor2);
69677
69731
  function GPOSProcessor() {
69678
69732
  return _OTProcessor2.apply(this, arguments) || this;
69679
69733
  }
69734
+ _inheritsLoose(GPOSProcessor, _OTProcessor2);
69680
69735
  var _proto28 = GPOSProcessor.prototype;
69681
69736
  _proto28.applyPositionValue = function applyPositionValue(sequenceIndex, value) {
69682
69737
  var position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];
@@ -70351,7 +70406,7 @@ var Path = /*#__PURE__*/function () {
70351
70406
  }
70352
70407
  return this.transform(scaleX, 0, 0, scaleY, 0, 0);
70353
70408
  };
70354
- _createClass(Path, [{
70409
+ return _createClass(Path, [{
70355
70410
  key: "cbox",
70356
70411
  get: function get() {
70357
70412
  if (!this._cbox) {
@@ -70472,7 +70527,6 @@ var Path = /*#__PURE__*/function () {
70472
70527
  return this._bbox = Object.freeze(bbox);
70473
70528
  }
70474
70529
  }]);
70475
- return Path;
70476
70530
  }();
70477
70531
  var _loop = function _loop(command) {
70478
70532
  Path.prototype[command] = function () {
@@ -70641,7 +70695,7 @@ var Glyph = (_class$3 = /*#__PURE__*/function () {
70641
70695
  ctx.fill();
70642
70696
  ctx.restore();
70643
70697
  };
70644
- _createClass(Glyph, [{
70698
+ return _createClass(Glyph, [{
70645
70699
  key: "cbox",
70646
70700
  get: function get() {
70647
70701
  return this._getCBox();
@@ -70690,7 +70744,6 @@ var Glyph = (_class$3 = /*#__PURE__*/function () {
70690
70744
  return this._getName();
70691
70745
  }
70692
70746
  }]);
70693
- return Glyph;
70694
70747
  }(), (_applyDecoratedDescriptor(_class$3.prototype, "cbox", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "cbox"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "bbox", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "bbox"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "path", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "path"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "advanceWidth", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "advanceWidth"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "advanceHeight", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "advanceHeight"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "name", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "name"), _class$3.prototype)), _class$3);
70695
70748
  var GlyfHeader = new r.Struct({
70696
70749
  numberOfContours: r.int16,
@@ -70745,10 +70798,10 @@ var Component = function Component(glyphID, dx, dy) {
70745
70798
  * Represents a TrueType glyph.
70746
70799
  */
70747
70800
  var TTFGlyph = /*#__PURE__*/function (_Glyph) {
70748
- _inheritsLoose(TTFGlyph, _Glyph);
70749
70801
  function TTFGlyph() {
70750
70802
  return _Glyph.apply(this, arguments) || this;
70751
70803
  }
70804
+ _inheritsLoose(TTFGlyph, _Glyph);
70752
70805
  var _proto34 = TTFGlyph.prototype;
70753
70806
  // Parses just the glyph header and returns the bounding box
70754
70807
  _proto34._getCBox = function _getCBox(internal) {
@@ -71021,10 +71074,10 @@ var TTFGlyph = /*#__PURE__*/function (_Glyph) {
71021
71074
  * Represents an OpenType PostScript glyph, in the Compact Font Format.
71022
71075
  */
71023
71076
  var CFFGlyph = /*#__PURE__*/function (_Glyph2) {
71024
- _inheritsLoose(CFFGlyph, _Glyph2);
71025
71077
  function CFFGlyph() {
71026
71078
  return _Glyph2.apply(this, arguments) || this;
71027
71079
  }
71080
+ _inheritsLoose(CFFGlyph, _Glyph2);
71028
71081
  var _proto35 = CFFGlyph.prototype;
71029
71082
  _proto35._getName = function _getName() {
71030
71083
  if (this._font.CFF2) {
@@ -71086,7 +71139,7 @@ var CFFGlyph = /*#__PURE__*/function (_Glyph2) {
71086
71139
  path.moveTo(x, y);
71087
71140
  open = true;
71088
71141
  }
71089
- var parse = function parse() {
71142
+ var _parse = function parse() {
71090
71143
  while (stream.pos < end) {
71091
71144
  var op = stream.readUInt8();
71092
71145
  if (op < 32) {
@@ -71154,7 +71207,7 @@ var CFFGlyph = /*#__PURE__*/function (_Glyph2) {
71154
71207
  var e = end;
71155
71208
  stream.pos = subr.offset;
71156
71209
  end = subr.offset + subr.length;
71157
- parse();
71210
+ _parse();
71158
71211
  stream.pos = p;
71159
71212
  end = e;
71160
71213
  }
@@ -71311,7 +71364,7 @@ var CFFGlyph = /*#__PURE__*/function (_Glyph2) {
71311
71364
  var e = end;
71312
71365
  stream.pos = subr.offset;
71313
71366
  end = subr.offset + subr.length;
71314
- parse();
71367
+ _parse();
71315
71368
  stream.pos = p;
71316
71369
  end = e;
71317
71370
  }
@@ -71571,7 +71624,7 @@ var CFFGlyph = /*#__PURE__*/function (_Glyph2) {
71571
71624
  }
71572
71625
  }
71573
71626
  };
71574
- parse();
71627
+ _parse();
71575
71628
  if (open) {
71576
71629
  path.closePath();
71577
71630
  }
@@ -71591,10 +71644,10 @@ var SBIXImage = new r.Struct({
71591
71644
  * Represents a color (e.g. emoji) glyph in Apple's SBIX format.
71592
71645
  */
71593
71646
  var SBIXGlyph = /*#__PURE__*/function (_TTFGlyph) {
71594
- _inheritsLoose(SBIXGlyph, _TTFGlyph);
71595
71647
  function SBIXGlyph() {
71596
71648
  return _TTFGlyph.apply(this, arguments) || this;
71597
71649
  }
71650
+ _inheritsLoose(SBIXGlyph, _TTFGlyph);
71598
71651
  var _proto36 = SBIXGlyph.prototype;
71599
71652
  /**
71600
71653
  * Returns an object representing a glyph image at the given point size.
@@ -71648,10 +71701,10 @@ var COLRLayer = function COLRLayer(glyph, color) {
71648
71701
  * of which is another vector glyph.
71649
71702
  */
71650
71703
  var COLRGlyph = /*#__PURE__*/function (_Glyph3) {
71651
- _inheritsLoose(COLRGlyph, _Glyph3);
71652
71704
  function COLRGlyph() {
71653
71705
  return _Glyph3.apply(this, arguments) || this;
71654
71706
  }
71707
+ _inheritsLoose(COLRGlyph, _Glyph3);
71655
71708
  var _proto37 = COLRGlyph.prototype;
71656
71709
  _proto37._getBBox = function _getBBox() {
71657
71710
  var bbox = new BBox();
@@ -71678,7 +71731,7 @@ var COLRGlyph = /*#__PURE__*/function (_Glyph3) {
71678
71731
  }
71679
71732
  return;
71680
71733
  };
71681
- _createClass(COLRGlyph, [{
71734
+ return _createClass(COLRGlyph, [{
71682
71735
  key: "layers",
71683
71736
  get: function get() {
71684
71737
  var cpal = this._font.CPAL;
@@ -71720,7 +71773,6 @@ var COLRGlyph = /*#__PURE__*/function (_Glyph3) {
71720
71773
  return layers;
71721
71774
  }
71722
71775
  }]);
71723
- return COLRGlyph;
71724
71776
  }(Glyph);
71725
71777
  var TUPLES_SHARE_POINT_NUMBERS = 0x8000;
71726
71778
  var TUPLE_COUNT_MASK = 0x0fff;
@@ -72301,13 +72353,13 @@ var TTFGlyphEncoder = /*#__PURE__*/function () {
72301
72353
  return TTFGlyphEncoder;
72302
72354
  }();
72303
72355
  var TTFSubset = /*#__PURE__*/function (_Subset) {
72304
- _inheritsLoose(TTFSubset, _Subset);
72305
72356
  function TTFSubset(font) {
72306
72357
  var _this12;
72307
72358
  _this12 = _Subset.call(this, font) || this;
72308
72359
  _this12.glyphEncoder = new TTFGlyphEncoder();
72309
72360
  return _this12;
72310
72361
  }
72362
+ _inheritsLoose(TTFSubset, _Subset);
72311
72363
  var _proto41 = TTFSubset.prototype;
72312
72364
  _proto41._addGlyph = function _addGlyph(gid) {
72313
72365
  var glyph = this.font.getGlyph(gid);
@@ -72411,7 +72463,6 @@ var TTFSubset = /*#__PURE__*/function (_Subset) {
72411
72463
  return TTFSubset;
72412
72464
  }(Subset);
72413
72465
  var CFFSubset = /*#__PURE__*/function (_Subset2) {
72414
- _inheritsLoose(CFFSubset, _Subset2);
72415
72466
  function CFFSubset(font) {
72416
72467
  var _this13;
72417
72468
  _this13 = _Subset2.call(this, font) || this;
@@ -72421,6 +72472,7 @@ var CFFSubset = /*#__PURE__*/function (_Subset2) {
72421
72472
  }
72422
72473
  return _this13;
72423
72474
  }
72475
+ _inheritsLoose(CFFSubset, _Subset2);
72424
72476
  var _proto42 = CFFSubset.prototype;
72425
72477
  _proto42.subsetCharstrings = function subsetCharstrings() {
72426
72478
  this.charstrings = [];
@@ -72573,10 +72625,6 @@ var _class$4;
72573
72625
  */
72574
72626
 
72575
72627
  var TTFFont = (_class$4 = /*#__PURE__*/function () {
72576
- TTFFont.probe = function probe(buffer) {
72577
- var format = buffer.toString('ascii', 0, 4);
72578
- return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);
72579
- };
72580
72628
  function TTFFont(stream, variationCoords) {
72581
72629
  if (variationCoords === void 0) {
72582
72630
  variationCoords = null;
@@ -72598,6 +72646,10 @@ var TTFFont = (_class$4 = /*#__PURE__*/function () {
72598
72646
  }
72599
72647
  }
72600
72648
  }
72649
+ TTFFont.probe = function probe(buffer) {
72650
+ var format = buffer.toString('ascii', 0, 4);
72651
+ return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);
72652
+ };
72601
72653
  var _proto43 = TTFFont.prototype;
72602
72654
  _proto43.setDefaultLanguage = function setDefaultLanguage(lang) {
72603
72655
  if (lang === void 0) {
@@ -72845,7 +72897,7 @@ var TTFFont = (_class$4 = /*#__PURE__*/function () {
72845
72897
  _proto43.getFont = function getFont(name) {
72846
72898
  return this.getVariation(name);
72847
72899
  };
72848
- _createClass(TTFFont, [{
72900
+ return _createClass(TTFFont, [{
72849
72901
  key: "postscriptName",
72850
72902
  get: function get() {
72851
72903
  return this.getName('postscriptName');
@@ -73084,7 +73136,6 @@ var TTFFont = (_class$4 = /*#__PURE__*/function () {
73084
73136
  return new GlyphVariationProcessor(this, variationCoords);
73085
73137
  }
73086
73138
  }]);
73087
- return TTFFont;
73088
73139
  }(), (_applyDecoratedDescriptor(_class$4.prototype, "bbox", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "bbox"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "_cmapProcessor", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "_cmapProcessor"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "characterSet", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "characterSet"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "_layoutEngine", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "_layoutEngine"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "variationAxes", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "variationAxes"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "namedVariations", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "namedVariations"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "_variationProcessor", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "_variationProcessor"), _class$4.prototype)), _class$4);
73089
73140
  var WOFFDirectoryEntry = new r.Struct({
73090
73141
  tag: new r.String(4),
@@ -73121,10 +73172,10 @@ WOFFDirectory.process = function () {
73121
73172
  this.tables = tables;
73122
73173
  };
73123
73174
  var WOFFFont = /*#__PURE__*/function (_TTFFont) {
73124
- _inheritsLoose(WOFFFont, _TTFFont);
73125
73175
  function WOFFFont() {
73126
73176
  return _TTFFont.apply(this, arguments) || this;
73127
73177
  }
73178
+ _inheritsLoose(WOFFFont, _TTFFont);
73128
73179
  WOFFFont.probe = function probe(buffer) {
73129
73180
  return buffer.toString('ascii', 0, 4) === 'wOFF';
73130
73181
  };
@@ -73156,10 +73207,10 @@ var WOFFFont = /*#__PURE__*/function (_TTFFont) {
73156
73207
  * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.
73157
73208
  */
73158
73209
  var WOFF2Glyph = /*#__PURE__*/function (_TTFGlyph2) {
73159
- _inheritsLoose(WOFF2Glyph, _TTFGlyph2);
73160
73210
  function WOFF2Glyph() {
73161
73211
  return _TTFGlyph2.apply(this, arguments) || this;
73162
73212
  }
73213
+ _inheritsLoose(WOFF2Glyph, _TTFGlyph2);
73163
73214
  var _proto45 = WOFF2Glyph.prototype;
73164
73215
  _proto45._decode = function _decode() {
73165
73216
  // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.
@@ -73241,10 +73292,10 @@ WOFF2Directory.process = function () {
73241
73292
  * See spec here: http://www.w3.org/TR/WOFF2/
73242
73293
  */
73243
73294
  var WOFF2Font = /*#__PURE__*/function (_TTFFont2) {
73244
- _inheritsLoose(WOFF2Font, _TTFFont2);
73245
73295
  function WOFF2Font() {
73246
73296
  return _TTFFont2.apply(this, arguments) || this;
73247
73297
  }
73298
+ _inheritsLoose(WOFF2Font, _TTFFont2);
73248
73299
  WOFF2Font.probe = function probe(buffer) {
73249
73300
  return buffer.toString('ascii', 0, 4) === 'wOF2';
73250
73301
  };
@@ -73435,9 +73486,6 @@ var TTCHeader = new r.VersionedStruct(r.uint32, {
73435
73486
  }
73436
73487
  });
73437
73488
  var TrueTypeCollection = /*#__PURE__*/function () {
73438
- TrueTypeCollection.probe = function probe(buffer) {
73439
- return buffer.toString('ascii', 0, 4) === 'ttcf';
73440
- };
73441
73489
  function TrueTypeCollection(stream) {
73442
73490
  this.stream = stream;
73443
73491
  if (stream.readString(4) !== 'ttcf') {
@@ -73445,6 +73493,9 @@ var TrueTypeCollection = /*#__PURE__*/function () {
73445
73493
  }
73446
73494
  this.header = TTCHeader.decode(stream);
73447
73495
  }
73496
+ TrueTypeCollection.probe = function probe(buffer) {
73497
+ return buffer.toString('ascii', 0, 4) === 'ttcf';
73498
+ };
73448
73499
  var _proto48 = TrueTypeCollection.prototype;
73449
73500
  _proto48.getFont = function getFont(name) {
73450
73501
  for (var _iterator79 = _createForOfIteratorHelperLoose(this.header.offsets), _step79; !(_step79 = _iterator79()).done;) {
@@ -73458,7 +73509,7 @@ var TrueTypeCollection = /*#__PURE__*/function () {
73458
73509
  }
73459
73510
  return null;
73460
73511
  };
73461
- _createClass(TrueTypeCollection, [{
73512
+ return _createClass(TrueTypeCollection, [{
73462
73513
  key: "fonts",
73463
73514
  get: function get() {
73464
73515
  var fonts = [];
@@ -73471,7 +73522,6 @@ var TrueTypeCollection = /*#__PURE__*/function () {
73471
73522
  return fonts;
73472
73523
  }
73473
73524
  }]);
73474
- return TrueTypeCollection;
73475
73525
  }();
73476
73526
  var DFontName = new r.String(r.uint8);
73477
73527
  var DFontData = new r.Struct({
@@ -73512,28 +73562,13 @@ var DFontHeader = new r.Struct({
73512
73562
  mapLength: r.uint32
73513
73563
  });
73514
73564
  var DFont = /*#__PURE__*/function () {
73515
- DFont.probe = function probe(buffer) {
73516
- var stream = new r.DecodeStream(buffer);
73517
- try {
73518
- var header = DFontHeader.decode(stream);
73519
- } catch (e) {
73520
- return false;
73521
- }
73522
- for (var _iterator81 = _createForOfIteratorHelperLoose(header.map.typeList.types), _step81; !(_step81 = _iterator81()).done;) {
73523
- var type = _step81.value;
73524
- if (type.name === 'sfnt') {
73525
- return true;
73526
- }
73527
- }
73528
- return false;
73529
- };
73530
73565
  function DFont(stream) {
73531
73566
  this.stream = stream;
73532
73567
  this.header = DFontHeader.decode(this.stream);
73533
- for (var _iterator82 = _createForOfIteratorHelperLoose(this.header.map.typeList.types), _step82; !(_step82 = _iterator82()).done;) {
73534
- var type = _step82.value;
73535
- for (var _iterator83 = _createForOfIteratorHelperLoose(type.refList), _step83; !(_step83 = _iterator83()).done;) {
73536
- var ref = _step83.value;
73568
+ for (var _iterator81 = _createForOfIteratorHelperLoose(this.header.map.typeList.types), _step81; !(_step81 = _iterator81()).done;) {
73569
+ var type = _step81.value;
73570
+ for (var _iterator82 = _createForOfIteratorHelperLoose(type.refList), _step82; !(_step82 = _iterator82()).done;) {
73571
+ var ref = _step82.value;
73537
73572
  if (ref.nameOffset >= 0) {
73538
73573
  this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;
73539
73574
  ref.name = DFontName.decode(this.stream);
@@ -73546,6 +73581,21 @@ var DFont = /*#__PURE__*/function () {
73546
73581
  }
73547
73582
  }
73548
73583
  }
73584
+ DFont.probe = function probe(buffer) {
73585
+ var stream = new r.DecodeStream(buffer);
73586
+ try {
73587
+ var header = DFontHeader.decode(stream);
73588
+ } catch (e) {
73589
+ return false;
73590
+ }
73591
+ for (var _iterator83 = _createForOfIteratorHelperLoose(header.map.typeList.types), _step83; !(_step83 = _iterator83()).done;) {
73592
+ var type = _step83.value;
73593
+ if (type.name === 'sfnt') {
73594
+ return true;
73595
+ }
73596
+ }
73597
+ return false;
73598
+ };
73549
73599
  var _proto49 = DFont.prototype;
73550
73600
  _proto49.getFont = function getFont(name) {
73551
73601
  if (!this.sfnt) {
@@ -73562,7 +73612,7 @@ var DFont = /*#__PURE__*/function () {
73562
73612
  }
73563
73613
  return null;
73564
73614
  };
73565
- _createClass(DFont, [{
73615
+ return _createClass(DFont, [{
73566
73616
  key: "fonts",
73567
73617
  get: function get() {
73568
73618
  var fonts = [];
@@ -73575,7 +73625,6 @@ var DFont = /*#__PURE__*/function () {
73575
73625
  return fonts;
73576
73626
  }
73577
73627
  }]);
73578
- return DFont;
73579
73628
  }();
73580
73629
  fontkit.registerFormat(TTFFont);
73581
73630
  fontkit.registerFormat(WOFFFont);