@tsparticles/plugin-polygon-mask 3.1.0 → 3.2.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/719.min.js +2 -0
- package/719.min.js.LICENSE.txt +1 -0
- package/787.min.js +2 -0
- package/787.min.js.LICENSE.txt +1 -0
- package/856.min.js +2 -0
- package/856.min.js.LICENSE.txt +1 -0
- package/browser/PolygonMaskInstance.js +14 -11
- package/browser/PolygonMaskPlugin.js +25 -0
- package/browser/index.js +1 -25
- package/browser/utils.js +1 -1
- package/cjs/PolygonMaskInstance.js +41 -15
- package/cjs/PolygonMaskPlugin.js +52 -0
- package/cjs/index.js +13 -25
- package/cjs/utils.js +3 -3
- package/dist_browser_PolygonMaskInstance_js.js +30 -0
- package/dist_browser_PolygonMaskPlugin_js.js +90 -0
- package/dist_browser_utils_js.js +30 -0
- package/esm/PolygonMaskInstance.js +14 -11
- package/esm/PolygonMaskPlugin.js +25 -0
- package/esm/index.js +1 -25
- package/esm/utils.js +1 -1
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.plugin.polygon-mask.js +244 -2195
- package/tsparticles.plugin.polygon-mask.min.js +1 -1
- package/tsparticles.plugin.polygon-mask.min.js.LICENSE.txt +1 -1
- package/types/PolygonMaskInstance.d.ts +2 -2
- package/types/PolygonMaskPlugin.d.ts +11 -0
- package/types/utils.d.ts +1 -1
- package/umd/PolygonMaskInstance.js +43 -16
- package/umd/PolygonMaskPlugin.js +63 -0
- package/umd/index.js +15 -26
- package/umd/utils.js +3 -3
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.1
|
|
7
|
+
* v3.2.1
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
11
|
+
* This devtool is neither made for production nor for readable output files.
|
|
12
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
13
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
14
|
+
* or disable the default devtool with "devtool: false".
|
|
15
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
16
|
*/
|
|
9
17
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
18
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -15,1453 +23,38 @@
|
|
|
15
23
|
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine")) : factory(root["window"]);
|
|
16
24
|
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
25
|
}
|
|
18
|
-
})(this, (
|
|
26
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__) => {
|
|
19
27
|
return /******/ (() => { // webpackBootstrap
|
|
20
28
|
/******/ "use strict";
|
|
21
29
|
/******/ var __webpack_modules__ = ({
|
|
22
30
|
|
|
23
|
-
/***/
|
|
24
|
-
|
|
31
|
+
/***/ "./dist/browser/index.js":
|
|
32
|
+
/*!*******************************!*\
|
|
33
|
+
!*** ./dist/browser/index.js ***!
|
|
34
|
+
\*******************************/
|
|
35
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
36
|
|
|
37
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadPolygonMaskPlugin: () => (/* binding */ loadPolygonMaskPlugin)\n/* harmony export */ });\n/* harmony import */ var _pathseg_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pathseg.js */ \"./dist/browser/pathseg.js\");\n/* harmony import */ var _pathseg_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_pathseg_js__WEBPACK_IMPORTED_MODULE_0__);\n\nasync function loadPolygonMaskPlugin(engine, refresh = true) {\n const {\n PolygonMaskPlugin\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_PolygonMaskPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./PolygonMaskPlugin.js */ \"./dist/browser/PolygonMaskPlugin.js\"));\n await engine.addPlugin(new PolygonMaskPlugin(engine), refresh);\n}\n\n\n\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/index.js?");
|
|
26
38
|
|
|
39
|
+
/***/ }),
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
/***/ "./dist/browser/pathseg.js":
|
|
42
|
+
/*!*********************************!*\
|
|
43
|
+
!*** ./dist/browser/pathseg.js ***!
|
|
44
|
+
\*********************************/
|
|
45
|
+
/***/ (() => {
|
|
30
46
|
|
|
31
|
-
try {
|
|
32
|
-
if (typeof window === "undefined") return;
|
|
33
|
-
if (!("SVGPathSeg" in window)) {
|
|
34
|
-
window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) {
|
|
35
|
-
this.pathSegType = type;
|
|
36
|
-
this.pathSegTypeAsLetter = typeAsLetter;
|
|
37
|
-
this._owningPathSegList = owningPathSegList;
|
|
38
|
-
};
|
|
39
|
-
window.SVGPathSeg.prototype.classname = "SVGPathSeg";
|
|
40
|
-
window.SVGPathSeg.PATHSEG_UNKNOWN = 0;
|
|
41
|
-
window.SVGPathSeg.PATHSEG_CLOSEPATH = 1;
|
|
42
|
-
window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2;
|
|
43
|
-
window.SVGPathSeg.PATHSEG_MOVETO_REL = 3;
|
|
44
|
-
window.SVGPathSeg.PATHSEG_LINETO_ABS = 4;
|
|
45
|
-
window.SVGPathSeg.PATHSEG_LINETO_REL = 5;
|
|
46
|
-
window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;
|
|
47
|
-
window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;
|
|
48
|
-
window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;
|
|
49
|
-
window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;
|
|
50
|
-
window.SVGPathSeg.PATHSEG_ARC_ABS = 10;
|
|
51
|
-
window.SVGPathSeg.PATHSEG_ARC_REL = 11;
|
|
52
|
-
window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;
|
|
53
|
-
window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;
|
|
54
|
-
window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;
|
|
55
|
-
window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;
|
|
56
|
-
window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
|
|
57
|
-
window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
|
|
58
|
-
window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
|
|
59
|
-
window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
|
|
60
|
-
window.SVGPathSeg.prototype._segmentChanged = function () {
|
|
61
|
-
if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this);
|
|
62
|
-
};
|
|
63
|
-
window.SVGPathSegClosePath = function (owningPathSegList) {
|
|
64
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, "z", owningPathSegList);
|
|
65
|
-
};
|
|
66
|
-
window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
67
|
-
window.SVGPathSegClosePath.prototype.toString = function () {
|
|
68
|
-
return "[object SVGPathSegClosePath]";
|
|
69
|
-
};
|
|
70
|
-
window.SVGPathSegClosePath.prototype._asPathString = function () {
|
|
71
|
-
return this.pathSegTypeAsLetter;
|
|
72
|
-
};
|
|
73
|
-
window.SVGPathSegClosePath.prototype.clone = function () {
|
|
74
|
-
return new window.SVGPathSegClosePath(undefined);
|
|
75
|
-
};
|
|
76
|
-
window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) {
|
|
77
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, "M", owningPathSegList);
|
|
78
|
-
this._x = x;
|
|
79
|
-
this._y = y;
|
|
80
|
-
};
|
|
81
|
-
window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
82
|
-
window.SVGPathSegMovetoAbs.prototype.toString = function () {
|
|
83
|
-
return "[object SVGPathSegMovetoAbs]";
|
|
84
|
-
};
|
|
85
|
-
window.SVGPathSegMovetoAbs.prototype._asPathString = function () {
|
|
86
|
-
return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;
|
|
87
|
-
};
|
|
88
|
-
window.SVGPathSegMovetoAbs.prototype.clone = function () {
|
|
89
|
-
return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y);
|
|
90
|
-
};
|
|
91
|
-
Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "x", {
|
|
92
|
-
get: function () {
|
|
93
|
-
return this._x;
|
|
94
|
-
},
|
|
95
|
-
set: function (x) {
|
|
96
|
-
this._x = x;
|
|
97
|
-
this._segmentChanged();
|
|
98
|
-
},
|
|
99
|
-
enumerable: true
|
|
100
|
-
});
|
|
101
|
-
Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "y", {
|
|
102
|
-
get: function () {
|
|
103
|
-
return this._y;
|
|
104
|
-
},
|
|
105
|
-
set: function (y) {
|
|
106
|
-
this._y = y;
|
|
107
|
-
this._segmentChanged();
|
|
108
|
-
},
|
|
109
|
-
enumerable: true
|
|
110
|
-
});
|
|
111
|
-
window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) {
|
|
112
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, "m", owningPathSegList);
|
|
113
|
-
this._x = x;
|
|
114
|
-
this._y = y;
|
|
115
|
-
};
|
|
116
|
-
window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
117
|
-
window.SVGPathSegMovetoRel.prototype.toString = function () {
|
|
118
|
-
return "[object SVGPathSegMovetoRel]";
|
|
119
|
-
};
|
|
120
|
-
window.SVGPathSegMovetoRel.prototype._asPathString = function () {
|
|
121
|
-
return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;
|
|
122
|
-
};
|
|
123
|
-
window.SVGPathSegMovetoRel.prototype.clone = function () {
|
|
124
|
-
return new window.SVGPathSegMovetoRel(undefined, this._x, this._y);
|
|
125
|
-
};
|
|
126
|
-
Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "x", {
|
|
127
|
-
get: function () {
|
|
128
|
-
return this._x;
|
|
129
|
-
},
|
|
130
|
-
set: function (x) {
|
|
131
|
-
this._x = x;
|
|
132
|
-
this._segmentChanged();
|
|
133
|
-
},
|
|
134
|
-
enumerable: true
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "y", {
|
|
137
|
-
get: function () {
|
|
138
|
-
return this._y;
|
|
139
|
-
},
|
|
140
|
-
set: function (y) {
|
|
141
|
-
this._y = y;
|
|
142
|
-
this._segmentChanged();
|
|
143
|
-
},
|
|
144
|
-
enumerable: true
|
|
145
|
-
});
|
|
146
|
-
window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) {
|
|
147
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, "L", owningPathSegList);
|
|
148
|
-
this._x = x;
|
|
149
|
-
this._y = y;
|
|
150
|
-
};
|
|
151
|
-
window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
152
|
-
window.SVGPathSegLinetoAbs.prototype.toString = function () {
|
|
153
|
-
return "[object SVGPathSegLinetoAbs]";
|
|
154
|
-
};
|
|
155
|
-
window.SVGPathSegLinetoAbs.prototype._asPathString = function () {
|
|
156
|
-
return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;
|
|
157
|
-
};
|
|
158
|
-
window.SVGPathSegLinetoAbs.prototype.clone = function () {
|
|
159
|
-
return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y);
|
|
160
|
-
};
|
|
161
|
-
Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "x", {
|
|
162
|
-
get: function () {
|
|
163
|
-
return this._x;
|
|
164
|
-
},
|
|
165
|
-
set: function (x) {
|
|
166
|
-
this._x = x;
|
|
167
|
-
this._segmentChanged();
|
|
168
|
-
},
|
|
169
|
-
enumerable: true
|
|
170
|
-
});
|
|
171
|
-
Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "y", {
|
|
172
|
-
get: function () {
|
|
173
|
-
return this._y;
|
|
174
|
-
},
|
|
175
|
-
set: function (y) {
|
|
176
|
-
this._y = y;
|
|
177
|
-
this._segmentChanged();
|
|
178
|
-
},
|
|
179
|
-
enumerable: true
|
|
180
|
-
});
|
|
181
|
-
window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) {
|
|
182
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, "l", owningPathSegList);
|
|
183
|
-
this._x = x;
|
|
184
|
-
this._y = y;
|
|
185
|
-
};
|
|
186
|
-
window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
187
|
-
window.SVGPathSegLinetoRel.prototype.toString = function () {
|
|
188
|
-
return "[object SVGPathSegLinetoRel]";
|
|
189
|
-
};
|
|
190
|
-
window.SVGPathSegLinetoRel.prototype._asPathString = function () {
|
|
191
|
-
return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;
|
|
192
|
-
};
|
|
193
|
-
window.SVGPathSegLinetoRel.prototype.clone = function () {
|
|
194
|
-
return new window.SVGPathSegLinetoRel(undefined, this._x, this._y);
|
|
195
|
-
};
|
|
196
|
-
Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "x", {
|
|
197
|
-
get: function () {
|
|
198
|
-
return this._x;
|
|
199
|
-
},
|
|
200
|
-
set: function (x) {
|
|
201
|
-
this._x = x;
|
|
202
|
-
this._segmentChanged();
|
|
203
|
-
},
|
|
204
|
-
enumerable: true
|
|
205
|
-
});
|
|
206
|
-
Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "y", {
|
|
207
|
-
get: function () {
|
|
208
|
-
return this._y;
|
|
209
|
-
},
|
|
210
|
-
set: function (y) {
|
|
211
|
-
this._y = y;
|
|
212
|
-
this._segmentChanged();
|
|
213
|
-
},
|
|
214
|
-
enumerable: true
|
|
215
|
-
});
|
|
216
|
-
window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) {
|
|
217
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, "C", owningPathSegList);
|
|
218
|
-
this._x = x;
|
|
219
|
-
this._y = y;
|
|
220
|
-
this._x1 = x1;
|
|
221
|
-
this._y1 = y1;
|
|
222
|
-
this._x2 = x2;
|
|
223
|
-
this._y2 = y2;
|
|
224
|
-
};
|
|
225
|
-
window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
226
|
-
window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () {
|
|
227
|
-
return "[object SVGPathSegCurvetoCubicAbs]";
|
|
228
|
-
};
|
|
229
|
-
window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () {
|
|
230
|
-
return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;
|
|
231
|
-
};
|
|
232
|
-
window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () {
|
|
233
|
-
return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);
|
|
234
|
-
};
|
|
235
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x", {
|
|
236
|
-
get: function () {
|
|
237
|
-
return this._x;
|
|
238
|
-
},
|
|
239
|
-
set: function (x) {
|
|
240
|
-
this._x = x;
|
|
241
|
-
this._segmentChanged();
|
|
242
|
-
},
|
|
243
|
-
enumerable: true
|
|
244
|
-
});
|
|
245
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y", {
|
|
246
|
-
get: function () {
|
|
247
|
-
return this._y;
|
|
248
|
-
},
|
|
249
|
-
set: function (y) {
|
|
250
|
-
this._y = y;
|
|
251
|
-
this._segmentChanged();
|
|
252
|
-
},
|
|
253
|
-
enumerable: true
|
|
254
|
-
});
|
|
255
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x1", {
|
|
256
|
-
get: function () {
|
|
257
|
-
return this._x1;
|
|
258
|
-
},
|
|
259
|
-
set: function (x1) {
|
|
260
|
-
this._x1 = x1;
|
|
261
|
-
this._segmentChanged();
|
|
262
|
-
},
|
|
263
|
-
enumerable: true
|
|
264
|
-
});
|
|
265
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y1", {
|
|
266
|
-
get: function () {
|
|
267
|
-
return this._y1;
|
|
268
|
-
},
|
|
269
|
-
set: function (y1) {
|
|
270
|
-
this._y1 = y1;
|
|
271
|
-
this._segmentChanged();
|
|
272
|
-
},
|
|
273
|
-
enumerable: true
|
|
274
|
-
});
|
|
275
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x2", {
|
|
276
|
-
get: function () {
|
|
277
|
-
return this._x2;
|
|
278
|
-
},
|
|
279
|
-
set: function (x2) {
|
|
280
|
-
this._x2 = x2;
|
|
281
|
-
this._segmentChanged();
|
|
282
|
-
},
|
|
283
|
-
enumerable: true
|
|
284
|
-
});
|
|
285
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y2", {
|
|
286
|
-
get: function () {
|
|
287
|
-
return this._y2;
|
|
288
|
-
},
|
|
289
|
-
set: function (y2) {
|
|
290
|
-
this._y2 = y2;
|
|
291
|
-
this._segmentChanged();
|
|
292
|
-
},
|
|
293
|
-
enumerable: true
|
|
294
|
-
});
|
|
295
|
-
window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) {
|
|
296
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, "c", owningPathSegList);
|
|
297
|
-
this._x = x;
|
|
298
|
-
this._y = y;
|
|
299
|
-
this._x1 = x1;
|
|
300
|
-
this._y1 = y1;
|
|
301
|
-
this._x2 = x2;
|
|
302
|
-
this._y2 = y2;
|
|
303
|
-
};
|
|
304
|
-
window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
305
|
-
window.SVGPathSegCurvetoCubicRel.prototype.toString = function () {
|
|
306
|
-
return "[object SVGPathSegCurvetoCubicRel]";
|
|
307
|
-
};
|
|
308
|
-
window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () {
|
|
309
|
-
return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;
|
|
310
|
-
};
|
|
311
|
-
window.SVGPathSegCurvetoCubicRel.prototype.clone = function () {
|
|
312
|
-
return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);
|
|
313
|
-
};
|
|
314
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x", {
|
|
315
|
-
get: function () {
|
|
316
|
-
return this._x;
|
|
317
|
-
},
|
|
318
|
-
set: function (x) {
|
|
319
|
-
this._x = x;
|
|
320
|
-
this._segmentChanged();
|
|
321
|
-
},
|
|
322
|
-
enumerable: true
|
|
323
|
-
});
|
|
324
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y", {
|
|
325
|
-
get: function () {
|
|
326
|
-
return this._y;
|
|
327
|
-
},
|
|
328
|
-
set: function (y) {
|
|
329
|
-
this._y = y;
|
|
330
|
-
this._segmentChanged();
|
|
331
|
-
},
|
|
332
|
-
enumerable: true
|
|
333
|
-
});
|
|
334
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x1", {
|
|
335
|
-
get: function () {
|
|
336
|
-
return this._x1;
|
|
337
|
-
},
|
|
338
|
-
set: function (x1) {
|
|
339
|
-
this._x1 = x1;
|
|
340
|
-
this._segmentChanged();
|
|
341
|
-
},
|
|
342
|
-
enumerable: true
|
|
343
|
-
});
|
|
344
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y1", {
|
|
345
|
-
get: function () {
|
|
346
|
-
return this._y1;
|
|
347
|
-
},
|
|
348
|
-
set: function (y1) {
|
|
349
|
-
this._y1 = y1;
|
|
350
|
-
this._segmentChanged();
|
|
351
|
-
},
|
|
352
|
-
enumerable: true
|
|
353
|
-
});
|
|
354
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x2", {
|
|
355
|
-
get: function () {
|
|
356
|
-
return this._x2;
|
|
357
|
-
},
|
|
358
|
-
set: function (x2) {
|
|
359
|
-
this._x2 = x2;
|
|
360
|
-
this._segmentChanged();
|
|
361
|
-
},
|
|
362
|
-
enumerable: true
|
|
363
|
-
});
|
|
364
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y2", {
|
|
365
|
-
get: function () {
|
|
366
|
-
return this._y2;
|
|
367
|
-
},
|
|
368
|
-
set: function (y2) {
|
|
369
|
-
this._y2 = y2;
|
|
370
|
-
this._segmentChanged();
|
|
371
|
-
},
|
|
372
|
-
enumerable: true
|
|
373
|
-
});
|
|
374
|
-
window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) {
|
|
375
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, "Q", owningPathSegList);
|
|
376
|
-
this._x = x;
|
|
377
|
-
this._y = y;
|
|
378
|
-
this._x1 = x1;
|
|
379
|
-
this._y1 = y1;
|
|
380
|
-
};
|
|
381
|
-
window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
382
|
-
window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () {
|
|
383
|
-
return "[object SVGPathSegCurvetoQuadraticAbs]";
|
|
384
|
-
};
|
|
385
|
-
window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () {
|
|
386
|
-
return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;
|
|
387
|
-
};
|
|
388
|
-
window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () {
|
|
389
|
-
return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1);
|
|
390
|
-
};
|
|
391
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x", {
|
|
392
|
-
get: function () {
|
|
393
|
-
return this._x;
|
|
394
|
-
},
|
|
395
|
-
set: function (x) {
|
|
396
|
-
this._x = x;
|
|
397
|
-
this._segmentChanged();
|
|
398
|
-
},
|
|
399
|
-
enumerable: true
|
|
400
|
-
});
|
|
401
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y", {
|
|
402
|
-
get: function () {
|
|
403
|
-
return this._y;
|
|
404
|
-
},
|
|
405
|
-
set: function (y) {
|
|
406
|
-
this._y = y;
|
|
407
|
-
this._segmentChanged();
|
|
408
|
-
},
|
|
409
|
-
enumerable: true
|
|
410
|
-
});
|
|
411
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x1", {
|
|
412
|
-
get: function () {
|
|
413
|
-
return this._x1;
|
|
414
|
-
},
|
|
415
|
-
set: function (x1) {
|
|
416
|
-
this._x1 = x1;
|
|
417
|
-
this._segmentChanged();
|
|
418
|
-
},
|
|
419
|
-
enumerable: true
|
|
420
|
-
});
|
|
421
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y1", {
|
|
422
|
-
get: function () {
|
|
423
|
-
return this._y1;
|
|
424
|
-
},
|
|
425
|
-
set: function (y1) {
|
|
426
|
-
this._y1 = y1;
|
|
427
|
-
this._segmentChanged();
|
|
428
|
-
},
|
|
429
|
-
enumerable: true
|
|
430
|
-
});
|
|
431
|
-
window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) {
|
|
432
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, "q", owningPathSegList);
|
|
433
|
-
this._x = x;
|
|
434
|
-
this._y = y;
|
|
435
|
-
this._x1 = x1;
|
|
436
|
-
this._y1 = y1;
|
|
437
|
-
};
|
|
438
|
-
window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
439
|
-
window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () {
|
|
440
|
-
return "[object SVGPathSegCurvetoQuadraticRel]";
|
|
441
|
-
};
|
|
442
|
-
window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () {
|
|
443
|
-
return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;
|
|
444
|
-
};
|
|
445
|
-
window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () {
|
|
446
|
-
return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1);
|
|
447
|
-
};
|
|
448
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x", {
|
|
449
|
-
get: function () {
|
|
450
|
-
return this._x;
|
|
451
|
-
},
|
|
452
|
-
set: function (x) {
|
|
453
|
-
this._x = x;
|
|
454
|
-
this._segmentChanged();
|
|
455
|
-
},
|
|
456
|
-
enumerable: true
|
|
457
|
-
});
|
|
458
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y", {
|
|
459
|
-
get: function () {
|
|
460
|
-
return this._y;
|
|
461
|
-
},
|
|
462
|
-
set: function (y) {
|
|
463
|
-
this._y = y;
|
|
464
|
-
this._segmentChanged();
|
|
465
|
-
},
|
|
466
|
-
enumerable: true
|
|
467
|
-
});
|
|
468
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x1", {
|
|
469
|
-
get: function () {
|
|
470
|
-
return this._x1;
|
|
471
|
-
},
|
|
472
|
-
set: function (x1) {
|
|
473
|
-
this._x1 = x1;
|
|
474
|
-
this._segmentChanged();
|
|
475
|
-
},
|
|
476
|
-
enumerable: true
|
|
477
|
-
});
|
|
478
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y1", {
|
|
479
|
-
get: function () {
|
|
480
|
-
return this._y1;
|
|
481
|
-
},
|
|
482
|
-
set: function (y1) {
|
|
483
|
-
this._y1 = y1;
|
|
484
|
-
this._segmentChanged();
|
|
485
|
-
},
|
|
486
|
-
enumerable: true
|
|
487
|
-
});
|
|
488
|
-
window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
|
|
489
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, "A", owningPathSegList);
|
|
490
|
-
this._x = x;
|
|
491
|
-
this._y = y;
|
|
492
|
-
this._r1 = r1;
|
|
493
|
-
this._r2 = r2;
|
|
494
|
-
this._angle = angle;
|
|
495
|
-
this._largeArcFlag = largeArcFlag;
|
|
496
|
-
this._sweepFlag = sweepFlag;
|
|
497
|
-
};
|
|
498
|
-
window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
499
|
-
window.SVGPathSegArcAbs.prototype.toString = function () {
|
|
500
|
-
return "[object SVGPathSegArcAbs]";
|
|
501
|
-
};
|
|
502
|
-
window.SVGPathSegArcAbs.prototype._asPathString = function () {
|
|
503
|
-
return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? "1" : "0"} ${this._sweepFlag ? "1" : "0"} ${this._x} ${this._y}`;
|
|
504
|
-
};
|
|
505
|
-
window.SVGPathSegArcAbs.prototype.clone = function () {
|
|
506
|
-
return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);
|
|
507
|
-
};
|
|
508
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "x", {
|
|
509
|
-
get: function () {
|
|
510
|
-
return this._x;
|
|
511
|
-
},
|
|
512
|
-
set: function (x) {
|
|
513
|
-
this._x = x;
|
|
514
|
-
this._segmentChanged();
|
|
515
|
-
},
|
|
516
|
-
enumerable: true
|
|
517
|
-
});
|
|
518
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "y", {
|
|
519
|
-
get: function () {
|
|
520
|
-
return this._y;
|
|
521
|
-
},
|
|
522
|
-
set: function (y) {
|
|
523
|
-
this._y = y;
|
|
524
|
-
this._segmentChanged();
|
|
525
|
-
},
|
|
526
|
-
enumerable: true
|
|
527
|
-
});
|
|
528
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r1", {
|
|
529
|
-
get: function () {
|
|
530
|
-
return this._r1;
|
|
531
|
-
},
|
|
532
|
-
set: function (r1) {
|
|
533
|
-
this._r1 = r1;
|
|
534
|
-
this._segmentChanged();
|
|
535
|
-
},
|
|
536
|
-
enumerable: true
|
|
537
|
-
});
|
|
538
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r2", {
|
|
539
|
-
get: function () {
|
|
540
|
-
return this._r2;
|
|
541
|
-
},
|
|
542
|
-
set: function (r2) {
|
|
543
|
-
this._r2 = r2;
|
|
544
|
-
this._segmentChanged();
|
|
545
|
-
},
|
|
546
|
-
enumerable: true
|
|
547
|
-
});
|
|
548
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "angle", {
|
|
549
|
-
get: function () {
|
|
550
|
-
return this._angle;
|
|
551
|
-
},
|
|
552
|
-
set: function (angle) {
|
|
553
|
-
this._angle = angle;
|
|
554
|
-
this._segmentChanged();
|
|
555
|
-
},
|
|
556
|
-
enumerable: true
|
|
557
|
-
});
|
|
558
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "largeArcFlag", {
|
|
559
|
-
get: function () {
|
|
560
|
-
return this._largeArcFlag;
|
|
561
|
-
},
|
|
562
|
-
set: function (largeArcFlag) {
|
|
563
|
-
this._largeArcFlag = largeArcFlag;
|
|
564
|
-
this._segmentChanged();
|
|
565
|
-
},
|
|
566
|
-
enumerable: true
|
|
567
|
-
});
|
|
568
|
-
Object.defineProperty(window.SVGPathSegArcAbs.prototype, "sweepFlag", {
|
|
569
|
-
get: function () {
|
|
570
|
-
return this._sweepFlag;
|
|
571
|
-
},
|
|
572
|
-
set: function (sweepFlag) {
|
|
573
|
-
this._sweepFlag = sweepFlag;
|
|
574
|
-
this._segmentChanged();
|
|
575
|
-
},
|
|
576
|
-
enumerable: true
|
|
577
|
-
});
|
|
578
|
-
window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
|
|
579
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, "a", owningPathSegList);
|
|
580
|
-
this._x = x;
|
|
581
|
-
this._y = y;
|
|
582
|
-
this._r1 = r1;
|
|
583
|
-
this._r2 = r2;
|
|
584
|
-
this._angle = angle;
|
|
585
|
-
this._largeArcFlag = largeArcFlag;
|
|
586
|
-
this._sweepFlag = sweepFlag;
|
|
587
|
-
};
|
|
588
|
-
window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
589
|
-
window.SVGPathSegArcRel.prototype.toString = function () {
|
|
590
|
-
return "[object SVGPathSegArcRel]";
|
|
591
|
-
};
|
|
592
|
-
window.SVGPathSegArcRel.prototype._asPathString = function () {
|
|
593
|
-
return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? "1" : "0"} ${this._sweepFlag ? "1" : "0"} ${this._x} ${this._y}`;
|
|
594
|
-
};
|
|
595
|
-
window.SVGPathSegArcRel.prototype.clone = function () {
|
|
596
|
-
return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);
|
|
597
|
-
};
|
|
598
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "x", {
|
|
599
|
-
get: function () {
|
|
600
|
-
return this._x;
|
|
601
|
-
},
|
|
602
|
-
set: function (x) {
|
|
603
|
-
this._x = x;
|
|
604
|
-
this._segmentChanged();
|
|
605
|
-
},
|
|
606
|
-
enumerable: true
|
|
607
|
-
});
|
|
608
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "y", {
|
|
609
|
-
get: function () {
|
|
610
|
-
return this._y;
|
|
611
|
-
},
|
|
612
|
-
set: function (y) {
|
|
613
|
-
this._y = y;
|
|
614
|
-
this._segmentChanged();
|
|
615
|
-
},
|
|
616
|
-
enumerable: true
|
|
617
|
-
});
|
|
618
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "r1", {
|
|
619
|
-
get: function () {
|
|
620
|
-
return this._r1;
|
|
621
|
-
},
|
|
622
|
-
set: function (r1) {
|
|
623
|
-
this._r1 = r1;
|
|
624
|
-
this._segmentChanged();
|
|
625
|
-
},
|
|
626
|
-
enumerable: true
|
|
627
|
-
});
|
|
628
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "r2", {
|
|
629
|
-
get: function () {
|
|
630
|
-
return this._r2;
|
|
631
|
-
},
|
|
632
|
-
set: function (r2) {
|
|
633
|
-
this._r2 = r2;
|
|
634
|
-
this._segmentChanged();
|
|
635
|
-
},
|
|
636
|
-
enumerable: true
|
|
637
|
-
});
|
|
638
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "angle", {
|
|
639
|
-
get: function () {
|
|
640
|
-
return this._angle;
|
|
641
|
-
},
|
|
642
|
-
set: function (angle) {
|
|
643
|
-
this._angle = angle;
|
|
644
|
-
this._segmentChanged();
|
|
645
|
-
},
|
|
646
|
-
enumerable: true
|
|
647
|
-
});
|
|
648
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "largeArcFlag", {
|
|
649
|
-
get: function () {
|
|
650
|
-
return this._largeArcFlag;
|
|
651
|
-
},
|
|
652
|
-
set: function (largeArcFlag) {
|
|
653
|
-
this._largeArcFlag = largeArcFlag;
|
|
654
|
-
this._segmentChanged();
|
|
655
|
-
},
|
|
656
|
-
enumerable: true
|
|
657
|
-
});
|
|
658
|
-
Object.defineProperty(window.SVGPathSegArcRel.prototype, "sweepFlag", {
|
|
659
|
-
get: function () {
|
|
660
|
-
return this._sweepFlag;
|
|
661
|
-
},
|
|
662
|
-
set: function (sweepFlag) {
|
|
663
|
-
this._sweepFlag = sweepFlag;
|
|
664
|
-
this._segmentChanged();
|
|
665
|
-
},
|
|
666
|
-
enumerable: true
|
|
667
|
-
});
|
|
668
|
-
window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) {
|
|
669
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, "H", owningPathSegList);
|
|
670
|
-
this._x = x;
|
|
671
|
-
};
|
|
672
|
-
window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
673
|
-
window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () {
|
|
674
|
-
return "[object SVGPathSegLinetoHorizontalAbs]";
|
|
675
|
-
};
|
|
676
|
-
window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () {
|
|
677
|
-
return `${this.pathSegTypeAsLetter} ${this._x}`;
|
|
678
|
-
};
|
|
679
|
-
window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () {
|
|
680
|
-
return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x);
|
|
681
|
-
};
|
|
682
|
-
Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, "x", {
|
|
683
|
-
get: function () {
|
|
684
|
-
return this._x;
|
|
685
|
-
},
|
|
686
|
-
set: function (x) {
|
|
687
|
-
this._x = x;
|
|
688
|
-
this._segmentChanged();
|
|
689
|
-
},
|
|
690
|
-
enumerable: true
|
|
691
|
-
});
|
|
692
|
-
window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) {
|
|
693
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, "h", owningPathSegList);
|
|
694
|
-
this._x = x;
|
|
695
|
-
};
|
|
696
|
-
window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
697
|
-
window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () {
|
|
698
|
-
return "[object SVGPathSegLinetoHorizontalRel]";
|
|
699
|
-
};
|
|
700
|
-
window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () {
|
|
701
|
-
return `${this.pathSegTypeAsLetter} ${this._x}`;
|
|
702
|
-
};
|
|
703
|
-
window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () {
|
|
704
|
-
return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x);
|
|
705
|
-
};
|
|
706
|
-
Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, "x", {
|
|
707
|
-
get: function () {
|
|
708
|
-
return this._x;
|
|
709
|
-
},
|
|
710
|
-
set: function (x) {
|
|
711
|
-
this._x = x;
|
|
712
|
-
this._segmentChanged();
|
|
713
|
-
},
|
|
714
|
-
enumerable: true
|
|
715
|
-
});
|
|
716
|
-
window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) {
|
|
717
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, "V", owningPathSegList);
|
|
718
|
-
this._y = y;
|
|
719
|
-
};
|
|
720
|
-
window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
721
|
-
window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () {
|
|
722
|
-
return "[object SVGPathSegLinetoVerticalAbs]";
|
|
723
|
-
};
|
|
724
|
-
window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () {
|
|
725
|
-
return `${this.pathSegTypeAsLetter} ${this._y}`;
|
|
726
|
-
};
|
|
727
|
-
window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () {
|
|
728
|
-
return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y);
|
|
729
|
-
};
|
|
730
|
-
Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, "y", {
|
|
731
|
-
get: function () {
|
|
732
|
-
return this._y;
|
|
733
|
-
},
|
|
734
|
-
set: function (y) {
|
|
735
|
-
this._y = y;
|
|
736
|
-
this._segmentChanged();
|
|
737
|
-
},
|
|
738
|
-
enumerable: true
|
|
739
|
-
});
|
|
740
|
-
window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) {
|
|
741
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, "v", owningPathSegList);
|
|
742
|
-
this._y = y;
|
|
743
|
-
};
|
|
744
|
-
window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
745
|
-
window.SVGPathSegLinetoVerticalRel.prototype.toString = function () {
|
|
746
|
-
return "[object SVGPathSegLinetoVerticalRel]";
|
|
747
|
-
};
|
|
748
|
-
window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () {
|
|
749
|
-
return `${this.pathSegTypeAsLetter} ${this._y}`;
|
|
750
|
-
};
|
|
751
|
-
window.SVGPathSegLinetoVerticalRel.prototype.clone = function () {
|
|
752
|
-
return new window.SVGPathSegLinetoVerticalRel(undefined, this._y);
|
|
753
|
-
};
|
|
754
|
-
Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, "y", {
|
|
755
|
-
get: function () {
|
|
756
|
-
return this._y;
|
|
757
|
-
},
|
|
758
|
-
set: function (y) {
|
|
759
|
-
this._y = y;
|
|
760
|
-
this._segmentChanged();
|
|
761
|
-
},
|
|
762
|
-
enumerable: true
|
|
763
|
-
});
|
|
764
|
-
window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) {
|
|
765
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, "S", owningPathSegList);
|
|
766
|
-
this._x = x;
|
|
767
|
-
this._y = y;
|
|
768
|
-
this._x2 = x2;
|
|
769
|
-
this._y2 = y2;
|
|
770
|
-
};
|
|
771
|
-
window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
772
|
-
window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () {
|
|
773
|
-
return "[object SVGPathSegCurvetoCubicSmoothAbs]";
|
|
774
|
-
};
|
|
775
|
-
window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () {
|
|
776
|
-
return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;
|
|
777
|
-
};
|
|
778
|
-
window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () {
|
|
779
|
-
return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2);
|
|
780
|
-
};
|
|
781
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x", {
|
|
782
|
-
get: function () {
|
|
783
|
-
return this._x;
|
|
784
|
-
},
|
|
785
|
-
set: function (x) {
|
|
786
|
-
this._x = x;
|
|
787
|
-
this._segmentChanged();
|
|
788
|
-
},
|
|
789
|
-
enumerable: true
|
|
790
|
-
});
|
|
791
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y", {
|
|
792
|
-
get: function () {
|
|
793
|
-
return this._y;
|
|
794
|
-
},
|
|
795
|
-
set: function (y) {
|
|
796
|
-
this._y = y;
|
|
797
|
-
this._segmentChanged();
|
|
798
|
-
},
|
|
799
|
-
enumerable: true
|
|
800
|
-
});
|
|
801
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x2", {
|
|
802
|
-
get: function () {
|
|
803
|
-
return this._x2;
|
|
804
|
-
},
|
|
805
|
-
set: function (x2) {
|
|
806
|
-
this._x2 = x2;
|
|
807
|
-
this._segmentChanged();
|
|
808
|
-
},
|
|
809
|
-
enumerable: true
|
|
810
|
-
});
|
|
811
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y2", {
|
|
812
|
-
get: function () {
|
|
813
|
-
return this._y2;
|
|
814
|
-
},
|
|
815
|
-
set: function (y2) {
|
|
816
|
-
this._y2 = y2;
|
|
817
|
-
this._segmentChanged();
|
|
818
|
-
},
|
|
819
|
-
enumerable: true
|
|
820
|
-
});
|
|
821
|
-
window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) {
|
|
822
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, "s", owningPathSegList);
|
|
823
|
-
this._x = x;
|
|
824
|
-
this._y = y;
|
|
825
|
-
this._x2 = x2;
|
|
826
|
-
this._y2 = y2;
|
|
827
|
-
};
|
|
828
|
-
window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
829
|
-
window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () {
|
|
830
|
-
return "[object SVGPathSegCurvetoCubicSmoothRel]";
|
|
831
|
-
};
|
|
832
|
-
window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () {
|
|
833
|
-
return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;
|
|
834
|
-
};
|
|
835
|
-
window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () {
|
|
836
|
-
return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2);
|
|
837
|
-
};
|
|
838
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x", {
|
|
839
|
-
get: function () {
|
|
840
|
-
return this._x;
|
|
841
|
-
},
|
|
842
|
-
set: function (x) {
|
|
843
|
-
this._x = x;
|
|
844
|
-
this._segmentChanged();
|
|
845
|
-
},
|
|
846
|
-
enumerable: true
|
|
847
|
-
});
|
|
848
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y", {
|
|
849
|
-
get: function () {
|
|
850
|
-
return this._y;
|
|
851
|
-
},
|
|
852
|
-
set: function (y) {
|
|
853
|
-
this._y = y;
|
|
854
|
-
this._segmentChanged();
|
|
855
|
-
},
|
|
856
|
-
enumerable: true
|
|
857
|
-
});
|
|
858
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x2", {
|
|
859
|
-
get: function () {
|
|
860
|
-
return this._x2;
|
|
861
|
-
},
|
|
862
|
-
set: function (x2) {
|
|
863
|
-
this._x2 = x2;
|
|
864
|
-
this._segmentChanged();
|
|
865
|
-
},
|
|
866
|
-
enumerable: true
|
|
867
|
-
});
|
|
868
|
-
Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y2", {
|
|
869
|
-
get: function () {
|
|
870
|
-
return this._y2;
|
|
871
|
-
},
|
|
872
|
-
set: function (y2) {
|
|
873
|
-
this._y2 = y2;
|
|
874
|
-
this._segmentChanged();
|
|
875
|
-
},
|
|
876
|
-
enumerable: true
|
|
877
|
-
});
|
|
878
|
-
window.SVGPathSegCurvetoQuadraticSmoothAbs = function (owningPathSegList, x, y) {
|
|
879
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, "T", owningPathSegList);
|
|
880
|
-
this._x = x;
|
|
881
|
-
this._y = y;
|
|
882
|
-
};
|
|
883
|
-
window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
884
|
-
window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () {
|
|
885
|
-
return "[object SVGPathSegCurvetoQuadraticSmoothAbs]";
|
|
886
|
-
};
|
|
887
|
-
window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () {
|
|
888
|
-
return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;
|
|
889
|
-
};
|
|
890
|
-
window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () {
|
|
891
|
-
return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y);
|
|
892
|
-
};
|
|
893
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "x", {
|
|
894
|
-
get: function () {
|
|
895
|
-
return this._x;
|
|
896
|
-
},
|
|
897
|
-
set: function (x) {
|
|
898
|
-
this._x = x;
|
|
899
|
-
this._segmentChanged();
|
|
900
|
-
},
|
|
901
|
-
enumerable: true
|
|
902
|
-
});
|
|
903
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "y", {
|
|
904
|
-
get: function () {
|
|
905
|
-
return this._y;
|
|
906
|
-
},
|
|
907
|
-
set: function (y) {
|
|
908
|
-
this._y = y;
|
|
909
|
-
this._segmentChanged();
|
|
910
|
-
},
|
|
911
|
-
enumerable: true
|
|
912
|
-
});
|
|
913
|
-
window.SVGPathSegCurvetoQuadraticSmoothRel = function (owningPathSegList, x, y) {
|
|
914
|
-
window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, "t", owningPathSegList);
|
|
915
|
-
this._x = x;
|
|
916
|
-
this._y = y;
|
|
917
|
-
};
|
|
918
|
-
window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);
|
|
919
|
-
window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () {
|
|
920
|
-
return "[object SVGPathSegCurvetoQuadraticSmoothRel]";
|
|
921
|
-
};
|
|
922
|
-
window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () {
|
|
923
|
-
return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;
|
|
924
|
-
};
|
|
925
|
-
window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () {
|
|
926
|
-
return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y);
|
|
927
|
-
};
|
|
928
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "x", {
|
|
929
|
-
get: function () {
|
|
930
|
-
return this._x;
|
|
931
|
-
},
|
|
932
|
-
set: function (x) {
|
|
933
|
-
this._x = x;
|
|
934
|
-
this._segmentChanged();
|
|
935
|
-
},
|
|
936
|
-
enumerable: true
|
|
937
|
-
});
|
|
938
|
-
Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "y", {
|
|
939
|
-
get: function () {
|
|
940
|
-
return this._y;
|
|
941
|
-
},
|
|
942
|
-
set: function (y) {
|
|
943
|
-
this._y = y;
|
|
944
|
-
this._segmentChanged();
|
|
945
|
-
},
|
|
946
|
-
enumerable: true
|
|
947
|
-
});
|
|
948
|
-
window.SVGPathElement.prototype.createSVGPathSegClosePath = function () {
|
|
949
|
-
return new window.SVGPathSegClosePath(undefined);
|
|
950
|
-
};
|
|
951
|
-
window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) {
|
|
952
|
-
return new window.SVGPathSegMovetoAbs(undefined, x, y);
|
|
953
|
-
};
|
|
954
|
-
window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) {
|
|
955
|
-
return new window.SVGPathSegMovetoRel(undefined, x, y);
|
|
956
|
-
};
|
|
957
|
-
window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (x, y) {
|
|
958
|
-
return new window.SVGPathSegLinetoAbs(undefined, x, y);
|
|
959
|
-
};
|
|
960
|
-
window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function (x, y) {
|
|
961
|
-
return new window.SVGPathSegLinetoRel(undefined, x, y);
|
|
962
|
-
};
|
|
963
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (x, y, x1, y1, x2, y2) {
|
|
964
|
-
return new window.SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2);
|
|
965
|
-
};
|
|
966
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (x, y, x1, y1, x2, y2) {
|
|
967
|
-
return new window.SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2);
|
|
968
|
-
};
|
|
969
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (x, y, x1, y1) {
|
|
970
|
-
return new window.SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1);
|
|
971
|
-
};
|
|
972
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (x, y, x1, y1) {
|
|
973
|
-
return new window.SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1);
|
|
974
|
-
};
|
|
975
|
-
window.SVGPathElement.prototype.createSVGPathSegArcAbs = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
|
|
976
|
-
return new window.SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
|
|
977
|
-
};
|
|
978
|
-
window.SVGPathElement.prototype.createSVGPathSegArcRel = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {
|
|
979
|
-
return new window.SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
|
|
980
|
-
};
|
|
981
|
-
window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (x) {
|
|
982
|
-
return new window.SVGPathSegLinetoHorizontalAbs(undefined, x);
|
|
983
|
-
};
|
|
984
|
-
window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (x) {
|
|
985
|
-
return new window.SVGPathSegLinetoHorizontalRel(undefined, x);
|
|
986
|
-
};
|
|
987
|
-
window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (y) {
|
|
988
|
-
return new window.SVGPathSegLinetoVerticalAbs(undefined, y);
|
|
989
|
-
};
|
|
990
|
-
window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (y) {
|
|
991
|
-
return new window.SVGPathSegLinetoVerticalRel(undefined, y);
|
|
992
|
-
};
|
|
993
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (x, y, x2, y2) {
|
|
994
|
-
return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2);
|
|
995
|
-
};
|
|
996
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (x, y, x2, y2) {
|
|
997
|
-
return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2);
|
|
998
|
-
};
|
|
999
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (x, y) {
|
|
1000
|
-
return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y);
|
|
1001
|
-
};
|
|
1002
|
-
window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (x, y) {
|
|
1003
|
-
return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y);
|
|
1004
|
-
};
|
|
1005
|
-
if (!("getPathSegAtLength" in window.SVGPathElement.prototype)) {
|
|
1006
|
-
window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {
|
|
1007
|
-
if (distance === undefined || !isFinite(distance)) throw "Invalid arguments.";
|
|
1008
|
-
const measurementElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1009
|
-
measurementElement.setAttribute("d", this.getAttribute("d"));
|
|
1010
|
-
let lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;
|
|
1011
|
-
if (lastPathSegment <= 0) return 0;
|
|
1012
|
-
do {
|
|
1013
|
-
measurementElement.pathSegList.removeItem(lastPathSegment);
|
|
1014
|
-
if (distance > measurementElement.getTotalLength()) break;
|
|
1015
|
-
lastPathSegment--;
|
|
1016
|
-
} while (lastPathSegment > 0);
|
|
1017
|
-
return lastPathSegment;
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
if (!("SVGPathSegList" in window) || !("appendItem" in window.SVGPathSegList.prototype)) {
|
|
1022
|
-
window.SVGPathSegList = function (pathElement) {
|
|
1023
|
-
this._pathElement = pathElement;
|
|
1024
|
-
this._list = this._parsePath(this._pathElement.getAttribute("d"));
|
|
1025
|
-
this._mutationObserverConfig = {
|
|
1026
|
-
attributes: true,
|
|
1027
|
-
attributeFilter: ["d"]
|
|
1028
|
-
};
|
|
1029
|
-
this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));
|
|
1030
|
-
this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);
|
|
1031
|
-
};
|
|
1032
|
-
window.SVGPathSegList.prototype.classname = "SVGPathSegList";
|
|
1033
|
-
Object.defineProperty(window.SVGPathSegList.prototype, "numberOfItems", {
|
|
1034
|
-
get: function () {
|
|
1035
|
-
this._checkPathSynchronizedToList();
|
|
1036
|
-
return this._list.length;
|
|
1037
|
-
},
|
|
1038
|
-
enumerable: true
|
|
1039
|
-
});
|
|
1040
|
-
Object.defineProperty(window.SVGPathSegList.prototype, "length", {
|
|
1041
|
-
get: function () {
|
|
1042
|
-
this._checkPathSynchronizedToList();
|
|
1043
|
-
return this._list.length;
|
|
1044
|
-
},
|
|
1045
|
-
enumerable: true
|
|
1046
|
-
});
|
|
1047
|
-
Object.defineProperty(window.SVGPathElement.prototype, "pathSegList", {
|
|
1048
|
-
get: function () {
|
|
1049
|
-
if (!this._pathSegList) this._pathSegList = new window.SVGPathSegList(this);
|
|
1050
|
-
return this._pathSegList;
|
|
1051
|
-
},
|
|
1052
|
-
enumerable: true
|
|
1053
|
-
});
|
|
1054
|
-
Object.defineProperty(window.SVGPathElement.prototype, "normalizedPathSegList", {
|
|
1055
|
-
get: function () {
|
|
1056
|
-
return this.pathSegList;
|
|
1057
|
-
},
|
|
1058
|
-
enumerable: true
|
|
1059
|
-
});
|
|
1060
|
-
Object.defineProperty(window.SVGPathElement.prototype, "animatedPathSegList", {
|
|
1061
|
-
get: function () {
|
|
1062
|
-
return this.pathSegList;
|
|
1063
|
-
},
|
|
1064
|
-
enumerable: true
|
|
1065
|
-
});
|
|
1066
|
-
Object.defineProperty(window.SVGPathElement.prototype, "animatedNormalizedPathSegList", {
|
|
1067
|
-
get: function () {
|
|
1068
|
-
return this.pathSegList;
|
|
1069
|
-
},
|
|
1070
|
-
enumerable: true
|
|
1071
|
-
});
|
|
1072
|
-
window.SVGPathSegList.prototype._checkPathSynchronizedToList = function () {
|
|
1073
|
-
this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());
|
|
1074
|
-
};
|
|
1075
|
-
window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {
|
|
1076
|
-
if (!this._pathElement) return;
|
|
1077
|
-
let hasPathMutations = false;
|
|
1078
|
-
mutationRecords.forEach(function (record) {
|
|
1079
|
-
if (record.attributeName == "d") hasPathMutations = true;
|
|
1080
|
-
});
|
|
1081
|
-
if (hasPathMutations) this._list = this._parsePath(this._pathElement.getAttribute("d"));
|
|
1082
|
-
};
|
|
1083
|
-
window.SVGPathSegList.prototype._writeListToPath = function () {
|
|
1084
|
-
this._pathElementMutationObserver.disconnect();
|
|
1085
|
-
this._pathElement.setAttribute("d", window.SVGPathSegList._pathSegArrayAsString(this._list));
|
|
1086
|
-
this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);
|
|
1087
|
-
};
|
|
1088
|
-
window.SVGPathSegList.prototype.segmentChanged = function () {
|
|
1089
|
-
this._writeListToPath();
|
|
1090
|
-
};
|
|
1091
|
-
window.SVGPathSegList.prototype.clear = function () {
|
|
1092
|
-
this._checkPathSynchronizedToList();
|
|
1093
|
-
this._list.forEach(function (pathSeg) {
|
|
1094
|
-
pathSeg._owningPathSegList = null;
|
|
1095
|
-
});
|
|
1096
|
-
this._list = [];
|
|
1097
|
-
this._writeListToPath();
|
|
1098
|
-
};
|
|
1099
|
-
window.SVGPathSegList.prototype.initialize = function (newItem) {
|
|
1100
|
-
this._checkPathSynchronizedToList();
|
|
1101
|
-
this._list = [newItem];
|
|
1102
|
-
newItem._owningPathSegList = this;
|
|
1103
|
-
this._writeListToPath();
|
|
1104
|
-
return newItem;
|
|
1105
|
-
};
|
|
1106
|
-
window.SVGPathSegList.prototype._checkValidIndex = function (index) {
|
|
1107
|
-
if (isNaN(index) || index < 0 || index >= this.numberOfItems) throw "INDEX_SIZE_ERR";
|
|
1108
|
-
};
|
|
1109
|
-
window.SVGPathSegList.prototype.getItem = function (index) {
|
|
1110
|
-
this._checkPathSynchronizedToList();
|
|
1111
|
-
this._checkValidIndex(index);
|
|
1112
|
-
return this._list[index];
|
|
1113
|
-
};
|
|
1114
|
-
window.SVGPathSegList.prototype.insertItemBefore = function (newItem, index) {
|
|
1115
|
-
this._checkPathSynchronizedToList();
|
|
1116
|
-
if (index > this.numberOfItems) index = this.numberOfItems;
|
|
1117
|
-
if (newItem._owningPathSegList) {
|
|
1118
|
-
newItem = newItem.clone();
|
|
1119
|
-
}
|
|
1120
|
-
this._list.splice(index, 0, newItem);
|
|
1121
|
-
newItem._owningPathSegList = this;
|
|
1122
|
-
this._writeListToPath();
|
|
1123
|
-
return newItem;
|
|
1124
|
-
};
|
|
1125
|
-
window.SVGPathSegList.prototype.replaceItem = function (newItem, index) {
|
|
1126
|
-
this._checkPathSynchronizedToList();
|
|
1127
|
-
if (newItem._owningPathSegList) {
|
|
1128
|
-
newItem = newItem.clone();
|
|
1129
|
-
}
|
|
1130
|
-
this._checkValidIndex(index);
|
|
1131
|
-
this._list[index] = newItem;
|
|
1132
|
-
newItem._owningPathSegList = this;
|
|
1133
|
-
this._writeListToPath();
|
|
1134
|
-
return newItem;
|
|
1135
|
-
};
|
|
1136
|
-
window.SVGPathSegList.prototype.removeItem = function (index) {
|
|
1137
|
-
this._checkPathSynchronizedToList();
|
|
1138
|
-
this._checkValidIndex(index);
|
|
1139
|
-
const item = this._list[index];
|
|
1140
|
-
this._list.splice(index, 1);
|
|
1141
|
-
this._writeListToPath();
|
|
1142
|
-
return item;
|
|
1143
|
-
};
|
|
1144
|
-
window.SVGPathSegList.prototype.appendItem = function (newItem) {
|
|
1145
|
-
this._checkPathSynchronizedToList();
|
|
1146
|
-
if (newItem._owningPathSegList) {
|
|
1147
|
-
newItem = newItem.clone();
|
|
1148
|
-
}
|
|
1149
|
-
this._list.push(newItem);
|
|
1150
|
-
newItem._owningPathSegList = this;
|
|
1151
|
-
this._writeListToPath();
|
|
1152
|
-
return newItem;
|
|
1153
|
-
};
|
|
1154
|
-
window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {
|
|
1155
|
-
let string = "";
|
|
1156
|
-
let first = true;
|
|
1157
|
-
pathSegArray.forEach(function (pathSeg) {
|
|
1158
|
-
if (first) {
|
|
1159
|
-
first = false;
|
|
1160
|
-
string += pathSeg._asPathString();
|
|
1161
|
-
} else {
|
|
1162
|
-
string += ` ${pathSeg._asPathString()}`;
|
|
1163
|
-
}
|
|
1164
|
-
});
|
|
1165
|
-
return string;
|
|
1166
|
-
};
|
|
1167
|
-
window.SVGPathSegList.prototype._parsePath = function (string) {
|
|
1168
|
-
if (!string || !string.length) return [];
|
|
1169
|
-
const owningPathSegList = this;
|
|
1170
|
-
const Builder = function () {
|
|
1171
|
-
this.pathSegList = [];
|
|
1172
|
-
};
|
|
1173
|
-
Builder.prototype.appendSegment = function (pathSeg) {
|
|
1174
|
-
this.pathSegList.push(pathSeg);
|
|
1175
|
-
};
|
|
1176
|
-
const Source = function (string) {
|
|
1177
|
-
this._string = string;
|
|
1178
|
-
this._currentIndex = 0;
|
|
1179
|
-
this._endIndex = this._string.length;
|
|
1180
|
-
this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN;
|
|
1181
|
-
this._skipOptionalSpaces();
|
|
1182
|
-
};
|
|
1183
|
-
Source.prototype._isCurrentSpace = function () {
|
|
1184
|
-
const character = this._string[this._currentIndex];
|
|
1185
|
-
return character <= " " && (character == " " || character == "\n" || character == "\t" || character == "\r" || character == "\f");
|
|
1186
|
-
};
|
|
1187
|
-
Source.prototype._skipOptionalSpaces = function () {
|
|
1188
|
-
while (this._currentIndex < this._endIndex && this._isCurrentSpace()) this._currentIndex++;
|
|
1189
|
-
return this._currentIndex < this._endIndex;
|
|
1190
|
-
};
|
|
1191
|
-
Source.prototype._skipOptionalSpacesOrDelimiter = function () {
|
|
1192
|
-
if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != ",") return false;
|
|
1193
|
-
if (this._skipOptionalSpaces()) {
|
|
1194
|
-
if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ",") {
|
|
1195
|
-
this._currentIndex++;
|
|
1196
|
-
this._skipOptionalSpaces();
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
return this._currentIndex < this._endIndex;
|
|
1200
|
-
};
|
|
1201
|
-
Source.prototype.hasMoreData = function () {
|
|
1202
|
-
return this._currentIndex < this._endIndex;
|
|
1203
|
-
};
|
|
1204
|
-
Source.prototype.peekSegmentType = function () {
|
|
1205
|
-
const lookahead = this._string[this._currentIndex];
|
|
1206
|
-
return this._pathSegTypeFromChar(lookahead);
|
|
1207
|
-
};
|
|
1208
|
-
Source.prototype._pathSegTypeFromChar = function (lookahead) {
|
|
1209
|
-
switch (lookahead) {
|
|
1210
|
-
case "Z":
|
|
1211
|
-
case "z":
|
|
1212
|
-
return window.SVGPathSeg.PATHSEG_CLOSEPATH;
|
|
1213
|
-
case "M":
|
|
1214
|
-
return window.SVGPathSeg.PATHSEG_MOVETO_ABS;
|
|
1215
|
-
case "m":
|
|
1216
|
-
return window.SVGPathSeg.PATHSEG_MOVETO_REL;
|
|
1217
|
-
case "L":
|
|
1218
|
-
return window.SVGPathSeg.PATHSEG_LINETO_ABS;
|
|
1219
|
-
case "l":
|
|
1220
|
-
return window.SVGPathSeg.PATHSEG_LINETO_REL;
|
|
1221
|
-
case "C":
|
|
1222
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;
|
|
1223
|
-
case "c":
|
|
1224
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;
|
|
1225
|
-
case "Q":
|
|
1226
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;
|
|
1227
|
-
case "q":
|
|
1228
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;
|
|
1229
|
-
case "A":
|
|
1230
|
-
return window.SVGPathSeg.PATHSEG_ARC_ABS;
|
|
1231
|
-
case "a":
|
|
1232
|
-
return window.SVGPathSeg.PATHSEG_ARC_REL;
|
|
1233
|
-
case "H":
|
|
1234
|
-
return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;
|
|
1235
|
-
case "h":
|
|
1236
|
-
return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;
|
|
1237
|
-
case "V":
|
|
1238
|
-
return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;
|
|
1239
|
-
case "v":
|
|
1240
|
-
return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;
|
|
1241
|
-
case "S":
|
|
1242
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
|
|
1243
|
-
case "s":
|
|
1244
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;
|
|
1245
|
-
case "T":
|
|
1246
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
|
|
1247
|
-
case "t":
|
|
1248
|
-
return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;
|
|
1249
|
-
default:
|
|
1250
|
-
return window.SVGPathSeg.PATHSEG_UNKNOWN;
|
|
1251
|
-
}
|
|
1252
|
-
};
|
|
1253
|
-
Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {
|
|
1254
|
-
if ((lookahead == "+" || lookahead == "-" || lookahead == "." || lookahead >= "0" && lookahead <= "9") && previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {
|
|
1255
|
-
if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS) return window.SVGPathSeg.PATHSEG_LINETO_ABS;
|
|
1256
|
-
if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_REL) return window.SVGPathSeg.PATHSEG_LINETO_REL;
|
|
1257
|
-
return previousCommand;
|
|
1258
|
-
}
|
|
1259
|
-
return window.SVGPathSeg.PATHSEG_UNKNOWN;
|
|
1260
|
-
};
|
|
1261
|
-
Source.prototype.initialCommandIsMoveTo = function () {
|
|
1262
|
-
if (!this.hasMoreData()) return true;
|
|
1263
|
-
const command = this.peekSegmentType();
|
|
1264
|
-
return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS || command == window.SVGPathSeg.PATHSEG_MOVETO_REL;
|
|
1265
|
-
};
|
|
1266
|
-
Source.prototype._parseNumber = function () {
|
|
1267
|
-
let exponent = 0;
|
|
1268
|
-
let integer = 0;
|
|
1269
|
-
let frac = 1;
|
|
1270
|
-
let decimal = 0;
|
|
1271
|
-
let sign = 1;
|
|
1272
|
-
let expsign = 1;
|
|
1273
|
-
const startIndex = this._currentIndex;
|
|
1274
|
-
this._skipOptionalSpaces();
|
|
1275
|
-
if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "+") this._currentIndex++;else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "-") {
|
|
1276
|
-
this._currentIndex++;
|
|
1277
|
-
sign = -1;
|
|
1278
|
-
}
|
|
1279
|
-
if (this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") && this._string.charAt(this._currentIndex) != ".") return undefined;
|
|
1280
|
-
const startIntPartIndex = this._currentIndex;
|
|
1281
|
-
while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") this._currentIndex++;
|
|
1282
|
-
if (this._currentIndex != startIntPartIndex) {
|
|
1283
|
-
let scanIntPartIndex = this._currentIndex - 1;
|
|
1284
|
-
let multiplier = 1;
|
|
1285
|
-
while (scanIntPartIndex >= startIntPartIndex) {
|
|
1286
|
-
integer += multiplier * (this._string.charAt(scanIntPartIndex--) - "0");
|
|
1287
|
-
multiplier *= 10;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ".") {
|
|
1291
|
-
this._currentIndex++;
|
|
1292
|
-
if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return undefined;
|
|
1293
|
-
while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
|
|
1294
|
-
frac *= 10;
|
|
1295
|
-
decimal += (this._string.charAt(this._currentIndex) - "0") / frac;
|
|
1296
|
-
this._currentIndex += 1;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
if (this._currentIndex != startIndex && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == "e" || this._string.charAt(this._currentIndex) == "E") && this._string.charAt(this._currentIndex + 1) != "x" && this._string.charAt(this._currentIndex + 1) != "m") {
|
|
1300
|
-
this._currentIndex++;
|
|
1301
|
-
if (this._string.charAt(this._currentIndex) == "+") {
|
|
1302
|
-
this._currentIndex++;
|
|
1303
|
-
} else if (this._string.charAt(this._currentIndex) == "-") {
|
|
1304
|
-
this._currentIndex++;
|
|
1305
|
-
expsign = -1;
|
|
1306
|
-
}
|
|
1307
|
-
if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return undefined;
|
|
1308
|
-
while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9") {
|
|
1309
|
-
exponent *= 10;
|
|
1310
|
-
exponent += this._string.charAt(this._currentIndex) - "0";
|
|
1311
|
-
this._currentIndex++;
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
let number = integer + decimal;
|
|
1315
|
-
number *= sign;
|
|
1316
|
-
if (exponent) number *= Math.pow(10, expsign * exponent);
|
|
1317
|
-
if (startIndex == this._currentIndex) return undefined;
|
|
1318
|
-
this._skipOptionalSpacesOrDelimiter();
|
|
1319
|
-
return number;
|
|
1320
|
-
};
|
|
1321
|
-
Source.prototype._parseArcFlag = function () {
|
|
1322
|
-
if (this._currentIndex >= this._endIndex) return undefined;
|
|
1323
|
-
let flag = false;
|
|
1324
|
-
const flagChar = this._string.charAt(this._currentIndex++);
|
|
1325
|
-
if (flagChar == "0") flag = false;else if (flagChar == "1") flag = true;else return undefined;
|
|
1326
|
-
this._skipOptionalSpacesOrDelimiter();
|
|
1327
|
-
return flag;
|
|
1328
|
-
};
|
|
1329
|
-
Source.prototype.parseSegment = function () {
|
|
1330
|
-
const lookahead = this._string[this._currentIndex];
|
|
1331
|
-
let command = this._pathSegTypeFromChar(lookahead);
|
|
1332
|
-
if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {
|
|
1333
|
-
if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;
|
|
1334
|
-
command = this._nextCommandHelper(lookahead, this._previousCommand);
|
|
1335
|
-
if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;
|
|
1336
|
-
} else {
|
|
1337
|
-
this._currentIndex++;
|
|
1338
|
-
}
|
|
1339
|
-
this._previousCommand = command;
|
|
1340
|
-
let points;
|
|
1341
|
-
switch (command) {
|
|
1342
|
-
case window.SVGPathSeg.PATHSEG_MOVETO_REL:
|
|
1343
|
-
return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1344
|
-
case window.SVGPathSeg.PATHSEG_MOVETO_ABS:
|
|
1345
|
-
return new window.SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1346
|
-
case window.SVGPathSeg.PATHSEG_LINETO_REL:
|
|
1347
|
-
return new window.SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1348
|
-
case window.SVGPathSeg.PATHSEG_LINETO_ABS:
|
|
1349
|
-
return new window.SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1350
|
-
case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:
|
|
1351
|
-
return new window.SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());
|
|
1352
|
-
case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:
|
|
1353
|
-
return new window.SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());
|
|
1354
|
-
case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:
|
|
1355
|
-
return new window.SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());
|
|
1356
|
-
case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:
|
|
1357
|
-
return new window.SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());
|
|
1358
|
-
case window.SVGPathSeg.PATHSEG_CLOSEPATH:
|
|
1359
|
-
this._skipOptionalSpaces();
|
|
1360
|
-
return new window.SVGPathSegClosePath(owningPathSegList);
|
|
1361
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:
|
|
1362
|
-
points = {
|
|
1363
|
-
x1: this._parseNumber(),
|
|
1364
|
-
y1: this._parseNumber(),
|
|
1365
|
-
x2: this._parseNumber(),
|
|
1366
|
-
y2: this._parseNumber(),
|
|
1367
|
-
x: this._parseNumber(),
|
|
1368
|
-
y: this._parseNumber()
|
|
1369
|
-
};
|
|
1370
|
-
return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
|
|
1371
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
|
|
1372
|
-
points = {
|
|
1373
|
-
x1: this._parseNumber(),
|
|
1374
|
-
y1: this._parseNumber(),
|
|
1375
|
-
x2: this._parseNumber(),
|
|
1376
|
-
y2: this._parseNumber(),
|
|
1377
|
-
x: this._parseNumber(),
|
|
1378
|
-
y: this._parseNumber()
|
|
1379
|
-
};
|
|
1380
|
-
return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);
|
|
1381
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
|
1382
|
-
points = {
|
|
1383
|
-
x2: this._parseNumber(),
|
|
1384
|
-
y2: this._parseNumber(),
|
|
1385
|
-
x: this._parseNumber(),
|
|
1386
|
-
y: this._parseNumber()
|
|
1387
|
-
};
|
|
1388
|
-
return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);
|
|
1389
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
|
1390
|
-
points = {
|
|
1391
|
-
x2: this._parseNumber(),
|
|
1392
|
-
y2: this._parseNumber(),
|
|
1393
|
-
x: this._parseNumber(),
|
|
1394
|
-
y: this._parseNumber()
|
|
1395
|
-
};
|
|
1396
|
-
return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);
|
|
1397
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
|
|
1398
|
-
points = {
|
|
1399
|
-
x1: this._parseNumber(),
|
|
1400
|
-
y1: this._parseNumber(),
|
|
1401
|
-
x: this._parseNumber(),
|
|
1402
|
-
y: this._parseNumber()
|
|
1403
|
-
};
|
|
1404
|
-
return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);
|
|
1405
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
|
|
1406
|
-
points = {
|
|
1407
|
-
x1: this._parseNumber(),
|
|
1408
|
-
y1: this._parseNumber(),
|
|
1409
|
-
x: this._parseNumber(),
|
|
1410
|
-
y: this._parseNumber()
|
|
1411
|
-
};
|
|
1412
|
-
return new window.SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);
|
|
1413
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
|
|
1414
|
-
return new window.SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1415
|
-
case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
|
|
1416
|
-
return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());
|
|
1417
|
-
case window.SVGPathSeg.PATHSEG_ARC_REL:
|
|
1418
|
-
points = {
|
|
1419
|
-
x1: this._parseNumber(),
|
|
1420
|
-
y1: this._parseNumber(),
|
|
1421
|
-
arcAngle: this._parseNumber(),
|
|
1422
|
-
arcLarge: this._parseArcFlag(),
|
|
1423
|
-
arcSweep: this._parseArcFlag(),
|
|
1424
|
-
x: this._parseNumber(),
|
|
1425
|
-
y: this._parseNumber()
|
|
1426
|
-
};
|
|
1427
|
-
return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
|
|
1428
|
-
case window.SVGPathSeg.PATHSEG_ARC_ABS:
|
|
1429
|
-
points = {
|
|
1430
|
-
x1: this._parseNumber(),
|
|
1431
|
-
y1: this._parseNumber(),
|
|
1432
|
-
arcAngle: this._parseNumber(),
|
|
1433
|
-
arcLarge: this._parseArcFlag(),
|
|
1434
|
-
arcSweep: this._parseArcFlag(),
|
|
1435
|
-
x: this._parseNumber(),
|
|
1436
|
-
y: this._parseNumber()
|
|
1437
|
-
};
|
|
1438
|
-
return new window.SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);
|
|
1439
|
-
default:
|
|
1440
|
-
throw "Unknown path seg type.";
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
const builder = new Builder();
|
|
1444
|
-
const source = new Source(string);
|
|
1445
|
-
if (!source.initialCommandIsMoveTo()) return [];
|
|
1446
|
-
while (source.hasMoreData()) {
|
|
1447
|
-
const pathSeg = source.parseSegment();
|
|
1448
|
-
if (!pathSeg) return [];
|
|
1449
|
-
builder.appendSegment(pathSeg);
|
|
1450
|
-
}
|
|
1451
|
-
return builder.pathSegList;
|
|
1452
|
-
};
|
|
1453
|
-
}
|
|
1454
|
-
} catch (e) {
|
|
1455
|
-
console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles", e);
|
|
1456
|
-
}
|
|
1457
|
-
})();
|
|
47
|
+
eval("\n\n(function () {\n \"use strict\";\n\n try {\n if (typeof window === \"undefined\") return;\n if (!(\"SVGPathSeg\" in window)) {\n window.SVGPathSeg = function (type, typeAsLetter, owningPathSegList) {\n this.pathSegType = type;\n this.pathSegTypeAsLetter = typeAsLetter;\n this._owningPathSegList = owningPathSegList;\n };\n window.SVGPathSeg.prototype.classname = \"SVGPathSeg\";\n window.SVGPathSeg.PATHSEG_UNKNOWN = 0;\n window.SVGPathSeg.PATHSEG_CLOSEPATH = 1;\n window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2;\n window.SVGPathSeg.PATHSEG_MOVETO_REL = 3;\n window.SVGPathSeg.PATHSEG_LINETO_ABS = 4;\n window.SVGPathSeg.PATHSEG_LINETO_REL = 5;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9;\n window.SVGPathSeg.PATHSEG_ARC_ABS = 10;\n window.SVGPathSeg.PATHSEG_ARC_REL = 11;\n window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12;\n window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13;\n window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14;\n window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;\n window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;\n window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;\n window.SVGPathSeg.prototype._segmentChanged = function () {\n if (this._owningPathSegList) this._owningPathSegList.segmentChanged(this);\n };\n window.SVGPathSegClosePath = function (owningPathSegList) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, \"z\", owningPathSegList);\n };\n window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegClosePath.prototype.toString = function () {\n return \"[object SVGPathSegClosePath]\";\n };\n window.SVGPathSegClosePath.prototype._asPathString = function () {\n return this.pathSegTypeAsLetter;\n };\n window.SVGPathSegClosePath.prototype.clone = function () {\n return new window.SVGPathSegClosePath(undefined);\n };\n window.SVGPathSegMovetoAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, \"M\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegMovetoAbs.prototype.toString = function () {\n return \"[object SVGPathSegMovetoAbs]\";\n };\n window.SVGPathSegMovetoAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegMovetoAbs.prototype.clone = function () {\n return new window.SVGPathSegMovetoAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegMovetoRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, \"m\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegMovetoRel.prototype.toString = function () {\n return \"[object SVGPathSegMovetoRel]\";\n };\n window.SVGPathSegMovetoRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegMovetoRel.prototype.clone = function () {\n return new window.SVGPathSegMovetoRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegMovetoRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegMovetoRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, \"L\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoAbs]\";\n };\n window.SVGPathSegLinetoAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegLinetoAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, \"l\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoRel]\";\n };\n window.SVGPathSegLinetoRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegLinetoRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegLinetoRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicAbs = function (owningPathSegList, x, y, x1, y1, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, \"C\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicAbs]\";\n };\n window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicAbs(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicRel = function (owningPathSegList, x, y, x1, y1, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, \"c\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicRel]\";\n };\n window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicRel(undefined, this._x, this._y, this._x1, this._y1, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticAbs = function (owningPathSegList, x, y, x1, y1) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, \"Q\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticAbs]\";\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticAbs(undefined, this._x, this._y, this._x1, this._y1);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticRel = function (owningPathSegList, x, y, x1, y1) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, \"q\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x1 = x1;\n this._y1 = y1;\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticRel]\";\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticRel(undefined, this._x, this._y, this._x1, this._y1);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"x1\", {\n get: function () {\n return this._x1;\n },\n set: function (x1) {\n this._x1 = x1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, \"y1\", {\n get: function () {\n return this._y1;\n },\n set: function (y1) {\n this._y1 = y1;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegArcAbs = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, \"A\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._r1 = r1;\n this._r2 = r2;\n this._angle = angle;\n this._largeArcFlag = largeArcFlag;\n this._sweepFlag = sweepFlag;\n };\n window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegArcAbs.prototype.toString = function () {\n return \"[object SVGPathSegArcAbs]\";\n };\n window.SVGPathSegArcAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? \"1\" : \"0\"} ${this._sweepFlag ? \"1\" : \"0\"} ${this._x} ${this._y}`;\n };\n window.SVGPathSegArcAbs.prototype.clone = function () {\n return new window.SVGPathSegArcAbs(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);\n };\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"r1\", {\n get: function () {\n return this._r1;\n },\n set: function (r1) {\n this._r1 = r1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"r2\", {\n get: function () {\n return this._r2;\n },\n set: function (r2) {\n this._r2 = r2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"angle\", {\n get: function () {\n return this._angle;\n },\n set: function (angle) {\n this._angle = angle;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"largeArcFlag\", {\n get: function () {\n return this._largeArcFlag;\n },\n set: function (largeArcFlag) {\n this._largeArcFlag = largeArcFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcAbs.prototype, \"sweepFlag\", {\n get: function () {\n return this._sweepFlag;\n },\n set: function (sweepFlag) {\n this._sweepFlag = sweepFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegArcRel = function (owningPathSegList, x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, \"a\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._r1 = r1;\n this._r2 = r2;\n this._angle = angle;\n this._largeArcFlag = largeArcFlag;\n this._sweepFlag = sweepFlag;\n };\n window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegArcRel.prototype.toString = function () {\n return \"[object SVGPathSegArcRel]\";\n };\n window.SVGPathSegArcRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag ? \"1\" : \"0\"} ${this._sweepFlag ? \"1\" : \"0\"} ${this._x} ${this._y}`;\n };\n window.SVGPathSegArcRel.prototype.clone = function () {\n return new window.SVGPathSegArcRel(undefined, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag);\n };\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"r1\", {\n get: function () {\n return this._r1;\n },\n set: function (r1) {\n this._r1 = r1;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"r2\", {\n get: function () {\n return this._r2;\n },\n set: function (r2) {\n this._r2 = r2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"angle\", {\n get: function () {\n return this._angle;\n },\n set: function (angle) {\n this._angle = angle;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"largeArcFlag\", {\n get: function () {\n return this._largeArcFlag;\n },\n set: function (largeArcFlag) {\n this._largeArcFlag = largeArcFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegArcRel.prototype, \"sweepFlag\", {\n get: function () {\n return this._sweepFlag;\n },\n set: function (sweepFlag) {\n this._sweepFlag = sweepFlag;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoHorizontalAbs = function (owningPathSegList, x) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, \"H\", owningPathSegList);\n this._x = x;\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoHorizontalAbs]\";\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x}`;\n };\n window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoHorizontalAbs(undefined, this._x);\n };\n Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoHorizontalRel = function (owningPathSegList, x) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, \"h\", owningPathSegList);\n this._x = x;\n };\n window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoHorizontalRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoHorizontalRel]\";\n };\n window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x}`;\n };\n window.SVGPathSegLinetoHorizontalRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoHorizontalRel(undefined, this._x);\n };\n Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoVerticalAbs = function (owningPathSegList, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, \"V\", owningPathSegList);\n this._y = y;\n };\n window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoVerticalAbs.prototype.toString = function () {\n return \"[object SVGPathSegLinetoVerticalAbs]\";\n };\n window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._y}`;\n };\n window.SVGPathSegLinetoVerticalAbs.prototype.clone = function () {\n return new window.SVGPathSegLinetoVerticalAbs(undefined, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegLinetoVerticalRel = function (owningPathSegList, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, \"v\", owningPathSegList);\n this._y = y;\n };\n window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegLinetoVerticalRel.prototype.toString = function () {\n return \"[object SVGPathSegLinetoVerticalRel]\";\n };\n window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._y}`;\n };\n window.SVGPathSegLinetoVerticalRel.prototype.clone = function () {\n return new window.SVGPathSegLinetoVerticalRel(undefined, this._y);\n };\n Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicSmoothAbs = function (owningPathSegList, x, y, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, \"S\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicSmoothAbs]\";\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, this._x, this._y, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoCubicSmoothRel = function (owningPathSegList, x, y, x2, y2) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, \"s\", owningPathSegList);\n this._x = x;\n this._y = y;\n this._x2 = x2;\n this._y2 = y2;\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoCubicSmoothRel]\";\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, this._x, this._y, this._x2, this._y2);\n };\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"x2\", {\n get: function () {\n return this._x2;\n },\n set: function (x2) {\n this._x2 = x2;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, \"y2\", {\n get: function () {\n return this._y2;\n },\n set: function (y2) {\n this._y2 = y2;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticSmoothAbs = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, \"T\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticSmoothAbs]\";\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathSegCurvetoQuadraticSmoothRel = function (owningPathSegList, x, y) {\n window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, \"t\", owningPathSegList);\n this._x = x;\n this._y = y;\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype);\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () {\n return \"[object SVGPathSegCurvetoQuadraticSmoothRel]\";\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () {\n return `${this.pathSegTypeAsLetter} ${this._x} ${this._y}`;\n };\n window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () {\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, this._x, this._y);\n };\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"x\", {\n get: function () {\n return this._x;\n },\n set: function (x) {\n this._x = x;\n this._segmentChanged();\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, \"y\", {\n get: function () {\n return this._y;\n },\n set: function (y) {\n this._y = y;\n this._segmentChanged();\n },\n enumerable: true\n });\n window.SVGPathElement.prototype.createSVGPathSegClosePath = function () {\n return new window.SVGPathSegClosePath(undefined);\n };\n window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (x, y) {\n return new window.SVGPathSegMovetoAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function (x, y) {\n return new window.SVGPathSegMovetoRel(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (x, y) {\n return new window.SVGPathSegLinetoAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function (x, y) {\n return new window.SVGPathSegLinetoRel(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (x, y, x1, y1, x2, y2) {\n return new window.SVGPathSegCurvetoCubicAbs(undefined, x, y, x1, y1, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (x, y, x1, y1, x2, y2) {\n return new window.SVGPathSegCurvetoCubicRel(undefined, x, y, x1, y1, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (x, y, x1, y1) {\n return new window.SVGPathSegCurvetoQuadraticAbs(undefined, x, y, x1, y1);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (x, y, x1, y1) {\n return new window.SVGPathSegCurvetoQuadraticRel(undefined, x, y, x1, y1);\n };\n window.SVGPathElement.prototype.createSVGPathSegArcAbs = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n return new window.SVGPathSegArcAbs(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);\n };\n window.SVGPathElement.prototype.createSVGPathSegArcRel = function (x, y, r1, r2, angle, largeArcFlag, sweepFlag) {\n return new window.SVGPathSegArcRel(undefined, x, y, r1, r2, angle, largeArcFlag, sweepFlag);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (x) {\n return new window.SVGPathSegLinetoHorizontalAbs(undefined, x);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (x) {\n return new window.SVGPathSegLinetoHorizontalRel(undefined, x);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (y) {\n return new window.SVGPathSegLinetoVerticalAbs(undefined, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (y) {\n return new window.SVGPathSegLinetoVerticalRel(undefined, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (x, y, x2, y2) {\n return new window.SVGPathSegCurvetoCubicSmoothAbs(undefined, x, y, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (x, y, x2, y2) {\n return new window.SVGPathSegCurvetoCubicSmoothRel(undefined, x, y, x2, y2);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (x, y) {\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(undefined, x, y);\n };\n window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (x, y) {\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(undefined, x, y);\n };\n if (!(\"getPathSegAtLength\" in window.SVGPathElement.prototype)) {\n window.SVGPathElement.prototype.getPathSegAtLength = function (distance) {\n if (distance === undefined || !isFinite(distance)) throw \"Invalid arguments.\";\n const measurementElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n measurementElement.setAttribute(\"d\", this.getAttribute(\"d\"));\n let lastPathSegment = measurementElement.pathSegList.numberOfItems - 1;\n if (lastPathSegment <= 0) return 0;\n do {\n measurementElement.pathSegList.removeItem(lastPathSegment);\n if (distance > measurementElement.getTotalLength()) break;\n lastPathSegment--;\n } while (lastPathSegment > 0);\n return lastPathSegment;\n };\n }\n }\n if (!(\"SVGPathSegList\" in window) || !(\"appendItem\" in window.SVGPathSegList.prototype)) {\n window.SVGPathSegList = function (pathElement) {\n this._pathElement = pathElement;\n this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n this._mutationObserverConfig = {\n attributes: true,\n attributeFilter: [\"d\"]\n };\n this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this));\n this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n };\n window.SVGPathSegList.prototype.classname = \"SVGPathSegList\";\n Object.defineProperty(window.SVGPathSegList.prototype, \"numberOfItems\", {\n get: function () {\n this._checkPathSynchronizedToList();\n return this._list.length;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathSegList.prototype, \"length\", {\n get: function () {\n this._checkPathSynchronizedToList();\n return this._list.length;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"pathSegList\", {\n get: function () {\n if (!this._pathSegList) this._pathSegList = new window.SVGPathSegList(this);\n return this._pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"normalizedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"animatedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n Object.defineProperty(window.SVGPathElement.prototype, \"animatedNormalizedPathSegList\", {\n get: function () {\n return this.pathSegList;\n },\n enumerable: true\n });\n window.SVGPathSegList.prototype._checkPathSynchronizedToList = function () {\n this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords());\n };\n window.SVGPathSegList.prototype._updateListFromPathMutations = function (mutationRecords) {\n if (!this._pathElement) return;\n let hasPathMutations = false;\n mutationRecords.forEach(function (record) {\n if (record.attributeName == \"d\") hasPathMutations = true;\n });\n if (hasPathMutations) this._list = this._parsePath(this._pathElement.getAttribute(\"d\"));\n };\n window.SVGPathSegList.prototype._writeListToPath = function () {\n this._pathElementMutationObserver.disconnect();\n this._pathElement.setAttribute(\"d\", window.SVGPathSegList._pathSegArrayAsString(this._list));\n this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig);\n };\n window.SVGPathSegList.prototype.segmentChanged = function () {\n this._writeListToPath();\n };\n window.SVGPathSegList.prototype.clear = function () {\n this._checkPathSynchronizedToList();\n this._list.forEach(function (pathSeg) {\n pathSeg._owningPathSegList = null;\n });\n this._list = [];\n this._writeListToPath();\n };\n window.SVGPathSegList.prototype.initialize = function (newItem) {\n this._checkPathSynchronizedToList();\n this._list = [newItem];\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype._checkValidIndex = function (index) {\n if (isNaN(index) || index < 0 || index >= this.numberOfItems) throw \"INDEX_SIZE_ERR\";\n };\n window.SVGPathSegList.prototype.getItem = function (index) {\n this._checkPathSynchronizedToList();\n this._checkValidIndex(index);\n return this._list[index];\n };\n window.SVGPathSegList.prototype.insertItemBefore = function (newItem, index) {\n this._checkPathSynchronizedToList();\n if (index > this.numberOfItems) index = this.numberOfItems;\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._list.splice(index, 0, newItem);\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype.replaceItem = function (newItem, index) {\n this._checkPathSynchronizedToList();\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._checkValidIndex(index);\n this._list[index] = newItem;\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList.prototype.removeItem = function (index) {\n this._checkPathSynchronizedToList();\n this._checkValidIndex(index);\n const item = this._list[index];\n this._list.splice(index, 1);\n this._writeListToPath();\n return item;\n };\n window.SVGPathSegList.prototype.appendItem = function (newItem) {\n this._checkPathSynchronizedToList();\n if (newItem._owningPathSegList) {\n newItem = newItem.clone();\n }\n this._list.push(newItem);\n newItem._owningPathSegList = this;\n this._writeListToPath();\n return newItem;\n };\n window.SVGPathSegList._pathSegArrayAsString = function (pathSegArray) {\n let string = \"\";\n let first = true;\n pathSegArray.forEach(function (pathSeg) {\n if (first) {\n first = false;\n string += pathSeg._asPathString();\n } else {\n string += ` ${pathSeg._asPathString()}`;\n }\n });\n return string;\n };\n window.SVGPathSegList.prototype._parsePath = function (string) {\n if (!string || !string.length) return [];\n const owningPathSegList = this;\n const Builder = function () {\n this.pathSegList = [];\n };\n Builder.prototype.appendSegment = function (pathSeg) {\n this.pathSegList.push(pathSeg);\n };\n const Source = function (string) {\n this._string = string;\n this._currentIndex = 0;\n this._endIndex = this._string.length;\n this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN;\n this._skipOptionalSpaces();\n };\n Source.prototype._isCurrentSpace = function () {\n const character = this._string[this._currentIndex];\n return character <= \" \" && (character == \" \" || character == \"\\n\" || character == \"\\t\" || character == \"\\r\" || character == \"\\f\");\n };\n Source.prototype._skipOptionalSpaces = function () {\n while (this._currentIndex < this._endIndex && this._isCurrentSpace()) this._currentIndex++;\n return this._currentIndex < this._endIndex;\n };\n Source.prototype._skipOptionalSpacesOrDelimiter = function () {\n if (this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != \",\") return false;\n if (this._skipOptionalSpaces()) {\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \",\") {\n this._currentIndex++;\n this._skipOptionalSpaces();\n }\n }\n return this._currentIndex < this._endIndex;\n };\n Source.prototype.hasMoreData = function () {\n return this._currentIndex < this._endIndex;\n };\n Source.prototype.peekSegmentType = function () {\n const lookahead = this._string[this._currentIndex];\n return this._pathSegTypeFromChar(lookahead);\n };\n Source.prototype._pathSegTypeFromChar = function (lookahead) {\n switch (lookahead) {\n case \"Z\":\n case \"z\":\n return window.SVGPathSeg.PATHSEG_CLOSEPATH;\n case \"M\":\n return window.SVGPathSeg.PATHSEG_MOVETO_ABS;\n case \"m\":\n return window.SVGPathSeg.PATHSEG_MOVETO_REL;\n case \"L\":\n return window.SVGPathSeg.PATHSEG_LINETO_ABS;\n case \"l\":\n return window.SVGPathSeg.PATHSEG_LINETO_REL;\n case \"C\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;\n case \"c\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;\n case \"Q\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;\n case \"q\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;\n case \"A\":\n return window.SVGPathSeg.PATHSEG_ARC_ABS;\n case \"a\":\n return window.SVGPathSeg.PATHSEG_ARC_REL;\n case \"H\":\n return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;\n case \"h\":\n return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;\n case \"V\":\n return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;\n case \"v\":\n return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;\n case \"S\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\n case \"s\":\n return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\n case \"T\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\n case \"t\":\n return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\n default:\n return window.SVGPathSeg.PATHSEG_UNKNOWN;\n }\n };\n Source.prototype._nextCommandHelper = function (lookahead, previousCommand) {\n if ((lookahead == \"+\" || lookahead == \"-\" || lookahead == \".\" || lookahead >= \"0\" && lookahead <= \"9\") && previousCommand != window.SVGPathSeg.PATHSEG_CLOSEPATH) {\n if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_ABS) return window.SVGPathSeg.PATHSEG_LINETO_ABS;\n if (previousCommand == window.SVGPathSeg.PATHSEG_MOVETO_REL) return window.SVGPathSeg.PATHSEG_LINETO_REL;\n return previousCommand;\n }\n return window.SVGPathSeg.PATHSEG_UNKNOWN;\n };\n Source.prototype.initialCommandIsMoveTo = function () {\n if (!this.hasMoreData()) return true;\n const command = this.peekSegmentType();\n return command == window.SVGPathSeg.PATHSEG_MOVETO_ABS || command == window.SVGPathSeg.PATHSEG_MOVETO_REL;\n };\n Source.prototype._parseNumber = function () {\n let exponent = 0;\n let integer = 0;\n let frac = 1;\n let decimal = 0;\n let sign = 1;\n let expsign = 1;\n const startIndex = this._currentIndex;\n this._skipOptionalSpaces();\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"+\") this._currentIndex++;else if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \"-\") {\n this._currentIndex++;\n sign = -1;\n }\n if (this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") && this._string.charAt(this._currentIndex) != \".\") return undefined;\n const startIntPartIndex = this._currentIndex;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") this._currentIndex++;\n if (this._currentIndex != startIntPartIndex) {\n let scanIntPartIndex = this._currentIndex - 1;\n let multiplier = 1;\n while (scanIntPartIndex >= startIntPartIndex) {\n integer += multiplier * (this._string.charAt(scanIntPartIndex--) - \"0\");\n multiplier *= 10;\n }\n }\n if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == \".\") {\n this._currentIndex++;\n if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") return undefined;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n frac *= 10;\n decimal += (this._string.charAt(this._currentIndex) - \"0\") / frac;\n this._currentIndex += 1;\n }\n }\n if (this._currentIndex != startIndex && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == \"e\" || this._string.charAt(this._currentIndex) == \"E\") && this._string.charAt(this._currentIndex + 1) != \"x\" && this._string.charAt(this._currentIndex + 1) != \"m\") {\n this._currentIndex++;\n if (this._string.charAt(this._currentIndex) == \"+\") {\n this._currentIndex++;\n } else if (this._string.charAt(this._currentIndex) == \"-\") {\n this._currentIndex++;\n expsign = -1;\n }\n if (this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < \"0\" || this._string.charAt(this._currentIndex) > \"9\") return undefined;\n while (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= \"0\" && this._string.charAt(this._currentIndex) <= \"9\") {\n exponent *= 10;\n exponent += this._string.charAt(this._currentIndex) - \"0\";\n this._currentIndex++;\n }\n }\n let number = integer + decimal;\n number *= sign;\n if (exponent) number *= Math.pow(10, expsign * exponent);\n if (startIndex == this._currentIndex) return undefined;\n this._skipOptionalSpacesOrDelimiter();\n return number;\n };\n Source.prototype._parseArcFlag = function () {\n if (this._currentIndex >= this._endIndex) return undefined;\n let flag = false;\n const flagChar = this._string.charAt(this._currentIndex++);\n if (flagChar == \"0\") flag = false;else if (flagChar == \"1\") flag = true;else return undefined;\n this._skipOptionalSpacesOrDelimiter();\n return flag;\n };\n Source.prototype.parseSegment = function () {\n const lookahead = this._string[this._currentIndex];\n let command = this._pathSegTypeFromChar(lookahead);\n if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) {\n if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;\n command = this._nextCommandHelper(lookahead, this._previousCommand);\n if (command == window.SVGPathSeg.PATHSEG_UNKNOWN) return null;\n } else {\n this._currentIndex++;\n }\n this._previousCommand = command;\n let points;\n switch (command) {\n case window.SVGPathSeg.PATHSEG_MOVETO_REL:\n return new window.SVGPathSegMovetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_MOVETO_ABS:\n return new window.SVGPathSegMovetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_REL:\n return new window.SVGPathSegLinetoRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_ABS:\n return new window.SVGPathSegLinetoAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:\n return new window.SVGPathSegLinetoHorizontalRel(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:\n return new window.SVGPathSegLinetoHorizontalAbs(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:\n return new window.SVGPathSegLinetoVerticalRel(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:\n return new window.SVGPathSegLinetoVerticalAbs(owningPathSegList, this._parseNumber());\n case window.SVGPathSeg.PATHSEG_CLOSEPATH:\n this._skipOptionalSpaces();\n return new window.SVGPathSegClosePath(owningPathSegList);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:\n points = {\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicSmoothRel(owningPathSegList, points.x, points.y, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:\n points = {\n x2: this._parseNumber(),\n y2: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoCubicSmoothAbs(owningPathSegList, points.x, points.y, points.x2, points.y2);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoQuadraticRel(owningPathSegList, points.x, points.y, points.x1, points.y1);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegCurvetoQuadraticAbs(owningPathSegList, points.x, points.y, points.x1, points.y1);\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:\n return new window.SVGPathSegCurvetoQuadraticSmoothRel(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:\n return new window.SVGPathSegCurvetoQuadraticSmoothAbs(owningPathSegList, this._parseNumber(), this._parseNumber());\n case window.SVGPathSeg.PATHSEG_ARC_REL:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n arcAngle: this._parseNumber(),\n arcLarge: this._parseArcFlag(),\n arcSweep: this._parseArcFlag(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegArcRel(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n case window.SVGPathSeg.PATHSEG_ARC_ABS:\n points = {\n x1: this._parseNumber(),\n y1: this._parseNumber(),\n arcAngle: this._parseNumber(),\n arcLarge: this._parseArcFlag(),\n arcSweep: this._parseArcFlag(),\n x: this._parseNumber(),\n y: this._parseNumber()\n };\n return new window.SVGPathSegArcAbs(owningPathSegList, points.x, points.y, points.x1, points.y1, points.arcAngle, points.arcLarge, points.arcSweep);\n default:\n throw \"Unknown path seg type.\";\n }\n };\n const builder = new Builder();\n const source = new Source(string);\n if (!source.initialCommandIsMoveTo()) return [];\n while (source.hasMoreData()) {\n const pathSeg = source.parseSegment();\n if (!pathSeg) return [];\n builder.appendSegment(pathSeg);\n }\n return builder.pathSegList;\n };\n }\n } catch (e) {\n console.warn(\"An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles\", e);\n }\n})();\n\n//# sourceURL=webpack://@tsparticles/plugin-polygon-mask/./dist/browser/pathseg.js?");
|
|
1458
48
|
|
|
1459
49
|
/***/ }),
|
|
1460
50
|
|
|
1461
|
-
/***/
|
|
51
|
+
/***/ "@tsparticles/engine":
|
|
52
|
+
/*!*********************************************************************************************************************************!*\
|
|
53
|
+
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
54
|
+
\*********************************************************************************************************************************/
|
|
1462
55
|
/***/ ((module) => {
|
|
1463
56
|
|
|
1464
|
-
module.exports =
|
|
57
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
1465
58
|
|
|
1466
59
|
/***/ })
|
|
1467
60
|
|
|
@@ -1491,7 +84,22 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
|
|
|
1491
84
|
/******/ return module.exports;
|
|
1492
85
|
/******/ }
|
|
1493
86
|
/******/
|
|
87
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
88
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
89
|
+
/******/
|
|
1494
90
|
/************************************************************************/
|
|
91
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
92
|
+
/******/ (() => {
|
|
93
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
94
|
+
/******/ __webpack_require__.n = (module) => {
|
|
95
|
+
/******/ var getter = module && module.__esModule ?
|
|
96
|
+
/******/ () => (module['default']) :
|
|
97
|
+
/******/ () => (module);
|
|
98
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
99
|
+
/******/ return getter;
|
|
100
|
+
/******/ };
|
|
101
|
+
/******/ })();
|
|
102
|
+
/******/
|
|
1495
103
|
/******/ /* webpack/runtime/define property getters */
|
|
1496
104
|
/******/ (() => {
|
|
1497
105
|
/******/ // define getter functions for harmony exports
|
|
@@ -1504,11 +112,91 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
|
|
|
1504
112
|
/******/ };
|
|
1505
113
|
/******/ })();
|
|
1506
114
|
/******/
|
|
115
|
+
/******/ /* webpack/runtime/ensure chunk */
|
|
116
|
+
/******/ (() => {
|
|
117
|
+
/******/ __webpack_require__.f = {};
|
|
118
|
+
/******/ // This file contains only the entry chunk.
|
|
119
|
+
/******/ // The chunk loading function for additional chunks
|
|
120
|
+
/******/ __webpack_require__.e = (chunkId) => {
|
|
121
|
+
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
122
|
+
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
123
|
+
/******/ return promises;
|
|
124
|
+
/******/ }, []));
|
|
125
|
+
/******/ };
|
|
126
|
+
/******/ })();
|
|
127
|
+
/******/
|
|
128
|
+
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
129
|
+
/******/ (() => {
|
|
130
|
+
/******/ // This function allow to reference async chunks
|
|
131
|
+
/******/ __webpack_require__.u = (chunkId) => {
|
|
132
|
+
/******/ // return url for filenames based on template
|
|
133
|
+
/******/ return "" + chunkId + ".js";
|
|
134
|
+
/******/ };
|
|
135
|
+
/******/ })();
|
|
136
|
+
/******/
|
|
137
|
+
/******/ /* webpack/runtime/global */
|
|
138
|
+
/******/ (() => {
|
|
139
|
+
/******/ __webpack_require__.g = (function() {
|
|
140
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
141
|
+
/******/ try {
|
|
142
|
+
/******/ return this || new Function('return this')();
|
|
143
|
+
/******/ } catch (e) {
|
|
144
|
+
/******/ if (typeof window === 'object') return window;
|
|
145
|
+
/******/ }
|
|
146
|
+
/******/ })();
|
|
147
|
+
/******/ })();
|
|
148
|
+
/******/
|
|
1507
149
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1508
150
|
/******/ (() => {
|
|
1509
151
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1510
152
|
/******/ })();
|
|
1511
153
|
/******/
|
|
154
|
+
/******/ /* webpack/runtime/load script */
|
|
155
|
+
/******/ (() => {
|
|
156
|
+
/******/ var inProgress = {};
|
|
157
|
+
/******/ var dataWebpackPrefix = "@tsparticles/plugin-polygon-mask:";
|
|
158
|
+
/******/ // loadScript function to load a script via script tag
|
|
159
|
+
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
160
|
+
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
161
|
+
/******/ var script, needAttach;
|
|
162
|
+
/******/ if(key !== undefined) {
|
|
163
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
164
|
+
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
165
|
+
/******/ var s = scripts[i];
|
|
166
|
+
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
167
|
+
/******/ }
|
|
168
|
+
/******/ }
|
|
169
|
+
/******/ if(!script) {
|
|
170
|
+
/******/ needAttach = true;
|
|
171
|
+
/******/ script = document.createElement('script');
|
|
172
|
+
/******/
|
|
173
|
+
/******/ script.charset = 'utf-8';
|
|
174
|
+
/******/ script.timeout = 120;
|
|
175
|
+
/******/ if (__webpack_require__.nc) {
|
|
176
|
+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
177
|
+
/******/ }
|
|
178
|
+
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
179
|
+
/******/
|
|
180
|
+
/******/ script.src = url;
|
|
181
|
+
/******/ }
|
|
182
|
+
/******/ inProgress[url] = [done];
|
|
183
|
+
/******/ var onScriptComplete = (prev, event) => {
|
|
184
|
+
/******/ // avoid mem leaks in IE.
|
|
185
|
+
/******/ script.onerror = script.onload = null;
|
|
186
|
+
/******/ clearTimeout(timeout);
|
|
187
|
+
/******/ var doneFns = inProgress[url];
|
|
188
|
+
/******/ delete inProgress[url];
|
|
189
|
+
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
190
|
+
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
191
|
+
/******/ if(prev) return prev(event);
|
|
192
|
+
/******/ }
|
|
193
|
+
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
194
|
+
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
195
|
+
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
196
|
+
/******/ needAttach && document.head.appendChild(script);
|
|
197
|
+
/******/ };
|
|
198
|
+
/******/ })();
|
|
199
|
+
/******/
|
|
1512
200
|
/******/ /* webpack/runtime/make namespace object */
|
|
1513
201
|
/******/ (() => {
|
|
1514
202
|
/******/ // define __esModule on exports
|
|
@@ -1520,767 +208,128 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
|
|
|
1520
208
|
/******/ };
|
|
1521
209
|
/******/ })();
|
|
1522
210
|
/******/
|
|
211
|
+
/******/ /* webpack/runtime/publicPath */
|
|
212
|
+
/******/ (() => {
|
|
213
|
+
/******/ var scriptUrl;
|
|
214
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
215
|
+
/******/ var document = __webpack_require__.g.document;
|
|
216
|
+
/******/ if (!scriptUrl && document) {
|
|
217
|
+
/******/ if (document.currentScript)
|
|
218
|
+
/******/ scriptUrl = document.currentScript.src;
|
|
219
|
+
/******/ if (!scriptUrl) {
|
|
220
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
221
|
+
/******/ if(scripts.length) {
|
|
222
|
+
/******/ var i = scripts.length - 1;
|
|
223
|
+
/******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;
|
|
224
|
+
/******/ }
|
|
225
|
+
/******/ }
|
|
226
|
+
/******/ }
|
|
227
|
+
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
228
|
+
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
229
|
+
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
230
|
+
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
231
|
+
/******/ __webpack_require__.p = scriptUrl;
|
|
232
|
+
/******/ })();
|
|
233
|
+
/******/
|
|
234
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
235
|
+
/******/ (() => {
|
|
236
|
+
/******/ // no baseURI
|
|
237
|
+
/******/
|
|
238
|
+
/******/ // object to store loaded and loading chunks
|
|
239
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
240
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
241
|
+
/******/ var installedChunks = {
|
|
242
|
+
/******/ "tsparticles.plugin.polygon-mask": 0
|
|
243
|
+
/******/ };
|
|
244
|
+
/******/
|
|
245
|
+
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
246
|
+
/******/ // JSONP chunk loading for javascript
|
|
247
|
+
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
248
|
+
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
249
|
+
/******/
|
|
250
|
+
/******/ // a Promise means "currently loading".
|
|
251
|
+
/******/ if(installedChunkData) {
|
|
252
|
+
/******/ promises.push(installedChunkData[2]);
|
|
253
|
+
/******/ } else {
|
|
254
|
+
/******/ if(true) { // all chunks have JS
|
|
255
|
+
/******/ // setup Promise in chunk cache
|
|
256
|
+
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
257
|
+
/******/ promises.push(installedChunkData[2] = promise);
|
|
258
|
+
/******/
|
|
259
|
+
/******/ // start chunk loading
|
|
260
|
+
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
261
|
+
/******/ // create error before stack unwound to get useful stacktrace later
|
|
262
|
+
/******/ var error = new Error();
|
|
263
|
+
/******/ var loadingEnded = (event) => {
|
|
264
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
265
|
+
/******/ installedChunkData = installedChunks[chunkId];
|
|
266
|
+
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
267
|
+
/******/ if(installedChunkData) {
|
|
268
|
+
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
269
|
+
/******/ var realSrc = event && event.target && event.target.src;
|
|
270
|
+
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
271
|
+
/******/ error.name = 'ChunkLoadError';
|
|
272
|
+
/******/ error.type = errorType;
|
|
273
|
+
/******/ error.request = realSrc;
|
|
274
|
+
/******/ installedChunkData[1](error);
|
|
275
|
+
/******/ }
|
|
276
|
+
/******/ }
|
|
277
|
+
/******/ };
|
|
278
|
+
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
279
|
+
/******/ }
|
|
280
|
+
/******/ }
|
|
281
|
+
/******/ }
|
|
282
|
+
/******/ };
|
|
283
|
+
/******/
|
|
284
|
+
/******/ // no prefetching
|
|
285
|
+
/******/
|
|
286
|
+
/******/ // no preloaded
|
|
287
|
+
/******/
|
|
288
|
+
/******/ // no HMR
|
|
289
|
+
/******/
|
|
290
|
+
/******/ // no HMR manifest
|
|
291
|
+
/******/
|
|
292
|
+
/******/ // no on chunks loaded
|
|
293
|
+
/******/
|
|
294
|
+
/******/ // install a JSONP callback for chunk loading
|
|
295
|
+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
296
|
+
/******/ var chunkIds = data[0];
|
|
297
|
+
/******/ var moreModules = data[1];
|
|
298
|
+
/******/ var runtime = data[2];
|
|
299
|
+
/******/ // add "moreModules" to the modules object,
|
|
300
|
+
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
301
|
+
/******/ var moduleId, chunkId, i = 0;
|
|
302
|
+
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
303
|
+
/******/ for(moduleId in moreModules) {
|
|
304
|
+
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
305
|
+
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
306
|
+
/******/ }
|
|
307
|
+
/******/ }
|
|
308
|
+
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
309
|
+
/******/ }
|
|
310
|
+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
311
|
+
/******/ for(;i < chunkIds.length; i++) {
|
|
312
|
+
/******/ chunkId = chunkIds[i];
|
|
313
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
314
|
+
/******/ installedChunks[chunkId][0]();
|
|
315
|
+
/******/ }
|
|
316
|
+
/******/ installedChunks[chunkId] = 0;
|
|
317
|
+
/******/ }
|
|
318
|
+
/******/
|
|
319
|
+
/******/ }
|
|
320
|
+
/******/
|
|
321
|
+
/******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_plugin_polygon_mask"] = this["webpackChunk_tsparticles_plugin_polygon_mask"] || [];
|
|
322
|
+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
323
|
+
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
324
|
+
/******/ })();
|
|
325
|
+
/******/
|
|
1523
326
|
/************************************************************************/
|
|
1524
|
-
|
|
1525
|
-
//
|
|
1526
|
-
|
|
1527
|
-
//
|
|
1528
|
-
__webpack_require__.
|
|
1529
|
-
|
|
1530
|
-
// EXPORTS
|
|
1531
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1532
|
-
loadPolygonMaskPlugin: () => (/* binding */ loadPolygonMaskPlugin)
|
|
1533
|
-
});
|
|
1534
|
-
|
|
1535
|
-
// EXTERNAL MODULE: ./dist/browser/pathseg.js
|
|
1536
|
-
var pathseg = __webpack_require__(331);
|
|
1537
|
-
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
|
|
1538
|
-
var engine_root_window_ = __webpack_require__(533);
|
|
1539
|
-
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/PolygonMaskDrawStroke.js
|
|
1540
|
-
|
|
1541
|
-
class PolygonMaskDrawStroke {
|
|
1542
|
-
constructor() {
|
|
1543
|
-
this.color = new engine_root_window_.OptionsColor();
|
|
1544
|
-
this.width = 0.5;
|
|
1545
|
-
this.opacity = 1;
|
|
1546
|
-
}
|
|
1547
|
-
load(data) {
|
|
1548
|
-
if (!data) {
|
|
1549
|
-
return;
|
|
1550
|
-
}
|
|
1551
|
-
this.color = engine_root_window_.OptionsColor.create(this.color, data.color);
|
|
1552
|
-
if ((0,engine_root_window_.isString)(this.color.value)) {
|
|
1553
|
-
this.opacity = (0,engine_root_window_.stringToAlpha)(this.color.value) ?? this.opacity;
|
|
1554
|
-
}
|
|
1555
|
-
if (data.opacity !== undefined) {
|
|
1556
|
-
this.opacity = data.opacity;
|
|
1557
|
-
}
|
|
1558
|
-
if (data.width !== undefined) {
|
|
1559
|
-
this.width = data.width;
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/PolygonMaskDraw.js
|
|
1564
|
-
|
|
1565
|
-
class PolygonMaskDraw {
|
|
1566
|
-
constructor() {
|
|
1567
|
-
this.enable = false;
|
|
1568
|
-
this.stroke = new PolygonMaskDrawStroke();
|
|
1569
|
-
}
|
|
1570
|
-
load(data) {
|
|
1571
|
-
if (!data) {
|
|
1572
|
-
return;
|
|
1573
|
-
}
|
|
1574
|
-
if (data.enable !== undefined) {
|
|
1575
|
-
this.enable = data.enable;
|
|
1576
|
-
}
|
|
1577
|
-
const stroke = data.stroke;
|
|
1578
|
-
this.stroke.load(stroke);
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/PolygonMaskInline.js
|
|
1582
|
-
class PolygonMaskInline {
|
|
1583
|
-
constructor() {
|
|
1584
|
-
this.arrangement = "one-per-point";
|
|
1585
|
-
}
|
|
1586
|
-
load(data) {
|
|
1587
|
-
if (!data) {
|
|
1588
|
-
return;
|
|
1589
|
-
}
|
|
1590
|
-
if (data.arrangement !== undefined) {
|
|
1591
|
-
this.arrangement = data.arrangement;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/PolygonMaskLocalSvg.js
|
|
1596
|
-
class PolygonMaskLocalSvg {
|
|
1597
|
-
constructor() {
|
|
1598
|
-
this.path = [];
|
|
1599
|
-
this.size = {
|
|
1600
|
-
height: 0,
|
|
1601
|
-
width: 0
|
|
1602
|
-
};
|
|
1603
|
-
}
|
|
1604
|
-
load(data) {
|
|
1605
|
-
if (!data) {
|
|
1606
|
-
return;
|
|
1607
|
-
}
|
|
1608
|
-
if (data.path !== undefined) {
|
|
1609
|
-
this.path = data.path;
|
|
1610
|
-
}
|
|
1611
|
-
if (data.size !== undefined) {
|
|
1612
|
-
if (data.size.width !== undefined) {
|
|
1613
|
-
this.size.width = data.size.width;
|
|
1614
|
-
}
|
|
1615
|
-
if (data.size.height !== undefined) {
|
|
1616
|
-
this.size.height = data.size.height;
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/PolygonMaskMove.js
|
|
1622
|
-
class PolygonMaskMove {
|
|
1623
|
-
constructor() {
|
|
1624
|
-
this.radius = 10;
|
|
1625
|
-
this.type = "path";
|
|
1626
|
-
}
|
|
1627
|
-
load(data) {
|
|
1628
|
-
if (!data) {
|
|
1629
|
-
return;
|
|
1630
|
-
}
|
|
1631
|
-
if (data.radius !== undefined) {
|
|
1632
|
-
this.radius = data.radius;
|
|
1633
|
-
}
|
|
1634
|
-
if (data.type !== undefined) {
|
|
1635
|
-
this.type = data.type;
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/PolygonMask.js
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
class PolygonMask {
|
|
1646
|
-
constructor() {
|
|
1647
|
-
this.draw = new PolygonMaskDraw();
|
|
1648
|
-
this.enable = false;
|
|
1649
|
-
this.inline = new PolygonMaskInline();
|
|
1650
|
-
this.move = new PolygonMaskMove();
|
|
1651
|
-
this.scale = 1;
|
|
1652
|
-
this.type = "none";
|
|
1653
|
-
}
|
|
1654
|
-
load(data) {
|
|
1655
|
-
if (!data) {
|
|
1656
|
-
return;
|
|
1657
|
-
}
|
|
1658
|
-
this.draw.load(data.draw);
|
|
1659
|
-
this.inline.load(data.inline);
|
|
1660
|
-
this.move.load(data.move);
|
|
1661
|
-
if (data.scale !== undefined) {
|
|
1662
|
-
this.scale = data.scale;
|
|
1663
|
-
}
|
|
1664
|
-
if (data.type !== undefined) {
|
|
1665
|
-
this.type = data.type;
|
|
1666
|
-
}
|
|
1667
|
-
if (data.enable !== undefined) {
|
|
1668
|
-
this.enable = data.enable;
|
|
1669
|
-
} else {
|
|
1670
|
-
this.enable = this.type !== "none";
|
|
1671
|
-
}
|
|
1672
|
-
if (data.url !== undefined) {
|
|
1673
|
-
this.url = data.url;
|
|
1674
|
-
}
|
|
1675
|
-
if (data.data !== undefined) {
|
|
1676
|
-
if ((0,engine_root_window_.isString)(data.data)) {
|
|
1677
|
-
this.data = data.data;
|
|
1678
|
-
} else {
|
|
1679
|
-
this.data = new PolygonMaskLocalSvg();
|
|
1680
|
-
this.data.load(data.data);
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
if (data.position !== undefined) {
|
|
1684
|
-
this.position = (0,engine_root_window_.deepExtend)({}, data.position);
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
;// CONCATENATED MODULE: ./dist/browser/utils.js
|
|
1689
|
-
|
|
1690
|
-
const squareExp = 2,
|
|
1691
|
-
inSegmentRange = {
|
|
1692
|
-
min: 0,
|
|
1693
|
-
max: 1
|
|
1694
|
-
},
|
|
1695
|
-
utils_double = 2;
|
|
1696
|
-
function drawPolygonMask(context, rawData, stroke) {
|
|
1697
|
-
const color = (0,engine_root_window_.rangeColorToRgb)(stroke.color);
|
|
1698
|
-
if (!color) {
|
|
1699
|
-
return;
|
|
1700
|
-
}
|
|
1701
|
-
const firstIndex = 0,
|
|
1702
|
-
firstItem = rawData[firstIndex];
|
|
1703
|
-
context.beginPath();
|
|
1704
|
-
context.moveTo(firstItem.x, firstItem.y);
|
|
1705
|
-
for (const item of rawData) {
|
|
1706
|
-
context.lineTo(item.x, item.y);
|
|
1707
|
-
}
|
|
1708
|
-
context.closePath();
|
|
1709
|
-
context.strokeStyle = (0,engine_root_window_.getStyleFromRgb)(color);
|
|
1710
|
-
context.lineWidth = stroke.width;
|
|
1711
|
-
context.stroke();
|
|
1712
|
-
}
|
|
1713
|
-
function drawPolygonMaskPath(context, path, stroke, position) {
|
|
1714
|
-
const defaultTransform = {
|
|
1715
|
-
a: 1,
|
|
1716
|
-
b: 0,
|
|
1717
|
-
c: 0,
|
|
1718
|
-
d: 1
|
|
1719
|
-
};
|
|
1720
|
-
context.setTransform(defaultTransform.a, defaultTransform.b, defaultTransform.c, defaultTransform.d, position.x, position.y);
|
|
1721
|
-
const color = (0,engine_root_window_.rangeColorToRgb)(stroke.color);
|
|
1722
|
-
if (!color) {
|
|
1723
|
-
return;
|
|
1724
|
-
}
|
|
1725
|
-
context.strokeStyle = (0,engine_root_window_.getStyleFromRgb)(color, stroke.opacity);
|
|
1726
|
-
context.lineWidth = stroke.width;
|
|
1727
|
-
context.stroke(path);
|
|
1728
|
-
context.resetTransform();
|
|
1729
|
-
}
|
|
1730
|
-
function parsePaths(paths, scale, offset) {
|
|
1731
|
-
const res = [],
|
|
1732
|
-
defaultCount = 0;
|
|
1733
|
-
for (const path of paths) {
|
|
1734
|
-
const segments = path.element.pathSegList,
|
|
1735
|
-
len = segments?.numberOfItems ?? defaultCount,
|
|
1736
|
-
p = {
|
|
1737
|
-
x: 0,
|
|
1738
|
-
y: 0
|
|
1739
|
-
};
|
|
1740
|
-
for (let i = 0; i < len; i++) {
|
|
1741
|
-
const segment = segments?.getItem(i),
|
|
1742
|
-
svgPathSeg = window.SVGPathSeg;
|
|
1743
|
-
switch (segment?.pathSegType) {
|
|
1744
|
-
case svgPathSeg.PATHSEG_MOVETO_ABS:
|
|
1745
|
-
case svgPathSeg.PATHSEG_LINETO_ABS:
|
|
1746
|
-
case svgPathSeg.PATHSEG_CURVETO_CUBIC_ABS:
|
|
1747
|
-
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:
|
|
1748
|
-
case svgPathSeg.PATHSEG_ARC_ABS:
|
|
1749
|
-
case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
|
1750
|
-
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
|
|
1751
|
-
{
|
|
1752
|
-
const absSeg = segment;
|
|
1753
|
-
p.x = absSeg.x;
|
|
1754
|
-
p.y = absSeg.y;
|
|
1755
|
-
break;
|
|
1756
|
-
}
|
|
1757
|
-
case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:
|
|
1758
|
-
p.x = segment.x;
|
|
1759
|
-
break;
|
|
1760
|
-
case svgPathSeg.PATHSEG_LINETO_VERTICAL_ABS:
|
|
1761
|
-
p.y = segment.y;
|
|
1762
|
-
break;
|
|
1763
|
-
case svgPathSeg.PATHSEG_LINETO_REL:
|
|
1764
|
-
case svgPathSeg.PATHSEG_MOVETO_REL:
|
|
1765
|
-
case svgPathSeg.PATHSEG_CURVETO_CUBIC_REL:
|
|
1766
|
-
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:
|
|
1767
|
-
case svgPathSeg.PATHSEG_ARC_REL:
|
|
1768
|
-
case svgPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
|
1769
|
-
case svgPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
|
|
1770
|
-
{
|
|
1771
|
-
const relSeg = segment;
|
|
1772
|
-
p.x += relSeg.x;
|
|
1773
|
-
p.y += relSeg.y;
|
|
1774
|
-
break;
|
|
1775
|
-
}
|
|
1776
|
-
case svgPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:
|
|
1777
|
-
p.x += segment.x;
|
|
1778
|
-
break;
|
|
1779
|
-
case svgPathSeg.PATHSEG_LINETO_VERTICAL_REL:
|
|
1780
|
-
p.y += segment.y;
|
|
1781
|
-
break;
|
|
1782
|
-
case svgPathSeg.PATHSEG_UNKNOWN:
|
|
1783
|
-
case svgPathSeg.PATHSEG_CLOSEPATH:
|
|
1784
|
-
continue;
|
|
1785
|
-
}
|
|
1786
|
-
res.push({
|
|
1787
|
-
x: p.x * scale + offset.x,
|
|
1788
|
-
y: p.y * scale + offset.y
|
|
1789
|
-
});
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
return res;
|
|
1793
|
-
}
|
|
1794
|
-
function calcClosestPtOnSegment(s1, s2, pos) {
|
|
1795
|
-
const {
|
|
1796
|
-
dx: dx1,
|
|
1797
|
-
dy: dy1
|
|
1798
|
-
} = (0,engine_root_window_.getDistances)(pos, s1),
|
|
1799
|
-
{
|
|
1800
|
-
dx: dx2,
|
|
1801
|
-
dy: dy2
|
|
1802
|
-
} = (0,engine_root_window_.getDistances)(s2, s1),
|
|
1803
|
-
t = (dx1 * dx2 + dy1 * dy2) / (dx2 ** squareExp + dy2 ** squareExp),
|
|
1804
|
-
res = {
|
|
1805
|
-
x: s1.x + dx2 * t,
|
|
1806
|
-
y: s1.y + dy2 * t,
|
|
1807
|
-
isOnSegment: t >= inSegmentRange.min && t <= inSegmentRange.max
|
|
1808
|
-
};
|
|
1809
|
-
if (t < inSegmentRange.min) {
|
|
1810
|
-
res.x = s1.x;
|
|
1811
|
-
res.y = s1.y;
|
|
1812
|
-
} else if (t > inSegmentRange.max) {
|
|
1813
|
-
res.x = s2.x;
|
|
1814
|
-
res.y = s2.y;
|
|
1815
|
-
}
|
|
1816
|
-
return res;
|
|
1817
|
-
}
|
|
1818
|
-
function segmentBounce(start, stop, velocity) {
|
|
1819
|
-
const {
|
|
1820
|
-
dx,
|
|
1821
|
-
dy
|
|
1822
|
-
} = (0,engine_root_window_.getDistances)(start, stop),
|
|
1823
|
-
wallAngle = Math.atan2(dy, dx),
|
|
1824
|
-
wallNormal = engine_root_window_.Vector.create(Math.sin(wallAngle), -Math.cos(wallAngle)),
|
|
1825
|
-
d = utils_double * (velocity.x * wallNormal.x + velocity.y * wallNormal.y);
|
|
1826
|
-
wallNormal.multTo(d);
|
|
1827
|
-
velocity.subFrom(wallNormal);
|
|
1828
|
-
}
|
|
1829
|
-
;// CONCATENATED MODULE: ./dist/browser/PolygonMaskInstance.js
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
const noPolygonDataLoaded = `${engine_root_window_.errorPrefix} No polygon data loaded.`,
|
|
1833
|
-
noPolygonFound = `${engine_root_window_.errorPrefix} No polygon found, you need to specify SVG url in config.`,
|
|
1834
|
-
origin = {
|
|
1835
|
-
x: 0,
|
|
1836
|
-
y: 0
|
|
1837
|
-
},
|
|
1838
|
-
half = 0.5,
|
|
1839
|
-
PolygonMaskInstance_double = 2;
|
|
1840
|
-
class PolygonMaskInstance {
|
|
1841
|
-
constructor(container, engine) {
|
|
1842
|
-
this._checkInsidePolygon = position => {
|
|
1843
|
-
const container = this._container,
|
|
1844
|
-
options = container.actualOptions.polygon;
|
|
1845
|
-
if (!options?.enable || options.type === "none" || options.type === "inline") {
|
|
1846
|
-
return true;
|
|
1847
|
-
}
|
|
1848
|
-
if (!this.raw) {
|
|
1849
|
-
throw new Error(noPolygonFound);
|
|
1850
|
-
}
|
|
1851
|
-
const canvasSize = container.canvas.size,
|
|
1852
|
-
x = position?.x ?? (0,engine_root_window_.getRandom)() * canvasSize.width,
|
|
1853
|
-
y = position?.y ?? (0,engine_root_window_.getRandom)() * canvasSize.height,
|
|
1854
|
-
indexOffset = 1;
|
|
1855
|
-
let inside = false;
|
|
1856
|
-
for (let i = 0, j = this.raw.length - indexOffset; i < this.raw.length; j = i++) {
|
|
1857
|
-
const pi = this.raw[i],
|
|
1858
|
-
pj = this.raw[j],
|
|
1859
|
-
intersect = pi.y > y !== pj.y > y && x < (pj.x - pi.x) * (y - pi.y) / (pj.y - pi.y) + pi.x;
|
|
1860
|
-
if (intersect) {
|
|
1861
|
-
inside = !inside;
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
if (options.type === "inside") {
|
|
1865
|
-
return inside;
|
|
1866
|
-
} else {
|
|
1867
|
-
return options.type === "outside" ? !inside : false;
|
|
1868
|
-
}
|
|
1869
|
-
};
|
|
1870
|
-
this._createPath2D = () => {
|
|
1871
|
-
const container = this._container,
|
|
1872
|
-
options = container.actualOptions.polygon;
|
|
1873
|
-
if (!options || !this.paths?.length) {
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
for (const path of this.paths) {
|
|
1877
|
-
const pathData = path.element?.getAttribute("d");
|
|
1878
|
-
if (pathData) {
|
|
1879
|
-
const path2d = new Path2D(pathData),
|
|
1880
|
-
matrix = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix(),
|
|
1881
|
-
finalPath = new Path2D(),
|
|
1882
|
-
transform = matrix.scale(this._scale);
|
|
1883
|
-
if (finalPath.addPath) {
|
|
1884
|
-
finalPath.addPath(path2d, transform);
|
|
1885
|
-
path.path2d = finalPath;
|
|
1886
|
-
} else {
|
|
1887
|
-
delete path.path2d;
|
|
1888
|
-
}
|
|
1889
|
-
} else {
|
|
1890
|
-
delete path.path2d;
|
|
1891
|
-
}
|
|
1892
|
-
if (path.path2d ?? !this.raw) {
|
|
1893
|
-
continue;
|
|
1894
|
-
}
|
|
1895
|
-
path.path2d = new Path2D();
|
|
1896
|
-
const firstIndex = 0,
|
|
1897
|
-
firstPoint = this.raw[firstIndex];
|
|
1898
|
-
path.path2d.moveTo(firstPoint.x, firstPoint.y);
|
|
1899
|
-
this.raw.forEach((pos, i) => {
|
|
1900
|
-
if (i > firstIndex) {
|
|
1901
|
-
path.path2d?.lineTo(pos.x, pos.y);
|
|
1902
|
-
}
|
|
1903
|
-
});
|
|
1904
|
-
path.path2d.closePath();
|
|
1905
|
-
}
|
|
1906
|
-
};
|
|
1907
|
-
this._downloadSvgPath = async (svgUrl, force) => {
|
|
1908
|
-
const options = this._container.actualOptions.polygon;
|
|
1909
|
-
if (!options) {
|
|
1910
|
-
return;
|
|
1911
|
-
}
|
|
1912
|
-
const url = svgUrl ?? options.url,
|
|
1913
|
-
forceDownload = force ?? false;
|
|
1914
|
-
if (!url || this.paths !== undefined && !forceDownload) {
|
|
1915
|
-
return this.raw;
|
|
1916
|
-
}
|
|
1917
|
-
const req = await fetch(url);
|
|
1918
|
-
if (!req.ok) {
|
|
1919
|
-
throw new Error(`${engine_root_window_.errorPrefix} occurred during polygon mask download`);
|
|
1920
|
-
}
|
|
1921
|
-
return this._parseSvgPath(await req.text(), force);
|
|
1922
|
-
};
|
|
1923
|
-
this._drawPoints = () => {
|
|
1924
|
-
if (!this.raw) {
|
|
1925
|
-
return;
|
|
1926
|
-
}
|
|
1927
|
-
for (const item of this.raw) {
|
|
1928
|
-
this._container.particles.addParticle({
|
|
1929
|
-
x: item.x,
|
|
1930
|
-
y: item.y
|
|
1931
|
-
});
|
|
1932
|
-
}
|
|
1933
|
-
};
|
|
1934
|
-
this._getEquidistantPointByIndex = index => {
|
|
1935
|
-
const container = this._container,
|
|
1936
|
-
options = container.actualOptions,
|
|
1937
|
-
polygonMaskOptions = options.polygon;
|
|
1938
|
-
if (!polygonMaskOptions) {
|
|
1939
|
-
return;
|
|
1940
|
-
}
|
|
1941
|
-
if (!this.raw?.length || !this.paths?.length) {
|
|
1942
|
-
throw new Error(noPolygonDataLoaded);
|
|
1943
|
-
}
|
|
1944
|
-
let offset = 0,
|
|
1945
|
-
point;
|
|
1946
|
-
const baseAccumulator = 0,
|
|
1947
|
-
totalLength = this.paths.reduce((tot, path) => tot + path.length, baseAccumulator),
|
|
1948
|
-
distance = totalLength / options.particles.number.value;
|
|
1949
|
-
for (const path of this.paths) {
|
|
1950
|
-
const pathDistance = distance * index - offset;
|
|
1951
|
-
if (pathDistance <= path.length) {
|
|
1952
|
-
point = path.element.getPointAtLength(pathDistance);
|
|
1953
|
-
break;
|
|
1954
|
-
} else {
|
|
1955
|
-
offset += path.length;
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
const scale = this._scale;
|
|
1959
|
-
return {
|
|
1960
|
-
x: (point?.x ?? origin.x) * scale + (this.offset?.x ?? origin.x),
|
|
1961
|
-
y: (point?.y ?? origin.y) * scale + (this.offset?.y ?? origin.y)
|
|
1962
|
-
};
|
|
1963
|
-
};
|
|
1964
|
-
this._getPointByIndex = index => {
|
|
1965
|
-
if (!this.raw?.length) {
|
|
1966
|
-
throw new Error(noPolygonDataLoaded);
|
|
1967
|
-
}
|
|
1968
|
-
const coords = this.raw[index % this.raw.length];
|
|
1969
|
-
return {
|
|
1970
|
-
x: coords.x,
|
|
1971
|
-
y: coords.y
|
|
1972
|
-
};
|
|
1973
|
-
};
|
|
1974
|
-
this._getRandomPoint = () => {
|
|
1975
|
-
if (!this.raw?.length) {
|
|
1976
|
-
throw new Error(noPolygonDataLoaded);
|
|
1977
|
-
}
|
|
1978
|
-
const coords = (0,engine_root_window_.itemFromArray)(this.raw);
|
|
1979
|
-
return {
|
|
1980
|
-
x: coords.x,
|
|
1981
|
-
y: coords.y
|
|
1982
|
-
};
|
|
1983
|
-
};
|
|
1984
|
-
this._getRandomPointByLength = () => {
|
|
1985
|
-
const container = this._container,
|
|
1986
|
-
options = container.actualOptions.polygon;
|
|
1987
|
-
if (!options) {
|
|
1988
|
-
return;
|
|
1989
|
-
}
|
|
1990
|
-
if (!this.raw?.length || !this.paths?.length) {
|
|
1991
|
-
throw new Error(noPolygonDataLoaded);
|
|
1992
|
-
}
|
|
1993
|
-
const path = (0,engine_root_window_.itemFromArray)(this.paths),
|
|
1994
|
-
offset = 1,
|
|
1995
|
-
distance = Math.floor((0,engine_root_window_.getRandom)() * path.length) + offset,
|
|
1996
|
-
point = path.element.getPointAtLength(distance),
|
|
1997
|
-
scale = this._scale;
|
|
1998
|
-
return {
|
|
1999
|
-
x: point.x * scale + (this.offset?.x ?? origin.x),
|
|
2000
|
-
y: point.y * scale + (this.offset?.y ?? origin.y)
|
|
2001
|
-
};
|
|
2002
|
-
};
|
|
2003
|
-
this._initRawData = async force => {
|
|
2004
|
-
const options = this._container.actualOptions.polygon;
|
|
2005
|
-
if (!options) {
|
|
2006
|
-
return;
|
|
2007
|
-
}
|
|
2008
|
-
if (options.url) {
|
|
2009
|
-
this.raw = await this._downloadSvgPath(options.url, force);
|
|
2010
|
-
} else if (options.data) {
|
|
2011
|
-
const data = options.data;
|
|
2012
|
-
let svg;
|
|
2013
|
-
if ((0,engine_root_window_.isString)(data)) {
|
|
2014
|
-
svg = data;
|
|
2015
|
-
} else {
|
|
2016
|
-
const getPath = p => `<path d="${p}" />`,
|
|
2017
|
-
path = (0,engine_root_window_.isArray)(data.path) ? data.path.map(getPath).join("") : getPath(data.path);
|
|
2018
|
-
const namespaces = 'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
2019
|
-
svg = `<svg ${namespaces} width="${data.size.width}" height="${data.size.height}">${path}</svg>`;
|
|
2020
|
-
}
|
|
2021
|
-
this.raw = this._parseSvgPath(svg, force);
|
|
2022
|
-
}
|
|
2023
|
-
this._createPath2D();
|
|
2024
|
-
this._engine.dispatchEvent("polygonMaskLoaded", {
|
|
2025
|
-
container: this._container
|
|
2026
|
-
});
|
|
2027
|
-
};
|
|
2028
|
-
this._parseSvgPath = (xml, force) => {
|
|
2029
|
-
const forceDownload = force ?? false;
|
|
2030
|
-
if (this.paths !== undefined && !forceDownload) {
|
|
2031
|
-
return this.raw;
|
|
2032
|
-
}
|
|
2033
|
-
const container = this._container,
|
|
2034
|
-
options = container.actualOptions.polygon;
|
|
2035
|
-
if (!options) {
|
|
2036
|
-
return;
|
|
2037
|
-
}
|
|
2038
|
-
const parser = new DOMParser(),
|
|
2039
|
-
doc = parser.parseFromString(xml, "image/svg+xml"),
|
|
2040
|
-
firstIndex = 0,
|
|
2041
|
-
svg = doc.getElementsByTagName("svg")[firstIndex];
|
|
2042
|
-
let svgPaths = svg.getElementsByTagName("path");
|
|
2043
|
-
if (!svgPaths.length) {
|
|
2044
|
-
svgPaths = doc.getElementsByTagName("path");
|
|
2045
|
-
}
|
|
2046
|
-
this.paths = [];
|
|
2047
|
-
for (let i = 0; i < svgPaths.length; i++) {
|
|
2048
|
-
const path = svgPaths.item(i);
|
|
2049
|
-
if (path) {
|
|
2050
|
-
this.paths.push({
|
|
2051
|
-
element: path,
|
|
2052
|
-
length: path.getTotalLength()
|
|
2053
|
-
});
|
|
2054
|
-
}
|
|
2055
|
-
}
|
|
2056
|
-
const scale = this._scale;
|
|
2057
|
-
this.dimension.width = parseFloat(svg.getAttribute("width") ?? "0") * scale;
|
|
2058
|
-
this.dimension.height = parseFloat(svg.getAttribute("height") ?? "0") * scale;
|
|
2059
|
-
const position = options.position ?? {
|
|
2060
|
-
x: 50,
|
|
2061
|
-
y: 50
|
|
2062
|
-
},
|
|
2063
|
-
canvasSize = container.canvas.size;
|
|
2064
|
-
this.offset = {
|
|
2065
|
-
x: canvasSize.width * position.x / engine_root_window_.percentDenominator - this.dimension.width * half,
|
|
2066
|
-
y: canvasSize.height * position.y / engine_root_window_.percentDenominator - this.dimension.height * half
|
|
2067
|
-
};
|
|
2068
|
-
return parsePaths(this.paths, scale, this.offset);
|
|
2069
|
-
};
|
|
2070
|
-
this._polygonBounce = (particle, _delta, direction) => {
|
|
2071
|
-
const options = this._container.actualOptions.polygon;
|
|
2072
|
-
if (!this.raw || !options?.enable || direction !== "top") {
|
|
2073
|
-
return false;
|
|
2074
|
-
}
|
|
2075
|
-
if (options.type === "inside" || options.type === "outside") {
|
|
2076
|
-
let closest, dx, dy;
|
|
2077
|
-
const pos = particle.getPosition(),
|
|
2078
|
-
radius = particle.getRadius(),
|
|
2079
|
-
offset = 1;
|
|
2080
|
-
for (let i = 0, j = this.raw.length - offset; i < this.raw.length; j = i++) {
|
|
2081
|
-
const pi = this.raw[i],
|
|
2082
|
-
pj = this.raw[j];
|
|
2083
|
-
closest = calcClosestPtOnSegment(pi, pj, pos);
|
|
2084
|
-
const dist = (0,engine_root_window_.getDistances)(pos, closest);
|
|
2085
|
-
[dx, dy] = [dist.dx, dist.dy];
|
|
2086
|
-
if (dist.distance < radius) {
|
|
2087
|
-
segmentBounce(pi, pj, particle.velocity);
|
|
2088
|
-
return true;
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
if (closest && dx !== undefined && dy !== undefined && !this._checkInsidePolygon(pos)) {
|
|
2092
|
-
const factor = {
|
|
2093
|
-
x: 1,
|
|
2094
|
-
y: 1
|
|
2095
|
-
},
|
|
2096
|
-
diameter = radius * PolygonMaskInstance_double,
|
|
2097
|
-
inverse = -1;
|
|
2098
|
-
if (pos.x >= closest.x) {
|
|
2099
|
-
factor.x = -1;
|
|
2100
|
-
}
|
|
2101
|
-
if (pos.y >= closest.y) {
|
|
2102
|
-
factor.y = -1;
|
|
2103
|
-
}
|
|
2104
|
-
particle.position.x = closest.x + diameter * factor.x;
|
|
2105
|
-
particle.position.y = closest.y + diameter * factor.y;
|
|
2106
|
-
particle.velocity.mult(inverse);
|
|
2107
|
-
return true;
|
|
2108
|
-
}
|
|
2109
|
-
} else if (options.type === "inline" && particle.initialPosition) {
|
|
2110
|
-
const dist = (0,engine_root_window_.getDistance)(particle.initialPosition, particle.getPosition()),
|
|
2111
|
-
{
|
|
2112
|
-
velocity
|
|
2113
|
-
} = particle;
|
|
2114
|
-
if (dist > this._moveRadius) {
|
|
2115
|
-
velocity.x = velocity.y * half - velocity.x;
|
|
2116
|
-
velocity.y = velocity.x * half - velocity.y;
|
|
2117
|
-
return true;
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
return false;
|
|
2121
|
-
};
|
|
2122
|
-
this._randomPoint = () => {
|
|
2123
|
-
const container = this._container,
|
|
2124
|
-
options = container.actualOptions.polygon;
|
|
2125
|
-
if (!options) {
|
|
2126
|
-
return;
|
|
2127
|
-
}
|
|
2128
|
-
let position;
|
|
2129
|
-
if (options.type === "inline") {
|
|
2130
|
-
switch (options.inline.arrangement) {
|
|
2131
|
-
case "random-point":
|
|
2132
|
-
position = this._getRandomPoint();
|
|
2133
|
-
break;
|
|
2134
|
-
case "random-length":
|
|
2135
|
-
position = this._getRandomPointByLength();
|
|
2136
|
-
break;
|
|
2137
|
-
case "equidistant":
|
|
2138
|
-
position = this._getEquidistantPointByIndex(container.particles.count);
|
|
2139
|
-
break;
|
|
2140
|
-
case "one-per-point":
|
|
2141
|
-
case "per-point":
|
|
2142
|
-
default:
|
|
2143
|
-
position = this._getPointByIndex(container.particles.count);
|
|
2144
|
-
}
|
|
2145
|
-
} else {
|
|
2146
|
-
const canvasSize = container.canvas.size;
|
|
2147
|
-
position = {
|
|
2148
|
-
x: (0,engine_root_window_.getRandom)() * canvasSize.width,
|
|
2149
|
-
y: (0,engine_root_window_.getRandom)() * canvasSize.height
|
|
2150
|
-
};
|
|
2151
|
-
}
|
|
2152
|
-
if (this._checkInsidePolygon(position)) {
|
|
2153
|
-
return position;
|
|
2154
|
-
} else {
|
|
2155
|
-
return this._randomPoint();
|
|
2156
|
-
}
|
|
2157
|
-
};
|
|
2158
|
-
this._container = container;
|
|
2159
|
-
this._engine = engine;
|
|
2160
|
-
this.dimension = {
|
|
2161
|
-
height: 0,
|
|
2162
|
-
width: 0
|
|
2163
|
-
};
|
|
2164
|
-
this._moveRadius = 0;
|
|
2165
|
-
this._scale = 1;
|
|
2166
|
-
}
|
|
2167
|
-
clickPositionValid(position) {
|
|
2168
|
-
const options = this._container.actualOptions.polygon;
|
|
2169
|
-
return !!options?.enable && options.type !== "none" && options.type !== "inline" && this._checkInsidePolygon(position);
|
|
2170
|
-
}
|
|
2171
|
-
draw(context) {
|
|
2172
|
-
if (!this.paths?.length) {
|
|
2173
|
-
return;
|
|
2174
|
-
}
|
|
2175
|
-
const options = this._container.actualOptions.polygon;
|
|
2176
|
-
if (!options?.enable) {
|
|
2177
|
-
return;
|
|
2178
|
-
}
|
|
2179
|
-
const polygonDraw = options.draw;
|
|
2180
|
-
if (!polygonDraw.enable) {
|
|
2181
|
-
return;
|
|
2182
|
-
}
|
|
2183
|
-
const rawData = this.raw;
|
|
2184
|
-
for (const path of this.paths) {
|
|
2185
|
-
const path2d = path.path2d;
|
|
2186
|
-
if (!context) {
|
|
2187
|
-
continue;
|
|
2188
|
-
}
|
|
2189
|
-
if (path2d && this.offset) {
|
|
2190
|
-
drawPolygonMaskPath(context, path2d, polygonDraw.stroke, this.offset);
|
|
2191
|
-
} else if (rawData) {
|
|
2192
|
-
drawPolygonMask(context, rawData, polygonDraw.stroke);
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
async init() {
|
|
2197
|
-
const container = this._container,
|
|
2198
|
-
polygonMaskOptions = container.actualOptions.polygon,
|
|
2199
|
-
pxRatio = container.retina.pixelRatio;
|
|
2200
|
-
if (!polygonMaskOptions) {
|
|
2201
|
-
return;
|
|
2202
|
-
}
|
|
2203
|
-
this._moveRadius = polygonMaskOptions.move.radius * pxRatio;
|
|
2204
|
-
this._scale = polygonMaskOptions.scale * pxRatio;
|
|
2205
|
-
if (polygonMaskOptions.enable) {
|
|
2206
|
-
await this._initRawData();
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
particleBounce(particle, delta, direction) {
|
|
2210
|
-
return this._polygonBounce(particle, delta, direction);
|
|
2211
|
-
}
|
|
2212
|
-
particlePosition(position) {
|
|
2213
|
-
const options = this._container.actualOptions.polygon,
|
|
2214
|
-
defaultLength = 0;
|
|
2215
|
-
if (!(options?.enable && (this.raw?.length ?? defaultLength) > defaultLength)) {
|
|
2216
|
-
return;
|
|
2217
|
-
}
|
|
2218
|
-
return (0,engine_root_window_.deepExtend)({}, position ? position : this._randomPoint());
|
|
2219
|
-
}
|
|
2220
|
-
particlesInitialization() {
|
|
2221
|
-
const options = this._container.actualOptions.polygon;
|
|
2222
|
-
if (options?.enable && options.type === "inline" && (options.inline.arrangement === "one-per-point" || options.inline.arrangement === "per-point")) {
|
|
2223
|
-
this._drawPoints();
|
|
2224
|
-
return true;
|
|
2225
|
-
}
|
|
2226
|
-
return false;
|
|
2227
|
-
}
|
|
2228
|
-
resize() {
|
|
2229
|
-
const container = this._container,
|
|
2230
|
-
options = container.actualOptions.polygon;
|
|
2231
|
-
if (!(options?.enable && options.type !== "none")) {
|
|
2232
|
-
return;
|
|
2233
|
-
}
|
|
2234
|
-
if (this.redrawTimeout) {
|
|
2235
|
-
clearTimeout(this.redrawTimeout);
|
|
2236
|
-
}
|
|
2237
|
-
const timeout = 250;
|
|
2238
|
-
this.redrawTimeout = window.setTimeout(() => {
|
|
2239
|
-
void (async () => {
|
|
2240
|
-
await this._initRawData(true);
|
|
2241
|
-
await container.particles.redraw();
|
|
2242
|
-
})();
|
|
2243
|
-
}, timeout);
|
|
2244
|
-
}
|
|
2245
|
-
stop() {
|
|
2246
|
-
delete this.raw;
|
|
2247
|
-
delete this.paths;
|
|
2248
|
-
}
|
|
2249
|
-
}
|
|
2250
|
-
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
class PolygonMaskPlugin {
|
|
2255
|
-
constructor(engine) {
|
|
2256
|
-
this.id = "polygonMask";
|
|
2257
|
-
this._engine = engine;
|
|
2258
|
-
}
|
|
2259
|
-
getPlugin(container) {
|
|
2260
|
-
return new PolygonMaskInstance(container, this._engine);
|
|
2261
|
-
}
|
|
2262
|
-
loadOptions(options, source) {
|
|
2263
|
-
if (!this.needsPlugin(options) && !this.needsPlugin(source)) {
|
|
2264
|
-
return;
|
|
2265
|
-
}
|
|
2266
|
-
let polygonOptions = options.polygon;
|
|
2267
|
-
if (polygonOptions?.load === undefined) {
|
|
2268
|
-
options.polygon = polygonOptions = new PolygonMask();
|
|
2269
|
-
}
|
|
2270
|
-
polygonOptions.load(source?.polygon);
|
|
2271
|
-
}
|
|
2272
|
-
needsPlugin(options) {
|
|
2273
|
-
return options?.polygon?.enable ?? (options?.polygon?.type !== undefined && options.polygon.type !== "none");
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
async function loadPolygonMaskPlugin(engine, refresh = true) {
|
|
2277
|
-
await engine.addPlugin(new PolygonMaskPlugin(engine), refresh);
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
})();
|
|
2283
|
-
|
|
327
|
+
/******/
|
|
328
|
+
/******/ // startup
|
|
329
|
+
/******/ // Load entry module and return exports
|
|
330
|
+
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
331
|
+
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
|
|
332
|
+
/******/
|
|
2284
333
|
/******/ return __webpack_exports__;
|
|
2285
334
|
/******/ })()
|
|
2286
335
|
;
|