presenter 0.8.7 → 0.8.8
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.
- package/dist/navigator/navigatorHotReload.d.ts +10 -0
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +722 -673
- package/dist/presenter.mjs.map +1 -1
- package/package.json +1 -1
package/dist/presenter.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (n, e, t) =>
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
|
+
var le = (n, e, t) => e in n ? he(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var k = (n, e, t) => le(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
const ft = {
|
|
5
5
|
/** Represents an animated change in an object's properties. */
|
|
6
6
|
ANIMATE: "Animate",
|
|
@@ -9,52 +9,52 @@ const ft = {
|
|
|
9
9
|
/** Represents an immediate update to an object's properties without animation. */
|
|
10
10
|
UPDATE: "Update"
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function ce(n) {
|
|
13
13
|
return n * n * n;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ue(n) {
|
|
16
16
|
return --n * n * n + 1;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function fe(n) {
|
|
19
19
|
return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var o0 = 1.70158;
|
|
22
22
|
(function n(e) {
|
|
23
23
|
e = +e;
|
|
24
24
|
function t(o) {
|
|
25
25
|
return (o = +o) * o * (e * (o - 1) + o);
|
|
26
26
|
}
|
|
27
27
|
return t.overshoot = n, t;
|
|
28
|
-
})(
|
|
28
|
+
})(o0);
|
|
29
29
|
(function n(e) {
|
|
30
30
|
e = +e;
|
|
31
31
|
function t(o) {
|
|
32
32
|
return --o * o * ((o + 1) * e + o) + 1;
|
|
33
33
|
}
|
|
34
34
|
return t.overshoot = n, t;
|
|
35
|
-
})(
|
|
36
|
-
var
|
|
35
|
+
})(o0);
|
|
36
|
+
var ge = (function n(e) {
|
|
37
37
|
e = +e;
|
|
38
38
|
function t(o) {
|
|
39
39
|
return ((o *= 2) < 1 ? o * o * ((e + 1) * o - e) : (o -= 2) * o * ((e + 1) * o + e) + 2) / 2;
|
|
40
40
|
}
|
|
41
41
|
return t.overshoot = n, t;
|
|
42
|
-
})(
|
|
43
|
-
const
|
|
42
|
+
})(o0);
|
|
43
|
+
const s0 = {
|
|
44
44
|
LINEAR: (n) => n,
|
|
45
|
-
CUBIC:
|
|
46
|
-
CUBIC_IN:
|
|
47
|
-
CUBIC_OUT:
|
|
48
|
-
BACK_IN_OUT:
|
|
49
|
-
},
|
|
50
|
-
function
|
|
45
|
+
CUBIC: fe,
|
|
46
|
+
CUBIC_IN: ce,
|
|
47
|
+
CUBIC_OUT: ue,
|
|
48
|
+
BACK_IN_OUT: ge.overshoot(0.8)
|
|
49
|
+
}, de = s0.LINEAR;
|
|
50
|
+
function a0(n, e, t = {}) {
|
|
51
51
|
return {
|
|
52
52
|
type: ft.ANIMATE,
|
|
53
53
|
object: n,
|
|
54
54
|
props: e,
|
|
55
55
|
delay: 0,
|
|
56
56
|
duration: 1e3,
|
|
57
|
-
easing:
|
|
57
|
+
easing: de,
|
|
58
58
|
block: !1,
|
|
59
59
|
interpolators: null,
|
|
60
60
|
isKey: !1,
|
|
@@ -62,21 +62,21 @@ function s0(n, e, t = {}) {
|
|
|
62
62
|
...typeof t == "number" ? { duration: t } : t
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function qn(n, e = {}) {
|
|
66
|
+
return a0(n, { opacity: 1 }, {
|
|
67
67
|
duration: 500,
|
|
68
|
-
easing:
|
|
68
|
+
easing: s0.CUBIC,
|
|
69
69
|
...typeof e == "number" ? { duration: e } : e
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function zn(n, e = {}) {
|
|
73
|
+
return a0(n, { opacity: 0 }, {
|
|
74
74
|
duration: 500,
|
|
75
|
-
easing:
|
|
75
|
+
easing: s0.CUBIC,
|
|
76
76
|
...typeof e == "number" ? { duration: e } : e
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function j0(n, e, t = {}) {
|
|
80
80
|
return {
|
|
81
81
|
type: ft.UPDATE,
|
|
82
82
|
isKey: !1,
|
|
@@ -86,11 +86,11 @@ function q0(n, e, t = {}) {
|
|
|
86
86
|
...t
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function Hn(n) {
|
|
90
|
+
return j0(n, { opacity: 0 });
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function jn(n) {
|
|
93
|
+
return j0(n, { opacity: 1 });
|
|
94
94
|
}
|
|
95
95
|
const ot = {
|
|
96
96
|
TOP_LEFT: "TopLeft",
|
|
@@ -139,7 +139,7 @@ G.RED = G(255, 0, 0);
|
|
|
139
139
|
G.TRANSPARENT = G(0, 0, 0, 0);
|
|
140
140
|
G.WHITE = G(255, 255, 255);
|
|
141
141
|
const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
142
|
-
function
|
|
142
|
+
function U0(n = null) {
|
|
143
143
|
return {
|
|
144
144
|
content: null,
|
|
145
145
|
setup: null,
|
|
@@ -151,14 +151,14 @@ function z0(n = null) {
|
|
|
151
151
|
...n
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function $0(n, e = null) {
|
|
155
155
|
return n.alpha * (e ?? 1);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(
|
|
157
|
+
function It(n, e = null) {
|
|
158
|
+
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round($0(n, e) * 255);
|
|
159
159
|
return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Un(n = null) {
|
|
162
162
|
const {
|
|
163
163
|
url: e = "https://wikipedia.org/",
|
|
164
164
|
backgroundColor: t = G.TRANSPARENT,
|
|
@@ -172,9 +172,9 @@ function zn(n = null) {
|
|
|
172
172
|
x: u = 0,
|
|
173
173
|
y: d = 0
|
|
174
174
|
} = n || {}, l = document.createElement("iframe");
|
|
175
|
-
l.src = e, l.style.backgroundColor =
|
|
175
|
+
l.src = e, l.style.backgroundColor = It(t), l.style.border = i > 0 ? `${i}px solid ${It(o)}` : "none", l.style.pointerEvents = a;
|
|
176
176
|
const f = (100 / s).toFixed(3) + "%";
|
|
177
|
-
return l.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left",
|
|
177
|
+
return l.style.height = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.width = i === 0 ? f : `calc(${f} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", U0({
|
|
178
178
|
content: l,
|
|
179
179
|
anchor: r,
|
|
180
180
|
height: h,
|
|
@@ -187,11 +187,11 @@ const xt = {
|
|
|
187
187
|
LEFT: "left",
|
|
188
188
|
CENTER: "center",
|
|
189
189
|
RIGHT: "right"
|
|
190
|
-
},
|
|
190
|
+
}, pe = xt.LEFT;
|
|
191
191
|
function st(n, e) {
|
|
192
192
|
throw new Error("Unexpected value: " + n);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function $n(n = null) {
|
|
195
195
|
const {
|
|
196
196
|
alignment: e = xt.LEFT,
|
|
197
197
|
scale: t = 1,
|
|
@@ -234,7 +234,7 @@ function jn(n = null) {
|
|
|
234
234
|
u.srcObject.getTracks().forEach((f) => f.stop()), u.style.display = "none", u.srcObject = null;
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return U0({
|
|
238
238
|
content: null,
|
|
239
239
|
setup: h,
|
|
240
240
|
anchor: o,
|
|
@@ -244,7 +244,7 @@ function jn(n = null) {
|
|
|
244
244
|
y: r
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
const
|
|
247
|
+
const $ = {
|
|
248
248
|
ARROW: "Arrow",
|
|
249
249
|
CIRCLE: "Circle",
|
|
250
250
|
GROUP: "Group",
|
|
@@ -260,15 +260,15 @@ const U = {
|
|
|
260
260
|
};
|
|
261
261
|
function lt(n) {
|
|
262
262
|
return {
|
|
263
|
-
objectType:
|
|
263
|
+
objectType: $.SLIDE_OBJECT,
|
|
264
264
|
opacity: 1,
|
|
265
265
|
...n
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Wn(n = null) {
|
|
269
269
|
const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
|
|
270
270
|
return lt({
|
|
271
|
-
objectType:
|
|
271
|
+
objectType: $.ARROW,
|
|
272
272
|
arrowheadSize: i,
|
|
273
273
|
color: Q,
|
|
274
274
|
drawn: 1,
|
|
@@ -283,24 +283,24 @@ function Hn(n = null) {
|
|
|
283
283
|
...o
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
286
|
+
const xe = 50;
|
|
287
|
+
function Yn(n = null) {
|
|
288
288
|
return lt({
|
|
289
|
-
objectType:
|
|
289
|
+
objectType: $.CIRCLE,
|
|
290
290
|
anchor: ht,
|
|
291
291
|
strokeColor: Q,
|
|
292
292
|
strokeWidth: 0,
|
|
293
293
|
drawn: 1,
|
|
294
294
|
fillColor: Q,
|
|
295
|
-
radius:
|
|
295
|
+
radius: xe,
|
|
296
296
|
x: 0,
|
|
297
297
|
y: 0,
|
|
298
298
|
...n
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function x0(n, e = null) {
|
|
302
302
|
return lt({
|
|
303
|
-
objectType:
|
|
303
|
+
objectType: $.GROUP,
|
|
304
304
|
anchor: ht,
|
|
305
305
|
height: 0,
|
|
306
306
|
objects: n,
|
|
@@ -323,7 +323,7 @@ function g0(n, e = null) {
|
|
|
323
323
|
...e
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Xn(n) {
|
|
327
327
|
const {
|
|
328
328
|
anchor: e = ht,
|
|
329
329
|
cols: t = 1,
|
|
@@ -338,23 +338,23 @@ function $n(n) {
|
|
|
338
338
|
objects: d = () => null
|
|
339
339
|
} = n, l = [], f = [];
|
|
340
340
|
let v = 0, y = 0;
|
|
341
|
-
for (let
|
|
341
|
+
for (let T = 0; T < o; T++) {
|
|
342
342
|
const S = [];
|
|
343
343
|
v = 0;
|
|
344
|
-
let
|
|
344
|
+
let P = 0;
|
|
345
345
|
for (let E = 0; E < t; E++) {
|
|
346
|
-
const
|
|
347
|
-
S.push(
|
|
348
|
-
|
|
346
|
+
const L = d(T, E), I = typeof r == "function" ? r(T, E) : r, F = typeof h == "function" ? h(T, E) : h;
|
|
347
|
+
S.push(L), L != null && f.push(
|
|
348
|
+
x0([L], {
|
|
349
349
|
x: v,
|
|
350
350
|
y
|
|
351
351
|
})
|
|
352
|
-
), v += I + i,
|
|
352
|
+
), v += I + i, P = Math.max(P, F);
|
|
353
353
|
}
|
|
354
|
-
l.push(S), y +=
|
|
354
|
+
l.push(S), y += P + a;
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
|
-
grid:
|
|
357
|
+
grid: x0(f, {
|
|
358
358
|
x: c,
|
|
359
359
|
y: u,
|
|
360
360
|
height: y - a,
|
|
@@ -365,9 +365,9 @@ function $n(n) {
|
|
|
365
365
|
objects: l
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Gn(n = null) {
|
|
369
369
|
return lt({
|
|
370
|
-
objectType:
|
|
370
|
+
objectType: $.IMAGE,
|
|
371
371
|
anchor: ht,
|
|
372
372
|
cornerRadius: 0,
|
|
373
373
|
height: 100,
|
|
@@ -379,9 +379,9 @@ function Wn(n = null) {
|
|
|
379
379
|
...n
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Kn(n = null) {
|
|
383
383
|
return lt({
|
|
384
|
-
objectType:
|
|
384
|
+
objectType: $.LINE,
|
|
385
385
|
color: Q,
|
|
386
386
|
drawn: 1,
|
|
387
387
|
endX: 100,
|
|
@@ -394,9 +394,9 @@ function Yn(n = null) {
|
|
|
394
394
|
...n
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Vn(n, e = null) {
|
|
398
398
|
return lt({
|
|
399
|
-
objectType:
|
|
399
|
+
objectType: $.MASK,
|
|
400
400
|
anchor: ht,
|
|
401
401
|
height: 100,
|
|
402
402
|
objects: n,
|
|
@@ -407,29 +407,29 @@ function Xn(n, e = null) {
|
|
|
407
407
|
...e
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
var
|
|
411
|
-
const e = (n && n.length > 0 ? n : "M0,0").match(
|
|
410
|
+
var ye = Object.defineProperty, O = (n, e) => ye(n, "name", { value: e, configurable: !0 }), St = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, ve = /([astvzqmhlc])([^astvzqmhlc]*)/gi, we = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, me = O((n) => {
|
|
411
|
+
const e = (n && n.length > 0 ? n : "M0,0").match(ve);
|
|
412
412
|
if (!e) throw new Error(`No path elements found in string ${n}`);
|
|
413
413
|
return e.reduce((t, o) => {
|
|
414
|
-
let i = o.charAt(0), a = i.toLowerCase(), s =
|
|
414
|
+
let i = o.charAt(0), a = i.toLowerCase(), s = be(o.substring(1));
|
|
415
415
|
if (a === "m" && s.length > 2 && (t.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
|
|
416
416
|
const r = o.substring(1).trim().split(" ");
|
|
417
417
|
s = [Number(r[0]), Number(r[1]), Number(r[2]), Number(r[3].charAt(0)), Number(r[3].charAt(1)), Number(r[3].substring(2)), Number(r[4])];
|
|
418
418
|
}
|
|
419
419
|
for (; s.length >= 0; ) {
|
|
420
|
-
if (s.length ===
|
|
421
|
-
t.push([i, ...s.splice(0,
|
|
420
|
+
if (s.length === St[a]) {
|
|
421
|
+
t.push([i, ...s.splice(0, St[a])]);
|
|
422
422
|
break;
|
|
423
423
|
}
|
|
424
|
-
if (s.length <
|
|
425
|
-
t.push([i, ...s.splice(0,
|
|
424
|
+
if (s.length < St[a]) throw new Error(`Malformed path data: "${i}" must have ${St[a]} elements and has ${s.length}: ${o}`);
|
|
425
|
+
t.push([i, ...s.splice(0, St[a])]);
|
|
426
426
|
}
|
|
427
427
|
return t;
|
|
428
428
|
}, []);
|
|
429
|
-
}, "default"),
|
|
430
|
-
const e = n.match(
|
|
429
|
+
}, "default"), be = O((n) => {
|
|
430
|
+
const e = n.match(we);
|
|
431
431
|
return e ? e.map(Number) : [];
|
|
432
|
-
}, "parseValues"),
|
|
432
|
+
}, "parseValues"), bt, J = (bt = class {
|
|
433
433
|
constructor(e, t, o, i) {
|
|
434
434
|
k(this, "x0");
|
|
435
435
|
k(this, "x1");
|
|
@@ -452,7 +452,7 @@ var de = Object.defineProperty, O = (n, e) => de(n, "name", { value: e, configur
|
|
|
452
452
|
}, "getPropertiesAtLength"));
|
|
453
453
|
this.x0 = e, this.x1 = t, this.y0 = o, this.y1 = i;
|
|
454
454
|
}
|
|
455
|
-
}, O(
|
|
455
|
+
}, O(bt, "LinearPosition"), bt), At, y0 = (At = class {
|
|
456
456
|
constructor(e, t, o, i, a, s, r, h, c) {
|
|
457
457
|
k(this, "x0");
|
|
458
458
|
k(this, "y0");
|
|
@@ -467,7 +467,7 @@ var de = Object.defineProperty, O = (n, e) => de(n, "name", { value: e, configur
|
|
|
467
467
|
k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
|
|
468
468
|
k(this, "getPointAtLength", O((e) => {
|
|
469
469
|
e < 0 ? e = 0 : e > this.length && (e = this.length);
|
|
470
|
-
const t =
|
|
470
|
+
const t = v0({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
|
|
471
471
|
return { x: t.x, y: t.y };
|
|
472
472
|
}, "getPointAtLength"));
|
|
473
473
|
k(this, "getTangentAtLength", O((e) => {
|
|
@@ -483,69 +483,69 @@ var de = Object.defineProperty, O = (n, e) => de(n, "name", { value: e, configur
|
|
|
483
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
484
484
|
}, "getPropertiesAtLength"));
|
|
485
485
|
this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
|
|
486
|
-
const u =
|
|
487
|
-
return
|
|
486
|
+
const u = Ae(300, function(d) {
|
|
487
|
+
return v0({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
|
|
488
488
|
});
|
|
489
489
|
this.length = u.arcLength;
|
|
490
490
|
}
|
|
491
|
-
}, O(
|
|
492
|
-
e = Math.abs(e), t = Math.abs(t), o =
|
|
493
|
-
const h =
|
|
491
|
+
}, O(At, "Arc"), At), v0 = O((n, e, t, o, i, a, s, r) => {
|
|
492
|
+
e = Math.abs(e), t = Math.abs(t), o = Me(o, 360);
|
|
493
|
+
const h = Le(o);
|
|
494
494
|
if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
|
|
495
495
|
if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
|
|
496
496
|
const c = (n.x - s.x) / 2, u = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * u, y: -Math.sin(h) * c + Math.cos(h) * u }, l = Math.pow(d.x, 2) / Math.pow(e, 2) + Math.pow(d.y, 2) / Math.pow(t, 2);
|
|
497
497
|
l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
|
|
498
498
|
let f = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(d.y, 2) - Math.pow(t, 2) * Math.pow(d.x, 2)) / (Math.pow(e, 2) * Math.pow(d.y, 2) + Math.pow(t, 2) * Math.pow(d.x, 2));
|
|
499
499
|
f = f < 0 ? 0 : f;
|
|
500
|
-
const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * d.y / t), M = v * (-t * d.x / e),
|
|
501
|
-
let E =
|
|
500
|
+
const v = (i !== a ? 1 : -1) * Math.sqrt(f), y = v * (e * d.y / t), M = v * (-t * d.x / e), T = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, S = { x: (d.x - y) / e, y: (d.y - M) / t }, P = m0({ x: 1, y: 0 }, S);
|
|
501
|
+
let E = m0(S, { x: (-d.x - y) / e, y: (-d.y - M) / t });
|
|
502
502
|
!a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
|
|
503
|
-
const
|
|
504
|
-
return { x: Math.cos(h) * I - Math.sin(h) * F +
|
|
505
|
-
}, "pointOnEllipticalArc"),
|
|
503
|
+
const L = P + E * r, I = e * Math.cos(L), F = t * Math.sin(L);
|
|
504
|
+
return { x: Math.cos(h) * I - Math.sin(h) * F + T.x, y: Math.sin(h) * I + Math.cos(h) * F + T.y, ellipticalArcStartAngle: P, ellipticalArcEndAngle: P + E, ellipticalArcAngle: L, ellipticalArcCenter: T, resultantRx: e, resultantRy: t };
|
|
505
|
+
}, "pointOnEllipticalArc"), Ae = O((n, e) => {
|
|
506
506
|
n = n ?? 500;
|
|
507
507
|
let t = 0;
|
|
508
508
|
const o = [], i = [];
|
|
509
509
|
let a, s = e(0);
|
|
510
510
|
for (let r = 0; r < n; r++) {
|
|
511
|
-
const h =
|
|
512
|
-
a = e(h), t +=
|
|
511
|
+
const h = Te(r * (1 / n), 0, 1);
|
|
512
|
+
a = e(h), t += w0(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
|
|
513
513
|
}
|
|
514
|
-
return a = e(1), i.push([s, a]), t +=
|
|
515
|
-
}, "approximateArcLengthOfCurve"),
|
|
514
|
+
return a = e(1), i.push([s, a]), t += w0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
|
|
515
|
+
}, "approximateArcLengthOfCurve"), Me = O((n, e) => (n % e + e) % e, "mod"), Le = O((n) => n * (Math.PI / 180), "toRadians"), w0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), Te = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), m0 = O((n, e) => {
|
|
516
516
|
const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
|
|
517
517
|
return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
|
|
518
|
-
}, "angleBetween"), Me = [[], [], [-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]], Le = [[], [], [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]], Te = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], Ce = O((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), Pe = O((n, e, t) => H0([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"), Se = O((n, e, t) => {
|
|
518
|
+
}, "angleBetween"), Ce = [[], [], [-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]], Pe = [[], [], [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]], Se = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], Ee = O((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), Ie = O((n, e, t) => W0([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"), ke = O((n, e, t) => {
|
|
519
519
|
let o, i;
|
|
520
520
|
const a = t / 2;
|
|
521
521
|
o = 0;
|
|
522
|
-
for (let s = 0; s < 20; s++) i = a *
|
|
522
|
+
for (let s = 0; s < 20; s++) i = a * Ce[20][s] + a, o += Pe[20][s] * Y0(n, e, i);
|
|
523
523
|
return a * o;
|
|
524
|
-
}, "getCubicArcLength"),
|
|
524
|
+
}, "getCubicArcLength"), W0 = O((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), _e = O((n, e, t) => {
|
|
525
525
|
t === void 0 && (t = 1);
|
|
526
526
|
const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
527
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
528
528
|
const u = h / (2 * r), d = t + u, l = c / r - u * u, f = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, v = u * u + l > 0 ? Math.sqrt(u * u + l) : 0, y = u + Math.sqrt(u * u + l) !== 0 && (d + f) / (u + v) !== 0 ? l * Math.log(Math.abs((d + f) / (u + v))) : 0;
|
|
529
529
|
return Math.sqrt(r) / 2 * (d * f - u * v + y);
|
|
530
|
-
}, "getQuadraticArcLength"),
|
|
531
|
-
function
|
|
532
|
-
const o =
|
|
530
|
+
}, "getQuadraticArcLength"), Oe = O((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
|
|
531
|
+
function Y0(n, e, t) {
|
|
532
|
+
const o = Qt(1, t, n), i = Qt(1, t, e), a = o * o + i * i;
|
|
533
533
|
return Math.sqrt(a);
|
|
534
534
|
}
|
|
535
|
-
O(
|
|
536
|
-
var
|
|
535
|
+
O(Y0, "BFunc");
|
|
536
|
+
var Qt = O((n, e, t) => {
|
|
537
537
|
const o = t.length - 1;
|
|
538
538
|
let i, a;
|
|
539
539
|
if (o === 0) return 0;
|
|
540
540
|
if (n === 0) {
|
|
541
541
|
a = 0;
|
|
542
|
-
for (let s = 0; s <= o; s++) a +=
|
|
542
|
+
for (let s = 0; s <= o; s++) a += Se[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
543
543
|
return a;
|
|
544
544
|
}
|
|
545
545
|
i = new Array(o);
|
|
546
546
|
for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
|
|
547
|
-
return
|
|
548
|
-
}, "getDerivative"),
|
|
547
|
+
return Qt(n - 1, e, i);
|
|
548
|
+
}, "getDerivative"), qt = O((n, e, t) => {
|
|
549
549
|
let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
|
|
550
550
|
for (; o > 1e-3; ) {
|
|
551
551
|
const r = t(i + a), h = Math.abs(n - r) / e;
|
|
@@ -557,7 +557,7 @@ var Zt = O((n, e, t) => {
|
|
|
557
557
|
if (s++, s > 500) break;
|
|
558
558
|
}
|
|
559
559
|
return i;
|
|
560
|
-
}, "t2length"),
|
|
560
|
+
}, "t2length"), Mt, ct = (Mt = class {
|
|
561
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
562
562
|
k(this, "a");
|
|
563
563
|
k(this, "b");
|
|
@@ -569,16 +569,16 @@ var Zt = O((n, e, t) => {
|
|
|
569
569
|
k(this, "getDerivative");
|
|
570
570
|
k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
|
|
571
571
|
k(this, "getPointAtLength", O((e) => {
|
|
572
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
572
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = qt(e, this.length, (a) => this.getArcLength(t, o, a));
|
|
573
573
|
return this.getPoint(t, o, i);
|
|
574
574
|
}, "getPointAtLength"));
|
|
575
575
|
k(this, "getTangentAtLength", O((e) => {
|
|
576
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
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 = qt(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
577
577
|
let r;
|
|
578
578
|
return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
|
|
579
579
|
}, "getTangentAtLength"));
|
|
580
580
|
k(this, "getPropertiesAtLength", O((e) => {
|
|
581
|
-
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i =
|
|
581
|
+
const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = qt(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
|
|
582
582
|
let r;
|
|
583
583
|
r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
|
|
584
584
|
const h = this.getPoint(t, o, i);
|
|
@@ -586,9 +586,9 @@ var Zt = O((n, e, t) => {
|
|
|
586
586
|
}, "getPropertiesAtLength"));
|
|
587
587
|
k(this, "getC", O(() => this.c, "getC"));
|
|
588
588
|
k(this, "getD", O(() => this.d, "getD"));
|
|
589
|
-
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength =
|
|
589
|
+
this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = ke, this.getPoint = Ee, this.getDerivative = Ie, this.d = { x: r, y: h }) : (this.getArcLength = _e, this.getPoint = W0, this.getDerivative = Oe, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
|
|
590
590
|
}
|
|
591
|
-
}, O(
|
|
591
|
+
}, O(Mt, "Bezier"), Mt), Lt, Ne = (Lt = class {
|
|
592
592
|
constructor(e) {
|
|
593
593
|
k(this, "length", 0);
|
|
594
594
|
k(this, "partial_lengths", []);
|
|
@@ -628,7 +628,7 @@ var Zt = O((n, e, t) => {
|
|
|
628
628
|
}
|
|
629
629
|
return e;
|
|
630
630
|
}, "getParts"));
|
|
631
|
-
const t = Array.isArray(e) ? e :
|
|
631
|
+
const t = Array.isArray(e) ? e : me(e);
|
|
632
632
|
let o, i = [0, 0], a = [0, 0], s = [0, 0];
|
|
633
633
|
for (let r = 0; r < t.length; r++) {
|
|
634
634
|
if (t[r][0] === "M") i = [t[r][1], t[r][2]], s = [i[0], i[1]], this.functions.push(null), r === 0 && (this.initial_point = { x: t[r][1], y: t[r][2] });
|
|
@@ -686,16 +686,16 @@ var Zt = O((n, e, t) => {
|
|
|
686
686
|
}
|
|
687
687
|
a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1] + i[0], t[r][2] + i[1]];
|
|
688
688
|
} else if (t[r][0] === "A") {
|
|
689
|
-
const h = new
|
|
689
|
+
const h = new y0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
|
|
690
690
|
this.length += h.getTotalLength(), i = [t[r][6], t[r][7]], this.functions.push(h);
|
|
691
691
|
} else if (t[r][0] === "a") {
|
|
692
|
-
const h = new
|
|
692
|
+
const h = new y0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
|
|
693
693
|
this.length += h.getTotalLength(), i = [i[0] + t[r][6], i[1] + t[r][7]], this.functions.push(h);
|
|
694
694
|
}
|
|
695
695
|
this.partial_lengths.push(this.length);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
}, O(
|
|
698
|
+
}, O(Lt, "SVGPathProperties"), Lt), Tt, Jt = (Tt = class {
|
|
699
699
|
constructor(e) {
|
|
700
700
|
k(this, "inst");
|
|
701
701
|
k(this, "getTotalLength", O(() => this.inst.getTotalLength(), "getTotalLength"));
|
|
@@ -703,20 +703,20 @@ var Zt = O((n, e, t) => {
|
|
|
703
703
|
k(this, "getTangentAtLength", O((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
704
|
k(this, "getPropertiesAtLength", O((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
705
|
k(this, "getParts", O(() => this.inst.getParts(), "getParts"));
|
|
706
|
-
if (this.inst = new
|
|
706
|
+
if (this.inst = new Ne(e), !(this instanceof Jt)) return new Jt(e);
|
|
707
707
|
}
|
|
708
|
-
}, O(
|
|
709
|
-
function
|
|
708
|
+
}, O(Tt, "_svgPathProperties"), Tt);
|
|
709
|
+
function Re(n = G.BLACK) {
|
|
710
710
|
return { ...n, alpha: 0 };
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new
|
|
712
|
+
function Zn(n = null) {
|
|
713
|
+
const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new Jt(r).getTotalLength();
|
|
714
714
|
return lt({
|
|
715
|
-
objectType:
|
|
715
|
+
objectType: $.PATH,
|
|
716
716
|
anchor: ht,
|
|
717
717
|
strokeColor: Q,
|
|
718
718
|
drawn: 1,
|
|
719
|
-
fillColor:
|
|
719
|
+
fillColor: Re(),
|
|
720
720
|
isRounded: !1,
|
|
721
721
|
height: t,
|
|
722
722
|
path: r,
|
|
@@ -730,9 +730,9 @@ function Gn(n = null) {
|
|
|
730
730
|
...s
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function Qn(n = null) {
|
|
734
734
|
return lt({
|
|
735
|
-
objectType:
|
|
735
|
+
objectType: $.POLYGON,
|
|
736
736
|
strokeColor: Q,
|
|
737
737
|
strokeWidth: 0,
|
|
738
738
|
drawn: 1,
|
|
@@ -745,9 +745,9 @@ function Kn(n = null) {
|
|
|
745
745
|
...n
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Jn(n = null) {
|
|
749
749
|
return lt({
|
|
750
|
-
objectType:
|
|
750
|
+
objectType: $.RECTANGLE,
|
|
751
751
|
anchor: ht,
|
|
752
752
|
strokeColor: Q,
|
|
753
753
|
strokeWidth: 0,
|
|
@@ -761,9 +761,9 @@ function Vn(n = null) {
|
|
|
761
761
|
...n
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function tr(n = null) {
|
|
765
765
|
return lt({
|
|
766
|
-
objectType:
|
|
766
|
+
objectType: $.SVG,
|
|
767
767
|
anchor: ht,
|
|
768
768
|
height: 100,
|
|
769
769
|
svg: "",
|
|
@@ -773,11 +773,11 @@ function Zn(n = null) {
|
|
|
773
773
|
...n
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
const
|
|
776
|
+
const Fe = {
|
|
777
777
|
NORMAL: "normal",
|
|
778
778
|
ITALIC: "italic",
|
|
779
779
|
OBLIQUE: "oblique"
|
|
780
|
-
},
|
|
780
|
+
}, Be = Fe.NORMAL, De = {
|
|
781
781
|
THIN: 100,
|
|
782
782
|
EXTRA_LIGHT: 200,
|
|
783
783
|
LIGHT: 300,
|
|
@@ -787,80 +787,113 @@ const Oe = {
|
|
|
787
787
|
BOLD: 700,
|
|
788
788
|
EXTRA_BOLD: 800,
|
|
789
789
|
BLACK: 900
|
|
790
|
-
},
|
|
790
|
+
}, qe = De.NORMAL, ze = {
|
|
791
791
|
color: Q,
|
|
792
792
|
fontFamily: "sans-serif",
|
|
793
793
|
fontSize: 100,
|
|
794
|
-
fontStyle:
|
|
795
|
-
fontWeight:
|
|
794
|
+
fontStyle: Be,
|
|
795
|
+
fontWeight: qe,
|
|
796
796
|
ligatures: !1,
|
|
797
797
|
subscript: !1,
|
|
798
798
|
superscript: !1
|
|
799
799
|
};
|
|
800
|
-
function
|
|
800
|
+
function X0(n) {
|
|
801
801
|
return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
return
|
|
803
|
+
function He(n) {
|
|
804
|
+
return X0(n).reduce(
|
|
805
805
|
(t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
|
|
806
806
|
0
|
|
807
807
|
);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function je(n = "", e = null) {
|
|
810
810
|
return lt({
|
|
811
|
-
objectType:
|
|
812
|
-
alignment:
|
|
811
|
+
objectType: $.TEXT,
|
|
812
|
+
alignment: pe,
|
|
813
813
|
anchor: ht,
|
|
814
814
|
length: null,
|
|
815
815
|
lineSpacing: 1,
|
|
816
816
|
text: n,
|
|
817
817
|
x: 0,
|
|
818
818
|
y: 0,
|
|
819
|
-
...
|
|
819
|
+
...ze,
|
|
820
820
|
...e
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
|
|
823
|
+
je.writeOn = (n, e = {}) => a0(
|
|
824
824
|
n,
|
|
825
825
|
{
|
|
826
|
-
length:
|
|
826
|
+
length: He(n.text)
|
|
827
827
|
},
|
|
828
828
|
e
|
|
829
829
|
);
|
|
830
|
-
const
|
|
831
|
-
|
|
830
|
+
const h0 = "presenter.navigator.state", mt = {
|
|
831
|
+
open: !1,
|
|
832
|
+
visibility: {
|
|
833
|
+
slides: !0,
|
|
834
|
+
current: !0,
|
|
835
|
+
next: !0
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
function l0() {
|
|
832
839
|
return typeof document > "u" ? !1 : Array.from(document.scripts).some((n) => n.src.includes("/@vite/client"));
|
|
833
840
|
}
|
|
834
|
-
function
|
|
835
|
-
|
|
836
|
-
return W0() ? ((n = h0()) == null ? void 0 : n.getItem(a0)) === "true" : !1;
|
|
841
|
+
function Ue() {
|
|
842
|
+
return l0() ? c0().open : !1;
|
|
837
843
|
}
|
|
838
|
-
function
|
|
839
|
-
|
|
840
|
-
|
|
844
|
+
function $e() {
|
|
845
|
+
K0({
|
|
846
|
+
...c0(),
|
|
847
|
+
open: !0
|
|
848
|
+
});
|
|
841
849
|
}
|
|
842
|
-
function
|
|
850
|
+
function G0() {
|
|
843
851
|
var n;
|
|
844
|
-
(n =
|
|
852
|
+
(n = u0()) == null || n.removeItem(h0);
|
|
845
853
|
}
|
|
846
|
-
function
|
|
854
|
+
function c0() {
|
|
855
|
+
var n, e, t, o;
|
|
856
|
+
if (!l0())
|
|
857
|
+
return mt;
|
|
858
|
+
try {
|
|
859
|
+
const i = (n = u0()) == null ? void 0 : n.getItem(h0);
|
|
860
|
+
if (i == null)
|
|
861
|
+
return mt;
|
|
862
|
+
const a = JSON.parse(i);
|
|
863
|
+
return {
|
|
864
|
+
open: typeof a.open == "boolean" ? a.open : mt.open,
|
|
865
|
+
visibility: {
|
|
866
|
+
slides: typeof ((e = a.visibility) == null ? void 0 : e.slides) == "boolean" ? a.visibility.slides : mt.visibility.slides,
|
|
867
|
+
current: typeof ((t = a.visibility) == null ? void 0 : t.current) == "boolean" ? a.visibility.current : mt.visibility.current,
|
|
868
|
+
next: typeof ((o = a.visibility) == null ? void 0 : o.next) == "boolean" ? a.visibility.next : mt.visibility.next
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
} catch {
|
|
872
|
+
return mt;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
function K0(n) {
|
|
876
|
+
var e;
|
|
877
|
+
l0() && ((e = u0()) == null || e.setItem(h0, JSON.stringify(n)));
|
|
878
|
+
}
|
|
879
|
+
function u0() {
|
|
847
880
|
try {
|
|
848
881
|
return window.sessionStorage;
|
|
849
882
|
} catch {
|
|
850
883
|
return null;
|
|
851
884
|
}
|
|
852
885
|
}
|
|
853
|
-
function
|
|
886
|
+
function V0(n) {
|
|
854
887
|
return n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
|
|
855
888
|
}
|
|
856
|
-
function
|
|
889
|
+
function b0(n) {
|
|
857
890
|
var o, i;
|
|
858
891
|
if (n === null)
|
|
859
892
|
return !1;
|
|
860
893
|
const e = n, t = (o = e.tagName) == null ? void 0 : o.toLowerCase();
|
|
861
894
|
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;
|
|
862
895
|
}
|
|
863
|
-
function
|
|
896
|
+
function We(n) {
|
|
864
897
|
var o;
|
|
865
898
|
const { slides: e } = n, t = {
|
|
866
899
|
// First build of first slide
|
|
@@ -878,20 +911,20 @@ function He(n) {
|
|
|
878
911
|
if (a === void 0)
|
|
879
912
|
continue;
|
|
880
913
|
const s = a.shortcut;
|
|
881
|
-
|
|
914
|
+
zt(t, s, i, 0);
|
|
882
915
|
for (let r = 0; r < a.animations.length; r++) {
|
|
883
916
|
const h = a.animations[r];
|
|
884
917
|
if (h !== void 0)
|
|
885
918
|
if (Array.isArray(h))
|
|
886
919
|
for (const c of h)
|
|
887
|
-
|
|
920
|
+
zt(t, c.shortcut, i, r + 1);
|
|
888
921
|
else
|
|
889
|
-
|
|
922
|
+
zt(t, h.shortcut, i, r + 1);
|
|
890
923
|
}
|
|
891
924
|
}
|
|
892
925
|
return t;
|
|
893
926
|
}
|
|
894
|
-
function
|
|
927
|
+
function zt(n, e, t, o) {
|
|
895
928
|
if (e !== null)
|
|
896
929
|
if (Array.isArray(e))
|
|
897
930
|
for (const i of e)
|
|
@@ -899,17 +932,17 @@ function qt(n, e, t, o) {
|
|
|
899
932
|
else
|
|
900
933
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
901
934
|
}
|
|
902
|
-
function
|
|
935
|
+
function A0(n, e) {
|
|
903
936
|
const t = n[e];
|
|
904
937
|
return t !== void 0 ? t : isNaN(Number(e)) ? null : { slideIndex: Number(e) - 1, buildIndex: 0 };
|
|
905
938
|
}
|
|
906
|
-
function
|
|
907
|
-
t.shortcuts =
|
|
939
|
+
function Z0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }, { focusOnPointerDown: r = !1, keyEventTarget: h = e, signal: c } = {}) {
|
|
940
|
+
t.shortcuts = We(n);
|
|
908
941
|
const u = c === void 0 ? void 0 : { signal: c };
|
|
909
942
|
r && (e.hasAttribute("tabindex") || (e.tabIndex = -1), e.addEventListener(
|
|
910
943
|
"pointerdown",
|
|
911
944
|
(d) => {
|
|
912
|
-
|
|
945
|
+
b0(d.target) || e.focus({ preventScroll: !0 });
|
|
913
946
|
},
|
|
914
947
|
u
|
|
915
948
|
)), e.addEventListener(
|
|
@@ -922,7 +955,7 @@ function G0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
922
955
|
"keyup",
|
|
923
956
|
(d) => {
|
|
924
957
|
const l = d;
|
|
925
|
-
if (
|
|
958
|
+
if (b0(l.target))
|
|
926
959
|
return;
|
|
927
960
|
if (l.code === "Escape") {
|
|
928
961
|
t.textCommand = null;
|
|
@@ -936,9 +969,9 @@ function G0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
936
969
|
i(l.shiftKey);
|
|
937
970
|
return;
|
|
938
971
|
}
|
|
939
|
-
const f =
|
|
972
|
+
const f = Ye(l);
|
|
940
973
|
if (f !== null) {
|
|
941
|
-
const v =
|
|
974
|
+
const v = A0(
|
|
942
975
|
t.shortcuts,
|
|
943
976
|
f
|
|
944
977
|
);
|
|
@@ -949,7 +982,7 @@ function G0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
949
982
|
if (l.code === "Enter") {
|
|
950
983
|
const v = t.textCommand;
|
|
951
984
|
t.textCommand = null;
|
|
952
|
-
const y =
|
|
985
|
+
const y = A0(
|
|
953
986
|
t.shortcuts,
|
|
954
987
|
v
|
|
955
988
|
);
|
|
@@ -962,7 +995,7 @@ function G0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
962
995
|
t.textCommand = "";
|
|
963
996
|
return;
|
|
964
997
|
}
|
|
965
|
-
if (l.key === "`" && !
|
|
998
|
+
if (l.key === "`" && !V0(l)) {
|
|
966
999
|
s();
|
|
967
1000
|
return;
|
|
968
1001
|
}
|
|
@@ -970,18 +1003,18 @@ function G0(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
|
|
|
970
1003
|
u
|
|
971
1004
|
);
|
|
972
1005
|
}
|
|
973
|
-
function
|
|
1006
|
+
function Ye(n) {
|
|
974
1007
|
return !n.altKey || n.ctrlKey || n.metaKey || n.shiftKey ? null : n.code.startsWith("Key") && n.code.length === 4 ? n.code.slice(3).toLowerCase() : n.code.startsWith("Digit") && n.code.length === 6 ? n.code.slice(5) : n.code.startsWith("Numpad") && n.code.length === 7 ? n.code.slice(6) : null;
|
|
975
1008
|
}
|
|
976
|
-
let R = null,
|
|
977
|
-
const
|
|
978
|
-
let
|
|
1009
|
+
let R = null, Nt = null, yt = null;
|
|
1010
|
+
const M0 = "__presenterNavigatorInstanceId";
|
|
1011
|
+
let Q0 = {
|
|
979
1012
|
width: 700,
|
|
980
1013
|
height: 680,
|
|
981
1014
|
left: 20,
|
|
982
1015
|
top: 50
|
|
983
1016
|
};
|
|
984
|
-
function
|
|
1017
|
+
function Xe({
|
|
985
1018
|
presentation: n,
|
|
986
1019
|
shortcutState: e,
|
|
987
1020
|
onNavigateToSlide: t,
|
|
@@ -990,20 +1023,20 @@ function $e({
|
|
|
990
1023
|
onPrevious: a,
|
|
991
1024
|
forceRefresh: s = !1
|
|
992
1025
|
}) {
|
|
993
|
-
if (R !== null && !R.closed && (
|
|
994
|
-
return R.focus(),
|
|
995
|
-
if ((R === null || R.closed) && (R = window.open("", "Navigator",
|
|
1026
|
+
if (R !== null && !R.closed && (Rt(R), !s))
|
|
1027
|
+
return R.focus(), Nt;
|
|
1028
|
+
if ((R === null || R.closed) && (R = window.open("", "Navigator", Ze())), R === null)
|
|
996
1029
|
return console.error("Failed to open navigator window."), null;
|
|
997
1030
|
yt == null || yt();
|
|
998
|
-
const r =
|
|
1031
|
+
const r = Qe(R), h = new AbortController();
|
|
999
1032
|
yt = () => h.abort();
|
|
1000
|
-
const c =
|
|
1033
|
+
const c = Ge(
|
|
1001
1034
|
n,
|
|
1002
1035
|
t,
|
|
1003
1036
|
i,
|
|
1004
1037
|
r.isActive
|
|
1005
1038
|
);
|
|
1006
|
-
return
|
|
1039
|
+
return Nt = c, $e(), R.document.title = n.title, R.document.body.replaceChildren(c.element), Z0(
|
|
1007
1040
|
n,
|
|
1008
1041
|
c.element,
|
|
1009
1042
|
e,
|
|
@@ -1018,19 +1051,19 @@ function $e({
|
|
|
1018
1051
|
r.isActive() && o(u, d);
|
|
1019
1052
|
},
|
|
1020
1053
|
onShowNavigator: () => {
|
|
1021
|
-
r.isActive() &&
|
|
1054
|
+
r.isActive() && t0();
|
|
1022
1055
|
}
|
|
1023
1056
|
},
|
|
1024
1057
|
{
|
|
1025
1058
|
keyEventTarget: R,
|
|
1026
1059
|
signal: h.signal
|
|
1027
1060
|
}
|
|
1028
|
-
), R.addEventListener("resize", () =>
|
|
1061
|
+
), R.addEventListener("resize", () => Rt(R), {
|
|
1029
1062
|
signal: h.signal
|
|
1030
1063
|
}), R.addEventListener(
|
|
1031
1064
|
"beforeunload",
|
|
1032
1065
|
() => {
|
|
1033
|
-
|
|
1066
|
+
Rt(R), G0();
|
|
1034
1067
|
},
|
|
1035
1068
|
{
|
|
1036
1069
|
signal: h.signal
|
|
@@ -1038,14 +1071,14 @@ function $e({
|
|
|
1038
1071
|
), R.addEventListener(
|
|
1039
1072
|
"keyup",
|
|
1040
1073
|
(u) => {
|
|
1041
|
-
r.isActive() && (u.key === "Escape" || u.key === "`" && !
|
|
1074
|
+
r.isActive() && (u.key === "Escape" || u.key === "`" && !V0(u)) && t0();
|
|
1042
1075
|
},
|
|
1043
1076
|
{
|
|
1044
1077
|
signal: h.signal
|
|
1045
1078
|
}
|
|
1046
|
-
),
|
|
1079
|
+
), Nt;
|
|
1047
1080
|
}
|
|
1048
|
-
function
|
|
1081
|
+
function Ge(n, e, t, o = () => !0) {
|
|
1049
1082
|
const i = (R == null ? void 0 : R.document) ?? document, a = i.createElement("div");
|
|
1050
1083
|
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";
|
|
1051
1084
|
const s = i.createElement("div");
|
|
@@ -1056,34 +1089,50 @@ function We(n, e, t, o = () => !0) {
|
|
|
1056
1089
|
h.style.display = "flex", h.style.gap = "14px", h.style.alignItems = "center", h.style.flexWrap = "wrap", h.style.fontSize = "13px", h.style.color = "#4b5563";
|
|
1057
1090
|
const c = i.createElement("div");
|
|
1058
1091
|
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";
|
|
1059
|
-
const u =
|
|
1092
|
+
const u = L0("Current", n), d = L0("Next", n), l = c0();
|
|
1060
1093
|
d.container.style.cursor = "pointer", d.container.addEventListener("click", () => {
|
|
1061
1094
|
o() && t();
|
|
1062
1095
|
});
|
|
1063
|
-
const
|
|
1064
|
-
const
|
|
1065
|
-
return
|
|
1066
|
-
o() && (
|
|
1067
|
-
}), s.appendChild(
|
|
1068
|
-
}),
|
|
1069
|
-
|
|
1070
|
-
|
|
1096
|
+
const f = n.slides.map((E, L) => {
|
|
1097
|
+
const I = Ke(E, L);
|
|
1098
|
+
return I.style.cursor = "pointer", I.addEventListener("click", (F) => {
|
|
1099
|
+
o() && (F.shiftKey && t0(), e(L));
|
|
1100
|
+
}), s.appendChild(I), I;
|
|
1101
|
+
}), v = Ht("Slides", s, l.visibility.slides), y = Ht(
|
|
1102
|
+
"Current",
|
|
1103
|
+
u.container,
|
|
1104
|
+
l.visibility.current
|
|
1105
|
+
), M = Ht(
|
|
1106
|
+
"Next",
|
|
1107
|
+
d.container,
|
|
1108
|
+
l.visibility.next
|
|
1109
|
+
), T = () => {
|
|
1110
|
+
const E = y.input.checked && M.input.checked && P();
|
|
1111
|
+
a.style.gridTemplateColumns = v.input.checked ? "260px 1fr" : "1fr", c.style.flexDirection = E ? "column" : "row", u.container.style.flex = "1 1 0", d.container.style.flex = "1 1 0", requestAnimationFrame(() => {
|
|
1071
1112
|
u.resize(), d.resize();
|
|
1113
|
+
}), K0({
|
|
1114
|
+
...l,
|
|
1115
|
+
open: !0,
|
|
1116
|
+
visibility: {
|
|
1117
|
+
slides: v.input.checked,
|
|
1118
|
+
current: y.input.checked,
|
|
1119
|
+
next: M.input.checked
|
|
1120
|
+
}
|
|
1072
1121
|
});
|
|
1073
1122
|
};
|
|
1074
|
-
|
|
1075
|
-
function
|
|
1076
|
-
o() && (
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
}), u.label.textContent =
|
|
1080
|
-
}
|
|
1081
|
-
function
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1123
|
+
v.input.addEventListener("change", T), y.input.addEventListener("change", T), M.input.addEventListener("change", T), R == null || R.addEventListener("resize", T), h.appendChild(v.element), h.appendChild(y.element), h.appendChild(M.element), c.appendChild(u.container), c.appendChild(d.container), r.appendChild(h), r.appendChild(c), a.appendChild(s), a.appendChild(r);
|
|
1124
|
+
function S(E, L, I, F) {
|
|
1125
|
+
o() && (f.forEach((X, z) => {
|
|
1126
|
+
const U = z === E;
|
|
1127
|
+
X.style.backgroundColor = U ? "#dbeafe" : "#ffffff", X.style.borderColor = U ? "#60a5fa" : "#e5e7eb", X.style.color = U ? "#1e3a8a" : "#1f2937";
|
|
1128
|
+
}), u.label.textContent = T0(n, E, L), d.label.textContent = T0(n, I, F), Ve(f[E], s), T());
|
|
1129
|
+
}
|
|
1130
|
+
function P() {
|
|
1131
|
+
const E = R;
|
|
1132
|
+
if (E === null)
|
|
1084
1133
|
return !1;
|
|
1085
|
-
const
|
|
1086
|
-
return
|
|
1134
|
+
const L = v.input.checked ? 278 : 0, I = E.innerWidth - 36 - L, F = E.innerHeight - 36 - h.offsetHeight - 14;
|
|
1135
|
+
return I <= 0 || F <= 0 ? !1 : I / F < 1.1;
|
|
1087
1136
|
}
|
|
1088
1137
|
return {
|
|
1089
1138
|
element: a,
|
|
@@ -1092,10 +1141,10 @@ function We(n, e, t, o = () => !0) {
|
|
|
1092
1141
|
currentLabel: u.label,
|
|
1093
1142
|
nextLabel: d.label,
|
|
1094
1143
|
isOpen: () => R !== null && !R.closed,
|
|
1095
|
-
update:
|
|
1144
|
+
update: S
|
|
1096
1145
|
};
|
|
1097
1146
|
}
|
|
1098
|
-
function
|
|
1147
|
+
function Ke(n, e) {
|
|
1099
1148
|
const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
|
|
1100
1149
|
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";
|
|
1101
1150
|
const i = t.createElement("div");
|
|
@@ -1103,7 +1152,7 @@ function Ye(n, e) {
|
|
|
1103
1152
|
const a = t.createElement("div");
|
|
1104
1153
|
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;
|
|
1105
1154
|
}
|
|
1106
|
-
function
|
|
1155
|
+
function L0(n, e) {
|
|
1107
1156
|
var u;
|
|
1108
1157
|
const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
|
|
1109
1158
|
o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
|
|
@@ -1125,46 +1174,46 @@ function b0(n, e) {
|
|
|
1125
1174
|
const c = (u = t.defaultView) == null ? void 0 : u.ResizeObserver;
|
|
1126
1175
|
return c !== void 0 && new c(h).observe(s), R == null || R.addEventListener("resize", h), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: h };
|
|
1127
1176
|
}
|
|
1128
|
-
function
|
|
1177
|
+
function Ht(n, e, t) {
|
|
1129
1178
|
const o = (R == null ? void 0 : R.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
|
|
1130
1179
|
a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
|
|
1131
1180
|
const s = o.createElement("input");
|
|
1132
|
-
return s.type = "checkbox", s.checked = t, s.addEventListener("change", () => {
|
|
1181
|
+
return s.type = "checkbox", s.checked = t, e.style.display = t ? i : "none", s.addEventListener("change", () => {
|
|
1133
1182
|
e.style.display = s.checked ? i : "none";
|
|
1134
1183
|
}), a.appendChild(s), a.appendChild(o.createTextNode(n)), { element: a, input: s };
|
|
1135
1184
|
}
|
|
1136
|
-
function
|
|
1185
|
+
function T0(n, e, t) {
|
|
1137
1186
|
if (e === null)
|
|
1138
1187
|
return "End of presentation";
|
|
1139
1188
|
const o = n.slides[e];
|
|
1140
1189
|
return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
|
|
1141
1190
|
}
|
|
1142
|
-
function
|
|
1191
|
+
function Ve(n, e) {
|
|
1143
1192
|
if (n === void 0)
|
|
1144
1193
|
return;
|
|
1145
1194
|
const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
|
|
1146
1195
|
(t < i || o > a) && n.scrollIntoView({ block: "nearest" });
|
|
1147
1196
|
}
|
|
1148
|
-
function
|
|
1149
|
-
|
|
1197
|
+
function t0() {
|
|
1198
|
+
Rt(R), G0(), yt == null || yt(), R == null || R.close(), R = null, Nt = null, yt = null;
|
|
1150
1199
|
}
|
|
1151
|
-
function
|
|
1152
|
-
const { width: n, height: e, left: t, top: o } =
|
|
1200
|
+
function Ze() {
|
|
1201
|
+
const { width: n, height: e, left: t, top: o } = Q0;
|
|
1153
1202
|
return `width=${n},height=${e},left=${t},top=${o}`;
|
|
1154
1203
|
}
|
|
1155
|
-
function
|
|
1156
|
-
n === null || n.closed || (
|
|
1204
|
+
function Rt(n) {
|
|
1205
|
+
n === null || n.closed || (Q0 = {
|
|
1157
1206
|
width: n.outerWidth,
|
|
1158
1207
|
height: n.outerHeight,
|
|
1159
1208
|
left: n.screenX,
|
|
1160
1209
|
top: n.screenY
|
|
1161
1210
|
});
|
|
1162
1211
|
}
|
|
1163
|
-
function
|
|
1212
|
+
function Qe(n) {
|
|
1164
1213
|
var o;
|
|
1165
1214
|
const e = typeof ((o = globalThis.crypto) == null ? void 0 : o.randomUUID) == "function" ? globalThis.crypto.randomUUID() : `${Date.now()}-${Math.random()}`, t = n;
|
|
1166
|
-
return t[
|
|
1167
|
-
isActive: () => !n.closed && t[
|
|
1215
|
+
return t[M0] = e, {
|
|
1216
|
+
isActive: () => !n.closed && t[M0] === e
|
|
1168
1217
|
};
|
|
1169
1218
|
}
|
|
1170
1219
|
function at(n = null) {
|
|
@@ -1174,8 +1223,8 @@ function at(n = null) {
|
|
|
1174
1223
|
...n
|
|
1175
1224
|
};
|
|
1176
1225
|
}
|
|
1177
|
-
const
|
|
1178
|
-
function
|
|
1226
|
+
const Je = at({ width: 0, height: 0 });
|
|
1227
|
+
function t1(n = null) {
|
|
1179
1228
|
return {
|
|
1180
1229
|
backgroundColor: G.WHITE,
|
|
1181
1230
|
slides: [],
|
|
@@ -1187,7 +1236,7 @@ function Ze(n = null) {
|
|
|
1187
1236
|
...n
|
|
1188
1237
|
};
|
|
1189
1238
|
}
|
|
1190
|
-
function
|
|
1239
|
+
function e1(n) {
|
|
1191
1240
|
const e = Array.isArray(n) ? n : [n];
|
|
1192
1241
|
let t = 0, o = 0;
|
|
1193
1242
|
for (const i of e)
|
|
@@ -1205,26 +1254,26 @@ function Qe(n) {
|
|
|
1205
1254
|
}
|
|
1206
1255
|
return o;
|
|
1207
1256
|
}
|
|
1208
|
-
function
|
|
1209
|
-
const { red: t, green: o, blue: i } = n, a =
|
|
1257
|
+
function f0(n, e = null) {
|
|
1258
|
+
const { red: t, green: o, blue: i } = n, a = $0(n, e);
|
|
1210
1259
|
return `rgba(${t}, ${o}, ${i}, ${a})`;
|
|
1211
1260
|
}
|
|
1212
|
-
function
|
|
1261
|
+
function J0(n) {
|
|
1213
1262
|
return n === document.body;
|
|
1214
1263
|
}
|
|
1215
|
-
function
|
|
1264
|
+
function n1(n, e) {
|
|
1216
1265
|
const t = document.createElement("div");
|
|
1217
|
-
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative",
|
|
1266
|
+
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", J0(e)) {
|
|
1218
1267
|
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";
|
|
1219
1268
|
const o = n.size.height / n.size.width;
|
|
1220
|
-
|
|
1269
|
+
C0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => C0(t, o));
|
|
1221
1270
|
}
|
|
1222
1271
|
return t;
|
|
1223
1272
|
}
|
|
1224
|
-
function
|
|
1273
|
+
function C0(n, e) {
|
|
1225
1274
|
window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
|
|
1226
1275
|
}
|
|
1227
|
-
const
|
|
1276
|
+
const r1 = {
|
|
1228
1277
|
check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
|
|
1229
1278
|
interpolate: (n, e, t) => ({
|
|
1230
1279
|
red: Math.round(n.red + (e.red - n.red) * t),
|
|
@@ -1232,23 +1281,23 @@ const t1 = {
|
|
|
1232
1281
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
1233
1282
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
1234
1283
|
})
|
|
1235
|
-
},
|
|
1284
|
+
}, i1 = {
|
|
1236
1285
|
check: (n) => !0,
|
|
1237
1286
|
interpolate: (n, e) => e
|
|
1238
|
-
},
|
|
1287
|
+
}, o1 = {
|
|
1239
1288
|
check: (n) => typeof n == "number",
|
|
1240
1289
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
1241
|
-
},
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1290
|
+
}, P0 = [
|
|
1291
|
+
o1,
|
|
1292
|
+
r1,
|
|
1293
|
+
i1
|
|
1245
1294
|
];
|
|
1246
|
-
function
|
|
1295
|
+
function s1(n, e, t, o = null) {
|
|
1247
1296
|
if (t === 0)
|
|
1248
1297
|
return n;
|
|
1249
1298
|
if (t === 1)
|
|
1250
1299
|
return { ...n, ...e };
|
|
1251
|
-
const i = o != null ? [...o, ...
|
|
1300
|
+
const i = o != null ? [...o, ...P0] : P0, a = {};
|
|
1252
1301
|
for (const s in e) {
|
|
1253
1302
|
const r = n[s], h = e[s];
|
|
1254
1303
|
for (const c of i)
|
|
@@ -1263,7 +1312,7 @@ function r1(n, e, t, o = null) {
|
|
|
1263
1312
|
}
|
|
1264
1313
|
return { ...n, ...a };
|
|
1265
1314
|
}
|
|
1266
|
-
function
|
|
1315
|
+
function S0(n, e, t = null) {
|
|
1267
1316
|
if (e === null)
|
|
1268
1317
|
return;
|
|
1269
1318
|
const o = Array.isArray(e) ? e : [e];
|
|
@@ -1285,7 +1334,7 @@ function T0(n, e, t = null) {
|
|
|
1285
1334
|
);
|
|
1286
1335
|
n.set(a.object, {
|
|
1287
1336
|
...s,
|
|
1288
|
-
...
|
|
1337
|
+
...s1(
|
|
1289
1338
|
s,
|
|
1290
1339
|
a.props,
|
|
1291
1340
|
a.easing(h),
|
|
@@ -1312,10 +1361,10 @@ function T0(n, e, t = null) {
|
|
|
1312
1361
|
}
|
|
1313
1362
|
}
|
|
1314
1363
|
}
|
|
1315
|
-
function
|
|
1364
|
+
function te(n) {
|
|
1316
1365
|
return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
|
|
1317
1366
|
}
|
|
1318
|
-
function
|
|
1367
|
+
function a1({
|
|
1319
1368
|
slide: n,
|
|
1320
1369
|
buildIndex: e,
|
|
1321
1370
|
buildTime: t
|
|
@@ -1323,7 +1372,7 @@ function i1({
|
|
|
1323
1372
|
const o = /* @__PURE__ */ new Map();
|
|
1324
1373
|
function i(s) {
|
|
1325
1374
|
o.set(s, s);
|
|
1326
|
-
for (const r of
|
|
1375
|
+
for (const r of te(s))
|
|
1327
1376
|
i(r);
|
|
1328
1377
|
}
|
|
1329
1378
|
for (const s of n.objects)
|
|
@@ -1331,22 +1380,22 @@ function i1({
|
|
|
1331
1380
|
const a = t === null ? e : e - 1;
|
|
1332
1381
|
for (let s = 0; s < a; s++) {
|
|
1333
1382
|
const r = n.animations[s] ?? null;
|
|
1334
|
-
|
|
1383
|
+
S0(o, r);
|
|
1335
1384
|
}
|
|
1336
1385
|
if (t !== null && e > 0) {
|
|
1337
1386
|
const s = n.animations[e - 1] ?? null;
|
|
1338
|
-
|
|
1387
|
+
S0(o, s, t);
|
|
1339
1388
|
}
|
|
1340
1389
|
return o;
|
|
1341
1390
|
}
|
|
1342
|
-
function
|
|
1391
|
+
function h1(n) {
|
|
1343
1392
|
const e = {};
|
|
1344
1393
|
function t(o) {
|
|
1345
|
-
if (o.objectType ===
|
|
1394
|
+
if (o.objectType === $.SVG) {
|
|
1346
1395
|
const a = o.svg;
|
|
1347
1396
|
a !== void 0 && a.length > 0 && (e[a] = a);
|
|
1348
1397
|
}
|
|
1349
|
-
const i =
|
|
1398
|
+
const i = te(o);
|
|
1350
1399
|
for (const a of i)
|
|
1351
1400
|
t(a);
|
|
1352
1401
|
}
|
|
@@ -1356,7 +1405,7 @@ function o1(n) {
|
|
|
1356
1405
|
return e;
|
|
1357
1406
|
}
|
|
1358
1407
|
const pt = "presenterState";
|
|
1359
|
-
function
|
|
1408
|
+
function l1(n, e) {
|
|
1360
1409
|
const t = localStorage.getItem(pt);
|
|
1361
1410
|
if (t === null)
|
|
1362
1411
|
return null;
|
|
@@ -1380,13 +1429,13 @@ function s1(n, e) {
|
|
|
1380
1429
|
buildIndex: r
|
|
1381
1430
|
});
|
|
1382
1431
|
}
|
|
1383
|
-
function
|
|
1432
|
+
function c1({ title: n, slideIndex: e, buildIndex: t }) {
|
|
1384
1433
|
localStorage.setItem(
|
|
1385
1434
|
pt,
|
|
1386
1435
|
JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
|
|
1387
1436
|
);
|
|
1388
1437
|
}
|
|
1389
|
-
const
|
|
1438
|
+
const E0 = Object.freeze({
|
|
1390
1439
|
canvas: null,
|
|
1391
1440
|
extrasContainer: null,
|
|
1392
1441
|
mountedExtrasCleanups: [],
|
|
@@ -1403,10 +1452,10 @@ const C0 = Object.freeze({
|
|
|
1403
1452
|
Browser: "browser",
|
|
1404
1453
|
Node: "node"
|
|
1405
1454
|
};
|
|
1406
|
-
function
|
|
1455
|
+
function u1(n, e) {
|
|
1407
1456
|
e.context.clearRect(0, 0, n.width, n.height);
|
|
1408
1457
|
}
|
|
1409
|
-
function
|
|
1458
|
+
function f1(n) {
|
|
1410
1459
|
const e = document.createElement("canvas");
|
|
1411
1460
|
return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
|
|
1412
1461
|
}
|
|
@@ -1414,31 +1463,31 @@ const gt = {
|
|
|
1414
1463
|
Browser: "browser",
|
|
1415
1464
|
Node: "node"
|
|
1416
1465
|
};
|
|
1417
|
-
function
|
|
1466
|
+
function g1(n) {
|
|
1418
1467
|
const e = new Path2D(n);
|
|
1419
1468
|
return {
|
|
1420
1469
|
type: gt.Browser,
|
|
1421
1470
|
path: e
|
|
1422
1471
|
};
|
|
1423
1472
|
}
|
|
1424
|
-
function
|
|
1425
|
-
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, u = { x: i, y: a }, d = Math.atan2(u.y - c.y, u.x - c.x), l = { x: c.x + (u.x - c.x) / 2, y: c.y + (u.y - c.y) / 2 }, f = u.x - c.x, v = u.y - c.y, M = Math.hypot(f, v) * e,
|
|
1426
|
-
x: E.x - I * Math.cos(d -
|
|
1427
|
-
y: E.y - I * Math.sin(d -
|
|
1473
|
+
function d1(n) {
|
|
1474
|
+
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, u = { x: i, y: a }, d = Math.atan2(u.y - c.y, u.x - c.x), l = { x: c.x + (u.x - c.x) / 2, y: c.y + (u.y - c.y) / 2 }, f = u.x - c.x, v = u.y - c.y, M = Math.hypot(f, v) * e, T = Math.cos(d), S = Math.sin(d), P = h ? { x: l.x - T * M / 2, y: l.y - S * M / 2 } : c, E = h ? { x: l.x + T * M / 2, y: l.y + S * M / 2 } : { x: c.x + T * M, y: c.y + S * M }, L = r ? Math.PI / 6 : Math.PI / 4.5, I = M < s * 2 ? M / 2 : s, F = {
|
|
1475
|
+
x: E.x - I * Math.cos(d - L),
|
|
1476
|
+
y: E.y - I * Math.sin(d - L)
|
|
1428
1477
|
}, X = {
|
|
1429
|
-
x: E.x - I * Math.cos(d +
|
|
1430
|
-
y: E.y - I * Math.sin(d +
|
|
1478
|
+
x: E.x - I * Math.cos(d + L),
|
|
1479
|
+
y: E.y - I * Math.sin(d + L)
|
|
1431
1480
|
}, z = {
|
|
1432
|
-
x:
|
|
1433
|
-
y:
|
|
1434
|
-
},
|
|
1435
|
-
x:
|
|
1436
|
-
y:
|
|
1481
|
+
x: P.x + I * Math.cos(d - L),
|
|
1482
|
+
y: P.y + I * Math.sin(d - L)
|
|
1483
|
+
}, U = {
|
|
1484
|
+
x: P.x + I * Math.cos(d + L),
|
|
1485
|
+
y: P.y + I * Math.sin(d + L)
|
|
1437
1486
|
};
|
|
1438
1487
|
return {
|
|
1439
|
-
arrowPoints: [
|
|
1488
|
+
arrowPoints: [P, E],
|
|
1440
1489
|
arrowheadPoints: [F, E, X],
|
|
1441
|
-
doubledArrowheadPoints: [z,
|
|
1490
|
+
doubledArrowheadPoints: [z, P, U]
|
|
1442
1491
|
};
|
|
1443
1492
|
}
|
|
1444
1493
|
function vt({
|
|
@@ -1463,7 +1512,7 @@ function vt({
|
|
|
1463
1512
|
]) : n.context.setLineDash([u, c - u]);
|
|
1464
1513
|
} else
|
|
1465
1514
|
n.context.setLineDash([]);
|
|
1466
|
-
if (n.context.lineWidth = h, n.context.strokeStyle =
|
|
1515
|
+
if (n.context.lineWidth = h, n.context.strokeStyle = It(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
|
|
1467
1516
|
n.context.stroke();
|
|
1468
1517
|
return;
|
|
1469
1518
|
}
|
|
@@ -1480,7 +1529,7 @@ function vt({
|
|
|
1480
1529
|
}
|
|
1481
1530
|
}
|
|
1482
1531
|
function wt({ ctx: n, path: e, color: t, opacity: o = null }) {
|
|
1483
|
-
if (n.context.fillStyle =
|
|
1532
|
+
if (n.context.fillStyle = f0(t, o), e === void 0) {
|
|
1484
1533
|
n.context.fill();
|
|
1485
1534
|
return;
|
|
1486
1535
|
}
|
|
@@ -1510,7 +1559,7 @@ function jt(n, e) {
|
|
|
1510
1559
|
}
|
|
1511
1560
|
return { path: t, length: i };
|
|
1512
1561
|
}
|
|
1513
|
-
const
|
|
1562
|
+
const p1 = ({
|
|
1514
1563
|
ctx: n,
|
|
1515
1564
|
object: e,
|
|
1516
1565
|
opacity: t,
|
|
@@ -1519,7 +1568,7 @@ const f1 = ({
|
|
|
1519
1568
|
const i = e.opacity * t;
|
|
1520
1569
|
if (i === 0 || e.drawn === 0)
|
|
1521
1570
|
return;
|
|
1522
|
-
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } =
|
|
1571
|
+
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = d1(e), { path: h } = jt(a, o), { path: c } = jt(s, o);
|
|
1523
1572
|
if (vt({
|
|
1524
1573
|
color: e.color,
|
|
1525
1574
|
ctx: n,
|
|
@@ -1556,20 +1605,20 @@ const f1 = ({
|
|
|
1556
1605
|
});
|
|
1557
1606
|
}
|
|
1558
1607
|
};
|
|
1559
|
-
function
|
|
1608
|
+
function x1(n, e) {
|
|
1560
1609
|
const t = n.radius - n.strokeWidth / 2;
|
|
1561
1610
|
if (t <= 0)
|
|
1562
1611
|
return;
|
|
1563
1612
|
const o = e(), i = -Math.PI / 2;
|
|
1564
1613
|
return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
|
|
1565
1614
|
}
|
|
1566
|
-
function
|
|
1615
|
+
function y1(n, e) {
|
|
1567
1616
|
const t = e(), o = -Math.PI / 2;
|
|
1568
1617
|
t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
|
|
1569
1618
|
const i = 2 * Math.PI * n.radius;
|
|
1570
1619
|
return { path: t, length: i };
|
|
1571
1620
|
}
|
|
1572
|
-
function
|
|
1621
|
+
function ee(n, e) {
|
|
1573
1622
|
switch (n.type) {
|
|
1574
1623
|
case V.Browser:
|
|
1575
1624
|
e.type === gt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
@@ -1581,7 +1630,7 @@ function Q0(n, e) {
|
|
|
1581
1630
|
st(n);
|
|
1582
1631
|
}
|
|
1583
1632
|
}
|
|
1584
|
-
const
|
|
1633
|
+
const v1 = ({
|
|
1585
1634
|
ctx: n,
|
|
1586
1635
|
object: e,
|
|
1587
1636
|
opacity: t,
|
|
@@ -1590,10 +1639,10 @@ const p1 = ({
|
|
|
1590
1639
|
const i = e.opacity * t;
|
|
1591
1640
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1592
1641
|
return;
|
|
1593
|
-
const { path: a, length: s } =
|
|
1642
|
+
const { path: a, length: s } = y1(e, o);
|
|
1594
1643
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1595
|
-
const r =
|
|
1596
|
-
r !== void 0 && (n.context.save(),
|
|
1644
|
+
const r = x1(e, o);
|
|
1645
|
+
r !== void 0 && (n.context.save(), ee(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1597
1646
|
} else
|
|
1598
1647
|
wt({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1599
1648
|
vt({
|
|
@@ -1613,11 +1662,11 @@ function Y(n = null) {
|
|
|
1613
1662
|
...n
|
|
1614
1663
|
};
|
|
1615
1664
|
}
|
|
1616
|
-
const
|
|
1665
|
+
const w1 = Y();
|
|
1617
1666
|
function ut(n = null) {
|
|
1618
1667
|
return {
|
|
1619
|
-
origin:
|
|
1620
|
-
size:
|
|
1668
|
+
origin: w1,
|
|
1669
|
+
size: Je,
|
|
1621
1670
|
...n
|
|
1622
1671
|
};
|
|
1623
1672
|
}
|
|
@@ -1674,7 +1723,7 @@ function dt(n, e, t) {
|
|
|
1674
1723
|
st(e);
|
|
1675
1724
|
}
|
|
1676
1725
|
}
|
|
1677
|
-
const
|
|
1726
|
+
const m1 = ({
|
|
1678
1727
|
ctx: n,
|
|
1679
1728
|
object: e,
|
|
1680
1729
|
renderObject: t,
|
|
@@ -1699,10 +1748,10 @@ const y1 = ({
|
|
|
1699
1748
|
), n.context.translate(-u, -d);
|
|
1700
1749
|
for (const v of e.objects)
|
|
1701
1750
|
t(v, o * e.opacity);
|
|
1702
|
-
e.previewColor !== null && (n.context.fillStyle =
|
|
1751
|
+
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(h, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(u, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
|
|
1703
1752
|
}
|
|
1704
1753
|
};
|
|
1705
|
-
function
|
|
1754
|
+
function g0(n, e, t, o, i = 0) {
|
|
1706
1755
|
const a = o();
|
|
1707
1756
|
a.path.moveTo(n.x + t, n.y), a.path.lineTo(n.x + e.width - t, n.y), a.path.arcTo(
|
|
1708
1757
|
n.x + e.width,
|
|
@@ -1726,10 +1775,10 @@ function c0(n, e, t, o, i = 0) {
|
|
|
1726
1775
|
const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
|
|
1727
1776
|
return { path: a, length: s };
|
|
1728
1777
|
}
|
|
1729
|
-
const
|
|
1778
|
+
const kt = {
|
|
1730
1779
|
Browser: "browser",
|
|
1731
1780
|
Node: "node"
|
|
1732
|
-
},
|
|
1781
|
+
}, b1 = ({
|
|
1733
1782
|
ctx: n,
|
|
1734
1783
|
imageById: e,
|
|
1735
1784
|
object: t,
|
|
@@ -1743,7 +1792,7 @@ const It = {
|
|
|
1743
1792
|
), s = e[t.imageId];
|
|
1744
1793
|
if (s !== void 0) {
|
|
1745
1794
|
if (n.context.save(), t.cornerRadius > 0) {
|
|
1746
|
-
const r =
|
|
1795
|
+
const r = g0(
|
|
1747
1796
|
a.origin,
|
|
1748
1797
|
a.size,
|
|
1749
1798
|
t.cornerRadius,
|
|
@@ -1762,7 +1811,7 @@ const It = {
|
|
|
1762
1811
|
}
|
|
1763
1812
|
switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
|
|
1764
1813
|
case V.Browser:
|
|
1765
|
-
s.type ===
|
|
1814
|
+
s.type === kt.Browser ? n.context.drawImage(
|
|
1766
1815
|
s.image,
|
|
1767
1816
|
a.origin.x,
|
|
1768
1817
|
a.origin.y,
|
|
@@ -1771,7 +1820,7 @@ const It = {
|
|
|
1771
1820
|
) : console.warn("Attempted to use Node Image in Browser Canvas context");
|
|
1772
1821
|
break;
|
|
1773
1822
|
case V.Node:
|
|
1774
|
-
s.type ===
|
|
1823
|
+
s.type === kt.Node ? n.context.drawImage(
|
|
1775
1824
|
s.image,
|
|
1776
1825
|
a.origin.x,
|
|
1777
1826
|
a.origin.y,
|
|
@@ -1785,13 +1834,13 @@ const It = {
|
|
|
1785
1834
|
n.context.restore();
|
|
1786
1835
|
}
|
|
1787
1836
|
};
|
|
1788
|
-
function
|
|
1837
|
+
function A1(n, e) {
|
|
1789
1838
|
const t = e();
|
|
1790
1839
|
t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
|
|
1791
1840
|
const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
|
|
1792
1841
|
return { path: t, length: o };
|
|
1793
1842
|
}
|
|
1794
|
-
const
|
|
1843
|
+
const M1 = ({
|
|
1795
1844
|
ctx: n,
|
|
1796
1845
|
object: e,
|
|
1797
1846
|
opacity: t,
|
|
@@ -1800,7 +1849,7 @@ const m1 = ({
|
|
|
1800
1849
|
const i = e.opacity * t;
|
|
1801
1850
|
if (i === 0 || e.drawn === 0)
|
|
1802
1851
|
return;
|
|
1803
|
-
const { path: a, length: s } =
|
|
1852
|
+
const { path: a, length: s } = A1(e, o);
|
|
1804
1853
|
vt({
|
|
1805
1854
|
color: e.color,
|
|
1806
1855
|
ctx: n,
|
|
@@ -1812,7 +1861,7 @@ const m1 = ({
|
|
|
1812
1861
|
opacity: i,
|
|
1813
1862
|
width: e.width
|
|
1814
1863
|
});
|
|
1815
|
-
},
|
|
1864
|
+
}, L1 = ({
|
|
1816
1865
|
ctx: n,
|
|
1817
1866
|
object: e,
|
|
1818
1867
|
opacity: t,
|
|
@@ -1824,11 +1873,11 @@ const m1 = ({
|
|
|
1824
1873
|
e.anchor,
|
|
1825
1874
|
at({ width: e.width, height: e.height })
|
|
1826
1875
|
);
|
|
1827
|
-
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle =
|
|
1876
|
+
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();
|
|
1828
1877
|
for (const a of e.objects)
|
|
1829
1878
|
o(a, t * e.opacity);
|
|
1830
1879
|
n.context.restore();
|
|
1831
|
-
},
|
|
1880
|
+
}, T1 = ({
|
|
1832
1881
|
ctx: n,
|
|
1833
1882
|
object: e,
|
|
1834
1883
|
opacity: t,
|
|
@@ -1858,7 +1907,7 @@ const m1 = ({
|
|
|
1858
1907
|
width: e.strokeWidth
|
|
1859
1908
|
}), n.context.restore();
|
|
1860
1909
|
};
|
|
1861
|
-
function
|
|
1910
|
+
function C1(n, e) {
|
|
1862
1911
|
const t = e(), o = n.points, i = o[0];
|
|
1863
1912
|
if (i === void 0)
|
|
1864
1913
|
return { path: t, length: 0 };
|
|
@@ -1879,7 +1928,7 @@ function M1(n, e) {
|
|
|
1879
1928
|
);
|
|
1880
1929
|
return a += r, { path: t, length: a };
|
|
1881
1930
|
}
|
|
1882
|
-
const
|
|
1931
|
+
const P1 = ({
|
|
1883
1932
|
ctx: n,
|
|
1884
1933
|
object: e,
|
|
1885
1934
|
opacity: t,
|
|
@@ -1888,7 +1937,7 @@ const L1 = ({
|
|
|
1888
1937
|
const i = e.opacity * t;
|
|
1889
1938
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1890
1939
|
return;
|
|
1891
|
-
const { path: a, length: s } =
|
|
1940
|
+
const { path: a, length: s } = C1(e, o);
|
|
1892
1941
|
wt({
|
|
1893
1942
|
ctx: n,
|
|
1894
1943
|
path: a,
|
|
@@ -1904,7 +1953,7 @@ const L1 = ({
|
|
|
1904
1953
|
width: e.strokeWidth
|
|
1905
1954
|
});
|
|
1906
1955
|
};
|
|
1907
|
-
function
|
|
1956
|
+
function S1(n, e) {
|
|
1908
1957
|
const t = n.strokeWidth / 2, { origin: o, size: i } = dt(
|
|
1909
1958
|
Y({ x: n.x, y: n.y }),
|
|
1910
1959
|
n.anchor,
|
|
@@ -1917,11 +1966,11 @@ function T1(n, e) {
|
|
|
1917
1966
|
Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
|
|
1918
1967
|
);
|
|
1919
1968
|
if (c > 0)
|
|
1920
|
-
return
|
|
1969
|
+
return g0(r, h, c, e).path;
|
|
1921
1970
|
const u = e();
|
|
1922
1971
|
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;
|
|
1923
1972
|
}
|
|
1924
|
-
function
|
|
1973
|
+
function E1(n, e) {
|
|
1925
1974
|
const { origin: t, size: o } = dt(
|
|
1926
1975
|
Y({ x: n.x, y: n.y }),
|
|
1927
1976
|
n.anchor,
|
|
@@ -1931,7 +1980,7 @@ function C1(n, e) {
|
|
|
1931
1980
|
Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
|
|
1932
1981
|
), a = Math.min(n.strokeWidth * 2, o.width - i);
|
|
1933
1982
|
if (i > 0)
|
|
1934
|
-
return
|
|
1983
|
+
return g0(t, o, i, e, a);
|
|
1935
1984
|
{
|
|
1936
1985
|
const s = e();
|
|
1937
1986
|
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);
|
|
@@ -1939,7 +1988,7 @@ function C1(n, e) {
|
|
|
1939
1988
|
return { path: s, length: r };
|
|
1940
1989
|
}
|
|
1941
1990
|
}
|
|
1942
|
-
const
|
|
1991
|
+
const I1 = ({
|
|
1943
1992
|
ctx: n,
|
|
1944
1993
|
object: e,
|
|
1945
1994
|
opacity: t,
|
|
@@ -1948,10 +1997,10 @@ const P1 = ({
|
|
|
1948
1997
|
const i = e.opacity * t;
|
|
1949
1998
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1950
1999
|
return;
|
|
1951
|
-
const { path: a, length: s } =
|
|
2000
|
+
const { path: a, length: s } = E1(e, o);
|
|
1952
2001
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1953
|
-
const r =
|
|
1954
|
-
r !== void 0 && (n.context.save(),
|
|
2002
|
+
const r = S1(e, o);
|
|
2003
|
+
r !== void 0 && (n.context.save(), ee(n, r), wt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1955
2004
|
} else
|
|
1956
2005
|
wt({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
1957
2006
|
vt({
|
|
@@ -1963,7 +2012,7 @@ const P1 = ({
|
|
|
1963
2012
|
opacity: i,
|
|
1964
2013
|
width: e.strokeWidth
|
|
1965
2014
|
});
|
|
1966
|
-
},
|
|
2015
|
+
}, k1 = ({
|
|
1967
2016
|
ctx: n,
|
|
1968
2017
|
imageById: e,
|
|
1969
2018
|
object: t,
|
|
@@ -1982,7 +2031,7 @@ const P1 = ({
|
|
|
1982
2031
|
);
|
|
1983
2032
|
switch (n.context.save(), n.context.globalAlpha = i, n.type) {
|
|
1984
2033
|
case V.Browser:
|
|
1985
|
-
a.type ===
|
|
2034
|
+
a.type === kt.Browser && n.context.drawImage(
|
|
1986
2035
|
a.image,
|
|
1987
2036
|
s.origin.x,
|
|
1988
2037
|
s.origin.y,
|
|
@@ -1991,7 +2040,7 @@ const P1 = ({
|
|
|
1991
2040
|
);
|
|
1992
2041
|
break;
|
|
1993
2042
|
case V.Node:
|
|
1994
|
-
a.type ===
|
|
2043
|
+
a.type === kt.Node && n.context.drawImage(
|
|
1995
2044
|
a.image,
|
|
1996
2045
|
s.origin.x,
|
|
1997
2046
|
s.origin.y,
|
|
@@ -2004,7 +2053,7 @@ const P1 = ({
|
|
|
2004
2053
|
}
|
|
2005
2054
|
n.context.restore();
|
|
2006
2055
|
};
|
|
2007
|
-
function
|
|
2056
|
+
function _1(n) {
|
|
2008
2057
|
return {
|
|
2009
2058
|
color: n.color,
|
|
2010
2059
|
fontFamily: n.fontFamily,
|
|
@@ -2016,7 +2065,7 @@ function E1(n) {
|
|
|
2016
2065
|
superscript: n.superscript
|
|
2017
2066
|
};
|
|
2018
2067
|
}
|
|
2019
|
-
function
|
|
2068
|
+
function O1(n, e = 1) {
|
|
2020
2069
|
const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
|
|
2021
2070
|
let o = 0, i = 0;
|
|
2022
2071
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -2031,8 +2080,8 @@ function I1(n, e = 1) {
|
|
|
2031
2080
|
width: t
|
|
2032
2081
|
};
|
|
2033
2082
|
}
|
|
2034
|
-
const
|
|
2035
|
-
function
|
|
2083
|
+
const N1 = 0.7, R1 = 0.3;
|
|
2084
|
+
function ne(n) {
|
|
2036
2085
|
const e = n.superscript, t = n.subscript && !e;
|
|
2037
2086
|
return !e && !t ? {
|
|
2038
2087
|
baselineShift: 0,
|
|
@@ -2040,30 +2089,30 @@ function J0(n) {
|
|
|
2040
2089
|
isSubscript: !1,
|
|
2041
2090
|
isSuperscript: !1
|
|
2042
2091
|
} : {
|
|
2043
|
-
baselineShift: n.fontSize *
|
|
2044
|
-
fontSize: n.fontSize *
|
|
2092
|
+
baselineShift: n.fontSize * R1 * (e ? -1 : 1),
|
|
2093
|
+
fontSize: n.fontSize * N1,
|
|
2045
2094
|
isSubscript: t,
|
|
2046
2095
|
isSuperscript: e
|
|
2047
2096
|
};
|
|
2048
2097
|
}
|
|
2049
|
-
function
|
|
2098
|
+
function F1(n) {
|
|
2050
2099
|
return {
|
|
2051
2100
|
width: n.width,
|
|
2052
2101
|
height: n.fontBoundingBoxAscent
|
|
2053
2102
|
};
|
|
2054
2103
|
}
|
|
2055
|
-
function
|
|
2056
|
-
const o =
|
|
2057
|
-
n.context.fillStyle =
|
|
2104
|
+
function re(n, e, t = 1) {
|
|
2105
|
+
const o = ne(e);
|
|
2106
|
+
n.context.fillStyle = f0(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
|
|
2058
2107
|
}
|
|
2059
|
-
function
|
|
2108
|
+
function B1(n, e, t) {
|
|
2060
2109
|
const o = [];
|
|
2061
2110
|
for (const i of n) {
|
|
2062
2111
|
const a = [];
|
|
2063
2112
|
for (const s of i) {
|
|
2064
2113
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
2065
|
-
|
|
2066
|
-
const u = t.context.measureText(r), d =
|
|
2114
|
+
re(t, c);
|
|
2115
|
+
const u = t.context.measureText(r), d = F1(u), { baselineShift: l } = ne(c), f = d.height + Math.max(0, -l), v = Math.max(0, l);
|
|
2067
2116
|
a.push({
|
|
2068
2117
|
...d,
|
|
2069
2118
|
baselineShift: l,
|
|
@@ -2076,11 +2125,11 @@ function N1(n, e, t) {
|
|
|
2076
2125
|
}
|
|
2077
2126
|
return o;
|
|
2078
2127
|
}
|
|
2079
|
-
const
|
|
2128
|
+
const D1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
2080
2129
|
const o = e.opacity * t;
|
|
2081
2130
|
if (o === 0)
|
|
2082
2131
|
return;
|
|
2083
|
-
const { length: i } = e, a =
|
|
2132
|
+
const { length: i } = e, a = X0(e.text), s = _1(e), r = B1(a, s, n), h = O1(r, e.lineSpacing), c = dt(Y({ x: e.x, y: e.y }), e.anchor, h);
|
|
2084
2133
|
let u = c.origin.x, d = c.origin.y, l = 0, f = 0;
|
|
2085
2134
|
for (let v = 0; v < a.length; v++) {
|
|
2086
2135
|
const y = a[v], M = r[v];
|
|
@@ -2088,23 +2137,23 @@ const R1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
2088
2137
|
console.error("Could not determine text units or sizes for line");
|
|
2089
2138
|
continue;
|
|
2090
2139
|
}
|
|
2091
|
-
const
|
|
2140
|
+
const T = M.reduce((I, F) => I + F.width, 0), S = M.length === 0 ? f : M.reduce((I, F) => Math.max(I, F.top), 0), P = M.length === 0 ? 0 : M.reduce((I, F) => Math.max(I, F.bottom), 0), E = S + P;
|
|
2092
2141
|
switch (e.alignment) {
|
|
2093
2142
|
case xt.LEFT:
|
|
2094
2143
|
u = c.origin.x;
|
|
2095
2144
|
break;
|
|
2096
2145
|
case xt.CENTER:
|
|
2097
|
-
u = c.origin.x + (c.size.width -
|
|
2146
|
+
u = c.origin.x + (c.size.width - T) / 2;
|
|
2098
2147
|
break;
|
|
2099
2148
|
case xt.RIGHT:
|
|
2100
|
-
u = c.origin.x + (c.size.width -
|
|
2149
|
+
u = c.origin.x + (c.size.width - T);
|
|
2101
2150
|
break;
|
|
2102
2151
|
default:
|
|
2103
2152
|
st(e.alignment);
|
|
2104
2153
|
break;
|
|
2105
2154
|
}
|
|
2106
2155
|
d += f * (e.lineSpacing - 1);
|
|
2107
|
-
const
|
|
2156
|
+
const L = d + S;
|
|
2108
2157
|
f = E;
|
|
2109
2158
|
for (let I = 0; I < y.length && !(i !== null && l >= i); I++) {
|
|
2110
2159
|
const F = y[I], X = M[I];
|
|
@@ -2112,7 +2161,7 @@ const R1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
2112
2161
|
console.error("Could not determine text unit or size for unit");
|
|
2113
2162
|
continue;
|
|
2114
2163
|
}
|
|
2115
|
-
const { text: z, ...
|
|
2164
|
+
const { text: z, ...U } = F;
|
|
2116
2165
|
let tt;
|
|
2117
2166
|
if (i !== null && l + z.length > i) {
|
|
2118
2167
|
const Z = i - l;
|
|
@@ -2120,31 +2169,31 @@ const R1 = ({ ctx: n, object: e, opacity: t }) => {
|
|
|
2120
2169
|
}
|
|
2121
2170
|
const et = tt ?? z;
|
|
2122
2171
|
l += et.length;
|
|
2123
|
-
const nt = { ...s, ...
|
|
2124
|
-
|
|
2172
|
+
const nt = { ...s, ...U };
|
|
2173
|
+
re(n, nt, o), n.context.fillText(et, u, L + X.baselineShift), u += X.width;
|
|
2125
2174
|
}
|
|
2126
2175
|
d += E;
|
|
2127
2176
|
}
|
|
2128
|
-
},
|
|
2129
|
-
[
|
|
2130
|
-
[
|
|
2131
|
-
[
|
|
2132
|
-
[
|
|
2133
|
-
[
|
|
2134
|
-
[
|
|
2135
|
-
[
|
|
2136
|
-
[
|
|
2137
|
-
[
|
|
2138
|
-
[
|
|
2177
|
+
}, q1 = {
|
|
2178
|
+
[$.ARROW]: p1,
|
|
2179
|
+
[$.CIRCLE]: v1,
|
|
2180
|
+
[$.GROUP]: m1,
|
|
2181
|
+
[$.IMAGE]: b1,
|
|
2182
|
+
[$.LINE]: M1,
|
|
2183
|
+
[$.MASK]: L1,
|
|
2184
|
+
[$.PATH]: T1,
|
|
2185
|
+
[$.POLYGON]: P1,
|
|
2186
|
+
[$.RECTANGLE]: I1,
|
|
2187
|
+
[$.SLIDE_OBJECT]: () => {
|
|
2139
2188
|
},
|
|
2140
|
-
[
|
|
2141
|
-
[
|
|
2189
|
+
[$.SVG]: k1,
|
|
2190
|
+
[$.TEXT]: D1
|
|
2142
2191
|
};
|
|
2143
|
-
function
|
|
2192
|
+
function z1(n) {
|
|
2144
2193
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2145
2194
|
return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
|
|
2146
2195
|
}
|
|
2147
|
-
function
|
|
2196
|
+
function H1(n, e) {
|
|
2148
2197
|
if (n === null)
|
|
2149
2198
|
return null;
|
|
2150
2199
|
const t = dt(
|
|
@@ -2164,7 +2213,7 @@ function D1(n, e) {
|
|
|
2164
2213
|
a !== null && a(), n.removeChild(o);
|
|
2165
2214
|
};
|
|
2166
2215
|
}
|
|
2167
|
-
async function
|
|
2216
|
+
async function j1(n) {
|
|
2168
2217
|
if (Object.keys(n).length === 0)
|
|
2169
2218
|
return {};
|
|
2170
2219
|
const e = {}, t = (i) => new Promise((a, s) => {
|
|
@@ -2177,7 +2226,7 @@ async function q1(n) {
|
|
|
2177
2226
|
}), o = Object.entries(n).map(async ([i, a]) => {
|
|
2178
2227
|
const s = await t(a);
|
|
2179
2228
|
e[i] = {
|
|
2180
|
-
type:
|
|
2229
|
+
type: kt.Browser,
|
|
2181
2230
|
image: s
|
|
2182
2231
|
};
|
|
2183
2232
|
});
|
|
@@ -2188,41 +2237,41 @@ async function q1(n) {
|
|
|
2188
2237
|
}
|
|
2189
2238
|
return e;
|
|
2190
2239
|
}
|
|
2191
|
-
class
|
|
2240
|
+
class er {
|
|
2192
2241
|
constructor(e) {
|
|
2193
2242
|
this.navigator = null;
|
|
2194
2243
|
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
2195
2244
|
this.props = {
|
|
2196
|
-
presentation:
|
|
2245
|
+
presentation: t1(),
|
|
2197
2246
|
element: document.body,
|
|
2198
2247
|
objectRenderers: {
|
|
2199
|
-
...
|
|
2248
|
+
...q1,
|
|
2200
2249
|
...t
|
|
2201
2250
|
},
|
|
2202
2251
|
cacheDurationMinutes: 15,
|
|
2203
|
-
scale:
|
|
2252
|
+
scale: U1(o),
|
|
2204
2253
|
...i
|
|
2205
|
-
}, this.state = { ...
|
|
2254
|
+
}, this.state = { ...E0 };
|
|
2206
2255
|
}
|
|
2207
2256
|
/** Starts the presentation. */
|
|
2208
2257
|
async present() {
|
|
2209
|
-
const { presentation: e, element: t, scale: o } = this.props, i =
|
|
2258
|
+
const { presentation: e, element: t, scale: o } = this.props, i = f1(e.size), a = z1(e.size);
|
|
2210
2259
|
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
2211
|
-
...
|
|
2212
|
-
imageById: await
|
|
2260
|
+
...E0,
|
|
2261
|
+
imageById: await j1({
|
|
2213
2262
|
...e.resources.images,
|
|
2214
|
-
...
|
|
2263
|
+
...h1(e)
|
|
2215
2264
|
}),
|
|
2216
2265
|
canvas: i,
|
|
2217
2266
|
extrasContainer: a
|
|
2218
2267
|
};
|
|
2219
|
-
const s =
|
|
2268
|
+
const s = n1(e, t), r = J0(t), h = (d, l) => {
|
|
2220
2269
|
this.state.shortcutState.shortcuts.b = {
|
|
2221
2270
|
slideIndex: this.state.slideIndex,
|
|
2222
2271
|
buildIndex: this.state.buildIndex
|
|
2223
2272
|
}, this.renderSlide(d ?? this.state.slideIndex, l);
|
|
2224
2273
|
}, c = (d = !1) => {
|
|
2225
|
-
r && (this.navigator =
|
|
2274
|
+
r && (this.navigator = Xe({
|
|
2226
2275
|
presentation: e,
|
|
2227
2276
|
shortcutState: this.state.shortcutState,
|
|
2228
2277
|
onNavigateToSlide: (l) => this.renderSlide(l),
|
|
@@ -2232,7 +2281,7 @@ class Qn {
|
|
|
2232
2281
|
forceRefresh: d
|
|
2233
2282
|
}), this.updateNavigator());
|
|
2234
2283
|
};
|
|
2235
|
-
|
|
2284
|
+
Z0(
|
|
2236
2285
|
e,
|
|
2237
2286
|
s,
|
|
2238
2287
|
this.state.shortcutState,
|
|
@@ -2247,12 +2296,12 @@ class Qn {
|
|
|
2247
2296
|
keyEventTarget: r ? window : s
|
|
2248
2297
|
}
|
|
2249
2298
|
), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
|
|
2250
|
-
const u =
|
|
2251
|
-
u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0),
|
|
2299
|
+
const u = l1(e, this.props.cacheDurationMinutes);
|
|
2300
|
+
u !== null ? this.renderSlide(u.slideIndex, u.buildIndex) : this.renderSlide(0), Ue() && c(!0);
|
|
2252
2301
|
}
|
|
2253
2302
|
renderSlide(e, t = 0, o = null) {
|
|
2254
2303
|
const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== e;
|
|
2255
|
-
this.state.slideIndex = e, this.state.buildIndex = t, o === null &&
|
|
2304
|
+
this.state.slideIndex = e, this.state.buildIndex = t, o === null && c1({ title: i.title, slideIndex: e, buildIndex: t });
|
|
2256
2305
|
const r = i.slides[e];
|
|
2257
2306
|
if (!(r === void 0 || a === null)) {
|
|
2258
2307
|
if (s || this.state.mountedExtrasCleanups.length === 0 && r.extras.length > 0) {
|
|
@@ -2260,7 +2309,7 @@ class Qn {
|
|
|
2260
2309
|
h();
|
|
2261
2310
|
this.state.mountedExtrasCleanups = [];
|
|
2262
2311
|
for (const h of r.extras) {
|
|
2263
|
-
const c =
|
|
2312
|
+
const c = H1(this.state.extrasContainer, h);
|
|
2264
2313
|
c !== null && this.state.mountedExtrasCleanups.push(c);
|
|
2265
2314
|
}
|
|
2266
2315
|
}
|
|
@@ -2277,25 +2326,25 @@ class Qn {
|
|
|
2277
2326
|
type: V.Browser,
|
|
2278
2327
|
context: c
|
|
2279
2328
|
};
|
|
2280
|
-
|
|
2329
|
+
u1(e, u);
|
|
2281
2330
|
const d = r.slides[t];
|
|
2282
2331
|
if (d === void 0)
|
|
2283
2332
|
return;
|
|
2284
|
-
const l =
|
|
2333
|
+
const l = a1({
|
|
2285
2334
|
slide: d,
|
|
2286
2335
|
buildIndex: o,
|
|
2287
2336
|
buildTime: i
|
|
2288
2337
|
});
|
|
2289
|
-
u.context.fillStyle =
|
|
2338
|
+
u.context.fillStyle = f0(r.backgroundColor), u.context.fillRect(0, 0, e.width, e.height);
|
|
2290
2339
|
function f(y, M) {
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2340
|
+
const T = s[y.objectType], S = l.get(y);
|
|
2341
|
+
T === void 0 || S === void 0 || T({
|
|
2293
2342
|
ctx: u,
|
|
2294
2343
|
imageById: h,
|
|
2295
2344
|
object: S,
|
|
2296
2345
|
opacity: M,
|
|
2297
2346
|
renderObject: f,
|
|
2298
|
-
createPath2D:
|
|
2347
|
+
createPath2D: g1
|
|
2299
2348
|
});
|
|
2300
2349
|
}
|
|
2301
2350
|
const v = a !== 1;
|
|
@@ -2336,7 +2385,7 @@ class Qn {
|
|
|
2336
2385
|
return;
|
|
2337
2386
|
const r = s.animations[a];
|
|
2338
2387
|
if (r !== void 0 && !e) {
|
|
2339
|
-
const h = performance.now(), c =
|
|
2388
|
+
const h = performance.now(), c = e1(r), u = (d) => {
|
|
2340
2389
|
const l = d - h;
|
|
2341
2390
|
l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(u)) : this.renderSlide(i, a + 1, null);
|
|
2342
2391
|
};
|
|
@@ -2366,12 +2415,12 @@ class Qn {
|
|
|
2366
2415
|
this.props.element.style.cursor = "none", (t = (e = this.state.canvas) == null ? void 0 : e.parentElement) == null || t.style.setProperty("cursor", "none");
|
|
2367
2416
|
}
|
|
2368
2417
|
}
|
|
2369
|
-
function
|
|
2418
|
+
function U1(n) {
|
|
2370
2419
|
return n <= 0 || n > 1 ? (console.warn(
|
|
2371
2420
|
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2372
2421
|
), 1) : n;
|
|
2373
2422
|
}
|
|
2374
|
-
function
|
|
2423
|
+
function nr(n = 1e3) {
|
|
2375
2424
|
return {
|
|
2376
2425
|
type: ft.PAUSE,
|
|
2377
2426
|
isKey: !1,
|
|
@@ -2379,7 +2428,7 @@ function Jn(n = 1e3) {
|
|
|
2379
2428
|
shortcut: null
|
|
2380
2429
|
};
|
|
2381
2430
|
}
|
|
2382
|
-
function
|
|
2431
|
+
function rr(n = null) {
|
|
2383
2432
|
return {
|
|
2384
2433
|
objects: [],
|
|
2385
2434
|
animations: [],
|
|
@@ -2392,32 +2441,32 @@ function t2(n = null) {
|
|
|
2392
2441
|
...n
|
|
2393
2442
|
};
|
|
2394
2443
|
}
|
|
2395
|
-
function
|
|
2444
|
+
function ir(n, e = {}) {
|
|
2396
2445
|
return {
|
|
2397
2446
|
...e,
|
|
2398
2447
|
text: n
|
|
2399
2448
|
};
|
|
2400
2449
|
}
|
|
2401
|
-
function
|
|
2450
|
+
function or(n = G.BLACK) {
|
|
2402
2451
|
return { ...n, alpha: 1 };
|
|
2403
2452
|
}
|
|
2404
|
-
function
|
|
2453
|
+
function $1(n) {
|
|
2405
2454
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2406
2455
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2407
2456
|
return a / 2;
|
|
2408
2457
|
}
|
|
2409
|
-
function
|
|
2458
|
+
function W1(n) {
|
|
2410
2459
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2411
2460
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2412
2461
|
return h;
|
|
2413
2462
|
}
|
|
2414
|
-
function
|
|
2463
|
+
function Y1(n) {
|
|
2415
2464
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2416
2465
|
}
|
|
2417
|
-
var
|
|
2418
|
-
function
|
|
2419
|
-
if (
|
|
2420
|
-
|
|
2466
|
+
var Ut, I0;
|
|
2467
|
+
function X1() {
|
|
2468
|
+
if (I0) return Ut;
|
|
2469
|
+
I0 = 1;
|
|
2421
2470
|
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 = [
|
|
2422
2471
|
5760,
|
|
2423
2472
|
6158,
|
|
@@ -2491,35 +2540,35 @@ function $1() {
|
|
|
2491
2540
|
f.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + f.index + ")";
|
|
2492
2541
|
}
|
|
2493
2542
|
function u(f) {
|
|
2494
|
-
var v = f.index, y = v, M = f.max,
|
|
2543
|
+
var v = f.index, y = v, M = f.max, T = !1, S = !1, P = !1, E = !1, L;
|
|
2495
2544
|
if (y >= M) {
|
|
2496
2545
|
f.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2497
2546
|
return;
|
|
2498
2547
|
}
|
|
2499
|
-
if (
|
|
2548
|
+
if (L = f.path.charCodeAt(y), (L === 43 || L === 45) && (y++, L = y < M ? f.path.charCodeAt(y) : 0), !a(L) && L !== 46) {
|
|
2500
2549
|
f.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2501
2550
|
return;
|
|
2502
2551
|
}
|
|
2503
|
-
if (
|
|
2504
|
-
if (
|
|
2552
|
+
if (L !== 46) {
|
|
2553
|
+
if (T = L === 48, y++, L = y < M ? f.path.charCodeAt(y) : 0, T && y < M && L && a(L)) {
|
|
2505
2554
|
f.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + v + ")";
|
|
2506
2555
|
return;
|
|
2507
2556
|
}
|
|
2508
2557
|
for (; y < M && a(f.path.charCodeAt(y)); )
|
|
2509
2558
|
y++, S = !0;
|
|
2510
|
-
|
|
2559
|
+
L = y < M ? f.path.charCodeAt(y) : 0;
|
|
2511
2560
|
}
|
|
2512
|
-
if (
|
|
2561
|
+
if (L === 46) {
|
|
2513
2562
|
for (E = !0, y++; a(f.path.charCodeAt(y)); )
|
|
2514
|
-
y++,
|
|
2515
|
-
|
|
2563
|
+
y++, P = !0;
|
|
2564
|
+
L = y < M ? f.path.charCodeAt(y) : 0;
|
|
2516
2565
|
}
|
|
2517
|
-
if (
|
|
2518
|
-
if (E && !S && !
|
|
2566
|
+
if (L === 101 || L === 69) {
|
|
2567
|
+
if (E && !S && !P) {
|
|
2519
2568
|
f.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2520
2569
|
return;
|
|
2521
2570
|
}
|
|
2522
|
-
if (y++,
|
|
2571
|
+
if (y++, L = y < M ? f.path.charCodeAt(y) : 0, (L === 43 || L === 45) && y++, y < M && a(f.path.charCodeAt(y)))
|
|
2523
2572
|
for (; y < M && a(f.path.charCodeAt(y)); )
|
|
2524
2573
|
y++;
|
|
2525
2574
|
else {
|
|
@@ -2540,7 +2589,7 @@ function $1() {
|
|
|
2540
2589
|
;
|
|
2541
2590
|
}
|
|
2542
2591
|
function l(f) {
|
|
2543
|
-
var v = f.max, y, M,
|
|
2592
|
+
var v = f.max, y, M, T, S, P;
|
|
2544
2593
|
if (f.segmentStart = f.index, y = f.path.charCodeAt(f.index), M = i(y), !o(y)) {
|
|
2545
2594
|
f.err = "SvgPath: bad command " + f.path[f.index] + " (at pos " + f.index + ")";
|
|
2546
2595
|
return;
|
|
@@ -2549,20 +2598,20 @@ function $1() {
|
|
|
2549
2598
|
d(f);
|
|
2550
2599
|
return;
|
|
2551
2600
|
}
|
|
2552
|
-
for (
|
|
2553
|
-
for (
|
|
2554
|
-
if (M && (
|
|
2601
|
+
for (T = !1; ; ) {
|
|
2602
|
+
for (P = S; P > 0; P--) {
|
|
2603
|
+
if (M && (P === 3 || P === 4) ? c(f) : u(f), f.err.length) {
|
|
2555
2604
|
d(f);
|
|
2556
2605
|
return;
|
|
2557
2606
|
}
|
|
2558
|
-
f.data.push(f.param), h(f),
|
|
2607
|
+
f.data.push(f.param), h(f), T = !1, f.index < v && f.path.charCodeAt(f.index) === 44 && (f.index++, h(f), T = !0);
|
|
2559
2608
|
}
|
|
2560
|
-
if (!
|
|
2609
|
+
if (!T && (f.index >= f.max || !s(f.path.charCodeAt(f.index))))
|
|
2561
2610
|
break;
|
|
2562
2611
|
}
|
|
2563
2612
|
d(f);
|
|
2564
2613
|
}
|
|
2565
|
-
return
|
|
2614
|
+
return Ut = function(v) {
|
|
2566
2615
|
var y = new r(v), M = y.max;
|
|
2567
2616
|
for (h(y); y.index < M && !y.err.length; )
|
|
2568
2617
|
l(y);
|
|
@@ -2570,12 +2619,12 @@ function $1() {
|
|
|
2570
2619
|
err: y.err,
|
|
2571
2620
|
segments: y.result
|
|
2572
2621
|
};
|
|
2573
|
-
},
|
|
2622
|
+
}, Ut;
|
|
2574
2623
|
}
|
|
2575
|
-
var
|
|
2576
|
-
function
|
|
2577
|
-
if (
|
|
2578
|
-
|
|
2624
|
+
var $t, k0;
|
|
2625
|
+
function ie() {
|
|
2626
|
+
if (k0) return $t;
|
|
2627
|
+
k0 = 1;
|
|
2579
2628
|
function n(t, o) {
|
|
2580
2629
|
return [
|
|
2581
2630
|
t[0] * o[0] + t[2] * o[1],
|
|
@@ -2620,13 +2669,13 @@ function ee() {
|
|
|
2620
2669
|
t * a[0] + o * a[2] + (i ? 0 : a[4]),
|
|
2621
2670
|
t * a[1] + o * a[3] + (i ? 0 : a[5])
|
|
2622
2671
|
]) : [t, o];
|
|
2623
|
-
},
|
|
2672
|
+
}, $t = e, $t;
|
|
2624
2673
|
}
|
|
2625
|
-
var
|
|
2626
|
-
function
|
|
2627
|
-
if (
|
|
2628
|
-
|
|
2629
|
-
var n =
|
|
2674
|
+
var Wt, _0;
|
|
2675
|
+
function G1() {
|
|
2676
|
+
if (_0) return Wt;
|
|
2677
|
+
_0 = 1;
|
|
2678
|
+
var n = ie(), e = {
|
|
2630
2679
|
matrix: !0,
|
|
2631
2680
|
scale: !0,
|
|
2632
2681
|
rotate: !0,
|
|
@@ -2634,7 +2683,7 @@ function W1() {
|
|
|
2634
2683
|
skewX: !0,
|
|
2635
2684
|
skewY: !0
|
|
2636
2685
|
}, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
|
|
2637
|
-
return
|
|
2686
|
+
return Wt = function(a) {
|
|
2638
2687
|
var s = new n(), r, h;
|
|
2639
2688
|
return a.split(t).forEach(function(c) {
|
|
2640
2689
|
if (c.length) {
|
|
@@ -2666,55 +2715,55 @@ function W1() {
|
|
|
2666
2715
|
}
|
|
2667
2716
|
}
|
|
2668
2717
|
}), s;
|
|
2669
|
-
},
|
|
2718
|
+
}, Wt;
|
|
2670
2719
|
}
|
|
2671
|
-
var
|
|
2672
|
-
function
|
|
2673
|
-
if (
|
|
2674
|
-
|
|
2720
|
+
var Yt, O0;
|
|
2721
|
+
function K1() {
|
|
2722
|
+
if (O0) return Yt;
|
|
2723
|
+
O0 = 1;
|
|
2675
2724
|
var n = Math.PI * 2;
|
|
2676
2725
|
function e(i, a, s, r) {
|
|
2677
2726
|
var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
|
|
2678
2727
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2679
2728
|
}
|
|
2680
2729
|
function t(i, a, s, r, h, c, u, d, l, f) {
|
|
2681
|
-
var v = f * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + f * (a - r) / 2, M = u * u,
|
|
2682
|
-
E < 0 && (E = 0), E /= M *
|
|
2683
|
-
var
|
|
2730
|
+
var v = f * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + f * (a - r) / 2, M = u * u, T = d * d, S = v * v, P = y * y, E = M * T - M * P - T * S;
|
|
2731
|
+
E < 0 && (E = 0), E /= M * P + T * S, E = Math.sqrt(E) * (h === c ? -1 : 1);
|
|
2732
|
+
var L = E * u / d * y, I = E * -d / u * v, F = f * L - l * I + (i + s) / 2, X = l * L + f * I + (a + r) / 2, z = (v - L) / u, U = (y - I) / d, tt = (-v - L) / u, et = (-y - I) / d, nt = e(1, 0, z, U), Z = e(z, U, tt, et);
|
|
2684
2733
|
return c === 0 && Z > 0 && (Z -= n), c === 1 && Z < 0 && (Z += n), [F, X, nt, Z];
|
|
2685
2734
|
}
|
|
2686
2735
|
function o(i, a) {
|
|
2687
2736
|
var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), u = Math.sin(i + a);
|
|
2688
2737
|
return [r, h, r - h * s, h + r * s, c + u * s, u - c * s, c, u];
|
|
2689
2738
|
}
|
|
2690
|
-
return
|
|
2691
|
-
var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), M = y * (a - r) / 2 + v * (s - h) / 2,
|
|
2692
|
-
if (M === 0 &&
|
|
2739
|
+
return Yt = function(a, s, r, h, c, u, d, l, f) {
|
|
2740
|
+
var v = Math.sin(f * n / 360), y = Math.cos(f * n / 360), M = y * (a - r) / 2 + v * (s - h) / 2, T = -v * (a - r) / 2 + y * (s - h) / 2;
|
|
2741
|
+
if (M === 0 && T === 0)
|
|
2693
2742
|
return [];
|
|
2694
2743
|
if (d === 0 || l === 0)
|
|
2695
2744
|
return [];
|
|
2696
2745
|
d = Math.abs(d), l = Math.abs(l);
|
|
2697
|
-
var S = M * M / (d * d) +
|
|
2746
|
+
var S = M * M / (d * d) + T * T / (l * l);
|
|
2698
2747
|
S > 1 && (d *= Math.sqrt(S), l *= Math.sqrt(S));
|
|
2699
|
-
var
|
|
2748
|
+
var P = t(a, s, r, h, c, u, d, l, v, y), E = [], L = P[2], I = P[3], F = Math.max(Math.ceil(Math.abs(I) / (n / 4)), 1);
|
|
2700
2749
|
I /= F;
|
|
2701
2750
|
for (var X = 0; X < F; X++)
|
|
2702
|
-
E.push(o(
|
|
2751
|
+
E.push(o(L, I)), L += I;
|
|
2703
2752
|
return E.map(function(z) {
|
|
2704
|
-
for (var
|
|
2705
|
-
var tt = z[
|
|
2753
|
+
for (var U = 0; U < z.length; U += 2) {
|
|
2754
|
+
var tt = z[U + 0], et = z[U + 1];
|
|
2706
2755
|
tt *= d, et *= l;
|
|
2707
2756
|
var nt = y * tt - v * et, Z = v * tt + y * et;
|
|
2708
|
-
z[
|
|
2757
|
+
z[U + 0] = nt + P[0], z[U + 1] = Z + P[1];
|
|
2709
2758
|
}
|
|
2710
2759
|
return z;
|
|
2711
2760
|
});
|
|
2712
|
-
},
|
|
2761
|
+
}, Yt;
|
|
2713
2762
|
}
|
|
2714
|
-
var
|
|
2715
|
-
function
|
|
2716
|
-
if (
|
|
2717
|
-
|
|
2763
|
+
var Xt, N0;
|
|
2764
|
+
function V1() {
|
|
2765
|
+
if (N0) return Xt;
|
|
2766
|
+
N0 = 1;
|
|
2718
2767
|
var n = 1e-10, e = Math.PI / 180;
|
|
2719
2768
|
function t(o, i, a) {
|
|
2720
2769
|
if (!(this instanceof t))
|
|
@@ -2738,13 +2787,13 @@ function X1() {
|
|
|
2738
2787
|
) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(f)) : (this.ax += 90, this.rx = Math.sqrt(f), this.ry = Math.sqrt(l)), this;
|
|
2739
2788
|
}, t.prototype.isDegenerate = function() {
|
|
2740
2789
|
return this.rx < n * this.ry || this.ry < n * this.rx;
|
|
2741
|
-
},
|
|
2790
|
+
}, Xt = t, Xt;
|
|
2742
2791
|
}
|
|
2743
|
-
var
|
|
2744
|
-
function
|
|
2745
|
-
if (
|
|
2746
|
-
|
|
2747
|
-
var n =
|
|
2792
|
+
var Gt, R0;
|
|
2793
|
+
function Z1() {
|
|
2794
|
+
if (R0) return Gt;
|
|
2795
|
+
R0 = 1;
|
|
2796
|
+
var n = X1(), e = G1(), t = ie(), o = K1(), i = V1();
|
|
2748
2797
|
function a(s) {
|
|
2749
2798
|
if (!(this instanceof a))
|
|
2750
2799
|
return new a(s);
|
|
@@ -2782,8 +2831,8 @@ function G1() {
|
|
|
2782
2831
|
break;
|
|
2783
2832
|
case "a":
|
|
2784
2833
|
case "A":
|
|
2785
|
-
var
|
|
2786
|
-
if (
|
|
2834
|
+
var T = s.toArray(), S = i(c[1], c[2], c[3]).transform(T);
|
|
2835
|
+
if (T[0] * T[3] - T[1] * T[2] < 0 && (c[5] = c[5] ? "0" : "1"), f = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === d && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
|
|
2787
2836
|
v = [c[0] === "a" ? "l" : "L", f[0], f[1]];
|
|
2788
2837
|
break;
|
|
2789
2838
|
}
|
|
@@ -2869,40 +2918,40 @@ function G1() {
|
|
|
2869
2918
|
}
|
|
2870
2919
|
}), this;
|
|
2871
2920
|
}, a.prototype.iterate = function(s, r) {
|
|
2872
|
-
var h = this.segments, c = {}, u = !1, d = 0, l = 0, f = 0, v = 0, y, M,
|
|
2873
|
-
if (r || this.__evaluateStack(), h.forEach(function(S,
|
|
2874
|
-
var E = s(S,
|
|
2875
|
-
Array.isArray(E) && (c[
|
|
2876
|
-
var
|
|
2921
|
+
var h = this.segments, c = {}, u = !1, d = 0, l = 0, f = 0, v = 0, y, M, T;
|
|
2922
|
+
if (r || this.__evaluateStack(), h.forEach(function(S, P) {
|
|
2923
|
+
var E = s(S, P, d, l);
|
|
2924
|
+
Array.isArray(E) && (c[P] = E, u = !0);
|
|
2925
|
+
var L = S[0] === S[0].toLowerCase();
|
|
2877
2926
|
switch (S[0]) {
|
|
2878
2927
|
case "m":
|
|
2879
2928
|
case "M":
|
|
2880
|
-
d = S[1] + (
|
|
2929
|
+
d = S[1] + (L ? d : 0), l = S[2] + (L ? l : 0), f = d, v = l;
|
|
2881
2930
|
return;
|
|
2882
2931
|
case "h":
|
|
2883
2932
|
case "H":
|
|
2884
|
-
d = S[1] + (
|
|
2933
|
+
d = S[1] + (L ? d : 0);
|
|
2885
2934
|
return;
|
|
2886
2935
|
case "v":
|
|
2887
2936
|
case "V":
|
|
2888
|
-
l = S[1] + (
|
|
2937
|
+
l = S[1] + (L ? l : 0);
|
|
2889
2938
|
return;
|
|
2890
2939
|
case "z":
|
|
2891
2940
|
case "Z":
|
|
2892
2941
|
d = f, l = v;
|
|
2893
2942
|
return;
|
|
2894
2943
|
default:
|
|
2895
|
-
d = S[S.length - 2] + (
|
|
2944
|
+
d = S[S.length - 2] + (L ? d : 0), l = S[S.length - 1] + (L ? l : 0);
|
|
2896
2945
|
}
|
|
2897
2946
|
}), !u)
|
|
2898
2947
|
return this;
|
|
2899
|
-
for (
|
|
2948
|
+
for (T = [], y = 0; y < h.length; y++)
|
|
2900
2949
|
if (typeof c[y] < "u")
|
|
2901
2950
|
for (M = 0; M < c[y].length; M++)
|
|
2902
|
-
|
|
2951
|
+
T.push(c[y][M]);
|
|
2903
2952
|
else
|
|
2904
|
-
|
|
2905
|
-
return this.segments =
|
|
2953
|
+
T.push(h[y]);
|
|
2954
|
+
return this.segments = T, this;
|
|
2906
2955
|
}, a.prototype.abs = function() {
|
|
2907
2956
|
return this.iterate(function(s, r, h, c) {
|
|
2908
2957
|
var u = s[0], d = u.toUpperCase(), l;
|
|
@@ -2945,14 +2994,14 @@ function G1() {
|
|
|
2945
2994
|
}, a.prototype.unshort = function() {
|
|
2946
2995
|
var s = this.segments, r, h, c, u, d;
|
|
2947
2996
|
return this.iterate(function(l, f, v, y) {
|
|
2948
|
-
var M = l[0],
|
|
2949
|
-
f && (
|
|
2997
|
+
var M = l[0], T = M.toUpperCase(), S;
|
|
2998
|
+
f && (T === "T" ? (S = M === "t", c = s[f - 1], c[0] === "Q" ? (r = c[1] - v, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), u = -r, d = -h, S || (u += v, d += y), s[f] = [
|
|
2950
2999
|
S ? "q" : "Q",
|
|
2951
3000
|
u,
|
|
2952
3001
|
d,
|
|
2953
3002
|
l[1],
|
|
2954
3003
|
l[2]
|
|
2955
|
-
]) :
|
|
3004
|
+
]) : T === "S" && (S = M === "s", c = s[f - 1], c[0] === "C" ? (r = c[3] - v, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), u = -r, d = -h, S || (u += v, d += y), s[f] = [
|
|
2956
3005
|
S ? "c" : "C",
|
|
2957
3006
|
u,
|
|
2958
3007
|
d,
|
|
@@ -2962,41 +3011,41 @@ function G1() {
|
|
|
2962
3011
|
l[4]
|
|
2963
3012
|
]));
|
|
2964
3013
|
}), this;
|
|
2965
|
-
},
|
|
3014
|
+
}, Gt = a, Gt;
|
|
2966
3015
|
}
|
|
2967
|
-
var
|
|
2968
|
-
function
|
|
2969
|
-
return
|
|
3016
|
+
var Kt, F0;
|
|
3017
|
+
function Q1() {
|
|
3018
|
+
return F0 || (F0 = 1, Kt = Z1()), Kt;
|
|
2970
3019
|
}
|
|
2971
|
-
var
|
|
2972
|
-
const
|
|
2973
|
-
var
|
|
2974
|
-
function
|
|
3020
|
+
var J1 = Q1();
|
|
3021
|
+
const tn = /* @__PURE__ */ Y1(J1);
|
|
3022
|
+
var Vt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, en = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
3023
|
+
function nn(n) {
|
|
2975
3024
|
var e = [];
|
|
2976
|
-
return n.replace(
|
|
3025
|
+
return n.replace(en, function(t, o, i) {
|
|
2977
3026
|
var a = o.toLowerCase();
|
|
2978
|
-
for (i =
|
|
2979
|
-
if (i.length ===
|
|
3027
|
+
for (i = on(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
3028
|
+
if (i.length === Vt[a])
|
|
2980
3029
|
return i.unshift(o), e.push(i);
|
|
2981
|
-
if (i.length <
|
|
3030
|
+
if (i.length < Vt[a])
|
|
2982
3031
|
throw new Error("malformed path data");
|
|
2983
|
-
e.push([o].concat(i.splice(0,
|
|
3032
|
+
e.push([o].concat(i.splice(0, Vt[a])));
|
|
2984
3033
|
}
|
|
2985
3034
|
}), e;
|
|
2986
3035
|
}
|
|
2987
|
-
var
|
|
2988
|
-
function
|
|
2989
|
-
var e = n.match(
|
|
3036
|
+
var rn = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
3037
|
+
function on(n) {
|
|
3038
|
+
var e = n.match(rn);
|
|
2990
3039
|
return e ? e.map(Number) : [];
|
|
2991
3040
|
}
|
|
2992
3041
|
function it(n, e, t, o, i, a, s, r) {
|
|
2993
|
-
return new
|
|
3042
|
+
return new e0(n, e, t, o, i, a, s, r);
|
|
2994
3043
|
}
|
|
2995
|
-
function
|
|
2996
|
-
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 =
|
|
3044
|
+
function e0(n, e, t, o, i, a, s, r) {
|
|
3045
|
+
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 = pn, this.getPoint = hn, this.getDerivative = an) : (this.getArcLength = ln, this.getPoint = oe, this.getDerivative = sn), this.init();
|
|
2997
3046
|
}
|
|
2998
|
-
|
|
2999
|
-
constructor:
|
|
3047
|
+
e0.prototype = {
|
|
3048
|
+
constructor: e0,
|
|
3000
3049
|
init: function() {
|
|
3001
3050
|
this.length = this.getArcLength(
|
|
3002
3051
|
[this.a.x, this.b.x, this.c.x, this.d.x],
|
|
@@ -3007,7 +3056,7 @@ t0.prototype = {
|
|
|
3007
3056
|
return this.length;
|
|
3008
3057
|
},
|
|
3009
3058
|
getPointAtLength: function(n) {
|
|
3010
|
-
var e =
|
|
3059
|
+
var e = Zt(
|
|
3011
3060
|
n,
|
|
3012
3061
|
this.length,
|
|
3013
3062
|
this.getArcLength,
|
|
@@ -3021,7 +3070,7 @@ t0.prototype = {
|
|
|
3021
3070
|
);
|
|
3022
3071
|
},
|
|
3023
3072
|
getTangentAtLength: function(n) {
|
|
3024
|
-
var e =
|
|
3073
|
+
var e = Zt(
|
|
3025
3074
|
n,
|
|
3026
3075
|
this.length,
|
|
3027
3076
|
this.getArcLength,
|
|
@@ -3035,7 +3084,7 @@ t0.prototype = {
|
|
|
3035
3084
|
return o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 }, i;
|
|
3036
3085
|
},
|
|
3037
3086
|
getPropertiesAtLength: function(n) {
|
|
3038
|
-
var e =
|
|
3087
|
+
var e = Zt(
|
|
3039
3088
|
n,
|
|
3040
3089
|
this.length,
|
|
3041
3090
|
this.getArcLength,
|
|
@@ -3055,36 +3104,36 @@ t0.prototype = {
|
|
|
3055
3104
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
3056
3105
|
}
|
|
3057
3106
|
};
|
|
3058
|
-
function
|
|
3107
|
+
function sn(n, e, t) {
|
|
3059
3108
|
return {
|
|
3060
3109
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
3061
3110
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
3062
3111
|
};
|
|
3063
3112
|
}
|
|
3064
|
-
function
|
|
3065
|
-
var o =
|
|
3113
|
+
function an(n, e, t) {
|
|
3114
|
+
var o = oe(
|
|
3066
3115
|
[3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
|
|
3067
3116
|
[3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
|
|
3068
3117
|
t
|
|
3069
3118
|
);
|
|
3070
3119
|
return o;
|
|
3071
3120
|
}
|
|
3072
|
-
function
|
|
3121
|
+
function Zt(n, e, t, o, i) {
|
|
3073
3122
|
for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
|
|
3074
3123
|
var h = t(o, i, s + r), c = t(o, i, s - r), u = Math.abs(n - h) / e, d = Math.abs(n - c) / e;
|
|
3075
3124
|
u < a ? (a = u, s += r) : d < a ? (a = d, s -= r) : r /= 2;
|
|
3076
3125
|
}
|
|
3077
3126
|
return s;
|
|
3078
3127
|
}
|
|
3079
|
-
function
|
|
3128
|
+
function oe(n, e, t) {
|
|
3080
3129
|
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];
|
|
3081
3130
|
return { x: o, y: i };
|
|
3082
3131
|
}
|
|
3083
|
-
function
|
|
3132
|
+
function hn(n, e, t) {
|
|
3084
3133
|
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];
|
|
3085
3134
|
return { x: o, y: i };
|
|
3086
3135
|
}
|
|
3087
|
-
function
|
|
3136
|
+
function ln(n, e, t) {
|
|
3088
3137
|
t === void 0 && (t = 1);
|
|
3089
3138
|
var o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
3090
3139
|
if (r === 0)
|
|
@@ -3094,7 +3143,7 @@ function sn(n, e, t) {
|
|
|
3094
3143
|
(l + Math.sqrt(l * l + f)) / (u + Math.sqrt(u * u + f))
|
|
3095
3144
|
)));
|
|
3096
3145
|
}
|
|
3097
|
-
var
|
|
3146
|
+
var cn = [
|
|
3098
3147
|
[],
|
|
3099
3148
|
[],
|
|
3100
3149
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -3120,7 +3169,7 @@ var an = [
|
|
|
3120
3169
|
[-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],
|
|
3121
3170
|
[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],
|
|
3122
3171
|
[-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]
|
|
3123
|
-
],
|
|
3172
|
+
], un = [
|
|
3124
3173
|
[],
|
|
3125
3174
|
[],
|
|
3126
3175
|
[1, 1],
|
|
@@ -3146,53 +3195,53 @@ var an = [
|
|
|
3146
3195
|
[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],
|
|
3147
3196
|
[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],
|
|
3148
3197
|
[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]
|
|
3149
|
-
],
|
|
3150
|
-
function
|
|
3151
|
-
return
|
|
3198
|
+
], fn = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
3199
|
+
function gn(n, e) {
|
|
3200
|
+
return fn[n][e];
|
|
3152
3201
|
}
|
|
3153
|
-
function
|
|
3202
|
+
function n0(n, e, t) {
|
|
3154
3203
|
var o = t.length - 1, i, a, s;
|
|
3155
3204
|
if (o === 0)
|
|
3156
3205
|
return 0;
|
|
3157
3206
|
if (n === 0) {
|
|
3158
3207
|
for (a = 0, s = 0; s <= o; s++)
|
|
3159
|
-
a +=
|
|
3208
|
+
a += gn(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
3160
3209
|
return a;
|
|
3161
3210
|
} else {
|
|
3162
3211
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
3163
3212
|
i[s] = o * (t[s + 1] - t[s]);
|
|
3164
|
-
return
|
|
3213
|
+
return n0(n - 1, e, i);
|
|
3165
3214
|
}
|
|
3166
3215
|
}
|
|
3167
|
-
function
|
|
3168
|
-
var o =
|
|
3216
|
+
function dn(n, e, t) {
|
|
3217
|
+
var o = n0(1, t, n), i = n0(1, t, e), a = o * o + i * i;
|
|
3169
3218
|
return Math.sqrt(a);
|
|
3170
3219
|
}
|
|
3171
|
-
function
|
|
3220
|
+
function pn(n, e, t) {
|
|
3172
3221
|
var o, i, a, s;
|
|
3173
3222
|
t === void 0 && (t = 1);
|
|
3174
3223
|
var r = 20;
|
|
3175
3224
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
3176
|
-
s = o *
|
|
3225
|
+
s = o * cn[r][a] + o, i += un[r][a] * dn(n, e, s);
|
|
3177
3226
|
return o * i;
|
|
3178
3227
|
}
|
|
3179
|
-
var
|
|
3180
|
-
function
|
|
3228
|
+
var Et = Math.PI * 2;
|
|
3229
|
+
function B0(n, e, t, o) {
|
|
3181
3230
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
3182
3231
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
3183
3232
|
}
|
|
3184
|
-
function
|
|
3233
|
+
function xn(n, e, t, o, i, a, s, r, h, c) {
|
|
3185
3234
|
var u = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, f = r * r, v = u * u, y = d * d, M = l * f - l * y - f * v;
|
|
3186
3235
|
M < 0 && (M = 0), M /= l * y + f * v, M = Math.sqrt(M) * (i === a ? -1 : 1);
|
|
3187
|
-
var
|
|
3188
|
-
return a === 0 &&
|
|
3236
|
+
var T = M * s / r * d, S = M * -r / s * u, P = c * T - h * S + (n + t) / 2, E = h * T + c * S + (e + o) / 2, L = (u - T) / s, I = (d - S) / r, F = (-u - T) / s, X = (-d - S) / r, z = B0(1, 0, L, I), U = B0(L, I, F, X);
|
|
3237
|
+
return a === 0 && U > 0 && (U -= Et), a === 1 && U < 0 && (U += Et), [P, E, z, U];
|
|
3189
3238
|
}
|
|
3190
|
-
function
|
|
3239
|
+
function yn(n, e) {
|
|
3191
3240
|
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);
|
|
3192
3241
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
3193
3242
|
}
|
|
3194
|
-
function
|
|
3195
|
-
var c = Math.sin(i *
|
|
3243
|
+
function vn(n, e, t, o, i, a, s, r, h) {
|
|
3244
|
+
var c = Math.sin(i * Et / 360), u = Math.cos(i * Et / 360), d = u * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + u * (e - h) / 2;
|
|
3196
3245
|
if (d === 0 && l === 0)
|
|
3197
3246
|
return [];
|
|
3198
3247
|
if (t === 0 || o === 0)
|
|
@@ -3200,32 +3249,32 @@ function pn(n, e, t, o, i, a, s, r, h) {
|
|
|
3200
3249
|
t = Math.abs(t), o = Math.abs(o);
|
|
3201
3250
|
var f = d * d / (t * t) + l * l / (o * o);
|
|
3202
3251
|
f > 1 && (t *= Math.sqrt(f), o *= Math.sqrt(f));
|
|
3203
|
-
var v =
|
|
3204
|
-
|
|
3205
|
-
for (var
|
|
3206
|
-
y.push(
|
|
3252
|
+
var v = xn(n, e, r, h, a, s, t, o, c, u), y = [], M = v[2], T = v[3], S = Math.max(Math.ceil(Math.abs(T) / (Et / 4)), 1);
|
|
3253
|
+
T /= S;
|
|
3254
|
+
for (var P = 0; P < S; P++)
|
|
3255
|
+
y.push(yn(M, T)), M += T;
|
|
3207
3256
|
return y.map(function(E) {
|
|
3208
|
-
for (var
|
|
3209
|
-
var I = E[
|
|
3257
|
+
for (var L = 0; L < E.length; L += 2) {
|
|
3258
|
+
var I = E[L + 0], F = E[L + 1];
|
|
3210
3259
|
I *= t, F *= o;
|
|
3211
3260
|
var X = u * I - c * F, z = c * I + u * F;
|
|
3212
|
-
E[
|
|
3261
|
+
E[L + 0] = X + v[0], E[L + 1] = z + v[1];
|
|
3213
3262
|
}
|
|
3214
3263
|
return E;
|
|
3215
3264
|
});
|
|
3216
3265
|
}
|
|
3217
|
-
function
|
|
3218
|
-
return new
|
|
3266
|
+
function D0(n, e, t, o, i, a, s, r, h) {
|
|
3267
|
+
return new r0(n, e, t, o, i, a, s, r, h);
|
|
3219
3268
|
}
|
|
3220
|
-
function
|
|
3221
|
-
var c = 0, u = [], d = [], l =
|
|
3269
|
+
function r0(n, e, t, o, i, a, s, r, h) {
|
|
3270
|
+
var c = 0, u = [], d = [], l = vn(n, e, t, o, i, a, s, r, h);
|
|
3222
3271
|
l.forEach(function(f) {
|
|
3223
3272
|
var v = new it(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]), y = v.getTotalLength();
|
|
3224
3273
|
c += y, u.push(y), d.push(v);
|
|
3225
3274
|
}), this.length = c, this.partialLengths = u, this.curves = d;
|
|
3226
3275
|
}
|
|
3227
|
-
|
|
3228
|
-
constructor:
|
|
3276
|
+
r0.prototype = {
|
|
3277
|
+
constructor: r0,
|
|
3229
3278
|
init: function() {
|
|
3230
3279
|
},
|
|
3231
3280
|
getTotalLength: function() {
|
|
@@ -3255,33 +3304,33 @@ n0.prototype = {
|
|
|
3255
3304
|
}
|
|
3256
3305
|
};
|
|
3257
3306
|
function rt(n, e, t, o) {
|
|
3258
|
-
return new
|
|
3307
|
+
return new _t(n, e, t, o);
|
|
3259
3308
|
}
|
|
3260
|
-
function
|
|
3309
|
+
function _t(n, e, t, o) {
|
|
3261
3310
|
this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
|
|
3262
3311
|
}
|
|
3263
|
-
|
|
3312
|
+
_t.prototype.getTotalLength = function() {
|
|
3264
3313
|
return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
|
|
3265
3314
|
};
|
|
3266
|
-
|
|
3315
|
+
_t.prototype.getPointAtLength = function(n) {
|
|
3267
3316
|
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;
|
|
3268
3317
|
return { x: this.x0 + t, y: this.y0 + o };
|
|
3269
3318
|
};
|
|
3270
|
-
|
|
3319
|
+
_t.prototype.getTangentAtLength = function() {
|
|
3271
3320
|
var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
|
|
3272
3321
|
return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
|
|
3273
3322
|
};
|
|
3274
|
-
|
|
3323
|
+
_t.prototype.getPropertiesAtLength = function(n) {
|
|
3275
3324
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
3276
3325
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
3277
3326
|
};
|
|
3278
|
-
function
|
|
3327
|
+
function wn(n) {
|
|
3279
3328
|
var e = 0, t = [], o = [];
|
|
3280
3329
|
function i(s) {
|
|
3281
3330
|
if (!s)
|
|
3282
3331
|
return null;
|
|
3283
|
-
for (var r =
|
|
3284
|
-
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new rt(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new rt(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new rt(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new rt(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new rt(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + u.getTotalLength(), h = [r[l][5], r[l][6]], o.push(u)) : r[l][0] === "c" ? (u = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + u.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(u)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + u.getTotalLength(), h = [r[l][3], r[l][4]], o.push(u)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], h[0] + u.d.x - u.c.x, h[1] + u.d.y - u.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : u = new it(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + u.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + u.getTotalLength(), o.push(u), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? u = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : u = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + u.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : u = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(u), e = e + u.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : u = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + u.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(u)) : r[l][0] === "A" ? (u = new
|
|
3332
|
+
for (var r = nn(s), h = [0, 0], c = [0, 0], u, d, l = 0; l < r.length; l++)
|
|
3333
|
+
r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new rt(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new rt(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new rt(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new rt(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new rt(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + u.getTotalLength(), h = [r[l][5], r[l][6]], o.push(u)) : r[l][0] === "c" ? (u = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + u.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(u)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + u.getTotalLength(), h = [r[l][3], r[l][4]], o.push(u)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], h[0] + u.d.x - u.c.x, h[1] + u.d.y - u.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : u = new it(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + u.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? u = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : u = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + u.getTotalLength(), o.push(u), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? u = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : u = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + u.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(u)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : u = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(u), e = e + u.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? u = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : u = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + u.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(u)) : r[l][0] === "A" ? (u = new D0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + u.getTotalLength(), h = [r[l][6], r[l][7]], o.push(u)) : r[l][0] === "a" && (u = new D0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + u.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(u)), t.push(e);
|
|
3285
3334
|
return i;
|
|
3286
3335
|
}
|
|
3287
3336
|
i.getTotalLength = function() {
|
|
@@ -3304,49 +3353,49 @@ function xn(n) {
|
|
|
3304
3353
|
};
|
|
3305
3354
|
return i(n);
|
|
3306
3355
|
}
|
|
3307
|
-
function
|
|
3356
|
+
function Bt(n, e) {
|
|
3308
3357
|
return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
|
|
3309
3358
|
}
|
|
3310
|
-
function
|
|
3359
|
+
function se(n, e, t) {
|
|
3311
3360
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
3312
3361
|
}
|
|
3313
|
-
function
|
|
3314
|
-
return
|
|
3362
|
+
function mn(n, e) {
|
|
3363
|
+
return Bt(n, e) < 1e-9;
|
|
3315
3364
|
}
|
|
3316
|
-
function
|
|
3317
|
-
let o = n.map((i, a) =>
|
|
3365
|
+
function bn(n, e, t) {
|
|
3366
|
+
let o = n.map((i, a) => An(i, e[a]));
|
|
3318
3367
|
return function(i) {
|
|
3319
3368
|
let a = o.map((s) => s(i));
|
|
3320
|
-
return t ?
|
|
3369
|
+
return t ? Tn(a) : a;
|
|
3321
3370
|
};
|
|
3322
3371
|
}
|
|
3323
|
-
function
|
|
3372
|
+
function An(n, e) {
|
|
3324
3373
|
return function(t) {
|
|
3325
3374
|
return n.map((o, i) => o + t * (e[i] - o));
|
|
3326
3375
|
};
|
|
3327
3376
|
}
|
|
3328
|
-
function
|
|
3377
|
+
function Ft(n) {
|
|
3329
3378
|
return typeof n == "number" && isFinite(n);
|
|
3330
3379
|
}
|
|
3331
|
-
const
|
|
3380
|
+
const i0 = `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).
|
|
3332
3381
|
Example valid ways of supplying a shape would be:
|
|
3333
3382
|
[[0, 0], [10, 0], [10, 10]]
|
|
3334
3383
|
"M0,0 L10,0 L10,10Z"
|
|
3335
3384
|
`;
|
|
3336
|
-
function
|
|
3337
|
-
return new
|
|
3385
|
+
function Mn(n) {
|
|
3386
|
+
return new tn(n).abs();
|
|
3338
3387
|
}
|
|
3339
|
-
function
|
|
3388
|
+
function Ln(n) {
|
|
3340
3389
|
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
3341
3390
|
}
|
|
3342
|
-
function
|
|
3391
|
+
function Tn(n) {
|
|
3343
3392
|
return "M" + n.join("L") + "Z";
|
|
3344
3393
|
}
|
|
3345
|
-
function
|
|
3346
|
-
let t =
|
|
3347
|
-
return
|
|
3394
|
+
function Cn(n, e) {
|
|
3395
|
+
let t = Mn(n);
|
|
3396
|
+
return Pn(t) || Sn(t, e);
|
|
3348
3397
|
}
|
|
3349
|
-
function
|
|
3398
|
+
function Pn(n) {
|
|
3350
3399
|
let e = n.segments || [], t = [];
|
|
3351
3400
|
if (!e.length || e[0][0] !== "M")
|
|
3352
3401
|
return !1;
|
|
@@ -3365,11 +3414,11 @@ function Ln(n) {
|
|
|
3365
3414
|
}
|
|
3366
3415
|
return t.length ? { ring: t } : !1;
|
|
3367
3416
|
}
|
|
3368
|
-
function
|
|
3369
|
-
let t =
|
|
3417
|
+
function Sn(n, e) {
|
|
3418
|
+
let t = Ln(n)[0], o = [], i, a, s = 3;
|
|
3370
3419
|
if (!t)
|
|
3371
|
-
throw new TypeError(
|
|
3372
|
-
a =
|
|
3420
|
+
throw new TypeError(i0);
|
|
3421
|
+
a = En(t), i = a.getTotalLength(), e && Ft(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
3373
3422
|
for (let r = 0; r < s; r++) {
|
|
3374
3423
|
let h = a.getPointAtLength(i * r / s);
|
|
3375
3424
|
o.push([h.x, h.y]);
|
|
@@ -3379,87 +3428,87 @@ function Tn(n, e) {
|
|
|
3379
3428
|
skipBisect: !0
|
|
3380
3429
|
};
|
|
3381
3430
|
}
|
|
3382
|
-
function
|
|
3431
|
+
function En(n) {
|
|
3383
3432
|
if (typeof window < "u" && window && window.document)
|
|
3384
3433
|
try {
|
|
3385
3434
|
let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3386
3435
|
return e.setAttributeNS(null, "d", n), e;
|
|
3387
3436
|
} catch {
|
|
3388
3437
|
}
|
|
3389
|
-
return
|
|
3438
|
+
return wn(n);
|
|
3390
3439
|
}
|
|
3391
|
-
function
|
|
3392
|
-
const t = n.length + e, o =
|
|
3440
|
+
function q0(n, e) {
|
|
3441
|
+
const t = n.length + e, o = W1(n) / e;
|
|
3393
3442
|
let i = 0, a = 0, s = o / 2;
|
|
3394
3443
|
for (; n.length < t; ) {
|
|
3395
|
-
let r = n[i], h = n[(i + 1) % n.length], c =
|
|
3444
|
+
let r = n[i], h = n[(i + 1) % n.length], c = Bt(r, h);
|
|
3396
3445
|
if (s <= a + c) {
|
|
3397
|
-
n.splice(i + 1, 0, c ?
|
|
3446
|
+
n.splice(i + 1, 0, c ? se(r, h, (s - a) / c) : r.slice(0)), s += o;
|
|
3398
3447
|
continue;
|
|
3399
3448
|
}
|
|
3400
3449
|
a += c, i++;
|
|
3401
3450
|
}
|
|
3402
3451
|
}
|
|
3403
|
-
function
|
|
3452
|
+
function In(n, e = 1 / 0) {
|
|
3404
3453
|
for (let t = 0; t < n.length; t++) {
|
|
3405
3454
|
let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
|
|
3406
|
-
for (;
|
|
3407
|
-
i =
|
|
3455
|
+
for (; Bt(o, i) > e; )
|
|
3456
|
+
i = se(o, i, 0.5), n.splice(t + 1, 0, i);
|
|
3408
3457
|
}
|
|
3409
3458
|
}
|
|
3410
|
-
function
|
|
3459
|
+
function z0(n, e) {
|
|
3411
3460
|
let t, o, i;
|
|
3412
3461
|
if (typeof n == "string") {
|
|
3413
|
-
let a =
|
|
3462
|
+
let a = Cn(n, e);
|
|
3414
3463
|
n = a.ring, i = a.skipBisect;
|
|
3415
3464
|
} else if (!Array.isArray(n))
|
|
3416
|
-
throw new TypeError(
|
|
3417
|
-
if (t = n.slice(0), !
|
|
3418
|
-
throw new TypeError(
|
|
3419
|
-
return t.length > 1 &&
|
|
3465
|
+
throw new TypeError(i0);
|
|
3466
|
+
if (t = n.slice(0), !kn(t))
|
|
3467
|
+
throw new TypeError(i0);
|
|
3468
|
+
return t.length > 1 && mn(t[0], t[t.length - 1]) && t.pop(), o = $1(t), o > 0 && t.reverse(), !i && e && Ft(e) && e > 0 && In(t, e), t;
|
|
3420
3469
|
}
|
|
3421
|
-
function
|
|
3470
|
+
function kn(n) {
|
|
3422
3471
|
return n.every(function(e) {
|
|
3423
|
-
return Array.isArray(e) && e.length >= 2 &&
|
|
3472
|
+
return Array.isArray(e) && e.length >= 2 && Ft(e[0]) && Ft(e[1]);
|
|
3424
3473
|
});
|
|
3425
3474
|
}
|
|
3426
|
-
function
|
|
3475
|
+
function _n(n, e) {
|
|
3427
3476
|
let t = n.length, o = 1 / 0, i, a, s;
|
|
3428
3477
|
for (let r = 0; r < t; r++)
|
|
3429
3478
|
a = 0, e.forEach(function(h, c) {
|
|
3430
|
-
let u =
|
|
3479
|
+
let u = Bt(n[(r + c) % t], h);
|
|
3431
3480
|
a += u * u;
|
|
3432
3481
|
}), a < o && (o = a, i = r);
|
|
3433
3482
|
i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
|
|
3434
3483
|
}
|
|
3435
|
-
function
|
|
3436
|
-
let i =
|
|
3484
|
+
function On(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
3485
|
+
let i = z0(n, t), a = z0(e, t), s = Nn(i, a, o);
|
|
3437
3486
|
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);
|
|
3438
3487
|
}
|
|
3439
|
-
function
|
|
3488
|
+
function Nn(n, e, t) {
|
|
3440
3489
|
let o;
|
|
3441
|
-
return o = n.length - e.length,
|
|
3490
|
+
return o = n.length - e.length, q0(n, o < 0 ? o * -1 : 0), q0(e, o > 0 ? o : 0), _n(n, e), bn(n, e, t);
|
|
3442
3491
|
}
|
|
3443
|
-
var
|
|
3444
|
-
function
|
|
3445
|
-
if (
|
|
3446
|
-
|
|
3492
|
+
var Ot = { exports: {} }, H0;
|
|
3493
|
+
function Rn() {
|
|
3494
|
+
if (H0) return Ot.exports;
|
|
3495
|
+
H0 = 1, Ot.exports = n, Ot.exports.default = n;
|
|
3447
3496
|
function n(g, x, p) {
|
|
3448
3497
|
p = p || 2;
|
|
3449
3498
|
var w = x && x.length, m = w ? x[0] * p : g.length, b = e(g, 0, m, p, !0), A = [];
|
|
3450
3499
|
if (!b || b.next === b.prev) return A;
|
|
3451
|
-
var C, N, _,
|
|
3500
|
+
var C, N, _, W, H, B, K;
|
|
3452
3501
|
if (w && (b = h(g, x, b, p)), g.length > 80 * p) {
|
|
3453
|
-
C = _ = g[0], N =
|
|
3454
|
-
for (var
|
|
3455
|
-
|
|
3456
|
-
K = Math.max(_ - C,
|
|
3502
|
+
C = _ = g[0], N = W = g[1];
|
|
3503
|
+
for (var j = p; j < m; j += p)
|
|
3504
|
+
H = g[j], B = g[j + 1], H < C && (C = H), B < N && (N = B), H > _ && (_ = H), B > W && (W = B);
|
|
3505
|
+
K = Math.max(_ - C, W - N), K = K !== 0 ? 32767 / K : 0;
|
|
3457
3506
|
}
|
|
3458
3507
|
return o(b, A, p, C, N, K, 0), A;
|
|
3459
3508
|
}
|
|
3460
3509
|
function e(g, x, p, w, m) {
|
|
3461
3510
|
var b, A;
|
|
3462
|
-
if (m ===
|
|
3511
|
+
if (m === Dt(g, x, p, w) > 0)
|
|
3463
3512
|
for (b = x; b < p; b += w) A = et(b, g[b], g[b + 1], A);
|
|
3464
3513
|
else
|
|
3465
3514
|
for (b = p - w; b >= x; b -= w) A = et(b, g[b], g[b + 1], A);
|
|
@@ -3470,7 +3519,7 @@ function _n() {
|
|
|
3470
3519
|
x || (x = g);
|
|
3471
3520
|
var p = g, w;
|
|
3472
3521
|
do
|
|
3473
|
-
if (w = !1, !p.steiner && (E(p, p.next) ||
|
|
3522
|
+
if (w = !1, !p.steiner && (E(p, p.next) || P(p.prev, p, p.next) === 0)) {
|
|
3474
3523
|
if (nt(p), p = x = p.prev, p === p.next) break;
|
|
3475
3524
|
w = !0;
|
|
3476
3525
|
} else
|
|
@@ -3495,26 +3544,26 @@ function _n() {
|
|
|
3495
3544
|
}
|
|
3496
3545
|
function i(g) {
|
|
3497
3546
|
var x = g.prev, p = g, w = g.next;
|
|
3498
|
-
if (
|
|
3499
|
-
for (var m = x.x, b = p.x, A = w.x, C = x.y, N = p.y, _ = w.y,
|
|
3500
|
-
if (
|
|
3501
|
-
|
|
3547
|
+
if (P(x, p, w) >= 0) return !1;
|
|
3548
|
+
for (var m = x.x, b = p.x, A = w.x, C = x.y, N = p.y, _ = w.y, W = m < b ? m < A ? m : A : b < A ? b : A, H = C < N ? C < _ ? C : _ : N < _ ? N : _, B = m > b ? m > A ? m : A : b > A ? b : A, K = C > N ? C > _ ? C : _ : N > _ ? N : _, j = w.next; j !== x; ) {
|
|
3549
|
+
if (j.x >= W && j.x <= B && j.y >= H && j.y <= K && T(m, C, b, N, A, _, j.x, j.y) && P(j.prev, j, j.next) >= 0) return !1;
|
|
3550
|
+
j = j.next;
|
|
3502
3551
|
}
|
|
3503
3552
|
return !0;
|
|
3504
3553
|
}
|
|
3505
3554
|
function a(g, x, p, w) {
|
|
3506
3555
|
var m = g.prev, b = g, A = g.next;
|
|
3507
|
-
if (
|
|
3508
|
-
for (var C = m.x, N = b.x, _ = A.x,
|
|
3509
|
-
if (D.x >= K && D.x <=
|
|
3556
|
+
if (P(m, b, A) >= 0) return !1;
|
|
3557
|
+
for (var C = m.x, N = b.x, _ = A.x, W = m.y, H = b.y, B = A.y, K = C < N ? C < _ ? C : _ : N < _ ? N : _, j = W < H ? W < B ? W : B : H < B ? H : B, Ct = C > N ? C > _ ? C : _ : N > _ ? N : _, Pt = W > H ? W > B ? W : B : H > B ? H : B, d0 = y(K, j, x, p, w), p0 = y(Ct, Pt, x, p, w), D = g.prevZ, q = g.nextZ; D && D.z >= d0 && q && q.z <= p0; ) {
|
|
3558
|
+
if (D.x >= K && D.x <= Ct && D.y >= j && D.y <= Pt && D !== m && D !== A && T(C, W, N, H, _, B, D.x, D.y) && P(D.prev, D, D.next) >= 0 || (D = D.prevZ, q.x >= K && q.x <= Ct && q.y >= j && q.y <= Pt && q !== m && q !== A && T(C, W, N, H, _, B, q.x, q.y) && P(q.prev, q, q.next) >= 0)) return !1;
|
|
3510
3559
|
q = q.nextZ;
|
|
3511
3560
|
}
|
|
3512
|
-
for (; D && D.z >=
|
|
3513
|
-
if (D.x >= K && D.x <=
|
|
3561
|
+
for (; D && D.z >= d0; ) {
|
|
3562
|
+
if (D.x >= K && D.x <= Ct && D.y >= j && D.y <= Pt && D !== m && D !== A && T(C, W, N, H, _, B, D.x, D.y) && P(D.prev, D, D.next) >= 0) return !1;
|
|
3514
3563
|
D = D.prevZ;
|
|
3515
3564
|
}
|
|
3516
|
-
for (; q && q.z <=
|
|
3517
|
-
if (q.x >= K && q.x <=
|
|
3565
|
+
for (; q && q.z <= p0; ) {
|
|
3566
|
+
if (q.x >= K && q.x <= Ct && q.y >= j && q.y <= Pt && q !== m && q !== A && T(C, W, N, H, _, B, q.x, q.y) && P(q.prev, q, q.next) >= 0) return !1;
|
|
3518
3567
|
q = q.nextZ;
|
|
3519
3568
|
}
|
|
3520
3569
|
return !0;
|
|
@@ -3523,7 +3572,7 @@ function _n() {
|
|
|
3523
3572
|
var w = g;
|
|
3524
3573
|
do {
|
|
3525
3574
|
var m = w.prev, b = w.next.next;
|
|
3526
|
-
!E(m, b) &&
|
|
3575
|
+
!E(m, b) && L(m, w, w.next, b) && z(m, b) && z(b, m) && (x.push(m.i / p | 0), x.push(w.i / p | 0), x.push(b.i / p | 0), nt(w), nt(w.next), w = g = b), w = w.next;
|
|
3527
3576
|
} while (w !== g);
|
|
3528
3577
|
return t(w);
|
|
3529
3578
|
}
|
|
@@ -3570,15 +3619,15 @@ function _n() {
|
|
|
3570
3619
|
p = p.next;
|
|
3571
3620
|
} while (p !== x);
|
|
3572
3621
|
if (!A) return null;
|
|
3573
|
-
var N = A, _ = A.x,
|
|
3622
|
+
var N = A, _ = A.x, W = A.y, H = 1 / 0, B;
|
|
3574
3623
|
p = A;
|
|
3575
3624
|
do
|
|
3576
|
-
w >= p.x && p.x >= _ && w !== p.x &&
|
|
3625
|
+
w >= p.x && p.x >= _ && w !== p.x && T(m < W ? w : b, m, _, W, m < W ? b : w, m, p.x, p.y) && (B = Math.abs(m - p.y) / (w - p.x), z(p, g) && (B < H || B === H && (p.x > A.x || p.x === A.x && l(A, p))) && (A = p, H = B)), p = p.next;
|
|
3577
3626
|
while (p !== N);
|
|
3578
3627
|
return A;
|
|
3579
3628
|
}
|
|
3580
3629
|
function l(g, x) {
|
|
3581
|
-
return
|
|
3630
|
+
return P(g.prev, g, x.prev) < 0 && P(x.next, g, g.next) < 0;
|
|
3582
3631
|
}
|
|
3583
3632
|
function f(g, x, p, w) {
|
|
3584
3633
|
var m = g;
|
|
@@ -3611,23 +3660,23 @@ function _n() {
|
|
|
3611
3660
|
while (x !== g);
|
|
3612
3661
|
return p;
|
|
3613
3662
|
}
|
|
3614
|
-
function
|
|
3663
|
+
function T(g, x, p, w, m, b, A, C) {
|
|
3615
3664
|
return (m - A) * (x - C) >= (g - A) * (b - C) && (g - A) * (w - C) >= (p - A) * (x - C) && (p - A) * (b - C) >= (m - A) * (w - C);
|
|
3616
3665
|
}
|
|
3617
3666
|
function S(g, x) {
|
|
3618
3667
|
return g.next.i !== x.i && g.prev.i !== x.i && !X(g, x) && // dones't intersect other edges
|
|
3619
|
-
(z(g, x) && z(x, g) &&
|
|
3620
|
-
(
|
|
3621
|
-
E(g, x) &&
|
|
3668
|
+
(z(g, x) && z(x, g) && U(g, x) && // locally visible
|
|
3669
|
+
(P(g.prev, g, x.prev) || P(g, x.prev, x)) || // does not create opposite-facing sectors
|
|
3670
|
+
E(g, x) && P(g.prev, g, g.next) > 0 && P(x.prev, x, x.next) > 0);
|
|
3622
3671
|
}
|
|
3623
|
-
function
|
|
3672
|
+
function P(g, x, p) {
|
|
3624
3673
|
return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
|
|
3625
3674
|
}
|
|
3626
3675
|
function E(g, x) {
|
|
3627
3676
|
return g.x === x.x && g.y === x.y;
|
|
3628
3677
|
}
|
|
3629
|
-
function
|
|
3630
|
-
var m = F(
|
|
3678
|
+
function L(g, x, p, w) {
|
|
3679
|
+
var m = F(P(g, x, p)), b = F(P(g, x, w)), A = F(P(p, w, g)), C = F(P(p, w, x));
|
|
3631
3680
|
return !!(m !== b && A !== C || m === 0 && I(g, p, x) || b === 0 && I(g, w, x) || A === 0 && I(p, g, w) || C === 0 && I(p, x, w));
|
|
3632
3681
|
}
|
|
3633
3682
|
function I(g, x, p) {
|
|
@@ -3639,15 +3688,15 @@ function _n() {
|
|
|
3639
3688
|
function X(g, x) {
|
|
3640
3689
|
var p = g;
|
|
3641
3690
|
do {
|
|
3642
|
-
if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i &&
|
|
3691
|
+
if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && L(p, p.next, g, x)) return !0;
|
|
3643
3692
|
p = p.next;
|
|
3644
3693
|
} while (p !== g);
|
|
3645
3694
|
return !1;
|
|
3646
3695
|
}
|
|
3647
3696
|
function z(g, x) {
|
|
3648
|
-
return
|
|
3697
|
+
return P(g.prev, g, g.next) < 0 ? P(g, x, g.next) >= 0 && P(g, g.prev, x) >= 0 : P(g, x, g.prev) < 0 || P(g, g.next, x) < 0;
|
|
3649
3698
|
}
|
|
3650
|
-
function
|
|
3699
|
+
function U(g, x) {
|
|
3651
3700
|
var p = g, w = !1, m = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
|
|
3652
3701
|
do
|
|
3653
3702
|
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;
|
|
@@ -3669,22 +3718,22 @@ function _n() {
|
|
|
3669
3718
|
this.i = g, this.x = x, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
|
|
3670
3719
|
}
|
|
3671
3720
|
n.deviation = function(g, x, p, w) {
|
|
3672
|
-
var m = x && x.length, b = m ? x[0] * p : g.length, A = Math.abs(
|
|
3721
|
+
var m = x && x.length, b = m ? x[0] * p : g.length, A = Math.abs(Dt(g, 0, b, p));
|
|
3673
3722
|
if (m)
|
|
3674
3723
|
for (var C = 0, N = x.length; C < N; C++) {
|
|
3675
|
-
var _ = x[C] * p,
|
|
3676
|
-
A -= Math.abs(
|
|
3724
|
+
var _ = x[C] * p, W = C < N - 1 ? x[C + 1] * p : g.length;
|
|
3725
|
+
A -= Math.abs(Dt(g, _, W, p));
|
|
3677
3726
|
}
|
|
3678
|
-
var
|
|
3727
|
+
var H = 0;
|
|
3679
3728
|
for (C = 0; C < w.length; C += 3) {
|
|
3680
|
-
var B = w[C] * p, K = w[C + 1] * p,
|
|
3681
|
-
|
|
3682
|
-
(g[B] - g[
|
|
3729
|
+
var B = w[C] * p, K = w[C + 1] * p, j = w[C + 2] * p;
|
|
3730
|
+
H += Math.abs(
|
|
3731
|
+
(g[B] - g[j]) * (g[K + 1] - g[B + 1]) - (g[B] - g[K]) * (g[j + 1] - g[B + 1])
|
|
3683
3732
|
);
|
|
3684
3733
|
}
|
|
3685
|
-
return A === 0 &&
|
|
3734
|
+
return A === 0 && H === 0 ? 0 : Math.abs((H - A) / A);
|
|
3686
3735
|
};
|
|
3687
|
-
function
|
|
3736
|
+
function Dt(g, x, p, w) {
|
|
3688
3737
|
for (var m = 0, b = x, A = p - w; b < p; b += w)
|
|
3689
3738
|
m += (g[A] - g[b]) * (g[b + 1] + g[A + 1]), A = b;
|
|
3690
3739
|
return m;
|
|
@@ -3696,14 +3745,14 @@ function _n() {
|
|
|
3696
3745
|
m > 0 && (w += g[m - 1].length, p.holes.push(w));
|
|
3697
3746
|
}
|
|
3698
3747
|
return p;
|
|
3699
|
-
},
|
|
3748
|
+
}, Ot.exports;
|
|
3700
3749
|
}
|
|
3701
|
-
|
|
3702
|
-
function
|
|
3750
|
+
Rn();
|
|
3751
|
+
function ae(n, e) {
|
|
3703
3752
|
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
3704
3753
|
}
|
|
3705
|
-
function
|
|
3706
|
-
return n.length === 1 && (n =
|
|
3754
|
+
function Fn(n) {
|
|
3755
|
+
return n.length === 1 && (n = Bn(n)), {
|
|
3707
3756
|
left: function(e, t, o, i) {
|
|
3708
3757
|
for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
|
|
3709
3758
|
var a = o + i >>> 1;
|
|
@@ -3720,20 +3769,20 @@ function On(n) {
|
|
|
3720
3769
|
}
|
|
3721
3770
|
};
|
|
3722
3771
|
}
|
|
3723
|
-
function
|
|
3772
|
+
function Bn(n) {
|
|
3724
3773
|
return function(e, t) {
|
|
3725
|
-
return
|
|
3774
|
+
return ae(n(e), t);
|
|
3726
3775
|
};
|
|
3727
3776
|
}
|
|
3728
|
-
|
|
3729
|
-
function
|
|
3730
|
-
const o =
|
|
3777
|
+
Fn(ae);
|
|
3778
|
+
function sr(n, e, t = 3) {
|
|
3779
|
+
const o = On(n, e, { maxSegmentLength: t });
|
|
3731
3780
|
return {
|
|
3732
3781
|
check: (i) => typeof i == "string",
|
|
3733
3782
|
interpolate: (i, a, s) => o(s)
|
|
3734
3783
|
};
|
|
3735
3784
|
}
|
|
3736
|
-
function
|
|
3785
|
+
function ar(n) {
|
|
3737
3786
|
const e = (o) => n.width * o, t = (o) => n.height * o;
|
|
3738
3787
|
return {
|
|
3739
3788
|
scaleX: e,
|
|
@@ -3744,7 +3793,7 @@ function i2(n) {
|
|
|
3744
3793
|
})
|
|
3745
3794
|
};
|
|
3746
3795
|
}
|
|
3747
|
-
function
|
|
3796
|
+
function hr(n) {
|
|
3748
3797
|
const e = [];
|
|
3749
3798
|
if (n.isAllKey) {
|
|
3750
3799
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3758,47 +3807,47 @@ function o2(n) {
|
|
|
3758
3807
|
export {
|
|
3759
3808
|
xt as Alignment,
|
|
3760
3809
|
ot as Anchor,
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3810
|
+
a0 as Animate,
|
|
3811
|
+
Wn as Arrow,
|
|
3812
|
+
er as BrowserCanvasRenderer,
|
|
3813
|
+
Yn as Circle,
|
|
3765
3814
|
G as Color,
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3815
|
+
s0 as Easing,
|
|
3816
|
+
qn as FadeIn,
|
|
3817
|
+
zn as FadeOut,
|
|
3818
|
+
Fe as FontStyle,
|
|
3819
|
+
De as FontWeight,
|
|
3820
|
+
Xn as Grid,
|
|
3821
|
+
x0 as Group,
|
|
3822
|
+
Hn as Hide,
|
|
3823
|
+
Un as IFrame,
|
|
3824
|
+
Gn as Image,
|
|
3825
|
+
Kn as Line,
|
|
3826
|
+
Vn as Mask,
|
|
3827
|
+
$ as ObjectType,
|
|
3828
|
+
or as Opaque,
|
|
3829
|
+
Zn as Path,
|
|
3830
|
+
nr as Pause,
|
|
3831
|
+
Qn as Polygon,
|
|
3783
3832
|
Y as Position,
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3833
|
+
t1 as Presentation,
|
|
3834
|
+
Jn as Rectangle,
|
|
3835
|
+
tr as SVG,
|
|
3836
|
+
$n as ScreenCapture,
|
|
3837
|
+
jn as Show,
|
|
3789
3838
|
at as Size,
|
|
3790
|
-
|
|
3839
|
+
rr as Slide,
|
|
3791
3840
|
lt as SlideObject,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3841
|
+
U0 as SlideWebExtra,
|
|
3842
|
+
je as Text,
|
|
3843
|
+
ir as TextUnit,
|
|
3844
|
+
Re as Transparent,
|
|
3845
|
+
j0 as Update,
|
|
3846
|
+
hr as getKeySlideBuildIndices,
|
|
3847
|
+
ar as getSizingFunctions,
|
|
3848
|
+
sr as getSmoothPathInterpolator,
|
|
3849
|
+
He as getTextContentLength,
|
|
3850
|
+
r1 as interpolateColor,
|
|
3851
|
+
o1 as interpolateNumber
|
|
3803
3852
|
};
|
|
3804
3853
|
//# sourceMappingURL=presenter.mjs.map
|