presenter 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- var m0 = Object.defineProperty;
2
- var b0 = (n, e, t) => e in n ? m0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var k = (n, e, t) => b0(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var A0 = Object.defineProperty;
2
+ var T0 = (n, e, t) => e in n ? A0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var I = (n, e, t) => T0(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",
@@ -9,13 +9,13 @@ const dt = {
9
9
  /** Represents an immediate update to an object's properties without animation. */
10
10
  UPDATE: "Update"
11
11
  };
12
- function A0(n) {
12
+ function L0(n) {
13
13
  return n * n * n;
14
14
  }
15
- function T0(n) {
15
+ function M0(n) {
16
16
  return --n * n * n + 1;
17
17
  }
18
- function M0(n) {
18
+ function C0(n) {
19
19
  return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
20
20
  }
21
21
  var le = 1.70158;
@@ -33,7 +33,7 @@ var le = 1.70158;
33
33
  }
34
34
  return t.overshoot = n, t;
35
35
  })(le);
36
- var L0 = (function n(e) {
36
+ var S0 = (function n(e) {
37
37
  e = +e;
38
38
  function t(o) {
39
39
  return ((o *= 2) < 1 ? o * o * ((e + 1) * o - e) : (o -= 2) * o * ((e + 1) * o + e) + 2) / 2;
@@ -42,11 +42,11 @@ var L0 = (function n(e) {
42
42
  })(le);
43
43
  const he = {
44
44
  LINEAR: (n) => n,
45
- CUBIC: M0,
46
- CUBIC_IN: A0,
47
- CUBIC_OUT: T0,
48
- BACK_IN_OUT: L0.overshoot(0.8)
49
- }, C0 = he.LINEAR;
45
+ CUBIC: C0,
46
+ CUBIC_IN: L0,
47
+ CUBIC_OUT: M0,
48
+ BACK_IN_OUT: S0.overshoot(0.8)
49
+ }, P0 = he.LINEAR;
50
50
  function ce(n, e, t = {}) {
51
51
  return {
52
52
  type: dt.ANIMATE,
@@ -54,22 +54,23 @@ function ce(n, e, t = {}) {
54
54
  props: e,
55
55
  delay: 0,
56
56
  duration: 1e3,
57
- easing: C0,
57
+ easing: P0,
58
58
  block: !1,
59
59
  interpolators: null,
60
60
  isKey: !1,
61
+ notes: null,
61
62
  shortcut: null,
62
63
  ...typeof t == "number" ? { duration: t } : t
63
64
  };
64
65
  }
65
- function gi(n, e = {}) {
66
+ function bi(n, e = {}) {
66
67
  return ce(n, { opacity: 1 }, {
67
68
  duration: 500,
68
69
  easing: he.CUBIC,
69
70
  ...typeof e == "number" ? { duration: e } : e
70
71
  });
71
72
  }
72
- function pi(n, e = {}) {
73
+ function Ai(n, e = {}) {
73
74
  return ce(n, { opacity: 0 }, {
74
75
  duration: 500,
75
76
  easing: he.CUBIC,
@@ -80,19 +81,20 @@ function Ke(n, e, t = {}) {
80
81
  return {
81
82
  type: dt.UPDATE,
82
83
  isKey: !1,
84
+ notes: null,
83
85
  object: n,
84
86
  props: e,
85
87
  shortcut: null,
86
88
  ...t
87
89
  };
88
90
  }
89
- function xi(n) {
90
- return Ke(n, { opacity: 0 });
91
+ function Ti(n, e = {}) {
92
+ return Ke(n, { opacity: 0 }, e);
91
93
  }
92
- function yi(n) {
93
- return Ke(n, { opacity: 1 });
94
+ function Li(n, e = {}) {
95
+ return Ke(n, { opacity: 1 }, e);
94
96
  }
95
- const lt = {
97
+ const st = {
96
98
  TOP_LEFT: "TopLeft",
97
99
  TOP: "Top",
98
100
  TOP_RIGHT: "TopRight",
@@ -102,7 +104,7 @@ const lt = {
102
104
  BOTTOM_LEFT: "BottomLeft",
103
105
  BOTTOM: "Bottom",
104
106
  BOTTOM_RIGHT: "BottomRight"
105
- }, et = lt.TOP_LEFT;
107
+ }, et = st.TOP_LEFT;
106
108
  function G(n, e = 0, t = 0, o = 1) {
107
109
  if (typeof n == "string") {
108
110
  const i = n.replace("#", ""), a = parseInt(i, 16);
@@ -143,7 +145,7 @@ function Ze(n = null) {
143
145
  return {
144
146
  content: null,
145
147
  setup: null,
146
- anchor: lt.TOP_LEFT,
148
+ anchor: st.TOP_LEFT,
147
149
  height: 0,
148
150
  width: 0,
149
151
  x: 0,
@@ -158,7 +160,7 @@ function It(n, e = null) {
158
160
  const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(Je(n, e) * 255);
159
161
  return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
160
162
  }
161
- function vi(n = null) {
163
+ function Mi(n = null) {
162
164
  const {
163
165
  url: e = "https://wikipedia.org/",
164
166
  backgroundColor: t = G.TRANSPARENT,
@@ -183,17 +185,17 @@ function vi(n = null) {
183
185
  y: g
184
186
  });
185
187
  }
186
- const yt = {
188
+ const vt = {
187
189
  LEFT: "left",
188
190
  CENTER: "center",
189
191
  RIGHT: "right"
190
- }, S0 = yt.LEFT;
191
- function ht(n, e) {
192
+ }, E0 = vt.LEFT;
193
+ function at(n, e) {
192
194
  throw new Error("Unexpected value: " + n);
193
195
  }
194
- function wi(n = null) {
196
+ function Ci(n = null) {
195
197
  const {
196
- alignment: e = yt.LEFT,
198
+ alignment: e = vt.LEFT,
197
199
  scale: t = 1,
198
200
  anchor: o = et,
199
201
  height: i = 1e3,
@@ -204,17 +206,17 @@ function wi(n = null) {
204
206
  function l(c) {
205
207
  const u = document.createElement("video");
206
208
  switch (u.autoplay = !0, u.style.transform = `scale(${t})`, e) {
207
- case yt.LEFT:
209
+ case vt.LEFT:
208
210
  u.style.transformOrigin = "top left";
209
211
  break;
210
- case yt.CENTER:
212
+ case vt.CENTER:
211
213
  u.style.transformOrigin = "top center";
212
214
  break;
213
- case yt.RIGHT:
215
+ case vt.RIGHT:
214
216
  u.style.transformOrigin = "top right";
215
217
  break;
216
218
  default:
217
- ht(e);
219
+ at(e);
218
220
  }
219
221
  c.appendChild(u);
220
222
  const g = {
@@ -266,7 +268,7 @@ function nt(n) {
266
268
  ...n
267
269
  };
268
270
  }
269
- function mi(n = null) {
271
+ function Si(n = null) {
270
272
  const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
271
273
  return nt({
272
274
  objectType: V.ARROW,
@@ -284,8 +286,8 @@ function mi(n = null) {
284
286
  ...o
285
287
  });
286
288
  }
287
- const P0 = 50;
288
- function bi(n = null) {
289
+ const I0 = 50;
290
+ function Pi(n = null) {
289
291
  return nt({
290
292
  objectType: V.CIRCLE,
291
293
  anchor: et,
@@ -293,7 +295,7 @@ function bi(n = null) {
293
295
  strokeWidth: 0,
294
296
  drawn: 1,
295
297
  fillColor: J,
296
- radius: P0,
298
+ radius: I0,
297
299
  x: 0,
298
300
  y: 0,
299
301
  ...n
@@ -324,7 +326,7 @@ function we(n, e = null) {
324
326
  ...e
325
327
  });
326
328
  }
327
- function Ai(n) {
329
+ function Ei(n) {
328
330
  const {
329
331
  anchor: e = et,
330
332
  cols: t = 1,
@@ -339,20 +341,20 @@ function Ai(n) {
339
341
  objects: g = () => null
340
342
  } = n, h = [], f = [];
341
343
  let v = 0, y = 0;
342
- for (let L = 0; L < o; L++) {
343
- const P = [];
344
+ for (let C = 0; C < o; C++) {
345
+ const M = [];
344
346
  v = 0;
345
- let S = 0;
347
+ let L = 0;
346
348
  for (let E = 0; E < t; E++) {
347
- const M = g(L, E), I = typeof r == "function" ? r(L, E) : r, F = typeof l == "function" ? l(L, E) : l;
348
- P.push(M), M != null && f.push(
349
- we([M], {
349
+ const S = g(C, E), k = typeof r == "function" ? r(C, E) : r, F = typeof l == "function" ? l(C, E) : l;
350
+ M.push(S), S != null && f.push(
351
+ we([S], {
350
352
  x: v,
351
353
  y
352
354
  })
353
- ), v += I + i, S = Math.max(S, F);
355
+ ), v += k + i, L = Math.max(L, F);
354
356
  }
355
- h.push(P), y += S + a;
357
+ h.push(M), y += L + a;
356
358
  }
357
359
  return {
358
360
  grid: we(f, {
@@ -366,7 +368,7 @@ function Ai(n) {
366
368
  objects: h
367
369
  };
368
370
  }
369
- function Ti(n = null) {
371
+ function Ii(n = null) {
370
372
  return nt({
371
373
  objectType: V.IMAGE,
372
374
  anchor: et,
@@ -380,7 +382,7 @@ function Ti(n = null) {
380
382
  ...n
381
383
  });
382
384
  }
383
- function Mi(n = null) {
385
+ function ki(n = null) {
384
386
  return nt({
385
387
  objectType: V.LINE,
386
388
  color: J,
@@ -395,7 +397,7 @@ function Mi(n = null) {
395
397
  ...n
396
398
  });
397
399
  }
398
- function Li(n, e = null) {
400
+ function Oi(n, e = null) {
399
401
  return nt({
400
402
  objectType: V.MASK,
401
403
  anchor: et,
@@ -408,11 +410,11 @@ function Li(n, e = null) {
408
410
  ...e
409
411
  });
410
412
  }
411
- var E0 = Object.defineProperty, _ = (n, e) => E0(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 }, I0 = /([astvzqmhlc])([^astvzqmhlc]*)/gi, k0 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, O0 = _((n) => {
412
- const e = (n && n.length > 0 ? n : "M0,0").match(I0);
413
+ var k0 = Object.defineProperty, _ = (n, e) => k0(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 }, O0 = /([astvzqmhlc])([^astvzqmhlc]*)/gi, _0 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, N0 = _((n) => {
414
+ const e = (n && n.length > 0 ? n : "M0,0").match(O0);
413
415
  if (!e) throw new Error(`No path elements found in string ${n}`);
414
416
  return e.reduce((t, o) => {
415
- let i = o.charAt(0), a = i.toLowerCase(), s = _0(o.substring(1));
417
+ let i = o.charAt(0), a = i.toLowerCase(), s = R0(o.substring(1));
416
418
  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)) {
417
419
  const r = o.substring(1).trim().split(" ");
418
420
  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])];
@@ -427,27 +429,27 @@ var E0 = Object.defineProperty, _ = (n, e) => E0(n, "name", { value: e, configur
427
429
  }
428
430
  return t;
429
431
  }, []);
430
- }, "default"), _0 = _((n) => {
431
- const e = n.match(k0);
432
+ }, "default"), R0 = _((n) => {
433
+ const e = n.match(_0);
432
434
  return e ? e.map(Number) : [];
433
435
  }, "parseValues"), bt, tt = (bt = class {
434
436
  constructor(e, t, o, i) {
435
- k(this, "x0");
436
- k(this, "x1");
437
- k(this, "y0");
438
- k(this, "y1");
439
- k(this, "getTotalLength", _(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
440
- k(this, "getPointAtLength", _((e) => {
437
+ I(this, "x0");
438
+ I(this, "x1");
439
+ I(this, "y0");
440
+ I(this, "y1");
441
+ I(this, "getTotalLength", _(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
442
+ I(this, "getPointAtLength", _((e) => {
441
443
  let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
442
444
  t = Number.isNaN(t) ? 1 : t;
443
445
  const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
444
446
  return { x: this.x0 + o, y: this.y0 + i };
445
447
  }, "getPointAtLength"));
446
- k(this, "getTangentAtLength", _((e) => {
448
+ I(this, "getTangentAtLength", _((e) => {
447
449
  const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
448
450
  return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
449
451
  }, "getTangentAtLength"));
450
- k(this, "getPropertiesAtLength", _((e) => {
452
+ I(this, "getPropertiesAtLength", _((e) => {
451
453
  const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
452
454
  return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
453
455
  }, "getPropertiesAtLength"));
@@ -455,23 +457,23 @@ var E0 = Object.defineProperty, _ = (n, e) => E0(n, "name", { value: e, configur
455
457
  }
456
458
  }, _(bt, "LinearPosition"), bt), At, me = (At = class {
457
459
  constructor(e, t, o, i, a, s, r, l, c) {
458
- k(this, "x0");
459
- k(this, "y0");
460
- k(this, "rx");
461
- k(this, "ry");
462
- k(this, "xAxisRotate");
463
- k(this, "LargeArcFlag");
464
- k(this, "SweepFlag");
465
- k(this, "x1");
466
- k(this, "y1");
467
- k(this, "length");
468
- k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
469
- k(this, "getPointAtLength", _((e) => {
460
+ I(this, "x0");
461
+ I(this, "y0");
462
+ I(this, "rx");
463
+ I(this, "ry");
464
+ I(this, "xAxisRotate");
465
+ I(this, "LargeArcFlag");
466
+ I(this, "SweepFlag");
467
+ I(this, "x1");
468
+ I(this, "y1");
469
+ I(this, "length");
470
+ I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
471
+ I(this, "getPointAtLength", _((e) => {
470
472
  e < 0 ? e = 0 : e > this.length && (e = this.length);
471
473
  const t = be({ 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);
472
474
  return { x: t.x, y: t.y };
473
475
  }, "getPointAtLength"));
474
- k(this, "getTangentAtLength", _((e) => {
476
+ I(this, "getTangentAtLength", _((e) => {
475
477
  e < 0 ? e = 0 : e > this.length && (e = this.length);
476
478
  const t = 0.05, o = this.getPointAtLength(e);
477
479
  let i;
@@ -479,56 +481,56 @@ var E0 = Object.defineProperty, _ = (n, e) => E0(n, "name", { value: e, configur
479
481
  const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
480
482
  return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
481
483
  }, "getTangentAtLength"));
482
- k(this, "getPropertiesAtLength", _((e) => {
484
+ I(this, "getPropertiesAtLength", _((e) => {
483
485
  const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
484
486
  return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
485
487
  }, "getPropertiesAtLength"));
486
488
  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;
487
- const u = N0(300, function(g) {
489
+ const u = F0(300, function(g) {
488
490
  return be({ x: e, y: t }, o, i, a, s, r, { x: l, y: c }, g);
489
491
  });
490
492
  this.length = u.arcLength;
491
493
  }
492
494
  }, _(At, "Arc"), At), be = _((n, e, t, o, i, a, s, r) => {
493
- e = Math.abs(e), t = Math.abs(t), o = R0(o, 360);
494
- const l = F0(o);
495
+ e = Math.abs(e), t = Math.abs(t), o = B0(o, 360);
496
+ const l = D0(o);
495
497
  if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
496
498
  if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
497
499
  const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, g = { x: Math.cos(l) * c + Math.sin(l) * u, y: -Math.sin(l) * c + Math.cos(l) * u }, h = Math.pow(g.x, 2) / Math.pow(e, 2) + Math.pow(g.y, 2) / Math.pow(t, 2);
498
500
  h > 1 && (e = Math.sqrt(h) * e, t = Math.sqrt(h) * t);
499
501
  let f = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(g.y, 2) - Math.pow(t, 2) * Math.pow(g.x, 2)) / (Math.pow(e, 2) * Math.pow(g.y, 2) + Math.pow(t, 2) * Math.pow(g.x, 2));
500
502
  f = f < 0 ? 0 : f;
501
- const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * g.y / t), T = v * (-t * g.x / e), L = { 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 }, P = { x: (g.x - y) / e, y: (g.y - T) / t }, S = Te({ x: 1, y: 0 }, P);
502
- let E = Te(P, { x: (-g.x - y) / e, y: (-g.y - T) / t });
503
+ const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * g.y / t), T = v * (-t * g.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: (g.x - y) / e, y: (g.y - T) / t }, L = Te({ x: 1, y: 0 }, M);
504
+ let E = Te(M, { x: (-g.x - y) / e, y: (-g.y - T) / t });
503
505
  !a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
504
- const M = S + E * r, I = e * Math.cos(M), F = t * Math.sin(M);
505
- return { x: Math.cos(l) * I - Math.sin(l) * F + L.x, y: Math.sin(l) * I + Math.cos(l) * F + L.y, ellipticalArcStartAngle: S, ellipticalArcEndAngle: S + E, ellipticalArcAngle: M, ellipticalArcCenter: L, resultantRx: e, resultantRy: t };
506
- }, "pointOnEllipticalArc"), N0 = _((n, e) => {
506
+ const S = L + E * r, k = e * Math.cos(S), F = t * Math.sin(S);
507
+ 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 };
508
+ }, "pointOnEllipticalArc"), F0 = _((n, e) => {
507
509
  n = n ?? 500;
508
510
  let t = 0;
509
511
  const o = [], i = [];
510
512
  let a, s = e(0);
511
513
  for (let r = 0; r < n; r++) {
512
- const l = B0(r * (1 / n), 0, 1);
514
+ const l = q0(r * (1 / n), 0, 1);
513
515
  a = e(l), t += Ae(s, a), i.push([s, a]), o.push({ t: l, arcLength: t }), s = a;
514
516
  }
515
517
  return a = e(1), i.push([s, a]), t += Ae(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
516
- }, "approximateArcLengthOfCurve"), R0 = _((n, e) => (n % e + e) % e, "mod"), F0 = _((n) => n * (Math.PI / 180), "toRadians"), Ae = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), B0 = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), Te = _((n, e) => {
518
+ }, "approximateArcLengthOfCurve"), B0 = _((n, e) => (n % e + e) % e, "mod"), D0 = _((n) => n * (Math.PI / 180), "toRadians"), Ae = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), q0 = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), Te = _((n, e) => {
517
519
  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)));
518
520
  return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
519
- }, "angleBetween"), D0 = [[], [], [-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]], q0 = [[], [], [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]], z0 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], V0 = _((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"), j0 = _((n, e, t) => Qe([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"), H0 = _((n, e, t) => {
521
+ }, "angleBetween"), z0 = [[], [], [-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]], j0 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], H0 = _((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"), U0 = _((n, e, t) => Qe([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) => {
520
522
  let o, i;
521
523
  const a = t / 2;
522
524
  o = 0;
523
- for (let s = 0; s < 20; s++) i = a * D0[20][s] + a, o += q0[20][s] * t0(n, e, i);
525
+ for (let s = 0; s < 20; s++) i = a * z0[20][s] + a, o += V0[20][s] * t0(n, e, i);
524
526
  return a * o;
525
- }, "getCubicArcLength"), Qe = _((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"), U0 = _((n, e, t) => {
527
+ }, "getCubicArcLength"), Qe = _((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"), $0 = _((n, e, t) => {
526
528
  t === void 0 && (t = 1);
527
529
  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;
528
530
  if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
529
531
  const u = l / (2 * r), g = t + u, h = c / r - u * u, f = g * g + h > 0 ? Math.sqrt(g * g + h) : 0, v = u * u + h > 0 ? Math.sqrt(u * u + h) : 0, y = u + Math.sqrt(u * u + h) !== 0 && (g + f) / (u + v) !== 0 ? h * Math.log(Math.abs((g + f) / (u + v))) : 0;
530
532
  return Math.sqrt(r) / 2 * (g * f - u * v + y);
531
- }, "getQuadraticArcLength"), $0 = _((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");
533
+ }, "getQuadraticArcLength"), W0 = _((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");
532
534
  function t0(n, e, t) {
533
535
  const o = te(1, t, n), i = te(1, t, e), a = o * o + i * i;
534
536
  return Math.sqrt(a);
@@ -540,13 +542,13 @@ var te = _((n, e, t) => {
540
542
  if (o === 0) return 0;
541
543
  if (n === 0) {
542
544
  a = 0;
543
- for (let s = 0; s <= o; s++) a += z0[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
545
+ for (let s = 0; s <= o; s++) a += j0[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
544
546
  return a;
545
547
  }
546
548
  i = new Array(o);
547
549
  for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
548
550
  return te(n - 1, e, i);
549
- }, "getDerivative"), Vt = _((n, e, t) => {
551
+ }, "getDerivative"), jt = _((n, e, t) => {
550
552
  let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
551
553
  for (; o > 1e-3; ) {
552
554
  const r = t(i + a), l = Math.abs(n - r) / e;
@@ -558,69 +560,69 @@ var te = _((n, e, t) => {
558
560
  if (s++, s > 500) break;
559
561
  }
560
562
  return i;
561
- }, "t2length"), Tt, ct = (Tt = class {
563
+ }, "t2length"), Tt, ht = (Tt = class {
562
564
  constructor(e, t, o, i, a, s, r, l) {
563
- k(this, "a");
564
- k(this, "b");
565
- k(this, "c");
566
- k(this, "d");
567
- k(this, "length");
568
- k(this, "getArcLength");
569
- k(this, "getPoint");
570
- k(this, "getDerivative");
571
- k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
572
- k(this, "getPointAtLength", _((e) => {
573
- 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));
565
+ I(this, "a");
566
+ I(this, "b");
567
+ I(this, "c");
568
+ I(this, "d");
569
+ I(this, "length");
570
+ I(this, "getArcLength");
571
+ I(this, "getPoint");
572
+ I(this, "getDerivative");
573
+ I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
574
+ I(this, "getPointAtLength", _((e) => {
575
+ 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 = jt(e, this.length, (a) => this.getArcLength(t, o, a));
574
576
  return this.getPoint(t, o, i);
575
577
  }, "getPointAtLength"));
576
- k(this, "getTangentAtLength", _((e) => {
577
- 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);
578
+ I(this, "getTangentAtLength", _((e) => {
579
+ 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 = jt(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);
578
580
  let r;
579
581
  return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
580
582
  }, "getTangentAtLength"));
581
- k(this, "getPropertiesAtLength", _((e) => {
582
- 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);
583
+ I(this, "getPropertiesAtLength", _((e) => {
584
+ 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 = jt(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);
583
585
  let r;
584
586
  r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
585
587
  const l = this.getPoint(t, o, i);
586
588
  return { x: l.x, y: l.y, tangentX: r.x, tangentY: r.y };
587
589
  }, "getPropertiesAtLength"));
588
- k(this, "getC", _(() => this.c, "getC"));
589
- k(this, "getD", _(() => this.d, "getD"));
590
- 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 = H0, this.getPoint = V0, this.getDerivative = j0, this.d = { x: r, y: l }) : (this.getArcLength = U0, this.getPoint = Qe, this.getDerivative = $0, 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);
590
+ I(this, "getC", _(() => this.c, "getC"));
591
+ I(this, "getD", _(() => this.d, "getD"));
592
+ 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 = H0, this.getDerivative = U0, this.d = { x: r, y: l }) : (this.getArcLength = $0, this.getPoint = Qe, this.getDerivative = W0, 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);
591
593
  }
592
- }, _(Tt, "Bezier"), Tt), Mt, W0 = (Mt = class {
594
+ }, _(Tt, "Bezier"), Tt), Lt, G0 = (Lt = class {
593
595
  constructor(e) {
594
- k(this, "length", 0);
595
- k(this, "partial_lengths", []);
596
- k(this, "functions", []);
597
- k(this, "initial_point", null);
598
- k(this, "getPartAtLength", _((e) => {
596
+ I(this, "length", 0);
597
+ I(this, "partial_lengths", []);
598
+ I(this, "functions", []);
599
+ I(this, "initial_point", null);
600
+ I(this, "getPartAtLength", _((e) => {
599
601
  e < 0 ? e = 0 : e > this.length && (e = this.length);
600
602
  let t = this.partial_lengths.length - 1;
601
603
  for (; this.partial_lengths[t] >= e && t > 0; ) t--;
602
604
  return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
603
605
  }, "getPartAtLength"));
604
- k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
605
- k(this, "getPointAtLength", _((e) => {
606
+ I(this, "getTotalLength", _(() => this.length, "getTotalLength"));
607
+ I(this, "getPointAtLength", _((e) => {
606
608
  const t = this.getPartAtLength(e), o = this.functions[t.i];
607
609
  if (o) return o.getPointAtLength(t.fraction);
608
610
  if (this.initial_point) return this.initial_point;
609
611
  throw new Error("Wrong function at this part.");
610
612
  }, "getPointAtLength"));
611
- k(this, "getTangentAtLength", _((e) => {
613
+ I(this, "getTangentAtLength", _((e) => {
612
614
  const t = this.getPartAtLength(e), o = this.functions[t.i];
613
615
  if (o) return o.getTangentAtLength(t.fraction);
614
616
  if (this.initial_point) return { x: 0, y: 0 };
615
617
  throw new Error("Wrong function at this part.");
616
618
  }, "getTangentAtLength"));
617
- k(this, "getPropertiesAtLength", _((e) => {
619
+ I(this, "getPropertiesAtLength", _((e) => {
618
620
  const t = this.getPartAtLength(e), o = this.functions[t.i];
619
621
  if (o) return o.getPropertiesAtLength(t.fraction);
620
622
  if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
621
623
  throw new Error("Wrong function at this part.");
622
624
  }, "getPropertiesAtLength"));
623
- k(this, "getParts", _(() => {
625
+ I(this, "getParts", _(() => {
624
626
  const e = [];
625
627
  for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
626
628
  this.functions[t] = this.functions[t];
@@ -629,7 +631,7 @@ var te = _((n, e, t) => {
629
631
  }
630
632
  return e;
631
633
  }, "getParts"));
632
- const t = Array.isArray(e) ? e : O0(e);
634
+ const t = Array.isArray(e) ? e : N0(e);
633
635
  let o, i = [0, 0], a = [0, 0], s = [0, 0];
634
636
  for (let r = 0; r < t.length; r++) {
635
637
  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] });
@@ -641,46 +643,46 @@ var te = _((n, e, t) => {
641
643
  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];
642
644
  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];
643
645
  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]];
644
- else if (t[r][0] === "C") o = new ct(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);
645
- else if (t[r][0] === "c") o = new ct(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]));
646
+ 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);
647
+ 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]));
646
648
  else if (t[r][0] === "S") {
647
649
  if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
648
650
  if (o) {
649
651
  const l = o.getC();
650
- o = new ct(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]);
652
+ 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]);
651
653
  }
652
- } else o = new ct(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
654
+ } else o = new ht(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
653
655
  o && (this.length += o.getTotalLength(), i = [t[r][3], t[r][4]], this.functions.push(o));
654
656
  } else if (t[r][0] === "s") {
655
657
  if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
656
658
  if (o) {
657
659
  const l = o.getC(), c = o.getD();
658
- o = new ct(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]);
660
+ 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]);
659
661
  }
660
- } else o = new ct(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]);
662
+ } 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]);
661
663
  o && (this.length += o.getTotalLength(), i = [t[r][3] + i[0], t[r][4] + i[1]], this.functions.push(o));
662
664
  } else if (t[r][0] === "Q") {
663
665
  if (i[0] === t[r][1] && i[1] === t[r][2]) {
664
666
  const l = new tt(t[r][1], t[r][3], t[r][2], t[r][4]);
665
667
  this.length += l.getTotalLength(), this.functions.push(l);
666
- } else o = new ct(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);
668
+ } 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);
667
669
  i = [t[r][3], t[r][4]], a = [t[r][1], t[r][2]];
668
670
  } else if (t[r][0] === "q") {
669
- if (t[r][1] !== 0 || t[r][2] !== 0) o = new ct(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);
671
+ 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);
670
672
  else {
671
673
  const l = new tt(i[0] + t[r][1], i[0] + t[r][3], i[1] + t[r][2], i[1] + t[r][4]);
672
674
  this.length += l.getTotalLength(), this.functions.push(l);
673
675
  }
674
676
  a = [i[0] + t[r][1], i[1] + t[r][2]], i = [t[r][3] + i[0], t[r][4] + i[1]];
675
677
  } else if (t[r][0] === "T") {
676
- if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ct(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();
678
+ 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();
677
679
  else {
678
680
  const l = new tt(i[0], t[r][1], i[1], t[r][2]);
679
681
  this.functions.push(l), this.length += l.getTotalLength();
680
682
  }
681
683
  a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1], t[r][2]];
682
684
  } else if (t[r][0] === "t") {
683
- if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ct(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);
685
+ 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);
684
686
  else {
685
687
  const l = new tt(i[0], i[0] + t[r][1], i[1], i[1] + t[r][2]);
686
688
  this.length += l.getTotalLength(), this.functions.push(l);
@@ -696,28 +698,28 @@ var te = _((n, e, t) => {
696
698
  this.partial_lengths.push(this.length);
697
699
  }
698
700
  }
699
- }, _(Mt, "SVGPathProperties"), Mt), Lt, ee = (Lt = class {
701
+ }, _(Lt, "SVGPathProperties"), Lt), Mt, ee = (Mt = class {
700
702
  constructor(e) {
701
- k(this, "inst");
702
- k(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
703
- k(this, "getPointAtLength", _((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
704
- k(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
705
- k(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
706
- k(this, "getParts", _(() => this.inst.getParts(), "getParts"));
707
- if (this.inst = new W0(e), !(this instanceof ee)) return new ee(e);
703
+ I(this, "inst");
704
+ I(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
705
+ I(this, "getPointAtLength", _((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
706
+ I(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
707
+ I(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
708
+ I(this, "getParts", _(() => this.inst.getParts(), "getParts"));
709
+ if (this.inst = new G0(e), !(this instanceof ee)) return new ee(e);
708
710
  }
709
- }, _(Lt, "_svgPathProperties"), Lt);
710
- function Y0(n = G.BLACK) {
711
+ }, _(Mt, "_svgPathProperties"), Mt);
712
+ function X0(n = G.BLACK) {
711
713
  return { ...n, alpha: 0 };
712
714
  }
713
- function Ci(n = null) {
715
+ function _i(n = null) {
714
716
  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();
715
717
  return nt({
716
718
  objectType: V.PATH,
717
719
  anchor: et,
718
720
  strokeColor: J,
719
721
  drawn: 1,
720
- fillColor: Y0(),
722
+ fillColor: X0(),
721
723
  isRounded: !1,
722
724
  height: t,
723
725
  path: r,
@@ -731,7 +733,7 @@ function Ci(n = null) {
731
733
  ...s
732
734
  });
733
735
  }
734
- function Si(n = null) {
736
+ function Ni(n = null) {
735
737
  return nt({
736
738
  objectType: V.POLYGON,
737
739
  strokeColor: J,
@@ -746,7 +748,7 @@ function Si(n = null) {
746
748
  ...n
747
749
  });
748
750
  }
749
- function Pi(n = null) {
751
+ function Ri(n = null) {
750
752
  return nt({
751
753
  objectType: V.RECTANGLE,
752
754
  anchor: et,
@@ -762,7 +764,7 @@ function Pi(n = null) {
762
764
  ...n
763
765
  });
764
766
  }
765
- function Ei(n = null) {
767
+ function Fi(n = null) {
766
768
  return nt({
767
769
  objectType: V.SPOTLIGHT,
768
770
  anchor: et,
@@ -775,7 +777,7 @@ function Ei(n = null) {
775
777
  ...n
776
778
  });
777
779
  }
778
- function Ii(n = null) {
780
+ function Bi(n = null) {
779
781
  return nt({
780
782
  objectType: V.SVG,
781
783
  anchor: et,
@@ -787,11 +789,11 @@ function Ii(n = null) {
787
789
  ...n
788
790
  });
789
791
  }
790
- const G0 = {
792
+ const K0 = {
791
793
  NORMAL: "normal",
792
794
  ITALIC: "italic",
793
795
  OBLIQUE: "oblique"
794
- }, X0 = G0.NORMAL, K0 = {
796
+ }, Z0 = K0.NORMAL, J0 = {
795
797
  THIN: 100,
796
798
  EXTRA_LIGHT: 200,
797
799
  LIGHT: 300,
@@ -801,12 +803,12 @@ const G0 = {
801
803
  BOLD: 700,
802
804
  EXTRA_BOLD: 800,
803
805
  BLACK: 900
804
- }, Z0 = K0.NORMAL, J0 = {
806
+ }, Q0 = J0.NORMAL, tn = {
805
807
  color: J,
806
808
  fontFamily: "sans-serif",
807
809
  fontSize: 100,
808
- fontStyle: X0,
809
- fontWeight: Z0,
810
+ fontStyle: Z0,
811
+ fontWeight: Q0,
810
812
  ligatures: !1,
811
813
  subscript: !1,
812
814
  superscript: !1
@@ -814,48 +816,49 @@ const G0 = {
814
816
  function e0(n) {
815
817
  return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
816
818
  }
817
- function Q0(n) {
819
+ function en(n) {
818
820
  return e0(n).reduce(
819
821
  (t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
820
822
  0
821
823
  );
822
824
  }
823
- function tn(n = "", e = null) {
825
+ function nn(n = "", e = null) {
824
826
  return nt({
825
827
  objectType: V.TEXT,
826
- alignment: S0,
828
+ alignment: E0,
827
829
  anchor: et,
828
830
  length: null,
829
831
  lineSpacing: 1,
830
832
  text: n,
831
833
  x: 0,
832
834
  y: 0,
833
- ...J0,
835
+ ...tn,
834
836
  ...e
835
837
  });
836
838
  }
837
- tn.writeOn = (n, e = {}) => ce(
839
+ nn.writeOn = (n, e = {}) => ce(
838
840
  n,
839
841
  {
840
- length: Q0(n.text)
842
+ length: en(n.text)
841
843
  },
842
844
  e
843
845
  );
844
- const ue = "presenter.navigator.state", mt = {
846
+ const ue = "presenter.navigator.state", xt = {
845
847
  open: !1,
846
848
  visibility: {
847
849
  slides: !0,
848
850
  current: !0,
849
- next: !0
851
+ next: !0,
852
+ notes: !1
850
853
  }
851
854
  };
852
855
  function fe() {
853
856
  return typeof document > "u" ? !1 : Array.from(document.scripts).some((n) => n.src.includes("/@vite/client"));
854
857
  }
855
- function en() {
858
+ function rn() {
856
859
  return fe() ? de().open : !1;
857
860
  }
858
- function nn() {
861
+ function on() {
859
862
  i0({
860
863
  ...de(),
861
864
  open: !0
@@ -866,24 +869,25 @@ function n0() {
866
869
  (n = ge()) == null || n.removeItem(ue);
867
870
  }
868
871
  function de() {
869
- var n, e, t, o;
872
+ var n, e, t, o, i;
870
873
  if (!fe())
871
- return mt;
874
+ return xt;
872
875
  try {
873
- const i = (n = ge()) == null ? void 0 : n.getItem(ue);
874
- if (i == null)
875
- return mt;
876
- const a = JSON.parse(i);
876
+ const a = (n = ge()) == null ? void 0 : n.getItem(ue);
877
+ if (a == null)
878
+ return xt;
879
+ const s = JSON.parse(a);
877
880
  return {
878
- open: typeof a.open == "boolean" ? a.open : mt.open,
881
+ open: typeof s.open == "boolean" ? s.open : xt.open,
879
882
  visibility: {
880
- slides: typeof ((e = a.visibility) == null ? void 0 : e.slides) == "boolean" ? a.visibility.slides : mt.visibility.slides,
881
- current: typeof ((t = a.visibility) == null ? void 0 : t.current) == "boolean" ? a.visibility.current : mt.visibility.current,
882
- next: typeof ((o = a.visibility) == null ? void 0 : o.next) == "boolean" ? a.visibility.next : mt.visibility.next
883
+ slides: typeof ((e = s.visibility) == null ? void 0 : e.slides) == "boolean" ? s.visibility.slides : xt.visibility.slides,
884
+ current: typeof ((t = s.visibility) == null ? void 0 : t.current) == "boolean" ? s.visibility.current : xt.visibility.current,
885
+ next: typeof ((o = s.visibility) == null ? void 0 : o.next) == "boolean" ? s.visibility.next : xt.visibility.next,
886
+ notes: typeof ((i = s.visibility) == null ? void 0 : i.notes) == "boolean" ? s.visibility.notes : xt.visibility.notes
883
887
  }
884
888
  };
885
889
  } catch {
886
- return mt;
890
+ return xt;
887
891
  }
888
892
  }
889
893
  function i0(n) {
@@ -897,17 +901,31 @@ function ge() {
897
901
  return null;
898
902
  }
899
903
  }
904
+ function sn(n = null) {
905
+ return {
906
+ objects: [],
907
+ animations: [],
908
+ extras: [],
909
+ isAllKey: !1,
910
+ isEndKey: !0,
911
+ isStartKey: !1,
912
+ notes: null,
913
+ shortcut: null,
914
+ title: "",
915
+ ...n
916
+ };
917
+ }
900
918
  function r0(n) {
901
919
  return n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
902
920
  }
903
- function Me(n) {
921
+ function Le(n) {
904
922
  var o, i;
905
923
  if (n === null)
906
924
  return !1;
907
925
  const e = n, t = (o = e.tagName) == null ? void 0 : o.toLowerCase();
908
926
  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;
909
927
  }
910
- function rn(n) {
928
+ function an(n) {
911
929
  var o;
912
930
  const { slides: e } = n, t = {
913
931
  // First build of first slide
@@ -925,20 +943,20 @@ function rn(n) {
925
943
  if (a === void 0)
926
944
  continue;
927
945
  const s = a.shortcut;
928
- jt(t, s, i, 0);
946
+ Ht(t, s, i, 0);
929
947
  for (let r = 0; r < a.animations.length; r++) {
930
948
  const l = a.animations[r];
931
949
  if (l !== void 0)
932
950
  if (Array.isArray(l))
933
951
  for (const c of l)
934
- jt(t, c.shortcut, i, r + 1);
952
+ Ht(t, c.shortcut, i, r + 1);
935
953
  else
936
- jt(t, l.shortcut, i, r + 1);
954
+ Ht(t, l.shortcut, i, r + 1);
937
955
  }
938
956
  }
939
957
  return t;
940
958
  }
941
- function jt(n, e, t, o) {
959
+ function Ht(n, e, t, o) {
942
960
  if (e !== null)
943
961
  if (Array.isArray(e))
944
962
  for (const i of e)
@@ -946,17 +964,17 @@ function jt(n, e, t, o) {
946
964
  else
947
965
  n[e] = { slideIndex: t, buildIndex: o };
948
966
  }
949
- function Le(n, e) {
967
+ function Me(n, e) {
950
968
  const t = n[e];
951
969
  return t !== void 0 ? t : isNaN(Number(e)) ? null : { slideIndex: Number(e) - 1, buildIndex: 0 };
952
970
  }
953
971
  function o0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: l = e, signal: c } = {}) {
954
- t.shortcuts = rn(n);
972
+ t.shortcuts = an(n);
955
973
  const u = c === void 0 ? void 0 : { signal: c };
956
974
  r && (e.hasAttribute("tabindex") || (e.tabIndex = -1), e.addEventListener(
957
975
  "pointerdown",
958
976
  (g) => {
959
- Me(g.target) || e.focus({ preventScroll: !0 });
977
+ Le(g.target) || e.focus({ preventScroll: !0 });
960
978
  },
961
979
  u
962
980
  )), e.addEventListener(
@@ -969,7 +987,7 @@ function o0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
969
987
  "keyup",
970
988
  (g) => {
971
989
  const h = g;
972
- if (Me(h.target))
990
+ if (Le(h.target))
973
991
  return;
974
992
  if (h.code === "Escape") {
975
993
  t.textCommand = null;
@@ -983,9 +1001,9 @@ function o0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
983
1001
  i(h.shiftKey);
984
1002
  return;
985
1003
  }
986
- const f = on(h);
1004
+ const f = ln(h);
987
1005
  if (f !== null) {
988
- const v = Le(
1006
+ const v = Me(
989
1007
  t.shortcuts,
990
1008
  f
991
1009
  );
@@ -996,7 +1014,7 @@ function o0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
996
1014
  if (h.code === "Enter") {
997
1015
  const v = t.textCommand;
998
1016
  t.textCommand = null;
999
- const y = Le(
1017
+ const y = Me(
1000
1018
  t.shortcuts,
1001
1019
  v
1002
1020
  );
@@ -1017,10 +1035,32 @@ function o0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
1017
1035
  u
1018
1036
  );
1019
1037
  }
1020
- function on(n) {
1038
+ function ln(n) {
1021
1039
  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;
1022
1040
  }
1023
- let R = null, Rt = null, vt = null;
1041
+ function hn(n, e) {
1042
+ for (let t = Math.min(e, n.animations.length); t >= 0; t--) {
1043
+ const o = cn(n, t);
1044
+ if (o !== null)
1045
+ return o;
1046
+ }
1047
+ return null;
1048
+ }
1049
+ function cn(n, e) {
1050
+ if (e === 0)
1051
+ return n.notes;
1052
+ const t = n.animations[e - 1];
1053
+ return t === void 0 ? null : un(t);
1054
+ }
1055
+ function un(n) {
1056
+ if (!Array.isArray(n))
1057
+ return n.notes;
1058
+ const e = n.map(({ notes: t }) => t).filter((t) => t !== null);
1059
+ return e.length > 0 ? e.join(`
1060
+
1061
+ `) : null;
1062
+ }
1063
+ let N = null, Ft = null, wt = null;
1024
1064
  const Ce = "__presenterNavigatorInstanceId";
1025
1065
  let s0 = {
1026
1066
  width: 700,
@@ -1028,7 +1068,7 @@ let s0 = {
1028
1068
  left: 20,
1029
1069
  top: 50
1030
1070
  };
1031
- function sn({
1071
+ function fn({
1032
1072
  presentation: n,
1033
1073
  shortcutState: e,
1034
1074
  onNavigateToSlide: t,
@@ -1037,20 +1077,20 @@ function sn({
1037
1077
  onPrevious: a,
1038
1078
  forceRefresh: s = !1
1039
1079
  }) {
1040
- if (R !== null && !R.closed && (Ft(R), !s))
1041
- return R.focus(), Rt;
1042
- if ((R === null || R.closed) && (R = window.open("", "Navigator", cn())), R === null)
1080
+ if (N !== null && !N.closed && (Bt(N), !s))
1081
+ return N.focus(), Ft;
1082
+ if ((N === null || N.closed) && (N = window.open("", "Navigator", yn())), N === null)
1043
1083
  return console.error("Failed to open navigator window."), null;
1044
- vt == null || vt();
1045
- const r = un(R), l = new AbortController();
1046
- vt = () => l.abort();
1047
- const c = an(
1084
+ wt == null || wt();
1085
+ const r = vn(N), l = new AbortController();
1086
+ wt = () => l.abort();
1087
+ const c = dn(
1048
1088
  n,
1049
1089
  t,
1050
1090
  i,
1051
1091
  r.isActive
1052
1092
  );
1053
- return Rt = c, nn(), R.document.title = n.title, R.document.body.replaceChildren(c.element), o0(
1093
+ return Ft = c, on(), N.document.title = n.title, N.document.body.replaceChildren(c.element), o0(
1054
1094
  n,
1055
1095
  c.element,
1056
1096
  e,
@@ -1069,20 +1109,20 @@ function sn({
1069
1109
  }
1070
1110
  },
1071
1111
  {
1072
- keyEventTarget: R,
1112
+ keyEventTarget: N,
1073
1113
  signal: l.signal
1074
1114
  }
1075
- ), R.addEventListener("resize", () => Ft(R), {
1115
+ ), N.addEventListener("resize", () => Bt(N), {
1076
1116
  signal: l.signal
1077
- }), R.addEventListener(
1117
+ }), N.addEventListener(
1078
1118
  "beforeunload",
1079
1119
  () => {
1080
- Ft(R), n0();
1120
+ Bt(N), n0();
1081
1121
  },
1082
1122
  {
1083
1123
  signal: l.signal
1084
1124
  }
1085
- ), R.addEventListener(
1125
+ ), N.addEventListener(
1086
1126
  "keyup",
1087
1127
  (u) => {
1088
1128
  r.isActive() && (u.key === "Escape" || u.key === "`" && !r0(u)) && ne();
@@ -1090,10 +1130,10 @@ function sn({
1090
1130
  {
1091
1131
  signal: l.signal
1092
1132
  }
1093
- ), Rt;
1133
+ ), Ft;
1094
1134
  }
1095
- function an(n, e, t, o = () => !0) {
1096
- const i = (R == null ? void 0 : R.document) ?? document, a = i.createElement("div");
1135
+ function dn(n, e, t, o = () => !0) {
1136
+ const i = (N == null ? void 0 : N.document) ?? document, a = i.createElement("div");
1097
1137
  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";
1098
1138
  const s = i.createElement("div");
1099
1139
  s.style.display = "flex", s.style.flexDirection = "column", s.style.gap = "8px", s.style.minHeight = "0", s.style.overflowY = "auto", s.style.paddingRight = "4px";
@@ -1103,50 +1143,55 @@ function an(n, e, t, o = () => !0) {
1103
1143
  l.style.display = "flex", l.style.gap = "14px", l.style.alignItems = "center", l.style.flexWrap = "wrap", l.style.fontSize = "13px", l.style.color = "#4b5563";
1104
1144
  const c = i.createElement("div");
1105
1145
  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";
1106
- const u = Se("Current", n), g = Se("Next", n), h = de();
1146
+ const u = Se("Current", n), g = Se("Next", n), h = gn(), f = de();
1107
1147
  g.container.style.cursor = "pointer", g.container.addEventListener("click", () => {
1108
1148
  o() && t();
1109
1149
  });
1110
- const f = n.slides.map((E, M) => {
1111
- const I = ln(E, M);
1112
- return I.style.cursor = "pointer", I.addEventListener("click", (F) => {
1113
- o() && (F.shiftKey && ne(), e(M));
1114
- }), s.appendChild(I), I;
1115
- }), v = Ht("Slides", s, h.visibility.slides), y = Ht(
1150
+ const v = n.slides.map((k, F) => {
1151
+ const U = pn(k, F);
1152
+ return U.style.cursor = "pointer", U.addEventListener("click", (B) => {
1153
+ o() && (B.shiftKey && ne(), e(F));
1154
+ }), s.appendChild(U), U;
1155
+ }), y = Nt("Slides", s, f.visibility.slides), T = Nt(
1116
1156
  "Current",
1117
1157
  u.container,
1118
- h.visibility.current
1119
- ), T = Ht(
1158
+ f.visibility.current
1159
+ ), C = Nt(
1120
1160
  "Next",
1121
1161
  g.container,
1122
- h.visibility.next
1162
+ f.visibility.next
1163
+ ), M = Nt(
1164
+ "Notes",
1165
+ h.container,
1166
+ f.visibility.notes
1123
1167
  ), L = () => {
1124
- const E = y.input.checked && T.input.checked && S();
1125
- a.style.gridTemplateColumns = v.input.checked ? "260px 1fr" : "1fr", c.style.flexDirection = E ? "column" : "row", u.container.style.flex = "1 1 0", g.container.style.flex = "1 1 0", requestAnimationFrame(() => {
1168
+ const k = T.input.checked && C.input.checked && S();
1169
+ a.style.gridTemplateColumns = y.input.checked ? "260px 1fr" : "1fr", c.style.flexDirection = k ? "column" : "row", u.container.style.flex = "1 1 0", g.container.style.flex = "1 1 0", requestAnimationFrame(() => {
1126
1170
  u.resize(), g.resize();
1127
1171
  }), i0({
1128
- ...h,
1172
+ ...f,
1129
1173
  open: !0,
1130
1174
  visibility: {
1131
- slides: v.input.checked,
1132
- current: y.input.checked,
1133
- next: T.input.checked
1175
+ slides: y.input.checked,
1176
+ current: T.input.checked,
1177
+ next: C.input.checked,
1178
+ notes: M.input.checked
1134
1179
  }
1135
1180
  });
1136
1181
  };
1137
- v.input.addEventListener("change", L), y.input.addEventListener("change", L), T.input.addEventListener("change", L), R == null || R.addEventListener("resize", L), l.appendChild(v.element), l.appendChild(y.element), l.appendChild(T.element), c.appendChild(u.container), c.appendChild(g.container), r.appendChild(l), r.appendChild(c), a.appendChild(s), a.appendChild(r);
1138
- function P(E, M, I, F) {
1139
- o() && (f.forEach((Y, z) => {
1140
- const U = z === E;
1141
- Y.style.backgroundColor = U ? "#dbeafe" : "#ffffff", Y.style.borderColor = U ? "#60a5fa" : "#e5e7eb", Y.style.color = U ? "#1e3a8a" : "#1f2937";
1142
- }), u.label.textContent = Pe(n, E, M), g.label.textContent = Pe(n, I, F), hn(f[E], s), L());
1182
+ 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(g.container), r.appendChild(l), r.appendChild(c), r.appendChild(h.container), a.appendChild(s), a.appendChild(r);
1183
+ function E(k, F, U, B) {
1184
+ o() && (v.forEach((Y, lt) => {
1185
+ const Q = lt === k;
1186
+ Y.style.backgroundColor = Q ? "#dbeafe" : "#ffffff", Y.style.borderColor = Q ? "#60a5fa" : "#e5e7eb", Y.style.color = Q ? "#1e3a8a" : "#1f2937";
1187
+ }), u.label.textContent = Pe(n, k, F), g.label.textContent = Pe(n, U, B), h.content.textContent = hn(n.slides[k] ?? sn(), F) ?? "", xn(v[k], s), L());
1143
1188
  }
1144
1189
  function S() {
1145
- const E = R;
1146
- if (E === null)
1190
+ const k = N;
1191
+ if (k === null)
1147
1192
  return !1;
1148
- const M = v.input.checked ? 278 : 0, I = E.innerWidth - 36 - M, F = E.innerHeight - 36 - l.offsetHeight - 14;
1149
- return I <= 0 || F <= 0 ? !1 : I / F < 1.1;
1193
+ const F = y.input.checked ? 278 : 0, U = k.innerWidth - 36 - F, B = k.innerHeight - 36 - l.offsetHeight - 14;
1194
+ return U <= 0 || B <= 0 ? !1 : U / B < 1.1;
1150
1195
  }
1151
1196
  return {
1152
1197
  element: a,
@@ -1154,12 +1199,20 @@ function an(n, e, t, o = () => !0) {
1154
1199
  nextCanvas: g.canvas,
1155
1200
  currentLabel: u.label,
1156
1201
  nextLabel: g.label,
1157
- isOpen: () => R !== null && !R.closed,
1158
- update: P
1202
+ isOpen: () => N !== null && !N.closed,
1203
+ update: E
1159
1204
  };
1160
1205
  }
1161
- function ln(n, e) {
1162
- const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
1206
+ function gn() {
1207
+ const n = (N == null ? void 0 : N.document) ?? document, e = n.createElement("div");
1208
+ 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)";
1209
+ const t = n.createElement("div");
1210
+ 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";
1211
+ const o = n.createElement("div");
1212
+ 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 };
1213
+ }
1214
+ function pn(n, e) {
1215
+ const t = (N == null ? void 0 : N.document) ?? document, o = t.createElement("div");
1163
1216
  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";
1164
1217
  const i = t.createElement("div");
1165
1218
  i.textContent = `${e + 1}`, i.style.minWidth = "24px", i.style.fontWeight = "700", i.style.color = "#6b7280";
@@ -1168,7 +1221,7 @@ function ln(n, e) {
1168
1221
  }
1169
1222
  function Se(n, e) {
1170
1223
  var u;
1171
- const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
1224
+ const t = (N == null ? void 0 : N.document) ?? document, o = t.createElement("div");
1172
1225
  o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
1173
1226
  const i = t.createElement("div");
1174
1227
  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";
@@ -1186,10 +1239,10 @@ function Se(n, e) {
1186
1239
  r.style.width = `${v}px`, r.style.height = `${y}px`;
1187
1240
  }
1188
1241
  const c = (u = t.defaultView) == null ? void 0 : u.ResizeObserver;
1189
- return c !== void 0 && new c(l).observe(s), R == null || R.addEventListener("resize", l), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: l };
1242
+ 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 };
1190
1243
  }
1191
- function Ht(n, e, t) {
1192
- const o = (R == null ? void 0 : R.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
1244
+ function Nt(n, e, t) {
1245
+ const o = (N == null ? void 0 : N.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
1193
1246
  a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
1194
1247
  const s = o.createElement("input");
1195
1248
  return s.type = "checkbox", s.checked = t, e.style.display = t ? i : "none", s.addEventListener("change", () => {
@@ -1202,20 +1255,20 @@ function Pe(n, e, t) {
1202
1255
  const o = n.slides[e];
1203
1256
  return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
1204
1257
  }
1205
- function hn(n, e) {
1258
+ function xn(n, e) {
1206
1259
  if (n === void 0)
1207
1260
  return;
1208
1261
  const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
1209
1262
  (t < i || o > a) && n.scrollIntoView({ block: "nearest" });
1210
1263
  }
1211
1264
  function ne() {
1212
- Ft(R), n0(), vt == null || vt(), R == null || R.close(), R = null, Rt = null, vt = null;
1265
+ Bt(N), n0(), wt == null || wt(), N == null || N.close(), N = null, Ft = null, wt = null;
1213
1266
  }
1214
- function cn() {
1267
+ function yn() {
1215
1268
  const { width: n, height: e, left: t, top: o } = s0;
1216
1269
  return `width=${n},height=${e},left=${t},top=${o}`;
1217
1270
  }
1218
- function Ft(n) {
1271
+ function Bt(n) {
1219
1272
  n === null || n.closed || (s0 = {
1220
1273
  width: n.outerWidth,
1221
1274
  height: n.outerHeight,
@@ -1223,34 +1276,34 @@ function Ft(n) {
1223
1276
  top: n.screenY
1224
1277
  });
1225
1278
  }
1226
- function un(n) {
1279
+ function vn(n) {
1227
1280
  var o;
1228
1281
  const e = typeof ((o = globalThis.crypto) == null ? void 0 : o.randomUUID) == "function" ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`, t = n;
1229
1282
  return t[Ce] = e, {
1230
1283
  isActive: () => !n.closed && t[Ce] === e
1231
1284
  };
1232
1285
  }
1233
- function Q(n = null) {
1286
+ function K(n = null) {
1234
1287
  return {
1235
1288
  height: 0,
1236
1289
  width: 0,
1237
1290
  ...n
1238
1291
  };
1239
1292
  }
1240
- const fn = Q({ width: 0, height: 0 });
1241
- function dn(n = null) {
1293
+ const wn = K({ width: 0, height: 0 });
1294
+ function mn(n = null) {
1242
1295
  return {
1243
1296
  backgroundColor: G.WHITE,
1244
1297
  slides: [],
1245
1298
  title: "Presentation",
1246
- size: Q({ width: 3840, height: 2160 }),
1299
+ size: K({ width: 3840, height: 2160 }),
1247
1300
  resources: {
1248
1301
  images: {}
1249
1302
  },
1250
1303
  ...n
1251
1304
  };
1252
1305
  }
1253
- function gn(n) {
1306
+ function bn(n) {
1254
1307
  const e = Array.isArray(n) ? n : [n];
1255
1308
  let t = 0, o = 0;
1256
1309
  for (const i of e)
@@ -1264,7 +1317,7 @@ function gn(n) {
1264
1317
  case dt.UPDATE:
1265
1318
  break;
1266
1319
  default:
1267
- ht(i);
1320
+ at(i);
1268
1321
  }
1269
1322
  return o;
1270
1323
  }
@@ -1275,7 +1328,7 @@ function pe(n, e = null) {
1275
1328
  function a0(n) {
1276
1329
  return n === document.body;
1277
1330
  }
1278
- function pn(n, e) {
1331
+ function An(n, e) {
1279
1332
  const t = document.createElement("div");
1280
1333
  if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", a0(e)) {
1281
1334
  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";
@@ -1287,7 +1340,7 @@ function pn(n, e) {
1287
1340
  function Ee(n, e) {
1288
1341
  window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
1289
1342
  }
1290
- const xn = {
1343
+ const Tn = {
1291
1344
  check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
1292
1345
  interpolate: (n, e, t) => ({
1293
1346
  red: Math.round(n.red + (e.red - n.red) * t),
@@ -1295,18 +1348,18 @@ const xn = {
1295
1348
  blue: Math.round(n.blue + (e.blue - n.blue) * t),
1296
1349
  alpha: n.alpha + (e.alpha - n.alpha) * t
1297
1350
  })
1298
- }, yn = {
1351
+ }, Ln = {
1299
1352
  check: (n) => !0,
1300
1353
  interpolate: (n, e) => e
1301
- }, vn = {
1354
+ }, Mn = {
1302
1355
  check: (n) => typeof n == "number",
1303
1356
  interpolate: (n, e, t) => n + (e - n) * t
1304
1357
  }, Ie = [
1305
- vn,
1306
- xn,
1307
- yn
1358
+ Mn,
1359
+ Tn,
1360
+ Ln
1308
1361
  ];
1309
- function wn(n, e, t, o = null) {
1362
+ function Cn(n, e, t, o = null) {
1310
1363
  if (t === 0)
1311
1364
  return n;
1312
1365
  if (t === 1)
@@ -1348,7 +1401,7 @@ function ke(n, e, t = null) {
1348
1401
  );
1349
1402
  n.set(a.object, {
1350
1403
  ...s,
1351
- ...wn(
1404
+ ...Cn(
1352
1405
  s,
1353
1406
  a.props,
1354
1407
  a.easing(l),
@@ -1371,14 +1424,14 @@ function ke(n, e, t = null) {
1371
1424
  i += a.duration;
1372
1425
  break;
1373
1426
  default:
1374
- ht(a);
1427
+ at(a);
1375
1428
  }
1376
1429
  }
1377
1430
  }
1378
1431
  function l0(n) {
1379
1432
  return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
1380
1433
  }
1381
- function mn({
1434
+ function Sn({
1382
1435
  slide: n,
1383
1436
  buildIndex: e,
1384
1437
  buildTime: t
@@ -1402,7 +1455,7 @@ function mn({
1402
1455
  }
1403
1456
  return o;
1404
1457
  }
1405
- function bn(n) {
1458
+ function Pn(n) {
1406
1459
  const e = {};
1407
1460
  function t(o) {
1408
1461
  if (o.objectType === V.SVG) {
@@ -1418,26 +1471,26 @@ function bn(n) {
1418
1471
  t(i);
1419
1472
  return e;
1420
1473
  }
1421
- const xt = "presenterState";
1422
- function An(n, e) {
1423
- const t = localStorage.getItem(xt);
1474
+ const yt = "presenterState";
1475
+ function En(n, e) {
1476
+ const t = localStorage.getItem(yt);
1424
1477
  if (t === null)
1425
1478
  return null;
1426
1479
  if (e === null)
1427
- return localStorage.removeItem(xt), null;
1480
+ return localStorage.removeItem(yt), null;
1428
1481
  let o;
1429
1482
  try {
1430
1483
  o = JSON.parse(t);
1431
1484
  } catch (c) {
1432
- return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(xt), null;
1485
+ return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(yt), null;
1433
1486
  }
1434
1487
  const { title: i, timestamp: a } = o;
1435
1488
  let { slideIndex: s, buildIndex: r } = o;
1436
1489
  if (typeof i != "string" || typeof s != "number" || typeof r != "number" || typeof a != "number" || i !== n.title || Date.now() - a > 1e3 * 60 * e)
1437
- return localStorage.removeItem(xt), null;
1490
+ return localStorage.removeItem(yt), null;
1438
1491
  s > n.slides.length - 1 && (s = n.slides.length - 1, r = 0);
1439
1492
  const l = n.slides[s];
1440
- return l === void 0 ? (localStorage.removeItem(xt), null) : (r > l.animations.length && (r = l.animations.length), {
1493
+ return l === void 0 ? (localStorage.removeItem(yt), null) : (r > l.animations.length && (r = l.animations.length), {
1441
1494
  title: i,
1442
1495
  slideIndex: s,
1443
1496
  buildIndex: r
@@ -1445,7 +1498,7 @@ function An(n, e) {
1445
1498
  }
1446
1499
  function Oe({ title: n, slideIndex: e, buildIndex: t }) {
1447
1500
  localStorage.setItem(
1448
- xt,
1501
+ yt,
1449
1502
  JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
1450
1503
  );
1451
1504
  }
@@ -1461,14 +1514,14 @@ const _e = Object.freeze({
1461
1514
  textCommand: null,
1462
1515
  shortcuts: {}
1463
1516
  }
1464
- }), K = {
1517
+ }), Z = {
1465
1518
  Browser: "browser",
1466
1519
  Node: "node"
1467
1520
  };
1468
- function Tn(n, e) {
1521
+ function In(n, e) {
1469
1522
  e.context.clearRect(0, 0, n.width, n.height);
1470
1523
  }
1471
- function Mn(n) {
1524
+ function kn(n) {
1472
1525
  const e = document.createElement("canvas");
1473
1526
  return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
1474
1527
  }
@@ -1476,34 +1529,34 @@ const gt = {
1476
1529
  Browser: "browser",
1477
1530
  Node: "node"
1478
1531
  };
1479
- function Ln(n) {
1532
+ function On(n) {
1480
1533
  const e = new Path2D(n);
1481
1534
  return {
1482
1535
  type: gt.Browser,
1483
1536
  path: e
1484
1537
  };
1485
1538
  }
1486
- function Cn(n) {
1487
- 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 }, g = 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, L = Math.cos(g), P = Math.sin(g), S = l ? { x: h.x - L * T / 2, y: h.y - P * T / 2 } : c, E = l ? { x: h.x + L * T / 2, y: h.y + P * T / 2 } : { x: c.x + L * T, y: c.y + P * T }, M = r ? Math.PI / 6 : Math.PI / 4.5, I = T < s * 2 ? T / 2 : s, F = {
1488
- x: E.x - I * Math.cos(g - M),
1489
- y: E.y - I * Math.sin(g - M)
1490
- }, Y = {
1491
- x: E.x - I * Math.cos(g + M),
1492
- y: E.y - I * Math.sin(g + M)
1493
- }, z = {
1494
- x: S.x + I * Math.cos(g - M),
1495
- y: S.y + I * Math.sin(g - M)
1539
+ function _n(n) {
1540
+ 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 }, g = 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(g), M = Math.sin(g), 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 = {
1541
+ x: E.x - k * Math.cos(g - S),
1542
+ y: E.y - k * Math.sin(g - S)
1496
1543
  }, U = {
1497
- x: S.x + I * Math.cos(g + M),
1498
- y: S.y + I * Math.sin(g + M)
1544
+ x: E.x - k * Math.cos(g + S),
1545
+ y: E.y - k * Math.sin(g + S)
1546
+ }, B = {
1547
+ x: L.x + k * Math.cos(g - S),
1548
+ y: L.y + k * Math.sin(g - S)
1549
+ }, Y = {
1550
+ x: L.x + k * Math.cos(g + S),
1551
+ y: L.y + k * Math.sin(g + S)
1499
1552
  };
1500
1553
  return {
1501
- arrowPoints: [S, E],
1502
- arrowheadPoints: [F, E, Y],
1503
- doubledArrowheadPoints: [z, S, U]
1554
+ arrowPoints: [L, E],
1555
+ arrowheadPoints: [F, E, U],
1556
+ doubledArrowheadPoints: [B, L, Y]
1504
1557
  };
1505
1558
  }
1506
- function wt({
1559
+ function mt({
1507
1560
  ctx: n,
1508
1561
  color: e,
1509
1562
  drawn: t = null,
@@ -1530,14 +1583,14 @@ function wt({
1530
1583
  return;
1531
1584
  }
1532
1585
  switch (n.type) {
1533
- case K.Browser:
1586
+ case Z.Browser:
1534
1587
  s.type === gt.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1535
1588
  break;
1536
- case K.Node:
1589
+ case Z.Node:
1537
1590
  s.type === gt.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1538
1591
  break;
1539
1592
  default:
1540
- ht(n);
1593
+ at(n);
1541
1594
  }
1542
1595
  }
1543
1596
  }
@@ -1547,14 +1600,14 @@ function pt({ ctx: n, path: e, color: t, opacity: o = null }) {
1547
1600
  return;
1548
1601
  }
1549
1602
  switch (n.type) {
1550
- case K.Browser:
1603
+ case Z.Browser:
1551
1604
  e.type === gt.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1552
1605
  break;
1553
- case K.Node:
1606
+ case Z.Node:
1554
1607
  e.type === gt.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1555
1608
  break;
1556
1609
  default:
1557
- ht(n);
1610
+ at(n);
1558
1611
  }
1559
1612
  }
1560
1613
  function Ut(n, e) {
@@ -1572,7 +1625,7 @@ function Ut(n, e) {
1572
1625
  }
1573
1626
  return { path: t, length: i };
1574
1627
  }
1575
- const Sn = ({
1628
+ const Nn = ({
1576
1629
  ctx: n,
1577
1630
  object: e,
1578
1631
  opacity: t,
@@ -1581,8 +1634,8 @@ const Sn = ({
1581
1634
  const i = e.opacity * t;
1582
1635
  if (i === 0 || e.drawn === 0)
1583
1636
  return;
1584
- const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = Cn(e), { path: l } = Ut(a, o), { path: c } = Ut(s, o);
1585
- if (wt({
1637
+ const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = _n(e), { path: l } = Ut(a, o), { path: c } = Ut(s, o);
1638
+ if (mt({
1586
1639
  color: e.color,
1587
1640
  ctx: n,
1588
1641
  path: l,
@@ -1593,7 +1646,7 @@ const Sn = ({
1593
1646
  path: c,
1594
1647
  color: e.color,
1595
1648
  opacity: i
1596
- })), wt({
1649
+ })), mt({
1597
1650
  color: e.color,
1598
1651
  ctx: n,
1599
1652
  path: c,
@@ -1609,7 +1662,7 @@ const Sn = ({
1609
1662
  path: u,
1610
1663
  color: e.color,
1611
1664
  opacity: i
1612
- })), wt({
1665
+ })), mt({
1613
1666
  color: e.color,
1614
1667
  ctx: n,
1615
1668
  path: u,
@@ -1618,14 +1671,14 @@ const Sn = ({
1618
1671
  });
1619
1672
  }
1620
1673
  };
1621
- function Pn(n, e) {
1674
+ function Rn(n, e) {
1622
1675
  const t = n.radius - n.strokeWidth / 2;
1623
1676
  if (t <= 0)
1624
1677
  return;
1625
1678
  const o = e(), i = -Math.PI / 2;
1626
1679
  return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
1627
1680
  }
1628
- function En(n, e) {
1681
+ function Fn(n, e) {
1629
1682
  const t = e(), o = -Math.PI / 2;
1630
1683
  t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
1631
1684
  const i = 2 * Math.PI * n.radius;
@@ -1633,17 +1686,17 @@ function En(n, e) {
1633
1686
  }
1634
1687
  function h0(n, e) {
1635
1688
  switch (n.type) {
1636
- case K.Browser:
1689
+ case Z.Browser:
1637
1690
  e.type === gt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1638
1691
  break;
1639
- case K.Node:
1692
+ case Z.Node:
1640
1693
  e.type === gt.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1641
1694
  break;
1642
1695
  default:
1643
- ht(n);
1696
+ at(n);
1644
1697
  }
1645
1698
  }
1646
- const In = ({
1699
+ const Bn = ({
1647
1700
  ctx: n,
1648
1701
  object: e,
1649
1702
  opacity: t,
@@ -1652,13 +1705,13 @@ const In = ({
1652
1705
  const i = e.opacity * t;
1653
1706
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1654
1707
  return;
1655
- const { path: a, length: s } = En(e, o);
1708
+ const { path: a, length: s } = Fn(e, o);
1656
1709
  if (i < 1 && e.strokeWidth > 0) {
1657
- const r = Pn(e, o);
1710
+ const r = Rn(e, o);
1658
1711
  r !== void 0 && (n.context.save(), h0(n, r), pt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1659
1712
  } else
1660
1713
  pt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1661
- wt({
1714
+ mt({
1662
1715
  color: e.strokeColor,
1663
1716
  ctx: n,
1664
1717
  drawn: e.drawn,
@@ -1675,77 +1728,77 @@ function $(n = null) {
1675
1728
  ...n
1676
1729
  };
1677
1730
  }
1678
- const kn = $();
1679
- function ut(n = null) {
1731
+ const Dn = $();
1732
+ function ct(n = null) {
1680
1733
  return {
1681
- origin: kn,
1682
- size: fn,
1734
+ origin: Dn,
1735
+ size: wn,
1683
1736
  ...n
1684
1737
  };
1685
1738
  }
1686
- ut();
1687
- function ft(n, e, t) {
1739
+ ct();
1740
+ function ut(n, e, t) {
1688
1741
  const { x: o, y: i } = n, { width: a, height: s } = t;
1689
1742
  switch (e) {
1690
- case lt.TOP_LEFT:
1691
- return ut({
1743
+ case st.TOP_LEFT:
1744
+ return ct({
1692
1745
  origin: $({ x: o, y: i }),
1693
1746
  size: t
1694
1747
  });
1695
- case lt.TOP:
1696
- return ut({
1748
+ case st.TOP:
1749
+ return ct({
1697
1750
  origin: $({ x: o - a / 2, y: i }),
1698
1751
  size: t
1699
1752
  });
1700
- case lt.TOP_RIGHT:
1701
- return ut({
1753
+ case st.TOP_RIGHT:
1754
+ return ct({
1702
1755
  origin: $({ x: o - a, y: i }),
1703
1756
  size: t
1704
1757
  });
1705
- case lt.LEFT:
1706
- return ut({
1758
+ case st.LEFT:
1759
+ return ct({
1707
1760
  origin: $({ x: o, y: i - s / 2 }),
1708
1761
  size: t
1709
1762
  });
1710
- case lt.CENTER:
1711
- return ut({
1763
+ case st.CENTER:
1764
+ return ct({
1712
1765
  origin: $({ x: o - a / 2, y: i - s / 2 }),
1713
1766
  size: t
1714
1767
  });
1715
- case lt.RIGHT:
1716
- return ut({
1768
+ case st.RIGHT:
1769
+ return ct({
1717
1770
  origin: $({ x: o - a, y: i - s / 2 }),
1718
1771
  size: t
1719
1772
  });
1720
- case lt.BOTTOM_LEFT:
1721
- return ut({
1773
+ case st.BOTTOM_LEFT:
1774
+ return ct({
1722
1775
  origin: $({ x: o, y: i - s }),
1723
1776
  size: t
1724
1777
  });
1725
- case lt.BOTTOM:
1726
- return ut({
1778
+ case st.BOTTOM:
1779
+ return ct({
1727
1780
  origin: $({ x: o - a / 2, y: i - s }),
1728
1781
  size: t
1729
1782
  });
1730
- case lt.BOTTOM_RIGHT:
1731
- return ut({
1783
+ case st.BOTTOM_RIGHT:
1784
+ return ct({
1732
1785
  origin: $({ x: o - a, y: i - s }),
1733
1786
  size: t
1734
1787
  });
1735
1788
  default:
1736
- ht(e);
1789
+ at(e);
1737
1790
  }
1738
1791
  }
1739
- const On = ({
1792
+ const qn = ({
1740
1793
  ctx: n,
1741
1794
  object: e,
1742
1795
  renderObject: t,
1743
1796
  opacity: o
1744
1797
  }) => {
1745
- const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = ft(
1798
+ const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = ut(
1746
1799
  $({ x: e.x, y: e.y }),
1747
1800
  e.anchor,
1748
- Q({
1801
+ K({
1749
1802
  width: e.width * Math.abs(i),
1750
1803
  height: e.height * Math.abs(a)
1751
1804
  })
@@ -1791,17 +1844,17 @@ function xe(n, e, t, o, i = 0) {
1791
1844
  const kt = {
1792
1845
  Browser: "browser",
1793
1846
  Node: "node"
1794
- }, _n = ({
1847
+ }, zn = ({
1795
1848
  ctx: n,
1796
1849
  imageById: e,
1797
1850
  object: t,
1798
1851
  opacity: o,
1799
1852
  createPath2D: i
1800
1853
  }) => {
1801
- const a = ft(
1854
+ const a = ut(
1802
1855
  $({ x: t.x, y: t.y }),
1803
1856
  t.anchor,
1804
- Q({ width: t.width, height: t.height })
1857
+ K({ width: t.width, height: t.height })
1805
1858
  ), s = e[t.imageId];
1806
1859
  if (s !== void 0) {
1807
1860
  if (n.context.save(), t.cornerRadius > 0) {
@@ -1812,18 +1865,18 @@ const kt = {
1812
1865
  i
1813
1866
  );
1814
1867
  switch (n.type) {
1815
- case K.Browser:
1868
+ case Z.Browser:
1816
1869
  r.path.type === gt.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1817
1870
  break;
1818
- case K.Node:
1871
+ case Z.Node:
1819
1872
  r.path.type === gt.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1820
1873
  break;
1821
1874
  default:
1822
- ht(n);
1875
+ at(n);
1823
1876
  }
1824
1877
  }
1825
1878
  switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
1826
- case K.Browser:
1879
+ case Z.Browser:
1827
1880
  s.type === kt.Browser ? n.context.drawImage(
1828
1881
  s.image,
1829
1882
  a.origin.x,
@@ -1832,7 +1885,7 @@ const kt = {
1832
1885
  a.size.height
1833
1886
  ) : console.warn("Attempted to use Node Image in Browser Canvas context");
1834
1887
  break;
1835
- case K.Node:
1888
+ case Z.Node:
1836
1889
  s.type === kt.Node ? n.context.drawImage(
1837
1890
  s.image,
1838
1891
  a.origin.x,
@@ -1842,18 +1895,18 @@ const kt = {
1842
1895
  ) : console.warn("Attempted to use Browser Image in Node Canvas context");
1843
1896
  break;
1844
1897
  default:
1845
- ht(n);
1898
+ at(n);
1846
1899
  }
1847
1900
  n.context.restore();
1848
1901
  }
1849
1902
  };
1850
- function Nn(n, e) {
1903
+ function Vn(n, e) {
1851
1904
  const t = e();
1852
1905
  t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
1853
1906
  const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
1854
1907
  return { path: t, length: o };
1855
1908
  }
1856
- const Rn = ({
1909
+ const jn = ({
1857
1910
  ctx: n,
1858
1911
  object: e,
1859
1912
  opacity: t,
@@ -1862,8 +1915,8 @@ const Rn = ({
1862
1915
  const i = e.opacity * t;
1863
1916
  if (i === 0 || e.drawn === 0)
1864
1917
  return;
1865
- const { path: a, length: s } = Nn(e, o);
1866
- wt({
1918
+ const { path: a, length: s } = Vn(e, o);
1919
+ mt({
1867
1920
  color: e.color,
1868
1921
  ctx: n,
1869
1922
  drawn: e.drawn,
@@ -1874,23 +1927,23 @@ const Rn = ({
1874
1927
  opacity: i,
1875
1928
  width: e.width
1876
1929
  });
1877
- }, Fn = ({
1930
+ }, Hn = ({
1878
1931
  ctx: n,
1879
1932
  object: e,
1880
1933
  opacity: t,
1881
1934
  renderObject: o
1882
1935
  }) => {
1883
1936
  n.context.save();
1884
- const i = ft(
1937
+ const i = ut(
1885
1938
  $({ x: e.x, y: e.y }),
1886
1939
  e.anchor,
1887
- Q({ width: e.width, height: e.height })
1940
+ K({ width: e.width, height: e.height })
1888
1941
  );
1889
1942
  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();
1890
1943
  for (const a of e.objects)
1891
1944
  o(a, t * e.opacity);
1892
1945
  n.context.restore();
1893
- }, Bn = ({
1946
+ }, Un = ({
1894
1947
  ctx: n,
1895
1948
  object: e,
1896
1949
  opacity: t,
@@ -1899,17 +1952,17 @@ const Rn = ({
1899
1952
  const i = e.opacity * t;
1900
1953
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1901
1954
  return;
1902
- const { origin: a } = ft(
1955
+ const { origin: a } = ut(
1903
1956
  $({ x: e.x, y: e.y }),
1904
1957
  e.anchor,
1905
- Q({ width: e.width, height: e.height })
1958
+ K({ width: e.width, height: e.height })
1906
1959
  ), s = o(e.path);
1907
1960
  n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), pt({
1908
1961
  ctx: n,
1909
1962
  path: s,
1910
1963
  color: e.fillColor,
1911
1964
  opacity: i
1912
- }), wt({
1965
+ }), mt({
1913
1966
  color: e.strokeColor,
1914
1967
  ctx: n,
1915
1968
  drawn: e.drawn,
@@ -1920,7 +1973,7 @@ const Rn = ({
1920
1973
  width: e.strokeWidth
1921
1974
  }), n.context.restore();
1922
1975
  };
1923
- function Dn(n, e) {
1976
+ function Yn(n, e) {
1924
1977
  const t = e(), o = n.points, i = o[0];
1925
1978
  if (i === void 0)
1926
1979
  return { path: t, length: 0 };
@@ -1941,7 +1994,7 @@ function Dn(n, e) {
1941
1994
  );
1942
1995
  return a += r, { path: t, length: a };
1943
1996
  }
1944
- const qn = ({
1997
+ const $n = ({
1945
1998
  ctx: n,
1946
1999
  object: e,
1947
2000
  opacity: t,
@@ -1950,13 +2003,13 @@ const qn = ({
1950
2003
  const i = e.opacity * t;
1951
2004
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1952
2005
  return;
1953
- const { path: a, length: s } = Dn(e, o);
2006
+ const { path: a, length: s } = Yn(e, o);
1954
2007
  pt({
1955
2008
  ctx: n,
1956
2009
  path: a,
1957
2010
  color: e.fillColor,
1958
2011
  opacity: i
1959
- }), wt({
2012
+ }), mt({
1960
2013
  color: e.strokeColor,
1961
2014
  ctx: n,
1962
2015
  drawn: e.drawn,
@@ -1966,15 +2019,15 @@ const qn = ({
1966
2019
  width: e.strokeWidth
1967
2020
  });
1968
2021
  };
1969
- function zn(n, e) {
1970
- const t = n.strokeWidth / 2, { origin: o, size: i } = ft(
2022
+ function Wn(n, e) {
2023
+ const t = n.strokeWidth / 2, { origin: o, size: i } = ut(
1971
2024
  $({ x: n.x, y: n.y }),
1972
2025
  n.anchor,
1973
- Q({ width: n.width, height: n.height })
2026
+ K({ width: n.width, height: n.height })
1974
2027
  ), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
1975
2028
  if (a <= 0 || s <= 0)
1976
2029
  return;
1977
- const r = $({ x: o.x + t, y: o.y + t }), l = Q({ width: a, height: s }), c = Math.max(
2030
+ const r = $({ x: o.x + t, y: o.y + t }), l = K({ width: a, height: s }), c = Math.max(
1978
2031
  0,
1979
2032
  Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
1980
2033
  );
@@ -1983,11 +2036,11 @@ function zn(n, e) {
1983
2036
  const u = e();
1984
2037
  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;
1985
2038
  }
1986
- function Vn(n, e) {
1987
- const { origin: t, size: o } = ft(
2039
+ function Gn(n, e) {
2040
+ const { origin: t, size: o } = ut(
1988
2041
  $({ x: n.x, y: n.y }),
1989
2042
  n.anchor,
1990
- Q({ width: n.width, height: n.height })
2043
+ K({ width: n.width, height: n.height })
1991
2044
  ), i = Math.max(
1992
2045
  0,
1993
2046
  Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
@@ -2001,7 +2054,7 @@ function Vn(n, e) {
2001
2054
  return { path: s, length: r };
2002
2055
  }
2003
2056
  }
2004
- const jn = ({
2057
+ const Xn = ({
2005
2058
  ctx: n,
2006
2059
  object: e,
2007
2060
  opacity: t,
@@ -2010,13 +2063,13 @@ const jn = ({
2010
2063
  const i = e.opacity * t;
2011
2064
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
2012
2065
  return;
2013
- const { path: a, length: s } = Vn(e, o);
2066
+ const { path: a, length: s } = Gn(e, o);
2014
2067
  if (i < 1 && e.strokeWidth > 0) {
2015
- const r = zn(e, o);
2068
+ const r = Wn(e, o);
2016
2069
  r !== void 0 && (n.context.save(), h0(n, r), pt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
2017
2070
  } else
2018
2071
  pt({ ctx: n, path: a, color: e.fillColor, opacity: i });
2019
- wt({
2072
+ mt({
2020
2073
  color: e.strokeColor,
2021
2074
  ctx: n,
2022
2075
  drawn: e.drawn,
@@ -2026,11 +2079,11 @@ const jn = ({
2026
2079
  width: e.strokeWidth
2027
2080
  });
2028
2081
  };
2029
- function Hn(n) {
2030
- const { origin: e, size: t } = ft(
2082
+ function Kn(n) {
2083
+ const { origin: e, size: t } = ut(
2031
2084
  $({ x: n.x, y: n.y }),
2032
2085
  n.anchor,
2033
- Q({ width: n.width, height: n.height })
2086
+ K({ width: n.width, height: n.height })
2034
2087
  );
2035
2088
  return {
2036
2089
  origin: e,
@@ -2041,11 +2094,11 @@ function Hn(n) {
2041
2094
  )
2042
2095
  };
2043
2096
  }
2044
- function Un(n, e, t, o = {
2097
+ function Zn(n, e, t, o = {
2045
2098
  origin: $({ x: 0, y: 0 }),
2046
2099
  size: e
2047
2100
  }) {
2048
- const i = t(), { origin: a, size: s, cornerRadius: r } = Hn(n), { origin: l, size: c } = o;
2101
+ const i = t(), { origin: a, size: s, cornerRadius: r } = Kn(n), { origin: l, size: c } = o;
2049
2102
  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(
2050
2103
  a.x,
2051
2104
  a.y + s.height,
@@ -2066,7 +2119,7 @@ function Un(n, e, t, o = {
2066
2119
  r
2067
2120
  ), i.path.lineTo(a.x + r, a.y), i);
2068
2121
  }
2069
- const $n = ({
2122
+ const Jn = ({
2070
2123
  createPath2D: n,
2071
2124
  ctx: e,
2072
2125
  object: t,
@@ -2077,18 +2130,18 @@ const $n = ({
2077
2130
  const s = t.opacity * o;
2078
2131
  if (s === 0 || t.color.alpha === 0)
2079
2132
  return;
2080
- const r = Q({
2133
+ const r = K({
2081
2134
  width: a.width / i,
2082
2135
  height: a.height / i
2083
2136
  }), l = $({
2084
2137
  x: (a.width - r.width) / 2,
2085
2138
  y: (a.height - r.height) / 2
2086
- }), c = Un(t, a, n, {
2139
+ }), c = Zn(t, a, n, {
2087
2140
  origin: l,
2088
2141
  size: r
2089
2142
  });
2090
2143
  pt({ ctx: e, path: c, color: t.color, opacity: s });
2091
- }, Wn = ({
2144
+ }, Qn = ({
2092
2145
  ctx: n,
2093
2146
  imageById: e,
2094
2147
  object: t,
@@ -2100,13 +2153,13 @@ const $n = ({
2100
2153
  const a = e[t.svg];
2101
2154
  if (a === void 0)
2102
2155
  return;
2103
- const s = ft(
2156
+ const s = ut(
2104
2157
  $({ x: t.x, y: t.y }),
2105
2158
  t.anchor,
2106
- Q({ width: t.width, height: t.height })
2159
+ K({ width: t.width, height: t.height })
2107
2160
  );
2108
2161
  switch (n.context.save(), n.context.globalAlpha = i, n.type) {
2109
- case K.Browser:
2162
+ case Z.Browser:
2110
2163
  a.type === kt.Browser && n.context.drawImage(
2111
2164
  a.image,
2112
2165
  s.origin.x,
@@ -2115,7 +2168,7 @@ const $n = ({
2115
2168
  s.size.height
2116
2169
  );
2117
2170
  break;
2118
- case K.Node:
2171
+ case Z.Node:
2119
2172
  a.type === kt.Node && n.context.drawImage(
2120
2173
  a.image,
2121
2174
  s.origin.x,
@@ -2125,11 +2178,11 @@ const $n = ({
2125
2178
  );
2126
2179
  break;
2127
2180
  default:
2128
- ht(n);
2181
+ at(n);
2129
2182
  }
2130
2183
  n.context.restore();
2131
2184
  };
2132
- function Yn(n) {
2185
+ function t1(n) {
2133
2186
  return {
2134
2187
  color: n.color,
2135
2188
  fontFamily: n.fontFamily,
@@ -2141,22 +2194,46 @@ function Yn(n) {
2141
2194
  superscript: n.superscript
2142
2195
  };
2143
2196
  }
2144
- function Gn(n, e = 1) {
2145
- const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
2146
- let o = 0, i = 0;
2147
- for (let a = 0; a < n.length; a++) {
2148
- const s = n[a];
2149
- if (s === void 0)
2150
- continue;
2151
- const r = Math.max(...s.map((l) => l.height));
2152
- o += r + i * (e - 1), i = r;
2197
+ function e1(n) {
2198
+ return {
2199
+ bottom: Math.max(...n.map((e) => e.bottom), 0),
2200
+ height: Math.max(...n.map((e) => e.height), 0),
2201
+ lineAdvance: Math.max(...n.map((e) => e.lineAdvance), 0),
2202
+ top: Math.max(...n.map((e) => e.top), 0),
2203
+ width: n.reduce((e, t) => e + t.width, 0)
2204
+ };
2205
+ }
2206
+ function n1(n, e = 1) {
2207
+ var c;
2208
+ const t = n.map(e1);
2209
+ if (t.length === 0)
2210
+ return {
2211
+ lines: [],
2212
+ size: K()
2213
+ };
2214
+ let o = ((c = t[0]) == null ? void 0 : c.top) ?? 0, i = 0;
2215
+ const a = [];
2216
+ for (let u = 0; u < t.length; u++) {
2217
+ const g = t[u];
2218
+ g !== void 0 && (u > 0 && (o += i * e), a.push({
2219
+ ...g,
2220
+ baselineY: o
2221
+ }), i = g.lineAdvance);
2153
2222
  }
2223
+ 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;
2154
2224
  return {
2155
- height: o,
2156
- width: t
2225
+ lines: a.map((u) => ({
2226
+ ...u,
2227
+ // Keep all returned baselines relative to the top edge of the final text block
2228
+ baselineY: u.baselineY + l
2229
+ })),
2230
+ size: K({
2231
+ height: r - s,
2232
+ width: Math.max(...a.map((u) => u.width), 0)
2233
+ })
2157
2234
  };
2158
2235
  }
2159
- const Xn = 0.7, Kn = 0.3;
2236
+ const i1 = 0.7, r1 = 0.3;
2160
2237
  function c0(n) {
2161
2238
  const e = n.superscript, t = n.subscript && !e;
2162
2239
  return !e && !t ? {
@@ -2165,8 +2242,8 @@ function c0(n) {
2165
2242
  isSubscript: !1,
2166
2243
  isSuperscript: !1
2167
2244
  } : {
2168
- baselineShift: n.fontSize * Kn * (e ? -1 : 1),
2169
- fontSize: n.fontSize * Xn,
2245
+ baselineShift: n.fontSize * r1 * (e ? -1 : 1),
2246
+ fontSize: n.fontSize * i1,
2170
2247
  isSubscript: t,
2171
2248
  isSuperscript: e
2172
2249
  };
@@ -2174,7 +2251,7 @@ function c0(n) {
2174
2251
  function Ne(n, e = 0) {
2175
2252
  return n ?? e;
2176
2253
  }
2177
- function Zn(n) {
2254
+ function o1(n) {
2178
2255
  const e = Ne(
2179
2256
  n.fontBoundingBoxAscent,
2180
2257
  n.actualBoundingBoxAscent
@@ -2191,104 +2268,102 @@ function Zn(n) {
2191
2268
  }
2192
2269
  function u0(n, e, t = 1) {
2193
2270
  const o = c0(e);
2194
- n.context.fillStyle = pe(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === K.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
2271
+ n.context.fillStyle = pe(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";
2195
2272
  }
2196
- function Jn(n, e, t) {
2273
+ function s1(n, e, t) {
2197
2274
  const o = [];
2198
2275
  for (const i of n) {
2199
- const a = [];
2200
- for (const s of i) {
2201
- const { text: r, ...l } = s, c = { ...e, ...l };
2202
- u0(t, c);
2203
- const u = t.context.measureText(r), g = Zn(u), { baselineShift: h } = c0(c), f = Math.max(0, g.top - h), v = Math.max(0, g.bottom + h);
2276
+ const a = [], s = i.length === 0 ? [{ text: "" }] : i;
2277
+ for (const r of s) {
2278
+ const { text: l, ...c } = r, u = { ...e, ...c };
2279
+ u0(t, u);
2280
+ const g = t.context.measureText(l), h = o1(g), { baselineShift: f } = c0(u), v = Math.max(0, h.top - f), y = Math.max(0, h.bottom + f);
2204
2281
  a.push({
2205
- ...g,
2206
- baselineShift: h,
2207
- bottom: v,
2208
- height: f + v,
2209
- top: f
2282
+ ...h,
2283
+ baselineShift: f,
2284
+ bottom: y,
2285
+ height: v + y,
2286
+ lineAdvance: u.fontSize,
2287
+ top: v
2210
2288
  });
2211
2289
  }
2212
2290
  o.push(a);
2213
2291
  }
2214
2292
  return o;
2215
2293
  }
2216
- const Qn = ({ ctx: n, object: e, opacity: t }) => {
2294
+ const a1 = ({ ctx: n, object: e, opacity: t }) => {
2217
2295
  const o = e.opacity * t;
2218
2296
  if (o === 0)
2219
2297
  return;
2220
- const { length: i } = e, a = e0(e.text), s = Yn(e), r = Jn(a, s, n), l = Gn(r, e.lineSpacing), c = ft($({ x: e.x, y: e.y }), e.anchor, l);
2221
- let u = c.origin.x, g = c.origin.y, h = 0, f = 0;
2222
- for (let v = 0; v < a.length; v++) {
2223
- const y = a[v], T = r[v];
2224
- if (y == null || T == null) {
2298
+ const { length: i } = e, a = e0(e.text), s = t1(e), r = s1(a, s, n), l = n1(r, e.lineSpacing), c = ut($({ x: e.x, y: e.y }), e.anchor, l.size);
2299
+ let u = c.origin.x, g = 0;
2300
+ for (let h = 0; h < a.length; h++) {
2301
+ const f = a[h], v = r[h], y = l.lines[h];
2302
+ if (f == null || v == null || y == null) {
2225
2303
  console.error("Could not determine text units or sizes for line");
2226
2304
  continue;
2227
2305
  }
2228
- const L = T.reduce((I, F) => I + F.width, 0), P = T.length === 0 ? f : T.reduce((I, F) => Math.max(I, F.top), 0), S = T.length === 0 ? 0 : T.reduce((I, F) => Math.max(I, F.bottom), 0), E = P + S;
2306
+ const T = v.reduce((M, L) => M + L.width, 0);
2229
2307
  switch (e.alignment) {
2230
- case yt.LEFT:
2308
+ case vt.LEFT:
2231
2309
  u = c.origin.x;
2232
2310
  break;
2233
- case yt.CENTER:
2234
- u = c.origin.x + (c.size.width - L) / 2;
2311
+ case vt.CENTER:
2312
+ u = c.origin.x + (c.size.width - T) / 2;
2235
2313
  break;
2236
- case yt.RIGHT:
2237
- u = c.origin.x + (c.size.width - L);
2314
+ case vt.RIGHT:
2315
+ u = c.origin.x + (c.size.width - T);
2238
2316
  break;
2239
2317
  default:
2240
- ht(e.alignment);
2318
+ at(e.alignment);
2241
2319
  break;
2242
2320
  }
2243
- g += f * (e.lineSpacing - 1);
2244
- const M = g + P;
2245
- f = E;
2246
- for (let I = 0; I < y.length && !(i !== null && h >= i); I++) {
2247
- const F = y[I], Y = T[I];
2248
- if (F == null || Y == null) {
2321
+ const C = c.origin.y + y.baselineY;
2322
+ for (let M = 0; M < f.length && !(i !== null && g >= i); M++) {
2323
+ const L = f[M], E = v[M];
2324
+ if (L == null || E == null) {
2249
2325
  console.error("Could not determine text unit or size for unit");
2250
2326
  continue;
2251
2327
  }
2252
- const { text: z, ...U } = F;
2253
- let it;
2254
- if (i !== null && h + z.length > i) {
2255
- const Z = i - h;
2256
- it = z.slice(0, Z);
2328
+ const { text: S, ...k } = L;
2329
+ let F;
2330
+ if (i !== null && g + S.length > i) {
2331
+ const Y = i - g;
2332
+ F = S.slice(0, Y);
2257
2333
  }
2258
- const rt = it ?? z;
2259
- h += rt.length;
2260
- const ot = { ...s, ...U };
2261
- u0(n, ot, o), n.context.fillText(rt, u, M + Y.baselineShift), u += Y.width;
2334
+ const U = F ?? S;
2335
+ g += U.length;
2336
+ const B = { ...s, ...k };
2337
+ u0(n, B, o), n.context.fillText(U, u, C + E.baselineShift), u += E.width;
2262
2338
  }
2263
- g += E;
2264
2339
  }
2265
- }, t1 = {
2266
- [V.ARROW]: Sn,
2267
- [V.CIRCLE]: In,
2268
- [V.GROUP]: On,
2269
- [V.IMAGE]: _n,
2270
- [V.LINE]: Rn,
2271
- [V.MASK]: Fn,
2272
- [V.PATH]: Bn,
2273
- [V.POLYGON]: qn,
2274
- [V.RECTANGLE]: jn,
2340
+ }, l1 = {
2341
+ [V.ARROW]: Nn,
2342
+ [V.CIRCLE]: Bn,
2343
+ [V.GROUP]: qn,
2344
+ [V.IMAGE]: zn,
2345
+ [V.LINE]: jn,
2346
+ [V.MASK]: Hn,
2347
+ [V.PATH]: Un,
2348
+ [V.POLYGON]: $n,
2349
+ [V.RECTANGLE]: Xn,
2275
2350
  [V.SLIDE_OBJECT]: () => {
2276
2351
  },
2277
- [V.SPOTLIGHT]: $n,
2278
- [V.SVG]: Wn,
2279
- [V.TEXT]: Qn
2352
+ [V.SPOTLIGHT]: Jn,
2353
+ [V.SVG]: Qn,
2354
+ [V.TEXT]: a1
2280
2355
  };
2281
- function e1(n) {
2356
+ function h1(n) {
2282
2357
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2283
2358
  return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
2284
2359
  }
2285
- function n1(n, e) {
2360
+ function c1(n, e) {
2286
2361
  if (n === null)
2287
2362
  return null;
2288
- const t = ft(
2363
+ const t = ut(
2289
2364
  $({ x: e.x, y: e.y }),
2290
2365
  e.anchor,
2291
- Q({ width: e.width, height: e.height })
2366
+ K({ width: e.width, height: e.height })
2292
2367
  ), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
2293
2368
  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());
2294
2369
  const i = e.content;
@@ -2302,7 +2377,7 @@ function n1(n, e) {
2302
2377
  a !== null && a(), n.removeChild(o);
2303
2378
  };
2304
2379
  }
2305
- async function i1(n) {
2380
+ async function u1(n) {
2306
2381
  if (Object.keys(n).length === 0)
2307
2382
  return {};
2308
2383
  const e = {}, t = (i) => new Promise((a, s) => {
@@ -2327,7 +2402,7 @@ async function i1(n) {
2327
2402
  return e;
2328
2403
  }
2329
2404
  const Re = "presenterPendingVariables:";
2330
- function r1() {
2405
+ function f1() {
2331
2406
  const n = f0();
2332
2407
  if (n === null)
2333
2408
  return {};
@@ -2346,7 +2421,7 @@ function r1() {
2346
2421
  return console.error("Failed to parse pending presenter variable state from sessionStorage:", e), n.removeItem(ie()), {};
2347
2422
  }
2348
2423
  }
2349
- function o1(n) {
2424
+ function d1(n) {
2350
2425
  const e = f0();
2351
2426
  e !== null && e.setItem(ie(), JSON.stringify({ values: n }));
2352
2427
  }
@@ -2360,60 +2435,60 @@ function f0() {
2360
2435
  return null;
2361
2436
  }
2362
2437
  }
2363
- const s1 = 0, a1 = 1, d0 = 0, l1 = 0.01, Dt = /* @__PURE__ */ new Map();
2438
+ const g1 = 0, p1 = 1, d0 = 0, x1 = 0.01, qt = /* @__PURE__ */ new Map();
2364
2439
  let Ot = /* @__PURE__ */ new Map(), Fe = !1, Be = 1;
2365
- function ki(n = null) {
2366
- g1();
2367
- const e = n ?? {}, t = d1(), o = f1(t, e), i = Ot.get(o.id);
2440
+ function Di(n = null) {
2441
+ m1();
2442
+ const e = n ?? {}, t = w1(), o = v1(t, e), i = Ot.get(o.id);
2368
2443
  if (i !== void 0) {
2369
- const a = g0(i, o);
2444
+ const a = x0(i, o);
2370
2445
  return Ot.set(o.id, a), a;
2371
2446
  }
2372
2447
  return o.default;
2373
2448
  }
2374
- function h1() {
2375
- return Array.from(Dt.values());
2449
+ function g0() {
2450
+ return Array.from(qt.values());
2376
2451
  }
2377
- function c1(n) {
2378
- const e = Dt.get(n);
2452
+ function p0(n) {
2453
+ const e = qt.get(n);
2379
2454
  return e === void 0 ? d0 : Ot.get(e.id) ?? e.default;
2380
2455
  }
2381
- function u1(n, e) {
2382
- const t = Dt.get(n);
2456
+ function y1(n, e) {
2457
+ const t = qt.get(n);
2383
2458
  if (t === void 0)
2384
2459
  return e;
2385
- const o = g0(e, t);
2460
+ const o = x0(e, t);
2386
2461
  return Ot.set(t.id, o), o;
2387
2462
  }
2388
- function f1(n, e) {
2389
- const t = e.min ?? s1, o = e.max ?? a1, i = Math.min(t, o), a = Math.max(t, o), s = e.increment !== void 0 && e.increment > 0 ? e.increment : l1, r = {
2463
+ function v1(n, e) {
2464
+ const t = e.min ?? g1, o = e.max ?? p1, i = Math.min(t, o), a = Math.max(t, o), s = e.increment !== void 0 && e.increment > 0 ? e.increment : x1, r = {
2390
2465
  id: n,
2391
2466
  name: e.name ?? n,
2392
2467
  min: i,
2393
2468
  max: a,
2394
- default: p0(e.default ?? d0, i, a),
2469
+ default: y0(e.default ?? d0, i, a),
2395
2470
  increment: s
2396
2471
  };
2397
- return Dt.set(n, r), r;
2472
+ return qt.set(n, r), r;
2398
2473
  }
2399
- function d1() {
2474
+ function w1() {
2400
2475
  const n = `var${Be}`;
2401
2476
  return Be += 1, n;
2402
2477
  }
2403
- function g1() {
2404
- Fe || (Ot = new Map(Object.entries(r1())), Fe = !0);
2478
+ function m1() {
2479
+ Fe || (Ot = new Map(Object.entries(f1())), Fe = !0);
2405
2480
  }
2406
- function g0(n, e) {
2407
- return p0(n, e.min, e.max);
2481
+ function x0(n, e) {
2482
+ return y0(n, e.min, e.max);
2408
2483
  }
2409
- function p0(n, e, t) {
2484
+ function y0(n, e, t) {
2410
2485
  return Math.max(e, Math.min(t, n));
2411
2486
  }
2412
- function p1({
2487
+ function b1({
2413
2488
  onCommit: n,
2414
2489
  onPreview: e
2415
2490
  }) {
2416
- const t = h1();
2491
+ const t = g0();
2417
2492
  if (t.length === 0)
2418
2493
  return null;
2419
2494
  const o = document.createElement("div");
@@ -2440,10 +2515,10 @@ function p1({
2440
2515
  backdropFilter: "blur(10px)"
2441
2516
  });
2442
2517
  for (const i of t)
2443
- o.appendChild(x1(i, e, n));
2518
+ o.appendChild(A1(i, e, n));
2444
2519
  return o;
2445
2520
  }
2446
- function x1(n, e, t) {
2521
+ function A1(n, e, t) {
2447
2522
  const o = document.createElement("div");
2448
2523
  o.dataset.presenterVariableId = n.id, o.dataset.presenterVariableName = n.name, Object.assign(o.style, {
2449
2524
  display: "grid",
@@ -2476,9 +2551,9 @@ function x1(n, e, t) {
2476
2551
  color: "#ffffff",
2477
2552
  font: "inherit"
2478
2553
  });
2479
- let r = c1(n.id);
2554
+ let r = p0(n.id);
2480
2555
  const l = (g) => {
2481
- const h = y1(g);
2556
+ const h = T1(g);
2482
2557
  a.value = h, s.value = h;
2483
2558
  }, c = (g) => {
2484
2559
  Number.isFinite(g) && (r = e(n.id, g), l(r));
@@ -2487,32 +2562,38 @@ function x1(n, e, t) {
2487
2562
  };
2488
2563
  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;
2489
2564
  }
2490
- function y1(n) {
2565
+ function T1(n) {
2491
2566
  return Number.isInteger(n) ? n.toString() : parseFloat(n.toFixed(6)).toString();
2492
2567
  }
2493
- function v1({ container: n, onCommit: e }) {
2494
- const t = p1({
2568
+ function L1({ container: n, onCommit: e }) {
2569
+ const t = b1({
2495
2570
  onPreview: (o, i) => {
2496
- const a = u1(o, i);
2497
- return o1({ [o]: a }), a;
2571
+ const a = y1(o, i);
2572
+ return d1(M1()), a;
2498
2573
  },
2499
2574
  onCommit: e
2500
2575
  });
2501
2576
  t !== null && n.appendChild(t);
2502
2577
  }
2503
- class Oi {
2578
+ function M1() {
2579
+ const n = {};
2580
+ for (const e of g0())
2581
+ n[e.id] = p0(e.id);
2582
+ return n;
2583
+ }
2584
+ class qi {
2504
2585
  constructor(e) {
2505
2586
  this.navigator = null;
2506
2587
  const { objectRenderers: t, scale: o = 1, ...i } = e;
2507
2588
  this.props = {
2508
- presentation: dn(),
2589
+ presentation: mn(),
2509
2590
  element: document.body,
2510
2591
  objectRenderers: {
2511
- ...t1,
2592
+ ...l1,
2512
2593
  ...t
2513
2594
  },
2514
2595
  cacheDurationMinutes: 15,
2515
- scale: w1(o),
2596
+ scale: C1(o),
2516
2597
  ...i
2517
2598
  }, this.state = { ..._e };
2518
2599
  }
@@ -2520,23 +2601,23 @@ class Oi {
2520
2601
  async present() {
2521
2602
  const { presentation: e, element: t, scale: o } = this.props;
2522
2603
  this.hideCursor();
2523
- const i = Mn(e.size), a = e1(e.size);
2604
+ const i = kn(e.size), a = h1(e.size);
2524
2605
  a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
2525
2606
  ..._e,
2526
- imageById: await i1({
2607
+ imageById: await u1({
2527
2608
  ...e.resources.images,
2528
- ...bn(e)
2609
+ ...Pn(e)
2529
2610
  }),
2530
2611
  canvas: i,
2531
2612
  extrasContainer: a
2532
2613
  };
2533
- const s = pn(e, t), r = a0(t), l = (g, h) => {
2614
+ const s = An(e, t), r = a0(t), l = (g, h) => {
2534
2615
  this.state.shortcutState.shortcuts.b = {
2535
2616
  slideIndex: this.state.slideIndex,
2536
2617
  buildIndex: this.state.buildIndex
2537
2618
  }, this.renderSlide(g ?? this.state.slideIndex, h);
2538
2619
  }, c = (g = !1) => {
2539
- r && (this.navigator = sn({
2620
+ r && (this.navigator = fn({
2540
2621
  presentation: e,
2541
2622
  shortcutState: this.state.shortcutState,
2542
2623
  onNavigateToSlide: (h) => this.renderSlide(h),
@@ -2560,12 +2641,12 @@ class Oi {
2560
2641
  focusOnPointerDown: !r,
2561
2642
  keyEventTarget: r ? window : s
2562
2643
  }
2563
- ), t.replaceChildren(), s.appendChild(i), s.appendChild(a), v1({
2644
+ ), t.replaceChildren(), s.appendChild(i), s.appendChild(a), L1({
2564
2645
  container: s,
2565
2646
  onCommit: () => this.reloadAfterVariableChange()
2566
2647
  }), t.appendChild(s);
2567
- const u = An(e, this.props.cacheDurationMinutes);
2568
- u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0), en() && c(!0);
2648
+ const u = En(e, this.props.cacheDurationMinutes);
2649
+ u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0), rn() && c(!0);
2569
2650
  }
2570
2651
  reloadAfterVariableChange() {
2571
2652
  const { presentation: e } = this.props;
@@ -2585,7 +2666,7 @@ class Oi {
2585
2666
  l();
2586
2667
  this.state.mountedExtrasCleanups = [];
2587
2668
  for (const l of r.extras) {
2588
- const c = n1(this.state.extrasContainer, l);
2669
+ const c = c1(this.state.extrasContainer, l);
2589
2670
  c !== null && this.state.mountedExtrasCleanups.push(c);
2590
2671
  }
2591
2672
  }
@@ -2599,29 +2680,29 @@ class Oi {
2599
2680
  if (c === null)
2600
2681
  return;
2601
2682
  const u = {
2602
- type: K.Browser,
2683
+ type: Z.Browser,
2603
2684
  context: c
2604
2685
  };
2605
- Tn(e, u);
2686
+ In(e, u);
2606
2687
  const g = r.slides[t];
2607
2688
  if (g === void 0)
2608
2689
  return;
2609
- const h = mn({
2690
+ const h = Sn({
2610
2691
  slide: g,
2611
2692
  buildIndex: o,
2612
2693
  buildTime: i
2613
2694
  });
2614
2695
  u.context.fillStyle = pe(r.backgroundColor), u.context.fillRect(0, 0, e.width, e.height);
2615
2696
  function f(y, T) {
2616
- const L = s[y.objectType], P = h.get(y);
2617
- L === void 0 || P === void 0 || L({
2697
+ const C = s[y.objectType], M = h.get(y);
2698
+ C === void 0 || M === void 0 || C({
2618
2699
  ctx: u,
2619
2700
  imageById: l,
2620
- object: P,
2701
+ object: M,
2621
2702
  opacity: T,
2622
2703
  renderScale: a,
2623
2704
  renderObject: f,
2624
- createPath2D: Ln,
2705
+ createPath2D: On,
2625
2706
  slideSize: r.size
2626
2707
  });
2627
2708
  }
@@ -2663,7 +2744,7 @@ class Oi {
2663
2744
  return;
2664
2745
  const r = s.animations[a];
2665
2746
  if (r !== void 0 && !e) {
2666
- const l = performance.now(), c = gn(r), u = (g) => {
2747
+ const l = performance.now(), c = bn(r), u = (g) => {
2667
2748
  const h = g - l;
2668
2749
  h < c ? (this.renderSlide(i, a + 1, h), this.state.currentAnimationId = requestAnimationFrame(u)) : this.renderSlide(i, a + 1, null);
2669
2750
  };
@@ -2693,57 +2774,46 @@ class Oi {
2693
2774
  this.props.element.style.cursor = "none", (t = (e = this.state.canvas) == null ? void 0 : e.parentElement) == null || t.style.setProperty("cursor", "none");
2694
2775
  }
2695
2776
  }
2696
- function w1(n) {
2777
+ function C1(n) {
2697
2778
  return n <= 0 || n > 1 ? (console.warn(
2698
2779
  `BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
2699
2780
  ), 1) : n;
2700
2781
  }
2701
- function _i(n = 1e3) {
2782
+ function zi(n = 1e3, e = {}) {
2702
2783
  return {
2703
2784
  type: dt.PAUSE,
2704
2785
  isKey: !1,
2705
2786
  duration: n,
2706
- shortcut: null
2707
- };
2708
- }
2709
- function Ni(n = null) {
2710
- return {
2711
- objects: [],
2712
- animations: [],
2713
- extras: [],
2714
- isAllKey: !1,
2715
- isEndKey: !0,
2716
- isStartKey: !1,
2787
+ notes: null,
2717
2788
  shortcut: null,
2718
- title: "",
2719
- ...n
2789
+ ...e
2720
2790
  };
2721
2791
  }
2722
- function Ri(n, e = {}) {
2792
+ function Vi(n, e = {}) {
2723
2793
  return {
2724
2794
  ...e,
2725
2795
  text: n
2726
2796
  };
2727
2797
  }
2728
- function Fi(n = G.BLACK) {
2798
+ function ji(n = G.BLACK) {
2729
2799
  return { ...n, alpha: 1 };
2730
2800
  }
2731
- function m1(n) {
2801
+ function S1(n) {
2732
2802
  for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
2733
2803
  o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
2734
2804
  return a / 2;
2735
2805
  }
2736
- function b1(n) {
2806
+ function P1(n) {
2737
2807
  for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], l = 0; ++e < t; )
2738
2808
  i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, l += Math.sqrt(i * i + a * a);
2739
2809
  return l;
2740
2810
  }
2741
- function A1(n) {
2811
+ function E1(n) {
2742
2812
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2743
2813
  }
2744
- var $t, De;
2745
- function T1() {
2746
- if (De) return $t;
2814
+ var Yt, De;
2815
+ function I1() {
2816
+ if (De) return Yt;
2747
2817
  De = 1;
2748
2818
  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 = [
2749
2819
  5760,
@@ -2818,35 +2888,35 @@ function T1() {
2818
2888
  f.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + f.index + ")";
2819
2889
  }
2820
2890
  function u(f) {
2821
- var v = f.index, y = v, T = f.max, L = !1, P = !1, S = !1, E = !1, M;
2891
+ var v = f.index, y = v, T = f.max, C = !1, M = !1, L = !1, E = !1, S;
2822
2892
  if (y >= T) {
2823
2893
  f.err = "SvgPath: missed param (at pos " + y + ")";
2824
2894
  return;
2825
2895
  }
2826
- if (M = f.path.charCodeAt(y), (M === 43 || M === 45) && (y++, M = y < T ? f.path.charCodeAt(y) : 0), !a(M) && M !== 46) {
2896
+ if (S = f.path.charCodeAt(y), (S === 43 || S === 45) && (y++, S = y < T ? f.path.charCodeAt(y) : 0), !a(S) && S !== 46) {
2827
2897
  f.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
2828
2898
  return;
2829
2899
  }
2830
- if (M !== 46) {
2831
- if (L = M === 48, y++, M = y < T ? f.path.charCodeAt(y) : 0, L && y < T && M && a(M)) {
2900
+ if (S !== 46) {
2901
+ if (C = S === 48, y++, S = y < T ? f.path.charCodeAt(y) : 0, C && y < T && S && a(S)) {
2832
2902
  f.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + v + ")";
2833
2903
  return;
2834
2904
  }
2835
2905
  for (; y < T && a(f.path.charCodeAt(y)); )
2836
- y++, P = !0;
2837
- M = y < T ? f.path.charCodeAt(y) : 0;
2906
+ y++, M = !0;
2907
+ S = y < T ? f.path.charCodeAt(y) : 0;
2838
2908
  }
2839
- if (M === 46) {
2909
+ if (S === 46) {
2840
2910
  for (E = !0, y++; a(f.path.charCodeAt(y)); )
2841
- y++, S = !0;
2842
- M = y < T ? f.path.charCodeAt(y) : 0;
2911
+ y++, L = !0;
2912
+ S = y < T ? f.path.charCodeAt(y) : 0;
2843
2913
  }
2844
- if (M === 101 || M === 69) {
2845
- if (E && !P && !S) {
2914
+ if (S === 101 || S === 69) {
2915
+ if (E && !M && !L) {
2846
2916
  f.err = "SvgPath: invalid float exponent (at pos " + y + ")";
2847
2917
  return;
2848
2918
  }
2849
- if (y++, M = y < T ? f.path.charCodeAt(y) : 0, (M === 43 || M === 45) && y++, y < T && a(f.path.charCodeAt(y)))
2919
+ if (y++, S = y < T ? f.path.charCodeAt(y) : 0, (S === 43 || S === 45) && y++, y < T && a(f.path.charCodeAt(y)))
2850
2920
  for (; y < T && a(f.path.charCodeAt(y)); )
2851
2921
  y++;
2852
2922
  else {
@@ -2867,29 +2937,29 @@ function T1() {
2867
2937
  ;
2868
2938
  }
2869
2939
  function h(f) {
2870
- var v = f.max, y, T, L, P, S;
2940
+ var v = f.max, y, T, C, M, L;
2871
2941
  if (f.segmentStart = f.index, y = f.path.charCodeAt(f.index), T = i(y), !o(y)) {
2872
2942
  f.err = "SvgPath: bad command " + f.path[f.index] + " (at pos " + f.index + ")";
2873
2943
  return;
2874
2944
  }
2875
- if (P = n[f.path[f.index].toLowerCase()], f.index++, l(f), f.data = [], !P) {
2945
+ if (M = n[f.path[f.index].toLowerCase()], f.index++, l(f), f.data = [], !M) {
2876
2946
  g(f);
2877
2947
  return;
2878
2948
  }
2879
- for (L = !1; ; ) {
2880
- for (S = P; S > 0; S--) {
2881
- if (T && (S === 3 || S === 4) ? c(f) : u(f), f.err.length) {
2949
+ for (C = !1; ; ) {
2950
+ for (L = M; L > 0; L--) {
2951
+ if (T && (L === 3 || L === 4) ? c(f) : u(f), f.err.length) {
2882
2952
  g(f);
2883
2953
  return;
2884
2954
  }
2885
- f.data.push(f.param), l(f), L = !1, f.index < v && f.path.charCodeAt(f.index) === 44 && (f.index++, l(f), L = !0);
2955
+ f.data.push(f.param), l(f), C = !1, f.index < v && f.path.charCodeAt(f.index) === 44 && (f.index++, l(f), C = !0);
2886
2956
  }
2887
- if (!L && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
2957
+ if (!C && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
2888
2958
  break;
2889
2959
  }
2890
2960
  g(f);
2891
2961
  }
2892
- return $t = function(v) {
2962
+ return Yt = function(v) {
2893
2963
  var y = new r(v), T = y.max;
2894
2964
  for (l(y); y.index < T && !y.err.length; )
2895
2965
  h(y);
@@ -2897,11 +2967,11 @@ function T1() {
2897
2967
  err: y.err,
2898
2968
  segments: y.result
2899
2969
  };
2900
- }, $t;
2970
+ }, Yt;
2901
2971
  }
2902
- var Wt, qe;
2903
- function x0() {
2904
- if (qe) return Wt;
2972
+ var $t, qe;
2973
+ function v0() {
2974
+ if (qe) return $t;
2905
2975
  qe = 1;
2906
2976
  function n(t, o) {
2907
2977
  return [
@@ -2947,13 +3017,13 @@ function x0() {
2947
3017
  t * a[0] + o * a[2] + (i ? 0 : a[4]),
2948
3018
  t * a[1] + o * a[3] + (i ? 0 : a[5])
2949
3019
  ]) : [t, o];
2950
- }, Wt = e, Wt;
3020
+ }, $t = e, $t;
2951
3021
  }
2952
- var Yt, ze;
2953
- function M1() {
2954
- if (ze) return Yt;
3022
+ var Wt, ze;
3023
+ function k1() {
3024
+ if (ze) return Wt;
2955
3025
  ze = 1;
2956
- var n = x0(), e = {
3026
+ var n = v0(), e = {
2957
3027
  matrix: !0,
2958
3028
  scale: !0,
2959
3029
  rotate: !0,
@@ -2961,7 +3031,7 @@ function M1() {
2961
3031
  skewX: !0,
2962
3032
  skewY: !0
2963
3033
  }, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
2964
- return Yt = function(a) {
3034
+ return Wt = function(a) {
2965
3035
  var s = new n(), r, l;
2966
3036
  return a.split(t).forEach(function(c) {
2967
3037
  if (c.length) {
@@ -2993,10 +3063,10 @@ function M1() {
2993
3063
  }
2994
3064
  }
2995
3065
  }), s;
2996
- }, Yt;
3066
+ }, Wt;
2997
3067
  }
2998
3068
  var Gt, Ve;
2999
- function L1() {
3069
+ function O1() {
3000
3070
  if (Ve) return Gt;
3001
3071
  Ve = 1;
3002
3072
  var n = Math.PI * 2;
@@ -3005,41 +3075,41 @@ function L1() {
3005
3075
  return c > 1 && (c = 1), c < -1 && (c = -1), l * Math.acos(c);
3006
3076
  }
3007
3077
  function t(i, a, s, r, l, c, u, g, h, f) {
3008
- var v = f * (i - s) / 2 + h * (a - r) / 2, y = -h * (i - s) / 2 + f * (a - r) / 2, T = u * u, L = g * g, P = v * v, S = y * y, E = T * L - T * S - L * P;
3009
- E < 0 && (E = 0), E /= T * S + L * P, E = Math.sqrt(E) * (l === c ? -1 : 1);
3010
- var M = E * u / g * y, I = E * -g / u * v, F = f * M - h * I + (i + s) / 2, Y = h * M + f * I + (a + r) / 2, z = (v - M) / u, U = (y - I) / g, it = (-v - M) / u, rt = (-y - I) / g, ot = e(1, 0, z, U), Z = e(z, U, it, rt);
3011
- return c === 0 && Z > 0 && (Z -= n), c === 1 && Z < 0 && (Z += n), [F, Y, ot, Z];
3078
+ var v = f * (i - s) / 2 + h * (a - r) / 2, y = -h * (i - s) / 2 + f * (a - r) / 2, T = u * u, C = g * g, M = v * v, L = y * y, E = T * C - T * L - C * M;
3079
+ E < 0 && (E = 0), E /= T * L + C * M, E = Math.sqrt(E) * (l === c ? -1 : 1);
3080
+ var S = E * u / g * y, k = E * -g / u * v, F = f * S - h * k + (i + s) / 2, U = h * S + f * k + (a + r) / 2, B = (v - S) / u, Y = (y - k) / g, lt = (-v - S) / u, Q = (-y - k) / g, ft = e(1, 0, B, Y), it = e(B, Y, lt, Q);
3081
+ return c === 0 && it > 0 && (it -= n), c === 1 && it < 0 && (it += n), [F, U, ft, it];
3012
3082
  }
3013
3083
  function o(i, a) {
3014
3084
  var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), l = Math.sin(i), c = Math.cos(i + a), u = Math.sin(i + a);
3015
3085
  return [r, l, r - l * s, l + r * s, c + u * s, u - c * s, c, u];
3016
3086
  }
3017
3087
  return Gt = function(a, s, r, l, c, u, g, h, f) {
3018
- var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), T = y * (a - r) / 2 + v * (s - l) / 2, L = -v * (a - r) / 2 + y * (s - l) / 2;
3019
- if (T === 0 && L === 0)
3088
+ var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), T = y * (a - r) / 2 + v * (s - l) / 2, C = -v * (a - r) / 2 + y * (s - l) / 2;
3089
+ if (T === 0 && C === 0)
3020
3090
  return [];
3021
3091
  if (g === 0 || h === 0)
3022
3092
  return [];
3023
3093
  g = Math.abs(g), h = Math.abs(h);
3024
- var P = T * T / (g * g) + L * L / (h * h);
3025
- P > 1 && (g *= Math.sqrt(P), h *= Math.sqrt(P));
3026
- var S = t(a, s, r, l, c, u, g, h, v, y), E = [], M = S[2], I = S[3], F = Math.max(Math.ceil(Math.abs(I) / (n / 4)), 1);
3027
- I /= F;
3028
- for (var Y = 0; Y < F; Y++)
3029
- E.push(o(M, I)), M += I;
3030
- return E.map(function(z) {
3031
- for (var U = 0; U < z.length; U += 2) {
3032
- var it = z[U + 0], rt = z[U + 1];
3033
- it *= g, rt *= h;
3034
- var ot = y * it - v * rt, Z = v * it + y * rt;
3035
- z[U + 0] = ot + S[0], z[U + 1] = Z + S[1];
3094
+ var M = T * T / (g * g) + C * C / (h * h);
3095
+ M > 1 && (g *= Math.sqrt(M), h *= Math.sqrt(M));
3096
+ var L = t(a, s, r, l, c, u, g, h, v, y), E = [], S = L[2], k = L[3], F = Math.max(Math.ceil(Math.abs(k) / (n / 4)), 1);
3097
+ k /= F;
3098
+ for (var U = 0; U < F; U++)
3099
+ E.push(o(S, k)), S += k;
3100
+ return E.map(function(B) {
3101
+ for (var Y = 0; Y < B.length; Y += 2) {
3102
+ var lt = B[Y + 0], Q = B[Y + 1];
3103
+ lt *= g, Q *= h;
3104
+ var ft = y * lt - v * Q, it = v * lt + y * Q;
3105
+ B[Y + 0] = ft + L[0], B[Y + 1] = it + L[1];
3036
3106
  }
3037
- return z;
3107
+ return B;
3038
3108
  });
3039
3109
  }, Gt;
3040
3110
  }
3041
3111
  var Xt, je;
3042
- function C1() {
3112
+ function _1() {
3043
3113
  if (je) return Xt;
3044
3114
  je = 1;
3045
3115
  var n = 1e-10, e = Math.PI / 180;
@@ -3068,10 +3138,10 @@ function C1() {
3068
3138
  }, Xt = t, Xt;
3069
3139
  }
3070
3140
  var Kt, He;
3071
- function S1() {
3141
+ function N1() {
3072
3142
  if (He) return Kt;
3073
3143
  He = 1;
3074
- var n = T1(), e = M1(), t = x0(), o = L1(), i = C1();
3144
+ var n = I1(), e = k1(), t = v0(), o = O1(), i = _1();
3075
3145
  function a(s) {
3076
3146
  if (!(this instanceof a))
3077
3147
  return new a(s);
@@ -3109,12 +3179,12 @@ function S1() {
3109
3179
  break;
3110
3180
  case "a":
3111
3181
  case "A":
3112
- var L = s.toArray(), P = i(c[1], c[2], c[3]).transform(L);
3113
- if (L[0] * L[3] - L[1] * L[2] < 0 && (c[5] = c[5] ? "0" : "1"), f = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === g && c[7] === h || c[0] === "a" && c[6] === 0 && c[7] === 0) {
3182
+ var C = s.toArray(), M = i(c[1], c[2], c[3]).transform(C);
3183
+ if (C[0] * C[3] - C[1] * C[2] < 0 && (c[5] = c[5] ? "0" : "1"), f = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === g && c[7] === h || c[0] === "a" && c[6] === 0 && c[7] === 0) {
3114
3184
  v = [c[0] === "a" ? "l" : "L", f[0], f[1]];
3115
3185
  break;
3116
3186
  }
3117
- P.isDegenerate() ? v = [c[0] === "a" ? "l" : "L", f[0], f[1]] : v = [c[0], P.rx, P.ry, P.ax, c[4], c[5], f[0], f[1]];
3187
+ M.isDegenerate() ? v = [c[0] === "a" ? "l" : "L", f[0], f[1]] : v = [c[0], M.rx, M.ry, M.ax, c[4], c[5], f[0], f[1]];
3118
3188
  break;
3119
3189
  case "m":
3120
3190
  T = u > 0, f = s.calc(c[1], c[2], T), v = ["m", f[0], f[1]];
@@ -3196,40 +3266,40 @@ function S1() {
3196
3266
  }
3197
3267
  }), this;
3198
3268
  }, a.prototype.iterate = function(s, r) {
3199
- var l = this.segments, c = {}, u = !1, g = 0, h = 0, f = 0, v = 0, y, T, L;
3200
- if (r || this.__evaluateStack(), l.forEach(function(P, S) {
3201
- var E = s(P, S, g, h);
3202
- Array.isArray(E) && (c[S] = E, u = !0);
3203
- var M = P[0] === P[0].toLowerCase();
3204
- switch (P[0]) {
3269
+ var l = this.segments, c = {}, u = !1, g = 0, h = 0, f = 0, v = 0, y, T, C;
3270
+ if (r || this.__evaluateStack(), l.forEach(function(M, L) {
3271
+ var E = s(M, L, g, h);
3272
+ Array.isArray(E) && (c[L] = E, u = !0);
3273
+ var S = M[0] === M[0].toLowerCase();
3274
+ switch (M[0]) {
3205
3275
  case "m":
3206
3276
  case "M":
3207
- g = P[1] + (M ? g : 0), h = P[2] + (M ? h : 0), f = g, v = h;
3277
+ g = M[1] + (S ? g : 0), h = M[2] + (S ? h : 0), f = g, v = h;
3208
3278
  return;
3209
3279
  case "h":
3210
3280
  case "H":
3211
- g = P[1] + (M ? g : 0);
3281
+ g = M[1] + (S ? g : 0);
3212
3282
  return;
3213
3283
  case "v":
3214
3284
  case "V":
3215
- h = P[1] + (M ? h : 0);
3285
+ h = M[1] + (S ? h : 0);
3216
3286
  return;
3217
3287
  case "z":
3218
3288
  case "Z":
3219
3289
  g = f, h = v;
3220
3290
  return;
3221
3291
  default:
3222
- g = P[P.length - 2] + (M ? g : 0), h = P[P.length - 1] + (M ? h : 0);
3292
+ g = M[M.length - 2] + (S ? g : 0), h = M[M.length - 1] + (S ? h : 0);
3223
3293
  }
3224
3294
  }), !u)
3225
3295
  return this;
3226
- for (L = [], y = 0; y < l.length; y++)
3296
+ for (C = [], y = 0; y < l.length; y++)
3227
3297
  if (typeof c[y] < "u")
3228
3298
  for (T = 0; T < c[y].length; T++)
3229
- L.push(c[y][T]);
3299
+ C.push(c[y][T]);
3230
3300
  else
3231
- L.push(l[y]);
3232
- return this.segments = L, this;
3301
+ C.push(l[y]);
3302
+ return this.segments = C, this;
3233
3303
  }, a.prototype.abs = function() {
3234
3304
  return this.iterate(function(s, r, l, c) {
3235
3305
  var u = s[0], g = u.toUpperCase(), h;
@@ -3272,15 +3342,15 @@ function S1() {
3272
3342
  }, a.prototype.unshort = function() {
3273
3343
  var s = this.segments, r, l, c, u, g;
3274
3344
  return this.iterate(function(h, f, v, y) {
3275
- var T = h[0], L = T.toUpperCase(), P;
3276
- f && (L === "T" ? (P = T === "t", c = s[f - 1], c[0] === "Q" ? (r = c[1] - v, l = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], l = c[2] - c[4]) : (r = 0, l = 0), u = -r, g = -l, P || (u += v, g += y), s[f] = [
3277
- P ? "q" : "Q",
3345
+ var T = h[0], C = T.toUpperCase(), M;
3346
+ f && (C === "T" ? (M = T === "t", c = s[f - 1], c[0] === "Q" ? (r = c[1] - v, l = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], l = c[2] - c[4]) : (r = 0, l = 0), u = -r, g = -l, M || (u += v, g += y), s[f] = [
3347
+ M ? "q" : "Q",
3278
3348
  u,
3279
3349
  g,
3280
3350
  h[1],
3281
3351
  h[2]
3282
- ]) : L === "S" && (P = T === "s", c = s[f - 1], c[0] === "C" ? (r = c[3] - v, l = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], l = c[4] - c[6]) : (r = 0, l = 0), u = -r, g = -l, P || (u += v, g += y), s[f] = [
3283
- P ? "c" : "C",
3352
+ ]) : C === "S" && (M = T === "s", c = s[f - 1], c[0] === "C" ? (r = c[3] - v, l = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], l = c[4] - c[6]) : (r = 0, l = 0), u = -r, g = -l, M || (u += v, g += y), s[f] = [
3353
+ M ? "c" : "C",
3284
3354
  u,
3285
3355
  g,
3286
3356
  h[1],
@@ -3292,17 +3362,17 @@ function S1() {
3292
3362
  }, Kt = a, Kt;
3293
3363
  }
3294
3364
  var Zt, Ue;
3295
- function P1() {
3296
- return Ue || (Ue = 1, Zt = S1()), Zt;
3365
+ function R1() {
3366
+ return Ue || (Ue = 1, Zt = N1()), Zt;
3297
3367
  }
3298
- var E1 = P1();
3299
- const I1 = /* @__PURE__ */ A1(E1);
3300
- var Jt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, k1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
3301
- function O1(n) {
3368
+ var F1 = R1();
3369
+ const B1 = /* @__PURE__ */ E1(F1);
3370
+ var Jt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, D1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
3371
+ function q1(n) {
3302
3372
  var e = [];
3303
- return n.replace(k1, function(t, o, i) {
3373
+ return n.replace(D1, function(t, o, i) {
3304
3374
  var a = o.toLowerCase();
3305
- for (i = N1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
3375
+ for (i = V1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
3306
3376
  if (i.length === Jt[a])
3307
3377
  return i.unshift(o), e.push(i);
3308
3378
  if (i.length < Jt[a])
@@ -3311,16 +3381,16 @@ function O1(n) {
3311
3381
  }
3312
3382
  }), e;
3313
3383
  }
3314
- var _1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
3315
- function N1(n) {
3316
- var e = n.match(_1);
3384
+ var z1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
3385
+ function V1(n) {
3386
+ var e = n.match(z1);
3317
3387
  return e ? e.map(Number) : [];
3318
3388
  }
3319
- function at(n, e, t, o, i, a, s, r) {
3389
+ function ot(n, e, t, o, i, a, s, r) {
3320
3390
  return new re(n, e, t, o, i, a, s, r);
3321
3391
  }
3322
3392
  function re(n, e, t, o, i, a, s, r) {
3323
- 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 = U1, this.getPoint = B1, this.getDerivative = F1) : (this.getArcLength = D1, this.getPoint = y0, this.getDerivative = R1), this.init();
3393
+ 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 = Z1, this.getPoint = U1, this.getDerivative = H1) : (this.getArcLength = Y1, this.getPoint = w0, this.getDerivative = j1), this.init();
3324
3394
  }
3325
3395
  re.prototype = {
3326
3396
  constructor: re,
@@ -3382,14 +3452,14 @@ re.prototype = {
3382
3452
  return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
3383
3453
  }
3384
3454
  };
3385
- function R1(n, e, t) {
3455
+ function j1(n, e, t) {
3386
3456
  return {
3387
3457
  x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
3388
3458
  y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
3389
3459
  };
3390
3460
  }
3391
- function F1(n, e, t) {
3392
- var o = y0(
3461
+ function H1(n, e, t) {
3462
+ var o = w0(
3393
3463
  [3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
3394
3464
  [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
3395
3465
  t
@@ -3403,15 +3473,15 @@ function Qt(n, e, t, o, i) {
3403
3473
  }
3404
3474
  return s;
3405
3475
  }
3406
- function y0(n, e, t) {
3476
+ function w0(n, e, t) {
3407
3477
  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];
3408
3478
  return { x: o, y: i };
3409
3479
  }
3410
- function B1(n, e, t) {
3480
+ function U1(n, e, t) {
3411
3481
  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];
3412
3482
  return { x: o, y: i };
3413
3483
  }
3414
- function D1(n, e, t) {
3484
+ function Y1(n, e, t) {
3415
3485
  t === void 0 && (t = 1);
3416
3486
  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;
3417
3487
  if (r === 0)
@@ -3421,7 +3491,7 @@ function D1(n, e, t) {
3421
3491
  (h + Math.sqrt(h * h + f)) / (u + Math.sqrt(u * u + f))
3422
3492
  )));
3423
3493
  }
3424
- var q1 = [
3494
+ var $1 = [
3425
3495
  [],
3426
3496
  [],
3427
3497
  [-0.5773502691896257, 0.5773502691896257],
@@ -3447,7 +3517,7 @@ var q1 = [
3447
3517
  [-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],
3448
3518
  [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],
3449
3519
  [-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]
3450
- ], z1 = [
3520
+ ], W1 = [
3451
3521
  [],
3452
3522
  [],
3453
3523
  [1, 1],
@@ -3473,9 +3543,9 @@ var q1 = [
3473
3543
  [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],
3474
3544
  [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],
3475
3545
  [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]
3476
- ], V1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3477
- function j1(n, e) {
3478
- return V1[n][e];
3546
+ ], G1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3547
+ function X1(n, e) {
3548
+ return G1[n][e];
3479
3549
  }
3480
3550
  function oe(n, e, t) {
3481
3551
  var o = t.length - 1, i, a, s;
@@ -3483,7 +3553,7 @@ function oe(n, e, t) {
3483
3553
  return 0;
3484
3554
  if (n === 0) {
3485
3555
  for (a = 0, s = 0; s <= o; s++)
3486
- a += j1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3556
+ a += X1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3487
3557
  return a;
3488
3558
  } else {
3489
3559
  for (i = new Array(o), s = 0; s < o; s++)
@@ -3491,34 +3561,34 @@ function oe(n, e, t) {
3491
3561
  return oe(n - 1, e, i);
3492
3562
  }
3493
3563
  }
3494
- function H1(n, e, t) {
3564
+ function K1(n, e, t) {
3495
3565
  var o = oe(1, t, n), i = oe(1, t, e), a = o * o + i * i;
3496
3566
  return Math.sqrt(a);
3497
3567
  }
3498
- function U1(n, e, t) {
3568
+ function Z1(n, e, t) {
3499
3569
  var o, i, a, s;
3500
3570
  t === void 0 && (t = 1);
3501
3571
  var r = 20;
3502
3572
  for (o = t / 2, i = 0, a = 0; a < r; a++)
3503
- s = o * q1[r][a] + o, i += z1[r][a] * H1(n, e, s);
3573
+ s = o * $1[r][a] + o, i += W1[r][a] * K1(n, e, s);
3504
3574
  return o * i;
3505
3575
  }
3506
3576
  var Et = Math.PI * 2;
3507
- function $e(n, e, t, o) {
3577
+ function Ye(n, e, t, o) {
3508
3578
  var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
3509
3579
  return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
3510
3580
  }
3511
- function $1(n, e, t, o, i, a, s, r, l, c) {
3581
+ function J1(n, e, t, o, i, a, s, r, l, c) {
3512
3582
  var u = c * (n - t) / 2 + l * (e - o) / 2, g = -l * (n - t) / 2 + c * (e - o) / 2, h = s * s, f = r * r, v = u * u, y = g * g, T = h * f - h * y - f * v;
3513
3583
  T < 0 && (T = 0), T /= h * y + f * v, T = Math.sqrt(T) * (i === a ? -1 : 1);
3514
- var L = T * s / r * g, P = T * -r / s * u, S = c * L - l * P + (n + t) / 2, E = l * L + c * P + (e + o) / 2, M = (u - L) / s, I = (g - P) / r, F = (-u - L) / s, Y = (-g - P) / r, z = $e(1, 0, M, I), U = $e(M, I, F, Y);
3515
- return a === 0 && U > 0 && (U -= Et), a === 1 && U < 0 && (U += Et), [S, E, z, U];
3584
+ var C = T * s / r * g, 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 = (g - M) / r, F = (-u - C) / s, U = (-g - M) / r, B = Ye(1, 0, S, k), Y = Ye(S, k, F, U);
3585
+ return a === 0 && Y > 0 && (Y -= Et), a === 1 && Y < 0 && (Y += Et), [L, E, B, Y];
3516
3586
  }
3517
- function W1(n, e) {
3587
+ function Q1(n, e) {
3518
3588
  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);
3519
3589
  return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
3520
3590
  }
3521
- function Y1(n, e, t, o, i, a, s, r, l) {
3591
+ function ti(n, e, t, o, i, a, s, r, l) {
3522
3592
  var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), g = u * (n - r) / 2 + c * (e - l) / 2, h = -c * (n - r) / 2 + u * (e - l) / 2;
3523
3593
  if (g === 0 && h === 0)
3524
3594
  return [];
@@ -3527,27 +3597,27 @@ function Y1(n, e, t, o, i, a, s, r, l) {
3527
3597
  t = Math.abs(t), o = Math.abs(o);
3528
3598
  var f = g * g / (t * t) + h * h / (o * o);
3529
3599
  f > 1 && (t *= Math.sqrt(f), o *= Math.sqrt(f));
3530
- var v = $1(n, e, r, l, a, s, t, o, c, u), y = [], T = v[2], L = v[3], P = Math.max(Math.ceil(Math.abs(L) / (Et / 4)), 1);
3531
- L /= P;
3532
- for (var S = 0; S < P; S++)
3533
- y.push(W1(T, L)), T += L;
3600
+ var v = J1(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);
3601
+ C /= M;
3602
+ for (var L = 0; L < M; L++)
3603
+ y.push(Q1(T, C)), T += C;
3534
3604
  return y.map(function(E) {
3535
- for (var M = 0; M < E.length; M += 2) {
3536
- var I = E[M + 0], F = E[M + 1];
3537
- I *= t, F *= o;
3538
- var Y = u * I - c * F, z = c * I + u * F;
3539
- E[M + 0] = Y + v[0], E[M + 1] = z + v[1];
3605
+ for (var S = 0; S < E.length; S += 2) {
3606
+ var k = E[S + 0], F = E[S + 1];
3607
+ k *= t, F *= o;
3608
+ var U = u * k - c * F, B = c * k + u * F;
3609
+ E[S + 0] = U + v[0], E[S + 1] = B + v[1];
3540
3610
  }
3541
3611
  return E;
3542
3612
  });
3543
3613
  }
3544
- function We(n, e, t, o, i, a, s, r, l) {
3614
+ function $e(n, e, t, o, i, a, s, r, l) {
3545
3615
  return new se(n, e, t, o, i, a, s, r, l);
3546
3616
  }
3547
3617
  function se(n, e, t, o, i, a, s, r, l) {
3548
- var c = 0, u = [], g = [], h = Y1(n, e, t, o, i, a, s, r, l);
3618
+ var c = 0, u = [], g = [], h = ti(n, e, t, o, i, a, s, r, l);
3549
3619
  h.forEach(function(f) {
3550
- var v = new at(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = v.getTotalLength();
3620
+ var v = new ot(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = v.getTotalLength();
3551
3621
  c += y, u.push(y), g.push(v);
3552
3622
  }), this.length = c, this.partialLengths = u, this.curves = g;
3553
3623
  }
@@ -3581,7 +3651,7 @@ se.prototype = {
3581
3651
  return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
3582
3652
  }
3583
3653
  };
3584
- function st(n, e, t, o) {
3654
+ function rt(n, e, t, o) {
3585
3655
  return new _t(n, e, t, o);
3586
3656
  }
3587
3657
  function _t(n, e, t, o) {
@@ -3602,13 +3672,13 @@ _t.prototype.getPropertiesAtLength = function(n) {
3602
3672
  var e = this.getPointAtLength(n), t = this.getTangentAtLength();
3603
3673
  return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
3604
3674
  };
3605
- function G1(n) {
3675
+ function ei(n) {
3606
3676
  var e = 0, t = [], o = [];
3607
3677
  function i(s) {
3608
3678
  if (!s)
3609
3679
  return null;
3610
- for (var r = O1(s), l = [0, 0], c = [0, 0], u, g, h = 0; h < r.length; h++)
3611
- r[h][0] === "M" ? (l = [r[h][1], r[h][2]], g = [l[0], l[1]], o.push(null)) : r[h][0] === "m" ? (l = [r[h][1] + l[0], r[h][2] + l[1]], g = [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 st(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 st(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 st(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 st(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 st(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 st(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(g[0] - l[0], 2) + Math.pow(g[1] - l[1], 2)), o.push(new st(l[0], g[0], l[1], g[1])), l = [g[0], g[1]]) : r[h][0] === "C" ? (u = new at(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 at(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 at(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 at(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 at(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 at(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 at(l[0], l[1], r[h][1], r[h][2], r[h][3], r[h][4]) : u = new st(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 st(l[0] + r[h][1], l[0] + r[h][3], l[1] + r[h][2], l[1] + r[h][4]) : u = new at(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 at(l[0], l[1], 2 * l[0] - c[0], 2 * l[1] - c[1], r[h][1], r[h][2]) : u = new st(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 at(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 st(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 We(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 We(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);
3680
+ for (var r = q1(s), l = [0, 0], c = [0, 0], u, g, h = 0; h < r.length; h++)
3681
+ r[h][0] === "M" ? (l = [r[h][1], r[h][2]], g = [l[0], l[1]], o.push(null)) : r[h][0] === "m" ? (l = [r[h][1] + l[0], r[h][2] + l[1]], g = [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(g[0] - l[0], 2) + Math.pow(g[1] - l[1], 2)), o.push(new rt(l[0], g[0], l[1], g[1])), l = [g[0], g[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 $e(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 $e(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);
3612
3682
  return i;
3613
3683
  }
3614
3684
  i.getTotalLength = function() {
@@ -3631,28 +3701,28 @@ function G1(n) {
3631
3701
  };
3632
3702
  return i(n);
3633
3703
  }
3634
- function qt(n, e) {
3704
+ function zt(n, e) {
3635
3705
  return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
3636
3706
  }
3637
- function v0(n, e, t) {
3707
+ function m0(n, e, t) {
3638
3708
  return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
3639
3709
  }
3640
- function X1(n, e) {
3641
- return qt(n, e) < 1e-9;
3710
+ function ni(n, e) {
3711
+ return zt(n, e) < 1e-9;
3642
3712
  }
3643
- function K1(n, e, t) {
3644
- let o = n.map((i, a) => Z1(i, e[a]));
3713
+ function ii(n, e, t) {
3714
+ let o = n.map((i, a) => ri(i, e[a]));
3645
3715
  return function(i) {
3646
3716
  let a = o.map((s) => s(i));
3647
- return t ? ti(a) : a;
3717
+ return t ? ai(a) : a;
3648
3718
  };
3649
3719
  }
3650
- function Z1(n, e) {
3720
+ function ri(n, e) {
3651
3721
  return function(t) {
3652
3722
  return n.map((o, i) => o + t * (e[i] - o));
3653
3723
  };
3654
3724
  }
3655
- function Bt(n) {
3725
+ function Dt(n) {
3656
3726
  return typeof n == "number" && isFinite(n);
3657
3727
  }
3658
3728
  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).
@@ -3660,20 +3730,20 @@ Example valid ways of supplying a shape would be:
3660
3730
  [[0, 0], [10, 0], [10, 10]]
3661
3731
  "M0,0 L10,0 L10,10Z"
3662
3732
  `;
3663
- function J1(n) {
3664
- return new I1(n).abs();
3733
+ function oi(n) {
3734
+ return new B1(n).abs();
3665
3735
  }
3666
- function Q1(n) {
3736
+ function si(n) {
3667
3737
  return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
3668
3738
  }
3669
- function ti(n) {
3739
+ function ai(n) {
3670
3740
  return "M" + n.join("L") + "Z";
3671
3741
  }
3672
- function ei(n, e) {
3673
- let t = J1(n);
3674
- return ni(t) || ii(t, e);
3742
+ function li(n, e) {
3743
+ let t = oi(n);
3744
+ return hi(t) || ci(t, e);
3675
3745
  }
3676
- function ni(n) {
3746
+ function hi(n) {
3677
3747
  let e = n.segments || [], t = [];
3678
3748
  if (!e.length || e[0][0] !== "M")
3679
3749
  return !1;
@@ -3692,11 +3762,11 @@ function ni(n) {
3692
3762
  }
3693
3763
  return t.length ? { ring: t } : !1;
3694
3764
  }
3695
- function ii(n, e) {
3696
- let t = Q1(n)[0], o = [], i, a, s = 3;
3765
+ function ci(n, e) {
3766
+ let t = si(n)[0], o = [], i, a, s = 3;
3697
3767
  if (!t)
3698
3768
  throw new TypeError(ae);
3699
- a = ri(t), i = a.getTotalLength(), e && Bt(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3769
+ a = ui(t), i = a.getTotalLength(), e && Dt(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3700
3770
  for (let r = 0; r < s; r++) {
3701
3771
  let l = a.getPointAtLength(i * r / s);
3702
3772
  o.push([l.x, l.y]);
@@ -3706,99 +3776,99 @@ function ii(n, e) {
3706
3776
  skipBisect: !0
3707
3777
  };
3708
3778
  }
3709
- function ri(n) {
3779
+ function ui(n) {
3710
3780
  if (typeof window < "u" && window && window.document)
3711
3781
  try {
3712
3782
  let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
3713
3783
  return e.setAttributeNS(null, "d", n), e;
3714
3784
  } catch {
3715
3785
  }
3716
- return G1(n);
3786
+ return ei(n);
3717
3787
  }
3718
- function Ye(n, e) {
3719
- const t = n.length + e, o = b1(n) / e;
3788
+ function We(n, e) {
3789
+ const t = n.length + e, o = P1(n) / e;
3720
3790
  let i = 0, a = 0, s = o / 2;
3721
3791
  for (; n.length < t; ) {
3722
- let r = n[i], l = n[(i + 1) % n.length], c = qt(r, l);
3792
+ let r = n[i], l = n[(i + 1) % n.length], c = zt(r, l);
3723
3793
  if (s <= a + c) {
3724
- n.splice(i + 1, 0, c ? v0(r, l, (s - a) / c) : r.slice(0)), s += o;
3794
+ n.splice(i + 1, 0, c ? m0(r, l, (s - a) / c) : r.slice(0)), s += o;
3725
3795
  continue;
3726
3796
  }
3727
3797
  a += c, i++;
3728
3798
  }
3729
3799
  }
3730
- function oi(n, e = 1 / 0) {
3800
+ function fi(n, e = 1 / 0) {
3731
3801
  for (let t = 0; t < n.length; t++) {
3732
3802
  let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
3733
- for (; qt(o, i) > e; )
3734
- i = v0(o, i, 0.5), n.splice(t + 1, 0, i);
3803
+ for (; zt(o, i) > e; )
3804
+ i = m0(o, i, 0.5), n.splice(t + 1, 0, i);
3735
3805
  }
3736
3806
  }
3737
3807
  function Ge(n, e) {
3738
3808
  let t, o, i;
3739
3809
  if (typeof n == "string") {
3740
- let a = ei(n, e);
3810
+ let a = li(n, e);
3741
3811
  n = a.ring, i = a.skipBisect;
3742
3812
  } else if (!Array.isArray(n))
3743
3813
  throw new TypeError(ae);
3744
- if (t = n.slice(0), !si(t))
3814
+ if (t = n.slice(0), !di(t))
3745
3815
  throw new TypeError(ae);
3746
- return t.length > 1 && X1(t[0], t[t.length - 1]) && t.pop(), o = m1(t), o > 0 && t.reverse(), !i && e && Bt(e) && e > 0 && oi(t, e), t;
3816
+ return t.length > 1 && ni(t[0], t[t.length - 1]) && t.pop(), o = S1(t), o > 0 && t.reverse(), !i && e && Dt(e) && e > 0 && fi(t, e), t;
3747
3817
  }
3748
- function si(n) {
3818
+ function di(n) {
3749
3819
  return n.every(function(e) {
3750
- return Array.isArray(e) && e.length >= 2 && Bt(e[0]) && Bt(e[1]);
3820
+ return Array.isArray(e) && e.length >= 2 && Dt(e[0]) && Dt(e[1]);
3751
3821
  });
3752
3822
  }
3753
- function ai(n, e) {
3823
+ function gi(n, e) {
3754
3824
  let t = n.length, o = 1 / 0, i, a, s;
3755
3825
  for (let r = 0; r < t; r++)
3756
3826
  a = 0, e.forEach(function(l, c) {
3757
- let u = qt(n[(r + c) % t], l);
3827
+ let u = zt(n[(r + c) % t], l);
3758
3828
  a += u * u;
3759
3829
  }), a < o && (o = a, i = r);
3760
3830
  i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
3761
3831
  }
3762
- function li(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3763
- let i = Ge(n, t), a = Ge(e, t), s = hi(i, a, o);
3832
+ function pi(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3833
+ let i = Ge(n, t), a = Ge(e, t), s = xi(i, a, o);
3764
3834
  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);
3765
3835
  }
3766
- function hi(n, e, t) {
3836
+ function xi(n, e, t) {
3767
3837
  let o;
3768
- return o = n.length - e.length, Ye(n, o < 0 ? o * -1 : 0), Ye(e, o > 0 ? o : 0), ai(n, e), K1(n, e, t);
3838
+ return o = n.length - e.length, We(n, o < 0 ? o * -1 : 0), We(e, o > 0 ? o : 0), gi(n, e), ii(n, e, t);
3769
3839
  }
3770
- var Nt = { exports: {} }, Xe;
3771
- function ci() {
3772
- if (Xe) return Nt.exports;
3773
- Xe = 1, Nt.exports = n, Nt.exports.default = n;
3840
+ var Rt = { exports: {} }, Xe;
3841
+ function yi() {
3842
+ if (Xe) return Rt.exports;
3843
+ Xe = 1, Rt.exports = n, Rt.exports.default = n;
3774
3844
  function n(d, x, p) {
3775
3845
  p = p || 2;
3776
3846
  var w = x && x.length, m = w ? x[0] * p : d.length, b = e(d, 0, m, p, !0), A = [];
3777
3847
  if (!b || b.next === b.prev) return A;
3778
- var C, N, O, W, j, B, X;
3848
+ var P, R, O, W, j, D, X;
3779
3849
  if (w && (b = l(d, x, b, p)), d.length > 80 * p) {
3780
- C = O = d[0], N = W = d[1];
3850
+ P = O = d[0], R = W = d[1];
3781
3851
  for (var H = p; H < m; H += p)
3782
- j = d[H], B = d[H + 1], j < C && (C = j), B < N && (N = B), j > O && (O = j), B > W && (W = B);
3783
- X = Math.max(O - C, W - N), X = X !== 0 ? 32767 / X : 0;
3852
+ j = d[H], D = d[H + 1], j < P && (P = j), D < R && (R = D), j > O && (O = j), D > W && (W = D);
3853
+ X = Math.max(O - P, W - R), X = X !== 0 ? 32767 / X : 0;
3784
3854
  }
3785
- return o(b, A, p, C, N, X, 0), A;
3855
+ return o(b, A, p, P, R, X, 0), A;
3786
3856
  }
3787
3857
  function e(d, x, p, w, m) {
3788
3858
  var b, A;
3789
- if (m === zt(d, x, p, w) > 0)
3790
- for (b = x; b < p; b += w) A = rt(b, d[b], d[b + 1], A);
3859
+ if (m === Vt(d, x, p, w) > 0)
3860
+ for (b = x; b < p; b += w) A = Q(b, d[b], d[b + 1], A);
3791
3861
  else
3792
- for (b = p - w; b >= x; b -= w) A = rt(b, d[b], d[b + 1], A);
3793
- return A && E(A, A.next) && (ot(A), A = A.next), A;
3862
+ for (b = p - w; b >= x; b -= w) A = Q(b, d[b], d[b + 1], A);
3863
+ return A && E(A, A.next) && (ft(A), A = A.next), A;
3794
3864
  }
3795
3865
  function t(d, x) {
3796
3866
  if (!d) return d;
3797
3867
  x || (x = d);
3798
3868
  var p = d, w;
3799
3869
  do
3800
- if (w = !1, !p.steiner && (E(p, p.next) || S(p.prev, p, p.next) === 0)) {
3801
- if (ot(p), p = x = p.prev, p === p.next) break;
3870
+ if (w = !1, !p.steiner && (E(p, p.next) || L(p.prev, p, p.next) === 0)) {
3871
+ if (ft(p), p = x = p.prev, p === p.next) break;
3802
3872
  w = !0;
3803
3873
  } else
3804
3874
  p = p.next;
@@ -3808,12 +3878,12 @@ function ci() {
3808
3878
  function o(d, x, p, w, m, b, A) {
3809
3879
  if (d) {
3810
3880
  !A && b && f(d, w, m, b);
3811
- for (var C = d, N, O; d.prev !== d.next; ) {
3812
- if (N = d.prev, O = d.next, b ? a(d, w, m, b) : i(d)) {
3813
- x.push(N.i / p | 0), x.push(d.i / p | 0), x.push(O.i / p | 0), ot(d), d = O.next, C = O.next;
3881
+ for (var P = d, R, O; d.prev !== d.next; ) {
3882
+ if (R = d.prev, O = d.next, b ? a(d, w, m, b) : i(d)) {
3883
+ x.push(R.i / p | 0), x.push(d.i / p | 0), x.push(O.i / p | 0), ft(d), d = O.next, P = O.next;
3814
3884
  continue;
3815
3885
  }
3816
- if (d = O, d === C) {
3886
+ if (d = O, d === P) {
3817
3887
  A ? A === 1 ? (d = s(t(d), x, p), o(d, x, p, w, m, b, 2)) : A === 2 && r(d, x, p, w, m, b) : o(t(d), x, p, w, m, b, 1);
3818
3888
  break;
3819
3889
  }
@@ -3822,27 +3892,27 @@ function ci() {
3822
3892
  }
3823
3893
  function i(d) {
3824
3894
  var x = d.prev, p = d, w = d.next;
3825
- if (S(x, p, w) >= 0) return !1;
3826
- for (var m = x.x, b = p.x, A = w.x, C = x.y, N = p.y, O = w.y, W = m < b ? m < A ? m : A : b < A ? b : A, j = C < N ? C < O ? C : O : N < O ? N : O, B = m > b ? m > A ? m : A : b > A ? b : A, X = C > N ? C > O ? C : O : N > O ? N : O, H = w.next; H !== x; ) {
3827
- if (H.x >= W && H.x <= B && H.y >= j && H.y <= X && L(m, C, b, N, A, O, H.x, H.y) && S(H.prev, H, H.next) >= 0) return !1;
3895
+ if (L(x, p, w) >= 0) return !1;
3896
+ for (var m = x.x, b = p.x, A = w.x, P = x.y, R = p.y, O = w.y, W = m < b ? m < A ? m : A : b < A ? b : A, j = 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; ) {
3897
+ if (H.x >= W && H.x <= D && H.y >= j && H.y <= X && C(m, P, b, R, A, O, H.x, H.y) && L(H.prev, H, H.next) >= 0) return !1;
3828
3898
  H = H.next;
3829
3899
  }
3830
3900
  return !0;
3831
3901
  }
3832
3902
  function a(d, x, p, w) {
3833
3903
  var m = d.prev, b = d, A = d.next;
3834
- if (S(m, b, A) >= 0) return !1;
3835
- for (var C = m.x, N = b.x, O = A.x, W = m.y, j = b.y, B = A.y, X = C < N ? C < O ? C : O : N < O ? N : O, H = W < j ? W < B ? W : B : j < B ? j : B, Ct = C > N ? C > O ? C : O : N > O ? N : O, St = W > j ? W > B ? W : B : j > B ? j : B, ye = y(X, H, x, p, w), ve = y(Ct, St, x, p, w), D = d.prevZ, q = d.nextZ; D && D.z >= ye && q && q.z <= ve; ) {
3836
- if (D.x >= X && D.x <= Ct && D.y >= H && D.y <= St && D !== m && D !== A && L(C, W, N, j, O, B, D.x, D.y) && S(D.prev, D, D.next) >= 0 || (D = D.prevZ, q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && L(C, W, N, j, O, B, q.x, q.y) && S(q.prev, q, q.next) >= 0)) return !1;
3837
- q = q.nextZ;
3904
+ if (L(m, b, A) >= 0) return !1;
3905
+ for (var P = m.x, R = b.x, O = A.x, W = m.y, j = b.y, D = A.y, X = P < R ? P < O ? P : O : R < O ? R : O, H = W < j ? W < D ? W : D : j < D ? j : D, Ct = P > R ? P > O ? P : O : R > O ? R : O, St = W > j ? W > D ? W : D : j > D ? j : D, ye = y(X, H, x, p, w), ve = y(Ct, St, x, p, w), q = d.prevZ, z = d.nextZ; q && q.z >= ye && z && z.z <= ve; ) {
3906
+ if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && C(P, W, R, j, 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, j, O, D, z.x, z.y) && L(z.prev, z, z.next) >= 0)) return !1;
3907
+ z = z.nextZ;
3838
3908
  }
3839
- for (; D && D.z >= ye; ) {
3840
- if (D.x >= X && D.x <= Ct && D.y >= H && D.y <= St && D !== m && D !== A && L(C, W, N, j, O, B, D.x, D.y) && S(D.prev, D, D.next) >= 0) return !1;
3841
- D = D.prevZ;
3909
+ for (; q && q.z >= ye; ) {
3910
+ if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && C(P, W, R, j, O, D, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
3911
+ q = q.prevZ;
3842
3912
  }
3843
- for (; q && q.z <= ve; ) {
3844
- if (q.x >= X && q.x <= Ct && q.y >= H && q.y <= St && q !== m && q !== A && L(C, W, N, j, O, B, q.x, q.y) && S(q.prev, q, q.next) >= 0) return !1;
3845
- q = q.nextZ;
3913
+ for (; z && z.z <= ve; ) {
3914
+ if (z.x >= X && z.x <= Ct && z.y >= H && z.y <= St && z !== m && z !== A && C(P, W, R, j, O, D, z.x, z.y) && L(z.prev, z, z.next) >= 0) return !1;
3915
+ z = z.nextZ;
3846
3916
  }
3847
3917
  return !0;
3848
3918
  }
@@ -3850,28 +3920,28 @@ function ci() {
3850
3920
  var w = d;
3851
3921
  do {
3852
3922
  var m = w.prev, b = w.next.next;
3853
- !E(m, b) && M(m, w, w.next, b) && z(m, b) && z(b, m) && (x.push(m.i / p | 0), x.push(w.i / p | 0), x.push(b.i / p | 0), ot(w), ot(w.next), w = d = b), w = w.next;
3923
+ !E(m, b) && S(m, w, w.next, b) && B(m, b) && B(b, m) && (x.push(m.i / p | 0), x.push(w.i / p | 0), x.push(b.i / p | 0), ft(w), ft(w.next), w = d = b), w = w.next;
3854
3924
  } while (w !== d);
3855
3925
  return t(w);
3856
3926
  }
3857
3927
  function r(d, x, p, w, m, b) {
3858
3928
  var A = d;
3859
3929
  do {
3860
- for (var C = A.next.next; C !== A.prev; ) {
3861
- if (A.i !== C.i && P(A, C)) {
3862
- var N = it(A, C);
3863
- A = t(A, A.next), N = t(N, N.next), o(A, x, p, w, m, b, 0), o(N, x, p, w, m, b, 0);
3930
+ for (var P = A.next.next; P !== A.prev; ) {
3931
+ if (A.i !== P.i && M(A, P)) {
3932
+ var R = lt(A, P);
3933
+ A = t(A, A.next), R = t(R, R.next), o(A, x, p, w, m, b, 0), o(R, x, p, w, m, b, 0);
3864
3934
  return;
3865
3935
  }
3866
- C = C.next;
3936
+ P = P.next;
3867
3937
  }
3868
3938
  A = A.next;
3869
3939
  } while (A !== d);
3870
3940
  }
3871
3941
  function l(d, x, p, w) {
3872
- var m = [], b, A, C, N, O;
3942
+ var m = [], b, A, P, R, O;
3873
3943
  for (b = 0, A = x.length; b < A; b++)
3874
- C = x[b] * w, N = b < A - 1 ? x[b + 1] * w : d.length, O = e(d, C, N, w, !1), O === O.next && (O.steiner = !0), m.push(T(O));
3944
+ 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));
3875
3945
  for (m.sort(c), b = 0; b < m.length; b++)
3876
3946
  p = u(m[b], p);
3877
3947
  return p;
@@ -3883,29 +3953,29 @@ function ci() {
3883
3953
  var p = g(d, x);
3884
3954
  if (!p)
3885
3955
  return x;
3886
- var w = it(p, d);
3956
+ var w = lt(p, d);
3887
3957
  return t(w, w.next), t(p, p.next);
3888
3958
  }
3889
3959
  function g(d, x) {
3890
3960
  var p = x, w = d.x, m = d.y, b = -1 / 0, A;
3891
3961
  do {
3892
3962
  if (m <= p.y && m >= p.next.y && p.next.y !== p.y) {
3893
- var C = p.x + (m - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
3894
- if (C <= w && C > b && (b = C, A = p.x < p.next.x ? p : p.next, C === w))
3963
+ var P = p.x + (m - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
3964
+ if (P <= w && P > b && (b = P, A = p.x < p.next.x ? p : p.next, P === w))
3895
3965
  return A;
3896
3966
  }
3897
3967
  p = p.next;
3898
3968
  } while (p !== x);
3899
3969
  if (!A) return null;
3900
- var N = A, O = A.x, W = A.y, j = 1 / 0, B;
3970
+ var R = A, O = A.x, W = A.y, j = 1 / 0, D;
3901
3971
  p = A;
3902
3972
  do
3903
- w >= p.x && p.x >= O && w !== p.x && L(m < W ? w : b, m, O, W, m < W ? b : w, m, p.x, p.y) && (B = Math.abs(m - p.y) / (w - p.x), z(p, d) && (B < j || B === j && (p.x > A.x || p.x === A.x && h(A, p))) && (A = p, j = B)), p = p.next;
3904
- while (p !== N);
3973
+ w >= p.x && p.x >= O && w !== p.x && C(m < W ? w : b, m, O, W, m < W ? b : w, m, p.x, p.y) && (D = Math.abs(m - p.y) / (w - p.x), B(p, d) && (D < j || D === j && (p.x > A.x || p.x === A.x && h(A, p))) && (A = p, j = D)), p = p.next;
3974
+ while (p !== R);
3905
3975
  return A;
3906
3976
  }
3907
3977
  function h(d, x) {
3908
- return S(d.prev, d, x.prev) < 0 && S(x.next, d, d.next) < 0;
3978
+ return L(d.prev, d, x.prev) < 0 && L(x.next, d, d.next) < 0;
3909
3979
  }
3910
3980
  function f(d, x, p, w) {
3911
3981
  var m = d;
@@ -3915,13 +3985,13 @@ function ci() {
3915
3985
  m.prevZ.nextZ = null, m.prevZ = null, v(m);
3916
3986
  }
3917
3987
  function v(d) {
3918
- var x, p, w, m, b, A, C, N, O = 1;
3988
+ var x, p, w, m, b, A, P, R, O = 1;
3919
3989
  do {
3920
3990
  for (p = d, d = null, b = null, A = 0; p; ) {
3921
- for (A++, w = p, C = 0, x = 0; x < O && (C++, w = w.nextZ, !!w); x++)
3991
+ for (A++, w = p, P = 0, x = 0; x < O && (P++, w = w.nextZ, !!w); x++)
3922
3992
  ;
3923
- for (N = O; C > 0 || N > 0 && w; )
3924
- C !== 0 && (N === 0 || !w || p.z <= w.z) ? (m = p, p = p.nextZ, C--) : (m = w, w = w.nextZ, N--), b ? b.nextZ = m : d = m, m.prevZ = b, b = m;
3993
+ for (R = O; P > 0 || R > 0 && w; )
3994
+ P !== 0 && (R === 0 || !w || p.z <= w.z) ? (m = p, p = p.nextZ, P--) : (m = w, w = w.nextZ, R--), b ? b.nextZ = m : d = m, m.prevZ = b, b = m;
3925
3995
  p = w;
3926
3996
  }
3927
3997
  b.nextZ = null, O *= 2;
@@ -3938,80 +4008,80 @@ function ci() {
3938
4008
  while (x !== d);
3939
4009
  return p;
3940
4010
  }
3941
- function L(d, x, p, w, m, b, A, C) {
3942
- return (m - A) * (x - C) >= (d - A) * (b - C) && (d - A) * (w - C) >= (p - A) * (x - C) && (p - A) * (b - C) >= (m - A) * (w - C);
4011
+ function C(d, x, p, w, m, b, A, P) {
4012
+ return (m - A) * (x - P) >= (d - A) * (b - P) && (d - A) * (w - P) >= (p - A) * (x - P) && (p - A) * (b - P) >= (m - A) * (w - P);
3943
4013
  }
3944
- function P(d, x) {
3945
- return d.next.i !== x.i && d.prev.i !== x.i && !Y(d, x) && // dones't intersect other edges
3946
- (z(d, x) && z(x, d) && U(d, x) && // locally visible
3947
- (S(d.prev, d, x.prev) || S(d, x.prev, x)) || // does not create opposite-facing sectors
3948
- E(d, x) && S(d.prev, d, d.next) > 0 && S(x.prev, x, x.next) > 0);
4014
+ function M(d, x) {
4015
+ return d.next.i !== x.i && d.prev.i !== x.i && !U(d, x) && // dones't intersect other edges
4016
+ (B(d, x) && B(x, d) && Y(d, x) && // locally visible
4017
+ (L(d.prev, d, x.prev) || L(d, x.prev, x)) || // does not create opposite-facing sectors
4018
+ E(d, x) && L(d.prev, d, d.next) > 0 && L(x.prev, x, x.next) > 0);
3949
4019
  }
3950
- function S(d, x, p) {
4020
+ function L(d, x, p) {
3951
4021
  return (x.y - d.y) * (p.x - x.x) - (x.x - d.x) * (p.y - x.y);
3952
4022
  }
3953
4023
  function E(d, x) {
3954
4024
  return d.x === x.x && d.y === x.y;
3955
4025
  }
3956
- function M(d, x, p, w) {
3957
- var m = F(S(d, x, p)), b = F(S(d, x, w)), A = F(S(p, w, d)), C = F(S(p, w, x));
3958
- return !!(m !== b && A !== C || m === 0 && I(d, p, x) || b === 0 && I(d, w, x) || A === 0 && I(p, d, w) || C === 0 && I(p, x, w));
4026
+ function S(d, x, p, w) {
4027
+ var m = F(L(d, x, p)), b = F(L(d, x, w)), A = F(L(p, w, d)), P = F(L(p, w, x));
4028
+ return !!(m !== b && A !== P || m === 0 && k(d, p, x) || b === 0 && k(d, w, x) || A === 0 && k(p, d, w) || P === 0 && k(p, x, w));
3959
4029
  }
3960
- function I(d, x, p) {
4030
+ function k(d, x, p) {
3961
4031
  return x.x <= Math.max(d.x, p.x) && x.x >= Math.min(d.x, p.x) && x.y <= Math.max(d.y, p.y) && x.y >= Math.min(d.y, p.y);
3962
4032
  }
3963
4033
  function F(d) {
3964
4034
  return d > 0 ? 1 : d < 0 ? -1 : 0;
3965
4035
  }
3966
- function Y(d, x) {
4036
+ function U(d, x) {
3967
4037
  var p = d;
3968
4038
  do {
3969
- if (p.i !== d.i && p.next.i !== d.i && p.i !== x.i && p.next.i !== x.i && M(p, p.next, d, x)) return !0;
4039
+ if (p.i !== d.i && p.next.i !== d.i && p.i !== x.i && p.next.i !== x.i && S(p, p.next, d, x)) return !0;
3970
4040
  p = p.next;
3971
4041
  } while (p !== d);
3972
4042
  return !1;
3973
4043
  }
3974
- function z(d, x) {
3975
- return S(d.prev, d, d.next) < 0 ? S(d, x, d.next) >= 0 && S(d, d.prev, x) >= 0 : S(d, x, d.prev) < 0 || S(d, d.next, x) < 0;
4044
+ function B(d, x) {
4045
+ 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;
3976
4046
  }
3977
- function U(d, x) {
4047
+ function Y(d, x) {
3978
4048
  var p = d, w = !1, m = (d.x + x.x) / 2, b = (d.y + x.y) / 2;
3979
4049
  do
3980
4050
  p.y > b != p.next.y > b && p.next.y !== p.y && m < (p.next.x - p.x) * (b - p.y) / (p.next.y - p.y) + p.x && (w = !w), p = p.next;
3981
4051
  while (p !== d);
3982
4052
  return w;
3983
4053
  }
3984
- function it(d, x) {
3985
- var p = new Z(d.i, d.x, d.y), w = new Z(x.i, x.x, x.y), m = d.next, b = x.prev;
4054
+ function lt(d, x) {
4055
+ var p = new it(d.i, d.x, d.y), w = new it(x.i, x.x, x.y), m = d.next, b = x.prev;
3986
4056
  return d.next = x, x.prev = d, p.next = m, m.prev = p, w.next = p, p.prev = w, b.next = w, w.prev = b, w;
3987
4057
  }
3988
- function rt(d, x, p, w) {
3989
- var m = new Z(d, x, p);
4058
+ function Q(d, x, p, w) {
4059
+ var m = new it(d, x, p);
3990
4060
  return w ? (m.next = w.next, m.prev = w, w.next.prev = m, w.next = m) : (m.prev = m, m.next = m), m;
3991
4061
  }
3992
- function ot(d) {
4062
+ function ft(d) {
3993
4063
  d.next.prev = d.prev, d.prev.next = d.next, d.prevZ && (d.prevZ.nextZ = d.nextZ), d.nextZ && (d.nextZ.prevZ = d.prevZ);
3994
4064
  }
3995
- function Z(d, x, p) {
4065
+ function it(d, x, p) {
3996
4066
  this.i = d, this.x = x, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
3997
4067
  }
3998
4068
  n.deviation = function(d, x, p, w) {
3999
- var m = x && x.length, b = m ? x[0] * p : d.length, A = Math.abs(zt(d, 0, b, p));
4069
+ var m = x && x.length, b = m ? x[0] * p : d.length, A = Math.abs(Vt(d, 0, b, p));
4000
4070
  if (m)
4001
- for (var C = 0, N = x.length; C < N; C++) {
4002
- var O = x[C] * p, W = C < N - 1 ? x[C + 1] * p : d.length;
4003
- A -= Math.abs(zt(d, O, W, p));
4071
+ for (var P = 0, R = x.length; P < R; P++) {
4072
+ var O = x[P] * p, W = P < R - 1 ? x[P + 1] * p : d.length;
4073
+ A -= Math.abs(Vt(d, O, W, p));
4004
4074
  }
4005
4075
  var j = 0;
4006
- for (C = 0; C < w.length; C += 3) {
4007
- var B = w[C] * p, X = w[C + 1] * p, H = w[C + 2] * p;
4076
+ for (P = 0; P < w.length; P += 3) {
4077
+ var D = w[P] * p, X = w[P + 1] * p, H = w[P + 2] * p;
4008
4078
  j += Math.abs(
4009
- (d[B] - d[H]) * (d[X + 1] - d[B + 1]) - (d[B] - d[X]) * (d[H + 1] - d[B + 1])
4079
+ (d[D] - d[H]) * (d[X + 1] - d[D + 1]) - (d[D] - d[X]) * (d[H + 1] - d[D + 1])
4010
4080
  );
4011
4081
  }
4012
4082
  return A === 0 && j === 0 ? 0 : Math.abs((j - A) / A);
4013
4083
  };
4014
- function zt(d, x, p, w) {
4084
+ function Vt(d, x, p, w) {
4015
4085
  for (var m = 0, b = x, A = p - w; b < p; b += w)
4016
4086
  m += (d[A] - d[b]) * (d[b + 1] + d[A + 1]), A = b;
4017
4087
  return m;
@@ -4023,14 +4093,14 @@ function ci() {
4023
4093
  m > 0 && (w += d[m - 1].length, p.holes.push(w));
4024
4094
  }
4025
4095
  return p;
4026
- }, Nt.exports;
4096
+ }, Rt.exports;
4027
4097
  }
4028
- ci();
4029
- function w0(n, e) {
4098
+ yi();
4099
+ function b0(n, e) {
4030
4100
  return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
4031
4101
  }
4032
- function ui(n) {
4033
- return n.length === 1 && (n = fi(n)), {
4102
+ function vi(n) {
4103
+ return n.length === 1 && (n = wi(n)), {
4034
4104
  left: function(e, t, o, i) {
4035
4105
  for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
4036
4106
  var a = o + i >>> 1;
@@ -4047,20 +4117,20 @@ function ui(n) {
4047
4117
  }
4048
4118
  };
4049
4119
  }
4050
- function fi(n) {
4120
+ function wi(n) {
4051
4121
  return function(e, t) {
4052
- return w0(n(e), t);
4122
+ return b0(n(e), t);
4053
4123
  };
4054
4124
  }
4055
- ui(w0);
4056
- function Bi(n, e, t = 3) {
4057
- const o = li(n, e, { maxSegmentLength: t });
4125
+ vi(b0);
4126
+ function Hi(n, e, t = 3) {
4127
+ const o = pi(n, e, { maxSegmentLength: t });
4058
4128
  return {
4059
4129
  check: (i) => typeof i == "string",
4060
4130
  interpolate: (i, a, s) => o(s)
4061
4131
  };
4062
4132
  }
4063
- function Di(n) {
4133
+ function Ui(n) {
4064
4134
  const e = (o) => n.width * o, t = (o) => n.height * o;
4065
4135
  return {
4066
4136
  scaleX: e,
@@ -4071,7 +4141,7 @@ function Di(n) {
4071
4141
  })
4072
4142
  };
4073
4143
  }
4074
- function qi(n) {
4144
+ function Yi(n) {
4075
4145
  const e = [];
4076
4146
  if (n.isAllKey) {
4077
4147
  for (let t = 0; t <= n.animations.length; t++)
@@ -4083,51 +4153,51 @@ function qi(n) {
4083
4153
  }), n.isEndKey && e[e.length - 1] !== n.animations.length && e.push(n.animations.length), e;
4084
4154
  }
4085
4155
  export {
4086
- yt as Alignment,
4087
- lt as Anchor,
4156
+ vt as Alignment,
4157
+ st as Anchor,
4088
4158
  ce as Animate,
4089
- mi as Arrow,
4090
- Oi as BrowserCanvasRenderer,
4091
- bi as Circle,
4159
+ Si as Arrow,
4160
+ qi as BrowserCanvasRenderer,
4161
+ Pi as Circle,
4092
4162
  G as Color,
4093
4163
  he as Easing,
4094
- gi as FadeIn,
4095
- pi as FadeOut,
4096
- G0 as FontStyle,
4097
- K0 as FontWeight,
4098
- Ai as Grid,
4164
+ bi as FadeIn,
4165
+ Ai as FadeOut,
4166
+ K0 as FontStyle,
4167
+ J0 as FontWeight,
4168
+ Ei as Grid,
4099
4169
  we as Group,
4100
- xi as Hide,
4101
- vi as IFrame,
4102
- Ti as Image,
4103
- Mi as Line,
4104
- Li as Mask,
4170
+ Ti as Hide,
4171
+ Mi as IFrame,
4172
+ Ii as Image,
4173
+ ki as Line,
4174
+ Oi as Mask,
4105
4175
  V as ObjectType,
4106
- Fi as Opaque,
4107
- Ci as Path,
4108
- _i as Pause,
4109
- Si as Polygon,
4176
+ ji as Opaque,
4177
+ _i as Path,
4178
+ zi as Pause,
4179
+ Ni as Polygon,
4110
4180
  $ as Position,
4111
- dn as Presentation,
4112
- Pi as Rectangle,
4113
- Ii as SVG,
4114
- wi as ScreenCapture,
4115
- yi as Show,
4116
- Q as Size,
4117
- Ni as Slide,
4181
+ mn as Presentation,
4182
+ Ri as Rectangle,
4183
+ Bi as SVG,
4184
+ Ci as ScreenCapture,
4185
+ Li as Show,
4186
+ K as Size,
4187
+ sn as Slide,
4118
4188
  nt as SlideObject,
4119
4189
  Ze as SlideWebExtra,
4120
- Ei as Spotlight,
4121
- tn as Text,
4122
- Ri as TextUnit,
4123
- Y0 as Transparent,
4190
+ Fi as Spotlight,
4191
+ nn as Text,
4192
+ Vi as TextUnit,
4193
+ X0 as Transparent,
4124
4194
  Ke as Update,
4125
- ki as Variable,
4126
- qi as getKeySlideBuildIndices,
4127
- Di as getSizingFunctions,
4128
- Bi as getSmoothPathInterpolator,
4129
- Q0 as getTextContentLength,
4130
- xn as interpolateColor,
4131
- vn as interpolateNumber
4195
+ Di as Variable,
4196
+ Yi as getKeySlideBuildIndices,
4197
+ Ui as getSizingFunctions,
4198
+ Hi as getSmoothPathInterpolator,
4199
+ en as getTextContentLength,
4200
+ Tn as interpolateColor,
4201
+ Mn as interpolateNumber
4132
4202
  };
4133
4203
  //# sourceMappingURL=presenter.mjs.map