presenter 0.9.3 → 0.9.4

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,6 +1,6 @@
1
1
  var T0 = Object.defineProperty;
2
- var L0 = (n, t, e) => t in n ? T0(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var I = (n, t, e) => L0(n, typeof t != "symbol" ? t + "" : t, e);
2
+ var L0 = (n, e, t) => e in n ? T0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var I = (n, e, t) => L0(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  const dt = {
5
5
  /** Represents an animated change in an object's properties. */
6
6
  ANIMATE: "Animate",
@@ -19,26 +19,26 @@ function S0(n) {
19
19
  return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
20
20
  }
21
21
  var le = 1.70158;
22
- (function n(t) {
23
- t = +t;
24
- function e(o) {
25
- return (o = +o) * o * (t * (o - 1) + o);
22
+ (function n(e) {
23
+ e = +e;
24
+ function t(o) {
25
+ return (o = +o) * o * (e * (o - 1) + o);
26
26
  }
27
- return e.overshoot = n, e;
27
+ return t.overshoot = n, t;
28
28
  })(le);
29
- (function n(t) {
30
- t = +t;
31
- function e(o) {
32
- return --o * o * ((o + 1) * t + o) + 1;
29
+ (function n(e) {
30
+ e = +e;
31
+ function t(o) {
32
+ return --o * o * ((o + 1) * e + o) + 1;
33
33
  }
34
- return e.overshoot = n, e;
34
+ return t.overshoot = n, t;
35
35
  })(le);
36
- var P0 = (function n(t) {
37
- t = +t;
38
- function e(o) {
39
- return ((o *= 2) < 1 ? o * o * ((t + 1) * o - t) : (o -= 2) * o * ((t + 1) * o + t) + 2) / 2;
36
+ var P0 = (function n(e) {
37
+ e = +e;
38
+ function t(o) {
39
+ return ((o *= 2) < 1 ? o * o * ((e + 1) * o - e) : (o -= 2) * o * ((e + 1) * o + e) + 2) / 2;
40
40
  }
41
- return e.overshoot = n, e;
41
+ return t.overshoot = n, t;
42
42
  })(le);
43
43
  const he = {
44
44
  LINEAR: (n) => n,
@@ -47,11 +47,11 @@ const he = {
47
47
  CUBIC_OUT: C0,
48
48
  BACK_IN_OUT: P0.overshoot(0.8)
49
49
  }, E0 = he.LINEAR;
50
- function ce(n, t, e = {}) {
50
+ function ce(n, e, t = {}) {
51
51
  return {
52
52
  type: dt.ANIMATE,
53
53
  object: n,
54
- props: t,
54
+ props: e,
55
55
  delay: 0,
56
56
  duration: 1e3,
57
57
  easing: E0,
@@ -60,39 +60,39 @@ function ce(n, t, e = {}) {
60
60
  isKey: !1,
61
61
  notes: null,
62
62
  shortcut: null,
63
- ...typeof e == "number" ? { duration: e } : e
63
+ ...typeof t == "number" ? { duration: t } : t
64
64
  };
65
65
  }
66
- function Pi(n, t = {}) {
66
+ function Pi(n, e = {}) {
67
67
  return ce(n, { opacity: 1 }, {
68
68
  duration: 500,
69
69
  easing: he.CUBIC,
70
- ...typeof t == "number" ? { duration: t } : t
70
+ ...typeof e == "number" ? { duration: e } : e
71
71
  });
72
72
  }
73
- function Ei(n, t = {}) {
73
+ function Ei(n, e = {}) {
74
74
  return ce(n, { opacity: 0 }, {
75
75
  duration: 500,
76
76
  easing: he.CUBIC,
77
- ...typeof t == "number" ? { duration: t } : t
77
+ ...typeof e == "number" ? { duration: e } : e
78
78
  });
79
79
  }
80
- function Qe(n, t, e = {}) {
80
+ function Qe(n, e, t = {}) {
81
81
  return {
82
82
  type: dt.UPDATE,
83
83
  isKey: !1,
84
84
  notes: null,
85
85
  object: n,
86
- props: t,
86
+ props: e,
87
87
  shortcut: null,
88
- ...e
88
+ ...t
89
89
  };
90
90
  }
91
- function Ii(n, t = {}) {
92
- return Qe(n, { opacity: 0 }, t);
91
+ function Ii(n, e = {}) {
92
+ return Qe(n, { opacity: 0 }, e);
93
93
  }
94
- function ki(n, t = {}) {
95
- return Qe(n, { opacity: 1 }, t);
94
+ function ki(n, e = {}) {
95
+ return Qe(n, { opacity: 1 }, e);
96
96
  }
97
97
  const st = {
98
98
  TOP_LEFT: "TopLeft",
@@ -105,7 +105,7 @@ const st = {
105
105
  BOTTOM: "Bottom",
106
106
  BOTTOM_RIGHT: "BottomRight"
107
107
  }, et = st.TOP_LEFT;
108
- function G(n, t = 0, e = 0, o = 1) {
108
+ function G(n, e = 0, t = 0, o = 1) {
109
109
  if (typeof n == "string") {
110
110
  const i = n.replace("#", ""), a = parseInt(i, 16);
111
111
  return isNaN(a) ? (console.warn("Invalid hex color format:", n), J) : i.length === 6 ? {
@@ -122,8 +122,8 @@ function G(n, t = 0, e = 0, o = 1) {
122
122
  } else if (typeof n == "number")
123
123
  return {
124
124
  red: n,
125
- green: t ?? 0,
126
- blue: e ?? 0,
125
+ green: e ?? 0,
126
+ blue: t ?? 0,
127
127
  alpha: o ?? 1
128
128
  };
129
129
  return {
@@ -153,17 +153,17 @@ function t0(n = null) {
153
153
  ...n
154
154
  };
155
155
  }
156
- function e0(n, t = null) {
157
- return n.alpha * (t ?? 1);
156
+ function e0(n, e = null) {
157
+ return n.alpha * (e ?? 1);
158
158
  }
159
- function It(n, t = null) {
160
- const { red: e, green: o, blue: i } = n, a = e << 16 | o << 8 | i, s = Math.round(e0(n, t) * 255);
159
+ function It(n, e = null) {
160
+ const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(e0(n, e) * 255);
161
161
  return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
162
162
  }
163
163
  function Oi(n = null) {
164
164
  const {
165
- url: t = "https://wikipedia.org/",
166
- backgroundColor: e = G.TRANSPARENT,
165
+ url: e = "https://wikipedia.org/",
166
+ backgroundColor: t = G.TRANSPARENT,
167
167
  strokeColor: o = J,
168
168
  strokeWidth: i = 0,
169
169
  pointerEvents: a = "auto",
@@ -174,7 +174,7 @@ function Oi(n = null) {
174
174
  x: u = 0,
175
175
  y: p = 0
176
176
  } = n || {}, h = document.createElement("iframe");
177
- h.src = t, h.style.backgroundColor = It(e), h.style.border = i > 0 ? `${i}px solid ${It(o)}` : "none", h.style.pointerEvents = a;
177
+ h.src = e, h.style.backgroundColor = It(t), h.style.border = i > 0 ? `${i}px solid ${It(o)}` : "none", h.style.pointerEvents = a;
178
178
  const f = (100 / s).toFixed(3) + "%";
179
179
  return h.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, h.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, h.style.transform = `scale(${s})`, h.style.transformOrigin = "top left", t0({
180
180
  content: h,
@@ -190,13 +190,13 @@ const vt = {
190
190
  CENTER: "center",
191
191
  RIGHT: "right"
192
192
  }, I0 = vt.LEFT;
193
- function at(n, t) {
193
+ function at(n, e) {
194
194
  throw new Error("Unexpected value: " + n);
195
195
  }
196
196
  function _i(n = null) {
197
197
  const {
198
- alignment: t = vt.LEFT,
199
- scale: e = 1,
198
+ alignment: e = vt.LEFT,
199
+ scale: t = 1,
200
200
  anchor: o = et,
201
201
  height: i = 1e3,
202
202
  width: a = 1e3,
@@ -205,7 +205,7 @@ function _i(n = null) {
205
205
  } = n || {};
206
206
  function l(c) {
207
207
  const u = document.createElement("video");
208
- switch (u.autoplay = !0, u.style.transform = `scale(${e})`, t) {
208
+ switch (u.autoplay = !0, u.style.transform = `scale(${t})`, e) {
209
209
  case vt.LEFT:
210
210
  u.style.transformOrigin = "top left";
211
211
  break;
@@ -216,7 +216,7 @@ function _i(n = null) {
216
216
  u.style.transformOrigin = "top right";
217
217
  break;
218
218
  default:
219
- at(t);
219
+ at(e);
220
220
  }
221
221
  c.appendChild(u);
222
222
  const p = {
@@ -270,7 +270,7 @@ function nt(n) {
270
270
  };
271
271
  }
272
272
  function Ni(n = null) {
273
- const { arrowheadSize: t, width: e = 10, ...o } = n || {}, i = t ?? e * 4;
273
+ const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
274
274
  return nt({
275
275
  objectType: j.ARROW,
276
276
  arrowheadSize: i,
@@ -283,7 +283,7 @@ function Ni(n = null) {
283
283
  isDrawnFromCenter: !1,
284
284
  startX: 0,
285
285
  startY: 0,
286
- width: e,
286
+ width: t,
287
287
  ...o
288
288
  });
289
289
  }
@@ -302,7 +302,7 @@ function Ri(n = null) {
302
302
  ...n
303
303
  });
304
304
  }
305
- function be(n, t = null) {
305
+ function be(n, e = null) {
306
306
  return nt({
307
307
  objectType: j.GROUP,
308
308
  anchor: et,
@@ -324,13 +324,13 @@ function be(n, t = null) {
324
324
  width: 0,
325
325
  x: 0,
326
326
  y: 0,
327
- ...t
327
+ ...e
328
328
  });
329
329
  }
330
330
  function Fi(n) {
331
331
  const {
332
- anchor: t = et,
333
- cols: e = 1,
332
+ anchor: e = et,
333
+ cols: t = 1,
334
334
  rows: o = 1,
335
335
  gapX: i = 0,
336
336
  gapY: a = 0,
@@ -346,7 +346,7 @@ function Fi(n) {
346
346
  const M = [];
347
347
  v = 0;
348
348
  let L = 0;
349
- for (let E = 0; E < e; E++) {
349
+ for (let E = 0; E < t; E++) {
350
350
  const S = p(C, E), k = typeof r == "function" ? r(C, E) : r, F = typeof l == "function" ? l(C, E) : l;
351
351
  M.push(S), S != null && f.push(
352
352
  be([S], {
@@ -363,13 +363,13 @@ function Fi(n) {
363
363
  y: u,
364
364
  height: y - a,
365
365
  width: v - i,
366
- anchor: t,
366
+ anchor: e,
367
367
  ...s
368
368
  }),
369
369
  objects: h
370
370
  };
371
371
  }
372
- function Di(n = null) {
372
+ function Bi(n = null) {
373
373
  return nt({
374
374
  objectType: j.IMAGE,
375
375
  anchor: et,
@@ -383,7 +383,7 @@ function Di(n = null) {
383
383
  ...n
384
384
  });
385
385
  }
386
- function Bi(n = null) {
386
+ function Di(n = null) {
387
387
  return nt({
388
388
  objectType: j.LINE,
389
389
  color: J,
@@ -398,7 +398,7 @@ function Bi(n = null) {
398
398
  ...n
399
399
  });
400
400
  }
401
- function qi(n, t = null) {
401
+ function qi(n, e = null) {
402
402
  return nt({
403
403
  objectType: j.MASK,
404
404
  anchor: et,
@@ -408,56 +408,56 @@ function qi(n, t = null) {
408
408
  width: 100,
409
409
  x: 0,
410
410
  y: 0,
411
- ...t
411
+ ...e
412
412
  });
413
413
  }
414
- var O0 = Object.defineProperty, _ = (n, t) => O0(n, "name", { value: t, configurable: !0 }), Pt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, _0 = /([astvzqmhlc])([^astvzqmhlc]*)/gi, N0 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, R0 = _((n) => {
415
- const t = (n && n.length > 0 ? n : "M0,0").match(_0);
416
- if (!t) throw new Error(`No path elements found in string ${n}`);
417
- return t.reduce((e, o) => {
414
+ var O0 = Object.defineProperty, _ = (n, e) => O0(n, "name", { value: e, configurable: !0 }), Pt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, _0 = /([astvzqmhlc])([^astvzqmhlc]*)/gi, N0 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, R0 = _((n) => {
415
+ const e = (n && n.length > 0 ? n : "M0,0").match(_0);
416
+ if (!e) throw new Error(`No path elements found in string ${n}`);
417
+ return e.reduce((t, o) => {
418
418
  let i = o.charAt(0), a = i.toLowerCase(), s = F0(o.substring(1));
419
- if (a === "m" && s.length > 2 && (e.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
419
+ if (a === "m" && s.length > 2 && (t.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
420
420
  const r = o.substring(1).trim().split(" ");
421
421
  s = [Number(r[0]), Number(r[1]), Number(r[2]), Number(r[3].charAt(0)), Number(r[3].charAt(1)), Number(r[3].substring(2)), Number(r[4])];
422
422
  }
423
423
  for (; s.length >= 0; ) {
424
424
  if (s.length === Pt[a]) {
425
- e.push([i, ...s.splice(0, Pt[a])]);
425
+ t.push([i, ...s.splice(0, Pt[a])]);
426
426
  break;
427
427
  }
428
428
  if (s.length < Pt[a]) throw new Error(`Malformed path data: "${i}" must have ${Pt[a]} elements and has ${s.length}: ${o}`);
429
- e.push([i, ...s.splice(0, Pt[a])]);
429
+ t.push([i, ...s.splice(0, Pt[a])]);
430
430
  }
431
- return e;
431
+ return t;
432
432
  }, []);
433
433
  }, "default"), F0 = _((n) => {
434
- const t = n.match(N0);
435
- return t ? t.map(Number) : [];
434
+ const e = n.match(N0);
435
+ return e ? e.map(Number) : [];
436
436
  }, "parseValues"), bt, tt = (bt = class {
437
- constructor(t, e, o, i) {
437
+ constructor(e, t, o, i) {
438
438
  I(this, "x0");
439
439
  I(this, "x1");
440
440
  I(this, "y0");
441
441
  I(this, "y1");
442
442
  I(this, "getTotalLength", _(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
443
- I(this, "getPointAtLength", _((t) => {
444
- let e = t / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
445
- e = Number.isNaN(e) ? 1 : e;
446
- const o = (this.x1 - this.x0) * e, i = (this.y1 - this.y0) * e;
443
+ I(this, "getPointAtLength", _((e) => {
444
+ let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
445
+ t = Number.isNaN(t) ? 1 : t;
446
+ const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
447
447
  return { x: this.x0 + o, y: this.y0 + i };
448
448
  }, "getPointAtLength"));
449
- I(this, "getTangentAtLength", _((t) => {
450
- const e = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
451
- return { x: (this.x1 - this.x0) / e, y: (this.y1 - this.y0) / e };
449
+ I(this, "getTangentAtLength", _((e) => {
450
+ const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
451
+ return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
452
452
  }, "getTangentAtLength"));
453
- I(this, "getPropertiesAtLength", _((t) => {
454
- const e = this.getPointAtLength(t), o = this.getTangentAtLength(t);
455
- return { x: e.x, y: e.y, tangentX: o.x, tangentY: o.y };
453
+ I(this, "getPropertiesAtLength", _((e) => {
454
+ const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
455
+ return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
456
456
  }, "getPropertiesAtLength"));
457
- this.x0 = t, this.x1 = e, this.y0 = o, this.y1 = i;
457
+ this.x0 = e, this.x1 = t, this.y0 = o, this.y1 = i;
458
458
  }
459
459
  }, _(bt, "LinearPosition"), bt), At, Ae = (At = class {
460
- constructor(t, e, o, i, a, s, r, l, c) {
460
+ constructor(e, t, o, i, a, s, r, l, c) {
461
461
  I(this, "x0");
462
462
  I(this, "y0");
463
463
  I(this, "rx");
@@ -469,100 +469,100 @@ var O0 = Object.defineProperty, _ = (n, t) => O0(n, "name", { value: t, configur
469
469
  I(this, "y1");
470
470
  I(this, "length");
471
471
  I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
472
- I(this, "getPointAtLength", _((t) => {
473
- t < 0 ? t = 0 : t > this.length && (t = this.length);
474
- const e = Te({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, t / this.length);
475
- return { x: e.x, y: e.y };
472
+ I(this, "getPointAtLength", _((e) => {
473
+ e < 0 ? e = 0 : e > this.length && (e = this.length);
474
+ const t = Te({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
475
+ return { x: t.x, y: t.y };
476
476
  }, "getPointAtLength"));
477
- I(this, "getTangentAtLength", _((t) => {
478
- t < 0 ? t = 0 : t > this.length && (t = this.length);
479
- const e = 0.05, o = this.getPointAtLength(t);
477
+ I(this, "getTangentAtLength", _((e) => {
478
+ e < 0 ? e = 0 : e > this.length && (e = this.length);
479
+ const t = 0.05, o = this.getPointAtLength(e);
480
480
  let i;
481
- t < 0 ? t = 0 : t > this.length && (t = this.length), i = t < this.length - e ? this.getPointAtLength(t + e) : this.getPointAtLength(t - e);
481
+ e < 0 ? e = 0 : e > this.length && (e = this.length), i = e < this.length - t ? this.getPointAtLength(e + t) : this.getPointAtLength(e - t);
482
482
  const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
483
- return t < this.length - e ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
483
+ return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
484
484
  }, "getTangentAtLength"));
485
- I(this, "getPropertiesAtLength", _((t) => {
486
- const e = this.getTangentAtLength(t), o = this.getPointAtLength(t);
487
- return { x: o.x, y: o.y, tangentX: e.x, tangentY: e.y };
485
+ I(this, "getPropertiesAtLength", _((e) => {
486
+ const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
487
+ return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
488
488
  }, "getPropertiesAtLength"));
489
- this.x0 = t, this.y0 = e, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = l, this.y1 = c;
490
- const u = D0(300, function(p) {
491
- return Te({ x: t, y: e }, o, i, a, s, r, { x: l, y: c }, p);
489
+ this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = l, this.y1 = c;
490
+ const u = B0(300, function(p) {
491
+ return Te({ x: e, y: t }, o, i, a, s, r, { x: l, y: c }, p);
492
492
  });
493
493
  this.length = u.arcLength;
494
494
  }
495
- }, _(At, "Arc"), At), Te = _((n, t, e, o, i, a, s, r) => {
496
- t = Math.abs(t), e = Math.abs(e), o = B0(o, 360);
495
+ }, _(At, "Arc"), At), Te = _((n, e, t, o, i, a, s, r) => {
496
+ e = Math.abs(e), t = Math.abs(t), o = D0(o, 360);
497
497
  const l = q0(o);
498
498
  if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
499
- if (t === 0 || e === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
500
- const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, p = { x: Math.cos(l) * c + Math.sin(l) * u, y: -Math.sin(l) * c + Math.cos(l) * u }, h = Math.pow(p.x, 2) / Math.pow(t, 2) + Math.pow(p.y, 2) / Math.pow(e, 2);
501
- h > 1 && (t = Math.sqrt(h) * t, e = Math.sqrt(h) * e);
502
- let f = (Math.pow(t, 2) * Math.pow(e, 2) - Math.pow(t, 2) * Math.pow(p.y, 2) - Math.pow(e, 2) * Math.pow(p.x, 2)) / (Math.pow(t, 2) * Math.pow(p.y, 2) + Math.pow(e, 2) * Math.pow(p.x, 2));
499
+ if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
500
+ const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, p = { x: Math.cos(l) * c + Math.sin(l) * u, y: -Math.sin(l) * c + Math.cos(l) * u }, h = Math.pow(p.x, 2) / Math.pow(e, 2) + Math.pow(p.y, 2) / Math.pow(t, 2);
501
+ h > 1 && (e = Math.sqrt(h) * e, t = Math.sqrt(h) * t);
502
+ let f = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(p.y, 2) - Math.pow(t, 2) * Math.pow(p.x, 2)) / (Math.pow(e, 2) * Math.pow(p.y, 2) + Math.pow(t, 2) * Math.pow(p.x, 2));
503
503
  f = f < 0 ? 0 : f;
504
- const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (t * p.y / e), T = v * (-e * p.x / t), C = { x: Math.cos(l) * y - Math.sin(l) * T + (n.x + s.x) / 2, y: Math.sin(l) * y + Math.cos(l) * T + (n.y + s.y) / 2 }, M = { x: (p.x - y) / t, y: (p.y - T) / e }, L = Me({ x: 1, y: 0 }, M);
505
- let E = Me(M, { x: (-p.x - y) / t, y: (-p.y - T) / e });
504
+ const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * p.y / t), T = v * (-t * p.x / e), C = { x: Math.cos(l) * y - Math.sin(l) * T + (n.x + s.x) / 2, y: Math.sin(l) * y + Math.cos(l) * T + (n.y + s.y) / 2 }, M = { x: (p.x - y) / e, y: (p.y - T) / t }, L = Me({ x: 1, y: 0 }, M);
505
+ let E = Me(M, { x: (-p.x - y) / e, y: (-p.y - T) / t });
506
506
  !a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
507
- const S = L + E * r, k = t * Math.cos(S), F = e * Math.sin(S);
508
- return { x: Math.cos(l) * k - Math.sin(l) * F + C.x, y: Math.sin(l) * k + Math.cos(l) * F + C.y, ellipticalArcStartAngle: L, ellipticalArcEndAngle: L + E, ellipticalArcAngle: S, ellipticalArcCenter: C, resultantRx: t, resultantRy: e };
509
- }, "pointOnEllipticalArc"), D0 = _((n, t) => {
507
+ const S = L + E * r, k = e * Math.cos(S), F = t * Math.sin(S);
508
+ return { x: Math.cos(l) * k - Math.sin(l) * F + C.x, y: Math.sin(l) * k + Math.cos(l) * F + C.y, ellipticalArcStartAngle: L, ellipticalArcEndAngle: L + E, ellipticalArcAngle: S, ellipticalArcCenter: C, resultantRx: e, resultantRy: t };
509
+ }, "pointOnEllipticalArc"), B0 = _((n, e) => {
510
510
  n = n ?? 500;
511
- let e = 0;
511
+ let t = 0;
512
512
  const o = [], i = [];
513
- let a, s = t(0);
513
+ let a, s = e(0);
514
514
  for (let r = 0; r < n; r++) {
515
515
  const l = z0(r * (1 / n), 0, 1);
516
- a = t(l), e += Le(s, a), i.push([s, a]), o.push({ t: l, arcLength: e }), s = a;
516
+ a = e(l), t += Le(s, a), i.push([s, a]), o.push({ t: l, arcLength: t }), s = a;
517
517
  }
518
- return a = t(1), i.push([s, a]), e += Le(s, a), o.push({ t: 1, arcLength: e }), { arcLength: e, arcLengthMap: o, approximationLines: i };
519
- }, "approximateArcLengthOfCurve"), B0 = _((n, t) => (n % t + t) % t, "mod"), q0 = _((n) => n * (Math.PI / 180), "toRadians"), Le = _((n, t) => Math.sqrt(Math.pow(t.x - n.x, 2) + Math.pow(t.y - n.y, 2)), "distance"), z0 = _((n, t, e) => Math.min(Math.max(n, t), e), "clamp"), Me = _((n, t) => {
520
- const e = n.x * t.x + n.y * t.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(t.x, 2) + Math.pow(t.y, 2)));
521
- return (n.x * t.y - n.y * t.x < 0 ? -1 : 1) * Math.acos(e / o);
522
- }, "angleBetween"), j0 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], V0 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], H0 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], U0 = _((n, t, e) => ({ x: (1 - e) * (1 - e) * (1 - e) * n[0] + 3 * (1 - e) * (1 - e) * e * n[1] + 3 * (1 - e) * e * e * n[2] + e * e * e * n[3], y: (1 - e) * (1 - e) * (1 - e) * t[0] + 3 * (1 - e) * (1 - e) * e * t[1] + 3 * (1 - e) * e * e * t[2] + e * e * e * t[3] }), "cubicPoint"), Y0 = _((n, t, e) => n0([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (t[1] - t[0]), 3 * (t[2] - t[1]), 3 * (t[3] - t[2])], e), "cubicDerivative"), $0 = _((n, t, e) => {
518
+ return a = e(1), i.push([s, a]), t += Le(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
519
+ }, "approximateArcLengthOfCurve"), D0 = _((n, e) => (n % e + e) % e, "mod"), q0 = _((n) => n * (Math.PI / 180), "toRadians"), Le = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), z0 = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), Me = _((n, e) => {
520
+ const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
521
+ return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
522
+ }, "angleBetween"), j0 = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], V0 = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], H0 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], U0 = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), $0 = _((n, e, t) => n0([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), Y0 = _((n, e, t) => {
523
523
  let o, i;
524
- const a = e / 2;
524
+ const a = t / 2;
525
525
  o = 0;
526
- for (let s = 0; s < 20; s++) i = a * j0[20][s] + a, o += V0[20][s] * i0(n, t, i);
526
+ for (let s = 0; s < 20; s++) i = a * j0[20][s] + a, o += V0[20][s] * i0(n, e, i);
527
527
  return a * o;
528
- }, "getCubicArcLength"), n0 = _((n, t, e) => ({ x: (1 - e) * (1 - e) * n[0] + 2 * (1 - e) * e * n[1] + e * e * n[2], y: (1 - e) * (1 - e) * t[0] + 2 * (1 - e) * e * t[1] + e * e * t[2] }), "quadraticPoint"), W0 = _((n, t, e) => {
529
- e === void 0 && (e = 1);
530
- const o = n[0] - 2 * n[1] + n[2], i = t[0] - 2 * t[1] + t[2], a = 2 * n[1] - 2 * n[0], s = 2 * t[1] - 2 * t[0], r = 4 * (o * o + i * i), l = 4 * (o * a + i * s), c = a * a + s * s;
531
- if (r === 0) return e * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(t[2] - t[0], 2));
532
- const u = l / (2 * r), p = e + u, h = c / r - u * u, f = p * p + h > 0 ? Math.sqrt(p * p + h) : 0, v = u * u + h > 0 ? Math.sqrt(u * u + h) : 0, y = u + Math.sqrt(u * u + h) !== 0 && (p + f) / (u + v) !== 0 ? h * Math.log(Math.abs((p + f) / (u + v))) : 0;
528
+ }, "getCubicArcLength"), n0 = _((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), W0 = _((n, e, t) => {
529
+ t === void 0 && (t = 1);
530
+ const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), l = 4 * (o * a + i * s), c = a * a + s * s;
531
+ if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
532
+ const u = l / (2 * r), p = t + u, h = c / r - u * u, f = p * p + h > 0 ? Math.sqrt(p * p + h) : 0, v = u * u + h > 0 ? Math.sqrt(u * u + h) : 0, y = u + Math.sqrt(u * u + h) !== 0 && (p + f) / (u + v) !== 0 ? h * Math.log(Math.abs((p + f) / (u + v))) : 0;
533
533
  return Math.sqrt(r) / 2 * (p * f - u * v + y);
534
- }, "getQuadraticArcLength"), G0 = _((n, t, e) => ({ x: 2 * (1 - e) * (n[1] - n[0]) + 2 * e * (n[2] - n[1]), y: 2 * (1 - e) * (t[1] - t[0]) + 2 * e * (t[2] - t[1]) }), "quadraticDerivative");
535
- function i0(n, t, e) {
536
- const o = te(1, e, n), i = te(1, e, t), a = o * o + i * i;
534
+ }, "getQuadraticArcLength"), G0 = _((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
535
+ function i0(n, e, t) {
536
+ const o = te(1, t, n), i = te(1, t, e), a = o * o + i * i;
537
537
  return Math.sqrt(a);
538
538
  }
539
539
  _(i0, "BFunc");
540
- var te = _((n, t, e) => {
541
- const o = e.length - 1;
540
+ var te = _((n, e, t) => {
541
+ const o = t.length - 1;
542
542
  let i, a;
543
543
  if (o === 0) return 0;
544
544
  if (n === 0) {
545
545
  a = 0;
546
- for (let s = 0; s <= o; s++) a += H0[o][s] * Math.pow(1 - t, o - s) * Math.pow(t, s) * e[s];
546
+ for (let s = 0; s <= o; s++) a += H0[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
547
547
  return a;
548
548
  }
549
549
  i = new Array(o);
550
- for (let s = 0; s < o; s++) i[s] = o * (e[s + 1] - e[s]);
551
- return te(n - 1, t, i);
552
- }, "getDerivative"), Vt = _((n, t, e) => {
553
- let o = 1, i = n / t, a = (n - e(i)) / t, s = 0;
550
+ for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
551
+ return te(n - 1, e, i);
552
+ }, "getDerivative"), Vt = _((n, e, t) => {
553
+ let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
554
554
  for (; o > 1e-3; ) {
555
- const r = e(i + a), l = Math.abs(n - r) / t;
555
+ const r = t(i + a), l = Math.abs(n - r) / e;
556
556
  if (l < o) o = l, i += a;
557
557
  else {
558
- const c = e(i - a), u = Math.abs(n - c) / t;
558
+ const c = t(i - a), u = Math.abs(n - c) / e;
559
559
  u < o ? (o = u, i -= a) : a /= 2;
560
560
  }
561
561
  if (s++, s > 500) break;
562
562
  }
563
563
  return i;
564
564
  }, "t2length"), Tt, ht = (Tt = class {
565
- constructor(t, e, o, i, a, s, r, l) {
565
+ constructor(e, t, o, i, a, s, r, l) {
566
566
  I(this, "a");
567
567
  I(this, "b");
568
568
  I(this, "c");
@@ -572,149 +572,149 @@ var te = _((n, t, e) => {
572
572
  I(this, "getPoint");
573
573
  I(this, "getDerivative");
574
574
  I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
575
- I(this, "getPointAtLength", _((t) => {
576
- const e = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Vt(t, this.length, (a) => this.getArcLength(e, o, a));
577
- return this.getPoint(e, o, i);
575
+ I(this, "getPointAtLength", _((e) => {
576
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Vt(e, this.length, (a) => this.getArcLength(t, o, a));
577
+ return this.getPoint(t, o, i);
578
578
  }, "getPointAtLength"));
579
- I(this, "getTangentAtLength", _((t) => {
580
- const e = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Vt(t, this.length, (l) => this.getArcLength(e, o, l)), a = this.getDerivative(e, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
579
+ I(this, "getTangentAtLength", _((e) => {
580
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Vt(e, this.length, (l) => this.getArcLength(t, o, l)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
581
581
  let r;
582
582
  return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
583
583
  }, "getTangentAtLength"));
584
- I(this, "getPropertiesAtLength", _((t) => {
585
- const e = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Vt(t, this.length, (c) => this.getArcLength(e, o, c)), a = this.getDerivative(e, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
584
+ I(this, "getPropertiesAtLength", _((e) => {
585
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Vt(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
586
586
  let r;
587
587
  r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
588
- const l = this.getPoint(e, o, i);
588
+ const l = this.getPoint(t, o, i);
589
589
  return { x: l.x, y: l.y, tangentX: r.x, tangentY: r.y };
590
590
  }, "getPropertiesAtLength"));
591
591
  I(this, "getC", _(() => this.c, "getC"));
592
592
  I(this, "getD", _(() => this.d, "getD"));
593
- this.a = { x: t, y: e }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && l !== void 0 ? (this.getArcLength = $0, this.getPoint = U0, this.getDerivative = Y0, this.d = { x: r, y: l }) : (this.getArcLength = W0, this.getPoint = n0, this.getDerivative = G0, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
593
+ this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && l !== void 0 ? (this.getArcLength = Y0, this.getPoint = U0, this.getDerivative = $0, this.d = { x: r, y: l }) : (this.getArcLength = W0, this.getPoint = n0, this.getDerivative = G0, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
594
594
  }
595
595
  }, _(Tt, "Bezier"), Tt), Lt, X0 = (Lt = class {
596
- constructor(t) {
596
+ constructor(e) {
597
597
  I(this, "length", 0);
598
598
  I(this, "partial_lengths", []);
599
599
  I(this, "functions", []);
600
600
  I(this, "initial_point", null);
601
- I(this, "getPartAtLength", _((t) => {
602
- t < 0 ? t = 0 : t > this.length && (t = this.length);
603
- let e = this.partial_lengths.length - 1;
604
- for (; this.partial_lengths[e] >= t && e > 0; ) e--;
605
- return e++, { fraction: t - this.partial_lengths[e - 1], i: e };
601
+ I(this, "getPartAtLength", _((e) => {
602
+ e < 0 ? e = 0 : e > this.length && (e = this.length);
603
+ let t = this.partial_lengths.length - 1;
604
+ for (; this.partial_lengths[t] >= e && t > 0; ) t--;
605
+ return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
606
606
  }, "getPartAtLength"));
607
607
  I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
608
- I(this, "getPointAtLength", _((t) => {
609
- const e = this.getPartAtLength(t), o = this.functions[e.i];
610
- if (o) return o.getPointAtLength(e.fraction);
608
+ I(this, "getPointAtLength", _((e) => {
609
+ const t = this.getPartAtLength(e), o = this.functions[t.i];
610
+ if (o) return o.getPointAtLength(t.fraction);
611
611
  if (this.initial_point) return this.initial_point;
612
612
  throw new Error("Wrong function at this part.");
613
613
  }, "getPointAtLength"));
614
- I(this, "getTangentAtLength", _((t) => {
615
- const e = this.getPartAtLength(t), o = this.functions[e.i];
616
- if (o) return o.getTangentAtLength(e.fraction);
614
+ I(this, "getTangentAtLength", _((e) => {
615
+ const t = this.getPartAtLength(e), o = this.functions[t.i];
616
+ if (o) return o.getTangentAtLength(t.fraction);
617
617
  if (this.initial_point) return { x: 0, y: 0 };
618
618
  throw new Error("Wrong function at this part.");
619
619
  }, "getTangentAtLength"));
620
- I(this, "getPropertiesAtLength", _((t) => {
621
- const e = this.getPartAtLength(t), o = this.functions[e.i];
622
- if (o) return o.getPropertiesAtLength(e.fraction);
620
+ I(this, "getPropertiesAtLength", _((e) => {
621
+ const t = this.getPartAtLength(e), o = this.functions[t.i];
622
+ if (o) return o.getPropertiesAtLength(t.fraction);
623
623
  if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
624
624
  throw new Error("Wrong function at this part.");
625
625
  }, "getPropertiesAtLength"));
626
626
  I(this, "getParts", _(() => {
627
- const t = [];
628
- for (let e = 0; e < this.functions.length; e++) if (this.functions[e] !== null) {
629
- this.functions[e] = this.functions[e];
630
- const o = { start: this.functions[e].getPointAtLength(0), end: this.functions[e].getPointAtLength(this.partial_lengths[e] - this.partial_lengths[e - 1]), length: this.partial_lengths[e] - this.partial_lengths[e - 1], getPointAtLength: this.functions[e].getPointAtLength, getTangentAtLength: this.functions[e].getTangentAtLength, getPropertiesAtLength: this.functions[e].getPropertiesAtLength };
631
- t.push(o);
627
+ const e = [];
628
+ for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
629
+ this.functions[t] = this.functions[t];
630
+ const o = { start: this.functions[t].getPointAtLength(0), end: this.functions[t].getPointAtLength(this.partial_lengths[t] - this.partial_lengths[t - 1]), length: this.partial_lengths[t] - this.partial_lengths[t - 1], getPointAtLength: this.functions[t].getPointAtLength, getTangentAtLength: this.functions[t].getTangentAtLength, getPropertiesAtLength: this.functions[t].getPropertiesAtLength };
631
+ e.push(o);
632
632
  }
633
- return t;
633
+ return e;
634
634
  }, "getParts"));
635
- const e = Array.isArray(t) ? t : R0(t);
635
+ const t = Array.isArray(e) ? e : R0(e);
636
636
  let o, i = [0, 0], a = [0, 0], s = [0, 0];
637
- for (let r = 0; r < e.length; r++) {
638
- if (e[r][0] === "M") i = [e[r][1], e[r][2]], s = [i[0], i[1]], this.functions.push(null), r === 0 && (this.initial_point = { x: e[r][1], y: e[r][2] });
639
- else if (e[r][0] === "m") i = [e[r][1] + i[0], e[r][2] + i[1]], s = [i[0], i[1]], this.functions.push(null);
640
- else if (e[r][0] === "L") this.length += Math.sqrt(Math.pow(i[0] - e[r][1], 2) + Math.pow(i[1] - e[r][2], 2)), this.functions.push(new tt(i[0], e[r][1], i[1], e[r][2])), i = [e[r][1], e[r][2]];
641
- else if (e[r][0] === "l") this.length += Math.sqrt(Math.pow(e[r][1], 2) + Math.pow(e[r][2], 2)), this.functions.push(new tt(i[0], e[r][1] + i[0], i[1], e[r][2] + i[1])), i = [e[r][1] + i[0], e[r][2] + i[1]];
642
- else if (e[r][0] === "H") this.length += Math.abs(i[0] - e[r][1]), this.functions.push(new tt(i[0], e[r][1], i[1], i[1])), i[0] = e[r][1];
643
- else if (e[r][0] === "h") this.length += Math.abs(e[r][1]), this.functions.push(new tt(i[0], i[0] + e[r][1], i[1], i[1])), i[0] = e[r][1] + i[0];
644
- else if (e[r][0] === "V") this.length += Math.abs(i[1] - e[r][1]), this.functions.push(new tt(i[0], i[0], i[1], e[r][1])), i[1] = e[r][1];
645
- else if (e[r][0] === "v") this.length += Math.abs(e[r][1]), this.functions.push(new tt(i[0], i[0], i[1], i[1] + e[r][1])), i[1] = e[r][1] + i[1];
646
- else if (e[r][0] === "z" || e[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new tt(i[0], s[0], i[1], s[1])), i = [s[0], s[1]];
647
- else if (e[r][0] === "C") o = new ht(i[0], i[1], e[r][1], e[r][2], e[r][3], e[r][4], e[r][5], e[r][6]), this.length += o.getTotalLength(), i = [e[r][5], e[r][6]], this.functions.push(o);
648
- else if (e[r][0] === "c") o = new ht(i[0], i[1], i[0] + e[r][1], i[1] + e[r][2], i[0] + e[r][3], i[1] + e[r][4], i[0] + e[r][5], i[1] + e[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [e[r][5] + i[0], e[r][6] + i[1]]) : this.functions.push(new tt(i[0], i[0], i[1], i[1]));
649
- else if (e[r][0] === "S") {
650
- if (r > 0 && ["C", "c", "S", "s"].indexOf(e[r - 1][0]) > -1) {
637
+ for (let r = 0; r < t.length; r++) {
638
+ if (t[r][0] === "M") i = [t[r][1], t[r][2]], s = [i[0], i[1]], this.functions.push(null), r === 0 && (this.initial_point = { x: t[r][1], y: t[r][2] });
639
+ else if (t[r][0] === "m") i = [t[r][1] + i[0], t[r][2] + i[1]], s = [i[0], i[1]], this.functions.push(null);
640
+ else if (t[r][0] === "L") this.length += Math.sqrt(Math.pow(i[0] - t[r][1], 2) + Math.pow(i[1] - t[r][2], 2)), this.functions.push(new tt(i[0], t[r][1], i[1], t[r][2])), i = [t[r][1], t[r][2]];
641
+ else if (t[r][0] === "l") this.length += Math.sqrt(Math.pow(t[r][1], 2) + Math.pow(t[r][2], 2)), this.functions.push(new tt(i[0], t[r][1] + i[0], i[1], t[r][2] + i[1])), i = [t[r][1] + i[0], t[r][2] + i[1]];
642
+ else if (t[r][0] === "H") this.length += Math.abs(i[0] - t[r][1]), this.functions.push(new tt(i[0], t[r][1], i[1], i[1])), i[0] = t[r][1];
643
+ else if (t[r][0] === "h") this.length += Math.abs(t[r][1]), this.functions.push(new tt(i[0], i[0] + t[r][1], i[1], i[1])), i[0] = t[r][1] + i[0];
644
+ else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new tt(i[0], i[0], i[1], t[r][1])), i[1] = t[r][1];
645
+ else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new tt(i[0], i[0], i[1], i[1] + t[r][1])), i[1] = t[r][1] + i[1];
646
+ else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new tt(i[0], s[0], i[1], s[1])), i = [s[0], s[1]];
647
+ else if (t[r][0] === "C") o = new ht(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], t[r][5], t[r][6]), this.length += o.getTotalLength(), i = [t[r][5], t[r][6]], this.functions.push(o);
648
+ else if (t[r][0] === "c") o = new ht(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], i[0] + t[r][5], i[1] + t[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [t[r][5] + i[0], t[r][6] + i[1]]) : this.functions.push(new tt(i[0], i[0], i[1], i[1]));
649
+ else if (t[r][0] === "S") {
650
+ if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
651
651
  if (o) {
652
652
  const l = o.getC();
653
- o = new ht(i[0], i[1], 2 * i[0] - l.x, 2 * i[1] - l.y, e[r][1], e[r][2], e[r][3], e[r][4]);
653
+ o = new ht(i[0], i[1], 2 * i[0] - l.x, 2 * i[1] - l.y, t[r][1], t[r][2], t[r][3], t[r][4]);
654
654
  }
655
- } else o = new ht(i[0], i[1], i[0], i[1], e[r][1], e[r][2], e[r][3], e[r][4]);
656
- o && (this.length += o.getTotalLength(), i = [e[r][3], e[r][4]], this.functions.push(o));
657
- } else if (e[r][0] === "s") {
658
- if (r > 0 && ["C", "c", "S", "s"].indexOf(e[r - 1][0]) > -1) {
655
+ } else o = new ht(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
656
+ o && (this.length += o.getTotalLength(), i = [t[r][3], t[r][4]], this.functions.push(o));
657
+ } else if (t[r][0] === "s") {
658
+ if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
659
659
  if (o) {
660
660
  const l = o.getC(), c = o.getD();
661
- o = new ht(i[0], i[1], i[0] + c.x - l.x, i[1] + c.y - l.y, i[0] + e[r][1], i[1] + e[r][2], i[0] + e[r][3], i[1] + e[r][4]);
661
+ o = new ht(i[0], i[1], i[0] + c.x - l.x, i[1] + c.y - l.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
662
662
  }
663
- } else o = new ht(i[0], i[1], i[0], i[1], i[0] + e[r][1], i[1] + e[r][2], i[0] + e[r][3], i[1] + e[r][4]);
664
- o && (this.length += o.getTotalLength(), i = [e[r][3] + i[0], e[r][4] + i[1]], this.functions.push(o));
665
- } else if (e[r][0] === "Q") {
666
- if (i[0] === e[r][1] && i[1] === e[r][2]) {
667
- const l = new tt(e[r][1], e[r][3], e[r][2], e[r][4]);
663
+ } else o = new ht(i[0], i[1], i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
664
+ o && (this.length += o.getTotalLength(), i = [t[r][3] + i[0], t[r][4] + i[1]], this.functions.push(o));
665
+ } else if (t[r][0] === "Q") {
666
+ if (i[0] === t[r][1] && i[1] === t[r][2]) {
667
+ const l = new tt(t[r][1], t[r][3], t[r][2], t[r][4]);
668
668
  this.length += l.getTotalLength(), this.functions.push(l);
669
- } else o = new ht(i[0], i[1], e[r][1], e[r][2], e[r][3], e[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
670
- i = [e[r][3], e[r][4]], a = [e[r][1], e[r][2]];
671
- } else if (e[r][0] === "q") {
672
- if (e[r][1] !== 0 || e[r][2] !== 0) o = new ht(i[0], i[1], i[0] + e[r][1], i[1] + e[r][2], i[0] + e[r][3], i[1] + e[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
669
+ } else o = new ht(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
670
+ i = [t[r][3], t[r][4]], a = [t[r][1], t[r][2]];
671
+ } else if (t[r][0] === "q") {
672
+ if (t[r][1] !== 0 || t[r][2] !== 0) o = new ht(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
673
673
  else {
674
- const l = new tt(i[0] + e[r][1], i[0] + e[r][3], i[1] + e[r][2], i[1] + e[r][4]);
674
+ const l = new tt(i[0] + t[r][1], i[0] + t[r][3], i[1] + t[r][2], i[1] + t[r][4]);
675
675
  this.length += l.getTotalLength(), this.functions.push(l);
676
676
  }
677
- a = [i[0] + e[r][1], i[1] + e[r][2]], i = [e[r][3] + i[0], e[r][4] + i[1]];
678
- } else if (e[r][0] === "T") {
679
- if (r > 0 && ["Q", "q", "T", "t"].indexOf(e[r - 1][0]) > -1) o = new ht(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], e[r][1], e[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
677
+ a = [i[0] + t[r][1], i[1] + t[r][2]], i = [t[r][3] + i[0], t[r][4] + i[1]];
678
+ } else if (t[r][0] === "T") {
679
+ if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ht(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], t[r][1], t[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
680
680
  else {
681
- const l = new tt(i[0], e[r][1], i[1], e[r][2]);
681
+ const l = new tt(i[0], t[r][1], i[1], t[r][2]);
682
682
  this.functions.push(l), this.length += l.getTotalLength();
683
683
  }
684
- a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [e[r][1], e[r][2]];
685
- } else if (e[r][0] === "t") {
686
- if (r > 0 && ["Q", "q", "T", "t"].indexOf(e[r - 1][0]) > -1) o = new ht(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + e[r][1], i[1] + e[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
684
+ a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1], t[r][2]];
685
+ } else if (t[r][0] === "t") {
686
+ if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ht(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + t[r][1], i[1] + t[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
687
687
  else {
688
- const l = new tt(i[0], i[0] + e[r][1], i[1], i[1] + e[r][2]);
688
+ const l = new tt(i[0], i[0] + t[r][1], i[1], i[1] + t[r][2]);
689
689
  this.length += l.getTotalLength(), this.functions.push(l);
690
690
  }
691
- a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [e[r][1] + i[0], e[r][2] + i[1]];
692
- } else if (e[r][0] === "A") {
693
- const l = new Ae(i[0], i[1], e[r][1], e[r][2], e[r][3], e[r][4] === 1, e[r][5] === 1, e[r][6], e[r][7]);
694
- this.length += l.getTotalLength(), i = [e[r][6], e[r][7]], this.functions.push(l);
695
- } else if (e[r][0] === "a") {
696
- const l = new Ae(i[0], i[1], e[r][1], e[r][2], e[r][3], e[r][4] === 1, e[r][5] === 1, i[0] + e[r][6], i[1] + e[r][7]);
697
- this.length += l.getTotalLength(), i = [i[0] + e[r][6], i[1] + e[r][7]], this.functions.push(l);
691
+ a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1] + i[0], t[r][2] + i[1]];
692
+ } else if (t[r][0] === "A") {
693
+ const l = new Ae(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
694
+ this.length += l.getTotalLength(), i = [t[r][6], t[r][7]], this.functions.push(l);
695
+ } else if (t[r][0] === "a") {
696
+ const l = new Ae(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
697
+ this.length += l.getTotalLength(), i = [i[0] + t[r][6], i[1] + t[r][7]], this.functions.push(l);
698
698
  }
699
699
  this.partial_lengths.push(this.length);
700
700
  }
701
701
  }
702
702
  }, _(Lt, "SVGPathProperties"), Lt), Mt, ee = (Mt = class {
703
- constructor(t) {
703
+ constructor(e) {
704
704
  I(this, "inst");
705
705
  I(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
706
- I(this, "getPointAtLength", _((t) => this.inst.getPointAtLength(t), "getPointAtLength"));
707
- I(this, "getTangentAtLength", _((t) => this.inst.getTangentAtLength(t), "getTangentAtLength"));
708
- I(this, "getPropertiesAtLength", _((t) => this.inst.getPropertiesAtLength(t), "getPropertiesAtLength"));
706
+ I(this, "getPointAtLength", _((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
707
+ I(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
708
+ I(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
709
709
  I(this, "getParts", _(() => this.inst.getParts(), "getParts"));
710
- if (this.inst = new X0(t), !(this instanceof ee)) return new ee(t);
710
+ if (this.inst = new X0(e), !(this instanceof ee)) return new ee(e);
711
711
  }
712
712
  }, _(Mt, "_svgPathProperties"), Mt);
713
713
  function K0(n = G.BLACK) {
714
714
  return { ...n, alpha: 0 };
715
715
  }
716
716
  function zi(n = null) {
717
- const { path: t, height: e = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = t ?? "M 0 0 L 100 100", c = new ee(r).getTotalLength();
717
+ const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new ee(r).getTotalLength();
718
718
  return nt({
719
719
  objectType: j.PATH,
720
720
  anchor: et,
@@ -722,11 +722,11 @@ function zi(n = null) {
722
722
  drawn: 1,
723
723
  fillColor: K0(),
724
724
  isRounded: !1,
725
- height: e,
725
+ height: t,
726
726
  path: r,
727
727
  pathLength: c,
728
728
  strokeWidth: 4,
729
- viewboxHeight: i ?? e,
729
+ viewboxHeight: i ?? t,
730
730
  viewboxWidth: a ?? o,
731
731
  width: o,
732
732
  x: 0,
@@ -815,15 +815,15 @@ const Z0 = {
815
815
  superscript: !1
816
816
  };
817
817
  function ue(n) {
818
- return typeof n == "string" ? [[{ text: n }]] : n.map((t) => t.map((e) => typeof e == "string" ? { text: e } : e));
818
+ return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
819
819
  }
820
820
  function nn(n) {
821
821
  return ue(n).reduce(
822
- (e, o) => e + o.reduce((i, a) => i + a.text.length, 0),
822
+ (t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
823
823
  0
824
824
  );
825
825
  }
826
- function rn(n = "", t = null) {
826
+ function rn(n = "", e = null) {
827
827
  return nt({
828
828
  objectType: j.TEXT,
829
829
  alignment: I0,
@@ -834,15 +834,15 @@ function rn(n = "", t = null) {
834
834
  x: 0,
835
835
  y: 0,
836
836
  ...en,
837
- ...t
837
+ ...e
838
838
  });
839
839
  }
840
- rn.writeOn = (n, t = {}) => ce(
840
+ rn.writeOn = (n, e = {}) => ce(
841
841
  n,
842
842
  {
843
843
  length: nn(n.text)
844
844
  },
845
- t
845
+ e
846
846
  );
847
847
  const fe = "presenter.navigator.state", xt = {
848
848
  open: !1,
@@ -870,7 +870,7 @@ function r0() {
870
870
  (n = ge()) == null || n.removeItem(fe);
871
871
  }
872
872
  function pe() {
873
- var n, t, e, o, i;
873
+ var n, e, t, o, i;
874
874
  if (!de())
875
875
  return xt;
876
876
  try {
@@ -881,8 +881,8 @@ function pe() {
881
881
  return {
882
882
  open: typeof s.open == "boolean" ? s.open : xt.open,
883
883
  visibility: {
884
- slides: typeof ((t = s.visibility) == null ? void 0 : t.slides) == "boolean" ? s.visibility.slides : xt.visibility.slides,
885
- current: typeof ((e = s.visibility) == null ? void 0 : e.current) == "boolean" ? s.visibility.current : xt.visibility.current,
884
+ slides: typeof ((e = s.visibility) == null ? void 0 : e.slides) == "boolean" ? s.visibility.slides : xt.visibility.slides,
885
+ current: typeof ((t = s.visibility) == null ? void 0 : t.current) == "boolean" ? s.visibility.current : xt.visibility.current,
886
886
  next: typeof ((o = s.visibility) == null ? void 0 : o.next) == "boolean" ? s.visibility.next : xt.visibility.next,
887
887
  notes: typeof ((i = s.visibility) == null ? void 0 : i.notes) == "boolean" ? s.visibility.notes : xt.visibility.notes
888
888
  }
@@ -892,8 +892,8 @@ function pe() {
892
892
  }
893
893
  }
894
894
  function o0(n) {
895
- var t;
896
- de() && ((t = ge()) == null || t.setItem(fe, JSON.stringify(n)));
895
+ var e;
896
+ de() && ((e = ge()) == null || e.setItem(fe, JSON.stringify(n)));
897
897
  }
898
898
  function ge() {
899
899
  try {
@@ -924,65 +924,65 @@ function Ce(n) {
924
924
  var o, i;
925
925
  if (n === null)
926
926
  return !1;
927
- const t = n, e = (o = t.tagName) == null ? void 0 : o.toLowerCase();
928
- return e === "input" || e === "textarea" || e === "select" || e === "button" || t.isContentEditable ? !0 : (((i = t.closest) == null ? void 0 : i.call(t, "[contenteditable=''], [contenteditable='true']")) ?? null) !== null;
927
+ const e = n, t = (o = e.tagName) == null ? void 0 : o.toLowerCase();
928
+ return t === "input" || t === "textarea" || t === "select" || t === "button" || e.isContentEditable ? !0 : (((i = e.closest) == null ? void 0 : i.call(e, "[contenteditable=''], [contenteditable='true']")) ?? null) !== null;
929
929
  }
930
930
  function ln(n) {
931
931
  var o;
932
- const { slides: t } = n, e = {
932
+ const { slides: e } = n, t = {
933
933
  // First build of first slide
934
934
  s: { slideIndex: 0, buildIndex: 0 },
935
935
  // First build of current slide
936
936
  c: { slideIndex: null, buildIndex: 0 },
937
937
  // Last build of last slide
938
938
  e: {
939
- slideIndex: t.length - 1,
940
- buildIndex: ((o = t[t.length - 1]) == null ? void 0 : o.animations.length) ?? 0
939
+ slideIndex: e.length - 1,
940
+ buildIndex: ((o = e[e.length - 1]) == null ? void 0 : o.animations.length) ?? 0
941
941
  }
942
942
  };
943
- for (let i = 0; i < t.length; i++) {
944
- const a = t[i];
943
+ for (let i = 0; i < e.length; i++) {
944
+ const a = e[i];
945
945
  if (a === void 0)
946
946
  continue;
947
947
  const s = a.shortcut;
948
- Ht(e, s, i, 0);
948
+ Ht(t, s, i, 0);
949
949
  for (let r = 0; r < a.animations.length; r++) {
950
950
  const l = a.animations[r];
951
951
  if (l !== void 0)
952
952
  if (Array.isArray(l))
953
953
  for (const c of l)
954
- Ht(e, c.shortcut, i, r + 1);
954
+ Ht(t, c.shortcut, i, r + 1);
955
955
  else
956
- Ht(e, l.shortcut, i, r + 1);
956
+ Ht(t, l.shortcut, i, r + 1);
957
957
  }
958
958
  }
959
- return e;
959
+ return t;
960
960
  }
961
- function Ht(n, t, e, o) {
962
- if (t !== null)
963
- if (Array.isArray(t))
964
- for (const i of t)
965
- n[i] = { slideIndex: e, buildIndex: o };
961
+ function Ht(n, e, t, o) {
962
+ if (e !== null)
963
+ if (Array.isArray(e))
964
+ for (const i of e)
965
+ n[i] = { slideIndex: t, buildIndex: o };
966
966
  else
967
- n[t] = { slideIndex: e, buildIndex: o };
967
+ n[e] = { slideIndex: t, buildIndex: o };
968
968
  }
969
- function Se(n, t) {
970
- const e = n[t];
971
- return e !== void 0 ? e : isNaN(Number(t)) ? null : { slideIndex: Number(t) - 1, buildIndex: 0 };
969
+ function Se(n, e) {
970
+ const t = n[e];
971
+ return t !== void 0 ? t : isNaN(Number(e)) ? null : { slideIndex: Number(e) - 1, buildIndex: 0 };
972
972
  }
973
- function a0(n, t, e, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: l = t, signal: c } = {}) {
974
- e.shortcuts = ln(n);
973
+ function a0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: l = e, signal: c } = {}) {
974
+ t.shortcuts = ln(n);
975
975
  const u = c === void 0 ? void 0 : { signal: c };
976
- r && (t.hasAttribute("tabindex") || (t.tabIndex = -1), t.addEventListener(
976
+ r && (e.hasAttribute("tabindex") || (e.tabIndex = -1), e.addEventListener(
977
977
  "pointerdown",
978
978
  (p) => {
979
- Ce(p.target) || t.focus({ preventScroll: !0 });
979
+ Ce(p.target) || e.focus({ preventScroll: !0 });
980
980
  },
981
981
  u
982
- )), t.addEventListener(
982
+ )), e.addEventListener(
983
983
  "mousemove",
984
984
  () => {
985
- t.style.cursor = "auto";
985
+ e.style.cursor = "auto";
986
986
  },
987
987
  u
988
988
  ), l.addEventListener(
@@ -992,7 +992,7 @@ function a0(n, t, e, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
992
992
  if (Ce(h.target))
993
993
  return;
994
994
  if (h.code === "Escape") {
995
- e.textCommand = null;
995
+ t.textCommand = null;
996
996
  return;
997
997
  }
998
998
  if (h.code === "ArrowRight" || h.code === "Space") {
@@ -1006,27 +1006,27 @@ function a0(n, t, e, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
1006
1006
  const f = hn(h);
1007
1007
  if (f !== null) {
1008
1008
  const v = Se(
1009
- e.shortcuts,
1009
+ t.shortcuts,
1010
1010
  f
1011
1011
  );
1012
- e.textCommand = null, v !== null && (h.preventDefault(), a(v.slideIndex, v.buildIndex));
1012
+ t.textCommand = null, v !== null && (h.preventDefault(), a(v.slideIndex, v.buildIndex));
1013
1013
  return;
1014
1014
  }
1015
- if (e.textCommand !== null) {
1015
+ if (t.textCommand !== null) {
1016
1016
  if (h.code === "Enter") {
1017
- const v = e.textCommand;
1018
- e.textCommand = null;
1017
+ const v = t.textCommand;
1018
+ t.textCommand = null;
1019
1019
  const y = Se(
1020
- e.shortcuts,
1020
+ t.shortcuts,
1021
1021
  v
1022
1022
  );
1023
1023
  y !== null && a(y.slideIndex, y.buildIndex);
1024
1024
  return;
1025
- } else h.code === "Backspace" ? e.textCommand = e.textCommand.slice(0, -1) : e.textCommand += h.key;
1025
+ } else h.code === "Backspace" ? t.textCommand = t.textCommand.slice(0, -1) : t.textCommand += h.key;
1026
1026
  return;
1027
1027
  }
1028
1028
  if (h.key === "g") {
1029
- e.textCommand = "";
1029
+ t.textCommand = "";
1030
1030
  return;
1031
1031
  }
1032
1032
  if (h.key === "`" && !s0(h)) {
@@ -1040,25 +1040,25 @@ function a0(n, t, e, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
1040
1040
  function hn(n) {
1041
1041
  return !n.altKey || n.ctrlKey || n.metaKey || n.shiftKey ? null : n.code.startsWith("Key") && n.code.length === 4 ? n.code.slice(3).toLowerCase() : n.code.startsWith("Digit") && n.code.length === 6 ? n.code.slice(5) : n.code.startsWith("Numpad") && n.code.length === 7 ? n.code.slice(6) : null;
1042
1042
  }
1043
- function cn(n, t) {
1044
- for (let e = Math.min(t, n.animations.length); e >= 0; e--) {
1045
- const o = un(n, e);
1043
+ function cn(n, e) {
1044
+ for (let t = Math.min(e, n.animations.length); t >= 0; t--) {
1045
+ const o = un(n, t);
1046
1046
  if (o !== null)
1047
1047
  return o;
1048
1048
  }
1049
1049
  return null;
1050
1050
  }
1051
- function un(n, t) {
1052
- if (t === 0)
1051
+ function un(n, e) {
1052
+ if (e === 0)
1053
1053
  return n.notes;
1054
- const e = n.animations[t - 1];
1055
- return e === void 0 ? null : fn(e);
1054
+ const t = n.animations[e - 1];
1055
+ return t === void 0 ? null : fn(t);
1056
1056
  }
1057
1057
  function fn(n) {
1058
1058
  if (!Array.isArray(n))
1059
1059
  return n.notes;
1060
- const t = n.map(({ notes: e }) => e).filter((e) => e !== null);
1061
- return t.length > 0 ? t.join(`
1060
+ const e = n.map(({ notes: t }) => t).filter((t) => t !== null);
1061
+ return e.length > 0 ? e.join(`
1062
1062
 
1063
1063
  `) : null;
1064
1064
  }
@@ -1072,14 +1072,14 @@ let l0 = {
1072
1072
  };
1073
1073
  function dn({
1074
1074
  presentation: n,
1075
- shortcutState: t,
1076
- onNavigateToSlide: e,
1075
+ shortcutState: e,
1076
+ onNavigateToSlide: t,
1077
1077
  onRenderSlide: o,
1078
1078
  onNext: i,
1079
1079
  onPrevious: a,
1080
1080
  forceRefresh: s = !1
1081
1081
  }) {
1082
- if (N !== null && !N.closed && (Dt(N), !s))
1082
+ if (N !== null && !N.closed && (Bt(N), !s))
1083
1083
  return N.focus(), Ft;
1084
1084
  if ((N === null || N.closed) && (N = window.open("", "Navigator", vn())), N === null)
1085
1085
  return console.error("Failed to open navigator window."), null;
@@ -1088,14 +1088,14 @@ function dn({
1088
1088
  wt = () => l.abort();
1089
1089
  const c = pn(
1090
1090
  n,
1091
- e,
1091
+ t,
1092
1092
  i,
1093
1093
  r.isActive
1094
1094
  );
1095
1095
  return Ft = c, sn(), N.document.title = n.title, N.document.body.replaceChildren(c.element), a0(
1096
1096
  n,
1097
1097
  c.element,
1098
- t,
1098
+ e,
1099
1099
  {
1100
1100
  onNext: (u) => {
1101
1101
  r.isActive() && i(u);
@@ -1114,12 +1114,12 @@ function dn({
1114
1114
  keyEventTarget: N,
1115
1115
  signal: l.signal
1116
1116
  }
1117
- ), N.addEventListener("resize", () => Dt(N), {
1117
+ ), N.addEventListener("resize", () => Bt(N), {
1118
1118
  signal: l.signal
1119
1119
  }), N.addEventListener(
1120
1120
  "beforeunload",
1121
1121
  () => {
1122
- Dt(N), r0();
1122
+ Bt(N), r0();
1123
1123
  },
1124
1124
  {
1125
1125
  signal: l.signal
@@ -1134,7 +1134,7 @@ function dn({
1134
1134
  }
1135
1135
  ), Ft;
1136
1136
  }
1137
- function pn(n, t, e, o = () => !0) {
1137
+ function pn(n, e, t, o = () => !0) {
1138
1138
  const i = (N == null ? void 0 : N.document) ?? document, a = i.createElement("div");
1139
1139
  a.style.boxSizing = "border-box", a.style.display = "grid", a.style.gridTemplateColumns = "260px 1fr", a.style.gap = "18px", a.style.height = "100vh", a.style.overflow = "hidden", a.style.padding = "18px", a.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', a.style.backgroundColor = "#f5f6f8", a.style.color = "#1f2937", i.body.style.margin = "0", i.body.style.overflow = "hidden";
1140
1140
  const s = i.createElement("div");
@@ -1147,12 +1147,12 @@ function pn(n, t, e, o = () => !0) {
1147
1147
  c.style.display = "flex", c.style.gap = "14px", c.style.flex = "1 1 auto", c.style.minHeight = "0", c.style.minWidth = "0", c.style.overflow = "hidden";
1148
1148
  const u = Ee("Current", n), p = Ee("Next", n), h = gn(), f = pe();
1149
1149
  p.container.style.cursor = "pointer", p.container.addEventListener("click", () => {
1150
- o() && e();
1150
+ o() && t();
1151
1151
  });
1152
1152
  const v = n.slides.map((k, F) => {
1153
1153
  const U = xn(k, F);
1154
- return U.style.cursor = "pointer", U.addEventListener("click", (D) => {
1155
- o() && (D.shiftKey && ne(), t(F));
1154
+ return U.style.cursor = "pointer", U.addEventListener("click", (B) => {
1155
+ o() && (B.shiftKey && ne(), e(F));
1156
1156
  }), s.appendChild(U), U;
1157
1157
  }), y = Nt("Slides", s, f.visibility.slides), T = Nt(
1158
1158
  "Current",
@@ -1182,18 +1182,18 @@ function pn(n, t, e, o = () => !0) {
1182
1182
  });
1183
1183
  };
1184
1184
  y.input.addEventListener("change", L), T.input.addEventListener("change", L), C.input.addEventListener("change", L), M.input.addEventListener("change", L), N == null || N.addEventListener("resize", L), l.appendChild(y.element), l.appendChild(T.element), l.appendChild(C.element), l.appendChild(M.element), c.appendChild(u.container), c.appendChild(p.container), r.appendChild(l), r.appendChild(c), r.appendChild(h.container), a.appendChild(s), a.appendChild(r);
1185
- function E(k, F, U, D) {
1186
- o() && (v.forEach((Y, lt) => {
1185
+ function E(k, F, U, B) {
1186
+ o() && (v.forEach(($, lt) => {
1187
1187
  const Q = lt === k;
1188
- Y.style.backgroundColor = Q ? "#dbeafe" : "#ffffff", Y.style.borderColor = Q ? "#60a5fa" : "#e5e7eb", Y.style.color = Q ? "#1e3a8a" : "#1f2937";
1189
- }), u.label.textContent = Ie(n, k, F), p.label.textContent = Ie(n, U, D), h.content.textContent = cn(n.slides[k] ?? an(), F) ?? "", yn(v[k], s), L());
1188
+ $.style.backgroundColor = Q ? "#dbeafe" : "#ffffff", $.style.borderColor = Q ? "#60a5fa" : "#e5e7eb", $.style.color = Q ? "#1e3a8a" : "#1f2937";
1189
+ }), u.label.textContent = Ie(n, k, F), p.label.textContent = Ie(n, U, B), h.content.textContent = cn(n.slides[k] ?? an(), F) ?? "", yn(v[k], s), L());
1190
1190
  }
1191
1191
  function S() {
1192
1192
  const k = N;
1193
1193
  if (k === null)
1194
1194
  return !1;
1195
- const F = y.input.checked ? 278 : 0, U = k.innerWidth - 36 - F, D = k.innerHeight - 36 - l.offsetHeight - 14;
1196
- return U <= 0 || D <= 0 ? !1 : U / D < 1.1;
1195
+ const F = y.input.checked ? 278 : 0, U = k.innerWidth - 36 - F, B = k.innerHeight - 36 - l.offsetHeight - 14;
1196
+ return U <= 0 || B <= 0 ? !1 : U / B < 1.1;
1197
1197
  }
1198
1198
  return {
1199
1199
  element: a,
@@ -1206,71 +1206,71 @@ function pn(n, t, e, o = () => !0) {
1206
1206
  };
1207
1207
  }
1208
1208
  function gn() {
1209
- const n = (N == null ? void 0 : N.document) ?? document, t = n.createElement("div");
1210
- t.style.display = "flex", t.style.flex = "0 1 180px", t.style.flexDirection = "column", t.style.minHeight = "100px", t.style.maxHeight = "30vh", t.style.overflow = "hidden", t.style.backgroundColor = "#ffffff", t.style.border = "1px solid #e5e7eb", t.style.borderRadius = "6px", t.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.06)";
1211
- const e = n.createElement("div");
1212
- e.textContent = "Notes", e.style.padding = "10px 12px 6px", e.style.fontSize = "12px", e.style.fontWeight = "700", e.style.textTransform = "uppercase", e.style.color = "#6b7280";
1209
+ const n = (N == null ? void 0 : N.document) ?? document, e = n.createElement("div");
1210
+ e.style.display = "flex", e.style.flex = "0 1 180px", e.style.flexDirection = "column", e.style.minHeight = "100px", e.style.maxHeight = "30vh", e.style.overflow = "hidden", e.style.backgroundColor = "#ffffff", e.style.border = "1px solid #e5e7eb", e.style.borderRadius = "6px", e.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.06)";
1211
+ const t = n.createElement("div");
1212
+ t.textContent = "Notes", t.style.padding = "10px 12px 6px", t.style.fontSize = "12px", t.style.fontWeight = "700", t.style.textTransform = "uppercase", t.style.color = "#6b7280";
1213
1213
  const o = n.createElement("div");
1214
- return o.style.flex = "1 1 auto", o.style.minHeight = "0", o.style.overflowY = "auto", o.style.padding = "4px 12px 12px", o.style.fontSize = "16px", o.style.lineHeight = "1.5", o.style.whiteSpace = "pre-wrap", t.appendChild(e), t.appendChild(o), { container: t, content: o };
1214
+ return o.style.flex = "1 1 auto", o.style.minHeight = "0", o.style.overflowY = "auto", o.style.padding = "4px 12px 12px", o.style.fontSize = "16px", o.style.lineHeight = "1.5", o.style.whiteSpace = "pre-wrap", e.appendChild(t), e.appendChild(o), { container: e, content: o };
1215
1215
  }
1216
- function xn(n, t) {
1217
- const e = (N == null ? void 0 : N.document) ?? document, o = e.createElement("div");
1216
+ function xn(n, e) {
1217
+ const t = (N == null ? void 0 : N.document) ?? document, o = t.createElement("div");
1218
1218
  o.style.display = "flex", o.style.alignItems = "center", o.style.gap = "10px", o.style.padding = "8px 10px", o.style.backgroundColor = "#ffffff", o.style.border = "1px solid #e5e7eb", o.style.borderRadius = "6px", o.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.06)", o.style.fontSize = "14px", o.style.lineHeight = "1", o.style.userSelect = "none";
1219
- const i = e.createElement("div");
1220
- i.textContent = `${t + 1}`, i.style.minWidth = "24px", i.style.fontWeight = "700", i.style.color = "#6b7280";
1221
- const a = e.createElement("div");
1222
- return a.textContent = n.title.length > 0 ? n.title : `Slide ${t + 1}`, a.style.overflow = "hidden", a.style.textOverflow = "ellipsis", a.style.whiteSpace = "nowrap", o.appendChild(i), o.appendChild(a), o;
1219
+ const i = t.createElement("div");
1220
+ i.textContent = `${e + 1}`, i.style.minWidth = "24px", i.style.fontWeight = "700", i.style.color = "#6b7280";
1221
+ const a = t.createElement("div");
1222
+ return a.textContent = n.title.length > 0 ? n.title : `Slide ${e + 1}`, a.style.overflow = "hidden", a.style.textOverflow = "ellipsis", a.style.whiteSpace = "nowrap", o.appendChild(i), o.appendChild(a), o;
1223
1223
  }
1224
- function Ee(n, t) {
1224
+ function Ee(n, e) {
1225
1225
  var u;
1226
- const e = (N == null ? void 0 : N.document) ?? document, o = e.createElement("div");
1226
+ const t = (N == null ? void 0 : N.document) ?? document, o = t.createElement("div");
1227
1227
  o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
1228
- const i = e.createElement("div");
1228
+ const i = t.createElement("div");
1229
1229
  i.textContent = n, i.style.marginBottom = "4px", i.style.fontSize = "12px", i.style.fontWeight = "700", i.style.textAlign = "center", i.style.textTransform = "uppercase", i.style.color = "#6b7280";
1230
- const a = e.createElement("div");
1230
+ const a = t.createElement("div");
1231
1231
  a.style.marginBottom = "6px", a.style.fontSize = "14px", a.style.fontWeight = "600", a.style.textAlign = "center";
1232
- const s = e.createElement("div");
1232
+ const s = t.createElement("div");
1233
1233
  s.style.flex = "1 1 auto", s.style.display = "flex", s.style.alignItems = "flex-start", s.style.justifyContent = "center", s.style.minHeight = "0", s.style.width = "100%", s.style.overflow = "hidden";
1234
- const r = e.createElement("canvas");
1234
+ const r = t.createElement("canvas");
1235
1235
  r.style.display = "block", r.style.width = "0", r.style.height = "0";
1236
1236
  function l() {
1237
1237
  const p = s.clientWidth, h = s.clientHeight;
1238
1238
  if (p <= 0 || h <= 0)
1239
1239
  return;
1240
- const f = t.size.width / t.size.height, v = Math.min(p, h * f), y = v / f;
1240
+ const f = e.size.width / e.size.height, v = Math.min(p, h * f), y = v / f;
1241
1241
  r.style.width = `${v}px`, r.style.height = `${y}px`;
1242
1242
  }
1243
- const c = (u = e.defaultView) == null ? void 0 : u.ResizeObserver;
1243
+ const c = (u = t.defaultView) == null ? void 0 : u.ResizeObserver;
1244
1244
  return c !== void 0 && new c(l).observe(s), N == null || N.addEventListener("resize", l), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: l };
1245
1245
  }
1246
- function Nt(n, t, e) {
1247
- const o = (N == null ? void 0 : N.document) ?? document, i = t.style.display || "block", a = o.createElement("label");
1246
+ function Nt(n, e, t) {
1247
+ const o = (N == null ? void 0 : N.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
1248
1248
  a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
1249
1249
  const s = o.createElement("input");
1250
- return s.type = "checkbox", s.checked = e, t.style.display = e ? i : "none", s.addEventListener("change", () => {
1251
- t.style.display = s.checked ? i : "none";
1250
+ return s.type = "checkbox", s.checked = t, e.style.display = t ? i : "none", s.addEventListener("change", () => {
1251
+ e.style.display = s.checked ? i : "none";
1252
1252
  }), a.appendChild(s), a.appendChild(o.createTextNode(n)), { element: a, input: s };
1253
1253
  }
1254
- function Ie(n, t, e) {
1255
- if (t === null)
1254
+ function Ie(n, e, t) {
1255
+ if (e === null)
1256
1256
  return "End of presentation";
1257
- const o = n.slides[t];
1258
- return o === void 0 ? "No slide" : `Slide ${t + 1} of ${n.slides.length}, Build ${e + 1} of ${o.animations.length + 1}`;
1257
+ const o = n.slides[e];
1258
+ return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
1259
1259
  }
1260
- function yn(n, t) {
1260
+ function yn(n, e) {
1261
1261
  if (n === void 0)
1262
1262
  return;
1263
- const e = n.offsetTop, o = e + n.offsetHeight, i = t.scrollTop, a = i + t.clientHeight;
1264
- (e < i || o > a) && n.scrollIntoView({ block: "nearest" });
1263
+ const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
1264
+ (t < i || o > a) && n.scrollIntoView({ block: "nearest" });
1265
1265
  }
1266
1266
  function ne() {
1267
- Dt(N), r0(), wt == null || wt(), N == null || N.close(), N = null, Ft = null, wt = null;
1267
+ Bt(N), r0(), wt == null || wt(), N == null || N.close(), N = null, Ft = null, wt = null;
1268
1268
  }
1269
1269
  function vn() {
1270
- const { width: n, height: t, left: e, top: o } = l0;
1271
- return `width=${n},height=${t},left=${e},top=${o}`;
1270
+ const { width: n, height: e, left: t, top: o } = l0;
1271
+ return `width=${n},height=${e},left=${t},top=${o}`;
1272
1272
  }
1273
- function Dt(n) {
1273
+ function Bt(n) {
1274
1274
  n === null || n.closed || (l0 = {
1275
1275
  width: n.outerWidth,
1276
1276
  height: n.outerHeight,
@@ -1280,9 +1280,9 @@ function Dt(n) {
1280
1280
  }
1281
1281
  function wn(n) {
1282
1282
  var o;
1283
- const t = typeof ((o = globalThis.crypto) == null ? void 0 : o.randomUUID) == "function" ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`, e = n;
1284
- return e[Pe] = t, {
1285
- isActive: () => !n.closed && e[Pe] === t
1283
+ const e = typeof ((o = globalThis.crypto) == null ? void 0 : o.randomUUID) == "function" ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`, t = n;
1284
+ return t[Pe] = e, {
1285
+ isActive: () => !n.closed && t[Pe] === e
1286
1286
  };
1287
1287
  }
1288
1288
  function K(n = null) {
@@ -1306,15 +1306,15 @@ function bn(n = null) {
1306
1306
  };
1307
1307
  }
1308
1308
  function An(n) {
1309
- const t = Array.isArray(n) ? n : [n];
1310
- let e = 0, o = 0;
1311
- for (const i of t)
1309
+ const e = Array.isArray(n) ? n : [n];
1310
+ let t = 0, o = 0;
1311
+ for (const i of e)
1312
1312
  switch (i.type) {
1313
1313
  case dt.PAUSE:
1314
- e += i.duration;
1314
+ t += i.duration;
1315
1315
  break;
1316
1316
  case dt.ANIMATE:
1317
- o = Math.max(o, e + i.delay + i.duration), i.block && (e += i.delay + i.duration);
1317
+ o = Math.max(o, t + i.delay + i.duration), i.block && (t += i.delay + i.duration);
1318
1318
  break;
1319
1319
  case dt.UPDATE:
1320
1320
  break;
@@ -1323,78 +1323,78 @@ function An(n) {
1323
1323
  }
1324
1324
  return o;
1325
1325
  }
1326
- function xe(n, t = null) {
1327
- const { red: e, green: o, blue: i } = n, a = e0(n, t);
1328
- return `rgba(${e}, ${o}, ${i}, ${a})`;
1326
+ function xe(n, e = null) {
1327
+ const { red: t, green: o, blue: i } = n, a = e0(n, e);
1328
+ return `rgba(${t}, ${o}, ${i}, ${a})`;
1329
1329
  }
1330
1330
  function h0(n) {
1331
1331
  return n === document.body;
1332
1332
  }
1333
- function Tn(n, t) {
1334
- const e = document.createElement("div");
1335
- if (e.style.width = "100%", e.style.aspectRatio = `${n.size.width} / ${n.size.height}`, e.style.position = "relative", h0(t)) {
1336
- e.style.top = "50%", e.style.transform = "translateY(-50%)", e.style.marginLeft = "auto", e.style.marginRight = "auto", e.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
1333
+ function Tn(n, e) {
1334
+ const t = document.createElement("div");
1335
+ if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", h0(e)) {
1336
+ t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto", t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
1337
1337
  const o = n.size.height / n.size.width;
1338
- ke(e, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => ke(e, o));
1338
+ ke(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => ke(t, o));
1339
1339
  }
1340
- return e;
1340
+ return t;
1341
1341
  }
1342
- function ke(n, t) {
1343
- window.innerHeight / window.innerWidth > t ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
1342
+ function ke(n, e) {
1343
+ window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
1344
1344
  }
1345
1345
  const Ln = {
1346
1346
  check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
1347
- interpolate: (n, t, e) => ({
1348
- red: Math.round(n.red + (t.red - n.red) * e),
1349
- green: Math.round(n.green + (t.green - n.green) * e),
1350
- blue: Math.round(n.blue + (t.blue - n.blue) * e),
1351
- alpha: n.alpha + (t.alpha - n.alpha) * e
1347
+ interpolate: (n, e, t) => ({
1348
+ red: Math.round(n.red + (e.red - n.red) * t),
1349
+ green: Math.round(n.green + (e.green - n.green) * t),
1350
+ blue: Math.round(n.blue + (e.blue - n.blue) * t),
1351
+ alpha: n.alpha + (e.alpha - n.alpha) * t
1352
1352
  })
1353
1353
  }, Mn = {
1354
1354
  check: (n) => !0,
1355
- interpolate: (n, t) => t
1355
+ interpolate: (n, e) => e
1356
1356
  }, Cn = {
1357
1357
  check: (n) => typeof n == "number",
1358
- interpolate: (n, t, e) => n + (t - n) * e
1358
+ interpolate: (n, e, t) => n + (e - n) * t
1359
1359
  }, Oe = [
1360
1360
  Cn,
1361
1361
  Ln,
1362
1362
  Mn
1363
1363
  ];
1364
- function Sn(n, t, e, o = null) {
1365
- if (e === 0)
1364
+ function Sn(n, e, t, o = null) {
1365
+ if (t === 0)
1366
1366
  return n;
1367
- if (e === 1)
1368
- return { ...n, ...t };
1367
+ if (t === 1)
1368
+ return { ...n, ...e };
1369
1369
  const i = o != null ? [...o, ...Oe] : Oe, a = {};
1370
- for (const s in t) {
1371
- const r = n[s], l = t[s];
1370
+ for (const s in e) {
1371
+ const r = n[s], l = e[s];
1372
1372
  for (const c of i)
1373
1373
  if (c.check(r, s) && c.check(l, s)) {
1374
1374
  a[s] = c.interpolate(
1375
1375
  r,
1376
1376
  l,
1377
- e
1377
+ t
1378
1378
  );
1379
1379
  break;
1380
1380
  }
1381
1381
  }
1382
1382
  return { ...n, ...a };
1383
1383
  }
1384
- function _e(n, t, e = null) {
1385
- if (t === null)
1384
+ function _e(n, e, t = null) {
1385
+ if (e === null)
1386
1386
  return;
1387
- const o = Array.isArray(t) ? t : [t];
1387
+ const o = Array.isArray(e) ? e : [e];
1388
1388
  let i = 0;
1389
1389
  for (const a of o) {
1390
- if (e !== null && i > e)
1390
+ if (t !== null && i > t)
1391
1391
  break;
1392
1392
  switch (a.type) {
1393
1393
  case dt.ANIMATE: {
1394
1394
  const s = n.get(a.object);
1395
1395
  if (s === void 0)
1396
1396
  break;
1397
- const r = e !== null ? e - i : null, l = Math.max(
1397
+ const r = t !== null ? t - i : null, l = Math.max(
1398
1398
  Math.min(
1399
1399
  r !== null ? (r - a.delay) / a.duration : 1,
1400
1400
  1
@@ -1431,12 +1431,12 @@ function _e(n, t, e = null) {
1431
1431
  }
1432
1432
  }
1433
1433
  function ye(n) {
1434
- return "objects" in n ? n.objects.filter((t) => "objectType" in t) : [];
1434
+ return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
1435
1435
  }
1436
1436
  function Ne({
1437
1437
  slide: n,
1438
- buildIndex: t,
1439
- buildTime: e
1438
+ buildIndex: e,
1439
+ buildTime: t
1440
1440
  }) {
1441
1441
  const o = /* @__PURE__ */ new Map();
1442
1442
  function i(s) {
@@ -1446,49 +1446,49 @@ function Ne({
1446
1446
  }
1447
1447
  for (const s of n.objects)
1448
1448
  i(s);
1449
- const a = e === null ? t : t - 1;
1449
+ const a = t === null ? e : e - 1;
1450
1450
  for (let s = 0; s < a; s++) {
1451
1451
  const r = n.animations[s] ?? null;
1452
1452
  _e(o, r);
1453
1453
  }
1454
- if (e !== null && t > 0) {
1455
- const s = n.animations[t - 1] ?? null;
1456
- _e(o, s, e);
1454
+ if (t !== null && e > 0) {
1455
+ const s = n.animations[e - 1] ?? null;
1456
+ _e(o, s, t);
1457
1457
  }
1458
1458
  return o;
1459
1459
  }
1460
1460
  function Pn(n) {
1461
- const t = {};
1462
- function e(o) {
1461
+ const e = {};
1462
+ function t(o) {
1463
1463
  if (o.objectType === j.SVG) {
1464
1464
  const a = o.svg;
1465
- a !== void 0 && a.length > 0 && (t[a] = a);
1465
+ a !== void 0 && a.length > 0 && (e[a] = a);
1466
1466
  }
1467
1467
  const i = ye(o);
1468
1468
  for (const a of i)
1469
- e(a);
1469
+ t(a);
1470
1470
  }
1471
1471
  for (const o of n.slides)
1472
1472
  for (const i of o.objects)
1473
- e(i);
1474
- return t;
1473
+ t(i);
1474
+ return e;
1475
1475
  }
1476
1476
  const yt = "presenterState";
1477
- function En(n, t) {
1478
- const e = localStorage.getItem(yt);
1479
- if (e === null)
1480
- return null;
1477
+ function En(n, e) {
1478
+ const t = localStorage.getItem(yt);
1481
1479
  if (t === null)
1480
+ return null;
1481
+ if (e === null)
1482
1482
  return localStorage.removeItem(yt), null;
1483
1483
  let o;
1484
1484
  try {
1485
- o = JSON.parse(e);
1485
+ o = JSON.parse(t);
1486
1486
  } catch (c) {
1487
1487
  return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(yt), null;
1488
1488
  }
1489
1489
  const { title: i, timestamp: a } = o;
1490
1490
  let { slideIndex: s, buildIndex: r } = o;
1491
- if (typeof i != "string" || typeof s != "number" || typeof r != "number" || typeof a != "number" || i !== n.title || Date.now() - a > 1e3 * 60 * t)
1491
+ if (typeof i != "string" || typeof s != "number" || typeof r != "number" || typeof a != "number" || i !== n.title || Date.now() - a > 1e3 * 60 * e)
1492
1492
  return localStorage.removeItem(yt), null;
1493
1493
  s > n.slides.length - 1 && (s = n.slides.length - 1, r = 0);
1494
1494
  const l = n.slides[s];
@@ -1498,10 +1498,10 @@ function En(n, t) {
1498
1498
  buildIndex: r
1499
1499
  });
1500
1500
  }
1501
- function Re({ title: n, slideIndex: t, buildIndex: e }) {
1501
+ function Re({ title: n, slideIndex: e, buildIndex: t }) {
1502
1502
  localStorage.setItem(
1503
1503
  yt,
1504
- JSON.stringify({ title: n, slideIndex: t, buildIndex: e, timestamp: Date.now() })
1504
+ JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
1505
1505
  );
1506
1506
  }
1507
1507
  const Fe = Object.freeze({
@@ -1522,37 +1522,37 @@ const Fe = Object.freeze({
1522
1522
  Node: "node"
1523
1523
  };
1524
1524
  function In(n) {
1525
- const t = document.createElement("div");
1526
- return t.setAttribute("role", "status"), t.setAttribute("aria-label", n), t.setAttribute("aria-atomic", "true"), Object.assign(t.style, {
1525
+ const e = document.createElement("div");
1526
+ return e.setAttribute("role", "status"), e.setAttribute("aria-label", n), e.setAttribute("aria-atomic", "true"), Object.assign(e.style, {
1527
1527
  position: "absolute",
1528
1528
  width: "1px",
1529
1529
  height: "1px",
1530
1530
  overflow: "hidden",
1531
1531
  clipPath: "inset(50%)",
1532
1532
  whiteSpace: "nowrap"
1533
- }), t;
1533
+ }), e;
1534
1534
  }
1535
- function kn(n, t) {
1536
- const e = n.description ? [n.description] : [];
1535
+ function kn(n, e) {
1536
+ const t = n.description ? [n.description] : [];
1537
1537
  function o(i, a) {
1538
- const s = t.get(i);
1538
+ const s = e.get(i);
1539
1539
  if (s === void 0)
1540
1540
  return;
1541
1541
  const r = a * s.opacity;
1542
1542
  if (!On(s, r))
1543
1543
  return;
1544
1544
  const l = _n(s);
1545
- l && e.push(l);
1545
+ l && t.push(l);
1546
1546
  for (const c of ye(i))
1547
1547
  o(c, r);
1548
1548
  }
1549
1549
  for (const i of n.objects)
1550
1550
  o(i, 1);
1551
- return e.join(`
1551
+ return t.join(`
1552
1552
  `);
1553
1553
  }
1554
- function On(n, t) {
1555
- return t !== 0 && (!("drawn" in n) || n.drawn !== 0);
1554
+ function On(n, e) {
1555
+ return e !== 0 && (!("drawn" in n) || n.drawn !== 0);
1556
1556
  }
1557
1557
  function _n(n) {
1558
1558
  return n.description !== null ? n.description : Nn(n) ? Rn(n) : null;
@@ -1561,64 +1561,64 @@ function Nn(n) {
1561
1561
  return n.objectType === j.TEXT;
1562
1562
  }
1563
1563
  function Rn(n) {
1564
- let t = n.length;
1564
+ let e = n.length;
1565
1565
  return ue(n.text).map(
1566
- (e) => e.map((o) => {
1567
- if (t === null)
1566
+ (t) => t.map((o) => {
1567
+ if (e === null)
1568
1568
  return o.text;
1569
- if (t <= 0)
1569
+ if (e <= 0)
1570
1570
  return "";
1571
- const i = o.text.slice(0, t);
1572
- return t -= i.length, i;
1571
+ const i = o.text.slice(0, e);
1572
+ return e -= i.length, i;
1573
1573
  }).join("")
1574
1574
  ).join(`
1575
1575
  `);
1576
1576
  }
1577
- function Fn(n, t) {
1578
- n.textContent !== t && (n.textContent = t);
1577
+ function Fn(n, e) {
1578
+ n.textContent !== e && (n.textContent = e);
1579
1579
  }
1580
- function Dn(n, t) {
1581
- t.context.clearRect(0, 0, n.width, n.height);
1580
+ function Bn(n, e) {
1581
+ e.context.clearRect(0, 0, n.width, n.height);
1582
1582
  }
1583
- function Bn(n) {
1584
- const t = document.createElement("canvas");
1585
- return t.setAttribute("width", n.width.toString()), t.setAttribute("height", n.height.toString()), t.setAttribute("aria-hidden", "true"), t.style.position = "absolute", t.style.width = "100%", t;
1583
+ function Dn(n) {
1584
+ const e = document.createElement("canvas");
1585
+ return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.setAttribute("aria-hidden", "true"), e.style.position = "absolute", e.style.width = "100%", e;
1586
1586
  }
1587
1587
  const pt = {
1588
1588
  Browser: "browser",
1589
1589
  Node: "node"
1590
1590
  };
1591
1591
  function qn(n) {
1592
- const t = new Path2D(n);
1592
+ const e = new Path2D(n);
1593
1593
  return {
1594
1594
  type: pt.Browser,
1595
- path: t
1595
+ path: e
1596
1596
  };
1597
1597
  }
1598
1598
  function zn(n) {
1599
- const { drawn: t, startX: e, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: l } = n, c = { x: e, y: o }, u = { x: i, y: a }, p = Math.atan2(u.y - c.y, u.x - c.x), h = { x: c.x + (u.x - c.x) / 2, y: c.y + (u.y - c.y) / 2 }, f = u.x - c.x, v = u.y - c.y, T = Math.hypot(f, v) * t, C = Math.cos(p), M = Math.sin(p), L = l ? { x: h.x - C * T / 2, y: h.y - M * T / 2 } : c, E = l ? { x: h.x + C * T / 2, y: h.y + M * T / 2 } : { x: c.x + C * T, y: c.y + M * T }, S = r ? Math.PI / 6 : Math.PI / 4.5, k = T < s * 2 ? T / 2 : s, F = {
1599
+ const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: l } = n, c = { x: t, y: o }, u = { x: i, y: a }, p = Math.atan2(u.y - c.y, u.x - c.x), h = { x: c.x + (u.x - c.x) / 2, y: c.y + (u.y - c.y) / 2 }, f = u.x - c.x, v = u.y - c.y, T = Math.hypot(f, v) * e, C = Math.cos(p), M = Math.sin(p), L = l ? { x: h.x - C * T / 2, y: h.y - M * T / 2 } : c, E = l ? { x: h.x + C * T / 2, y: h.y + M * T / 2 } : { x: c.x + C * T, y: c.y + M * T }, S = r ? Math.PI / 6 : Math.PI / 4.5, k = T < s * 2 ? T / 2 : s, F = {
1600
1600
  x: E.x - k * Math.cos(p - S),
1601
1601
  y: E.y - k * Math.sin(p - S)
1602
1602
  }, U = {
1603
1603
  x: E.x - k * Math.cos(p + S),
1604
1604
  y: E.y - k * Math.sin(p + S)
1605
- }, D = {
1605
+ }, B = {
1606
1606
  x: L.x + k * Math.cos(p - S),
1607
1607
  y: L.y + k * Math.sin(p - S)
1608
- }, Y = {
1608
+ }, $ = {
1609
1609
  x: L.x + k * Math.cos(p + S),
1610
1610
  y: L.y + k * Math.sin(p + S)
1611
1611
  };
1612
1612
  return {
1613
1613
  arrowPoints: [L, E],
1614
1614
  arrowheadPoints: [F, E, U],
1615
- doubledArrowheadPoints: [D, L, Y]
1615
+ doubledArrowheadPoints: [B, L, $]
1616
1616
  };
1617
1617
  }
1618
1618
  function mt({
1619
1619
  ctx: n,
1620
- color: t,
1621
- drawn: e = null,
1620
+ color: e,
1621
+ drawn: t = null,
1622
1622
  isDrawnFromCenter: o = !1,
1623
1623
  isRounded: i = !1,
1624
1624
  opacity: a = null,
@@ -1626,9 +1626,9 @@ function mt({
1626
1626
  pathLength: r = null,
1627
1627
  width: l
1628
1628
  }) {
1629
- if (!(l === 0 || e === 0)) {
1630
- if (e !== null && r !== null && e !== 1) {
1631
- const c = r + (i ? l : 0), u = r * e;
1629
+ if (!(l === 0 || t === 0)) {
1630
+ if (t !== null && r !== null && t !== 1) {
1631
+ const c = r + (i ? l : 0), u = r * t;
1632
1632
  if (!o)
1633
1633
  n.context.setLineDash([u, c - u]), n.context.lineDashOffset = 0;
1634
1634
  else {
@@ -1637,7 +1637,7 @@ function mt({
1637
1637
  }
1638
1638
  } else
1639
1639
  n.context.setLineDash([]), n.context.lineDashOffset = 0;
1640
- if (n.context.lineWidth = l, n.context.strokeStyle = It(t, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1640
+ if (n.context.lineWidth = l, n.context.strokeStyle = It(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1641
1641
  n.context.stroke();
1642
1642
  return;
1643
1643
  }
@@ -1653,103 +1653,103 @@ function mt({
1653
1653
  }
1654
1654
  }
1655
1655
  }
1656
- function gt({ ctx: n, path: t, color: e, opacity: o = null }) {
1657
- if (n.context.fillStyle = xe(e, o), t === void 0) {
1656
+ function gt({ ctx: n, path: e, color: t, opacity: o = null }) {
1657
+ if (n.context.fillStyle = xe(t, o), e === void 0) {
1658
1658
  n.context.fill();
1659
1659
  return;
1660
1660
  }
1661
1661
  switch (n.type) {
1662
1662
  case Z.Browser:
1663
- t.type === pt.Browser ? n.context.fill(t.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1663
+ e.type === pt.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1664
1664
  break;
1665
1665
  case Z.Node:
1666
- t.type === pt.Node ? n.context.fill(t.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1666
+ e.type === pt.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1667
1667
  break;
1668
1668
  default:
1669
1669
  at(n);
1670
1670
  }
1671
1671
  }
1672
- function Ut(n, t) {
1673
- const e = t(), o = n[0];
1672
+ function Ut(n, e) {
1673
+ const t = e(), o = n[0];
1674
1674
  if (o === void 0)
1675
- return { path: e, length: 0 };
1676
- e.path.moveTo(o.x, o.y);
1675
+ return { path: t, length: 0 };
1676
+ t.path.moveTo(o.x, o.y);
1677
1677
  let i = 0;
1678
1678
  for (let a = 1; a < n.length; a++) {
1679
1679
  const s = n[a], r = n[a - 1];
1680
1680
  if (s === void 0 || r === void 0)
1681
1681
  continue;
1682
1682
  const l = s.x - r.x, c = s.y - r.y;
1683
- i += Math.hypot(l, c), e.path.lineTo(s.x, s.y);
1683
+ i += Math.hypot(l, c), t.path.lineTo(s.x, s.y);
1684
1684
  }
1685
- return { path: e, length: i };
1685
+ return { path: t, length: i };
1686
1686
  }
1687
1687
  const jn = ({
1688
1688
  ctx: n,
1689
- object: t,
1690
- opacity: e,
1689
+ object: e,
1690
+ opacity: t,
1691
1691
  createPath2D: o
1692
1692
  }) => {
1693
- const i = t.opacity * e;
1694
- if (i === 0 || t.drawn === 0)
1693
+ const i = e.opacity * t;
1694
+ if (i === 0 || e.drawn === 0)
1695
1695
  return;
1696
- const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = zn(t), { path: l } = Ut(a, o), { path: c } = Ut(s, o);
1696
+ const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = zn(e), { path: l } = Ut(a, o), { path: c } = Ut(s, o);
1697
1697
  if (mt({
1698
- color: t.color,
1698
+ color: e.color,
1699
1699
  ctx: n,
1700
1700
  path: l,
1701
1701
  opacity: i,
1702
- width: t.width
1703
- }), t.isArrowheadFilled && (c.path.closePath(), gt({
1702
+ width: e.width
1703
+ }), e.isArrowheadFilled && (c.path.closePath(), gt({
1704
1704
  ctx: n,
1705
1705
  path: c,
1706
- color: t.color,
1706
+ color: e.color,
1707
1707
  opacity: i
1708
1708
  })), mt({
1709
- color: t.color,
1709
+ color: e.color,
1710
1710
  ctx: n,
1711
1711
  path: c,
1712
1712
  opacity: i,
1713
- width: t.width
1714
- }), t.isArrowheadDoubled) {
1713
+ width: e.width
1714
+ }), e.isArrowheadDoubled) {
1715
1715
  const { path: u } = Ut(
1716
1716
  r,
1717
1717
  o
1718
1718
  );
1719
- t.isArrowheadFilled && (u.path.closePath(), gt({
1719
+ e.isArrowheadFilled && (u.path.closePath(), gt({
1720
1720
  ctx: n,
1721
1721
  path: u,
1722
- color: t.color,
1722
+ color: e.color,
1723
1723
  opacity: i
1724
1724
  })), mt({
1725
- color: t.color,
1725
+ color: e.color,
1726
1726
  ctx: n,
1727
1727
  path: u,
1728
1728
  opacity: i,
1729
- width: t.width
1729
+ width: e.width
1730
1730
  });
1731
1731
  }
1732
1732
  };
1733
- function Vn(n, t) {
1734
- const e = n.radius - n.strokeWidth / 2;
1735
- if (e <= 0)
1733
+ function Vn(n, e) {
1734
+ const t = n.radius - n.strokeWidth / 2;
1735
+ if (t <= 0)
1736
1736
  return;
1737
- const o = t(), i = -Math.PI / 2;
1738
- return o.path.arc(n.x, n.y, e, i, i + 2 * Math.PI), o;
1737
+ const o = e(), i = -Math.PI / 2;
1738
+ return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
1739
1739
  }
1740
- function Hn(n, t) {
1741
- const e = t(), o = -Math.PI / 2;
1742
- e.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
1740
+ function Hn(n, e) {
1741
+ const t = e(), o = -Math.PI / 2;
1742
+ t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
1743
1743
  const i = 2 * Math.PI * n.radius;
1744
- return { path: e, length: i };
1744
+ return { path: t, length: i };
1745
1745
  }
1746
- function c0(n, t) {
1746
+ function c0(n, e) {
1747
1747
  switch (n.type) {
1748
1748
  case Z.Browser:
1749
- t.type === pt.Browser ? n.context.clip(t.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1749
+ e.type === pt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1750
1750
  break;
1751
1751
  case Z.Node:
1752
- t.type === pt.Node ? n.context.clip(t.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1752
+ e.type === pt.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1753
1753
  break;
1754
1754
  default:
1755
1755
  at(n);
@@ -1757,111 +1757,111 @@ function c0(n, t) {
1757
1757
  }
1758
1758
  const Un = ({
1759
1759
  ctx: n,
1760
- object: t,
1761
- opacity: e,
1760
+ object: e,
1761
+ opacity: t,
1762
1762
  createPath2D: o
1763
1763
  }) => {
1764
- const i = t.opacity * e;
1765
- if (i === 0 || t.drawn === 0 && t.fillColor.alpha === 0)
1764
+ const i = e.opacity * t;
1765
+ if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1766
1766
  return;
1767
- const { path: a, length: s } = Hn(t, o);
1768
- if (i < 1 && t.strokeWidth > 0) {
1769
- const r = Vn(t, o);
1770
- r !== void 0 && (n.context.save(), c0(n, r), gt({ ctx: n, path: a, color: t.fillColor, opacity: i }), n.context.restore());
1767
+ const { path: a, length: s } = Hn(e, o);
1768
+ if (i < 1 && e.strokeWidth > 0) {
1769
+ const r = Vn(e, o);
1770
+ r !== void 0 && (n.context.save(), c0(n, r), gt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1771
1771
  } else
1772
- gt({ ctx: n, path: a, color: t.fillColor, opacity: i });
1772
+ gt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1773
1773
  mt({
1774
- color: t.strokeColor,
1774
+ color: e.strokeColor,
1775
1775
  ctx: n,
1776
- drawn: t.drawn,
1776
+ drawn: e.drawn,
1777
1777
  path: a,
1778
1778
  pathLength: s,
1779
1779
  opacity: i,
1780
- width: t.strokeWidth
1780
+ width: e.strokeWidth
1781
1781
  });
1782
1782
  };
1783
- function $(n = null) {
1783
+ function Y(n = null) {
1784
1784
  return {
1785
1785
  x: 0,
1786
1786
  y: 0,
1787
1787
  ...n
1788
1788
  };
1789
1789
  }
1790
- const Yn = $();
1790
+ const $n = Y();
1791
1791
  function ct(n = null) {
1792
1792
  return {
1793
- origin: Yn,
1793
+ origin: $n,
1794
1794
  size: mn,
1795
1795
  ...n
1796
1796
  };
1797
1797
  }
1798
1798
  ct();
1799
- function ut(n, t, e) {
1800
- const { x: o, y: i } = n, { width: a, height: s } = e;
1801
- switch (t) {
1799
+ function ut(n, e, t) {
1800
+ const { x: o, y: i } = n, { width: a, height: s } = t;
1801
+ switch (e) {
1802
1802
  case st.TOP_LEFT:
1803
1803
  return ct({
1804
- origin: $({ x: o, y: i }),
1805
- size: e
1804
+ origin: Y({ x: o, y: i }),
1805
+ size: t
1806
1806
  });
1807
1807
  case st.TOP:
1808
1808
  return ct({
1809
- origin: $({ x: o - a / 2, y: i }),
1810
- size: e
1809
+ origin: Y({ x: o - a / 2, y: i }),
1810
+ size: t
1811
1811
  });
1812
1812
  case st.TOP_RIGHT:
1813
1813
  return ct({
1814
- origin: $({ x: o - a, y: i }),
1815
- size: e
1814
+ origin: Y({ x: o - a, y: i }),
1815
+ size: t
1816
1816
  });
1817
1817
  case st.LEFT:
1818
1818
  return ct({
1819
- origin: $({ x: o, y: i - s / 2 }),
1820
- size: e
1819
+ origin: Y({ x: o, y: i - s / 2 }),
1820
+ size: t
1821
1821
  });
1822
1822
  case st.CENTER:
1823
1823
  return ct({
1824
- origin: $({ x: o - a / 2, y: i - s / 2 }),
1825
- size: e
1824
+ origin: Y({ x: o - a / 2, y: i - s / 2 }),
1825
+ size: t
1826
1826
  });
1827
1827
  case st.RIGHT:
1828
1828
  return ct({
1829
- origin: $({ x: o - a, y: i - s / 2 }),
1830
- size: e
1829
+ origin: Y({ x: o - a, y: i - s / 2 }),
1830
+ size: t
1831
1831
  });
1832
1832
  case st.BOTTOM_LEFT:
1833
1833
  return ct({
1834
- origin: $({ x: o, y: i - s }),
1835
- size: e
1834
+ origin: Y({ x: o, y: i - s }),
1835
+ size: t
1836
1836
  });
1837
1837
  case st.BOTTOM:
1838
1838
  return ct({
1839
- origin: $({ x: o - a / 2, y: i - s }),
1840
- size: e
1839
+ origin: Y({ x: o - a / 2, y: i - s }),
1840
+ size: t
1841
1841
  });
1842
1842
  case st.BOTTOM_RIGHT:
1843
1843
  return ct({
1844
- origin: $({ x: o - a, y: i - s }),
1845
- size: e
1844
+ origin: Y({ x: o - a, y: i - s }),
1845
+ size: t
1846
1846
  });
1847
1847
  default:
1848
- at(t);
1848
+ at(e);
1849
1849
  }
1850
1850
  }
1851
- const $n = ({
1851
+ const Yn = ({
1852
1852
  ctx: n,
1853
- object: t,
1854
- renderObject: e,
1853
+ object: e,
1854
+ renderObject: t,
1855
1855
  opacity: o
1856
1856
  }) => {
1857
- const i = t.scale * t.scaleX, a = t.scale * t.scaleY, s = ut(
1858
- $({ x: t.x, y: t.y }),
1859
- t.anchor,
1857
+ const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = ut(
1858
+ Y({ x: e.x, y: e.y }),
1859
+ e.anchor,
1860
1860
  K({
1861
- width: t.width * Math.abs(i),
1862
- height: t.height * Math.abs(a)
1861
+ width: e.width * Math.abs(i),
1862
+ height: e.height * Math.abs(a)
1863
1863
  })
1864
- ), { rotation: r, rotateOriginX: l, rotateOriginY: c, skewOriginX: u, skewOriginY: p, skewX: h, skewY: f } = t;
1864
+ ), { rotation: r, rotateOriginX: l, rotateOriginY: c, skewOriginX: u, skewOriginY: p, skewX: h, skewY: f } = e;
1865
1865
  if (!(i === 0 || a === 0)) {
1866
1866
  n.context.save(), n.context.translate(s.origin.x, s.origin.y), n.context.scale(i, a), n.context.translate(l, c), n.context.rotate(r * Math.PI / 180), n.context.translate(-l, -c), n.context.translate(u, p), n.context.transform(
1867
1867
  1,
@@ -1871,33 +1871,33 @@ const $n = ({
1871
1871
  0,
1872
1872
  0
1873
1873
  ), n.context.translate(-u, -p);
1874
- for (const v of t.objects)
1875
- e(v, o * t.opacity);
1876
- t.previewColor !== null && (n.context.fillStyle = It(t.previewColor), n.context.fillRect(0, 0, t.width, t.height)), t.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(l, c, t.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), t.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(u, p, t.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1874
+ for (const v of e.objects)
1875
+ t(v, o * e.opacity);
1876
+ e.previewColor !== null && (n.context.fillStyle = It(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(l, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(u, p, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1877
1877
  }
1878
1878
  };
1879
- function ve(n, t, e, o, i = 0) {
1879
+ function ve(n, e, t, o, i = 0) {
1880
1880
  const a = o();
1881
- a.path.moveTo(n.x + e, n.y), a.path.lineTo(n.x + t.width - e, n.y), a.path.arcTo(
1882
- n.x + t.width,
1881
+ a.path.moveTo(n.x + t, n.y), a.path.lineTo(n.x + e.width - t, n.y), a.path.arcTo(
1882
+ n.x + e.width,
1883
1883
  n.y,
1884
- n.x + t.width,
1885
- n.y + e,
1886
- e
1887
- ), a.path.lineTo(n.x + t.width, n.y + t.height - e), a.path.arcTo(
1888
- n.x + t.width,
1889
- n.y + t.height,
1890
- n.x + t.width - e,
1891
- n.y + t.height,
1892
- e
1893
- ), a.path.lineTo(n.x + e, n.y + t.height), a.path.arcTo(
1884
+ n.x + e.width,
1885
+ n.y + t,
1886
+ t
1887
+ ), a.path.lineTo(n.x + e.width, n.y + e.height - t), a.path.arcTo(
1888
+ n.x + e.width,
1889
+ n.y + e.height,
1890
+ n.x + e.width - t,
1891
+ n.y + e.height,
1892
+ t
1893
+ ), a.path.lineTo(n.x + t, n.y + e.height), a.path.arcTo(
1894
1894
  n.x,
1895
- n.y + t.height,
1895
+ n.y + e.height,
1896
1896
  n.x,
1897
- n.y + t.height - e,
1898
- e
1899
- ), a.path.lineTo(n.x, n.y + e), a.path.arcTo(n.x, n.y, n.x + e, n.y, e), i > 0 && a.path.lineTo(n.x + e + i, n.y);
1900
- const s = 2 * (t.width + t.height - 4 * e) + 2 * Math.PI * e + i;
1897
+ n.y + e.height - t,
1898
+ t
1899
+ ), a.path.lineTo(n.x, n.y + t), a.path.arcTo(n.x, n.y, n.x + t, n.y, t), i > 0 && a.path.lineTo(n.x + t + i, n.y);
1900
+ const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
1901
1901
  return { path: a, length: s };
1902
1902
  }
1903
1903
  const kt = {
@@ -1905,22 +1905,22 @@ const kt = {
1905
1905
  Node: "node"
1906
1906
  }, Wn = ({
1907
1907
  ctx: n,
1908
- imageById: t,
1909
- object: e,
1908
+ imageById: e,
1909
+ object: t,
1910
1910
  opacity: o,
1911
1911
  createPath2D: i
1912
1912
  }) => {
1913
1913
  const a = ut(
1914
- $({ x: e.x, y: e.y }),
1915
- e.anchor,
1916
- K({ width: e.width, height: e.height })
1917
- ), s = t[e.imageId];
1914
+ Y({ x: t.x, y: t.y }),
1915
+ t.anchor,
1916
+ K({ width: t.width, height: t.height })
1917
+ ), s = e[t.imageId];
1918
1918
  if (s !== void 0) {
1919
- if (n.context.save(), e.cornerRadius > 0) {
1919
+ if (n.context.save(), t.cornerRadius > 0) {
1920
1920
  const r = ve(
1921
1921
  a.origin,
1922
1922
  a.size,
1923
- e.cornerRadius,
1923
+ t.cornerRadius,
1924
1924
  i
1925
1925
  );
1926
1926
  switch (n.type) {
@@ -1934,7 +1934,7 @@ const kt = {
1934
1934
  at(n);
1935
1935
  }
1936
1936
  }
1937
- switch (n.context.globalAlpha = o * e.opacity, n.context.imageSmoothingEnabled = e.smooth, n.type) {
1937
+ switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
1938
1938
  case Z.Browser:
1939
1939
  s.type === kt.Browser ? n.context.drawImage(
1940
1940
  s.image,
@@ -1959,145 +1959,145 @@ const kt = {
1959
1959
  n.context.restore();
1960
1960
  }
1961
1961
  };
1962
- function Gn(n, t) {
1963
- const e = t();
1964
- e.path.moveTo(n.startX, n.startY), e.path.lineTo(n.endX, n.endY);
1962
+ function Gn(n, e) {
1963
+ const t = e();
1964
+ t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
1965
1965
  const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
1966
- return { path: e, length: o };
1966
+ return { path: t, length: o };
1967
1967
  }
1968
1968
  const Xn = ({
1969
1969
  ctx: n,
1970
- object: t,
1971
- opacity: e,
1970
+ object: e,
1971
+ opacity: t,
1972
1972
  createPath2D: o
1973
1973
  }) => {
1974
- const i = t.opacity * e;
1975
- if (i === 0 || t.drawn === 0)
1974
+ const i = e.opacity * t;
1975
+ if (i === 0 || e.drawn === 0)
1976
1976
  return;
1977
- const { path: a, length: s } = Gn(t, o);
1977
+ const { path: a, length: s } = Gn(e, o);
1978
1978
  mt({
1979
- color: t.color,
1979
+ color: e.color,
1980
1980
  ctx: n,
1981
- drawn: t.drawn,
1982
- isDrawnFromCenter: t.isDrawnFromCenter,
1983
- isRounded: t.isRounded,
1981
+ drawn: e.drawn,
1982
+ isDrawnFromCenter: e.isDrawnFromCenter,
1983
+ isRounded: e.isRounded,
1984
1984
  path: a,
1985
1985
  pathLength: s,
1986
1986
  opacity: i,
1987
- width: t.width
1987
+ width: e.width
1988
1988
  });
1989
1989
  }, Kn = ({
1990
1990
  ctx: n,
1991
- object: t,
1992
- opacity: e,
1991
+ object: e,
1992
+ opacity: t,
1993
1993
  renderObject: o
1994
1994
  }) => {
1995
1995
  n.context.save();
1996
1996
  const i = ut(
1997
- $({ x: t.x, y: t.y }),
1998
- t.anchor,
1999
- K({ width: t.width, height: t.height })
1997
+ Y({ x: e.x, y: e.y }),
1998
+ e.anchor,
1999
+ K({ width: e.width, height: e.height })
2000
2000
  );
2001
- t.preview && (n.context.lineWidth = 4, n.context.strokeStyle = It(G.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
2002
- for (const a of t.objects)
2003
- o(a, e * t.opacity);
2001
+ e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = It(G.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
2002
+ for (const a of e.objects)
2003
+ o(a, t * e.opacity);
2004
2004
  n.context.restore();
2005
2005
  }, Zn = ({
2006
2006
  ctx: n,
2007
- object: t,
2008
- opacity: e,
2007
+ object: e,
2008
+ opacity: t,
2009
2009
  createPath2D: o
2010
2010
  }) => {
2011
- const i = t.opacity * e;
2012
- if (i === 0 || t.drawn === 0 && t.fillColor.alpha === 0)
2011
+ const i = e.opacity * t;
2012
+ if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
2013
2013
  return;
2014
2014
  const { origin: a } = ut(
2015
- $({ x: t.x, y: t.y }),
2016
- t.anchor,
2017
- K({ width: t.width, height: t.height })
2018
- ), s = o(t.path);
2019
- n.context.save(), n.context.translate(a.x, a.y), n.context.scale(t.width / t.viewboxWidth, t.height / t.viewboxHeight), gt({
2015
+ Y({ x: e.x, y: e.y }),
2016
+ e.anchor,
2017
+ K({ width: e.width, height: e.height })
2018
+ ), s = o(e.path);
2019
+ n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), gt({
2020
2020
  ctx: n,
2021
2021
  path: s,
2022
- color: t.fillColor,
2022
+ color: e.fillColor,
2023
2023
  opacity: i
2024
2024
  }), mt({
2025
- color: t.strokeColor,
2025
+ color: e.strokeColor,
2026
2026
  ctx: n,
2027
- drawn: t.drawn,
2028
- isRounded: t.isRounded,
2027
+ drawn: e.drawn,
2028
+ isRounded: e.isRounded,
2029
2029
  path: s,
2030
- pathLength: t.pathLength,
2030
+ pathLength: e.pathLength,
2031
2031
  opacity: i,
2032
- width: t.strokeWidth
2032
+ width: e.strokeWidth
2033
2033
  }), n.context.restore();
2034
2034
  };
2035
- function Jn(n, t) {
2036
- const e = t(), o = n.points, i = o[0];
2035
+ function Jn(n, e) {
2036
+ const t = e(), o = n.points, i = o[0];
2037
2037
  if (i === void 0)
2038
- return { path: e, length: 0 };
2039
- e.path.moveTo(i.x, i.y);
2038
+ return { path: t, length: 0 };
2039
+ t.path.moveTo(i.x, i.y);
2040
2040
  let a = 0, s = i;
2041
2041
  for (let l = 1; l < o.length; l++) {
2042
2042
  const c = o[l];
2043
2043
  if (c === void 0)
2044
2044
  continue;
2045
- e.path.lineTo(c.x, c.y);
2045
+ t.path.lineTo(c.x, c.y);
2046
2046
  const u = Math.hypot(c.x - s.x, c.y - s.y);
2047
2047
  a += u, s = c;
2048
2048
  }
2049
- e.path.closePath();
2049
+ t.path.closePath();
2050
2050
  const r = Math.hypot(
2051
2051
  i.x - s.x,
2052
2052
  i.y - s.y
2053
2053
  );
2054
- return a += r, { path: e, length: a };
2054
+ return a += r, { path: t, length: a };
2055
2055
  }
2056
2056
  const Qn = ({
2057
2057
  ctx: n,
2058
- object: t,
2059
- opacity: e,
2058
+ object: e,
2059
+ opacity: t,
2060
2060
  createPath2D: o
2061
2061
  }) => {
2062
- const i = t.opacity * e;
2063
- if (i === 0 || t.drawn === 0 && t.fillColor.alpha === 0)
2062
+ const i = e.opacity * t;
2063
+ if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
2064
2064
  return;
2065
- const { path: a, length: s } = Jn(t, o);
2065
+ const { path: a, length: s } = Jn(e, o);
2066
2066
  gt({
2067
2067
  ctx: n,
2068
2068
  path: a,
2069
- color: t.fillColor,
2069
+ color: e.fillColor,
2070
2070
  opacity: i
2071
2071
  }), mt({
2072
- color: t.strokeColor,
2072
+ color: e.strokeColor,
2073
2073
  ctx: n,
2074
- drawn: t.drawn,
2074
+ drawn: e.drawn,
2075
2075
  path: a,
2076
2076
  pathLength: s,
2077
2077
  opacity: i,
2078
- width: t.strokeWidth
2078
+ width: e.strokeWidth
2079
2079
  });
2080
2080
  };
2081
- function t1(n, t) {
2082
- const e = n.strokeWidth / 2, { origin: o, size: i } = ut(
2083
- $({ x: n.x, y: n.y }),
2081
+ function t1(n, e) {
2082
+ const t = n.strokeWidth / 2, { origin: o, size: i } = ut(
2083
+ Y({ x: n.x, y: n.y }),
2084
2084
  n.anchor,
2085
2085
  K({ width: n.width, height: n.height })
2086
2086
  ), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
2087
2087
  if (a <= 0 || s <= 0)
2088
2088
  return;
2089
- const r = $({ x: o.x + e, y: o.y + e }), l = K({ width: a, height: s }), c = Math.max(
2089
+ const r = Y({ x: o.x + t, y: o.y + t }), l = K({ width: a, height: s }), c = Math.max(
2090
2090
  0,
2091
- Math.min(n.cornerRadius - e, Math.min(a, s) / 2)
2091
+ Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
2092
2092
  );
2093
2093
  if (c > 0)
2094
- return ve(r, l, c, t).path;
2095
- const u = t();
2094
+ return ve(r, l, c, e).path;
2095
+ const u = e();
2096
2096
  return u.path.moveTo(r.x, r.y), u.path.lineTo(r.x + a, r.y), u.path.lineTo(r.x + a, r.y + s), u.path.lineTo(r.x, r.y + s), u.path.closePath(), u;
2097
2097
  }
2098
- function e1(n, t) {
2099
- const { origin: e, size: o } = ut(
2100
- $({ x: n.x, y: n.y }),
2098
+ function e1(n, e) {
2099
+ const { origin: t, size: o } = ut(
2100
+ Y({ x: n.x, y: n.y }),
2101
2101
  n.anchor,
2102
2102
  K({ width: n.width, height: n.height })
2103
2103
  ), i = Math.max(
@@ -2105,59 +2105,59 @@ function e1(n, t) {
2105
2105
  Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
2106
2106
  ), a = Math.min(n.strokeWidth * 2, o.width - i);
2107
2107
  if (i > 0)
2108
- return ve(e, o, i, t, a);
2108
+ return ve(t, o, i, e, a);
2109
2109
  {
2110
- const s = t();
2111
- s.path.moveTo(e.x, e.y), s.path.lineTo(e.x + o.width, e.y), s.path.lineTo(e.x + o.width, e.y + o.height), s.path.lineTo(e.x, e.y + o.height), s.path.lineTo(e.x, e.y), s.path.lineTo(e.x + a, e.y);
2110
+ const s = e();
2111
+ s.path.moveTo(t.x, t.y), s.path.lineTo(t.x + o.width, t.y), s.path.lineTo(t.x + o.width, t.y + o.height), s.path.lineTo(t.x, t.y + o.height), s.path.lineTo(t.x, t.y), s.path.lineTo(t.x + a, t.y);
2112
2112
  const r = 2 * (o.width + o.height) + a;
2113
2113
  return { path: s, length: r };
2114
2114
  }
2115
2115
  }
2116
2116
  const n1 = ({
2117
2117
  ctx: n,
2118
- object: t,
2119
- opacity: e,
2118
+ object: e,
2119
+ opacity: t,
2120
2120
  createPath2D: o
2121
2121
  }) => {
2122
- const i = t.opacity * e;
2123
- if (i === 0 || t.drawn === 0 && t.fillColor.alpha === 0)
2122
+ const i = e.opacity * t;
2123
+ if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
2124
2124
  return;
2125
- const { path: a, length: s } = e1(t, o);
2126
- if (i < 1 && t.strokeWidth > 0) {
2127
- const r = t1(t, o);
2128
- r !== void 0 && (n.context.save(), c0(n, r), gt({ ctx: n, path: a, color: t.fillColor, opacity: i }), n.context.restore());
2125
+ const { path: a, length: s } = e1(e, o);
2126
+ if (i < 1 && e.strokeWidth > 0) {
2127
+ const r = t1(e, o);
2128
+ r !== void 0 && (n.context.save(), c0(n, r), gt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
2129
2129
  } else
2130
- gt({ ctx: n, path: a, color: t.fillColor, opacity: i });
2130
+ gt({ ctx: n, path: a, color: e.fillColor, opacity: i });
2131
2131
  mt({
2132
- color: t.strokeColor,
2132
+ color: e.strokeColor,
2133
2133
  ctx: n,
2134
- drawn: t.drawn,
2134
+ drawn: e.drawn,
2135
2135
  path: a,
2136
2136
  pathLength: s,
2137
2137
  opacity: i,
2138
- width: t.strokeWidth
2138
+ width: e.strokeWidth
2139
2139
  });
2140
2140
  };
2141
2141
  function i1(n) {
2142
- const { origin: t, size: e } = ut(
2143
- $({ x: n.x, y: n.y }),
2142
+ const { origin: e, size: t } = ut(
2143
+ Y({ x: n.x, y: n.y }),
2144
2144
  n.anchor,
2145
2145
  K({ width: n.width, height: n.height })
2146
2146
  );
2147
2147
  return {
2148
- origin: t,
2149
- size: e,
2148
+ origin: e,
2149
+ size: t,
2150
2150
  cornerRadius: Math.max(
2151
2151
  0,
2152
- Math.min(n.cornerRadius, Math.min(e.width, e.height) / 2)
2152
+ Math.min(n.cornerRadius, Math.min(t.width, t.height) / 2)
2153
2153
  )
2154
2154
  };
2155
2155
  }
2156
- function r1(n, t, e, o = {
2157
- origin: $({ x: 0, y: 0 }),
2158
- size: t
2156
+ function r1(n, e, t, o = {
2157
+ origin: Y({ x: 0, y: 0 }),
2158
+ size: e
2159
2159
  }) {
2160
- const i = e(), { origin: a, size: s, cornerRadius: r } = i1(n), { origin: l, size: c } = o;
2160
+ const i = t(), { origin: a, size: s, cornerRadius: r } = i1(n), { origin: l, size: c } = o;
2161
2161
  return i.path.moveTo(l.x, l.y), i.path.lineTo(l.x + c.width, l.y), i.path.lineTo(l.x + c.width, l.y + c.height), i.path.lineTo(l.x, l.y + c.height), i.path.lineTo(l.x, l.y), r === 0 ? (i.path.moveTo(a.x, a.y), i.path.lineTo(a.x, a.y + s.height), i.path.lineTo(a.x + s.width, a.y + s.height), i.path.lineTo(a.x + s.width, a.y), i.path.lineTo(a.x, a.y), i) : (i.path.moveTo(a.x + r, a.y), i.path.arcTo(a.x, a.y, a.x, a.y + r, r), i.path.lineTo(a.x, a.y + s.height - r), i.path.arcTo(
2162
2162
  a.x,
2163
2163
  a.y + s.height,
@@ -2180,42 +2180,42 @@ function r1(n, t, e, o = {
2180
2180
  }
2181
2181
  const o1 = ({
2182
2182
  createPath2D: n,
2183
- ctx: t,
2184
- object: e,
2183
+ ctx: e,
2184
+ object: t,
2185
2185
  opacity: o,
2186
2186
  renderScale: i,
2187
2187
  slideSize: a
2188
2188
  }) => {
2189
- const s = e.opacity * o;
2190
- if (s === 0 || e.color.alpha === 0)
2189
+ const s = t.opacity * o;
2190
+ if (s === 0 || t.color.alpha === 0)
2191
2191
  return;
2192
2192
  const r = K({
2193
2193
  width: a.width / i,
2194
2194
  height: a.height / i
2195
- }), l = $({
2195
+ }), l = Y({
2196
2196
  x: (a.width - r.width) / 2,
2197
2197
  y: (a.height - r.height) / 2
2198
- }), c = r1(e, a, n, {
2198
+ }), c = r1(t, a, n, {
2199
2199
  origin: l,
2200
2200
  size: r
2201
2201
  });
2202
- gt({ ctx: t, path: c, color: e.color, opacity: s });
2202
+ gt({ ctx: e, path: c, color: t.color, opacity: s });
2203
2203
  }, s1 = ({
2204
2204
  ctx: n,
2205
- imageById: t,
2206
- object: e,
2205
+ imageById: e,
2206
+ object: t,
2207
2207
  opacity: o
2208
2208
  }) => {
2209
- const i = e.opacity * o;
2210
- if (i === 0 || !e.svg)
2209
+ const i = t.opacity * o;
2210
+ if (i === 0 || !t.svg)
2211
2211
  return;
2212
- const a = t[e.svg];
2212
+ const a = e[t.svg];
2213
2213
  if (a === void 0)
2214
2214
  return;
2215
2215
  const s = ut(
2216
- $({ x: e.x, y: e.y }),
2217
- e.anchor,
2218
- K({ width: e.width, height: e.height })
2216
+ Y({ x: t.x, y: t.y }),
2217
+ t.anchor,
2218
+ K({ width: t.width, height: t.height })
2219
2219
  );
2220
2220
  switch (n.context.save(), n.context.globalAlpha = i, n.type) {
2221
2221
  case Z.Browser:
@@ -2254,89 +2254,82 @@ function a1(n) {
2254
2254
  };
2255
2255
  }
2256
2256
  function l1(n) {
2257
+ const e = Math.max(...n.map((o) => o.bottom), 0), t = Math.max(...n.map((o) => o.top), 0);
2257
2258
  return {
2258
- bottom: Math.max(...n.map((t) => t.bottom), 0),
2259
- height: Math.max(...n.map((t) => t.height), 0),
2260
- lineAdvance: Math.max(...n.map((t) => t.lineAdvance), 0),
2261
- top: Math.max(...n.map((t) => t.top), 0),
2262
- width: n.reduce((t, e) => t + e.width, 0)
2259
+ bottom: e,
2260
+ height: t + e,
2261
+ lineAdvance: Math.max(...n.map((o) => o.lineAdvance), 0),
2262
+ top: t,
2263
+ width: n.reduce((o, i) => o + i.width, 0)
2263
2264
  };
2264
2265
  }
2265
- function h1(n, t = 1) {
2266
- var c;
2267
- const e = n.map(l1);
2268
- if (e.length === 0)
2266
+ function h1(n, e = 1) {
2267
+ const t = n.map(l1);
2268
+ if (t.length === 0)
2269
2269
  return {
2270
- lines: [],
2270
+ baselines: [],
2271
2271
  size: K()
2272
2272
  };
2273
- let o = ((c = e[0]) == null ? void 0 : c.top) ?? 0, i = 0;
2274
- const a = [];
2275
- for (let u = 0; u < e.length; u++) {
2276
- const p = e[u];
2277
- p !== void 0 && (u > 0 && (o += i * t), a.push({
2278
- ...p,
2279
- baselineY: o
2280
- }), i = p.lineAdvance);
2273
+ let o = 0, i, a = 0, s = 0;
2274
+ const r = [];
2275
+ for (const c of t) {
2276
+ const p = (c.lineAdvance * e - c.height) / 2, h = c.top + p;
2277
+ i === void 0 ? o = h : o += i + h, r.push(o), a = Math.min(a, o - c.top), s = Math.max(s, o + c.bottom), i = c.bottom + p;
2281
2278
  }
2282
- const s = Math.min(...a.map((u) => u.baselineY - u.top), 0), r = Math.max(...a.map((u) => u.baselineY + u.bottom), 0), l = -s;
2279
+ const l = -a;
2283
2280
  return {
2284
- lines: a.map((u) => ({
2285
- ...u,
2286
- // Keep all returned baselines relative to the top edge of the final text block
2287
- baselineY: u.baselineY + l
2288
- })),
2281
+ baselines: r.map((c) => c + l),
2289
2282
  size: K({
2290
- height: r - s,
2291
- width: Math.max(...a.map((u) => u.width), 0)
2283
+ height: s - a,
2284
+ width: Math.max(...t.map((c) => c.width), 0)
2292
2285
  })
2293
2286
  };
2294
2287
  }
2295
2288
  const c1 = 0.7, u1 = 0.3;
2296
2289
  function u0(n) {
2297
- const t = n.superscript, e = n.subscript && !t;
2298
- return !t && !e ? {
2290
+ const e = n.superscript, t = n.subscript && !e;
2291
+ return !e && !t ? {
2299
2292
  baselineShift: 0,
2300
2293
  fontSize: n.fontSize,
2301
2294
  isSubscript: !1,
2302
2295
  isSuperscript: !1
2303
2296
  } : {
2304
- baselineShift: n.fontSize * u1 * (t ? -1 : 1),
2297
+ baselineShift: n.fontSize * u1 * (e ? -1 : 1),
2305
2298
  fontSize: n.fontSize * c1,
2306
- isSubscript: e,
2307
- isSuperscript: t
2299
+ isSubscript: t,
2300
+ isSuperscript: e
2308
2301
  };
2309
2302
  }
2310
- function De(n, t = 0) {
2311
- return n ?? t;
2303
+ function Be(n, e = 0) {
2304
+ return n ?? e;
2312
2305
  }
2313
2306
  function f1(n) {
2314
- const t = De(
2307
+ const e = Be(
2315
2308
  n.fontBoundingBoxAscent,
2316
2309
  n.actualBoundingBoxAscent
2317
- ), e = De(
2310
+ ), t = Be(
2318
2311
  n.fontBoundingBoxDescent,
2319
2312
  n.actualBoundingBoxDescent
2320
2313
  );
2321
2314
  return {
2322
- bottom: e,
2323
- height: t + e,
2324
- top: t,
2315
+ bottom: t,
2316
+ height: e + t,
2317
+ top: e,
2325
2318
  width: n.width
2326
2319
  };
2327
2320
  }
2328
- function f0(n, t, e = 1) {
2329
- const o = u0(t);
2330
- n.context.fillStyle = xe(t.color, e), n.context.font = `${t.fontStyle} ${t.fontWeight} ${o.fontSize}px ${t.fontFamily}`, n.type === Z.Browser ? n.context.textRendering = t.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = t.ligatures ? "common-ligatures" : "no-common-ligatures";
2321
+ function f0(n, e, t = 1) {
2322
+ const o = u0(e);
2323
+ n.context.fillStyle = xe(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === Z.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
2331
2324
  }
2332
- function d1(n, t, e) {
2325
+ function d1(n, e, t) {
2333
2326
  const o = [];
2334
2327
  for (const i of n) {
2335
2328
  const a = [], s = i.length === 0 ? [{ text: "" }] : i;
2336
2329
  for (const r of s) {
2337
- const { text: l, ...c } = r, u = { ...t, ...c };
2338
- f0(e, u);
2339
- const p = e.context.measureText(l), h = f1(p), { baselineShift: f } = u0(u), v = Math.max(0, h.top - f), y = Math.max(0, h.bottom + f);
2330
+ const { text: l, ...c } = r, u = { ...e, ...c };
2331
+ f0(t, u);
2332
+ const p = t.context.measureText(l), h = f1(p), { baselineShift: f } = u0(u), v = Math.max(0, h.top - f), y = Math.max(0, h.bottom + f);
2340
2333
  a.push({
2341
2334
  ...h,
2342
2335
  baselineShift: f,
@@ -2350,20 +2343,20 @@ function d1(n, t, e) {
2350
2343
  }
2351
2344
  return o;
2352
2345
  }
2353
- const p1 = ({ ctx: n, object: t, opacity: e }) => {
2354
- const o = t.opacity * e;
2346
+ const p1 = ({ ctx: n, object: e, opacity: t }) => {
2347
+ const o = e.opacity * t;
2355
2348
  if (o === 0)
2356
2349
  return;
2357
- const { length: i } = t, a = ue(t.text), s = a1(t), r = d1(a, s, n), l = h1(r, t.lineSpacing), c = ut($({ x: t.x, y: t.y }), t.anchor, l.size);
2350
+ const { length: i } = e, a = ue(e.text), s = a1(e), r = d1(a, s, n), l = h1(r, e.lineSpacing), c = ut(Y({ x: e.x, y: e.y }), e.anchor, l.size);
2358
2351
  let u = c.origin.x, p = 0;
2359
2352
  for (let h = 0; h < a.length; h++) {
2360
- const f = a[h], v = r[h], y = l.lines[h];
2353
+ const f = a[h], v = r[h], y = l.baselines[h];
2361
2354
  if (f == null || v == null || y == null) {
2362
2355
  console.error("Could not determine text units or sizes for line");
2363
2356
  continue;
2364
2357
  }
2365
2358
  const T = v.reduce((M, L) => M + L.width, 0);
2366
- switch (t.alignment) {
2359
+ switch (e.alignment) {
2367
2360
  case vt.LEFT:
2368
2361
  u = c.origin.x;
2369
2362
  break;
@@ -2374,10 +2367,10 @@ const p1 = ({ ctx: n, object: t, opacity: e }) => {
2374
2367
  u = c.origin.x + (c.size.width - T);
2375
2368
  break;
2376
2369
  default:
2377
- at(t.alignment);
2370
+ at(e.alignment);
2378
2371
  break;
2379
2372
  }
2380
- const C = c.origin.y + y.baselineY;
2373
+ const C = c.origin.y + y;
2381
2374
  for (let M = 0; M < f.length && !(i !== null && p >= i); M++) {
2382
2375
  const L = f[M], E = v[M];
2383
2376
  if (L == null || E == null) {
@@ -2387,19 +2380,19 @@ const p1 = ({ ctx: n, object: t, opacity: e }) => {
2387
2380
  const { text: S, ...k } = L;
2388
2381
  let F;
2389
2382
  if (i !== null && p + S.length > i) {
2390
- const Y = i - p;
2391
- F = S.slice(0, Y);
2383
+ const $ = i - p;
2384
+ F = S.slice(0, $);
2392
2385
  }
2393
2386
  const U = F ?? S;
2394
2387
  p += U.length;
2395
- const D = { ...s, ...k };
2396
- f0(n, D, o), n.context.fillText(U, u, C + E.baselineShift), u += E.width;
2388
+ const B = { ...s, ...k };
2389
+ f0(n, B, o), n.context.fillText(U, u, C + E.baselineShift), u += E.width;
2397
2390
  }
2398
2391
  }
2399
2392
  }, g1 = {
2400
2393
  [j.ARROW]: jn,
2401
2394
  [j.CIRCLE]: Un,
2402
- [j.GROUP]: $n,
2395
+ [j.GROUP]: Yn,
2403
2396
  [j.IMAGE]: Wn,
2404
2397
  [j.LINE]: Xn,
2405
2398
  [j.MASK]: Kn,
@@ -2413,23 +2406,23 @@ const p1 = ({ ctx: n, object: t, opacity: e }) => {
2413
2406
  [j.TEXT]: p1
2414
2407
  };
2415
2408
  function x1(n) {
2416
- const t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2417
- return t.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), t.style.backgroundColor = "transparent", t.style.position = "absolute", t.style.width = "100%", t;
2409
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2410
+ return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
2418
2411
  }
2419
- function y1(n, t) {
2412
+ function y1(n, e) {
2420
2413
  if (n === null)
2421
2414
  return null;
2422
- const e = ut(
2423
- $({ x: t.x, y: t.y }),
2424
- t.anchor,
2425
- K({ width: t.width, height: t.height })
2415
+ const t = ut(
2416
+ Y({ x: e.x, y: e.y }),
2417
+ e.anchor,
2418
+ K({ width: e.width, height: e.height })
2426
2419
  ), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
2427
- o.setAttribute("x", e.origin.x.toString()), o.setAttribute("y", e.origin.y.toString()), o.setAttribute("width", t.width.toString()), o.setAttribute("height", t.height.toString());
2428
- const i = t.content;
2420
+ o.setAttribute("x", t.origin.x.toString()), o.setAttribute("y", t.origin.y.toString()), o.setAttribute("width", e.width.toString()), o.setAttribute("height", e.height.toString());
2421
+ const i = e.content;
2429
2422
  i !== null && o.appendChild(i), n.appendChild(o);
2430
2423
  let a = null;
2431
- if (t.setup !== null) {
2432
- const s = t.setup(o);
2424
+ if (e.setup !== null) {
2425
+ const s = e.setup(o);
2433
2426
  s !== void 0 && (a = s);
2434
2427
  }
2435
2428
  return () => {
@@ -2439,7 +2432,7 @@ function y1(n, t) {
2439
2432
  async function v1(n) {
2440
2433
  if (Object.keys(n).length === 0)
2441
2434
  return {};
2442
- const t = {}, e = (i) => new Promise((a, s) => {
2435
+ const e = {}, t = (i) => new Promise((a, s) => {
2443
2436
  const r = new Image();
2444
2437
  if (r.onload = () => a(r), r.onerror = (c) => s(c), i.includes("</svg>")) {
2445
2438
  const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), u = new Blob([c], { type: "image/svg+xml;charset=utf-8" }), p = URL.createObjectURL(u);
@@ -2447,8 +2440,8 @@ async function v1(n) {
2447
2440
  } else
2448
2441
  r.src = i;
2449
2442
  }), o = Object.entries(n).map(async ([i, a]) => {
2450
- const s = await e(a);
2451
- t[i] = {
2443
+ const s = await t(a);
2444
+ e[i] = {
2452
2445
  type: kt.Browser,
2453
2446
  image: s
2454
2447
  };
@@ -2458,34 +2451,34 @@ async function v1(n) {
2458
2451
  } catch (i) {
2459
2452
  console.error("Error loading images:", i);
2460
2453
  }
2461
- return t;
2454
+ return e;
2462
2455
  }
2463
- const Be = "presenterPendingVariables:";
2456
+ const De = "presenterPendingVariables:";
2464
2457
  function w1() {
2465
2458
  const n = d0();
2466
2459
  if (n === null)
2467
2460
  return {};
2468
2461
  try {
2469
- const t = ie(), e = n.getItem(t);
2470
- if (n.removeItem(t), e === null)
2462
+ const e = ie(), t = n.getItem(e);
2463
+ if (n.removeItem(e), t === null)
2471
2464
  return {};
2472
- const o = JSON.parse(e);
2465
+ const o = JSON.parse(t);
2473
2466
  if (o.values === void 0 || typeof o.values != "object")
2474
2467
  return {};
2475
2468
  const i = {};
2476
2469
  for (const [a, s] of Object.entries(o.values))
2477
2470
  typeof s == "number" && Number.isFinite(s) && (i[a] = s);
2478
2471
  return i;
2479
- } catch (t) {
2480
- return console.error("Failed to parse pending presenter variable state from sessionStorage:", t), n.removeItem(ie()), {};
2472
+ } catch (e) {
2473
+ return console.error("Failed to parse pending presenter variable state from sessionStorage:", e), n.removeItem(ie()), {};
2481
2474
  }
2482
2475
  }
2483
2476
  function m1(n) {
2484
- const t = d0();
2485
- t !== null && t.setItem(ie(), JSON.stringify({ values: n }));
2477
+ const e = d0();
2478
+ e !== null && e.setItem(ie(), JSON.stringify({ values: n }));
2486
2479
  }
2487
2480
  function ie() {
2488
- return typeof window > "u" ? Be : `${Be}${window.location.origin}${window.location.pathname}`;
2481
+ return typeof window > "u" ? De : `${De}${window.location.origin}${window.location.pathname}`;
2489
2482
  }
2490
2483
  function d0() {
2491
2484
  try {
@@ -2496,9 +2489,9 @@ function d0() {
2496
2489
  }
2497
2490
  const b1 = 0, A1 = 1, p0 = 0, T1 = 0.01, qt = /* @__PURE__ */ new Map();
2498
2491
  let Ot = /* @__PURE__ */ new Map(), qe = !1, ze = 1;
2499
- function Yi(n = null) {
2492
+ function $i(n = null) {
2500
2493
  S1();
2501
- const t = n ?? {}, e = C1(), o = M1(e, t), i = Ot.get(o.id);
2494
+ const e = n ?? {}, t = C1(), o = M1(t, e), i = Ot.get(o.id);
2502
2495
  if (i !== void 0) {
2503
2496
  const a = y0(i, o);
2504
2497
  return Ot.set(o.id, a), a;
@@ -2509,23 +2502,23 @@ function g0() {
2509
2502
  return Array.from(qt.values());
2510
2503
  }
2511
2504
  function x0(n) {
2512
- const t = qt.get(n);
2513
- return t === void 0 ? p0 : Ot.get(t.id) ?? t.default;
2514
- }
2515
- function L1(n, t) {
2516
2505
  const e = qt.get(n);
2517
- if (e === void 0)
2518
- return t;
2519
- const o = y0(t, e);
2520
- return Ot.set(e.id, o), o;
2506
+ return e === void 0 ? p0 : Ot.get(e.id) ?? e.default;
2521
2507
  }
2522
- function M1(n, t) {
2523
- const e = t.min ?? b1, o = t.max ?? A1, i = Math.min(e, o), a = Math.max(e, o), s = t.increment !== void 0 && t.increment > 0 ? t.increment : T1, r = {
2508
+ function L1(n, e) {
2509
+ const t = qt.get(n);
2510
+ if (t === void 0)
2511
+ return e;
2512
+ const o = y0(e, t);
2513
+ return Ot.set(t.id, o), o;
2514
+ }
2515
+ function M1(n, e) {
2516
+ const t = e.min ?? b1, o = e.max ?? A1, i = Math.min(t, o), a = Math.max(t, o), s = e.increment !== void 0 && e.increment > 0 ? e.increment : T1, r = {
2524
2517
  id: n,
2525
- name: t.name ?? n,
2518
+ name: e.name ?? n,
2526
2519
  min: i,
2527
2520
  max: a,
2528
- default: v0(t.default ?? p0, i, a),
2521
+ default: v0(e.default ?? p0, i, a),
2529
2522
  increment: s
2530
2523
  };
2531
2524
  return qt.set(n, r), r;
@@ -2537,18 +2530,18 @@ function C1() {
2537
2530
  function S1() {
2538
2531
  qe || (Ot = new Map(Object.entries(w1())), qe = !0);
2539
2532
  }
2540
- function y0(n, t) {
2541
- return v0(n, t.min, t.max);
2533
+ function y0(n, e) {
2534
+ return v0(n, e.min, e.max);
2542
2535
  }
2543
- function v0(n, t, e) {
2544
- return Math.max(t, Math.min(e, n));
2536
+ function v0(n, e, t) {
2537
+ return Math.max(e, Math.min(t, n));
2545
2538
  }
2546
2539
  function P1({
2547
2540
  onCommit: n,
2548
- onPreview: t
2541
+ onPreview: e
2549
2542
  }) {
2550
- const e = g0();
2551
- if (e.length === 0)
2543
+ const t = g0();
2544
+ if (t.length === 0)
2552
2545
  return null;
2553
2546
  const o = document.createElement("div");
2554
2547
  Object.assign(o.style, {
@@ -2573,11 +2566,11 @@ function P1({
2573
2566
  boxShadow: "0 12px 36px rgba(0, 0, 0, 0.28)",
2574
2567
  backdropFilter: "blur(10px)"
2575
2568
  });
2576
- for (const i of e)
2577
- o.appendChild(E1(i, t, n));
2569
+ for (const i of t)
2570
+ o.appendChild(E1(i, e, n));
2578
2571
  return o;
2579
2572
  }
2580
- function E1(n, t, e) {
2573
+ function E1(n, e, t) {
2581
2574
  const o = document.createElement("div");
2582
2575
  o.dataset.presenterVariableId = n.id, o.dataset.presenterVariableName = n.name, Object.assign(o.style, {
2583
2576
  display: "grid",
@@ -2615,41 +2608,41 @@ function E1(n, t, e) {
2615
2608
  const h = I1(p);
2616
2609
  a.value = h, s.value = h;
2617
2610
  }, c = (p) => {
2618
- Number.isFinite(p) && (r = t(n.id, p), l(r));
2611
+ Number.isFinite(p) && (r = e(n.id, p), l(r));
2619
2612
  }, u = (p) => {
2620
- Number.isFinite(p) && (p !== r && c(p), e());
2613
+ Number.isFinite(p) && (p !== r && c(p), t());
2621
2614
  };
2622
2615
  return a.addEventListener("input", () => c(a.valueAsNumber)), a.addEventListener("change", () => u(a.valueAsNumber)), s.addEventListener("change", () => u(s.valueAsNumber)), l(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), o;
2623
2616
  }
2624
2617
  function I1(n) {
2625
2618
  return Number.isInteger(n) ? n.toString() : parseFloat(n.toFixed(6)).toString();
2626
2619
  }
2627
- function k1({ container: n, onCommit: t }) {
2628
- const e = P1({
2620
+ function k1({ container: n, onCommit: e }) {
2621
+ const t = P1({
2629
2622
  onPreview: (o, i) => {
2630
2623
  const a = L1(o, i);
2631
2624
  return m1(O1()), a;
2632
2625
  },
2633
- onCommit: t
2626
+ onCommit: e
2634
2627
  });
2635
- e !== null && n.appendChild(e);
2628
+ t !== null && n.appendChild(t);
2636
2629
  }
2637
2630
  function O1() {
2638
2631
  const n = {};
2639
- for (const t of g0())
2640
- n[t.id] = x0(t.id);
2632
+ for (const e of g0())
2633
+ n[e.id] = x0(e.id);
2641
2634
  return n;
2642
2635
  }
2643
- class $i {
2644
- constructor(t) {
2636
+ class Yi {
2637
+ constructor(e) {
2645
2638
  this.navigator = null;
2646
- const { objectRenderers: e, scale: o = 1, ...i } = t;
2639
+ const { objectRenderers: t, scale: o = 1, ...i } = e;
2647
2640
  this.props = {
2648
2641
  presentation: bn(),
2649
2642
  element: document.body,
2650
2643
  objectRenderers: {
2651
2644
  ...g1,
2652
- ...e
2645
+ ...t
2653
2646
  },
2654
2647
  cacheDurationMinutes: 15,
2655
2648
  scale: _1(o),
@@ -2658,27 +2651,27 @@ class $i {
2658
2651
  }
2659
2652
  /** Starts the presentation. */
2660
2653
  async present() {
2661
- const { presentation: t, element: e, scale: o } = this.props;
2654
+ const { presentation: e, element: t, scale: o } = this.props;
2662
2655
  this.hideCursor();
2663
- const i = In(t.title), a = Bn(t.size), s = x1(t.size);
2656
+ const i = In(e.title), a = Dn(e.size), s = x1(e.size);
2664
2657
  s.style.transformOrigin = "center center", s.style.transform = `scale(${o})`, this.state = {
2665
2658
  ...Fe,
2666
2659
  accessibleDescriptionElement: i,
2667
2660
  imageById: await v1({
2668
- ...t.resources.images,
2669
- ...Pn(t)
2661
+ ...e.resources.images,
2662
+ ...Pn(e)
2670
2663
  }),
2671
2664
  canvas: a,
2672
2665
  extrasContainer: s
2673
2666
  };
2674
- const r = Tn(t, e), l = h0(e), c = (h, f) => {
2667
+ const r = Tn(e, t), l = h0(t), c = (h, f) => {
2675
2668
  this.state.shortcutState.shortcuts.b = {
2676
2669
  slideIndex: this.state.slideIndex,
2677
2670
  buildIndex: this.state.buildIndex
2678
2671
  }, this.renderSlide(h ?? this.state.slideIndex, f);
2679
2672
  }, u = (h = !1) => {
2680
2673
  l && (this.navigator = dn({
2681
- presentation: t,
2674
+ presentation: e,
2682
2675
  shortcutState: this.state.shortcutState,
2683
2676
  onNavigateToSlide: (f) => this.renderSlide(f),
2684
2677
  onRenderSlide: c,
@@ -2688,7 +2681,7 @@ class $i {
2688
2681
  }), this.updateNavigator());
2689
2682
  };
2690
2683
  a0(
2691
- t,
2684
+ e,
2692
2685
  r,
2693
2686
  this.state.shortcutState,
2694
2687
  {
@@ -2701,25 +2694,25 @@ class $i {
2701
2694
  focusOnPointerDown: !l,
2702
2695
  keyEventTarget: l ? window : r
2703
2696
  }
2704
- ), e.replaceChildren(), r.appendChild(i), r.appendChild(a), r.appendChild(s), k1({
2697
+ ), t.replaceChildren(), r.appendChild(i), r.appendChild(a), r.appendChild(s), k1({
2705
2698
  container: r,
2706
2699
  onCommit: () => this.reloadAfterVariableChange()
2707
- }), e.appendChild(r);
2708
- const p = En(t, this.props.cacheDurationMinutes);
2700
+ }), t.appendChild(r);
2701
+ const p = En(e, this.props.cacheDurationMinutes);
2709
2702
  p !== null ? this.renderSlide(p.slideIndex, p.buildIndex) : this.renderSlide(0), on() && u(!0);
2710
2703
  }
2711
2704
  reloadAfterVariableChange() {
2712
- const { presentation: t } = this.props;
2705
+ const { presentation: e } = this.props;
2713
2706
  this.state.currentAnimationId !== null && (cancelAnimationFrame(this.state.currentAnimationId), this.state.currentAnimationId = null), Re({
2714
- title: t.title,
2707
+ title: e.title,
2715
2708
  slideIndex: this.state.slideIndex,
2716
2709
  buildIndex: this.state.buildIndex
2717
2710
  }), window.location.reload();
2718
2711
  }
2719
- renderSlide(t, e = 0, o = null) {
2720
- const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== t;
2721
- this.state.slideIndex = t, this.state.buildIndex = e, o === null && Re({ title: i.title, slideIndex: t, buildIndex: e });
2722
- const r = i.slides[t];
2712
+ renderSlide(e, t = 0, o = null) {
2713
+ const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== e;
2714
+ this.state.slideIndex = e, this.state.buildIndex = t, o === null && Re({ title: i.title, slideIndex: e, buildIndex: t });
2715
+ const r = i.slides[e];
2723
2716
  if (!(r === void 0 || a === null)) {
2724
2717
  if (s || this.state.mountedExtrasCleanups.length === 0 && r.extras.length > 0) {
2725
2718
  for (const l of this.state.mountedExtrasCleanups)
@@ -2730,9 +2723,9 @@ class $i {
2730
2723
  c !== null && this.state.mountedExtrasCleanups.push(c);
2731
2724
  }
2732
2725
  }
2733
- if (this.renderCanvas(a, t, e, o, this.props.scale), o === null) {
2726
+ if (this.renderCanvas(a, e, t, o, this.props.scale), o === null) {
2734
2727
  if (this.state.accessibleDescriptionElement !== null) {
2735
- const l = Ne({ slide: r, buildIndex: e, buildTime: o });
2728
+ const l = Ne({ slide: r, buildIndex: t, buildTime: o });
2736
2729
  Fn(
2737
2730
  this.state.accessibleDescriptionElement,
2738
2731
  kn(r, l)
@@ -2742,18 +2735,18 @@ class $i {
2742
2735
  }
2743
2736
  }
2744
2737
  }
2745
- renderCanvas(t, e, o = 0, i = null, a = 1) {
2738
+ renderCanvas(e, t, o = 0, i = null, a = 1) {
2746
2739
  const { objectRenderers: s, presentation: r } = this.props, { imageById: l } = this.state;
2747
- t.width = r.size.width, t.height = r.size.height;
2748
- const c = t.getContext("2d");
2740
+ e.width = r.size.width, e.height = r.size.height;
2741
+ const c = e.getContext("2d");
2749
2742
  if (c === null)
2750
2743
  return;
2751
2744
  const u = {
2752
2745
  type: Z.Browser,
2753
2746
  context: c
2754
2747
  };
2755
- Dn(t, u);
2756
- const p = r.slides[e];
2748
+ Bn(e, u);
2749
+ const p = r.slides[t];
2757
2750
  if (p === void 0)
2758
2751
  return;
2759
2752
  const h = Ne({
@@ -2761,7 +2754,7 @@ class $i {
2761
2754
  buildIndex: o,
2762
2755
  buildTime: i
2763
2756
  });
2764
- u.context.fillStyle = xe(r.backgroundColor), u.context.fillRect(0, 0, t.width, t.height);
2757
+ u.context.fillStyle = xe(r.backgroundColor), u.context.fillRect(0, 0, e.width, e.height);
2765
2758
  function f(y, T) {
2766
2759
  const C = s[y.objectType], M = h.get(y);
2767
2760
  C === void 0 || M === void 0 || C({
@@ -2777,70 +2770,70 @@ class $i {
2777
2770
  }
2778
2771
  const v = a !== 1;
2779
2772
  v && (u.context.save(), u.context.translate(
2780
- t.width * (1 - a) / 2,
2781
- t.height * (1 - a) / 2
2773
+ e.width * (1 - a) / 2,
2774
+ e.height * (1 - a) / 2
2782
2775
  ), u.context.scale(a, a));
2783
2776
  for (const y of p.objects)
2784
2777
  f(y, 1);
2785
2778
  v && u.context.restore();
2786
2779
  }
2787
2780
  updateNavigator() {
2788
- const { navigator: t } = this;
2789
- if (t === null)
2781
+ const { navigator: e } = this;
2782
+ if (e === null)
2790
2783
  return;
2791
- if (!t.isOpen()) {
2784
+ if (!e.isOpen()) {
2792
2785
  this.navigator = null;
2793
2786
  return;
2794
2787
  }
2795
- const { slideIndex: e, buildIndex: o } = this.state, i = this.getNextSlideBuild(e, o);
2796
- t.update(e, o, i.slideIndex, i.buildIndex), this.renderCanvas(t.currentCanvas, e, o), i.slideIndex === null ? this.renderEndCanvas(t.nextCanvas) : this.renderCanvas(t.nextCanvas, i.slideIndex, i.buildIndex);
2788
+ const { slideIndex: t, buildIndex: o } = this.state, i = this.getNextSlideBuild(t, o);
2789
+ e.update(t, o, i.slideIndex, i.buildIndex), this.renderCanvas(e.currentCanvas, t, o), i.slideIndex === null ? this.renderEndCanvas(e.nextCanvas) : this.renderCanvas(e.nextCanvas, i.slideIndex, i.buildIndex);
2797
2790
  }
2798
- getNextSlideBuild(t, e) {
2799
- const { presentation: o } = this.props, i = o.slides[t];
2800
- return i === void 0 ? { slideIndex: t, buildIndex: e } : e < i.animations.length ? { slideIndex: t, buildIndex: e + 1 } : t + 1 < o.slides.length ? { slideIndex: t + 1, buildIndex: 0 } : { slideIndex: null, buildIndex: 0 };
2791
+ getNextSlideBuild(e, t) {
2792
+ const { presentation: o } = this.props, i = o.slides[e];
2793
+ return i === void 0 ? { slideIndex: e, buildIndex: t } : t < i.animations.length ? { slideIndex: e, buildIndex: t + 1 } : e + 1 < o.slides.length ? { slideIndex: e + 1, buildIndex: 0 } : { slideIndex: null, buildIndex: 0 };
2801
2794
  }
2802
- renderEndCanvas(t) {
2803
- const { presentation: e } = this.props;
2804
- t.width = e.size.width, t.height = e.size.height;
2805
- const o = t.getContext("2d");
2806
- o !== null && (o.fillStyle = "#000000", o.fillRect(0, 0, t.width, t.height));
2795
+ renderEndCanvas(e) {
2796
+ const { presentation: t } = this.props;
2797
+ e.width = t.size.width, e.height = t.size.height;
2798
+ const o = e.getContext("2d");
2799
+ o !== null && (o.fillStyle = "#000000", o.fillRect(0, 0, e.width, e.height));
2807
2800
  }
2808
- next(t = !1) {
2809
- const { presentation: e } = this.props, { currentAnimationId: o, slideIndex: i, buildIndex: a } = this.state;
2801
+ next(e = !1) {
2802
+ const { presentation: t } = this.props, { currentAnimationId: o, slideIndex: i, buildIndex: a } = this.state;
2810
2803
  this.hideCursor(), o !== null && cancelAnimationFrame(o);
2811
- const s = e.slides[i];
2804
+ const s = t.slides[i];
2812
2805
  if (s === void 0)
2813
2806
  return;
2814
2807
  const r = s.animations[a];
2815
- if (r !== void 0 && !t) {
2808
+ if (r !== void 0 && !e) {
2816
2809
  const l = performance.now(), c = An(r), u = (p) => {
2817
2810
  const h = p - l;
2818
2811
  h < c ? (this.renderSlide(i, a + 1, h), this.state.currentAnimationId = requestAnimationFrame(u)) : this.renderSlide(i, a + 1, null);
2819
2812
  };
2820
2813
  this.state.currentAnimationId = requestAnimationFrame(u);
2821
- } else i + 1 < e.slides.length && this.renderSlide(i + 1);
2814
+ } else i + 1 < t.slides.length && this.renderSlide(i + 1);
2822
2815
  }
2823
- previous(t = !1) {
2824
- const { currentAnimationId: e, slideIndex: o, buildIndex: i } = this.state;
2825
- if (this.hideCursor(), e !== null && cancelAnimationFrame(e), i > 0)
2826
- t ? this.renderSlide(o, 0) : this.renderSlide(o, i - 1);
2816
+ previous(e = !1) {
2817
+ const { currentAnimationId: t, slideIndex: o, buildIndex: i } = this.state;
2818
+ if (this.hideCursor(), t !== null && cancelAnimationFrame(t), i > 0)
2819
+ e ? this.renderSlide(o, 0) : this.renderSlide(o, i - 1);
2827
2820
  else if (o > 0) {
2828
- const a = this.props.presentation.slides[o - 1], s = t ? 0 : (a == null ? void 0 : a.animations.length) ?? 0;
2821
+ const a = this.props.presentation.slides[o - 1], s = e ? 0 : (a == null ? void 0 : a.animations.length) ?? 0;
2829
2822
  this.renderSlide(o - 1, s);
2830
2823
  } else
2831
2824
  this.renderSlide(0, 0);
2832
2825
  }
2833
2826
  hasNext() {
2834
- const { presentation: t } = this.props, { slideIndex: e, buildIndex: o } = this.state, i = t.slides[e];
2835
- return i === void 0 ? !1 : i.animations[o] !== void 0 ? !0 : e + 1 < t.slides.length;
2827
+ const { presentation: e } = this.props, { slideIndex: t, buildIndex: o } = this.state, i = e.slides[t];
2828
+ return i === void 0 ? !1 : i.animations[o] !== void 0 ? !0 : t + 1 < e.slides.length;
2836
2829
  }
2837
2830
  hasPrevious() {
2838
- const { slideIndex: t, buildIndex: e } = this.state;
2839
- return e > 0 || t > 0;
2831
+ const { slideIndex: e, buildIndex: t } = this.state;
2832
+ return t > 0 || e > 0;
2840
2833
  }
2841
2834
  hideCursor() {
2842
- var t, e;
2843
- this.props.element.style.cursor = "none", (e = (t = this.state.canvas) == null ? void 0 : t.parentElement) == null || e.style.setProperty("cursor", "none");
2835
+ var e, t;
2836
+ this.props.element.style.cursor = "none", (t = (e = this.state.canvas) == null ? void 0 : e.parentElement) == null || t.style.setProperty("cursor", "none");
2844
2837
  }
2845
2838
  }
2846
2839
  function _1(n) {
@@ -2848,19 +2841,19 @@ function _1(n) {
2848
2841
  `BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
2849
2842
  ), 1) : n;
2850
2843
  }
2851
- function Wi(n = 1e3, t = {}) {
2844
+ function Wi(n = 1e3, e = {}) {
2852
2845
  return {
2853
2846
  type: dt.PAUSE,
2854
2847
  isKey: !1,
2855
2848
  duration: n,
2856
2849
  notes: null,
2857
2850
  shortcut: null,
2858
- ...t
2851
+ ...e
2859
2852
  };
2860
2853
  }
2861
- function Gi(n, t = {}) {
2854
+ function Gi(n, e = {}) {
2862
2855
  return {
2863
- ...t,
2856
+ ...e,
2864
2857
  text: n
2865
2858
  };
2866
2859
  }
@@ -2868,23 +2861,23 @@ function Xi(n = G.BLACK) {
2868
2861
  return { ...n, alpha: 1 };
2869
2862
  }
2870
2863
  function N1(n) {
2871
- for (var t = -1, e = n.length, o, i = n[e - 1], a = 0; ++t < e; )
2872
- o = i, i = n[t], a += o[1] * i[0] - o[0] * i[1];
2864
+ for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
2865
+ o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
2873
2866
  return a / 2;
2874
2867
  }
2875
2868
  function R1(n) {
2876
- for (var t = -1, e = n.length, o = n[e - 1], i, a, s = o[0], r = o[1], l = 0; ++t < e; )
2877
- i = s, a = r, o = n[t], s = o[0], r = o[1], i -= s, a -= r, l += Math.sqrt(i * i + a * a);
2869
+ for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], l = 0; ++e < t; )
2870
+ i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, l += Math.sqrt(i * i + a * a);
2878
2871
  return l;
2879
2872
  }
2880
2873
  function F1(n) {
2881
2874
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2882
2875
  }
2883
- var Yt, je;
2884
- function D1() {
2885
- if (je) return Yt;
2876
+ var $t, je;
2877
+ function B1() {
2878
+ if (je) return $t;
2886
2879
  je = 1;
2887
- var n = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, t = [
2880
+ var n = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, e = [
2888
2881
  5760,
2889
2882
  6158,
2890
2883
  8192,
@@ -2903,10 +2896,10 @@ function D1() {
2903
2896
  12288,
2904
2897
  65279
2905
2898
  ];
2906
- function e(f) {
2899
+ function t(f) {
2907
2900
  return f === 10 || f === 13 || f === 8232 || f === 8233 || // Line terminators
2908
2901
  // White spaces
2909
- f === 32 || f === 9 || f === 11 || f === 12 || f === 160 || f >= 5760 && t.indexOf(f) >= 0;
2902
+ f === 32 || f === 9 || f === 11 || f === 12 || f === 160 || f >= 5760 && e.indexOf(f) >= 0;
2910
2903
  }
2911
2904
  function o(f) {
2912
2905
  switch (f | 32) {
@@ -2941,7 +2934,7 @@ function D1() {
2941
2934
  this.index = 0, this.path = f, this.max = f.length, this.result = [], this.param = 0, this.err = "", this.segmentStart = 0, this.data = [];
2942
2935
  }
2943
2936
  function l(f) {
2944
- for (; f.index < f.max && e(f.path.charCodeAt(f.index)); )
2937
+ for (; f.index < f.max && t(f.path.charCodeAt(f.index)); )
2945
2938
  f.index++;
2946
2939
  }
2947
2940
  function c(f) {
@@ -3028,7 +3021,7 @@ function D1() {
3028
3021
  }
3029
3022
  p(f);
3030
3023
  }
3031
- return Yt = function(v) {
3024
+ return $t = function(v) {
3032
3025
  var y = new r(v), T = y.max;
3033
3026
  for (l(y); y.index < T && !y.err.length; )
3034
3027
  h(y);
@@ -3036,75 +3029,75 @@ function D1() {
3036
3029
  err: y.err,
3037
3030
  segments: y.result
3038
3031
  };
3039
- }, Yt;
3032
+ }, $t;
3040
3033
  }
3041
- var $t, Ve;
3034
+ var Yt, Ve;
3042
3035
  function w0() {
3043
- if (Ve) return $t;
3036
+ if (Ve) return Yt;
3044
3037
  Ve = 1;
3045
- function n(e, o) {
3038
+ function n(t, o) {
3046
3039
  return [
3047
- e[0] * o[0] + e[2] * o[1],
3048
- e[1] * o[0] + e[3] * o[1],
3049
- e[0] * o[2] + e[2] * o[3],
3050
- e[1] * o[2] + e[3] * o[3],
3051
- e[0] * o[4] + e[2] * o[5] + e[4],
3052
- e[1] * o[4] + e[3] * o[5] + e[5]
3040
+ t[0] * o[0] + t[2] * o[1],
3041
+ t[1] * o[0] + t[3] * o[1],
3042
+ t[0] * o[2] + t[2] * o[3],
3043
+ t[1] * o[2] + t[3] * o[3],
3044
+ t[0] * o[4] + t[2] * o[5] + t[4],
3045
+ t[1] * o[4] + t[3] * o[5] + t[5]
3053
3046
  ];
3054
3047
  }
3055
- function t() {
3056
- if (!(this instanceof t))
3057
- return new t();
3048
+ function e() {
3049
+ if (!(this instanceof e))
3050
+ return new e();
3058
3051
  this.queue = [], this.cache = null;
3059
3052
  }
3060
- return t.prototype.matrix = function(e) {
3061
- return e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0 ? this : (this.cache = null, this.queue.push(e), this);
3062
- }, t.prototype.translate = function(e, o) {
3063
- return (e !== 0 || o !== 0) && (this.cache = null, this.queue.push([1, 0, 0, 1, e, o])), this;
3064
- }, t.prototype.scale = function(e, o) {
3065
- return (e !== 1 || o !== 1) && (this.cache = null, this.queue.push([e, 0, 0, o, 0, 0])), this;
3066
- }, t.prototype.rotate = function(e, o, i) {
3053
+ return e.prototype.matrix = function(t) {
3054
+ return t[0] === 1 && t[1] === 0 && t[2] === 0 && t[3] === 1 && t[4] === 0 && t[5] === 0 ? this : (this.cache = null, this.queue.push(t), this);
3055
+ }, e.prototype.translate = function(t, o) {
3056
+ return (t !== 0 || o !== 0) && (this.cache = null, this.queue.push([1, 0, 0, 1, t, o])), this;
3057
+ }, e.prototype.scale = function(t, o) {
3058
+ return (t !== 1 || o !== 1) && (this.cache = null, this.queue.push([t, 0, 0, o, 0, 0])), this;
3059
+ }, e.prototype.rotate = function(t, o, i) {
3067
3060
  var a, s, r;
3068
- return e !== 0 && (this.translate(o, i), a = e * Math.PI / 180, s = Math.cos(a), r = Math.sin(a), this.queue.push([s, r, -r, s, 0, 0]), this.cache = null, this.translate(-o, -i)), this;
3069
- }, t.prototype.skewX = function(e) {
3070
- return e !== 0 && (this.cache = null, this.queue.push([1, 0, Math.tan(e * Math.PI / 180), 1, 0, 0])), this;
3071
- }, t.prototype.skewY = function(e) {
3072
- return e !== 0 && (this.cache = null, this.queue.push([1, Math.tan(e * Math.PI / 180), 0, 1, 0, 0])), this;
3073
- }, t.prototype.toArray = function() {
3061
+ return t !== 0 && (this.translate(o, i), a = t * Math.PI / 180, s = Math.cos(a), r = Math.sin(a), this.queue.push([s, r, -r, s, 0, 0]), this.cache = null, this.translate(-o, -i)), this;
3062
+ }, e.prototype.skewX = function(t) {
3063
+ return t !== 0 && (this.cache = null, this.queue.push([1, 0, Math.tan(t * Math.PI / 180), 1, 0, 0])), this;
3064
+ }, e.prototype.skewY = function(t) {
3065
+ return t !== 0 && (this.cache = null, this.queue.push([1, Math.tan(t * Math.PI / 180), 0, 1, 0, 0])), this;
3066
+ }, e.prototype.toArray = function() {
3074
3067
  if (this.cache)
3075
3068
  return this.cache;
3076
3069
  if (!this.queue.length)
3077
3070
  return this.cache = [1, 0, 0, 1, 0, 0], this.cache;
3078
3071
  if (this.cache = this.queue[0], this.queue.length === 1)
3079
3072
  return this.cache;
3080
- for (var e = 1; e < this.queue.length; e++)
3081
- this.cache = n(this.cache, this.queue[e]);
3073
+ for (var t = 1; t < this.queue.length; t++)
3074
+ this.cache = n(this.cache, this.queue[t]);
3082
3075
  return this.cache;
3083
- }, t.prototype.calc = function(e, o, i) {
3076
+ }, e.prototype.calc = function(t, o, i) {
3084
3077
  var a;
3085
3078
  return this.queue.length ? (this.cache || (this.cache = this.toArray()), a = this.cache, [
3086
- e * a[0] + o * a[2] + (i ? 0 : a[4]),
3087
- e * a[1] + o * a[3] + (i ? 0 : a[5])
3088
- ]) : [e, o];
3089
- }, $t = t, $t;
3079
+ t * a[0] + o * a[2] + (i ? 0 : a[4]),
3080
+ t * a[1] + o * a[3] + (i ? 0 : a[5])
3081
+ ]) : [t, o];
3082
+ }, Yt = e, Yt;
3090
3083
  }
3091
3084
  var Wt, He;
3092
- function B1() {
3085
+ function D1() {
3093
3086
  if (He) return Wt;
3094
3087
  He = 1;
3095
- var n = w0(), t = {
3088
+ var n = w0(), e = {
3096
3089
  matrix: !0,
3097
3090
  scale: !0,
3098
3091
  rotate: !0,
3099
3092
  translate: !0,
3100
3093
  skewX: !0,
3101
3094
  skewY: !0
3102
- }, e = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
3095
+ }, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
3103
3096
  return Wt = function(a) {
3104
3097
  var s = new n(), r, l;
3105
- return a.split(e).forEach(function(c) {
3098
+ return a.split(t).forEach(function(c) {
3106
3099
  if (c.length) {
3107
- if (typeof t[c] < "u") {
3100
+ if (typeof e[c] < "u") {
3108
3101
  r = c;
3109
3102
  return;
3110
3103
  }
@@ -3139,14 +3132,14 @@ function q1() {
3139
3132
  if (Ue) return Gt;
3140
3133
  Ue = 1;
3141
3134
  var n = Math.PI * 2;
3142
- function t(i, a, s, r) {
3135
+ function e(i, a, s, r) {
3143
3136
  var l = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
3144
3137
  return c > 1 && (c = 1), c < -1 && (c = -1), l * Math.acos(c);
3145
3138
  }
3146
- function e(i, a, s, r, l, c, u, p, h, f) {
3139
+ function t(i, a, s, r, l, c, u, p, h, f) {
3147
3140
  var v = f * (i - s) / 2 + h * (a - r) / 2, y = -h * (i - s) / 2 + f * (a - r) / 2, T = u * u, C = p * p, M = v * v, L = y * y, E = T * C - T * L - C * M;
3148
3141
  E < 0 && (E = 0), E /= T * L + C * M, E = Math.sqrt(E) * (l === c ? -1 : 1);
3149
- var S = E * u / p * y, k = E * -p / u * v, F = f * S - h * k + (i + s) / 2, U = h * S + f * k + (a + r) / 2, D = (v - S) / u, Y = (y - k) / p, lt = (-v - S) / u, Q = (-y - k) / p, ft = t(1, 0, D, Y), it = t(D, Y, lt, Q);
3142
+ var S = E * u / p * y, k = E * -p / u * v, F = f * S - h * k + (i + s) / 2, U = h * S + f * k + (a + r) / 2, B = (v - S) / u, $ = (y - k) / p, lt = (-v - S) / u, Q = (-y - k) / p, ft = e(1, 0, B, $), it = e(B, $, lt, Q);
3150
3143
  return c === 0 && it > 0 && (it -= n), c === 1 && it < 0 && (it += n), [F, U, ft, it];
3151
3144
  }
3152
3145
  function o(i, a) {
@@ -3162,33 +3155,33 @@ function q1() {
3162
3155
  p = Math.abs(p), h = Math.abs(h);
3163
3156
  var M = T * T / (p * p) + C * C / (h * h);
3164
3157
  M > 1 && (p *= Math.sqrt(M), h *= Math.sqrt(M));
3165
- var L = e(a, s, r, l, c, u, p, h, v, y), E = [], S = L[2], k = L[3], F = Math.max(Math.ceil(Math.abs(k) / (n / 4)), 1);
3158
+ var L = t(a, s, r, l, c, u, p, h, v, y), E = [], S = L[2], k = L[3], F = Math.max(Math.ceil(Math.abs(k) / (n / 4)), 1);
3166
3159
  k /= F;
3167
3160
  for (var U = 0; U < F; U++)
3168
3161
  E.push(o(S, k)), S += k;
3169
- return E.map(function(D) {
3170
- for (var Y = 0; Y < D.length; Y += 2) {
3171
- var lt = D[Y + 0], Q = D[Y + 1];
3162
+ return E.map(function(B) {
3163
+ for (var $ = 0; $ < B.length; $ += 2) {
3164
+ var lt = B[$ + 0], Q = B[$ + 1];
3172
3165
  lt *= p, Q *= h;
3173
3166
  var ft = y * lt - v * Q, it = v * lt + y * Q;
3174
- D[Y + 0] = ft + L[0], D[Y + 1] = it + L[1];
3167
+ B[$ + 0] = ft + L[0], B[$ + 1] = it + L[1];
3175
3168
  }
3176
- return D;
3169
+ return B;
3177
3170
  });
3178
3171
  }, Gt;
3179
3172
  }
3180
- var Xt, Ye;
3173
+ var Xt, $e;
3181
3174
  function z1() {
3182
- if (Ye) return Xt;
3183
- Ye = 1;
3184
- var n = 1e-10, t = Math.PI / 180;
3185
- function e(o, i, a) {
3186
- if (!(this instanceof e))
3187
- return new e(o, i, a);
3175
+ if ($e) return Xt;
3176
+ $e = 1;
3177
+ var n = 1e-10, e = Math.PI / 180;
3178
+ function t(o, i, a) {
3179
+ if (!(this instanceof t))
3180
+ return new t(o, i, a);
3188
3181
  this.rx = o, this.ry = i, this.ax = a;
3189
3182
  }
3190
- return e.prototype.transform = function(o) {
3191
- var i = Math.cos(this.ax * t), a = Math.sin(this.ax * t), s = [
3183
+ return t.prototype.transform = function(o) {
3184
+ var i = Math.cos(this.ax * e), a = Math.sin(this.ax * e), s = [
3192
3185
  this.rx * (o[0] * i + o[2] * a),
3193
3186
  this.rx * (o[1] * i + o[3] * a),
3194
3187
  this.ry * (-o[0] * a + o[2] * i),
@@ -3202,15 +3195,15 @@ function z1() {
3202
3195
  return this.ax = Math.abs(p) < n && Math.abs(h - l) < n ? 90 : Math.atan(
3203
3196
  Math.abs(p) > Math.abs(h - l) ? (h - r) / p : p / (h - l)
3204
3197
  ) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(h), this.ry = Math.sqrt(f)) : (this.ax += 90, this.rx = Math.sqrt(f), this.ry = Math.sqrt(h)), this;
3205
- }, e.prototype.isDegenerate = function() {
3198
+ }, t.prototype.isDegenerate = function() {
3206
3199
  return this.rx < n * this.ry || this.ry < n * this.rx;
3207
- }, Xt = e, Xt;
3200
+ }, Xt = t, Xt;
3208
3201
  }
3209
- var Kt, $e;
3202
+ var Kt, Ye;
3210
3203
  function j1() {
3211
- if ($e) return Kt;
3212
- $e = 1;
3213
- var n = D1(), t = B1(), e = w0(), o = q1(), i = z1();
3204
+ if (Ye) return Kt;
3205
+ Ye = 1;
3206
+ var n = B1(), e = D1(), t = w0(), o = q1(), i = z1();
3214
3207
  function a(s) {
3215
3208
  if (!(this instanceof a))
3216
3209
  return new a(s);
@@ -3224,7 +3217,7 @@ function j1() {
3224
3217
  return r.err = s.err, r.segments = s.segments.map(function(l) {
3225
3218
  return l.slice();
3226
3219
  }), r.__stack = s.__stack.map(function(l) {
3227
- return e().matrix(l.toArray());
3220
+ return t().matrix(l.toArray());
3228
3221
  }), r;
3229
3222
  }
3230
3223
  throw new Error("SvgPath.from: invalid param type " + s);
@@ -3271,7 +3264,7 @@ function j1() {
3271
3264
  this.__matrix(this.__stack[0]), this.__stack = [];
3272
3265
  return;
3273
3266
  }
3274
- for (s = e(), r = this.__stack.length; --r >= 0; )
3267
+ for (s = t(), r = this.__stack.length; --r >= 0; )
3275
3268
  s.matrix(this.__stack[r].toArray());
3276
3269
  this.__matrix(s), this.__stack = [];
3277
3270
  }
@@ -3289,19 +3282,19 @@ function j1() {
3289
3282
  }
3290
3283
  return s;
3291
3284
  }, a.prototype.translate = function(s, r) {
3292
- return this.__stack.push(e().translate(s, r || 0)), this;
3285
+ return this.__stack.push(t().translate(s, r || 0)), this;
3293
3286
  }, a.prototype.scale = function(s, r) {
3294
- return this.__stack.push(e().scale(s, !r && r !== 0 ? s : r)), this;
3287
+ return this.__stack.push(t().scale(s, !r && r !== 0 ? s : r)), this;
3295
3288
  }, a.prototype.rotate = function(s, r, l) {
3296
- return this.__stack.push(e().rotate(s, r || 0, l || 0)), this;
3289
+ return this.__stack.push(t().rotate(s, r || 0, l || 0)), this;
3297
3290
  }, a.prototype.skewX = function(s) {
3298
- return this.__stack.push(e().skewX(s)), this;
3291
+ return this.__stack.push(t().skewX(s)), this;
3299
3292
  }, a.prototype.skewY = function(s) {
3300
- return this.__stack.push(e().skewY(s)), this;
3293
+ return this.__stack.push(t().skewY(s)), this;
3301
3294
  }, a.prototype.matrix = function(s) {
3302
- return this.__stack.push(e().matrix(s)), this;
3295
+ return this.__stack.push(t().matrix(s)), this;
3303
3296
  }, a.prototype.transform = function(s) {
3304
- return s.trim() ? (this.__stack.push(t(s)), this) : this;
3297
+ return s.trim() ? (this.__stack.push(e(s)), this) : this;
3305
3298
  }, a.prototype.round = function(s) {
3306
3299
  var r = 0, l = 0, c = 0, u = 0, p;
3307
3300
  return s = s || 0, this.__evaluateStack(), this.segments.forEach(function(h) {
@@ -3436,30 +3429,30 @@ function V1() {
3436
3429
  }
3437
3430
  var H1 = V1();
3438
3431
  const U1 = /* @__PURE__ */ F1(H1);
3439
- var Jt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Y1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
3440
- function $1(n) {
3441
- var t = [];
3442
- return n.replace(Y1, function(e, o, i) {
3432
+ var Jt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, $1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
3433
+ function Y1(n) {
3434
+ var e = [];
3435
+ return n.replace($1, function(t, o, i) {
3443
3436
  var a = o.toLowerCase();
3444
- for (i = G1(i), a === "m" && i.length > 2 && (t.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
3437
+ for (i = G1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
3445
3438
  if (i.length === Jt[a])
3446
- return i.unshift(o), t.push(i);
3439
+ return i.unshift(o), e.push(i);
3447
3440
  if (i.length < Jt[a])
3448
3441
  throw new Error("malformed path data");
3449
- t.push([o].concat(i.splice(0, Jt[a])));
3442
+ e.push([o].concat(i.splice(0, Jt[a])));
3450
3443
  }
3451
- }), t;
3444
+ }), e;
3452
3445
  }
3453
3446
  var W1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
3454
3447
  function G1(n) {
3455
- var t = n.match(W1);
3456
- return t ? t.map(Number) : [];
3448
+ var e = n.match(W1);
3449
+ return e ? e.map(Number) : [];
3457
3450
  }
3458
- function ot(n, t, e, o, i, a, s, r) {
3459
- return new re(n, t, e, o, i, a, s, r);
3451
+ function ot(n, e, t, o, i, a, s, r) {
3452
+ return new re(n, e, t, o, i, a, s, r);
3460
3453
  }
3461
- function re(n, t, e, o, i, a, s, r) {
3462
- this.a = { x: n, y: t }, this.b = { x: e, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = ri, this.getPoint = Z1, this.getDerivative = K1) : (this.getArcLength = J1, this.getPoint = m0, this.getDerivative = X1), this.init();
3454
+ function re(n, e, t, o, i, a, s, r) {
3455
+ this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = ri, this.getPoint = Z1, this.getDerivative = K1) : (this.getArcLength = J1, this.getPoint = m0, this.getDerivative = X1), this.init();
3463
3456
  }
3464
3457
  re.prototype = {
3465
3458
  constructor: re,
@@ -3473,7 +3466,7 @@ re.prototype = {
3473
3466
  return this.length;
3474
3467
  },
3475
3468
  getPointAtLength: function(n) {
3476
- var t = Qt(
3469
+ var e = Qt(
3477
3470
  n,
3478
3471
  this.length,
3479
3472
  this.getArcLength,
@@ -3483,79 +3476,79 @@ re.prototype = {
3483
3476
  return this.getPoint(
3484
3477
  [this.a.x, this.b.x, this.c.x, this.d.x],
3485
3478
  [this.a.y, this.b.y, this.c.y, this.d.y],
3486
- t
3479
+ e
3487
3480
  );
3488
3481
  },
3489
3482
  getTangentAtLength: function(n) {
3490
- var t = Qt(
3483
+ var e = Qt(
3491
3484
  n,
3492
3485
  this.length,
3493
3486
  this.getArcLength,
3494
3487
  [this.a.x, this.b.x, this.c.x, this.d.x],
3495
3488
  [this.a.y, this.b.y, this.c.y, this.d.y]
3496
- ), e = this.getDerivative(
3489
+ ), t = this.getDerivative(
3497
3490
  [this.a.x, this.b.x, this.c.x, this.d.x],
3498
3491
  [this.a.y, this.b.y, this.c.y, this.d.y],
3499
- t
3500
- ), o = Math.sqrt(e.x * e.x + e.y * e.y), i;
3501
- return o > 0 ? i = { x: e.x / o, y: e.y / o } : i = { x: 0, y: 0 }, i;
3492
+ e
3493
+ ), o = Math.sqrt(t.x * t.x + t.y * t.y), i;
3494
+ return o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 }, i;
3502
3495
  },
3503
3496
  getPropertiesAtLength: function(n) {
3504
- var t = Qt(
3497
+ var e = Qt(
3505
3498
  n,
3506
3499
  this.length,
3507
3500
  this.getArcLength,
3508
3501
  [this.a.x, this.b.x, this.c.x, this.d.x],
3509
3502
  [this.a.y, this.b.y, this.c.y, this.d.y]
3510
- ), e = this.getDerivative(
3503
+ ), t = this.getDerivative(
3511
3504
  [this.a.x, this.b.x, this.c.x, this.d.x],
3512
3505
  [this.a.y, this.b.y, this.c.y, this.d.y],
3513
- t
3514
- ), o = Math.sqrt(e.x * e.x + e.y * e.y), i;
3515
- o > 0 ? i = { x: e.x / o, y: e.y / o } : i = { x: 0, y: 0 };
3506
+ e
3507
+ ), o = Math.sqrt(t.x * t.x + t.y * t.y), i;
3508
+ o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 };
3516
3509
  var a = this.getPoint(
3517
3510
  [this.a.x, this.b.x, this.c.x, this.d.x],
3518
3511
  [this.a.y, this.b.y, this.c.y, this.d.y],
3519
- t
3512
+ e
3520
3513
  );
3521
3514
  return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
3522
3515
  }
3523
3516
  };
3524
- function X1(n, t, e) {
3517
+ function X1(n, e, t) {
3525
3518
  return {
3526
- x: (1 - e) * 2 * (n[1] - n[0]) + e * 2 * (n[2] - n[1]),
3527
- y: (1 - e) * 2 * (t[1] - t[0]) + e * 2 * (t[2] - t[1])
3519
+ x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
3520
+ y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
3528
3521
  };
3529
3522
  }
3530
- function K1(n, t, e) {
3523
+ function K1(n, e, t) {
3531
3524
  var o = m0(
3532
3525
  [3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
3533
- [3 * (t[1] - t[0]), 3 * (t[2] - t[1]), 3 * (t[3] - t[2])],
3534
- e
3526
+ [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
3527
+ t
3535
3528
  );
3536
3529
  return o;
3537
3530
  }
3538
- function Qt(n, t, e, o, i) {
3539
- for (var a = 1, s = n / t, r = (n - e(o, i, s)) / t; a > 1e-3; ) {
3540
- var l = e(o, i, s + r), c = e(o, i, s - r), u = Math.abs(n - l) / t, p = Math.abs(n - c) / t;
3531
+ function Qt(n, e, t, o, i) {
3532
+ for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
3533
+ var l = t(o, i, s + r), c = t(o, i, s - r), u = Math.abs(n - l) / e, p = Math.abs(n - c) / e;
3541
3534
  u < a ? (a = u, s += r) : p < a ? (a = p, s -= r) : r /= 2;
3542
3535
  }
3543
3536
  return s;
3544
3537
  }
3545
- function m0(n, t, e) {
3546
- var o = (1 - e) * (1 - e) * n[0] + 2 * (1 - e) * e * n[1] + e * e * n[2], i = (1 - e) * (1 - e) * t[0] + 2 * (1 - e) * e * t[1] + e * e * t[2];
3538
+ function m0(n, e, t) {
3539
+ var o = (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], i = (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2];
3547
3540
  return { x: o, y: i };
3548
3541
  }
3549
- function Z1(n, t, e) {
3550
- var o = (1 - e) * (1 - e) * (1 - e) * n[0] + 3 * (1 - e) * (1 - e) * e * n[1] + 3 * (1 - e) * e * e * n[2] + e * e * e * n[3], i = (1 - e) * (1 - e) * (1 - e) * t[0] + 3 * (1 - e) * (1 - e) * e * t[1] + 3 * (1 - e) * e * e * t[2] + e * e * e * t[3];
3542
+ function Z1(n, e, t) {
3543
+ var o = (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], i = (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3];
3551
3544
  return { x: o, y: i };
3552
3545
  }
3553
- function J1(n, t, e) {
3554
- e === void 0 && (e = 1);
3555
- var o = n[0] - 2 * n[1] + n[2], i = t[0] - 2 * t[1] + t[2], a = 2 * n[1] - 2 * n[0], s = 2 * t[1] - 2 * t[0], r = 4 * (o * o + i * i), l = 4 * (o * a + i * s), c = a * a + s * s;
3546
+ function J1(n, e, t) {
3547
+ t === void 0 && (t = 1);
3548
+ var o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), l = 4 * (o * a + i * s), c = a * a + s * s;
3556
3549
  if (r === 0)
3557
- return e * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(t[2] - t[0], 2));
3558
- var u = l / (2 * r), p = c / r, h = e + u, f = p - u * u;
3550
+ return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
3551
+ var u = l / (2 * r), p = c / r, h = t + u, f = p - u * u;
3559
3552
  return Math.sqrt(r) / 2 * (h * Math.sqrt(h * h + f) - u * Math.sqrt(u * u + f) + f * Math.log(Math.abs(
3560
3553
  (h + Math.sqrt(h * h + f)) / (u + Math.sqrt(u * u + f))
3561
3554
  )));
@@ -3613,78 +3606,78 @@ var Q1 = [
3613
3606
  [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771],
3614
3607
  [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]
3615
3608
  ], ei = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3616
- function ni(n, t) {
3617
- return ei[n][t];
3609
+ function ni(n, e) {
3610
+ return ei[n][e];
3618
3611
  }
3619
- function oe(n, t, e) {
3620
- var o = e.length - 1, i, a, s;
3612
+ function oe(n, e, t) {
3613
+ var o = t.length - 1, i, a, s;
3621
3614
  if (o === 0)
3622
3615
  return 0;
3623
3616
  if (n === 0) {
3624
3617
  for (a = 0, s = 0; s <= o; s++)
3625
- a += ni(o, s) * Math.pow(1 - t, o - s) * Math.pow(t, s) * e[s];
3618
+ a += ni(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3626
3619
  return a;
3627
3620
  } else {
3628
3621
  for (i = new Array(o), s = 0; s < o; s++)
3629
- i[s] = o * (e[s + 1] - e[s]);
3630
- return oe(n - 1, t, i);
3622
+ i[s] = o * (t[s + 1] - t[s]);
3623
+ return oe(n - 1, e, i);
3631
3624
  }
3632
3625
  }
3633
- function ii(n, t, e) {
3634
- var o = oe(1, e, n), i = oe(1, e, t), a = o * o + i * i;
3626
+ function ii(n, e, t) {
3627
+ var o = oe(1, t, n), i = oe(1, t, e), a = o * o + i * i;
3635
3628
  return Math.sqrt(a);
3636
3629
  }
3637
- function ri(n, t, e) {
3630
+ function ri(n, e, t) {
3638
3631
  var o, i, a, s;
3639
- e === void 0 && (e = 1);
3632
+ t === void 0 && (t = 1);
3640
3633
  var r = 20;
3641
- for (o = e / 2, i = 0, a = 0; a < r; a++)
3642
- s = o * Q1[r][a] + o, i += ti[r][a] * ii(n, t, s);
3634
+ for (o = t / 2, i = 0, a = 0; a < r; a++)
3635
+ s = o * Q1[r][a] + o, i += ti[r][a] * ii(n, e, s);
3643
3636
  return o * i;
3644
3637
  }
3645
3638
  var Et = Math.PI * 2;
3646
- function Ge(n, t, e, o) {
3647
- var i = n * o - t * e < 0 ? -1 : 1, a = n * e + t * o;
3639
+ function Ge(n, e, t, o) {
3640
+ var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
3648
3641
  return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
3649
3642
  }
3650
- function oi(n, t, e, o, i, a, s, r, l, c) {
3651
- var u = c * (n - e) / 2 + l * (t - o) / 2, p = -l * (n - e) / 2 + c * (t - o) / 2, h = s * s, f = r * r, v = u * u, y = p * p, T = h * f - h * y - f * v;
3643
+ function oi(n, e, t, o, i, a, s, r, l, c) {
3644
+ var u = c * (n - t) / 2 + l * (e - o) / 2, p = -l * (n - t) / 2 + c * (e - o) / 2, h = s * s, f = r * r, v = u * u, y = p * p, T = h * f - h * y - f * v;
3652
3645
  T < 0 && (T = 0), T /= h * y + f * v, T = Math.sqrt(T) * (i === a ? -1 : 1);
3653
- var C = T * s / r * p, M = T * -r / s * u, L = c * C - l * M + (n + e) / 2, E = l * C + c * M + (t + o) / 2, S = (u - C) / s, k = (p - M) / r, F = (-u - C) / s, U = (-p - M) / r, D = Ge(1, 0, S, k), Y = Ge(S, k, F, U);
3654
- return a === 0 && Y > 0 && (Y -= Et), a === 1 && Y < 0 && (Y += Et), [L, E, D, Y];
3646
+ var C = T * s / r * p, M = T * -r / s * u, L = c * C - l * M + (n + t) / 2, E = l * C + c * M + (e + o) / 2, S = (u - C) / s, k = (p - M) / r, F = (-u - C) / s, U = (-p - M) / r, B = Ge(1, 0, S, k), $ = Ge(S, k, F, U);
3647
+ return a === 0 && $ > 0 && ($ -= Et), a === 1 && $ < 0 && ($ += Et), [L, E, B, $];
3655
3648
  }
3656
- function si(n, t) {
3657
- var e = 1.3333333333333333 * Math.tan(t / 4), o = Math.cos(n), i = Math.sin(n), a = Math.cos(n + t), s = Math.sin(n + t);
3658
- return [o, i, o - i * e, i + o * e, a + s * e, s - a * e, a, s];
3649
+ function si(n, e) {
3650
+ var t = 1.3333333333333333 * Math.tan(e / 4), o = Math.cos(n), i = Math.sin(n), a = Math.cos(n + e), s = Math.sin(n + e);
3651
+ return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
3659
3652
  }
3660
- function ai(n, t, e, o, i, a, s, r, l) {
3661
- var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), p = u * (n - r) / 2 + c * (t - l) / 2, h = -c * (n - r) / 2 + u * (t - l) / 2;
3653
+ function ai(n, e, t, o, i, a, s, r, l) {
3654
+ var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), p = u * (n - r) / 2 + c * (e - l) / 2, h = -c * (n - r) / 2 + u * (e - l) / 2;
3662
3655
  if (p === 0 && h === 0)
3663
3656
  return [];
3664
- if (e === 0 || o === 0)
3657
+ if (t === 0 || o === 0)
3665
3658
  return [];
3666
- e = Math.abs(e), o = Math.abs(o);
3667
- var f = p * p / (e * e) + h * h / (o * o);
3668
- f > 1 && (e *= Math.sqrt(f), o *= Math.sqrt(f));
3669
- var v = oi(n, t, r, l, a, s, e, o, c, u), y = [], T = v[2], C = v[3], M = Math.max(Math.ceil(Math.abs(C) / (Et / 4)), 1);
3659
+ t = Math.abs(t), o = Math.abs(o);
3660
+ var f = p * p / (t * t) + h * h / (o * o);
3661
+ f > 1 && (t *= Math.sqrt(f), o *= Math.sqrt(f));
3662
+ var v = oi(n, e, r, l, a, s, t, o, c, u), y = [], T = v[2], C = v[3], M = Math.max(Math.ceil(Math.abs(C) / (Et / 4)), 1);
3670
3663
  C /= M;
3671
3664
  for (var L = 0; L < M; L++)
3672
3665
  y.push(si(T, C)), T += C;
3673
3666
  return y.map(function(E) {
3674
3667
  for (var S = 0; S < E.length; S += 2) {
3675
3668
  var k = E[S + 0], F = E[S + 1];
3676
- k *= e, F *= o;
3677
- var U = u * k - c * F, D = c * k + u * F;
3678
- E[S + 0] = U + v[0], E[S + 1] = D + v[1];
3669
+ k *= t, F *= o;
3670
+ var U = u * k - c * F, B = c * k + u * F;
3671
+ E[S + 0] = U + v[0], E[S + 1] = B + v[1];
3679
3672
  }
3680
3673
  return E;
3681
3674
  });
3682
3675
  }
3683
- function Xe(n, t, e, o, i, a, s, r, l) {
3684
- return new se(n, t, e, o, i, a, s, r, l);
3676
+ function Xe(n, e, t, o, i, a, s, r, l) {
3677
+ return new se(n, e, t, o, i, a, s, r, l);
3685
3678
  }
3686
- function se(n, t, e, o, i, a, s, r, l) {
3687
- var c = 0, u = [], p = [], h = ai(n, t, e, o, i, a, s, r, l);
3679
+ function se(n, e, t, o, i, a, s, r, l) {
3680
+ var c = 0, u = [], p = [], h = ai(n, e, t, o, i, a, s, r, l);
3688
3681
  h.forEach(function(f) {
3689
3682
  var v = new ot(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = v.getTotalLength();
3690
3683
  c += y, u.push(y), p.push(v);
@@ -3699,59 +3692,59 @@ se.prototype = {
3699
3692
  },
3700
3693
  getPointAtLength: function(n) {
3701
3694
  n < 0 ? n = 0 : n > this.length && (n = this.length);
3702
- for (var t = this.partialLengths.length - 1; this.partialLengths[t] >= n && this.partialLengths[t] > 0; )
3703
- t--;
3704
- t < this.partialLengths.length - 1 && t++;
3705
- for (var e = 0, o = 0; o < t; o++)
3706
- e += this.partialLengths[o];
3707
- return this.curves[t].getPointAtLength(n - e);
3695
+ for (var e = this.partialLengths.length - 1; this.partialLengths[e] >= n && this.partialLengths[e] > 0; )
3696
+ e--;
3697
+ e < this.partialLengths.length - 1 && e++;
3698
+ for (var t = 0, o = 0; o < e; o++)
3699
+ t += this.partialLengths[o];
3700
+ return this.curves[e].getPointAtLength(n - t);
3708
3701
  },
3709
3702
  getTangentAtLength: function(n) {
3710
3703
  n < 0 ? n = 0 : n > this.length && (n = this.length);
3711
- for (var t = this.partialLengths.length - 1; this.partialLengths[t] >= n && this.partialLengths[t] > 0; )
3712
- t--;
3713
- t < this.partialLengths.length - 1 && t++;
3714
- for (var e = 0, o = 0; o < t; o++)
3715
- e += this.partialLengths[o];
3716
- return this.curves[t].getTangentAtLength(n - e);
3704
+ for (var e = this.partialLengths.length - 1; this.partialLengths[e] >= n && this.partialLengths[e] > 0; )
3705
+ e--;
3706
+ e < this.partialLengths.length - 1 && e++;
3707
+ for (var t = 0, o = 0; o < e; o++)
3708
+ t += this.partialLengths[o];
3709
+ return this.curves[e].getTangentAtLength(n - t);
3717
3710
  },
3718
3711
  getPropertiesAtLength: function(n) {
3719
- var t = this.getTangentAtLength(n), e = this.getPointAtLength(n);
3720
- return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
3712
+ var e = this.getTangentAtLength(n), t = this.getPointAtLength(n);
3713
+ return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
3721
3714
  }
3722
3715
  };
3723
- function rt(n, t, e, o) {
3724
- return new _t(n, t, e, o);
3716
+ function rt(n, e, t, o) {
3717
+ return new _t(n, e, t, o);
3725
3718
  }
3726
- function _t(n, t, e, o) {
3727
- this.x0 = n, this.x1 = t, this.y0 = e, this.y1 = o;
3719
+ function _t(n, e, t, o) {
3720
+ this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
3728
3721
  }
3729
3722
  _t.prototype.getTotalLength = function() {
3730
3723
  return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
3731
3724
  };
3732
3725
  _t.prototype.getPointAtLength = function(n) {
3733
- var t = n / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), e = (this.x1 - this.x0) * t, o = (this.y1 - this.y0) * t;
3734
- return { x: this.x0 + e, y: this.y0 + o };
3726
+ var e = n / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), t = (this.x1 - this.x0) * e, o = (this.y1 - this.y0) * e;
3727
+ return { x: this.x0 + t, y: this.y0 + o };
3735
3728
  };
3736
3729
  _t.prototype.getTangentAtLength = function() {
3737
3730
  var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
3738
3731
  return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
3739
3732
  };
3740
3733
  _t.prototype.getPropertiesAtLength = function(n) {
3741
- var t = this.getPointAtLength(n), e = this.getTangentAtLength();
3742
- return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
3734
+ var e = this.getPointAtLength(n), t = this.getTangentAtLength();
3735
+ return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
3743
3736
  };
3744
3737
  function li(n) {
3745
- var t = 0, e = [], o = [];
3738
+ var e = 0, t = [], o = [];
3746
3739
  function i(s) {
3747
3740
  if (!s)
3748
3741
  return null;
3749
- for (var r = $1(s), l = [0, 0], c = [0, 0], u, p, h = 0; h < r.length; h++)
3750
- r[h][0] === "M" ? (l = [r[h][1], r[h][2]], p = [l[0], l[1]], o.push(null)) : r[h][0] === "m" ? (l = [r[h][1] + l[0], r[h][2] + l[1]], p = [l[0], l[1]], o.push(null)) : r[h][0] === "L" ? (t = t + Math.sqrt(Math.pow(l[0] - r[h][1], 2) + Math.pow(l[1] - r[h][2], 2)), o.push(new rt(l[0], r[h][1], l[1], r[h][2])), l = [r[h][1], r[h][2]]) : r[h][0] === "l" ? (t = t + Math.sqrt(Math.pow(r[h][1], 2) + Math.pow(r[h][2], 2)), o.push(new rt(l[0], r[h][1] + l[0], l[1], r[h][2] + l[1])), l = [r[h][1] + l[0], r[h][2] + l[1]]) : r[h][0] === "H" ? (t = t + Math.abs(l[0] - r[h][1]), o.push(new rt(l[0], r[h][1], l[1], l[1])), l[0] = r[h][1]) : r[h][0] === "h" ? (t = t + Math.abs(r[h][1]), o.push(new rt(l[0], l[0] + r[h][1], l[1], l[1])), l[0] = r[h][1] + l[0]) : r[h][0] === "V" ? (t = t + Math.abs(l[1] - r[h][1]), o.push(new rt(l[0], l[0], l[1], r[h][1])), l[1] = r[h][1]) : r[h][0] === "v" ? (t = t + Math.abs(r[h][1]), o.push(new rt(l[0], l[0], l[1], l[1] + r[h][1])), l[1] = r[h][1] + l[1]) : r[h][0] === "z" || r[h][0] === "Z" ? (t = t + Math.sqrt(Math.pow(p[0] - l[0], 2) + Math.pow(p[1] - l[1], 2)), o.push(new rt(l[0], p[0], l[1], p[1])), l = [p[0], p[1]]) : r[h][0] === "C" ? (u = new ot(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4], r[h][5], r[h][6]), t = t + u.getTotalLength(), l = [r[h][5], r[h][6]], o.push(u)) : r[h][0] === "c" ? (u = new ot(l[0], l[1], l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4], l[0] + r[h][5], l[1] + r[h][6]), t = t + u.getTotalLength(), l = [r[h][5] + l[0], r[h][6] + l[1]], o.push(u)) : r[h][0] === "S" ? (h > 0 && ["C", "c", "S", "s"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], 2 * l[0] - r[h - 1][r[h - 1].length - 4], 2 * l[1] - r[h - 1][r[h - 1].length - 3], r[h][1], r[h][2], r[h][3], r[h][4]) : u = new ot(l[0], l[1], l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4]), t = t + u.getTotalLength(), l = [r[h][3], r[h][4]], o.push(u)) : r[h][0] === "s" ? (h > 0 && ["C", "c", "S", "s"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], l[0] + u.d.x - u.c.x, l[1] + u.d.y - u.c.y, l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4]) : u = new ot(l[0], l[1], l[0], l[1], l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4]), t = t + u.getTotalLength(), l = [r[h][3] + l[0], r[h][4] + l[1]], o.push(u)) : r[h][0] === "Q" ? (l[0] != r[h][1] && l[1] != r[h][2] ? u = new ot(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4]) : u = new rt(r[h][1], r[h][3], r[h][2], r[h][4]), t = t + u.getTotalLength(), o.push(u), l = [r[h][3], r[h][4]], c = [r[h][1], r[h][2]]) : r[h][0] === "q" ? (r[h][1] == 0 && r[h][2] == 0 ? u = new rt(l[0] + r[h][1], l[0] + r[h][3], l[1] + r[h][2], l[1] + r[h][4]) : u = new ot(l[0], l[1], l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4]), t = t + u.getTotalLength(), c = [l[0] + r[h][1], l[1] + r[h][2]], l = [r[h][3] + l[0], r[h][4] + l[1]], o.push(u)) : r[h][0] === "T" ? (h > 0 && ["Q", "q", "T", "t"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], 2 * l[0] - c[0], 2 * l[1] - c[1], r[h][1], r[h][2]) : u = new rt(l[0], r[h][1], l[1], r[h][2]), o.push(u), t = t + u.getTotalLength(), c = [2 * l[0] - c[0], 2 * l[1] - c[1]], l = [r[h][1], r[h][2]]) : r[h][0] === "t" ? (h > 0 && ["Q", "q", "T", "t"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], 2 * l[0] - c[0], 2 * l[1] - c[1], l[0] + r[h][1], l[1] + r[h][2]) : u = new rt(l[0], l[0] + r[h][1], l[1], l[1] + r[h][2]), t = t + u.getTotalLength(), c = [2 * l[0] - c[0], 2 * l[1] - c[1]], l = [r[h][1] + l[0], r[h][2] + l[0]], o.push(u)) : r[h][0] === "A" ? (u = new Xe(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4], r[h][5], r[h][6], r[h][7]), t = t + u.getTotalLength(), l = [r[h][6], r[h][7]], o.push(u)) : r[h][0] === "a" && (u = new Xe(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4], r[h][5], l[0] + r[h][6], l[1] + r[h][7]), t = t + u.getTotalLength(), l = [l[0] + r[h][6], l[1] + r[h][7]], o.push(u)), e.push(t);
3742
+ for (var r = Y1(s), l = [0, 0], c = [0, 0], u, p, h = 0; h < r.length; h++)
3743
+ r[h][0] === "M" ? (l = [r[h][1], r[h][2]], p = [l[0], l[1]], o.push(null)) : r[h][0] === "m" ? (l = [r[h][1] + l[0], r[h][2] + l[1]], p = [l[0], l[1]], o.push(null)) : r[h][0] === "L" ? (e = e + Math.sqrt(Math.pow(l[0] - r[h][1], 2) + Math.pow(l[1] - r[h][2], 2)), o.push(new rt(l[0], r[h][1], l[1], r[h][2])), l = [r[h][1], r[h][2]]) : r[h][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[h][1], 2) + Math.pow(r[h][2], 2)), o.push(new rt(l[0], r[h][1] + l[0], l[1], r[h][2] + l[1])), l = [r[h][1] + l[0], r[h][2] + l[1]]) : r[h][0] === "H" ? (e = e + Math.abs(l[0] - r[h][1]), o.push(new rt(l[0], r[h][1], l[1], l[1])), l[0] = r[h][1]) : r[h][0] === "h" ? (e = e + Math.abs(r[h][1]), o.push(new rt(l[0], l[0] + r[h][1], l[1], l[1])), l[0] = r[h][1] + l[0]) : r[h][0] === "V" ? (e = e + Math.abs(l[1] - r[h][1]), o.push(new rt(l[0], l[0], l[1], r[h][1])), l[1] = r[h][1]) : r[h][0] === "v" ? (e = e + Math.abs(r[h][1]), o.push(new rt(l[0], l[0], l[1], l[1] + r[h][1])), l[1] = r[h][1] + l[1]) : r[h][0] === "z" || r[h][0] === "Z" ? (e = e + Math.sqrt(Math.pow(p[0] - l[0], 2) + Math.pow(p[1] - l[1], 2)), o.push(new rt(l[0], p[0], l[1], p[1])), l = [p[0], p[1]]) : r[h][0] === "C" ? (u = new ot(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4], r[h][5], r[h][6]), e = e + u.getTotalLength(), l = [r[h][5], r[h][6]], o.push(u)) : r[h][0] === "c" ? (u = new ot(l[0], l[1], l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4], l[0] + r[h][5], l[1] + r[h][6]), e = e + u.getTotalLength(), l = [r[h][5] + l[0], r[h][6] + l[1]], o.push(u)) : r[h][0] === "S" ? (h > 0 && ["C", "c", "S", "s"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], 2 * l[0] - r[h - 1][r[h - 1].length - 4], 2 * l[1] - r[h - 1][r[h - 1].length - 3], r[h][1], r[h][2], r[h][3], r[h][4]) : u = new ot(l[0], l[1], l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4]), e = e + u.getTotalLength(), l = [r[h][3], r[h][4]], o.push(u)) : r[h][0] === "s" ? (h > 0 && ["C", "c", "S", "s"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], l[0] + u.d.x - u.c.x, l[1] + u.d.y - u.c.y, l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4]) : u = new ot(l[0], l[1], l[0], l[1], l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4]), e = e + u.getTotalLength(), l = [r[h][3] + l[0], r[h][4] + l[1]], o.push(u)) : r[h][0] === "Q" ? (l[0] != r[h][1] && l[1] != r[h][2] ? u = new ot(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4]) : u = new rt(r[h][1], r[h][3], r[h][2], r[h][4]), e = e + u.getTotalLength(), o.push(u), l = [r[h][3], r[h][4]], c = [r[h][1], r[h][2]]) : r[h][0] === "q" ? (r[h][1] == 0 && r[h][2] == 0 ? u = new rt(l[0] + r[h][1], l[0] + r[h][3], l[1] + r[h][2], l[1] + r[h][4]) : u = new ot(l[0], l[1], l[0] + r[h][1], l[1] + r[h][2], l[0] + r[h][3], l[1] + r[h][4]), e = e + u.getTotalLength(), c = [l[0] + r[h][1], l[1] + r[h][2]], l = [r[h][3] + l[0], r[h][4] + l[1]], o.push(u)) : r[h][0] === "T" ? (h > 0 && ["Q", "q", "T", "t"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], 2 * l[0] - c[0], 2 * l[1] - c[1], r[h][1], r[h][2]) : u = new rt(l[0], r[h][1], l[1], r[h][2]), o.push(u), e = e + u.getTotalLength(), c = [2 * l[0] - c[0], 2 * l[1] - c[1]], l = [r[h][1], r[h][2]]) : r[h][0] === "t" ? (h > 0 && ["Q", "q", "T", "t"].indexOf(r[h - 1][0]) > -1 ? u = new ot(l[0], l[1], 2 * l[0] - c[0], 2 * l[1] - c[1], l[0] + r[h][1], l[1] + r[h][2]) : u = new rt(l[0], l[0] + r[h][1], l[1], l[1] + r[h][2]), e = e + u.getTotalLength(), c = [2 * l[0] - c[0], 2 * l[1] - c[1]], l = [r[h][1] + l[0], r[h][2] + l[0]], o.push(u)) : r[h][0] === "A" ? (u = new Xe(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4], r[h][5], r[h][6], r[h][7]), e = e + u.getTotalLength(), l = [r[h][6], r[h][7]], o.push(u)) : r[h][0] === "a" && (u = new Xe(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4], r[h][5], l[0] + r[h][6], l[1] + r[h][7]), e = e + u.getTotalLength(), l = [l[0] + r[h][6], l[1] + r[h][7]], o.push(u)), t.push(e);
3751
3744
  return i;
3752
3745
  }
3753
3746
  i.getTotalLength = function() {
3754
- return t;
3747
+ return e;
3755
3748
  }, i.getPointAtLength = function(s) {
3756
3749
  var r = a(s);
3757
3750
  return o[r.i].getPointAtLength(r.fraction);
@@ -3763,35 +3756,35 @@ function li(n) {
3763
3756
  return o[r.i].getPropertiesAtLength(r.fraction);
3764
3757
  };
3765
3758
  var a = function(s) {
3766
- s < 0 ? s = 0 : s > t && (s = t);
3767
- for (var r = e.length - 1; e[r] >= s && e[r] > 0; )
3759
+ s < 0 ? s = 0 : s > e && (s = e);
3760
+ for (var r = t.length - 1; t[r] >= s && t[r] > 0; )
3768
3761
  r--;
3769
- return r++, { fraction: s - e[r - 1], i: r };
3762
+ return r++, { fraction: s - t[r - 1], i: r };
3770
3763
  };
3771
3764
  return i(n);
3772
3765
  }
3773
- function zt(n, t) {
3774
- return Math.sqrt((n[0] - t[0]) * (n[0] - t[0]) + (n[1] - t[1]) * (n[1] - t[1]));
3766
+ function zt(n, e) {
3767
+ return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
3775
3768
  }
3776
- function b0(n, t, e) {
3777
- return [n[0] + (t[0] - n[0]) * e, n[1] + (t[1] - n[1]) * e];
3769
+ function b0(n, e, t) {
3770
+ return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
3778
3771
  }
3779
- function hi(n, t) {
3780
- return zt(n, t) < 1e-9;
3772
+ function hi(n, e) {
3773
+ return zt(n, e) < 1e-9;
3781
3774
  }
3782
- function ci(n, t, e) {
3783
- let o = n.map((i, a) => ui(i, t[a]));
3775
+ function ci(n, e, t) {
3776
+ let o = n.map((i, a) => ui(i, e[a]));
3784
3777
  return function(i) {
3785
3778
  let a = o.map((s) => s(i));
3786
- return e ? pi(a) : a;
3779
+ return t ? pi(a) : a;
3787
3780
  };
3788
3781
  }
3789
- function ui(n, t) {
3790
- return function(e) {
3791
- return n.map((o, i) => o + e * (t[i] - o));
3782
+ function ui(n, e) {
3783
+ return function(t) {
3784
+ return n.map((o, i) => o + t * (e[i] - o));
3792
3785
  };
3793
3786
  }
3794
- function Bt(n) {
3787
+ function Dt(n) {
3795
3788
  return typeof n == "number" && isFinite(n);
3796
3789
  }
3797
3790
  const ae = `All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
@@ -3803,39 +3796,39 @@ function fi(n) {
3803
3796
  return new U1(n).abs();
3804
3797
  }
3805
3798
  function di(n) {
3806
- return n.toString().split("M").map((t, e) => (t = t.trim(), e && t ? "M" + t : t)).filter((t) => t);
3799
+ return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
3807
3800
  }
3808
3801
  function pi(n) {
3809
3802
  return "M" + n.join("L") + "Z";
3810
3803
  }
3811
- function gi(n, t) {
3812
- let e = fi(n);
3813
- return xi(e) || yi(e, t);
3804
+ function gi(n, e) {
3805
+ let t = fi(n);
3806
+ return xi(t) || yi(t, e);
3814
3807
  }
3815
3808
  function xi(n) {
3816
- let t = n.segments || [], e = [];
3817
- if (!t.length || t[0][0] !== "M")
3809
+ let e = n.segments || [], t = [];
3810
+ if (!e.length || e[0][0] !== "M")
3818
3811
  return !1;
3819
- for (let o = 0; o < t.length; o++) {
3820
- let [i, a, s] = t[o];
3812
+ for (let o = 0; o < e.length; o++) {
3813
+ let [i, a, s] = e[o];
3821
3814
  if (i === "M" && o || i === "Z")
3822
3815
  break;
3823
3816
  if (i === "M" || i === "L")
3824
- e.push([a, s]);
3817
+ t.push([a, s]);
3825
3818
  else if (i === "H")
3826
- e.push([a, e[e.length - 1][1]]);
3819
+ t.push([a, t[t.length - 1][1]]);
3827
3820
  else if (i === "V")
3828
- e.push([e[e.length - 1][0], a]);
3821
+ t.push([t[t.length - 1][0], a]);
3829
3822
  else
3830
3823
  return !1;
3831
3824
  }
3832
- return e.length ? { ring: e } : !1;
3825
+ return t.length ? { ring: t } : !1;
3833
3826
  }
3834
- function yi(n, t) {
3835
- let e = di(n)[0], o = [], i, a, s = 3;
3836
- if (!e)
3827
+ function yi(n, e) {
3828
+ let t = di(n)[0], o = [], i, a, s = 3;
3829
+ if (!t)
3837
3830
  throw new TypeError(ae);
3838
- a = vi(e), i = a.getTotalLength(), t && Bt(t) && t > 0 && (s = Math.max(s, Math.ceil(i / t)));
3831
+ a = vi(t), i = a.getTotalLength(), e && Dt(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3839
3832
  for (let r = 0; r < s; r++) {
3840
3833
  let l = a.getPointAtLength(i * r / s);
3841
3834
  o.push([l.x, l.y]);
@@ -3848,16 +3841,16 @@ function yi(n, t) {
3848
3841
  function vi(n) {
3849
3842
  if (typeof window < "u" && window && window.document)
3850
3843
  try {
3851
- let t = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
3852
- return t.setAttributeNS(null, "d", n), t;
3844
+ let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
3845
+ return e.setAttributeNS(null, "d", n), e;
3853
3846
  } catch {
3854
3847
  }
3855
3848
  return li(n);
3856
3849
  }
3857
- function Ke(n, t) {
3858
- const e = n.length + t, o = R1(n) / t;
3850
+ function Ke(n, e) {
3851
+ const t = n.length + e, o = R1(n) / e;
3859
3852
  let i = 0, a = 0, s = o / 2;
3860
- for (; n.length < e; ) {
3853
+ for (; n.length < t; ) {
3861
3854
  let r = n[i], l = n[(i + 1) % n.length], c = zt(r, l);
3862
3855
  if (s <= a + c) {
3863
3856
  n.splice(i + 1, 0, c ? b0(r, l, (s - a) / c) : r.slice(0)), s += o;
@@ -3866,45 +3859,45 @@ function Ke(n, t) {
3866
3859
  a += c, i++;
3867
3860
  }
3868
3861
  }
3869
- function wi(n, t = 1 / 0) {
3870
- for (let e = 0; e < n.length; e++) {
3871
- let o = n[e], i = e === n.length - 1 ? n[0] : n[e + 1];
3872
- for (; zt(o, i) > t; )
3873
- i = b0(o, i, 0.5), n.splice(e + 1, 0, i);
3862
+ function wi(n, e = 1 / 0) {
3863
+ for (let t = 0; t < n.length; t++) {
3864
+ let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
3865
+ for (; zt(o, i) > e; )
3866
+ i = b0(o, i, 0.5), n.splice(t + 1, 0, i);
3874
3867
  }
3875
3868
  }
3876
- function Ze(n, t) {
3877
- let e, o, i;
3869
+ function Ze(n, e) {
3870
+ let t, o, i;
3878
3871
  if (typeof n == "string") {
3879
- let a = gi(n, t);
3872
+ let a = gi(n, e);
3880
3873
  n = a.ring, i = a.skipBisect;
3881
3874
  } else if (!Array.isArray(n))
3882
3875
  throw new TypeError(ae);
3883
- if (e = n.slice(0), !mi(e))
3876
+ if (t = n.slice(0), !mi(t))
3884
3877
  throw new TypeError(ae);
3885
- return e.length > 1 && hi(e[0], e[e.length - 1]) && e.pop(), o = N1(e), o > 0 && e.reverse(), !i && t && Bt(t) && t > 0 && wi(e, t), e;
3878
+ return t.length > 1 && hi(t[0], t[t.length - 1]) && t.pop(), o = N1(t), o > 0 && t.reverse(), !i && e && Dt(e) && e > 0 && wi(t, e), t;
3886
3879
  }
3887
3880
  function mi(n) {
3888
- return n.every(function(t) {
3889
- return Array.isArray(t) && t.length >= 2 && Bt(t[0]) && Bt(t[1]);
3881
+ return n.every(function(e) {
3882
+ return Array.isArray(e) && e.length >= 2 && Dt(e[0]) && Dt(e[1]);
3890
3883
  });
3891
3884
  }
3892
- function bi(n, t) {
3893
- let e = n.length, o = 1 / 0, i, a, s;
3894
- for (let r = 0; r < e; r++)
3895
- a = 0, t.forEach(function(l, c) {
3896
- let u = zt(n[(r + c) % e], l);
3885
+ function bi(n, e) {
3886
+ let t = n.length, o = 1 / 0, i, a, s;
3887
+ for (let r = 0; r < t; r++)
3888
+ a = 0, e.forEach(function(l, c) {
3889
+ let u = zt(n[(r + c) % t], l);
3897
3890
  a += u * u;
3898
3891
  }), a < o && (o = a, i = r);
3899
3892
  i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
3900
3893
  }
3901
- function Ai(n, t, { maxSegmentLength: e = 10, string: o = !0 } = {}) {
3902
- let i = Ze(n, e), a = Ze(t, e), s = Ti(i, a, o);
3903
- return !o || typeof n != "string" && typeof t != "string" ? s : (r) => r < 1e-4 && typeof n == "string" ? n : 1 - r < 1e-4 && typeof t == "string" ? t : s(r);
3894
+ function Ai(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3895
+ let i = Ze(n, t), a = Ze(e, t), s = Ti(i, a, o);
3896
+ return !o || typeof n != "string" && typeof e != "string" ? s : (r) => r < 1e-4 && typeof n == "string" ? n : 1 - r < 1e-4 && typeof e == "string" ? e : s(r);
3904
3897
  }
3905
- function Ti(n, t, e) {
3898
+ function Ti(n, e, t) {
3906
3899
  let o;
3907
- return o = n.length - t.length, Ke(n, o < 0 ? o * -1 : 0), Ke(t, o > 0 ? o : 0), bi(n, t), ci(n, t, e);
3900
+ return o = n.length - e.length, Ke(n, o < 0 ? o * -1 : 0), Ke(e, o > 0 ? o : 0), bi(n, e), ci(n, e, t);
3908
3901
  }
3909
3902
  var Rt = { exports: {} }, Je;
3910
3903
  function Li() {
@@ -3912,18 +3905,18 @@ function Li() {
3912
3905
  Je = 1, Rt.exports = n, Rt.exports.default = n;
3913
3906
  function n(d, x, g) {
3914
3907
  g = g || 2;
3915
- var w = x && x.length, m = w ? x[0] * g : d.length, b = t(d, 0, m, g, !0), A = [];
3908
+ var w = x && x.length, m = w ? x[0] * g : d.length, b = e(d, 0, m, g, !0), A = [];
3916
3909
  if (!b || b.next === b.prev) return A;
3917
- var P, R, O, W, V, B, X;
3910
+ var P, R, O, W, V, D, X;
3918
3911
  if (w && (b = l(d, x, b, g)), d.length > 80 * g) {
3919
3912
  P = O = d[0], R = W = d[1];
3920
3913
  for (var H = g; H < m; H += g)
3921
- V = d[H], B = d[H + 1], V < P && (P = V), B < R && (R = B), V > O && (O = V), B > W && (W = B);
3914
+ V = d[H], D = d[H + 1], V < P && (P = V), D < R && (R = D), V > O && (O = V), D > W && (W = D);
3922
3915
  X = Math.max(O - P, W - R), X = X !== 0 ? 32767 / X : 0;
3923
3916
  }
3924
3917
  return o(b, A, g, P, R, X, 0), A;
3925
3918
  }
3926
- function t(d, x, g, w, m) {
3919
+ function e(d, x, g, w, m) {
3927
3920
  var b, A;
3928
3921
  if (m === jt(d, x, g, w) > 0)
3929
3922
  for (b = x; b < g; b += w) A = Q(b, d[b], d[b + 1], A);
@@ -3931,7 +3924,7 @@ function Li() {
3931
3924
  for (b = g - w; b >= x; b -= w) A = Q(b, d[b], d[b + 1], A);
3932
3925
  return A && E(A, A.next) && (ft(A), A = A.next), A;
3933
3926
  }
3934
- function e(d, x) {
3927
+ function t(d, x) {
3935
3928
  if (!d) return d;
3936
3929
  x || (x = d);
3937
3930
  var g = d, w;
@@ -3953,7 +3946,7 @@ function Li() {
3953
3946
  continue;
3954
3947
  }
3955
3948
  if (d = O, d === P) {
3956
- A ? A === 1 ? (d = s(e(d), x, g), o(d, x, g, w, m, b, 2)) : A === 2 && r(d, x, g, w, m, b) : o(e(d), x, g, w, m, b, 1);
3949
+ A ? A === 1 ? (d = s(t(d), x, g), o(d, x, g, w, m, b, 2)) : A === 2 && r(d, x, g, w, m, b) : o(t(d), x, g, w, m, b, 1);
3957
3950
  break;
3958
3951
  }
3959
3952
  }
@@ -3962,8 +3955,8 @@ function Li() {
3962
3955
  function i(d) {
3963
3956
  var x = d.prev, g = d, w = d.next;
3964
3957
  if (L(x, g, w) >= 0) return !1;
3965
- for (var m = x.x, b = g.x, A = w.x, P = x.y, R = g.y, O = w.y, W = m < b ? m < A ? m : A : b < A ? b : A, V = P < R ? P < O ? P : O : R < O ? R : O, B = m > b ? m > A ? m : A : b > A ? b : A, X = P > R ? P > O ? P : O : R > O ? R : O, H = w.next; H !== x; ) {
3966
- if (H.x >= W && H.x <= B && H.y >= V && H.y <= X && C(m, P, b, R, A, O, H.x, H.y) && L(H.prev, H, H.next) >= 0) return !1;
3958
+ for (var m = x.x, b = g.x, A = w.x, P = x.y, R = g.y, O = w.y, W = m < b ? m < A ? m : A : b < A ? b : A, V = P < R ? P < O ? P : O : R < O ? R : O, D = m > b ? m > A ? m : A : b > A ? b : A, X = P > R ? P > O ? P : O : R > O ? R : O, H = w.next; H !== x; ) {
3959
+ if (H.x >= W && H.x <= D && H.y >= V && H.y <= X && C(m, P, b, R, A, O, H.x, H.y) && L(H.prev, H, H.next) >= 0) return !1;
3967
3960
  H = H.next;
3968
3961
  }
3969
3962
  return !0;
@@ -3971,16 +3964,16 @@ function Li() {
3971
3964
  function a(d, x, g, w) {
3972
3965
  var m = d.prev, b = d, A = d.next;
3973
3966
  if (L(m, b, A) >= 0) return !1;
3974
- for (var P = m.x, R = b.x, O = A.x, W = m.y, V = b.y, B = A.y, X = P < R ? P < O ? P : O : R < O ? R : O, H = W < V ? W < B ? W : B : V < B ? V : B, Ct = P > R ? P > O ? P : O : R > O ? R : O, St = W > V ? W > B ? W : B : V > B ? V : B, we = y(X, H, x, g, w), me = y(Ct, St, x, g, w), q = d.prevZ, z = d.nextZ; q && q.z >= we && z && z.z <= me; ) {
3975
- if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && C(P, W, R, V, O, B, q.x, q.y) && L(q.prev, q, q.next) >= 0 || (q = q.prevZ, z.x >= X && z.x <= Ct && z.y >= H && z.y <= St && z !== m && z !== A && C(P, W, R, V, O, B, z.x, z.y) && L(z.prev, z, z.next) >= 0)) return !1;
3967
+ for (var P = m.x, R = b.x, O = A.x, W = m.y, V = b.y, D = A.y, X = P < R ? P < O ? P : O : R < O ? R : O, H = W < V ? W < D ? W : D : V < D ? V : D, Ct = P > R ? P > O ? P : O : R > O ? R : O, St = W > V ? W > D ? W : D : V > D ? V : D, we = y(X, H, x, g, w), me = y(Ct, St, x, g, w), q = d.prevZ, z = d.nextZ; q && q.z >= we && z && z.z <= me; ) {
3968
+ if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && C(P, W, R, V, O, D, q.x, q.y) && L(q.prev, q, q.next) >= 0 || (q = q.prevZ, z.x >= X && z.x <= Ct && z.y >= H && z.y <= St && z !== m && z !== A && C(P, W, R, V, O, D, z.x, z.y) && L(z.prev, z, z.next) >= 0)) return !1;
3976
3969
  z = z.nextZ;
3977
3970
  }
3978
3971
  for (; q && q.z >= we; ) {
3979
- if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && C(P, W, R, V, O, B, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
3972
+ if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && C(P, W, R, V, O, D, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
3980
3973
  q = q.prevZ;
3981
3974
  }
3982
3975
  for (; z && z.z <= me; ) {
3983
- if (z.x >= X && z.x <= Ct && z.y >= H && z.y <= St && z !== m && z !== A && C(P, W, R, V, O, B, z.x, z.y) && L(z.prev, z, z.next) >= 0) return !1;
3976
+ if (z.x >= X && z.x <= Ct && z.y >= H && z.y <= St && z !== m && z !== A && C(P, W, R, V, O, D, z.x, z.y) && L(z.prev, z, z.next) >= 0) return !1;
3984
3977
  z = z.nextZ;
3985
3978
  }
3986
3979
  return !0;
@@ -3989,9 +3982,9 @@ function Li() {
3989
3982
  var w = d;
3990
3983
  do {
3991
3984
  var m = w.prev, b = w.next.next;
3992
- !E(m, b) && S(m, w, w.next, b) && D(m, b) && D(b, m) && (x.push(m.i / g | 0), x.push(w.i / g | 0), x.push(b.i / g | 0), ft(w), ft(w.next), w = d = b), w = w.next;
3985
+ !E(m, b) && S(m, w, w.next, b) && B(m, b) && B(b, m) && (x.push(m.i / g | 0), x.push(w.i / g | 0), x.push(b.i / g | 0), ft(w), ft(w.next), w = d = b), w = w.next;
3993
3986
  } while (w !== d);
3994
- return e(w);
3987
+ return t(w);
3995
3988
  }
3996
3989
  function r(d, x, g, w, m, b) {
3997
3990
  var A = d;
@@ -3999,7 +3992,7 @@ function Li() {
3999
3992
  for (var P = A.next.next; P !== A.prev; ) {
4000
3993
  if (A.i !== P.i && M(A, P)) {
4001
3994
  var R = lt(A, P);
4002
- A = e(A, A.next), R = e(R, R.next), o(A, x, g, w, m, b, 0), o(R, x, g, w, m, b, 0);
3995
+ A = t(A, A.next), R = t(R, R.next), o(A, x, g, w, m, b, 0), o(R, x, g, w, m, b, 0);
4003
3996
  return;
4004
3997
  }
4005
3998
  P = P.next;
@@ -4010,7 +4003,7 @@ function Li() {
4010
4003
  function l(d, x, g, w) {
4011
4004
  var m = [], b, A, P, R, O;
4012
4005
  for (b = 0, A = x.length; b < A; b++)
4013
- P = x[b] * w, R = b < A - 1 ? x[b + 1] * w : d.length, O = t(d, P, R, w, !1), O === O.next && (O.steiner = !0), m.push(T(O));
4006
+ P = x[b] * w, R = b < A - 1 ? x[b + 1] * w : d.length, O = e(d, P, R, w, !1), O === O.next && (O.steiner = !0), m.push(T(O));
4014
4007
  for (m.sort(c), b = 0; b < m.length; b++)
4015
4008
  g = u(m[b], g);
4016
4009
  return g;
@@ -4023,7 +4016,7 @@ function Li() {
4023
4016
  if (!g)
4024
4017
  return x;
4025
4018
  var w = lt(g, d);
4026
- return e(w, w.next), e(g, g.next);
4019
+ return t(w, w.next), t(g, g.next);
4027
4020
  }
4028
4021
  function p(d, x) {
4029
4022
  var g = x, w = d.x, m = d.y, b = -1 / 0, A;
@@ -4036,10 +4029,10 @@ function Li() {
4036
4029
  g = g.next;
4037
4030
  } while (g !== x);
4038
4031
  if (!A) return null;
4039
- var R = A, O = A.x, W = A.y, V = 1 / 0, B;
4032
+ var R = A, O = A.x, W = A.y, V = 1 / 0, D;
4040
4033
  g = A;
4041
4034
  do
4042
- w >= g.x && g.x >= O && w !== g.x && C(m < W ? w : b, m, O, W, m < W ? b : w, m, g.x, g.y) && (B = Math.abs(m - g.y) / (w - g.x), D(g, d) && (B < V || B === V && (g.x > A.x || g.x === A.x && h(A, g))) && (A = g, V = B)), g = g.next;
4035
+ w >= g.x && g.x >= O && w !== g.x && C(m < W ? w : b, m, O, W, m < W ? b : w, m, g.x, g.y) && (D = Math.abs(m - g.y) / (w - g.x), B(g, d) && (D < V || D === V && (g.x > A.x || g.x === A.x && h(A, g))) && (A = g, V = D)), g = g.next;
4043
4036
  while (g !== R);
4044
4037
  return A;
4045
4038
  }
@@ -4082,7 +4075,7 @@ function Li() {
4082
4075
  }
4083
4076
  function M(d, x) {
4084
4077
  return d.next.i !== x.i && d.prev.i !== x.i && !U(d, x) && // dones't intersect other edges
4085
- (D(d, x) && D(x, d) && Y(d, x) && // locally visible
4078
+ (B(d, x) && B(x, d) && $(d, x) && // locally visible
4086
4079
  (L(d.prev, d, x.prev) || L(d, x.prev, x)) || // does not create opposite-facing sectors
4087
4080
  E(d, x) && L(d.prev, d, d.next) > 0 && L(x.prev, x, x.next) > 0);
4088
4081
  }
@@ -4110,10 +4103,10 @@ function Li() {
4110
4103
  } while (g !== d);
4111
4104
  return !1;
4112
4105
  }
4113
- function D(d, x) {
4106
+ function B(d, x) {
4114
4107
  return L(d.prev, d, d.next) < 0 ? L(d, x, d.next) >= 0 && L(d, d.prev, x) >= 0 : L(d, x, d.prev) < 0 || L(d, d.next, x) < 0;
4115
4108
  }
4116
- function Y(d, x) {
4109
+ function $(d, x) {
4117
4110
  var g = d, w = !1, m = (d.x + x.x) / 2, b = (d.y + x.y) / 2;
4118
4111
  do
4119
4112
  g.y > b != g.next.y > b && g.next.y !== g.y && m < (g.next.x - g.x) * (b - g.y) / (g.next.y - g.y) + g.x && (w = !w), g = g.next;
@@ -4143,9 +4136,9 @@ function Li() {
4143
4136
  }
4144
4137
  var V = 0;
4145
4138
  for (P = 0; P < w.length; P += 3) {
4146
- var B = w[P] * g, X = w[P + 1] * g, H = w[P + 2] * g;
4139
+ var D = w[P] * g, X = w[P + 1] * g, H = w[P + 2] * g;
4147
4140
  V += Math.abs(
4148
- (d[B] - d[H]) * (d[X + 1] - d[B + 1]) - (d[B] - d[X]) * (d[H + 1] - d[B + 1])
4141
+ (d[D] - d[H]) * (d[X + 1] - d[D + 1]) - (d[D] - d[X]) * (d[H + 1] - d[D + 1])
4149
4142
  );
4150
4143
  }
4151
4144
  return A === 0 && V === 0 ? 0 : Math.abs((V - A) / A);
@@ -4165,68 +4158,68 @@ function Li() {
4165
4158
  }, Rt.exports;
4166
4159
  }
4167
4160
  Li();
4168
- function A0(n, t) {
4169
- return n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
4161
+ function A0(n, e) {
4162
+ return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
4170
4163
  }
4171
4164
  function Mi(n) {
4172
4165
  return n.length === 1 && (n = Ci(n)), {
4173
- left: function(t, e, o, i) {
4174
- for (o == null && (o = 0), i == null && (i = t.length); o < i; ) {
4166
+ left: function(e, t, o, i) {
4167
+ for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
4175
4168
  var a = o + i >>> 1;
4176
- n(t[a], e) < 0 ? o = a + 1 : i = a;
4169
+ n(e[a], t) < 0 ? o = a + 1 : i = a;
4177
4170
  }
4178
4171
  return o;
4179
4172
  },
4180
- right: function(t, e, o, i) {
4181
- for (o == null && (o = 0), i == null && (i = t.length); o < i; ) {
4173
+ right: function(e, t, o, i) {
4174
+ for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
4182
4175
  var a = o + i >>> 1;
4183
- n(t[a], e) > 0 ? i = a : o = a + 1;
4176
+ n(e[a], t) > 0 ? i = a : o = a + 1;
4184
4177
  }
4185
4178
  return o;
4186
4179
  }
4187
4180
  };
4188
4181
  }
4189
4182
  function Ci(n) {
4190
- return function(t, e) {
4191
- return A0(n(t), e);
4183
+ return function(e, t) {
4184
+ return A0(n(e), t);
4192
4185
  };
4193
4186
  }
4194
4187
  Mi(A0);
4195
- function Ki(n, t, e = 3) {
4196
- const o = Ai(n, t, { maxSegmentLength: e });
4188
+ function Ki(n, e, t = 3) {
4189
+ const o = Ai(n, e, { maxSegmentLength: t });
4197
4190
  return {
4198
4191
  check: (i) => typeof i == "string",
4199
4192
  interpolate: (i, a, s) => o(s)
4200
4193
  };
4201
4194
  }
4202
4195
  function Zi(n) {
4203
- const t = (o) => n.width * o, e = (o) => n.height * o;
4196
+ const e = (o) => n.width * o, t = (o) => n.height * o;
4204
4197
  return {
4205
- scaleX: t,
4206
- scaleY: e,
4207
- position: (o, i) => $({
4208
- x: t(o),
4209
- y: e(i)
4198
+ scaleX: e,
4199
+ scaleY: t,
4200
+ position: (o, i) => Y({
4201
+ x: e(o),
4202
+ y: t(i)
4210
4203
  })
4211
4204
  };
4212
4205
  }
4213
4206
  function Ji(n) {
4214
- const t = [];
4207
+ const e = [];
4215
4208
  if (n.isAllKey) {
4216
- for (let e = 0; e <= n.animations.length; e++)
4217
- t.push(e);
4218
- return t;
4209
+ for (let t = 0; t <= n.animations.length; t++)
4210
+ e.push(t);
4211
+ return e;
4219
4212
  }
4220
- return n.isStartKey && t.push(0), n.animations.forEach((e, o) => {
4221
- Array.isArray(e) ? e.some((i) => i.isKey) && t.push(o + 1) : e.isKey && t.push(o + 1);
4222
- }), n.isEndKey && t[t.length - 1] !== n.animations.length && t.push(n.animations.length), t;
4213
+ return n.isStartKey && e.push(0), n.animations.forEach((t, o) => {
4214
+ Array.isArray(t) ? t.some((i) => i.isKey) && e.push(o + 1) : t.isKey && e.push(o + 1);
4215
+ }), n.isEndKey && e[e.length - 1] !== n.animations.length && e.push(n.animations.length), e;
4223
4216
  }
4224
4217
  export {
4225
4218
  vt as Alignment,
4226
4219
  st as Anchor,
4227
4220
  ce as Animate,
4228
4221
  Ni as Arrow,
4229
- $i as BrowserCanvasRenderer,
4222
+ Yi as BrowserCanvasRenderer,
4230
4223
  Ri as Circle,
4231
4224
  G as Color,
4232
4225
  he as Easing,
@@ -4238,15 +4231,15 @@ export {
4238
4231
  be as Group,
4239
4232
  Ii as Hide,
4240
4233
  Oi as IFrame,
4241
- Di as Image,
4242
- Bi as Line,
4234
+ Bi as Image,
4235
+ Di as Line,
4243
4236
  qi as Mask,
4244
4237
  j as ObjectType,
4245
4238
  Xi as Opaque,
4246
4239
  zi as Path,
4247
4240
  Wi as Pause,
4248
4241
  ji as Polygon,
4249
- $ as Position,
4242
+ Y as Position,
4250
4243
  bn as Presentation,
4251
4244
  Vi as Rectangle,
4252
4245
  Ui as SVG,
@@ -4261,7 +4254,7 @@ export {
4261
4254
  Gi as TextUnit,
4262
4255
  K0 as Transparent,
4263
4256
  Qe as Update,
4264
- Yi as Variable,
4257
+ $i as Variable,
4265
4258
  Ji as getKeySlideBuildIndices,
4266
4259
  Zi as getSizingFunctions,
4267
4260
  Ki as getSmoothPathInterpolator,