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