presenter 0.8.0 → 0.8.1
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/export.js +24 -24
- package/dist/export.js.map +1 -1
- package/dist/export.mjs +1167 -1137
- package/dist/export.mjs.map +1 -1
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +893 -864
- package/dist/presenter.mjs.map +1 -1
- package/dist/renderer/browser-canvas/utils/text/getTextUnitMeasurements.d.ts +6 -1
- package/dist/types/TextStyle.d.ts +2 -0
- package/dist/utils/objects/text/getTextScriptVariant.d.ts +8 -0
- package/package.json +1 -1
package/dist/presenter.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (n, e, t) =>
|
|
4
|
-
const
|
|
1
|
+
var zt = Object.defineProperty;
|
|
2
|
+
var Ut = (n, e, t) => e in n ? zt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var k = (n, e, t) => Ut(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const f0 = {
|
|
5
5
|
/** Represents an animated change in an object's properties. */
|
|
6
6
|
ANIMATE: "Animate",
|
|
7
7
|
/** Represents a pause in the animation timeline. */
|
|
@@ -9,10 +9,10 @@ const u0 = {
|
|
|
9
9
|
/** Represents an immediate update to an object's properties without animation. */
|
|
10
10
|
UPDATE: "Update"
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function Yt(n) {
|
|
13
13
|
return n * n * n;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Ht(n) {
|
|
16
16
|
return --n * n * n + 1;
|
|
17
17
|
}
|
|
18
18
|
function Xt(n) {
|
|
@@ -33,7 +33,7 @@ var J0 = 1.70158;
|
|
|
33
33
|
}
|
|
34
34
|
return t.overshoot = n, t;
|
|
35
35
|
})(J0);
|
|
36
|
-
var
|
|
36
|
+
var $t = (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;
|
|
@@ -43,18 +43,18 @@ var Ht = (function n(e) {
|
|
|
43
43
|
const tt = {
|
|
44
44
|
LINEAR: (n) => n,
|
|
45
45
|
CUBIC: Xt,
|
|
46
|
-
CUBIC_IN:
|
|
47
|
-
CUBIC_OUT:
|
|
48
|
-
BACK_IN_OUT:
|
|
49
|
-
},
|
|
46
|
+
CUBIC_IN: Yt,
|
|
47
|
+
CUBIC_OUT: Ht,
|
|
48
|
+
BACK_IN_OUT: $t.overshoot(0.8)
|
|
49
|
+
}, Gt = tt.LINEAR;
|
|
50
50
|
function et(n, e, t = {}) {
|
|
51
51
|
return {
|
|
52
|
-
type:
|
|
52
|
+
type: f0.ANIMATE,
|
|
53
53
|
object: n,
|
|
54
54
|
props: e,
|
|
55
55
|
delay: 0,
|
|
56
56
|
duration: 1e3,
|
|
57
|
-
easing:
|
|
57
|
+
easing: Gt,
|
|
58
58
|
block: !1,
|
|
59
59
|
interpolators: null,
|
|
60
60
|
isKey: !1,
|
|
@@ -62,14 +62,14 @@ function et(n, e, t = {}) {
|
|
|
62
62
|
...typeof t == "number" ? { duration: t } : t
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function pn(n, e = {}) {
|
|
66
66
|
return et(n, { opacity: 1 }, {
|
|
67
67
|
duration: 500,
|
|
68
68
|
easing: tt.CUBIC,
|
|
69
69
|
...typeof e == "number" ? { duration: e } : e
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function dn(n, e = {}) {
|
|
73
73
|
return et(n, { opacity: 0 }, {
|
|
74
74
|
duration: 500,
|
|
75
75
|
easing: tt.CUBIC,
|
|
@@ -78,7 +78,7 @@ function fn(n, e = {}) {
|
|
|
78
78
|
}
|
|
79
79
|
function Ct(n, e, t = {}) {
|
|
80
80
|
return {
|
|
81
|
-
type:
|
|
81
|
+
type: f0.UPDATE,
|
|
82
82
|
isKey: !1,
|
|
83
83
|
object: n,
|
|
84
84
|
props: e,
|
|
@@ -86,13 +86,13 @@ function Ct(n, e, t = {}) {
|
|
|
86
86
|
...t
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function xn(n) {
|
|
90
90
|
return Ct(n, { opacity: 0 });
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function yn(n) {
|
|
93
93
|
return Ct(n, { opacity: 1 });
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const o0 = {
|
|
96
96
|
TOP_LEFT: "TopLeft",
|
|
97
97
|
TOP: "Top",
|
|
98
98
|
TOP_RIGHT: "TopRight",
|
|
@@ -102,11 +102,11 @@ const n0 = {
|
|
|
102
102
|
BOTTOM_LEFT: "BottomLeft",
|
|
103
103
|
BOTTOM: "Bottom",
|
|
104
104
|
BOTTOM_RIGHT: "BottomRight"
|
|
105
|
-
},
|
|
105
|
+
}, h0 = o0.TOP_LEFT;
|
|
106
106
|
function $(n, e = 0, t = 0, o = 1) {
|
|
107
107
|
if (typeof n == "string") {
|
|
108
108
|
const i = n.replace("#", ""), a = parseInt(i, 16);
|
|
109
|
-
return isNaN(a) ? (console.warn("Invalid hex color format:", n),
|
|
109
|
+
return isNaN(a) ? (console.warn("Invalid hex color format:", n), Q) : i.length === 6 ? {
|
|
110
110
|
red: a >> 16 & 255,
|
|
111
111
|
green: a >> 8 & 255,
|
|
112
112
|
blue: a & 255,
|
|
@@ -116,7 +116,7 @@ function $(n, e = 0, t = 0, o = 1) {
|
|
|
116
116
|
green: a >> 16 & 255,
|
|
117
117
|
blue: a >> 8 & 255,
|
|
118
118
|
alpha: (a & 255) / 255
|
|
119
|
-
} : (console.warn("Invalid hex color format:", n),
|
|
119
|
+
} : (console.warn("Invalid hex color format:", n), Q);
|
|
120
120
|
} else if (typeof n == "number")
|
|
121
121
|
return {
|
|
122
122
|
red: n,
|
|
@@ -138,12 +138,12 @@ $.GREEN = $(0, 255, 0);
|
|
|
138
138
|
$.RED = $(255, 0, 0);
|
|
139
139
|
$.TRANSPARENT = $(0, 0, 0, 0);
|
|
140
140
|
$.WHITE = $(255, 255, 255);
|
|
141
|
-
const
|
|
142
|
-
function
|
|
141
|
+
const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
142
|
+
function St(n = null) {
|
|
143
143
|
return {
|
|
144
144
|
content: null,
|
|
145
145
|
setup: null,
|
|
146
|
-
anchor:
|
|
146
|
+
anchor: o0.TOP_LEFT,
|
|
147
147
|
height: 0,
|
|
148
148
|
width: 0,
|
|
149
149
|
x: 0,
|
|
@@ -151,51 +151,51 @@ function Et(n = null) {
|
|
|
151
151
|
...n
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Et(n, e = null) {
|
|
155
155
|
return n.alpha * (e ?? 1);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(
|
|
157
|
+
function S0(n, e = null) {
|
|
158
|
+
const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(Et(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 vn(n = null) {
|
|
162
162
|
const {
|
|
163
163
|
url: e = "https://wikipedia.org/",
|
|
164
164
|
backgroundColor: t = $.TRANSPARENT,
|
|
165
|
-
strokeColor: o =
|
|
165
|
+
strokeColor: o = Q,
|
|
166
166
|
strokeWidth: i = 0,
|
|
167
167
|
pointerEvents: a = "auto",
|
|
168
168
|
scale: s = 1,
|
|
169
|
-
anchor: r =
|
|
169
|
+
anchor: r = h0,
|
|
170
170
|
height: h = 1e3,
|
|
171
171
|
width: c = 1e3,
|
|
172
172
|
x: f = 0,
|
|
173
|
-
y:
|
|
173
|
+
y: d = 0
|
|
174
174
|
} = n || {}, l = document.createElement("iframe");
|
|
175
|
-
l.src = e, l.style.backgroundColor =
|
|
175
|
+
l.src = e, l.style.backgroundColor = S0(t), l.style.border = i > 0 ? `${i}px solid ${S0(o)}` : "none", l.style.pointerEvents = a;
|
|
176
176
|
const u = (100 / s).toFixed(3) + "%";
|
|
177
|
-
return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left",
|
|
177
|
+
return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", St({
|
|
178
178
|
content: l,
|
|
179
179
|
anchor: r,
|
|
180
180
|
height: h,
|
|
181
181
|
width: c,
|
|
182
182
|
x: f,
|
|
183
|
-
y:
|
|
183
|
+
y: d
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
const x0 = {
|
|
187
187
|
LEFT: "left",
|
|
188
188
|
CENTER: "center",
|
|
189
189
|
RIGHT: "right"
|
|
190
|
-
},
|
|
191
|
-
function
|
|
190
|
+
}, Wt = x0.LEFT;
|
|
191
|
+
function s0(n, e) {
|
|
192
192
|
throw new Error("Unexpected value: " + n);
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function wn(n = null) {
|
|
195
195
|
const {
|
|
196
196
|
alignment: e = x0.LEFT,
|
|
197
197
|
scale: t = 1,
|
|
198
|
-
anchor: o =
|
|
198
|
+
anchor: o = h0,
|
|
199
199
|
height: i = 1e3,
|
|
200
200
|
width: a = 1e3,
|
|
201
201
|
x: s = 0,
|
|
@@ -214,16 +214,16 @@ function xn(n = null) {
|
|
|
214
214
|
f.style.transformOrigin = "top right";
|
|
215
215
|
break;
|
|
216
216
|
default:
|
|
217
|
-
|
|
217
|
+
s0(e);
|
|
218
218
|
}
|
|
219
219
|
c.appendChild(f);
|
|
220
|
-
const
|
|
220
|
+
const d = {
|
|
221
221
|
video: {
|
|
222
222
|
displaySurface: "window"
|
|
223
223
|
},
|
|
224
224
|
audio: !1
|
|
225
225
|
};
|
|
226
|
-
return navigator.mediaDevices.getDisplayMedia(
|
|
226
|
+
return navigator.mediaDevices.getDisplayMedia(d).then((l) => {
|
|
227
227
|
const u = l.getVideoTracks()[0];
|
|
228
228
|
u !== void 0 && (u.onended = function() {
|
|
229
229
|
f.style.display = "none";
|
|
@@ -234,7 +234,7 @@ function xn(n = null) {
|
|
|
234
234
|
f.srcObject.getTracks().forEach((u) => u.stop()), f.style.display = "none", f.srcObject = null;
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return St({
|
|
238
238
|
content: null,
|
|
239
239
|
setup: h,
|
|
240
240
|
anchor: o,
|
|
@@ -244,7 +244,7 @@ function xn(n = null) {
|
|
|
244
244
|
y: r
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
const
|
|
247
|
+
const U = {
|
|
248
248
|
ARROW: "Arrow",
|
|
249
249
|
CIRCLE: "Circle",
|
|
250
250
|
GROUP: "Group",
|
|
@@ -258,19 +258,19 @@ const j = {
|
|
|
258
258
|
SVG: "SVG",
|
|
259
259
|
TEXT: "Text"
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function l0(n) {
|
|
262
262
|
return {
|
|
263
|
-
objectType:
|
|
263
|
+
objectType: U.SLIDE_OBJECT,
|
|
264
264
|
opacity: 1,
|
|
265
265
|
...n
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function mn(n = null) {
|
|
269
269
|
const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
|
|
270
|
-
return
|
|
271
|
-
objectType:
|
|
270
|
+
return l0({
|
|
271
|
+
objectType: U.ARROW,
|
|
272
272
|
arrowheadSize: i,
|
|
273
|
-
color:
|
|
273
|
+
color: Q,
|
|
274
274
|
drawn: 1,
|
|
275
275
|
endX: 100,
|
|
276
276
|
endY: 100,
|
|
@@ -283,25 +283,25 @@ function yn(n = null) {
|
|
|
283
283
|
...o
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
return
|
|
289
|
-
objectType:
|
|
290
|
-
anchor:
|
|
291
|
-
strokeColor:
|
|
286
|
+
const Zt = 50;
|
|
287
|
+
function An(n = null) {
|
|
288
|
+
return l0({
|
|
289
|
+
objectType: U.CIRCLE,
|
|
290
|
+
anchor: h0,
|
|
291
|
+
strokeColor: Q,
|
|
292
292
|
strokeWidth: 0,
|
|
293
293
|
drawn: 1,
|
|
294
|
-
fillColor:
|
|
295
|
-
radius:
|
|
294
|
+
fillColor: Q,
|
|
295
|
+
radius: Zt,
|
|
296
296
|
x: 0,
|
|
297
297
|
y: 0,
|
|
298
298
|
...n
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
function st(n, e = null) {
|
|
302
|
-
return
|
|
303
|
-
objectType:
|
|
304
|
-
anchor:
|
|
302
|
+
return l0({
|
|
303
|
+
objectType: U.GROUP,
|
|
304
|
+
anchor: h0,
|
|
305
305
|
height: 0,
|
|
306
306
|
objects: n,
|
|
307
307
|
previewColor: null,
|
|
@@ -323,9 +323,9 @@ function st(n, e = null) {
|
|
|
323
323
|
...e
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function bn(n) {
|
|
327
327
|
const {
|
|
328
|
-
anchor: e =
|
|
328
|
+
anchor: e = h0,
|
|
329
329
|
cols: t = 1,
|
|
330
330
|
rows: o = 1,
|
|
331
331
|
gapX: i = 0,
|
|
@@ -335,40 +335,40 @@ function wn(n) {
|
|
|
335
335
|
height: h = 0,
|
|
336
336
|
x: c = 0,
|
|
337
337
|
y: f = 0,
|
|
338
|
-
objects:
|
|
338
|
+
objects: d = () => null
|
|
339
339
|
} = n, l = [], u = [];
|
|
340
|
-
let
|
|
341
|
-
for (let
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
let
|
|
345
|
-
for (let
|
|
346
|
-
const C =
|
|
347
|
-
|
|
340
|
+
let m = 0, y = 0;
|
|
341
|
+
for (let T = 0; T < o; T++) {
|
|
342
|
+
const S = [];
|
|
343
|
+
m = 0;
|
|
344
|
+
let P = 0;
|
|
345
|
+
for (let E = 0; E < t; E++) {
|
|
346
|
+
const C = d(T, E), O = typeof r == "function" ? r(T, E) : r, R = typeof h == "function" ? h(T, E) : h;
|
|
347
|
+
S.push(C), C != null && u.push(
|
|
348
348
|
st([C], {
|
|
349
|
-
x:
|
|
349
|
+
x: m,
|
|
350
350
|
y
|
|
351
351
|
})
|
|
352
|
-
),
|
|
352
|
+
), m += O + i, P = Math.max(P, R);
|
|
353
353
|
}
|
|
354
|
-
l.push(
|
|
354
|
+
l.push(S), y += P + a;
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
357
|
grid: st(u, {
|
|
358
358
|
x: c,
|
|
359
359
|
y: f,
|
|
360
360
|
height: y - a,
|
|
361
|
-
width:
|
|
361
|
+
width: m - i,
|
|
362
362
|
anchor: e,
|
|
363
363
|
...s
|
|
364
364
|
}),
|
|
365
365
|
objects: l
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
return
|
|
370
|
-
objectType:
|
|
371
|
-
anchor:
|
|
368
|
+
function Mn(n = null) {
|
|
369
|
+
return l0({
|
|
370
|
+
objectType: U.IMAGE,
|
|
371
|
+
anchor: h0,
|
|
372
372
|
cornerRadius: 0,
|
|
373
373
|
height: 100,
|
|
374
374
|
imageId: "",
|
|
@@ -379,10 +379,10 @@ function mn(n = null) {
|
|
|
379
379
|
...n
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
return
|
|
384
|
-
objectType:
|
|
385
|
-
color:
|
|
382
|
+
function Ln(n = null) {
|
|
383
|
+
return l0({
|
|
384
|
+
objectType: U.LINE,
|
|
385
|
+
color: Q,
|
|
386
386
|
drawn: 1,
|
|
387
387
|
endX: 100,
|
|
388
388
|
endY: 100,
|
|
@@ -394,10 +394,10 @@ function An(n = null) {
|
|
|
394
394
|
...n
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
399
|
-
objectType:
|
|
400
|
-
anchor:
|
|
397
|
+
function Tn(n, e = null) {
|
|
398
|
+
return l0({
|
|
399
|
+
objectType: U.MASK,
|
|
400
|
+
anchor: h0,
|
|
401
401
|
height: 100,
|
|
402
402
|
objects: n,
|
|
403
403
|
preview: !1,
|
|
@@ -407,11 +407,11 @@ function Mn(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 Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configurable: !0 }), P0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Kt = /([astvzqmhlc])([^astvzqmhlc]*)/gi, Qt = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, Jt = _((n) => {
|
|
411
|
+
const e = (n && n.length > 0 ? n : "M0,0").match(Kt);
|
|
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 = t1(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])];
|
|
@@ -426,10 +426,10 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
426
426
|
}
|
|
427
427
|
return t;
|
|
428
428
|
}, []);
|
|
429
|
-
}, "default"),
|
|
430
|
-
const e = n.match(
|
|
429
|
+
}, "default"), t1 = _((n) => {
|
|
430
|
+
const e = n.match(Qt);
|
|
431
431
|
return e ? e.map(Number) : [];
|
|
432
|
-
}, "parseValues"), w0,
|
|
432
|
+
}, "parseValues"), w0, J = (w0 = class {
|
|
433
433
|
constructor(e, t, o, i) {
|
|
434
434
|
k(this, "x0");
|
|
435
435
|
k(this, "x1");
|
|
@@ -483,51 +483,51 @@ var Zt = Object.defineProperty, _ = (n, e) => Zt(n, "name", { value: e, configur
|
|
|
483
483
|
return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
|
|
484
484
|
}, "getPropertiesAtLength"));
|
|
485
485
|
this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
|
|
486
|
-
const f =
|
|
487
|
-
return ht({ x: e, y: t }, o, i, a, s, r, { x: h, y: c },
|
|
486
|
+
const f = e1(300, function(d) {
|
|
487
|
+
return ht({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
|
|
488
488
|
});
|
|
489
489
|
this.length = f.arcLength;
|
|
490
490
|
}
|
|
491
491
|
}, _(m0, "Arc"), m0), ht = _((n, e, t, o, i, a, s, r) => {
|
|
492
|
-
e = Math.abs(e), t = Math.abs(t), o =
|
|
493
|
-
const h =
|
|
492
|
+
e = Math.abs(e), t = Math.abs(t), o = n1(o, 360);
|
|
493
|
+
const h = r1(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 c = (n.x - s.x) / 2, f = (n.y - s.y) / 2,
|
|
496
|
+
const c = (n.x - s.x) / 2, f = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * f, y: -Math.sin(h) * c + Math.cos(h) * f }, 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
|
-
let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(
|
|
498
|
+
let u = (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
|
u = u < 0 ? 0 : u;
|
|
500
|
-
const
|
|
501
|
-
let
|
|
502
|
-
!a &&
|
|
503
|
-
const C =
|
|
504
|
-
return { x: Math.cos(h) *
|
|
505
|
-
}, "pointOnEllipticalArc"),
|
|
500
|
+
const m = (i !== a ? 1 : -1) * Math.sqrt(u), y = m * (e * d.y / t), M = m * (-t * d.x / e), T = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, S = { x: (d.x - y) / e, y: (d.y - M) / t }, P = ct({ x: 1, y: 0 }, S);
|
|
501
|
+
let E = ct(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 C = P + E * r, O = e * Math.cos(C), R = t * Math.sin(C);
|
|
504
|
+
return { x: Math.cos(h) * O - Math.sin(h) * R + T.x, y: Math.sin(h) * O + Math.cos(h) * R + T.y, ellipticalArcStartAngle: P, ellipticalArcEndAngle: P + E, ellipticalArcAngle: C, ellipticalArcCenter: T, resultantRx: e, resultantRy: t };
|
|
505
|
+
}, "pointOnEllipticalArc"), e1 = _((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 =
|
|
511
|
+
const h = i1(r * (1 / n), 0, 1);
|
|
512
512
|
a = e(h), t += lt(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
|
|
513
513
|
}
|
|
514
514
|
return a = e(1), i.push([s, a]), t += lt(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
|
|
515
|
-
}, "approximateArcLengthOfCurve"),
|
|
515
|
+
}, "approximateArcLengthOfCurve"), n1 = _((n, e) => (n % e + e) % e, "mod"), r1 = _((n) => n * (Math.PI / 180), "toRadians"), lt = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), i1 = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), ct = _((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"), i1 = [[], [], [-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]], o1 = [[], [], [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]], s1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], a1 = _((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"), h1 = _((n, e, t) => kt([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"), l1 = _((n, e, t) => {
|
|
518
|
+
}, "angleBetween"), o1 = [[], [], [-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]], s1 = [[], [], [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]], a1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], h1 = _((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"), l1 = _((n, e, t) => kt([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"), c1 = _((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 * o1[20][s] + a, o += s1[20][s] * It(n, e, i);
|
|
523
523
|
return a * o;
|
|
524
|
-
}, "getCubicArcLength"), kt = _((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"),
|
|
524
|
+
}, "getCubicArcLength"), kt = _((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"), u1 = _((n, e, t) => {
|
|
525
525
|
t === void 0 && (t = 1);
|
|
526
526
|
const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
|
|
527
527
|
if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
528
|
-
const f = h / (2 * r),
|
|
529
|
-
return Math.sqrt(r) / 2 * (
|
|
530
|
-
}, "getQuadraticArcLength"),
|
|
528
|
+
const f = h / (2 * r), d = t + f, l = c / r - f * f, u = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, m = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (d + u) / (f + m) !== 0 ? l * Math.log(Math.abs((d + u) / (f + m))) : 0;
|
|
529
|
+
return Math.sqrt(r) / 2 * (d * u - f * m + y);
|
|
530
|
+
}, "getQuadraticArcLength"), f1 = _((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
531
|
function It(n, e, t) {
|
|
532
532
|
const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
|
|
533
533
|
return Math.sqrt(a);
|
|
@@ -539,7 +539,7 @@ var G0 = _((n, e, t) => {
|
|
|
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 += a1[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);
|
|
@@ -557,7 +557,7 @@ var G0 = _((n, e, t) => {
|
|
|
557
557
|
if (s++, s > 500) break;
|
|
558
558
|
}
|
|
559
559
|
return i;
|
|
560
|
-
}, "t2length"), A0,
|
|
560
|
+
}, "t2length"), A0, c0 = (A0 = class {
|
|
561
561
|
constructor(e, t, o, i, a, s, r, h) {
|
|
562
562
|
k(this, "a");
|
|
563
563
|
k(this, "b");
|
|
@@ -586,9 +586,9 @@ var G0 = _((n, e, t) => {
|
|
|
586
586
|
}, "getPropertiesAtLength"));
|
|
587
587
|
k(this, "getC", _(() => this.c, "getC"));
|
|
588
588
|
k(this, "getD", _(() => 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 = c1, this.getPoint = h1, this.getDerivative = l1, this.d = { x: r, y: h }) : (this.getArcLength = u1, this.getPoint = kt, this.getDerivative = f1, 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
|
-
}, _(A0, "Bezier"), A0),
|
|
591
|
+
}, _(A0, "Bezier"), A0), b0, g1 = (b0 = class {
|
|
592
592
|
constructor(e) {
|
|
593
593
|
k(this, "length", 0);
|
|
594
594
|
k(this, "partial_lengths", []);
|
|
@@ -628,60 +628,60 @@ var G0 = _((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 : Jt(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] });
|
|
635
635
|
else if (t[r][0] === "m") i = [t[r][1] + i[0], t[r][2] + i[1]], s = [i[0], i[1]], this.functions.push(null);
|
|
636
|
-
else if (t[r][0] === "L") this.length += Math.sqrt(Math.pow(i[0] - t[r][1], 2) + Math.pow(i[1] - t[r][2], 2)), this.functions.push(new
|
|
637
|
-
else if (t[r][0] === "l") this.length += Math.sqrt(Math.pow(t[r][1], 2) + Math.pow(t[r][2], 2)), this.functions.push(new
|
|
638
|
-
else if (t[r][0] === "H") this.length += Math.abs(i[0] - t[r][1]), this.functions.push(new
|
|
639
|
-
else if (t[r][0] === "h") this.length += Math.abs(t[r][1]), this.functions.push(new
|
|
640
|
-
else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new
|
|
641
|
-
else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new
|
|
642
|
-
else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new
|
|
643
|
-
else if (t[r][0] === "C") o = new
|
|
644
|
-
else if (t[r][0] === "c") o = new
|
|
636
|
+
else if (t[r][0] === "L") this.length += Math.sqrt(Math.pow(i[0] - t[r][1], 2) + Math.pow(i[1] - t[r][2], 2)), this.functions.push(new J(i[0], t[r][1], i[1], t[r][2])), i = [t[r][1], t[r][2]];
|
|
637
|
+
else if (t[r][0] === "l") this.length += Math.sqrt(Math.pow(t[r][1], 2) + Math.pow(t[r][2], 2)), this.functions.push(new J(i[0], t[r][1] + i[0], i[1], t[r][2] + i[1])), i = [t[r][1] + i[0], t[r][2] + i[1]];
|
|
638
|
+
else if (t[r][0] === "H") this.length += Math.abs(i[0] - t[r][1]), this.functions.push(new J(i[0], t[r][1], i[1], i[1])), i[0] = t[r][1];
|
|
639
|
+
else if (t[r][0] === "h") this.length += Math.abs(t[r][1]), this.functions.push(new J(i[0], i[0] + t[r][1], i[1], i[1])), i[0] = t[r][1] + i[0];
|
|
640
|
+
else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new J(i[0], i[0], i[1], t[r][1])), i[1] = t[r][1];
|
|
641
|
+
else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new J(i[0], i[0], i[1], i[1] + t[r][1])), i[1] = t[r][1] + i[1];
|
|
642
|
+
else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new J(i[0], s[0], i[1], s[1])), i = [s[0], s[1]];
|
|
643
|
+
else if (t[r][0] === "C") o = new c0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], t[r][5], t[r][6]), this.length += o.getTotalLength(), i = [t[r][5], t[r][6]], this.functions.push(o);
|
|
644
|
+
else if (t[r][0] === "c") o = new c0(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], i[0] + t[r][5], i[1] + t[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [t[r][5] + i[0], t[r][6] + i[1]]) : this.functions.push(new J(i[0], i[0], i[1], i[1]));
|
|
645
645
|
else if (t[r][0] === "S") {
|
|
646
646
|
if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
|
|
647
647
|
if (o) {
|
|
648
648
|
const h = o.getC();
|
|
649
|
-
o = new
|
|
649
|
+
o = new c0(i[0], i[1], 2 * i[0] - h.x, 2 * i[1] - h.y, t[r][1], t[r][2], t[r][3], t[r][4]);
|
|
650
650
|
}
|
|
651
|
-
} else o = new
|
|
651
|
+
} else o = new c0(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
|
|
652
652
|
o && (this.length += o.getTotalLength(), i = [t[r][3], t[r][4]], this.functions.push(o));
|
|
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
656
|
const h = o.getC(), c = o.getD();
|
|
657
|
-
o = new
|
|
657
|
+
o = new c0(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
|
-
} else o = new
|
|
659
|
+
} else o = new c0(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));
|
|
661
661
|
} else if (t[r][0] === "Q") {
|
|
662
662
|
if (i[0] === t[r][1] && i[1] === t[r][2]) {
|
|
663
|
-
const h = new
|
|
663
|
+
const h = new J(t[r][1], t[r][3], t[r][2], t[r][4]);
|
|
664
664
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
665
|
-
} else o = new
|
|
665
|
+
} else o = new c0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
666
666
|
i = [t[r][3], t[r][4]], a = [t[r][1], t[r][2]];
|
|
667
667
|
} else if (t[r][0] === "q") {
|
|
668
|
-
if (t[r][1] !== 0 || t[r][2] !== 0) o = new
|
|
668
|
+
if (t[r][1] !== 0 || t[r][2] !== 0) o = new c0(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
669
669
|
else {
|
|
670
|
-
const h = new
|
|
670
|
+
const h = new J(i[0] + t[r][1], i[0] + t[r][3], i[1] + t[r][2], i[1] + t[r][4]);
|
|
671
671
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
672
672
|
}
|
|
673
673
|
a = [i[0] + t[r][1], i[1] + t[r][2]], i = [t[r][3] + i[0], t[r][4] + i[1]];
|
|
674
674
|
} else if (t[r][0] === "T") {
|
|
675
|
-
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new
|
|
675
|
+
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new c0(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], t[r][1], t[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
|
|
676
676
|
else {
|
|
677
|
-
const h = new
|
|
677
|
+
const h = new J(i[0], t[r][1], i[1], t[r][2]);
|
|
678
678
|
this.functions.push(h), this.length += h.getTotalLength();
|
|
679
679
|
}
|
|
680
680
|
a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1], t[r][2]];
|
|
681
681
|
} else if (t[r][0] === "t") {
|
|
682
|
-
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new
|
|
682
|
+
if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new c0(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + t[r][1], i[1] + t[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
|
|
683
683
|
else {
|
|
684
|
-
const h = new
|
|
684
|
+
const h = new J(i[0], i[0] + t[r][1], i[1], i[1] + t[r][2]);
|
|
685
685
|
this.length += h.getTotalLength(), this.functions.push(h);
|
|
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]];
|
|
@@ -695,7 +695,7 @@ var G0 = _((n, e, t) => {
|
|
|
695
695
|
this.partial_lengths.push(this.length);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
}, _(
|
|
698
|
+
}, _(b0, "SVGPathProperties"), b0), M0, W0 = (M0 = class {
|
|
699
699
|
constructor(e) {
|
|
700
700
|
k(this, "inst");
|
|
701
701
|
k(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
|
|
@@ -703,20 +703,20 @@ var G0 = _((n, e, t) => {
|
|
|
703
703
|
k(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
|
|
704
704
|
k(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
|
|
705
705
|
k(this, "getParts", _(() => this.inst.getParts(), "getParts"));
|
|
706
|
-
if (this.inst = new
|
|
706
|
+
if (this.inst = new g1(e), !(this instanceof W0)) return new W0(e);
|
|
707
707
|
}
|
|
708
|
-
}, _(
|
|
709
|
-
function
|
|
708
|
+
}, _(M0, "_svgPathProperties"), M0);
|
|
709
|
+
function p1(n = $.BLACK) {
|
|
710
710
|
return { ...n, alpha: 0 };
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Pn(n = null) {
|
|
713
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 W0(r).getTotalLength();
|
|
714
|
-
return
|
|
715
|
-
objectType:
|
|
716
|
-
anchor:
|
|
717
|
-
strokeColor:
|
|
714
|
+
return l0({
|
|
715
|
+
objectType: U.PATH,
|
|
716
|
+
anchor: h0,
|
|
717
|
+
strokeColor: Q,
|
|
718
718
|
drawn: 1,
|
|
719
|
-
fillColor:
|
|
719
|
+
fillColor: p1(),
|
|
720
720
|
isRounded: !1,
|
|
721
721
|
height: t,
|
|
722
722
|
path: r,
|
|
@@ -730,10 +730,10 @@ function bn(n = null) {
|
|
|
730
730
|
...s
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
735
|
-
objectType:
|
|
736
|
-
strokeColor:
|
|
733
|
+
function Cn(n = null) {
|
|
734
|
+
return l0({
|
|
735
|
+
objectType: U.POLYGON,
|
|
736
|
+
strokeColor: Q,
|
|
737
737
|
strokeWidth: 0,
|
|
738
738
|
drawn: 1,
|
|
739
739
|
points: [
|
|
@@ -741,18 +741,18 @@ function Ln(n = null) {
|
|
|
741
741
|
{ x: 100, y: 0 },
|
|
742
742
|
{ x: 100, y: 100 }
|
|
743
743
|
],
|
|
744
|
-
fillColor:
|
|
744
|
+
fillColor: Q,
|
|
745
745
|
...n
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
return
|
|
750
|
-
objectType:
|
|
751
|
-
anchor:
|
|
752
|
-
strokeColor:
|
|
748
|
+
function Sn(n = null) {
|
|
749
|
+
return l0({
|
|
750
|
+
objectType: U.RECTANGLE,
|
|
751
|
+
anchor: h0,
|
|
752
|
+
strokeColor: Q,
|
|
753
753
|
strokeWidth: 0,
|
|
754
754
|
drawn: 1,
|
|
755
|
-
fillColor:
|
|
755
|
+
fillColor: Q,
|
|
756
756
|
height: 100,
|
|
757
757
|
cornerRadius: 0,
|
|
758
758
|
width: 100,
|
|
@@ -761,10 +761,10 @@ function Tn(n = null) {
|
|
|
761
761
|
...n
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
return
|
|
766
|
-
objectType:
|
|
767
|
-
anchor:
|
|
764
|
+
function En(n = null) {
|
|
765
|
+
return l0({
|
|
766
|
+
objectType: U.SVG,
|
|
767
|
+
anchor: h0,
|
|
768
768
|
height: 100,
|
|
769
769
|
svg: "",
|
|
770
770
|
width: 100,
|
|
@@ -773,11 +773,11 @@ function Pn(n = null) {
|
|
|
773
773
|
...n
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
const
|
|
776
|
+
const d1 = {
|
|
777
777
|
NORMAL: "normal",
|
|
778
778
|
ITALIC: "italic",
|
|
779
779
|
OBLIQUE: "oblique"
|
|
780
|
-
},
|
|
780
|
+
}, x1 = d1.NORMAL, y1 = {
|
|
781
781
|
THIN: 100,
|
|
782
782
|
EXTRA_LIGHT: 200,
|
|
783
783
|
LIGHT: 300,
|
|
@@ -787,46 +787,48 @@ const p1 = {
|
|
|
787
787
|
BOLD: 700,
|
|
788
788
|
EXTRA_BOLD: 800,
|
|
789
789
|
BLACK: 900
|
|
790
|
-
},
|
|
791
|
-
color:
|
|
790
|
+
}, v1 = y1.NORMAL, w1 = {
|
|
791
|
+
color: Q,
|
|
792
792
|
fontFamily: "sans-serif",
|
|
793
793
|
fontSize: 100,
|
|
794
|
-
fontStyle:
|
|
795
|
-
fontWeight:
|
|
796
|
-
ligatures: !1
|
|
794
|
+
fontStyle: x1,
|
|
795
|
+
fontWeight: v1,
|
|
796
|
+
ligatures: !1,
|
|
797
|
+
subscript: !1,
|
|
798
|
+
superscript: !1
|
|
797
799
|
};
|
|
798
800
|
function _t(n) {
|
|
799
801
|
return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
|
|
800
802
|
}
|
|
801
|
-
function
|
|
803
|
+
function m1(n) {
|
|
802
804
|
return _t(n).reduce(
|
|
803
805
|
(t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
|
|
804
806
|
0
|
|
805
807
|
);
|
|
806
808
|
}
|
|
807
|
-
function
|
|
808
|
-
return
|
|
809
|
-
objectType:
|
|
810
|
-
alignment:
|
|
811
|
-
anchor:
|
|
809
|
+
function A1(n = "", e = null) {
|
|
810
|
+
return l0({
|
|
811
|
+
objectType: U.TEXT,
|
|
812
|
+
alignment: Wt,
|
|
813
|
+
anchor: h0,
|
|
812
814
|
length: null,
|
|
813
815
|
lineSpacing: 1,
|
|
814
816
|
text: n,
|
|
815
817
|
x: 0,
|
|
816
818
|
y: 0,
|
|
817
|
-
...
|
|
819
|
+
...w1,
|
|
818
820
|
...e
|
|
819
821
|
});
|
|
820
822
|
}
|
|
821
|
-
|
|
823
|
+
A1.writeOn = (n, e = {}) => et(
|
|
822
824
|
n,
|
|
823
825
|
{
|
|
824
|
-
length:
|
|
826
|
+
length: m1(n.text)
|
|
825
827
|
},
|
|
826
828
|
e
|
|
827
829
|
);
|
|
828
830
|
let Z = null;
|
|
829
|
-
function
|
|
831
|
+
function b1({ presentation: n, onNavigateToSlide: e }) {
|
|
830
832
|
if (Z !== null && !Z.closed) {
|
|
831
833
|
Z.focus();
|
|
832
834
|
return;
|
|
@@ -843,64 +845,64 @@ function A1({ presentation: n, onNavigateToSlide: e }) {
|
|
|
843
845
|
function M1(n, e) {
|
|
844
846
|
const t = document.createElement("div");
|
|
845
847
|
return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
|
|
846
|
-
const a =
|
|
848
|
+
const a = L1(o, i);
|
|
847
849
|
a.style.cursor = "pointer", a.addEventListener("click", (s) => {
|
|
848
850
|
s.shiftKey && (Z == null || Z.close()), e(i);
|
|
849
851
|
}), t.appendChild(a);
|
|
850
852
|
}), t;
|
|
851
853
|
}
|
|
852
|
-
function
|
|
854
|
+
function L1(n, e) {
|
|
853
855
|
const t = document.createElement("div");
|
|
854
856
|
return t.style.marginBottom = "8px", t.style.padding = "8px", t.style.backgroundColor = "#eceed7", t.style.borderRadius = "4px", t.style.userSelect = "none", t.innerHTML = `${e + 1}: ` + (n.title.length > 0 ? n.title : `Slide ${e + 1}`), t;
|
|
855
857
|
}
|
|
856
|
-
function
|
|
858
|
+
function a0(n = null) {
|
|
857
859
|
return {
|
|
858
860
|
height: 0,
|
|
859
861
|
width: 0,
|
|
860
862
|
...n
|
|
861
863
|
};
|
|
862
864
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
+
const T1 = a0({ width: 0, height: 0 });
|
|
866
|
+
function P1(n = null) {
|
|
865
867
|
return {
|
|
866
868
|
backgroundColor: $.WHITE,
|
|
867
869
|
slides: [],
|
|
868
870
|
title: "Presentation",
|
|
869
|
-
size:
|
|
871
|
+
size: a0({ width: 3840, height: 2160 }),
|
|
870
872
|
resources: {
|
|
871
873
|
images: {}
|
|
872
874
|
},
|
|
873
875
|
...n
|
|
874
876
|
};
|
|
875
877
|
}
|
|
876
|
-
function
|
|
878
|
+
function C1(n) {
|
|
877
879
|
const e = Array.isArray(n) ? n : [n];
|
|
878
880
|
let t = 0, o = 0;
|
|
879
881
|
for (const i of e)
|
|
880
882
|
switch (i.type) {
|
|
881
|
-
case
|
|
883
|
+
case f0.PAUSE:
|
|
882
884
|
t += i.duration;
|
|
883
885
|
break;
|
|
884
|
-
case
|
|
886
|
+
case f0.ANIMATE:
|
|
885
887
|
o = Math.max(o, t + i.delay + i.duration), i.block && (t += i.delay + i.duration);
|
|
886
888
|
break;
|
|
887
|
-
case
|
|
889
|
+
case f0.UPDATE:
|
|
888
890
|
break;
|
|
889
891
|
default:
|
|
890
|
-
|
|
892
|
+
s0(i);
|
|
891
893
|
}
|
|
892
894
|
return o;
|
|
893
895
|
}
|
|
894
896
|
function nt(n, e = null) {
|
|
895
|
-
const { red: t, green: o, blue: i } = n, a =
|
|
897
|
+
const { red: t, green: o, blue: i } = n, a = Et(n, e);
|
|
896
898
|
return `rgba(${t}, ${o}, ${i}, ${a})`;
|
|
897
899
|
}
|
|
898
|
-
function
|
|
900
|
+
function S1(n) {
|
|
899
901
|
return n === document.body;
|
|
900
902
|
}
|
|
901
903
|
function E1(n, e) {
|
|
902
904
|
const t = document.createElement("div");
|
|
903
|
-
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto",
|
|
905
|
+
if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto", S1(e)) {
|
|
904
906
|
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";
|
|
905
907
|
const o = n.size.height / n.size.width;
|
|
906
908
|
ut(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => ut(t, o));
|
|
@@ -910,7 +912,7 @@ function E1(n, e) {
|
|
|
910
912
|
function ut(n, e) {
|
|
911
913
|
window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
|
|
912
914
|
}
|
|
913
|
-
const
|
|
915
|
+
const k1 = {
|
|
914
916
|
check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
|
|
915
917
|
interpolate: (n, e, t) => ({
|
|
916
918
|
red: Math.round(n.red + (e.red - n.red) * t),
|
|
@@ -918,18 +920,18 @@ const S1 = {
|
|
|
918
920
|
blue: Math.round(n.blue + (e.blue - n.blue) * t),
|
|
919
921
|
alpha: n.alpha + (e.alpha - n.alpha) * t
|
|
920
922
|
})
|
|
921
|
-
},
|
|
923
|
+
}, I1 = {
|
|
922
924
|
check: (n) => !0,
|
|
923
925
|
interpolate: (n, e) => e
|
|
924
|
-
},
|
|
926
|
+
}, _1 = {
|
|
925
927
|
check: (n) => typeof n == "number",
|
|
926
928
|
interpolate: (n, e, t) => n + (e - n) * t
|
|
927
929
|
}, ft = [
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
930
|
+
_1,
|
|
931
|
+
k1,
|
|
932
|
+
I1
|
|
931
933
|
];
|
|
932
|
-
function
|
|
934
|
+
function O1(n, e, t, o = null) {
|
|
933
935
|
if (t === 0)
|
|
934
936
|
return n;
|
|
935
937
|
if (t === 1)
|
|
@@ -958,7 +960,7 @@ function gt(n, e, t = null) {
|
|
|
958
960
|
if (t !== null && i > t)
|
|
959
961
|
break;
|
|
960
962
|
switch (a.type) {
|
|
961
|
-
case
|
|
963
|
+
case f0.ANIMATE: {
|
|
962
964
|
const s = n.get(a.object);
|
|
963
965
|
if (s === void 0)
|
|
964
966
|
break;
|
|
@@ -971,7 +973,7 @@ function gt(n, e, t = null) {
|
|
|
971
973
|
);
|
|
972
974
|
n.set(a.object, {
|
|
973
975
|
...s,
|
|
974
|
-
...
|
|
976
|
+
...O1(
|
|
975
977
|
s,
|
|
976
978
|
a.props,
|
|
977
979
|
a.easing(h),
|
|
@@ -980,7 +982,7 @@ function gt(n, e, t = null) {
|
|
|
980
982
|
}), a.block && (i += a.delay + a.duration);
|
|
981
983
|
break;
|
|
982
984
|
}
|
|
983
|
-
case
|
|
985
|
+
case f0.UPDATE: {
|
|
984
986
|
const s = n.get(a.object);
|
|
985
987
|
if (s === void 0)
|
|
986
988
|
break;
|
|
@@ -990,18 +992,18 @@ function gt(n, e, t = null) {
|
|
|
990
992
|
});
|
|
991
993
|
break;
|
|
992
994
|
}
|
|
993
|
-
case
|
|
995
|
+
case f0.PAUSE:
|
|
994
996
|
i += a.duration;
|
|
995
997
|
break;
|
|
996
998
|
default:
|
|
997
|
-
|
|
999
|
+
s0(a);
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
1000
1002
|
}
|
|
1001
1003
|
function Ot(n) {
|
|
1002
1004
|
return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
|
|
1003
1005
|
}
|
|
1004
|
-
function
|
|
1006
|
+
function F1({
|
|
1005
1007
|
slide: n,
|
|
1006
1008
|
buildIndex: e,
|
|
1007
1009
|
buildTime: t
|
|
@@ -1025,10 +1027,10 @@ function O1({
|
|
|
1025
1027
|
}
|
|
1026
1028
|
return o;
|
|
1027
1029
|
}
|
|
1028
|
-
function
|
|
1030
|
+
function R1(n) {
|
|
1029
1031
|
const e = {};
|
|
1030
1032
|
function t(o) {
|
|
1031
|
-
if (o.objectType ===
|
|
1033
|
+
if (o.objectType === U.SVG) {
|
|
1032
1034
|
const a = o.svg;
|
|
1033
1035
|
a !== void 0 && a.length > 0 && (e[a] = a);
|
|
1034
1036
|
}
|
|
@@ -1041,7 +1043,7 @@ function F1(n) {
|
|
|
1041
1043
|
t(i);
|
|
1042
1044
|
return e;
|
|
1043
1045
|
}
|
|
1044
|
-
function
|
|
1046
|
+
function N1(n) {
|
|
1045
1047
|
var o;
|
|
1046
1048
|
const { slides: e } = n, t = {
|
|
1047
1049
|
// First build of first slide
|
|
@@ -1080,8 +1082,8 @@ function N0(n, e, t, o) {
|
|
|
1080
1082
|
else
|
|
1081
1083
|
n[e] = { slideIndex: t, buildIndex: o };
|
|
1082
1084
|
}
|
|
1083
|
-
function
|
|
1084
|
-
t.shortcuts =
|
|
1085
|
+
function B1(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
|
|
1086
|
+
t.shortcuts = N1(n), e.addEventListener("mousemove", () => {
|
|
1085
1087
|
e.style.cursor = "auto";
|
|
1086
1088
|
}), e.addEventListener("keyup", (r) => {
|
|
1087
1089
|
if (r.code === "Escape") {
|
|
@@ -1141,7 +1143,7 @@ function q1(n, e) {
|
|
|
1141
1143
|
buildIndex: r
|
|
1142
1144
|
});
|
|
1143
1145
|
}
|
|
1144
|
-
function
|
|
1146
|
+
function D1({ title: n, slideIndex: e, buildIndex: t }) {
|
|
1145
1147
|
localStorage.setItem(
|
|
1146
1148
|
d0,
|
|
1147
1149
|
JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
|
|
@@ -1164,42 +1166,42 @@ const pt = Object.freeze({
|
|
|
1164
1166
|
Browser: "browser",
|
|
1165
1167
|
Node: "node"
|
|
1166
1168
|
};
|
|
1167
|
-
function
|
|
1169
|
+
function j1(n, e) {
|
|
1168
1170
|
e.context.clearRect(0, 0, n.width, n.height);
|
|
1169
1171
|
}
|
|
1170
|
-
function
|
|
1172
|
+
function z1(n) {
|
|
1171
1173
|
const e = document.createElement("canvas");
|
|
1172
1174
|
return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
|
|
1173
1175
|
}
|
|
1174
|
-
const
|
|
1176
|
+
const g0 = {
|
|
1175
1177
|
Browser: "browser",
|
|
1176
1178
|
Node: "node"
|
|
1177
1179
|
};
|
|
1178
|
-
function
|
|
1180
|
+
function U1(n) {
|
|
1179
1181
|
const e = new Path2D(n);
|
|
1180
1182
|
return {
|
|
1181
|
-
type:
|
|
1183
|
+
type: g0.Browser,
|
|
1182
1184
|
path: e
|
|
1183
1185
|
};
|
|
1184
1186
|
}
|
|
1185
|
-
function
|
|
1186
|
-
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a },
|
|
1187
|
-
x:
|
|
1188
|
-
y:
|
|
1189
|
-
},
|
|
1190
|
-
x:
|
|
1191
|
-
y:
|
|
1192
|
-
},
|
|
1193
|
-
x:
|
|
1194
|
-
y:
|
|
1195
|
-
},
|
|
1196
|
-
x:
|
|
1197
|
-
y:
|
|
1187
|
+
function Y1(n) {
|
|
1188
|
+
const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, d = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x, m = f.y - c.y, M = Math.hypot(u, m) * e, T = Math.cos(d), S = Math.sin(d), P = h ? { x: l.x - T * M / 2, y: l.y - S * M / 2 } : c, E = h ? { x: l.x + T * M / 2, y: l.y + S * M / 2 } : { x: c.x + T * M, y: c.y + S * M }, C = r ? Math.PI / 6 : Math.PI / 4.5, O = M < s * 2 ? M / 2 : s, R = {
|
|
1189
|
+
x: E.x - O * Math.cos(d - C),
|
|
1190
|
+
y: E.y - O * Math.sin(d - C)
|
|
1191
|
+
}, G = {
|
|
1192
|
+
x: E.x - O * Math.cos(d + C),
|
|
1193
|
+
y: E.y - O * Math.sin(d + C)
|
|
1194
|
+
}, z = {
|
|
1195
|
+
x: P.x + O * Math.cos(d - C),
|
|
1196
|
+
y: P.y + O * Math.sin(d - C)
|
|
1197
|
+
}, H = {
|
|
1198
|
+
x: P.x + O * Math.cos(d + C),
|
|
1199
|
+
y: P.y + O * Math.sin(d + C)
|
|
1198
1200
|
};
|
|
1199
1201
|
return {
|
|
1200
|
-
arrowPoints: [
|
|
1201
|
-
arrowheadPoints: [
|
|
1202
|
-
doubledArrowheadPoints: [
|
|
1202
|
+
arrowPoints: [P, E],
|
|
1203
|
+
arrowheadPoints: [R, E, G],
|
|
1204
|
+
doubledArrowheadPoints: [z, P, H]
|
|
1203
1205
|
};
|
|
1204
1206
|
}
|
|
1205
1207
|
function y0({
|
|
@@ -1224,19 +1226,19 @@ function y0({
|
|
|
1224
1226
|
]) : n.context.setLineDash([f, c - f]);
|
|
1225
1227
|
} else
|
|
1226
1228
|
n.context.setLineDash([]);
|
|
1227
|
-
if (n.context.lineWidth = h, n.context.strokeStyle =
|
|
1229
|
+
if (n.context.lineWidth = h, n.context.strokeStyle = S0(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
|
|
1228
1230
|
n.context.stroke();
|
|
1229
1231
|
return;
|
|
1230
1232
|
}
|
|
1231
1233
|
switch (n.type) {
|
|
1232
1234
|
case V.Browser:
|
|
1233
|
-
s.type ===
|
|
1235
|
+
s.type === g0.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1234
1236
|
break;
|
|
1235
1237
|
case V.Node:
|
|
1236
|
-
s.type ===
|
|
1238
|
+
s.type === g0.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1237
1239
|
break;
|
|
1238
1240
|
default:
|
|
1239
|
-
|
|
1241
|
+
s0(n);
|
|
1240
1242
|
}
|
|
1241
1243
|
}
|
|
1242
1244
|
}
|
|
@@ -1247,16 +1249,16 @@ function v0({ ctx: n, path: e, color: t, opacity: o = null }) {
|
|
|
1247
1249
|
}
|
|
1248
1250
|
switch (n.type) {
|
|
1249
1251
|
case V.Browser:
|
|
1250
|
-
e.type ===
|
|
1252
|
+
e.type === g0.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1251
1253
|
break;
|
|
1252
1254
|
case V.Node:
|
|
1253
|
-
e.type ===
|
|
1255
|
+
e.type === g0.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1254
1256
|
break;
|
|
1255
1257
|
default:
|
|
1256
|
-
|
|
1258
|
+
s0(n);
|
|
1257
1259
|
}
|
|
1258
1260
|
}
|
|
1259
|
-
function
|
|
1261
|
+
function B0(n, e) {
|
|
1260
1262
|
const t = e(), o = n[0];
|
|
1261
1263
|
if (o === void 0)
|
|
1262
1264
|
return { path: t, length: 0 };
|
|
@@ -1271,7 +1273,7 @@ function q0(n, e) {
|
|
|
1271
1273
|
}
|
|
1272
1274
|
return { path: t, length: i };
|
|
1273
1275
|
}
|
|
1274
|
-
const
|
|
1276
|
+
const H1 = ({
|
|
1275
1277
|
ctx: n,
|
|
1276
1278
|
object: e,
|
|
1277
1279
|
opacity: t,
|
|
@@ -1280,7 +1282,7 @@ const Y1 = ({
|
|
|
1280
1282
|
const i = e.opacity * t;
|
|
1281
1283
|
if (i === 0 || e.drawn === 0)
|
|
1282
1284
|
return;
|
|
1283
|
-
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } =
|
|
1285
|
+
const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = Y1(e), { path: h } = B0(a, o), { path: c } = B0(s, o);
|
|
1284
1286
|
if (y0({
|
|
1285
1287
|
color: e.color,
|
|
1286
1288
|
ctx: n,
|
|
@@ -1299,7 +1301,7 @@ const Y1 = ({
|
|
|
1299
1301
|
opacity: i,
|
|
1300
1302
|
width: e.width
|
|
1301
1303
|
}), e.isArrowheadDoubled) {
|
|
1302
|
-
const { path: f } =
|
|
1304
|
+
const { path: f } = B0(
|
|
1303
1305
|
r,
|
|
1304
1306
|
o
|
|
1305
1307
|
);
|
|
@@ -1324,7 +1326,7 @@ function X1(n, e) {
|
|
|
1324
1326
|
const o = e(), i = -Math.PI / 2;
|
|
1325
1327
|
return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
|
|
1326
1328
|
}
|
|
1327
|
-
function
|
|
1329
|
+
function $1(n, e) {
|
|
1328
1330
|
const t = e(), o = -Math.PI / 2;
|
|
1329
1331
|
t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
|
|
1330
1332
|
const i = 2 * Math.PI * n.radius;
|
|
@@ -1333,16 +1335,16 @@ function H1(n, e) {
|
|
|
1333
1335
|
function Ft(n, e) {
|
|
1334
1336
|
switch (n.type) {
|
|
1335
1337
|
case V.Browser:
|
|
1336
|
-
e.type ===
|
|
1338
|
+
e.type === g0.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1337
1339
|
break;
|
|
1338
1340
|
case V.Node:
|
|
1339
|
-
e.type ===
|
|
1341
|
+
e.type === g0.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1340
1342
|
break;
|
|
1341
1343
|
default:
|
|
1342
|
-
|
|
1344
|
+
s0(n);
|
|
1343
1345
|
}
|
|
1344
1346
|
}
|
|
1345
|
-
const
|
|
1347
|
+
const G1 = ({
|
|
1346
1348
|
ctx: n,
|
|
1347
1349
|
object: e,
|
|
1348
1350
|
opacity: t,
|
|
@@ -1351,7 +1353,7 @@ const $1 = ({
|
|
|
1351
1353
|
const i = e.opacity * t;
|
|
1352
1354
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1353
1355
|
return;
|
|
1354
|
-
const { path: a, length: s } =
|
|
1356
|
+
const { path: a, length: s } = $1(e, o);
|
|
1355
1357
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1356
1358
|
const r = X1(e, o);
|
|
1357
1359
|
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
@@ -1367,100 +1369,100 @@ const $1 = ({
|
|
|
1367
1369
|
width: e.strokeWidth
|
|
1368
1370
|
});
|
|
1369
1371
|
};
|
|
1370
|
-
function
|
|
1372
|
+
function X(n = null) {
|
|
1371
1373
|
return {
|
|
1372
1374
|
x: 0,
|
|
1373
1375
|
y: 0,
|
|
1374
1376
|
...n
|
|
1375
1377
|
};
|
|
1376
1378
|
}
|
|
1377
|
-
const
|
|
1378
|
-
function
|
|
1379
|
+
const W1 = X();
|
|
1380
|
+
function u0(n = null) {
|
|
1379
1381
|
return {
|
|
1380
|
-
origin:
|
|
1381
|
-
size:
|
|
1382
|
+
origin: W1,
|
|
1383
|
+
size: T1,
|
|
1382
1384
|
...n
|
|
1383
1385
|
};
|
|
1384
1386
|
}
|
|
1385
|
-
|
|
1386
|
-
function
|
|
1387
|
+
u0();
|
|
1388
|
+
function p0(n, e, t) {
|
|
1387
1389
|
const { x: o, y: i } = n, { width: a, height: s } = t;
|
|
1388
1390
|
switch (e) {
|
|
1389
|
-
case
|
|
1390
|
-
return
|
|
1391
|
-
origin:
|
|
1391
|
+
case o0.TOP_LEFT:
|
|
1392
|
+
return u0({
|
|
1393
|
+
origin: X({ x: o, y: i }),
|
|
1392
1394
|
size: t
|
|
1393
1395
|
});
|
|
1394
|
-
case
|
|
1395
|
-
return
|
|
1396
|
-
origin:
|
|
1396
|
+
case o0.TOP:
|
|
1397
|
+
return u0({
|
|
1398
|
+
origin: X({ x: o - a / 2, y: i }),
|
|
1397
1399
|
size: t
|
|
1398
1400
|
});
|
|
1399
|
-
case
|
|
1400
|
-
return
|
|
1401
|
-
origin:
|
|
1401
|
+
case o0.TOP_RIGHT:
|
|
1402
|
+
return u0({
|
|
1403
|
+
origin: X({ x: o - a, y: i }),
|
|
1402
1404
|
size: t
|
|
1403
1405
|
});
|
|
1404
|
-
case
|
|
1405
|
-
return
|
|
1406
|
-
origin:
|
|
1406
|
+
case o0.LEFT:
|
|
1407
|
+
return u0({
|
|
1408
|
+
origin: X({ x: o, y: i - s / 2 }),
|
|
1407
1409
|
size: t
|
|
1408
1410
|
});
|
|
1409
|
-
case
|
|
1410
|
-
return
|
|
1411
|
-
origin:
|
|
1411
|
+
case o0.CENTER:
|
|
1412
|
+
return u0({
|
|
1413
|
+
origin: X({ x: o - a / 2, y: i - s / 2 }),
|
|
1412
1414
|
size: t
|
|
1413
1415
|
});
|
|
1414
|
-
case
|
|
1415
|
-
return
|
|
1416
|
-
origin:
|
|
1416
|
+
case o0.RIGHT:
|
|
1417
|
+
return u0({
|
|
1418
|
+
origin: X({ x: o - a, y: i - s / 2 }),
|
|
1417
1419
|
size: t
|
|
1418
1420
|
});
|
|
1419
|
-
case
|
|
1420
|
-
return
|
|
1421
|
-
origin:
|
|
1421
|
+
case o0.BOTTOM_LEFT:
|
|
1422
|
+
return u0({
|
|
1423
|
+
origin: X({ x: o, y: i - s }),
|
|
1422
1424
|
size: t
|
|
1423
1425
|
});
|
|
1424
|
-
case
|
|
1425
|
-
return
|
|
1426
|
-
origin:
|
|
1426
|
+
case o0.BOTTOM:
|
|
1427
|
+
return u0({
|
|
1428
|
+
origin: X({ x: o - a / 2, y: i - s }),
|
|
1427
1429
|
size: t
|
|
1428
1430
|
});
|
|
1429
|
-
case
|
|
1430
|
-
return
|
|
1431
|
-
origin:
|
|
1431
|
+
case o0.BOTTOM_RIGHT:
|
|
1432
|
+
return u0({
|
|
1433
|
+
origin: X({ x: o - a, y: i - s }),
|
|
1432
1434
|
size: t
|
|
1433
1435
|
});
|
|
1434
1436
|
default:
|
|
1435
|
-
|
|
1437
|
+
s0(e);
|
|
1436
1438
|
}
|
|
1437
1439
|
}
|
|
1438
|
-
const
|
|
1440
|
+
const Z1 = ({
|
|
1439
1441
|
ctx: n,
|
|
1440
1442
|
object: e,
|
|
1441
1443
|
renderObject: t,
|
|
1442
1444
|
opacity: o
|
|
1443
1445
|
}) => {
|
|
1444
|
-
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s =
|
|
1445
|
-
|
|
1446
|
+
const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = p0(
|
|
1447
|
+
X({ x: e.x, y: e.y }),
|
|
1446
1448
|
e.anchor,
|
|
1447
|
-
|
|
1449
|
+
a0({
|
|
1448
1450
|
width: e.width * Math.abs(i),
|
|
1449
1451
|
height: e.height * Math.abs(a)
|
|
1450
1452
|
})
|
|
1451
|
-
), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: f, skewOriginY:
|
|
1453
|
+
), { rotation: r, rotateOriginX: h, rotateOriginY: c, skewOriginX: f, skewOriginY: d, skewX: l, skewY: u } = e;
|
|
1452
1454
|
if (!(i === 0 || a === 0)) {
|
|
1453
|
-
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(f,
|
|
1455
|
+
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(f, d), n.context.transform(
|
|
1454
1456
|
1,
|
|
1455
1457
|
Math.tan(u * Math.PI / 180),
|
|
1456
1458
|
Math.tan(l * Math.PI / 180),
|
|
1457
1459
|
1,
|
|
1458
1460
|
0,
|
|
1459
1461
|
0
|
|
1460
|
-
), n.context.translate(-f, -
|
|
1461
|
-
for (const
|
|
1462
|
-
t(
|
|
1463
|
-
e.previewColor !== null && (n.context.fillStyle =
|
|
1462
|
+
), n.context.translate(-f, -d);
|
|
1463
|
+
for (const m of e.objects)
|
|
1464
|
+
t(m, o * e.opacity);
|
|
1465
|
+
e.previewColor !== null && (n.context.fillStyle = S0(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(f, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
|
|
1464
1466
|
}
|
|
1465
1467
|
};
|
|
1466
1468
|
function rt(n, e, t, o, i = 0) {
|
|
@@ -1487,20 +1489,20 @@ function rt(n, e, t, o, i = 0) {
|
|
|
1487
1489
|
const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
|
|
1488
1490
|
return { path: a, length: s };
|
|
1489
1491
|
}
|
|
1490
|
-
const
|
|
1492
|
+
const E0 = {
|
|
1491
1493
|
Browser: "browser",
|
|
1492
1494
|
Node: "node"
|
|
1493
|
-
},
|
|
1495
|
+
}, V1 = ({
|
|
1494
1496
|
ctx: n,
|
|
1495
1497
|
imageById: e,
|
|
1496
1498
|
object: t,
|
|
1497
1499
|
opacity: o,
|
|
1498
1500
|
createPath2D: i
|
|
1499
1501
|
}) => {
|
|
1500
|
-
const a =
|
|
1501
|
-
|
|
1502
|
+
const a = p0(
|
|
1503
|
+
X({ x: t.x, y: t.y }),
|
|
1502
1504
|
t.anchor,
|
|
1503
|
-
|
|
1505
|
+
a0({ width: t.width, height: t.height })
|
|
1504
1506
|
), s = e[t.imageId];
|
|
1505
1507
|
if (s !== void 0) {
|
|
1506
1508
|
if (n.context.save(), t.cornerRadius > 0) {
|
|
@@ -1512,18 +1514,18 @@ const S0 = {
|
|
|
1512
1514
|
);
|
|
1513
1515
|
switch (n.type) {
|
|
1514
1516
|
case V.Browser:
|
|
1515
|
-
r.path.type ===
|
|
1517
|
+
r.path.type === g0.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
|
|
1516
1518
|
break;
|
|
1517
1519
|
case V.Node:
|
|
1518
|
-
r.path.type ===
|
|
1520
|
+
r.path.type === g0.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
|
|
1519
1521
|
break;
|
|
1520
1522
|
default:
|
|
1521
|
-
|
|
1523
|
+
s0(n);
|
|
1522
1524
|
}
|
|
1523
1525
|
}
|
|
1524
1526
|
switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
|
|
1525
1527
|
case V.Browser:
|
|
1526
|
-
s.type ===
|
|
1528
|
+
s.type === E0.Browser ? n.context.drawImage(
|
|
1527
1529
|
s.image,
|
|
1528
1530
|
a.origin.x,
|
|
1529
1531
|
a.origin.y,
|
|
@@ -1532,7 +1534,7 @@ const S0 = {
|
|
|
1532
1534
|
) : console.warn("Attempted to use Node Image in Browser Canvas context");
|
|
1533
1535
|
break;
|
|
1534
1536
|
case V.Node:
|
|
1535
|
-
s.type ===
|
|
1537
|
+
s.type === E0.Node ? n.context.drawImage(
|
|
1536
1538
|
s.image,
|
|
1537
1539
|
a.origin.x,
|
|
1538
1540
|
a.origin.y,
|
|
@@ -1541,18 +1543,18 @@ const S0 = {
|
|
|
1541
1543
|
) : console.warn("Attempted to use Browser Image in Node Canvas context");
|
|
1542
1544
|
break;
|
|
1543
1545
|
default:
|
|
1544
|
-
|
|
1546
|
+
s0(n);
|
|
1545
1547
|
}
|
|
1546
1548
|
n.context.restore();
|
|
1547
1549
|
}
|
|
1548
1550
|
};
|
|
1549
|
-
function
|
|
1551
|
+
function K1(n, e) {
|
|
1550
1552
|
const t = e();
|
|
1551
1553
|
t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
|
|
1552
1554
|
const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
|
|
1553
1555
|
return { path: t, length: o };
|
|
1554
1556
|
}
|
|
1555
|
-
const
|
|
1557
|
+
const Q1 = ({
|
|
1556
1558
|
ctx: n,
|
|
1557
1559
|
object: e,
|
|
1558
1560
|
opacity: t,
|
|
@@ -1561,7 +1563,7 @@ const K1 = ({
|
|
|
1561
1563
|
const i = e.opacity * t;
|
|
1562
1564
|
if (i === 0 || e.drawn === 0)
|
|
1563
1565
|
return;
|
|
1564
|
-
const { path: a, length: s } =
|
|
1566
|
+
const { path: a, length: s } = K1(e, o);
|
|
1565
1567
|
y0({
|
|
1566
1568
|
color: e.color,
|
|
1567
1569
|
ctx: n,
|
|
@@ -1573,23 +1575,23 @@ const K1 = ({
|
|
|
1573
1575
|
opacity: i,
|
|
1574
1576
|
width: e.width
|
|
1575
1577
|
});
|
|
1576
|
-
},
|
|
1578
|
+
}, J1 = ({
|
|
1577
1579
|
ctx: n,
|
|
1578
1580
|
object: e,
|
|
1579
1581
|
opacity: t,
|
|
1580
1582
|
renderObject: o
|
|
1581
1583
|
}) => {
|
|
1582
1584
|
n.context.save();
|
|
1583
|
-
const i =
|
|
1584
|
-
|
|
1585
|
+
const i = p0(
|
|
1586
|
+
X({ x: e.x, y: e.y }),
|
|
1585
1587
|
e.anchor,
|
|
1586
|
-
|
|
1588
|
+
a0({ width: e.width, height: e.height })
|
|
1587
1589
|
);
|
|
1588
|
-
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle =
|
|
1590
|
+
e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = S0($.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
|
|
1589
1591
|
for (const a of e.objects)
|
|
1590
1592
|
o(a, t * e.opacity);
|
|
1591
1593
|
n.context.restore();
|
|
1592
|
-
},
|
|
1594
|
+
}, te = ({
|
|
1593
1595
|
ctx: n,
|
|
1594
1596
|
object: e,
|
|
1595
1597
|
opacity: t,
|
|
@@ -1598,10 +1600,10 @@ const K1 = ({
|
|
|
1598
1600
|
const i = e.opacity * t;
|
|
1599
1601
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1600
1602
|
return;
|
|
1601
|
-
const { origin: a } =
|
|
1602
|
-
|
|
1603
|
+
const { origin: a } = p0(
|
|
1604
|
+
X({ x: e.x, y: e.y }),
|
|
1603
1605
|
e.anchor,
|
|
1604
|
-
|
|
1606
|
+
a0({ width: e.width, height: e.height })
|
|
1605
1607
|
), s = o(e.path);
|
|
1606
1608
|
n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), v0({
|
|
1607
1609
|
ctx: n,
|
|
@@ -1619,7 +1621,7 @@ const K1 = ({
|
|
|
1619
1621
|
width: e.strokeWidth
|
|
1620
1622
|
}), n.context.restore();
|
|
1621
1623
|
};
|
|
1622
|
-
function
|
|
1624
|
+
function ee(n, e) {
|
|
1623
1625
|
const t = e(), o = n.points, i = o[0];
|
|
1624
1626
|
if (i === void 0)
|
|
1625
1627
|
return { path: t, length: 0 };
|
|
@@ -1640,7 +1642,7 @@ function te(n, e) {
|
|
|
1640
1642
|
);
|
|
1641
1643
|
return a += r, { path: t, length: a };
|
|
1642
1644
|
}
|
|
1643
|
-
const
|
|
1645
|
+
const ne = ({
|
|
1644
1646
|
ctx: n,
|
|
1645
1647
|
object: e,
|
|
1646
1648
|
opacity: t,
|
|
@@ -1649,7 +1651,7 @@ const ee = ({
|
|
|
1649
1651
|
const i = e.opacity * t;
|
|
1650
1652
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1651
1653
|
return;
|
|
1652
|
-
const { path: a, length: s } =
|
|
1654
|
+
const { path: a, length: s } = ee(e, o);
|
|
1653
1655
|
v0({
|
|
1654
1656
|
ctx: n,
|
|
1655
1657
|
path: a,
|
|
@@ -1665,15 +1667,15 @@ const ee = ({
|
|
|
1665
1667
|
width: e.strokeWidth
|
|
1666
1668
|
});
|
|
1667
1669
|
};
|
|
1668
|
-
function
|
|
1669
|
-
const t = n.strokeWidth / 2, { origin: o, size: i } =
|
|
1670
|
-
|
|
1670
|
+
function re(n, e) {
|
|
1671
|
+
const t = n.strokeWidth / 2, { origin: o, size: i } = p0(
|
|
1672
|
+
X({ x: n.x, y: n.y }),
|
|
1671
1673
|
n.anchor,
|
|
1672
|
-
|
|
1674
|
+
a0({ width: n.width, height: n.height })
|
|
1673
1675
|
), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
|
|
1674
1676
|
if (a <= 0 || s <= 0)
|
|
1675
1677
|
return;
|
|
1676
|
-
const r =
|
|
1678
|
+
const r = X({ x: o.x + t, y: o.y + t }), h = a0({ width: a, height: s }), c = Math.max(
|
|
1677
1679
|
0,
|
|
1678
1680
|
Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
|
|
1679
1681
|
);
|
|
@@ -1682,11 +1684,11 @@ function ne(n, e) {
|
|
|
1682
1684
|
const f = e();
|
|
1683
1685
|
return f.path.moveTo(r.x, r.y), f.path.lineTo(r.x + a, r.y), f.path.lineTo(r.x + a, r.y + s), f.path.lineTo(r.x, r.y + s), f.path.closePath(), f;
|
|
1684
1686
|
}
|
|
1685
|
-
function
|
|
1686
|
-
const { origin: t, size: o } =
|
|
1687
|
-
|
|
1687
|
+
function ie(n, e) {
|
|
1688
|
+
const { origin: t, size: o } = p0(
|
|
1689
|
+
X({ x: n.x, y: n.y }),
|
|
1688
1690
|
n.anchor,
|
|
1689
|
-
|
|
1691
|
+
a0({ width: n.width, height: n.height })
|
|
1690
1692
|
), i = Math.max(
|
|
1691
1693
|
0,
|
|
1692
1694
|
Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
|
|
@@ -1700,7 +1702,7 @@ function re(n, e) {
|
|
|
1700
1702
|
return { path: s, length: r };
|
|
1701
1703
|
}
|
|
1702
1704
|
}
|
|
1703
|
-
const
|
|
1705
|
+
const oe = ({
|
|
1704
1706
|
ctx: n,
|
|
1705
1707
|
object: e,
|
|
1706
1708
|
opacity: t,
|
|
@@ -1709,9 +1711,9 @@ const ie = ({
|
|
|
1709
1711
|
const i = e.opacity * t;
|
|
1710
1712
|
if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
|
|
1711
1713
|
return;
|
|
1712
|
-
const { path: a, length: s } =
|
|
1714
|
+
const { path: a, length: s } = ie(e, o);
|
|
1713
1715
|
if (i < 1 && e.strokeWidth > 0) {
|
|
1714
|
-
const r =
|
|
1716
|
+
const r = re(e, o);
|
|
1715
1717
|
r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
|
|
1716
1718
|
} else
|
|
1717
1719
|
v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
|
|
@@ -1724,7 +1726,7 @@ const ie = ({
|
|
|
1724
1726
|
opacity: i,
|
|
1725
1727
|
width: e.strokeWidth
|
|
1726
1728
|
});
|
|
1727
|
-
},
|
|
1729
|
+
}, se = ({
|
|
1728
1730
|
ctx: n,
|
|
1729
1731
|
imageById: e,
|
|
1730
1732
|
object: t,
|
|
@@ -1736,14 +1738,14 @@ const ie = ({
|
|
|
1736
1738
|
const a = e[t.svg];
|
|
1737
1739
|
if (a === void 0)
|
|
1738
1740
|
return;
|
|
1739
|
-
const s =
|
|
1740
|
-
|
|
1741
|
+
const s = p0(
|
|
1742
|
+
X({ x: t.x, y: t.y }),
|
|
1741
1743
|
t.anchor,
|
|
1742
|
-
|
|
1744
|
+
a0({ width: t.width, height: t.height })
|
|
1743
1745
|
);
|
|
1744
1746
|
switch (n.context.save(), n.context.globalAlpha = i, n.type) {
|
|
1745
1747
|
case V.Browser:
|
|
1746
|
-
a.type ===
|
|
1748
|
+
a.type === E0.Browser && n.context.drawImage(
|
|
1747
1749
|
a.image,
|
|
1748
1750
|
s.origin.x,
|
|
1749
1751
|
s.origin.y,
|
|
@@ -1752,7 +1754,7 @@ const ie = ({
|
|
|
1752
1754
|
);
|
|
1753
1755
|
break;
|
|
1754
1756
|
case V.Node:
|
|
1755
|
-
a.type ===
|
|
1757
|
+
a.type === E0.Node && n.context.drawImage(
|
|
1756
1758
|
a.image,
|
|
1757
1759
|
s.origin.x,
|
|
1758
1760
|
s.origin.y,
|
|
@@ -1761,21 +1763,23 @@ const ie = ({
|
|
|
1761
1763
|
);
|
|
1762
1764
|
break;
|
|
1763
1765
|
default:
|
|
1764
|
-
|
|
1766
|
+
s0(n);
|
|
1765
1767
|
}
|
|
1766
1768
|
n.context.restore();
|
|
1767
1769
|
};
|
|
1768
|
-
function
|
|
1770
|
+
function ae(n) {
|
|
1769
1771
|
return {
|
|
1770
1772
|
color: n.color,
|
|
1771
1773
|
fontFamily: n.fontFamily,
|
|
1772
1774
|
fontSize: n.fontSize,
|
|
1773
1775
|
fontStyle: n.fontStyle,
|
|
1774
1776
|
fontWeight: n.fontWeight,
|
|
1775
|
-
ligatures: n.ligatures
|
|
1777
|
+
ligatures: n.ligatures,
|
|
1778
|
+
subscript: n.subscript,
|
|
1779
|
+
superscript: n.superscript
|
|
1776
1780
|
};
|
|
1777
1781
|
}
|
|
1778
|
-
function
|
|
1782
|
+
function he(n, e = 1) {
|
|
1779
1783
|
const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
|
|
1780
1784
|
let o = 0, i = 0;
|
|
1781
1785
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -1790,101 +1794,126 @@ function ae(n, e = 1) {
|
|
|
1790
1794
|
width: t
|
|
1791
1795
|
};
|
|
1792
1796
|
}
|
|
1793
|
-
|
|
1797
|
+
const le = 0.7, ce = 0.3;
|
|
1798
|
+
function Rt(n) {
|
|
1799
|
+
const e = n.superscript, t = n.subscript && !e;
|
|
1800
|
+
return !e && !t ? {
|
|
1801
|
+
baselineShift: 0,
|
|
1802
|
+
fontSize: n.fontSize,
|
|
1803
|
+
isSubscript: !1,
|
|
1804
|
+
isSuperscript: !1
|
|
1805
|
+
} : {
|
|
1806
|
+
baselineShift: n.fontSize * ce * (e ? -1 : 1),
|
|
1807
|
+
fontSize: n.fontSize * le,
|
|
1808
|
+
isSubscript: t,
|
|
1809
|
+
isSuperscript: e
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
function ue(n) {
|
|
1794
1813
|
return {
|
|
1795
1814
|
width: n.width,
|
|
1796
1815
|
height: n.fontBoundingBoxAscent
|
|
1797
1816
|
};
|
|
1798
1817
|
}
|
|
1799
|
-
function
|
|
1800
|
-
|
|
1818
|
+
function Nt(n, e, t = 1) {
|
|
1819
|
+
const o = Rt(e);
|
|
1820
|
+
n.context.fillStyle = nt(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";
|
|
1801
1821
|
}
|
|
1802
|
-
function
|
|
1822
|
+
function fe(n, e, t) {
|
|
1803
1823
|
const o = [];
|
|
1804
1824
|
for (const i of n) {
|
|
1805
1825
|
const a = [];
|
|
1806
1826
|
for (const s of i) {
|
|
1807
1827
|
const { text: r, ...h } = s, c = { ...e, ...h };
|
|
1808
|
-
|
|
1809
|
-
const f = t.context.measureText(r);
|
|
1810
|
-
a.push(
|
|
1828
|
+
Nt(t, c);
|
|
1829
|
+
const f = t.context.measureText(r), d = ue(f), { baselineShift: l } = Rt(c), u = d.height + Math.max(0, -l), m = Math.max(0, l);
|
|
1830
|
+
a.push({
|
|
1831
|
+
...d,
|
|
1832
|
+
baselineShift: l,
|
|
1833
|
+
bottom: m,
|
|
1834
|
+
height: u + m,
|
|
1835
|
+
top: u
|
|
1836
|
+
});
|
|
1811
1837
|
}
|
|
1812
1838
|
o.push(a);
|
|
1813
1839
|
}
|
|
1814
1840
|
return o;
|
|
1815
1841
|
}
|
|
1816
|
-
const
|
|
1842
|
+
const ge = ({ ctx: n, object: e, opacity: t }) => {
|
|
1817
1843
|
const o = e.opacity * t;
|
|
1818
1844
|
if (o === 0)
|
|
1819
1845
|
return;
|
|
1820
|
-
const { length: i } = e, a = _t(e.text), s =
|
|
1821
|
-
let f = c.origin.x,
|
|
1822
|
-
for (let
|
|
1823
|
-
const y = a[
|
|
1824
|
-
if (y == null ||
|
|
1846
|
+
const { length: i } = e, a = _t(e.text), s = ae(e), r = fe(a, s, n), h = he(r, e.lineSpacing), c = p0(X({ x: e.x, y: e.y }), e.anchor, h);
|
|
1847
|
+
let f = c.origin.x, d = c.origin.y, l = 0, u = 0;
|
|
1848
|
+
for (let m = 0; m < a.length; m++) {
|
|
1849
|
+
const y = a[m], M = r[m];
|
|
1850
|
+
if (y == null || M == null) {
|
|
1825
1851
|
console.error("Could not determine text units or sizes for line");
|
|
1826
1852
|
continue;
|
|
1827
1853
|
}
|
|
1828
|
-
const
|
|
1854
|
+
const T = M.reduce((O, R) => O + R.width, 0), S = M.length === 0 ? u : M.reduce((O, R) => Math.max(O, R.top), 0), P = M.length === 0 ? 0 : M.reduce((O, R) => Math.max(O, R.bottom), 0), E = S + P;
|
|
1829
1855
|
switch (e.alignment) {
|
|
1830
1856
|
case x0.LEFT:
|
|
1831
1857
|
f = c.origin.x;
|
|
1832
1858
|
break;
|
|
1833
1859
|
case x0.CENTER:
|
|
1834
|
-
f = c.origin.x + (c.size.width -
|
|
1860
|
+
f = c.origin.x + (c.size.width - T) / 2;
|
|
1835
1861
|
break;
|
|
1836
1862
|
case x0.RIGHT:
|
|
1837
|
-
f = c.origin.x + (c.size.width -
|
|
1863
|
+
f = c.origin.x + (c.size.width - T);
|
|
1838
1864
|
break;
|
|
1839
1865
|
default:
|
|
1840
|
-
|
|
1866
|
+
s0(e.alignment);
|
|
1841
1867
|
break;
|
|
1842
1868
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1869
|
+
d += u * (e.lineSpacing - 1);
|
|
1870
|
+
const C = d + S;
|
|
1871
|
+
u = E;
|
|
1872
|
+
for (let O = 0; O < y.length && !(i !== null && l >= i); O++) {
|
|
1873
|
+
const R = y[O], G = M[O];
|
|
1874
|
+
if (R == null || G == null) {
|
|
1847
1875
|
console.error("Could not determine text unit or size for unit");
|
|
1848
1876
|
continue;
|
|
1849
1877
|
}
|
|
1850
|
-
const { text:
|
|
1851
|
-
let
|
|
1852
|
-
if (i !== null && l +
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1878
|
+
const { text: z, ...H } = R;
|
|
1879
|
+
let t0;
|
|
1880
|
+
if (i !== null && l + z.length > i) {
|
|
1881
|
+
const K = i - l;
|
|
1882
|
+
t0 = z.slice(0, K);
|
|
1855
1883
|
}
|
|
1856
|
-
const
|
|
1857
|
-
l +=
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1884
|
+
const e0 = t0 ?? z;
|
|
1885
|
+
l += e0.length;
|
|
1886
|
+
const n0 = { ...s, ...H };
|
|
1887
|
+
Nt(n, n0, o), n.context.fillText(e0, f, C + G.baselineShift), f += G.width;
|
|
1860
1888
|
}
|
|
1861
|
-
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
[
|
|
1865
|
-
[
|
|
1866
|
-
[
|
|
1867
|
-
[
|
|
1868
|
-
[
|
|
1869
|
-
[
|
|
1870
|
-
[
|
|
1871
|
-
[
|
|
1872
|
-
[
|
|
1889
|
+
d += E;
|
|
1890
|
+
}
|
|
1891
|
+
}, pe = {
|
|
1892
|
+
[U.ARROW]: H1,
|
|
1893
|
+
[U.CIRCLE]: G1,
|
|
1894
|
+
[U.GROUP]: Z1,
|
|
1895
|
+
[U.IMAGE]: V1,
|
|
1896
|
+
[U.LINE]: Q1,
|
|
1897
|
+
[U.MASK]: J1,
|
|
1898
|
+
[U.PATH]: te,
|
|
1899
|
+
[U.POLYGON]: ne,
|
|
1900
|
+
[U.RECTANGLE]: oe,
|
|
1901
|
+
[U.SLIDE_OBJECT]: () => {
|
|
1873
1902
|
},
|
|
1874
|
-
[
|
|
1875
|
-
[
|
|
1903
|
+
[U.SVG]: se,
|
|
1904
|
+
[U.TEXT]: ge
|
|
1876
1905
|
};
|
|
1877
|
-
function
|
|
1906
|
+
function de(n) {
|
|
1878
1907
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1879
1908
|
return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
|
|
1880
1909
|
}
|
|
1881
|
-
function
|
|
1910
|
+
function xe(n, e) {
|
|
1882
1911
|
if (n === null)
|
|
1883
1912
|
return null;
|
|
1884
|
-
const t =
|
|
1885
|
-
|
|
1913
|
+
const t = p0(
|
|
1914
|
+
X({ x: e.x, y: e.y }),
|
|
1886
1915
|
e.anchor,
|
|
1887
|
-
|
|
1916
|
+
a0({ width: e.width, height: e.height })
|
|
1888
1917
|
), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
1889
1918
|
o.setAttribute("x", t.origin.x.toString()), o.setAttribute("y", t.origin.y.toString()), o.setAttribute("width", e.width.toString()), o.setAttribute("height", e.height.toString());
|
|
1890
1919
|
const i = e.content;
|
|
@@ -1898,20 +1927,20 @@ function ge(n, e) {
|
|
|
1898
1927
|
a !== null && a(), n.removeChild(o);
|
|
1899
1928
|
};
|
|
1900
1929
|
}
|
|
1901
|
-
async function
|
|
1930
|
+
async function ye(n) {
|
|
1902
1931
|
if (Object.keys(n).length === 0)
|
|
1903
1932
|
return {};
|
|
1904
1933
|
const e = {}, t = (i) => new Promise((a, s) => {
|
|
1905
1934
|
const r = new Image();
|
|
1906
1935
|
if (r.onload = () => a(r), r.onerror = (c) => s(c), i.includes("</svg>")) {
|
|
1907
|
-
const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), f = new Blob([c], { type: "image/svg+xml;charset=utf-8" }),
|
|
1908
|
-
r.src =
|
|
1936
|
+
const c = i.replace(/<\?xml[^?]*\?>\s*/g, ""), f = new Blob([c], { type: "image/svg+xml;charset=utf-8" }), d = URL.createObjectURL(f);
|
|
1937
|
+
r.src = d;
|
|
1909
1938
|
} else
|
|
1910
1939
|
r.src = i;
|
|
1911
1940
|
}), o = Object.entries(n).map(async ([i, a]) => {
|
|
1912
1941
|
const s = await t(a);
|
|
1913
1942
|
e[i] = {
|
|
1914
|
-
type:
|
|
1943
|
+
type: E0.Browser,
|
|
1915
1944
|
image: s
|
|
1916
1945
|
};
|
|
1917
1946
|
});
|
|
@@ -1922,35 +1951,35 @@ async function pe(n) {
|
|
|
1922
1951
|
}
|
|
1923
1952
|
return e;
|
|
1924
1953
|
}
|
|
1925
|
-
class
|
|
1954
|
+
class kn {
|
|
1926
1955
|
constructor(e) {
|
|
1927
1956
|
const { objectRenderers: t, scale: o = 1, ...i } = e;
|
|
1928
1957
|
this.props = {
|
|
1929
|
-
presentation:
|
|
1958
|
+
presentation: P1(),
|
|
1930
1959
|
element: document.body,
|
|
1931
1960
|
objectRenderers: {
|
|
1932
|
-
...
|
|
1961
|
+
...pe,
|
|
1933
1962
|
...t
|
|
1934
1963
|
},
|
|
1935
1964
|
cacheDurationMinutes: 15,
|
|
1936
|
-
scale:
|
|
1965
|
+
scale: ve(o),
|
|
1937
1966
|
...i
|
|
1938
1967
|
}, this.state = { ...pt };
|
|
1939
1968
|
}
|
|
1940
1969
|
/** Starts the presentation. */
|
|
1941
1970
|
async present() {
|
|
1942
|
-
const { presentation: e, element: t, scale: o } = this.props, i =
|
|
1971
|
+
const { presentation: e, element: t, scale: o } = this.props, i = z1(e.size), a = de(e.size);
|
|
1943
1972
|
a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
|
|
1944
1973
|
...pt,
|
|
1945
|
-
imageById: await
|
|
1974
|
+
imageById: await ye({
|
|
1946
1975
|
...e.resources.images,
|
|
1947
|
-
...
|
|
1976
|
+
...R1(e)
|
|
1948
1977
|
}),
|
|
1949
1978
|
canvas: i,
|
|
1950
1979
|
extrasContainer: a
|
|
1951
1980
|
};
|
|
1952
1981
|
const s = E1(e, t);
|
|
1953
|
-
|
|
1982
|
+
B1(e, t, this.state.shortcutState, {
|
|
1954
1983
|
onNext: (h) => this.next(h),
|
|
1955
1984
|
onPrevious: (h) => this.previous(h),
|
|
1956
1985
|
onRenderSlide: (h, c) => {
|
|
@@ -1959,7 +1988,7 @@ class Cn {
|
|
|
1959
1988
|
buildIndex: this.state.buildIndex
|
|
1960
1989
|
}, this.renderSlide(h ?? this.state.slideIndex, c);
|
|
1961
1990
|
},
|
|
1962
|
-
onShowNavigator: () =>
|
|
1991
|
+
onShowNavigator: () => b1({
|
|
1963
1992
|
presentation: e,
|
|
1964
1993
|
onNavigateToSlide: (h) => this.renderSlide(h)
|
|
1965
1994
|
})
|
|
@@ -1969,42 +1998,42 @@ class Cn {
|
|
|
1969
1998
|
}
|
|
1970
1999
|
renderSlide(e, t = 0, o = null) {
|
|
1971
2000
|
const { objectRenderers: i, presentation: a, scale: s } = this.props, { canvas: r, imageById: h } = this.state, c = this.state.slideIndex !== e;
|
|
1972
|
-
this.state.slideIndex = e, this.state.buildIndex = t, o === null &&
|
|
2001
|
+
this.state.slideIndex = e, this.state.buildIndex = t, o === null && D1({ title: a.title, slideIndex: e, buildIndex: t });
|
|
1973
2002
|
const f = a.slides[e];
|
|
1974
2003
|
if (f === void 0 || r === null)
|
|
1975
2004
|
return;
|
|
1976
2005
|
if (c || this.state.mountedExtrasCleanups.length === 0 && f.extras.length > 0) {
|
|
1977
|
-
for (const
|
|
1978
|
-
|
|
2006
|
+
for (const M of this.state.mountedExtrasCleanups)
|
|
2007
|
+
M();
|
|
1979
2008
|
this.state.mountedExtrasCleanups = [];
|
|
1980
|
-
for (const
|
|
1981
|
-
const
|
|
1982
|
-
|
|
2009
|
+
for (const M of f.extras) {
|
|
2010
|
+
const T = xe(this.state.extrasContainer, M);
|
|
2011
|
+
T !== null && this.state.mountedExtrasCleanups.push(T);
|
|
1983
2012
|
}
|
|
1984
2013
|
}
|
|
1985
|
-
const
|
|
1986
|
-
if (
|
|
2014
|
+
const d = r.getContext("2d");
|
|
2015
|
+
if (d === null)
|
|
1987
2016
|
return;
|
|
1988
2017
|
const l = {
|
|
1989
2018
|
type: V.Browser,
|
|
1990
|
-
context:
|
|
2019
|
+
context: d
|
|
1991
2020
|
};
|
|
1992
|
-
|
|
1993
|
-
const u =
|
|
2021
|
+
j1(r, l);
|
|
2022
|
+
const u = F1({
|
|
1994
2023
|
slide: f,
|
|
1995
2024
|
buildIndex: t,
|
|
1996
2025
|
buildTime: o
|
|
1997
2026
|
});
|
|
1998
2027
|
l.context.fillStyle = nt(a.backgroundColor), l.context.fillRect(0, 0, r.width, r.height);
|
|
1999
|
-
function
|
|
2000
|
-
const
|
|
2001
|
-
|
|
2028
|
+
function m(M, T) {
|
|
2029
|
+
const S = i[M.objectType], P = u.get(M);
|
|
2030
|
+
S === void 0 || P === void 0 || S({
|
|
2002
2031
|
ctx: l,
|
|
2003
2032
|
imageById: h,
|
|
2004
|
-
object:
|
|
2005
|
-
opacity:
|
|
2006
|
-
renderObject:
|
|
2007
|
-
createPath2D:
|
|
2033
|
+
object: P,
|
|
2034
|
+
opacity: T,
|
|
2035
|
+
renderObject: m,
|
|
2036
|
+
createPath2D: U1
|
|
2008
2037
|
});
|
|
2009
2038
|
}
|
|
2010
2039
|
const y = s !== 1;
|
|
@@ -2012,8 +2041,8 @@ class Cn {
|
|
|
2012
2041
|
r.width * (1 - s) / 2,
|
|
2013
2042
|
r.height * (1 - s) / 2
|
|
2014
2043
|
), l.context.scale(s, s));
|
|
2015
|
-
for (const
|
|
2016
|
-
|
|
2044
|
+
for (const M of f.objects)
|
|
2045
|
+
m(M, 1);
|
|
2017
2046
|
y && l.context.restore();
|
|
2018
2047
|
}
|
|
2019
2048
|
next(e = !1) {
|
|
@@ -2024,8 +2053,8 @@ class Cn {
|
|
|
2024
2053
|
return;
|
|
2025
2054
|
const r = s.animations[a];
|
|
2026
2055
|
if (r !== void 0 && !e) {
|
|
2027
|
-
const h = performance.now(), c =
|
|
2028
|
-
const l =
|
|
2056
|
+
const h = performance.now(), c = C1(r), f = (d) => {
|
|
2057
|
+
const l = d - h;
|
|
2029
2058
|
l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(f)) : this.renderSlide(i, a + 1, null);
|
|
2030
2059
|
};
|
|
2031
2060
|
this.state.currentAnimationId = requestAnimationFrame(f);
|
|
@@ -2042,20 +2071,20 @@ class Cn {
|
|
|
2042
2071
|
this.renderSlide(0, 0);
|
|
2043
2072
|
}
|
|
2044
2073
|
}
|
|
2045
|
-
function
|
|
2074
|
+
function ve(n) {
|
|
2046
2075
|
return n <= 0 || n > 1 ? (console.warn(
|
|
2047
2076
|
`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
|
|
2048
2077
|
), 1) : n;
|
|
2049
2078
|
}
|
|
2050
|
-
function
|
|
2079
|
+
function In(n = 1e3) {
|
|
2051
2080
|
return {
|
|
2052
|
-
type:
|
|
2081
|
+
type: f0.PAUSE,
|
|
2053
2082
|
isKey: !1,
|
|
2054
2083
|
duration: n,
|
|
2055
2084
|
shortcut: null
|
|
2056
2085
|
};
|
|
2057
2086
|
}
|
|
2058
|
-
function
|
|
2087
|
+
function _n(n = null) {
|
|
2059
2088
|
return {
|
|
2060
2089
|
objects: [],
|
|
2061
2090
|
animations: [],
|
|
@@ -2068,31 +2097,31 @@ function Sn(n = null) {
|
|
|
2068
2097
|
...n
|
|
2069
2098
|
};
|
|
2070
2099
|
}
|
|
2071
|
-
function
|
|
2100
|
+
function On(n, e = {}) {
|
|
2072
2101
|
return {
|
|
2073
2102
|
...e,
|
|
2074
2103
|
text: n
|
|
2075
2104
|
};
|
|
2076
2105
|
}
|
|
2077
|
-
function
|
|
2106
|
+
function Fn(n = $.BLACK) {
|
|
2078
2107
|
return { ...n, alpha: 1 };
|
|
2079
2108
|
}
|
|
2080
|
-
function
|
|
2109
|
+
function we(n) {
|
|
2081
2110
|
for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
|
|
2082
2111
|
o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
|
|
2083
2112
|
return a / 2;
|
|
2084
2113
|
}
|
|
2085
|
-
function
|
|
2114
|
+
function me(n) {
|
|
2086
2115
|
for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
|
|
2087
2116
|
i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
|
|
2088
2117
|
return h;
|
|
2089
2118
|
}
|
|
2090
|
-
function
|
|
2119
|
+
function Ae(n) {
|
|
2091
2120
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
2092
2121
|
}
|
|
2093
|
-
var
|
|
2094
|
-
function
|
|
2095
|
-
if (dt) return
|
|
2122
|
+
var q0, dt;
|
|
2123
|
+
function be() {
|
|
2124
|
+
if (dt) return q0;
|
|
2096
2125
|
dt = 1;
|
|
2097
2126
|
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 = [
|
|
2098
2127
|
5760,
|
|
@@ -2155,101 +2184,101 @@ function we() {
|
|
|
2155
2184
|
u.index++;
|
|
2156
2185
|
}
|
|
2157
2186
|
function c(u) {
|
|
2158
|
-
var
|
|
2159
|
-
if (
|
|
2187
|
+
var m = u.path.charCodeAt(u.index);
|
|
2188
|
+
if (m === 48) {
|
|
2160
2189
|
u.param = 0, u.index++;
|
|
2161
2190
|
return;
|
|
2162
2191
|
}
|
|
2163
|
-
if (
|
|
2192
|
+
if (m === 49) {
|
|
2164
2193
|
u.param = 1, u.index++;
|
|
2165
2194
|
return;
|
|
2166
2195
|
}
|
|
2167
2196
|
u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
|
|
2168
2197
|
}
|
|
2169
2198
|
function f(u) {
|
|
2170
|
-
var
|
|
2171
|
-
if (y >=
|
|
2199
|
+
var m = u.index, y = m, M = u.max, T = !1, S = !1, P = !1, E = !1, C;
|
|
2200
|
+
if (y >= M) {
|
|
2172
2201
|
u.err = "SvgPath: missed param (at pos " + y + ")";
|
|
2173
2202
|
return;
|
|
2174
2203
|
}
|
|
2175
|
-
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y <
|
|
2204
|
+
if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y < M ? u.path.charCodeAt(y) : 0), !a(C) && C !== 46) {
|
|
2176
2205
|
u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
|
|
2177
2206
|
return;
|
|
2178
2207
|
}
|
|
2179
2208
|
if (C !== 46) {
|
|
2180
|
-
if (
|
|
2181
|
-
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " +
|
|
2209
|
+
if (T = C === 48, y++, C = y < M ? u.path.charCodeAt(y) : 0, T && y < M && C && a(C)) {
|
|
2210
|
+
u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + m + ")";
|
|
2182
2211
|
return;
|
|
2183
2212
|
}
|
|
2184
|
-
for (; y <
|
|
2185
|
-
y++,
|
|
2186
|
-
C = y <
|
|
2213
|
+
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2214
|
+
y++, S = !0;
|
|
2215
|
+
C = y < M ? u.path.charCodeAt(y) : 0;
|
|
2187
2216
|
}
|
|
2188
2217
|
if (C === 46) {
|
|
2189
|
-
for (
|
|
2190
|
-
y++,
|
|
2191
|
-
C = y <
|
|
2218
|
+
for (E = !0, y++; a(u.path.charCodeAt(y)); )
|
|
2219
|
+
y++, P = !0;
|
|
2220
|
+
C = y < M ? u.path.charCodeAt(y) : 0;
|
|
2192
2221
|
}
|
|
2193
2222
|
if (C === 101 || C === 69) {
|
|
2194
|
-
if (
|
|
2223
|
+
if (E && !S && !P) {
|
|
2195
2224
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2196
2225
|
return;
|
|
2197
2226
|
}
|
|
2198
|
-
if (y++, C = y <
|
|
2199
|
-
for (; y <
|
|
2227
|
+
if (y++, C = y < M ? u.path.charCodeAt(y) : 0, (C === 43 || C === 45) && y++, y < M && a(u.path.charCodeAt(y)))
|
|
2228
|
+
for (; y < M && a(u.path.charCodeAt(y)); )
|
|
2200
2229
|
y++;
|
|
2201
2230
|
else {
|
|
2202
2231
|
u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
|
|
2203
2232
|
return;
|
|
2204
2233
|
}
|
|
2205
2234
|
}
|
|
2206
|
-
u.index = y, u.param = parseFloat(u.path.slice(
|
|
2207
|
-
}
|
|
2208
|
-
function
|
|
2209
|
-
var
|
|
2210
|
-
|
|
2211
|
-
var
|
|
2212
|
-
if (y === "m" &&
|
|
2213
|
-
u.result.push([
|
|
2235
|
+
u.index = y, u.param = parseFloat(u.path.slice(m, y)) + 0;
|
|
2236
|
+
}
|
|
2237
|
+
function d(u) {
|
|
2238
|
+
var m, y;
|
|
2239
|
+
m = u.path[u.segmentStart], y = m.toLowerCase();
|
|
2240
|
+
var M = u.data;
|
|
2241
|
+
if (y === "m" && M.length > 2 && (u.result.push([m, M[0], M[1]]), M = M.slice(2), y = "l", m = m === "m" ? "l" : "L"), y === "r")
|
|
2242
|
+
u.result.push([m].concat(M));
|
|
2214
2243
|
else
|
|
2215
|
-
for (;
|
|
2244
|
+
for (; M.length >= n[y] && (u.result.push([m].concat(M.splice(0, n[y]))), !!n[y]); )
|
|
2216
2245
|
;
|
|
2217
2246
|
}
|
|
2218
2247
|
function l(u) {
|
|
2219
|
-
var
|
|
2220
|
-
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index),
|
|
2248
|
+
var m = u.max, y, M, T, S, P;
|
|
2249
|
+
if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index), M = i(y), !o(y)) {
|
|
2221
2250
|
u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
|
|
2222
2251
|
return;
|
|
2223
2252
|
}
|
|
2224
|
-
if (
|
|
2225
|
-
|
|
2253
|
+
if (S = n[u.path[u.index].toLowerCase()], u.index++, h(u), u.data = [], !S) {
|
|
2254
|
+
d(u);
|
|
2226
2255
|
return;
|
|
2227
2256
|
}
|
|
2228
|
-
for (
|
|
2229
|
-
for (
|
|
2230
|
-
if (
|
|
2231
|
-
|
|
2257
|
+
for (T = !1; ; ) {
|
|
2258
|
+
for (P = S; P > 0; P--) {
|
|
2259
|
+
if (M && (P === 3 || P === 4) ? c(u) : f(u), u.err.length) {
|
|
2260
|
+
d(u);
|
|
2232
2261
|
return;
|
|
2233
2262
|
}
|
|
2234
|
-
u.data.push(u.param), h(u),
|
|
2263
|
+
u.data.push(u.param), h(u), T = !1, u.index < m && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), T = !0);
|
|
2235
2264
|
}
|
|
2236
|
-
if (!
|
|
2265
|
+
if (!T && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
|
|
2237
2266
|
break;
|
|
2238
2267
|
}
|
|
2239
|
-
|
|
2268
|
+
d(u);
|
|
2240
2269
|
}
|
|
2241
|
-
return
|
|
2242
|
-
var y = new r(
|
|
2243
|
-
for (h(y); y.index <
|
|
2270
|
+
return q0 = function(m) {
|
|
2271
|
+
var y = new r(m), M = y.max;
|
|
2272
|
+
for (h(y); y.index < M && !y.err.length; )
|
|
2244
2273
|
l(y);
|
|
2245
2274
|
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"), {
|
|
2246
2275
|
err: y.err,
|
|
2247
2276
|
segments: y.result
|
|
2248
2277
|
};
|
|
2249
|
-
},
|
|
2278
|
+
}, q0;
|
|
2250
2279
|
}
|
|
2251
2280
|
var D0, xt;
|
|
2252
|
-
function
|
|
2281
|
+
function Bt() {
|
|
2253
2282
|
if (xt) return D0;
|
|
2254
2283
|
xt = 1;
|
|
2255
2284
|
function n(t, o) {
|
|
@@ -2299,10 +2328,10 @@ function Nt() {
|
|
|
2299
2328
|
}, D0 = e, D0;
|
|
2300
2329
|
}
|
|
2301
2330
|
var j0, yt;
|
|
2302
|
-
function
|
|
2331
|
+
function Me() {
|
|
2303
2332
|
if (yt) return j0;
|
|
2304
2333
|
yt = 1;
|
|
2305
|
-
var n =
|
|
2334
|
+
var n = Bt(), e = {
|
|
2306
2335
|
matrix: !0,
|
|
2307
2336
|
scale: !0,
|
|
2308
2337
|
rotate: !0,
|
|
@@ -2345,7 +2374,7 @@ function me() {
|
|
|
2345
2374
|
}, j0;
|
|
2346
2375
|
}
|
|
2347
2376
|
var z0, vt;
|
|
2348
|
-
function
|
|
2377
|
+
function Le() {
|
|
2349
2378
|
if (vt) return z0;
|
|
2350
2379
|
vt = 1;
|
|
2351
2380
|
var n = Math.PI * 2;
|
|
@@ -2353,42 +2382,42 @@ function Ae() {
|
|
|
2353
2382
|
var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
|
|
2354
2383
|
return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
|
|
2355
2384
|
}
|
|
2356
|
-
function t(i, a, s, r, h, c, f,
|
|
2357
|
-
var
|
|
2358
|
-
|
|
2359
|
-
var C =
|
|
2360
|
-
return c === 0 &&
|
|
2385
|
+
function t(i, a, s, r, h, c, f, d, l, u) {
|
|
2386
|
+
var m = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f, T = d * d, S = m * m, P = y * y, E = M * T - M * P - T * S;
|
|
2387
|
+
E < 0 && (E = 0), E /= M * P + T * S, E = Math.sqrt(E) * (h === c ? -1 : 1);
|
|
2388
|
+
var C = E * f / d * y, O = E * -d / f * m, R = u * C - l * O + (i + s) / 2, G = l * C + u * O + (a + r) / 2, z = (m - C) / f, H = (y - O) / d, t0 = (-m - C) / f, e0 = (-y - O) / d, n0 = e(1, 0, z, H), K = e(z, H, t0, e0);
|
|
2389
|
+
return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [R, G, n0, K];
|
|
2361
2390
|
}
|
|
2362
2391
|
function o(i, a) {
|
|
2363
2392
|
var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), f = Math.sin(i + a);
|
|
2364
2393
|
return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
|
|
2365
2394
|
}
|
|
2366
|
-
return z0 = function(a, s, r, h, c, f,
|
|
2367
|
-
var
|
|
2368
|
-
if (
|
|
2395
|
+
return z0 = function(a, s, r, h, c, f, d, l, u) {
|
|
2396
|
+
var m = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2, T = -m * (a - r) / 2 + y * (s - h) / 2;
|
|
2397
|
+
if (M === 0 && T === 0)
|
|
2369
2398
|
return [];
|
|
2370
|
-
if (
|
|
2399
|
+
if (d === 0 || l === 0)
|
|
2371
2400
|
return [];
|
|
2372
|
-
|
|
2373
|
-
var
|
|
2374
|
-
|
|
2375
|
-
var
|
|
2376
|
-
|
|
2377
|
-
for (var
|
|
2378
|
-
|
|
2379
|
-
return
|
|
2380
|
-
for (var
|
|
2381
|
-
var
|
|
2382
|
-
|
|
2383
|
-
var
|
|
2384
|
-
|
|
2401
|
+
d = Math.abs(d), l = Math.abs(l);
|
|
2402
|
+
var S = M * M / (d * d) + T * T / (l * l);
|
|
2403
|
+
S > 1 && (d *= Math.sqrt(S), l *= Math.sqrt(S));
|
|
2404
|
+
var P = t(a, s, r, h, c, f, d, l, m, y), E = [], C = P[2], O = P[3], R = Math.max(Math.ceil(Math.abs(O) / (n / 4)), 1);
|
|
2405
|
+
O /= R;
|
|
2406
|
+
for (var G = 0; G < R; G++)
|
|
2407
|
+
E.push(o(C, O)), C += O;
|
|
2408
|
+
return E.map(function(z) {
|
|
2409
|
+
for (var H = 0; H < z.length; H += 2) {
|
|
2410
|
+
var t0 = z[H + 0], e0 = z[H + 1];
|
|
2411
|
+
t0 *= d, e0 *= l;
|
|
2412
|
+
var n0 = y * t0 - m * e0, K = m * t0 + y * e0;
|
|
2413
|
+
z[H + 0] = n0 + P[0], z[H + 1] = K + P[1];
|
|
2385
2414
|
}
|
|
2386
|
-
return
|
|
2415
|
+
return z;
|
|
2387
2416
|
});
|
|
2388
2417
|
}, z0;
|
|
2389
2418
|
}
|
|
2390
2419
|
var U0, wt;
|
|
2391
|
-
function
|
|
2420
|
+
function Te() {
|
|
2392
2421
|
if (wt) return U0;
|
|
2393
2422
|
wt = 1;
|
|
2394
2423
|
var n = 1e-10, e = Math.PI / 180;
|
|
@@ -2406,21 +2435,21 @@ function Me() {
|
|
|
2406
2435
|
], 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])), f = (r + h) / 2;
|
|
2407
2436
|
if (c < n * f)
|
|
2408
2437
|
return this.rx = this.ry = Math.sqrt(f), this.ax = 0, this;
|
|
2409
|
-
var
|
|
2438
|
+
var d = s[0] * s[1] + s[2] * s[3];
|
|
2410
2439
|
c = Math.sqrt(c);
|
|
2411
2440
|
var l = f + c / 2, u = f - c / 2;
|
|
2412
|
-
return this.ax = Math.abs(
|
|
2413
|
-
Math.abs(
|
|
2441
|
+
return this.ax = Math.abs(d) < n && Math.abs(l - h) < n ? 90 : Math.atan(
|
|
2442
|
+
Math.abs(d) > Math.abs(l - h) ? (l - r) / d : d / (l - h)
|
|
2414
2443
|
) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(u)) : (this.ax += 90, this.rx = Math.sqrt(u), this.ry = Math.sqrt(l)), this;
|
|
2415
2444
|
}, t.prototype.isDegenerate = function() {
|
|
2416
2445
|
return this.rx < n * this.ry || this.ry < n * this.rx;
|
|
2417
2446
|
}, U0 = t, U0;
|
|
2418
2447
|
}
|
|
2419
2448
|
var Y0, mt;
|
|
2420
|
-
function
|
|
2449
|
+
function Pe() {
|
|
2421
2450
|
if (mt) return Y0;
|
|
2422
2451
|
mt = 1;
|
|
2423
|
-
var n =
|
|
2452
|
+
var n = be(), e = Me(), t = Bt(), o = Le(), i = Te();
|
|
2424
2453
|
function a(s) {
|
|
2425
2454
|
if (!(this instanceof a))
|
|
2426
2455
|
return new a(s);
|
|
@@ -2440,39 +2469,39 @@ function be() {
|
|
|
2440
2469
|
throw new Error("SvgPath.from: invalid param type " + s);
|
|
2441
2470
|
}, a.prototype.__matrix = function(s) {
|
|
2442
2471
|
var r = this, h;
|
|
2443
|
-
s.queue.length && this.iterate(function(c, f,
|
|
2444
|
-
var u,
|
|
2472
|
+
s.queue.length && this.iterate(function(c, f, d, l) {
|
|
2473
|
+
var u, m, y, M;
|
|
2445
2474
|
switch (c[0]) {
|
|
2446
2475
|
// Process 'assymetric' commands separately
|
|
2447
2476
|
case "v":
|
|
2448
|
-
u = s.calc(0, c[1], !0),
|
|
2477
|
+
u = s.calc(0, c[1], !0), m = u[0] === 0 ? ["v", u[1]] : ["l", u[0], u[1]];
|
|
2449
2478
|
break;
|
|
2450
2479
|
case "V":
|
|
2451
|
-
u = s.calc(
|
|
2480
|
+
u = s.calc(d, c[1], !1), m = u[0] === s.calc(d, l, !1)[0] ? ["V", u[1]] : ["L", u[0], u[1]];
|
|
2452
2481
|
break;
|
|
2453
2482
|
case "h":
|
|
2454
|
-
u = s.calc(c[1], 0, !0),
|
|
2483
|
+
u = s.calc(c[1], 0, !0), m = u[1] === 0 ? ["h", u[0]] : ["l", u[0], u[1]];
|
|
2455
2484
|
break;
|
|
2456
2485
|
case "H":
|
|
2457
|
-
u = s.calc(c[1], l, !1),
|
|
2486
|
+
u = s.calc(c[1], l, !1), m = u[1] === s.calc(d, l, !1)[1] ? ["H", u[0]] : ["L", u[0], u[1]];
|
|
2458
2487
|
break;
|
|
2459
2488
|
case "a":
|
|
2460
2489
|
case "A":
|
|
2461
|
-
var
|
|
2462
|
-
if (
|
|
2463
|
-
|
|
2490
|
+
var T = s.toArray(), S = i(c[1], c[2], c[3]).transform(T);
|
|
2491
|
+
if (T[0] * T[3] - T[1] * T[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = 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) {
|
|
2492
|
+
m = [c[0] === "a" ? "l" : "L", u[0], u[1]];
|
|
2464
2493
|
break;
|
|
2465
2494
|
}
|
|
2466
|
-
|
|
2495
|
+
S.isDegenerate() ? m = [c[0] === "a" ? "l" : "L", u[0], u[1]] : m = [c[0], S.rx, S.ry, S.ax, c[4], c[5], u[0], u[1]];
|
|
2467
2496
|
break;
|
|
2468
2497
|
case "m":
|
|
2469
|
-
|
|
2498
|
+
M = f > 0, u = s.calc(c[1], c[2], M), m = ["m", u[0], u[1]];
|
|
2470
2499
|
break;
|
|
2471
2500
|
default:
|
|
2472
|
-
for (y = c[0],
|
|
2473
|
-
u = s.calc(c[h], c[h + 1],
|
|
2501
|
+
for (y = c[0], m = [y], M = y.toLowerCase() === y, h = 1; h < c.length; h += 2)
|
|
2502
|
+
u = s.calc(c[h], c[h + 1], M), m.push(u[0], u[1]);
|
|
2474
2503
|
}
|
|
2475
|
-
r.segments[f] =
|
|
2504
|
+
r.segments[f] = m;
|
|
2476
2505
|
}, !0);
|
|
2477
2506
|
}, a.prototype.__evaluateStack = function() {
|
|
2478
2507
|
var s, r;
|
|
@@ -2489,11 +2518,11 @@ function be() {
|
|
|
2489
2518
|
var s = "", r = "", h = !1;
|
|
2490
2519
|
this.__evaluateStack();
|
|
2491
2520
|
for (var c = 0, f = this.segments.length; c < f; c++) {
|
|
2492
|
-
var
|
|
2521
|
+
var d = this.segments[c], l = d[0];
|
|
2493
2522
|
l !== r || l === "m" || l === "M" ? (l === "m" && r === "z" && (s += " "), s += l, h = !1) : h = !0;
|
|
2494
|
-
for (var u = 1; u <
|
|
2495
|
-
var
|
|
2496
|
-
u === 1 ? h &&
|
|
2523
|
+
for (var u = 1; u < d.length; u++) {
|
|
2524
|
+
var m = d[u];
|
|
2525
|
+
u === 1 ? h && m >= 0 && (s += " ") : m >= 0 && (s += " "), s += m;
|
|
2497
2526
|
}
|
|
2498
2527
|
r = l;
|
|
2499
2528
|
}
|
|
@@ -2513,7 +2542,7 @@ function be() {
|
|
|
2513
2542
|
}, a.prototype.transform = function(s) {
|
|
2514
2543
|
return s.trim() ? (this.__stack.push(e(s)), this) : this;
|
|
2515
2544
|
}, a.prototype.round = function(s) {
|
|
2516
|
-
var r = 0, h = 0, c = 0, f = 0,
|
|
2545
|
+
var r = 0, h = 0, c = 0, f = 0, d;
|
|
2517
2546
|
return s = s || 0, this.__evaluateStack(), this.segments.forEach(function(l) {
|
|
2518
2547
|
var u = l[0].toLowerCase() === l[0];
|
|
2519
2548
|
switch (l[0]) {
|
|
@@ -2538,52 +2567,52 @@ function be() {
|
|
|
2538
2567
|
u && (l[6] += c, l[7] += f), c = l[6] - l[6].toFixed(s), f = 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);
|
|
2539
2568
|
return;
|
|
2540
2569
|
default:
|
|
2541
|
-
|
|
2570
|
+
d = l.length, u && (l[d - 2] += c, l[d - 1] += f), c = l[d - 2] - l[d - 2].toFixed(s), f = l[d - 1] - l[d - 1].toFixed(s), l.forEach(function(m, y) {
|
|
2542
2571
|
y && (l[y] = +l[y].toFixed(s));
|
|
2543
2572
|
});
|
|
2544
2573
|
return;
|
|
2545
2574
|
}
|
|
2546
2575
|
}), this;
|
|
2547
2576
|
}, a.prototype.iterate = function(s, r) {
|
|
2548
|
-
var h = this.segments, c = {}, f = !1,
|
|
2549
|
-
if (r || this.__evaluateStack(), h.forEach(function(
|
|
2550
|
-
var
|
|
2551
|
-
Array.isArray(
|
|
2552
|
-
var C =
|
|
2553
|
-
switch (
|
|
2577
|
+
var h = this.segments, c = {}, f = !1, d = 0, l = 0, u = 0, m = 0, y, M, T;
|
|
2578
|
+
if (r || this.__evaluateStack(), h.forEach(function(S, P) {
|
|
2579
|
+
var E = s(S, P, d, l);
|
|
2580
|
+
Array.isArray(E) && (c[P] = E, f = !0);
|
|
2581
|
+
var C = S[0] === S[0].toLowerCase();
|
|
2582
|
+
switch (S[0]) {
|
|
2554
2583
|
case "m":
|
|
2555
2584
|
case "M":
|
|
2556
|
-
|
|
2585
|
+
d = S[1] + (C ? d : 0), l = S[2] + (C ? l : 0), u = d, m = l;
|
|
2557
2586
|
return;
|
|
2558
2587
|
case "h":
|
|
2559
2588
|
case "H":
|
|
2560
|
-
|
|
2589
|
+
d = S[1] + (C ? d : 0);
|
|
2561
2590
|
return;
|
|
2562
2591
|
case "v":
|
|
2563
2592
|
case "V":
|
|
2564
|
-
l =
|
|
2593
|
+
l = S[1] + (C ? l : 0);
|
|
2565
2594
|
return;
|
|
2566
2595
|
case "z":
|
|
2567
2596
|
case "Z":
|
|
2568
|
-
|
|
2597
|
+
d = u, l = m;
|
|
2569
2598
|
return;
|
|
2570
2599
|
default:
|
|
2571
|
-
|
|
2600
|
+
d = S[S.length - 2] + (C ? d : 0), l = S[S.length - 1] + (C ? l : 0);
|
|
2572
2601
|
}
|
|
2573
2602
|
}), !f)
|
|
2574
2603
|
return this;
|
|
2575
|
-
for (
|
|
2604
|
+
for (T = [], y = 0; y < h.length; y++)
|
|
2576
2605
|
if (typeof c[y] < "u")
|
|
2577
|
-
for (
|
|
2578
|
-
|
|
2606
|
+
for (M = 0; M < c[y].length; M++)
|
|
2607
|
+
T.push(c[y][M]);
|
|
2579
2608
|
else
|
|
2580
|
-
|
|
2581
|
-
return this.segments =
|
|
2609
|
+
T.push(h[y]);
|
|
2610
|
+
return this.segments = T, this;
|
|
2582
2611
|
}, a.prototype.abs = function() {
|
|
2583
2612
|
return this.iterate(function(s, r, h, c) {
|
|
2584
|
-
var f = s[0],
|
|
2585
|
-
if (f !==
|
|
2586
|
-
switch (s[0] =
|
|
2613
|
+
var f = s[0], d = f.toUpperCase(), l;
|
|
2614
|
+
if (f !== d)
|
|
2615
|
+
switch (s[0] = d, f) {
|
|
2587
2616
|
case "v":
|
|
2588
2617
|
s[1] += c;
|
|
2589
2618
|
return;
|
|
@@ -2597,9 +2626,9 @@ function be() {
|
|
|
2597
2626
|
}, !0), this;
|
|
2598
2627
|
}, a.prototype.rel = function() {
|
|
2599
2628
|
return this.iterate(function(s, r, h, c) {
|
|
2600
|
-
var f = s[0],
|
|
2601
|
-
if (f !==
|
|
2602
|
-
switch (s[0] =
|
|
2629
|
+
var f = s[0], d = f.toLowerCase(), l;
|
|
2630
|
+
if (f !== d && !(r === 0 && f === "M"))
|
|
2631
|
+
switch (s[0] = d, f) {
|
|
2603
2632
|
case "V":
|
|
2604
2633
|
s[1] -= c;
|
|
2605
2634
|
return;
|
|
@@ -2613,25 +2642,25 @@ function be() {
|
|
|
2613
2642
|
}, !0), this;
|
|
2614
2643
|
}, a.prototype.unarc = function() {
|
|
2615
2644
|
return this.iterate(function(s, r, h, c) {
|
|
2616
|
-
var f,
|
|
2617
|
-
return
|
|
2645
|
+
var f, d, l, u = [], m = s[0];
|
|
2646
|
+
return m !== "A" && m !== "a" ? null : (m === "a" ? (d = h + s[6], l = c + s[7]) : (d = s[6], l = s[7]), f = o(h, c, d, l, s[4], s[5], s[1], s[2], s[3]), f.length === 0 ? [[s[0] === "a" ? "l" : "L", s[6], s[7]]] : (f.forEach(function(y) {
|
|
2618
2647
|
u.push(["C", y[2], y[3], y[4], y[5], y[6], y[7]]);
|
|
2619
2648
|
}), u));
|
|
2620
2649
|
}), this;
|
|
2621
2650
|
}, a.prototype.unshort = function() {
|
|
2622
|
-
var s = this.segments, r, h, c, f,
|
|
2623
|
-
return this.iterate(function(l, u,
|
|
2624
|
-
var
|
|
2625
|
-
u && (
|
|
2626
|
-
|
|
2651
|
+
var s = this.segments, r, h, c, f, d;
|
|
2652
|
+
return this.iterate(function(l, u, m, y) {
|
|
2653
|
+
var M = l[0], T = M.toUpperCase(), S;
|
|
2654
|
+
u && (T === "T" ? (S = M === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - m, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, d = -h, S || (f += m, d += y), s[u] = [
|
|
2655
|
+
S ? "q" : "Q",
|
|
2627
2656
|
f,
|
|
2628
|
-
|
|
2657
|
+
d,
|
|
2629
2658
|
l[1],
|
|
2630
2659
|
l[2]
|
|
2631
|
-
]) :
|
|
2632
|
-
|
|
2660
|
+
]) : T === "S" && (S = M === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - m, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, d = -h, S || (f += m, d += y), s[u] = [
|
|
2661
|
+
S ? "c" : "C",
|
|
2633
2662
|
f,
|
|
2634
|
-
|
|
2663
|
+
d,
|
|
2635
2664
|
l[1],
|
|
2636
2665
|
l[2],
|
|
2637
2666
|
l[3],
|
|
@@ -2640,36 +2669,36 @@ function be() {
|
|
|
2640
2669
|
}), this;
|
|
2641
2670
|
}, Y0 = a, Y0;
|
|
2642
2671
|
}
|
|
2643
|
-
var
|
|
2644
|
-
function
|
|
2645
|
-
return At || (At = 1,
|
|
2672
|
+
var H0, At;
|
|
2673
|
+
function Ce() {
|
|
2674
|
+
return At || (At = 1, H0 = Pe()), H0;
|
|
2646
2675
|
}
|
|
2647
|
-
var
|
|
2648
|
-
const
|
|
2649
|
-
var
|
|
2650
|
-
function
|
|
2676
|
+
var Se = Ce();
|
|
2677
|
+
const Ee = /* @__PURE__ */ Ae(Se);
|
|
2678
|
+
var X0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, ke = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
2679
|
+
function Ie(n) {
|
|
2651
2680
|
var e = [];
|
|
2652
|
-
return n.replace(
|
|
2681
|
+
return n.replace(ke, function(t, o, i) {
|
|
2653
2682
|
var a = o.toLowerCase();
|
|
2654
|
-
for (i =
|
|
2655
|
-
if (i.length ===
|
|
2683
|
+
for (i = Oe(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
|
|
2684
|
+
if (i.length === X0[a])
|
|
2656
2685
|
return i.unshift(o), e.push(i);
|
|
2657
|
-
if (i.length <
|
|
2686
|
+
if (i.length < X0[a])
|
|
2658
2687
|
throw new Error("malformed path data");
|
|
2659
|
-
e.push([o].concat(i.splice(0,
|
|
2688
|
+
e.push([o].concat(i.splice(0, X0[a])));
|
|
2660
2689
|
}
|
|
2661
2690
|
}), e;
|
|
2662
2691
|
}
|
|
2663
|
-
var
|
|
2664
|
-
function
|
|
2665
|
-
var e = n.match(
|
|
2692
|
+
var _e = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
|
|
2693
|
+
function Oe(n) {
|
|
2694
|
+
var e = n.match(_e);
|
|
2666
2695
|
return e ? e.map(Number) : [];
|
|
2667
2696
|
}
|
|
2668
|
-
function
|
|
2697
|
+
function i0(n, e, t, o, i, a, s, r) {
|
|
2669
2698
|
return new Z0(n, e, t, o, i, a, s, r);
|
|
2670
2699
|
}
|
|
2671
2700
|
function Z0(n, e, t, o, i, a, s, r) {
|
|
2672
|
-
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 =
|
|
2701
|
+
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 = Ye, this.getPoint = Ne, this.getDerivative = Re) : (this.getArcLength = Be, this.getPoint = qt, this.getDerivative = Fe), this.init();
|
|
2673
2702
|
}
|
|
2674
2703
|
Z0.prototype = {
|
|
2675
2704
|
constructor: Z0,
|
|
@@ -2731,13 +2760,13 @@ Z0.prototype = {
|
|
|
2731
2760
|
return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
|
|
2732
2761
|
}
|
|
2733
2762
|
};
|
|
2734
|
-
function
|
|
2763
|
+
function Fe(n, e, t) {
|
|
2735
2764
|
return {
|
|
2736
2765
|
x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
|
|
2737
2766
|
y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
|
|
2738
2767
|
};
|
|
2739
2768
|
}
|
|
2740
|
-
function
|
|
2769
|
+
function Re(n, e, t) {
|
|
2741
2770
|
var o = qt(
|
|
2742
2771
|
[3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
|
|
2743
2772
|
[3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
|
|
@@ -2747,8 +2776,8 @@ function _e(n, e, t) {
|
|
|
2747
2776
|
}
|
|
2748
2777
|
function $0(n, e, t, o, i) {
|
|
2749
2778
|
for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
|
|
2750
|
-
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e,
|
|
2751
|
-
f < a ? (a = f, s += r) :
|
|
2779
|
+
var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e, d = Math.abs(n - c) / e;
|
|
2780
|
+
f < a ? (a = f, s += r) : d < a ? (a = d, s -= r) : r /= 2;
|
|
2752
2781
|
}
|
|
2753
2782
|
return s;
|
|
2754
2783
|
}
|
|
@@ -2756,21 +2785,21 @@ function qt(n, e, t) {
|
|
|
2756
2785
|
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];
|
|
2757
2786
|
return { x: o, y: i };
|
|
2758
2787
|
}
|
|
2759
|
-
function
|
|
2788
|
+
function Ne(n, e, t) {
|
|
2760
2789
|
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];
|
|
2761
2790
|
return { x: o, y: i };
|
|
2762
2791
|
}
|
|
2763
|
-
function
|
|
2792
|
+
function Be(n, e, t) {
|
|
2764
2793
|
t === void 0 && (t = 1);
|
|
2765
2794
|
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;
|
|
2766
2795
|
if (r === 0)
|
|
2767
2796
|
return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
|
|
2768
|
-
var f = h / (2 * r),
|
|
2797
|
+
var f = h / (2 * r), d = c / r, l = t + f, u = d - f * f;
|
|
2769
2798
|
return Math.sqrt(r) / 2 * (l * Math.sqrt(l * l + u) - f * Math.sqrt(f * f + u) + u * Math.log(Math.abs(
|
|
2770
2799
|
(l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
|
|
2771
2800
|
)));
|
|
2772
2801
|
}
|
|
2773
|
-
var
|
|
2802
|
+
var qe = [
|
|
2774
2803
|
[],
|
|
2775
2804
|
[],
|
|
2776
2805
|
[-0.5773502691896257, 0.5773502691896257],
|
|
@@ -2796,7 +2825,7 @@ var Re = [
|
|
|
2796
2825
|
[-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],
|
|
2797
2826
|
[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],
|
|
2798
2827
|
[-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]
|
|
2799
|
-
],
|
|
2828
|
+
], De = [
|
|
2800
2829
|
[],
|
|
2801
2830
|
[],
|
|
2802
2831
|
[1, 1],
|
|
@@ -2822,9 +2851,9 @@ var Re = [
|
|
|
2822
2851
|
[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],
|
|
2823
2852
|
[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],
|
|
2824
2853
|
[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]
|
|
2825
|
-
],
|
|
2826
|
-
function
|
|
2827
|
-
return
|
|
2854
|
+
], je = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
|
|
2855
|
+
function ze(n, e) {
|
|
2856
|
+
return je[n][e];
|
|
2828
2857
|
}
|
|
2829
2858
|
function V0(n, e, t) {
|
|
2830
2859
|
var o = t.length - 1, i, a, s;
|
|
@@ -2832,7 +2861,7 @@ function V0(n, e, t) {
|
|
|
2832
2861
|
return 0;
|
|
2833
2862
|
if (n === 0) {
|
|
2834
2863
|
for (a = 0, s = 0; s <= o; s++)
|
|
2835
|
-
a +=
|
|
2864
|
+
a += ze(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
|
|
2836
2865
|
return a;
|
|
2837
2866
|
} else {
|
|
2838
2867
|
for (i = new Array(o), s = 0; s < o; s++)
|
|
@@ -2840,65 +2869,65 @@ function V0(n, e, t) {
|
|
|
2840
2869
|
return V0(n - 1, e, i);
|
|
2841
2870
|
}
|
|
2842
2871
|
}
|
|
2843
|
-
function
|
|
2872
|
+
function Ue(n, e, t) {
|
|
2844
2873
|
var o = V0(1, t, n), i = V0(1, t, e), a = o * o + i * i;
|
|
2845
2874
|
return Math.sqrt(a);
|
|
2846
2875
|
}
|
|
2847
|
-
function
|
|
2876
|
+
function Ye(n, e, t) {
|
|
2848
2877
|
var o, i, a, s;
|
|
2849
2878
|
t === void 0 && (t = 1);
|
|
2850
2879
|
var r = 20;
|
|
2851
2880
|
for (o = t / 2, i = 0, a = 0; a < r; a++)
|
|
2852
|
-
s = o *
|
|
2881
|
+
s = o * qe[r][a] + o, i += De[r][a] * Ue(n, e, s);
|
|
2853
2882
|
return o * i;
|
|
2854
2883
|
}
|
|
2855
2884
|
var C0 = Math.PI * 2;
|
|
2856
|
-
function
|
|
2885
|
+
function bt(n, e, t, o) {
|
|
2857
2886
|
var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
|
|
2858
2887
|
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
2859
2888
|
}
|
|
2860
|
-
function
|
|
2861
|
-
var f = c * (n - t) / 2 + h * (e - o) / 2,
|
|
2862
|
-
|
|
2863
|
-
var
|
|
2864
|
-
return a === 0 &&
|
|
2889
|
+
function He(n, e, t, o, i, a, s, r, h, c) {
|
|
2890
|
+
var f = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, m = f * f, y = d * d, M = l * u - l * y - u * m;
|
|
2891
|
+
M < 0 && (M = 0), M /= l * y + u * m, M = Math.sqrt(M) * (i === a ? -1 : 1);
|
|
2892
|
+
var T = M * s / r * d, S = M * -r / s * f, P = c * T - h * S + (n + t) / 2, E = h * T + c * S + (e + o) / 2, C = (f - T) / s, O = (d - S) / r, R = (-f - T) / s, G = (-d - S) / r, z = bt(1, 0, C, O), H = bt(C, O, R, G);
|
|
2893
|
+
return a === 0 && H > 0 && (H -= C0), a === 1 && H < 0 && (H += C0), [P, E, z, H];
|
|
2865
2894
|
}
|
|
2866
|
-
function
|
|
2895
|
+
function Xe(n, e) {
|
|
2867
2896
|
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);
|
|
2868
2897
|
return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
|
|
2869
2898
|
}
|
|
2870
|
-
function
|
|
2871
|
-
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360),
|
|
2872
|
-
if (
|
|
2899
|
+
function $e(n, e, t, o, i, a, s, r, h) {
|
|
2900
|
+
var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360), d = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
|
|
2901
|
+
if (d === 0 && l === 0)
|
|
2873
2902
|
return [];
|
|
2874
2903
|
if (t === 0 || o === 0)
|
|
2875
2904
|
return [];
|
|
2876
2905
|
t = Math.abs(t), o = Math.abs(o);
|
|
2877
|
-
var u =
|
|
2906
|
+
var u = d * d / (t * t) + l * l / (o * o);
|
|
2878
2907
|
u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
|
|
2879
|
-
var
|
|
2880
|
-
|
|
2881
|
-
for (var
|
|
2882
|
-
y.push(
|
|
2883
|
-
return y.map(function(
|
|
2884
|
-
for (var C = 0; C <
|
|
2885
|
-
var
|
|
2886
|
-
|
|
2887
|
-
var
|
|
2888
|
-
|
|
2908
|
+
var m = He(n, e, r, h, a, s, t, o, c, f), y = [], M = m[2], T = m[3], S = Math.max(Math.ceil(Math.abs(T) / (C0 / 4)), 1);
|
|
2909
|
+
T /= S;
|
|
2910
|
+
for (var P = 0; P < S; P++)
|
|
2911
|
+
y.push(Xe(M, T)), M += T;
|
|
2912
|
+
return y.map(function(E) {
|
|
2913
|
+
for (var C = 0; C < E.length; C += 2) {
|
|
2914
|
+
var O = E[C + 0], R = E[C + 1];
|
|
2915
|
+
O *= t, R *= o;
|
|
2916
|
+
var G = f * O - c * R, z = c * O + f * R;
|
|
2917
|
+
E[C + 0] = G + m[0], E[C + 1] = z + m[1];
|
|
2889
2918
|
}
|
|
2890
|
-
return
|
|
2919
|
+
return E;
|
|
2891
2920
|
});
|
|
2892
2921
|
}
|
|
2893
|
-
function
|
|
2922
|
+
function Mt(n, e, t, o, i, a, s, r, h) {
|
|
2894
2923
|
return new K0(n, e, t, o, i, a, s, r, h);
|
|
2895
2924
|
}
|
|
2896
2925
|
function K0(n, e, t, o, i, a, s, r, h) {
|
|
2897
|
-
var c = 0, f = [],
|
|
2926
|
+
var c = 0, f = [], d = [], l = $e(n, e, t, o, i, a, s, r, h);
|
|
2898
2927
|
l.forEach(function(u) {
|
|
2899
|
-
var
|
|
2900
|
-
c += y, f.push(y),
|
|
2901
|
-
}), this.length = c, this.partialLengths = f, this.curves =
|
|
2928
|
+
var m = new i0(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = m.getTotalLength();
|
|
2929
|
+
c += y, f.push(y), d.push(m);
|
|
2930
|
+
}), this.length = c, this.partialLengths = f, this.curves = d;
|
|
2902
2931
|
}
|
|
2903
2932
|
K0.prototype = {
|
|
2904
2933
|
constructor: K0,
|
|
@@ -2930,7 +2959,7 @@ K0.prototype = {
|
|
|
2930
2959
|
return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
|
|
2931
2960
|
}
|
|
2932
2961
|
};
|
|
2933
|
-
function
|
|
2962
|
+
function r0(n, e, t, o) {
|
|
2934
2963
|
return new k0(n, e, t, o);
|
|
2935
2964
|
}
|
|
2936
2965
|
function k0(n, e, t, o) {
|
|
@@ -2951,13 +2980,13 @@ k0.prototype.getPropertiesAtLength = function(n) {
|
|
|
2951
2980
|
var e = this.getPointAtLength(n), t = this.getTangentAtLength();
|
|
2952
2981
|
return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
|
|
2953
2982
|
};
|
|
2954
|
-
function
|
|
2983
|
+
function Ge(n) {
|
|
2955
2984
|
var e = 0, t = [], o = [];
|
|
2956
2985
|
function i(s) {
|
|
2957
2986
|
if (!s)
|
|
2958
2987
|
return null;
|
|
2959
|
-
for (var r =
|
|
2960
|
-
r[l][0] === "M" ? (h = [r[l][1], r[l][2]],
|
|
2988
|
+
for (var r = Ie(s), h = [0, 0], c = [0, 0], f, d, l = 0; l < r.length; l++)
|
|
2989
|
+
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 r0(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 r0(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 r0(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 r0(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 r0(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 r0(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 r0(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (f = new i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new i0(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 + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new i0(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]) : f = new i0(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new i0(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 + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new r0(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), 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 ? f = new r0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new i0(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 + f.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(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new r0(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.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 ? f = new i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new r0(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.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(f)) : r[l][0] === "A" ? (f = new Mt(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 + f.getTotalLength(), h = [r[l][6], r[l][7]], o.push(f)) : r[l][0] === "a" && (f = new Mt(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 + f.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(f)), t.push(e);
|
|
2961
2990
|
return i;
|
|
2962
2991
|
}
|
|
2963
2992
|
i.getTotalLength = function() {
|
|
@@ -2983,20 +3012,20 @@ function Xe(n) {
|
|
|
2983
3012
|
function O0(n, e) {
|
|
2984
3013
|
return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
|
|
2985
3014
|
}
|
|
2986
|
-
function
|
|
3015
|
+
function Dt(n, e, t) {
|
|
2987
3016
|
return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
|
|
2988
3017
|
}
|
|
2989
|
-
function
|
|
3018
|
+
function We(n, e) {
|
|
2990
3019
|
return O0(n, e) < 1e-9;
|
|
2991
3020
|
}
|
|
2992
|
-
function
|
|
2993
|
-
let o = n.map((i, a) =>
|
|
3021
|
+
function Ze(n, e, t) {
|
|
3022
|
+
let o = n.map((i, a) => Ve(i, e[a]));
|
|
2994
3023
|
return function(i) {
|
|
2995
3024
|
let a = o.map((s) => s(i));
|
|
2996
|
-
return t ?
|
|
3025
|
+
return t ? Je(a) : a;
|
|
2997
3026
|
};
|
|
2998
3027
|
}
|
|
2999
|
-
function
|
|
3028
|
+
function Ve(n, e) {
|
|
3000
3029
|
return function(t) {
|
|
3001
3030
|
return n.map((o, i) => o + t * (e[i] - o));
|
|
3002
3031
|
};
|
|
@@ -3009,20 +3038,20 @@ Example valid ways of supplying a shape would be:
|
|
|
3009
3038
|
[[0, 0], [10, 0], [10, 10]]
|
|
3010
3039
|
"M0,0 L10,0 L10,10Z"
|
|
3011
3040
|
`;
|
|
3012
|
-
function
|
|
3013
|
-
return new
|
|
3041
|
+
function Ke(n) {
|
|
3042
|
+
return new Ee(n).abs();
|
|
3014
3043
|
}
|
|
3015
|
-
function
|
|
3044
|
+
function Qe(n) {
|
|
3016
3045
|
return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
|
|
3017
3046
|
}
|
|
3018
|
-
function
|
|
3047
|
+
function Je(n) {
|
|
3019
3048
|
return "M" + n.join("L") + "Z";
|
|
3020
3049
|
}
|
|
3021
|
-
function
|
|
3022
|
-
let t =
|
|
3023
|
-
return
|
|
3050
|
+
function tn(n, e) {
|
|
3051
|
+
let t = Ke(n);
|
|
3052
|
+
return en(t) || nn(t, e);
|
|
3024
3053
|
}
|
|
3025
|
-
function
|
|
3054
|
+
function en(n) {
|
|
3026
3055
|
let e = n.segments || [], t = [];
|
|
3027
3056
|
if (!e.length || e[0][0] !== "M")
|
|
3028
3057
|
return !1;
|
|
@@ -3041,11 +3070,11 @@ function Qe(n) {
|
|
|
3041
3070
|
}
|
|
3042
3071
|
return t.length ? { ring: t } : !1;
|
|
3043
3072
|
}
|
|
3044
|
-
function
|
|
3045
|
-
let t =
|
|
3073
|
+
function nn(n, e) {
|
|
3074
|
+
let t = Qe(n)[0], o = [], i, a, s = 3;
|
|
3046
3075
|
if (!t)
|
|
3047
3076
|
throw new TypeError(Q0);
|
|
3048
|
-
a =
|
|
3077
|
+
a = rn(t), i = a.getTotalLength(), e && _0(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
|
|
3049
3078
|
for (let r = 0; r < s; r++) {
|
|
3050
3079
|
let h = a.getPointAtLength(i * r / s);
|
|
3051
3080
|
o.push([h.x, h.y]);
|
|
@@ -3055,51 +3084,51 @@ function Je(n, e) {
|
|
|
3055
3084
|
skipBisect: !0
|
|
3056
3085
|
};
|
|
3057
3086
|
}
|
|
3058
|
-
function
|
|
3087
|
+
function rn(n) {
|
|
3059
3088
|
if (typeof window < "u" && window && window.document)
|
|
3060
3089
|
try {
|
|
3061
3090
|
let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3062
3091
|
return e.setAttributeNS(null, "d", n), e;
|
|
3063
3092
|
} catch {
|
|
3064
3093
|
}
|
|
3065
|
-
return
|
|
3094
|
+
return Ge(n);
|
|
3066
3095
|
}
|
|
3067
3096
|
function Lt(n, e) {
|
|
3068
|
-
const t = n.length + e, o =
|
|
3097
|
+
const t = n.length + e, o = me(n) / e;
|
|
3069
3098
|
let i = 0, a = 0, s = o / 2;
|
|
3070
3099
|
for (; n.length < t; ) {
|
|
3071
3100
|
let r = n[i], h = n[(i + 1) % n.length], c = O0(r, h);
|
|
3072
3101
|
if (s <= a + c) {
|
|
3073
|
-
n.splice(i + 1, 0, c ?
|
|
3102
|
+
n.splice(i + 1, 0, c ? Dt(r, h, (s - a) / c) : r.slice(0)), s += o;
|
|
3074
3103
|
continue;
|
|
3075
3104
|
}
|
|
3076
3105
|
a += c, i++;
|
|
3077
3106
|
}
|
|
3078
3107
|
}
|
|
3079
|
-
function
|
|
3108
|
+
function on(n, e = 1 / 0) {
|
|
3080
3109
|
for (let t = 0; t < n.length; t++) {
|
|
3081
3110
|
let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
|
|
3082
3111
|
for (; O0(o, i) > e; )
|
|
3083
|
-
i =
|
|
3112
|
+
i = Dt(o, i, 0.5), n.splice(t + 1, 0, i);
|
|
3084
3113
|
}
|
|
3085
3114
|
}
|
|
3086
3115
|
function Tt(n, e) {
|
|
3087
3116
|
let t, o, i;
|
|
3088
3117
|
if (typeof n == "string") {
|
|
3089
|
-
let a =
|
|
3118
|
+
let a = tn(n, e);
|
|
3090
3119
|
n = a.ring, i = a.skipBisect;
|
|
3091
3120
|
} else if (!Array.isArray(n))
|
|
3092
3121
|
throw new TypeError(Q0);
|
|
3093
|
-
if (t = n.slice(0), !
|
|
3122
|
+
if (t = n.slice(0), !sn(t))
|
|
3094
3123
|
throw new TypeError(Q0);
|
|
3095
|
-
return t.length > 1 &&
|
|
3124
|
+
return t.length > 1 && We(t[0], t[t.length - 1]) && t.pop(), o = we(t), o > 0 && t.reverse(), !i && e && _0(e) && e > 0 && on(t, e), t;
|
|
3096
3125
|
}
|
|
3097
|
-
function
|
|
3126
|
+
function sn(n) {
|
|
3098
3127
|
return n.every(function(e) {
|
|
3099
3128
|
return Array.isArray(e) && e.length >= 2 && _0(e[0]) && _0(e[1]);
|
|
3100
3129
|
});
|
|
3101
3130
|
}
|
|
3102
|
-
function
|
|
3131
|
+
function an(n, e) {
|
|
3103
3132
|
let t = n.length, o = 1 / 0, i, a, s;
|
|
3104
3133
|
for (let r = 0; r < t; r++)
|
|
3105
3134
|
a = 0, e.forEach(function(h, c) {
|
|
@@ -3108,278 +3137,278 @@ function rn(n, e) {
|
|
|
3108
3137
|
}), a < o && (o = a, i = r);
|
|
3109
3138
|
i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
|
|
3110
3139
|
}
|
|
3111
|
-
function
|
|
3112
|
-
let i = Tt(n, t), a = Tt(e, t), s =
|
|
3140
|
+
function hn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
|
|
3141
|
+
let i = Tt(n, t), a = Tt(e, t), s = ln(i, a, o);
|
|
3113
3142
|
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);
|
|
3114
3143
|
}
|
|
3115
|
-
function
|
|
3144
|
+
function ln(n, e, t) {
|
|
3116
3145
|
let o;
|
|
3117
|
-
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0),
|
|
3146
|
+
return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), an(n, e), Ze(n, e, t);
|
|
3118
3147
|
}
|
|
3119
3148
|
var I0 = { exports: {} }, Pt;
|
|
3120
|
-
function
|
|
3149
|
+
function cn() {
|
|
3121
3150
|
if (Pt) return I0.exports;
|
|
3122
3151
|
Pt = 1, I0.exports = n, I0.exports.default = n;
|
|
3123
|
-
function n(g,
|
|
3152
|
+
function n(g, x, p) {
|
|
3124
3153
|
p = p || 2;
|
|
3125
|
-
var v =
|
|
3126
|
-
if (!
|
|
3127
|
-
var
|
|
3128
|
-
if (v && (
|
|
3129
|
-
|
|
3130
|
-
for (var
|
|
3131
|
-
|
|
3132
|
-
|
|
3154
|
+
var v = x && x.length, w = v ? x[0] * p : g.length, A = e(g, 0, w, p, !0), b = [];
|
|
3155
|
+
if (!A || A.next === A.prev) return b;
|
|
3156
|
+
var L, F, I, Y, D, N, W;
|
|
3157
|
+
if (v && (A = h(g, x, A, p)), g.length > 80 * p) {
|
|
3158
|
+
L = I = g[0], F = Y = g[1];
|
|
3159
|
+
for (var j = p; j < w; j += p)
|
|
3160
|
+
D = g[j], N = g[j + 1], D < L && (L = D), N < F && (F = N), D > I && (I = D), N > Y && (Y = N);
|
|
3161
|
+
W = Math.max(I - L, Y - F), W = W !== 0 ? 32767 / W : 0;
|
|
3133
3162
|
}
|
|
3134
|
-
return o(
|
|
3163
|
+
return o(A, b, p, L, F, W, 0), b;
|
|
3135
3164
|
}
|
|
3136
|
-
function e(g,
|
|
3137
|
-
var
|
|
3138
|
-
if (w === F0(g,
|
|
3139
|
-
for (
|
|
3165
|
+
function e(g, x, p, v, w) {
|
|
3166
|
+
var A, b;
|
|
3167
|
+
if (w === F0(g, x, p, v) > 0)
|
|
3168
|
+
for (A = x; A < p; A += v) b = e0(A, g[A], g[A + 1], b);
|
|
3140
3169
|
else
|
|
3141
|
-
for (
|
|
3142
|
-
return
|
|
3170
|
+
for (A = p - v; A >= x; A -= v) b = e0(A, g[A], g[A + 1], b);
|
|
3171
|
+
return b && E(b, b.next) && (n0(b), b = b.next), b;
|
|
3143
3172
|
}
|
|
3144
|
-
function t(g,
|
|
3173
|
+
function t(g, x) {
|
|
3145
3174
|
if (!g) return g;
|
|
3146
|
-
|
|
3175
|
+
x || (x = g);
|
|
3147
3176
|
var p = g, v;
|
|
3148
3177
|
do
|
|
3149
|
-
if (v = !1, !p.steiner && (
|
|
3150
|
-
if (
|
|
3178
|
+
if (v = !1, !p.steiner && (E(p, p.next) || P(p.prev, p, p.next) === 0)) {
|
|
3179
|
+
if (n0(p), p = x = p.prev, p === p.next) break;
|
|
3151
3180
|
v = !0;
|
|
3152
3181
|
} else
|
|
3153
3182
|
p = p.next;
|
|
3154
|
-
while (v || p !==
|
|
3155
|
-
return
|
|
3183
|
+
while (v || p !== x);
|
|
3184
|
+
return x;
|
|
3156
3185
|
}
|
|
3157
|
-
function o(g,
|
|
3186
|
+
function o(g, x, p, v, w, A, b) {
|
|
3158
3187
|
if (g) {
|
|
3159
|
-
!
|
|
3160
|
-
for (var
|
|
3161
|
-
if (
|
|
3162
|
-
|
|
3188
|
+
!b && A && u(g, v, w, A);
|
|
3189
|
+
for (var L = g, F, I; g.prev !== g.next; ) {
|
|
3190
|
+
if (F = g.prev, I = g.next, A ? a(g, v, w, A) : i(g)) {
|
|
3191
|
+
x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(I.i / p | 0), n0(g), g = I.next, L = I.next;
|
|
3163
3192
|
continue;
|
|
3164
3193
|
}
|
|
3165
|
-
if (g = I, g ===
|
|
3166
|
-
|
|
3194
|
+
if (g = I, g === L) {
|
|
3195
|
+
b ? b === 1 ? (g = s(t(g), x, p), o(g, x, p, v, w, A, 2)) : b === 2 && r(g, x, p, v, w, A) : o(t(g), x, p, v, w, A, 1);
|
|
3167
3196
|
break;
|
|
3168
3197
|
}
|
|
3169
3198
|
}
|
|
3170
3199
|
}
|
|
3171
3200
|
}
|
|
3172
3201
|
function i(g) {
|
|
3173
|
-
var
|
|
3174
|
-
if (
|
|
3175
|
-
for (var w =
|
|
3176
|
-
if (
|
|
3177
|
-
|
|
3202
|
+
var x = g.prev, p = g, v = g.next;
|
|
3203
|
+
if (P(x, p, v) >= 0) return !1;
|
|
3204
|
+
for (var w = x.x, A = p.x, b = v.x, L = x.y, F = p.y, I = v.y, Y = w < A ? w < b ? w : b : A < b ? A : b, D = L < F ? L < I ? L : I : F < I ? F : I, N = w > A ? w > b ? w : b : A > b ? A : b, W = L > F ? L > I ? L : I : F > I ? F : I, j = v.next; j !== x; ) {
|
|
3205
|
+
if (j.x >= Y && j.x <= N && j.y >= D && j.y <= W && T(w, L, A, F, b, I, j.x, j.y) && P(j.prev, j, j.next) >= 0) return !1;
|
|
3206
|
+
j = j.next;
|
|
3178
3207
|
}
|
|
3179
3208
|
return !0;
|
|
3180
3209
|
}
|
|
3181
|
-
function a(g,
|
|
3182
|
-
var w = g.prev,
|
|
3183
|
-
if (
|
|
3184
|
-
for (var
|
|
3185
|
-
if (
|
|
3210
|
+
function a(g, x, p, v) {
|
|
3211
|
+
var w = g.prev, A = g, b = g.next;
|
|
3212
|
+
if (P(w, A, b) >= 0) return !1;
|
|
3213
|
+
for (var L = w.x, F = A.x, I = b.x, Y = w.y, D = A.y, N = b.y, W = L < F ? L < I ? L : I : F < I ? F : I, j = Y < D ? Y < N ? Y : N : D < N ? D : N, L0 = L > F ? L > I ? L : I : F > I ? F : I, T0 = Y > D ? Y > N ? Y : N : D > N ? D : N, it = y(W, j, x, p, v), ot = y(L0, T0, x, p, v), B = g.prevZ, q = g.nextZ; B && B.z >= it && q && q.z <= ot; ) {
|
|
3214
|
+
if (B.x >= W && B.x <= L0 && B.y >= j && B.y <= T0 && B !== w && B !== b && T(L, Y, F, D, I, N, B.x, B.y) && P(B.prev, B, B.next) >= 0 || (B = B.prevZ, q.x >= W && q.x <= L0 && q.y >= j && q.y <= T0 && q !== w && q !== b && T(L, Y, F, D, I, N, q.x, q.y) && P(q.prev, q, q.next) >= 0)) return !1;
|
|
3186
3215
|
q = q.nextZ;
|
|
3187
3216
|
}
|
|
3188
|
-
for (;
|
|
3189
|
-
if (
|
|
3190
|
-
|
|
3217
|
+
for (; B && B.z >= it; ) {
|
|
3218
|
+
if (B.x >= W && B.x <= L0 && B.y >= j && B.y <= T0 && B !== w && B !== b && T(L, Y, F, D, I, N, B.x, B.y) && P(B.prev, B, B.next) >= 0) return !1;
|
|
3219
|
+
B = B.prevZ;
|
|
3191
3220
|
}
|
|
3192
3221
|
for (; q && q.z <= ot; ) {
|
|
3193
|
-
if (q.x >=
|
|
3222
|
+
if (q.x >= W && q.x <= L0 && q.y >= j && q.y <= T0 && q !== w && q !== b && T(L, Y, F, D, I, N, q.x, q.y) && P(q.prev, q, q.next) >= 0) return !1;
|
|
3194
3223
|
q = q.nextZ;
|
|
3195
3224
|
}
|
|
3196
3225
|
return !0;
|
|
3197
3226
|
}
|
|
3198
|
-
function s(g,
|
|
3227
|
+
function s(g, x, p) {
|
|
3199
3228
|
var v = g;
|
|
3200
3229
|
do {
|
|
3201
|
-
var w = v.prev,
|
|
3202
|
-
!
|
|
3230
|
+
var w = v.prev, A = v.next.next;
|
|
3231
|
+
!E(w, A) && C(w, v, v.next, A) && z(w, A) && z(A, w) && (x.push(w.i / p | 0), x.push(v.i / p | 0), x.push(A.i / p | 0), n0(v), n0(v.next), v = g = A), v = v.next;
|
|
3203
3232
|
} while (v !== g);
|
|
3204
3233
|
return t(v);
|
|
3205
3234
|
}
|
|
3206
|
-
function r(g,
|
|
3207
|
-
var
|
|
3235
|
+
function r(g, x, p, v, w, A) {
|
|
3236
|
+
var b = g;
|
|
3208
3237
|
do {
|
|
3209
|
-
for (var
|
|
3210
|
-
if (
|
|
3211
|
-
var
|
|
3212
|
-
|
|
3238
|
+
for (var L = b.next.next; L !== b.prev; ) {
|
|
3239
|
+
if (b.i !== L.i && S(b, L)) {
|
|
3240
|
+
var F = t0(b, L);
|
|
3241
|
+
b = t(b, b.next), F = t(F, F.next), o(b, x, p, v, w, A, 0), o(F, x, p, v, w, A, 0);
|
|
3213
3242
|
return;
|
|
3214
3243
|
}
|
|
3215
|
-
|
|
3244
|
+
L = L.next;
|
|
3216
3245
|
}
|
|
3217
|
-
|
|
3218
|
-
} while (
|
|
3219
|
-
}
|
|
3220
|
-
function h(g,
|
|
3221
|
-
var w = [],
|
|
3222
|
-
for (
|
|
3223
|
-
|
|
3224
|
-
for (w.sort(c),
|
|
3225
|
-
p = f(w[
|
|
3246
|
+
b = b.next;
|
|
3247
|
+
} while (b !== g);
|
|
3248
|
+
}
|
|
3249
|
+
function h(g, x, p, v) {
|
|
3250
|
+
var w = [], A, b, L, F, I;
|
|
3251
|
+
for (A = 0, b = x.length; A < b; A++)
|
|
3252
|
+
L = x[A] * v, F = A < b - 1 ? x[A + 1] * v : g.length, I = e(g, L, F, v, !1), I === I.next && (I.steiner = !0), w.push(M(I));
|
|
3253
|
+
for (w.sort(c), A = 0; A < w.length; A++)
|
|
3254
|
+
p = f(w[A], p);
|
|
3226
3255
|
return p;
|
|
3227
3256
|
}
|
|
3228
|
-
function c(g,
|
|
3229
|
-
return g.x -
|
|
3257
|
+
function c(g, x) {
|
|
3258
|
+
return g.x - x.x;
|
|
3230
3259
|
}
|
|
3231
|
-
function f(g,
|
|
3232
|
-
var p =
|
|
3260
|
+
function f(g, x) {
|
|
3261
|
+
var p = d(g, x);
|
|
3233
3262
|
if (!p)
|
|
3234
|
-
return
|
|
3235
|
-
var v =
|
|
3263
|
+
return x;
|
|
3264
|
+
var v = t0(p, g);
|
|
3236
3265
|
return t(v, v.next), t(p, p.next);
|
|
3237
3266
|
}
|
|
3238
|
-
function
|
|
3239
|
-
var p =
|
|
3267
|
+
function d(g, x) {
|
|
3268
|
+
var p = x, v = g.x, w = g.y, A = -1 / 0, b;
|
|
3240
3269
|
do {
|
|
3241
3270
|
if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
|
|
3242
|
-
var
|
|
3243
|
-
if (
|
|
3244
|
-
return
|
|
3271
|
+
var L = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
|
3272
|
+
if (L <= v && L > A && (A = L, b = p.x < p.next.x ? p : p.next, L === v))
|
|
3273
|
+
return b;
|
|
3245
3274
|
}
|
|
3246
3275
|
p = p.next;
|
|
3247
|
-
} while (p !==
|
|
3248
|
-
if (!
|
|
3249
|
-
var
|
|
3250
|
-
p =
|
|
3276
|
+
} while (p !== x);
|
|
3277
|
+
if (!b) return null;
|
|
3278
|
+
var F = b, I = b.x, Y = b.y, D = 1 / 0, N;
|
|
3279
|
+
p = b;
|
|
3251
3280
|
do
|
|
3252
|
-
v >= p.x && p.x >= I && v !== p.x &&
|
|
3253
|
-
while (p !==
|
|
3254
|
-
return
|
|
3281
|
+
v >= p.x && p.x >= I && v !== p.x && T(w < Y ? v : A, w, I, Y, w < Y ? A : v, w, p.x, p.y) && (N = Math.abs(w - p.y) / (v - p.x), z(p, g) && (N < D || N === D && (p.x > b.x || p.x === b.x && l(b, p))) && (b = p, D = N)), p = p.next;
|
|
3282
|
+
while (p !== F);
|
|
3283
|
+
return b;
|
|
3255
3284
|
}
|
|
3256
|
-
function l(g,
|
|
3257
|
-
return
|
|
3285
|
+
function l(g, x) {
|
|
3286
|
+
return P(g.prev, g, x.prev) < 0 && P(x.next, g, g.next) < 0;
|
|
3258
3287
|
}
|
|
3259
|
-
function u(g,
|
|
3288
|
+
function u(g, x, p, v) {
|
|
3260
3289
|
var w = g;
|
|
3261
3290
|
do
|
|
3262
|
-
w.z === 0 && (w.z = y(w.x, w.y,
|
|
3291
|
+
w.z === 0 && (w.z = y(w.x, w.y, x, p, v)), w.prevZ = w.prev, w.nextZ = w.next, w = w.next;
|
|
3263
3292
|
while (w !== g);
|
|
3264
|
-
w.prevZ.nextZ = null, w.prevZ = null,
|
|
3293
|
+
w.prevZ.nextZ = null, w.prevZ = null, m(w);
|
|
3265
3294
|
}
|
|
3266
|
-
function
|
|
3267
|
-
var
|
|
3295
|
+
function m(g) {
|
|
3296
|
+
var x, p, v, w, A, b, L, F, I = 1;
|
|
3268
3297
|
do {
|
|
3269
|
-
for (p = g, g = null,
|
|
3270
|
-
for (
|
|
3298
|
+
for (p = g, g = null, A = null, b = 0; p; ) {
|
|
3299
|
+
for (b++, v = p, L = 0, x = 0; x < I && (L++, v = v.nextZ, !!v); x++)
|
|
3271
3300
|
;
|
|
3272
|
-
for (
|
|
3273
|
-
|
|
3301
|
+
for (F = I; L > 0 || F > 0 && v; )
|
|
3302
|
+
L !== 0 && (F === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, L--) : (w = v, v = v.nextZ, F--), A ? A.nextZ = w : g = w, w.prevZ = A, A = w;
|
|
3274
3303
|
p = v;
|
|
3275
3304
|
}
|
|
3276
|
-
|
|
3277
|
-
} while (
|
|
3305
|
+
A.nextZ = null, I *= 2;
|
|
3306
|
+
} while (b > 1);
|
|
3278
3307
|
return g;
|
|
3279
3308
|
}
|
|
3280
|
-
function y(g,
|
|
3281
|
-
return g = (g - p) * w | 0,
|
|
3309
|
+
function y(g, x, p, v, w) {
|
|
3310
|
+
return g = (g - p) * w | 0, x = (x - v) * w | 0, g = (g | g << 8) & 16711935, g = (g | g << 4) & 252645135, g = (g | g << 2) & 858993459, g = (g | g << 1) & 1431655765, x = (x | x << 8) & 16711935, x = (x | x << 4) & 252645135, x = (x | x << 2) & 858993459, x = (x | x << 1) & 1431655765, g | x << 1;
|
|
3282
3311
|
}
|
|
3283
|
-
function
|
|
3284
|
-
var
|
|
3312
|
+
function M(g) {
|
|
3313
|
+
var x = g, p = g;
|
|
3285
3314
|
do
|
|
3286
|
-
(
|
|
3287
|
-
while (
|
|
3315
|
+
(x.x < p.x || x.x === p.x && x.y < p.y) && (p = x), x = x.next;
|
|
3316
|
+
while (x !== g);
|
|
3288
3317
|
return p;
|
|
3289
3318
|
}
|
|
3290
|
-
function
|
|
3291
|
-
return (w -
|
|
3319
|
+
function T(g, x, p, v, w, A, b, L) {
|
|
3320
|
+
return (w - b) * (x - L) >= (g - b) * (A - L) && (g - b) * (v - L) >= (p - b) * (x - L) && (p - b) * (A - L) >= (w - b) * (v - L);
|
|
3292
3321
|
}
|
|
3293
|
-
function
|
|
3294
|
-
return g.next.i !==
|
|
3295
|
-
(
|
|
3296
|
-
(
|
|
3297
|
-
|
|
3322
|
+
function S(g, x) {
|
|
3323
|
+
return g.next.i !== x.i && g.prev.i !== x.i && !G(g, x) && // dones't intersect other edges
|
|
3324
|
+
(z(g, x) && z(x, g) && H(g, x) && // locally visible
|
|
3325
|
+
(P(g.prev, g, x.prev) || P(g, x.prev, x)) || // does not create opposite-facing sectors
|
|
3326
|
+
E(g, x) && P(g.prev, g, g.next) > 0 && P(x.prev, x, x.next) > 0);
|
|
3298
3327
|
}
|
|
3299
|
-
function
|
|
3300
|
-
return (
|
|
3328
|
+
function P(g, x, p) {
|
|
3329
|
+
return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
|
|
3301
3330
|
}
|
|
3302
|
-
function
|
|
3303
|
-
return g.x ===
|
|
3331
|
+
function E(g, x) {
|
|
3332
|
+
return g.x === x.x && g.y === x.y;
|
|
3304
3333
|
}
|
|
3305
|
-
function C(g,
|
|
3306
|
-
var w =
|
|
3307
|
-
return !!(w !==
|
|
3334
|
+
function C(g, x, p, v) {
|
|
3335
|
+
var w = R(P(g, x, p)), A = R(P(g, x, v)), b = R(P(p, v, g)), L = R(P(p, v, x));
|
|
3336
|
+
return !!(w !== A && b !== L || w === 0 && O(g, p, x) || A === 0 && O(g, v, x) || b === 0 && O(p, g, v) || L === 0 && O(p, x, v));
|
|
3308
3337
|
}
|
|
3309
|
-
function
|
|
3310
|
-
return
|
|
3338
|
+
function O(g, x, p) {
|
|
3339
|
+
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);
|
|
3311
3340
|
}
|
|
3312
|
-
function
|
|
3341
|
+
function R(g) {
|
|
3313
3342
|
return g > 0 ? 1 : g < 0 ? -1 : 0;
|
|
3314
3343
|
}
|
|
3315
|
-
function
|
|
3344
|
+
function G(g, x) {
|
|
3316
3345
|
var p = g;
|
|
3317
3346
|
do {
|
|
3318
|
-
if (p.i !== g.i && p.next.i !== g.i && p.i !==
|
|
3347
|
+
if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && C(p, p.next, g, x)) return !0;
|
|
3319
3348
|
p = p.next;
|
|
3320
3349
|
} while (p !== g);
|
|
3321
3350
|
return !1;
|
|
3322
3351
|
}
|
|
3323
|
-
function
|
|
3324
|
-
return
|
|
3352
|
+
function z(g, x) {
|
|
3353
|
+
return P(g.prev, g, g.next) < 0 ? P(g, x, g.next) >= 0 && P(g, g.prev, x) >= 0 : P(g, x, g.prev) < 0 || P(g, g.next, x) < 0;
|
|
3325
3354
|
}
|
|
3326
|
-
function
|
|
3327
|
-
var p = g, v = !1, w = (g.x +
|
|
3355
|
+
function H(g, x) {
|
|
3356
|
+
var p = g, v = !1, w = (g.x + x.x) / 2, A = (g.y + x.y) / 2;
|
|
3328
3357
|
do
|
|
3329
|
-
p.y >
|
|
3358
|
+
p.y > A != p.next.y > A && p.next.y !== p.y && w < (p.next.x - p.x) * (A - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
|
|
3330
3359
|
while (p !== g);
|
|
3331
3360
|
return v;
|
|
3332
3361
|
}
|
|
3333
|
-
function
|
|
3334
|
-
var p = new
|
|
3335
|
-
return g.next =
|
|
3362
|
+
function t0(g, x) {
|
|
3363
|
+
var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next, A = x.prev;
|
|
3364
|
+
return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, A.next = v, v.prev = A, v;
|
|
3336
3365
|
}
|
|
3337
|
-
function
|
|
3338
|
-
var w = new
|
|
3366
|
+
function e0(g, x, p, v) {
|
|
3367
|
+
var w = new K(g, x, p);
|
|
3339
3368
|
return v ? (w.next = v.next, w.prev = v, v.next.prev = w, v.next = w) : (w.prev = w, w.next = w), w;
|
|
3340
3369
|
}
|
|
3341
|
-
function
|
|
3370
|
+
function n0(g) {
|
|
3342
3371
|
g.next.prev = g.prev, g.prev.next = g.next, g.prevZ && (g.prevZ.nextZ = g.nextZ), g.nextZ && (g.nextZ.prevZ = g.prevZ);
|
|
3343
3372
|
}
|
|
3344
|
-
function
|
|
3345
|
-
this.i = g, this.x =
|
|
3373
|
+
function K(g, x, p) {
|
|
3374
|
+
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;
|
|
3346
3375
|
}
|
|
3347
|
-
n.deviation = function(g,
|
|
3348
|
-
var w =
|
|
3376
|
+
n.deviation = function(g, x, p, v) {
|
|
3377
|
+
var w = x && x.length, A = w ? x[0] * p : g.length, b = Math.abs(F0(g, 0, A, p));
|
|
3349
3378
|
if (w)
|
|
3350
|
-
for (var
|
|
3351
|
-
var I =
|
|
3352
|
-
|
|
3379
|
+
for (var L = 0, F = x.length; L < F; L++) {
|
|
3380
|
+
var I = x[L] * p, Y = L < F - 1 ? x[L + 1] * p : g.length;
|
|
3381
|
+
b -= Math.abs(F0(g, I, Y, p));
|
|
3353
3382
|
}
|
|
3354
|
-
var
|
|
3355
|
-
for (
|
|
3356
|
-
var
|
|
3357
|
-
|
|
3358
|
-
(g[
|
|
3383
|
+
var D = 0;
|
|
3384
|
+
for (L = 0; L < v.length; L += 3) {
|
|
3385
|
+
var N = v[L] * p, W = v[L + 1] * p, j = v[L + 2] * p;
|
|
3386
|
+
D += Math.abs(
|
|
3387
|
+
(g[N] - g[j]) * (g[W + 1] - g[N + 1]) - (g[N] - g[W]) * (g[j + 1] - g[N + 1])
|
|
3359
3388
|
);
|
|
3360
3389
|
}
|
|
3361
|
-
return
|
|
3390
|
+
return b === 0 && D === 0 ? 0 : Math.abs((D - b) / b);
|
|
3362
3391
|
};
|
|
3363
|
-
function F0(g,
|
|
3364
|
-
for (var w = 0,
|
|
3365
|
-
w += (g[
|
|
3392
|
+
function F0(g, x, p, v) {
|
|
3393
|
+
for (var w = 0, A = x, b = p - v; A < p; A += v)
|
|
3394
|
+
w += (g[b] - g[A]) * (g[A + 1] + g[b + 1]), b = A;
|
|
3366
3395
|
return w;
|
|
3367
3396
|
}
|
|
3368
3397
|
return n.flatten = function(g) {
|
|
3369
|
-
for (var
|
|
3370
|
-
for (var
|
|
3371
|
-
for (var
|
|
3398
|
+
for (var x = g[0][0].length, p = { vertices: [], holes: [], dimensions: x }, v = 0, w = 0; w < g.length; w++) {
|
|
3399
|
+
for (var A = 0; A < g[w].length; A++)
|
|
3400
|
+
for (var b = 0; b < x; b++) p.vertices.push(g[w][A][b]);
|
|
3372
3401
|
w > 0 && (v += g[w - 1].length, p.holes.push(v));
|
|
3373
3402
|
}
|
|
3374
3403
|
return p;
|
|
3375
3404
|
}, I0.exports;
|
|
3376
3405
|
}
|
|
3377
|
-
|
|
3378
|
-
function
|
|
3406
|
+
cn();
|
|
3407
|
+
function jt(n, e) {
|
|
3379
3408
|
return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
|
|
3380
3409
|
}
|
|
3381
|
-
function
|
|
3382
|
-
return n.length === 1 && (n =
|
|
3410
|
+
function un(n) {
|
|
3411
|
+
return n.length === 1 && (n = fn(n)), {
|
|
3383
3412
|
left: function(e, t, o, i) {
|
|
3384
3413
|
for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
|
|
3385
3414
|
var a = o + i >>> 1;
|
|
@@ -3396,31 +3425,31 @@ function hn(n) {
|
|
|
3396
3425
|
}
|
|
3397
3426
|
};
|
|
3398
3427
|
}
|
|
3399
|
-
function
|
|
3428
|
+
function fn(n) {
|
|
3400
3429
|
return function(e, t) {
|
|
3401
|
-
return
|
|
3430
|
+
return jt(n(e), t);
|
|
3402
3431
|
};
|
|
3403
3432
|
}
|
|
3404
|
-
|
|
3405
|
-
function
|
|
3406
|
-
const o =
|
|
3433
|
+
un(jt);
|
|
3434
|
+
function Rn(n, e, t = 3) {
|
|
3435
|
+
const o = hn(n, e, { maxSegmentLength: t });
|
|
3407
3436
|
return {
|
|
3408
3437
|
check: (i) => typeof i == "string",
|
|
3409
3438
|
interpolate: (i, a, s) => o(s)
|
|
3410
3439
|
};
|
|
3411
3440
|
}
|
|
3412
|
-
function
|
|
3441
|
+
function Nn(n) {
|
|
3413
3442
|
const e = (o) => n.width * o, t = (o) => n.height * o;
|
|
3414
3443
|
return {
|
|
3415
3444
|
scaleX: e,
|
|
3416
3445
|
scaleY: t,
|
|
3417
|
-
position: (o, i) =>
|
|
3446
|
+
position: (o, i) => X({
|
|
3418
3447
|
x: e(o),
|
|
3419
3448
|
y: t(i)
|
|
3420
3449
|
})
|
|
3421
3450
|
};
|
|
3422
3451
|
}
|
|
3423
|
-
function
|
|
3452
|
+
function Bn(n) {
|
|
3424
3453
|
const e = [];
|
|
3425
3454
|
if (n.isAllKey) {
|
|
3426
3455
|
for (let t = 0; t <= n.animations.length; t++)
|
|
@@ -3433,48 +3462,48 @@ function Fn(n) {
|
|
|
3433
3462
|
}
|
|
3434
3463
|
export {
|
|
3435
3464
|
x0 as Alignment,
|
|
3436
|
-
|
|
3465
|
+
o0 as Anchor,
|
|
3437
3466
|
et as Animate,
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3467
|
+
mn as Arrow,
|
|
3468
|
+
kn as BrowserCanvasRenderer,
|
|
3469
|
+
An as Circle,
|
|
3441
3470
|
$ as Color,
|
|
3442
3471
|
tt as Easing,
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3472
|
+
pn as FadeIn,
|
|
3473
|
+
dn as FadeOut,
|
|
3474
|
+
d1 as FontStyle,
|
|
3475
|
+
y1 as FontWeight,
|
|
3476
|
+
bn as Grid,
|
|
3448
3477
|
st as Group,
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3478
|
+
xn as Hide,
|
|
3479
|
+
vn as IFrame,
|
|
3480
|
+
Mn as Image,
|
|
3481
|
+
Ln as Line,
|
|
3482
|
+
Tn as Mask,
|
|
3483
|
+
U as ObjectType,
|
|
3484
|
+
Fn as Opaque,
|
|
3485
|
+
Pn as Path,
|
|
3486
|
+
In as Pause,
|
|
3487
|
+
Cn as Polygon,
|
|
3488
|
+
X as Position,
|
|
3489
|
+
P1 as Presentation,
|
|
3490
|
+
Sn as Rectangle,
|
|
3491
|
+
En as SVG,
|
|
3492
|
+
wn as ScreenCapture,
|
|
3493
|
+
yn as Show,
|
|
3494
|
+
a0 as Size,
|
|
3495
|
+
_n as Slide,
|
|
3496
|
+
l0 as SlideObject,
|
|
3497
|
+
St as SlideWebExtra,
|
|
3498
|
+
A1 as Text,
|
|
3499
|
+
On as TextUnit,
|
|
3500
|
+
p1 as Transparent,
|
|
3472
3501
|
Ct as Update,
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3502
|
+
Bn as getKeySlideBuildIndices,
|
|
3503
|
+
Nn as getSizingFunctions,
|
|
3504
|
+
Rn as getSmoothPathInterpolator,
|
|
3505
|
+
m1 as getTextContentLength,
|
|
3506
|
+
k1 as interpolateColor,
|
|
3507
|
+
_1 as interpolateNumber
|
|
3479
3508
|
};
|
|
3480
3509
|
//# sourceMappingURL=presenter.mjs.map
|