presenter 0.8.5 → 0.8.6

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 Q0 = Object.defineProperty;
2
- var J0 = (n, e, t) => e in n ? Q0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var k = (n, e, t) => J0(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var ie = Object.defineProperty;
2
+ var oe = (n, e, t) => e in n ? ie(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var I = (n, e, t) => oe(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  const ft = {
5
5
  /** Represents an animated change in an object's properties. */
6
6
  ANIMATE: "Animate",
@@ -9,52 +9,52 @@ const ft = {
9
9
  /** Represents an immediate update to an object's properties without animation. */
10
10
  UPDATE: "Update"
11
11
  };
12
- function te(n) {
12
+ function se(n) {
13
13
  return n * n * n;
14
14
  }
15
- function ee(n) {
15
+ function ae(n) {
16
16
  return --n * n * n + 1;
17
17
  }
18
- function ne(n) {
18
+ function he(n) {
19
19
  return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
20
20
  }
21
- var r0 = 1.70158;
21
+ var i0 = 1.70158;
22
22
  (function n(e) {
23
23
  e = +e;
24
24
  function t(o) {
25
25
  return (o = +o) * o * (e * (o - 1) + o);
26
26
  }
27
27
  return t.overshoot = n, t;
28
- })(r0);
28
+ })(i0);
29
29
  (function n(e) {
30
30
  e = +e;
31
31
  function t(o) {
32
32
  return --o * o * ((o + 1) * e + o) + 1;
33
33
  }
34
34
  return t.overshoot = n, t;
35
- })(r0);
36
- var re = (function n(e) {
35
+ })(i0);
36
+ var le = (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;
40
40
  }
41
41
  return t.overshoot = n, t;
42
- })(r0);
43
- const i0 = {
42
+ })(i0);
43
+ const o0 = {
44
44
  LINEAR: (n) => n,
45
- CUBIC: ne,
46
- CUBIC_IN: te,
47
- CUBIC_OUT: ee,
48
- BACK_IN_OUT: re.overshoot(0.8)
49
- }, ie = i0.LINEAR;
50
- function o0(n, e, t = {}) {
45
+ CUBIC: he,
46
+ CUBIC_IN: se,
47
+ CUBIC_OUT: ae,
48
+ BACK_IN_OUT: le.overshoot(0.8)
49
+ }, ce = o0.LINEAR;
50
+ function s0(n, e, t = {}) {
51
51
  return {
52
52
  type: ft.ANIMATE,
53
53
  object: n,
54
54
  props: e,
55
55
  delay: 0,
56
56
  duration: 1e3,
57
- easing: ie,
57
+ easing: ce,
58
58
  block: !1,
59
59
  interpolators: null,
60
60
  isKey: !1,
@@ -62,21 +62,21 @@ function o0(n, e, t = {}) {
62
62
  ...typeof t == "number" ? { duration: t } : t
63
63
  };
64
64
  }
65
- function Tn(n, e = {}) {
66
- return o0(n, { opacity: 1 }, {
65
+ function Nn(n, e = {}) {
66
+ return s0(n, { opacity: 1 }, {
67
67
  duration: 500,
68
- easing: i0.CUBIC,
68
+ easing: o0.CUBIC,
69
69
  ...typeof e == "number" ? { duration: e } : e
70
70
  });
71
71
  }
72
- function Cn(n, e = {}) {
73
- return o0(n, { opacity: 0 }, {
72
+ function Rn(n, e = {}) {
73
+ return s0(n, { opacity: 0 }, {
74
74
  duration: 500,
75
- easing: i0.CUBIC,
75
+ easing: o0.CUBIC,
76
76
  ...typeof e == "number" ? { duration: e } : e
77
77
  });
78
78
  }
79
- function F0(n, e, t = {}) {
79
+ function D0(n, e, t = {}) {
80
80
  return {
81
81
  type: ft.UPDATE,
82
82
  isKey: !1,
@@ -86,11 +86,11 @@ function F0(n, e, t = {}) {
86
86
  ...t
87
87
  };
88
88
  }
89
- function Pn(n) {
90
- return F0(n, { opacity: 0 });
89
+ function Fn(n) {
90
+ return D0(n, { opacity: 0 });
91
91
  }
92
- function En(n) {
93
- return F0(n, { opacity: 1 });
92
+ function Bn(n) {
93
+ return D0(n, { opacity: 1 });
94
94
  }
95
95
  const ot = {
96
96
  TOP_LEFT: "TopLeft",
@@ -139,7 +139,7 @@ G.RED = G(255, 0, 0);
139
139
  G.TRANSPARENT = G(0, 0, 0, 0);
140
140
  G.WHITE = G(255, 255, 255);
141
141
  const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
142
- function N0(n = null) {
142
+ function q0(n = null) {
143
143
  return {
144
144
  content: null,
145
145
  setup: null,
@@ -151,14 +151,14 @@ function N0(n = null) {
151
151
  ...n
152
152
  };
153
153
  }
154
- function R0(n, e = null) {
154
+ function z0(n, e = null) {
155
155
  return n.alpha * (e ?? 1);
156
156
  }
157
- function Et(n, e = null) {
158
- const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(R0(n, e) * 255);
157
+ function St(n, e = null) {
158
+ const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(z0(n, e) * 255);
159
159
  return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
160
160
  }
161
- function Sn(n = null) {
161
+ function Dn(n = null) {
162
162
  const {
163
163
  url: e = "https://wikipedia.org/",
164
164
  backgroundColor: t = G.TRANSPARENT,
@@ -168,30 +168,30 @@ function Sn(n = null) {
168
168
  scale: s = 1,
169
169
  anchor: r = ht,
170
170
  height: h = 1e3,
171
- width: u = 1e3,
172
- x: c = 0,
173
- y: d = 0
171
+ width: c = 1e3,
172
+ x: u = 0,
173
+ y: p = 0
174
174
  } = n || {}, l = document.createElement("iframe");
175
- l.src = e, l.style.backgroundColor = Et(t), l.style.border = i > 0 ? `${i}px solid ${Et(o)}` : "none", l.style.pointerEvents = a;
175
+ l.src = e, l.style.backgroundColor = St(t), l.style.border = i > 0 ? `${i}px solid ${St(o)}` : "none", l.style.pointerEvents = a;
176
176
  const f = (100 / s).toFixed(3) + "%";
177
- return l.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", N0({
177
+ return l.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", q0({
178
178
  content: l,
179
179
  anchor: r,
180
180
  height: h,
181
- width: u,
182
- x: c,
183
- y: d
181
+ width: c,
182
+ x: u,
183
+ y: p
184
184
  });
185
185
  }
186
186
  const xt = {
187
187
  LEFT: "left",
188
188
  CENTER: "center",
189
189
  RIGHT: "right"
190
- }, oe = xt.LEFT;
190
+ }, ue = xt.LEFT;
191
191
  function st(n, e) {
192
192
  throw new Error("Unexpected value: " + n);
193
193
  }
194
- function kn(n = null) {
194
+ function qn(n = null) {
195
195
  const {
196
196
  alignment: e = xt.LEFT,
197
197
  scale: t = 1,
@@ -201,40 +201,40 @@ function kn(n = null) {
201
201
  x: s = 0,
202
202
  y: r = 0
203
203
  } = n || {};
204
- function h(u) {
205
- const c = document.createElement("video");
206
- switch (c.autoplay = !0, c.style.transform = `scale(${t})`, e) {
204
+ function h(c) {
205
+ const u = document.createElement("video");
206
+ switch (u.autoplay = !0, u.style.transform = `scale(${t})`, e) {
207
207
  case xt.LEFT:
208
- c.style.transformOrigin = "top left";
208
+ u.style.transformOrigin = "top left";
209
209
  break;
210
210
  case xt.CENTER:
211
- c.style.transformOrigin = "top center";
211
+ u.style.transformOrigin = "top center";
212
212
  break;
213
213
  case xt.RIGHT:
214
- c.style.transformOrigin = "top right";
214
+ u.style.transformOrigin = "top right";
215
215
  break;
216
216
  default:
217
217
  st(e);
218
218
  }
219
- u.appendChild(c);
220
- const d = {
219
+ c.appendChild(u);
220
+ const p = {
221
221
  video: {
222
222
  displaySurface: "window"
223
223
  },
224
224
  audio: !1
225
225
  };
226
- return navigator.mediaDevices.getDisplayMedia(d).then((l) => {
226
+ return navigator.mediaDevices.getDisplayMedia(p).then((l) => {
227
227
  const f = l.getVideoTracks()[0];
228
228
  f !== void 0 && (f.onended = function() {
229
- c.style.display = "none";
230
- }), c.srcObject = l, c.play();
229
+ u.style.display = "none";
230
+ }), u.srcObject = l, u.play();
231
231
  }).catch((l) => {
232
232
  console.error("Could not start screen capture -", l);
233
233
  }), () => {
234
- c.srcObject.getTracks().forEach((f) => f.stop()), c.style.display = "none", c.srcObject = null;
234
+ u.srcObject.getTracks().forEach((f) => f.stop()), u.style.display = "none", u.srcObject = null;
235
235
  };
236
236
  }
237
- return N0({
237
+ return q0({
238
238
  content: null,
239
239
  setup: h,
240
240
  anchor: o,
@@ -265,7 +265,7 @@ function lt(n) {
265
265
  ...n
266
266
  };
267
267
  }
268
- function In(n = null) {
268
+ function zn(n = null) {
269
269
  const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
270
270
  return lt({
271
271
  objectType: U.ARROW,
@@ -283,8 +283,8 @@ function In(n = null) {
283
283
  ...o
284
284
  });
285
285
  }
286
- const se = 50;
287
- function _n(n = null) {
286
+ const fe = 50;
287
+ function jn(n = null) {
288
288
  return lt({
289
289
  objectType: U.CIRCLE,
290
290
  anchor: ht,
@@ -292,13 +292,13 @@ function _n(n = null) {
292
292
  strokeWidth: 0,
293
293
  drawn: 1,
294
294
  fillColor: Q,
295
- radius: se,
295
+ radius: fe,
296
296
  x: 0,
297
297
  y: 0,
298
298
  ...n
299
299
  });
300
300
  }
301
- function c0(n, e = null) {
301
+ function g0(n, e = null) {
302
302
  return lt({
303
303
  objectType: U.GROUP,
304
304
  anchor: ht,
@@ -323,7 +323,7 @@ function c0(n, e = null) {
323
323
  ...e
324
324
  });
325
325
  }
326
- function On(n) {
326
+ function Hn(n) {
327
327
  const {
328
328
  anchor: e = ht,
329
329
  cols: t = 1,
@@ -333,39 +333,39 @@ function On(n) {
333
333
  groupProps: s = {},
334
334
  width: r = 0,
335
335
  height: h = 0,
336
- x: u = 0,
337
- y: c = 0,
338
- objects: d = () => null
336
+ x: c = 0,
337
+ y: u = 0,
338
+ objects: p = () => null
339
339
  } = n, l = [], f = [];
340
- let m = 0, y = 0;
341
- for (let E = 0; E < o; E++) {
342
- const L = [];
343
- m = 0;
344
- let C = 0;
340
+ let v = 0, y = 0;
341
+ for (let P = 0; P < o; P++) {
342
+ const E = [];
343
+ v = 0;
344
+ let L = 0;
345
345
  for (let S = 0; S < t; S++) {
346
- const T = d(E, S), I = typeof r == "function" ? r(E, S) : r, R = typeof h == "function" ? h(E, S) : h;
347
- L.push(T), T != null && f.push(
348
- c0([T], {
349
- x: m,
346
+ const T = p(P, S), k = typeof r == "function" ? r(P, S) : r, F = typeof h == "function" ? h(P, S) : h;
347
+ E.push(T), T != null && f.push(
348
+ g0([T], {
349
+ x: v,
350
350
  y
351
351
  })
352
- ), m += I + i, C = Math.max(C, R);
352
+ ), v += k + i, L = Math.max(L, F);
353
353
  }
354
- l.push(L), y += C + a;
354
+ l.push(E), y += L + a;
355
355
  }
356
356
  return {
357
- grid: c0(f, {
358
- x: u,
359
- y: c,
357
+ grid: g0(f, {
358
+ x: c,
359
+ y: u,
360
360
  height: y - a,
361
- width: m - i,
361
+ width: v - i,
362
362
  anchor: e,
363
363
  ...s
364
364
  }),
365
365
  objects: l
366
366
  };
367
367
  }
368
- function Fn(n = null) {
368
+ function Un(n = null) {
369
369
  return lt({
370
370
  objectType: U.IMAGE,
371
371
  anchor: ht,
@@ -379,7 +379,7 @@ function Fn(n = null) {
379
379
  ...n
380
380
  });
381
381
  }
382
- function Nn(n = null) {
382
+ function $n(n = null) {
383
383
  return lt({
384
384
  objectType: U.LINE,
385
385
  color: Q,
@@ -394,7 +394,7 @@ function Nn(n = null) {
394
394
  ...n
395
395
  });
396
396
  }
397
- function Rn(n, e = null) {
397
+ function Yn(n, e = null) {
398
398
  return lt({
399
399
  objectType: U.MASK,
400
400
  anchor: ht,
@@ -407,70 +407,70 @@ function Rn(n, e = null) {
407
407
  ...e
408
408
  });
409
409
  }
410
- var ae = Object.defineProperty, O = (n, e) => ae(n, "name", { value: e, configurable: !0 }), Ct = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, he = /([astvzqmhlc])([^astvzqmhlc]*)/gi, le = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, ce = O((n) => {
411
- const e = (n && n.length > 0 ? n : "M0,0").match(he);
410
+ var ge = Object.defineProperty, O = (n, e) => ge(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 }, pe = /([astvzqmhlc])([^astvzqmhlc]*)/gi, de = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, xe = O((n) => {
411
+ const e = (n && n.length > 0 ? n : "M0,0").match(pe);
412
412
  if (!e) throw new Error(`No path elements found in string ${n}`);
413
413
  return e.reduce((t, o) => {
414
- let i = o.charAt(0), a = i.toLowerCase(), s = ue(o.substring(1));
414
+ let i = o.charAt(0), a = i.toLowerCase(), s = ye(o.substring(1));
415
415
  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)) {
416
416
  const r = o.substring(1).trim().split(" ");
417
417
  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])];
418
418
  }
419
419
  for (; s.length >= 0; ) {
420
- if (s.length === Ct[a]) {
421
- t.push([i, ...s.splice(0, Ct[a])]);
420
+ if (s.length === Pt[a]) {
421
+ t.push([i, ...s.splice(0, Pt[a])]);
422
422
  break;
423
423
  }
424
- if (s.length < Ct[a]) throw new Error(`Malformed path data: "${i}" must have ${Ct[a]} elements and has ${s.length}: ${o}`);
425
- t.push([i, ...s.splice(0, Ct[a])]);
424
+ if (s.length < Pt[a]) throw new Error(`Malformed path data: "${i}" must have ${Pt[a]} elements and has ${s.length}: ${o}`);
425
+ t.push([i, ...s.splice(0, Pt[a])]);
426
426
  }
427
427
  return t;
428
428
  }, []);
429
- }, "default"), ue = O((n) => {
430
- const e = n.match(le);
429
+ }, "default"), ye = O((n) => {
430
+ const e = n.match(de);
431
431
  return e ? e.map(Number) : [];
432
- }, "parseValues"), wt, J = (wt = class {
432
+ }, "parseValues"), mt, J = (mt = class {
433
433
  constructor(e, t, o, i) {
434
- k(this, "x0");
435
- k(this, "x1");
436
- k(this, "y0");
437
- k(this, "y1");
438
- k(this, "getTotalLength", O(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
439
- k(this, "getPointAtLength", O((e) => {
434
+ I(this, "x0");
435
+ I(this, "x1");
436
+ I(this, "y0");
437
+ I(this, "y1");
438
+ I(this, "getTotalLength", O(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
439
+ I(this, "getPointAtLength", O((e) => {
440
440
  let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
441
441
  t = Number.isNaN(t) ? 1 : t;
442
442
  const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
443
443
  return { x: this.x0 + o, y: this.y0 + i };
444
444
  }, "getPointAtLength"));
445
- k(this, "getTangentAtLength", O((e) => {
445
+ I(this, "getTangentAtLength", O((e) => {
446
446
  const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
447
447
  return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
448
448
  }, "getTangentAtLength"));
449
- k(this, "getPropertiesAtLength", O((e) => {
449
+ I(this, "getPropertiesAtLength", O((e) => {
450
450
  const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
451
451
  return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
452
452
  }, "getPropertiesAtLength"));
453
453
  this.x0 = e, this.x1 = t, this.y0 = o, this.y1 = i;
454
454
  }
455
- }, O(wt, "LinearPosition"), wt), mt, u0 = (mt = class {
456
- constructor(e, t, o, i, a, s, r, h, u) {
457
- k(this, "x0");
458
- k(this, "y0");
459
- k(this, "rx");
460
- k(this, "ry");
461
- k(this, "xAxisRotate");
462
- k(this, "LargeArcFlag");
463
- k(this, "SweepFlag");
464
- k(this, "x1");
465
- k(this, "y1");
466
- k(this, "length");
467
- k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
468
- k(this, "getPointAtLength", O((e) => {
455
+ }, O(mt, "LinearPosition"), mt), bt, p0 = (bt = class {
456
+ constructor(e, t, o, i, a, s, r, h, c) {
457
+ I(this, "x0");
458
+ I(this, "y0");
459
+ I(this, "rx");
460
+ I(this, "ry");
461
+ I(this, "xAxisRotate");
462
+ I(this, "LargeArcFlag");
463
+ I(this, "SweepFlag");
464
+ I(this, "x1");
465
+ I(this, "y1");
466
+ I(this, "length");
467
+ I(this, "getTotalLength", O(() => this.length, "getTotalLength"));
468
+ I(this, "getPointAtLength", O((e) => {
469
469
  e < 0 ? e = 0 : e > this.length && (e = this.length);
470
- const t = f0({ 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);
470
+ const t = d0({ 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);
471
471
  return { x: t.x, y: t.y };
472
472
  }, "getPointAtLength"));
473
- k(this, "getTangentAtLength", O((e) => {
473
+ I(this, "getTangentAtLength", O((e) => {
474
474
  e < 0 ? e = 0 : e > this.length && (e = this.length);
475
475
  const t = 0.05, o = this.getPointAtLength(e);
476
476
  let i;
@@ -478,148 +478,148 @@ var ae = Object.defineProperty, O = (n, e) => ae(n, "name", { value: e, configur
478
478
  const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
479
479
  return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
480
480
  }, "getTangentAtLength"));
481
- k(this, "getPropertiesAtLength", O((e) => {
481
+ I(this, "getPropertiesAtLength", O((e) => {
482
482
  const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
483
483
  return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
484
484
  }, "getPropertiesAtLength"));
485
- this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = u;
486
- const c = fe(300, function(d) {
487
- return f0({ x: e, y: t }, o, i, a, s, r, { x: h, y: u }, d);
485
+ this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
486
+ const u = ve(300, function(p) {
487
+ return d0({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, p);
488
488
  });
489
- this.length = c.arcLength;
489
+ this.length = u.arcLength;
490
490
  }
491
- }, O(mt, "Arc"), mt), f0 = O((n, e, t, o, i, a, s, r) => {
492
- e = Math.abs(e), t = Math.abs(t), o = ge(o, 360);
493
- const h = pe(o);
491
+ }, O(bt, "Arc"), bt), d0 = O((n, e, t, o, i, a, s, r) => {
492
+ e = Math.abs(e), t = Math.abs(t), o = we(o, 360);
493
+ const h = me(o);
494
494
  if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
495
495
  if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
496
- const u = (n.x - s.x) / 2, c = (n.y - s.y) / 2, d = { x: Math.cos(h) * u + Math.sin(h) * c, y: -Math.sin(h) * u + Math.cos(h) * c }, l = Math.pow(d.x, 2) / Math.pow(e, 2) + Math.pow(d.y, 2) / Math.pow(t, 2);
496
+ const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, p = { x: Math.cos(h) * c + Math.sin(h) * u, y: -Math.sin(h) * c + Math.cos(h) * u }, l = Math.pow(p.x, 2) / Math.pow(e, 2) + Math.pow(p.y, 2) / Math.pow(t, 2);
497
497
  l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
498
- let f = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(d.y, 2) - Math.pow(t, 2) * Math.pow(d.x, 2)) / (Math.pow(e, 2) * Math.pow(d.y, 2) + Math.pow(t, 2) * Math.pow(d.x, 2));
498
+ let f = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(p.y, 2) - Math.pow(t, 2) * Math.pow(p.x, 2)) / (Math.pow(e, 2) * Math.pow(p.y, 2) + Math.pow(t, 2) * Math.pow(p.x, 2));
499
499
  f = f < 0 ? 0 : f;
500
- const m = (i !== a ? 1 : -1) * Math.sqrt(f), y = m * (e * d.y / t), M = m * (-t * d.x / e), E = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, L = { x: (d.x - y) / e, y: (d.y - M) / t }, C = p0({ x: 1, y: 0 }, L);
501
- let S = p0(L, { x: (-d.x - y) / e, y: (-d.y - M) / t });
500
+ const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * p.y / t), M = v * (-t * p.x / e), P = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, E = { x: (p.x - y) / e, y: (p.y - M) / t }, L = y0({ x: 1, y: 0 }, E);
501
+ let S = y0(E, { x: (-p.x - y) / e, y: (-p.y - M) / t });
502
502
  !a && S > 0 ? S -= 2 * Math.PI : a && S < 0 && (S += 2 * Math.PI), S %= 2 * Math.PI;
503
- const T = C + S * r, I = e * Math.cos(T), R = t * Math.sin(T);
504
- return { x: Math.cos(h) * I - Math.sin(h) * R + E.x, y: Math.sin(h) * I + Math.cos(h) * R + E.y, ellipticalArcStartAngle: C, ellipticalArcEndAngle: C + S, ellipticalArcAngle: T, ellipticalArcCenter: E, resultantRx: e, resultantRy: t };
505
- }, "pointOnEllipticalArc"), fe = O((n, e) => {
503
+ const T = L + S * r, k = e * Math.cos(T), F = t * Math.sin(T);
504
+ return { x: Math.cos(h) * k - Math.sin(h) * F + P.x, y: Math.sin(h) * k + Math.cos(h) * F + P.y, ellipticalArcStartAngle: L, ellipticalArcEndAngle: L + S, ellipticalArcAngle: T, ellipticalArcCenter: P, resultantRx: e, resultantRy: t };
505
+ }, "pointOnEllipticalArc"), ve = O((n, e) => {
506
506
  n = n ?? 500;
507
507
  let t = 0;
508
508
  const o = [], i = [];
509
509
  let a, s = e(0);
510
510
  for (let r = 0; r < n; r++) {
511
- const h = de(r * (1 / n), 0, 1);
512
- a = e(h), t += g0(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
511
+ const h = be(r * (1 / n), 0, 1);
512
+ a = e(h), t += x0(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
513
513
  }
514
- return a = e(1), i.push([s, a]), t += g0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
515
- }, "approximateArcLengthOfCurve"), ge = O((n, e) => (n % e + e) % e, "mod"), pe = O((n) => n * (Math.PI / 180), "toRadians"), g0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), de = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), p0 = O((n, e) => {
514
+ return a = e(1), i.push([s, a]), t += x0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
515
+ }, "approximateArcLengthOfCurve"), we = O((n, e) => (n % e + e) % e, "mod"), me = O((n) => n * (Math.PI / 180), "toRadians"), x0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), be = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), y0 = O((n, e) => {
516
516
  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)));
517
517
  return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
518
- }, "angleBetween"), xe = [[], [], [-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]], ye = [[], [], [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]], ve = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], we = O((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"), me = O((n, e, t) => B0([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"), be = O((n, e, t) => {
518
+ }, "angleBetween"), Ae = [[], [], [-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]], Me = [[], [], [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]], Le = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], Te = O((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"), Ce = O((n, e, t) => j0([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"), Pe = O((n, e, t) => {
519
519
  let o, i;
520
520
  const a = t / 2;
521
521
  o = 0;
522
- for (let s = 0; s < 20; s++) i = a * xe[20][s] + a, o += ye[20][s] * D0(n, e, i);
522
+ for (let s = 0; s < 20; s++) i = a * Ae[20][s] + a, o += Me[20][s] * H0(n, e, i);
523
523
  return a * o;
524
- }, "getCubicArcLength"), B0 = O((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"), Ae = O((n, e, t) => {
524
+ }, "getCubicArcLength"), j0 = O((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"), Ee = O((n, e, t) => {
525
525
  t === void 0 && (t = 1);
526
- 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), h = 4 * (o * a + i * s), u = a * a + s * s;
526
+ 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), h = 4 * (o * a + i * s), c = a * a + s * s;
527
527
  if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
528
- const c = h / (2 * r), d = t + c, l = u / r - c * c, f = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, m = c * c + l > 0 ? Math.sqrt(c * c + l) : 0, y = c + Math.sqrt(c * c + l) !== 0 && (d + f) / (c + m) !== 0 ? l * Math.log(Math.abs((d + f) / (c + m))) : 0;
529
- return Math.sqrt(r) / 2 * (d * f - c * m + y);
530
- }, "getQuadraticArcLength"), Me = O((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");
531
- function D0(n, e, t) {
532
- const o = Vt(1, t, n), i = Vt(1, t, e), a = o * o + i * i;
528
+ const u = h / (2 * r), p = t + u, l = c / r - u * u, f = p * p + l > 0 ? Math.sqrt(p * p + l) : 0, v = u * u + l > 0 ? Math.sqrt(u * u + l) : 0, y = u + Math.sqrt(u * u + l) !== 0 && (p + f) / (u + v) !== 0 ? l * Math.log(Math.abs((p + f) / (u + v))) : 0;
529
+ return Math.sqrt(r) / 2 * (p * f - u * v + y);
530
+ }, "getQuadraticArcLength"), Se = O((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");
531
+ function H0(n, e, t) {
532
+ const o = Kt(1, t, n), i = Kt(1, t, e), a = o * o + i * i;
533
533
  return Math.sqrt(a);
534
534
  }
535
- O(D0, "BFunc");
536
- var Vt = O((n, e, t) => {
535
+ O(H0, "BFunc");
536
+ var Kt = O((n, e, t) => {
537
537
  const o = t.length - 1;
538
538
  let i, a;
539
539
  if (o === 0) return 0;
540
540
  if (n === 0) {
541
541
  a = 0;
542
- for (let s = 0; s <= o; s++) a += ve[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
542
+ for (let s = 0; s <= o; s++) a += Le[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
543
543
  return a;
544
544
  }
545
545
  i = new Array(o);
546
546
  for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
547
- return Vt(n - 1, e, i);
548
- }, "getDerivative"), Bt = O((n, e, t) => {
547
+ return Kt(n - 1, e, i);
548
+ }, "getDerivative"), Dt = O((n, e, t) => {
549
549
  let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
550
550
  for (; o > 1e-3; ) {
551
551
  const r = t(i + a), h = Math.abs(n - r) / e;
552
552
  if (h < o) o = h, i += a;
553
553
  else {
554
- const u = t(i - a), c = Math.abs(n - u) / e;
555
- c < o ? (o = c, i -= a) : a /= 2;
554
+ const c = t(i - a), u = Math.abs(n - c) / e;
555
+ u < o ? (o = u, i -= a) : a /= 2;
556
556
  }
557
557
  if (s++, s > 500) break;
558
558
  }
559
559
  return i;
560
- }, "t2length"), bt, ct = (bt = class {
560
+ }, "t2length"), At, ct = (At = class {
561
561
  constructor(e, t, o, i, a, s, r, h) {
562
- k(this, "a");
563
- k(this, "b");
564
- k(this, "c");
565
- k(this, "d");
566
- k(this, "length");
567
- k(this, "getArcLength");
568
- k(this, "getPoint");
569
- k(this, "getDerivative");
570
- k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
571
- k(this, "getPointAtLength", O((e) => {
572
- 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 = Bt(e, this.length, (a) => this.getArcLength(t, o, a));
562
+ I(this, "a");
563
+ I(this, "b");
564
+ I(this, "c");
565
+ I(this, "d");
566
+ I(this, "length");
567
+ I(this, "getArcLength");
568
+ I(this, "getPoint");
569
+ I(this, "getDerivative");
570
+ I(this, "getTotalLength", O(() => this.length, "getTotalLength"));
571
+ I(this, "getPointAtLength", O((e) => {
572
+ 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 = Dt(e, this.length, (a) => this.getArcLength(t, o, a));
573
573
  return this.getPoint(t, o, i);
574
574
  }, "getPointAtLength"));
575
- k(this, "getTangentAtLength", O((e) => {
576
- const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Bt(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
575
+ I(this, "getTangentAtLength", O((e) => {
576
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Dt(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
577
577
  let r;
578
578
  return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
579
579
  }, "getTangentAtLength"));
580
- k(this, "getPropertiesAtLength", O((e) => {
581
- 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 = Bt(e, this.length, (u) => this.getArcLength(t, o, u)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
580
+ I(this, "getPropertiesAtLength", O((e) => {
581
+ 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 = Dt(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);
582
582
  let r;
583
583
  r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
584
584
  const h = this.getPoint(t, o, i);
585
585
  return { x: h.x, y: h.y, tangentX: r.x, tangentY: r.y };
586
586
  }, "getPropertiesAtLength"));
587
- k(this, "getC", O(() => this.c, "getC"));
588
- k(this, "getD", O(() => this.d, "getD"));
589
- this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = be, this.getPoint = we, this.getDerivative = me, this.d = { x: r, y: h }) : (this.getArcLength = Ae, this.getPoint = B0, this.getDerivative = Me, 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);
587
+ I(this, "getC", O(() => this.c, "getC"));
588
+ I(this, "getD", O(() => this.d, "getD"));
589
+ this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = Pe, this.getPoint = Te, this.getDerivative = Ce, this.d = { x: r, y: h }) : (this.getArcLength = Ee, this.getPoint = j0, this.getDerivative = Se, 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
590
  }
591
- }, O(bt, "Bezier"), bt), At, Le = (At = class {
591
+ }, O(At, "Bezier"), At), Mt, ke = (Mt = class {
592
592
  constructor(e) {
593
- k(this, "length", 0);
594
- k(this, "partial_lengths", []);
595
- k(this, "functions", []);
596
- k(this, "initial_point", null);
597
- k(this, "getPartAtLength", O((e) => {
593
+ I(this, "length", 0);
594
+ I(this, "partial_lengths", []);
595
+ I(this, "functions", []);
596
+ I(this, "initial_point", null);
597
+ I(this, "getPartAtLength", O((e) => {
598
598
  e < 0 ? e = 0 : e > this.length && (e = this.length);
599
599
  let t = this.partial_lengths.length - 1;
600
600
  for (; this.partial_lengths[t] >= e && t > 0; ) t--;
601
601
  return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
602
602
  }, "getPartAtLength"));
603
- k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
604
- k(this, "getPointAtLength", O((e) => {
603
+ I(this, "getTotalLength", O(() => this.length, "getTotalLength"));
604
+ I(this, "getPointAtLength", O((e) => {
605
605
  const t = this.getPartAtLength(e), o = this.functions[t.i];
606
606
  if (o) return o.getPointAtLength(t.fraction);
607
607
  if (this.initial_point) return this.initial_point;
608
608
  throw new Error("Wrong function at this part.");
609
609
  }, "getPointAtLength"));
610
- k(this, "getTangentAtLength", O((e) => {
610
+ I(this, "getTangentAtLength", O((e) => {
611
611
  const t = this.getPartAtLength(e), o = this.functions[t.i];
612
612
  if (o) return o.getTangentAtLength(t.fraction);
613
613
  if (this.initial_point) return { x: 0, y: 0 };
614
614
  throw new Error("Wrong function at this part.");
615
615
  }, "getTangentAtLength"));
616
- k(this, "getPropertiesAtLength", O((e) => {
616
+ I(this, "getPropertiesAtLength", O((e) => {
617
617
  const t = this.getPartAtLength(e), o = this.functions[t.i];
618
618
  if (o) return o.getPropertiesAtLength(t.fraction);
619
619
  if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
620
620
  throw new Error("Wrong function at this part.");
621
621
  }, "getPropertiesAtLength"));
622
- k(this, "getParts", O(() => {
622
+ I(this, "getParts", O(() => {
623
623
  const e = [];
624
624
  for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
625
625
  this.functions[t] = this.functions[t];
@@ -628,7 +628,7 @@ var Vt = O((n, e, t) => {
628
628
  }
629
629
  return e;
630
630
  }, "getParts"));
631
- const t = Array.isArray(e) ? e : ce(e);
631
+ const t = Array.isArray(e) ? e : xe(e);
632
632
  let o, i = [0, 0], a = [0, 0], s = [0, 0];
633
633
  for (let r = 0; r < t.length; r++) {
634
634
  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] });
@@ -653,8 +653,8 @@ var Vt = O((n, e, t) => {
653
653
  } else if (t[r][0] === "s") {
654
654
  if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
655
655
  if (o) {
656
- const h = o.getC(), u = o.getD();
657
- o = new ct(i[0], i[1], i[0] + u.x - h.x, i[1] + u.y - h.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
656
+ const h = o.getC(), c = o.getD();
657
+ o = new ct(i[0], i[1], i[0] + c.x - h.x, i[1] + c.y - h.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
658
658
  }
659
659
  } 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]);
660
660
  o && (this.length += o.getTotalLength(), i = [t[r][3] + i[0], t[r][4] + i[1]], this.functions.push(o));
@@ -686,41 +686,41 @@ var Vt = O((n, e, t) => {
686
686
  }
687
687
  a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1] + i[0], t[r][2] + i[1]];
688
688
  } else if (t[r][0] === "A") {
689
- const h = new u0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
689
+ const h = new p0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
690
690
  this.length += h.getTotalLength(), i = [t[r][6], t[r][7]], this.functions.push(h);
691
691
  } else if (t[r][0] === "a") {
692
- const h = new u0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
692
+ const h = new p0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
693
693
  this.length += h.getTotalLength(), i = [i[0] + t[r][6], i[1] + t[r][7]], this.functions.push(h);
694
694
  }
695
695
  this.partial_lengths.push(this.length);
696
696
  }
697
697
  }
698
- }, O(At, "SVGPathProperties"), At), Mt, Kt = (Mt = class {
698
+ }, O(Mt, "SVGPathProperties"), Mt), Lt, Qt = (Lt = class {
699
699
  constructor(e) {
700
- k(this, "inst");
701
- k(this, "getTotalLength", O(() => this.inst.getTotalLength(), "getTotalLength"));
702
- k(this, "getPointAtLength", O((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
703
- k(this, "getTangentAtLength", O((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
704
- k(this, "getPropertiesAtLength", O((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
705
- k(this, "getParts", O(() => this.inst.getParts(), "getParts"));
706
- if (this.inst = new Le(e), !(this instanceof Kt)) return new Kt(e);
707
- }
708
- }, O(Mt, "_svgPathProperties"), Mt);
709
- function Te(n = G.BLACK) {
700
+ I(this, "inst");
701
+ I(this, "getTotalLength", O(() => this.inst.getTotalLength(), "getTotalLength"));
702
+ I(this, "getPointAtLength", O((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
703
+ I(this, "getTangentAtLength", O((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
704
+ I(this, "getPropertiesAtLength", O((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
705
+ I(this, "getParts", O(() => this.inst.getParts(), "getParts"));
706
+ if (this.inst = new ke(e), !(this instanceof Qt)) return new Qt(e);
707
+ }
708
+ }, O(Lt, "_svgPathProperties"), Lt);
709
+ function Ie(n = G.BLACK) {
710
710
  return { ...n, alpha: 0 };
711
711
  }
712
- function Bn(n = null) {
713
- const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", u = new Kt(r).getTotalLength();
712
+ function Wn(n = null) {
713
+ 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 Qt(r).getTotalLength();
714
714
  return lt({
715
715
  objectType: U.PATH,
716
716
  anchor: ht,
717
717
  strokeColor: Q,
718
718
  drawn: 1,
719
- fillColor: Te(),
719
+ fillColor: Ie(),
720
720
  isRounded: !1,
721
721
  height: t,
722
722
  path: r,
723
- pathLength: u,
723
+ pathLength: c,
724
724
  strokeWidth: 4,
725
725
  viewboxHeight: i ?? t,
726
726
  viewboxWidth: a ?? o,
@@ -730,7 +730,7 @@ function Bn(n = null) {
730
730
  ...s
731
731
  });
732
732
  }
733
- function Dn(n = null) {
733
+ function Xn(n = null) {
734
734
  return lt({
735
735
  objectType: U.POLYGON,
736
736
  strokeColor: Q,
@@ -745,7 +745,7 @@ function Dn(n = null) {
745
745
  ...n
746
746
  });
747
747
  }
748
- function qn(n = null) {
748
+ function Gn(n = null) {
749
749
  return lt({
750
750
  objectType: U.RECTANGLE,
751
751
  anchor: ht,
@@ -761,7 +761,7 @@ function qn(n = null) {
761
761
  ...n
762
762
  });
763
763
  }
764
- function zn(n = null) {
764
+ function Vn(n = null) {
765
765
  return lt({
766
766
  objectType: U.SVG,
767
767
  anchor: ht,
@@ -773,11 +773,11 @@ function zn(n = null) {
773
773
  ...n
774
774
  });
775
775
  }
776
- const Ce = {
776
+ const _e = {
777
777
  NORMAL: "normal",
778
778
  ITALIC: "italic",
779
779
  OBLIQUE: "oblique"
780
- }, Pe = Ce.NORMAL, Ee = {
780
+ }, Oe = _e.NORMAL, Ne = {
781
781
  THIN: 100,
782
782
  EXTRA_LIGHT: 200,
783
783
  LIGHT: 300,
@@ -787,57 +787,80 @@ const Ce = {
787
787
  BOLD: 700,
788
788
  EXTRA_BOLD: 800,
789
789
  BLACK: 900
790
- }, Se = Ee.NORMAL, ke = {
790
+ }, Re = Ne.NORMAL, Fe = {
791
791
  color: Q,
792
792
  fontFamily: "sans-serif",
793
793
  fontSize: 100,
794
- fontStyle: Pe,
795
- fontWeight: Se,
794
+ fontStyle: Oe,
795
+ fontWeight: Re,
796
796
  ligatures: !1,
797
797
  subscript: !1,
798
798
  superscript: !1
799
799
  };
800
- function q0(n) {
800
+ function U0(n) {
801
801
  return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
802
802
  }
803
- function Ie(n) {
804
- return q0(n).reduce(
803
+ function Be(n) {
804
+ return U0(n).reduce(
805
805
  (t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
806
806
  0
807
807
  );
808
808
  }
809
- function _e(n = "", e = null) {
809
+ function De(n = "", e = null) {
810
810
  return lt({
811
811
  objectType: U.TEXT,
812
- alignment: oe,
812
+ alignment: ue,
813
813
  anchor: ht,
814
814
  length: null,
815
815
  lineSpacing: 1,
816
816
  text: n,
817
817
  x: 0,
818
818
  y: 0,
819
- ...ke,
819
+ ...Fe,
820
820
  ...e
821
821
  });
822
822
  }
823
- _e.writeOn = (n, e = {}) => o0(
823
+ De.writeOn = (n, e = {}) => s0(
824
824
  n,
825
825
  {
826
- length: Ie(n.text)
826
+ length: Be(n.text)
827
827
  },
828
828
  e
829
829
  );
830
- function z0(n) {
830
+ const a0 = "presenter.navigator.open";
831
+ function $0() {
832
+ return typeof document > "u" ? !1 : Array.from(document.scripts).some((n) => n.src.includes("/@vite/client"));
833
+ }
834
+ function qe() {
835
+ var n;
836
+ return $0() ? ((n = h0()) == null ? void 0 : n.getItem(a0)) === "true" : !1;
837
+ }
838
+ function ze() {
839
+ var n;
840
+ $0() && ((n = h0()) == null || n.setItem(a0, "true"));
841
+ }
842
+ function Y0() {
843
+ var n;
844
+ (n = h0()) == null || n.removeItem(a0);
845
+ }
846
+ function h0() {
847
+ try {
848
+ return window.sessionStorage;
849
+ } catch {
850
+ return null;
851
+ }
852
+ }
853
+ function W0(n) {
831
854
  return n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
832
855
  }
833
- function d0(n) {
856
+ function v0(n) {
834
857
  var o, i;
835
858
  if (n === null)
836
859
  return !1;
837
860
  const e = n, t = (o = e.tagName) == null ? void 0 : o.toLowerCase();
838
861
  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;
839
862
  }
840
- function Oe(n) {
863
+ function je(n) {
841
864
  var o;
842
865
  const { slides: e } = n, t = {
843
866
  // First build of first slide
@@ -855,20 +878,20 @@ function Oe(n) {
855
878
  if (a === void 0)
856
879
  continue;
857
880
  const s = a.shortcut;
858
- Dt(t, s, i, 0);
881
+ qt(t, s, i, 0);
859
882
  for (let r = 0; r < a.animations.length; r++) {
860
883
  const h = a.animations[r];
861
884
  if (h !== void 0)
862
885
  if (Array.isArray(h))
863
- for (const u of h)
864
- Dt(t, u.shortcut, i, r + 1);
886
+ for (const c of h)
887
+ qt(t, c.shortcut, i, r + 1);
865
888
  else
866
- Dt(t, h.shortcut, i, r + 1);
889
+ qt(t, h.shortcut, i, r + 1);
867
890
  }
868
891
  }
869
892
  return t;
870
893
  }
871
- function Dt(n, e, t, o) {
894
+ function qt(n, e, t, o) {
872
895
  if (e !== null)
873
896
  if (Array.isArray(e))
874
897
  for (const i of e)
@@ -876,144 +899,194 @@ function Dt(n, e, t, o) {
876
899
  else
877
900
  n[e] = { slideIndex: t, buildIndex: o };
878
901
  }
879
- function j0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: h = e } = {}) {
880
- t.shortcuts = Oe(n), r && (e.hasAttribute("tabindex") || (e.tabIndex = -1), e.addEventListener("pointerdown", (u) => {
881
- d0(u.target) || e.focus({ preventScroll: !0 });
882
- })), e.addEventListener("mousemove", () => {
883
- e.style.cursor = "auto";
884
- }), h.addEventListener("keyup", (u) => {
885
- const c = u;
886
- if (!d0(c.target)) {
887
- if (c.code === "Escape") {
888
- t.textCommand = null;
889
- return;
890
- }
891
- if (c.code === "ArrowRight" || c.code === "Space") {
892
- o(c.shiftKey);
893
- return;
894
- }
895
- if (c.code === "ArrowLeft") {
896
- i(c.shiftKey);
897
- return;
898
- }
899
- if (t.textCommand !== null) {
900
- if (c.code === "Enter") {
901
- const d = t.textCommand;
902
+ function X0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: h = e, signal: c } = {}) {
903
+ t.shortcuts = je(n);
904
+ const u = c === void 0 ? void 0 : { signal: c };
905
+ r && (e.hasAttribute("tabindex") || (e.tabIndex = -1), e.addEventListener(
906
+ "pointerdown",
907
+ (p) => {
908
+ v0(p.target) || e.focus({ preventScroll: !0 });
909
+ },
910
+ u
911
+ )), e.addEventListener(
912
+ "mousemove",
913
+ () => {
914
+ e.style.cursor = "auto";
915
+ },
916
+ u
917
+ ), h.addEventListener(
918
+ "keyup",
919
+ (p) => {
920
+ const l = p;
921
+ if (!v0(l.target)) {
922
+ if (l.code === "Escape") {
902
923
  t.textCommand = null;
903
- const l = t.shortcuts[d];
904
- l !== void 0 ? a(l.slideIndex, l.buildIndex) : isNaN(Number(d)) || a(Number(d) - 1, 0);
905
924
  return;
906
- } else c.code === "Backspace" ? t.textCommand = t.textCommand.slice(0, -1) : t.textCommand += c.key;
907
- return;
908
- }
909
- if (c.key === "g") {
910
- t.textCommand = "";
911
- return;
912
- }
913
- if (c.key === "`" && !z0(c)) {
914
- s();
915
- return;
925
+ }
926
+ if (l.code === "ArrowRight" || l.code === "Space") {
927
+ o(l.shiftKey);
928
+ return;
929
+ }
930
+ if (l.code === "ArrowLeft") {
931
+ i(l.shiftKey);
932
+ return;
933
+ }
934
+ if (t.textCommand !== null) {
935
+ if (l.code === "Enter") {
936
+ const f = t.textCommand;
937
+ t.textCommand = null;
938
+ const v = t.shortcuts[f];
939
+ v !== void 0 ? a(v.slideIndex, v.buildIndex) : isNaN(Number(f)) || a(Number(f) - 1, 0);
940
+ return;
941
+ } else l.code === "Backspace" ? t.textCommand = t.textCommand.slice(0, -1) : t.textCommand += l.key;
942
+ return;
943
+ }
944
+ if (l.key === "g") {
945
+ t.textCommand = "";
946
+ return;
947
+ }
948
+ if (l.key === "`" && !W0(l)) {
949
+ s();
950
+ return;
951
+ }
916
952
  }
917
- }
918
- });
953
+ },
954
+ u
955
+ );
919
956
  }
920
- let N = null, _t = null, H0 = {
957
+ let R = null, Ot = null, yt = null;
958
+ const w0 = "__presenterNavigatorInstanceId";
959
+ let G0 = {
921
960
  width: 700,
922
961
  height: 680,
923
962
  left: 20,
924
963
  top: 50
925
964
  };
926
- function Fe({
965
+ function He({
927
966
  presentation: n,
928
967
  shortcutState: e,
929
968
  onNavigateToSlide: t,
930
969
  onRenderSlide: o,
931
970
  onNext: i,
932
- onPrevious: a
971
+ onPrevious: a,
972
+ forceRefresh: s = !1
933
973
  }) {
934
- if (N !== null && !N.closed)
935
- return Ot(N), N.focus(), _t;
936
- if (N = window.open("", "Navigator", De()), N === null)
974
+ if (R !== null && !R.closed && (Nt(R), !s))
975
+ return R.focus(), Ot;
976
+ if ((R === null || R.closed) && (R = window.open("", "Navigator", We())), R === null)
937
977
  return console.error("Failed to open navigator window."), null;
938
- const s = Ne(n, t, i);
939
- return _t = s, N.document.title = n.title, N.document.body.replaceChildren(s.element), j0(
978
+ yt == null || yt();
979
+ const r = Xe(R), h = new AbortController();
980
+ yt = () => h.abort();
981
+ const c = Ue(
982
+ n,
983
+ t,
984
+ i,
985
+ r.isActive
986
+ );
987
+ return Ot = c, ze(), R.document.title = n.title, R.document.body.replaceChildren(c.element), X0(
940
988
  n,
941
- s.element,
989
+ c.element,
942
990
  e,
943
991
  {
944
- onNext: (r) => i(r),
945
- onPrevious: a,
946
- onRenderSlide: o,
947
- onShowNavigator: () => Qt()
992
+ onNext: (u) => {
993
+ r.isActive() && i(u);
994
+ },
995
+ onPrevious: (u) => {
996
+ r.isActive() && a(u);
997
+ },
998
+ onRenderSlide: (u, p) => {
999
+ r.isActive() && o(u, p);
1000
+ },
1001
+ onShowNavigator: () => {
1002
+ r.isActive() && Jt();
1003
+ }
948
1004
  },
949
1005
  {
950
- keyEventTarget: N
1006
+ keyEventTarget: R,
1007
+ signal: h.signal
951
1008
  }
952
- ), N.addEventListener("resize", () => Ot(N)), N.addEventListener("beforeunload", () => {
953
- Ot(N);
954
- }), N.addEventListener("keyup", (r) => {
955
- (r.key === "Escape" || r.key === "`" && !z0(r)) && Qt();
956
- }), _t;
957
- }
958
- function Ne(n, e, t) {
959
- const o = (N == null ? void 0 : N.document) ?? document, i = o.createElement("div");
960
- i.style.boxSizing = "border-box", i.style.display = "grid", i.style.gridTemplateColumns = "260px 1fr", i.style.gap = "18px", i.style.height = "100vh", i.style.overflow = "hidden", i.style.padding = "18px", i.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', i.style.backgroundColor = "#f5f6f8", i.style.color = "#1f2937", o.body.style.margin = "0", o.body.style.overflow = "hidden";
961
- const a = o.createElement("div");
962
- a.style.display = "flex", a.style.flexDirection = "column", a.style.gap = "8px", a.style.minHeight = "0", a.style.overflowY = "auto", a.style.paddingRight = "4px";
963
- const s = o.createElement("div");
964
- s.style.display = "flex", s.style.flexDirection = "column", s.style.gap = "14px", s.style.minHeight = "0", s.style.minWidth = "0", s.style.overflow = "hidden";
965
- const r = o.createElement("div");
966
- r.style.display = "flex", r.style.gap = "14px", r.style.alignItems = "center", r.style.flexWrap = "wrap", r.style.fontSize = "13px", r.style.color = "#4b5563";
967
- const h = o.createElement("div");
968
- h.style.display = "flex", h.style.gap = "14px", h.style.flex = "1 1 auto", h.style.minHeight = "0", h.style.minWidth = "0", h.style.overflow = "hidden";
969
- const u = x0("Current", n), c = x0("Next", n);
970
- c.container.style.cursor = "pointer", c.container.addEventListener("click", t);
971
- const d = n.slides.map((L, C) => {
972
- const S = Re(L, C);
973
- return S.style.cursor = "pointer", S.addEventListener("click", (T) => {
974
- T.shiftKey && Qt(), e(C);
975
- }), a.appendChild(S), S;
976
- }), l = qt("Slides", a, !0), f = qt("Current", u.container, !0), m = qt("Next", c.container, !0), y = () => {
977
- const L = f.input.checked && m.input.checked && E();
978
- i.style.gridTemplateColumns = l.input.checked ? "260px 1fr" : "1fr", h.style.flexDirection = L ? "column" : "row", u.container.style.flex = "1 1 0", c.container.style.flex = "1 1 0", requestAnimationFrame(() => {
979
- u.resize(), c.resize();
1009
+ ), R.addEventListener("resize", () => Nt(R), {
1010
+ signal: h.signal
1011
+ }), R.addEventListener(
1012
+ "beforeunload",
1013
+ () => {
1014
+ Nt(R), Y0();
1015
+ },
1016
+ {
1017
+ signal: h.signal
1018
+ }
1019
+ ), R.addEventListener(
1020
+ "keyup",
1021
+ (u) => {
1022
+ r.isActive() && (u.key === "Escape" || u.key === "`" && !W0(u)) && Jt();
1023
+ },
1024
+ {
1025
+ signal: h.signal
1026
+ }
1027
+ ), Ot;
1028
+ }
1029
+ function Ue(n, e, t, o = () => !0) {
1030
+ const i = (R == null ? void 0 : R.document) ?? document, a = i.createElement("div");
1031
+ 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";
1032
+ const s = i.createElement("div");
1033
+ s.style.display = "flex", s.style.flexDirection = "column", s.style.gap = "8px", s.style.minHeight = "0", s.style.overflowY = "auto", s.style.paddingRight = "4px";
1034
+ const r = i.createElement("div");
1035
+ r.style.display = "flex", r.style.flexDirection = "column", r.style.gap = "14px", r.style.minHeight = "0", r.style.minWidth = "0", r.style.overflow = "hidden";
1036
+ const h = i.createElement("div");
1037
+ h.style.display = "flex", h.style.gap = "14px", h.style.alignItems = "center", h.style.flexWrap = "wrap", h.style.fontSize = "13px", h.style.color = "#4b5563";
1038
+ const c = i.createElement("div");
1039
+ 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";
1040
+ const u = m0("Current", n), p = m0("Next", n);
1041
+ p.container.style.cursor = "pointer", p.container.addEventListener("click", () => {
1042
+ o() && t();
1043
+ });
1044
+ const l = n.slides.map((L, S) => {
1045
+ const T = $e(L, S);
1046
+ return T.style.cursor = "pointer", T.addEventListener("click", (k) => {
1047
+ o() && (k.shiftKey && Jt(), e(S));
1048
+ }), s.appendChild(T), T;
1049
+ }), f = zt("Slides", s, !0), v = zt("Current", u.container, !0), y = zt("Next", p.container, !0), M = () => {
1050
+ const L = v.input.checked && y.input.checked && E();
1051
+ a.style.gridTemplateColumns = f.input.checked ? "260px 1fr" : "1fr", c.style.flexDirection = L ? "column" : "row", u.container.style.flex = "1 1 0", p.container.style.flex = "1 1 0", requestAnimationFrame(() => {
1052
+ u.resize(), p.resize();
980
1053
  });
981
1054
  };
982
- l.input.addEventListener("change", y), f.input.addEventListener("change", y), m.input.addEventListener("change", y), N == null || N.addEventListener("resize", y), r.appendChild(l.element), r.appendChild(f.element), r.appendChild(m.element), h.appendChild(u.container), h.appendChild(c.container), s.appendChild(r), s.appendChild(h), i.appendChild(a), i.appendChild(s);
983
- function M(L, C, S, T) {
984
- d.forEach((I, R) => {
985
- const X = R === L;
986
- I.style.backgroundColor = X ? "#dbeafe" : "#ffffff", I.style.borderColor = X ? "#60a5fa" : "#e5e7eb", I.style.color = X ? "#1e3a8a" : "#1f2937";
987
- }), u.label.textContent = y0(n, L, C), c.label.textContent = y0(n, S, T), Be(d[L], a), y();
1055
+ f.input.addEventListener("change", M), v.input.addEventListener("change", M), y.input.addEventListener("change", M), R == null || R.addEventListener("resize", M), h.appendChild(f.element), h.appendChild(v.element), h.appendChild(y.element), c.appendChild(u.container), c.appendChild(p.container), r.appendChild(h), r.appendChild(c), a.appendChild(s), a.appendChild(r);
1056
+ function P(L, S, T, k) {
1057
+ o() && (l.forEach((F, X) => {
1058
+ const z = X === L;
1059
+ F.style.backgroundColor = z ? "#dbeafe" : "#ffffff", F.style.borderColor = z ? "#60a5fa" : "#e5e7eb", F.style.color = z ? "#1e3a8a" : "#1f2937";
1060
+ }), u.label.textContent = b0(n, L, S), p.label.textContent = b0(n, T, k), Ye(l[L], s), M());
988
1061
  }
989
1062
  function E() {
990
- const L = N;
1063
+ const L = R;
991
1064
  if (L === null)
992
1065
  return !1;
993
- const C = l.input.checked ? 278 : 0, S = L.innerWidth - 36 - C, T = L.innerHeight - 36 - r.offsetHeight - 14;
994
- return S <= 0 || T <= 0 ? !1 : S / T < 1.1;
1066
+ const S = f.input.checked ? 278 : 0, T = L.innerWidth - 36 - S, k = L.innerHeight - 36 - h.offsetHeight - 14;
1067
+ return T <= 0 || k <= 0 ? !1 : T / k < 1.1;
995
1068
  }
996
1069
  return {
997
- element: i,
1070
+ element: a,
998
1071
  currentCanvas: u.canvas,
999
- nextCanvas: c.canvas,
1072
+ nextCanvas: p.canvas,
1000
1073
  currentLabel: u.label,
1001
- nextLabel: c.label,
1002
- isOpen: () => N !== null && !N.closed,
1003
- update: M
1074
+ nextLabel: p.label,
1075
+ isOpen: () => R !== null && !R.closed,
1076
+ update: P
1004
1077
  };
1005
1078
  }
1006
- function Re(n, e) {
1007
- const t = (N == null ? void 0 : N.document) ?? document, o = t.createElement("div");
1079
+ function $e(n, e) {
1080
+ const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
1008
1081
  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";
1009
1082
  const i = t.createElement("div");
1010
1083
  i.textContent = `${e + 1}`, i.style.minWidth = "24px", i.style.fontWeight = "700", i.style.color = "#6b7280";
1011
1084
  const a = t.createElement("div");
1012
1085
  return a.textContent = n.title.length > 0 ? n.title : `Slide ${e + 1}`, a.style.overflow = "hidden", a.style.textOverflow = "ellipsis", a.style.whiteSpace = "nowrap", o.appendChild(i), o.appendChild(a), o;
1013
1086
  }
1014
- function x0(n, e) {
1015
- var c;
1016
- const t = (N == null ? void 0 : N.document) ?? document, o = t.createElement("div");
1087
+ function m0(n, e) {
1088
+ var u;
1089
+ const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
1017
1090
  o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
1018
1091
  const i = t.createElement("div");
1019
1092
  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";
@@ -1024,50 +1097,57 @@ function x0(n, e) {
1024
1097
  const r = t.createElement("canvas");
1025
1098
  r.style.display = "block", r.style.width = "0", r.style.height = "0";
1026
1099
  function h() {
1027
- const d = s.clientWidth, l = s.clientHeight;
1028
- if (d <= 0 || l <= 0)
1100
+ const p = s.clientWidth, l = s.clientHeight;
1101
+ if (p <= 0 || l <= 0)
1029
1102
  return;
1030
- const f = e.size.width / e.size.height, m = Math.min(d, l * f), y = m / f;
1031
- r.style.width = `${m}px`, r.style.height = `${y}px`;
1103
+ const f = e.size.width / e.size.height, v = Math.min(p, l * f), y = v / f;
1104
+ r.style.width = `${v}px`, r.style.height = `${y}px`;
1032
1105
  }
1033
- const u = (c = t.defaultView) == null ? void 0 : c.ResizeObserver;
1034
- return u !== void 0 && new u(h).observe(s), N == null || N.addEventListener("resize", h), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: h };
1106
+ const c = (u = t.defaultView) == null ? void 0 : u.ResizeObserver;
1107
+ return c !== void 0 && new c(h).observe(s), R == null || R.addEventListener("resize", h), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: h };
1035
1108
  }
1036
- function qt(n, e, t) {
1037
- const o = (N == null ? void 0 : N.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
1109
+ function zt(n, e, t) {
1110
+ const o = (R == null ? void 0 : R.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
1038
1111
  a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
1039
1112
  const s = o.createElement("input");
1040
1113
  return s.type = "checkbox", s.checked = t, s.addEventListener("change", () => {
1041
1114
  e.style.display = s.checked ? i : "none";
1042
1115
  }), a.appendChild(s), a.appendChild(o.createTextNode(n)), { element: a, input: s };
1043
1116
  }
1044
- function y0(n, e, t) {
1117
+ function b0(n, e, t) {
1045
1118
  if (e === null)
1046
1119
  return "End of presentation";
1047
1120
  const o = n.slides[e];
1048
1121
  return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
1049
1122
  }
1050
- function Be(n, e) {
1123
+ function Ye(n, e) {
1051
1124
  if (n === void 0)
1052
1125
  return;
1053
1126
  const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
1054
1127
  (t < i || o > a) && n.scrollIntoView({ block: "nearest" });
1055
1128
  }
1056
- function Qt() {
1057
- Ot(N), N == null || N.close(), N = null, _t = null;
1129
+ function Jt() {
1130
+ Nt(R), Y0(), yt == null || yt(), R == null || R.close(), R = null, Ot = null, yt = null;
1058
1131
  }
1059
- function De() {
1060
- const { width: n, height: e, left: t, top: o } = H0;
1132
+ function We() {
1133
+ const { width: n, height: e, left: t, top: o } = G0;
1061
1134
  return `width=${n},height=${e},left=${t},top=${o}`;
1062
1135
  }
1063
- function Ot(n) {
1064
- n === null || n.closed || (H0 = {
1136
+ function Nt(n) {
1137
+ n === null || n.closed || (G0 = {
1065
1138
  width: n.outerWidth,
1066
1139
  height: n.outerHeight,
1067
1140
  left: n.screenX,
1068
1141
  top: n.screenY
1069
1142
  });
1070
1143
  }
1144
+ function Xe(n) {
1145
+ var o;
1146
+ const e = typeof ((o = globalThis.crypto) == null ? void 0 : o.randomUUID) == "function" ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`, t = n;
1147
+ return t[w0] = e, {
1148
+ isActive: () => !n.closed && t[w0] === e
1149
+ };
1150
+ }
1071
1151
  function at(n = null) {
1072
1152
  return {
1073
1153
  height: 0,
@@ -1075,8 +1155,8 @@ function at(n = null) {
1075
1155
  ...n
1076
1156
  };
1077
1157
  }
1078
- const qe = at({ width: 0, height: 0 });
1079
- function ze(n = null) {
1158
+ const Ge = at({ width: 0, height: 0 });
1159
+ function Ve(n = null) {
1080
1160
  return {
1081
1161
  backgroundColor: G.WHITE,
1082
1162
  slides: [],
@@ -1088,7 +1168,7 @@ function ze(n = null) {
1088
1168
  ...n
1089
1169
  };
1090
1170
  }
1091
- function je(n) {
1171
+ function Ze(n) {
1092
1172
  const e = Array.isArray(n) ? n : [n];
1093
1173
  let t = 0, o = 0;
1094
1174
  for (const i of e)
@@ -1106,26 +1186,26 @@ function je(n) {
1106
1186
  }
1107
1187
  return o;
1108
1188
  }
1109
- function s0(n, e = null) {
1110
- const { red: t, green: o, blue: i } = n, a = R0(n, e);
1189
+ function l0(n, e = null) {
1190
+ const { red: t, green: o, blue: i } = n, a = z0(n, e);
1111
1191
  return `rgba(${t}, ${o}, ${i}, ${a})`;
1112
1192
  }
1113
- function U0(n) {
1193
+ function V0(n) {
1114
1194
  return n === document.body;
1115
1195
  }
1116
- function He(n, e) {
1196
+ function Ke(n, e) {
1117
1197
  const t = document.createElement("div");
1118
- if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", U0(e)) {
1198
+ if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", V0(e)) {
1119
1199
  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";
1120
1200
  const o = n.size.height / n.size.width;
1121
- v0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => v0(t, o));
1201
+ A0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => A0(t, o));
1122
1202
  }
1123
1203
  return t;
1124
1204
  }
1125
- function v0(n, e) {
1205
+ function A0(n, e) {
1126
1206
  window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
1127
1207
  }
1128
- const Ue = {
1208
+ const Qe = {
1129
1209
  check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
1130
1210
  interpolate: (n, e, t) => ({
1131
1211
  red: Math.round(n.red + (e.red - n.red) * t),
@@ -1133,28 +1213,28 @@ const Ue = {
1133
1213
  blue: Math.round(n.blue + (e.blue - n.blue) * t),
1134
1214
  alpha: n.alpha + (e.alpha - n.alpha) * t
1135
1215
  })
1136
- }, $e = {
1216
+ }, Je = {
1137
1217
  check: (n) => !0,
1138
1218
  interpolate: (n, e) => e
1139
- }, Ye = {
1219
+ }, t1 = {
1140
1220
  check: (n) => typeof n == "number",
1141
1221
  interpolate: (n, e, t) => n + (e - n) * t
1142
- }, w0 = [
1143
- Ye,
1144
- Ue,
1145
- $e
1222
+ }, M0 = [
1223
+ t1,
1224
+ Qe,
1225
+ Je
1146
1226
  ];
1147
- function We(n, e, t, o = null) {
1227
+ function e1(n, e, t, o = null) {
1148
1228
  if (t === 0)
1149
1229
  return n;
1150
1230
  if (t === 1)
1151
1231
  return { ...n, ...e };
1152
- const i = o != null ? [...o, ...w0] : w0, a = {};
1232
+ const i = o != null ? [...o, ...M0] : M0, a = {};
1153
1233
  for (const s in e) {
1154
1234
  const r = n[s], h = e[s];
1155
- for (const u of i)
1156
- if (u.check(r, s) && u.check(h, s)) {
1157
- a[s] = u.interpolate(
1235
+ for (const c of i)
1236
+ if (c.check(r, s) && c.check(h, s)) {
1237
+ a[s] = c.interpolate(
1158
1238
  r,
1159
1239
  h,
1160
1240
  t
@@ -1164,7 +1244,7 @@ function We(n, e, t, o = null) {
1164
1244
  }
1165
1245
  return { ...n, ...a };
1166
1246
  }
1167
- function m0(n, e, t = null) {
1247
+ function L0(n, e, t = null) {
1168
1248
  if (e === null)
1169
1249
  return;
1170
1250
  const o = Array.isArray(e) ? e : [e];
@@ -1186,7 +1266,7 @@ function m0(n, e, t = null) {
1186
1266
  );
1187
1267
  n.set(a.object, {
1188
1268
  ...s,
1189
- ...We(
1269
+ ...e1(
1190
1270
  s,
1191
1271
  a.props,
1192
1272
  a.easing(h),
@@ -1213,10 +1293,10 @@ function m0(n, e, t = null) {
1213
1293
  }
1214
1294
  }
1215
1295
  }
1216
- function $0(n) {
1296
+ function Z0(n) {
1217
1297
  return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
1218
1298
  }
1219
- function Xe({
1299
+ function n1({
1220
1300
  slide: n,
1221
1301
  buildIndex: e,
1222
1302
  buildTime: t
@@ -1224,7 +1304,7 @@ function Xe({
1224
1304
  const o = /* @__PURE__ */ new Map();
1225
1305
  function i(s) {
1226
1306
  o.set(s, s);
1227
- for (const r of $0(s))
1307
+ for (const r of Z0(s))
1228
1308
  i(r);
1229
1309
  }
1230
1310
  for (const s of n.objects)
@@ -1232,22 +1312,22 @@ function Xe({
1232
1312
  const a = t === null ? e : e - 1;
1233
1313
  for (let s = 0; s < a; s++) {
1234
1314
  const r = n.animations[s] ?? null;
1235
- m0(o, r);
1315
+ L0(o, r);
1236
1316
  }
1237
1317
  if (t !== null && e > 0) {
1238
1318
  const s = n.animations[e - 1] ?? null;
1239
- m0(o, s, t);
1319
+ L0(o, s, t);
1240
1320
  }
1241
1321
  return o;
1242
1322
  }
1243
- function Ge(n) {
1323
+ function r1(n) {
1244
1324
  const e = {};
1245
1325
  function t(o) {
1246
1326
  if (o.objectType === U.SVG) {
1247
1327
  const a = o.svg;
1248
1328
  a !== void 0 && a.length > 0 && (e[a] = a);
1249
1329
  }
1250
- const i = $0(o);
1330
+ const i = Z0(o);
1251
1331
  for (const a of i)
1252
1332
  t(a);
1253
1333
  }
@@ -1257,7 +1337,7 @@ function Ge(n) {
1257
1337
  return e;
1258
1338
  }
1259
1339
  const dt = "presenterState";
1260
- function Ze(n, e) {
1340
+ function i1(n, e) {
1261
1341
  const t = localStorage.getItem(dt);
1262
1342
  if (t === null)
1263
1343
  return null;
@@ -1266,8 +1346,8 @@ function Ze(n, e) {
1266
1346
  let o;
1267
1347
  try {
1268
1348
  o = JSON.parse(t);
1269
- } catch (u) {
1270
- return console.error("Failed to parse presentation state from localStorage:", u), localStorage.removeItem(dt), null;
1349
+ } catch (c) {
1350
+ return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(dt), null;
1271
1351
  }
1272
1352
  const { title: i, timestamp: a } = o;
1273
1353
  let { slideIndex: s, buildIndex: r } = o;
@@ -1281,13 +1361,13 @@ function Ze(n, e) {
1281
1361
  buildIndex: r
1282
1362
  });
1283
1363
  }
1284
- function Ve({ title: n, slideIndex: e, buildIndex: t }) {
1364
+ function o1({ title: n, slideIndex: e, buildIndex: t }) {
1285
1365
  localStorage.setItem(
1286
1366
  dt,
1287
1367
  JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
1288
1368
  );
1289
1369
  }
1290
- const b0 = Object.freeze({
1370
+ const T0 = Object.freeze({
1291
1371
  canvas: null,
1292
1372
  extrasContainer: null,
1293
1373
  mountedExtrasCleanups: [],
@@ -1300,14 +1380,14 @@ const b0 = Object.freeze({
1300
1380
  textCommand: null,
1301
1381
  shortcuts: {}
1302
1382
  }
1303
- }), V = {
1383
+ }), Z = {
1304
1384
  Browser: "browser",
1305
1385
  Node: "node"
1306
1386
  };
1307
- function Ke(n, e) {
1387
+ function s1(n, e) {
1308
1388
  e.context.clearRect(0, 0, n.width, n.height);
1309
1389
  }
1310
- function Qe(n) {
1390
+ function a1(n) {
1311
1391
  const e = document.createElement("canvas");
1312
1392
  return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
1313
1393
  }
@@ -1315,34 +1395,34 @@ const gt = {
1315
1395
  Browser: "browser",
1316
1396
  Node: "node"
1317
1397
  };
1318
- function Je(n) {
1398
+ function h1(n) {
1319
1399
  const e = new Path2D(n);
1320
1400
  return {
1321
1401
  type: gt.Browser,
1322
1402
  path: e
1323
1403
  };
1324
1404
  }
1325
- function t1(n) {
1326
- const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, u = { x: t, y: o }, c = { x: i, y: a }, d = Math.atan2(c.y - u.y, c.x - u.x), l = { x: u.x + (c.x - u.x) / 2, y: u.y + (c.y - u.y) / 2 }, f = c.x - u.x, m = c.y - u.y, M = Math.hypot(f, m) * e, E = Math.cos(d), L = Math.sin(d), C = h ? { x: l.x - E * M / 2, y: l.y - L * M / 2 } : u, S = h ? { x: l.x + E * M / 2, y: l.y + L * M / 2 } : { x: u.x + E * M, y: u.y + L * M }, T = r ? Math.PI / 6 : Math.PI / 4.5, I = M < s * 2 ? M / 2 : s, R = {
1327
- x: S.x - I * Math.cos(d - T),
1328
- y: S.y - I * Math.sin(d - T)
1405
+ function l1(n) {
1406
+ const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, u = { x: i, y: a }, p = Math.atan2(u.y - c.y, u.x - c.x), l = { 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, M = Math.hypot(f, v) * e, P = Math.cos(p), E = Math.sin(p), L = h ? { x: l.x - P * M / 2, y: l.y - E * M / 2 } : c, S = h ? { x: l.x + P * M / 2, y: l.y + E * M / 2 } : { x: c.x + P * M, y: c.y + E * M }, T = r ? Math.PI / 6 : Math.PI / 4.5, k = M < s * 2 ? M / 2 : s, F = {
1407
+ x: S.x - k * Math.cos(p - T),
1408
+ y: S.y - k * Math.sin(p - T)
1329
1409
  }, X = {
1330
- x: S.x - I * Math.cos(d + T),
1331
- y: S.y - I * Math.sin(d + T)
1332
- }, H = {
1333
- x: C.x + I * Math.cos(d - T),
1334
- y: C.y + I * Math.sin(d - T)
1410
+ x: S.x - k * Math.cos(p + T),
1411
+ y: S.y - k * Math.sin(p + T)
1412
+ }, z = {
1413
+ x: L.x + k * Math.cos(p - T),
1414
+ y: L.y + k * Math.sin(p - T)
1335
1415
  }, Y = {
1336
- x: C.x + I * Math.cos(d + T),
1337
- y: C.y + I * Math.sin(d + T)
1416
+ x: L.x + k * Math.cos(p + T),
1417
+ y: L.y + k * Math.sin(p + T)
1338
1418
  };
1339
1419
  return {
1340
- arrowPoints: [C, S],
1341
- arrowheadPoints: [R, S, X],
1342
- doubledArrowheadPoints: [H, C, Y]
1420
+ arrowPoints: [L, S],
1421
+ arrowheadPoints: [F, S, X],
1422
+ doubledArrowheadPoints: [z, L, Y]
1343
1423
  };
1344
1424
  }
1345
- function yt({
1425
+ function vt({
1346
1426
  ctx: n,
1347
1427
  color: e,
1348
1428
  drawn: t = null,
@@ -1355,24 +1435,24 @@ function yt({
1355
1435
  }) {
1356
1436
  if (!(h === 0 || t === 0)) {
1357
1437
  if (t !== null && r !== null && t !== 1) {
1358
- const u = r + (i ? h : 0), c = r * t;
1438
+ const c = r + (i ? h : 0), u = r * t;
1359
1439
  o ? n.context.setLineDash([
1360
1440
  0,
1361
- (u - c) / 2,
1362
- c,
1363
- (u - c) / 2
1364
- ]) : n.context.setLineDash([c, u - c]);
1441
+ (c - u) / 2,
1442
+ u,
1443
+ (c - u) / 2
1444
+ ]) : n.context.setLineDash([u, c - u]);
1365
1445
  } else
1366
1446
  n.context.setLineDash([]);
1367
- if (n.context.lineWidth = h, n.context.strokeStyle = Et(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1447
+ if (n.context.lineWidth = h, n.context.strokeStyle = St(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1368
1448
  n.context.stroke();
1369
1449
  return;
1370
1450
  }
1371
1451
  switch (n.type) {
1372
- case V.Browser:
1452
+ case Z.Browser:
1373
1453
  s.type === gt.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1374
1454
  break;
1375
- case V.Node:
1455
+ case Z.Node:
1376
1456
  s.type === gt.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1377
1457
  break;
1378
1458
  default:
@@ -1380,23 +1460,23 @@ function yt({
1380
1460
  }
1381
1461
  }
1382
1462
  }
1383
- function vt({ ctx: n, path: e, color: t, opacity: o = null }) {
1384
- if (n.context.fillStyle = s0(t, o), e === void 0) {
1463
+ function wt({ ctx: n, path: e, color: t, opacity: o = null }) {
1464
+ if (n.context.fillStyle = l0(t, o), e === void 0) {
1385
1465
  n.context.fill();
1386
1466
  return;
1387
1467
  }
1388
1468
  switch (n.type) {
1389
- case V.Browser:
1469
+ case Z.Browser:
1390
1470
  e.type === gt.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1391
1471
  break;
1392
- case V.Node:
1472
+ case Z.Node:
1393
1473
  e.type === gt.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1394
1474
  break;
1395
1475
  default:
1396
1476
  st(n);
1397
1477
  }
1398
1478
  }
1399
- function zt(n, e) {
1479
+ function jt(n, e) {
1400
1480
  const t = e(), o = n[0];
1401
1481
  if (o === void 0)
1402
1482
  return { path: t, length: 0 };
@@ -1406,12 +1486,12 @@ function zt(n, e) {
1406
1486
  const s = n[a], r = n[a - 1];
1407
1487
  if (s === void 0 || r === void 0)
1408
1488
  continue;
1409
- const h = s.x - r.x, u = s.y - r.y;
1410
- i += Math.hypot(h, u), t.path.lineTo(s.x, s.y);
1489
+ const h = s.x - r.x, c = s.y - r.y;
1490
+ i += Math.hypot(h, c), t.path.lineTo(s.x, s.y);
1411
1491
  }
1412
1492
  return { path: t, length: i };
1413
1493
  }
1414
- const e1 = ({
1494
+ const c1 = ({
1415
1495
  ctx: n,
1416
1496
  object: e,
1417
1497
  opacity: t,
@@ -1420,69 +1500,69 @@ const e1 = ({
1420
1500
  const i = e.opacity * t;
1421
1501
  if (i === 0 || e.drawn === 0)
1422
1502
  return;
1423
- const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = t1(e), { path: h } = zt(a, o), { path: u } = zt(s, o);
1424
- if (yt({
1503
+ const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = l1(e), { path: h } = jt(a, o), { path: c } = jt(s, o);
1504
+ if (vt({
1425
1505
  color: e.color,
1426
1506
  ctx: n,
1427
1507
  path: h,
1428
1508
  opacity: i,
1429
1509
  width: e.width
1430
- }), e.isArrowheadFilled && (u.path.closePath(), vt({
1510
+ }), e.isArrowheadFilled && (c.path.closePath(), wt({
1431
1511
  ctx: n,
1432
- path: u,
1512
+ path: c,
1433
1513
  color: e.color,
1434
1514
  opacity: i
1435
- })), yt({
1515
+ })), vt({
1436
1516
  color: e.color,
1437
1517
  ctx: n,
1438
- path: u,
1518
+ path: c,
1439
1519
  opacity: i,
1440
1520
  width: e.width
1441
1521
  }), e.isArrowheadDoubled) {
1442
- const { path: c } = zt(
1522
+ const { path: u } = jt(
1443
1523
  r,
1444
1524
  o
1445
1525
  );
1446
- e.isArrowheadFilled && (c.path.closePath(), vt({
1526
+ e.isArrowheadFilled && (u.path.closePath(), wt({
1447
1527
  ctx: n,
1448
- path: c,
1528
+ path: u,
1449
1529
  color: e.color,
1450
1530
  opacity: i
1451
- })), yt({
1531
+ })), vt({
1452
1532
  color: e.color,
1453
1533
  ctx: n,
1454
- path: c,
1534
+ path: u,
1455
1535
  opacity: i,
1456
1536
  width: e.width
1457
1537
  });
1458
1538
  }
1459
1539
  };
1460
- function n1(n, e) {
1540
+ function u1(n, e) {
1461
1541
  const t = n.radius - n.strokeWidth / 2;
1462
1542
  if (t <= 0)
1463
1543
  return;
1464
1544
  const o = e(), i = -Math.PI / 2;
1465
1545
  return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
1466
1546
  }
1467
- function r1(n, e) {
1547
+ function f1(n, e) {
1468
1548
  const t = e(), o = -Math.PI / 2;
1469
1549
  t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
1470
1550
  const i = 2 * Math.PI * n.radius;
1471
1551
  return { path: t, length: i };
1472
1552
  }
1473
- function Y0(n, e) {
1553
+ function K0(n, e) {
1474
1554
  switch (n.type) {
1475
- case V.Browser:
1555
+ case Z.Browser:
1476
1556
  e.type === gt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1477
1557
  break;
1478
- case V.Node:
1558
+ case Z.Node:
1479
1559
  e.type === gt.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1480
1560
  break;
1481
1561
  default:
1482
1562
  st(n);
1483
1563
  }
1484
1564
  }
1485
- const i1 = ({
1565
+ const g1 = ({
1486
1566
  ctx: n,
1487
1567
  object: e,
1488
1568
  opacity: t,
@@ -1491,13 +1571,13 @@ const i1 = ({
1491
1571
  const i = e.opacity * t;
1492
1572
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1493
1573
  return;
1494
- const { path: a, length: s } = r1(e, o);
1574
+ const { path: a, length: s } = f1(e, o);
1495
1575
  if (i < 1 && e.strokeWidth > 0) {
1496
- const r = n1(e, o);
1497
- r !== void 0 && (n.context.save(), Y0(n, r), vt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1576
+ const r = u1(e, o);
1577
+ r !== void 0 && (n.context.save(), K0(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1498
1578
  } else
1499
- vt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1500
- yt({
1579
+ wt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1580
+ vt({
1501
1581
  color: e.strokeColor,
1502
1582
  ctx: n,
1503
1583
  drawn: e.drawn,
@@ -1514,11 +1594,11 @@ function W(n = null) {
1514
1594
  ...n
1515
1595
  };
1516
1596
  }
1517
- const o1 = W();
1597
+ const p1 = W();
1518
1598
  function ut(n = null) {
1519
1599
  return {
1520
- origin: o1,
1521
- size: qe,
1600
+ origin: p1,
1601
+ size: Ge,
1522
1602
  ...n
1523
1603
  };
1524
1604
  }
@@ -1575,7 +1655,7 @@ function pt(n, e, t) {
1575
1655
  st(e);
1576
1656
  }
1577
1657
  }
1578
- const s1 = ({
1658
+ const d1 = ({
1579
1659
  ctx: n,
1580
1660
  object: e,
1581
1661
  renderObject: t,
@@ -1588,22 +1668,22 @@ const s1 = ({
1588
1668
  width: e.width * Math.abs(i),
1589
1669
  height: e.height * Math.abs(a)
1590
1670
  })
1591
- ), { rotation: r, rotateOriginX: h, rotateOriginY: u, skewOriginX: c, skewOriginY: d, skewX: l, skewY: f } = e;
1671
+ ), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: u, skewOriginY: p, skewX: l, skewY: f } = e;
1592
1672
  if (!(i === 0 || a === 0)) {
1593
- n.context.save(), n.context.translate(s.origin.x, s.origin.y), n.context.scale(i, a), n.context.translate(h, u), n.context.rotate(r * Math.PI / 180), n.context.translate(-h, -u), n.context.translate(c, d), n.context.transform(
1673
+ n.context.save(), n.context.translate(s.origin.x, s.origin.y), n.context.scale(i, a), n.context.translate(h, c), n.context.rotate(r * Math.PI / 180), n.context.translate(-h, -c), n.context.translate(u, p), n.context.transform(
1594
1674
  1,
1595
1675
  Math.tan(f * Math.PI / 180),
1596
1676
  Math.tan(l * Math.PI / 180),
1597
1677
  1,
1598
1678
  0,
1599
1679
  0
1600
- ), n.context.translate(-c, -d);
1601
- for (const m of e.objects)
1602
- t(m, o * e.opacity);
1603
- e.previewColor !== null && (n.context.fillStyle = Et(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(h, u, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(c, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1680
+ ), n.context.translate(-u, -p);
1681
+ for (const v of e.objects)
1682
+ t(v, o * e.opacity);
1683
+ e.previewColor !== null && (n.context.fillStyle = St(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(h, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(u, p, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1604
1684
  }
1605
1685
  };
1606
- function a0(n, e, t, o, i = 0) {
1686
+ function c0(n, e, t, o, i = 0) {
1607
1687
  const a = o();
1608
1688
  a.path.moveTo(n.x + t, n.y), a.path.lineTo(n.x + e.width - t, n.y), a.path.arcTo(
1609
1689
  n.x + e.width,
@@ -1627,10 +1707,10 @@ function a0(n, e, t, o, i = 0) {
1627
1707
  const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
1628
1708
  return { path: a, length: s };
1629
1709
  }
1630
- const St = {
1710
+ const kt = {
1631
1711
  Browser: "browser",
1632
1712
  Node: "node"
1633
- }, a1 = ({
1713
+ }, x1 = ({
1634
1714
  ctx: n,
1635
1715
  imageById: e,
1636
1716
  object: t,
@@ -1644,17 +1724,17 @@ const St = {
1644
1724
  ), s = e[t.imageId];
1645
1725
  if (s !== void 0) {
1646
1726
  if (n.context.save(), t.cornerRadius > 0) {
1647
- const r = a0(
1727
+ const r = c0(
1648
1728
  a.origin,
1649
1729
  a.size,
1650
1730
  t.cornerRadius,
1651
1731
  i
1652
1732
  );
1653
1733
  switch (n.type) {
1654
- case V.Browser:
1734
+ case Z.Browser:
1655
1735
  r.path.type === gt.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1656
1736
  break;
1657
- case V.Node:
1737
+ case Z.Node:
1658
1738
  r.path.type === gt.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1659
1739
  break;
1660
1740
  default:
@@ -1662,8 +1742,8 @@ const St = {
1662
1742
  }
1663
1743
  }
1664
1744
  switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
1665
- case V.Browser:
1666
- s.type === St.Browser ? n.context.drawImage(
1745
+ case Z.Browser:
1746
+ s.type === kt.Browser ? n.context.drawImage(
1667
1747
  s.image,
1668
1748
  a.origin.x,
1669
1749
  a.origin.y,
@@ -1671,8 +1751,8 @@ const St = {
1671
1751
  a.size.height
1672
1752
  ) : console.warn("Attempted to use Node Image in Browser Canvas context");
1673
1753
  break;
1674
- case V.Node:
1675
- s.type === St.Node ? n.context.drawImage(
1754
+ case Z.Node:
1755
+ s.type === kt.Node ? n.context.drawImage(
1676
1756
  s.image,
1677
1757
  a.origin.x,
1678
1758
  a.origin.y,
@@ -1686,13 +1766,13 @@ const St = {
1686
1766
  n.context.restore();
1687
1767
  }
1688
1768
  };
1689
- function h1(n, e) {
1769
+ function y1(n, e) {
1690
1770
  const t = e();
1691
1771
  t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
1692
1772
  const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
1693
1773
  return { path: t, length: o };
1694
1774
  }
1695
- const l1 = ({
1775
+ const v1 = ({
1696
1776
  ctx: n,
1697
1777
  object: e,
1698
1778
  opacity: t,
@@ -1701,8 +1781,8 @@ const l1 = ({
1701
1781
  const i = e.opacity * t;
1702
1782
  if (i === 0 || e.drawn === 0)
1703
1783
  return;
1704
- const { path: a, length: s } = h1(e, o);
1705
- yt({
1784
+ const { path: a, length: s } = y1(e, o);
1785
+ vt({
1706
1786
  color: e.color,
1707
1787
  ctx: n,
1708
1788
  drawn: e.drawn,
@@ -1713,7 +1793,7 @@ const l1 = ({
1713
1793
  opacity: i,
1714
1794
  width: e.width
1715
1795
  });
1716
- }, c1 = ({
1796
+ }, w1 = ({
1717
1797
  ctx: n,
1718
1798
  object: e,
1719
1799
  opacity: t,
@@ -1725,11 +1805,11 @@ const l1 = ({
1725
1805
  e.anchor,
1726
1806
  at({ width: e.width, height: e.height })
1727
1807
  );
1728
- e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = Et(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();
1808
+ e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = St(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();
1729
1809
  for (const a of e.objects)
1730
1810
  o(a, t * e.opacity);
1731
1811
  n.context.restore();
1732
- }, u1 = ({
1812
+ }, m1 = ({
1733
1813
  ctx: n,
1734
1814
  object: e,
1735
1815
  opacity: t,
@@ -1743,12 +1823,12 @@ const l1 = ({
1743
1823
  e.anchor,
1744
1824
  at({ width: e.width, height: e.height })
1745
1825
  ), s = o(e.path);
1746
- n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), vt({
1826
+ n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), wt({
1747
1827
  ctx: n,
1748
1828
  path: s,
1749
1829
  color: e.fillColor,
1750
1830
  opacity: i
1751
- }), yt({
1831
+ }), vt({
1752
1832
  color: e.strokeColor,
1753
1833
  ctx: n,
1754
1834
  drawn: e.drawn,
@@ -1759,19 +1839,19 @@ const l1 = ({
1759
1839
  width: e.strokeWidth
1760
1840
  }), n.context.restore();
1761
1841
  };
1762
- function f1(n, e) {
1842
+ function b1(n, e) {
1763
1843
  const t = e(), o = n.points, i = o[0];
1764
1844
  if (i === void 0)
1765
1845
  return { path: t, length: 0 };
1766
1846
  t.path.moveTo(i.x, i.y);
1767
1847
  let a = 0, s = i;
1768
1848
  for (let h = 1; h < o.length; h++) {
1769
- const u = o[h];
1770
- if (u === void 0)
1849
+ const c = o[h];
1850
+ if (c === void 0)
1771
1851
  continue;
1772
- t.path.lineTo(u.x, u.y);
1773
- const c = Math.hypot(u.x - s.x, u.y - s.y);
1774
- a += c, s = u;
1852
+ t.path.lineTo(c.x, c.y);
1853
+ const u = Math.hypot(c.x - s.x, c.y - s.y);
1854
+ a += u, s = c;
1775
1855
  }
1776
1856
  t.path.closePath();
1777
1857
  const r = Math.hypot(
@@ -1780,7 +1860,7 @@ function f1(n, e) {
1780
1860
  );
1781
1861
  return a += r, { path: t, length: a };
1782
1862
  }
1783
- const g1 = ({
1863
+ const A1 = ({
1784
1864
  ctx: n,
1785
1865
  object: e,
1786
1866
  opacity: t,
@@ -1789,13 +1869,13 @@ const g1 = ({
1789
1869
  const i = e.opacity * t;
1790
1870
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1791
1871
  return;
1792
- const { path: a, length: s } = f1(e, o);
1793
- vt({
1872
+ const { path: a, length: s } = b1(e, o);
1873
+ wt({
1794
1874
  ctx: n,
1795
1875
  path: a,
1796
1876
  color: e.fillColor,
1797
1877
  opacity: i
1798
- }), yt({
1878
+ }), vt({
1799
1879
  color: e.strokeColor,
1800
1880
  ctx: n,
1801
1881
  drawn: e.drawn,
@@ -1805,7 +1885,7 @@ const g1 = ({
1805
1885
  width: e.strokeWidth
1806
1886
  });
1807
1887
  };
1808
- function p1(n, e) {
1888
+ function M1(n, e) {
1809
1889
  const t = n.strokeWidth / 2, { origin: o, size: i } = pt(
1810
1890
  W({ x: n.x, y: n.y }),
1811
1891
  n.anchor,
@@ -1813,16 +1893,16 @@ function p1(n, e) {
1813
1893
  ), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
1814
1894
  if (a <= 0 || s <= 0)
1815
1895
  return;
1816
- const r = W({ x: o.x + t, y: o.y + t }), h = at({ width: a, height: s }), u = Math.max(
1896
+ const r = W({ x: o.x + t, y: o.y + t }), h = at({ width: a, height: s }), c = Math.max(
1817
1897
  0,
1818
1898
  Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
1819
1899
  );
1820
- if (u > 0)
1821
- return a0(r, h, u, e).path;
1822
- const c = e();
1823
- return c.path.moveTo(r.x, r.y), c.path.lineTo(r.x + a, r.y), c.path.lineTo(r.x + a, r.y + s), c.path.lineTo(r.x, r.y + s), c.path.closePath(), c;
1900
+ if (c > 0)
1901
+ return c0(r, h, c, e).path;
1902
+ const u = e();
1903
+ 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;
1824
1904
  }
1825
- function d1(n, e) {
1905
+ function L1(n, e) {
1826
1906
  const { origin: t, size: o } = pt(
1827
1907
  W({ x: n.x, y: n.y }),
1828
1908
  n.anchor,
@@ -1832,7 +1912,7 @@ function d1(n, e) {
1832
1912
  Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
1833
1913
  ), a = Math.min(n.strokeWidth * 2, o.width - i);
1834
1914
  if (i > 0)
1835
- return a0(t, o, i, e, a);
1915
+ return c0(t, o, i, e, a);
1836
1916
  {
1837
1917
  const s = e();
1838
1918
  s.path.moveTo(t.x, t.y), s.path.lineTo(t.x + o.width, t.y), s.path.lineTo(t.x + o.width, t.y + o.height), s.path.lineTo(t.x, t.y + o.height), s.path.lineTo(t.x, t.y), s.path.lineTo(t.x + a, t.y);
@@ -1840,7 +1920,7 @@ function d1(n, e) {
1840
1920
  return { path: s, length: r };
1841
1921
  }
1842
1922
  }
1843
- const x1 = ({
1923
+ const T1 = ({
1844
1924
  ctx: n,
1845
1925
  object: e,
1846
1926
  opacity: t,
@@ -1849,13 +1929,13 @@ const x1 = ({
1849
1929
  const i = e.opacity * t;
1850
1930
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1851
1931
  return;
1852
- const { path: a, length: s } = d1(e, o);
1932
+ const { path: a, length: s } = L1(e, o);
1853
1933
  if (i < 1 && e.strokeWidth > 0) {
1854
- const r = p1(e, o);
1855
- r !== void 0 && (n.context.save(), Y0(n, r), vt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1934
+ const r = M1(e, o);
1935
+ r !== void 0 && (n.context.save(), K0(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1856
1936
  } else
1857
- vt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1858
- yt({
1937
+ wt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1938
+ vt({
1859
1939
  color: e.strokeColor,
1860
1940
  ctx: n,
1861
1941
  drawn: e.drawn,
@@ -1864,7 +1944,7 @@ const x1 = ({
1864
1944
  opacity: i,
1865
1945
  width: e.strokeWidth
1866
1946
  });
1867
- }, y1 = ({
1947
+ }, C1 = ({
1868
1948
  ctx: n,
1869
1949
  imageById: e,
1870
1950
  object: t,
@@ -1882,8 +1962,8 @@ const x1 = ({
1882
1962
  at({ width: t.width, height: t.height })
1883
1963
  );
1884
1964
  switch (n.context.save(), n.context.globalAlpha = i, n.type) {
1885
- case V.Browser:
1886
- a.type === St.Browser && n.context.drawImage(
1965
+ case Z.Browser:
1966
+ a.type === kt.Browser && n.context.drawImage(
1887
1967
  a.image,
1888
1968
  s.origin.x,
1889
1969
  s.origin.y,
@@ -1891,8 +1971,8 @@ const x1 = ({
1891
1971
  s.size.height
1892
1972
  );
1893
1973
  break;
1894
- case V.Node:
1895
- a.type === St.Node && n.context.drawImage(
1974
+ case Z.Node:
1975
+ a.type === kt.Node && n.context.drawImage(
1896
1976
  a.image,
1897
1977
  s.origin.x,
1898
1978
  s.origin.y,
@@ -1905,7 +1985,7 @@ const x1 = ({
1905
1985
  }
1906
1986
  n.context.restore();
1907
1987
  };
1908
- function v1(n) {
1988
+ function P1(n) {
1909
1989
  return {
1910
1990
  color: n.color,
1911
1991
  fontFamily: n.fontFamily,
@@ -1917,7 +1997,7 @@ function v1(n) {
1917
1997
  superscript: n.superscript
1918
1998
  };
1919
1999
  }
1920
- function w1(n, e = 1) {
2000
+ function E1(n, e = 1) {
1921
2001
  const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
1922
2002
  let o = 0, i = 0;
1923
2003
  for (let a = 0; a < n.length; a++) {
@@ -1932,8 +2012,8 @@ function w1(n, e = 1) {
1932
2012
  width: t
1933
2013
  };
1934
2014
  }
1935
- const m1 = 0.7, b1 = 0.3;
1936
- function W0(n) {
2015
+ const S1 = 0.7, k1 = 0.3;
2016
+ function Q0(n) {
1937
2017
  const e = n.superscript, t = n.subscript && !e;
1938
2018
  return !e && !t ? {
1939
2019
  baselineShift: 0,
@@ -1941,35 +2021,35 @@ function W0(n) {
1941
2021
  isSubscript: !1,
1942
2022
  isSuperscript: !1
1943
2023
  } : {
1944
- baselineShift: n.fontSize * b1 * (e ? -1 : 1),
1945
- fontSize: n.fontSize * m1,
2024
+ baselineShift: n.fontSize * k1 * (e ? -1 : 1),
2025
+ fontSize: n.fontSize * S1,
1946
2026
  isSubscript: t,
1947
2027
  isSuperscript: e
1948
2028
  };
1949
2029
  }
1950
- function A1(n) {
2030
+ function I1(n) {
1951
2031
  return {
1952
2032
  width: n.width,
1953
2033
  height: n.fontBoundingBoxAscent
1954
2034
  };
1955
2035
  }
1956
- function X0(n, e, t = 1) {
1957
- const o = W0(e);
1958
- n.context.fillStyle = s0(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
2036
+ function J0(n, e, t = 1) {
2037
+ const o = Q0(e);
2038
+ n.context.fillStyle = l0(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";
1959
2039
  }
1960
- function M1(n, e, t) {
2040
+ function _1(n, e, t) {
1961
2041
  const o = [];
1962
2042
  for (const i of n) {
1963
2043
  const a = [];
1964
2044
  for (const s of i) {
1965
- const { text: r, ...h } = s, u = { ...e, ...h };
1966
- X0(t, u);
1967
- const c = t.context.measureText(r), d = A1(c), { baselineShift: l } = W0(u), f = d.height + Math.max(0, -l), m = Math.max(0, l);
2045
+ const { text: r, ...h } = s, c = { ...e, ...h };
2046
+ J0(t, c);
2047
+ const u = t.context.measureText(r), p = I1(u), { baselineShift: l } = Q0(c), f = p.height + Math.max(0, -l), v = Math.max(0, l);
1968
2048
  a.push({
1969
- ...d,
2049
+ ...p,
1970
2050
  baselineShift: l,
1971
- bottom: m,
1972
- height: f + m,
2051
+ bottom: v,
2052
+ height: f + v,
1973
2053
  top: f
1974
2054
  });
1975
2055
  }
@@ -1977,75 +2057,75 @@ function M1(n, e, t) {
1977
2057
  }
1978
2058
  return o;
1979
2059
  }
1980
- const L1 = ({ ctx: n, object: e, opacity: t }) => {
2060
+ const O1 = ({ ctx: n, object: e, opacity: t }) => {
1981
2061
  const o = e.opacity * t;
1982
2062
  if (o === 0)
1983
2063
  return;
1984
- const { length: i } = e, a = q0(e.text), s = v1(e), r = M1(a, s, n), h = w1(r, e.lineSpacing), u = pt(W({ x: e.x, y: e.y }), e.anchor, h);
1985
- let c = u.origin.x, d = u.origin.y, l = 0, f = 0;
1986
- for (let m = 0; m < a.length; m++) {
1987
- const y = a[m], M = r[m];
2064
+ const { length: i } = e, a = U0(e.text), s = P1(e), r = _1(a, s, n), h = E1(r, e.lineSpacing), c = pt(W({ x: e.x, y: e.y }), e.anchor, h);
2065
+ let u = c.origin.x, p = c.origin.y, l = 0, f = 0;
2066
+ for (let v = 0; v < a.length; v++) {
2067
+ const y = a[v], M = r[v];
1988
2068
  if (y == null || M == null) {
1989
2069
  console.error("Could not determine text units or sizes for line");
1990
2070
  continue;
1991
2071
  }
1992
- const E = M.reduce((I, R) => I + R.width, 0), L = M.length === 0 ? f : M.reduce((I, R) => Math.max(I, R.top), 0), C = M.length === 0 ? 0 : M.reduce((I, R) => Math.max(I, R.bottom), 0), S = L + C;
2072
+ const P = M.reduce((k, F) => k + F.width, 0), E = M.length === 0 ? f : M.reduce((k, F) => Math.max(k, F.top), 0), L = M.length === 0 ? 0 : M.reduce((k, F) => Math.max(k, F.bottom), 0), S = E + L;
1993
2073
  switch (e.alignment) {
1994
2074
  case xt.LEFT:
1995
- c = u.origin.x;
2075
+ u = c.origin.x;
1996
2076
  break;
1997
2077
  case xt.CENTER:
1998
- c = u.origin.x + (u.size.width - E) / 2;
2078
+ u = c.origin.x + (c.size.width - P) / 2;
1999
2079
  break;
2000
2080
  case xt.RIGHT:
2001
- c = u.origin.x + (u.size.width - E);
2081
+ u = c.origin.x + (c.size.width - P);
2002
2082
  break;
2003
2083
  default:
2004
2084
  st(e.alignment);
2005
2085
  break;
2006
2086
  }
2007
- d += f * (e.lineSpacing - 1);
2008
- const T = d + L;
2087
+ p += f * (e.lineSpacing - 1);
2088
+ const T = p + E;
2009
2089
  f = S;
2010
- for (let I = 0; I < y.length && !(i !== null && l >= i); I++) {
2011
- const R = y[I], X = M[I];
2012
- if (R == null || X == null) {
2090
+ for (let k = 0; k < y.length && !(i !== null && l >= i); k++) {
2091
+ const F = y[k], X = M[k];
2092
+ if (F == null || X == null) {
2013
2093
  console.error("Could not determine text unit or size for unit");
2014
2094
  continue;
2015
2095
  }
2016
- const { text: H, ...Y } = R;
2096
+ const { text: z, ...Y } = F;
2017
2097
  let tt;
2018
- if (i !== null && l + H.length > i) {
2098
+ if (i !== null && l + z.length > i) {
2019
2099
  const K = i - l;
2020
- tt = H.slice(0, K);
2100
+ tt = z.slice(0, K);
2021
2101
  }
2022
- const et = tt ?? H;
2102
+ const et = tt ?? z;
2023
2103
  l += et.length;
2024
2104
  const nt = { ...s, ...Y };
2025
- X0(n, nt, o), n.context.fillText(et, c, T + X.baselineShift), c += X.width;
2105
+ J0(n, nt, o), n.context.fillText(et, u, T + X.baselineShift), u += X.width;
2026
2106
  }
2027
- d += S;
2028
- }
2029
- }, T1 = {
2030
- [U.ARROW]: e1,
2031
- [U.CIRCLE]: i1,
2032
- [U.GROUP]: s1,
2033
- [U.IMAGE]: a1,
2034
- [U.LINE]: l1,
2035
- [U.MASK]: c1,
2036
- [U.PATH]: u1,
2037
- [U.POLYGON]: g1,
2038
- [U.RECTANGLE]: x1,
2107
+ p += S;
2108
+ }
2109
+ }, N1 = {
2110
+ [U.ARROW]: c1,
2111
+ [U.CIRCLE]: g1,
2112
+ [U.GROUP]: d1,
2113
+ [U.IMAGE]: x1,
2114
+ [U.LINE]: v1,
2115
+ [U.MASK]: w1,
2116
+ [U.PATH]: m1,
2117
+ [U.POLYGON]: A1,
2118
+ [U.RECTANGLE]: T1,
2039
2119
  [U.SLIDE_OBJECT]: () => {
2040
2120
  },
2041
- [U.SVG]: y1,
2042
- [U.TEXT]: L1
2121
+ [U.SVG]: C1,
2122
+ [U.TEXT]: O1
2043
2123
  };
2044
- function C1(n) {
2124
+ function R1(n) {
2045
2125
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2046
2126
  return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
2047
2127
  }
2048
- function P1(n, e) {
2128
+ function F1(n, e) {
2049
2129
  if (n === null)
2050
2130
  return null;
2051
2131
  const t = pt(
@@ -2065,20 +2145,20 @@ function P1(n, e) {
2065
2145
  a !== null && a(), n.removeChild(o);
2066
2146
  };
2067
2147
  }
2068
- async function E1(n) {
2148
+ async function B1(n) {
2069
2149
  if (Object.keys(n).length === 0)
2070
2150
  return {};
2071
2151
  const e = {}, t = (i) => new Promise((a, s) => {
2072
2152
  const r = new Image();
2073
- if (r.onload = () => a(r), r.onerror = (u) => s(u), i.includes("</svg>")) {
2074
- const u = i.replace(/<\?xml[^?]*\?>\s*/g, ""), c = new Blob([u], { type: "image/svg+xml;charset=utf-8" }), d = URL.createObjectURL(c);
2075
- r.src = d;
2153
+ if (r.onload = () => a(r), r.onerror = (c) => s(c), i.includes("</svg>")) {
2154
+ const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), u = new Blob([c], { type: "image/svg+xml;charset=utf-8" }), p = URL.createObjectURL(u);
2155
+ r.src = p;
2076
2156
  } else
2077
2157
  r.src = i;
2078
2158
  }), o = Object.entries(n).map(async ([i, a]) => {
2079
2159
  const s = await t(a);
2080
2160
  e[i] = {
2081
- type: St.Browser,
2161
+ type: kt.Browser,
2082
2162
  image: s
2083
2163
  };
2084
2164
  });
@@ -2089,70 +2169,71 @@ async function E1(n) {
2089
2169
  }
2090
2170
  return e;
2091
2171
  }
2092
- class jn {
2172
+ class Zn {
2093
2173
  constructor(e) {
2094
2174
  this.navigator = null;
2095
2175
  const { objectRenderers: t, scale: o = 1, ...i } = e;
2096
2176
  this.props = {
2097
- presentation: ze(),
2177
+ presentation: Ve(),
2098
2178
  element: document.body,
2099
2179
  objectRenderers: {
2100
- ...T1,
2180
+ ...N1,
2101
2181
  ...t
2102
2182
  },
2103
2183
  cacheDurationMinutes: 15,
2104
- scale: S1(o),
2184
+ scale: D1(o),
2105
2185
  ...i
2106
- }, this.state = { ...b0 };
2186
+ }, this.state = { ...T0 };
2107
2187
  }
2108
2188
  /** Starts the presentation. */
2109
2189
  async present() {
2110
- const { presentation: e, element: t, scale: o } = this.props, i = Qe(e.size), a = C1(e.size);
2190
+ const { presentation: e, element: t, scale: o } = this.props, i = a1(e.size), a = R1(e.size);
2111
2191
  a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
2112
- ...b0,
2113
- imageById: await E1({
2192
+ ...T0,
2193
+ imageById: await B1({
2114
2194
  ...e.resources.images,
2115
- ...Ge(e)
2195
+ ...r1(e)
2116
2196
  }),
2117
2197
  canvas: i,
2118
2198
  extrasContainer: a
2119
2199
  };
2120
- const s = He(e, t), r = U0(t), h = (c, d) => {
2200
+ const s = Ke(e, t), r = V0(t), h = (p, l) => {
2121
2201
  this.state.shortcutState.shortcuts.b = {
2122
2202
  slideIndex: this.state.slideIndex,
2123
2203
  buildIndex: this.state.buildIndex
2124
- }, this.renderSlide(c ?? this.state.slideIndex, d);
2204
+ }, this.renderSlide(p ?? this.state.slideIndex, l);
2205
+ }, c = (p = !1) => {
2206
+ r && (this.navigator = He({
2207
+ presentation: e,
2208
+ shortcutState: this.state.shortcutState,
2209
+ onNavigateToSlide: (l) => this.renderSlide(l),
2210
+ onRenderSlide: h,
2211
+ onNext: (l) => this.next(l),
2212
+ onPrevious: (l) => this.previous(l),
2213
+ forceRefresh: p
2214
+ }), this.updateNavigator());
2125
2215
  };
2126
- j0(
2216
+ X0(
2127
2217
  e,
2128
2218
  s,
2129
2219
  this.state.shortcutState,
2130
2220
  {
2131
- onNext: (c) => this.next(c),
2132
- onPrevious: (c) => this.previous(c),
2221
+ onNext: (p) => this.next(p),
2222
+ onPrevious: (p) => this.previous(p),
2133
2223
  onRenderSlide: h,
2134
- onShowNavigator: () => {
2135
- r && (this.navigator = Fe({
2136
- presentation: e,
2137
- shortcutState: this.state.shortcutState,
2138
- onNavigateToSlide: (c) => this.renderSlide(c),
2139
- onRenderSlide: h,
2140
- onNext: (c) => this.next(c),
2141
- onPrevious: (c) => this.previous(c)
2142
- }), this.updateNavigator());
2143
- }
2224
+ onShowNavigator: () => c()
2144
2225
  },
2145
2226
  {
2146
2227
  focusOnPointerDown: !r,
2147
2228
  keyEventTarget: r ? window : s
2148
2229
  }
2149
2230
  ), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
2150
- const u = Ze(e, this.props.cacheDurationMinutes);
2151
- u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0);
2231
+ const u = i1(e, this.props.cacheDurationMinutes);
2232
+ u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0), qe() && c(!0);
2152
2233
  }
2153
2234
  renderSlide(e, t = 0, o = null) {
2154
2235
  const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== e;
2155
- this.state.slideIndex = e, this.state.buildIndex = t, o === null && Ve({ title: i.title, slideIndex: e, buildIndex: t });
2236
+ this.state.slideIndex = e, this.state.buildIndex = t, o === null && o1({ title: i.title, slideIndex: e, buildIndex: t });
2156
2237
  const r = i.slides[e];
2157
2238
  if (!(r === void 0 || a === null)) {
2158
2239
  if (s || this.state.mountedExtrasCleanups.length === 0 && r.extras.length > 0) {
@@ -2160,8 +2241,8 @@ class jn {
2160
2241
  h();
2161
2242
  this.state.mountedExtrasCleanups = [];
2162
2243
  for (const h of r.extras) {
2163
- const u = P1(this.state.extrasContainer, h);
2164
- u !== null && this.state.mountedExtrasCleanups.push(u);
2244
+ const c = F1(this.state.extrasContainer, h);
2245
+ c !== null && this.state.mountedExtrasCleanups.push(c);
2165
2246
  }
2166
2247
  }
2167
2248
  this.renderCanvas(a, e, t, o, this.props.scale), o === null && this.updateNavigator();
@@ -2170,42 +2251,42 @@ class jn {
2170
2251
  renderCanvas(e, t, o = 0, i = null, a = 1) {
2171
2252
  const { objectRenderers: s, presentation: r } = this.props, { imageById: h } = this.state;
2172
2253
  e.width = r.size.width, e.height = r.size.height;
2173
- const u = e.getContext("2d");
2174
- if (u === null)
2254
+ const c = e.getContext("2d");
2255
+ if (c === null)
2175
2256
  return;
2176
- const c = {
2177
- type: V.Browser,
2178
- context: u
2257
+ const u = {
2258
+ type: Z.Browser,
2259
+ context: c
2179
2260
  };
2180
- Ke(e, c);
2181
- const d = r.slides[t];
2182
- if (d === void 0)
2261
+ s1(e, u);
2262
+ const p = r.slides[t];
2263
+ if (p === void 0)
2183
2264
  return;
2184
- const l = Xe({
2185
- slide: d,
2265
+ const l = n1({
2266
+ slide: p,
2186
2267
  buildIndex: o,
2187
2268
  buildTime: i
2188
2269
  });
2189
- c.context.fillStyle = s0(r.backgroundColor), c.context.fillRect(0, 0, e.width, e.height);
2270
+ u.context.fillStyle = l0(r.backgroundColor), u.context.fillRect(0, 0, e.width, e.height);
2190
2271
  function f(y, M) {
2191
- const E = s[y.objectType], L = l.get(y);
2192
- E === void 0 || L === void 0 || E({
2193
- ctx: c,
2272
+ const P = s[y.objectType], E = l.get(y);
2273
+ P === void 0 || E === void 0 || P({
2274
+ ctx: u,
2194
2275
  imageById: h,
2195
- object: L,
2276
+ object: E,
2196
2277
  opacity: M,
2197
2278
  renderObject: f,
2198
- createPath2D: Je
2279
+ createPath2D: h1
2199
2280
  });
2200
2281
  }
2201
- const m = a !== 1;
2202
- m && (c.context.save(), c.context.translate(
2282
+ const v = a !== 1;
2283
+ v && (u.context.save(), u.context.translate(
2203
2284
  e.width * (1 - a) / 2,
2204
2285
  e.height * (1 - a) / 2
2205
- ), c.context.scale(a, a));
2206
- for (const y of d.objects)
2286
+ ), u.context.scale(a, a));
2287
+ for (const y of p.objects)
2207
2288
  f(y, 1);
2208
- m && c.context.restore();
2289
+ v && u.context.restore();
2209
2290
  }
2210
2291
  updateNavigator() {
2211
2292
  const { navigator: e } = this;
@@ -2236,11 +2317,11 @@ class jn {
2236
2317
  return;
2237
2318
  const r = s.animations[a];
2238
2319
  if (r !== void 0 && !e) {
2239
- const h = performance.now(), u = je(r), c = (d) => {
2240
- const l = d - h;
2241
- l < u ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(c)) : this.renderSlide(i, a + 1, null);
2320
+ const h = performance.now(), c = Ze(r), u = (p) => {
2321
+ const l = p - h;
2322
+ l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(u)) : this.renderSlide(i, a + 1, null);
2242
2323
  };
2243
- this.state.currentAnimationId = requestAnimationFrame(c);
2324
+ this.state.currentAnimationId = requestAnimationFrame(u);
2244
2325
  } else i + 1 < t.slides.length && this.renderSlide(i + 1);
2245
2326
  }
2246
2327
  previous(e = !1) {
@@ -2266,12 +2347,12 @@ class jn {
2266
2347
  this.props.element.style.cursor = "none", (t = (e = this.state.canvas) == null ? void 0 : e.parentElement) == null || t.style.setProperty("cursor", "none");
2267
2348
  }
2268
2349
  }
2269
- function S1(n) {
2350
+ function D1(n) {
2270
2351
  return n <= 0 || n > 1 ? (console.warn(
2271
2352
  `BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
2272
2353
  ), 1) : n;
2273
2354
  }
2274
- function Hn(n = 1e3) {
2355
+ function Kn(n = 1e3) {
2275
2356
  return {
2276
2357
  type: ft.PAUSE,
2277
2358
  isKey: !1,
@@ -2279,7 +2360,7 @@ function Hn(n = 1e3) {
2279
2360
  shortcut: null
2280
2361
  };
2281
2362
  }
2282
- function Un(n = null) {
2363
+ function Qn(n = null) {
2283
2364
  return {
2284
2365
  objects: [],
2285
2366
  animations: [],
@@ -2292,32 +2373,32 @@ function Un(n = null) {
2292
2373
  ...n
2293
2374
  };
2294
2375
  }
2295
- function $n(n, e = {}) {
2376
+ function Jn(n, e = {}) {
2296
2377
  return {
2297
2378
  ...e,
2298
2379
  text: n
2299
2380
  };
2300
2381
  }
2301
- function Yn(n = G.BLACK) {
2382
+ function t2(n = G.BLACK) {
2302
2383
  return { ...n, alpha: 1 };
2303
2384
  }
2304
- function k1(n) {
2385
+ function q1(n) {
2305
2386
  for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
2306
2387
  o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
2307
2388
  return a / 2;
2308
2389
  }
2309
- function I1(n) {
2390
+ function z1(n) {
2310
2391
  for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
2311
2392
  i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
2312
2393
  return h;
2313
2394
  }
2314
- function _1(n) {
2395
+ function j1(n) {
2315
2396
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2316
2397
  }
2317
- var jt, A0;
2318
- function O1() {
2319
- if (A0) return jt;
2320
- A0 = 1;
2398
+ var Ht, C0;
2399
+ function H1() {
2400
+ if (C0) return Ht;
2401
+ C0 = 1;
2321
2402
  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 = [
2322
2403
  5760,
2323
2404
  6158,
@@ -2378,20 +2459,20 @@ function O1() {
2378
2459
  for (; f.index < f.max && t(f.path.charCodeAt(f.index)); )
2379
2460
  f.index++;
2380
2461
  }
2381
- function u(f) {
2382
- var m = f.path.charCodeAt(f.index);
2383
- if (m === 48) {
2462
+ function c(f) {
2463
+ var v = f.path.charCodeAt(f.index);
2464
+ if (v === 48) {
2384
2465
  f.param = 0, f.index++;
2385
2466
  return;
2386
2467
  }
2387
- if (m === 49) {
2468
+ if (v === 49) {
2388
2469
  f.param = 1, f.index++;
2389
2470
  return;
2390
2471
  }
2391
2472
  f.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + f.index + ")";
2392
2473
  }
2393
- function c(f) {
2394
- var m = f.index, y = m, M = f.max, E = !1, L = !1, C = !1, S = !1, T;
2474
+ function u(f) {
2475
+ var v = f.index, y = v, M = f.max, P = !1, E = !1, L = !1, S = !1, T;
2395
2476
  if (y >= M) {
2396
2477
  f.err = "SvgPath: missed param (at pos " + y + ")";
2397
2478
  return;
@@ -2401,21 +2482,21 @@ function O1() {
2401
2482
  return;
2402
2483
  }
2403
2484
  if (T !== 46) {
2404
- if (E = T === 48, y++, T = y < M ? f.path.charCodeAt(y) : 0, E && y < M && T && a(T)) {
2405
- f.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + m + ")";
2485
+ if (P = T === 48, y++, T = y < M ? f.path.charCodeAt(y) : 0, P && y < M && T && a(T)) {
2486
+ f.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + v + ")";
2406
2487
  return;
2407
2488
  }
2408
2489
  for (; y < M && a(f.path.charCodeAt(y)); )
2409
- y++, L = !0;
2490
+ y++, E = !0;
2410
2491
  T = y < M ? f.path.charCodeAt(y) : 0;
2411
2492
  }
2412
2493
  if (T === 46) {
2413
2494
  for (S = !0, y++; a(f.path.charCodeAt(y)); )
2414
- y++, C = !0;
2495
+ y++, L = !0;
2415
2496
  T = y < M ? f.path.charCodeAt(y) : 0;
2416
2497
  }
2417
2498
  if (T === 101 || T === 69) {
2418
- if (S && !L && !C) {
2499
+ if (S && !E && !L) {
2419
2500
  f.err = "SvgPath: invalid float exponent (at pos " + y + ")";
2420
2501
  return;
2421
2502
  }
@@ -2427,55 +2508,55 @@ function O1() {
2427
2508
  return;
2428
2509
  }
2429
2510
  }
2430
- f.index = y, f.param = parseFloat(f.path.slice(m, y)) + 0;
2511
+ f.index = y, f.param = parseFloat(f.path.slice(v, y)) + 0;
2431
2512
  }
2432
- function d(f) {
2433
- var m, y;
2434
- m = f.path[f.segmentStart], y = m.toLowerCase();
2513
+ function p(f) {
2514
+ var v, y;
2515
+ v = f.path[f.segmentStart], y = v.toLowerCase();
2435
2516
  var M = f.data;
2436
- if (y === "m" && M.length > 2 && (f.result.push([m, M[0], M[1]]), M = M.slice(2), y = "l", m = m === "m" ? "l" : "L"), y === "r")
2437
- f.result.push([m].concat(M));
2517
+ if (y === "m" && M.length > 2 && (f.result.push([v, M[0], M[1]]), M = M.slice(2), y = "l", v = v === "m" ? "l" : "L"), y === "r")
2518
+ f.result.push([v].concat(M));
2438
2519
  else
2439
- for (; M.length >= n[y] && (f.result.push([m].concat(M.splice(0, n[y]))), !!n[y]); )
2520
+ for (; M.length >= n[y] && (f.result.push([v].concat(M.splice(0, n[y]))), !!n[y]); )
2440
2521
  ;
2441
2522
  }
2442
2523
  function l(f) {
2443
- var m = f.max, y, M, E, L, C;
2524
+ var v = f.max, y, M, P, E, L;
2444
2525
  if (f.segmentStart = f.index, y = f.path.charCodeAt(f.index), M = i(y), !o(y)) {
2445
2526
  f.err = "SvgPath: bad command " + f.path[f.index] + " (at pos " + f.index + ")";
2446
2527
  return;
2447
2528
  }
2448
- if (L = n[f.path[f.index].toLowerCase()], f.index++, h(f), f.data = [], !L) {
2449
- d(f);
2529
+ if (E = n[f.path[f.index].toLowerCase()], f.index++, h(f), f.data = [], !E) {
2530
+ p(f);
2450
2531
  return;
2451
2532
  }
2452
- for (E = !1; ; ) {
2453
- for (C = L; C > 0; C--) {
2454
- if (M && (C === 3 || C === 4) ? u(f) : c(f), f.err.length) {
2455
- d(f);
2533
+ for (P = !1; ; ) {
2534
+ for (L = E; L > 0; L--) {
2535
+ if (M && (L === 3 || L === 4) ? c(f) : u(f), f.err.length) {
2536
+ p(f);
2456
2537
  return;
2457
2538
  }
2458
- f.data.push(f.param), h(f), E = !1, f.index < m && f.path.charCodeAt(f.index) === 44 && (f.index++, h(f), E = !0);
2539
+ f.data.push(f.param), h(f), P = !1, f.index < v && f.path.charCodeAt(f.index) === 44 && (f.index++, h(f), P = !0);
2459
2540
  }
2460
- if (!E && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
2541
+ if (!P && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
2461
2542
  break;
2462
2543
  }
2463
- d(f);
2544
+ p(f);
2464
2545
  }
2465
- return jt = function(m) {
2466
- var y = new r(m), M = y.max;
2546
+ return Ht = function(v) {
2547
+ var y = new r(v), M = y.max;
2467
2548
  for (h(y); y.index < M && !y.err.length; )
2468
2549
  l(y);
2469
2550
  return y.result.length && ("mM".indexOf(y.result[0][0]) < 0 ? (y.err = "SvgPath: string should start with `M` or `m`", y.result = []) : y.result[0][0] = "M"), {
2470
2551
  err: y.err,
2471
2552
  segments: y.result
2472
2553
  };
2473
- }, jt;
2554
+ }, Ht;
2474
2555
  }
2475
- var Ht, M0;
2476
- function G0() {
2477
- if (M0) return Ht;
2478
- M0 = 1;
2556
+ var Ut, P0;
2557
+ function te() {
2558
+ if (P0) return Ut;
2559
+ P0 = 1;
2479
2560
  function n(t, o) {
2480
2561
  return [
2481
2562
  t[0] * o[0] + t[2] * o[1],
@@ -2520,13 +2601,13 @@ function G0() {
2520
2601
  t * a[0] + o * a[2] + (i ? 0 : a[4]),
2521
2602
  t * a[1] + o * a[3] + (i ? 0 : a[5])
2522
2603
  ]) : [t, o];
2523
- }, Ht = e, Ht;
2604
+ }, Ut = e, Ut;
2524
2605
  }
2525
- var Ut, L0;
2526
- function F1() {
2527
- if (L0) return Ut;
2528
- L0 = 1;
2529
- var n = G0(), e = {
2606
+ var $t, E0;
2607
+ function U1() {
2608
+ if (E0) return $t;
2609
+ E0 = 1;
2610
+ var n = te(), e = {
2530
2611
  matrix: !0,
2531
2612
  scale: !0,
2532
2613
  rotate: !0,
@@ -2534,16 +2615,16 @@ function F1() {
2534
2615
  skewX: !0,
2535
2616
  skewY: !0
2536
2617
  }, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
2537
- return Ut = function(a) {
2618
+ return $t = function(a) {
2538
2619
  var s = new n(), r, h;
2539
- return a.split(t).forEach(function(u) {
2540
- if (u.length) {
2541
- if (typeof e[u] < "u") {
2542
- r = u;
2620
+ return a.split(t).forEach(function(c) {
2621
+ if (c.length) {
2622
+ if (typeof e[c] < "u") {
2623
+ r = c;
2543
2624
  return;
2544
2625
  }
2545
- switch (h = u.split(o).map(function(c) {
2546
- return +c || 0;
2626
+ switch (h = c.split(o).map(function(u) {
2627
+ return +u || 0;
2547
2628
  }), r) {
2548
2629
  case "matrix":
2549
2630
  h.length === 6 && s.matrix(h);
@@ -2566,55 +2647,55 @@ function F1() {
2566
2647
  }
2567
2648
  }
2568
2649
  }), s;
2569
- }, Ut;
2650
+ }, $t;
2570
2651
  }
2571
- var $t, T0;
2572
- function N1() {
2573
- if (T0) return $t;
2574
- T0 = 1;
2652
+ var Yt, S0;
2653
+ function $1() {
2654
+ if (S0) return Yt;
2655
+ S0 = 1;
2575
2656
  var n = Math.PI * 2;
2576
2657
  function e(i, a, s, r) {
2577
- var h = i * r - a * s < 0 ? -1 : 1, u = i * s + a * r;
2578
- return u > 1 && (u = 1), u < -1 && (u = -1), h * Math.acos(u);
2658
+ var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
2659
+ return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
2579
2660
  }
2580
- function t(i, a, s, r, h, u, c, d, l, f) {
2581
- var m = f * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + f * (a - r) / 2, M = c * c, E = d * d, L = m * m, C = y * y, S = M * E - M * C - E * L;
2582
- S < 0 && (S = 0), S /= M * C + E * L, S = Math.sqrt(S) * (h === u ? -1 : 1);
2583
- var T = S * c / d * y, I = S * -d / c * m, R = f * T - l * I + (i + s) / 2, X = l * T + f * I + (a + r) / 2, H = (m - T) / c, Y = (y - I) / d, tt = (-m - T) / c, et = (-y - I) / d, nt = e(1, 0, H, Y), K = e(H, Y, tt, et);
2584
- return u === 0 && K > 0 && (K -= n), u === 1 && K < 0 && (K += n), [R, X, nt, K];
2661
+ function t(i, a, s, r, h, c, u, p, l, f) {
2662
+ var v = f * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + f * (a - r) / 2, M = u * u, P = p * p, E = v * v, L = y * y, S = M * P - M * L - P * E;
2663
+ S < 0 && (S = 0), S /= M * L + P * E, S = Math.sqrt(S) * (h === c ? -1 : 1);
2664
+ var T = S * u / p * y, k = S * -p / u * v, F = f * T - l * k + (i + s) / 2, X = l * T + f * k + (a + r) / 2, z = (v - T) / u, Y = (y - k) / p, tt = (-v - T) / u, et = (-y - k) / p, nt = e(1, 0, z, Y), K = e(z, Y, tt, et);
2665
+ return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [F, X, nt, K];
2585
2666
  }
2586
2667
  function o(i, a) {
2587
- var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), u = Math.cos(i + a), c = Math.sin(i + a);
2588
- return [r, h, r - h * s, h + r * s, u + c * s, c - u * s, u, c];
2668
+ var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), u = Math.sin(i + a);
2669
+ return [r, h, r - h * s, h + r * s, c + u * s, u - c * s, c, u];
2589
2670
  }
2590
- return $t = function(a, s, r, h, u, c, d, l, f) {
2591
- var m = Math.sin(f * n / 360), y = Math.cos(f * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2, E = -m * (a - r) / 2 + y * (s - h) / 2;
2592
- if (M === 0 && E === 0)
2671
+ return Yt = function(a, s, r, h, c, u, p, l, f) {
2672
+ var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), M = y * (a - r) / 2 + v * (s - h) / 2, P = -v * (a - r) / 2 + y * (s - h) / 2;
2673
+ if (M === 0 && P === 0)
2593
2674
  return [];
2594
- if (d === 0 || l === 0)
2675
+ if (p === 0 || l === 0)
2595
2676
  return [];
2596
- d = Math.abs(d), l = Math.abs(l);
2597
- var L = M * M / (d * d) + E * E / (l * l);
2598
- L > 1 && (d *= Math.sqrt(L), l *= Math.sqrt(L));
2599
- var C = t(a, s, r, h, u, c, d, l, m, y), S = [], T = C[2], I = C[3], R = Math.max(Math.ceil(Math.abs(I) / (n / 4)), 1);
2600
- I /= R;
2601
- for (var X = 0; X < R; X++)
2602
- S.push(o(T, I)), T += I;
2603
- return S.map(function(H) {
2604
- for (var Y = 0; Y < H.length; Y += 2) {
2605
- var tt = H[Y + 0], et = H[Y + 1];
2606
- tt *= d, et *= l;
2607
- var nt = y * tt - m * et, K = m * tt + y * et;
2608
- H[Y + 0] = nt + C[0], H[Y + 1] = K + C[1];
2677
+ p = Math.abs(p), l = Math.abs(l);
2678
+ var E = M * M / (p * p) + P * P / (l * l);
2679
+ E > 1 && (p *= Math.sqrt(E), l *= Math.sqrt(E));
2680
+ var L = t(a, s, r, h, c, u, p, l, v, y), S = [], T = L[2], k = L[3], F = Math.max(Math.ceil(Math.abs(k) / (n / 4)), 1);
2681
+ k /= F;
2682
+ for (var X = 0; X < F; X++)
2683
+ S.push(o(T, k)), T += k;
2684
+ return S.map(function(z) {
2685
+ for (var Y = 0; Y < z.length; Y += 2) {
2686
+ var tt = z[Y + 0], et = z[Y + 1];
2687
+ tt *= p, et *= l;
2688
+ var nt = y * tt - v * et, K = v * tt + y * et;
2689
+ z[Y + 0] = nt + L[0], z[Y + 1] = K + L[1];
2609
2690
  }
2610
- return H;
2691
+ return z;
2611
2692
  });
2612
- }, $t;
2693
+ }, Yt;
2613
2694
  }
2614
- var Yt, C0;
2615
- function R1() {
2616
- if (C0) return Yt;
2617
- C0 = 1;
2695
+ var Wt, k0;
2696
+ function Y1() {
2697
+ if (k0) return Wt;
2698
+ k0 = 1;
2618
2699
  var n = 1e-10, e = Math.PI / 180;
2619
2700
  function t(o, i, a) {
2620
2701
  if (!(this instanceof t))
@@ -2627,24 +2708,24 @@ function R1() {
2627
2708
  this.rx * (o[1] * i + o[3] * a),
2628
2709
  this.ry * (-o[0] * a + o[2] * i),
2629
2710
  this.ry * (-o[1] * a + o[3] * i)
2630
- ], r = s[0] * s[0] + s[2] * s[2], h = s[1] * s[1] + s[3] * s[3], u = ((s[0] - s[3]) * (s[0] - s[3]) + (s[2] + s[1]) * (s[2] + s[1])) * ((s[0] + s[3]) * (s[0] + s[3]) + (s[2] - s[1]) * (s[2] - s[1])), c = (r + h) / 2;
2631
- if (u < n * c)
2632
- return this.rx = this.ry = Math.sqrt(c), this.ax = 0, this;
2633
- var d = s[0] * s[1] + s[2] * s[3];
2634
- u = Math.sqrt(u);
2635
- var l = c + u / 2, f = c - u / 2;
2636
- return this.ax = Math.abs(d) < n && Math.abs(l - h) < n ? 90 : Math.atan(
2637
- Math.abs(d) > Math.abs(l - h) ? (l - r) / d : d / (l - h)
2711
+ ], r = s[0] * s[0] + s[2] * s[2], h = s[1] * s[1] + s[3] * s[3], c = ((s[0] - s[3]) * (s[0] - s[3]) + (s[2] + s[1]) * (s[2] + s[1])) * ((s[0] + s[3]) * (s[0] + s[3]) + (s[2] - s[1]) * (s[2] - s[1])), u = (r + h) / 2;
2712
+ if (c < n * u)
2713
+ return this.rx = this.ry = Math.sqrt(u), this.ax = 0, this;
2714
+ var p = s[0] * s[1] + s[2] * s[3];
2715
+ c = Math.sqrt(c);
2716
+ var l = u + c / 2, f = u - c / 2;
2717
+ return this.ax = Math.abs(p) < n && Math.abs(l - h) < n ? 90 : Math.atan(
2718
+ Math.abs(p) > Math.abs(l - h) ? (l - r) / p : p / (l - h)
2638
2719
  ) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(f)) : (this.ax += 90, this.rx = Math.sqrt(f), this.ry = Math.sqrt(l)), this;
2639
2720
  }, t.prototype.isDegenerate = function() {
2640
2721
  return this.rx < n * this.ry || this.ry < n * this.rx;
2641
- }, Yt = t, Yt;
2722
+ }, Wt = t, Wt;
2642
2723
  }
2643
- var Wt, P0;
2644
- function B1() {
2645
- if (P0) return Wt;
2646
- P0 = 1;
2647
- var n = O1(), e = F1(), t = G0(), o = N1(), i = R1();
2724
+ var Xt, I0;
2725
+ function W1() {
2726
+ if (I0) return Xt;
2727
+ I0 = 1;
2728
+ var n = H1(), e = U1(), t = te(), o = $1(), i = Y1();
2648
2729
  function a(s) {
2649
2730
  if (!(this instanceof a))
2650
2731
  return new a(s);
@@ -2664,39 +2745,39 @@ function B1() {
2664
2745
  throw new Error("SvgPath.from: invalid param type " + s);
2665
2746
  }, a.prototype.__matrix = function(s) {
2666
2747
  var r = this, h;
2667
- s.queue.length && this.iterate(function(u, c, d, l) {
2668
- var f, m, y, M;
2669
- switch (u[0]) {
2748
+ s.queue.length && this.iterate(function(c, u, p, l) {
2749
+ var f, v, y, M;
2750
+ switch (c[0]) {
2670
2751
  // Process 'assymetric' commands separately
2671
2752
  case "v":
2672
- f = s.calc(0, u[1], !0), m = f[0] === 0 ? ["v", f[1]] : ["l", f[0], f[1]];
2753
+ f = s.calc(0, c[1], !0), v = f[0] === 0 ? ["v", f[1]] : ["l", f[0], f[1]];
2673
2754
  break;
2674
2755
  case "V":
2675
- f = s.calc(d, u[1], !1), m = f[0] === s.calc(d, l, !1)[0] ? ["V", f[1]] : ["L", f[0], f[1]];
2756
+ f = s.calc(p, c[1], !1), v = f[0] === s.calc(p, l, !1)[0] ? ["V", f[1]] : ["L", f[0], f[1]];
2676
2757
  break;
2677
2758
  case "h":
2678
- f = s.calc(u[1], 0, !0), m = f[1] === 0 ? ["h", f[0]] : ["l", f[0], f[1]];
2759
+ f = s.calc(c[1], 0, !0), v = f[1] === 0 ? ["h", f[0]] : ["l", f[0], f[1]];
2679
2760
  break;
2680
2761
  case "H":
2681
- f = s.calc(u[1], l, !1), m = f[1] === s.calc(d, l, !1)[1] ? ["H", f[0]] : ["L", f[0], f[1]];
2762
+ f = s.calc(c[1], l, !1), v = f[1] === s.calc(p, l, !1)[1] ? ["H", f[0]] : ["L", f[0], f[1]];
2682
2763
  break;
2683
2764
  case "a":
2684
2765
  case "A":
2685
- var E = s.toArray(), L = i(u[1], u[2], u[3]).transform(E);
2686
- if (E[0] * E[3] - E[1] * E[2] < 0 && (u[5] = u[5] ? "0" : "1"), f = s.calc(u[6], u[7], u[0] === "a"), u[0] === "A" && u[6] === d && u[7] === l || u[0] === "a" && u[6] === 0 && u[7] === 0) {
2687
- m = [u[0] === "a" ? "l" : "L", f[0], f[1]];
2766
+ var P = s.toArray(), E = i(c[1], c[2], c[3]).transform(P);
2767
+ if (P[0] * P[3] - P[1] * P[2] < 0 && (c[5] = c[5] ? "0" : "1"), f = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === p && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
2768
+ v = [c[0] === "a" ? "l" : "L", f[0], f[1]];
2688
2769
  break;
2689
2770
  }
2690
- L.isDegenerate() ? m = [u[0] === "a" ? "l" : "L", f[0], f[1]] : m = [u[0], L.rx, L.ry, L.ax, u[4], u[5], f[0], f[1]];
2771
+ E.isDegenerate() ? v = [c[0] === "a" ? "l" : "L", f[0], f[1]] : v = [c[0], E.rx, E.ry, E.ax, c[4], c[5], f[0], f[1]];
2691
2772
  break;
2692
2773
  case "m":
2693
- M = c > 0, f = s.calc(u[1], u[2], M), m = ["m", f[0], f[1]];
2774
+ M = u > 0, f = s.calc(c[1], c[2], M), v = ["m", f[0], f[1]];
2694
2775
  break;
2695
2776
  default:
2696
- for (y = u[0], m = [y], M = y.toLowerCase() === y, h = 1; h < u.length; h += 2)
2697
- f = s.calc(u[h], u[h + 1], M), m.push(f[0], f[1]);
2777
+ for (y = c[0], v = [y], M = y.toLowerCase() === y, h = 1; h < c.length; h += 2)
2778
+ f = s.calc(c[h], c[h + 1], M), v.push(f[0], f[1]);
2698
2779
  }
2699
- r.segments[c] = m;
2780
+ r.segments[u] = v;
2700
2781
  }, !0);
2701
2782
  }, a.prototype.__evaluateStack = function() {
2702
2783
  var s, r;
@@ -2712,12 +2793,12 @@ function B1() {
2712
2793
  }, a.prototype.toString = function() {
2713
2794
  var s = "", r = "", h = !1;
2714
2795
  this.__evaluateStack();
2715
- for (var u = 0, c = this.segments.length; u < c; u++) {
2716
- var d = this.segments[u], l = d[0];
2796
+ for (var c = 0, u = this.segments.length; c < u; c++) {
2797
+ var p = this.segments[c], l = p[0];
2717
2798
  l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
2718
- for (var f = 1; f < d.length; f++) {
2719
- var m = d[f];
2720
- f === 1 ? h && m >= 0 && (s += " ") : m >= 0 && (s += " "), s += m;
2799
+ for (var f = 1; f < p.length; f++) {
2800
+ var v = p[f];
2801
+ f === 1 ? h && v >= 0 && (s += " ") : v >= 0 && (s += " "), s += v;
2721
2802
  }
2722
2803
  r = l;
2723
2804
  }
@@ -2737,166 +2818,166 @@ function B1() {
2737
2818
  }, a.prototype.transform = function(s) {
2738
2819
  return s.trim() ? (this.__stack.push(e(s)), this) : this;
2739
2820
  }, a.prototype.round = function(s) {
2740
- var r = 0, h = 0, u = 0, c = 0, d;
2821
+ var r = 0, h = 0, c = 0, u = 0, p;
2741
2822
  return s = s || 0, this.__evaluateStack(), this.segments.forEach(function(l) {
2742
2823
  var f = l[0].toLowerCase() === l[0];
2743
2824
  switch (l[0]) {
2744
2825
  case "H":
2745
2826
  case "h":
2746
- f && (l[1] += u), u = l[1] - l[1].toFixed(s), l[1] = +l[1].toFixed(s);
2827
+ f && (l[1] += c), c = l[1] - l[1].toFixed(s), l[1] = +l[1].toFixed(s);
2747
2828
  return;
2748
2829
  case "V":
2749
2830
  case "v":
2750
- f && (l[1] += c), c = l[1] - l[1].toFixed(s), l[1] = +l[1].toFixed(s);
2831
+ f && (l[1] += u), u = l[1] - l[1].toFixed(s), l[1] = +l[1].toFixed(s);
2751
2832
  return;
2752
2833
  case "Z":
2753
2834
  case "z":
2754
- u = r, c = h;
2835
+ c = r, u = h;
2755
2836
  return;
2756
2837
  case "M":
2757
2838
  case "m":
2758
- f && (l[1] += u, l[2] += c), u = l[1] - l[1].toFixed(s), c = l[2] - l[2].toFixed(s), r = u, h = c, l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s);
2839
+ f && (l[1] += c, l[2] += u), c = l[1] - l[1].toFixed(s), u = l[2] - l[2].toFixed(s), r = c, h = u, l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s);
2759
2840
  return;
2760
2841
  case "A":
2761
2842
  case "a":
2762
- f && (l[6] += u, l[7] += c), u = l[6] - l[6].toFixed(s), c = l[7] - l[7].toFixed(s), l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s), l[3] = +l[3].toFixed(s + 2), l[6] = +l[6].toFixed(s), l[7] = +l[7].toFixed(s);
2843
+ f && (l[6] += c, l[7] += u), c = l[6] - l[6].toFixed(s), u = l[7] - l[7].toFixed(s), l[1] = +l[1].toFixed(s), l[2] = +l[2].toFixed(s), l[3] = +l[3].toFixed(s + 2), l[6] = +l[6].toFixed(s), l[7] = +l[7].toFixed(s);
2763
2844
  return;
2764
2845
  default:
2765
- d = l.length, f && (l[d - 2] += u, l[d - 1] += c), u = l[d - 2] - l[d - 2].toFixed(s), c = l[d - 1] - l[d - 1].toFixed(s), l.forEach(function(m, y) {
2846
+ p = l.length, f && (l[p - 2] += c, l[p - 1] += u), c = l[p - 2] - l[p - 2].toFixed(s), u = l[p - 1] - l[p - 1].toFixed(s), l.forEach(function(v, y) {
2766
2847
  y && (l[y] = +l[y].toFixed(s));
2767
2848
  });
2768
2849
  return;
2769
2850
  }
2770
2851
  }), this;
2771
2852
  }, a.prototype.iterate = function(s, r) {
2772
- var h = this.segments, u = {}, c = !1, d = 0, l = 0, f = 0, m = 0, y, M, E;
2773
- if (r || this.__evaluateStack(), h.forEach(function(L, C) {
2774
- var S = s(L, C, d, l);
2775
- Array.isArray(S) && (u[C] = S, c = !0);
2776
- var T = L[0] === L[0].toLowerCase();
2777
- switch (L[0]) {
2853
+ var h = this.segments, c = {}, u = !1, p = 0, l = 0, f = 0, v = 0, y, M, P;
2854
+ if (r || this.__evaluateStack(), h.forEach(function(E, L) {
2855
+ var S = s(E, L, p, l);
2856
+ Array.isArray(S) && (c[L] = S, u = !0);
2857
+ var T = E[0] === E[0].toLowerCase();
2858
+ switch (E[0]) {
2778
2859
  case "m":
2779
2860
  case "M":
2780
- d = L[1] + (T ? d : 0), l = L[2] + (T ? l : 0), f = d, m = l;
2861
+ p = E[1] + (T ? p : 0), l = E[2] + (T ? l : 0), f = p, v = l;
2781
2862
  return;
2782
2863
  case "h":
2783
2864
  case "H":
2784
- d = L[1] + (T ? d : 0);
2865
+ p = E[1] + (T ? p : 0);
2785
2866
  return;
2786
2867
  case "v":
2787
2868
  case "V":
2788
- l = L[1] + (T ? l : 0);
2869
+ l = E[1] + (T ? l : 0);
2789
2870
  return;
2790
2871
  case "z":
2791
2872
  case "Z":
2792
- d = f, l = m;
2873
+ p = f, l = v;
2793
2874
  return;
2794
2875
  default:
2795
- d = L[L.length - 2] + (T ? d : 0), l = L[L.length - 1] + (T ? l : 0);
2876
+ p = E[E.length - 2] + (T ? p : 0), l = E[E.length - 1] + (T ? l : 0);
2796
2877
  }
2797
- }), !c)
2878
+ }), !u)
2798
2879
  return this;
2799
- for (E = [], y = 0; y < h.length; y++)
2800
- if (typeof u[y] < "u")
2801
- for (M = 0; M < u[y].length; M++)
2802
- E.push(u[y][M]);
2880
+ for (P = [], y = 0; y < h.length; y++)
2881
+ if (typeof c[y] < "u")
2882
+ for (M = 0; M < c[y].length; M++)
2883
+ P.push(c[y][M]);
2803
2884
  else
2804
- E.push(h[y]);
2805
- return this.segments = E, this;
2885
+ P.push(h[y]);
2886
+ return this.segments = P, this;
2806
2887
  }, a.prototype.abs = function() {
2807
- return this.iterate(function(s, r, h, u) {
2808
- var c = s[0], d = c.toUpperCase(), l;
2809
- if (c !== d)
2810
- switch (s[0] = d, c) {
2888
+ return this.iterate(function(s, r, h, c) {
2889
+ var u = s[0], p = u.toUpperCase(), l;
2890
+ if (u !== p)
2891
+ switch (s[0] = p, u) {
2811
2892
  case "v":
2812
- s[1] += u;
2893
+ s[1] += c;
2813
2894
  return;
2814
2895
  case "a":
2815
- s[6] += h, s[7] += u;
2896
+ s[6] += h, s[7] += c;
2816
2897
  return;
2817
2898
  default:
2818
2899
  for (l = 1; l < s.length; l++)
2819
- s[l] += l % 2 ? h : u;
2900
+ s[l] += l % 2 ? h : c;
2820
2901
  }
2821
2902
  }, !0), this;
2822
2903
  }, a.prototype.rel = function() {
2823
- return this.iterate(function(s, r, h, u) {
2824
- var c = s[0], d = c.toLowerCase(), l;
2825
- if (c !== d && !(r === 0 && c === "M"))
2826
- switch (s[0] = d, c) {
2904
+ return this.iterate(function(s, r, h, c) {
2905
+ var u = s[0], p = u.toLowerCase(), l;
2906
+ if (u !== p && !(r === 0 && u === "M"))
2907
+ switch (s[0] = p, u) {
2827
2908
  case "V":
2828
- s[1] -= u;
2909
+ s[1] -= c;
2829
2910
  return;
2830
2911
  case "A":
2831
- s[6] -= h, s[7] -= u;
2912
+ s[6] -= h, s[7] -= c;
2832
2913
  return;
2833
2914
  default:
2834
2915
  for (l = 1; l < s.length; l++)
2835
- s[l] -= l % 2 ? h : u;
2916
+ s[l] -= l % 2 ? h : c;
2836
2917
  }
2837
2918
  }, !0), this;
2838
2919
  }, a.prototype.unarc = function() {
2839
- return this.iterate(function(s, r, h, u) {
2840
- var c, d, l, f = [], m = s[0];
2841
- return m !== "A" && m !== "a" ? null : (m === "a" ? (d = h + s[6], l = u + s[7]) : (d = s[6], l = s[7]), c = o(h, u, d, l, s[4], s[5], s[1], s[2], s[3]), c.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (c.forEach(function(y) {
2920
+ return this.iterate(function(s, r, h, c) {
2921
+ var u, p, l, f = [], v = s[0];
2922
+ return v !== "A" && v !== "a" ? null : (v === "a" ? (p = h + s[6], l = c + s[7]) : (p = s[6], l = s[7]), u = o(h, c, p, l, s[4], s[5], s[1], s[2], s[3]), u.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (u.forEach(function(y) {
2842
2923
  f.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
2843
2924
  }), f));
2844
2925
  }), this;
2845
2926
  }, a.prototype.unshort = function() {
2846
- var s = this.segments, r, h, u, c, d;
2847
- return this.iterate(function(l, f, m, y) {
2848
- var M = l[0], E = M.toUpperCase(), L;
2849
- f && (E === "T" ? (L = M === "t", u = s[f - 1], u[0] === "Q" ? (r = u[1] - m, h = u[2] - y) : u[0] === "q" ? (r = u[1] - u[3], h = u[2] - u[4]) : (r = 0, h = 0), c = -r, d = -h, L || (c += m, d += y), s[f] = [
2850
- L ? "q" : "Q",
2851
- c,
2852
- d,
2927
+ var s = this.segments, r, h, c, u, p;
2928
+ return this.iterate(function(l, f, v, y) {
2929
+ var M = l[0], P = M.toUpperCase(), E;
2930
+ f && (P === "T" ? (E = M === "t", c = s[f - 1], c[0] === "Q" ? (r = c[1] - v, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), u = -r, p = -h, E || (u += v, p += y), s[f] = [
2931
+ E ? "q" : "Q",
2932
+ u,
2933
+ p,
2853
2934
  l[1],
2854
2935
  l[2]
2855
- ]) : E === "S" && (L = M === "s", u = s[f - 1], u[0] === "C" ? (r = u[3] - m, h = u[4] - y) : u[0] === "c" ? (r = u[3] - u[5], h = u[4] - u[6]) : (r = 0, h = 0), c = -r, d = -h, L || (c += m, d += y), s[f] = [
2856
- L ? "c" : "C",
2857
- c,
2858
- d,
2936
+ ]) : P === "S" && (E = M === "s", c = s[f - 1], c[0] === "C" ? (r = c[3] - v, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), u = -r, p = -h, E || (u += v, p += y), s[f] = [
2937
+ E ? "c" : "C",
2938
+ u,
2939
+ p,
2859
2940
  l[1],
2860
2941
  l[2],
2861
2942
  l[3],
2862
2943
  l[4]
2863
2944
  ]));
2864
2945
  }), this;
2865
- }, Wt = a, Wt;
2946
+ }, Xt = a, Xt;
2866
2947
  }
2867
- var Xt, E0;
2868
- function D1() {
2869
- return E0 || (E0 = 1, Xt = B1()), Xt;
2948
+ var Gt, _0;
2949
+ function X1() {
2950
+ return _0 || (_0 = 1, Gt = W1()), Gt;
2870
2951
  }
2871
- var q1 = D1();
2872
- const z1 = /* @__PURE__ */ _1(q1);
2873
- var Gt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, j1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
2874
- function H1(n) {
2952
+ var G1 = X1();
2953
+ const V1 = /* @__PURE__ */ j1(G1);
2954
+ var Vt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Z1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
2955
+ function K1(n) {
2875
2956
  var e = [];
2876
- return n.replace(j1, function(t, o, i) {
2957
+ return n.replace(Z1, function(t, o, i) {
2877
2958
  var a = o.toLowerCase();
2878
- for (i = $1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
2879
- if (i.length === Gt[a])
2959
+ for (i = J1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
2960
+ if (i.length === Vt[a])
2880
2961
  return i.unshift(o), e.push(i);
2881
- if (i.length < Gt[a])
2962
+ if (i.length < Vt[a])
2882
2963
  throw new Error("malformed path data");
2883
- e.push([o].concat(i.splice(0, Gt[a])));
2964
+ e.push([o].concat(i.splice(0, Vt[a])));
2884
2965
  }
2885
2966
  }), e;
2886
2967
  }
2887
- var U1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
2888
- function $1(n) {
2889
- var e = n.match(U1);
2968
+ var Q1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
2969
+ function J1(n) {
2970
+ var e = n.match(Q1);
2890
2971
  return e ? e.map(Number) : [];
2891
2972
  }
2892
2973
  function it(n, e, t, o, i, a, s, r) {
2893
- return new Jt(n, e, t, o, i, a, s, r);
2974
+ return new t0(n, e, t, o, i, a, s, r);
2894
2975
  }
2895
- function Jt(n, e, t, o, i, a, s, r) {
2896
- 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 = tn, this.getPoint = X1, this.getDerivative = W1) : (this.getArcLength = G1, this.getPoint = Z0, this.getDerivative = Y1), this.init();
2976
+ function t0(n, e, t, o, i, a, s, r) {
2977
+ 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 = cn, this.getPoint = nn, this.getDerivative = en) : (this.getArcLength = rn, this.getPoint = ee, this.getDerivative = tn), this.init();
2897
2978
  }
2898
- Jt.prototype = {
2899
- constructor: Jt,
2979
+ t0.prototype = {
2980
+ constructor: t0,
2900
2981
  init: function() {
2901
2982
  this.length = this.getArcLength(
2902
2983
  [this.a.x, this.b.x, this.c.x, this.d.x],
@@ -2955,14 +3036,14 @@ Jt.prototype = {
2955
3036
  return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
2956
3037
  }
2957
3038
  };
2958
- function Y1(n, e, t) {
3039
+ function tn(n, e, t) {
2959
3040
  return {
2960
3041
  x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
2961
3042
  y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
2962
3043
  };
2963
3044
  }
2964
- function W1(n, e, t) {
2965
- var o = Z0(
3045
+ function en(n, e, t) {
3046
+ var o = ee(
2966
3047
  [3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
2967
3048
  [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
2968
3049
  t
@@ -2971,30 +3052,30 @@ function W1(n, e, t) {
2971
3052
  }
2972
3053
  function Zt(n, e, t, o, i) {
2973
3054
  for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
2974
- var h = t(o, i, s + r), u = t(o, i, s - r), c = Math.abs(n - h) / e, d = Math.abs(n - u) / e;
2975
- c < a ? (a = c, s += r) : d < a ? (a = d, s -= r) : r /= 2;
3055
+ var h = t(o, i, s + r), c = t(o, i, s - r), u = Math.abs(n - h) / e, p = Math.abs(n - c) / e;
3056
+ u < a ? (a = u, s += r) : p < a ? (a = p, s -= r) : r /= 2;
2976
3057
  }
2977
3058
  return s;
2978
3059
  }
2979
- function Z0(n, e, t) {
3060
+ function ee(n, e, t) {
2980
3061
  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];
2981
3062
  return { x: o, y: i };
2982
3063
  }
2983
- function X1(n, e, t) {
3064
+ function nn(n, e, t) {
2984
3065
  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];
2985
3066
  return { x: o, y: i };
2986
3067
  }
2987
- function G1(n, e, t) {
3068
+ function rn(n, e, t) {
2988
3069
  t === void 0 && (t = 1);
2989
- 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), h = 4 * (o * a + i * s), u = a * a + s * s;
3070
+ 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), h = 4 * (o * a + i * s), c = a * a + s * s;
2990
3071
  if (r === 0)
2991
3072
  return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
2992
- var c = h / (2 * r), d = u / r, l = t + c, f = d - c * c;
2993
- return Math.sqrt(r) / 2 * (l * Math.sqrt(l * l + f) - c * Math.sqrt(c * c + f) + f * Math.log(Math.abs(
2994
- (l + Math.sqrt(l * l + f)) / (c + Math.sqrt(c * c + f))
3073
+ var u = h / (2 * r), p = c / r, l = t + u, f = p - u * u;
3074
+ return Math.sqrt(r) / 2 * (l * Math.sqrt(l * l + f) - u * Math.sqrt(u * u + f) + f * Math.log(Math.abs(
3075
+ (l + Math.sqrt(l * l + f)) / (u + Math.sqrt(u * u + f))
2995
3076
  )));
2996
3077
  }
2997
- var Z1 = [
3078
+ var on = [
2998
3079
  [],
2999
3080
  [],
3000
3081
  [-0.5773502691896257, 0.5773502691896257],
@@ -3020,7 +3101,7 @@ var Z1 = [
3020
3101
  [-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],
3021
3102
  [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],
3022
3103
  [-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]
3023
- ], V1 = [
3104
+ ], sn = [
3024
3105
  [],
3025
3106
  [],
3026
3107
  [1, 1],
@@ -3046,86 +3127,86 @@ var Z1 = [
3046
3127
  [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],
3047
3128
  [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],
3048
3129
  [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]
3049
- ], K1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3050
- function Q1(n, e) {
3051
- return K1[n][e];
3130
+ ], an = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
3131
+ function hn(n, e) {
3132
+ return an[n][e];
3052
3133
  }
3053
- function t0(n, e, t) {
3134
+ function e0(n, e, t) {
3054
3135
  var o = t.length - 1, i, a, s;
3055
3136
  if (o === 0)
3056
3137
  return 0;
3057
3138
  if (n === 0) {
3058
3139
  for (a = 0, s = 0; s <= o; s++)
3059
- a += Q1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3140
+ a += hn(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
3060
3141
  return a;
3061
3142
  } else {
3062
3143
  for (i = new Array(o), s = 0; s < o; s++)
3063
3144
  i[s] = o * (t[s + 1] - t[s]);
3064
- return t0(n - 1, e, i);
3145
+ return e0(n - 1, e, i);
3065
3146
  }
3066
3147
  }
3067
- function J1(n, e, t) {
3068
- var o = t0(1, t, n), i = t0(1, t, e), a = o * o + i * i;
3148
+ function ln(n, e, t) {
3149
+ var o = e0(1, t, n), i = e0(1, t, e), a = o * o + i * i;
3069
3150
  return Math.sqrt(a);
3070
3151
  }
3071
- function tn(n, e, t) {
3152
+ function cn(n, e, t) {
3072
3153
  var o, i, a, s;
3073
3154
  t === void 0 && (t = 1);
3074
3155
  var r = 20;
3075
3156
  for (o = t / 2, i = 0, a = 0; a < r; a++)
3076
- s = o * Z1[r][a] + o, i += V1[r][a] * J1(n, e, s);
3157
+ s = o * on[r][a] + o, i += sn[r][a] * ln(n, e, s);
3077
3158
  return o * i;
3078
3159
  }
3079
- var Pt = Math.PI * 2;
3080
- function S0(n, e, t, o) {
3160
+ var Et = Math.PI * 2;
3161
+ function O0(n, e, t, o) {
3081
3162
  var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
3082
3163
  return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
3083
3164
  }
3084
- function en(n, e, t, o, i, a, s, r, h, u) {
3085
- var c = u * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + u * (e - o) / 2, l = s * s, f = r * r, m = c * c, y = d * d, M = l * f - l * y - f * m;
3086
- M < 0 && (M = 0), M /= l * y + f * m, M = Math.sqrt(M) * (i === a ? -1 : 1);
3087
- var E = M * s / r * d, L = M * -r / s * c, C = u * E - h * L + (n + t) / 2, S = h * E + u * L + (e + o) / 2, T = (c - E) / s, I = (d - L) / r, R = (-c - E) / s, X = (-d - L) / r, H = S0(1, 0, T, I), Y = S0(T, I, R, X);
3088
- return a === 0 && Y > 0 && (Y -= Pt), a === 1 && Y < 0 && (Y += Pt), [C, S, H, Y];
3165
+ function un(n, e, t, o, i, a, s, r, h, c) {
3166
+ var u = c * (n - t) / 2 + h * (e - o) / 2, p = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, f = r * r, v = u * u, y = p * p, M = l * f - l * y - f * v;
3167
+ M < 0 && (M = 0), M /= l * y + f * v, M = Math.sqrt(M) * (i === a ? -1 : 1);
3168
+ var P = M * s / r * p, E = M * -r / s * u, L = c * P - h * E + (n + t) / 2, S = h * P + c * E + (e + o) / 2, T = (u - P) / s, k = (p - E) / r, F = (-u - P) / s, X = (-p - E) / r, z = O0(1, 0, T, k), Y = O0(T, k, F, X);
3169
+ return a === 0 && Y > 0 && (Y -= Et), a === 1 && Y < 0 && (Y += Et), [L, S, z, Y];
3089
3170
  }
3090
- function nn(n, e) {
3171
+ function fn(n, e) {
3091
3172
  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);
3092
3173
  return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
3093
3174
  }
3094
- function rn(n, e, t, o, i, a, s, r, h) {
3095
- var u = Math.sin(i * Pt / 360), c = Math.cos(i * Pt / 360), d = c * (n - r) / 2 + u * (e - h) / 2, l = -u * (n - r) / 2 + c * (e - h) / 2;
3096
- if (d === 0 && l === 0)
3175
+ function gn(n, e, t, o, i, a, s, r, h) {
3176
+ var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), p = u * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + u * (e - h) / 2;
3177
+ if (p === 0 && l === 0)
3097
3178
  return [];
3098
3179
  if (t === 0 || o === 0)
3099
3180
  return [];
3100
3181
  t = Math.abs(t), o = Math.abs(o);
3101
- var f = d * d / (t * t) + l * l / (o * o);
3182
+ var f = p * p / (t * t) + l * l / (o * o);
3102
3183
  f > 1 && (t *= Math.sqrt(f), o *= Math.sqrt(f));
3103
- var m = en(n, e, r, h, a, s, t, o, u, c), y = [], M = m[2], E = m[3], L = Math.max(Math.ceil(Math.abs(E) / (Pt / 4)), 1);
3104
- E /= L;
3105
- for (var C = 0; C < L; C++)
3106
- y.push(nn(M, E)), M += E;
3184
+ var v = un(n, e, r, h, a, s, t, o, c, u), y = [], M = v[2], P = v[3], E = Math.max(Math.ceil(Math.abs(P) / (Et / 4)), 1);
3185
+ P /= E;
3186
+ for (var L = 0; L < E; L++)
3187
+ y.push(fn(M, P)), M += P;
3107
3188
  return y.map(function(S) {
3108
3189
  for (var T = 0; T < S.length; T += 2) {
3109
- var I = S[T + 0], R = S[T + 1];
3110
- I *= t, R *= o;
3111
- var X = c * I - u * R, H = u * I + c * R;
3112
- S[T + 0] = X + m[0], S[T + 1] = H + m[1];
3190
+ var k = S[T + 0], F = S[T + 1];
3191
+ k *= t, F *= o;
3192
+ var X = u * k - c * F, z = c * k + u * F;
3193
+ S[T + 0] = X + v[0], S[T + 1] = z + v[1];
3113
3194
  }
3114
3195
  return S;
3115
3196
  });
3116
3197
  }
3117
- function k0(n, e, t, o, i, a, s, r, h) {
3118
- return new e0(n, e, t, o, i, a, s, r, h);
3198
+ function N0(n, e, t, o, i, a, s, r, h) {
3199
+ return new n0(n, e, t, o, i, a, s, r, h);
3119
3200
  }
3120
- function e0(n, e, t, o, i, a, s, r, h) {
3121
- var u = 0, c = [], d = [], l = rn(n, e, t, o, i, a, s, r, h);
3201
+ function n0(n, e, t, o, i, a, s, r, h) {
3202
+ var c = 0, u = [], p = [], l = gn(n, e, t, o, i, a, s, r, h);
3122
3203
  l.forEach(function(f) {
3123
- var m = new it(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = m.getTotalLength();
3124
- u += y, c.push(y), d.push(m);
3125
- }), this.length = u, this.partialLengths = c, this.curves = d;
3204
+ var v = new it(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = v.getTotalLength();
3205
+ c += y, u.push(y), p.push(v);
3206
+ }), this.length = c, this.partialLengths = u, this.curves = p;
3126
3207
  }
3127
- e0.prototype = {
3128
- constructor: e0,
3208
+ n0.prototype = {
3209
+ constructor: n0,
3129
3210
  init: function() {
3130
3211
  },
3131
3212
  getTotalLength: function() {
@@ -3155,33 +3236,33 @@ e0.prototype = {
3155
3236
  }
3156
3237
  };
3157
3238
  function rt(n, e, t, o) {
3158
- return new kt(n, e, t, o);
3239
+ return new It(n, e, t, o);
3159
3240
  }
3160
- function kt(n, e, t, o) {
3241
+ function It(n, e, t, o) {
3161
3242
  this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
3162
3243
  }
3163
- kt.prototype.getTotalLength = function() {
3244
+ It.prototype.getTotalLength = function() {
3164
3245
  return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
3165
3246
  };
3166
- kt.prototype.getPointAtLength = function(n) {
3247
+ It.prototype.getPointAtLength = function(n) {
3167
3248
  var e = n / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), t = (this.x1 - this.x0) * e, o = (this.y1 - this.y0) * e;
3168
3249
  return { x: this.x0 + t, y: this.y0 + o };
3169
3250
  };
3170
- kt.prototype.getTangentAtLength = function() {
3251
+ It.prototype.getTangentAtLength = function() {
3171
3252
  var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
3172
3253
  return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
3173
3254
  };
3174
- kt.prototype.getPropertiesAtLength = function(n) {
3255
+ It.prototype.getPropertiesAtLength = function(n) {
3175
3256
  var e = this.getPointAtLength(n), t = this.getTangentAtLength();
3176
3257
  return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
3177
3258
  };
3178
- function on(n) {
3259
+ function pn(n) {
3179
3260
  var e = 0, t = [], o = [];
3180
3261
  function i(s) {
3181
3262
  if (!s)
3182
3263
  return null;
3183
- for (var r = H1(s), h = [0, 0], u = [0, 0], c, d, l = 0; l < r.length; l++)
3184
- r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new rt(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new rt(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new rt(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new rt(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new rt(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (c = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + c.getTotalLength(), h = [r[l][5], r[l][6]], o.push(c)) : r[l][0] === "c" ? (c = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + c.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(c)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? c = new it(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : c = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + c.getTotalLength(), h = [r[l][3], r[l][4]], o.push(c)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? c = new it(h[0], h[1], h[0] + c.d.x - c.c.x, h[1] + c.d.y - c.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : c = new it(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + c.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(c)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? c = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : c = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + c.getTotalLength(), o.push(c), h = [r[l][3], r[l][4]], u = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? c = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : c = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + c.getTotalLength(), u = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(c)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? c = new it(h[0], h[1], 2 * h[0] - u[0], 2 * h[1] - u[1], r[l][1], r[l][2]) : c = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(c), e = e + c.getTotalLength(), u = [2 * h[0] - u[0], 2 * h[1] - u[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? c = new it(h[0], h[1], 2 * h[0] - u[0], 2 * h[1] - u[1], h[0] + r[l][1], h[1] + r[l][2]) : c = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + c.getTotalLength(), u = [2 * h[0] - u[0], 2 * h[1] - u[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(c)) : r[l][0] === "A" ? (c = new k0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + c.getTotalLength(), h = [r[l][6], r[l][7]], o.push(c)) : r[l][0] === "a" && (c = new k0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + c.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(c)), t.push(e);
3264
+ for (var r = K1(s), h = [0, 0], c = [0, 0], u, p, l = 0; l < r.length; l++)
3265
+ r[l][0] === "M" ? (h = [r[l][1], r[l][2]], p = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], p = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new rt(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new rt(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new rt(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new rt(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(p[0] - h[0], 2) + Math.pow(p[1] - h[1], 2)), o.push(new rt(h[0], p[0], h[1], p[1])), h = [p[0], p[1]]) : r[l][0] === "C" ? (u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + u.getTotalLength(), h = [r[l][5], r[l][6]], o.push(u)) : r[l][0] === "c" ? (u = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + u.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(u)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + u.getTotalLength(), h = [r[l][3], r[l][4]], o.push(u)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], h[0] + u.d.x - u.c.x, h[1] + u.d.y - u.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : u = new it(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + u.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + u.getTotalLength(), o.push(u), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? u = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : u = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + u.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : u = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(u), e = e + u.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : u = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + u.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(u)) : r[l][0] === "A" ? (u = new N0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + u.getTotalLength(), h = [r[l][6], r[l][7]], o.push(u)) : r[l][0] === "a" && (u = new N0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + u.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(u)), t.push(e);
3185
3266
  return i;
3186
3267
  }
3187
3268
  i.getTotalLength = function() {
@@ -3204,49 +3285,49 @@ function on(n) {
3204
3285
  };
3205
3286
  return i(n);
3206
3287
  }
3207
- function Nt(n, e) {
3288
+ function Ft(n, e) {
3208
3289
  return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
3209
3290
  }
3210
- function V0(n, e, t) {
3291
+ function ne(n, e, t) {
3211
3292
  return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
3212
3293
  }
3213
- function sn(n, e) {
3214
- return Nt(n, e) < 1e-9;
3294
+ function dn(n, e) {
3295
+ return Ft(n, e) < 1e-9;
3215
3296
  }
3216
- function an(n, e, t) {
3217
- let o = n.map((i, a) => hn(i, e[a]));
3297
+ function xn(n, e, t) {
3298
+ let o = n.map((i, a) => yn(i, e[a]));
3218
3299
  return function(i) {
3219
3300
  let a = o.map((s) => s(i));
3220
- return t ? un(a) : a;
3301
+ return t ? mn(a) : a;
3221
3302
  };
3222
3303
  }
3223
- function hn(n, e) {
3304
+ function yn(n, e) {
3224
3305
  return function(t) {
3225
3306
  return n.map((o, i) => o + t * (e[i] - o));
3226
3307
  };
3227
3308
  }
3228
- function Ft(n) {
3309
+ function Rt(n) {
3229
3310
  return typeof n == "number" && isFinite(n);
3230
3311
  }
3231
- const n0 = `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).
3312
+ const r0 = `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).
3232
3313
  Example valid ways of supplying a shape would be:
3233
3314
  [[0, 0], [10, 0], [10, 10]]
3234
3315
  "M0,0 L10,0 L10,10Z"
3235
3316
  `;
3236
- function ln(n) {
3237
- return new z1(n).abs();
3317
+ function vn(n) {
3318
+ return new V1(n).abs();
3238
3319
  }
3239
- function cn(n) {
3320
+ function wn(n) {
3240
3321
  return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
3241
3322
  }
3242
- function un(n) {
3323
+ function mn(n) {
3243
3324
  return "M" + n.join("L") + "Z";
3244
3325
  }
3245
- function fn(n, e) {
3246
- let t = ln(n);
3247
- return gn(t) || pn(t, e);
3326
+ function bn(n, e) {
3327
+ let t = vn(n);
3328
+ return An(t) || Mn(t, e);
3248
3329
  }
3249
- function gn(n) {
3330
+ function An(n) {
3250
3331
  let e = n.segments || [], t = [];
3251
3332
  if (!e.length || e[0][0] !== "M")
3252
3333
  return !1;
@@ -3265,11 +3346,11 @@ function gn(n) {
3265
3346
  }
3266
3347
  return t.length ? { ring: t } : !1;
3267
3348
  }
3268
- function pn(n, e) {
3269
- let t = cn(n)[0], o = [], i, a, s = 3;
3349
+ function Mn(n, e) {
3350
+ let t = wn(n)[0], o = [], i, a, s = 3;
3270
3351
  if (!t)
3271
- throw new TypeError(n0);
3272
- a = dn(t), i = a.getTotalLength(), e && Ft(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3352
+ throw new TypeError(r0);
3353
+ a = Ln(t), i = a.getTotalLength(), e && Rt(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3273
3354
  for (let r = 0; r < s; r++) {
3274
3355
  let h = a.getPointAtLength(i * r / s);
3275
3356
  o.push([h.x, h.y]);
@@ -3279,331 +3360,331 @@ function pn(n, e) {
3279
3360
  skipBisect: !0
3280
3361
  };
3281
3362
  }
3282
- function dn(n) {
3363
+ function Ln(n) {
3283
3364
  if (typeof window < "u" && window && window.document)
3284
3365
  try {
3285
3366
  let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
3286
3367
  return e.setAttributeNS(null, "d", n), e;
3287
3368
  } catch {
3288
3369
  }
3289
- return on(n);
3370
+ return pn(n);
3290
3371
  }
3291
- function I0(n, e) {
3292
- const t = n.length + e, o = I1(n) / e;
3372
+ function R0(n, e) {
3373
+ const t = n.length + e, o = z1(n) / e;
3293
3374
  let i = 0, a = 0, s = o / 2;
3294
3375
  for (; n.length < t; ) {
3295
- let r = n[i], h = n[(i + 1) % n.length], u = Nt(r, h);
3296
- if (s <= a + u) {
3297
- n.splice(i + 1, 0, u ? V0(r, h, (s - a) / u) : r.slice(0)), s += o;
3376
+ let r = n[i], h = n[(i + 1) % n.length], c = Ft(r, h);
3377
+ if (s <= a + c) {
3378
+ n.splice(i + 1, 0, c ? ne(r, h, (s - a) / c) : r.slice(0)), s += o;
3298
3379
  continue;
3299
3380
  }
3300
- a += u, i++;
3381
+ a += c, i++;
3301
3382
  }
3302
3383
  }
3303
- function xn(n, e = 1 / 0) {
3384
+ function Tn(n, e = 1 / 0) {
3304
3385
  for (let t = 0; t < n.length; t++) {
3305
3386
  let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
3306
- for (; Nt(o, i) > e; )
3307
- i = V0(o, i, 0.5), n.splice(t + 1, 0, i);
3387
+ for (; Ft(o, i) > e; )
3388
+ i = ne(o, i, 0.5), n.splice(t + 1, 0, i);
3308
3389
  }
3309
3390
  }
3310
- function _0(n, e) {
3391
+ function F0(n, e) {
3311
3392
  let t, o, i;
3312
3393
  if (typeof n == "string") {
3313
- let a = fn(n, e);
3394
+ let a = bn(n, e);
3314
3395
  n = a.ring, i = a.skipBisect;
3315
3396
  } else if (!Array.isArray(n))
3316
- throw new TypeError(n0);
3317
- if (t = n.slice(0), !yn(t))
3318
- throw new TypeError(n0);
3319
- return t.length > 1 && sn(t[0], t[t.length - 1]) && t.pop(), o = k1(t), o > 0 && t.reverse(), !i && e && Ft(e) && e > 0 && xn(t, e), t;
3397
+ throw new TypeError(r0);
3398
+ if (t = n.slice(0), !Cn(t))
3399
+ throw new TypeError(r0);
3400
+ return t.length > 1 && dn(t[0], t[t.length - 1]) && t.pop(), o = q1(t), o > 0 && t.reverse(), !i && e && Rt(e) && e > 0 && Tn(t, e), t;
3320
3401
  }
3321
- function yn(n) {
3402
+ function Cn(n) {
3322
3403
  return n.every(function(e) {
3323
- return Array.isArray(e) && e.length >= 2 && Ft(e[0]) && Ft(e[1]);
3404
+ return Array.isArray(e) && e.length >= 2 && Rt(e[0]) && Rt(e[1]);
3324
3405
  });
3325
3406
  }
3326
- function vn(n, e) {
3407
+ function Pn(n, e) {
3327
3408
  let t = n.length, o = 1 / 0, i, a, s;
3328
3409
  for (let r = 0; r < t; r++)
3329
- a = 0, e.forEach(function(h, u) {
3330
- let c = Nt(n[(r + u) % t], h);
3331
- a += c * c;
3410
+ a = 0, e.forEach(function(h, c) {
3411
+ let u = Ft(n[(r + c) % t], h);
3412
+ a += u * u;
3332
3413
  }), a < o && (o = a, i = r);
3333
3414
  i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
3334
3415
  }
3335
- function wn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3336
- let i = _0(n, t), a = _0(e, t), s = mn(i, a, o);
3416
+ function En(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3417
+ let i = F0(n, t), a = F0(e, t), s = Sn(i, a, o);
3337
3418
  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);
3338
3419
  }
3339
- function mn(n, e, t) {
3420
+ function Sn(n, e, t) {
3340
3421
  let o;
3341
- return o = n.length - e.length, I0(n, o < 0 ? o * -1 : 0), I0(e, o > 0 ? o : 0), vn(n, e), an(n, e, t);
3342
- }
3343
- var It = { exports: {} }, O0;
3344
- function bn() {
3345
- if (O0) return It.exports;
3346
- O0 = 1, It.exports = n, It.exports.default = n;
3347
- function n(g, x, p) {
3348
- p = p || 2;
3349
- var v = x && x.length, w = v ? x[0] * p : g.length, b = e(g, 0, w, p, !0), A = [];
3422
+ return o = n.length - e.length, R0(n, o < 0 ? o * -1 : 0), R0(e, o > 0 ? o : 0), Pn(n, e), xn(n, e, t);
3423
+ }
3424
+ var _t = { exports: {} }, B0;
3425
+ function kn() {
3426
+ if (B0) return _t.exports;
3427
+ B0 = 1, _t.exports = n, _t.exports.default = n;
3428
+ function n(g, x, d) {
3429
+ d = d || 2;
3430
+ var w = x && x.length, m = w ? x[0] * d : g.length, b = e(g, 0, m, d, !0), A = [];
3350
3431
  if (!b || b.next === b.prev) return A;
3351
- var P, F, _, $, z, B, Z;
3352
- if (v && (b = h(g, x, b, p)), g.length > 80 * p) {
3353
- P = _ = g[0], F = $ = g[1];
3354
- for (var j = p; j < w; j += p)
3355
- z = g[j], B = g[j + 1], z < P && (P = z), B < F && (F = B), z > _ && (_ = z), B > $ && ($ = B);
3356
- Z = Math.max(_ - P, $ - F), Z = Z !== 0 ? 32767 / Z : 0;
3432
+ var C, N, _, $, j, B, V;
3433
+ if (w && (b = h(g, x, b, d)), g.length > 80 * d) {
3434
+ C = _ = g[0], N = $ = g[1];
3435
+ for (var H = d; H < m; H += d)
3436
+ j = g[H], B = g[H + 1], j < C && (C = j), B < N && (N = B), j > _ && (_ = j), B > $ && ($ = B);
3437
+ V = Math.max(_ - C, $ - N), V = V !== 0 ? 32767 / V : 0;
3357
3438
  }
3358
- return o(b, A, p, P, F, Z, 0), A;
3439
+ return o(b, A, d, C, N, V, 0), A;
3359
3440
  }
3360
- function e(g, x, p, v, w) {
3441
+ function e(g, x, d, w, m) {
3361
3442
  var b, A;
3362
- if (w === Rt(g, x, p, v) > 0)
3363
- for (b = x; b < p; b += v) A = et(b, g[b], g[b + 1], A);
3443
+ if (m === Bt(g, x, d, w) > 0)
3444
+ for (b = x; b < d; b += w) A = et(b, g[b], g[b + 1], A);
3364
3445
  else
3365
- for (b = p - v; b >= x; b -= v) A = et(b, g[b], g[b + 1], A);
3446
+ for (b = d - w; b >= x; b -= w) A = et(b, g[b], g[b + 1], A);
3366
3447
  return A && S(A, A.next) && (nt(A), A = A.next), A;
3367
3448
  }
3368
3449
  function t(g, x) {
3369
3450
  if (!g) return g;
3370
3451
  x || (x = g);
3371
- var p = g, v;
3452
+ var d = g, w;
3372
3453
  do
3373
- if (v = !1, !p.steiner && (S(p, p.next) || C(p.prev, p, p.next) === 0)) {
3374
- if (nt(p), p = x = p.prev, p === p.next) break;
3375
- v = !0;
3454
+ if (w = !1, !d.steiner && (S(d, d.next) || L(d.prev, d, d.next) === 0)) {
3455
+ if (nt(d), d = x = d.prev, d === d.next) break;
3456
+ w = !0;
3376
3457
  } else
3377
- p = p.next;
3378
- while (v || p !== x);
3458
+ d = d.next;
3459
+ while (w || d !== x);
3379
3460
  return x;
3380
3461
  }
3381
- function o(g, x, p, v, w, b, A) {
3462
+ function o(g, x, d, w, m, b, A) {
3382
3463
  if (g) {
3383
- !A && b && f(g, v, w, b);
3384
- for (var P = g, F, _; g.prev !== g.next; ) {
3385
- if (F = g.prev, _ = g.next, b ? a(g, v, w, b) : i(g)) {
3386
- x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(_.i / p | 0), nt(g), g = _.next, P = _.next;
3464
+ !A && b && f(g, w, m, b);
3465
+ for (var C = g, N, _; g.prev !== g.next; ) {
3466
+ if (N = g.prev, _ = g.next, b ? a(g, w, m, b) : i(g)) {
3467
+ x.push(N.i / d | 0), x.push(g.i / d | 0), x.push(_.i / d | 0), nt(g), g = _.next, C = _.next;
3387
3468
  continue;
3388
3469
  }
3389
- if (g = _, g === P) {
3390
- A ? A === 1 ? (g = s(t(g), x, p), o(g, x, p, v, w, b, 2)) : A === 2 && r(g, x, p, v, w, b) : o(t(g), x, p, v, w, b, 1);
3470
+ if (g = _, g === C) {
3471
+ A ? A === 1 ? (g = s(t(g), x, d), o(g, x, d, w, m, b, 2)) : A === 2 && r(g, x, d, w, m, b) : o(t(g), x, d, w, m, b, 1);
3391
3472
  break;
3392
3473
  }
3393
3474
  }
3394
3475
  }
3395
3476
  }
3396
3477
  function i(g) {
3397
- var x = g.prev, p = g, v = g.next;
3398
- if (C(x, p, v) >= 0) return !1;
3399
- for (var w = x.x, b = p.x, A = v.x, P = x.y, F = p.y, _ = v.y, $ = w < b ? w < A ? w : A : b < A ? b : A, z = P < F ? P < _ ? P : _ : F < _ ? F : _, B = w > b ? w > A ? w : A : b > A ? b : A, Z = P > F ? P > _ ? P : _ : F > _ ? F : _, j = v.next; j !== x; ) {
3400
- if (j.x >= $ && j.x <= B && j.y >= z && j.y <= Z && E(w, P, b, F, A, _, j.x, j.y) && C(j.prev, j, j.next) >= 0) return !1;
3401
- j = j.next;
3478
+ var x = g.prev, d = g, w = g.next;
3479
+ if (L(x, d, w) >= 0) return !1;
3480
+ for (var m = x.x, b = d.x, A = w.x, C = x.y, N = d.y, _ = w.y, $ = m < b ? m < A ? m : A : b < A ? b : A, j = C < N ? C < _ ? C : _ : N < _ ? N : _, B = m > b ? m > A ? m : A : b > A ? b : A, V = C > N ? C > _ ? C : _ : N > _ ? N : _, H = w.next; H !== x; ) {
3481
+ if (H.x >= $ && H.x <= B && H.y >= j && H.y <= V && P(m, C, b, N, A, _, H.x, H.y) && L(H.prev, H, H.next) >= 0) return !1;
3482
+ H = H.next;
3402
3483
  }
3403
3484
  return !0;
3404
3485
  }
3405
- function a(g, x, p, v) {
3406
- var w = g.prev, b = g, A = g.next;
3407
- if (C(w, b, A) >= 0) return !1;
3408
- for (var P = w.x, F = b.x, _ = A.x, $ = w.y, z = b.y, B = A.y, Z = P < F ? P < _ ? P : _ : F < _ ? F : _, j = $ < z ? $ < B ? $ : B : z < B ? z : B, Lt = P > F ? P > _ ? P : _ : F > _ ? F : _, Tt = $ > z ? $ > B ? $ : B : z > B ? z : B, h0 = y(Z, j, x, p, v), l0 = y(Lt, Tt, x, p, v), D = g.prevZ, q = g.nextZ; D && D.z >= h0 && q && q.z <= l0; ) {
3409
- if (D.x >= Z && D.x <= Lt && D.y >= j && D.y <= Tt && D !== w && D !== A && E(P, $, F, z, _, B, D.x, D.y) && C(D.prev, D, D.next) >= 0 || (D = D.prevZ, q.x >= Z && q.x <= Lt && q.y >= j && q.y <= Tt && q !== w && q !== A && E(P, $, F, z, _, B, q.x, q.y) && C(q.prev, q, q.next) >= 0)) return !1;
3486
+ function a(g, x, d, w) {
3487
+ var m = g.prev, b = g, A = g.next;
3488
+ if (L(m, b, A) >= 0) return !1;
3489
+ for (var C = m.x, N = b.x, _ = A.x, $ = m.y, j = b.y, B = A.y, V = C < N ? C < _ ? C : _ : N < _ ? N : _, H = $ < j ? $ < B ? $ : B : j < B ? j : B, Tt = C > N ? C > _ ? C : _ : N > _ ? N : _, Ct = $ > j ? $ > B ? $ : B : j > B ? j : B, u0 = y(V, H, x, d, w), f0 = y(Tt, Ct, x, d, w), D = g.prevZ, q = g.nextZ; D && D.z >= u0 && q && q.z <= f0; ) {
3490
+ if (D.x >= V && D.x <= Tt && D.y >= H && D.y <= Ct && D !== m && D !== A && P(C, $, N, j, _, B, D.x, D.y) && L(D.prev, D, D.next) >= 0 || (D = D.prevZ, q.x >= V && q.x <= Tt && q.y >= H && q.y <= Ct && q !== m && q !== A && P(C, $, N, j, _, B, q.x, q.y) && L(q.prev, q, q.next) >= 0)) return !1;
3410
3491
  q = q.nextZ;
3411
3492
  }
3412
- for (; D && D.z >= h0; ) {
3413
- if (D.x >= Z && D.x <= Lt && D.y >= j && D.y <= Tt && D !== w && D !== A && E(P, $, F, z, _, B, D.x, D.y) && C(D.prev, D, D.next) >= 0) return !1;
3493
+ for (; D && D.z >= u0; ) {
3494
+ if (D.x >= V && D.x <= Tt && D.y >= H && D.y <= Ct && D !== m && D !== A && P(C, $, N, j, _, B, D.x, D.y) && L(D.prev, D, D.next) >= 0) return !1;
3414
3495
  D = D.prevZ;
3415
3496
  }
3416
- for (; q && q.z <= l0; ) {
3417
- if (q.x >= Z && q.x <= Lt && q.y >= j && q.y <= Tt && q !== w && q !== A && E(P, $, F, z, _, B, q.x, q.y) && C(q.prev, q, q.next) >= 0) return !1;
3497
+ for (; q && q.z <= f0; ) {
3498
+ if (q.x >= V && q.x <= Tt && q.y >= H && q.y <= Ct && q !== m && q !== A && P(C, $, N, j, _, B, q.x, q.y) && L(q.prev, q, q.next) >= 0) return !1;
3418
3499
  q = q.nextZ;
3419
3500
  }
3420
3501
  return !0;
3421
3502
  }
3422
- function s(g, x, p) {
3423
- var v = g;
3503
+ function s(g, x, d) {
3504
+ var w = g;
3424
3505
  do {
3425
- var w = v.prev, b = v.next.next;
3426
- !S(w, b) && T(w, v, v.next, b) && H(w, b) && H(b, w) && (x.push(w.i / p | 0), x.push(v.i / p | 0), x.push(b.i / p | 0), nt(v), nt(v.next), v = g = b), v = v.next;
3427
- } while (v !== g);
3428
- return t(v);
3506
+ var m = w.prev, b = w.next.next;
3507
+ !S(m, b) && T(m, w, w.next, b) && z(m, b) && z(b, m) && (x.push(m.i / d | 0), x.push(w.i / d | 0), x.push(b.i / d | 0), nt(w), nt(w.next), w = g = b), w = w.next;
3508
+ } while (w !== g);
3509
+ return t(w);
3429
3510
  }
3430
- function r(g, x, p, v, w, b) {
3511
+ function r(g, x, d, w, m, b) {
3431
3512
  var A = g;
3432
3513
  do {
3433
- for (var P = A.next.next; P !== A.prev; ) {
3434
- if (A.i !== P.i && L(A, P)) {
3435
- var F = tt(A, P);
3436
- A = t(A, A.next), F = t(F, F.next), o(A, x, p, v, w, b, 0), o(F, x, p, v, w, b, 0);
3514
+ for (var C = A.next.next; C !== A.prev; ) {
3515
+ if (A.i !== C.i && E(A, C)) {
3516
+ var N = tt(A, C);
3517
+ A = t(A, A.next), N = t(N, N.next), o(A, x, d, w, m, b, 0), o(N, x, d, w, m, b, 0);
3437
3518
  return;
3438
3519
  }
3439
- P = P.next;
3520
+ C = C.next;
3440
3521
  }
3441
3522
  A = A.next;
3442
3523
  } while (A !== g);
3443
3524
  }
3444
- function h(g, x, p, v) {
3445
- var w = [], b, A, P, F, _;
3525
+ function h(g, x, d, w) {
3526
+ var m = [], b, A, C, N, _;
3446
3527
  for (b = 0, A = x.length; b < A; b++)
3447
- P = x[b] * v, F = b < A - 1 ? x[b + 1] * v : g.length, _ = e(g, P, F, v, !1), _ === _.next && (_.steiner = !0), w.push(M(_));
3448
- for (w.sort(u), b = 0; b < w.length; b++)
3449
- p = c(w[b], p);
3450
- return p;
3528
+ C = x[b] * w, N = b < A - 1 ? x[b + 1] * w : g.length, _ = e(g, C, N, w, !1), _ === _.next && (_.steiner = !0), m.push(M(_));
3529
+ for (m.sort(c), b = 0; b < m.length; b++)
3530
+ d = u(m[b], d);
3531
+ return d;
3451
3532
  }
3452
- function u(g, x) {
3533
+ function c(g, x) {
3453
3534
  return g.x - x.x;
3454
3535
  }
3455
- function c(g, x) {
3456
- var p = d(g, x);
3457
- if (!p)
3536
+ function u(g, x) {
3537
+ var d = p(g, x);
3538
+ if (!d)
3458
3539
  return x;
3459
- var v = tt(p, g);
3460
- return t(v, v.next), t(p, p.next);
3540
+ var w = tt(d, g);
3541
+ return t(w, w.next), t(d, d.next);
3461
3542
  }
3462
- function d(g, x) {
3463
- var p = x, v = g.x, w = g.y, b = -1 / 0, A;
3543
+ function p(g, x) {
3544
+ var d = x, w = g.x, m = g.y, b = -1 / 0, A;
3464
3545
  do {
3465
- if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
3466
- var P = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
3467
- if (P <= v && P > b && (b = P, A = p.x < p.next.x ? p : p.next, P === v))
3546
+ if (m <= d.y && m >= d.next.y && d.next.y !== d.y) {
3547
+ var C = d.x + (m - d.y) * (d.next.x - d.x) / (d.next.y - d.y);
3548
+ if (C <= w && C > b && (b = C, A = d.x < d.next.x ? d : d.next, C === w))
3468
3549
  return A;
3469
3550
  }
3470
- p = p.next;
3471
- } while (p !== x);
3551
+ d = d.next;
3552
+ } while (d !== x);
3472
3553
  if (!A) return null;
3473
- var F = A, _ = A.x, $ = A.y, z = 1 / 0, B;
3474
- p = A;
3554
+ var N = A, _ = A.x, $ = A.y, j = 1 / 0, B;
3555
+ d = A;
3475
3556
  do
3476
- v >= p.x && p.x >= _ && v !== p.x && E(w < $ ? v : b, w, _, $, w < $ ? b : v, w, p.x, p.y) && (B = Math.abs(w - p.y) / (v - p.x), H(p, g) && (B < z || B === z && (p.x > A.x || p.x === A.x && l(A, p))) && (A = p, z = B)), p = p.next;
3477
- while (p !== F);
3557
+ w >= d.x && d.x >= _ && w !== d.x && P(m < $ ? w : b, m, _, $, m < $ ? b : w, m, d.x, d.y) && (B = Math.abs(m - d.y) / (w - d.x), z(d, g) && (B < j || B === j && (d.x > A.x || d.x === A.x && l(A, d))) && (A = d, j = B)), d = d.next;
3558
+ while (d !== N);
3478
3559
  return A;
3479
3560
  }
3480
3561
  function l(g, x) {
3481
- return C(g.prev, g, x.prev) < 0 && C(x.next, g, g.next) < 0;
3562
+ return L(g.prev, g, x.prev) < 0 && L(x.next, g, g.next) < 0;
3482
3563
  }
3483
- function f(g, x, p, v) {
3484
- var w = g;
3564
+ function f(g, x, d, w) {
3565
+ var m = g;
3485
3566
  do
3486
- w.z === 0 && (w.z = y(w.x, w.y, x, p, v)), w.prevZ = w.prev, w.nextZ = w.next, w = w.next;
3487
- while (w !== g);
3488
- w.prevZ.nextZ = null, w.prevZ = null, m(w);
3567
+ m.z === 0 && (m.z = y(m.x, m.y, x, d, w)), m.prevZ = m.prev, m.nextZ = m.next, m = m.next;
3568
+ while (m !== g);
3569
+ m.prevZ.nextZ = null, m.prevZ = null, v(m);
3489
3570
  }
3490
- function m(g) {
3491
- var x, p, v, w, b, A, P, F, _ = 1;
3571
+ function v(g) {
3572
+ var x, d, w, m, b, A, C, N, _ = 1;
3492
3573
  do {
3493
- for (p = g, g = null, b = null, A = 0; p; ) {
3494
- for (A++, v = p, P = 0, x = 0; x < _ && (P++, v = v.nextZ, !!v); x++)
3574
+ for (d = g, g = null, b = null, A = 0; d; ) {
3575
+ for (A++, w = d, C = 0, x = 0; x < _ && (C++, w = w.nextZ, !!w); x++)
3495
3576
  ;
3496
- for (F = _; P > 0 || F > 0 && v; )
3497
- P !== 0 && (F === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, P--) : (w = v, v = v.nextZ, F--), b ? b.nextZ = w : g = w, w.prevZ = b, b = w;
3498
- p = v;
3577
+ for (N = _; C > 0 || N > 0 && w; )
3578
+ C !== 0 && (N === 0 || !w || d.z <= w.z) ? (m = d, d = d.nextZ, C--) : (m = w, w = w.nextZ, N--), b ? b.nextZ = m : g = m, m.prevZ = b, b = m;
3579
+ d = w;
3499
3580
  }
3500
3581
  b.nextZ = null, _ *= 2;
3501
3582
  } while (A > 1);
3502
3583
  return g;
3503
3584
  }
3504
- function y(g, x, p, v, w) {
3505
- return g = (g - p) * w | 0, x = (x - v) * w | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, x = (x | x << 8) & 16711935, x = (x | x << 4) & 252645135, x = (x | x << 2) & 858993459, x = (x | x << 1) & 1431655765, g | x << 1;
3585
+ function y(g, x, d, w, m) {
3586
+ return g = (g - d) * m | 0, x = (x - w) * m | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, x = (x | x << 8) & 16711935, x = (x | x << 4) & 252645135, x = (x | x << 2) & 858993459, x = (x | x << 1) & 1431655765, g | x << 1;
3506
3587
  }
3507
3588
  function M(g) {
3508
- var x = g, p = g;
3589
+ var x = g, d = g;
3509
3590
  do
3510
- (x.x < p.x || x.x === p.x && x.y < p.y) && (p = x), x = x.next;
3591
+ (x.x < d.x || x.x === d.x && x.y < d.y) && (d = x), x = x.next;
3511
3592
  while (x !== g);
3512
- return p;
3593
+ return d;
3513
3594
  }
3514
- function E(g, x, p, v, w, b, A, P) {
3515
- return (w - A) * (x - P) >= (g - A) * (b - P) && (g - A) * (v - P) >= (p - A) * (x - P) && (p - A) * (b - P) >= (w - A) * (v - P);
3595
+ function P(g, x, d, w, m, b, A, C) {
3596
+ return (m - A) * (x - C) >= (g - A) * (b - C) && (g - A) * (w - C) >= (d - A) * (x - C) && (d - A) * (b - C) >= (m - A) * (w - C);
3516
3597
  }
3517
- function L(g, x) {
3598
+ function E(g, x) {
3518
3599
  return g.next.i !== x.i && g.prev.i !== x.i && !X(g, x) && // dones't intersect other edges
3519
- (H(g, x) && H(x, g) && Y(g, x) && // locally visible
3520
- (C(g.prev, g, x.prev) || C(g, x.prev, x)) || // does not create opposite-facing sectors
3521
- S(g, x) && C(g.prev, g, g.next) > 0 && C(x.prev, x, x.next) > 0);
3600
+ (z(g, x) && z(x, g) && Y(g, x) && // locally visible
3601
+ (L(g.prev, g, x.prev) || L(g, x.prev, x)) || // does not create opposite-facing sectors
3602
+ S(g, x) && L(g.prev, g, g.next) > 0 && L(x.prev, x, x.next) > 0);
3522
3603
  }
3523
- function C(g, x, p) {
3524
- return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
3604
+ function L(g, x, d) {
3605
+ return (x.y - g.y) * (d.x - x.x) - (x.x - g.x) * (d.y - x.y);
3525
3606
  }
3526
3607
  function S(g, x) {
3527
3608
  return g.x === x.x && g.y === x.y;
3528
3609
  }
3529
- function T(g, x, p, v) {
3530
- var w = R(C(g, x, p)), b = R(C(g, x, v)), A = R(C(p, v, g)), P = R(C(p, v, x));
3531
- return !!(w !== b && A !== P || w === 0 && I(g, p, x) || b === 0 && I(g, v, x) || A === 0 && I(p, g, v) || P === 0 && I(p, x, v));
3610
+ function T(g, x, d, w) {
3611
+ var m = F(L(g, x, d)), b = F(L(g, x, w)), A = F(L(d, w, g)), C = F(L(d, w, x));
3612
+ return !!(m !== b && A !== C || m === 0 && k(g, d, x) || b === 0 && k(g, w, x) || A === 0 && k(d, g, w) || C === 0 && k(d, x, w));
3532
3613
  }
3533
- function I(g, x, p) {
3534
- return x.x <= Math.max(g.x, p.x) && x.x >= Math.min(g.x, p.x) && x.y <= Math.max(g.y, p.y) && x.y >= Math.min(g.y, p.y);
3614
+ function k(g, x, d) {
3615
+ return x.x <= Math.max(g.x, d.x) && x.x >= Math.min(g.x, d.x) && x.y <= Math.max(g.y, d.y) && x.y >= Math.min(g.y, d.y);
3535
3616
  }
3536
- function R(g) {
3617
+ function F(g) {
3537
3618
  return g > 0 ? 1 : g < 0 ? -1 : 0;
3538
3619
  }
3539
3620
  function X(g, x) {
3540
- var p = g;
3621
+ var d = g;
3541
3622
  do {
3542
- if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && T(p, p.next, g, x)) return !0;
3543
- p = p.next;
3544
- } while (p !== g);
3623
+ if (d.i !== g.i && d.next.i !== g.i && d.i !== x.i && d.next.i !== x.i && T(d, d.next, g, x)) return !0;
3624
+ d = d.next;
3625
+ } while (d !== g);
3545
3626
  return !1;
3546
3627
  }
3547
- function H(g, x) {
3548
- return C(g.prev, g, g.next) < 0 ? C(g, x, g.next) >= 0 && C(g, g.prev, x) >= 0 : C(g, x, g.prev) < 0 || C(g, g.next, x) < 0;
3628
+ function z(g, x) {
3629
+ return L(g.prev, g, g.next) < 0 ? L(g, x, g.next) >= 0 && L(g, g.prev, x) >= 0 : L(g, x, g.prev) < 0 || L(g, g.next, x) < 0;
3549
3630
  }
3550
3631
  function Y(g, x) {
3551
- var p = g, v = !1, w = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
3632
+ var d = g, w = !1, m = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
3552
3633
  do
3553
- p.y > b != p.next.y > b && p.next.y !== p.y && w < (p.next.x - p.x) * (b - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
3554
- while (p !== g);
3555
- return v;
3634
+ d.y > b != d.next.y > b && d.next.y !== d.y && m < (d.next.x - d.x) * (b - d.y) / (d.next.y - d.y) + d.x && (w = !w), d = d.next;
3635
+ while (d !== g);
3636
+ return w;
3556
3637
  }
3557
3638
  function tt(g, x) {
3558
- var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next, b = x.prev;
3559
- return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, b.next = v, v.prev = b, v;
3639
+ var d = new K(g.i, g.x, g.y), w = new K(x.i, x.x, x.y), m = g.next, b = x.prev;
3640
+ return g.next = x, x.prev = g, d.next = m, m.prev = d, w.next = d, d.prev = w, b.next = w, w.prev = b, w;
3560
3641
  }
3561
- function et(g, x, p, v) {
3562
- var w = new K(g, x, p);
3563
- return v ? (w.next = v.next, w.prev = v, v.next.prev = w, v.next = w) : (w.prev = w, w.next = w), w;
3642
+ function et(g, x, d, w) {
3643
+ var m = new K(g, x, d);
3644
+ return w ? (m.next = w.next, m.prev = w, w.next.prev = m, w.next = m) : (m.prev = m, m.next = m), m;
3564
3645
  }
3565
3646
  function nt(g) {
3566
3647
  g.next.prev = g.prev, g.prev.next = g.next, g.prevZ && (g.prevZ.nextZ = g.nextZ), g.nextZ && (g.nextZ.prevZ = g.prevZ);
3567
3648
  }
3568
- function K(g, x, p) {
3569
- this.i = g, this.x = x, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
3649
+ function K(g, x, d) {
3650
+ this.i = g, this.x = x, this.y = d, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
3570
3651
  }
3571
- n.deviation = function(g, x, p, v) {
3572
- var w = x && x.length, b = w ? x[0] * p : g.length, A = Math.abs(Rt(g, 0, b, p));
3573
- if (w)
3574
- for (var P = 0, F = x.length; P < F; P++) {
3575
- var _ = x[P] * p, $ = P < F - 1 ? x[P + 1] * p : g.length;
3576
- A -= Math.abs(Rt(g, _, $, p));
3652
+ n.deviation = function(g, x, d, w) {
3653
+ var m = x && x.length, b = m ? x[0] * d : g.length, A = Math.abs(Bt(g, 0, b, d));
3654
+ if (m)
3655
+ for (var C = 0, N = x.length; C < N; C++) {
3656
+ var _ = x[C] * d, $ = C < N - 1 ? x[C + 1] * d : g.length;
3657
+ A -= Math.abs(Bt(g, _, $, d));
3577
3658
  }
3578
- var z = 0;
3579
- for (P = 0; P < v.length; P += 3) {
3580
- var B = v[P] * p, Z = v[P + 1] * p, j = v[P + 2] * p;
3581
- z += Math.abs(
3582
- (g[B] - g[j]) * (g[Z + 1] - g[B + 1]) - (g[B] - g[Z]) * (g[j + 1] - g[B + 1])
3659
+ var j = 0;
3660
+ for (C = 0; C < w.length; C += 3) {
3661
+ var B = w[C] * d, V = w[C + 1] * d, H = w[C + 2] * d;
3662
+ j += Math.abs(
3663
+ (g[B] - g[H]) * (g[V + 1] - g[B + 1]) - (g[B] - g[V]) * (g[H + 1] - g[B + 1])
3583
3664
  );
3584
3665
  }
3585
- return A === 0 && z === 0 ? 0 : Math.abs((z - A) / A);
3666
+ return A === 0 && j === 0 ? 0 : Math.abs((j - A) / A);
3586
3667
  };
3587
- function Rt(g, x, p, v) {
3588
- for (var w = 0, b = x, A = p - v; b < p; b += v)
3589
- w += (g[A] - g[b]) * (g[b + 1] + g[A + 1]), A = b;
3590
- return w;
3668
+ function Bt(g, x, d, w) {
3669
+ for (var m = 0, b = x, A = d - w; b < d; b += w)
3670
+ m += (g[A] - g[b]) * (g[b + 1] + g[A + 1]), A = b;
3671
+ return m;
3591
3672
  }
3592
3673
  return n.flatten = function(g) {
3593
- for (var x = g[0][0].length, p = { vertices: [], holes: [], dimensions: x }, v = 0, w = 0; w < g.length; w++) {
3594
- for (var b = 0; b < g[w].length; b++)
3595
- for (var A = 0; A < x; A++) p.vertices.push(g[w][b][A]);
3596
- w > 0 && (v += g[w - 1].length, p.holes.push(v));
3674
+ for (var x = g[0][0].length, d = { vertices: [], holes: [], dimensions: x }, w = 0, m = 0; m < g.length; m++) {
3675
+ for (var b = 0; b < g[m].length; b++)
3676
+ for (var A = 0; A < x; A++) d.vertices.push(g[m][b][A]);
3677
+ m > 0 && (w += g[m - 1].length, d.holes.push(w));
3597
3678
  }
3598
- return p;
3599
- }, It.exports;
3679
+ return d;
3680
+ }, _t.exports;
3600
3681
  }
3601
- bn();
3602
- function K0(n, e) {
3682
+ kn();
3683
+ function re(n, e) {
3603
3684
  return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
3604
3685
  }
3605
- function An(n) {
3606
- return n.length === 1 && (n = Mn(n)), {
3686
+ function In(n) {
3687
+ return n.length === 1 && (n = _n(n)), {
3607
3688
  left: function(e, t, o, i) {
3608
3689
  for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
3609
3690
  var a = o + i >>> 1;
@@ -3620,20 +3701,20 @@ function An(n) {
3620
3701
  }
3621
3702
  };
3622
3703
  }
3623
- function Mn(n) {
3704
+ function _n(n) {
3624
3705
  return function(e, t) {
3625
- return K0(n(e), t);
3706
+ return re(n(e), t);
3626
3707
  };
3627
3708
  }
3628
- An(K0);
3629
- function Wn(n, e, t = 3) {
3630
- const o = wn(n, e, { maxSegmentLength: t });
3709
+ In(re);
3710
+ function e2(n, e, t = 3) {
3711
+ const o = En(n, e, { maxSegmentLength: t });
3631
3712
  return {
3632
3713
  check: (i) => typeof i == "string",
3633
3714
  interpolate: (i, a, s) => o(s)
3634
3715
  };
3635
3716
  }
3636
- function Xn(n) {
3717
+ function n2(n) {
3637
3718
  const e = (o) => n.width * o, t = (o) => n.height * o;
3638
3719
  return {
3639
3720
  scaleX: e,
@@ -3644,7 +3725,7 @@ function Xn(n) {
3644
3725
  })
3645
3726
  };
3646
3727
  }
3647
- function Gn(n) {
3728
+ function r2(n) {
3648
3729
  const e = [];
3649
3730
  if (n.isAllKey) {
3650
3731
  for (let t = 0; t <= n.animations.length; t++)
@@ -3658,47 +3739,47 @@ function Gn(n) {
3658
3739
  export {
3659
3740
  xt as Alignment,
3660
3741
  ot as Anchor,
3661
- o0 as Animate,
3662
- In as Arrow,
3663
- jn as BrowserCanvasRenderer,
3664
- _n as Circle,
3742
+ s0 as Animate,
3743
+ zn as Arrow,
3744
+ Zn as BrowserCanvasRenderer,
3745
+ jn as Circle,
3665
3746
  G as Color,
3666
- i0 as Easing,
3667
- Tn as FadeIn,
3668
- Cn as FadeOut,
3669
- Ce as FontStyle,
3670
- Ee as FontWeight,
3671
- On as Grid,
3672
- c0 as Group,
3673
- Pn as Hide,
3674
- Sn as IFrame,
3675
- Fn as Image,
3676
- Nn as Line,
3677
- Rn as Mask,
3747
+ o0 as Easing,
3748
+ Nn as FadeIn,
3749
+ Rn as FadeOut,
3750
+ _e as FontStyle,
3751
+ Ne as FontWeight,
3752
+ Hn as Grid,
3753
+ g0 as Group,
3754
+ Fn as Hide,
3755
+ Dn as IFrame,
3756
+ Un as Image,
3757
+ $n as Line,
3758
+ Yn as Mask,
3678
3759
  U as ObjectType,
3679
- Yn as Opaque,
3680
- Bn as Path,
3681
- Hn as Pause,
3682
- Dn as Polygon,
3760
+ t2 as Opaque,
3761
+ Wn as Path,
3762
+ Kn as Pause,
3763
+ Xn as Polygon,
3683
3764
  W as Position,
3684
- ze as Presentation,
3685
- qn as Rectangle,
3686
- zn as SVG,
3687
- kn as ScreenCapture,
3688
- En as Show,
3765
+ Ve as Presentation,
3766
+ Gn as Rectangle,
3767
+ Vn as SVG,
3768
+ qn as ScreenCapture,
3769
+ Bn as Show,
3689
3770
  at as Size,
3690
- Un as Slide,
3771
+ Qn as Slide,
3691
3772
  lt as SlideObject,
3692
- N0 as SlideWebExtra,
3693
- _e as Text,
3694
- $n as TextUnit,
3695
- Te as Transparent,
3696
- F0 as Update,
3697
- Gn as getKeySlideBuildIndices,
3698
- Xn as getSizingFunctions,
3699
- Wn as getSmoothPathInterpolator,
3700
- Ie as getTextContentLength,
3701
- Ue as interpolateColor,
3702
- Ye as interpolateNumber
3773
+ q0 as SlideWebExtra,
3774
+ De as Text,
3775
+ Jn as TextUnit,
3776
+ Ie as Transparent,
3777
+ D0 as Update,
3778
+ r2 as getKeySlideBuildIndices,
3779
+ n2 as getSizingFunctions,
3780
+ e2 as getSmoothPathInterpolator,
3781
+ Be as getTextContentLength,
3782
+ Qe as interpolateColor,
3783
+ t1 as interpolateNumber
3703
3784
  };
3704
3785
  //# sourceMappingURL=presenter.mjs.map