@component-hook/pdf-canvas 1.2.2-alpha.1 → 1.2.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  var To = (a) => {
2
2
  throw TypeError(a);
3
3
  };
4
- var Wn = (a, t, e) => t.has(a) || To("Cannot " + e);
5
- var se = (a, t, e) => (Wn(a, t, "read from private field"), e ? e.call(a) : t.get(a)), bs = (a, t, e) => t.has(a) ? To("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, e), zs = (a, t, e, s) => (Wn(a, t, "write to private field"), s ? s.call(a, e) : t.set(a, e), e), _i = (a, t, e) => (Wn(a, t, "access private method"), e);
4
+ var Xn = (a, t, e) => t.has(a) || To("Cannot " + e);
5
+ var se = (a, t, e) => (Xn(a, t, "read from private field"), e ? e.call(a) : t.get(a)), bs = (a, t, e) => t.has(a) ? To("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, e), zs = (a, t, e, s) => (Xn(a, t, "write to private field"), s ? s.call(a, e) : t.set(a, e), e), _i = (a, t, e) => (Xn(a, t, "access private method"), e);
6
6
  var Eo = (a, t, e, s) => ({
7
7
  set _(i) {
8
8
  zs(a, t, i, e);
@@ -11,7 +11,7 @@ var Eo = (a, t, e, s) => ({
11
11
  return se(a, t, s);
12
12
  }
13
13
  });
14
- import { onMounted as Bl, onBeforeUnmount as Ha, defineComponent as Hl, ref as zl, computed as ko, nextTick as Gl, watch as Xn, createElementBlock as Vl, openBlock as Wl, withModifiers as Un, normalizeStyle as Xl, createElementVNode as Ul, normalizeClass as Yl } from "vue";
14
+ import { onMounted as Bl, onBeforeUnmount as Ha, defineComponent as Hl, ref as zl, computed as ko, nextTick as Gl, watch as Wn, createElementBlock as Vl, openBlock as Xl, withModifiers as Un, normalizeStyle as Wl, createElementVNode as Ul, normalizeClass as Yl } from "vue";
15
15
  const $l = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='20'%20cy='20'%20r='10.75'%20stroke='currentColor'%20stroke-width='2.5'/%3e%3cpath%20d='M16%2024L23.7782%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M24%2024L16.2218%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e", ql = {
16
16
  top: 100,
17
17
  left: 50,
@@ -190,7 +190,7 @@ const xe = () => Oo || (Oo = { document, window, isTouchSupported: "ontouchstart
190
190
  }(), mr = "6.9.0";
191
191
  function rs() {
192
192
  }
193
- const Ve = Math.PI / 2, Fe = 2 * Math.PI, Hr = Math.PI / 180, Bt = Object.freeze([1, 0, 0, 1, 0, 0]), zr = 16, Be = 0.4477152502, W = "center", J = "left", Xt = "top", br = "bottom", ut = "right", It = "none", Gr = /\r?\n/, Ga = "moving", wn = "scaling", Va = "rotating", Vr = "rotate", Wa = "skewing", oi = "resizing", ic = "modifyPoly", nc = "modifyPath", en = "changed", xn = "scale", Ht = "scaleX", Kt = "scaleY", Is = "skewX", Ns = "skewY", vt = "fill", Nt = "stroke", sn = "modified", vs = "json", Yn = "svg", F = new class {
193
+ const Ve = Math.PI / 2, Fe = 2 * Math.PI, Hr = Math.PI / 180, Bt = Object.freeze([1, 0, 0, 1, 0, 0]), zr = 16, Be = 0.4477152502, X = "center", J = "left", Wt = "top", br = "bottom", ut = "right", It = "none", Gr = /\r?\n/, Ga = "moving", wn = "scaling", Va = "rotating", Vr = "rotate", Xa = "skewing", oi = "resizing", ic = "modifyPoly", nc = "modifyPath", en = "changed", xn = "scale", Ht = "scaleX", Kt = "scaleY", Is = "skewX", Ns = "skewY", vt = "fill", Nt = "stroke", sn = "modified", vs = "json", Yn = "svg", F = new class {
194
194
  constructor() {
195
195
  this[vs] = /* @__PURE__ */ new Map(), this[Yn] = /* @__PURE__ */ new Map();
196
196
  }
@@ -414,7 +414,7 @@ class C {
414
414
  return new C(this.x, this.y);
415
415
  }
416
416
  rotate(t) {
417
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Wr;
417
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Xr;
418
418
  const s = ue(t), i = ce(t), n = this.subtract(e);
419
419
  return new C(n.x * i - n.y * s, n.x * s + n.y * i).add(e);
420
420
  }
@@ -423,8 +423,8 @@ class C {
423
423
  return new C(t[0] * this.x + t[2] * this.y + (e ? 0 : t[4]), t[1] * this.x + t[3] * this.y + (e ? 0 : t[5]));
424
424
  }
425
425
  }
426
- const Wr = new C(0, 0), qi = (a) => !!a && Array.isArray(a._objects);
427
- function Xa(a) {
426
+ const Xr = new C(0, 0), qi = (a) => !!a && Array.isArray(a._objects);
427
+ function Wa(a) {
428
428
  class t extends a {
429
429
  constructor() {
430
430
  super(...arguments), x(this, "_objects", []);
@@ -564,16 +564,16 @@ function Ya(a) {
564
564
  return di().cancelAnimationFrame(a);
565
565
  }
566
566
  let oc = 0;
567
- const We = () => oc++, Se = () => {
567
+ const Xe = () => oc++, Se = () => {
568
568
  const a = Fs().createElement("canvas");
569
569
  if (!a || a.getContext === void 0) throw new _e("Failed to create `canvas` element");
570
570
  return a;
571
571
  }, $a = () => Fs().createElement("img"), Jt = (a) => {
572
572
  const t = Se();
573
573
  return t.width = a.width, t.height = a.height, t;
574
- }, Xr = (a, t, e) => a.toDataURL("image/".concat(t), e), Ur = (a, t, e) => new Promise(((s, i) => {
574
+ }, Wr = (a, t, e) => a.toDataURL("image/".concat(t), e), Ur = (a, t, e) => new Promise(((s, i) => {
575
575
  a.toBlob(s, "image/".concat(t), e);
576
- })), lt = (a) => a * Hr, Ce = (a) => a / Hr, qa = (a) => a.every(((t, e) => t === Bt[e])), At = (a, t, e) => new C(a).transform(t, e), Wt = (a) => {
576
+ })), lt = (a) => a * Hr, Ce = (a) => a / Hr, qa = (a) => a.every(((t, e) => t === Bt[e])), At = (a, t, e) => new C(a).transform(t, e), Xt = (a) => {
577
577
  const t = 1 / (a[0] * a[3] - a[1] * a[2]), e = [t * a[3], -t * a[1], -t * a[2], t * a[0], 0, 0], { x: s, y: i } = new C(a[4], a[5]).transform(e, !0);
578
578
  return e[4] = -s, e[5] = -i, e;
579
579
  }, dt = (a, t, e) => [a[0] * t[0] + a[2] * t[1], a[1] * t[0] + a[3] * t[1], a[0] * t[2] + a[2] * t[3], a[1] * t[2] + a[3] * t[3], e ? 0 : a[0] * t[4] + a[2] * t[5] + a[4], e ? 0 : a[1] * t[4] + a[3] * t[5] + a[5]], Sn = (a, t) => a.reduceRight(((e, s) => s && e ? dt(s, e, t) : s || e), void 0) || Bt.concat(), Ka = (a) => {
@@ -714,7 +714,7 @@ class sh {
714
714
  }
715
715
  }
716
716
  const ac = { backgroundVpt: !0, backgroundColor: "", overlayVpt: !0, overlayColor: "", includeDefaultValues: !0, svgViewportTransformation: !0, renderOnAddRemove: !0, skipOffscreen: !0, enableRetinaScaling: !0, imageSmoothingEnabled: !0, controlsAboveOverlay: !1, allowTouchScrolling: !1, viewportTransform: [...Bt] }, hc = ["objects"];
717
- class pi extends Xa(Ua) {
717
+ class pi extends Wa(Ua) {
718
718
  get lowerCanvasEl() {
719
719
  var t;
720
720
  return (t = this.elements.lower) === null || t === void 0 ? void 0 : t.el;
@@ -792,7 +792,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
792
792
  this.viewportTransform = t, this.calcViewportBoundaries(), this.renderOnAddRemove && this.requestRenderAll();
793
793
  }
794
794
  zoomToPoint(t, e) {
795
- const s = t, i = [...this.viewportTransform], n = At(t, Wt(i));
795
+ const s = t, i = [...this.viewportTransform], n = At(t, Xt(i));
796
796
  i[0] = e, i[3] = e;
797
797
  const r = At(n, i);
798
798
  i[4] += s.x - r.x, i[5] += s.y - r.y, this.setViewportTransform(i);
@@ -829,7 +829,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
829
829
  this.nextRenderHandle || this.disposed || this.destroyed || (this.nextRenderHandle = Qs((() => this.renderAndReset())));
830
830
  }
831
831
  calcViewportBoundaries() {
832
- const t = this.width, e = this.height, s = Wt(this.viewportTransform), i = At({ x: 0, y: 0 }, s), n = At({ x: t, y: e }, s), r = i.min(n), o = i.max(n);
832
+ const t = this.width, e = this.height, s = Xt(this.viewportTransform), i = At({ x: 0, y: 0 }, s), n = At({ x: t, y: e }, s), r = i.min(n), o = i.max(n);
833
833
  return this.vptCoords = { tl: r, tr: new C(o.x, r.y), bl: new C(r.x, o.y), br: o };
834
834
  }
835
835
  cancelRequestedRender() {
@@ -898,10 +898,10 @@ Resulting to default behavior: removing object from previous canvas and adding t
898
898
  return this._centerObject(t, new C(t.getCenterPoint().x, this.getVpCenter().y));
899
899
  }
900
900
  getVpCenter() {
901
- return At(this.getCenterPoint(), Wt(this.viewportTransform));
901
+ return At(this.getCenterPoint(), Xt(this.viewportTransform));
902
902
  }
903
903
  _centerObject(t, e) {
904
- t.setXY(e, W, W), t.setCoords(), this.renderOnAddRemove && this.requestRenderAll();
904
+ t.setXY(e, X, X), t.setCoords(), this.renderOnAddRemove && this.requestRenderAll();
905
905
  }
906
906
  toDatalessJSON(t) {
907
907
  return this.toDatalessObject(t);
@@ -958,7 +958,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
958
958
  }
959
959
  createSVGClipPathMarkup(t) {
960
960
  const e = this.clipPath;
961
- return e ? (e.clipPathId = "CLIPPATH_".concat(We()), '<clipPath id="'.concat(e.clipPathId, `" >
961
+ return e ? (e.clipPathId = "CLIPPATH_".concat(Xe()), '<clipPath id="'.concat(e.clipPathId, `" >
962
962
  `).concat(e.toClipPathSVG(t.reviver), `</clipPath>
963
963
  `)) : "";
964
964
  }
@@ -1010,7 +1010,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
1010
1010
  _setSVGBgOverlayColor(t, e) {
1011
1011
  const s = this["".concat(e, "Color")];
1012
1012
  if (s) if (ee(s)) {
1013
- const i = s.repeat || "", n = this.width, r = this.height, o = this["".concat(e, "Vpt")] ? Ds(Wt(this.viewportTransform)) : "";
1013
+ const i = s.repeat || "", n = this.width, r = this.height, o = this["".concat(e, "Vpt")] ? Ds(Xt(this.viewportTransform)) : "";
1014
1014
  t.push('<rect transform="'.concat(o, " translate(").concat(n / 2, ",").concat(r / 2, ')" x="').concat(s.offsetX - n / 2, '" y="').concat(s.offsetY - r / 2, '" width="').concat(i !== "repeat-y" && i !== "no-repeat" || !Lo(s) ? n : s.source.width, '" height="').concat(i !== "repeat-x" && i !== "no-repeat" || !Lo(s) ? r : s.source.height, '" fill="url(#SVGID_').concat(s.id, `)"></rect>
1015
1015
  `));
1016
1016
  } else t.push('<rect x="0" y="0" width="100%" height="100%" ', 'fill="', s, '"', `></rect>
@@ -1036,7 +1036,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
1036
1036
  toDataURL() {
1037
1037
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1038
1038
  const { format: e = "png", quality: s = 1, multiplier: i = 1, enableRetinaScaling: n = !1 } = t, r = i * (n ? this.getRetinaScaling() : 1);
1039
- return Xr(this.toCanvasElement(r, t), e, s);
1039
+ return Wr(this.toCanvasElement(r, t), e, s);
1040
1040
  }
1041
1041
  toBlob() {
1042
1042
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1081,7 +1081,7 @@ const lc = ["touchstart", "touchmove", "touchend"], ih = (a) => {
1081
1081
  return { left: t, top: e, width: s - t, height: i - e };
1082
1082
  }, cc = ["translateX", "translateY", "scaleX", "scaleY"], nh = (a, t) => Ls(a, dt(t, a.calcOwnMatrix())), Ls = (a, t) => {
1083
1083
  const e = as(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o = st(e, cc), h = new C(s, i);
1084
- a.flipX = !1, a.flipY = !1, Object.assign(a, o), a.set({ scaleX: n, scaleY: r }), a.setPositionByOrigin(h, W, W);
1084
+ a.flipX = !1, a.flipY = !1, Object.assign(a, o), a.set({ scaleX: n, scaleY: r }), a.setPositionByOrigin(h, X, X);
1085
1085
  }, rh = (a) => {
1086
1086
  a.scaleX = 1, a.scaleY = 1, a.skewX = 0, a.skewY = 0, a.flipX = !1, a.flipY = !1, a.rotate(0);
1087
1087
  }, Kr = (a) => ({ scaleX: a.scaleX, scaleY: a.scaleY, skewX: a.skewX, skewY: a.skewY, angle: a.angle, left: a.left, flipX: a.flipX, flipY: a.flipY, top: a.top }), An = (a, t, e) => {
@@ -1089,7 +1089,7 @@ const lc = ["touchstart", "touchmove", "touchend"], ih = (a) => {
1089
1089
  return new C(r.width, r.height);
1090
1090
  }, mi = function() {
1091
1091
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Bt;
1092
- return dt(Wt(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Bt), a);
1092
+ return dt(Xt(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Bt), a);
1093
1093
  }, os = function(a) {
1094
1094
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Bt, e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Bt;
1095
1095
  return a.transform(mi(t, e));
@@ -1105,7 +1105,7 @@ const lc = ["touchstart", "touchmove", "touchend"], ih = (a) => {
1105
1105
  (e = s.canvas) === null || e === void 0 || e.fire("object:".concat(a), w(w({}, t), {}, { target: s })), s.fire(a, t);
1106
1106
  }, uc = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, mt = (a) => typeof a == "string" ? uc[a] : a - 0.5, on = "not-allowed";
1107
1107
  function hh(a) {
1108
- return mt(a.originX) === mt(W) && mt(a.originY) === mt(W);
1108
+ return mt(a.originX) === mt(X) && mt(a.originY) === mt(X);
1109
1109
  }
1110
1110
  function Io(a) {
1111
1111
  return 0.5 - mt(a);
@@ -1119,14 +1119,14 @@ function Jr(a, t, e, s, i) {
1119
1119
  var n;
1120
1120
  let { target: r, corner: o } = a;
1121
1121
  const h = r.controls[o], l = ((n = r.canvas) === null || n === void 0 ? void 0 : n.getZoom()) || 1, c = r.padding / l, u = (function(d, f, g, p) {
1122
- const b = d.getRelativeCenterPoint(), m = g !== void 0 && p !== void 0 ? d.translateToGivenOrigin(b, W, W, g, p) : new C(d.left, d.top);
1122
+ const b = d.getRelativeCenterPoint(), m = g !== void 0 && p !== void 0 ? d.translateToGivenOrigin(b, X, X, g, p) : new C(d.left, d.top);
1123
1123
  return (d.angle ? f.rotate(-lt(d.angle), b) : f).subtract(m);
1124
1124
  })(r, new C(s, i), t, e);
1125
1125
  return u.x >= c && (u.x -= c), u.x <= -c && (u.x += c), u.y >= c && (u.y -= c), u.y <= c && (u.y += c), u.x -= h.offsetX, u.y -= h.offsetY, u;
1126
1126
  }
1127
1127
  const dc = (a, t, e, s) => {
1128
1128
  const { target: i, offsetX: n, offsetY: r } = t, o = e - n, h = s - r, l = !le(i, "lockMovementX") && i.left !== o, c = !le(i, "lockMovementY") && i.top !== h;
1129
- return l && i.set(J, o), c && i.set(Xt, h), (l || c) && ah(Ga, lh(a, t, e, s)), l || c;
1129
+ return l && i.set(J, o), c && i.set(Wt, h), (l || c) && ah(Ga, lh(a, t, e, s)), l || c;
1130
1130
  }, an = (a) => a.replace(/\s+/g, " "), No = { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aqua: "#0FF", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000", blanchedalmond: "#FFEBCD", blue: "#00F", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#0FF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgrey: "#A9A9A9", darkgreen: "#006400", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", fuchsia: "#F0F", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", gray: "#808080", grey: "#808080", green: "#008000", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgray: "#D3D3D3", lightgrey: "#D3D3D3", lightgreen: "#90EE90", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#789", lightslategrey: "#789", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", lime: "#0F0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#F0F", maroon: "#800000", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", navy: "#000080", oldlace: "#FDF5E6", olive: "#808000", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", purple: "#800080", rebeccapurple: "#639", red: "#F00", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", silver: "#C0C0C0", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", teal: "#008080", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", white: "#FFF", whitesmoke: "#F5F5F5", yellow: "#FF0", yellowgreen: "#9ACD32" }, $n = (a, t, e) => (e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? a + 6 * (t - a) * e : e < 0.5 ? t : e < 2 / 3 ? a + (t - a) * (2 / 3 - e) * 6 : a), jo = (a, t, e, s) => {
1131
1131
  a /= 255, t /= 255, e /= 255;
1132
1132
  const i = Math.max(a, t, e), n = Math.min(a, t, e);
@@ -1332,7 +1332,7 @@ class uh {
1332
1332
  let { noStyle: e, reviver: s, withShadow: i, additionalTransform: n } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1333
1333
  const r = e ? "" : 'style="'.concat(this.getSvgStyles(), '" '), o = i ? 'style="'.concat(this.getSvgFilter(), '" ') : "", h = this.clipPath, l = this.strokeUniform ? 'vector-effect="non-scaling-stroke" ' : "", c = h && h.absolutePositioned, u = this.stroke, d = this.fill, f = this.shadow, g = [], p = t.indexOf("COMMON_PARTS");
1334
1334
  let b;
1335
- h && (h.clipPathId = "CLIPPATH_".concat(We()), b = '<clipPath id="'.concat(h.clipPathId, `" >
1335
+ h && (h.clipPathId = "CLIPPATH_".concat(Xe()), b = '<clipPath id="'.concat(h.clipPathId, `" >
1336
1336
  `).concat(h.toClipPathSVG(s), `</clipPath>
1337
1337
  `)), c && g.push("<g ", o, this.getSvgCommons(), ` >
1338
1338
  `), g.push("<g ", this.getSvgTransform(!1), c ? "" : o + this.getSvgCommons(), ` >
@@ -1351,7 +1351,7 @@ function Tn(a) {
1351
1351
  }
1352
1352
  const hs = "textDecorationThickness", dh = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], fh = ["underline", "overline", "linethrough"], gh = [...dh, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], ph = [...gh, ...fh, "textBackgroundColor", "direction", hs], fc = [...dh, ...fh, Nt, "strokeWidth", vt, "deltaY", "textBackgroundColor", hs], gc = { _reNewline: Gr, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: "normal", fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: J, fontStyle: "normal", lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: J, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [hs]: 66.667 }, ye = "justify", hn = "justify-left", ei = "justify-right", si = "justify-center";
1353
1353
  var zo, Go, Vo;
1354
- const he = String.raw(zo || (zo = Ae(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), qn = String.raw(Go || (Go = Ae(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), _r = "http://www.w3.org/2000/svg", pc = new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + he + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + he + "))?\\s+(.*)"), mc = { cx: J, x: J, r: "radius", cy: Xt, y: Xt, display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": hs }, Kn = "font-size", Jn = "clip-path", bc = Tn(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]), vc = Tn(["symbol", "image", "marker", "pattern", "view", "svg"]), Wo = Tn(["symbol", "g", "a", "svg", "clipPath", "defs"]), Xo = new RegExp(String.raw(Vo || (Vo = Ae(["^s*(", ")", "(", ")", "(", ")", "(", ")s*$"], ["^\\s*(", ")", "(", ")", "(", ")", "(", ")\\s*$"])), he, qn, he, qn, he, qn, he)), yc = new C(1, 0), mh = new C(), Qr = (a, t) => a.rotate(t), ln = (a, t) => new C(t).subtract(a), cn = (a) => a.distanceFrom(mh), un = (a, t) => Math.atan2(As(a, t), vh(a, t)), bh = (a) => un(yc, a), En = (a) => a.eq(mh) ? a : a.scalarDivide(cn(a)), to = function(a) {
1354
+ const he = String.raw(zo || (zo = Ae(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), qn = String.raw(Go || (Go = Ae(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), _r = "http://www.w3.org/2000/svg", pc = new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + he + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + he + "))?\\s+(.*)"), mc = { cx: J, x: J, r: "radius", cy: Wt, y: Wt, display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": hs }, Kn = "font-size", Jn = "clip-path", bc = Tn(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]), vc = Tn(["symbol", "image", "marker", "pattern", "view", "svg"]), Xo = Tn(["symbol", "g", "a", "svg", "clipPath", "defs"]), Wo = new RegExp(String.raw(Vo || (Vo = Ae(["^s*(", ")", "(", ")", "(", ")", "(", ")s*$"], ["^\\s*(", ")", "(", ")", "(", ")", "(", ")\\s*$"])), he, qn, he, qn, he, qn, he)), yc = new C(1, 0), mh = new C(), Qr = (a, t) => a.rotate(t), ln = (a, t) => new C(t).subtract(a), cn = (a) => a.distanceFrom(mh), un = (a, t) => Math.atan2(As(a, t), vh(a, t)), bh = (a) => un(yc, a), En = (a) => a.eq(mh) ? a : a.scalarDivide(cn(a)), to = function(a) {
1355
1355
  let t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
1356
1356
  return En(new C(-a.y, a.x).scalarMultiply(t ? 1 : -1));
1357
1357
  }, As = (a, t) => a.x * t.y - a.y * t.x, vh = (a, t) => a.x * t.x + a.y * t.y, wr = (a, t, e) => {
@@ -1362,7 +1362,7 @@ const he = String.raw(zo || (zo = Ae(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["
1362
1362
  class Le {
1363
1363
  constructor(t) {
1364
1364
  const e = typeof t == "string" ? Le.parseShadow(t) : t;
1365
- Object.assign(this, Le.ownDefaults, e), this.id = We();
1365
+ Object.assign(this, Le.ownDefaults, e), this.id = Xe();
1366
1366
  }
1367
1367
  static parseShadow(t) {
1368
1368
  const e = t.trim(), [, s = 0, i = 0, n = 0] = (Yo.exec(e) || []).map(((r) => parseFloat(r) || 0));
@@ -1395,7 +1395,7 @@ class Le {
1395
1395
  }
1396
1396
  }
1397
1397
  x(Le, "ownDefaults", { color: "rgb(0,0,0)", blur: 0, offsetX: 0, offsetY: 0, affectStroke: !1, includeDefaultValues: !0, nonScaling: !1 }), x(Le, "type", "shadow"), F.setClass(Le, "shadow");
1398
- const ls = (a, t, e) => Math.max(a, Math.min(t, e)), _c = [Xt, J, Ht, Kt, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", Is, Ns], Ie = [vt, Nt, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], wc = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: J, originY: Xt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: vt, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 }, Zn = (a, t, e, s) => (a < Math.abs(t) ? (a = t, s = e / 4) : s = t === 0 && a === 0 ? e / Fe * Math.asin(1) : e / Fe * Math.asin(t / a), { a, c: t, p: e, s }), $o = (a, t, e, s, i) => a * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * i - t) * Fe / e), yh = (a, t, e, s) => -e * Math.cos(a / s * Ve) + e + t, xr = (a, t, e, s) => (a /= s) < 1 / 2.75 ? e * (7.5625 * a * a) + t : a < 2 / 2.75 ? e * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + t : a < 2.5 / 2.75 ? e * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + t : e * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + t, qo = (a, t, e, s) => e - xr(s - a, 0, e, s) + t;
1398
+ const ls = (a, t, e) => Math.max(a, Math.min(t, e)), _c = [Wt, J, Ht, Kt, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", Is, Ns], Ie = [vt, Nt, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], wc = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: J, originY: Wt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: vt, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 }, Zn = (a, t, e, s) => (a < Math.abs(t) ? (a = t, s = e / 4) : s = t === 0 && a === 0 ? e / Fe * Math.asin(1) : e / Fe * Math.asin(t / a), { a, c: t, p: e, s }), $o = (a, t, e, s, i) => a * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * i - t) * Fe / e), yh = (a, t, e, s) => -e * Math.cos(a / s * Ve) + e + t, xr = (a, t, e, s) => (a /= s) < 1 / 2.75 ? e * (7.5625 * a * a) + t : a < 2 / 2.75 ? e * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + t : a < 2.5 / 2.75 ? e * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + t : e * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + t, qo = (a, t, e, s) => e - xr(s - a, 0, e, s) + t;
1399
1399
  var xc = Object.freeze({ __proto__: null, defaultEasing: yh, easeInBack: function(a, t, e, s) {
1400
1400
  let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1.70158;
1401
1401
  return e * (a /= s) * a * ((i + 1) * a - i) + t;
@@ -1611,7 +1611,7 @@ class Oc extends Ua {
1611
1611
  return this.group ? At(t, this.group.calcTransformMatrix()) : t;
1612
1612
  }
1613
1613
  setXY(t, e, s) {
1614
- this.group && (t = At(t, Wt(this.group.calcTransformMatrix()))), this.setRelativeXY(t, e, s);
1614
+ this.group && (t = At(t, Xt(this.group.calcTransformMatrix()))), this.setRelativeXY(t, e, s);
1615
1615
  }
1616
1616
  getRelativeXY() {
1617
1617
  return new C(this.left, this.top);
@@ -1740,12 +1740,12 @@ class Oc extends Ua {
1740
1740
  return new C(r, o);
1741
1741
  }
1742
1742
  translateToCenterPoint(t, e, s) {
1743
- if (e === W && s === W) return t;
1744
- const i = this.translateToGivenOrigin(t, e, s, W, W);
1743
+ if (e === X && s === X) return t;
1744
+ const i = this.translateToGivenOrigin(t, e, s, X, X);
1745
1745
  return this.angle ? i.rotate(lt(this.angle), t) : i;
1746
1746
  }
1747
1747
  translateToOriginPoint(t, e, s) {
1748
- const i = this.translateToGivenOrigin(t, W, W, e, s);
1748
+ const i = this.translateToGivenOrigin(t, X, X, e, s);
1749
1749
  return this.angle ? i.rotate(lt(this.angle), t) : i;
1750
1750
  }
1751
1751
  getCenterPoint() {
@@ -1763,7 +1763,7 @@ class Oc extends Ua {
1763
1763
  this.set({ left: n.x, top: n.y });
1764
1764
  }
1765
1765
  _getLeftTopCoords() {
1766
- return this.translateToOriginPoint(this.getRelativeCenterPoint(), J, Xt);
1766
+ return this.translateToOriginPoint(this.getRelativeCenterPoint(), J, Wt);
1767
1767
  }
1768
1768
  }
1769
1769
  const Dc = ["type"], Lc = ["extraParam"];
@@ -1881,7 +1881,7 @@ let Te = class Ki extends Oc {
1881
1881
  if (i.translate(e.cacheTranslationX, e.cacheTranslationY), i.scale(e.zoomX, e.zoomY), t._cacheCanvas = s, e.parentClipPaths.forEach(((n) => {
1882
1882
  n.transform(i);
1883
1883
  })), e.parentClipPaths.push(t), t.absolutePositioned) {
1884
- const n = Wt(this.calcTransformMatrix());
1884
+ const n = Xt(this.calcTransformMatrix());
1885
1885
  i.transform(n[0], n[1], n[2], n[3], n[4], n[5]);
1886
1886
  }
1887
1887
  return t.transform(i), t.drawObject(i, !0, e), s;
@@ -1981,7 +1981,7 @@ let Te = class Ki extends Oc {
1981
1981
  const f = c.width + d.x, g = c.height + d.y;
1982
1982
  l.width = Math.ceil(f), l.height = Math.ceil(g);
1983
1983
  const p = h(l);
1984
- t.format === "jpeg" && (p.backgroundColor = "#fff"), this.setPositionByOrigin(new C(p.width / 2, p.height / 2), W, W);
1984
+ t.format === "jpeg" && (p.backgroundColor = "#fff"), this.setPositionByOrigin(new C(p.width / 2, p.height / 2), X, X);
1985
1985
  const b = this.canvas;
1986
1986
  p._objects = [this], this.set("canvas", p), this.setCoords();
1987
1987
  const m = p.toCanvasElement(o || 1, t);
@@ -1989,7 +1989,7 @@ let Te = class Ki extends Oc {
1989
1989
  }
1990
1990
  toDataURL() {
1991
1991
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1992
- return Xr(this.toCanvasElement(t), t.format || "png", t.quality || 1);
1992
+ return Wr(this.toCanvasElement(t), t.format || "png", t.quality || 1);
1993
1993
  }
1994
1994
  toBlob() {
1995
1995
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -2009,7 +2009,7 @@ let Te = class Ki extends Oc {
2009
2009
  const { centeredRotation: e, originX: s, originY: i } = this;
2010
2010
  if (e) {
2011
2011
  const { x: n, y: r } = this.getRelativeCenterPoint();
2012
- this.originX = W, this.originY = W, this.left = n, this.top = r;
2012
+ this.originX = X, this.originY = X, this.left = n, this.top = r;
2013
2013
  }
2014
2014
  if (this.set("angle", t), e) {
2015
2015
  const { x: n, y: r } = this.translateToOriginPoint(this.getRelativeCenterPoint(), s, i);
@@ -2092,7 +2092,7 @@ let Te = class Ki extends Oc {
2092
2092
  _removeDefaultValues(t) {
2093
2093
  const e = this.constructor.getDefaults(), s = Object.keys(e).length > 0 ? e : Object.getPrototypeOf(this);
2094
2094
  return qr(t, ((i, n) => {
2095
- if (n === J || n === Xt || n === "type") return !0;
2095
+ if (n === J || n === Wt || n === "type") return !0;
2096
2096
  const r = s[n];
2097
2097
  return i !== r && !(Array.isArray(i) && Array.isArray(r) && i.length === 0 && r.length === 0);
2098
2098
  }));
@@ -2121,7 +2121,7 @@ function Hs(a) {
2121
2121
  }
2122
2122
  const Ko = Bs(oi, Hs(((a, t, e, s) => {
2123
2123
  const i = Jr(t, t.originX, t.originY, e, s);
2124
- if (mt(t.originX) === mt(W) || mt(t.originX) === mt(ut) && i.x < 0 || mt(t.originX) === mt(J) && i.x > 0) {
2124
+ if (mt(t.originX) === mt(X) || mt(t.originX) === mt(ut) && i.x < 0 || mt(t.originX) === mt(J) && i.x > 0) {
2125
2125
  const { target: n } = t, r = n.strokeWidth / (n.strokeUniform ? n.scaleX : 1), o = hh(t) ? 2 : 1, h = n.width, l = Math.abs(i.x * o / n.scaleX) - r;
2126
2126
  return n.set("width", Math.max(l, 1)), h !== n.width;
2127
2127
  }
@@ -2237,8 +2237,8 @@ const xi = Bs(wn, Hs(((a, t, e, s) => io(a, t, e, s)))), Bc = Bs(wn, Hs(((a, t,
2237
2237
  function Sh(a, t, e, s, i) {
2238
2238
  const { target: n } = e, { counterAxis: r, origin: o, lockSkewing: h, skew: l, flip: c } = tr[a];
2239
2239
  if (le(n, h)) return !1;
2240
- const { origin: u, flip: d } = tr[r], f = mt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[l] === 0 && Jr(e, W, W, s, i)[a] > 0 || n[l] > 0 ? 1 : -1) * g) + 0.5;
2241
- return Bs(Wa, Hs(((m, v, y, _) => (function(S, A, T) {
2240
+ const { origin: u, flip: d } = tr[r], f = mt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[l] === 0 && Jr(e, X, X, s, i)[a] > 0 || n[l] > 0 ? 1 : -1) * g) + 0.5;
2241
+ return Bs(Xa, Hs(((m, v, y, _) => (function(S, A, T) {
2242
2242
  let { target: E, ex: O, ey: N, skewingSide: D } = A, R = st(A, zc);
2243
2243
  const { skew: k } = tr[S], P = T.subtract(new C(O, N)).divide(new C(E.scaleX, E.scaleY))[S], j = E[k], M = R[k], L = Math.tan(lt(M)), G = S === "y" ? E._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : E._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, it = 2 * P * D / Math.max(G, 1) + L, at = Ce(Math.atan(it));
2244
2244
  E.set(k, at);
@@ -2250,14 +2250,14 @@ function Sh(a, t, e, s, i) {
2250
2250
  return xt;
2251
2251
  })(a, v, new C(y, _)))))(t, w(w({}, e), {}, { [o]: p, skewingSide: g }), s, i);
2252
2252
  }
2253
- const Wc = (a, t, e, s) => Sh("x", a, t, e, s), Xc = (a, t, e, s) => Sh("y", a, t, e, s);
2253
+ const Xc = (a, t, e, s) => Sh("x", a, t, e, s), Wc = (a, t, e, s) => Sh("y", a, t, e, s);
2254
2254
  function kn(a, t) {
2255
2255
  return a[t.canvas.altActionKey];
2256
2256
  }
2257
2257
  const Si = (a, t, e) => {
2258
2258
  const s = kn(a, e);
2259
2259
  return t.x === 0 ? s ? Is : Kt : t.y === 0 ? s ? Ns : Ht : "";
2260
- }, ws = (a, t, e) => kn(a, e) ? Vc(0, t, e) : $s(a, t, e), Jo = (a, t, e, s) => kn(a, t.target) ? Xc(a, t, e, s) : Bc(a, t, e, s), Zo = (a, t, e, s) => kn(a, t.target) ? Wc(a, t, e, s) : Hc(a, t, e, s), Ch = () => ({ ml: new ne({ x: -0.5, y: 0, cursorStyleHandler: ws, actionHandler: Jo, getActionName: Si }), mr: new ne({ x: 0.5, y: 0, cursorStyleHandler: ws, actionHandler: Jo, getActionName: Si }), mb: new ne({ x: 0, y: 0.5, cursorStyleHandler: ws, actionHandler: Zo, getActionName: Si }), mt: new ne({ x: 0, y: -0.5, cursorStyleHandler: ws, actionHandler: Zo, getActionName: Si }), tl: new ne({ x: -0.5, y: -0.5, cursorStyleHandler: $s, actionHandler: xi }), tr: new ne({ x: 0.5, y: -0.5, cursorStyleHandler: $s, actionHandler: xi }), bl: new ne({ x: -0.5, y: 0.5, cursorStyleHandler: $s, actionHandler: xi }), br: new ne({ x: 0.5, y: 0.5, cursorStyleHandler: $s, actionHandler: xi }), mtr: new ne({ x: 0, y: -0.5, actionHandler: Nc, cursorStyleHandler: Ic, offsetY: -40, withConnection: !0, actionName: Vr }) }), Uc = () => ({ mr: new ne({ x: 0.5, y: 0, actionHandler: Ko, cursorStyleHandler: ws, actionName: oi }), ml: new ne({ x: -0.5, y: 0, actionHandler: Ko, cursorStyleHandler: ws, actionName: oi }) }), Yc = () => w(w({}, Ch()), Uc());
2260
+ }, ws = (a, t, e) => kn(a, e) ? Vc(0, t, e) : $s(a, t, e), Jo = (a, t, e, s) => kn(a, t.target) ? Wc(a, t, e, s) : Bc(a, t, e, s), Zo = (a, t, e, s) => kn(a, t.target) ? Xc(a, t, e, s) : Hc(a, t, e, s), Ch = () => ({ ml: new ne({ x: -0.5, y: 0, cursorStyleHandler: ws, actionHandler: Jo, getActionName: Si }), mr: new ne({ x: 0.5, y: 0, cursorStyleHandler: ws, actionHandler: Jo, getActionName: Si }), mb: new ne({ x: 0, y: 0.5, cursorStyleHandler: ws, actionHandler: Zo, getActionName: Si }), mt: new ne({ x: 0, y: -0.5, cursorStyleHandler: ws, actionHandler: Zo, getActionName: Si }), tl: new ne({ x: -0.5, y: -0.5, cursorStyleHandler: $s, actionHandler: xi }), tr: new ne({ x: 0.5, y: -0.5, cursorStyleHandler: $s, actionHandler: xi }), bl: new ne({ x: -0.5, y: 0.5, cursorStyleHandler: $s, actionHandler: xi }), br: new ne({ x: 0.5, y: 0.5, cursorStyleHandler: $s, actionHandler: xi }), mtr: new ne({ x: 0, y: -0.5, actionHandler: Nc, cursorStyleHandler: Ic, offsetY: -40, withConnection: !0, actionName: Vr }) }), Uc = () => ({ mr: new ne({ x: 0.5, y: 0, actionHandler: Ko, cursorStyleHandler: ws, actionName: oi }), ml: new ne({ x: -0.5, y: 0, actionHandler: Ko, cursorStyleHandler: ws, actionName: oi }) }), Yc = () => w(w({}, Ch()), Uc());
2261
2261
  class hi extends Te {
2262
2262
  static getDefaults() {
2263
2263
  return w(w({}, super.getDefaults()), hi.ownDefaults);
@@ -2331,7 +2331,7 @@ class hi extends Te {
2331
2331
  drawBorders(t, e, s) {
2332
2332
  let i;
2333
2333
  if (s && s.forActiveSelection || this.group) {
2334
- const n = An(this.width, this.height, fi(e)), r = this.isStrokeAccountedForInDimensions() ? Wr : (this.strokeUniform ? new C().scalarAdd(this.canvas ? this.canvas.getZoom() : 1) : new C(e.scaleX, e.scaleY)).scalarMultiply(this.strokeWidth);
2334
+ const n = An(this.width, this.height, fi(e)), r = this.isStrokeAccountedForInDimensions() ? Xr : (this.strokeUniform ? new C().scalarAdd(this.canvas ? this.canvas.getZoom() : 1) : new C(e.scaleX, e.scaleY)).scalarMultiply(this.strokeWidth);
2335
2335
  i = n.add(r).scalarAdd(this.borderScaleFactor).scalarAdd(2 * this.padding);
2336
2336
  } else i = this._calculateCurrentDimensions().scalarAdd(this.borderScaleFactor);
2337
2337
  this._drawBorders(t, i, s);
@@ -2685,7 +2685,7 @@ function fu(a, t, e, s) {
2685
2685
  else if (a === "transformMatrix") r = e && e.transformMatrix ? dt(e.transformMatrix, dn(t)) : dn(t);
2686
2686
  else if (a === "visible") r = t !== It && t !== "hidden", e && e.visible === !1 && (r = !1);
2687
2687
  else if (a === "opacity") r = parseFloat(t), e && e.opacity !== void 0 && (r *= e.opacity);
2688
- else if (a === "textAnchor") r = t === "start" ? J : t === "end" ? ut : W;
2688
+ else if (a === "textAnchor") r = t === "start" ? J : t === "end" ? ut : X;
2689
2689
  else if (a === "charSpacing" || a === hs) n = Lt(t, s) / s * 1e3;
2690
2690
  else if (a === "paintFirst") {
2691
2691
  const o = t.indexOf(vt), h = t.indexOf(Nt);
@@ -2724,7 +2724,7 @@ const mu = { stroke: "strokeOpacity", fill: "fillOpacity" };
2724
2724
  function Ne(a, t, e) {
2725
2725
  if (!a) return {};
2726
2726
  let s, i = {}, n = zr;
2727
- a.parentNode && Wo.test(a.parentNode.nodeName) && (i = Ne(a.parentElement, t, e), i.fontSize && (s = n = Lt(i.fontSize)));
2727
+ a.parentNode && Xo.test(a.parentNode.nodeName) && (i = Ne(a.parentElement, t, e), i.fontSize && (s = n = Lt(i.fontSize)));
2728
2728
  const r = w(w(w({}, t.reduce(((l, c) => {
2729
2729
  const u = a.getAttribute(c);
2730
2730
  return u && (l[c] = u), l;
@@ -2741,7 +2741,7 @@ function Ne(a, t, e) {
2741
2741
  }
2742
2742
  o && o.font && gu(o.font, o);
2743
2743
  const h = w(w({}, i), o);
2744
- return Wo.test(a.nodeName) ? h : (function(l) {
2744
+ return Xo.test(a.nodeName) ? h : (function(l) {
2745
2745
  const c = Mt.getDefaults();
2746
2746
  return Object.entries(mu).forEach(((u) => {
2747
2747
  let [d, f] = u;
@@ -2788,7 +2788,7 @@ class ve extends Mt {
2788
2788
  }
2789
2789
  x(ve, "type", "Rect"), x(ve, "cacheProperties", [...Ie, ...Dh]), x(ve, "ownDefaults", { rx: 0, ry: 0 }), x(ve, "ATTRIBUTE_NAMES", [...Ye, "x", "y", "rx", "ry", "width", "height"]), F.setClass(ve), F.setSVGClass(ve);
2790
2790
  const Oe = "initialization", fn = "added", oo = "removed", gn = "imperative", Lh = (a, t) => {
2791
- const { strokeUniform: e, strokeWidth: s, width: i, height: n, group: r } = t, o = r && r !== a ? mi(r.calcTransformMatrix(), a.calcTransformMatrix()) : null, h = o ? t.getRelativeCenterPoint().transform(o) : t.getRelativeCenterPoint(), l = !t.isStrokeAccountedForInDimensions(), c = e && l ? oh(new C(s, s), void 0, a.calcTransformMatrix()) : Wr, u = !e && l ? s : 0, d = An(i + u, n + u, Sn([o, t.calcOwnMatrix()], !0)).add(c).scalarDivide(2);
2791
+ const { strokeUniform: e, strokeWidth: s, width: i, height: n, group: r } = t, o = r && r !== a ? mi(r.calcTransformMatrix(), a.calcTransformMatrix()) : null, h = o ? t.getRelativeCenterPoint().transform(o) : t.getRelativeCenterPoint(), l = !t.isStrokeAccountedForInDimensions(), c = e && l ? oh(new C(s, s), void 0, a.calcTransformMatrix()) : Xr, u = !e && l ? s : 0, d = An(i + u, n + u, Sn([o, t.calcOwnMatrix()], !0)).add(c).scalarDivide(2);
2792
2792
  return [h.subtract(d), h.add(d)];
2793
2793
  };
2794
2794
  class On {
@@ -2841,7 +2841,7 @@ class li {
2841
2841
  }
2842
2842
  attachHandlers(t, e) {
2843
2843
  const { target: s } = e;
2844
- return [sn, Ga, oi, Va, wn, Wa, en, ic, nc].map(((i) => t.on(i, ((n) => this.performLayout(i === sn ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })))));
2844
+ return [sn, Ga, oi, Va, wn, Xa, en, ic, nc].map(((i) => t.on(i, ((n) => this.performLayout(i === sn ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })))));
2845
2845
  }
2846
2846
  subscribe(t, e) {
2847
2847
  this.unsubscribe(t, e);
@@ -2867,13 +2867,13 @@ class li {
2867
2867
  getLayoutResult(t) {
2868
2868
  const { target: e, strategy: s, type: i } = t, n = s.calcLayoutResult(t, e.getObjects());
2869
2869
  if (!n) return;
2870
- const r = i === Oe ? new C() : e.getRelativeCenterPoint(), { center: o, correction: h = new C(), relativeCorrection: l = new C() } = n, c = r.subtract(o).add(h).transform(i === Oe ? Bt : Wt(e.calcOwnMatrix()), !0).add(l);
2870
+ const r = i === Oe ? new C() : e.getRelativeCenterPoint(), { center: o, correction: h = new C(), relativeCorrection: l = new C() } = n, c = r.subtract(o).add(h).transform(i === Oe ? Bt : Xt(e.calcOwnMatrix()), !0).add(l);
2871
2871
  return { result: n, prevCenter: r, nextCenter: o, offset: c };
2872
2872
  }
2873
2873
  commitLayout(t, e) {
2874
2874
  const { target: s } = t, { result: { size: i }, nextCenter: n } = e;
2875
2875
  var r, o;
2876
- s.set({ width: i.x, height: i.y }), this.layoutObjects(t, e), t.type === Oe ? s.set({ left: (r = t.x) !== null && r !== void 0 ? r : n.x + i.x * mt(s.originX), top: (o = t.y) !== null && o !== void 0 ? o : n.y + i.y * mt(s.originY) }) : (s.setPositionByOrigin(n, W, W), s.setCoords(), s.set("dirty", !0));
2876
+ s.set({ width: i.x, height: i.y }), this.layoutObjects(t, e), t.type === Oe ? s.set({ left: (r = t.x) !== null && r !== void 0 ? r : n.x + i.x * mt(s.originX), top: (o = t.y) !== null && o !== void 0 ? o : n.y + i.y * mt(s.originY) }) : (s.setPositionByOrigin(n, X, X), s.setCoords(), s.set("dirty", !0));
2877
2877
  }
2878
2878
  layoutObjects(t, e) {
2879
2879
  const { target: s } = t;
@@ -2908,7 +2908,7 @@ class wu extends li {
2908
2908
  performLayout() {
2909
2909
  }
2910
2910
  }
2911
- class qt extends Xa(Mt) {
2911
+ class qt extends Wa(Mt) {
2912
2912
  static getDefaults() {
2913
2913
  return w(w({}, super.getDefaults()), qt.ownDefaults);
2914
2914
  }
@@ -2982,7 +2982,7 @@ class qt extends Xa(Mt) {
2982
2982
  t.group && t.group.remove(t), t._set("parent", this), this._enterGroup(t, e);
2983
2983
  }
2984
2984
  _enterGroup(t, e) {
2985
- e && Ls(t, dt(Wt(this.calcTransformMatrix()), t.calcTransformMatrix())), this._shouldSetNestedCoords() && t.setCoords(), t._set("group", this), t._set("canvas", this.canvas), this._watchObject(!0, t);
2985
+ e && Ls(t, dt(Xt(this.calcTransformMatrix()), t.calcTransformMatrix())), this._shouldSetNestedCoords() && t.setCoords(), t._set("group", this), t._set("canvas", this.canvas), this._watchObject(!0, t);
2986
2986
  const s = this.canvas && this.canvas.getActiveObject && this.canvas.getActiveObject();
2987
2987
  s && (s === t || t.isDescendantOf(s)) && this._activeObjects.push(t);
2988
2988
  }
@@ -3014,7 +3014,7 @@ class qt extends Xa(Mt) {
3014
3014
  for (let n = 0; n < this._objects.length; n++) {
3015
3015
  var i;
3016
3016
  const r = this._objects[n];
3017
- (i = this.canvas) !== null && i !== void 0 && i.preserveObjectStacking && r.group !== this ? (t.save(), t.transform(...Wt(this.calcTransformMatrix())), r.render(t), t.restore()) : r.group === this && r.render(t);
3017
+ (i = this.canvas) !== null && i !== void 0 && i.preserveObjectStacking && r.group !== this ? (t.save(), t.transform(...Xt(this.calcTransformMatrix())), r.render(t), t.restore()) : r.group === this && r.render(t);
3018
3018
  }
3019
3019
  this._drawClipPath(t, this.clipPath, s);
3020
3020
  }
@@ -3306,7 +3306,7 @@ const Au = (a, t, e) => {
3306
3306
  e = a[l], l + 1 < a.length && (s = a[l + 1]);
3307
3307
  }
3308
3308
  return h && (i = e.x > a[l - 2].x ? 1 : e.x === a[l - 2].x ? 0 : -1, n = e.y > a[l - 2].y ? 1 : e.y === a[l - 2].y ? 0 : -1), r.push(["L", e.x + i * t, e.y + n * t]), r;
3309
- }, Wh = (a, t) => a.map(((e) => e.map(((s, i) => i === 0 || t === void 0 ? s : Q(s, t))).join(" "))).join(" ");
3309
+ }, Xh = (a, t) => a.map(((e) => e.map(((s, i) => i === 0 || t === void 0 ? s : Q(s, t))).join(" "))).join(" ");
3310
3310
  function mn(a, t) {
3311
3311
  const e = a.style;
3312
3312
  e && t && (typeof t == "string" ? e.cssText += ";" + t : Object.entries(t).forEach(((s) => {
@@ -3315,7 +3315,7 @@ function mn(a, t) {
3315
3315
  })));
3316
3316
  }
3317
3317
  const Ru = (a, t) => Math.floor(Math.random() * (t - a + 1)) + a;
3318
- function Xh(a) {
3318
+ function Wh(a) {
3319
3319
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3320
3320
  const e = t.onComplete || rs, s = new (di()).XMLHttpRequest(), i = t.signal, n = function() {
3321
3321
  s.abort();
@@ -3334,7 +3334,7 @@ const Ji = (a, t) => {
3334
3334
  const { scaleX: i, scaleY: n, angle: r, skewX: o } = as(s.transformMatrix);
3335
3335
  s.flipX = !1, s.flipY = !1, s.set(Ht, i), s.set(Kt, n), s.angle = r, s.skewX = o, s.skewY = 0;
3336
3336
  }
3337
- })(a), e = e.transform(a.transformMatrix)), delete a.transformMatrix, t && (a.scaleX *= t.scaleX, a.scaleY *= t.scaleY, a.cropX = t.cropX, a.cropY = t.cropY, e.x += t.offsetLeft, e.y += t.offsetTop, a.width = t.width, a.height = t.height), a.setPositionByOrigin(e, W, W);
3337
+ })(a), e = e.transform(a.transformMatrix)), delete a.transformMatrix, t && (a.scaleX *= t.scaleX, a.scaleY *= t.scaleY, a.cropX = t.cropX, a.cropY = t.cropY, e.x += t.offsetLeft, e.y += t.offsetTop, a.width = t.width, a.height = t.height), a.setPositionByOrigin(e, X, X);
3338
3338
  };
3339
3339
  var Fu = Object.freeze({ __proto__: null, addTransformToObject: nh, animate: so, animateColor: _h, applyTransformToObject: Ls, calcAngleBetweenVectors: un, calcDimensionsMatrix: fi, calcPlaneChangeMatrix: mi, calcVectorRotation: bh, cancelAnimFrame: Ya, capValue: ls, composeMatrix: Za, copyCanvasElement: (a) => {
3340
3340
  var t;
@@ -3361,16 +3361,16 @@ var Fu = Object.freeze({ __proto__: null, addTransformToObject: nh, animate: so,
3361
3361
  return t.concat(["offset", "stop-color", "stop-opacity"]);
3362
3362
  }
3363
3363
  return t;
3364
- }, getUnitVector: En, groupSVGElements: (a, t) => a && a.length === 1 ? a[0] : new qt(a, t), hasStyleChanged: Pn, invertTransform: Wt, isBetweenVectors: wr, isIdentityMatrix: qa, isTouchEvent: rn, isTransparent: Th, joinPath: Wh, loadImage: ti, magnitude: cn, makeBoundingBoxFromPoints: we, makePathSimpler: Nh, matrixToSVG: Ds, mergeClipPaths: (a, t) => {
3364
+ }, getUnitVector: En, groupSVGElements: (a, t) => a && a.length === 1 ? a[0] : new qt(a, t), hasStyleChanged: Pn, invertTransform: Xt, isBetweenVectors: wr, isIdentityMatrix: qa, isTouchEvent: rn, isTransparent: Th, joinPath: Xh, loadImage: ti, magnitude: cn, makeBoundingBoxFromPoints: we, makePathSimpler: Nh, matrixToSVG: Ds, mergeClipPaths: (a, t) => {
3365
3365
  var e;
3366
3366
  let s = a, i = t;
3367
3367
  s.inverted && !i.inverted && (s = t, i = a), yr(i, (e = i.group) === null || e === void 0 ? void 0 : e.calcTransformMatrix(), s.calcTransformMatrix());
3368
3368
  const n = s.inverted && i.inverted;
3369
3369
  return n && (s.inverted = i.inverted = !1), new qt([s], { clipPath: i, inverted: n });
3370
3370
  }, multiplyTransformMatrices: dt, multiplyTransformMatrixArray: Sn, parsePath: Vh, parsePreserveAspectRatioAttribute: Zr, parseUnit: Lt, pick: fs, projectStrokeOnPoints: kh, qrDecompose: as, radiansToDegrees: Ce, removeFromArray: qe, removeTransformFromObject: (a, t) => {
3371
- const e = Wt(t), s = dt(e, a.calcOwnMatrix());
3371
+ const e = Xt(t), s = dt(e, a.calcOwnMatrix());
3372
3372
  Ls(a, s);
3373
- }, removeTransformMatrixForSvgParsing: Ji, request: Xh, requestAnimFrame: Qs, resetObjectTransform: rh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: Qr, saveObjectTransform: Kr, sendObjectToPlane: yr, sendPointToPlane: os, sendVectorToPlane: oh, setStyle: mn, sin: ue, sizeAfterTransform: An, string: Jc, stylesFromArray: Oh, stylesToArray: Ph, toBlob: Ur, toDataURL: Xr, toFixed: Q, transformPath: (a, t, e) => (e && (t = dt(t, [1, 0, 0, 1, -e.x, -e.y])), a.map(((s) => {
3373
+ }, removeTransformMatrixForSvgParsing: Ji, request: Wh, requestAnimFrame: Qs, resetObjectTransform: rh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: Qr, saveObjectTransform: Kr, sendObjectToPlane: yr, sendPointToPlane: os, sendVectorToPlane: oh, setStyle: mn, sin: ue, sizeAfterTransform: An, string: Jc, stylesFromArray: Oh, stylesToArray: Ph, toBlob: Ur, toDataURL: Wr, toFixed: Q, transformPath: (a, t, e) => (e && (t = dt(t, [1, 0, 0, 1, -e.x, -e.y])), a.map(((s) => {
3374
3374
  const i = [...s];
3375
3375
  for (let n = 1; n < s.length - 1; n += 2) {
3376
3376
  const { x: r, y: o } = At({ x: s[n], y: s[n + 1] }, t);
@@ -3487,7 +3487,7 @@ class Dn extends pi {
3487
3487
  }
3488
3488
  _getOriginFromCorner(t, e) {
3489
3489
  const s = { x: t.originX, y: t.originY };
3490
- return e && (["ml", "tl", "bl"].includes(e) ? s.x = ut : ["mr", "tr", "br"].includes(e) && (s.x = J), ["tl", "mt", "tr"].includes(e) ? s.y = br : ["bl", "mb", "br"].includes(e) && (s.y = Xt)), s;
3490
+ return e && (["ml", "tl", "bl"].includes(e) ? s.x = ut : ["mr", "tr", "br"].includes(e) && (s.x = J), ["tl", "mt", "tr"].includes(e) ? s.y = br : ["bl", "mb", "br"].includes(e) && (s.y = Wt)), s;
3491
3491
  }
3492
3492
  _setupCurrentTransform(t, e, s) {
3493
3493
  var i;
@@ -3495,7 +3495,7 @@ class Dn extends pi {
3495
3495
  if (!g || !f) return "drag";
3496
3496
  const m = b.controls[g];
3497
3497
  return m.getActionName(p, m, b);
3498
- })(s, r, t, e), c = t[this.centeredKey], u = this._shouldCenterTransform(e, l, c) ? { x: W, y: W } : this._getOriginFromCorner(e, r), d = { target: e, action: l, actionHandler: h, actionPerformed: !1, corner: r, scaleX: e.scaleX, scaleY: e.scaleY, skewX: e.skewX, skewY: e.skewY, offsetX: n.x - e.left, offsetY: n.y - e.top, originX: u.x, originY: u.y, ex: n.x, ey: n.y, lastX: n.x, lastY: n.y, theta: lt(e.angle), width: e.width, height: e.height, shiftKey: t.shiftKey, altKey: c, original: w(w({}, Kr(e)), {}, { originX: u.x, originY: u.y }) };
3498
+ })(s, r, t, e), c = t[this.centeredKey], u = this._shouldCenterTransform(e, l, c) ? { x: X, y: X } : this._getOriginFromCorner(e, r), d = { target: e, action: l, actionHandler: h, actionPerformed: !1, corner: r, scaleX: e.scaleX, scaleY: e.scaleY, skewX: e.skewX, skewY: e.skewY, offsetX: n.x - e.left, offsetY: n.y - e.top, originX: u.x, originY: u.y, ex: n.x, ey: n.y, lastX: n.x, lastY: n.y, theta: lt(e.angle), width: e.width, height: e.height, shiftKey: t.shiftKey, altKey: c, original: w(w({}, Kr(e)), {}, { originX: u.x, originY: u.y }) };
3499
3499
  this._currentTransform = d, this.fire("before:transform", { e: t, transform: d });
3500
3500
  }
3501
3501
  setCursor(t) {
@@ -3570,7 +3570,7 @@ class Dn extends pi {
3570
3570
  let e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
3571
3571
  const s = this.upperCanvasEl, i = s.getBoundingClientRect();
3572
3572
  let n = ih(t), r = i.width || 0, o = i.height || 0;
3573
- r && o || (Xt in i && br in i && (o = Math.abs(i.top - i.bottom)), ut in i && J in i && (r = Math.abs(i.right - i.left))), this.calcOffset(), n.x = n.x - this._offset.left, n.y = n.y - this._offset.top, e || (n = os(n, void 0, this.viewportTransform));
3573
+ r && o || (Wt in i && br in i && (o = Math.abs(i.top - i.bottom)), ut in i && J in i && (r = Math.abs(i.right - i.left))), this.calcOffset(), n.x = n.x - this._offset.left, n.y = n.y - this._offset.top, e || (n = os(n, void 0, this.viewportTransform));
3574
3574
  const h = this.getRetinaScaling();
3575
3575
  h !== 1 && (n.x /= h, n.y /= h);
3576
3576
  const l = r === 0 || o === 0 ? new C(1, 1) : new C(s.width / r, s.height / o);
@@ -3656,7 +3656,7 @@ class Dn extends pi {
3656
3656
  _realizeGroupTransformOnObject(t) {
3657
3657
  const { group: e } = t;
3658
3658
  if (e && Ke(e) && this._activeObject === e) {
3659
- const s = fs(t, ["angle", "flipX", "flipY", J, Ht, Kt, Is, Ns, Xt]);
3659
+ const s = fs(t, ["angle", "flipX", "flipY", J, Ht, Kt, Is, Ns, Wt]);
3660
3660
  return nh(t, e.calcOwnMatrix()), s;
3661
3661
  }
3662
3662
  return {};
@@ -4052,7 +4052,7 @@ function Vu(a, t) {
4052
4052
  const n = new Z(e || a.getAttribute("stop-color") || "rgb(0,0,0)");
4053
4053
  return { offset: $h(a.getAttribute("offset"), 0), color: n.toRgb(), opacity: xs(parseFloat(s || a.getAttribute("stop-opacity") || ""), 1) * n.getAlpha() * t };
4054
4054
  }
4055
- function Wu(a, t) {
4055
+ function Xu(a, t) {
4056
4056
  const e = [], s = a.getElementsByTagName("stop"), i = $h(t, 1);
4057
4057
  for (let n = s.length; n--; ) e.push(Vu(s[n], i));
4058
4058
  return e;
@@ -4066,7 +4066,7 @@ function Kh(a) {
4066
4066
  function ie(a, t) {
4067
4067
  return a.getAttribute(t);
4068
4068
  }
4069
- function Xu(a, t) {
4069
+ function Wu(a, t) {
4070
4070
  return (function(e, s) {
4071
4071
  let i, { width: n, height: r, gradientUnits: o } = s;
4072
4072
  return Object.entries(e).reduce(((h, l) => {
@@ -4088,7 +4088,7 @@ function Xu(a, t) {
4088
4088
  class qs {
4089
4089
  constructor(t) {
4090
4090
  const { type: e = "linear", gradientUnits: s = "pixels", coords: i = {}, colorStops: n = [], offsetX: r = 0, offsetY: o = 0, gradientTransform: h, id: l } = t || {};
4091
- Object.assign(this, { type: e, gradientUnits: s, coords: w(w({}, e === "radial" ? Hu : Uh), i), colorStops: n, offsetX: r, offsetY: o, gradientTransform: h, id: l ? "".concat(l, "_").concat(We()) : We() });
4091
+ Object.assign(this, { type: e, gradientUnits: s, coords: w(w({}, e === "radial" ? Hu : Uh), i), colorStops: n, offsetX: r, offsetY: o, gradientTransform: h, id: l ? "".concat(l, "_").concat(Xe()) : Xe() });
4092
4092
  }
4093
4093
  addColorStop(t) {
4094
4094
  for (const e in t) {
@@ -4145,7 +4145,7 @@ class qs {
4145
4145
  }
4146
4146
  static fromElement(t, e, s) {
4147
4147
  const i = Kh(t), n = e._findCenterFromElement();
4148
- return new this(w({ id: t.getAttribute("id") || void 0, type: qh(t), coords: Xu(t, { width: s.viewBoxWidth || s.width, height: s.viewBoxHeight || s.height }), colorStops: Wu(t, s.opacity), gradientUnits: i, gradientTransform: dn(t.getAttribute("gradientTransform") || "") }, i === "pixels" ? { offsetX: e.width / 2 - n.x, offsetY: e.height / 2 - n.y } : { offsetX: 0, offsetY: 0 }));
4148
+ return new this(w({ id: t.getAttribute("id") || void 0, type: qh(t), coords: Wu(t, { width: s.viewBoxWidth || s.width, height: s.viewBoxHeight || s.height }), colorStops: Xu(t, s.opacity), gradientUnits: i, gradientTransform: dn(t.getAttribute("gradientTransform") || "") }, i === "pixels" ? { offsetX: e.width / 2 - n.x, offsetY: e.height / 2 - n.y } : { offsetX: 0, offsetY: 0 }));
4149
4149
  }
4150
4150
  }
4151
4151
  x(qs, "type", "Gradient"), F.setClass(qs, "gradient"), F.setClass(qs, "linear"), F.setClass(qs, "radial");
@@ -4158,7 +4158,7 @@ class er {
4158
4158
  Re("warn", "Setting type has no effect", t);
4159
4159
  }
4160
4160
  constructor(t) {
4161
- x(this, "repeat", "repeat"), x(this, "offsetX", 0), x(this, "offsetY", 0), x(this, "crossOrigin", ""), this.id = We(), Object.assign(this, t);
4161
+ x(this, "repeat", "repeat"), x(this, "offsetX", 0), x(this, "offsetY", 0), x(this, "crossOrigin", ""), this.id = Xe(), Object.assign(this, t);
4162
4162
  }
4163
4163
  isImageSource() {
4164
4164
  return !!this.source && typeof this.source.src == "string";
@@ -4194,7 +4194,7 @@ const Yu = ["path", "left", "top"], $u = ["d"];
4194
4194
  class Je extends Mt {
4195
4195
  constructor(t) {
4196
4196
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = st(e, Yu);
4197
- super(), Object.assign(this, Je.ownDefaults), this.setOptions(r), this._setPath(t || [], !0), typeof i == "number" && this.set(J, i), typeof n == "number" && this.set(Xt, n);
4197
+ super(), Object.assign(this, Je.ownDefaults), this.setOptions(r), this._setPath(t || [], !0), typeof i == "number" && this.set(J, i), typeof n == "number" && this.set(Wt, n);
4198
4198
  }
4199
4199
  _setPath(t, e) {
4200
4200
  this.path = Nh(Array.isArray(t) ? t : Vh(t)), this.setBoundingBox(e);
@@ -4239,7 +4239,7 @@ class Je extends Mt {
4239
4239
  return this.sourcePath && (delete e.path, e.sourcePath = this.sourcePath), e;
4240
4240
  }
4241
4241
  _toSVG() {
4242
- const t = Wh(this.path, q.NUM_FRACTION_DIGITS);
4242
+ const t = Xh(this.path, q.NUM_FRACTION_DIGITS);
4243
4243
  return ["<path ", "COMMON_PARTS", 'd="'.concat(t, `" stroke-linecap="round" />
4244
4244
  `)];
4245
4245
  }
@@ -4263,7 +4263,7 @@ class Je extends Mt {
4263
4263
  }
4264
4264
  setBoundingBox(t) {
4265
4265
  const { width: e, height: s, pathOffset: i } = this._calcDimensions();
4266
- this.set({ width: e, height: s, pathOffset: i }), t && this.setPositionByOrigin(i, W, W);
4266
+ this.set({ width: e, height: s, pathOffset: i }), t && this.setPositionByOrigin(i, X, X);
4267
4267
  }
4268
4268
  _calcBoundsFromPath() {
4269
4269
  const t = [];
@@ -4351,13 +4351,13 @@ class Ze extends Mt {
4351
4351
  let [t, e, s, i] = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [0, 0, 0, 0], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4352
4352
  super(), Object.assign(this, Ze.ownDefaults), this.setOptions(n), this.x1 = t, this.x2 = s, this.y1 = e, this.y2 = i, this._setWidthHeight();
4353
4353
  const { left: r, top: o } = n;
4354
- typeof r == "number" && this.set(J, r), typeof o == "number" && this.set(Xt, o);
4354
+ typeof r == "number" && this.set(J, r), typeof o == "number" && this.set(Wt, o);
4355
4355
  }
4356
4356
  _setWidthHeight() {
4357
4357
  const { x1: t, y1: e, x2: s, y2: i } = this;
4358
4358
  this.width = Math.abs(s - t), this.height = Math.abs(i - e);
4359
4359
  const { left: n, top: r, width: o, height: h } = we([{ x: t, y: e }, { x: s, y: i }]), l = new C(n + o / 2, r + h / 2);
4360
- this.setPositionByOrigin(l, W, W);
4360
+ this.setPositionByOrigin(l, X, X);
4361
4361
  }
4362
4362
  _set(t, e) {
4363
4363
  return super._set(t, e), kr.includes(t) && this._setWidthHeight(), this;
@@ -4473,7 +4473,7 @@ class oe extends Mt {
4473
4473
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4474
4474
  super(), x(this, "strokeDiff", void 0), Object.assign(this, oe.ownDefaults), this.setOptions(e), this.points = t;
4475
4475
  const { left: s, top: i } = e;
4476
- this.initialized = !0, this.setBoundingBox(!0), typeof s == "number" && this.set(J, s), typeof i == "number" && this.set(Xt, i);
4476
+ this.initialized = !0, this.setBoundingBox(!0), typeof s == "number" && this.set(J, s), typeof i == "number" && this.set(Wt, i);
4477
4477
  }
4478
4478
  isOpen() {
4479
4479
  return !0;
@@ -4498,7 +4498,7 @@ class oe extends Mt {
4498
4498
  }
4499
4499
  setBoundingBox(t) {
4500
4500
  const { left: e, top: s, width: i, height: n, pathOffset: r, strokeOffset: o, strokeDiff: h } = this._calcDimensions();
4501
- this.set({ width: i, height: n, pathOffset: r, strokeOffset: o, strokeDiff: h }), t && this.setPositionByOrigin(new C(e + i / 2, s + n / 2), W, W);
4501
+ this.set({ width: i, height: n, pathOffset: r, strokeOffset: o, strokeDiff: h }), t && this.setPositionByOrigin(new C(e + i / 2, s + n / 2), X, X);
4502
4502
  }
4503
4503
  isStrokeAccountedForInDimensions() {
4504
4504
  return this.exactBoundingBox;
@@ -4715,11 +4715,11 @@ class Ct extends tl {
4715
4715
  }
4716
4716
  _setTextStyles(t, e, s) {
4717
4717
  if (t.textBaseline = "alphabetic", this.path) switch (this.pathAlign) {
4718
- case W:
4718
+ case X:
4719
4719
  t.textBaseline = "middle";
4720
4720
  break;
4721
4721
  case "ascender":
4722
- t.textBaseline = Xt;
4722
+ t.textBaseline = Wt;
4723
4723
  break;
4724
4724
  case "descender":
4725
4725
  t.textBaseline = br;
@@ -4791,7 +4791,7 @@ class Ct extends tl {
4791
4791
  case J:
4792
4792
  c = n ? u - i : 0;
4793
4793
  break;
4794
- case W:
4794
+ case X:
4795
4795
  c = (u - i) / 2;
4796
4796
  break;
4797
4797
  case ut:
@@ -4901,7 +4901,7 @@ class Ct extends tl {
4901
4901
  _getLineLeftOffset(t) {
4902
4902
  const e = this.getLineWidth(t), s = this.width - e, i = this.textAlign, n = this.direction, r = this.isEndOfWrapping(t);
4903
4903
  let o = 0;
4904
- return i === ye || i === si && !r || i === ei && !r || i === hn && !r ? 0 : (i === W && (o = s / 2), i === ut && (o = s), i === si && (o = s / 2), i === ei && (o = s), n === "rtl" && (i === ut || i === ye || i === ei ? o = 0 : i === J || i === hn ? o = -s : i !== W && i !== si || (o = -s / 2)), o);
4904
+ return i === ye || i === si && !r || i === ei && !r || i === hn && !r ? 0 : (i === X && (o = s / 2), i === ut && (o = s), i === si && (o = s / 2), i === ei && (o = s), n === "rtl" && (i === ut || i === ye || i === ei ? o = 0 : i === J || i === hn ? o = -s : i !== X && i !== si || (o = -s / 2)), o);
4905
4905
  }
4906
4906
  _clearCache() {
4907
4907
  this._forceClearCache = !1, this.__lineWidths = [], this.__lineHeights = [], this.__charBounds = [];
@@ -4988,7 +4988,7 @@ class Ct extends tl {
4988
4988
  static async fromElement(t, e, s) {
4989
4989
  const i = Ne(t, Ct.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = J, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = zr, strokeWidth: f = 1 } = n, g = st(n, sd), p = new this(an(t.textContent || "").trim(), w({ left: u + h, top: c + l, underline: o.includes("underline"), overline: o.includes("overline"), linethrough: o.includes("line-through"), strokeWidth: 0, fontSize: d }, g)), b = p.getScaledHeight() / p.height, m = ((p.height + p.strokeWidth) * p.lineHeight - p.height) * b, v = p.getScaledHeight() + m;
4990
4990
  let y = 0;
4991
- return r === W && (y = p.getScaledWidth() / 2), r === ut && (y = p.getScaledWidth()), p.set({ left: p.left - y, top: p.top - (v - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
4991
+ return r === X && (y = p.getScaledWidth() / 2), r === ut && (y = p.getScaledWidth()), p.set({ left: p.left - y, top: p.top - (v - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
4992
4992
  }
4993
4993
  static fromObject(t) {
4994
4994
  return this._fromObject(w(w({}, t), {}, { styles: Oh(t.styles || {}, t.text) }), { extraParam: "text" });
@@ -5598,7 +5598,7 @@ class od extends rd {
5598
5598
  t.shiftKey ? this.setSelectionStartEndWithShift(s, i, e) : (this.selectionStart = e, this.selectionEnd = e), this.isEditing && (this._fireSelectionChanged(), this._updateTextarea());
5599
5599
  }
5600
5600
  getSelectionStartFromPointer(t) {
5601
- const e = this.canvas.getScenePoint(t).transform(Wt(this.calcTransformMatrix())).add(new C(-this._getLeftOffset(), -this._getTopOffset()));
5601
+ const e = this.canvas.getScenePoint(t).transform(Xt(this.calcTransformMatrix())).add(new C(-this._getLeftOffset(), -this._getTopOffset()));
5602
5602
  let s = 0, i = 0, n = 0;
5603
5603
  for (let l = 0; l < this._textLines.length && s <= e.y; l++) s += this.getHeightOfLine(l), n = l, l > 0 && (i += this._textLines[l - 1].length + this.missingNewlineOffset(l - 1));
5604
5604
  let r = Math.abs(this._getLineLeftOffset(n));
@@ -5712,7 +5712,7 @@ class De extends od {
5712
5712
  const r = this._getLineLeftOffset(n), o = this.__charBounds[n][i];
5713
5713
  o && (s = o.left), this.charSpacing !== 0 && i === this._textLines[n].length && (s -= this._getWidthOfCharSpacing());
5714
5714
  const h = { top: e, left: r + (s > 0 ? s : 0) };
5715
- return this.direction === "rtl" && (this.textAlign === ut || this.textAlign === ye || this.textAlign === ei ? h.left *= -1 : this.textAlign === J || this.textAlign === hn ? h.left = r - (s > 0 ? s : 0) : this.textAlign !== W && this.textAlign !== si || (h.left = r - (s > 0 ? s : 0))), h;
5715
+ return this.direction === "rtl" && (this.textAlign === ut || this.textAlign === ye || this.textAlign === ei ? h.left *= -1 : this.textAlign === J || this.textAlign === hn ? h.left = r - (s > 0 ? s : 0) : this.textAlign !== X && this.textAlign !== si || (h.left = r - (s > 0 ? s : 0))), h;
5716
5716
  }
5717
5717
  renderCursorAt(t) {
5718
5718
  this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(t, !0), t);
@@ -5755,7 +5755,7 @@ class De extends od {
5755
5755
  b = p, (this.lineHeight < 1 || f === c && this.lineHeight > 1) && (p /= this.lineHeight);
5756
5756
  let y = s.left + g + m, _ = p, S = 0;
5757
5757
  const A = v - m;
5758
- this.inCompositionMode ? (t.fillStyle = this.compositionColor || "black", _ = 1, S = p) : t.fillStyle = this.selectionColor, this.direction === "rtl" && (this.textAlign === ut || this.textAlign === ye || this.textAlign === ei ? y = this.width - y - A : this.textAlign === J || this.textAlign === hn ? y = s.left + g - v : this.textAlign !== W && this.textAlign !== si || (y = s.left + g - v)), t.fillRect(y, s.top + s.topOffset + S, A, _), s.topOffset += b;
5758
+ this.inCompositionMode ? (t.fillStyle = this.compositionColor || "black", _ = 1, S = p) : t.fillStyle = this.selectionColor, this.direction === "rtl" && (this.textAlign === ut || this.textAlign === ye || this.textAlign === ei ? y = this.width - y - A : this.textAlign === J || this.textAlign === hn ? y = s.left + g - v : this.textAlign !== X && this.textAlign !== si || (y = s.left + g - v)), t.fillRect(y, s.top + s.topOffset + S, A, _), s.topOffset += b;
5759
5759
  }
5760
5760
  }
5761
5761
  getCurrentCharFontSize() {
@@ -6120,7 +6120,7 @@ class Tt extends Mt {
6120
6120
  return w(w({}, super.getDefaults()), Tt.ownDefaults);
6121
6121
  }
6122
6122
  constructor(t, e) {
6123
- super(), x(this, "_lastScaleX", 1), x(this, "_lastScaleY", 1), x(this, "_filterScalingX", 1), x(this, "_filterScalingY", 1), this.filters = [], Object.assign(this, Tt.ownDefaults), this.setOptions(e), this.cacheKey = "texture".concat(We()), this.setElement(typeof t == "string" ? (this.canvas && ae(this.canvas.getElement()) || Fs()).getElementById(t) : t, e);
6123
+ super(), x(this, "_lastScaleX", 1), x(this, "_lastScaleY", 1), x(this, "_filterScalingX", 1), x(this, "_filterScalingY", 1), this.filters = [], Object.assign(this, Tt.ownDefaults), this.setOptions(e), this.cacheKey = "texture".concat(Xe()), this.setElement(typeof t == "string" ? (this.canvas && ae(this.canvas.getElement()) || Fs()).getElementById(t) : t, e);
6124
6124
  }
6125
6125
  getElement() {
6126
6126
  return this._element;
@@ -6167,7 +6167,7 @@ class Tt extends Mt {
6167
6167
  let n = [], r = [], o = "", h = "";
6168
6168
  if (!e) return [];
6169
6169
  if (this.hasCrop()) {
6170
- const l = We();
6170
+ const l = Xe();
6171
6171
  n.push('<clipPath id="imageCrop_' + l + `">
6172
6172
  `, ' <rect x="' + s + '" y="' + i + '" width="' + this.width + '" height="' + this.height + `" />
6173
6173
  `, `</clipPath>
@@ -6266,12 +6266,12 @@ function or(a) {
6266
6266
  if (!vc.test(a.nodeName)) return {};
6267
6267
  const t = a.getAttribute("viewBox");
6268
6268
  let e, s, i = 1, n = 1, r = 0, o = 0;
6269
- const h = a.getAttribute("width"), l = a.getAttribute("height"), c = a.getAttribute("x") || 0, u = a.getAttribute("y") || 0, d = !(t && Xo.test(t)), f = !h || !l || h === "100%" || l === "100%";
6269
+ const h = a.getAttribute("width"), l = a.getAttribute("height"), c = a.getAttribute("x") || 0, u = a.getAttribute("y") || 0, d = !(t && Wo.test(t)), f = !h || !l || h === "100%" || l === "100%";
6270
6270
  let g = "", p = 0, b = 0;
6271
6271
  if (d && (c || u) && a.parentNode && a.parentNode.nodeName !== "#document" && (g = " translate(" + Lt(c || "0") + " " + Lt(u || "0") + ") ", e = (a.getAttribute("transform") || "") + g, a.setAttribute("transform", e), a.removeAttribute("x"), a.removeAttribute("y")), d && f) return { width: 0, height: 0 };
6272
6272
  const m = { width: 0, height: 0 };
6273
6273
  if (d) return m.width = Lt(h), m.height = Lt(l), m;
6274
- const v = t.match(Xo);
6274
+ const v = t.match(Wo);
6275
6275
  r = -parseFloat(v[1]), o = -parseFloat(v[2]);
6276
6276
  const y = parseFloat(v[3]), _ = parseFloat(v[4]);
6277
6277
  m.minX = r, m.minY = o, m.viewBoxWidth = y, m.viewBoxHeight = _, f ? (m.width = y, m.height = _) : (m.width = Lt(h), m.height = Lt(l), i = m.width / y, n = m.height / _);
@@ -6367,7 +6367,7 @@ class md {
6367
6367
  async resolveClipPath(t, e, s) {
6368
6368
  const i = this.extractPropertyDefinition(t, "clipPath", this.clipPaths);
6369
6369
  if (i) {
6370
- const n = Wt(t.calcTransformMatrix()), r = i[0].parentElement;
6370
+ const n = Xt(t.calcTransformMatrix()), r = i[0].parentElement;
6371
6371
  let o = e;
6372
6372
  for (; !s && o.parentElement && o.getAttribute("clip-path") !== t.clipPath; ) o = o.parentElement;
6373
6373
  o.parentElement.appendChild(r);
@@ -6376,7 +6376,7 @@ class md {
6376
6376
  const l = await Promise.all(i.map(((v) => ma(v).fromElement(v, this.options, this.cssRules).then(((y) => (Ji(y), y.fillRule = y.clipRule, delete y.clipRule, y)))))), c = l.length === 1 ? l[0] : new qt(l), u = dt(n, c.calcTransformMatrix());
6377
6377
  c.clipPath && await this.resolveClipPath(c, o, r.getAttribute("clip-path") ? o : void 0);
6378
6378
  const { scaleX: d, scaleY: f, angle: g, skewX: p, translateX: b, translateY: m } = as(u);
6379
- c.set({ flipX: !1, flipY: !1 }), c.set({ scaleX: d, scaleY: f, angle: g, skewX: p, skewY: 0 }), c.setPositionByOrigin(new C(b, m), W, W), t.clipPath = c;
6379
+ c.set({ flipX: !1, flipY: !1 }), c.set({ scaleX: d, scaleY: f, angle: g, skewX: p, skewY: 0 }), c.setPositionByOrigin(new C(b, m), X, X), t.clipPath = c;
6380
6380
  } else delete t.clipPath;
6381
6381
  }
6382
6382
  }
@@ -6437,7 +6437,7 @@ async function bd(a, t) {
6437
6437
  function vd(a, t) {
6438
6438
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6439
6439
  return new Promise(((s, i) => {
6440
- Xh(a.replace(/^\n\s*/, "").trim(), { onComplete: (n) => {
6440
+ Wh(a.replace(/^\n\s*/, "").trim(), { onComplete: (n) => {
6441
6441
  const r = n.responseXML;
6442
6442
  r && s(r), i();
6443
6443
  }, signal: e.signal });
@@ -7528,7 +7528,7 @@ class Vi extends wt {
7528
7528
  }
7529
7529
  }
7530
7530
  x(Vi, "type", "Saturation"), x(Vi, "defaults", { saturation: 0 }), x(Vi, "uniformLocations", ["uSaturation"]), F.setClass(Vi);
7531
- class Wi extends wt {
7531
+ class Xi extends wt {
7532
7532
  getFragmentSource() {
7533
7533
  return `
7534
7534
  precision highp float;
@@ -7562,7 +7562,7 @@ class Wi extends wt {
7562
7562
  return this.vibrance === 0;
7563
7563
  }
7564
7564
  }
7565
- x(Wi, "type", "Vibrance"), x(Wi, "defaults", { vibrance: 0 }), x(Wi, "uniformLocations", ["uVibrance"]), F.setClass(Wi);
7565
+ x(Xi, "type", "Vibrance"), x(Xi, "defaults", { vibrance: 0 }), x(Xi, "uniformLocations", ["uVibrance"]), F.setClass(Xi);
7566
7566
  function Md(a) {
7567
7567
  return new Promise((t, e) => {
7568
7568
  const s = globalThis.URL.createObjectURL(a), i = new Image();
@@ -7589,7 +7589,7 @@ var V = globalThis.pdfjsLib = {};
7589
7589
  ii.d(V, {
7590
7590
  AbortException: () => (
7591
7591
  /* reexport */
7592
- Xe
7592
+ We
7593
7593
  ),
7594
7594
  AnnotationEditorLayer: () => (
7595
7595
  /* reexport */
@@ -7601,7 +7601,7 @@ ii.d(V, {
7601
7601
  ),
7602
7602
  AnnotationEditorType: () => (
7603
7603
  /* reexport */
7604
- X
7604
+ W
7605
7605
  ),
7606
7606
  AnnotationEditorUIManager: () => (
7607
7607
  /* reexport */
@@ -7749,7 +7749,7 @@ ii.d(V, {
7749
7749
  ),
7750
7750
  normalizeUnicode: () => (
7751
7751
  /* reexport */
7752
- Wd
7752
+ Xd
7753
7753
  ),
7754
7754
  setLayerDimensions: () => (
7755
7755
  /* reexport */
@@ -7782,7 +7782,7 @@ const kt = typeof process == "object" && process + "" == "[object process]" && !
7782
7782
  ENABLE: 1,
7783
7783
  ENABLE_FORMS: 2,
7784
7784
  ENABLE_STORAGE: 3
7785
- }, Dd = "pdfjs_internal_editor_", X = {
7785
+ }, Dd = "pdfjs_internal_editor_", W = {
7786
7786
  DISABLE: -1,
7787
7787
  NONE: 0,
7788
7788
  FREETEXT: 3,
@@ -7843,7 +7843,7 @@ const kt = typeof process == "object" && process + "" == "[object process]" && !
7843
7843
  POPUP: 16,
7844
7844
  FILEATTACHMENT: 17,
7845
7845
  WIDGET: 20
7846
- }, Ws = {
7846
+ }, Xs = {
7847
7847
  SOLID: 1,
7848
7848
  DASHED: 2,
7849
7849
  BEVELED: 3,
@@ -8039,7 +8039,7 @@ class Bd extends $e {
8039
8039
  super(t, "FormatError");
8040
8040
  }
8041
8041
  }
8042
- class Xe extends $e {
8042
+ class We extends $e {
8043
8043
  constructor(t) {
8044
8044
  super(t, "AbortException");
8045
8045
  }
@@ -8179,10 +8179,10 @@ function Vd(a) {
8179
8179
  return decodeURIComponent(escape(a));
8180
8180
  }
8181
8181
  let dr = null, _a = null;
8182
- function Wd(a) {
8182
+ function Xd(a) {
8183
8183
  return dr || (dr = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, _a = /* @__PURE__ */ new Map([["ſt", "ſt"]])), a.replaceAll(dr, (t, e, s) => e ? e.normalize("NFKC") : _a.get(s));
8184
8184
  }
8185
- function Xd() {
8185
+ function Wd() {
8186
8186
  if (typeof crypto.randomUUID == "function")
8187
8187
  return crypto.randomUUID();
8188
8188
  const a = new Uint8Array(32);
@@ -8652,7 +8652,7 @@ class Zd {
8652
8652
  }
8653
8653
  }
8654
8654
  class po {
8655
- #t = Xd();
8655
+ #t = Wd();
8656
8656
  #e = 0;
8657
8657
  #s = null;
8658
8658
  static get _isSVGFittingCanvas() {
@@ -8933,7 +8933,7 @@ class Ue {
8933
8933
  #O = null;
8934
8934
  #R = null;
8935
8935
  #I = null;
8936
- #C = X.NONE;
8936
+ #C = W.NONE;
8937
8937
  #y = /* @__PURE__ */ new Set();
8938
8938
  #L = null;
8939
8939
  #z = null;
@@ -8949,7 +8949,7 @@ class Ue {
8949
8949
  #N = [0, 0];
8950
8950
  #F = null;
8951
8951
  #j = null;
8952
- #W = null;
8952
+ #X = null;
8953
8953
  #D = null;
8954
8954
  static TRANSLATE_SMALL = 1;
8955
8955
  static TRANSLATE_BIG = 10;
@@ -9009,7 +9009,7 @@ class Ue {
9009
9009
  }
9010
9010
  constructor(t, e, s, i, n, r, o, h, l, c, u, d, f) {
9011
9011
  const g = this._signal = this.#t.signal;
9012
- this.#j = t, this.#W = e, this.#r = s, this._eventBus = i, i._on("editingaction", this.onEditingAction.bind(this), {
9012
+ this.#j = t, this.#X = e, this.#r = s, this._eventBus = i, i._on("editingaction", this.onEditingAction.bind(this), {
9013
9013
  signal: g
9014
9014
  }), i._on("pagechanging", this.onPageChanging.bind(this), {
9015
9015
  signal: g
@@ -9113,7 +9113,7 @@ class Ue {
9113
9113
  return null;
9114
9114
  }
9115
9115
  disableUserSelect(t = !1) {
9116
- this.#W.classList.toggle("noUserSelect", t);
9116
+ this.#X.classList.toggle("noUserSelect", t);
9117
9117
  }
9118
9118
  addShouldRescale(t) {
9119
9119
  this.#g.add(t);
@@ -9163,7 +9163,7 @@ class Ue {
9163
9163
  if (!c)
9164
9164
  return;
9165
9165
  e.empty();
9166
- const u = this.#Y(l), d = this.#C === X.NONE, f = () => {
9166
+ const u = this.#Y(l), d = this.#C === W.NONE, f = () => {
9167
9167
  u?.createAndAddNewEditor({
9168
9168
  x: 0,
9169
9169
  y: 0
@@ -9178,7 +9178,7 @@ class Ue {
9178
9178
  }), d && this.showAllEditors("highlight", !0, !0);
9179
9179
  };
9180
9180
  if (d) {
9181
- this.switchToMode(X.HIGHLIGHT, f);
9181
+ this.switchToMode(W.HIGHLIGHT, f);
9182
9182
  return;
9183
9183
  }
9184
9184
  f();
@@ -9215,8 +9215,8 @@ class Ue {
9215
9215
  }
9216
9216
  if (this.#E?.hide(), this.#L = e, this.#P({
9217
9217
  hasSelectedText: !0
9218
- }), !(this.#C !== X.HIGHLIGHT && this.#C !== X.NONE) && (this.#C === X.HIGHLIGHT && this.showAllEditors("highlight", !0, !0), this.#A = this.isShiftKeyDown, !this.isShiftKeyDown)) {
9219
- const n = this.#C === X.HIGHLIGHT ? this.#Y(i) : null;
9218
+ }), !(this.#C !== W.HIGHLIGHT && this.#C !== W.NONE) && (this.#C === W.HIGHLIGHT && this.showAllEditors("highlight", !0, !0), this.#A = this.isShiftKeyDown, !this.isShiftKeyDown)) {
9219
+ const n = this.#C === W.HIGHLIGHT ? this.#Y(i) : null;
9220
9220
  n?.toggleDrawing();
9221
9221
  const r = new AbortController(), o = this.combinedSignal(r), h = (l) => {
9222
9222
  l.type === "pointerup" && l.button !== 0 || (r.abort(), n?.toggleDrawing(!0), l.type === "pointerup" && this.#U("main_toolbar"));
@@ -9229,7 +9229,7 @@ class Ue {
9229
9229
  }
9230
9230
  }
9231
9231
  #U(t = "") {
9232
- this.#C === X.HIGHLIGHT ? this.highlightSelection(t) : this.#m && this.#Q();
9232
+ this.#C === W.HIGHLIGHT ? this.highlightSelection(t) : this.#m && this.#Q();
9233
9233
  }
9234
9234
  #et() {
9235
9235
  document.addEventListener("selectionchange", this.#tt.bind(this), {
@@ -9398,7 +9398,7 @@ class Ue {
9398
9398
  }
9399
9399
  }
9400
9400
  keydown(t) {
9401
- !this.isShiftKeyDown && t.key === "Shift" && (this.isShiftKeyDown = !0), this.#C !== X.NONE && !this.isEditorHandlingKeyboard && Ue._keyboardManager.exec(this, t);
9401
+ !this.isShiftKeyDown && t.key === "Shift" && (this.isShiftKeyDown = !0), this.#C !== W.NONE && !this.isEditorHandlingKeyboard && Ue._keyboardManager.exec(this, t);
9402
9402
  }
9403
9403
  keyup(t) {
9404
9404
  this.isShiftKeyDown && t.key === "Shift" && (this.isShiftKeyDown = !1, this.#A && (this.#A = !1, this.#U("main_toolbar")));
@@ -9422,7 +9422,7 @@ class Ue {
9422
9422
  Object.entries(t).some(([s, i]) => this.#V[s] !== i) && (this._eventBus.dispatch("annotationeditorstateschanged", {
9423
9423
  source: this,
9424
9424
  details: Object.assign(this.#V, t)
9425
- }), this.#C === X.HIGHLIGHT && t.hasSelectedEditor === !1 && this.#H([[$.HIGHLIGHT_FREE, !0]]));
9425
+ }), this.#C === W.HIGHLIGHT && t.hasSelectedEditor === !1 && this.#H([[$.HIGHLIGHT_FREE, !0]]));
9426
9426
  }
9427
9427
  #H(t) {
9428
9428
  this._eventBus.dispatch("annotationeditorparamschanged", {
@@ -9432,8 +9432,8 @@ class Ue {
9432
9432
  }
9433
9433
  setEditingState(t) {
9434
9434
  t ? (this.#st(), this.#q(), this.#P({
9435
- isEditing: this.#C !== X.NONE,
9436
- isEmpty: this.#X(),
9435
+ isEditing: this.#C !== W.NONE,
9436
+ isEmpty: this.#W(),
9437
9437
  hasSomethingToUndo: this.#a.hasSomethingToUndo(),
9438
9438
  hasSomethingToRedo: this.#a.hasSomethingToRedo(),
9439
9439
  hasSelectedEditor: !1
@@ -9468,7 +9468,7 @@ class Ue {
9468
9468
  }
9469
9469
  async updateMode(t, e = null, s = !1) {
9470
9470
  if (this.#C !== t && !(this.#D && (await this.#D.promise, !this.#D))) {
9471
- if (this.#D = Promise.withResolvers(), this.#C = t, t === X.NONE) {
9471
+ if (this.#D = Promise.withResolvers(), this.#C = t, t === W.NONE) {
9472
9472
  this.setEditingState(!1), this.#at(), this._editorUndoBar?.hide(), this.#D.resolve();
9473
9473
  return;
9474
9474
  }
@@ -9638,27 +9638,27 @@ class Ue {
9638
9638
  this.#a.undo(), this.#P({
9639
9639
  hasSomethingToUndo: this.#a.hasSomethingToUndo(),
9640
9640
  hasSomethingToRedo: !0,
9641
- isEmpty: this.#X()
9641
+ isEmpty: this.#W()
9642
9642
  }), this._editorUndoBar?.hide();
9643
9643
  }
9644
9644
  redo() {
9645
9645
  this.#a.redo(), this.#P({
9646
9646
  hasSomethingToUndo: !0,
9647
9647
  hasSomethingToRedo: this.#a.hasSomethingToRedo(),
9648
- isEmpty: this.#X()
9648
+ isEmpty: this.#W()
9649
9649
  });
9650
9650
  }
9651
9651
  addCommands(t) {
9652
9652
  this.#a.add(t), this.#P({
9653
9653
  hasSomethingToUndo: !0,
9654
9654
  hasSomethingToRedo: !1,
9655
- isEmpty: this.#X()
9655
+ isEmpty: this.#W()
9656
9656
  });
9657
9657
  }
9658
9658
  cleanUndoStack(t) {
9659
9659
  this.#a.cleanType(t);
9660
9660
  }
9661
- #X() {
9661
+ #W() {
9662
9662
  if (this.#s.size === 0)
9663
9663
  return !0;
9664
9664
  if (this.#s.size === 1)
@@ -9707,7 +9707,7 @@ class Ue {
9707
9707
  this.#Z(this.#s.values());
9708
9708
  }
9709
9709
  unselectAll() {
9710
- if (!(this.#e && (this.#e.commitOrRemove(), this.#C !== X.NONE)) && !this.#l?.commitOrRemove() && this.hasSelection) {
9710
+ if (!(this.#e && (this.#e.commitOrRemove(), this.#C !== W.NONE)) && !this.#l?.commitOrRemove() && this.hasSelection) {
9711
9711
  for (const t of this.#y)
9712
9712
  t.unselect();
9713
9713
  this.#y.clear(), this.#P({
@@ -9896,7 +9896,7 @@ class Ue {
9896
9896
  if (!e)
9897
9897
  return;
9898
9898
  const s = this.#n.getRawValue(e);
9899
- s && (this.#C === X.NONE && !s.hasBeenModified || s.renderAnnotationElement(t));
9899
+ s && (this.#C === W.NONE && !s.hasBeenModified || s.renderAnnotationElement(t));
9900
9900
  }
9901
9901
  }
9902
9902
  class be {
@@ -10926,7 +10926,7 @@ class z {
10926
10926
  signal: h
10927
10927
  }), l.addEventListener("blur", o, {
10928
10928
  signal: h
10929
- }), l.addEventListener("focus", this.#W.bind(this, c), {
10929
+ }), l.addEventListener("focus", this.#X.bind(this, c), {
10930
10930
  signal: h
10931
10931
  }), l.setAttribute("data-l10n-id", z._l10nResizer[c]);
10932
10932
  }
@@ -10962,7 +10962,7 @@ class z {
10962
10962
  #j(t) {
10963
10963
  this.#p && t.relatedTarget?.parentNode !== this.#a && this.#B();
10964
10964
  }
10965
- #W(t) {
10965
+ #X(t) {
10966
10966
  this.#u = this.#p ? t : "";
10967
10967
  }
10968
10968
  #D(t) {
@@ -11478,7 +11478,7 @@ class sf {
11478
11478
  return this.fontExtraProperties || t.delete(s), this.compiledGlyphs[e] = n;
11479
11479
  }
11480
11480
  }
11481
- const Xi = {
11481
+ const Wi = {
11482
11482
  DATA: 1,
11483
11483
  ERROR: 2
11484
11484
  }, pt = {
@@ -11494,11 +11494,11 @@ const Xi = {
11494
11494
  function Sa() {
11495
11495
  }
11496
11496
  function Gt(a) {
11497
- if (a instanceof Xe || a instanceof Or || a instanceof ci || a instanceof ya || a instanceof vn || a instanceof cr)
11497
+ if (a instanceof We || a instanceof Or || a instanceof ci || a instanceof ya || a instanceof vn || a instanceof cr)
11498
11498
  return a;
11499
11499
  switch (a instanceof Error || typeof a == "object" && a !== null || tt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'), a.name) {
11500
11500
  case "AbortException":
11501
- return new Xe(a.message);
11501
+ return new We(a.message);
11502
11502
  case "InvalidPDFException":
11503
11503
  return new Or(a.message);
11504
11504
  case "MissingPDFException":
@@ -11532,9 +11532,9 @@ class Js {
11532
11532
  const s = t.callbackId, i = this.callbackCapabilities[s];
11533
11533
  if (!i)
11534
11534
  throw new Error(`Cannot resolve callback ${s}`);
11535
- if (delete this.callbackCapabilities[s], t.callback === Xi.DATA)
11535
+ if (delete this.callbackCapabilities[s], t.callback === Wi.DATA)
11536
11536
  i.resolve(t.data);
11537
- else if (t.callback === Xi.ERROR)
11537
+ else if (t.callback === Wi.ERROR)
11538
11538
  i.reject(Gt(t.reason));
11539
11539
  else
11540
11540
  throw new Error("Unexpected callback case");
@@ -11549,7 +11549,7 @@ class Js {
11549
11549
  n.postMessage({
11550
11550
  sourceName: s,
11551
11551
  targetName: i,
11552
- callback: Xi.DATA,
11552
+ callback: Wi.DATA,
11553
11553
  callbackId: t.callbackId,
11554
11554
  data: r
11555
11555
  });
@@ -11557,7 +11557,7 @@ class Js {
11557
11557
  n.postMessage({
11558
11558
  sourceName: s,
11559
11559
  targetName: i,
11560
- callback: Xi.ERROR,
11560
+ callback: Wi.ERROR,
11561
11561
  callbackId: t.callbackId,
11562
11562
  reason: Gt(r)
11563
11563
  });
@@ -12604,7 +12604,7 @@ function Oa(a, t) {
12604
12604
  })), a.putImageData(o, 0, u * Vt);
12605
12605
  }
12606
12606
  }
12607
- function Xs(a, t) {
12607
+ function Ws(a, t) {
12608
12608
  const e = ["strokeStyle", "fillStyle", "fillRule", "globalAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "globalCompositeOperation", "font", "filter"];
12609
12609
  for (const s of e)
12610
12610
  a[s] !== void 0 && (t[s] = a[s]);
@@ -12825,12 +12825,12 @@ class Es {
12825
12825
  const t = this.ctx.canvas.width, e = this.ctx.canvas.height, s = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(s, t, e);
12826
12826
  this.suspendedCtx = this.ctx, this.ctx = i.context;
12827
12827
  const n = this.ctx;
12828
- n.setTransform(...rt(this.suspendedCtx)), Xs(this.suspendedCtx, n), bf(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
12828
+ n.setTransform(...rt(this.suspendedCtx)), Ws(this.suspendedCtx, n), bf(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
12829
12829
  }
12830
12830
  endSMaskMode() {
12831
12831
  if (!this.inSMaskMode)
12832
12832
  throw new Error("endSMaskMode called while not in smask mode");
12833
- this.ctx._removeMirroring(), Xs(this.ctx, this.suspendedCtx), this.ctx = this.suspendedCtx, this.suspendedCtx = null;
12833
+ this.ctx._removeMirroring(), Ws(this.ctx, this.suspendedCtx), this.ctx = this.suspendedCtx, this.suspendedCtx = null;
12834
12834
  }
12835
12835
  compose(t) {
12836
12836
  if (!this.current.activeSMask)
@@ -12861,12 +12861,12 @@ class Es {
12861
12861
  p.rect(h, l, s, i), e.clip(p), e.globalCompositeOperation = "destination-in", e.drawImage(d, f, g, s, i, h, l, s, i), e.restore();
12862
12862
  }
12863
12863
  save() {
12864
- this.inSMaskMode ? (Xs(this.ctx, this.suspendedCtx), this.suspendedCtx.save()) : this.ctx.save();
12864
+ this.inSMaskMode ? (Ws(this.ctx, this.suspendedCtx), this.suspendedCtx.save()) : this.ctx.save();
12865
12865
  const t = this.current;
12866
12866
  this.stateStack.push(t), this.current = t.clone();
12867
12867
  }
12868
12868
  restore() {
12869
- this.stateStack.length === 0 && this.inSMaskMode && this.endSMaskMode(), this.stateStack.length !== 0 && (this.current = this.stateStack.pop(), this.inSMaskMode ? (this.suspendedCtx.restore(), Xs(this.suspendedCtx, this.ctx)) : this.ctx.restore(), this.checkSMaskState(), this.pendingClip = null, this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null);
12869
+ this.stateStack.length === 0 && this.inSMaskMode && this.endSMaskMode(), this.stateStack.length !== 0 && (this.current = this.stateStack.pop(), this.inSMaskMode ? (this.suspendedCtx.restore(), Ws(this.suspendedCtx, this.ctx)) : this.ctx.restore(), this.checkSMaskState(), this.pendingClip = null, this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null);
12870
12870
  }
12871
12871
  transform(t, e, s, i, n, r) {
12872
12872
  this.ctx.transform(t, e, s, i, n, r), this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null;
@@ -13241,7 +13241,7 @@ class Es {
13241
13241
  backdrop: t.smask.backdrop,
13242
13242
  transferMap: t.smask.transferMap || null,
13243
13243
  startTransformInverse: null
13244
- }) : (e.setTransform(1, 0, 0, 1, 0, 0), e.translate(r, o), e.save()), Xs(e, d), this.ctx = d, this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]), this.groupStack.push(e), this.groupLevel++;
13244
+ }) : (e.setTransform(1, 0, 0, 1, 0, 0), e.translate(r, o), e.save()), Ws(e, d), this.ctx = d, this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]), this.groupStack.push(e), this.groupLevel++;
13245
13245
  }
13246
13246
  endGroup(t) {
13247
13247
  if (!this.contentVisible)
@@ -14130,7 +14130,7 @@ class Pf {
14130
14130
  rangeChunkSize: this._rangeChunkSize,
14131
14131
  disableRange: this._disableRange
14132
14132
  });
14133
- this._isRangeSupported = o, this._contentLength = h || this._contentLength, this._filename = wl(r), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new Xe("Streaming is disabled."));
14133
+ this._isRangeSupported = o, this._contentLength = h || this._contentLength, this._filename = wl(r), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new We("Streaming is disabled."));
14134
14134
  }).catch(this._headersCapability.reject), this.onProgress = null;
14135
14135
  }
14136
14136
  get headersReady() {
@@ -14553,7 +14553,7 @@ class Hf {
14553
14553
  t.destroy(), this._done = !0, this._readCapability.resolve();
14554
14554
  }), t.on("error", (e) => {
14555
14555
  this._error(e);
14556
- }), !this._isStreamingSupported && this._isRangeSupported && this._error(new Xe("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
14556
+ }), !this._isStreamingSupported && this._isRangeSupported && this._error(new We("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
14557
14557
  }
14558
14558
  }
14559
14559
  class zf {
@@ -14703,7 +14703,7 @@ class Dt {
14703
14703
  }
14704
14704
  }
14705
14705
  cancel() {
14706
- const t = new Xe("TextLayer task cancelled.");
14706
+ const t = new We("TextLayer task cancelled.");
14707
14707
  this.#c?.cancel(t).catch(() => {
14708
14708
  }), this.#c = null, this.#t.reject(t);
14709
14709
  }
@@ -14882,7 +14882,7 @@ class ui {
14882
14882
  return !(t === "textarea" || t === "input" || t === "option" || t === "select");
14883
14883
  }
14884
14884
  }
14885
- const Wf = 65536, Xf = 100, Uf = 5e3, Yf = kt ? af : nf, $f = kt ? hf : gl, qf = kt ? of : rf, Kf = kt ? lf : bl;
14885
+ const Xf = 65536, Wf = 100, Uf = 5e3, Yf = kt ? af : nf, $f = kt ? hf : gl, qf = kt ? of : rf, Kf = kt ? lf : bl;
14886
14886
  function Jf(a = {}) {
14887
14887
  typeof a == "string" || a instanceof URL ? a = {
14888
14888
  url: a
@@ -14891,7 +14891,7 @@ function Jf(a = {}) {
14891
14891
  });
14892
14892
  const t = new _o(), {
14893
14893
  docId: e
14894
- } = t, s = a.url ? Zf(a.url) : null, i = a.data ? Qf(a.data) : null, n = a.httpHeaders || null, r = a.withCredentials === !0, o = a.password ?? null, h = a.range instanceof Al ? a.range : null, l = Number.isInteger(a.rangeChunkSize) && a.rangeChunkSize > 0 ? a.rangeChunkSize : Wf;
14894
+ } = t, s = a.url ? Zf(a.url) : null, i = a.data ? Qf(a.data) : null, n = a.httpHeaders || null, r = a.withCredentials === !0, o = a.password ?? null, h = a.range instanceof Al ? a.range : null, l = Number.isInteger(a.rangeChunkSize) && a.rangeChunkSize > 0 ? a.rangeChunkSize : Xf;
14895
14895
  let c = a.worker instanceof ks ? a.worker : null;
14896
14896
  const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Bn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory || $f, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || Kf, v = a.stopAtErrors !== !0, y = Number.isInteger(a.maxImageSize) && a.maxImageSize > -1 ? a.maxImageSize : -1, _ = a.isEvalSupported !== !1, S = typeof a.isOffscreenCanvasSupported == "boolean" ? a.isOffscreenCanvasSupported : !kt, A = typeof a.isImageDecoderSupported == "boolean" ? a.isImageDecoderSupported : !kt && (jt.platform.isFirefox || !globalThis.chrome), T = Number.isInteger(a.canvasMaxAreaInBytes) ? a.canvasMaxAreaInBytes : -1, E = typeof a.disableFontFace == "boolean" ? a.disableFontFace : kt, O = a.fontExtraProperties === !0, N = a.enableXfa === !0, D = a.ownerDocument || globalThis.document, R = a.disableRange === !0, k = a.disableStream === !0, P = a.disableAutoFetch === !0, j = a.pdfBug === !0, M = a.CanvasFactory || Yf, L = a.FilterFactory || qf, G = a.enableHWA === !0, it = h ? h.length : a.length ?? NaN, at = typeof a.useSystemFonts == "boolean" ? a.useSystemFonts : !kt && !E, xt = typeof a.useWorkerFetch == "boolean" ? a.useWorkerFetch : p === gl && m === bl && f && b && Ks(f, document.baseURI) && Ks(b, document.baseURI), gt = null;
14897
14897
  Fd(u);
@@ -15492,7 +15492,7 @@ class eg {
15492
15492
  if (t.renderTasks.size > 0)
15493
15493
  return;
15494
15494
  if (e instanceof uo) {
15495
- let i = Xf;
15495
+ let i = Wf;
15496
15496
  e.extraDelay > 0 && e.extraDelay < 1e3 && (i += e.extraDelay), t.streamReaderCancelTimeout = setTimeout(() => {
15497
15497
  t.streamReaderCancelTimeout = null, this._abortOperatorList({
15498
15498
  intentState: t,
@@ -15503,7 +15503,7 @@ class eg {
15503
15503
  return;
15504
15504
  }
15505
15505
  }
15506
- if (t.streamReader.cancel(new Xe(e.message)).catch(() => {
15506
+ if (t.streamReader.cancel(new We(e.message)).catch(() => {
15507
15507
  }), t.streamReader = null, !this._transport.destroyed) {
15508
15508
  for (const [i, n] of this._intentStates)
15509
15509
  if (n === t) {
@@ -15773,7 +15773,7 @@ class ig {
15773
15773
  this.#e.clear(), this.#s.clear(), this.#i.clear(), this.hasOwnProperty("annotationStorage") && this.annotationStorage.resetModified();
15774
15774
  const e = this.messageHandler.sendWithPromise("Terminate", null);
15775
15775
  return t.push(e), Promise.all(t).then(() => {
15776
- this.commonObjs.clear(), this.fontLoader.clear(), this.#t.clear(), this.filterFactory.destroy(), Dt.cleanup(), this._networkStream?.cancelAllRequests(new Xe("Worker was terminated.")), this.messageHandler?.destroy(), this.messageHandler = null, this.destroyCapability.resolve();
15776
+ this.commonObjs.clear(), this.fontLoader.clear(), this.#t.clear(), this.filterFactory.destroy(), Dt.cleanup(), this._networkStream?.cancelAllRequests(new We("Worker was terminated.")), this.messageHandler?.destroy(), this.messageHandler = null, this.destroyCapability.resolve();
15777
15777
  }, this.destroyCapability.reject), this.destroyCapability.promise;
15778
15778
  }
15779
15779
  setupMessageHandler() {
@@ -16625,19 +16625,19 @@ class ft {
16625
16625
  r.borderRadius = v;
16626
16626
  }
16627
16627
  switch (e.borderStyle.style) {
16628
- case Ws.SOLID:
16628
+ case Xs.SOLID:
16629
16629
  r.borderStyle = "solid";
16630
16630
  break;
16631
- case Ws.DASHED:
16631
+ case Xs.DASHED:
16632
16632
  r.borderStyle = "dashed";
16633
16633
  break;
16634
- case Ws.BEVELED:
16634
+ case Xs.BEVELED:
16635
16635
  U("Unimplemented border style: beveled");
16636
16636
  break;
16637
- case Ws.INSET:
16637
+ case Xs.INSET:
16638
16638
  U("Unimplemented border style: inset");
16639
16639
  break;
16640
- case Ws.UNDERLINE:
16640
+ case Xs.UNDERLINE:
16641
16641
  r.borderBottomStyle = "solid";
16642
16642
  break;
16643
16643
  }
@@ -17796,7 +17796,7 @@ class Pl extends ft {
17796
17796
  super(t, {
17797
17797
  isRenderable: !0,
17798
17798
  ignoreBorder: !0
17799
- }), this.textContent = t.data.textContent, this.textPosition = t.data.textPosition, this.annotationEditorType = X.FREETEXT;
17799
+ }), this.textContent = t.data.textContent, this.textPosition = t.data.textPosition, this.annotationEditorType = W.FREETEXT;
17800
17800
  }
17801
17801
  render() {
17802
17802
  if (this.container.classList.add("freeTextAnnotation"), this.textContent) {
@@ -17943,7 +17943,7 @@ class xo extends ft {
17943
17943
  super(t, {
17944
17944
  isRenderable: !0,
17945
17945
  ignoreBorder: !0
17946
- }), this.containerClassName = "inkAnnotation", this.svgElementName = "svg:polyline", this.annotationEditorType = this.data.it === "InkHighlight" ? X.HIGHLIGHT : X.INK;
17946
+ }), this.containerClassName = "inkAnnotation", this.svgElementName = "svg:polyline", this.annotationEditorType = this.data.it === "InkHighlight" ? W.HIGHLIGHT : W.INK;
17947
17947
  }
17948
17948
  #s(t, e) {
17949
17949
  switch (t) {
@@ -18027,7 +18027,7 @@ class Dl extends ft {
18027
18027
  isRenderable: !0,
18028
18028
  ignoreBorder: !0,
18029
18029
  createQuadrilaterals: !0
18030
- }), this.annotationEditorType = X.HIGHLIGHT;
18030
+ }), this.annotationEditorType = W.HIGHLIGHT;
18031
18031
  }
18032
18032
  render() {
18033
18033
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("highlightAnnotation"), this._editOnDoubleClick(), this.container;
@@ -18074,7 +18074,7 @@ class Ll extends ft {
18074
18074
  super(t, {
18075
18075
  isRenderable: !0,
18076
18076
  ignoreBorder: !0
18077
- }), this.annotationEditorType = X.STAMP;
18077
+ }), this.annotationEditorType = W.STAMP;
18078
18078
  }
18079
18079
  render() {
18080
18080
  return this.container.classList.add("stampAnnotation"), this.container.setAttribute("role", "img"), !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
@@ -18268,7 +18268,7 @@ class _t extends z {
18268
18268
  }]]));
18269
18269
  }
18270
18270
  static _type = "freetext";
18271
- static _editorType = X.FREETEXT;
18271
+ static _editorType = W.FREETEXT;
18272
18272
  constructor(t) {
18273
18273
  super({
18274
18274
  ...t,
@@ -18347,7 +18347,7 @@ class _t extends z {
18347
18347
  enableEditMode() {
18348
18348
  if (this.isInEditMode())
18349
18349
  return;
18350
- this.parent.setEditingState(!1), this.parent.updateToolbar(X.FREETEXT), super.enableEditMode(), this.overlayDiv.classList.remove("enabled"), this.editorDiv.contentEditable = !0, this._isDraggable = !1, this.div.removeAttribute("aria-activedescendant"), this.#i = new AbortController();
18350
+ this.parent.setEditingState(!1), this.parent.updateToolbar(W.FREETEXT), super.enableEditMode(), this.overlayDiv.classList.remove("enabled"), this.editorDiv.contentEditable = !0, this._isDraggable = !1, this.div.removeAttribute("aria-activedescendant"), this.#i = new AbortController();
18351
18351
  const t = this._uiManager.combinedSignal(this.#i);
18352
18352
  this.editorDiv.addEventListener("keydown", this.editorDivKeydown.bind(this), {
18353
18353
  signal: t
@@ -18601,7 +18601,7 @@ class _t extends z {
18601
18601
  if (!d || d.length === 0)
18602
18602
  return null;
18603
18603
  i = t = {
18604
- annotationType: X.FREETEXT,
18604
+ annotationType: W.FREETEXT,
18605
18605
  color: Array.from(o),
18606
18606
  fontSize: r,
18607
18607
  value: d.join(`
@@ -18624,7 +18624,7 @@ class _t extends z {
18624
18624
  if (this.deleted)
18625
18625
  return this.serializeDeleted();
18626
18626
  const e = _t._internalPadding * this.parentScale, s = this.getRect(e, e), i = z._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.#t), n = {
18627
- annotationType: X.FREETEXT,
18627
+ annotationType: W.FREETEXT,
18628
18628
  color: i,
18629
18629
  fontSize: this.#r,
18630
18630
  value: this.#u(),
@@ -19275,7 +19275,7 @@ class ct extends z {
19275
19275
  static _defaultOpacity = 1;
19276
19276
  static _defaultThickness = 12;
19277
19277
  static _type = "highlight";
19278
- static _editorType = X.HIGHLIGHT;
19278
+ static _editorType = W.HIGHLIGHT;
19279
19279
  static _freeHighlightId = -1;
19280
19280
  static _freeHighlight = null;
19281
19281
  static _freeHighlightClipId = "";
@@ -19746,7 +19746,7 @@ class ct extends z {
19746
19746
  }
19747
19747
  } = t;
19748
19748
  i = t = {
19749
- annotationType: X.HIGHLIGHT,
19749
+ annotationType: W.HIGHLIGHT,
19750
19750
  color: Array.from(v),
19751
19751
  opacity: y,
19752
19752
  quadPoints: g,
@@ -19778,7 +19778,7 @@ class ct extends z {
19778
19778
  }
19779
19779
  } = t;
19780
19780
  i = t = {
19781
- annotationType: X.HIGHLIGHT,
19781
+ annotationType: W.HIGHLIGHT,
19782
19782
  color: Array.from(v),
19783
19783
  thickness: y,
19784
19784
  inkLists: g,
@@ -19849,7 +19849,7 @@ class ct extends z {
19849
19849
  if (this.deleted)
19850
19850
  return this.serializeDeleted();
19851
19851
  const e = this.getRect(0, 0), s = z._colorManager.convert(this.color), i = {
19852
- annotationType: X.HIGHLIGHT,
19852
+ annotationType: W.HIGHLIGHT,
19853
19853
  color: s,
19854
19854
  opacity: this.#o,
19855
19855
  thickness: this.#p,
@@ -20784,7 +20784,7 @@ class So extends Mg {
20784
20784
  }
20785
20785
  class Co extends H {
20786
20786
  static _type = "ink";
20787
- static _editorType = X.INK;
20787
+ static _editorType = W.INK;
20788
20788
  static _defaultDrawingOptions = null;
20789
20789
  constructor(t) {
20790
20790
  super({
@@ -20834,7 +20834,7 @@ class Co extends H {
20834
20834
  }
20835
20835
  } = t;
20836
20836
  i = t = {
20837
- annotationType: X.INK,
20837
+ annotationType: W.INK,
20838
20838
  color: Array.from(c),
20839
20839
  thickness: d,
20840
20840
  opacity: u,
@@ -20895,7 +20895,7 @@ class Co extends H {
20895
20895
  "stroke-width": o
20896
20896
  }
20897
20897
  } = this, h = {
20898
- annotationType: X.INK,
20898
+ annotationType: W.INK,
20899
20899
  color: z._colorManager.convert(n),
20900
20900
  opacity: r,
20901
20901
  thickness: o,
@@ -20943,7 +20943,7 @@ class Ao extends z {
20943
20943
  #c = !1;
20944
20944
  #l = !1;
20945
20945
  static _type = "stamp";
20946
- static _editorType = X.STAMP;
20946
+ static _editorType = W.STAMP;
20947
20947
  constructor(t) {
20948
20948
  super({
20949
20949
  ...t,
@@ -20963,7 +20963,7 @@ class Ao extends z {
20963
20963
  return this.supportedTypes.includes(t);
20964
20964
  }
20965
20965
  static paste(t, e) {
20966
- e.pasteEditor(X.STAMP, {
20966
+ e.pasteEditor(W.STAMP, {
20967
20967
  bitmapFile: t.getAsFile()
20968
20968
  });
20969
20969
  }
@@ -21269,7 +21269,7 @@ class Ao extends z {
21269
21269
  S.remove();
21270
21270
  const T = (await e._structTree.getAriaAttributes(`${co}${b}`))?.get("aria-label") || "";
21271
21271
  i = t = {
21272
- annotationType: X.STAMP,
21272
+ annotationType: W.STAMP,
21273
21273
  bitmapId: A.id,
21274
21274
  bitmap: A.bitmap,
21275
21275
  pageIndex: _ - 1,
@@ -21304,7 +21304,7 @@ class Ao extends z {
21304
21304
  if (this.deleted)
21305
21305
  return this.serializeDeleted();
21306
21306
  const s = {
21307
- annotationType: X.STAMP,
21307
+ annotationType: W.STAMP,
21308
21308
  bitmapId: this.#e,
21309
21309
  pageIndex: this.pageIndex,
21310
21310
  rect: this.getRect(0, 0),
@@ -21401,20 +21401,20 @@ class ke {
21401
21401
  return this.#n.size === 0;
21402
21402
  }
21403
21403
  get isInvisible() {
21404
- return this.isEmpty && this.#o.getMode() === X.NONE;
21404
+ return this.isEmpty && this.#o.getMode() === W.NONE;
21405
21405
  }
21406
21406
  updateToolbar(t) {
21407
21407
  this.#o.updateToolbar(t);
21408
21408
  }
21409
21409
  updateMode(t = this.#o.getMode()) {
21410
21410
  switch (this.#v(), t) {
21411
- case X.NONE:
21411
+ case W.NONE:
21412
21412
  this.disableTextSelection(), this.togglePointerEvents(!1), this.toggleAnnotationLayerPointerEvents(!0), this.disableClick();
21413
21413
  return;
21414
- case X.INK:
21414
+ case W.INK:
21415
21415
  this.disableTextSelection(), this.togglePointerEvents(!0), this.enableClick();
21416
21416
  break;
21417
- case X.HIGHLIGHT:
21417
+ case W.HIGHLIGHT:
21418
21418
  this.enableTextSelection(), this.togglePointerEvents(!1), this.disableClick();
21419
21419
  break;
21420
21420
  default:
@@ -21695,7 +21695,7 @@ class ke {
21695
21695
  this.#e = !0;
21696
21696
  return;
21697
21697
  }
21698
- if (this.#o.getMode() === X.STAMP) {
21698
+ if (this.#o.getMode() === W.STAMP) {
21699
21699
  this.#o.unselectAll();
21700
21700
  return;
21701
21701
  }
@@ -21703,7 +21703,7 @@ class ke {
21703
21703
  }
21704
21704
  }
21705
21705
  pointerdown(t) {
21706
- if (this.#o.getMode() === X.HIGHLIGHT && this.enableTextSelection(), this.#h) {
21706
+ if (this.#o.getMode() === W.HIGHLIGHT && this.enableTextSelection(), this.#h) {
21707
21707
  this.#h = !1;
21708
21708
  return;
21709
21709
  }
@@ -21970,26 +21970,18 @@ V.setLayerDimensions;
21970
21970
  V.shadow;
21971
21971
  V.stopEvent;
21972
21972
  var Lg = V.version;
21973
- function Rg(a) {
21974
- return new Worker(
21975
- "" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
21976
- {
21977
- name: a?.name
21978
- }
21979
- );
21980
- }
21981
21973
  let ja = null;
21982
- function Fg() {
21974
+ function Rg() {
21983
21975
  const a = document.createElement("div");
21984
21976
  a.style.width = "1in", document.body.append(a);
21985
21977
  const t = a.offsetWidth;
21986
21978
  return a.remove(), t;
21987
21979
  }
21988
- function Ig() {
21989
- const a = ja ?? Fg();
21980
+ function Fg() {
21981
+ const a = ja ?? Rg();
21990
21982
  return ja = a, a / 72;
21991
21983
  }
21992
- function Ng(a, t = 500) {
21984
+ function Ig(a, t = 500) {
21993
21985
  if (typeof a != "function") throw new TypeError("The first argument is not a function.");
21994
21986
  let e = null;
21995
21987
  return function(...s) {
@@ -21998,15 +21990,15 @@ function Ng(a, t = 500) {
21998
21990
  }, t);
21999
21991
  };
22000
21992
  }
22001
- function jg(a) {
21993
+ function Ng(a) {
22002
21994
  return new Promise((t, e) => {
22003
21995
  const s = new FileReader();
22004
21996
  s.addEventListener("load", () => t(s.result)), s.addEventListener("error", e), s.readAsDataURL(a);
22005
21997
  });
22006
21998
  }
22007
21999
  Fl() || (Og.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Lg}/pdf.worker.min.mjs`);
22008
- async function Bg(a) {
22009
- const t = "data:application/pdf;base64,", e = await jg(a);
22000
+ async function jg(a) {
22001
+ const t = "data:application/pdf;base64,", e = await Ng(a);
22010
22002
  if (typeof e == "string")
22011
22003
  return globalThis.atob(e.slice(t.length));
22012
22004
  }
@@ -22017,10 +22009,14 @@ function Fl() {
22017
22009
  return !1;
22018
22010
  }
22019
22011
  }
22020
- async function Hg({ page: a, PDFBase64: t, scale: e, password: s }, i) {
22021
- const n = Ig() / window.devicePixelRatio;
22012
+ async function Bg({ page: a, PDFBase64: t, scale: e, password: s }, i) {
22013
+ const n = Fg() / window.devicePixelRatio;
22022
22014
  if (Fl()) {
22023
- const r = new Rg();
22015
+ const r = new Worker(new URL(
22016
+ /* @vite-ignore */
22017
+ "" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
22018
+ import.meta.url
22019
+ ), { type: "module" });
22024
22020
  return r.postMessage({ data: t, password: s, id: i, page: a, units: n, scale: e }), await new Promise((h) => {
22025
22021
  r.addEventListener("message", ({ data: l }) => {
22026
22022
  if (l.status === "success") {
@@ -22045,11 +22041,11 @@ async function Hg({ page: a, PDFBase64: t, scale: e, password: s }, i) {
22045
22041
  }
22046
22042
  }
22047
22043
  const Ft = /* @__PURE__ */ new Map();
22048
- function zg(a) {
22044
+ function Hg(a) {
22049
22045
  const t = new Er(a);
22050
22046
  return Ft.set(a, t), t;
22051
22047
  }
22052
- function Gg(a, t) {
22048
+ function zg(a, t) {
22053
22049
  const e = Date.now();
22054
22050
  return {
22055
22051
  PDFId: `${a.name}-${e}`,
@@ -22058,16 +22054,16 @@ function Gg(a, t) {
22058
22054
  PDFBase64: t
22059
22055
  };
22060
22056
  }
22061
- async function Vg({ src: a }, t, e) {
22057
+ async function Gg({ src: a }, t, e) {
22062
22058
  if (!a || !e) return null;
22063
22059
  const { objects: s, options: i } = await vd(a), n = s.filter((o) => o !== null), r = Fu.groupSVGElements(n, i);
22064
22060
  return n.forEach((o) => {
22065
22061
  o.stroke = e;
22066
22062
  }), r.hoverCursor = "pointer", r.stroke = `${e}-${t}`, r;
22067
22063
  }
22068
- function Wg(a, t) {
22064
+ function Vg(a, t) {
22069
22065
  if (!Ft.get(a)) return;
22070
- const s = 1 / 3, i = Jg(t, s);
22066
+ const s = 1 / 3, i = Kg(t, s);
22071
22067
  Nl(a, i, s);
22072
22068
  }
22073
22069
  async function Xg(a, t) {
@@ -22088,30 +22084,30 @@ function Nl(a, t, e) {
22088
22084
  const s = Ft.get(a);
22089
22085
  s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
22090
22086
  }
22091
- function Ug(a, t) {
22087
+ function Wg(a, t) {
22092
22088
  if (!t) return;
22093
22089
  const { oCoords: e } = a;
22094
22090
  if (!e) return;
22095
22091
  const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: o, scaleX: h } = t;
22096
22092
  t.top = i - n * o / 2, t.left = s - r * h / 2, t.setCoords();
22097
22093
  }
22098
- function Yg(a, t, e) {
22099
- !e || !a || (e.scale(1 / t), Ug(a, e));
22094
+ function Ug(a, t, e) {
22095
+ !e || !a || (e.scale(1 / t), Wg(a, e));
22100
22096
  }
22101
- function $g(a, t) {
22097
+ function Yg(a, t) {
22102
22098
  if (!a) return;
22103
22099
  const e = a._cornerSize || 6;
22104
22100
  a.borderScaleFactor = 1 / t, a.cornerSize = e * (1 / t), a.touchCornerSize = e * 4 * (1 / t), a.setCoords();
22105
22101
  }
22106
- function qg(a) {
22102
+ function $g(a) {
22107
22103
  const t = Ft.get(a);
22108
22104
  t && (t.discardActiveObject(), t.renderAll());
22109
22105
  }
22110
- function Kg(a) {
22106
+ function qg(a) {
22111
22107
  const t = Ft.get(a);
22112
22108
  t && (t.clear(), Ft.delete(a));
22113
22109
  }
22114
- function Jg(a, t) {
22110
+ function Kg(a, t) {
22115
22111
  return new Tt(a, { scaleX: t, scaleY: t });
22116
22112
  }
22117
22113
  function jr(a, t) {
@@ -22119,27 +22115,27 @@ function jr(a, t) {
22119
22115
  const { left: e, top: s, scaleX: i, scaleY: n, width: r, height: o } = a, h = t.x * r * i, l = t.y * o * n;
22120
22116
  a.set({ left: e - h, top: s - l });
22121
22117
  }
22122
- function Zg(a, t, e) {
22118
+ function Jg(a, t, e) {
22123
22119
  const s = a.type;
22124
22120
  return {
22125
- "application/pdf": Qg,
22121
+ "application/pdf": Zg,
22126
22122
  "image/png": Ba,
22127
22123
  "image/jpeg": Ba
22128
22124
  }[s]?.(a, t, e) ?? Promise.reject(new Error(`Unsupported ${s} file type.`));
22129
22125
  }
22130
- async function Qg(a, t, e) {
22131
- const s = await Bg(a);
22126
+ async function Zg(a, t, e) {
22127
+ const s = await jg(a);
22132
22128
  if (!s) return;
22133
- const i = Gg(a, s), n = await jl({ page: 1, PDFBase64: s, scale: 0.8, password: t }, e);
22129
+ const i = zg(a, s), n = await jl({ page: 1, PDFBase64: s, scale: 0.8, password: t }, e);
22134
22130
  return { ...i, pages: n };
22135
22131
  }
22136
22132
  function jl(a, t) {
22137
- return Hg(a, t).then(({ canvas: e, pages: s }) => (e && t && Wg(t, e), s));
22133
+ return Bg(a, t).then(({ canvas: e, pages: s }) => (e && t && Vg(t, e), s));
22138
22134
  }
22139
22135
  async function Ba(a, t, e) {
22140
22136
  return await Xg(a, e);
22141
22137
  }
22142
- function tp(a, t) {
22138
+ function Qg(a, t) {
22143
22139
  const e = Ft.get(a);
22144
22140
  if (!e) return;
22145
22141
  const s = e.getActiveObject();
@@ -22147,7 +22143,7 @@ function tp(a, t) {
22147
22143
  i.set(t);
22148
22144
  }) : s.set(t), e.renderAll());
22149
22145
  }
22150
- async function ep(a, t) {
22146
+ async function tp(a, t) {
22151
22147
  const e = Ft.get(a);
22152
22148
  if (!e) return;
22153
22149
  const s = e?.getActiveObject();
@@ -22157,7 +22153,7 @@ async function ep(a, t) {
22157
22153
  e.add(n), t(e, n);
22158
22154
  }) : (e.add(i), t(e, i)), jr(i, { x: -0.1, y: -0.1 }), e.setActiveObject(i);
22159
22155
  }
22160
- function sp(a) {
22156
+ function ep(a) {
22161
22157
  const t = Ft.get(a);
22162
22158
  if (!t) return;
22163
22159
  const e = t.getActiveObject();
@@ -22165,7 +22161,7 @@ function sp(a) {
22165
22161
  t.remove(s);
22166
22162
  }), t.discardActiveObject()) : t.remove(e));
22167
22163
  }
22168
- function ip(a) {
22164
+ function sp(a) {
22169
22165
  const {
22170
22166
  id: t = "",
22171
22167
  selectionOptions: e,
@@ -22178,7 +22174,7 @@ function ip(a) {
22178
22174
  let h = null, l = null, c = 1, u = { ...Zl };
22179
22175
  function d() {
22180
22176
  if (!t || Ft.has(t)) return;
22181
- const k = zg(t);
22177
+ const k = Hg(t);
22182
22178
  return k.on("selection:created", (P) => {
22183
22179
  if (r?.(P), P.selected.length <= 1) return;
22184
22180
  const j = k.getActiveObject();
@@ -22188,7 +22184,7 @@ function ip(a) {
22188
22184
  }), s && k.on("mouse:down", s), i && k.on("mouse:move", i), n && k.on("mouse:up", n), k;
22189
22185
  }
22190
22186
  function f(k, P) {
22191
- return Zg(k, P, t);
22187
+ return Jg(k, P, t);
22192
22188
  }
22193
22189
  function g(k) {
22194
22190
  return jl(k, t);
@@ -22221,7 +22217,7 @@ function ip(a) {
22221
22217
  uuid: M = Date.now()
22222
22218
  }) {
22223
22219
  if (k.getActiveObjects().length > 1 || h?.stroke === `${j}-${M}`) return;
22224
- const G = await Vg(u, M, j);
22220
+ const G = await Gg(u, M, j);
22225
22221
  T(k), h = G, l = P, _(k, P, M), S(c, !0), G && k.add(G);
22226
22222
  }
22227
22223
  function _(k, P, j) {
@@ -22240,7 +22236,7 @@ function ip(a) {
22240
22236
  }
22241
22237
  function S(k, P = !1) {
22242
22238
  const j = Ft.get(t);
22243
- c = k, j && ($g(l, k), Yg(l, k, h), !P && j.renderAll());
22239
+ c = k, j && (Yg(l, k), Ug(l, k, h), !P && j.renderAll());
22244
22240
  }
22245
22241
  function A(k) {
22246
22242
  if (!k) return;
@@ -22252,19 +22248,19 @@ function ip(a) {
22252
22248
  l = null, h && (k.remove(h), h = null);
22253
22249
  }
22254
22250
  function E() {
22255
- qg(t);
22251
+ $g(t);
22256
22252
  }
22257
22253
  function O() {
22258
- Kg(t);
22254
+ qg(t);
22259
22255
  }
22260
22256
  function N(k) {
22261
- tp(t, k);
22257
+ Qg(t, k);
22262
22258
  }
22263
22259
  function D() {
22264
- return ep(t, v);
22260
+ return tp(t, v);
22265
22261
  }
22266
22262
  function R() {
22267
- sp(t);
22263
+ ep(t);
22268
22264
  }
22269
22265
  return {
22270
22266
  createCanvas: d,
@@ -22282,9 +22278,9 @@ function ip(a) {
22282
22278
  deleteActiveFabric: R
22283
22279
  };
22284
22280
  }
22285
- function np(a) {
22281
+ function ip(a) {
22286
22282
  let t = 0;
22287
- const e = Ng(() => {
22283
+ const e = Ig(() => {
22288
22284
  t !== window.innerWidth && (t = window.innerWidth, a());
22289
22285
  });
22290
22286
  Bl(() => {
@@ -22293,7 +22289,7 @@ function np(a) {
22293
22289
  window.removeEventListener("resize", e);
22294
22290
  });
22295
22291
  }
22296
- const ap = /* @__PURE__ */ Hl({
22292
+ const op = /* @__PURE__ */ Hl({
22297
22293
  __name: "pdf-canvas",
22298
22294
  props: {
22299
22295
  file: {},
@@ -22327,7 +22323,7 @@ const ap = /* @__PURE__ */ Hl({
22327
22323
  setCloseSvgOptions: y,
22328
22324
  copyActiveFabric: _,
22329
22325
  deleteActiveFabric: S
22330
- } = ip({
22326
+ } = sp({
22331
22327
  id: o,
22332
22328
  selectionOptions: l,
22333
22329
  pointerDown: (D) => i("pointerDown", D),
@@ -22336,7 +22332,7 @@ const ap = /* @__PURE__ */ Hl({
22336
22332
  selectionCreated: (D) => i("selectionCreated", D),
22337
22333
  selectionCleared: (D) => i("selectionCleared", D)
22338
22334
  });
22339
- A(), np(N);
22335
+ A(), ip(N);
22340
22336
  async function A() {
22341
22337
  const { file: D, page: R, fileScale: k } = s;
22342
22338
  globalThis.requestAnimationFrame(async () => {
@@ -22367,7 +22363,7 @@ const ap = /* @__PURE__ */ Hl({
22367
22363
  function N() {
22368
22364
  s.manualReload || A(), i("reload");
22369
22365
  }
22370
- return Xn([() => s.fileScale, () => s.page, () => s.file, () => s.password], N), Xn(h, (D) => m(D), { immediate: !0 }), Xn(() => s.closeSvgOptions, y, { immediate: !0 }), n(b), t({
22366
+ return Wn([() => s.fileScale, () => s.page, () => s.file, () => s.password], N), Wn(h, (D) => m(D), { immediate: !0 }), Wn(() => s.closeSvgOptions, y, { immediate: !0 }), n(b), t({
22371
22367
  reload: A,
22372
22368
  addImage: E,
22373
22369
  addText: O,
@@ -22377,8 +22373,8 @@ const ap = /* @__PURE__ */ Hl({
22377
22373
  copyActiveFabric: _,
22378
22374
  deleteActiveFabric: S,
22379
22375
  canvasRef: r
22380
- }), (D, R) => (Wl(), Vl("div", {
22381
- style: Xl({ transform: `scale(${h.value})` }),
22376
+ }), (D, R) => (Xl(), Vl("div", {
22377
+ style: Wl({ transform: `scale(${h.value})` }),
22382
22378
  onDragover: R[0] || (R[0] = Un(() => {
22383
22379
  }, ["prevent"])),
22384
22380
  onDragenter: R[1] || (R[1] = Un(() => {
@@ -22395,7 +22391,7 @@ const ap = /* @__PURE__ */ Hl({
22395
22391
  }
22396
22392
  });
22397
22393
  export {
22398
- ap as default,
22399
- Zg as loadFile,
22400
- ip as useFabric
22394
+ op as default,
22395
+ Jg as loadFile,
22396
+ sp as useFabric
22401
22397
  };