presenter 0.9.4 → 0.10.0

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