tsparticles 2.0.0 → 2.0.3

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.
@@ -4,7 +4,7 @@
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
- * v2.0.0
7
+ * v2.0.3
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -326,7 +326,6 @@ __webpack_require__.d(__webpack_exports__, {
326
326
  "Connect": () => (/* reexport */ Connect),
327
327
  "ConnectLinks": () => (/* reexport */ ConnectLinks),
328
328
  "Container": () => (/* reexport */ Container),
329
- "DefaultOptions": () => (/* reexport */ DefaultOptions),
330
329
  "Destroy": () => (/* reexport */ Destroy),
331
330
  "DivEvent": () => (/* reexport */ DivEvent),
332
331
  "EventDispatcher": () => (/* reexport */ EventDispatcher),
@@ -365,6 +364,7 @@ __webpack_require__.d(__webpack_exports__, {
365
364
  "MoveAttract": () => (/* reexport */ MoveAttract),
366
365
  "MoveGravity": () => (/* reexport */ MoveGravity),
367
366
  "MovePath": () => (/* reexport */ MovePath),
367
+ "MovePathDelay": () => (/* reexport */ MovePathDelay),
368
368
  "MoveTrail": () => (/* reexport */ MoveTrail),
369
369
  "Opacity": () => (/* reexport */ Opacity),
370
370
  "OpacityAnimation": () => (/* reexport */ OpacityAnimation),
@@ -460,6 +460,7 @@ __webpack_require__.d(__webpack_exports__, {
460
460
  "getStyleFromHsl": () => (/* reexport */ getStyleFromHsl),
461
461
  "getStyleFromHsv": () => (/* reexport */ getStyleFromHsv),
462
462
  "getStyleFromRgb": () => (/* reexport */ getStyleFromRgb),
463
+ "getValue": () => (/* reexport */ getValue),
463
464
  "gradient": () => (/* reexport */ gradient),
464
465
  "hslToHsv": () => (/* reexport */ hslToHsv),
465
466
  "hslToRgb": () => (/* reexport */ hslToRgb),
@@ -508,28 +509,6 @@ __webpack_require__.d(__webpack_exports__, {
508
509
  "visibilityChangeEvent": () => (/* reexport */ visibilityChangeEvent)
509
510
  });
510
511
 
511
- ;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSizeLimit.js
512
- class AbsorberSizeLimit {
513
- constructor() {
514
- this.radius = 0;
515
- this.mass = 0;
516
- }
517
-
518
- load(data) {
519
- if (!data) {
520
- return;
521
- }
522
-
523
- if (data.mass !== undefined) {
524
- this.mass = data.mass;
525
- }
526
-
527
- if (data.radius !== undefined) {
528
- this.radius = data.radius;
529
- }
530
- }
531
-
532
- }
533
512
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Utils/NumberUtils.js
534
513
 
535
514
  function clamp(num, min, max) {
@@ -569,6 +548,17 @@ function setRangeValue(source, value) {
569
548
  max: Math.max(max, value)
570
549
  } : setRangeValue(min, max);
571
550
  }
551
+ function getValue(options) {
552
+ const random = options.random;
553
+ const {
554
+ enable,
555
+ minimumValue
556
+ } = typeof random === "boolean" ? {
557
+ enable: random,
558
+ minimumValue: 0
559
+ } : random;
560
+ return enable ? getRangeValue(setRangeValue(options.value, minimumValue)) : getRangeValue(options.value);
561
+ }
572
562
  function getDistances(pointA, pointB) {
573
563
  const dx = pointA.x - pointB.x;
574
564
  const dy = pointA.y - pointB.y;
@@ -682,7 +672,7 @@ class ColorAnimation {
682
672
  }
683
673
 
684
674
  if (data.count !== undefined) {
685
- this.count = data.count;
675
+ this.count = setRangeValue(data.count);
686
676
  }
687
677
 
688
678
  if (data.enable !== undefined) {
@@ -694,7 +684,7 @@ class ColorAnimation {
694
684
  }
695
685
 
696
686
  if (data.speed !== undefined) {
697
- this.speed = data.speed;
687
+ this.speed = setRangeValue(data.speed);
698
688
  }
699
689
 
700
690
  if (data.sync !== undefined) {
@@ -917,7 +907,7 @@ class GradientAngleAnimation {
917
907
  }
918
908
 
919
909
  if (data.count !== undefined) {
920
- this.count = data.count;
910
+ this.count = setRangeValue(data.count);
921
911
  }
922
912
 
923
913
  if (data.enable !== undefined) {
@@ -925,7 +915,7 @@ class GradientAngleAnimation {
925
915
  }
926
916
 
927
917
  if (data.speed !== undefined) {
928
- this.speed = data.speed;
918
+ this.speed = setRangeValue(data.speed);
929
919
  }
930
920
 
931
921
  if (data.sync !== undefined) {
@@ -949,7 +939,7 @@ class GradientColorOpacityAnimation {
949
939
  }
950
940
 
951
941
  if (data.count !== undefined) {
952
- this.count = data.count;
942
+ this.count = setRangeValue(data.count);
953
943
  }
954
944
 
955
945
  if (data.enable !== undefined) {
@@ -957,7 +947,7 @@ class GradientColorOpacityAnimation {
957
947
  }
958
948
 
959
949
  if (data.speed !== undefined) {
960
- this.speed = data.speed;
950
+ this.speed = setRangeValue(data.speed);
961
951
  }
962
952
 
963
953
  if (data.sync !== undefined) {
@@ -971,6 +961,7 @@ class GradientColorOpacityAnimation {
971
961
 
972
962
  }
973
963
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/AnimationOptions.js
964
+
974
965
  class AnimationOptions {
975
966
  constructor() {
976
967
  this.count = 0;
@@ -985,7 +976,7 @@ class AnimationOptions {
985
976
  }
986
977
 
987
978
  if (data.count !== undefined) {
988
- this.count = data.count;
979
+ this.count = setRangeValue(data.count);
989
980
  }
990
981
 
991
982
  if (data.enable !== undefined) {
@@ -993,7 +984,7 @@ class AnimationOptions {
993
984
  }
994
985
 
995
986
  if (data.speed !== undefined) {
996
- this.speed = data.speed;
987
+ this.speed = setRangeValue(data.speed);
997
988
  }
998
989
 
999
990
  if (data.sync !== undefined) {
@@ -1164,11 +1155,43 @@ class DivEvent {
1164
1155
  this.type = "circle";
1165
1156
  }
1166
1157
 
1158
+ get elementId() {
1159
+ return this.ids;
1160
+ }
1161
+
1162
+ set elementId(value) {
1163
+ this.ids = value;
1164
+ }
1165
+
1166
+ get el() {
1167
+ return this.elementId;
1168
+ }
1169
+
1170
+ set el(value) {
1171
+ this.elementId = value;
1172
+ }
1173
+
1174
+ get ids() {
1175
+ return this.selectors instanceof Array ? this.selectors.map(t => t.replace("#", "")) : this.selectors.replace("#", "");
1176
+ }
1177
+
1178
+ set ids(value) {
1179
+ this.selectors = value instanceof Array ? value.map(t => `#${t}`) : `#${value}`;
1180
+ }
1181
+
1167
1182
  load(data) {
1183
+ var _a, _b;
1184
+
1168
1185
  if (!data) {
1169
1186
  return;
1170
1187
  }
1171
1188
 
1189
+ const ids = (_b = (_a = data.ids) !== null && _a !== void 0 ? _a : data.elementId) !== null && _b !== void 0 ? _b : data.el;
1190
+
1191
+ if (ids !== undefined) {
1192
+ this.ids = ids;
1193
+ }
1194
+
1172
1195
  if (data.selectors !== undefined) {
1173
1196
  this.selectors = data.selectors;
1174
1197
  }
@@ -1252,26 +1275,54 @@ class Events {
1252
1275
  this.resize = true;
1253
1276
  }
1254
1277
 
1278
+ get onclick() {
1279
+ return this.onClick;
1280
+ }
1281
+
1282
+ set onclick(value) {
1283
+ this.onClick = value;
1284
+ }
1285
+
1286
+ get ondiv() {
1287
+ return this.onDiv;
1288
+ }
1289
+
1290
+ set ondiv(value) {
1291
+ this.onDiv = value;
1292
+ }
1293
+
1294
+ get onhover() {
1295
+ return this.onHover;
1296
+ }
1297
+
1298
+ set onhover(value) {
1299
+ this.onHover = value;
1300
+ }
1301
+
1255
1302
  load(data) {
1303
+ var _a, _b, _c;
1304
+
1256
1305
  if (!data) {
1257
1306
  return;
1258
1307
  }
1259
1308
 
1260
- this.onClick.load(data.onClick);
1261
- const onDiv = data.onDiv;
1309
+ this.onClick.load((_a = data.onClick) !== null && _a !== void 0 ? _a : data.onclick);
1310
+ const onDiv = (_b = data.onDiv) !== null && _b !== void 0 ? _b : data.ondiv;
1262
1311
 
1263
- if (onDiv instanceof Array) {
1264
- this.onDiv = onDiv.map(div => {
1265
- const tmp = new DivEvent();
1266
- tmp.load(div);
1267
- return tmp;
1268
- });
1269
- } else {
1270
- this.onDiv = new DivEvent();
1271
- this.onDiv.load(onDiv);
1312
+ if (onDiv !== undefined) {
1313
+ if (onDiv instanceof Array) {
1314
+ this.onDiv = onDiv.map(div => {
1315
+ const tmp = new DivEvent();
1316
+ tmp.load(div);
1317
+ return tmp;
1318
+ });
1319
+ } else {
1320
+ this.onDiv = new DivEvent();
1321
+ this.onDiv.load(onDiv);
1322
+ }
1272
1323
  }
1273
1324
 
1274
- this.onHover.load(data.onHover);
1325
+ this.onHover.load((_c = data.onHover) !== null && _c !== void 0 ? _c : data.onhover);
1275
1326
 
1276
1327
  if (data.resize !== undefined) {
1277
1328
  this.resize = data.resize;
@@ -1376,14 +1427,16 @@ class BubbleBase {
1376
1427
  this.opacity = data.opacity;
1377
1428
  }
1378
1429
 
1379
- if (data.color instanceof Array) {
1380
- this.color = data.color.map(s => OptionsColor.create(undefined, s));
1381
- } else {
1382
- if (this.color instanceof Array) {
1383
- this.color = new OptionsColor();
1384
- }
1430
+ if (data.color !== undefined) {
1431
+ if (data.color instanceof Array) {
1432
+ this.color = data.color.map(s => OptionsColor.create(undefined, s));
1433
+ } else {
1434
+ if (this.color instanceof Array) {
1435
+ this.color = new OptionsColor();
1436
+ }
1385
1437
 
1386
- this.color = OptionsColor.create(this.color, data.color);
1438
+ this.color = OptionsColor.create(this.color, data.color);
1439
+ }
1387
1440
  }
1388
1441
 
1389
1442
  if (data.size !== undefined) {
@@ -1400,6 +1453,14 @@ class BubbleDiv extends BubbleBase {
1400
1453
  this.selectors = [];
1401
1454
  }
1402
1455
 
1456
+ get ids() {
1457
+ return this.selectors instanceof Array ? this.selectors.map(t => t.replace("#", "")) : this.selectors.replace("#", "");
1458
+ }
1459
+
1460
+ set ids(value) {
1461
+ this.selectors = value instanceof Array ? value.map(t => `#${t}`) : `#${value}`;
1462
+ }
1463
+
1403
1464
  load(data) {
1404
1465
  super.load(data);
1405
1466
 
@@ -1407,6 +1468,10 @@ class BubbleDiv extends BubbleBase {
1407
1468
  return;
1408
1469
  }
1409
1470
 
1471
+ if (data.ids !== undefined) {
1472
+ this.ids = data.ids;
1473
+ }
1474
+
1410
1475
  if (data.selectors !== undefined) {
1411
1476
  this.selectors = data.selectors;
1412
1477
  }
@@ -1447,7 +1512,7 @@ class ConnectLinks {
1447
1512
  }
1448
1513
 
1449
1514
  load(data) {
1450
- if (!data) {
1515
+ if (!(data !== undefined && data.opacity !== undefined)) {
1451
1516
  return;
1452
1517
  }
1453
1518
 
@@ -1466,7 +1531,25 @@ class Connect {
1466
1531
  this.radius = 60;
1467
1532
  }
1468
1533
 
1534
+ get line_linked() {
1535
+ return this.links;
1536
+ }
1537
+
1538
+ set line_linked(value) {
1539
+ this.links = value;
1540
+ }
1541
+
1542
+ get lineLinked() {
1543
+ return this.links;
1544
+ }
1545
+
1546
+ set lineLinked(value) {
1547
+ this.links = value;
1548
+ }
1549
+
1469
1550
  load(data) {
1551
+ var _a, _b;
1552
+
1470
1553
  if (!data) {
1471
1554
  return;
1472
1555
  }
@@ -1475,7 +1558,7 @@ class Connect {
1475
1558
  this.distance = data.distance;
1476
1559
  }
1477
1560
 
1478
- this.links.load(data.links);
1561
+ this.links.load((_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked);
1479
1562
 
1480
1563
  if (data.radius !== undefined) {
1481
1564
  this.radius = data.radius;
@@ -1501,7 +1584,9 @@ class GrabLinks {
1501
1584
  this.blink = data.blink;
1502
1585
  }
1503
1586
 
1504
- this.color = OptionsColor.create(this.color, data.color);
1587
+ if (data.color !== undefined) {
1588
+ this.color = OptionsColor.create(this.color, data.color);
1589
+ }
1505
1590
 
1506
1591
  if (data.consent !== undefined) {
1507
1592
  this.consent = data.consent;
@@ -1521,7 +1606,25 @@ class Grab {
1521
1606
  this.links = new GrabLinks();
1522
1607
  }
1523
1608
 
1609
+ get line_linked() {
1610
+ return this.links;
1611
+ }
1612
+
1613
+ set line_linked(value) {
1614
+ this.links = value;
1615
+ }
1616
+
1617
+ get lineLinked() {
1618
+ return this.links;
1619
+ }
1620
+
1621
+ set lineLinked(value) {
1622
+ this.links = value;
1623
+ }
1624
+
1524
1625
  load(data) {
1626
+ var _a, _b;
1627
+
1525
1628
  if (!data) {
1526
1629
  return;
1527
1630
  }
@@ -1530,7 +1633,7 @@ class Grab {
1530
1633
  this.distance = data.distance;
1531
1634
  }
1532
1635
 
1533
- this.links.load(data.links);
1636
+ this.links.load((_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked);
1534
1637
  }
1535
1638
 
1536
1639
  }
@@ -1624,7 +1727,17 @@ class Push {
1624
1727
  this.quantity = 4;
1625
1728
  }
1626
1729
 
1730
+ get particles_nb() {
1731
+ return this.quantity;
1732
+ }
1733
+
1734
+ set particles_nb(value) {
1735
+ this.quantity = value;
1736
+ }
1737
+
1627
1738
  load(data) {
1739
+ var _a;
1740
+
1628
1741
  if (!data) {
1629
1742
  return;
1630
1743
  }
@@ -1641,8 +1754,10 @@ class Push {
1641
1754
  this.default = true;
1642
1755
  }
1643
1756
 
1644
- if (data.quantity !== undefined) {
1645
- this.quantity = data.quantity;
1757
+ const quantity = (_a = data.quantity) !== null && _a !== void 0 ? _a : data.particles_nb;
1758
+
1759
+ if (quantity !== undefined) {
1760
+ this.quantity = quantity;
1646
1761
  }
1647
1762
  }
1648
1763
 
@@ -1653,13 +1768,25 @@ class Remove {
1653
1768
  this.quantity = 2;
1654
1769
  }
1655
1770
 
1771
+ get particles_nb() {
1772
+ return this.quantity;
1773
+ }
1774
+
1775
+ set particles_nb(value) {
1776
+ this.quantity = value;
1777
+ }
1778
+
1656
1779
  load(data) {
1780
+ var _a;
1781
+
1657
1782
  if (!data) {
1658
1783
  return;
1659
1784
  }
1660
1785
 
1661
- if (data.quantity !== undefined) {
1662
- this.quantity = data.quantity;
1786
+ const quantity = (_a = data.quantity) !== null && _a !== void 0 ? _a : data.particles_nb;
1787
+
1788
+ if (quantity !== undefined) {
1789
+ this.quantity = quantity;
1663
1790
  }
1664
1791
  }
1665
1792
 
@@ -1714,6 +1841,22 @@ class RepulseDiv extends RepulseBase {
1714
1841
  this.selectors = [];
1715
1842
  }
1716
1843
 
1844
+ get ids() {
1845
+ if (this.selectors instanceof Array) {
1846
+ return this.selectors.map(t => t.replace("#", ""));
1847
+ } else {
1848
+ return this.selectors.replace("#", "");
1849
+ }
1850
+ }
1851
+
1852
+ set ids(value) {
1853
+ if (value instanceof Array) {
1854
+ this.selectors = value.map(() => `#${value}`);
1855
+ } else {
1856
+ this.selectors = `#${value}`;
1857
+ }
1858
+ }
1859
+
1717
1860
  load(data) {
1718
1861
  super.load(data);
1719
1862
 
@@ -1721,6 +1864,10 @@ class RepulseDiv extends RepulseBase {
1721
1864
  return;
1722
1865
  }
1723
1866
 
1867
+ if (data.ids !== undefined) {
1868
+ this.ids = data.ids;
1869
+ }
1870
+
1724
1871
  if (data.selectors !== undefined) {
1725
1872
  this.selectors = data.selectors;
1726
1873
  }
@@ -1761,6 +1908,12 @@ class Slow {
1761
1908
  this.radius = 200;
1762
1909
  }
1763
1910
 
1911
+ get active() {
1912
+ return false;
1913
+ }
1914
+
1915
+ set active(_value) {}
1916
+
1764
1917
  load(data) {
1765
1918
  if (!data) {
1766
1919
  return;
@@ -1885,17 +2038,39 @@ class Interactivity {
1885
2038
  this.modes = new Modes();
1886
2039
  }
1887
2040
 
2041
+ get detect_on() {
2042
+ return this.detectsOn;
2043
+ }
2044
+
2045
+ set detect_on(value) {
2046
+ this.detectsOn = value;
2047
+ }
2048
+
1888
2049
  load(data) {
2050
+ var _a, _b, _c;
2051
+
1889
2052
  if (!data) {
1890
2053
  return;
1891
2054
  }
1892
2055
 
1893
- if (data.detectsOn !== undefined) {
1894
- this.detectsOn = data.detectsOn;
2056
+ const detectsOn = (_a = data.detectsOn) !== null && _a !== void 0 ? _a : data.detect_on;
2057
+
2058
+ if (detectsOn !== undefined) {
2059
+ this.detectsOn = detectsOn;
1895
2060
  }
1896
2061
 
1897
2062
  this.events.load(data.events);
1898
2063
  this.modes.load(data.modes);
2064
+
2065
+ if (((_c = (_b = data.modes) === null || _b === void 0 ? void 0 : _b.slow) === null || _c === void 0 ? void 0 : _c.active) === true) {
2066
+ if (this.events.onHover.mode instanceof Array) {
2067
+ if (this.events.onHover.mode.indexOf("slow") < 0) {
2068
+ this.events.onHover.mode.push("slow");
2069
+ }
2070
+ } else if (this.events.onHover.mode !== "slow") {
2071
+ this.events.onHover.mode = [this.events.onHover.mode, "slow"];
2072
+ }
2073
+ }
1899
2074
  }
1900
2075
 
1901
2076
  }
@@ -2050,7 +2225,10 @@ class Theme {
2050
2225
  }
2051
2226
 
2052
2227
  this.default.load(data.default);
2053
- this.options = deepExtend({}, data.options);
2228
+
2229
+ if (data.options !== undefined) {
2230
+ this.options = deepExtend({}, data.options);
2231
+ }
2054
2232
  }
2055
2233
 
2056
2234
  }
@@ -2109,8 +2287,32 @@ class Options {
2109
2287
  this.zLayers = 100;
2110
2288
  }
2111
2289
 
2290
+ get fps_limit() {
2291
+ return this.fpsLimit;
2292
+ }
2293
+
2294
+ set fps_limit(value) {
2295
+ this.fpsLimit = value;
2296
+ }
2297
+
2298
+ get retina_detect() {
2299
+ return this.detectRetina;
2300
+ }
2301
+
2302
+ set retina_detect(value) {
2303
+ this.detectRetina = value;
2304
+ }
2305
+
2306
+ get backgroundMode() {
2307
+ return this.fullScreen;
2308
+ }
2309
+
2310
+ set backgroundMode(value) {
2311
+ this.fullScreen.load(value);
2312
+ }
2313
+
2112
2314
  load(data) {
2113
- var _a, _b;
2315
+ var _a, _b, _c, _d, _e;
2114
2316
 
2115
2317
  if (!data) {
2116
2318
  return;
@@ -2130,16 +2332,20 @@ class Options {
2130
2332
  this.autoPlay = data.autoPlay;
2131
2333
  }
2132
2334
 
2133
- if (data.detectRetina !== undefined) {
2134
- this.detectRetina = data.detectRetina;
2335
+ const detectRetina = (_a = data.detectRetina) !== null && _a !== void 0 ? _a : data.retina_detect;
2336
+
2337
+ if (detectRetina !== undefined) {
2338
+ this.detectRetina = detectRetina;
2135
2339
  }
2136
2340
 
2137
2341
  if (data.duration !== undefined) {
2138
2342
  this.duration = data.duration;
2139
2343
  }
2140
2344
 
2141
- if (data.fpsLimit !== undefined) {
2142
- this.fpsLimit = data.fpsLimit;
2345
+ const fpsLimit = (_b = data.fpsLimit) !== null && _b !== void 0 ? _b : data.fps_limit;
2346
+
2347
+ if (fpsLimit !== undefined) {
2348
+ this.fpsLimit = fpsLimit;
2143
2349
  }
2144
2350
 
2145
2351
  if (data.pauseOnBlur !== undefined) {
@@ -2155,11 +2361,12 @@ class Options {
2155
2361
  }
2156
2362
 
2157
2363
  this.background.load(data.background);
2364
+ const fullScreen = (_c = data.fullScreen) !== null && _c !== void 0 ? _c : data.backgroundMode;
2158
2365
 
2159
- if (typeof data.fullScreen === "boolean") {
2160
- this.fullScreen.enable = data.fullScreen;
2366
+ if (typeof fullScreen === "boolean") {
2367
+ this.fullScreen.enable = fullScreen;
2161
2368
  } else {
2162
- this.fullScreen.load(data.fullScreen);
2369
+ this.fullScreen.load(fullScreen);
2163
2370
  }
2164
2371
 
2165
2372
  this.backgroundMask.load(data.backgroundMask);
@@ -2197,8 +2404,8 @@ class Options {
2197
2404
  }
2198
2405
  }
2199
2406
 
2200
- this.defaultDarkTheme = (_a = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _a === void 0 ? void 0 : _a.name;
2201
- this.defaultLightTheme = (_b = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _b === void 0 ? void 0 : _b.name;
2407
+ this.defaultDarkTheme = (_d = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
2408
+ this.defaultLightTheme = (_e = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
2202
2409
  }
2203
2410
 
2204
2411
  setTheme(name) {
@@ -2236,12 +2443,35 @@ _Options_engine = new WeakMap(), _Options_instances = new WeakSet(), _Options_fi
2236
2443
 
2237
2444
  return (_a = this.themes.find(theme => theme.default.value && theme.default.mode === mode)) !== null && _a !== void 0 ? _a : this.themes.find(theme => theme.default.value && theme.default.mode === "any");
2238
2445
  };
2239
- ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js
2446
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Random.js
2447
+ class Random {
2448
+ constructor() {
2449
+ this.enable = false;
2450
+ this.minimumValue = 0;
2451
+ }
2240
2452
 
2241
- class ParticlesBounce {
2453
+ load(data) {
2454
+ if (!data) {
2455
+ return;
2456
+ }
2457
+
2458
+ if (data.enable !== undefined) {
2459
+ this.enable = data.enable;
2460
+ }
2461
+
2462
+ if (data.minimumValue !== undefined) {
2463
+ this.minimumValue = data.minimumValue;
2464
+ }
2465
+ }
2466
+
2467
+ }
2468
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/ValueWithRandom.js
2469
+
2470
+
2471
+ class ValueWithRandom {
2242
2472
  constructor() {
2243
- this.horizontal = 1;
2244
- this.vertical = 1;
2473
+ this.random = new Random();
2474
+ this.value = 0;
2245
2475
  }
2246
2476
 
2247
2477
  load(data) {
@@ -2249,15 +2479,45 @@ class ParticlesBounce {
2249
2479
  return;
2250
2480
  }
2251
2481
 
2252
- if (data.horizontal !== undefined) {
2253
- this.horizontal = setRangeValue(data.horizontal);
2482
+ if (typeof data.random === "boolean") {
2483
+ this.random.enable = data.random;
2484
+ } else {
2485
+ this.random.load(data.random);
2254
2486
  }
2255
2487
 
2256
- if (data.vertical !== undefined) {
2257
- this.vertical = setRangeValue(data.vertical);
2488
+ if (data.value !== undefined) {
2489
+ this.value = setRangeValue(data.value, this.random.enable ? this.random.minimumValue : undefined);
2258
2490
  }
2259
2491
  }
2260
2492
 
2493
+ }
2494
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js
2495
+
2496
+ class ParticlesBounceFactor extends ValueWithRandom {
2497
+ constructor() {
2498
+ super();
2499
+ this.random.minimumValue = 0.1;
2500
+ this.value = 1;
2501
+ }
2502
+
2503
+ }
2504
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js
2505
+
2506
+ class ParticlesBounce {
2507
+ constructor() {
2508
+ this.horizontal = new ParticlesBounceFactor();
2509
+ this.vertical = new ParticlesBounceFactor();
2510
+ }
2511
+
2512
+ load(data) {
2513
+ if (!data) {
2514
+ return;
2515
+ }
2516
+
2517
+ this.horizontal.load(data.horizontal);
2518
+ this.vertical.load(data.vertical);
2519
+ }
2520
+
2261
2521
  }
2262
2522
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Bounce/index.js
2263
2523
 
@@ -2316,16 +2576,36 @@ class Collisions {
2316
2576
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Collisions/index.js
2317
2577
 
2318
2578
 
2319
- ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/Split.js
2579
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/SplitFactor.js
2320
2580
 
2321
- class Split {
2581
+ class SplitFactor extends ValueWithRandom {
2322
2582
  constructor() {
2323
- this.count = 1;
2324
- this.factor = 3;
2325
- this.rate = {
2583
+ super();
2584
+ this.value = 3;
2585
+ }
2586
+
2587
+ }
2588
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/SplitRate.js
2589
+
2590
+ class SplitRate extends ValueWithRandom {
2591
+ constructor() {
2592
+ super();
2593
+ this.value = {
2326
2594
  min: 4,
2327
2595
  max: 9
2328
2596
  };
2597
+ }
2598
+
2599
+ }
2600
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/Split.js
2601
+
2602
+
2603
+
2604
+ class Split {
2605
+ constructor() {
2606
+ this.count = 1;
2607
+ this.factor = new SplitFactor();
2608
+ this.rate = new SplitRate();
2329
2609
  this.sizeOffset = true;
2330
2610
  }
2331
2611
 
@@ -2338,16 +2618,13 @@ class Split {
2338
2618
  this.count = data.count;
2339
2619
  }
2340
2620
 
2341
- if (data.factor !== undefined) {
2342
- this.factor = setRangeValue(data.factor);
2343
- }
2621
+ this.factor.load(data.factor);
2622
+ this.rate.load(data.rate);
2344
2623
 
2345
- if (data.rate !== undefined) {
2346
- this.rate = setRangeValue(data.rate);
2624
+ if (data.particles !== undefined) {
2625
+ this.particles = deepExtend({}, data.particles);
2347
2626
  }
2348
2627
 
2349
- this.particles = deepExtend({}, data.particles);
2350
-
2351
2628
  if (data.sizeOffset !== undefined) {
2352
2629
  this.sizeOffset = data.sizeOffset;
2353
2630
  }
@@ -2378,24 +2655,6 @@ class Destroy {
2378
2655
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Destroy/index.js
2379
2656
 
2380
2657
 
2381
- ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/ValueWithRandom.js
2382
-
2383
- class ValueWithRandom {
2384
- constructor() {
2385
- this.value = 0;
2386
- }
2387
-
2388
- load(data) {
2389
- if (!data) {
2390
- return;
2391
- }
2392
-
2393
- if (data.value !== undefined) {
2394
- this.value = setRangeValue(data.value);
2395
- }
2396
- }
2397
-
2398
- }
2399
2658
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Life/LifeDelay.js
2400
2659
 
2401
2660
  class LifeDelay extends ValueWithRandom {
@@ -2422,6 +2681,7 @@ class LifeDelay extends ValueWithRandom {
2422
2681
  class LifeDuration extends ValueWithRandom {
2423
2682
  constructor() {
2424
2683
  super();
2684
+ this.random.minimumValue = 0.0001;
2425
2685
  this.sync = false;
2426
2686
  }
2427
2687
 
@@ -2604,24 +2864,53 @@ class MoveAttract {
2604
2864
  };
2605
2865
  }
2606
2866
 
2867
+ get rotateX() {
2868
+ return this.rotate.x;
2869
+ }
2870
+
2871
+ set rotateX(value) {
2872
+ this.rotate.x = value;
2873
+ }
2874
+
2875
+ get rotateY() {
2876
+ return this.rotate.y;
2877
+ }
2878
+
2879
+ set rotateY(value) {
2880
+ this.rotate.y = value;
2881
+ }
2882
+
2607
2883
  load(data) {
2884
+ var _a, _b, _c, _d;
2885
+
2608
2886
  if (!data) {
2609
2887
  return;
2610
2888
  }
2611
2889
 
2612
2890
  if (data.distance !== undefined) {
2613
- this.distance = data.distance;
2891
+ this.distance = setRangeValue(data.distance);
2614
2892
  }
2615
2893
 
2616
2894
  if (data.enable !== undefined) {
2617
2895
  this.enable = data.enable;
2618
2896
  }
2619
2897
 
2620
- this.rotate = deepExtend(this.rotate, data.rotate);
2898
+ const rotateX = (_b = (_a = data.rotate) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : data.rotateX;
2899
+
2900
+ if (rotateX !== undefined) {
2901
+ this.rotate.x = rotateX;
2902
+ }
2903
+
2904
+ const rotateY = (_d = (_c = data.rotate) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : data.rotateY;
2905
+
2906
+ if (rotateY !== undefined) {
2907
+ this.rotate.y = rotateY;
2908
+ }
2621
2909
  }
2622
2910
 
2623
2911
  }
2624
2912
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/MoveAngle.js
2913
+
2625
2914
  class MoveAngle {
2626
2915
  constructor() {
2627
2916
  this.offset = 0;
@@ -2634,16 +2923,17 @@ class MoveAngle {
2634
2923
  }
2635
2924
 
2636
2925
  if (data.offset !== undefined) {
2637
- this.offset = data.offset;
2926
+ this.offset = setRangeValue(data.offset);
2638
2927
  }
2639
2928
 
2640
2929
  if (data.value !== undefined) {
2641
- this.value = data.value;
2930
+ this.value = setRangeValue(data.value);
2642
2931
  }
2643
2932
  }
2644
2933
 
2645
2934
  }
2646
2935
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/MoveGravity.js
2936
+
2647
2937
  class MoveGravity {
2648
2938
  constructor() {
2649
2939
  this.acceleration = 9.81;
@@ -2658,7 +2948,7 @@ class MoveGravity {
2658
2948
  }
2659
2949
 
2660
2950
  if (data.acceleration !== undefined) {
2661
- this.acceleration = data.acceleration;
2951
+ this.acceleration = setRangeValue(data.acceleration);
2662
2952
  }
2663
2953
 
2664
2954
  if (data.enable !== undefined) {
@@ -2670,17 +2960,26 @@ class MoveGravity {
2670
2960
  }
2671
2961
 
2672
2962
  if (data.maxSpeed !== undefined) {
2673
- this.maxSpeed = data.maxSpeed;
2963
+ this.maxSpeed = setRangeValue(data.maxSpeed);
2674
2964
  }
2675
2965
  }
2676
2966
 
2677
2967
  }
2678
- ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/MovePath.js
2968
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/Path/MovePathDelay.js
2969
+
2970
+ class MovePathDelay extends ValueWithRandom {
2971
+ constructor() {
2972
+ super();
2973
+ }
2974
+
2975
+ }
2976
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/Path/MovePath.js
2977
+
2679
2978
 
2680
2979
  class MovePath {
2681
2980
  constructor() {
2682
2981
  this.clamp = true;
2683
- this.delay = 0;
2982
+ this.delay = new MovePathDelay();
2684
2983
  this.enable = false;
2685
2984
  this.options = {};
2686
2985
  }
@@ -2694,19 +2993,23 @@ class MovePath {
2694
2993
  this.clamp = data.clamp;
2695
2994
  }
2696
2995
 
2697
- if (data.delay !== undefined) {
2698
- this.delay = setRangeValue(data.delay);
2699
- }
2996
+ this.delay.load(data.delay);
2700
2997
 
2701
2998
  if (data.enable !== undefined) {
2702
2999
  this.enable = data.enable;
2703
3000
  }
2704
3001
 
2705
3002
  this.generator = data.generator;
2706
- this.options = deepExtend(this.options, data.options);
3003
+
3004
+ if (data.options) {
3005
+ this.options = deepExtend(this.options, data.options);
3006
+ }
2707
3007
  }
2708
3008
 
2709
3009
  }
3010
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/Path/index.js
3011
+
3012
+
2710
3013
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Move/MoveTrail.js
2711
3014
 
2712
3015
  class MoveTrail {
@@ -2819,15 +3122,57 @@ class Move {
2819
3122
  this.warp = false;
2820
3123
  }
2821
3124
 
3125
+ get collisions() {
3126
+ return false;
3127
+ }
3128
+
3129
+ set collisions(value) {}
3130
+
3131
+ get bounce() {
3132
+ return this.collisions;
3133
+ }
3134
+
3135
+ set bounce(value) {
3136
+ this.collisions = value;
3137
+ }
3138
+
3139
+ get out_mode() {
3140
+ return this.outMode;
3141
+ }
3142
+
3143
+ set out_mode(value) {
3144
+ this.outMode = value;
3145
+ }
3146
+
3147
+ get outMode() {
3148
+ return this.outModes.default;
3149
+ }
3150
+
3151
+ set outMode(value) {
3152
+ this.outModes.default = value;
3153
+ }
3154
+
3155
+ get noise() {
3156
+ return this.path;
3157
+ }
3158
+
3159
+ set noise(value) {
3160
+ this.path = value;
3161
+ }
3162
+
2822
3163
  load(data) {
3164
+ var _a, _b, _c;
3165
+
2823
3166
  if (!data) {
2824
3167
  return;
2825
3168
  }
2826
3169
 
2827
- if (typeof data.angle === "number") {
2828
- this.angle.value = data.angle;
2829
- } else {
2830
- this.angle.load(data.angle);
3170
+ if (data.angle !== undefined) {
3171
+ if (typeof data.angle === "number") {
3172
+ this.angle.value = data.angle;
3173
+ } else {
3174
+ this.angle.load(data.angle);
3175
+ }
2831
3176
  }
2832
3177
 
2833
3178
  this.attract.load(data.attract);
@@ -2857,18 +3202,19 @@ class Move {
2857
3202
  }
2858
3203
 
2859
3204
  this.gravity.load(data.gravity);
3205
+ const outMode = (_a = data.outMode) !== null && _a !== void 0 ? _a : data.out_mode;
2860
3206
 
2861
- if (data.outModes) {
2862
- if (typeof data.outModes === "string") {
3207
+ if (data.outModes !== undefined || outMode !== undefined) {
3208
+ if (typeof data.outModes === "string" || data.outModes === undefined && outMode !== undefined) {
2863
3209
  this.outModes.load({
2864
- default: data.outModes
3210
+ default: (_b = data.outModes) !== null && _b !== void 0 ? _b : outMode
2865
3211
  });
2866
3212
  } else {
2867
3213
  this.outModes.load(data.outModes);
2868
3214
  }
2869
3215
  }
2870
3216
 
2871
- this.path.load(data.path);
3217
+ this.path.load((_c = data.path) !== null && _c !== void 0 ? _c : data.noise);
2872
3218
 
2873
3219
  if (data.random !== undefined) {
2874
3220
  this.random = data.random;
@@ -2921,7 +3267,17 @@ class OpacityAnimation extends AnimationOptions {
2921
3267
  this.sync = false;
2922
3268
  }
2923
3269
 
3270
+ get opacity_min() {
3271
+ return this.minimumValue;
3272
+ }
3273
+
3274
+ set opacity_min(value) {
3275
+ this.minimumValue = value;
3276
+ }
3277
+
2924
3278
  load(data) {
3279
+ var _a;
3280
+
2925
3281
  if (!data) {
2926
3282
  return;
2927
3283
  }
@@ -2936,6 +3292,8 @@ class OpacityAnimation extends AnimationOptions {
2936
3292
  this.enable = data.enable;
2937
3293
  }
2938
3294
 
3295
+ this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.opacity_min;
3296
+
2939
3297
  if (data.speed !== undefined) {
2940
3298
  this.speed = data.speed;
2941
3299
  }
@@ -2953,36 +3311,73 @@ class OpacityAnimation extends AnimationOptions {
2953
3311
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Opacity/Opacity.js
2954
3312
 
2955
3313
 
3314
+
2956
3315
  class Opacity extends ValueWithRandom {
2957
3316
  constructor() {
2958
3317
  super();
2959
3318
  this.animation = new OpacityAnimation();
3319
+ this.random.minimumValue = 0.1;
2960
3320
  this.value = 1;
2961
3321
  }
2962
3322
 
3323
+ get anim() {
3324
+ return this.animation;
3325
+ }
3326
+
3327
+ set anim(value) {
3328
+ this.animation = value;
3329
+ }
3330
+
2963
3331
  load(data) {
3332
+ var _a;
3333
+
2964
3334
  if (!data) {
2965
3335
  return;
2966
3336
  }
2967
3337
 
2968
3338
  super.load(data);
2969
- this.animation.load(data.animation);
3339
+ const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
3340
+
3341
+ if (animation !== undefined) {
3342
+ this.animation.load(animation);
3343
+ this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
3344
+ }
2970
3345
  }
2971
3346
 
2972
3347
  }
2973
3348
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Opacity/index.js
2974
3349
 
2975
3350
 
3351
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Orbit/OrbitRotation.js
3352
+
3353
+ class OrbitRotation extends ValueWithRandom {
3354
+ constructor() {
3355
+ super();
3356
+ this.value = 45;
3357
+ this.random.enable = false;
3358
+ this.random.minimumValue = 0;
3359
+ }
3360
+
3361
+ load(data) {
3362
+ if (data === undefined) {
3363
+ return;
3364
+ }
3365
+
3366
+ super.load(data);
3367
+ }
3368
+
3369
+ }
2976
3370
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Orbit/Orbit.js
2977
3371
 
2978
3372
 
2979
3373
 
3374
+
2980
3375
  class Orbit {
2981
3376
  constructor() {
2982
3377
  this.animation = new AnimationOptions();
2983
3378
  this.enable = false;
2984
3379
  this.opacity = 1;
2985
- this.rotation = 0;
3380
+ this.rotation = new OrbitRotation();
2986
3381
  this.width = 1;
2987
3382
  }
2988
3383
 
@@ -2992,25 +3387,22 @@ class Orbit {
2992
3387
  }
2993
3388
 
2994
3389
  this.animation.load(data.animation);
2995
-
2996
- if (data.rotation !== undefined) {
2997
- this.rotation = setRangeValue(data.rotation);
2998
- }
3390
+ this.rotation.load(data.rotation);
2999
3391
 
3000
3392
  if (data.enable !== undefined) {
3001
3393
  this.enable = data.enable;
3002
3394
  }
3003
3395
 
3004
3396
  if (data.opacity !== undefined) {
3005
- this.opacity = data.opacity;
3397
+ this.opacity = setRangeValue(data.opacity);
3006
3398
  }
3007
3399
 
3008
3400
  if (data.width !== undefined) {
3009
- this.width = data.width;
3401
+ this.width = setRangeValue(data.width);
3010
3402
  }
3011
3403
 
3012
3404
  if (data.radius !== undefined) {
3013
- this.radius = data.radius;
3405
+ this.radius = setRangeValue(data.radius);
3014
3406
  }
3015
3407
 
3016
3408
  if (data.color !== undefined) {
@@ -3029,7 +3421,17 @@ class ParticlesDensity {
3029
3421
  this.factor = 1000;
3030
3422
  }
3031
3423
 
3424
+ get value_area() {
3425
+ return this.area;
3426
+ }
3427
+
3428
+ set value_area(value) {
3429
+ this.area = value;
3430
+ }
3431
+
3032
3432
  load(data) {
3433
+ var _a;
3434
+
3033
3435
  if (!data) {
3034
3436
  return;
3035
3437
  }
@@ -3038,8 +3440,10 @@ class ParticlesDensity {
3038
3440
  this.enable = data.enable;
3039
3441
  }
3040
3442
 
3041
- if (data.area !== undefined) {
3042
- this.area = data.area;
3443
+ const area = (_a = data.area) !== null && _a !== void 0 ? _a : data.value_area;
3444
+
3445
+ if (area !== undefined) {
3446
+ this.area = area;
3043
3447
  }
3044
3448
 
3045
3449
  if (data.factor !== undefined) {
@@ -3057,15 +3461,26 @@ class ParticlesNumber {
3057
3461
  this.value = 100;
3058
3462
  }
3059
3463
 
3464
+ get max() {
3465
+ return this.limit;
3466
+ }
3467
+
3468
+ set max(value) {
3469
+ this.limit = value;
3470
+ }
3471
+
3060
3472
  load(data) {
3473
+ var _a;
3474
+
3061
3475
  if (!data) {
3062
3476
  return;
3063
3477
  }
3064
3478
 
3065
3479
  this.density.load(data.density);
3480
+ const limit = (_a = data.limit) !== null && _a !== void 0 ? _a : data.max;
3066
3481
 
3067
- if (data.limit !== undefined) {
3068
- this.limit = data.limit;
3482
+ if (limit !== undefined) {
3483
+ this.limit = limit;
3069
3484
  }
3070
3485
 
3071
3486
  if (data.value !== undefined) {
@@ -3076,6 +3491,7 @@ class ParticlesNumber {
3076
3491
  }
3077
3492
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Repulse/ParticlesRepulse.js
3078
3493
 
3494
+
3079
3495
  class ParticlesRepulse extends ValueWithRandom {
3080
3496
  constructor() {
3081
3497
  super();
@@ -3098,19 +3514,19 @@ class ParticlesRepulse extends ValueWithRandom {
3098
3514
  }
3099
3515
 
3100
3516
  if (data.distance !== undefined) {
3101
- this.distance = data.distance;
3517
+ this.distance = setRangeValue(data.distance);
3102
3518
  }
3103
3519
 
3104
3520
  if (data.duration !== undefined) {
3105
- this.duration = data.duration;
3521
+ this.duration = setRangeValue(data.duration);
3106
3522
  }
3107
3523
 
3108
3524
  if (data.factor !== undefined) {
3109
- this.factor = data.factor;
3525
+ this.factor = setRangeValue(data.factor);
3110
3526
  }
3111
3527
 
3112
3528
  if (data.speed !== undefined) {
3113
- this.speed = data.speed;
3529
+ this.speed = setRangeValue(data.speed);
3114
3530
  }
3115
3531
  }
3116
3532
 
@@ -3118,6 +3534,7 @@ class ParticlesRepulse extends ValueWithRandom {
3118
3534
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Repulse/index.js
3119
3535
 
3120
3536
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Roll/RollLight.js
3537
+
3121
3538
  class RollLight {
3122
3539
  constructor() {
3123
3540
  this.enable = false;
@@ -3134,7 +3551,7 @@ class RollLight {
3134
3551
  }
3135
3552
 
3136
3553
  if (data.value !== undefined) {
3137
- this.value = data.value;
3554
+ this.value = setRangeValue(data.value);
3138
3555
  }
3139
3556
  }
3140
3557
 
@@ -3157,7 +3574,10 @@ class Roll {
3157
3574
  return;
3158
3575
  }
3159
3576
 
3160
- this.backColor = OptionsColor.create(this.backColor, data.backColor);
3577
+ if (data.backColor !== undefined) {
3578
+ this.backColor = OptionsColor.create(this.backColor, data.backColor);
3579
+ }
3580
+
3161
3581
  this.darken.load(data.darken);
3162
3582
 
3163
3583
  if (data.enable !== undefined) {
@@ -3180,6 +3600,7 @@ class Roll {
3180
3600
 
3181
3601
 
3182
3602
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Rotate/RotateAnimation.js
3603
+
3183
3604
  class RotateAnimation {
3184
3605
  constructor() {
3185
3606
  this.enable = false;
@@ -3197,7 +3618,7 @@ class RotateAnimation {
3197
3618
  }
3198
3619
 
3199
3620
  if (data.speed !== undefined) {
3200
- this.speed = data.speed;
3621
+ this.speed = setRangeValue(data.speed);
3201
3622
  }
3202
3623
 
3203
3624
  if (data.sync !== undefined) {
@@ -3291,30 +3712,127 @@ class Shape {
3291
3712
  this.type = "circle";
3292
3713
  }
3293
3714
 
3294
- load(data) {
3715
+ get image() {
3716
+ var _a;
3717
+
3718
+ return (_a = this.options["image"]) !== null && _a !== void 0 ? _a : this.options["images"];
3719
+ }
3720
+
3721
+ set image(value) {
3722
+ this.options["image"] = value;
3723
+ this.options["images"] = value;
3724
+ }
3725
+
3726
+ get custom() {
3727
+ return this.options;
3728
+ }
3729
+
3730
+ set custom(value) {
3731
+ this.options = value;
3732
+ }
3733
+
3734
+ get images() {
3735
+ return this.image;
3736
+ }
3737
+
3738
+ set images(value) {
3739
+ this.image = value;
3740
+ }
3741
+
3742
+ get stroke() {
3743
+ return [];
3744
+ }
3745
+
3746
+ set stroke(_value) {}
3747
+
3748
+ get character() {
3295
3749
  var _a;
3296
3750
 
3751
+ return (_a = this.options["character"]) !== null && _a !== void 0 ? _a : this.options["char"];
3752
+ }
3753
+
3754
+ set character(value) {
3755
+ this.options["character"] = value;
3756
+ this.options["char"] = value;
3757
+ }
3758
+
3759
+ get polygon() {
3760
+ var _a;
3761
+
3762
+ return (_a = this.options["polygon"]) !== null && _a !== void 0 ? _a : this.options["star"];
3763
+ }
3764
+
3765
+ set polygon(value) {
3766
+ this.options["polygon"] = value;
3767
+ this.options["star"] = value;
3768
+ }
3769
+
3770
+ load(data) {
3771
+ var _a, _b, _c;
3772
+
3297
3773
  if (!data) {
3298
3774
  return;
3299
3775
  }
3300
3776
 
3301
- const options = data.options;
3777
+ const options = (_a = data.options) !== null && _a !== void 0 ? _a : data.custom;
3302
3778
 
3303
- if (options) {
3304
- for (const shape of Object.keys(options)) {
3779
+ if (options !== undefined) {
3780
+ for (const shape in options) {
3305
3781
  const item = options[shape];
3306
3782
 
3307
3783
  if (item) {
3308
- this.options[shape] = deepExtend((_a = this.options[shape]) !== null && _a !== void 0 ? _a : {}, item);
3784
+ this.options[shape] = deepExtend((_b = this.options[shape]) !== null && _b !== void 0 ? _b : {}, item);
3309
3785
  }
3310
3786
  }
3311
3787
  }
3312
3788
 
3789
+ this.loadShape(data.character, "character", "char", true);
3790
+ this.loadShape(data.polygon, "polygon", "star", false);
3791
+ this.loadShape((_c = data.image) !== null && _c !== void 0 ? _c : data.images, "image", "images", true);
3792
+
3313
3793
  if (data.type !== undefined) {
3314
3794
  this.type = data.type;
3315
3795
  }
3316
3796
  }
3317
3797
 
3798
+ loadShape(item, mainKey, altKey, altOverride) {
3799
+ var _a, _b, _c, _d;
3800
+
3801
+ if (item === undefined) {
3802
+ return;
3803
+ }
3804
+
3805
+ if (item instanceof Array) {
3806
+ if (!(this.options[mainKey] instanceof Array)) {
3807
+ this.options[mainKey] = [];
3808
+
3809
+ if (!this.options[altKey] || altOverride) {
3810
+ this.options[altKey] = [];
3811
+ }
3812
+ }
3813
+
3814
+ this.options[mainKey] = deepExtend((_a = this.options[mainKey]) !== null && _a !== void 0 ? _a : [], item);
3815
+
3816
+ if (!this.options[altKey] || altOverride) {
3817
+ this.options[altKey] = deepExtend((_b = this.options[altKey]) !== null && _b !== void 0 ? _b : [], item);
3818
+ }
3819
+ } else {
3820
+ if (this.options[mainKey] instanceof Array) {
3821
+ this.options[mainKey] = {};
3822
+
3823
+ if (!this.options[altKey] || altOverride) {
3824
+ this.options[altKey] = {};
3825
+ }
3826
+ }
3827
+
3828
+ this.options[mainKey] = deepExtend((_c = this.options[mainKey]) !== null && _c !== void 0 ? _c : {}, item);
3829
+
3830
+ if (!this.options[altKey] || altOverride) {
3831
+ this.options[altKey] = deepExtend((_d = this.options[altKey]) !== null && _d !== void 0 ? _d : {}, item);
3832
+ }
3833
+ }
3834
+ }
3835
+
3318
3836
  }
3319
3837
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Shape/index.js
3320
3838
 
@@ -3330,7 +3848,17 @@ class SizeAnimation extends AnimationOptions {
3330
3848
  this.sync = false;
3331
3849
  }
3332
3850
 
3851
+ get size_min() {
3852
+ return this.minimumValue;
3853
+ }
3854
+
3855
+ set size_min(value) {
3856
+ this.minimumValue = value;
3857
+ }
3858
+
3333
3859
  load(data) {
3860
+ var _a;
3861
+
3334
3862
  super.load(data);
3335
3863
 
3336
3864
  if (!data) {
@@ -3345,6 +3873,8 @@ class SizeAnimation extends AnimationOptions {
3345
3873
  this.enable = data.enable;
3346
3874
  }
3347
3875
 
3876
+ this.minimumValue = (_a = data.minimumValue) !== null && _a !== void 0 ? _a : data.size_min;
3877
+
3348
3878
  if (data.speed !== undefined) {
3349
3879
  this.speed = data.speed;
3350
3880
  }
@@ -3362,21 +3892,38 @@ class SizeAnimation extends AnimationOptions {
3362
3892
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Size/Size.js
3363
3893
 
3364
3894
 
3895
+
3365
3896
  class Size extends ValueWithRandom {
3366
3897
  constructor() {
3367
3898
  super();
3368
3899
  this.animation = new SizeAnimation();
3900
+ this.random.minimumValue = 1;
3369
3901
  this.value = 3;
3370
3902
  }
3371
3903
 
3904
+ get anim() {
3905
+ return this.animation;
3906
+ }
3907
+
3908
+ set anim(value) {
3909
+ this.animation = value;
3910
+ }
3911
+
3372
3912
  load(data) {
3913
+ var _a;
3914
+
3373
3915
  super.load(data);
3374
3916
 
3375
3917
  if (!data) {
3376
3918
  return;
3377
3919
  }
3378
3920
 
3379
- this.animation.load(data.animation);
3921
+ const animation = (_a = data.animation) !== null && _a !== void 0 ? _a : data.anim;
3922
+
3923
+ if (animation !== undefined) {
3924
+ this.animation.load(animation);
3925
+ this.value = setRangeValue(this.value, this.animation.enable ? this.animation.minimumValue : undefined);
3926
+ }
3380
3927
  }
3381
3928
 
3382
3929
  }
@@ -3395,7 +3942,9 @@ class Stroke {
3395
3942
  return;
3396
3943
  }
3397
3944
 
3398
- this.color = AnimatableColor.create(this.color, data.color);
3945
+ if (data.color !== undefined) {
3946
+ this.color = AnimatableColor.create(this.color, data.color);
3947
+ }
3399
3948
 
3400
3949
  if (data.width !== undefined) {
3401
3950
  this.width = data.width;
@@ -3408,6 +3957,7 @@ class Stroke {
3408
3957
 
3409
3958
  }
3410
3959
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Tilt/TiltAnimation.js
3960
+
3411
3961
  class TiltAnimation {
3412
3962
  constructor() {
3413
3963
  this.enable = false;
@@ -3425,7 +3975,7 @@ class TiltAnimation {
3425
3975
  }
3426
3976
 
3427
3977
  if (data.speed !== undefined) {
3428
- this.speed = data.speed;
3978
+ this.speed = setRangeValue(data.speed);
3429
3979
  }
3430
3980
 
3431
3981
  if (data.sync !== undefined) {
@@ -3470,6 +4020,7 @@ class Tilt extends ValueWithRandom {
3470
4020
 
3471
4021
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Twinkle/TwinkleValues.js
3472
4022
 
4023
+
3473
4024
  class TwinkleValues {
3474
4025
  constructor() {
3475
4026
  this.enable = false;
@@ -3482,7 +4033,9 @@ class TwinkleValues {
3482
4033
  return;
3483
4034
  }
3484
4035
 
3485
- this.color = OptionsColor.create(this.color, data.color);
4036
+ if (data.color !== undefined) {
4037
+ this.color = OptionsColor.create(this.color, data.color);
4038
+ }
3486
4039
 
3487
4040
  if (data.enable !== undefined) {
3488
4041
  this.enable = data.enable;
@@ -3493,7 +4046,7 @@ class TwinkleValues {
3493
4046
  }
3494
4047
 
3495
4048
  if (data.opacity !== undefined) {
3496
- this.opacity = data.opacity;
4049
+ this.opacity = setRangeValue(data.opacity);
3497
4050
  }
3498
4051
  }
3499
4052
 
@@ -3516,6 +4069,9 @@ class Twinkle {
3516
4069
  }
3517
4070
 
3518
4071
  }
4072
+ ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Twinkle/index.js
4073
+
4074
+
3519
4075
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Wobble/Wobble.js
3520
4076
 
3521
4077
  class Wobble {
@@ -3632,8 +4188,24 @@ class ParticlesOptions {
3632
4188
  this.zIndex = new ZIndex();
3633
4189
  }
3634
4190
 
4191
+ get line_linked() {
4192
+ return this.links;
4193
+ }
4194
+
4195
+ set line_linked(value) {
4196
+ this.links = value;
4197
+ }
4198
+
4199
+ get lineLinked() {
4200
+ return this.links;
4201
+ }
4202
+
4203
+ set lineLinked(value) {
4204
+ this.links = value;
4205
+ }
4206
+
3635
4207
  load(data) {
3636
- var _a;
4208
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3637
4209
 
3638
4210
  if (!data) {
3639
4211
  return;
@@ -3643,14 +4215,18 @@ class ParticlesOptions {
3643
4215
  this.color.load(AnimatableColor.create(this.color, data.color));
3644
4216
  this.destroy.load(data.destroy);
3645
4217
  this.life.load(data.life);
3646
- this.links.load(data.links);
4218
+ const links = (_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked;
4219
+
4220
+ if (links !== undefined) {
4221
+ this.links.load(links);
4222
+ }
3647
4223
 
3648
4224
  if (data.groups !== undefined) {
3649
4225
  for (const group in data.groups) {
3650
4226
  const item = data.groups[group];
3651
4227
 
3652
4228
  if (item !== undefined) {
3653
- this.groups[group] = deepExtend((_a = this.groups[group]) !== null && _a !== void 0 ? _a : {}, item);
4229
+ this.groups[group] = deepExtend((_c = this.groups[group]) !== null && _c !== void 0 ? _c : {}, item);
3654
4230
  }
3655
4231
  }
3656
4232
  }
@@ -3674,8 +4250,14 @@ class ParticlesOptions {
3674
4250
  this.twinkle.load(data.twinkle);
3675
4251
  this.wobble.load(data.wobble);
3676
4252
  this.zIndex.load(data.zIndex);
4253
+ const collisions = (_e = (_d = data.move) === null || _d === void 0 ? void 0 : _d.collisions) !== null && _e !== void 0 ? _e : (_f = data.move) === null || _f === void 0 ? void 0 : _f.bounce;
4254
+
4255
+ if (collisions !== undefined) {
4256
+ this.collisions.enable = collisions;
4257
+ }
4258
+
3677
4259
  this.collisions.load(data.collisions);
3678
- const strokeToLoad = data.stroke;
4260
+ const strokeToLoad = (_g = data.stroke) !== null && _g !== void 0 ? _g : (_h = data.shape) === null || _h === void 0 ? void 0 : _h.stroke;
3679
4261
 
3680
4262
  if (strokeToLoad) {
3681
4263
  if (strokeToLoad instanceof Array) {
@@ -3720,9 +4302,6 @@ class ParticlesOptions {
3720
4302
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Number/index.js
3721
4303
 
3722
4304
 
3723
- ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/Twinkle/index.js
3724
-
3725
-
3726
4305
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Options/Classes/Particles/index.js
3727
4306
 
3728
4307
 
@@ -3939,7 +4518,7 @@ function circleBounceDataFromParticle(p) {
3939
4518
  radius: p.getRadius(),
3940
4519
  mass: p.getMass(),
3941
4520
  velocity: p.velocity,
3942
- factor: Vector.create(getRangeValue(p.options.bounce.horizontal), getRangeValue(p.options.bounce.vertical))
4521
+ factor: Vector.create(getValue(p.options.bounce.horizontal), getValue(p.options.bounce.vertical))
3943
4522
  };
3944
4523
  }
3945
4524
  function circleBounce(p1, p2) {
@@ -3985,7 +4564,7 @@ function rectBounce(particle, divBounds) {
3985
4564
  }, {
3986
4565
  min: divBounds.top,
3987
4566
  max: divBounds.bottom
3988
- }, particle.velocity.x, getRangeValue(particle.options.bounce.horizontal));
4567
+ }, particle.velocity.x, getValue(particle.options.bounce.horizontal));
3989
4568
 
3990
4569
  if (resH.bounced) {
3991
4570
  if (resH.velocity !== undefined) {
@@ -4009,7 +4588,7 @@ function rectBounce(particle, divBounds) {
4009
4588
  }, {
4010
4589
  min: divBounds.left,
4011
4590
  max: divBounds.right
4012
- }, particle.velocity.y, getRangeValue(particle.options.bounce.vertical));
4591
+ }, particle.velocity.y, getValue(particle.options.bounce.vertical));
4013
4592
 
4014
4593
  if (resV.bounced) {
4015
4594
  if (resV.velocity !== undefined) {
@@ -4501,7 +5080,7 @@ function setColorAnimation(colorValue, colorAnimation, reduceFactor) {
4501
5080
  colorValue.enable = colorAnimation.enable;
4502
5081
 
4503
5082
  if (colorValue.enable) {
4504
- colorValue.velocity = colorAnimation.speed / 100 * reduceFactor;
5083
+ colorValue.velocity = getRangeValue(colorAnimation.speed) / 100 * reduceFactor;
4505
5084
 
4506
5085
  if (colorAnimation.sync) {
4507
5086
  return;
@@ -4739,427 +5318,6 @@ function alterHsl(color, type, value) {
4739
5318
  l: color.l + (type === "darken" ? -1 : 1) * value
4740
5319
  };
4741
5320
  }
4742
- ;// CONCATENATED MODULE: ../../engine/dist/esm/Utils/DefaultOptions.js
4743
- const DefaultOptions = {
4744
- autoPlay: true,
4745
- background: {
4746
- color: {
4747
- value: ""
4748
- },
4749
- image: "",
4750
- position: "",
4751
- repeat: "",
4752
- size: "",
4753
- opacity: 1
4754
- },
4755
- backgroundMask: {
4756
- composite: "destination-out",
4757
- cover: {
4758
- color: {
4759
- value: "#fff"
4760
- },
4761
- opacity: 1
4762
- },
4763
- enable: false
4764
- },
4765
- fullScreen: {
4766
- enable: true,
4767
- zIndex: 0
4768
- },
4769
- detectRetina: true,
4770
- duration: 0,
4771
- fpsLimit: 60,
4772
- interactivity: {
4773
- detectsOn: "window",
4774
- events: {
4775
- onClick: {
4776
- enable: false,
4777
- mode: []
4778
- },
4779
- onDiv: {
4780
- selectors: [],
4781
- enable: false,
4782
- mode: [],
4783
- type: "circle"
4784
- },
4785
- onHover: {
4786
- enable: false,
4787
- mode: [],
4788
- parallax: {
4789
- enable: false,
4790
- force: 2,
4791
- smooth: 10
4792
- }
4793
- },
4794
- resize: true
4795
- },
4796
- modes: {
4797
- attract: {
4798
- distance: 200,
4799
- duration: 0.4,
4800
- easing: "ease-out-quad",
4801
- factor: 1,
4802
- maxSpeed: 50,
4803
- speed: 1
4804
- },
4805
- bounce: {
4806
- distance: 200
4807
- },
4808
- bubble: {
4809
- distance: 200,
4810
- duration: 0.4,
4811
- mix: false
4812
- },
4813
- connect: {
4814
- distance: 80,
4815
- links: {
4816
- opacity: 0.5
4817
- },
4818
- radius: 60
4819
- },
4820
- grab: {
4821
- distance: 100,
4822
- links: {
4823
- blink: false,
4824
- consent: false,
4825
- opacity: 1
4826
- }
4827
- },
4828
- light: {
4829
- area: {
4830
- gradient: {
4831
- start: {
4832
- value: "#ffffff"
4833
- },
4834
- stop: {
4835
- value: "#000000"
4836
- }
4837
- },
4838
- radius: 1000
4839
- },
4840
- shadow: {
4841
- color: {
4842
- value: "#000000"
4843
- },
4844
- length: 2000
4845
- }
4846
- },
4847
- push: {
4848
- default: true,
4849
- groups: [],
4850
- quantity: 4
4851
- },
4852
- remove: {
4853
- quantity: 2
4854
- },
4855
- repulse: {
4856
- distance: 200,
4857
- duration: 0.4,
4858
- factor: 100,
4859
- speed: 1,
4860
- maxSpeed: 50,
4861
- easing: "ease-out-quad"
4862
- },
4863
- slow: {
4864
- factor: 3,
4865
- radius: 200
4866
- },
4867
- trail: {
4868
- delay: 1,
4869
- pauseOnStop: false,
4870
- quantity: 1
4871
- }
4872
- }
4873
- },
4874
- manualParticles: [],
4875
- motion: {
4876
- disable: false,
4877
- reduce: {
4878
- factor: 4,
4879
- value: true
4880
- }
4881
- },
4882
- particles: {
4883
- bounce: {
4884
- horizontal: 1,
4885
- vertical: 1
4886
- },
4887
- collisions: {
4888
- bounce: {
4889
- horizontal: 1,
4890
- vertical: 1
4891
- },
4892
- enable: false,
4893
- mode: "bounce",
4894
- overlap: {
4895
- enable: true,
4896
- retries: 0
4897
- }
4898
- },
4899
- color: {
4900
- value: "#fff",
4901
- animation: {
4902
- h: {
4903
- count: 0,
4904
- enable: false,
4905
- offset: 0,
4906
- speed: 1,
4907
- sync: true
4908
- },
4909
- s: {
4910
- count: 0,
4911
- enable: false,
4912
- offset: 0,
4913
- speed: 1,
4914
- sync: true
4915
- },
4916
- l: {
4917
- count: 0,
4918
- enable: false,
4919
- offset: 0,
4920
- speed: 1,
4921
- sync: true
4922
- }
4923
- }
4924
- },
4925
- destroy: {
4926
- mode: "none",
4927
- split: {
4928
- count: 1,
4929
- factor: 3,
4930
- rate: {
4931
- min: 4,
4932
- max: 9
4933
- },
4934
- sizeOffset: true
4935
- }
4936
- },
4937
- gradient: [],
4938
- groups: {},
4939
- life: {
4940
- count: 0,
4941
- delay: {
4942
- value: 0,
4943
- sync: false
4944
- },
4945
- duration: {
4946
- value: 0,
4947
- sync: false
4948
- }
4949
- },
4950
- links: {
4951
- blink: false,
4952
- color: {
4953
- value: "#fff"
4954
- },
4955
- consent: false,
4956
- distance: 100,
4957
- enable: false,
4958
- frequency: 1,
4959
- opacity: 1,
4960
- shadow: {
4961
- blur: 5,
4962
- color: {
4963
- value: "#fff"
4964
- },
4965
- enable: false
4966
- },
4967
- triangles: {
4968
- enable: false,
4969
- frequency: 1
4970
- },
4971
- width: 1,
4972
- warp: false
4973
- },
4974
- move: {
4975
- angle: {
4976
- offset: 0,
4977
- value: 90
4978
- },
4979
- attract: {
4980
- distance: 200,
4981
- enable: false,
4982
- rotate: {
4983
- x: 3000,
4984
- y: 3000
4985
- }
4986
- },
4987
- center: {
4988
- x: 50,
4989
- y: 50,
4990
- radius: 0
4991
- },
4992
- decay: 0,
4993
- distance: {},
4994
- direction: "none",
4995
- drift: 0,
4996
- enable: false,
4997
- gravity: {
4998
- acceleration: 9.81,
4999
- enable: false,
5000
- inverse: false,
5001
- maxSpeed: 50
5002
- },
5003
- path: {
5004
- clamp: true,
5005
- delay: 0,
5006
- enable: false,
5007
- options: {}
5008
- },
5009
- outModes: {
5010
- default: "out"
5011
- },
5012
- random: false,
5013
- size: false,
5014
- speed: 2,
5015
- spin: {
5016
- acceleration: 0,
5017
- enable: false
5018
- },
5019
- straight: false,
5020
- trail: {
5021
- enable: false,
5022
- length: 10,
5023
- fillColor: {
5024
- value: "#000000"
5025
- }
5026
- },
5027
- vibrate: false,
5028
- warp: false
5029
- },
5030
- number: {
5031
- density: {
5032
- enable: false,
5033
- area: 800,
5034
- factor: 1000
5035
- },
5036
- limit: 0,
5037
- value: 100
5038
- },
5039
- opacity: {
5040
- value: 1,
5041
- animation: {
5042
- count: 0,
5043
- enable: false,
5044
- speed: 2,
5045
- sync: false,
5046
- destroy: "none",
5047
- startValue: "random"
5048
- }
5049
- },
5050
- orbit: {
5051
- animation: {
5052
- count: 0,
5053
- enable: false,
5054
- speed: 1,
5055
- sync: false
5056
- },
5057
- enable: false,
5058
- opacity: 1,
5059
- rotation: 0,
5060
- width: 1
5061
- },
5062
- reduceDuplicates: false,
5063
- repulse: {
5064
- value: 0,
5065
- enabled: false,
5066
- distance: 1,
5067
- duration: 1,
5068
- factor: 1,
5069
- speed: 1
5070
- },
5071
- roll: {
5072
- darken: {
5073
- enable: false,
5074
- value: 0
5075
- },
5076
- enable: false,
5077
- enlighten: {
5078
- enable: false,
5079
- value: 0
5080
- },
5081
- mode: "vertical",
5082
- speed: 25
5083
- },
5084
- rotate: {
5085
- value: 0,
5086
- animation: {
5087
- enable: false,
5088
- speed: 0,
5089
- sync: false
5090
- },
5091
- direction: "clockwise",
5092
- path: false
5093
- },
5094
- shadow: {
5095
- blur: 0,
5096
- color: {
5097
- value: "#000000"
5098
- },
5099
- enable: false,
5100
- offset: {
5101
- x: 0,
5102
- y: 0
5103
- }
5104
- },
5105
- shape: {
5106
- options: {},
5107
- type: "circle"
5108
- },
5109
- size: {
5110
- value: 3,
5111
- animation: {
5112
- count: 0,
5113
- enable: false,
5114
- speed: 5,
5115
- sync: false,
5116
- destroy: "none",
5117
- startValue: "random"
5118
- }
5119
- },
5120
- stroke: {
5121
- width: 0
5122
- },
5123
- tilt: {
5124
- value: 0,
5125
- animation: {
5126
- enable: false,
5127
- speed: 0,
5128
- sync: false
5129
- },
5130
- direction: "clockwise",
5131
- enable: false
5132
- },
5133
- twinkle: {
5134
- lines: {
5135
- enable: false,
5136
- frequency: 0.05,
5137
- opacity: 1
5138
- },
5139
- particles: {
5140
- enable: false,
5141
- frequency: 0.05,
5142
- opacity: 1
5143
- }
5144
- },
5145
- wobble: {
5146
- distance: 5,
5147
- enable: false,
5148
- speed: 50
5149
- },
5150
- zIndex: {
5151
- value: 0,
5152
- opacityRate: 1,
5153
- sizeRate: 1,
5154
- velocityRate: 1
5155
- }
5156
- },
5157
- pauseOnBlur: true,
5158
- pauseOnOutsideViewport: true,
5159
- responsive: [],
5160
- themes: [],
5161
- zLayers: 100
5162
- };
5163
5321
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Utils/EventDispatcher.js
5164
5322
  var EventDispatcher_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, state, value, kind, f) {
5165
5323
  if (kind === "m") throw new TypeError("Private method is not writable");
@@ -5242,7 +5400,6 @@ _EventDispatcher_listeners = new WeakMap();
5242
5400
 
5243
5401
 
5244
5402
 
5245
-
5246
5403
  ;// CONCATENATED MODULE: ../../engine/dist/esm/Core/Utils/Range.js
5247
5404
  class Range {
5248
5405
  constructor(x, y) {
@@ -6480,10 +6637,7 @@ class Canvas {
6480
6637
  const container = this.container;
6481
6638
  const pxRatio = container.retina.pixelRatio;
6482
6639
  const size = container.canvas.size;
6483
- const oldSize = {
6484
- width: size.width,
6485
- height: size.height
6486
- };
6640
+ const oldSize = Object.assign({}, size);
6487
6641
  size.width = this.element.offsetWidth * pxRatio;
6488
6642
  size.height = this.element.offsetHeight * pxRatio;
6489
6643
  this.element.width = size.width;
@@ -6558,7 +6712,7 @@ class Canvas {
6558
6712
  const zIndexOptions = particle.options.zIndex;
6559
6713
  const zOpacityFactor = (1 - particle.zIndexFactor) ** zIndexOptions.opacityRate;
6560
6714
  const radius = particle.getRadius();
6561
- const opacity = twinkling ? twinkle.opacity : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
6715
+ const opacity = twinkling ? getRangeValue(twinkle.opacity) : (_d = (_b = particle.bubble.opacity) !== null && _b !== void 0 ? _b : (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
6562
6716
  const strokeOpacity = (_f = (_e = particle.stroke) === null || _e === void 0 ? void 0 : _e.opacity) !== null && _f !== void 0 ? _f : opacity;
6563
6717
  const zOpacity = opacity * zOpacityFactor;
6564
6718
  const fillColorValue = fColor ? getStyleFromHsl(fColor, zOpacity) : undefined;
@@ -6800,6 +6954,7 @@ class Particle {
6800
6954
  maxDistance: {}
6801
6955
  };
6802
6956
  this.outType = "normal";
6957
+ this.ignoresResizeRatio = true;
6803
6958
  const pxRatio = container.retina.pixelRatio;
6804
6959
  const mainOptions = container.actualOptions;
6805
6960
  const particlesOptions = loadParticlesOptions(mainOptions.particles);
@@ -6834,7 +6989,7 @@ class Particle {
6834
6989
  this.fill = (_d = (_c = this.shapeData) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.fill;
6835
6990
  this.close = (_f = (_e = this.shapeData) === null || _e === void 0 ? void 0 : _e.close) !== null && _f !== void 0 ? _f : this.close;
6836
6991
  this.options = particlesOptions;
6837
- this.pathDelay = getRangeValue(this.options.move.path.delay) * 1000;
6992
+ this.pathDelay = getValue(this.options.move.path.delay) * 1000;
6838
6993
  const zIndexValue = getRangeValue(this.options.zIndex.value);
6839
6994
  container.retina.initParticle(this);
6840
6995
  const sizeOptions = this.options.size,
@@ -6845,7 +7000,7 @@ class Particle {
6845
7000
  max: getRangeMax(sizeRange) * pxRatio,
6846
7001
  min: getRangeMin(sizeRange) * pxRatio,
6847
7002
  loops: 0,
6848
- maxLoops: sizeOptions.animation.count
7003
+ maxLoops: getRangeValue(sizeOptions.animation.count)
6849
7004
  };
6850
7005
  const sizeAnimation = sizeOptions.animation;
6851
7006
 
@@ -6904,6 +7059,12 @@ class Particle {
6904
7059
  this.initialVelocity = this.calculateVelocity();
6905
7060
  this.velocity = this.initialVelocity.copy();
6906
7061
  this.moveDecay = 1 - getRangeValue(this.options.move.decay);
7062
+ const gravityOptions = this.options.move.gravity;
7063
+ this.gravity = {
7064
+ enable: gravityOptions.enable,
7065
+ acceleration: getRangeValue(gravityOptions.acceleration),
7066
+ inverse: gravityOptions.inverse
7067
+ };
6907
7068
  this.offset = Vector.origin;
6908
7069
  const particles = container.particles;
6909
7070
  particles.needsSort = particles.needsSort || particles.lastZIndex < this.position.z;
@@ -6996,12 +7157,14 @@ class Particle {
6996
7157
  }
6997
7158
 
6998
7159
  getFillColor() {
6999
- var _a, _b, _c;
7160
+ var _a, _b;
7000
7161
 
7001
7162
  const color = (_a = this.bubble.color) !== null && _a !== void 0 ? _a : getHslFromAnimation(this.color);
7002
7163
 
7003
7164
  if (color && this.roll && (this.backColor || this.roll.alter)) {
7004
- const rolled = Math.floor(((_c = (_b = this.roll) === null || _b === void 0 ? void 0 : _b.angle) !== null && _c !== void 0 ? _c : 0) / (Math.PI / 2)) % 2;
7165
+ const backFactor = this.options.roll.mode === "both" ? 2 : 1,
7166
+ backSum = this.options.roll.mode === "horizontal" ? Math.PI / 2 : 0,
7167
+ rolled = Math.floor((((_b = this.roll.angle) !== null && _b !== void 0 ? _b : 0) + backSum) / (Math.PI / backFactor)) % 2;
7005
7168
 
7006
7169
  if (rolled) {
7007
7170
  if (this.backColor) {
@@ -7066,7 +7229,7 @@ class Particle {
7066
7229
  return;
7067
7230
  }
7068
7231
 
7069
- const rate = getRangeValue(splitOptions.rate);
7232
+ const rate = getValue(splitOptions.rate);
7070
7233
 
7071
7234
  for (let i = 0; i < rate; i++) {
7072
7235
  this.container.particles.addSplitParticle(this);
@@ -7163,8 +7326,8 @@ class Particle {
7163
7326
  return res;
7164
7327
  }
7165
7328
 
7166
- const rad = Math.PI / 180 * moveOptions.angle.value;
7167
- const radOffset = Math.PI / 180 * moveOptions.angle.offset;
7329
+ const rad = Math.PI / 180 * getRangeValue(moveOptions.angle.value);
7330
+ const radOffset = Math.PI / 180 * getRangeValue(moveOptions.angle.offset);
7168
7331
  const range = {
7169
7332
  left: radOffset - rad / 2,
7170
7333
  right: radOffset + rad / 2
@@ -7361,11 +7524,12 @@ class Particles {
7361
7524
  for (const particle of this.array) {
7362
7525
  const resizeFactor = container.canvas.resizeFactor;
7363
7526
 
7364
- if (resizeFactor) {
7527
+ if (resizeFactor && !particle.ignoresResizeRatio) {
7365
7528
  particle.position.x *= resizeFactor.width;
7366
7529
  particle.position.y *= resizeFactor.height;
7367
7530
  }
7368
7531
 
7532
+ particle.ignoresResizeRatio = false;
7369
7533
  particle.bubble.inRange = false;
7370
7534
 
7371
7535
  for (const [, plugin] of this.container.plugins) {
@@ -7467,7 +7631,7 @@ class Particles {
7467
7631
  addSplitParticle(parent) {
7468
7632
  const splitOptions = parent.options.destroy.split;
7469
7633
  const options = loadParticlesOptions(parent.options);
7470
- const factor = getRangeValue(splitOptions.factor);
7634
+ const factor = getValue(splitOptions.factor);
7471
7635
  options.color.load({
7472
7636
  value: {
7473
7637
  hsl: parent.getFillColor()
@@ -7686,14 +7850,14 @@ class Retina {
7686
7850
  }
7687
7851
 
7688
7852
  const particles = options.particles;
7689
- this.attractDistance = particles.move.attract.distance * ratio;
7853
+ this.attractDistance = getRangeValue(particles.move.attract.distance) * ratio;
7690
7854
  this.linksDistance = particles.links.distance * ratio;
7691
7855
  this.linksWidth = particles.links.width * ratio;
7692
- this.sizeAnimationSpeed = particles.size.animation.speed * ratio;
7693
- this.maxSpeed = particles.move.gravity.maxSpeed * ratio;
7856
+ this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
7857
+ this.maxSpeed = getRangeValue(particles.move.gravity.maxSpeed) * ratio;
7694
7858
 
7695
7859
  if (particles.orbit.radius !== undefined) {
7696
- this.orbitRadius = particles.orbit.radius * this.container.retina.pixelRatio;
7860
+ this.orbitRadius = getRangeValue(particles.orbit.radius) * this.container.retina.pixelRatio;
7697
7861
  }
7698
7862
 
7699
7863
  const modes = options.interactivity.modes;
@@ -7716,16 +7880,16 @@ class Retina {
7716
7880
  const ratio = this.pixelRatio;
7717
7881
  const moveDistance = options.move.distance;
7718
7882
  const props = particle.retina;
7719
- props.attractDistance = options.move.attract.distance * ratio;
7883
+ props.attractDistance = getRangeValue(options.move.attract.distance) * ratio;
7720
7884
  props.linksDistance = options.links.distance * ratio;
7721
7885
  props.linksWidth = options.links.width * ratio;
7722
7886
  props.moveDrift = getRangeValue(options.move.drift) * ratio;
7723
7887
  props.moveSpeed = getRangeValue(options.move.speed) * ratio;
7724
- props.sizeAnimationSpeed = options.size.animation.speed * ratio;
7888
+ props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
7725
7889
  const maxDistance = props.maxDistance;
7726
7890
  maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;
7727
7891
  maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;
7728
- props.maxSpeed = options.move.gravity.maxSpeed * ratio;
7892
+ props.maxSpeed = getRangeValue(options.move.gravity.maxSpeed) * ratio;
7729
7893
  }
7730
7894
 
7731
7895
  handleMotionChange(mediaQuery) {
@@ -8652,6 +8816,28 @@ tsParticles.init();
8652
8816
 
8653
8817
 
8654
8818
 
8819
+ ;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSizeLimit.js
8820
+ class AbsorberSizeLimit {
8821
+ constructor() {
8822
+ this.radius = 0;
8823
+ this.mass = 0;
8824
+ }
8825
+
8826
+ load(data) {
8827
+ if (!data) {
8828
+ return;
8829
+ }
8830
+
8831
+ if (data.mass !== undefined) {
8832
+ this.mass = data.mass;
8833
+ }
8834
+
8835
+ if (data.radius !== undefined) {
8836
+ this.radius = data.radius;
8837
+ }
8838
+ }
8839
+
8840
+ }
8655
8841
  ;// CONCATENATED MODULE: ../../plugins/absorbers/dist/Options/Classes/AbsorberSize.js
8656
8842
 
8657
8843
 
@@ -8716,10 +8902,15 @@ class Absorber {
8716
8902
  }
8717
8903
 
8718
8904
  if (data.position !== undefined) {
8719
- this.position = {
8720
- x: data.position.x,
8721
- y: data.position.y
8722
- };
8905
+ this.position = {};
8906
+
8907
+ if (data.position.x !== undefined) {
8908
+ this.position.x = setRangeValue(data.position.x);
8909
+ }
8910
+
8911
+ if (data.position.y !== undefined) {
8912
+ this.position.y = setRangeValue(data.position.y);
8913
+ }
8723
8914
  }
8724
8915
 
8725
8916
  if (data.size !== undefined) {
@@ -8853,7 +9044,7 @@ class AbsorberInstance {
8853
9044
 
8854
9045
  const container = this.container;
8855
9046
  const percentPosition = this.options.position;
8856
- return Vector.create(((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width, ((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height);
9047
+ return Vector.create(getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width, getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height);
8857
9048
  }
8858
9049
 
8859
9050
  updateParticlePosition(particle, v) {
@@ -9336,10 +9527,15 @@ class Emitter {
9336
9527
  }
9337
9528
 
9338
9529
  if (data.position !== undefined) {
9339
- this.position = {
9340
- x: data.position.x,
9341
- y: data.position.y
9342
- };
9530
+ this.position = {};
9531
+
9532
+ if (data.position.x !== undefined) {
9533
+ this.position.x = setRangeValue(data.position.x);
9534
+ }
9535
+
9536
+ if (data.position.y !== undefined) {
9537
+ this.position.y = setRangeValue(data.position.y);
9538
+ }
9343
9539
  }
9344
9540
 
9345
9541
  if (data.spawnColor !== undefined) {
@@ -9377,9 +9573,9 @@ var _EmitterInstance_firstSpawn, _EmitterInstance_startParticlesAdded, _EmitterI
9377
9573
 
9378
9574
  class EmitterInstance {
9379
9575
  constructor(engine, emitters, container, options, position) {
9380
- var _a, _b, _c, _d, _e, _f;
9576
+ var _a, _b, _c, _d, _e, _f, _g;
9381
9577
 
9382
- var _g;
9578
+ var _h;
9383
9579
 
9384
9580
  this.emitters = emitters;
9385
9581
  this.container = container;
@@ -9405,8 +9601,9 @@ class EmitterInstance {
9405
9601
  }
9406
9602
 
9407
9603
  this.spawnDelay = ((_a = this.options.life.delay) !== null && _a !== void 0 ? _a : 0) * 1000 / this.container.retina.reduceFactor;
9604
+ this.position = (_b = this.initialPosition) !== null && _b !== void 0 ? _b : this.calcPosition();
9408
9605
  this.name = this.options.name;
9409
- this.shape = (_b = EmitterInstance_classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _b === void 0 ? void 0 : _b.getShape(this.options.shape);
9606
+ this.shape = (_c = EmitterInstance_classPrivateFieldGet(this, _EmitterInstance_engine, "f").emitterShapeManager) === null || _c === void 0 ? void 0 : _c.getShape(this.options.shape);
9410
9607
  this.fill = this.options.fill;
9411
9608
 
9412
9609
  EmitterInstance_classPrivateFieldSet(this, _EmitterInstance_firstSpawn, !this.options.life.wait, "f");
@@ -9415,8 +9612,8 @@ class EmitterInstance {
9415
9612
 
9416
9613
  let particlesOptions = deepExtend({}, this.options.particles);
9417
9614
  particlesOptions !== null && particlesOptions !== void 0 ? particlesOptions : particlesOptions = {};
9418
- (_c = particlesOptions.move) !== null && _c !== void 0 ? _c : particlesOptions.move = {};
9419
- (_d = (_g = particlesOptions.move).direction) !== null && _d !== void 0 ? _d : _g.direction = this.options.direction;
9615
+ (_d = particlesOptions.move) !== null && _d !== void 0 ? _d : particlesOptions.move = {};
9616
+ (_e = (_h = particlesOptions.move).direction) !== null && _e !== void 0 ? _e : _h.direction = this.options.direction;
9420
9617
 
9421
9618
  if (this.options.spawnColor) {
9422
9619
  this.spawnColor = colorToHsl(this.options.spawnColor);
@@ -9424,7 +9621,7 @@ class EmitterInstance {
9424
9621
 
9425
9622
  this.paused = !this.options.autoPlay;
9426
9623
  this.particlesOptions = particlesOptions;
9427
- this.size = (_e = this.options.size) !== null && _e !== void 0 ? _e : (() => {
9624
+ this.size = (_f = this.options.size) !== null && _f !== void 0 ? _f : (() => {
9428
9625
  const size = new EmitterSize();
9429
9626
  size.load({
9430
9627
  height: 0,
@@ -9433,7 +9630,7 @@ class EmitterInstance {
9433
9630
  });
9434
9631
  return size;
9435
9632
  })();
9436
- this.lifeCount = (_f = this.options.life.count) !== null && _f !== void 0 ? _f : -1;
9633
+ this.lifeCount = (_g = this.options.life.count) !== null && _g !== void 0 ? _g : -1;
9437
9634
  this.immortal = this.lifeCount <= 0;
9438
9635
 
9439
9636
  EmitterInstance_classPrivateFieldGet(this, _EmitterInstance_engine, "f").dispatchEvent("emitterCreated", {
@@ -9627,8 +9824,8 @@ class EmitterInstance {
9627
9824
  const container = this.container;
9628
9825
  const percentPosition = this.options.position;
9629
9826
  return {
9630
- x: ((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
9631
- y: ((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
9827
+ x: getRangeValue((_a = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.x) !== null && _a !== void 0 ? _a : Math.random() * 100) / 100 * container.canvas.size.width,
9828
+ y: getRangeValue((_b = percentPosition === null || percentPosition === void 0 ? void 0 : percentPosition.y) !== null && _b !== void 0 ? _b : Math.random() * 100) / 100 * container.canvas.size.height
9632
9829
  };
9633
9830
  }
9634
9831
 
@@ -9690,7 +9887,7 @@ class EmitterInstance {
9690
9887
  const colorOffset = randomInRange(animation.offset);
9691
9888
  const delay = getRangeValue(this.options.rate.delay);
9692
9889
  const emitFactor = 1000 * delay / container.retina.reduceFactor;
9693
- const colorSpeed = (_a = animation.speed) !== null && _a !== void 0 ? _a : 0;
9890
+ const colorSpeed = getRangeValue((_a = animation.speed) !== null && _a !== void 0 ? _a : 0);
9694
9891
  return (initValue + colorSpeed * container.fpsLimit / emitFactor + colorOffset * 3.6) % maxValue;
9695
9892
  }
9696
9893
 
@@ -11258,17 +11455,17 @@ class RollUpdater {
11258
11455
  const alterType = Math.random() >= 0.5 ? "darken" : "enlighten";
11259
11456
  particle.roll.alter = {
11260
11457
  type: alterType,
11261
- value: alterType === "darken" ? rollOpt.darken.value : rollOpt.enlighten.value
11458
+ value: getRangeValue(alterType === "darken" ? rollOpt.darken.value : rollOpt.enlighten.value)
11262
11459
  };
11263
11460
  } else if (rollOpt.darken.enable) {
11264
11461
  particle.roll.alter = {
11265
11462
  type: "darken",
11266
- value: rollOpt.darken.value
11463
+ value: getRangeValue(rollOpt.darken.value)
11267
11464
  };
11268
11465
  } else if (rollOpt.enlighten.enable) {
11269
11466
  particle.roll.alter = {
11270
11467
  type: "enlighten",
11271
- value: rollOpt.enlighten.value
11468
+ value: getRangeValue(rollOpt.enlighten.value)
11272
11469
  };
11273
11470
  }
11274
11471
  } else {
@@ -11407,7 +11604,7 @@ class AngleUpdater {
11407
11604
  const rotateAnimation = particle.options.rotate.animation;
11408
11605
 
11409
11606
  if (rotateAnimation.enable) {
11410
- particle.rotate.velocity = rotateAnimation.speed / 360 * this.container.retina.reduceFactor;
11607
+ particle.rotate.velocity = getRangeValue(rotateAnimation.speed) / 360 * this.container.retina.reduceFactor;
11411
11608
 
11412
11609
  if (!rotateAnimation.sync) {
11413
11610
  particle.rotate.velocity *= Math.random();
@@ -11650,7 +11847,7 @@ class BaseMover {
11650
11847
  diffFactor = 2,
11651
11848
  moveSpeed = baseSpeed * speedFactor / diffFactor;
11652
11849
  applyPath(particle, delta);
11653
- const gravityOptions = moveOptions.gravity,
11850
+ const gravityOptions = particle.gravity,
11654
11851
  gravityFactor = gravityOptions.enable && gravityOptions.inverse ? -1 : 1;
11655
11852
 
11656
11853
  if (gravityOptions.enable && moveSpeed) {
@@ -11670,7 +11867,7 @@ class BaseMover {
11670
11867
  const velocity = particle.velocity.mult(moveSpeed),
11671
11868
  maxSpeed = (_c = particle.retina.maxSpeed) !== null && _c !== void 0 ? _c : container.retina.maxSpeed;
11672
11869
 
11673
- if (gravityOptions.enable && gravityOptions.maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
11870
+ if (gravityOptions.enable && maxSpeed > 0 && (!gravityOptions.inverse && velocity.y >= 0 && velocity.y >= maxSpeed || gravityOptions.inverse && velocity.y <= 0 && velocity.y <= -maxSpeed)) {
11674
11871
  velocity.y = gravityFactor * maxSpeed;
11675
11872
 
11676
11873
  if (moveSpeed) {
@@ -14076,7 +14273,7 @@ function updateOpacity(particle, delta) {
14076
14273
  const minValue = particle.opacity.min;
14077
14274
  const maxValue = particle.opacity.max;
14078
14275
 
14079
- if (!(!particle.destroyed && particle.opacity.enable && (((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 0)))) {
14276
+ if (particle.destroyed || !particle.opacity.enable || ((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) > 0 && ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) > ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 0)) {
14080
14277
  return;
14081
14278
  }
14082
14279
 
@@ -14132,7 +14329,7 @@ class OpacityUpdater {
14132
14329
  min: getRangeMin(opacityOptions.value),
14133
14330
  value: getRangeValue(opacityOptions.value),
14134
14331
  loops: 0,
14135
- maxLoops: opacityOptions.animation.count
14332
+ maxLoops: getRangeValue(opacityOptions.animation.count)
14136
14333
  };
14137
14334
  const opacityAnimation = opacityOptions.animation;
14138
14335
 
@@ -14160,7 +14357,7 @@ class OpacityUpdater {
14160
14357
  break;
14161
14358
  }
14162
14359
 
14163
- particle.opacity.velocity = opacityAnimation.speed / 100 * this.container.retina.reduceFactor;
14360
+ particle.opacity.velocity = getRangeValue(opacityAnimation.speed) / 100 * this.container.retina.reduceFactor;
14164
14361
 
14165
14362
  if (!opacityAnimation.sync) {
14166
14363
  particle.opacity.velocity *= Math.random();
@@ -14169,9 +14366,9 @@ class OpacityUpdater {
14169
14366
  }
14170
14367
 
14171
14368
  isEnabled(particle) {
14172
- var _a, _b, _c;
14369
+ var _a, _b, _c, _d;
14173
14370
 
14174
- return !particle.destroyed && !particle.spawning && !!particle.opacity && particle.opacity.enable && (((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.opacity.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.opacity.maxLoops) !== null && _c !== void 0 ? _c : 0));
14371
+ return !particle.destroyed && !particle.spawning && !!particle.opacity && particle.opacity.enable && (((_a = particle.opacity.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.opacity.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.opacity.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.opacity.maxLoops) !== null && _d !== void 0 ? _d : 0));
14175
14372
  }
14176
14373
 
14177
14374
  update(particle, delta) {
@@ -14233,7 +14430,7 @@ function bounceHorizontal(data) {
14233
14430
  let bounced = false;
14234
14431
 
14235
14432
  if (data.direction === "right" && data.bounds.right >= data.canvasSize.width && velocity > 0 || data.direction === "left" && data.bounds.left <= 0 && velocity < 0) {
14236
- const newVelocity = getRangeValue(data.particle.options.bounce.horizontal);
14433
+ const newVelocity = getValue(data.particle.options.bounce.horizontal);
14237
14434
  data.particle.velocity.x *= -newVelocity;
14238
14435
  bounced = true;
14239
14436
  }
@@ -14260,7 +14457,7 @@ function bounceVertical(data) {
14260
14457
  let bounced = false;
14261
14458
 
14262
14459
  if (data.direction === "bottom" && data.bounds.bottom >= data.canvasSize.height && velocity > 0 || data.direction === "top" && data.bounds.top <= 0 && velocity < 0) {
14263
- const newVelocity = getRangeValue(data.particle.options.bounce.vertical);
14460
+ const newVelocity = getValue(data.particle.options.bounce.vertical);
14264
14461
  data.particle.velocity.y *= -newVelocity;
14265
14462
  bounced = true;
14266
14463
  }
@@ -15447,7 +15644,7 @@ class LinkInstance {
15447
15644
 
15448
15645
  if (twinkling && twinkleRgb !== undefined) {
15449
15646
  colorLine = twinkleRgb;
15450
- opacity = twinkle.opacity;
15647
+ opacity = getRangeValue(twinkle.opacity);
15451
15648
  }
15452
15649
  }
15453
15650
 
@@ -15730,7 +15927,7 @@ function updateSize(particle, delta) {
15730
15927
  const minValue = particle.size.min;
15731
15928
  const maxValue = particle.size.max;
15732
15929
 
15733
- if (!(!particle.destroyed && particle.size.enable && (((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) <= 0 || ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0)))) {
15930
+ if (particle.destroyed || !particle.size.enable || ((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) > ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0)) {
15734
15931
  return;
15735
15932
  }
15736
15933
 
@@ -15776,9 +15973,9 @@ class SizeUpdater {
15776
15973
  init() {}
15777
15974
 
15778
15975
  isEnabled(particle) {
15779
- var _a, _b, _c;
15976
+ var _a, _b, _c, _d;
15780
15977
 
15781
- return !particle.destroyed && !particle.spawning && particle.size.enable && (((_a = particle.size.loops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.loops) !== null && _b !== void 0 ? _b : 0) < ((_c = particle.size.maxLoops) !== null && _c !== void 0 ? _c : 0));
15978
+ return !particle.destroyed && !particle.spawning && particle.size.enable && (((_a = particle.size.maxLoops) !== null && _a !== void 0 ? _a : 0) <= 0 || ((_b = particle.size.maxLoops) !== null && _b !== void 0 ? _b : 0) > 0 && ((_c = particle.size.loops) !== null && _c !== void 0 ? _c : 0) < ((_d = particle.size.maxLoops) !== null && _d !== void 0 ? _d : 0));
15782
15979
  }
15783
15980
 
15784
15981
  update(particle, delta) {
@@ -16405,7 +16602,7 @@ class TiltUpdater {
16405
16602
  const tiltAnimation = particle.options.tilt.animation;
16406
16603
 
16407
16604
  if (tiltAnimation.enable) {
16408
- particle.tilt.velocity = tiltAnimation.speed / 360 * this.container.retina.reduceFactor;
16605
+ particle.tilt.velocity = getRangeValue(tiltAnimation.speed) / 360 * this.container.retina.reduceFactor;
16409
16606
 
16410
16607
  if (!tiltAnimation.sync) {
16411
16608
  particle.tilt.velocity *= Math.random();