@xdy-npm/react-particle-backgrounds 1.0.3 → 1.2.0
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/README.md +5 -2
- package/dist/index.d.ts +16 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +990 -903
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as D, jsxs as zt, Fragment as so } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as mt, createContext as oo, useState as Tt, useCallback as Ot, useContext as us, useRef as Pe, useMemo as Pi } from "react";
|
|
3
|
+
const We = "generated", ro = "pointerdown", ao = "pointerup", zi = "pointerleave", co = "pointerout", Qe = "pointermove", lo = "touchstart", rn = "touchend", uo = "touchmove", ho = "touchcancel", fo = "resize", po = "visibilitychange", le = "tsParticles - Error", Te = 100, q = 0.5, j = 1e3, W = {
|
|
4
4
|
x: 0,
|
|
5
5
|
y: 0,
|
|
6
6
|
z: 0
|
|
@@ -9,44 +9,44 @@ const He = "generated", ro = "pointerdown", ao = "pointerup", zi = "pointerleave
|
|
|
9
9
|
b: 0,
|
|
10
10
|
c: 0,
|
|
11
11
|
d: 1
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, yt = "random", Gt = "mid", G = 2, mo = Math.PI * G, ci = 60, hs = "true", an = "false", li = "canvas", cn = 0, Me = 2, ln = 4, yo = 1, un = 1, hn = 1, go = 4, fs = 1, Nt = 255, je = 360, Si = 100, Oi = 100, fn = 0, Ri = 0, vo = 60, bo = 0, Qt = 0.25, dn = q + Qt, pn = 0, wo = 1, xo = 0, _o = 0, ko = 1, Bi = 1, Co = 1, mn = 1, Xt = 0, ds = 1, Mo = 0, Po = 120, zo = 0, So = 0, Oo = 1e4, Ro = 0, To = 1, Zt = 0, ps = 1, Eo = 1, Io = 0, yn = 1, Do = 0, Lo = 0, gn = -Qt, vn = 1.5, bn = 0, Ao = 1, Fo = 0, Ti = 0, ms = 1, Bo = 1, Kt = 1, qo = 500, wn = 50, $o = 0, Ei = 1, ys = 0, xn = 1, Vo = 0, Be = 255, ui = 3, hi = 6, Ho = 1, Uo = 1, Wo = 0, jo = 0, Go = 0, No = 0;
|
|
13
|
+
var H;
|
|
14
14
|
(function(t) {
|
|
15
15
|
t.bottom = "bottom", t.bottomLeft = "bottom-left", t.bottomRight = "bottom-right", t.left = "left", t.none = "none", t.right = "right", t.top = "top", t.topLeft = "top-left", t.topRight = "top-right", t.outside = "outside", t.inside = "inside";
|
|
16
|
-
})(
|
|
16
|
+
})(H || (H = {}));
|
|
17
17
|
function gs(t) {
|
|
18
18
|
return typeof t == "boolean";
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function De(t) {
|
|
21
21
|
return typeof t == "string";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Le(t) {
|
|
24
24
|
return typeof t == "number";
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function at(t) {
|
|
27
27
|
return typeof t == "object" && t !== null;
|
|
28
28
|
}
|
|
29
29
|
function _e(t) {
|
|
30
30
|
return Array.isArray(t);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function v(t) {
|
|
33
33
|
return t == null;
|
|
34
34
|
}
|
|
35
35
|
class ie {
|
|
36
36
|
constructor(e, i, n) {
|
|
37
37
|
if (this._updateFromAngle = (s, o) => {
|
|
38
38
|
this.x = Math.cos(s) * o, this.y = Math.sin(s) * o;
|
|
39
|
-
}, !
|
|
39
|
+
}, !Le(e) && e) {
|
|
40
40
|
this.x = e.x, this.y = e.y;
|
|
41
41
|
const s = e;
|
|
42
|
-
this.z = s.z ? s.z :
|
|
42
|
+
this.z = s.z ? s.z : W.z;
|
|
43
43
|
} else if (e !== void 0 && i !== void 0)
|
|
44
|
-
this.x = e, this.y = i, this.z = n ??
|
|
44
|
+
this.x = e, this.y = i, this.z = n ?? W.z;
|
|
45
45
|
else
|
|
46
46
|
throw new Error(`${le} Vector3d not initialized correctly`);
|
|
47
47
|
}
|
|
48
48
|
static get origin() {
|
|
49
|
-
return ie.create(
|
|
49
|
+
return ie.create(W.x, W.y, W.z);
|
|
50
50
|
}
|
|
51
51
|
get angle() {
|
|
52
52
|
return Math.atan2(this.y, this.x);
|
|
@@ -88,7 +88,7 @@ class ie {
|
|
|
88
88
|
this.x /= e, this.y /= e, this.z /= e;
|
|
89
89
|
}
|
|
90
90
|
getLengthSq() {
|
|
91
|
-
return this.x **
|
|
91
|
+
return this.x ** Me + this.y ** Me;
|
|
92
92
|
}
|
|
93
93
|
mult(e) {
|
|
94
94
|
return ie.create(this.x * e, this.y * e, this.z * e);
|
|
@@ -101,12 +101,12 @@ class ie {
|
|
|
101
101
|
e != Zt && this.multTo(fs / e);
|
|
102
102
|
}
|
|
103
103
|
rotate(e) {
|
|
104
|
-
return ie.create(this.x * Math.cos(e) - this.y * Math.sin(e), this.x * Math.sin(e) + this.y * Math.cos(e),
|
|
104
|
+
return ie.create(this.x * Math.cos(e) - this.y * Math.sin(e), this.x * Math.sin(e) + this.y * Math.cos(e), W.z);
|
|
105
105
|
}
|
|
106
106
|
setTo(e) {
|
|
107
107
|
this.x = e.x, this.y = e.y;
|
|
108
108
|
const i = e;
|
|
109
|
-
this.z = i.z ? i.z :
|
|
109
|
+
this.z = i.z ? i.z : W.z;
|
|
110
110
|
}
|
|
111
111
|
sub(e) {
|
|
112
112
|
return ie.create(this.x - e.x, this.y - e.y, this.z - e.z);
|
|
@@ -115,18 +115,18 @@ class ie {
|
|
|
115
115
|
this.x -= e.x, this.y -= e.y, this.z -= e.z;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
class
|
|
118
|
+
class $ extends ie {
|
|
119
119
|
constructor(e, i) {
|
|
120
|
-
super(e, i,
|
|
120
|
+
super(e, i, W.z);
|
|
121
121
|
}
|
|
122
122
|
static get origin() {
|
|
123
|
-
return
|
|
123
|
+
return $.create(W.x, W.y);
|
|
124
124
|
}
|
|
125
125
|
static clone(e) {
|
|
126
|
-
return
|
|
126
|
+
return $.create(e.x, e.y);
|
|
127
127
|
}
|
|
128
128
|
static create(e, i) {
|
|
129
|
-
return new
|
|
129
|
+
return new $(e, i);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
let Yo = Math.random;
|
|
@@ -134,7 +134,7 @@ const vs = {
|
|
|
134
134
|
nextFrame: (t) => requestAnimationFrame(t),
|
|
135
135
|
cancel: (t) => cancelAnimationFrame(t)
|
|
136
136
|
};
|
|
137
|
-
function
|
|
137
|
+
function T() {
|
|
138
138
|
return ue(Yo(), 0, 1 - Number.EPSILON);
|
|
139
139
|
}
|
|
140
140
|
function Qo(t) {
|
|
@@ -152,19 +152,19 @@ function fi(t, e, i, n) {
|
|
|
152
152
|
function ne(t) {
|
|
153
153
|
const e = xe(t), i = 0;
|
|
154
154
|
let n = ti(t);
|
|
155
|
-
return e === n && (n = i),
|
|
155
|
+
return e === n && (n = i), T() * (e - n) + n;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function _(t) {
|
|
158
|
+
return Le(t) ? t : ne(t);
|
|
159
159
|
}
|
|
160
160
|
function ti(t) {
|
|
161
|
-
return
|
|
161
|
+
return Le(t) ? t : t.min;
|
|
162
162
|
}
|
|
163
163
|
function xe(t) {
|
|
164
|
-
return
|
|
164
|
+
return Le(t) ? t : t.max;
|
|
165
165
|
}
|
|
166
166
|
function S(t, e) {
|
|
167
|
-
if (t === e || e === void 0 &&
|
|
167
|
+
if (t === e || e === void 0 && Le(t))
|
|
168
168
|
return t;
|
|
169
169
|
const i = ti(t), n = xe(t);
|
|
170
170
|
return e !== void 0 ? {
|
|
@@ -183,74 +183,74 @@ function Ie(t) {
|
|
|
183
183
|
return t * Math.PI / 180;
|
|
184
184
|
}
|
|
185
185
|
function Zo(t, e, i) {
|
|
186
|
-
if (
|
|
186
|
+
if (Le(t))
|
|
187
187
|
return Ie(t);
|
|
188
188
|
switch (t) {
|
|
189
|
-
case
|
|
190
|
-
return -Math.PI *
|
|
191
|
-
case
|
|
189
|
+
case H.top:
|
|
190
|
+
return -Math.PI * q;
|
|
191
|
+
case H.topRight:
|
|
192
192
|
return -Math.PI * Qt;
|
|
193
|
-
case
|
|
193
|
+
case H.right:
|
|
194
194
|
return bo;
|
|
195
|
-
case
|
|
195
|
+
case H.bottomRight:
|
|
196
196
|
return Math.PI * Qt;
|
|
197
|
-
case
|
|
198
|
-
return Math.PI *
|
|
199
|
-
case
|
|
197
|
+
case H.bottom:
|
|
198
|
+
return Math.PI * q;
|
|
199
|
+
case H.bottomLeft:
|
|
200
200
|
return Math.PI * dn;
|
|
201
|
-
case
|
|
201
|
+
case H.left:
|
|
202
202
|
return Math.PI;
|
|
203
|
-
case
|
|
203
|
+
case H.topLeft:
|
|
204
204
|
return -Math.PI * dn;
|
|
205
|
-
case
|
|
205
|
+
case H.inside:
|
|
206
206
|
return Math.atan2(i.y - e.y, i.x - e.x);
|
|
207
|
-
case
|
|
207
|
+
case H.outside:
|
|
208
208
|
return Math.atan2(e.y - i.y, e.x - i.x);
|
|
209
209
|
default:
|
|
210
|
-
return
|
|
210
|
+
return T() * mo;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
function Ko(t) {
|
|
214
|
-
const e =
|
|
214
|
+
const e = $.origin;
|
|
215
215
|
return e.length = 1, e.angle = t, e;
|
|
216
216
|
}
|
|
217
217
|
function _n(t, e, i, n) {
|
|
218
|
-
return
|
|
218
|
+
return $.create(t.x * (i - n) / (i + n) + e.x * G * n / (i + n), t.y);
|
|
219
219
|
}
|
|
220
220
|
function Jo(t) {
|
|
221
221
|
var e, i;
|
|
222
222
|
return {
|
|
223
|
-
x: ((e = t.position) == null ? void 0 : e.x) ??
|
|
224
|
-
y: ((i = t.position) == null ? void 0 : i.y) ??
|
|
223
|
+
x: ((e = t.position) == null ? void 0 : e.x) ?? T() * t.size.width,
|
|
224
|
+
y: ((i = t.position) == null ? void 0 : i.y) ?? T() * t.size.height
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
function bs(t) {
|
|
228
|
-
return t ? t.endsWith("%") ? parseFloat(t) /
|
|
228
|
+
return t ? t.endsWith("%") ? parseFloat(t) / Te : parseFloat(t) : 1;
|
|
229
229
|
}
|
|
230
|
-
var
|
|
230
|
+
var Ge;
|
|
231
231
|
(function(t) {
|
|
232
232
|
t.auto = "auto", t.increase = "increase", t.decrease = "decrease", t.random = "random";
|
|
233
|
-
})(
|
|
234
|
-
var
|
|
233
|
+
})(Ge || (Ge = {}));
|
|
234
|
+
var A;
|
|
235
235
|
(function(t) {
|
|
236
236
|
t.increasing = "increasing", t.decreasing = "decreasing";
|
|
237
|
-
})(
|
|
238
|
-
var
|
|
237
|
+
})(A || (A = {}));
|
|
238
|
+
var Xe;
|
|
239
239
|
(function(t) {
|
|
240
240
|
t.none = "none", t.max = "max", t.min = "min";
|
|
241
|
-
})(
|
|
241
|
+
})(Xe || (Xe = {}));
|
|
242
242
|
var z;
|
|
243
243
|
(function(t) {
|
|
244
244
|
t.bottom = "bottom", t.left = "left", t.right = "right", t.top = "top";
|
|
245
245
|
})(z || (z = {}));
|
|
246
|
-
var
|
|
246
|
+
var gt;
|
|
247
247
|
(function(t) {
|
|
248
248
|
t.precise = "precise", t.percent = "percent";
|
|
249
|
-
})(
|
|
250
|
-
var
|
|
249
|
+
})(gt || (gt = {}));
|
|
250
|
+
var ut;
|
|
251
251
|
(function(t) {
|
|
252
252
|
t.max = "max", t.min = "min", t.random = "random";
|
|
253
|
-
})(
|
|
253
|
+
})(ut || (ut = {}));
|
|
254
254
|
const er = {
|
|
255
255
|
debug: console.debug,
|
|
256
256
|
error: console.error,
|
|
@@ -259,7 +259,7 @@ const er = {
|
|
|
259
259
|
verbose: console.log,
|
|
260
260
|
warning: console.warn
|
|
261
261
|
};
|
|
262
|
-
function
|
|
262
|
+
function Ze() {
|
|
263
263
|
return er;
|
|
264
264
|
}
|
|
265
265
|
function tr(t) {
|
|
@@ -274,31 +274,31 @@ function tr(t) {
|
|
|
274
274
|
}
|
|
275
275
|
function kn(t) {
|
|
276
276
|
const e = { bounced: !1 }, { pSide: i, pOtherSide: n, rectSide: s, rectOtherSide: o, velocity: r, factor: a } = t;
|
|
277
|
-
return n.min < o.min || n.min > o.max || n.max < o.min || n.max > o.max || (i.max >= s.min && i.max <= (s.max + s.min) *
|
|
277
|
+
return n.min < o.min || n.min > o.max || n.max < o.min || n.max > o.max || (i.max >= s.min && i.max <= (s.max + s.min) * q && r > pn || i.min <= s.max && i.min > (s.max + s.min) * q && r < pn) && (e.velocity = r * -a, e.bounced = !0), e;
|
|
278
278
|
}
|
|
279
279
|
function ir(t, e) {
|
|
280
280
|
const i = oe(e, (n) => t.matches(n));
|
|
281
281
|
return _e(i) ? i.some((n) => n) : i;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Ke() {
|
|
284
284
|
return typeof window > "u" || !window || typeof window.document > "u" || !window.document;
|
|
285
285
|
}
|
|
286
286
|
function nr() {
|
|
287
|
-
return !
|
|
287
|
+
return !Ke() && typeof matchMedia < "u";
|
|
288
288
|
}
|
|
289
289
|
function ws(t) {
|
|
290
290
|
if (nr())
|
|
291
291
|
return matchMedia(t);
|
|
292
292
|
}
|
|
293
293
|
function sr(t) {
|
|
294
|
-
if (!(
|
|
294
|
+
if (!(Ke() || typeof IntersectionObserver > "u"))
|
|
295
295
|
return new IntersectionObserver(t);
|
|
296
296
|
}
|
|
297
297
|
function or(t) {
|
|
298
|
-
if (!(
|
|
298
|
+
if (!(Ke() || typeof MutationObserver > "u"))
|
|
299
299
|
return new MutationObserver(t);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function L(t, e) {
|
|
302
302
|
return t === e || _e(e) && e.indexOf(t) > -1;
|
|
303
303
|
}
|
|
304
304
|
async function Cn(t, e) {
|
|
@@ -308,7 +308,7 @@ async function Cn(t, e) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function rr(t) {
|
|
311
|
-
return Math.floor(
|
|
311
|
+
return Math.floor(T() * t.length);
|
|
312
312
|
}
|
|
313
313
|
function ii(t, e, i = !0) {
|
|
314
314
|
return t[e !== void 0 && i ? e % t.length : rr(t)];
|
|
@@ -328,32 +328,32 @@ function At(t, e) {
|
|
|
328
328
|
top: t.y - e
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Y(t, ...e) {
|
|
332
332
|
for (const i of e) {
|
|
333
333
|
if (i == null)
|
|
334
334
|
continue;
|
|
335
|
-
if (!
|
|
335
|
+
if (!at(i)) {
|
|
336
336
|
t = i;
|
|
337
337
|
continue;
|
|
338
338
|
}
|
|
339
339
|
const n = Array.isArray(i);
|
|
340
|
-
n && (
|
|
340
|
+
n && (at(t) || !t || !Array.isArray(t)) ? t = [] : !n && (at(t) || !t || Array.isArray(t)) && (t = {});
|
|
341
341
|
for (const s in i) {
|
|
342
342
|
if (s === "__proto__")
|
|
343
343
|
continue;
|
|
344
344
|
const o = i, r = o[s], a = t;
|
|
345
|
-
a[s] =
|
|
345
|
+
a[s] = at(r) && Array.isArray(r) ? r.map((c) => Y(a[s], c)) : Y(a[s], r);
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
return t;
|
|
349
349
|
}
|
|
350
350
|
function $i(t, e) {
|
|
351
|
-
return !!ks(e, (i) => i.enable &&
|
|
351
|
+
return !!ks(e, (i) => i.enable && L(t, i.mode));
|
|
352
352
|
}
|
|
353
353
|
function Vi(t, e, i) {
|
|
354
354
|
oe(e, (n) => {
|
|
355
355
|
const s = n.mode;
|
|
356
|
-
n.enable &&
|
|
356
|
+
n.enable && L(t, s) && cr(n, i);
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
function cr(t, e) {
|
|
@@ -366,21 +366,21 @@ function xs(t, e) {
|
|
|
366
366
|
if (!(!e || !t))
|
|
367
367
|
return ks(t, (i) => ir(e, i.selectors));
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Ii(t) {
|
|
370
370
|
return {
|
|
371
371
|
position: t.getPosition(),
|
|
372
372
|
radius: t.getRadius(),
|
|
373
373
|
mass: t.getMass(),
|
|
374
374
|
velocity: t.velocity,
|
|
375
|
-
factor:
|
|
375
|
+
factor: $.create(_(t.options.bounce.horizontal.value), _(t.options.bounce.vertical.value))
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
function _s(t, e) {
|
|
379
379
|
const { x: i, y: n } = t.velocity.sub(e.velocity), [s, o] = [t.position, e.position], { dx: r, dy: a } = K(o, s);
|
|
380
380
|
if (i * r + n * a < 0)
|
|
381
381
|
return;
|
|
382
|
-
const l = -Math.atan2(a, r), u = t.mass, h = e.mass, d = t.velocity.rotate(l), f = e.velocity.rotate(l), p = _n(d, f, u, h), y = _n(f, d, u, h), m = p.rotate(-l),
|
|
383
|
-
t.velocity.x = m.x * t.factor.x, t.velocity.y = m.y * t.factor.y, e.velocity.x =
|
|
382
|
+
const l = -Math.atan2(a, r), u = t.mass, h = e.mass, d = t.velocity.rotate(l), f = e.velocity.rotate(l), p = _n(d, f, u, h), y = _n(f, d, u, h), m = p.rotate(-l), w = y.rotate(-l);
|
|
383
|
+
t.velocity.x = m.x * t.factor.x, t.velocity.y = m.y * t.factor.y, e.velocity.x = w.x * e.factor.x, e.velocity.y = w.y * e.factor.y;
|
|
384
384
|
}
|
|
385
385
|
function lr(t, e) {
|
|
386
386
|
const i = t.getPosition(), n = t.getRadius(), s = At(i, n), o = t.options.bounce, r = kn({
|
|
@@ -401,7 +401,7 @@ function lr(t, e) {
|
|
|
401
401
|
max: e.bottom
|
|
402
402
|
},
|
|
403
403
|
velocity: t.velocity.x,
|
|
404
|
-
factor:
|
|
404
|
+
factor: _(o.horizontal.value)
|
|
405
405
|
});
|
|
406
406
|
r.bounced && (r.velocity !== void 0 && (t.velocity.x = r.velocity), r.position !== void 0 && (t.position.x = r.position));
|
|
407
407
|
const a = kn({
|
|
@@ -422,7 +422,7 @@ function lr(t, e) {
|
|
|
422
422
|
max: e.right
|
|
423
423
|
},
|
|
424
424
|
velocity: t.velocity.y,
|
|
425
|
-
factor:
|
|
425
|
+
factor: _(o.vertical.value)
|
|
426
426
|
});
|
|
427
427
|
a.bounced && (a.velocity !== void 0 && (t.velocity.y = a.velocity), a.position !== void 0 && (t.position.y = a.position));
|
|
428
428
|
}
|
|
@@ -437,65 +437,65 @@ function ks(t, e) {
|
|
|
437
437
|
}
|
|
438
438
|
function Cs(t, e) {
|
|
439
439
|
const i = t.value, n = t.animation, s = {
|
|
440
|
-
delayTime:
|
|
440
|
+
delayTime: _(n.delay) * j,
|
|
441
441
|
enable: n.enable,
|
|
442
|
-
value:
|
|
442
|
+
value: _(t.value) * e,
|
|
443
443
|
max: xe(i) * e,
|
|
444
444
|
min: ti(i) * e,
|
|
445
445
|
loops: 0,
|
|
446
|
-
maxLoops:
|
|
446
|
+
maxLoops: _(n.count),
|
|
447
447
|
time: 0
|
|
448
448
|
}, o = 1;
|
|
449
449
|
if (n.enable) {
|
|
450
|
-
switch (s.decay = o -
|
|
451
|
-
case
|
|
452
|
-
s.status =
|
|
450
|
+
switch (s.decay = o - _(n.decay), n.mode) {
|
|
451
|
+
case Ge.increase:
|
|
452
|
+
s.status = A.increasing;
|
|
453
453
|
break;
|
|
454
|
-
case
|
|
455
|
-
s.status =
|
|
454
|
+
case Ge.decrease:
|
|
455
|
+
s.status = A.decreasing;
|
|
456
456
|
break;
|
|
457
|
-
case
|
|
458
|
-
s.status =
|
|
457
|
+
case Ge.random:
|
|
458
|
+
s.status = T() >= q ? A.increasing : A.decreasing;
|
|
459
459
|
break;
|
|
460
460
|
}
|
|
461
|
-
const r = n.mode ===
|
|
461
|
+
const r = n.mode === Ge.auto;
|
|
462
462
|
switch (n.startValue) {
|
|
463
|
-
case
|
|
464
|
-
s.value = s.min, r && (s.status =
|
|
463
|
+
case ut.min:
|
|
464
|
+
s.value = s.min, r && (s.status = A.increasing);
|
|
465
465
|
break;
|
|
466
|
-
case
|
|
467
|
-
s.value = s.max, r && (s.status =
|
|
466
|
+
case ut.max:
|
|
467
|
+
s.value = s.max, r && (s.status = A.decreasing);
|
|
468
468
|
break;
|
|
469
|
-
case
|
|
469
|
+
case ut.random:
|
|
470
470
|
default:
|
|
471
|
-
s.value = ne(s), r && (s.status =
|
|
471
|
+
s.value = ne(s), r && (s.status = T() >= q ? A.increasing : A.decreasing);
|
|
472
472
|
break;
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
return s.initialValue = s.value, s;
|
|
476
476
|
}
|
|
477
477
|
function ur(t, e) {
|
|
478
|
-
if (!(t.mode ===
|
|
478
|
+
if (!(t.mode === gt.percent)) {
|
|
479
479
|
const { mode: s, ...o } = t;
|
|
480
480
|
return o;
|
|
481
481
|
}
|
|
482
482
|
return "x" in t ? {
|
|
483
|
-
x: t.x /
|
|
484
|
-
y: t.y /
|
|
483
|
+
x: t.x / Te * e.width,
|
|
484
|
+
y: t.y / Te * e.height
|
|
485
485
|
} : {
|
|
486
|
-
width: t.width /
|
|
487
|
-
height: t.height /
|
|
486
|
+
width: t.width / Te * e.width,
|
|
487
|
+
height: t.height / Te * e.height
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Ms(t, e) {
|
|
491
491
|
return ur(t, e);
|
|
492
492
|
}
|
|
493
493
|
function hr(t, e, i, n, s) {
|
|
494
494
|
switch (e) {
|
|
495
|
-
case
|
|
495
|
+
case Xe.max:
|
|
496
496
|
i >= s && t.destroy();
|
|
497
497
|
break;
|
|
498
|
-
case
|
|
498
|
+
case Xe.min:
|
|
499
499
|
i <= n && t.destroy();
|
|
500
500
|
break;
|
|
501
501
|
}
|
|
@@ -506,11 +506,11 @@ function Hi(t, e, i, n, s) {
|
|
|
506
506
|
const u = (e.velocity ?? 0) * s.factor, h = e.min, d = e.max, f = e.decay ?? 1;
|
|
507
507
|
if (e.time || (e.time = 0), (e.delayTime ?? 0) > 0 && e.time < (e.delayTime ?? 0) && (e.time += s.value), !((e.delayTime ?? 0) > 0 && e.time < (e.delayTime ?? 0))) {
|
|
508
508
|
switch (e.status) {
|
|
509
|
-
case
|
|
510
|
-
e.value >= d ? (i ? e.status =
|
|
509
|
+
case A.increasing:
|
|
510
|
+
e.value >= d ? (i ? e.status = A.decreasing : e.value -= d, e.loops || (e.loops = 0), e.loops++) : e.value += u;
|
|
511
511
|
break;
|
|
512
|
-
case
|
|
513
|
-
e.value <= h ? (i ? e.status =
|
|
512
|
+
case A.decreasing:
|
|
513
|
+
e.value <= h ? (i ? e.status = A.increasing : e.value += d, e.loops || (e.loops = 0), e.loops++) : e.value -= u;
|
|
514
514
|
}
|
|
515
515
|
e.velocity && f !== 1 && (e.velocity *= f), hr(t, n, e.value, h, d), t.destroyed || (e.value = ue(e.value, h, d));
|
|
516
516
|
}
|
|
@@ -522,7 +522,7 @@ function fr(t) {
|
|
|
522
522
|
return e;
|
|
523
523
|
for (const r in t) {
|
|
524
524
|
const a = t[r];
|
|
525
|
-
if (!Object.prototype.hasOwnProperty.call(t, r) ||
|
|
525
|
+
if (!Object.prototype.hasOwnProperty.call(t, r) || v(a))
|
|
526
526
|
continue;
|
|
527
527
|
const c = (i = t.getPropertyValue) == null ? void 0 : i.call(t, a);
|
|
528
528
|
if (!c)
|
|
@@ -566,9 +566,9 @@ function mr(t, e) {
|
|
|
566
566
|
function me(t, e, i, n = !0) {
|
|
567
567
|
if (!e)
|
|
568
568
|
return;
|
|
569
|
-
const s =
|
|
570
|
-
if (
|
|
571
|
-
return
|
|
569
|
+
const s = De(e) ? { value: e } : e;
|
|
570
|
+
if (De(s.value))
|
|
571
|
+
return Ps(t, s.value, i, n);
|
|
572
572
|
if (_e(s.value))
|
|
573
573
|
return me(t, {
|
|
574
574
|
value: ii(s.value, i, n)
|
|
@@ -579,14 +579,14 @@ function me(t, e, i, n = !0) {
|
|
|
579
579
|
return r;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function Ps(t, e, i, n = !0) {
|
|
583
583
|
if (!e)
|
|
584
584
|
return;
|
|
585
|
-
const s =
|
|
586
|
-
if (
|
|
587
|
-
return s.value ===
|
|
585
|
+
const s = De(e) ? { value: e } : e;
|
|
586
|
+
if (De(s.value))
|
|
587
|
+
return s.value === yt ? Ss() : yr(t, s.value);
|
|
588
588
|
if (_e(s.value))
|
|
589
|
-
return
|
|
589
|
+
return Ps(t, {
|
|
590
590
|
value: ii(s.value, i, n)
|
|
591
591
|
});
|
|
592
592
|
for (const o of t.colorManagers.values()) {
|
|
@@ -595,42 +595,42 @@ function Ms(t, e, i, n = !0) {
|
|
|
595
595
|
return r;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Et(t, e, i, n = !0) {
|
|
599
599
|
const s = me(t, e, i, n);
|
|
600
600
|
return s ? zs(s) : void 0;
|
|
601
601
|
}
|
|
602
602
|
function zs(t) {
|
|
603
603
|
const e = t.r / Nt, i = t.g / Nt, n = t.b / Nt, s = Math.max(e, i, n), o = Math.min(e, i, n), r = {
|
|
604
604
|
h: fn,
|
|
605
|
-
l: (s + o) *
|
|
605
|
+
l: (s + o) * q,
|
|
606
606
|
s: Ri
|
|
607
607
|
};
|
|
608
|
-
return s !== o && (r.s = r.l <
|
|
608
|
+
return s !== o && (r.s = r.l < q ? (s - o) / (s + o) : (s - o) / (G - s - o), r.h = e === s ? (i - n) / (s - o) : r.h = i === s ? G + (n - e) / (s - o) : G * G + (e - i) / (s - o)), r.l *= Oi, r.s *= Si, r.h *= vo, r.h < fn && (r.h += je), r.h >= je && (r.h -= je), r;
|
|
609
609
|
}
|
|
610
610
|
function yr(t, e) {
|
|
611
611
|
return mr(t, e);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
const e = (t.h %
|
|
613
|
+
function vt(t) {
|
|
614
|
+
const e = (t.h % je + je) % je, i = Math.max(Ri, Math.min(Si, t.s)), n = Math.max(Vo, Math.min(Oi, t.l)), s = e / je, o = i / Si, r = n / Oi;
|
|
615
615
|
if (i === Ri) {
|
|
616
|
-
const p = Math.round(r *
|
|
616
|
+
const p = Math.round(r * Be);
|
|
617
617
|
return { r: p, g: p, b: p };
|
|
618
618
|
}
|
|
619
619
|
const a = (p, y, m) => {
|
|
620
620
|
if (m < 0 && m++, m > 1 && m--, m * hi < 1)
|
|
621
621
|
return p + (y - p) * hi * m;
|
|
622
|
-
if (m *
|
|
622
|
+
if (m * G < 1)
|
|
623
623
|
return y;
|
|
624
|
-
if (m * ui < 1 *
|
|
625
|
-
const
|
|
626
|
-
return p + (y - p) * (
|
|
624
|
+
if (m * ui < 1 * G) {
|
|
625
|
+
const x = G / ui;
|
|
626
|
+
return p + (y - p) * (x - m) * hi;
|
|
627
627
|
}
|
|
628
628
|
return p;
|
|
629
|
-
}, c = r <
|
|
629
|
+
}, c = r < q ? r * (Ho + o) : r + o - r * o, l = G * r - c, u = Uo / ui, h = Math.min(Be, Be * a(l, c, s + u)), d = Math.min(Be, Be * a(l, c, s)), f = Math.min(Be, Be * a(l, c, s - u));
|
|
630
630
|
return { r: Math.round(h), g: Math.round(d), b: Math.round(f) };
|
|
631
631
|
}
|
|
632
632
|
function gr(t) {
|
|
633
|
-
const e =
|
|
633
|
+
const e = vt(t);
|
|
634
634
|
return {
|
|
635
635
|
a: t.a,
|
|
636
636
|
b: e.b,
|
|
@@ -639,29 +639,29 @@ function gr(t) {
|
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
function Ss(t) {
|
|
642
|
-
const e = Wo, i = Nt +
|
|
642
|
+
const e = Wo, i = Nt + Ei;
|
|
643
643
|
return {
|
|
644
644
|
b: Math.floor(ne(S(e, i))),
|
|
645
645
|
g: Math.floor(ne(S(e, i))),
|
|
646
646
|
r: Math.floor(ne(S(e, i)))
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function Se(t, e) {
|
|
650
650
|
return `rgba(${t.r}, ${t.g}, ${t.b}, ${e ?? Bi})`;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function It(t, e) {
|
|
653
653
|
return `hsla(${t.h}, ${t.s}%, ${t.l}%, ${e ?? Bi})`;
|
|
654
654
|
}
|
|
655
655
|
function Ui(t, e, i, n) {
|
|
656
656
|
let s = t, o = e;
|
|
657
|
-
return s.r === void 0 && (s =
|
|
657
|
+
return s.r === void 0 && (s = vt(t)), o.r === void 0 && (o = vt(e)), {
|
|
658
658
|
b: fi(s.b, o.b, i, n),
|
|
659
659
|
g: fi(s.g, o.g, i, n),
|
|
660
660
|
r: fi(s.r, o.r, i, n)
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
663
|
function Li(t, e, i) {
|
|
664
|
-
if (i ===
|
|
664
|
+
if (i === yt)
|
|
665
665
|
return Ss();
|
|
666
666
|
if (i === Gt) {
|
|
667
667
|
const n = t.getFillColor() ?? t.getStrokeColor(), s = (e == null ? void 0 : e.getFillColor()) ?? (e == null ? void 0 : e.getStrokeColor());
|
|
@@ -670,20 +670,20 @@ function Li(t, e, i) {
|
|
|
670
670
|
{
|
|
671
671
|
const o = n ?? s;
|
|
672
672
|
if (o)
|
|
673
|
-
return
|
|
673
|
+
return vt(o);
|
|
674
674
|
}
|
|
675
675
|
} else
|
|
676
676
|
return i;
|
|
677
677
|
}
|
|
678
678
|
function Os(t, e, i, n) {
|
|
679
|
-
const s =
|
|
680
|
-
return s ===
|
|
679
|
+
const s = De(e) ? e : e.value;
|
|
680
|
+
return s === yt ? n ? me(t, {
|
|
681
681
|
value: s
|
|
682
|
-
}) : i ?
|
|
682
|
+
}) : i ? yt : Gt : s === Gt ? Gt : me(t, {
|
|
683
683
|
value: s
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Mn(t) {
|
|
687
687
|
return t !== void 0 ? {
|
|
688
688
|
h: t.h.value,
|
|
689
689
|
s: t.s.value,
|
|
@@ -708,13 +708,13 @@ function Rs(t, e, i) {
|
|
|
708
708
|
return e && (di(n.h, e.h, i), di(n.s, e.s, i), di(n.l, e.l, i)), n;
|
|
709
709
|
}
|
|
710
710
|
function di(t, e, i) {
|
|
711
|
-
t.enable = e.enable, t.enable ? (t.velocity =
|
|
711
|
+
t.enable = e.enable, t.enable ? (t.velocity = _(e.speed) / Te * i, t.decay = ps - _(e.decay), t.status = A.increasing, t.loops = Go, t.maxLoops = _(e.count), t.time = No, t.delayTime = _(e.delay) * j, e.sync || (t.velocity *= T(), t.value *= T()), t.initialValue = t.value, t.offset = S(e.offset)) : t.velocity = jo;
|
|
712
712
|
}
|
|
713
713
|
function pi(t, e, i, n) {
|
|
714
714
|
if (!t || !t.enable || (t.maxLoops ?? 0) > 0 && (t.loops ?? 0) > (t.maxLoops ?? 0) || (t.time || (t.time = 0), (t.delayTime ?? 0) > 0 && t.time < (t.delayTime ?? 0) && (t.time += n.value), (t.delayTime ?? 0) > 0 && t.time < (t.delayTime ?? 0)))
|
|
715
715
|
return;
|
|
716
716
|
const u = t.offset ? ne(t.offset) : 0, h = (t.velocity ?? 0) * n.factor + u * 3.6, d = t.decay ?? 1, f = xe(e), p = ti(e);
|
|
717
|
-
!i || t.status ===
|
|
717
|
+
!i || t.status === A.increasing ? (t.value += h, t.value > f && (t.loops || (t.loops = 0), t.loops++, i ? t.status = A.decreasing : t.value -= f)) : (t.value -= h, t.value < 0 && (t.loops || (t.loops = 0), t.loops++, t.status = A.increasing)), t.velocity && d !== 1 && (t.velocity *= d), t.value = ue(t.value, p, f);
|
|
718
718
|
}
|
|
719
719
|
function Ts(t, e) {
|
|
720
720
|
if (!t)
|
|
@@ -726,17 +726,17 @@ function Ts(t, e) {
|
|
|
726
726
|
};
|
|
727
727
|
i && pi(i, o.h, !1, e), n && pi(n, o.s, !0, e), s && pi(s, o.l, !0, e);
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function Rt(t, e, i) {
|
|
730
730
|
t.beginPath(), t.moveTo(e.x, e.y), t.lineTo(i.x, i.y), t.closePath();
|
|
731
731
|
}
|
|
732
732
|
function vr(t, e, i) {
|
|
733
|
-
t.fillStyle = i ?? "rgba(0,0,0,0)", t.fillRect(
|
|
733
|
+
t.fillStyle = i ?? "rgba(0,0,0,0)", t.fillRect(W.x, W.y, e.width, e.height);
|
|
734
734
|
}
|
|
735
735
|
function br(t, e, i, n) {
|
|
736
|
-
i && (t.globalAlpha = n, t.drawImage(i,
|
|
736
|
+
i && (t.globalAlpha = n, t.drawImage(i, W.x, W.y, e.width, e.height), t.globalAlpha = 1);
|
|
737
737
|
}
|
|
738
738
|
function mi(t, e) {
|
|
739
|
-
t.clearRect(
|
|
739
|
+
t.clearRect(W.x, W.y, e.width, e.height);
|
|
740
740
|
}
|
|
741
741
|
function wr(t) {
|
|
742
742
|
const { container: e, context: i, particle: n, delta: s, colorStyles: o, backgroundMask: r, composite: a, radius: c, opacity: l, shadow: u, transform: h } = t, d = n.getPosition(), f = n.rotation + (n.pathRotation ? n.velocity.angle : $o), p = {
|
|
@@ -744,16 +744,16 @@ function wr(t) {
|
|
|
744
744
|
cos: Math.cos(f)
|
|
745
745
|
}, y = !!f, m = {
|
|
746
746
|
a: p.cos * (h.a ?? Ft.a),
|
|
747
|
-
b: y ? p.sin * (h.b ??
|
|
748
|
-
c: y ? -p.sin * (h.c ??
|
|
747
|
+
b: y ? p.sin * (h.b ?? Ei) : h.b ?? Ft.b,
|
|
748
|
+
c: y ? -p.sin * (h.c ?? Ei) : h.c ?? Ft.c,
|
|
749
749
|
d: p.cos * (h.d ?? Ft.d)
|
|
750
750
|
};
|
|
751
751
|
i.setTransform(m.a, m.b, m.c, m.d, d.x, d.y), r && (i.globalCompositeOperation = a);
|
|
752
|
-
const
|
|
753
|
-
u.enable &&
|
|
754
|
-
const
|
|
755
|
-
i.lineWidth =
|
|
756
|
-
const
|
|
752
|
+
const w = n.shadowColor;
|
|
753
|
+
u.enable && w && (i.shadowBlur = u.blur, i.shadowColor = Se(w), i.shadowOffsetX = u.offset.x, i.shadowOffsetY = u.offset.y), o.fill && (i.fillStyle = o.fill);
|
|
754
|
+
const b = n.strokeWidth ?? ys;
|
|
755
|
+
i.lineWidth = b, o.stroke && (i.strokeStyle = o.stroke);
|
|
756
|
+
const x = {
|
|
757
757
|
container: e,
|
|
758
758
|
context: i,
|
|
759
759
|
particle: n,
|
|
@@ -761,9 +761,9 @@ function wr(t) {
|
|
|
761
761
|
opacity: l,
|
|
762
762
|
delta: s,
|
|
763
763
|
transformData: m,
|
|
764
|
-
strokeWidth:
|
|
764
|
+
strokeWidth: b
|
|
765
765
|
};
|
|
766
|
-
_r(
|
|
766
|
+
_r(x), kr(x), xr(x), i.globalCompositeOperation = "source-over", i.resetTransform();
|
|
767
767
|
}
|
|
768
768
|
function xr(t) {
|
|
769
769
|
const { container: e, context: i, particle: n, radius: s, opacity: o, delta: r, transformData: a } = t;
|
|
@@ -813,10 +813,10 @@ function kr(t) {
|
|
|
813
813
|
function Cr(t, e, i) {
|
|
814
814
|
e.draw && e.draw(t, i);
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function Mr(t, e, i, n) {
|
|
817
817
|
e.drawParticle && e.drawParticle(t, i, n);
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function Pr(t, e, i) {
|
|
820
820
|
return {
|
|
821
821
|
h: t.h,
|
|
822
822
|
s: t.s,
|
|
@@ -827,7 +827,7 @@ function zr(t, e, i) {
|
|
|
827
827
|
const n = e[i];
|
|
828
828
|
n !== void 0 && (t[i] = (t[i] ?? wo) * n);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Pn(t, e, i = !1) {
|
|
831
831
|
if (!e)
|
|
832
832
|
return;
|
|
833
833
|
const n = t;
|
|
@@ -873,7 +873,7 @@ class Sr {
|
|
|
873
873
|
}, this._getPluginParticleColors = (o) => {
|
|
874
874
|
let r, a;
|
|
875
875
|
for (const c of this._colorPlugins)
|
|
876
|
-
if (!r && c.particleFillColor && (r =
|
|
876
|
+
if (!r && c.particleFillColor && (r = Et(this._engine, c.particleFillColor(o))), !a && c.particleStrokeColor && (a = Et(this._engine, c.particleStrokeColor(o))), r && a)
|
|
877
877
|
break;
|
|
878
878
|
return [r, a];
|
|
879
879
|
}, this._initCover = async () => {
|
|
@@ -885,7 +885,7 @@ class Sr {
|
|
|
885
885
|
...c,
|
|
886
886
|
a: r.opacity
|
|
887
887
|
};
|
|
888
|
-
this._coverColorStyle =
|
|
888
|
+
this._coverColorStyle = Se(l, l.a);
|
|
889
889
|
}
|
|
890
890
|
} else
|
|
891
891
|
await new Promise((c, l) => {
|
|
@@ -956,12 +956,12 @@ class Sr {
|
|
|
956
956
|
});
|
|
957
957
|
}, this._resetOriginalStyle = () => {
|
|
958
958
|
const o = this.element, r = this._originalStyle;
|
|
959
|
-
!o || !r ||
|
|
959
|
+
!o || !r || Pn(o, r, !0);
|
|
960
960
|
}, this._safeMutationObserver = (o) => {
|
|
961
961
|
this._mutationObserver && o(this._mutationObserver);
|
|
962
962
|
}, this._setFullScreenStyle = () => {
|
|
963
963
|
const o = this.element;
|
|
964
|
-
o &&
|
|
964
|
+
o && Pn(o, pr(this.container.actualOptions.fullScreen.zIndex), !0);
|
|
965
965
|
}, this._engine = i, this._standardSize = {
|
|
966
966
|
height: 0,
|
|
967
967
|
width: 0
|
|
@@ -977,7 +977,7 @@ class Sr {
|
|
|
977
977
|
}
|
|
978
978
|
clear() {
|
|
979
979
|
const e = this.container.actualOptions, i = e.particles.move.trail, n = this._trailFill;
|
|
980
|
-
e.backgroundMask.enable ? this.paint() : i.enable && i.length > _o && n ? n.color ? this._paintBase(
|
|
980
|
+
e.backgroundMask.enable ? this.paint() : i.enable && i.length > _o && n ? n.color ? this._paintBase(Se(n.color, n.opacity)) : n.image && this._paintImage(n.image, n.opacity) : e.clear && this.draw((s) => {
|
|
981
981
|
mi(s, this.size);
|
|
982
982
|
});
|
|
983
983
|
}
|
|
@@ -1008,27 +1008,27 @@ class Sr {
|
|
|
1008
1008
|
const s = e.getFillColor(), o = e.getStrokeColor() ?? s;
|
|
1009
1009
|
let [r, a] = this._getPluginParticleColors(e);
|
|
1010
1010
|
r || (r = s), a || (a = o), !(!r && !a) && this.draw((c) => {
|
|
1011
|
-
var
|
|
1012
|
-
const l = this.container, u = l.actualOptions, h = e.options.zIndex, d = ko - e.zIndexFactor, f = d ** h.opacityRate, p = e.bubble.opacity ?? ((
|
|
1013
|
-
fill: r ?
|
|
1011
|
+
var g;
|
|
1012
|
+
const l = this.container, u = l.actualOptions, h = e.options.zIndex, d = ko - e.zIndexFactor, f = d ** h.opacityRate, p = e.bubble.opacity ?? ((g = e.opacity) == null ? void 0 : g.value) ?? Bi, y = e.strokeOpacity ?? p, m = p * f, w = y * f, b = {}, x = {
|
|
1013
|
+
fill: r ? It(r, m) : void 0
|
|
1014
1014
|
};
|
|
1015
|
-
|
|
1015
|
+
x.stroke = a ? It(a, w) : x.fill, this._applyPreDrawUpdaters(c, e, n, m, x, b), wr({
|
|
1016
1016
|
container: l,
|
|
1017
1017
|
context: c,
|
|
1018
1018
|
particle: e,
|
|
1019
1019
|
delta: i,
|
|
1020
|
-
colorStyles:
|
|
1020
|
+
colorStyles: x,
|
|
1021
1021
|
backgroundMask: u.backgroundMask.enable,
|
|
1022
1022
|
composite: u.backgroundMask.composite,
|
|
1023
1023
|
radius: n * d ** h.sizeRate,
|
|
1024
1024
|
opacity: m,
|
|
1025
1025
|
shadow: e.options.shadow,
|
|
1026
|
-
transform:
|
|
1026
|
+
transform: b
|
|
1027
1027
|
}), this._applyPostDrawUpdaters(e);
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
1030
|
drawParticlePlugin(e, i, n) {
|
|
1031
|
-
this.draw((s) =>
|
|
1031
|
+
this.draw((s) => Mr(s, e, i, n));
|
|
1032
1032
|
}
|
|
1033
1033
|
drawPlugin(e, i) {
|
|
1034
1034
|
this.draw((n) => Cr(n, e, i));
|
|
@@ -1041,7 +1041,7 @@ class Sr {
|
|
|
1041
1041
|
try {
|
|
1042
1042
|
await this._initTrail();
|
|
1043
1043
|
} catch (e) {
|
|
1044
|
-
|
|
1044
|
+
Ze().error(e);
|
|
1045
1045
|
}
|
|
1046
1046
|
this.initBackground(), this._safeMutationObserver((e) => {
|
|
1047
1047
|
!this.element || !(this.element instanceof Node) || e.observe(this.element, { attributes: !0 });
|
|
@@ -1055,7 +1055,7 @@ class Sr {
|
|
|
1055
1055
|
if (s) {
|
|
1056
1056
|
if (i.color) {
|
|
1057
1057
|
const o = me(this._engine, i.color);
|
|
1058
|
-
s.backgroundColor = o ?
|
|
1058
|
+
s.backgroundColor = o ? Se(o, i.opacity) : "";
|
|
1059
1059
|
} else
|
|
1060
1060
|
s.backgroundColor = "";
|
|
1061
1061
|
s.backgroundImage = i.image || "", s.backgroundPosition = i.position || "", s.backgroundRepeat = i.repeat || "", s.backgroundSize = i.size || "";
|
|
@@ -1072,7 +1072,7 @@ class Sr {
|
|
|
1072
1072
|
e.afterDraw && this._postDrawUpdaters.push(e), (e.getColorStyles ?? e.getTransformValues ?? e.beforeDraw) && this._preDrawUpdaters.push(e);
|
|
1073
1073
|
}
|
|
1074
1074
|
loadCanvas(e) {
|
|
1075
|
-
this._generated && this.element && this.element.remove(), this._generated = e.dataset &&
|
|
1075
|
+
this._generated && this.element && this.element.remove(), this._generated = e.dataset && We in e.dataset ? e.dataset[We] === "true" : this._generated, this.element = e, this.element.ariaHidden = "true", this._originalStyle = fr(this.element.style);
|
|
1076
1076
|
const i = this._standardSize;
|
|
1077
1077
|
i.height = e.offsetHeight, i.width = e.offsetWidth;
|
|
1078
1078
|
const n = this.container.retina.pixelRatio, s = this.size;
|
|
@@ -1119,10 +1119,10 @@ class Sr {
|
|
|
1119
1119
|
e.particles.setDensity(), this._applyResizePlugins(), i && await e.refresh();
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
var
|
|
1122
|
+
var ht;
|
|
1123
1123
|
(function(t) {
|
|
1124
1124
|
t.canvas = "canvas", t.parent = "parent", t.window = "window";
|
|
1125
|
-
})(
|
|
1125
|
+
})(ht || (ht = {}));
|
|
1126
1126
|
function ae(t, e, i, n, s) {
|
|
1127
1127
|
if (n) {
|
|
1128
1128
|
let o = { passive: !0 };
|
|
@@ -1157,17 +1157,17 @@ class Or {
|
|
|
1157
1157
|
const n = this.container.canvas;
|
|
1158
1158
|
await (n == null ? void 0 : n.windowResize());
|
|
1159
1159
|
};
|
|
1160
|
-
this._resizeTimeout = setTimeout(() => void i(), this.container.actualOptions.interactivity.events.resize.delay *
|
|
1160
|
+
this._resizeTimeout = setTimeout(() => void i(), this.container.actualOptions.interactivity.events.resize.delay * j);
|
|
1161
1161
|
}, this._manageInteractivityListeners = (i, n) => {
|
|
1162
1162
|
const s = this._handlers, o = this.container, r = o.actualOptions, a = o.interactivity.element;
|
|
1163
1163
|
if (!a)
|
|
1164
1164
|
return;
|
|
1165
1165
|
const c = a, l = o.canvas;
|
|
1166
|
-
l.setPointerEvents(c === l.element ? "initial" : "none"), (r.interactivity.events.onHover.enable || r.interactivity.events.onClick.enable) && (ae(a,
|
|
1166
|
+
l.setPointerEvents(c === l.element ? "initial" : "none"), (r.interactivity.events.onHover.enable || r.interactivity.events.onClick.enable) && (ae(a, Qe, s.mouseMove, n), ae(a, lo, s.touchStart, n), ae(a, uo, s.touchMove, n), r.interactivity.events.onClick.enable ? (ae(a, rn, s.touchEndClick, n), ae(a, ao, s.mouseUp, n), ae(a, ro, s.mouseDown, n)) : ae(a, rn, s.touchEnd, n), ae(a, i, s.mouseLeave, n), ae(a, ho, s.touchCancel, n));
|
|
1167
1167
|
}, this._manageListeners = (i) => {
|
|
1168
1168
|
const n = this._handlers, s = this.container, o = s.actualOptions, r = o.interactivity.detectsOn, a = s.canvas.element;
|
|
1169
1169
|
let c = zi;
|
|
1170
|
-
r ===
|
|
1170
|
+
r === ht.window ? (s.interactivity.element = window, c = co) : r === ht.parent && a ? s.interactivity.element = a.parentElement ?? a.parentNode : s.interactivity.element = a, this._manageMediaMatch(i), this._manageResize(i), this._manageInteractivityListeners(c, i), document && ae(document, po, n.visibilityChange, i, !1);
|
|
1171
1171
|
}, this._manageMediaMatch = (i) => {
|
|
1172
1172
|
const n = this._handlers, s = ws("(prefers-color-scheme: dark)");
|
|
1173
1173
|
if (s) {
|
|
@@ -1229,13 +1229,13 @@ class Or {
|
|
|
1229
1229
|
y: l.clientY - u.top
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
} else if (s.interactivity.detectsOn ===
|
|
1232
|
+
} else if (s.interactivity.detectsOn === ht.parent) {
|
|
1233
1233
|
const u = l.target, h = l.currentTarget;
|
|
1234
1234
|
if (u && h && r) {
|
|
1235
1235
|
const d = u.getBoundingClientRect(), f = h.getBoundingClientRect(), p = r.getBoundingClientRect();
|
|
1236
1236
|
a = {
|
|
1237
|
-
x: l.offsetX +
|
|
1238
|
-
y: l.offsetY +
|
|
1237
|
+
x: l.offsetX + G * d.left - (f.left + p.left),
|
|
1238
|
+
y: l.offsetY + G * d.top - (f.top + p.top)
|
|
1239
1239
|
};
|
|
1240
1240
|
} else
|
|
1241
1241
|
a = {
|
|
@@ -1254,7 +1254,7 @@ class Or {
|
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
1256
|
const c = n.retina.pixelRatio;
|
|
1257
|
-
a && (a.x *= c, a.y *= c), o.mouse.position = a, o.status =
|
|
1257
|
+
a && (a.x *= c, a.y *= c), o.mouse.position = a, o.status = Qe;
|
|
1258
1258
|
}, this._touchEnd = (i) => {
|
|
1259
1259
|
const n = i, s = Array.from(n.changedTouches);
|
|
1260
1260
|
for (const o of s)
|
|
@@ -1299,24 +1299,24 @@ var Z;
|
|
|
1299
1299
|
(function(t) {
|
|
1300
1300
|
t.configAdded = "configAdded", t.containerInit = "containerInit", t.particlesSetup = "particlesSetup", t.containerStarted = "containerStarted", t.containerStopped = "containerStopped", t.containerDestroyed = "containerDestroyed", t.containerPaused = "containerPaused", t.containerPlay = "containerPlay", t.containerBuilt = "containerBuilt", t.particleAdded = "particleAdded", t.particleDestroyed = "particleDestroyed", t.particleRemoved = "particleRemoved";
|
|
1301
1301
|
})(Z || (Z = {}));
|
|
1302
|
-
class
|
|
1302
|
+
class Q {
|
|
1303
1303
|
constructor() {
|
|
1304
1304
|
this.value = "";
|
|
1305
1305
|
}
|
|
1306
1306
|
static create(e, i) {
|
|
1307
|
-
const n = new
|
|
1308
|
-
return n.load(e), i !== void 0 && (
|
|
1307
|
+
const n = new Q();
|
|
1308
|
+
return n.load(e), i !== void 0 && (De(i) || _e(i) ? n.load({ value: i }) : n.load(i)), n;
|
|
1309
1309
|
}
|
|
1310
1310
|
load(e) {
|
|
1311
|
-
|
|
1311
|
+
v(e) || v(e.value) || (this.value = e.value);
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
class Rr {
|
|
1315
1315
|
constructor() {
|
|
1316
|
-
this.color = new
|
|
1316
|
+
this.color = new Q(), this.color.value = "", this.image = "", this.position = "", this.repeat = "", this.size = "", this.opacity = 1;
|
|
1317
1317
|
}
|
|
1318
1318
|
load(e) {
|
|
1319
|
-
|
|
1319
|
+
v(e) || (e.color !== void 0 && (this.color = Q.create(this.color, e.color)), e.image !== void 0 && (this.image = e.image), e.position !== void 0 && (this.position = e.position), e.repeat !== void 0 && (this.repeat = e.repeat), e.size !== void 0 && (this.size = e.size), e.opacity !== void 0 && (this.opacity = e.opacity));
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
1322
|
class Tr {
|
|
@@ -1324,29 +1324,29 @@ class Tr {
|
|
|
1324
1324
|
this.opacity = 1;
|
|
1325
1325
|
}
|
|
1326
1326
|
load(e) {
|
|
1327
|
-
|
|
1327
|
+
v(e) || (e.color !== void 0 && (this.color = Q.create(this.color, e.color)), e.image !== void 0 && (this.image = e.image), e.opacity !== void 0 && (this.opacity = e.opacity));
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
1330
|
-
class
|
|
1330
|
+
class Er {
|
|
1331
1331
|
constructor() {
|
|
1332
1332
|
this.composite = "destination-out", this.cover = new Tr(), this.enable = !1;
|
|
1333
1333
|
}
|
|
1334
1334
|
load(e) {
|
|
1335
|
-
if (!
|
|
1335
|
+
if (!v(e)) {
|
|
1336
1336
|
if (e.composite !== void 0 && (this.composite = e.composite), e.cover !== void 0) {
|
|
1337
|
-
const i = e.cover, n =
|
|
1337
|
+
const i = e.cover, n = De(e.cover) ? { color: e.cover } : e.cover;
|
|
1338
1338
|
this.cover.load(i.color !== void 0 || i.image !== void 0 ? i : { color: n });
|
|
1339
1339
|
}
|
|
1340
1340
|
e.enable !== void 0 && (this.enable = e.enable);
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
|
-
class
|
|
1344
|
+
class Ir {
|
|
1345
1345
|
constructor() {
|
|
1346
1346
|
this.enable = !0, this.zIndex = 0;
|
|
1347
1347
|
}
|
|
1348
1348
|
load(e) {
|
|
1349
|
-
|
|
1349
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.zIndex !== void 0 && (this.zIndex = e.zIndex));
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
1352
|
class Dr {
|
|
@@ -1354,19 +1354,19 @@ class Dr {
|
|
|
1354
1354
|
this.enable = !1, this.mode = [];
|
|
1355
1355
|
}
|
|
1356
1356
|
load(e) {
|
|
1357
|
-
|
|
1357
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.mode !== void 0 && (this.mode = e.mode));
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
|
-
var
|
|
1360
|
+
var bt;
|
|
1361
1361
|
(function(t) {
|
|
1362
1362
|
t.circle = "circle", t.rectangle = "rectangle";
|
|
1363
|
-
})(
|
|
1363
|
+
})(bt || (bt = {}));
|
|
1364
1364
|
class zn {
|
|
1365
1365
|
constructor() {
|
|
1366
|
-
this.selectors = [], this.enable = !1, this.mode = [], this.type =
|
|
1366
|
+
this.selectors = [], this.enable = !1, this.mode = [], this.type = bt.circle;
|
|
1367
1367
|
}
|
|
1368
1368
|
load(e) {
|
|
1369
|
-
|
|
1369
|
+
v(e) || (e.selectors !== void 0 && (this.selectors = e.selectors), e.enable !== void 0 && (this.enable = e.enable), e.mode !== void 0 && (this.mode = e.mode), e.type !== void 0 && (this.type = e.type));
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
class Lr {
|
|
@@ -1374,7 +1374,7 @@ class Lr {
|
|
|
1374
1374
|
this.enable = !1, this.force = 2, this.smooth = 10;
|
|
1375
1375
|
}
|
|
1376
1376
|
load(e) {
|
|
1377
|
-
|
|
1377
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.force !== void 0 && (this.force = e.force), e.smooth !== void 0 && (this.smooth = e.smooth));
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
class Ar {
|
|
@@ -1382,7 +1382,7 @@ class Ar {
|
|
|
1382
1382
|
this.enable = !1, this.mode = [], this.parallax = new Lr();
|
|
1383
1383
|
}
|
|
1384
1384
|
load(e) {
|
|
1385
|
-
|
|
1385
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.mode !== void 0 && (this.mode = e.mode), this.parallax.load(e.parallax));
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
class Fr {
|
|
@@ -1390,7 +1390,7 @@ class Fr {
|
|
|
1390
1390
|
this.delay = 0.5, this.enable = !0;
|
|
1391
1391
|
}
|
|
1392
1392
|
load(e) {
|
|
1393
|
-
|
|
1393
|
+
v(e) || (e.delay !== void 0 && (this.delay = e.delay), e.enable !== void 0 && (this.enable = e.enable));
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
class Br {
|
|
@@ -1398,7 +1398,7 @@ class Br {
|
|
|
1398
1398
|
this.onClick = new Dr(), this.onDiv = new zn(), this.onHover = new Ar(), this.resize = new Fr();
|
|
1399
1399
|
}
|
|
1400
1400
|
load(e) {
|
|
1401
|
-
if (
|
|
1401
|
+
if (v(e))
|
|
1402
1402
|
return;
|
|
1403
1403
|
this.onClick.load(e.onClick);
|
|
1404
1404
|
const i = e.onDiv;
|
|
@@ -1413,7 +1413,7 @@ class qr {
|
|
|
1413
1413
|
this._engine = e, this._container = i;
|
|
1414
1414
|
}
|
|
1415
1415
|
load(e) {
|
|
1416
|
-
if (
|
|
1416
|
+
if (v(e) || !this._container)
|
|
1417
1417
|
return;
|
|
1418
1418
|
const i = this._engine.interactors.get(this._container);
|
|
1419
1419
|
if (i)
|
|
@@ -1421,12 +1421,12 @@ class qr {
|
|
|
1421
1421
|
n.loadModeOptions && n.loadModeOptions(this, e);
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
class
|
|
1424
|
+
class Es {
|
|
1425
1425
|
constructor(e, i) {
|
|
1426
|
-
this.detectsOn =
|
|
1426
|
+
this.detectsOn = ht.window, this.events = new Br(), this.modes = new qr(e, i);
|
|
1427
1427
|
}
|
|
1428
1428
|
load(e) {
|
|
1429
|
-
if (
|
|
1429
|
+
if (v(e))
|
|
1430
1430
|
return;
|
|
1431
1431
|
const i = e.detectsOn;
|
|
1432
1432
|
i !== void 0 && (this.detectsOn = i), this.events.load(e.events), this.modes.load(e.modes);
|
|
@@ -1434,35 +1434,35 @@ class Is {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
class $r {
|
|
1436
1436
|
load(e) {
|
|
1437
|
-
|
|
1437
|
+
v(e) || (e.position && (this.position = {
|
|
1438
1438
|
x: e.position.x ?? wn,
|
|
1439
1439
|
y: e.position.y ?? wn,
|
|
1440
|
-
mode: e.position.mode ??
|
|
1441
|
-
}), e.options && (this.options =
|
|
1440
|
+
mode: e.position.mode ?? gt.percent
|
|
1441
|
+
}), e.options && (this.options = Y({}, e.options)));
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
var
|
|
1444
|
+
var Ne;
|
|
1445
1445
|
(function(t) {
|
|
1446
1446
|
t.screen = "screen", t.canvas = "canvas";
|
|
1447
|
-
})(
|
|
1447
|
+
})(Ne || (Ne = {}));
|
|
1448
1448
|
class Vr {
|
|
1449
1449
|
constructor() {
|
|
1450
|
-
this.maxWidth = 1 / 0, this.options = {}, this.mode =
|
|
1450
|
+
this.maxWidth = 1 / 0, this.options = {}, this.mode = Ne.canvas;
|
|
1451
1451
|
}
|
|
1452
1452
|
load(e) {
|
|
1453
|
-
|
|
1453
|
+
v(e) || (v(e.maxWidth) || (this.maxWidth = e.maxWidth), v(e.mode) || (e.mode === Ne.screen ? this.mode = Ne.screen : this.mode = Ne.canvas), v(e.options) || (this.options = Y({}, e.options)));
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
var
|
|
1456
|
+
var Re;
|
|
1457
1457
|
(function(t) {
|
|
1458
1458
|
t.any = "any", t.dark = "dark", t.light = "light";
|
|
1459
|
-
})(
|
|
1459
|
+
})(Re || (Re = {}));
|
|
1460
1460
|
class Hr {
|
|
1461
1461
|
constructor() {
|
|
1462
|
-
this.auto = !1, this.mode =
|
|
1462
|
+
this.auto = !1, this.mode = Re.any, this.value = !1;
|
|
1463
1463
|
}
|
|
1464
1464
|
load(e) {
|
|
1465
|
-
|
|
1465
|
+
v(e) || (e.auto !== void 0 && (this.auto = e.auto), e.mode !== void 0 && (this.mode = e.mode), e.value !== void 0 && (this.value = e.value));
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
class Ur {
|
|
@@ -1470,7 +1470,7 @@ class Ur {
|
|
|
1470
1470
|
this.name = "", this.default = new Hr();
|
|
1471
1471
|
}
|
|
1472
1472
|
load(e) {
|
|
1473
|
-
|
|
1473
|
+
v(e) || (e.name !== void 0 && (this.name = e.name), this.default.load(e.default), e.options !== void 0 && (this.options = Y({}, e.options)));
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
1476
|
class Wi {
|
|
@@ -1478,15 +1478,15 @@ class Wi {
|
|
|
1478
1478
|
this.count = 0, this.enable = !1, this.speed = 1, this.decay = 0, this.delay = 0, this.sync = !1;
|
|
1479
1479
|
}
|
|
1480
1480
|
load(e) {
|
|
1481
|
-
|
|
1481
|
+
v(e) || (e.count !== void 0 && (this.count = S(e.count)), e.enable !== void 0 && (this.enable = e.enable), e.speed !== void 0 && (this.speed = S(e.speed)), e.decay !== void 0 && (this.decay = S(e.decay)), e.delay !== void 0 && (this.delay = S(e.delay)), e.sync !== void 0 && (this.sync = e.sync));
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
class ji extends Wi {
|
|
1485
1485
|
constructor() {
|
|
1486
|
-
super(), this.mode =
|
|
1486
|
+
super(), this.mode = Ge.auto, this.startValue = ut.random;
|
|
1487
1487
|
}
|
|
1488
1488
|
load(e) {
|
|
1489
|
-
super.load(e), !
|
|
1489
|
+
super.load(e), !v(e) && (e.mode !== void 0 && (this.mode = e.mode), e.startValue !== void 0 && (this.startValue = e.startValue));
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
class yi extends Wi {
|
|
@@ -1494,7 +1494,7 @@ class yi extends Wi {
|
|
|
1494
1494
|
super(), this.offset = 0, this.sync = !0;
|
|
1495
1495
|
}
|
|
1496
1496
|
load(e) {
|
|
1497
|
-
super.load(e), !
|
|
1497
|
+
super.load(e), !v(e) && e.offset !== void 0 && (this.offset = S(e.offset));
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
1500
|
class Wr {
|
|
@@ -1502,34 +1502,34 @@ class Wr {
|
|
|
1502
1502
|
this.h = new yi(), this.s = new yi(), this.l = new yi();
|
|
1503
1503
|
}
|
|
1504
1504
|
load(e) {
|
|
1505
|
-
|
|
1505
|
+
v(e) || (this.h.load(e.h), this.s.load(e.s), this.l.load(e.l));
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
class Dt extends
|
|
1508
|
+
class Dt extends Q {
|
|
1509
1509
|
constructor() {
|
|
1510
1510
|
super(), this.animation = new Wr();
|
|
1511
1511
|
}
|
|
1512
1512
|
static create(e, i) {
|
|
1513
1513
|
const n = new Dt();
|
|
1514
|
-
return n.load(e), i !== void 0 && (
|
|
1514
|
+
return n.load(e), i !== void 0 && (De(i) || _e(i) ? n.load({ value: i }) : n.load(i)), n;
|
|
1515
1515
|
}
|
|
1516
1516
|
load(e) {
|
|
1517
|
-
if (super.load(e),
|
|
1517
|
+
if (super.load(e), v(e))
|
|
1518
1518
|
return;
|
|
1519
1519
|
const i = e.animation;
|
|
1520
1520
|
i !== void 0 && (i.enable !== void 0 ? this.animation.h.load(i) : this.animation.load(e.animation));
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
|
-
var
|
|
1523
|
+
var ft;
|
|
1524
1524
|
(function(t) {
|
|
1525
1525
|
t.absorb = "absorb", t.bounce = "bounce", t.destroy = "destroy";
|
|
1526
|
-
})(
|
|
1526
|
+
})(ft || (ft = {}));
|
|
1527
1527
|
class jr {
|
|
1528
1528
|
constructor() {
|
|
1529
1529
|
this.speed = 2;
|
|
1530
1530
|
}
|
|
1531
1531
|
load(e) {
|
|
1532
|
-
|
|
1532
|
+
v(e) || e.speed !== void 0 && (this.speed = e.speed);
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
1535
|
class Gr {
|
|
@@ -1537,29 +1537,29 @@ class Gr {
|
|
|
1537
1537
|
this.enable = !0, this.retries = 0;
|
|
1538
1538
|
}
|
|
1539
1539
|
load(e) {
|
|
1540
|
-
|
|
1540
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.retries !== void 0 && (this.retries = e.retries));
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
|
-
class
|
|
1543
|
+
class Je {
|
|
1544
1544
|
constructor() {
|
|
1545
1545
|
this.value = 0;
|
|
1546
1546
|
}
|
|
1547
1547
|
load(e) {
|
|
1548
|
-
|
|
1548
|
+
v(e) || v(e.value) || (this.value = S(e.value));
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
|
-
class Nr extends
|
|
1551
|
+
class Nr extends Je {
|
|
1552
1552
|
constructor() {
|
|
1553
1553
|
super(), this.animation = new Wi();
|
|
1554
1554
|
}
|
|
1555
1555
|
load(e) {
|
|
1556
|
-
if (super.load(e),
|
|
1556
|
+
if (super.load(e), v(e))
|
|
1557
1557
|
return;
|
|
1558
1558
|
const i = e.animation;
|
|
1559
1559
|
i !== void 0 && this.animation.load(i);
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
|
-
class
|
|
1562
|
+
class Is extends Nr {
|
|
1563
1563
|
constructor() {
|
|
1564
1564
|
super(), this.animation = new ji();
|
|
1565
1565
|
}
|
|
@@ -1567,7 +1567,7 @@ class Es extends Nr {
|
|
|
1567
1567
|
super.load(e);
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
-
class Sn extends
|
|
1570
|
+
class Sn extends Je {
|
|
1571
1571
|
constructor() {
|
|
1572
1572
|
super(), this.value = 1;
|
|
1573
1573
|
}
|
|
@@ -1577,15 +1577,15 @@ class Ds {
|
|
|
1577
1577
|
this.horizontal = new Sn(), this.vertical = new Sn();
|
|
1578
1578
|
}
|
|
1579
1579
|
load(e) {
|
|
1580
|
-
|
|
1580
|
+
v(e) || (this.horizontal.load(e.horizontal), this.vertical.load(e.vertical));
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
1583
|
class Yr {
|
|
1584
1584
|
constructor() {
|
|
1585
|
-
this.absorb = new jr(), this.bounce = new Ds(), this.enable = !1, this.maxSpeed = 50, this.mode =
|
|
1585
|
+
this.absorb = new jr(), this.bounce = new Ds(), this.enable = !1, this.maxSpeed = 50, this.mode = ft.bounce, this.overlap = new Gr();
|
|
1586
1586
|
}
|
|
1587
1587
|
load(e) {
|
|
1588
|
-
|
|
1588
|
+
v(e) || (this.absorb.load(e.absorb), this.bounce.load(e.bounce), e.enable !== void 0 && (this.enable = e.enable), e.maxSpeed !== void 0 && (this.maxSpeed = S(e.maxSpeed)), e.mode !== void 0 && (this.mode = e.mode), this.overlap.load(e.overlap));
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
class Qr {
|
|
@@ -1593,13 +1593,13 @@ class Qr {
|
|
|
1593
1593
|
this.close = !0, this.fill = !0, this.options = {}, this.type = [];
|
|
1594
1594
|
}
|
|
1595
1595
|
load(e) {
|
|
1596
|
-
if (
|
|
1596
|
+
if (v(e))
|
|
1597
1597
|
return;
|
|
1598
1598
|
const i = e.options;
|
|
1599
1599
|
if (i !== void 0)
|
|
1600
1600
|
for (const n in i) {
|
|
1601
1601
|
const s = i[n];
|
|
1602
|
-
s && (this.options[n] =
|
|
1602
|
+
s && (this.options[n] = Y(this.options[n] ?? {}, s));
|
|
1603
1603
|
}
|
|
1604
1604
|
e.close !== void 0 && (this.close = e.close), e.fill !== void 0 && (this.fill = e.fill), e.type !== void 0 && (this.type = e.type);
|
|
1605
1605
|
}
|
|
@@ -1609,7 +1609,7 @@ class Xr {
|
|
|
1609
1609
|
this.offset = 0, this.value = 90;
|
|
1610
1610
|
}
|
|
1611
1611
|
load(e) {
|
|
1612
|
-
|
|
1612
|
+
v(e) || (e.offset !== void 0 && (this.offset = S(e.offset)), e.value !== void 0 && (this.value = S(e.value)));
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
1615
|
class Zr {
|
|
@@ -1620,7 +1620,7 @@ class Zr {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
}
|
|
1622
1622
|
load(e) {
|
|
1623
|
-
if (!
|
|
1623
|
+
if (!v(e) && (e.distance !== void 0 && (this.distance = S(e.distance)), e.enable !== void 0 && (this.enable = e.enable), e.rotate)) {
|
|
1624
1624
|
const i = e.rotate.x;
|
|
1625
1625
|
i !== void 0 && (this.rotate.x = i);
|
|
1626
1626
|
const n = e.rotate.y;
|
|
@@ -1630,10 +1630,10 @@ class Zr {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
class Kr {
|
|
1632
1632
|
constructor() {
|
|
1633
|
-
this.x = 50, this.y = 50, this.mode =
|
|
1633
|
+
this.x = 50, this.y = 50, this.mode = gt.percent, this.radius = 0;
|
|
1634
1634
|
}
|
|
1635
1635
|
load(e) {
|
|
1636
|
-
|
|
1636
|
+
v(e) || (e.x !== void 0 && (this.x = e.x), e.y !== void 0 && (this.y = e.y), e.mode !== void 0 && (this.mode = e.mode), e.radius !== void 0 && (this.radius = e.radius));
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
class Jr {
|
|
@@ -1641,20 +1641,20 @@ class Jr {
|
|
|
1641
1641
|
this.acceleration = 9.81, this.enable = !1, this.inverse = !1, this.maxSpeed = 50;
|
|
1642
1642
|
}
|
|
1643
1643
|
load(e) {
|
|
1644
|
-
|
|
1644
|
+
v(e) || (e.acceleration !== void 0 && (this.acceleration = S(e.acceleration)), e.enable !== void 0 && (this.enable = e.enable), e.inverse !== void 0 && (this.inverse = e.inverse), e.maxSpeed !== void 0 && (this.maxSpeed = S(e.maxSpeed)));
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
class ea {
|
|
1648
1648
|
constructor() {
|
|
1649
|
-
this.clamp = !0, this.delay = new
|
|
1649
|
+
this.clamp = !0, this.delay = new Je(), this.enable = !1, this.options = {};
|
|
1650
1650
|
}
|
|
1651
1651
|
load(e) {
|
|
1652
|
-
|
|
1652
|
+
v(e) || (e.clamp !== void 0 && (this.clamp = e.clamp), this.delay.load(e.delay), e.enable !== void 0 && (this.enable = e.enable), this.generator = e.generator, e.options && (this.options = Y(this.options, e.options)));
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
1655
|
class ta {
|
|
1656
1656
|
load(e) {
|
|
1657
|
-
|
|
1657
|
+
v(e) || (e.color !== void 0 && (this.color = Q.create(this.color, e.color)), e.image !== void 0 && (this.image = e.image));
|
|
1658
1658
|
}
|
|
1659
1659
|
}
|
|
1660
1660
|
class ia {
|
|
@@ -1662,19 +1662,19 @@ class ia {
|
|
|
1662
1662
|
this.enable = !1, this.length = 10, this.fill = new ta();
|
|
1663
1663
|
}
|
|
1664
1664
|
load(e) {
|
|
1665
|
-
|
|
1665
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.fill !== void 0 && this.fill.load(e.fill), e.length !== void 0 && (this.length = e.length));
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
|
-
var
|
|
1668
|
+
var F;
|
|
1669
1669
|
(function(t) {
|
|
1670
1670
|
t.bounce = "bounce", t.none = "none", t.out = "out", t.destroy = "destroy", t.split = "split";
|
|
1671
|
-
})(
|
|
1671
|
+
})(F || (F = {}));
|
|
1672
1672
|
class na {
|
|
1673
1673
|
constructor() {
|
|
1674
|
-
this.default =
|
|
1674
|
+
this.default = F.out;
|
|
1675
1675
|
}
|
|
1676
1676
|
load(e) {
|
|
1677
|
-
|
|
1677
|
+
v(e) || (e.default !== void 0 && (this.default = e.default), this.bottom = e.bottom ?? e.default, this.left = e.left ?? e.default, this.right = e.right ?? e.default, this.top = e.top ?? e.default);
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
class sa {
|
|
@@ -1682,40 +1682,40 @@ class sa {
|
|
|
1682
1682
|
this.acceleration = 0, this.enable = !1;
|
|
1683
1683
|
}
|
|
1684
1684
|
load(e) {
|
|
1685
|
-
|
|
1685
|
+
v(e) || (e.acceleration !== void 0 && (this.acceleration = S(e.acceleration)), e.enable !== void 0 && (this.enable = e.enable), e.position && (this.position = Y({}, e.position)));
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
class oa {
|
|
1689
1689
|
constructor() {
|
|
1690
|
-
this.angle = new Xr(), this.attract = new Zr(), this.center = new Kr(), this.decay = 0, this.distance = {}, this.direction =
|
|
1690
|
+
this.angle = new Xr(), this.attract = new Zr(), this.center = new Kr(), this.decay = 0, this.distance = {}, this.direction = H.none, this.drift = 0, this.enable = !1, this.gravity = new Jr(), this.path = new ea(), this.outModes = new na(), this.random = !1, this.size = !1, this.speed = 2, this.spin = new sa(), this.straight = !1, this.trail = new ia(), this.vibrate = !1, this.warp = !1;
|
|
1691
1691
|
}
|
|
1692
1692
|
load(e) {
|
|
1693
|
-
if (
|
|
1693
|
+
if (v(e))
|
|
1694
1694
|
return;
|
|
1695
|
-
this.angle.load(
|
|
1695
|
+
this.angle.load(Le(e.angle) ? { value: e.angle } : e.angle), this.attract.load(e.attract), this.center.load(e.center), e.decay !== void 0 && (this.decay = S(e.decay)), e.direction !== void 0 && (this.direction = e.direction), e.distance !== void 0 && (this.distance = Le(e.distance) ? {
|
|
1696
1696
|
horizontal: e.distance,
|
|
1697
1697
|
vertical: e.distance
|
|
1698
1698
|
} : { ...e.distance }), e.drift !== void 0 && (this.drift = S(e.drift)), e.enable !== void 0 && (this.enable = e.enable), this.gravity.load(e.gravity);
|
|
1699
1699
|
const i = e.outModes;
|
|
1700
|
-
i !== void 0 && (
|
|
1700
|
+
i !== void 0 && (at(i) ? this.outModes.load(i) : this.outModes.load({
|
|
1701
1701
|
default: i
|
|
1702
1702
|
})), this.path.load(e.path), e.random !== void 0 && (this.random = e.random), e.size !== void 0 && (this.size = e.size), e.speed !== void 0 && (this.speed = S(e.speed)), this.spin.load(e.spin), e.straight !== void 0 && (this.straight = e.straight), this.trail.load(e.trail), e.vibrate !== void 0 && (this.vibrate = e.vibrate), e.warp !== void 0 && (this.warp = e.warp);
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
1705
|
class ra extends ji {
|
|
1706
1706
|
constructor() {
|
|
1707
|
-
super(), this.destroy =
|
|
1707
|
+
super(), this.destroy = Xe.none, this.speed = 2;
|
|
1708
1708
|
}
|
|
1709
1709
|
load(e) {
|
|
1710
|
-
super.load(e), !
|
|
1710
|
+
super.load(e), !v(e) && e.destroy !== void 0 && (this.destroy = e.destroy);
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
|
-
class aa extends
|
|
1713
|
+
class aa extends Is {
|
|
1714
1714
|
constructor() {
|
|
1715
1715
|
super(), this.animation = new ra(), this.value = 1;
|
|
1716
1716
|
}
|
|
1717
1717
|
load(e) {
|
|
1718
|
-
if (
|
|
1718
|
+
if (v(e))
|
|
1719
1719
|
return;
|
|
1720
1720
|
super.load(e);
|
|
1721
1721
|
const i = e.animation;
|
|
@@ -1727,7 +1727,7 @@ class ca {
|
|
|
1727
1727
|
this.enable = !1, this.width = 1920, this.height = 1080;
|
|
1728
1728
|
}
|
|
1729
1729
|
load(e) {
|
|
1730
|
-
if (
|
|
1730
|
+
if (v(e))
|
|
1731
1731
|
return;
|
|
1732
1732
|
e.enable !== void 0 && (this.enable = e.enable);
|
|
1733
1733
|
const i = e.width;
|
|
@@ -1745,7 +1745,7 @@ class la {
|
|
|
1745
1745
|
this.mode = Lt.delete, this.value = 0;
|
|
1746
1746
|
}
|
|
1747
1747
|
load(e) {
|
|
1748
|
-
|
|
1748
|
+
v(e) || (e.mode !== void 0 && (this.mode = e.mode), e.value !== void 0 && (this.value = e.value));
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
1751
|
class ua {
|
|
@@ -1753,18 +1753,18 @@ class ua {
|
|
|
1753
1753
|
this.density = new ca(), this.limit = new la(), this.value = 0;
|
|
1754
1754
|
}
|
|
1755
1755
|
load(e) {
|
|
1756
|
-
|
|
1756
|
+
v(e) || (this.density.load(e.density), this.limit.load(e.limit), e.value !== void 0 && (this.value = e.value));
|
|
1757
1757
|
}
|
|
1758
1758
|
}
|
|
1759
1759
|
class ha {
|
|
1760
1760
|
constructor() {
|
|
1761
|
-
this.blur = 0, this.color = new
|
|
1761
|
+
this.blur = 0, this.color = new Q(), this.enable = !1, this.offset = {
|
|
1762
1762
|
x: 0,
|
|
1763
1763
|
y: 0
|
|
1764
1764
|
}, this.color.value = "#000";
|
|
1765
1765
|
}
|
|
1766
1766
|
load(e) {
|
|
1767
|
-
|
|
1767
|
+
v(e) || (e.blur !== void 0 && (this.blur = e.blur), this.color = Q.create(this.color, e.color), e.enable !== void 0 && (this.enable = e.enable), e.offset !== void 0 && (e.offset.x !== void 0 && (this.offset.x = e.offset.x), e.offset.y !== void 0 && (this.offset.y = e.offset.y)));
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
1770
|
class fa {
|
|
@@ -1772,31 +1772,31 @@ class fa {
|
|
|
1772
1772
|
this.close = !0, this.fill = !0, this.options = {}, this.type = "circle";
|
|
1773
1773
|
}
|
|
1774
1774
|
load(e) {
|
|
1775
|
-
if (
|
|
1775
|
+
if (v(e))
|
|
1776
1776
|
return;
|
|
1777
1777
|
const i = e.options;
|
|
1778
1778
|
if (i !== void 0)
|
|
1779
1779
|
for (const n in i) {
|
|
1780
1780
|
const s = i[n];
|
|
1781
|
-
s && (this.options[n] =
|
|
1781
|
+
s && (this.options[n] = Y(this.options[n] ?? {}, s));
|
|
1782
1782
|
}
|
|
1783
1783
|
e.close !== void 0 && (this.close = e.close), e.fill !== void 0 && (this.fill = e.fill), e.type !== void 0 && (this.type = e.type);
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
class da extends ji {
|
|
1787
1787
|
constructor() {
|
|
1788
|
-
super(), this.destroy =
|
|
1788
|
+
super(), this.destroy = Xe.none, this.speed = 5;
|
|
1789
1789
|
}
|
|
1790
1790
|
load(e) {
|
|
1791
|
-
super.load(e), !
|
|
1791
|
+
super.load(e), !v(e) && e.destroy !== void 0 && (this.destroy = e.destroy);
|
|
1792
1792
|
}
|
|
1793
1793
|
}
|
|
1794
|
-
class pa extends
|
|
1794
|
+
class pa extends Is {
|
|
1795
1795
|
constructor() {
|
|
1796
1796
|
super(), this.animation = new da(), this.value = 3;
|
|
1797
1797
|
}
|
|
1798
1798
|
load(e) {
|
|
1799
|
-
if (super.load(e),
|
|
1799
|
+
if (super.load(e), v(e))
|
|
1800
1800
|
return;
|
|
1801
1801
|
const i = e.animation;
|
|
1802
1802
|
i !== void 0 && this.animation.load(i);
|
|
@@ -1807,15 +1807,15 @@ class On {
|
|
|
1807
1807
|
this.width = 0;
|
|
1808
1808
|
}
|
|
1809
1809
|
load(e) {
|
|
1810
|
-
|
|
1810
|
+
v(e) || (e.color !== void 0 && (this.color = Dt.create(this.color, e.color)), e.width !== void 0 && (this.width = S(e.width)), e.opacity !== void 0 && (this.opacity = S(e.opacity)));
|
|
1811
1811
|
}
|
|
1812
1812
|
}
|
|
1813
|
-
class ma extends
|
|
1813
|
+
class ma extends Je {
|
|
1814
1814
|
constructor() {
|
|
1815
1815
|
super(), this.opacityRate = 1, this.sizeRate = 1, this.velocityRate = 1;
|
|
1816
1816
|
}
|
|
1817
1817
|
load(e) {
|
|
1818
|
-
super.load(e), !
|
|
1818
|
+
super.load(e), !v(e) && (e.opacityRate !== void 0 && (this.opacityRate = e.opacityRate), e.sizeRate !== void 0 && (this.sizeRate = e.sizeRate), e.velocityRate !== void 0 && (this.velocityRate = e.velocityRate));
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
1821
|
class ya {
|
|
@@ -1823,16 +1823,16 @@ class ya {
|
|
|
1823
1823
|
this._engine = e, this._container = i, this.bounce = new Ds(), this.collisions = new Yr(), this.color = new Dt(), this.color.value = "#fff", this.effect = new Qr(), this.groups = {}, this.move = new oa(), this.number = new ua(), this.opacity = new aa(), this.reduceDuplicates = !1, this.shadow = new ha(), this.shape = new fa(), this.size = new pa(), this.stroke = new On(), this.zIndex = new ma();
|
|
1824
1824
|
}
|
|
1825
1825
|
load(e) {
|
|
1826
|
-
if (
|
|
1826
|
+
if (v(e))
|
|
1827
1827
|
return;
|
|
1828
1828
|
if (e.groups !== void 0)
|
|
1829
1829
|
for (const n of Object.keys(e.groups)) {
|
|
1830
1830
|
if (!Object.hasOwn(e.groups, n))
|
|
1831
1831
|
continue;
|
|
1832
1832
|
const s = e.groups[n];
|
|
1833
|
-
s !== void 0 && (this.groups[n] =
|
|
1833
|
+
s !== void 0 && (this.groups[n] = Y(this.groups[n] ?? {}, s));
|
|
1834
1834
|
}
|
|
1835
|
-
e.reduceDuplicates !== void 0 && (this.reduceDuplicates = e.reduceDuplicates), this.bounce.load(e.bounce), this.color.load(Dt.create(this.color, e.color)), this.effect.load(e.effect), this.move.load(e.move), this.number.load(e.number), this.opacity.load(e.opacity), this.shape.load(e.shape), this.size.load(e.size), this.shadow.load(e.shadow), this.zIndex.load(e.zIndex), this.collisions.load(e.collisions), e.interactivity !== void 0 && (this.interactivity =
|
|
1835
|
+
e.reduceDuplicates !== void 0 && (this.reduceDuplicates = e.reduceDuplicates), this.bounce.load(e.bounce), this.color.load(Dt.create(this.color, e.color)), this.effect.load(e.effect), this.move.load(e.move), this.number.load(e.number), this.opacity.load(e.opacity), this.shape.load(e.shape), this.size.load(e.size), this.shadow.load(e.shadow), this.zIndex.load(e.zIndex), this.collisions.load(e.collisions), e.interactivity !== void 0 && (this.interactivity = Y({}, e.interactivity));
|
|
1836
1836
|
const i = e.stroke;
|
|
1837
1837
|
if (i && (this.stroke = oe(i, (n) => {
|
|
1838
1838
|
const s = new On();
|
|
@@ -1859,13 +1859,13 @@ function As(t, e, ...i) {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
class ga {
|
|
1861
1861
|
constructor(e, i) {
|
|
1862
|
-
this._findDefaultTheme = (n) => this.themes.find((s) => s.default.value && s.default.mode === n) ?? this.themes.find((s) => s.default.value && s.default.mode ===
|
|
1862
|
+
this._findDefaultTheme = (n) => this.themes.find((s) => s.default.value && s.default.mode === n) ?? this.themes.find((s) => s.default.value && s.default.mode === Re.any), this._importPreset = (n) => {
|
|
1863
1863
|
this.load(this._engine.getPreset(n));
|
|
1864
|
-
}, this._engine = e, this._container = i, this.autoPlay = !0, this.background = new Rr(), this.backgroundMask = new
|
|
1864
|
+
}, this._engine = e, this._container = i, this.autoPlay = !0, this.background = new Rr(), this.backgroundMask = new Er(), this.clear = !0, this.defaultThemes = {}, this.delay = 0, this.fullScreen = new Ir(), this.detectRetina = !0, this.duration = 0, this.fpsLimit = 120, this.interactivity = new Es(e, i), this.manualParticles = [], this.particles = As(this._engine, this._container), this.pauseOnBlur = !0, this.pauseOnOutsideViewport = !0, this.responsive = [], this.smooth = !1, this.style = {}, this.themes = [], this.zLayers = 100;
|
|
1865
1865
|
}
|
|
1866
1866
|
load(e) {
|
|
1867
1867
|
var r, a;
|
|
1868
|
-
if (
|
|
1868
|
+
if (v(e))
|
|
1869
1869
|
return;
|
|
1870
1870
|
e.preset !== void 0 && oe(e.preset, (c) => this._importPreset(c)), e.autoPlay !== void 0 && (this.autoPlay = e.autoPlay), e.clear !== void 0 && (this.clear = e.clear), e.key !== void 0 && (this.key = e.key), e.name !== void 0 && (this.name = e.name), e.delay !== void 0 && (this.delay = S(e.delay));
|
|
1871
1871
|
const i = e.detectRetina;
|
|
@@ -1876,7 +1876,7 @@ class ga {
|
|
|
1876
1876
|
gs(s) ? this.fullScreen.enable = s : this.fullScreen.load(s), this.backgroundMask.load(e.backgroundMask), this.interactivity.load(e.interactivity), e.manualParticles && (this.manualParticles = e.manualParticles.map((c) => {
|
|
1877
1877
|
const l = new $r();
|
|
1878
1878
|
return l.load(c), l;
|
|
1879
|
-
})), this.particles.load(e.particles), this.style =
|
|
1879
|
+
})), this.particles.load(e.particles), this.style = Y(this.style, e.style), this._engine.loadOptions(this, e), e.smooth !== void 0 && (this.smooth = e.smooth);
|
|
1880
1880
|
const o = this._engine.interactors.get(this._container);
|
|
1881
1881
|
if (o)
|
|
1882
1882
|
for (const c of o)
|
|
@@ -1896,11 +1896,11 @@ class ga {
|
|
|
1896
1896
|
u.load(c), this.themes.push(u);
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
|
-
this.defaultThemes.dark = (r = this._findDefaultTheme(
|
|
1899
|
+
this.defaultThemes.dark = (r = this._findDefaultTheme(Re.dark)) == null ? void 0 : r.name, this.defaultThemes.light = (a = this._findDefaultTheme(Re.light)) == null ? void 0 : a.name;
|
|
1900
1900
|
}
|
|
1901
1901
|
setResponsive(e, i, n) {
|
|
1902
1902
|
this.load(n);
|
|
1903
|
-
const s = this.responsive.find((o) => o.mode ===
|
|
1903
|
+
const s = this.responsive.find((o) => o.mode === Ne.screen && screen ? o.maxWidth > screen.availWidth : o.maxWidth * i > e);
|
|
1904
1904
|
return this.load(s == null ? void 0 : s.options), s == null ? void 0 : s.maxWidth;
|
|
1905
1905
|
}
|
|
1906
1906
|
setTheme(e) {
|
|
@@ -1908,15 +1908,15 @@ class ga {
|
|
|
1908
1908
|
const i = this.themes.find((n) => n.name === e);
|
|
1909
1909
|
i && this.load(i.options);
|
|
1910
1910
|
} else {
|
|
1911
|
-
const i = ws("(prefers-color-scheme: dark)"), n = i == null ? void 0 : i.matches, s = this._findDefaultTheme(n ?
|
|
1911
|
+
const i = ws("(prefers-color-scheme: dark)"), n = i == null ? void 0 : i.matches, s = this._findDefaultTheme(n ? Re.dark : Re.light);
|
|
1912
1912
|
s && this.load(s.options);
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
|
-
var
|
|
1916
|
+
var wt;
|
|
1917
1917
|
(function(t) {
|
|
1918
1918
|
t.external = "external", t.particles = "particles";
|
|
1919
|
-
})(
|
|
1919
|
+
})(wt || (wt = {}));
|
|
1920
1920
|
class va {
|
|
1921
1921
|
constructor(e, i) {
|
|
1922
1922
|
this.container = i, this._engine = e, this._interactors = [], this._externalInteractors = [], this._particleInteractors = [];
|
|
@@ -1934,10 +1934,10 @@ class va {
|
|
|
1934
1934
|
this._interactors = await this._engine.getInteractors(this.container, !0), this._externalInteractors = [], this._particleInteractors = [];
|
|
1935
1935
|
for (const e of this._interactors) {
|
|
1936
1936
|
switch (e.type) {
|
|
1937
|
-
case
|
|
1937
|
+
case wt.external:
|
|
1938
1938
|
this._externalInteractors.push(e);
|
|
1939
1939
|
break;
|
|
1940
|
-
case
|
|
1940
|
+
case wt.particles:
|
|
1941
1941
|
this._particleInteractors.push(e);
|
|
1942
1942
|
break;
|
|
1943
1943
|
}
|
|
@@ -1964,7 +1964,7 @@ var ye;
|
|
|
1964
1964
|
function ba(t, e, i, n) {
|
|
1965
1965
|
const s = e.options[t];
|
|
1966
1966
|
if (s)
|
|
1967
|
-
return
|
|
1967
|
+
return Y({
|
|
1968
1968
|
close: e.close,
|
|
1969
1969
|
fill: e.fill
|
|
1970
1970
|
}, ce(s, i, n));
|
|
@@ -1972,15 +1972,15 @@ function ba(t, e, i, n) {
|
|
|
1972
1972
|
function wa(t, e, i, n) {
|
|
1973
1973
|
const s = e.options[t];
|
|
1974
1974
|
if (s)
|
|
1975
|
-
return
|
|
1975
|
+
return Y({
|
|
1976
1976
|
close: e.close,
|
|
1977
1977
|
fill: e.fill
|
|
1978
1978
|
}, ce(s, i, n));
|
|
1979
1979
|
}
|
|
1980
1980
|
function Rn(t) {
|
|
1981
|
-
if (!
|
|
1981
|
+
if (!L(t.outMode, t.checkModes))
|
|
1982
1982
|
return;
|
|
1983
|
-
const e = t.radius *
|
|
1983
|
+
const e = t.radius * G;
|
|
1984
1984
|
t.coord > t.maxCoord - e ? t.setCb(-t.radius) : t.coord < e && t.setCb(t.radius);
|
|
1985
1985
|
}
|
|
1986
1986
|
class xa {
|
|
@@ -1997,7 +1997,7 @@ class xa {
|
|
|
1997
1997
|
}), l = ie.create(c.x, c.y, o), u = this.getRadius(), h = this.options.move.outModes, d = (p) => {
|
|
1998
1998
|
Rn({
|
|
1999
1999
|
outMode: p,
|
|
2000
|
-
checkModes: [
|
|
2000
|
+
checkModes: [F.bounce],
|
|
2001
2001
|
coord: l.x,
|
|
2002
2002
|
maxCoord: n.canvas.size.width,
|
|
2003
2003
|
setCb: (y) => l.x += y,
|
|
@@ -2006,23 +2006,23 @@ class xa {
|
|
|
2006
2006
|
}, f = (p) => {
|
|
2007
2007
|
Rn({
|
|
2008
2008
|
outMode: p,
|
|
2009
|
-
checkModes: [
|
|
2009
|
+
checkModes: [F.bounce],
|
|
2010
2010
|
coord: l.y,
|
|
2011
2011
|
maxCoord: n.canvas.size.height,
|
|
2012
2012
|
setCb: (y) => l.y += y,
|
|
2013
2013
|
radius: u
|
|
2014
2014
|
});
|
|
2015
2015
|
};
|
|
2016
|
-
return d(h.left ?? h.default), d(h.right ?? h.default), f(h.top ?? h.default), f(h.bottom ?? h.default), this._checkOverlap(l, r) ? this._calcPosition(n, void 0, o, r +
|
|
2016
|
+
return d(h.left ?? h.default), d(h.right ?? h.default), f(h.top ?? h.default), f(h.bottom ?? h.default), this._checkOverlap(l, r) ? this._calcPosition(n, void 0, o, r + Eo) : l;
|
|
2017
2017
|
}, this._calculateVelocity = () => {
|
|
2018
2018
|
const n = Ko(this.direction), s = n.copy(), o = this.options.move;
|
|
2019
|
-
if (o.direction ===
|
|
2019
|
+
if (o.direction === H.inside || o.direction === H.outside)
|
|
2020
2020
|
return s;
|
|
2021
|
-
const r = Ie(
|
|
2022
|
-
left: a - r *
|
|
2023
|
-
right: a + r *
|
|
2021
|
+
const r = Ie(_(o.angle.value)), a = Ie(_(o.angle.offset)), c = {
|
|
2022
|
+
left: a - r * q,
|
|
2023
|
+
right: a + r * q
|
|
2024
2024
|
};
|
|
2025
|
-
return o.straight || (s.angle += ne(S(c.left, c.right))), o.random && typeof o.speed == "number" && (s.length *=
|
|
2025
|
+
return o.straight || (s.angle += ne(S(c.left, c.right))), o.random && typeof o.speed == "number" && (s.length *= T()), s;
|
|
2026
2026
|
}, this._checkOverlap = (n, s = cn) => {
|
|
2027
2027
|
const o = this.options.collisions, r = this.getRadius();
|
|
2028
2028
|
if (!o.enable)
|
|
@@ -2031,31 +2031,31 @@ class xa {
|
|
|
2031
2031
|
if (a.enable)
|
|
2032
2032
|
return !1;
|
|
2033
2033
|
const c = a.retries;
|
|
2034
|
-
if (c >=
|
|
2034
|
+
if (c >= Io && s > c)
|
|
2035
2035
|
throw new Error(`${le} particle is overlapping and can't be placed`);
|
|
2036
2036
|
return !!this.container.particles.find((l) => se(n, l.position) < r + l.getRadius());
|
|
2037
2037
|
}, this._getRollColor = (n) => {
|
|
2038
2038
|
if (!n || !this.roll || !this.backColor && !this.roll.alter)
|
|
2039
2039
|
return n;
|
|
2040
|
-
const s = this.roll.horizontal && this.roll.vertical ?
|
|
2041
|
-
return Math.floor(((this.roll.angle ?? Zt) + o) / (Math.PI / s)) %
|
|
2040
|
+
const s = this.roll.horizontal && this.roll.vertical ? G * yn : yn, o = this.roll.horizontal ? Math.PI * q : Zt;
|
|
2041
|
+
return Math.floor(((this.roll.angle ?? Zt) + o) / (Math.PI / s)) % G ? this.backColor ? this.backColor : this.roll.alter ? Pr(n, this.roll.alter.type, this.roll.alter.value) : n : n;
|
|
2042
2042
|
}, this._initPosition = (n) => {
|
|
2043
|
-
const s = this.container, o =
|
|
2043
|
+
const s = this.container, o = _(this.options.zIndex.value);
|
|
2044
2044
|
this.position = this._calcPosition(s, n, ue(o, Do, s.zLayers)), this.initialPosition = this.position.copy();
|
|
2045
2045
|
const r = s.canvas.size;
|
|
2046
2046
|
switch (this.moveCenter = {
|
|
2047
|
-
...
|
|
2047
|
+
...Ms(this.options.move.center, r),
|
|
2048
2048
|
radius: this.options.move.center.radius ?? Lo,
|
|
2049
|
-
mode: this.options.move.center.mode ??
|
|
2049
|
+
mode: this.options.move.center.mode ?? gt.percent
|
|
2050
2050
|
}, this.direction = Zo(this.options.move.direction, this.position, this.moveCenter), this.options.move.direction) {
|
|
2051
|
-
case
|
|
2051
|
+
case H.inside:
|
|
2052
2052
|
this.outType = ye.inside;
|
|
2053
2053
|
break;
|
|
2054
|
-
case
|
|
2054
|
+
case H.outside:
|
|
2055
2055
|
this.outType = ye.outside;
|
|
2056
2056
|
break;
|
|
2057
2057
|
}
|
|
2058
|
-
this.offset =
|
|
2058
|
+
this.offset = $.origin;
|
|
2059
2059
|
}, this._engine = e;
|
|
2060
2060
|
}
|
|
2061
2061
|
destroy(e) {
|
|
@@ -2083,10 +2083,10 @@ class xa {
|
|
|
2083
2083
|
n.drawParticle(this, e);
|
|
2084
2084
|
}
|
|
2085
2085
|
getFillColor() {
|
|
2086
|
-
return this._getRollColor(this.bubble.color ??
|
|
2086
|
+
return this._getRollColor(this.bubble.color ?? Mn(this.color));
|
|
2087
2087
|
}
|
|
2088
2088
|
getMass() {
|
|
2089
|
-
return this.getRadius() **
|
|
2089
|
+
return this.getRadius() ** Me * Math.PI * q;
|
|
2090
2090
|
}
|
|
2091
2091
|
getPosition() {
|
|
2092
2092
|
return {
|
|
@@ -2099,10 +2099,10 @@ class xa {
|
|
|
2099
2099
|
return this.bubble.radius ?? this.size.value;
|
|
2100
2100
|
}
|
|
2101
2101
|
getStrokeColor() {
|
|
2102
|
-
return this._getRollColor(this.bubble.color ??
|
|
2102
|
+
return this._getRollColor(this.bubble.color ?? Mn(this.strokeColor));
|
|
2103
2103
|
}
|
|
2104
2104
|
init(e, i, n, s) {
|
|
2105
|
-
var
|
|
2105
|
+
var B, U, ee, V, re, he;
|
|
2106
2106
|
const o = this.container, r = this._engine;
|
|
2107
2107
|
this.id = e, this.group = s, this.effectClose = !0, this.effectFill = !0, this.shapeClose = !0, this.shapeFill = !0, this.pathRotation = !1, this.lastPathTime = 0, this.destroyed = !1, this.unbreakable = !1, this.isRotating = !1, this.rotation = 0, this.misplaced = !1, this.retina = {
|
|
2108
2108
|
maxDistance: {}
|
|
@@ -2111,52 +2111,52 @@ class xa {
|
|
|
2111
2111
|
this.effect = ce(h, this.id, u), this.shape = ce(d, this.id, u);
|
|
2112
2112
|
const f = l.effect, p = l.shape;
|
|
2113
2113
|
if (n) {
|
|
2114
|
-
if ((
|
|
2115
|
-
const
|
|
2114
|
+
if ((B = n.effect) != null && B.type) {
|
|
2115
|
+
const E = n.effect.type, ve = ce(E, this.id, u);
|
|
2116
2116
|
ve && (this.effect = ve, f.load(n.effect));
|
|
2117
2117
|
}
|
|
2118
|
-
if ((
|
|
2119
|
-
const
|
|
2118
|
+
if ((U = n.shape) != null && U.type) {
|
|
2119
|
+
const E = n.shape.type, ve = ce(E, this.id, u);
|
|
2120
2120
|
ve && (this.shape = ve, p.load(n.shape));
|
|
2121
2121
|
}
|
|
2122
2122
|
}
|
|
2123
|
-
if (this.effect ===
|
|
2124
|
-
const
|
|
2125
|
-
this.effect =
|
|
2123
|
+
if (this.effect === yt) {
|
|
2124
|
+
const E = [...this.container.effectDrawers.keys()];
|
|
2125
|
+
this.effect = E[Math.floor(T() * E.length)];
|
|
2126
2126
|
}
|
|
2127
|
-
if (this.shape ===
|
|
2128
|
-
const
|
|
2129
|
-
this.shape =
|
|
2127
|
+
if (this.shape === yt) {
|
|
2128
|
+
const E = [...this.container.shapeDrawers.keys()];
|
|
2129
|
+
this.shape = E[Math.floor(T() * E.length)];
|
|
2130
2130
|
}
|
|
2131
2131
|
this.effectData = ba(this.effect, f, this.id, u), this.shapeData = wa(this.shape, p, this.id, u), l.load(n);
|
|
2132
2132
|
const y = this.effectData;
|
|
2133
2133
|
y && l.load(y.particles);
|
|
2134
2134
|
const m = this.shapeData;
|
|
2135
2135
|
m && l.load(m.particles);
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2138
|
-
const
|
|
2139
|
-
this.pathDelay =
|
|
2136
|
+
const w = new Es(r, o);
|
|
2137
|
+
w.load(o.actualOptions.interactivity), w.load(l.interactivity), this.interactivity = w, this.effectFill = (y == null ? void 0 : y.fill) ?? l.effect.fill, this.effectClose = (y == null ? void 0 : y.close) ?? l.effect.close, this.shapeFill = (m == null ? void 0 : m.fill) ?? l.shape.fill, this.shapeClose = (m == null ? void 0 : m.close) ?? l.shape.close, this.options = l;
|
|
2138
|
+
const b = this.options.move.path;
|
|
2139
|
+
this.pathDelay = _(b.delay.value) * j, b.generator && (this.pathGenerator = this._engine.getPathGenerator(b.generator), this.pathGenerator && o.addPath(b.generator, this.pathGenerator) && this.pathGenerator.init(o)), o.retina.initParticle(this), this.size = Cs(this.options.size, a), this.bubble = {
|
|
2140
2140
|
inRange: !1
|
|
2141
2141
|
}, this.slow = {
|
|
2142
2142
|
inRange: !1,
|
|
2143
2143
|
factor: 1
|
|
2144
|
-
}, this._initPosition(i), this.initialVelocity = this._calculateVelocity(), this.velocity = this.initialVelocity.copy(), this.moveDecay = ps -
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
let
|
|
2148
|
-
|
|
2149
|
-
let
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2152
|
-
|
|
2153
|
-
for (const
|
|
2154
|
-
|
|
2155
|
-
for (const
|
|
2156
|
-
(ee =
|
|
2157
|
-
(
|
|
2158
|
-
for (const
|
|
2159
|
-
(he =
|
|
2144
|
+
}, this._initPosition(i), this.initialVelocity = this._calculateVelocity(), this.velocity = this.initialVelocity.copy(), this.moveDecay = ps - _(this.options.move.decay);
|
|
2145
|
+
const x = o.particles;
|
|
2146
|
+
x.setLastZIndex(this.position.z), this.zIndexFactor = this.position.z / o.zLayers, this.sides = 24;
|
|
2147
|
+
let g = o.effectDrawers.get(this.effect);
|
|
2148
|
+
g || (g = this._engine.getEffectDrawer(this.effect), g && o.effectDrawers.set(this.effect, g)), g != null && g.loadEffect && g.loadEffect(this);
|
|
2149
|
+
let k = o.shapeDrawers.get(this.shape);
|
|
2150
|
+
k || (k = this._engine.getShapeDrawer(this.shape), k && o.shapeDrawers.set(this.shape, k)), k != null && k.loadShape && k.loadShape(this);
|
|
2151
|
+
const O = k == null ? void 0 : k.getSidesCount;
|
|
2152
|
+
O && (this.sides = O(this)), this.spawning = !1, this.shadowColor = me(this._engine, this.options.shadow.color);
|
|
2153
|
+
for (const E of x.updaters)
|
|
2154
|
+
E.init(this);
|
|
2155
|
+
for (const E of x.movers)
|
|
2156
|
+
(ee = E.init) == null || ee.call(E, this);
|
|
2157
|
+
(V = g == null ? void 0 : g.particleInit) == null || V.call(g, o, this), (re = k == null ? void 0 : k.particleInit) == null || re.call(k, o, this);
|
|
2158
|
+
for (const E of o.plugins.values())
|
|
2159
|
+
(he = E.particleCreated) == null || he.call(E, this);
|
|
2160
2160
|
}
|
|
2161
2161
|
isInsideCanvas() {
|
|
2162
2162
|
const e = this.getRadius(), i = this.container.canvas.size, n = this.position;
|
|
@@ -2176,10 +2176,10 @@ class _a {
|
|
|
2176
2176
|
this.position = e, this.particle = i;
|
|
2177
2177
|
}
|
|
2178
2178
|
}
|
|
2179
|
-
var
|
|
2179
|
+
var dt;
|
|
2180
2180
|
(function(t) {
|
|
2181
2181
|
t.circle = "circle", t.rectangle = "rectangle";
|
|
2182
|
-
})(
|
|
2182
|
+
})(dt || (dt = {}));
|
|
2183
2183
|
class Fs {
|
|
2184
2184
|
constructor(e, i, n) {
|
|
2185
2185
|
this.position = {
|
|
@@ -2188,28 +2188,28 @@ class Fs {
|
|
|
2188
2188
|
}, this.type = n;
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
class
|
|
2191
|
+
class N extends Fs {
|
|
2192
2192
|
constructor(e, i, n) {
|
|
2193
|
-
super(e, i,
|
|
2193
|
+
super(e, i, dt.circle), this.radius = n;
|
|
2194
2194
|
}
|
|
2195
2195
|
contains(e) {
|
|
2196
2196
|
return se(e, this.position) <= this.radius;
|
|
2197
2197
|
}
|
|
2198
2198
|
intersects(e) {
|
|
2199
2199
|
const i = this.position, n = e.position, s = { x: Math.abs(n.x - i.x), y: Math.abs(n.y - i.y) }, o = this.radius;
|
|
2200
|
-
if (e instanceof
|
|
2201
|
-
const r = e, a = o + r.radius, c = Math.sqrt(s.x **
|
|
2200
|
+
if (e instanceof N || e.type === dt.circle) {
|
|
2201
|
+
const r = e, a = o + r.radius, c = Math.sqrt(s.x ** Me + s.y ** Me);
|
|
2202
2202
|
return a > c;
|
|
2203
|
-
} else if (e instanceof ge || e.type ===
|
|
2203
|
+
} else if (e instanceof ge || e.type === dt.rectangle) {
|
|
2204
2204
|
const r = e, { width: a, height: c } = r.size;
|
|
2205
|
-
return Math.pow(s.x - a,
|
|
2205
|
+
return Math.pow(s.x - a, Me) + Math.pow(s.y - c, Me) <= o ** Me || s.x <= o + a && s.y <= o + c || s.x <= a || s.y <= c;
|
|
2206
2206
|
}
|
|
2207
2207
|
return !1;
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
class ge extends Fs {
|
|
2211
2211
|
constructor(e, i, n, s) {
|
|
2212
|
-
super(e, i,
|
|
2212
|
+
super(e, i, dt.rectangle), this.size = {
|
|
2213
2213
|
height: s,
|
|
2214
2214
|
width: n
|
|
2215
2215
|
};
|
|
@@ -2219,7 +2219,7 @@ class ge extends Fs {
|
|
|
2219
2219
|
return e.x >= s.x && e.x <= s.x + i && e.y >= s.y && e.y <= s.y + n;
|
|
2220
2220
|
}
|
|
2221
2221
|
intersects(e) {
|
|
2222
|
-
if (e instanceof
|
|
2222
|
+
if (e instanceof N)
|
|
2223
2223
|
return e.intersects(this);
|
|
2224
2224
|
const i = this.size.width, n = this.size.height, s = this.position, o = e.position, r = e instanceof ge ? e.size : { width: 0, height: 0 }, a = r.width, c = r.height;
|
|
2225
2225
|
return o.x < s.x + i && o.x + a > s.x && o.y < s.y + n && o.y + c > s.y;
|
|
@@ -2230,8 +2230,8 @@ class Jt {
|
|
|
2230
2230
|
this.rectangle = e, this.capacity = i, this._subdivide = () => {
|
|
2231
2231
|
const { x: n, y: s } = this.rectangle.position, { width: o, height: r } = this.rectangle.size, { capacity: a } = this;
|
|
2232
2232
|
for (let c = 0; c < go; c++) {
|
|
2233
|
-
const l = c %
|
|
2234
|
-
this._subs.push(new Jt(new ge(n + o *
|
|
2233
|
+
const l = c % G;
|
|
2234
|
+
this._subs.push(new Jt(new ge(n + o * q * l, s + r * q * (Math.round(c * q) - l), o * q, r * q), a));
|
|
2235
2235
|
}
|
|
2236
2236
|
this._divided = !0;
|
|
2237
2237
|
}, this._points = [], this._divided = !1, this._subs = [];
|
|
@@ -2251,7 +2251,7 @@ class Jt {
|
|
|
2251
2251
|
return n;
|
|
2252
2252
|
}
|
|
2253
2253
|
queryCircle(e, i, n) {
|
|
2254
|
-
return this.query(new
|
|
2254
|
+
return this.query(new N(e.x, e.y, i), n);
|
|
2255
2255
|
}
|
|
2256
2256
|
queryRectangle(e, i, n) {
|
|
2257
2257
|
return this.query(new ge(e.x, e.y, i.width, i.height), n);
|
|
@@ -2272,14 +2272,14 @@ class ka {
|
|
|
2272
2272
|
r === void 0 ? this._limit = c.limit.value : (((y = a == null ? void 0 : a.number.limit) == null ? void 0 : y.value) ?? c.limit.value) && this._groupLimits.set(r, ((m = a == null ? void 0 : a.number.limit) == null ? void 0 : m.value) ?? c.limit.value);
|
|
2273
2273
|
return;
|
|
2274
2274
|
}
|
|
2275
|
-
const l = this._initDensityFactor(c.density), u = c.value, h = c.limit.value > bn ? c.limit.value : u, d = Math.min(u, h) * l + o, f = Math.min(this.count, this.filter((
|
|
2275
|
+
const l = this._initDensityFactor(c.density), u = c.value, h = c.limit.value > bn ? c.limit.value : u, d = Math.min(u, h) * l + o, f = Math.min(this.count, this.filter((w) => w.group === r).length);
|
|
2276
2276
|
r === void 0 ? this._limit = c.limit.value * l : this._groupLimits.set(r, c.limit.value * l), f < d ? this.push(Math.abs(d - f), void 0, s, r) : f > d && this.removeQuantity(f - d, r);
|
|
2277
2277
|
}, this._initDensityFactor = (s) => {
|
|
2278
2278
|
const o = this._container;
|
|
2279
2279
|
if (!o.canvas.element || !s.enable)
|
|
2280
2280
|
return Bo;
|
|
2281
2281
|
const r = o.canvas.element, a = o.retina.pixelRatio;
|
|
2282
|
-
return r.width * r.height / (s.height * s.width * a **
|
|
2282
|
+
return r.width * r.height / (s.height * s.width * a ** Me);
|
|
2283
2283
|
}, this._pushParticle = (s, o, r, a) => {
|
|
2284
2284
|
try {
|
|
2285
2285
|
let c = this._pool.pop();
|
|
@@ -2292,7 +2292,7 @@ class ka {
|
|
|
2292
2292
|
}
|
|
2293
2293
|
}), c) : void 0;
|
|
2294
2294
|
} catch (c) {
|
|
2295
|
-
|
|
2295
|
+
Ze().warning(`${le} adding particle: ${c}`);
|
|
2296
2296
|
}
|
|
2297
2297
|
}, this._removeParticle = (s, o, r) => {
|
|
2298
2298
|
const a = this._array[s];
|
|
@@ -2314,7 +2314,7 @@ class ka {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
addManualParticles() {
|
|
2316
2316
|
const e = this._container;
|
|
2317
|
-
e.actualOptions.manualParticles.forEach((n) => this.addParticle(n.position ?
|
|
2317
|
+
e.actualOptions.manualParticles.forEach((n) => this.addParticle(n.position ? Ms(n.position, e.canvas.size) : void 0, n.options));
|
|
2318
2318
|
}
|
|
2319
2319
|
addParticle(e, i, n, s) {
|
|
2320
2320
|
const o = this._container.actualOptions.particles.number.limit.mode, r = n === void 0 ? this._limit : this._groupLimits.get(n) ?? this._limit, a = this.count;
|
|
@@ -2471,50 +2471,50 @@ class Ca {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
init() {
|
|
2473
2473
|
const e = this.container, i = e.actualOptions;
|
|
2474
|
-
this.pixelRatio = !i.detectRetina ||
|
|
2474
|
+
this.pixelRatio = !i.detectRetina || Ke() ? un : devicePixelRatio, this.reduceFactor = hn;
|
|
2475
2475
|
const n = this.pixelRatio, s = e.canvas;
|
|
2476
2476
|
if (s.element) {
|
|
2477
2477
|
const a = s.element;
|
|
2478
2478
|
s.size.width = a.offsetWidth * n, s.size.height = a.offsetHeight * n;
|
|
2479
2479
|
}
|
|
2480
2480
|
const o = i.particles, r = o.move;
|
|
2481
|
-
this.maxSpeed =
|
|
2481
|
+
this.maxSpeed = _(r.gravity.maxSpeed) * n, this.sizeAnimationSpeed = _(o.size.animation.speed) * n;
|
|
2482
2482
|
}
|
|
2483
2483
|
initParticle(e) {
|
|
2484
2484
|
const i = e.options, n = this.pixelRatio, s = i.move, o = s.distance, r = e.retina;
|
|
2485
|
-
r.moveDrift =
|
|
2485
|
+
r.moveDrift = _(s.drift) * n, r.moveSpeed = _(s.speed) * n, r.sizeAnimationSpeed = _(i.size.animation.speed) * n;
|
|
2486
2486
|
const a = r.maxDistance;
|
|
2487
|
-
a.horizontal = o.horizontal !== void 0 ? o.horizontal * n : void 0, a.vertical = o.vertical !== void 0 ? o.vertical * n : void 0, r.maxSpeed =
|
|
2487
|
+
a.horizontal = o.horizontal !== void 0 ? o.horizontal * n : void 0, a.vertical = o.vertical !== void 0 ? o.vertical * n : void 0, r.maxSpeed = _(s.gravity.maxSpeed) * n;
|
|
2488
2488
|
}
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function I(t) {
|
|
2491
2491
|
return t && !t.destroyed;
|
|
2492
2492
|
}
|
|
2493
|
-
function
|
|
2493
|
+
function Ma(t, e = ci, i = !1) {
|
|
2494
2494
|
return {
|
|
2495
2495
|
value: t,
|
|
2496
|
-
factor: i ? ci / e : ci * t /
|
|
2496
|
+
factor: i ? ci / e : ci * t / j
|
|
2497
2497
|
};
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function st(t, e, ...i) {
|
|
2500
2500
|
const n = new ga(t, e);
|
|
2501
2501
|
return Ls(n, ...i), n;
|
|
2502
2502
|
}
|
|
2503
|
-
class
|
|
2503
|
+
class Pa {
|
|
2504
2504
|
constructor(e, i, n) {
|
|
2505
2505
|
this._intersectionManager = (s) => {
|
|
2506
|
-
if (!(!
|
|
2506
|
+
if (!(!I(this) || !this.actualOptions.pauseOnOutsideViewport))
|
|
2507
2507
|
for (const o of s)
|
|
2508
2508
|
o.target === this.interactivity.element && (o.isIntersecting ? this.play() : this.pause());
|
|
2509
2509
|
}, this._nextFrame = (s) => {
|
|
2510
2510
|
try {
|
|
2511
|
-
if (!this._smooth && this._lastFrameTime !== void 0 && s < this._lastFrameTime +
|
|
2511
|
+
if (!this._smooth && this._lastFrameTime !== void 0 && s < this._lastFrameTime + j / this.fpsLimit) {
|
|
2512
2512
|
this.draw(!1);
|
|
2513
2513
|
return;
|
|
2514
2514
|
}
|
|
2515
2515
|
this._lastFrameTime ?? (this._lastFrameTime = s);
|
|
2516
|
-
const o =
|
|
2517
|
-
if (this.addLifeTime(o.value), this._lastFrameTime = s, o.value >
|
|
2516
|
+
const o = Ma(s - this._lastFrameTime, this.fpsLimit, this._smooth);
|
|
2517
|
+
if (this.addLifeTime(o.value), this._lastFrameTime = s, o.value > j) {
|
|
2518
2518
|
this.draw(!1);
|
|
2519
2519
|
return;
|
|
2520
2520
|
}
|
|
@@ -2524,17 +2524,17 @@ class Ma {
|
|
|
2524
2524
|
}
|
|
2525
2525
|
this.animationStatus && this.draw(!1);
|
|
2526
2526
|
} catch (o) {
|
|
2527
|
-
|
|
2527
|
+
Ze().error(`${le} in animation loop`, o);
|
|
2528
2528
|
}
|
|
2529
2529
|
}, this._engine = e, this.id = Symbol(i), this.fpsLimit = 120, this._smooth = !1, this._delay = 0, this._duration = 0, this._lifeTime = 0, this._firstStart = !0, this.started = !1, this.destroyed = !1, this._paused = !0, this._lastFrameTime = 0, this.zLayers = 100, this.pageHidden = !1, this._clickHandlers = /* @__PURE__ */ new Map(), this._sourceOptions = n, this._initialSourceOptions = n, this.retina = new Ca(this), this.canvas = new Sr(this, this._engine), this.particles = new ka(this._engine, this), this.pathGenerators = /* @__PURE__ */ new Map(), this.interactivity = {
|
|
2530
2530
|
mouse: {
|
|
2531
2531
|
clicking: !1,
|
|
2532
2532
|
inside: !1
|
|
2533
2533
|
}
|
|
2534
|
-
}, this.plugins = /* @__PURE__ */ new Map(), this.effectDrawers = /* @__PURE__ */ new Map(), this.shapeDrawers = /* @__PURE__ */ new Map(), this._options =
|
|
2534
|
+
}, this.plugins = /* @__PURE__ */ new Map(), this.effectDrawers = /* @__PURE__ */ new Map(), this.shapeDrawers = /* @__PURE__ */ new Map(), this._options = st(this._engine, this), this.actualOptions = st(this._engine, this), this._eventListeners = new Or(this), this._intersectionObserver = sr((s) => this._intersectionManager(s)), this._engine.dispatchEvent(Z.containerBuilt, { container: this });
|
|
2535
2535
|
}
|
|
2536
2536
|
get animationStatus() {
|
|
2537
|
-
return !this._paused && !this.pageHidden &&
|
|
2537
|
+
return !this._paused && !this.pageHidden && I(this);
|
|
2538
2538
|
}
|
|
2539
2539
|
get options() {
|
|
2540
2540
|
return this._options;
|
|
@@ -2543,13 +2543,13 @@ class Ma {
|
|
|
2543
2543
|
return this._sourceOptions;
|
|
2544
2544
|
}
|
|
2545
2545
|
addClickHandler(e) {
|
|
2546
|
-
if (!
|
|
2546
|
+
if (!I(this))
|
|
2547
2547
|
return;
|
|
2548
2548
|
const i = this.interactivity.element;
|
|
2549
2549
|
if (!i)
|
|
2550
2550
|
return;
|
|
2551
2551
|
const n = (h, d, f) => {
|
|
2552
|
-
if (!
|
|
2552
|
+
if (!I(this))
|
|
2553
2553
|
return;
|
|
2554
2554
|
const p = this.retina.pixelRatio, y = {
|
|
2555
2555
|
x: d.x * p,
|
|
@@ -2557,7 +2557,7 @@ class Ma {
|
|
|
2557
2557
|
}, m = this.particles.quadTree.queryCircle(y, f * p);
|
|
2558
2558
|
e(h, m);
|
|
2559
2559
|
}, s = (h) => {
|
|
2560
|
-
if (!
|
|
2560
|
+
if (!I(this))
|
|
2561
2561
|
return;
|
|
2562
2562
|
const d = h, f = {
|
|
2563
2563
|
x: d.offsetX || d.clientX,
|
|
@@ -2565,11 +2565,11 @@ class Ma {
|
|
|
2565
2565
|
};
|
|
2566
2566
|
n(h, f, Co);
|
|
2567
2567
|
}, o = () => {
|
|
2568
|
-
|
|
2568
|
+
I(this) && (l = !0, u = !1);
|
|
2569
2569
|
}, r = () => {
|
|
2570
|
-
|
|
2570
|
+
I(this) && (u = !0);
|
|
2571
2571
|
}, a = (h) => {
|
|
2572
|
-
if (
|
|
2572
|
+
if (I(this)) {
|
|
2573
2573
|
if (l && !u) {
|
|
2574
2574
|
const d = h;
|
|
2575
2575
|
let f = d.touches[d.touches.length - mn];
|
|
@@ -2584,7 +2584,7 @@ class Ma {
|
|
|
2584
2584
|
l = !1, u = !1;
|
|
2585
2585
|
}
|
|
2586
2586
|
}, c = () => {
|
|
2587
|
-
|
|
2587
|
+
I(this) && (l = !1, u = !1);
|
|
2588
2588
|
};
|
|
2589
2589
|
let l = !1, u = !1;
|
|
2590
2590
|
this._clickHandlers.set("click", s), this._clickHandlers.set("touchstart", o), this._clickHandlers.set("touchmove", r), this._clickHandlers.set("touchend", a), this._clickHandlers.set("touchcancel", c);
|
|
@@ -2595,14 +2595,14 @@ class Ma {
|
|
|
2595
2595
|
this._lifeTime += e;
|
|
2596
2596
|
}
|
|
2597
2597
|
addPath(e, i, n = !1) {
|
|
2598
|
-
return !
|
|
2598
|
+
return !I(this) || !n && this.pathGenerators.has(e) ? !1 : (this.pathGenerators.set(e, i), !0);
|
|
2599
2599
|
}
|
|
2600
2600
|
alive() {
|
|
2601
2601
|
return !this._duration || this._lifeTime <= this._duration;
|
|
2602
2602
|
}
|
|
2603
2603
|
clearClickHandlers() {
|
|
2604
2604
|
var e;
|
|
2605
|
-
if (
|
|
2605
|
+
if (I(this)) {
|
|
2606
2606
|
for (const [i, n] of this._clickHandlers)
|
|
2607
2607
|
(e = this.interactivity.element) == null || e.removeEventListener(i, n);
|
|
2608
2608
|
this._clickHandlers.clear();
|
|
@@ -2610,7 +2610,7 @@ class Ma {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
destroy(e = !0) {
|
|
2612
2612
|
var i, n;
|
|
2613
|
-
if (
|
|
2613
|
+
if (I(this)) {
|
|
2614
2614
|
this.stop(), this.clearClickHandlers(), this.particles.destroy(), this.canvas.destroy();
|
|
2615
2615
|
for (const s of this.effectDrawers.values())
|
|
2616
2616
|
(i = s.destroy) == null || i.call(s, this);
|
|
@@ -2622,13 +2622,13 @@ class Ma {
|
|
|
2622
2622
|
this.shapeDrawers.delete(s);
|
|
2623
2623
|
if (this._engine.clearPlugins(this), this.destroyed = !0, e) {
|
|
2624
2624
|
const s = this._engine.items, o = s.findIndex((r) => r === this);
|
|
2625
|
-
o >=
|
|
2625
|
+
o >= Mo && s.splice(o, ds);
|
|
2626
2626
|
}
|
|
2627
2627
|
this._engine.dispatchEvent(Z.containerDestroyed, { container: this });
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
2630
|
draw(e) {
|
|
2631
|
-
if (!
|
|
2631
|
+
if (!I(this))
|
|
2632
2632
|
return;
|
|
2633
2633
|
let i = e;
|
|
2634
2634
|
const n = (s) => {
|
|
@@ -2644,11 +2644,11 @@ class Ma {
|
|
|
2644
2644
|
if (s.supported)
|
|
2645
2645
|
return s.blob;
|
|
2646
2646
|
}
|
|
2647
|
-
|
|
2647
|
+
Ze().error(`${le} - Export plugin with type ${e} not found`);
|
|
2648
2648
|
}
|
|
2649
2649
|
handleClickMode(e) {
|
|
2650
2650
|
var i;
|
|
2651
|
-
if (
|
|
2651
|
+
if (I(this)) {
|
|
2652
2652
|
this.particles.handleClickMode(e);
|
|
2653
2653
|
for (const n of this.plugins.values())
|
|
2654
2654
|
(i = n.handleClickMode) == null || i.call(n, e);
|
|
@@ -2656,7 +2656,7 @@ class Ma {
|
|
|
2656
2656
|
}
|
|
2657
2657
|
async init() {
|
|
2658
2658
|
var l, u, h, d;
|
|
2659
|
-
if (!
|
|
2659
|
+
if (!I(this))
|
|
2660
2660
|
return;
|
|
2661
2661
|
const e = this._engine.getSupportedEffects();
|
|
2662
2662
|
for (const f of e) {
|
|
@@ -2668,13 +2668,13 @@ class Ma {
|
|
|
2668
2668
|
const p = this._engine.getShapeDrawer(f);
|
|
2669
2669
|
p && this.shapeDrawers.set(f, p);
|
|
2670
2670
|
}
|
|
2671
|
-
await this.particles.initPlugins(), this._options =
|
|
2671
|
+
await this.particles.initPlugins(), this._options = st(this._engine, this, this._initialSourceOptions, this.sourceOptions), this.actualOptions = st(this._engine, this, this._options);
|
|
2672
2672
|
const n = await this._engine.getAvailablePlugins(this);
|
|
2673
2673
|
for (const [f, p] of n)
|
|
2674
2674
|
this.plugins.set(f, p);
|
|
2675
2675
|
this.retina.init(), await this.canvas.init(), this.updateActualOptions(), this.canvas.initBackground(), this.canvas.resize();
|
|
2676
2676
|
const { zLayers: s, duration: o, delay: r, fpsLimit: a, smooth: c } = this.actualOptions;
|
|
2677
|
-
this.zLayers = s, this._duration =
|
|
2677
|
+
this.zLayers = s, this._duration = _(o) * j, this._delay = _(r) * j, this._lifeTime = 0, this.fpsLimit = a > zo ? a : Po, this._smooth = c;
|
|
2678
2678
|
for (const f of this.effectDrawers.values())
|
|
2679
2679
|
await ((l = f.init) == null ? void 0 : l.call(f, this));
|
|
2680
2680
|
for (const f of this.shapeDrawers.values())
|
|
@@ -2687,18 +2687,18 @@ class Ma {
|
|
|
2687
2687
|
this._engine.dispatchEvent(Z.particlesSetup, { container: this });
|
|
2688
2688
|
}
|
|
2689
2689
|
async loadTheme(e) {
|
|
2690
|
-
|
|
2690
|
+
I(this) && (this._currentTheme = e, await this.refresh());
|
|
2691
2691
|
}
|
|
2692
2692
|
pause() {
|
|
2693
2693
|
var e;
|
|
2694
|
-
if (
|
|
2694
|
+
if (I(this) && (this._drawAnimationFrame !== void 0 && (Xo(this._drawAnimationFrame), delete this._drawAnimationFrame), !this._paused)) {
|
|
2695
2695
|
for (const i of this.plugins.values())
|
|
2696
2696
|
(e = i.pause) == null || e.call(i);
|
|
2697
2697
|
this.pageHidden || (this._paused = !0), this._engine.dispatchEvent(Z.containerPaused, { container: this });
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
2700
|
play(e) {
|
|
2701
|
-
if (!
|
|
2701
|
+
if (!I(this))
|
|
2702
2702
|
return;
|
|
2703
2703
|
const i = this._paused || e;
|
|
2704
2704
|
if (this._firstStart && !this.actualOptions.autoPlay) {
|
|
@@ -2711,15 +2711,15 @@ class Ma {
|
|
|
2711
2711
|
this._engine.dispatchEvent(Z.containerPlay, { container: this }), this.draw(i ?? !1);
|
|
2712
2712
|
}
|
|
2713
2713
|
async refresh() {
|
|
2714
|
-
if (
|
|
2714
|
+
if (I(this))
|
|
2715
2715
|
return this.stop(), this.start();
|
|
2716
2716
|
}
|
|
2717
2717
|
async reset(e) {
|
|
2718
|
-
if (
|
|
2719
|
-
return this._initialSourceOptions = e, this._sourceOptions = e, this._options =
|
|
2718
|
+
if (I(this))
|
|
2719
|
+
return this._initialSourceOptions = e, this._sourceOptions = e, this._options = st(this._engine, this, this._initialSourceOptions, this.sourceOptions), this.actualOptions = st(this._engine, this, this._options), this.refresh();
|
|
2720
2720
|
}
|
|
2721
2721
|
async start() {
|
|
2722
|
-
!
|
|
2722
|
+
!I(this) || this.started || (await this.init(), this.started = !0, await new Promise((e) => {
|
|
2723
2723
|
const i = async () => {
|
|
2724
2724
|
var n;
|
|
2725
2725
|
this._eventListeners.addListeners(), this.interactivity.element instanceof HTMLElement && this._intersectionObserver && this._intersectionObserver.observe(this.interactivity.element);
|
|
@@ -2732,7 +2732,7 @@ class Ma {
|
|
|
2732
2732
|
}
|
|
2733
2733
|
stop() {
|
|
2734
2734
|
var e;
|
|
2735
|
-
if (!(!
|
|
2735
|
+
if (!(!I(this) || !this.started)) {
|
|
2736
2736
|
this._delayTimeout && (clearTimeout(this._delayTimeout), delete this._delayTimeout), this._firstStart = !0, this.started = !1, this._eventListeners.removeListeners(), this.pause(), this.particles.clear(), this.canvas.stop(), this.interactivity.element instanceof HTMLElement && this._intersectionObserver && this._intersectionObserver.unobserve(this.interactivity.element);
|
|
2737
2737
|
for (const i of this.plugins.values())
|
|
2738
2738
|
(e = i.stop) == null || e.call(i);
|
|
@@ -2783,21 +2783,21 @@ async function Sa(t) {
|
|
|
2783
2783
|
if (!e)
|
|
2784
2784
|
return t.fallback;
|
|
2785
2785
|
const i = await fetch(e);
|
|
2786
|
-
return i.ok ? await i.json() : (
|
|
2786
|
+
return i.ok ? await i.json() : (Ze().error(`${le} ${i.status} while retrieving config file`), t.fallback);
|
|
2787
2787
|
}
|
|
2788
2788
|
const Oa = (t) => {
|
|
2789
2789
|
let e;
|
|
2790
2790
|
if (t instanceof HTMLCanvasElement || t.tagName.toLowerCase() === li)
|
|
2791
|
-
e = t, e.dataset[
|
|
2791
|
+
e = t, e.dataset[We] || (e.dataset[We] = an);
|
|
2792
2792
|
else {
|
|
2793
2793
|
const n = t.getElementsByTagName(li);
|
|
2794
|
-
n.length ? (e = n[So], e.dataset[
|
|
2794
|
+
n.length ? (e = n[So], e.dataset[We] = an) : (e = document.createElement(li), e.dataset[We] = hs, t.appendChild(e));
|
|
2795
2795
|
}
|
|
2796
2796
|
const i = "100%";
|
|
2797
2797
|
return e.style.width || (e.style.width = i), e.style.height || (e.style.height = i), e;
|
|
2798
2798
|
}, Ra = (t, e) => {
|
|
2799
2799
|
let i = e ?? document.getElementById(t);
|
|
2800
|
-
return i || (i = document.createElement("div"), i.id = t, i.dataset[
|
|
2800
|
+
return i || (i = document.createElement("div"), i.id = t, i.dataset[We] = hs, document.body.append(i), i);
|
|
2801
2801
|
};
|
|
2802
2802
|
class Ta {
|
|
2803
2803
|
constructor() {
|
|
@@ -2928,7 +2928,7 @@ class Ta {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
async load(e) {
|
|
2930
2930
|
var d;
|
|
2931
|
-
const i = e.id ?? ((d = e.element) == null ? void 0 : d.id) ?? `tsparticles${Math.floor(
|
|
2931
|
+
const i = e.id ?? ((d = e.element) == null ? void 0 : d.id) ?? `tsparticles${Math.floor(T() * Oo)}`, { index: n, url: s } = e, o = s ? await Sa({ fallback: e.options, url: s, index: n }) : e.options, r = ce(o, n), { items: a } = this, c = a.findIndex((f) => f.id.description === i), l = new Pa(this, i, r);
|
|
2932
2932
|
if (c >= Ro) {
|
|
2933
2933
|
const f = this.item(c), p = f ? To : Zt;
|
|
2934
2934
|
f && !f.destroyed && f.destroy(!1), a.splice(c, p, l);
|
|
@@ -2963,37 +2963,37 @@ class Ta {
|
|
|
2963
2963
|
i.forEach((n) => n.addClickHandler(e));
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function Ea() {
|
|
2967
2967
|
const t = new Ta();
|
|
2968
2968
|
return t.init(), t;
|
|
2969
2969
|
}
|
|
2970
2970
|
class ke {
|
|
2971
2971
|
constructor(e) {
|
|
2972
|
-
this.type =
|
|
2972
|
+
this.type = wt.external, this.container = e;
|
|
2973
2973
|
}
|
|
2974
2974
|
}
|
|
2975
2975
|
class Gi {
|
|
2976
2976
|
constructor(e) {
|
|
2977
|
-
this.type =
|
|
2977
|
+
this.type = wt.particles, this.container = e;
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
2980
|
var de;
|
|
2981
2981
|
(function(t) {
|
|
2982
2982
|
t.clockwise = "clockwise", t.counterClockwise = "counter-clockwise", t.random = "random";
|
|
2983
2983
|
})(de || (de = {}));
|
|
2984
|
-
var
|
|
2984
|
+
var En;
|
|
2985
2985
|
(function(t) {
|
|
2986
2986
|
t.linear = "linear", t.radial = "radial", t.random = "random";
|
|
2987
|
-
})(
|
|
2988
|
-
var
|
|
2987
|
+
})(En || (En = {}));
|
|
2988
|
+
var Ye;
|
|
2989
2989
|
(function(t) {
|
|
2990
2990
|
t.easeInBack = "ease-in-back", t.easeInCirc = "ease-in-circ", t.easeInCubic = "ease-in-cubic", t.easeInLinear = "ease-in-linear", t.easeInQuad = "ease-in-quad", t.easeInQuart = "ease-in-quart", t.easeInQuint = "ease-in-quint", t.easeInExpo = "ease-in-expo", t.easeInSine = "ease-in-sine", t.easeOutBack = "ease-out-back", t.easeOutCirc = "ease-out-circ", t.easeOutCubic = "ease-out-cubic", t.easeOutLinear = "ease-out-linear", t.easeOutQuad = "ease-out-quad", t.easeOutQuart = "ease-out-quart", t.easeOutQuint = "ease-out-quint", t.easeOutExpo = "ease-out-expo", t.easeOutSine = "ease-out-sine", t.easeInOutBack = "ease-in-out-back", t.easeInOutCirc = "ease-in-out-circ", t.easeInOutCubic = "ease-in-out-cubic", t.easeInOutLinear = "ease-in-out-linear", t.easeInOutQuad = "ease-in-out-quad", t.easeInOutQuart = "ease-in-out-quart", t.easeInOutQuint = "ease-in-out-quint", t.easeInOutExpo = "ease-in-out-expo", t.easeInOutSine = "ease-in-out-sine";
|
|
2991
|
-
})(
|
|
2992
|
-
const Ni =
|
|
2993
|
-
|
|
2994
|
-
const
|
|
2991
|
+
})(Ye || (Ye = {}));
|
|
2992
|
+
const Ni = Ea();
|
|
2993
|
+
Ke() || (window.tsParticles = Ni);
|
|
2994
|
+
const Ia = (t) => {
|
|
2995
2995
|
const e = t.id ?? "tsparticles";
|
|
2996
|
-
return
|
|
2996
|
+
return mt(() => {
|
|
2997
2997
|
let i;
|
|
2998
2998
|
return Ni.load({ id: e, url: t.url, options: t.options }).then((n) => {
|
|
2999
2999
|
var s;
|
|
@@ -3001,12 +3001,12 @@ const Ea = (t) => {
|
|
|
3001
3001
|
}), () => {
|
|
3002
3002
|
i == null || i.destroy();
|
|
3003
3003
|
};
|
|
3004
|
-
}, [e, t, t.url, t.options]), /* @__PURE__ */
|
|
3004
|
+
}, [e, t, t.url, t.options]), /* @__PURE__ */ D("div", { id: e, className: t.className });
|
|
3005
3005
|
};
|
|
3006
3006
|
async function Da(t) {
|
|
3007
3007
|
await t(Ni);
|
|
3008
3008
|
}
|
|
3009
|
-
const Ai = 0.5, La = 2,
|
|
3009
|
+
const Ai = 0.5, La = 2, Ee = 0, pe = 1, In = 60, Dn = 0, Aa = 0.01, Fa = Math.PI * La;
|
|
3010
3010
|
function Ba(t) {
|
|
3011
3011
|
const e = t.initialPosition, { dx: i, dy: n } = K(e, t.position), s = Math.abs(i), o = Math.abs(n), { maxDistance: r } = t.retina, a = r.horizontal, c = r.vertical;
|
|
3012
3012
|
if (!a && !c)
|
|
@@ -3018,17 +3018,17 @@ function Ba(t) {
|
|
|
3018
3018
|
t.misplaced = !1;
|
|
3019
3019
|
else if (t.misplaced) {
|
|
3020
3020
|
const h = t.position, d = t.velocity;
|
|
3021
|
-
a && (h.x < e.x && d.x <
|
|
3021
|
+
a && (h.x < e.x && d.x < Ee || h.x > e.x && d.x > Ee) && (d.x *= -T()), c && (h.y < e.y && d.y < Ee || h.y > e.y && d.y > Ee) && (d.y *= -T());
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
3024
3024
|
function qa(t, e, i, n, s, o, r) {
|
|
3025
3025
|
Va(t, r);
|
|
3026
3026
|
const a = t.gravity, c = a != null && a.enable && a.inverse ? -pe : pe;
|
|
3027
|
-
s && i && (t.velocity.x += s * r.factor / (
|
|
3027
|
+
s && i && (t.velocity.x += s * r.factor / (In * i)), a != null && a.enable && i && (t.velocity.y += c * (a.acceleration * r.factor) / (In * i));
|
|
3028
3028
|
const l = t.moveDecay;
|
|
3029
3029
|
t.velocity.multTo(l);
|
|
3030
3030
|
const u = t.velocity.mult(i);
|
|
3031
|
-
a != null && a.enable && n >
|
|
3031
|
+
a != null && a.enable && n > Ee && (!a.inverse && u.y >= Ee && u.y >= n || a.inverse && u.y <= Ee && u.y <= -n) && (u.y = c * n, i && (t.velocity.y = u.y / i));
|
|
3032
3032
|
const h = t.options.zIndex, d = (pe - t.zIndexFactor) ** h.velocityRate;
|
|
3033
3033
|
u.multTo(d), u.multTo(o);
|
|
3034
3034
|
const { position: f } = t;
|
|
@@ -3068,11 +3068,11 @@ function Ua(t) {
|
|
|
3068
3068
|
const s = n.position ?? { x: 50, y: 50 }, o = 0.01, r = {
|
|
3069
3069
|
x: s.x * o * e.canvas.size.width,
|
|
3070
3070
|
y: s.y * o * e.canvas.size.height
|
|
3071
|
-
}, a = t.getPosition(), c = se(a, r), l =
|
|
3071
|
+
}, a = t.getPosition(), c = se(a, r), l = _(n.acceleration);
|
|
3072
3072
|
t.retina.spinAcceleration = l * e.retina.pixelRatio, t.spin = {
|
|
3073
3073
|
center: r,
|
|
3074
|
-
direction: t.velocity.x >=
|
|
3075
|
-
angle:
|
|
3074
|
+
direction: t.velocity.x >= Ee ? de.clockwise : de.counterClockwise,
|
|
3075
|
+
angle: T() * Fa,
|
|
3076
3076
|
radius: c,
|
|
3077
3077
|
acceleration: t.retina.spinAcceleration
|
|
3078
3078
|
};
|
|
@@ -3083,7 +3083,7 @@ class Na {
|
|
|
3083
3083
|
const i = e.options, n = i.move.gravity;
|
|
3084
3084
|
e.gravity = {
|
|
3085
3085
|
enable: n.enable,
|
|
3086
|
-
acceleration:
|
|
3086
|
+
acceleration: _(n.acceleration),
|
|
3087
3087
|
inverse: n.inverse
|
|
3088
3088
|
}, Ua(e);
|
|
3089
3089
|
}
|
|
@@ -3091,12 +3091,12 @@ class Na {
|
|
|
3091
3091
|
return !e.destroyed && e.options.move.enable;
|
|
3092
3092
|
}
|
|
3093
3093
|
move(e, i) {
|
|
3094
|
-
var m,
|
|
3094
|
+
var m, w;
|
|
3095
3095
|
const n = e.options, s = n.move;
|
|
3096
3096
|
if (!s.enable)
|
|
3097
3097
|
return;
|
|
3098
3098
|
const o = e.container, r = o.retina.pixelRatio;
|
|
3099
|
-
(m = e.retina).moveSpeed ?? (m.moveSpeed =
|
|
3099
|
+
(m = e.retina).moveSpeed ?? (m.moveSpeed = _(s.speed) * r), (w = e.retina).moveDrift ?? (w.moveDrift = _(e.options.move.drift) * r);
|
|
3100
3100
|
const a = Ha(e), c = o.retina.reduceFactor, l = e.retina.moveSpeed, u = e.retina.moveDrift, h = xe(n.size.value) * r, d = s.size ? e.getRadius() / h : ja, f = i.factor || Ga, p = l * d * a * f / Wa, y = e.retina.maxSpeed ?? o.retina.maxSpeed;
|
|
3101
3101
|
s.spin.enable ? $a(e, p, c) : qa(e, s, p, y, u, c, i), Ba(e);
|
|
3102
3102
|
}
|
|
@@ -3127,7 +3127,7 @@ class tc {
|
|
|
3127
3127
|
max: ec,
|
|
3128
3128
|
min: An
|
|
3129
3129
|
};
|
|
3130
|
-
i.circleRange =
|
|
3130
|
+
i.circleRange = at(s) ? { min: Ie(s.min), max: Ie(s.max) } : {
|
|
3131
3131
|
min: An,
|
|
3132
3132
|
max: Ie(s)
|
|
3133
3133
|
};
|
|
@@ -3141,7 +3141,7 @@ class nc {
|
|
|
3141
3141
|
this._container = e, this._engine = i;
|
|
3142
3142
|
}
|
|
3143
3143
|
init(e) {
|
|
3144
|
-
const i =
|
|
3144
|
+
const i = Et(this._engine, e.options.color, e.id, e.options.reduceDuplicates);
|
|
3145
3145
|
i && (e.color = Rs(i, e.options.color.animation, this._container.retina.reduceFactor));
|
|
3146
3146
|
}
|
|
3147
3147
|
isEnabled(e) {
|
|
@@ -3155,10 +3155,10 @@ class nc {
|
|
|
3155
3155
|
async function sc(t, e = !0) {
|
|
3156
3156
|
t.checkVersion("3.9.1"), await t.addParticleUpdater("color", (i) => Promise.resolve(new nc(i, t)), e);
|
|
3157
3157
|
}
|
|
3158
|
-
var
|
|
3158
|
+
var Ue;
|
|
3159
3159
|
(function(t) {
|
|
3160
3160
|
t[t.r = 1] = "r", t[t.g = 2] = "g", t[t.b = 3] = "b", t[t.a = 4] = "a";
|
|
3161
|
-
})(
|
|
3161
|
+
})(Ue || (Ue = {}));
|
|
3162
3162
|
const oc = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i, rc = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i, Bt = 16, ac = 1, cc = 255;
|
|
3163
3163
|
class lc {
|
|
3164
3164
|
constructor() {
|
|
@@ -3178,20 +3178,20 @@ class lc {
|
|
|
3178
3178
|
return;
|
|
3179
3179
|
const i = e.replace(oc, (s, o, r, a, c) => o + o + r + r + a + a + (c !== void 0 ? c + c : "")), n = rc.exec(i);
|
|
3180
3180
|
return n ? {
|
|
3181
|
-
a: n[
|
|
3182
|
-
b: parseInt(n[
|
|
3183
|
-
g: parseInt(n[
|
|
3184
|
-
r: parseInt(n[
|
|
3181
|
+
a: n[Ue.a] !== void 0 ? parseInt(n[Ue.a], Bt) / cc : ac,
|
|
3182
|
+
b: parseInt(n[Ue.b], Bt),
|
|
3183
|
+
g: parseInt(n[Ue.g], Bt),
|
|
3184
|
+
r: parseInt(n[Ue.r], Bt)
|
|
3185
3185
|
} : void 0;
|
|
3186
3186
|
}
|
|
3187
3187
|
}
|
|
3188
3188
|
async function uc(t, e = !0) {
|
|
3189
3189
|
t.checkVersion("3.9.1"), await t.addColorManager(new lc(), e);
|
|
3190
3190
|
}
|
|
3191
|
-
var
|
|
3191
|
+
var ct;
|
|
3192
3192
|
(function(t) {
|
|
3193
3193
|
t[t.h = 1] = "h", t[t.s = 2] = "s", t[t.l = 3] = "l", t[t.a = 5] = "a";
|
|
3194
|
-
})(
|
|
3194
|
+
})(ct || (ct = {}));
|
|
3195
3195
|
class hc {
|
|
3196
3196
|
constructor() {
|
|
3197
3197
|
this.key = "hsl", this.stringPrefix = "hsl";
|
|
@@ -3199,15 +3199,15 @@ class hc {
|
|
|
3199
3199
|
handleColor(e) {
|
|
3200
3200
|
const i = e.value, n = i.hsl ?? e.value;
|
|
3201
3201
|
if (n.h !== void 0 && n.s !== void 0 && n.l !== void 0)
|
|
3202
|
-
return
|
|
3202
|
+
return vt(n);
|
|
3203
3203
|
}
|
|
3204
3204
|
handleRangeColor(e) {
|
|
3205
3205
|
const i = e.value, n = i.hsl ?? e.value;
|
|
3206
3206
|
if (n.h !== void 0 && n.l !== void 0)
|
|
3207
|
-
return
|
|
3208
|
-
h:
|
|
3209
|
-
l:
|
|
3210
|
-
s:
|
|
3207
|
+
return vt({
|
|
3208
|
+
h: _(n.h),
|
|
3209
|
+
l: _(n.l),
|
|
3210
|
+
s: _(n.s)
|
|
3211
3211
|
});
|
|
3212
3212
|
}
|
|
3213
3213
|
parseString(e) {
|
|
@@ -3215,10 +3215,10 @@ class hc {
|
|
|
3215
3215
|
return;
|
|
3216
3216
|
const i = /hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i, n = i.exec(e), s = 4, o = 1, r = 10;
|
|
3217
3217
|
return n ? gr({
|
|
3218
|
-
a: n.length > s ? bs(n[
|
|
3219
|
-
h: parseInt(n[
|
|
3220
|
-
l: parseInt(n[
|
|
3221
|
-
s: parseInt(n[
|
|
3218
|
+
a: n.length > s ? bs(n[ct.a]) : o,
|
|
3219
|
+
h: parseInt(n[ct.h], r),
|
|
3220
|
+
l: parseInt(n[ct.l], r),
|
|
3221
|
+
s: parseInt(n[ct.s], r)
|
|
3222
3222
|
}) : void 0;
|
|
3223
3223
|
}
|
|
3224
3224
|
}
|
|
@@ -3233,7 +3233,7 @@ class dc {
|
|
|
3233
3233
|
const i = e.options.opacity, n = 1;
|
|
3234
3234
|
e.opacity = Cs(i, n);
|
|
3235
3235
|
const s = i.animation;
|
|
3236
|
-
s.enable && (e.opacity.velocity =
|
|
3236
|
+
s.enable && (e.opacity.velocity = _(s.speed) / Te * this.container.retina.reduceFactor, s.sync || (e.opacity.velocity *= T()));
|
|
3237
3237
|
}
|
|
3238
3238
|
isEnabled(e) {
|
|
3239
3239
|
return !e.destroyed && !e.spawning && !!e.opacity && e.opacity.enable && ((e.opacity.maxLoops ?? 0) <= 0 || (e.opacity.maxLoops ?? 0) > 0 && (e.opacity.loops ?? 0) < (e.opacity.maxLoops ?? 0));
|
|
@@ -3248,42 +3248,42 @@ class dc {
|
|
|
3248
3248
|
async function pc(t, e = !0) {
|
|
3249
3249
|
t.checkVersion("3.9.1"), await t.addParticleUpdater("opacity", (i) => Promise.resolve(new dc(i)), e);
|
|
3250
3250
|
}
|
|
3251
|
-
const ei = 0,
|
|
3251
|
+
const ei = 0, pt = 0;
|
|
3252
3252
|
function mc(t) {
|
|
3253
|
-
if (t.outMode !==
|
|
3253
|
+
if (t.outMode !== F.bounce && t.outMode !== F.split || t.direction !== z.left && t.direction !== z.right)
|
|
3254
3254
|
return;
|
|
3255
|
-
t.bounds.right <
|
|
3255
|
+
t.bounds.right < pt && t.direction === z.left ? t.particle.position.x = t.size + t.offset.x : t.bounds.left > t.canvasSize.width && t.direction === z.right && (t.particle.position.x = t.canvasSize.width - t.size - t.offset.x);
|
|
3256
3256
|
const e = t.particle.velocity.x;
|
|
3257
3257
|
let i = !1;
|
|
3258
|
-
if (t.direction === z.right && t.bounds.right >= t.canvasSize.width && e > ei || t.direction === z.left && t.bounds.left <=
|
|
3259
|
-
const s =
|
|
3258
|
+
if (t.direction === z.right && t.bounds.right >= t.canvasSize.width && e > ei || t.direction === z.left && t.bounds.left <= pt && e < ei) {
|
|
3259
|
+
const s = _(t.particle.options.bounce.horizontal.value);
|
|
3260
3260
|
t.particle.velocity.x *= -s, i = !0;
|
|
3261
3261
|
}
|
|
3262
3262
|
if (!i)
|
|
3263
3263
|
return;
|
|
3264
3264
|
const n = t.offset.x + t.size;
|
|
3265
|
-
t.bounds.right >= t.canvasSize.width && t.direction === z.right ? t.particle.position.x = t.canvasSize.width - n : t.bounds.left <=
|
|
3265
|
+
t.bounds.right >= t.canvasSize.width && t.direction === z.right ? t.particle.position.x = t.canvasSize.width - n : t.bounds.left <= pt && t.direction === z.left && (t.particle.position.x = n), t.outMode === F.split && t.particle.destroy();
|
|
3266
3266
|
}
|
|
3267
3267
|
function yc(t) {
|
|
3268
|
-
if (t.outMode !==
|
|
3268
|
+
if (t.outMode !== F.bounce && t.outMode !== F.split || t.direction !== z.bottom && t.direction !== z.top)
|
|
3269
3269
|
return;
|
|
3270
|
-
t.bounds.bottom <
|
|
3270
|
+
t.bounds.bottom < pt && t.direction === z.top ? t.particle.position.y = t.size + t.offset.y : t.bounds.top > t.canvasSize.height && t.direction === z.bottom && (t.particle.position.y = t.canvasSize.height - t.size - t.offset.y);
|
|
3271
3271
|
const e = t.particle.velocity.y;
|
|
3272
3272
|
let i = !1;
|
|
3273
|
-
if (t.direction === z.bottom && t.bounds.bottom >= t.canvasSize.height && e > ei || t.direction === z.top && t.bounds.top <=
|
|
3274
|
-
const s =
|
|
3273
|
+
if (t.direction === z.bottom && t.bounds.bottom >= t.canvasSize.height && e > ei || t.direction === z.top && t.bounds.top <= pt && e < ei) {
|
|
3274
|
+
const s = _(t.particle.options.bounce.vertical.value);
|
|
3275
3275
|
t.particle.velocity.y *= -s, i = !0;
|
|
3276
3276
|
}
|
|
3277
3277
|
if (!i)
|
|
3278
3278
|
return;
|
|
3279
3279
|
const n = t.offset.y + t.size;
|
|
3280
|
-
t.bounds.bottom >= t.canvasSize.height && t.direction === z.bottom ? t.particle.position.y = t.canvasSize.height - n : t.bounds.top <=
|
|
3280
|
+
t.bounds.bottom >= t.canvasSize.height && t.direction === z.bottom ? t.particle.position.y = t.canvasSize.height - n : t.bounds.top <= pt && t.direction === z.top && (t.particle.position.y = n), t.outMode === F.split && t.particle.destroy();
|
|
3281
3281
|
}
|
|
3282
3282
|
class gc {
|
|
3283
3283
|
constructor(e) {
|
|
3284
3284
|
this.container = e, this.modes = [
|
|
3285
|
-
|
|
3286
|
-
|
|
3285
|
+
F.bounce,
|
|
3286
|
+
F.split
|
|
3287
3287
|
];
|
|
3288
3288
|
}
|
|
3289
3289
|
update(e, i, n, s) {
|
|
@@ -3303,7 +3303,7 @@ class gc {
|
|
|
3303
3303
|
const qt = 0;
|
|
3304
3304
|
class vc {
|
|
3305
3305
|
constructor(e) {
|
|
3306
|
-
this.container = e, this.modes = [
|
|
3306
|
+
this.container = e, this.modes = [F.destroy];
|
|
3307
3307
|
}
|
|
3308
3308
|
update(e, i, n, s) {
|
|
3309
3309
|
if (!this.modes.includes(s))
|
|
@@ -3312,7 +3312,7 @@ class vc {
|
|
|
3312
3312
|
switch (e.outType) {
|
|
3313
3313
|
case ye.normal:
|
|
3314
3314
|
case ye.outside:
|
|
3315
|
-
if (qi(e.position, o.canvas.size,
|
|
3315
|
+
if (qi(e.position, o.canvas.size, $.origin, e.getRadius(), i))
|
|
3316
3316
|
return;
|
|
3317
3317
|
break;
|
|
3318
3318
|
case ye.inside: {
|
|
@@ -3328,7 +3328,7 @@ class vc {
|
|
|
3328
3328
|
const $t = 0;
|
|
3329
3329
|
class bc {
|
|
3330
3330
|
constructor(e) {
|
|
3331
|
-
this.container = e, this.modes = [
|
|
3331
|
+
this.container = e, this.modes = [F.none];
|
|
3332
3332
|
}
|
|
3333
3333
|
update(e, i, n, s) {
|
|
3334
3334
|
if (!this.modes.includes(s) || ((e.options.move.distance.horizontal && (i === z.left || i === z.right)) ?? (e.options.move.distance.vertical && (i === z.top || i === z.bottom))))
|
|
@@ -3340,14 +3340,14 @@ class bc {
|
|
|
3340
3340
|
} else {
|
|
3341
3341
|
if (e.velocity.y > $t && e.position.y <= a.height + c || e.velocity.y < $t && e.position.y >= -c || e.velocity.x > $t && e.position.x <= a.width + c || e.velocity.x < $t && e.position.x >= -c)
|
|
3342
3342
|
return;
|
|
3343
|
-
qi(e.position, r.canvas.size,
|
|
3343
|
+
qi(e.position, r.canvas.size, $.origin, c, i) || r.particles.remove(e);
|
|
3344
3344
|
}
|
|
3345
3345
|
}
|
|
3346
3346
|
}
|
|
3347
3347
|
const Vt = 0, Ht = 0;
|
|
3348
3348
|
class wc {
|
|
3349
3349
|
constructor(e) {
|
|
3350
|
-
this.container = e, this.modes = [
|
|
3350
|
+
this.container = e, this.modes = [F.out];
|
|
3351
3351
|
}
|
|
3352
3352
|
update(e, i, n, s) {
|
|
3353
3353
|
if (!this.modes.includes(s))
|
|
@@ -3355,8 +3355,8 @@ class wc {
|
|
|
3355
3355
|
const o = this.container;
|
|
3356
3356
|
switch (e.outType) {
|
|
3357
3357
|
case ye.inside: {
|
|
3358
|
-
const { x: r, y: a } = e.velocity, c =
|
|
3359
|
-
c.length = e.moveCenter.radius, c.angle = e.velocity.angle + Math.PI, c.addTo(
|
|
3358
|
+
const { x: r, y: a } = e.velocity, c = $.origin;
|
|
3359
|
+
c.length = e.moveCenter.radius, c.angle = e.velocity.angle + Math.PI, c.addTo($.create(e.moveCenter));
|
|
3360
3360
|
const { dx: l, dy: u } = K(e.position, c);
|
|
3361
3361
|
if (r <= Vt && l >= Ht || a <= Vt && u >= Ht || r >= Vt && l <= Ht || a >= Vt && u <= Ht)
|
|
3362
3362
|
return;
|
|
@@ -3372,7 +3372,7 @@ class wc {
|
|
|
3372
3372
|
break;
|
|
3373
3373
|
}
|
|
3374
3374
|
default: {
|
|
3375
|
-
if (qi(e.position, o.canvas.size,
|
|
3375
|
+
if (qi(e.position, o.canvas.size, $.origin, e.getRadius(), i))
|
|
3376
3376
|
return;
|
|
3377
3377
|
switch (e.outType) {
|
|
3378
3378
|
case ye.outside: {
|
|
@@ -3394,7 +3394,7 @@ class wc {
|
|
|
3394
3394
|
right: a.width + e.getRadius() + e.offset.x,
|
|
3395
3395
|
top: -e.getRadius() - e.offset.y
|
|
3396
3396
|
}, l = e.getRadius(), u = At(e.position, l);
|
|
3397
|
-
i === z.right && u.left > a.width + e.offset.x ? (e.position.x = c.left, e.initialPosition.x = e.position.x, r || (e.position.y =
|
|
3397
|
+
i === z.right && u.left > a.width + e.offset.x ? (e.position.x = c.left, e.initialPosition.x = e.position.x, r || (e.position.y = T() * a.height, e.initialPosition.y = e.position.y)) : i === z.left && u.right < -e.offset.x && (e.position.x = c.right, e.initialPosition.x = e.position.x, r || (e.position.y = T() * a.height, e.initialPosition.y = e.position.y)), i === z.bottom && u.top > a.height + e.offset.y ? (r || (e.position.x = T() * a.width, e.initialPosition.x = e.position.x), e.position.y = c.top, e.initialPosition.y = e.position.y) : i === z.top && u.bottom < -e.offset.y && (r || (e.position.x = T() * a.width, e.initialPosition.x = e.position.x), e.position.y = c.bottom, e.initialPosition.y = e.position.y);
|
|
3398
3398
|
break;
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
@@ -3415,7 +3415,7 @@ class _c {
|
|
|
3415
3415
|
}, this.container = e, this.updaters = /* @__PURE__ */ new Map();
|
|
3416
3416
|
}
|
|
3417
3417
|
init(e) {
|
|
3418
|
-
this._addUpdaterIfMissing(e,
|
|
3418
|
+
this._addUpdaterIfMissing(e, F.bounce, (i) => new gc(i)), this._addUpdaterIfMissing(e, F.out, (i) => new wc(i)), this._addUpdaterIfMissing(e, F.destroy, (i) => new vc(i)), this._addUpdaterIfMissing(e, F.none, (i) => new bc(i));
|
|
3419
3419
|
}
|
|
3420
3420
|
isEnabled(e) {
|
|
3421
3421
|
return !e.destroyed && !e.spawning;
|
|
@@ -3428,10 +3428,10 @@ class _c {
|
|
|
3428
3428
|
async function kc(t, e = !0) {
|
|
3429
3429
|
t.checkVersion("3.9.1"), await t.addParticleUpdater("outModes", (i) => Promise.resolve(new _c(i)), e);
|
|
3430
3430
|
}
|
|
3431
|
-
var
|
|
3431
|
+
var lt;
|
|
3432
3432
|
(function(t) {
|
|
3433
3433
|
t[t.r = 1] = "r", t[t.g = 2] = "g", t[t.b = 3] = "b", t[t.a = 5] = "a";
|
|
3434
|
-
})(
|
|
3434
|
+
})(lt || (lt = {}));
|
|
3435
3435
|
class Cc {
|
|
3436
3436
|
constructor() {
|
|
3437
3437
|
this.key = "rgb", this.stringPrefix = "rgb";
|
|
@@ -3445,9 +3445,9 @@ class Cc {
|
|
|
3445
3445
|
const i = e.value, n = i.rgb ?? e.value;
|
|
3446
3446
|
if (n.r !== void 0)
|
|
3447
3447
|
return {
|
|
3448
|
-
r:
|
|
3449
|
-
g:
|
|
3450
|
-
b:
|
|
3448
|
+
r: _(n.r),
|
|
3449
|
+
g: _(n.g),
|
|
3450
|
+
b: _(n.b)
|
|
3451
3451
|
};
|
|
3452
3452
|
}
|
|
3453
3453
|
parseString(e) {
|
|
@@ -3455,40 +3455,40 @@ class Cc {
|
|
|
3455
3455
|
return;
|
|
3456
3456
|
const i = /rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i, n = i.exec(e), s = 10;
|
|
3457
3457
|
return n ? {
|
|
3458
|
-
a: n.length > 4 ? bs(n[
|
|
3459
|
-
b: parseInt(n[
|
|
3460
|
-
g: parseInt(n[
|
|
3461
|
-
r: parseInt(n[
|
|
3458
|
+
a: n.length > 4 ? bs(n[lt.a]) : 1,
|
|
3459
|
+
b: parseInt(n[lt.b], s),
|
|
3460
|
+
g: parseInt(n[lt.g], s),
|
|
3461
|
+
r: parseInt(n[lt.r], s)
|
|
3462
3462
|
} : void 0;
|
|
3463
3463
|
}
|
|
3464
3464
|
}
|
|
3465
|
-
async function
|
|
3465
|
+
async function Mc(t, e = !0) {
|
|
3466
3466
|
t.checkVersion("3.9.1"), await t.addColorManager(new Cc(), e);
|
|
3467
3467
|
}
|
|
3468
|
-
const
|
|
3469
|
-
class
|
|
3468
|
+
const qe = 0;
|
|
3469
|
+
class Pc {
|
|
3470
3470
|
init(e) {
|
|
3471
3471
|
const i = e.container, n = e.options.size, s = n.animation;
|
|
3472
|
-
s.enable && (e.size.velocity = (e.retina.sizeAnimationSpeed ?? i.retina.sizeAnimationSpeed) /
|
|
3472
|
+
s.enable && (e.size.velocity = (e.retina.sizeAnimationSpeed ?? i.retina.sizeAnimationSpeed) / Te * i.retina.reduceFactor, s.sync || (e.size.velocity *= T()));
|
|
3473
3473
|
}
|
|
3474
3474
|
isEnabled(e) {
|
|
3475
|
-
return !e.destroyed && !e.spawning && e.size.enable && ((e.size.maxLoops ??
|
|
3475
|
+
return !e.destroyed && !e.spawning && e.size.enable && ((e.size.maxLoops ?? qe) <= qe || (e.size.maxLoops ?? qe) > qe && (e.size.loops ?? qe) < (e.size.maxLoops ?? qe));
|
|
3476
3476
|
}
|
|
3477
3477
|
reset(e) {
|
|
3478
|
-
e.size.loops =
|
|
3478
|
+
e.size.loops = qe;
|
|
3479
3479
|
}
|
|
3480
3480
|
update(e, i) {
|
|
3481
3481
|
this.isEnabled(e) && Hi(e, e.size, !0, e.options.size.animation.destroy, i);
|
|
3482
3482
|
}
|
|
3483
3483
|
}
|
|
3484
3484
|
async function zc(t, e = !0) {
|
|
3485
|
-
t.checkVersion("3.9.1"), await t.addParticleUpdater("size", () => Promise.resolve(new
|
|
3485
|
+
t.checkVersion("3.9.1"), await t.addParticleUpdater("size", () => Promise.resolve(new Pc()), e);
|
|
3486
3486
|
}
|
|
3487
3487
|
async function Sc(t, e = !0) {
|
|
3488
|
-
t.checkVersion("3.9.1"), await uc(t, !1), await fc(t, !1), await
|
|
3488
|
+
t.checkVersion("3.9.1"), await uc(t, !1), await fc(t, !1), await Mc(t, !1), await Ya(t, !1), await ic(t, !1), await sc(t, !1), await pc(t, !1), await kc(t, !1), await zc(t, !1), await t.refresh(e);
|
|
3489
3489
|
}
|
|
3490
3490
|
async function Oc(t, e = !0) {
|
|
3491
|
-
t.checkVersion("3.9.1"), await t.addEasing(
|
|
3491
|
+
t.checkVersion("3.9.1"), await t.addEasing(Ye.easeInQuad, (i) => i ** 2, !1), await t.addEasing(Ye.easeOutQuad, (i) => 1 - (1 - i) ** 2, !1), await t.addEasing(Ye.easeInOutQuad, (i) => i < 0.5 ? 2 * i ** 2 : 1 - (-2 * i + 2) ** 2 / 2, !1), await t.refresh(e);
|
|
3492
3492
|
}
|
|
3493
3493
|
function Rc(t, e) {
|
|
3494
3494
|
const { context: i, opacity: n } = t, s = 0.5, o = i.globalAlpha;
|
|
@@ -3515,7 +3515,7 @@ class Tc {
|
|
|
3515
3515
|
}
|
|
3516
3516
|
async init(e) {
|
|
3517
3517
|
const i = e.actualOptions, { validTypes: n } = this;
|
|
3518
|
-
if (!n.find((r) =>
|
|
3518
|
+
if (!n.find((r) => L(r, i.particles.shape.type)))
|
|
3519
3519
|
return;
|
|
3520
3520
|
const s = [Cn(vi)], o = n.map((r) => i.particles.shape.options[r]).find((r) => !!r);
|
|
3521
3521
|
o && oe(o, (r) => {
|
|
@@ -3564,17 +3564,17 @@ class Tc {
|
|
|
3564
3564
|
this._emojiShapeDict.set(l, p), i.emojiDataKey = l;
|
|
3565
3565
|
}
|
|
3566
3566
|
}
|
|
3567
|
-
async function
|
|
3567
|
+
async function Ec(t, e = !0) {
|
|
3568
3568
|
t.checkVersion("3.9.1"), await t.addShape(new Tc(), e);
|
|
3569
3569
|
}
|
|
3570
|
-
const
|
|
3570
|
+
const Ic = 1, Dc = 1, Bs = 0;
|
|
3571
3571
|
function qs(t, e, i, n, s, o) {
|
|
3572
3572
|
const r = e.actualOptions.interactivity.modes.attract;
|
|
3573
3573
|
if (!r)
|
|
3574
3574
|
return;
|
|
3575
3575
|
const a = e.particles.quadTree.query(s, o);
|
|
3576
3576
|
for (const c of a) {
|
|
3577
|
-
const { dx: l, dy: u, distance: h } = K(c.position, i), d = r.speed * r.factor, f = ue(t.getEasing(r.easing)(Dc - h / n) * d,
|
|
3577
|
+
const { dx: l, dy: u, distance: h } = K(c.position, i), d = r.speed * r.factor, f = ue(t.getEasing(r.easing)(Dc - h / n) * d, Ic, r.maxSpeed), p = $.create(h ? l / h * f : d, h ? u / h * f : d);
|
|
3578
3578
|
c.position.subFrom(p);
|
|
3579
3579
|
}
|
|
3580
3580
|
}
|
|
@@ -3585,33 +3585,33 @@ function Lc(t, e, i) {
|
|
|
3585
3585
|
const s = e.interactivity.mouse.clickPosition, o = e.retina.attractModeDistance;
|
|
3586
3586
|
if (!o || o < Bs || !s)
|
|
3587
3587
|
return;
|
|
3588
|
-
qs(t, e, s, o, new
|
|
3588
|
+
qs(t, e, s, o, new N(s.x, s.y, o), (r) => i(r));
|
|
3589
3589
|
} else n.clicking === !1 && (n.particles = []);
|
|
3590
3590
|
}
|
|
3591
3591
|
function Ac(t, e, i) {
|
|
3592
3592
|
const n = e.interactivity.mouse.position, s = e.retina.attractModeDistance;
|
|
3593
|
-
!s || s < Bs || !n || qs(t, e, n, s, new
|
|
3593
|
+
!s || s < Bs || !n || qs(t, e, n, s, new N(n.x, n.y, s), (o) => i(o));
|
|
3594
3594
|
}
|
|
3595
3595
|
class Fc {
|
|
3596
3596
|
constructor() {
|
|
3597
|
-
this.distance = 200, this.duration = 0.4, this.easing =
|
|
3597
|
+
this.distance = 200, this.duration = 0.4, this.easing = Ye.easeOutQuad, this.factor = 1, this.maxSpeed = 50, this.speed = 1;
|
|
3598
3598
|
}
|
|
3599
3599
|
load(e) {
|
|
3600
|
-
|
|
3600
|
+
v(e) || (e.distance !== void 0 && (this.distance = e.distance), e.duration !== void 0 && (this.duration = e.duration), e.easing !== void 0 && (this.easing = e.easing), e.factor !== void 0 && (this.factor = e.factor), e.maxSpeed !== void 0 && (this.maxSpeed = e.maxSpeed), e.speed !== void 0 && (this.speed = e.speed));
|
|
3601
3601
|
}
|
|
3602
3602
|
}
|
|
3603
|
-
const
|
|
3603
|
+
const St = "attract";
|
|
3604
3604
|
let Bc = class extends ke {
|
|
3605
3605
|
constructor(e, i) {
|
|
3606
3606
|
super(i), this._engine = e, i.attract || (i.attract = { particles: [] }), this.handleClickMode = (n) => {
|
|
3607
3607
|
const s = this.container.actualOptions, o = s.interactivity.modes.attract;
|
|
3608
|
-
if (!(!o || n !==
|
|
3608
|
+
if (!(!o || n !== St)) {
|
|
3609
3609
|
i.attract || (i.attract = { particles: [] }), i.attract.clicking = !0, i.attract.count = 0;
|
|
3610
3610
|
for (const r of i.attract.particles)
|
|
3611
3611
|
this.isEnabled(r) && r.velocity.setTo(r.initialVelocity);
|
|
3612
3612
|
i.attract.particles = [], i.attract.finish = !1, setTimeout(() => {
|
|
3613
3613
|
i.destroyed || (i.attract || (i.attract = { particles: [] }), i.attract.clicking = !1);
|
|
3614
|
-
}, o.duration *
|
|
3614
|
+
}, o.duration * j);
|
|
3615
3615
|
}
|
|
3616
3616
|
};
|
|
3617
3617
|
}
|
|
@@ -3622,15 +3622,15 @@ let Bc = class extends ke {
|
|
|
3622
3622
|
i && (e.retina.attractModeDistance = i.distance * e.retina.pixelRatio);
|
|
3623
3623
|
}
|
|
3624
3624
|
interact() {
|
|
3625
|
-
const e = this.container, i = e.actualOptions, n = e.interactivity.status ===
|
|
3626
|
-
n && o &&
|
|
3625
|
+
const e = this.container, i = e.actualOptions, n = e.interactivity.status === Qe, s = i.interactivity.events, { enable: o, mode: r } = s.onHover, { enable: a, mode: c } = s.onClick;
|
|
3626
|
+
n && o && L(St, r) ? Ac(this._engine, this.container, (l) => this.isEnabled(l)) : a && L(St, c) && Lc(this._engine, this.container, (l) => this.isEnabled(l));
|
|
3627
3627
|
}
|
|
3628
3628
|
isEnabled(e) {
|
|
3629
3629
|
const i = this.container, n = i.actualOptions, s = i.interactivity.mouse, o = ((e == null ? void 0 : e.interactivity) ?? n.interactivity).events;
|
|
3630
3630
|
if ((!s.position || !o.onHover.enable) && (!s.clickPosition || !o.onClick.enable))
|
|
3631
3631
|
return !1;
|
|
3632
3632
|
const r = o.onHover.mode, a = o.onClick.mode;
|
|
3633
|
-
return
|
|
3633
|
+
return L(St, r) || L(St, a);
|
|
3634
3634
|
}
|
|
3635
3635
|
loadModeOptions(e, ...i) {
|
|
3636
3636
|
e.attract || (e.attract = new Fc());
|
|
@@ -3647,11 +3647,11 @@ const $c = 2, Yt = 0.5, Vc = Math.PI * Yt, Bn = 2, $s = 10, Hc = 0;
|
|
|
3647
3647
|
function Vs(t, e, i, n, s) {
|
|
3648
3648
|
const o = t.particles.quadTree.query(n, s);
|
|
3649
3649
|
for (const r of o)
|
|
3650
|
-
n instanceof
|
|
3650
|
+
n instanceof N ? _s(Ii(r), {
|
|
3651
3651
|
position: e,
|
|
3652
3652
|
mass: i ** $c * Vc,
|
|
3653
|
-
velocity:
|
|
3654
|
-
factor:
|
|
3653
|
+
velocity: $.origin,
|
|
3654
|
+
factor: $.origin
|
|
3655
3655
|
}) : n instanceof ge && lr(r, At(e, i));
|
|
3656
3656
|
}
|
|
3657
3657
|
function Uc(t, e, i, n) {
|
|
@@ -3660,7 +3660,7 @@ function Uc(t, e, i, n) {
|
|
|
3660
3660
|
const r = o, a = t.retina.pixelRatio, c = {
|
|
3661
3661
|
x: (r.offsetLeft + r.offsetWidth * Yt) * a,
|
|
3662
3662
|
y: (r.offsetTop + r.offsetHeight * Yt) * a
|
|
3663
|
-
}, l = r.offsetWidth * Yt * a, u = $s * a, h = i.type ===
|
|
3663
|
+
}, l = r.offsetWidth * Yt * a, u = $s * a, h = i.type === bt.circle ? new N(c.x, c.y, l + u) : new ge(r.offsetLeft * a - u, r.offsetTop * a - u, r.offsetWidth * a + u * Bn, r.offsetHeight * a + u * Bn);
|
|
3664
3664
|
n(c, l, h);
|
|
3665
3665
|
});
|
|
3666
3666
|
}
|
|
@@ -3669,14 +3669,14 @@ function Wc(t, e, i, n) {
|
|
|
3669
3669
|
}
|
|
3670
3670
|
function jc(t, e) {
|
|
3671
3671
|
const i = t.retina.pixelRatio, n = $s * i, s = t.interactivity.mouse.position, o = t.retina.bounceModeDistance;
|
|
3672
|
-
!o || o < Hc || !s || Vs(t, s, o, new
|
|
3672
|
+
!o || o < Hc || !s || Vs(t, s, o, new N(s.x, s.y, o + n), e);
|
|
3673
3673
|
}
|
|
3674
3674
|
class Gc {
|
|
3675
3675
|
constructor() {
|
|
3676
3676
|
this.distance = 200;
|
|
3677
3677
|
}
|
|
3678
3678
|
load(e) {
|
|
3679
|
-
|
|
3679
|
+
v(e) || e.distance !== void 0 && (this.distance = e.distance);
|
|
3680
3680
|
}
|
|
3681
3681
|
}
|
|
3682
3682
|
const Ut = "bounce";
|
|
@@ -3691,12 +3691,12 @@ class Nc extends ke {
|
|
|
3691
3691
|
i && (e.retina.bounceModeDistance = i.distance * e.retina.pixelRatio);
|
|
3692
3692
|
}
|
|
3693
3693
|
interact() {
|
|
3694
|
-
const e = this.container, i = e.actualOptions, n = i.interactivity.events, s = e.interactivity.status ===
|
|
3695
|
-
s && o &&
|
|
3694
|
+
const e = this.container, i = e.actualOptions, n = i.interactivity.events, s = e.interactivity.status === Qe, o = n.onHover.enable, r = n.onHover.mode, a = n.onDiv;
|
|
3695
|
+
s && o && L(Ut, r) ? jc(this.container, (c) => this.isEnabled(c)) : Wc(this.container, a, Ut, (c) => this.isEnabled(c));
|
|
3696
3696
|
}
|
|
3697
3697
|
isEnabled(e) {
|
|
3698
3698
|
const i = this.container, n = i.actualOptions, s = i.interactivity.mouse, o = ((e == null ? void 0 : e.interactivity) ?? n.interactivity).events, r = o.onDiv;
|
|
3699
|
-
return !!s.position && o.onHover.enable &&
|
|
3699
|
+
return !!s.position && o.onHover.enable && L(Ut, o.onHover.mode) || $i(Ut, r);
|
|
3700
3700
|
}
|
|
3701
3701
|
loadModeOptions(e, ...i) {
|
|
3702
3702
|
e.bounce || (e.bounce = new Gc());
|
|
@@ -3714,10 +3714,10 @@ class Hs {
|
|
|
3714
3714
|
this.distance = 200, this.duration = 0.4, this.mix = !1;
|
|
3715
3715
|
}
|
|
3716
3716
|
load(e) {
|
|
3717
|
-
if (!
|
|
3717
|
+
if (!v(e)) {
|
|
3718
3718
|
if (e.distance !== void 0 && (this.distance = e.distance), e.duration !== void 0 && (this.duration = e.duration), e.mix !== void 0 && (this.mix = e.mix), e.opacity !== void 0 && (this.opacity = e.opacity), e.color !== void 0) {
|
|
3719
3719
|
const i = _e(this.color) ? void 0 : this.color;
|
|
3720
|
-
this.color = oe(e.color, (n) =>
|
|
3720
|
+
this.color = oe(e.color, (n) => Q.create(i, n));
|
|
3721
3721
|
}
|
|
3722
3722
|
e.size !== void 0 && (this.size = e.size);
|
|
3723
3723
|
}
|
|
@@ -3728,12 +3728,12 @@ class Qc extends Hs {
|
|
|
3728
3728
|
super(), this.selectors = [];
|
|
3729
3729
|
}
|
|
3730
3730
|
load(e) {
|
|
3731
|
-
super.load(e), !
|
|
3731
|
+
super.load(e), !v(e) && e.selectors !== void 0 && (this.selectors = e.selectors);
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
3734
|
class Xc extends Hs {
|
|
3735
3735
|
load(e) {
|
|
3736
|
-
super.load(e), !
|
|
3736
|
+
super.load(e), !v(e) && (this.divs = oe(e.divs, (i) => {
|
|
3737
3737
|
const n = new Qc();
|
|
3738
3738
|
return n.load(i), n;
|
|
3739
3739
|
}));
|
|
@@ -3752,7 +3752,7 @@ function qn(t, e, i, n) {
|
|
|
3752
3752
|
return ue(s, e, t);
|
|
3753
3753
|
}
|
|
3754
3754
|
}
|
|
3755
|
-
const
|
|
3755
|
+
const $e = "bubble", bi = 0, Zc = 0, Kc = 2, $n = 1, Vn = 1, Jc = 0, el = 0, wi = 0.5, xi = 1;
|
|
3756
3756
|
class tl extends ke {
|
|
3757
3757
|
constructor(e, i) {
|
|
3758
3758
|
super(e), this._clickBubble = () => {
|
|
@@ -3769,7 +3769,7 @@ class tl extends ke {
|
|
|
3769
3769
|
if (!l.clicking)
|
|
3770
3770
|
continue;
|
|
3771
3771
|
h.bubble.inRange = !l.durationEnd;
|
|
3772
|
-
const d = h.getPosition(), f = se(d, o), p = ((/* @__PURE__ */ new Date()).getTime() - (n.interactivity.mouse.clickTime ?? Zc)) /
|
|
3772
|
+
const d = h.getPosition(), f = se(d, o), p = ((/* @__PURE__ */ new Date()).getTime() - (n.interactivity.mouse.clickTime ?? Zc)) / j;
|
|
3773
3773
|
p > r.duration && (l.durationEnd = !0), p > r.duration * Kc && (l.clicking = !1, l.durationEnd = !1);
|
|
3774
3774
|
const y = {
|
|
3775
3775
|
bubbleObj: {
|
|
@@ -3804,7 +3804,7 @@ class tl extends ke {
|
|
|
3804
3804
|
for (const a of r) {
|
|
3805
3805
|
a.bubble.inRange = !0;
|
|
3806
3806
|
const c = a.getPosition(), l = se(c, s), u = Vn - l / o;
|
|
3807
|
-
l <= o ? u >= el && n.interactivity.status ===
|
|
3807
|
+
l <= o ? u >= el && n.interactivity.status === Qe && (this._hoverBubbleSize(a, u), this._hoverBubbleOpacity(a, u), this._hoverBubbleColor(a, u)) : this.reset(a), n.interactivity.status === zi && this.reset(a);
|
|
3808
3808
|
}
|
|
3809
3809
|
}, this._hoverBubbleColor = (n, s, o) => {
|
|
3810
3810
|
const r = this.container.actualOptions, a = o ?? r.interactivity.modes.bubble;
|
|
@@ -3814,7 +3814,7 @@ class tl extends ke {
|
|
|
3814
3814
|
if (!c)
|
|
3815
3815
|
return;
|
|
3816
3816
|
const l = ce(c);
|
|
3817
|
-
n.bubble.finalColor =
|
|
3817
|
+
n.bubble.finalColor = Et(this._engine, l);
|
|
3818
3818
|
}
|
|
3819
3819
|
if (n.bubble.finalColor)
|
|
3820
3820
|
if (a.mix) {
|
|
@@ -3847,8 +3847,8 @@ class tl extends ke {
|
|
|
3847
3847
|
p && (m === we.size && delete n.bubble.radius, m === we.opacity && delete n.bubble.opacity);
|
|
3848
3848
|
else if (s <= d) {
|
|
3849
3849
|
if ((p ?? y) !== c) {
|
|
3850
|
-
const
|
|
3851
|
-
m === we.size && (n.bubble.radius =
|
|
3850
|
+
const b = y - o * (y - c) / h;
|
|
3851
|
+
m === we.size && (n.bubble.radius = b), m === we.opacity && (n.bubble.opacity = b);
|
|
3852
3852
|
}
|
|
3853
3853
|
} else
|
|
3854
3854
|
m === we.size && delete n.bubble.radius, m === we.opacity && delete n.bubble.opacity;
|
|
@@ -3858,17 +3858,17 @@ class tl extends ke {
|
|
|
3858
3858
|
const u = l, h = r.retina.pixelRatio, d = {
|
|
3859
3859
|
x: (u.offsetLeft + u.offsetWidth * wi) * h,
|
|
3860
3860
|
y: (u.offsetTop + u.offsetHeight * wi) * h
|
|
3861
|
-
}, f = u.offsetWidth * wi * h, p = o.type ===
|
|
3861
|
+
}, f = u.offsetWidth * wi * h, p = o.type === bt.circle ? new N(d.x, d.y, f) : new ge(u.offsetLeft * h, u.offsetTop * h, u.offsetWidth * h, u.offsetHeight * h), y = r.particles.quadTree.query(p, (m) => this.isEnabled(m));
|
|
3862
3862
|
for (const m of y) {
|
|
3863
3863
|
if (!p.contains(m.getPosition()))
|
|
3864
3864
|
continue;
|
|
3865
3865
|
m.bubble.inRange = !0;
|
|
3866
|
-
const
|
|
3867
|
-
(!m.bubble.div || m.bubble.div !== u) && (this.clear(m, n, !0), m.bubble.div = u), this._hoverBubbleSize(m, xi,
|
|
3866
|
+
const w = c.divs, b = xs(w, u);
|
|
3867
|
+
(!m.bubble.div || m.bubble.div !== u) && (this.clear(m, n, !0), m.bubble.div = u), this._hoverBubbleSize(m, xi, b), this._hoverBubbleOpacity(m, xi, b), this._hoverBubbleColor(m, xi, b);
|
|
3868
3868
|
}
|
|
3869
3869
|
});
|
|
3870
3870
|
}, this._engine = i, e.bubble || (e.bubble = {}), this.handleClickMode = (n) => {
|
|
3871
|
-
n ===
|
|
3871
|
+
n === $e && (e.bubble || (e.bubble = {}), e.bubble.clicking = !0);
|
|
3872
3872
|
};
|
|
3873
3873
|
}
|
|
3874
3874
|
clear(e, i, n) {
|
|
@@ -3880,11 +3880,11 @@ class tl extends ke {
|
|
|
3880
3880
|
}
|
|
3881
3881
|
interact(e) {
|
|
3882
3882
|
const i = this.container.actualOptions, n = i.interactivity.events, s = n.onHover, o = n.onClick, r = s.enable, a = s.mode, c = o.enable, l = o.mode, u = n.onDiv;
|
|
3883
|
-
r &&
|
|
3883
|
+
r && L($e, a) ? this._hoverBubble() : c && L($e, l) ? this._clickBubble() : Vi($e, u, (h, d) => this._singleSelectorHover(e, h, d));
|
|
3884
3884
|
}
|
|
3885
3885
|
isEnabled(e) {
|
|
3886
|
-
const i = this.container, n = i.actualOptions, s = i.interactivity.mouse, o = ((e == null ? void 0 : e.interactivity) ?? n.interactivity).events, { onClick: r, onDiv: a, onHover: c } = o, l = $i(
|
|
3887
|
-
return l || c.enable && s.position || r.enable && s.clickPosition ?
|
|
3886
|
+
const i = this.container, n = i.actualOptions, s = i.interactivity.mouse, o = ((e == null ? void 0 : e.interactivity) ?? n.interactivity).events, { onClick: r, onDiv: a, onHover: c } = o, l = $i($e, a);
|
|
3887
|
+
return l || c.enable && s.position || r.enable && s.clickPosition ? L($e, c.mode) || L($e, r.mode) || l : !1;
|
|
3888
3888
|
}
|
|
3889
3889
|
loadModeOptions(e, ...i) {
|
|
3890
3890
|
e.bubble || (e.bubble = new Xc());
|
|
@@ -3903,7 +3903,7 @@ class nl {
|
|
|
3903
3903
|
this.opacity = 0.5;
|
|
3904
3904
|
}
|
|
3905
3905
|
load(e) {
|
|
3906
|
-
|
|
3906
|
+
v(e) || e.opacity !== void 0 && (this.opacity = e.opacity);
|
|
3907
3907
|
}
|
|
3908
3908
|
}
|
|
3909
3909
|
class sl {
|
|
@@ -3911,7 +3911,7 @@ class sl {
|
|
|
3911
3911
|
this.distance = 80, this.links = new nl(), this.radius = 60;
|
|
3912
3912
|
}
|
|
3913
3913
|
load(e) {
|
|
3914
|
-
|
|
3914
|
+
v(e) || (e.distance !== void 0 && (this.distance = e.distance), this.links.load(e.links), e.radius !== void 0 && (this.radius = e.radius));
|
|
3915
3915
|
}
|
|
3916
3916
|
}
|
|
3917
3917
|
const Hn = 0, Un = 1, ol = 0;
|
|
@@ -3920,10 +3920,10 @@ function rl(t, e, i, n) {
|
|
|
3920
3920
|
if (!o || !r)
|
|
3921
3921
|
return;
|
|
3922
3922
|
const a = e.getPosition(), c = i.getPosition(), l = Ui(o, r, e.getRadius(), i.getRadius()), u = t.createLinearGradient(a.x, a.y, c.x, c.y);
|
|
3923
|
-
return u.addColorStop(Hn,
|
|
3923
|
+
return u.addColorStop(Hn, It(o, n)), u.addColorStop(ue(s, Hn, Un), Se(l, n)), u.addColorStop(Un, It(r, n)), u;
|
|
3924
3924
|
}
|
|
3925
3925
|
function al(t, e, i, n, s) {
|
|
3926
|
-
|
|
3926
|
+
Rt(t, n, s), t.lineWidth = e, t.strokeStyle = i, t.stroke();
|
|
3927
3927
|
}
|
|
3928
3928
|
function cl(t, e, i, n) {
|
|
3929
3929
|
const s = t.actualOptions, o = s.interactivity.modes.connect;
|
|
@@ -3968,7 +3968,7 @@ class hl extends ke {
|
|
|
3968
3968
|
}
|
|
3969
3969
|
isEnabled(e) {
|
|
3970
3970
|
const i = this.container, n = i.interactivity.mouse, s = ((e == null ? void 0 : e.interactivity) ?? i.actualOptions.interactivity).events;
|
|
3971
|
-
return s.onHover.enable && n.position ?
|
|
3971
|
+
return s.onHover.enable && n.position ? L(ul, s.onHover.mode) : !1;
|
|
3972
3972
|
}
|
|
3973
3973
|
loadModeOptions(e, ...i) {
|
|
3974
3974
|
e.connect || (e.connect = new sl());
|
|
@@ -3986,7 +3986,7 @@ class dl {
|
|
|
3986
3986
|
this.blink = !1, this.consent = !1, this.opacity = 1;
|
|
3987
3987
|
}
|
|
3988
3988
|
load(e) {
|
|
3989
|
-
|
|
3989
|
+
v(e) || (e.blink !== void 0 && (this.blink = e.blink), e.color !== void 0 && (this.color = Q.create(this.color, e.color)), e.consent !== void 0 && (this.consent = e.consent), e.opacity !== void 0 && (this.opacity = e.opacity));
|
|
3990
3990
|
}
|
|
3991
3991
|
}
|
|
3992
3992
|
class pl {
|
|
@@ -3994,12 +3994,12 @@ class pl {
|
|
|
3994
3994
|
this.distance = 100, this.links = new dl();
|
|
3995
3995
|
}
|
|
3996
3996
|
load(e) {
|
|
3997
|
-
|
|
3997
|
+
v(e) || (e.distance !== void 0 && (this.distance = e.distance), this.links.load(e.links));
|
|
3998
3998
|
}
|
|
3999
3999
|
}
|
|
4000
4000
|
const ml = 0;
|
|
4001
4001
|
function yl(t, e, i, n, s, o) {
|
|
4002
|
-
|
|
4002
|
+
Rt(t, i, n), t.strokeStyle = Se(s, o), t.lineWidth = e, t.stroke();
|
|
4003
4003
|
}
|
|
4004
4004
|
function gl(t, e, i, n, s) {
|
|
4005
4005
|
t.canvas.draw((o) => {
|
|
@@ -4021,7 +4021,7 @@ class xl extends ke {
|
|
|
4021
4021
|
interact() {
|
|
4022
4022
|
var a;
|
|
4023
4023
|
const e = this.container, i = e.actualOptions, n = i.interactivity;
|
|
4024
|
-
if (!n.modes.grab || !n.events.onHover.enable || e.interactivity.status !==
|
|
4024
|
+
if (!n.modes.grab || !n.events.onHover.enable || e.interactivity.status !== Qe)
|
|
4025
4025
|
return;
|
|
4026
4026
|
const s = e.interactivity.mouse.position;
|
|
4027
4027
|
if (!s)
|
|
@@ -4048,7 +4048,7 @@ class xl extends ke {
|
|
|
4048
4048
|
}
|
|
4049
4049
|
isEnabled(e) {
|
|
4050
4050
|
const i = this.container, n = i.interactivity.mouse, s = ((e == null ? void 0 : e.interactivity) ?? i.actualOptions.interactivity).events;
|
|
4051
|
-
return s.onHover.enable && !!n.position &&
|
|
4051
|
+
return s.onHover.enable && !!n.position && L(vl, s.onHover.mode);
|
|
4052
4052
|
}
|
|
4053
4053
|
loadModeOptions(e, ...i) {
|
|
4054
4054
|
e.grab || (e.grab = new pl());
|
|
@@ -4083,19 +4083,19 @@ class Cl extends ke {
|
|
|
4083
4083
|
reset() {
|
|
4084
4084
|
}
|
|
4085
4085
|
}
|
|
4086
|
-
async function
|
|
4086
|
+
async function Ml(t, e = !0) {
|
|
4087
4087
|
t.checkVersion("3.9.1"), await t.addInteractor("externalPause", (i) => Promise.resolve(new Cl(i)), e);
|
|
4088
4088
|
}
|
|
4089
|
-
class
|
|
4089
|
+
class Pl {
|
|
4090
4090
|
constructor() {
|
|
4091
4091
|
this.default = !0, this.groups = [], this.quantity = 4;
|
|
4092
4092
|
}
|
|
4093
4093
|
load(e) {
|
|
4094
|
-
if (
|
|
4094
|
+
if (v(e))
|
|
4095
4095
|
return;
|
|
4096
4096
|
e.default !== void 0 && (this.default = e.default), e.groups !== void 0 && (this.groups = e.groups.map((n) => n)), this.groups.length || (this.default = !0);
|
|
4097
4097
|
const i = e.quantity;
|
|
4098
|
-
i !== void 0 && (this.quantity = S(i)), this.particles = oe(e.particles, (n) =>
|
|
4098
|
+
i !== void 0 && (this.quantity = S(i)), this.particles = oe(e.particles, (n) => Y({}, n));
|
|
4099
4099
|
}
|
|
4100
4100
|
}
|
|
4101
4101
|
const zl = "push", Sl = 0;
|
|
@@ -4107,10 +4107,10 @@ class Ol extends ke {
|
|
|
4107
4107
|
const n = this.container, s = n.actualOptions, o = s.interactivity.modes.push;
|
|
4108
4108
|
if (!o)
|
|
4109
4109
|
return;
|
|
4110
|
-
const r =
|
|
4110
|
+
const r = _(o.quantity);
|
|
4111
4111
|
if (r <= Sl)
|
|
4112
4112
|
return;
|
|
4113
|
-
const a = ii([void 0, ...o.groups]), c = a !== void 0 ? n.actualOptions.particles.groups[a] : void 0, l = ce(o.particles), u =
|
|
4113
|
+
const a = ii([void 0, ...o.groups]), c = a !== void 0 ? n.actualOptions.particles.groups[a] : void 0, l = ce(o.particles), u = Y(c, l);
|
|
4114
4114
|
n.particles.push(r, n.interactivity.mouse, u, a);
|
|
4115
4115
|
};
|
|
4116
4116
|
}
|
|
@@ -4124,7 +4124,7 @@ class Ol extends ke {
|
|
|
4124
4124
|
return !0;
|
|
4125
4125
|
}
|
|
4126
4126
|
loadModeOptions(e, ...i) {
|
|
4127
|
-
e.push || (e.push = new
|
|
4127
|
+
e.push || (e.push = new Pl());
|
|
4128
4128
|
for (const n of i)
|
|
4129
4129
|
e.push.load(n == null ? void 0 : n.push);
|
|
4130
4130
|
}
|
|
@@ -4139,20 +4139,20 @@ class Tl {
|
|
|
4139
4139
|
this.quantity = 2;
|
|
4140
4140
|
}
|
|
4141
4141
|
load(e) {
|
|
4142
|
-
if (
|
|
4142
|
+
if (v(e))
|
|
4143
4143
|
return;
|
|
4144
4144
|
const i = e.quantity;
|
|
4145
4145
|
i !== void 0 && (this.quantity = S(i));
|
|
4146
4146
|
}
|
|
4147
4147
|
}
|
|
4148
|
-
const
|
|
4149
|
-
class
|
|
4148
|
+
const El = "remove";
|
|
4149
|
+
class Il extends ke {
|
|
4150
4150
|
constructor(e) {
|
|
4151
4151
|
super(e), this.handleClickMode = (i) => {
|
|
4152
4152
|
const n = this.container, s = n.actualOptions;
|
|
4153
|
-
if (!s.interactivity.modes.remove || i !==
|
|
4153
|
+
if (!s.interactivity.modes.remove || i !== El)
|
|
4154
4154
|
return;
|
|
4155
|
-
const o =
|
|
4155
|
+
const o = _(s.interactivity.modes.remove.quantity);
|
|
4156
4156
|
n.particles.removeQuantity(o);
|
|
4157
4157
|
};
|
|
4158
4158
|
}
|
|
@@ -4174,14 +4174,14 @@ class El extends ke {
|
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
async function Dl(t, e = !0) {
|
|
4177
|
-
t.checkVersion("3.9.1"), await t.addInteractor("externalRemove", (i) => Promise.resolve(new
|
|
4177
|
+
t.checkVersion("3.9.1"), await t.addInteractor("externalRemove", (i) => Promise.resolve(new Il(i)), e);
|
|
4178
4178
|
}
|
|
4179
4179
|
class Us {
|
|
4180
4180
|
constructor() {
|
|
4181
|
-
this.distance = 200, this.duration = 0.4, this.factor = 100, this.speed = 1, this.maxSpeed = 50, this.easing =
|
|
4181
|
+
this.distance = 200, this.duration = 0.4, this.factor = 100, this.speed = 1, this.maxSpeed = 50, this.easing = Ye.easeOutQuad;
|
|
4182
4182
|
}
|
|
4183
4183
|
load(e) {
|
|
4184
|
-
|
|
4184
|
+
v(e) || (e.distance !== void 0 && (this.distance = e.distance), e.duration !== void 0 && (this.duration = e.duration), e.easing !== void 0 && (this.easing = e.easing), e.factor !== void 0 && (this.factor = e.factor), e.speed !== void 0 && (this.speed = e.speed), e.maxSpeed !== void 0 && (this.maxSpeed = e.maxSpeed));
|
|
4185
4185
|
}
|
|
4186
4186
|
}
|
|
4187
4187
|
class Ll extends Us {
|
|
@@ -4189,18 +4189,18 @@ class Ll extends Us {
|
|
|
4189
4189
|
super(), this.selectors = [];
|
|
4190
4190
|
}
|
|
4191
4191
|
load(e) {
|
|
4192
|
-
super.load(e), !
|
|
4192
|
+
super.load(e), !v(e) && e.selectors !== void 0 && (this.selectors = e.selectors);
|
|
4193
4193
|
}
|
|
4194
4194
|
}
|
|
4195
4195
|
class Al extends Us {
|
|
4196
4196
|
load(e) {
|
|
4197
|
-
super.load(e), !
|
|
4197
|
+
super.load(e), !v(e) && (this.divs = oe(e.divs, (i) => {
|
|
4198
4198
|
const n = new Ll();
|
|
4199
4199
|
return n.load(i), n;
|
|
4200
4200
|
}));
|
|
4201
4201
|
}
|
|
4202
4202
|
}
|
|
4203
|
-
const
|
|
4203
|
+
const Ve = "repulse", Fl = 0, Bl = 6, ql = 3, $l = 2, Vl = 0, Hl = 0, Ul = 1, _i = 0.5;
|
|
4204
4204
|
class Wl extends ke {
|
|
4205
4205
|
constructor(e, i) {
|
|
4206
4206
|
super(i), this._clickRepulse = () => {
|
|
@@ -4215,13 +4215,13 @@ class Wl extends ke {
|
|
|
4215
4215
|
const a = Math.pow(r / Bl, ql), c = n.interactivity.mouse.clickPosition;
|
|
4216
4216
|
if (c === void 0)
|
|
4217
4217
|
return;
|
|
4218
|
-
const l = new
|
|
4218
|
+
const l = new N(c.x, c.y, a), u = n.particles.quadTree.query(l, (h) => this.isEnabled(h));
|
|
4219
4219
|
for (const h of u) {
|
|
4220
|
-
const { dx: d, dy: f, distance: p } = K(c, h.position), y = p ** $l, m = s.speed,
|
|
4220
|
+
const { dx: d, dy: f, distance: p } = K(c, h.position), y = p ** $l, m = s.speed, w = -a * m / y;
|
|
4221
4221
|
if (y <= a) {
|
|
4222
4222
|
o.particles.push(h);
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4223
|
+
const b = $.create(d, f);
|
|
4224
|
+
b.length = w, h.velocity.setTo(b);
|
|
4225
4225
|
}
|
|
4226
4226
|
}
|
|
4227
4227
|
} else if (o.clicking === !1) {
|
|
@@ -4231,15 +4231,15 @@ class Wl extends ke {
|
|
|
4231
4231
|
}
|
|
4232
4232
|
}, this._hoverRepulse = () => {
|
|
4233
4233
|
const n = this.container, s = n.interactivity.mouse.position, o = n.retina.repulseModeDistance;
|
|
4234
|
-
!o || o < Vl || !s || this._processRepulse(s, o, new
|
|
4234
|
+
!o || o < Vl || !s || this._processRepulse(s, o, new N(s.x, s.y, o));
|
|
4235
4235
|
}, this._processRepulse = (n, s, o, r) => {
|
|
4236
4236
|
const a = this.container, c = a.particles.quadTree.query(o, (m) => this.isEnabled(m)), l = a.actualOptions.interactivity.modes.repulse;
|
|
4237
4237
|
if (!l)
|
|
4238
4238
|
return;
|
|
4239
4239
|
const { easing: u, speed: h, factor: d, maxSpeed: f } = l, p = this._engine.getEasing(u), y = ((r == null ? void 0 : r.speed) ?? h) * d;
|
|
4240
4240
|
for (const m of c) {
|
|
4241
|
-
const { dx:
|
|
4242
|
-
m.position.addTo(
|
|
4241
|
+
const { dx: w, dy: b, distance: x } = K(m.position, n), g = ue(p(Ul - x / s) * y, Hl, f), k = $.create(x ? w / x * g : y, x ? b / x * g : y);
|
|
4242
|
+
m.position.addTo(k);
|
|
4243
4243
|
}
|
|
4244
4244
|
}, this._singleSelectorRepulse = (n, s) => {
|
|
4245
4245
|
const o = this.container, r = o.actualOptions.interactivity.modes.repulse;
|
|
@@ -4250,12 +4250,12 @@ class Wl extends ke {
|
|
|
4250
4250
|
const l = c, u = o.retina.pixelRatio, h = {
|
|
4251
4251
|
x: (l.offsetLeft + l.offsetWidth * _i) * u,
|
|
4252
4252
|
y: (l.offsetTop + l.offsetHeight * _i) * u
|
|
4253
|
-
}, d = l.offsetWidth * _i * u, f = s.type ===
|
|
4253
|
+
}, d = l.offsetWidth * _i * u, f = s.type === bt.circle ? new N(h.x, h.y, d) : new ge(l.offsetLeft * u, l.offsetTop * u, l.offsetWidth * u, l.offsetHeight * u), p = r.divs, y = xs(p, l);
|
|
4254
4254
|
this._processRepulse(h, d, f, y);
|
|
4255
4255
|
});
|
|
4256
4256
|
}, this._engine = e, i.repulse || (i.repulse = { particles: [] }), this.handleClickMode = (n) => {
|
|
4257
4257
|
const s = this.container.actualOptions, o = s.interactivity.modes.repulse;
|
|
4258
|
-
if (!o || n !==
|
|
4258
|
+
if (!o || n !== Ve)
|
|
4259
4259
|
return;
|
|
4260
4260
|
i.repulse || (i.repulse = { particles: [] });
|
|
4261
4261
|
const r = i.repulse;
|
|
@@ -4264,7 +4264,7 @@ class Wl extends ke {
|
|
|
4264
4264
|
this.isEnabled(a) && a.velocity.setTo(a.initialVelocity);
|
|
4265
4265
|
r.particles = [], r.finish = !1, setTimeout(() => {
|
|
4266
4266
|
i.destroyed || (r.clicking = !1);
|
|
4267
|
-
}, o.duration *
|
|
4267
|
+
}, o.duration * j);
|
|
4268
4268
|
};
|
|
4269
4269
|
}
|
|
4270
4270
|
clear() {
|
|
@@ -4274,15 +4274,15 @@ class Wl extends ke {
|
|
|
4274
4274
|
i && (e.retina.repulseModeDistance = i.distance * e.retina.pixelRatio);
|
|
4275
4275
|
}
|
|
4276
4276
|
interact() {
|
|
4277
|
-
const e = this.container, i = e.actualOptions, n = e.interactivity.status ===
|
|
4278
|
-
n && r &&
|
|
4277
|
+
const e = this.container, i = e.actualOptions, n = e.interactivity.status === Qe, s = i.interactivity.events, o = s.onHover, r = o.enable, a = o.mode, c = s.onClick, l = c.enable, u = c.mode, h = s.onDiv;
|
|
4278
|
+
n && r && L(Ve, a) ? this._hoverRepulse() : l && L(Ve, u) ? this._clickRepulse() : Vi(Ve, h, (d, f) => this._singleSelectorRepulse(d, f));
|
|
4279
4279
|
}
|
|
4280
4280
|
isEnabled(e) {
|
|
4281
|
-
const i = this.container, n = i.actualOptions, s = i.interactivity.mouse, o = ((e == null ? void 0 : e.interactivity) ?? n.interactivity).events, r = o.onDiv, a = o.onHover, c = o.onClick, l = $i(
|
|
4281
|
+
const i = this.container, n = i.actualOptions, s = i.interactivity.mouse, o = ((e == null ? void 0 : e.interactivity) ?? n.interactivity).events, r = o.onDiv, a = o.onHover, c = o.onClick, l = $i(Ve, r);
|
|
4282
4282
|
if (!(l || a.enable && s.position || c.enable && s.clickPosition))
|
|
4283
4283
|
return !1;
|
|
4284
4284
|
const u = a.mode, h = c.mode;
|
|
4285
|
-
return
|
|
4285
|
+
return L(Ve, u) || L(Ve, h) || l;
|
|
4286
4286
|
}
|
|
4287
4287
|
loadModeOptions(e, ...i) {
|
|
4288
4288
|
e.repulse || (e.repulse = new Al());
|
|
@@ -4300,7 +4300,7 @@ class Gl {
|
|
|
4300
4300
|
this.factor = 3, this.radius = 200;
|
|
4301
4301
|
}
|
|
4302
4302
|
load(e) {
|
|
4303
|
-
|
|
4303
|
+
v(e) || (e.factor !== void 0 && (this.factor = e.factor), e.radius !== void 0 && (this.radius = e.radius));
|
|
4304
4304
|
}
|
|
4305
4305
|
}
|
|
4306
4306
|
const Nl = "slow", Yl = 0;
|
|
@@ -4319,7 +4319,7 @@ class Ql extends ke {
|
|
|
4319
4319
|
}
|
|
4320
4320
|
isEnabled(e) {
|
|
4321
4321
|
const i = this.container, n = i.interactivity.mouse, s = ((e == null ? void 0 : e.interactivity) ?? i.actualOptions.interactivity).events;
|
|
4322
|
-
return s.onHover.enable && !!n.position &&
|
|
4322
|
+
return s.onHover.enable && !!n.position && L(Nl, s.onHover.mode);
|
|
4323
4323
|
}
|
|
4324
4324
|
loadModeOptions(e, ...i) {
|
|
4325
4325
|
e.slow || (e.slow = new Gl());
|
|
@@ -4343,7 +4343,7 @@ function eu(t, e, i) {
|
|
|
4343
4343
|
const { svgData: n } = t;
|
|
4344
4344
|
if (!n)
|
|
4345
4345
|
return "";
|
|
4346
|
-
const s =
|
|
4346
|
+
const s = It(e, i);
|
|
4347
4347
|
if (n.includes("fill"))
|
|
4348
4348
|
return n.replace(Jl, () => s);
|
|
4349
4349
|
const o = n.indexOf(">");
|
|
@@ -4356,7 +4356,7 @@ async function ni(t) {
|
|
|
4356
4356
|
t.element = i, i.addEventListener("load", () => {
|
|
4357
4357
|
t.loading = !1, e();
|
|
4358
4358
|
}), i.addEventListener("error", () => {
|
|
4359
|
-
t.element = void 0, t.error = !0, t.loading = !1,
|
|
4359
|
+
t.element = void 0, t.error = !0, t.loading = !1, Ze().error(`${le} loading image: ${t.source}`), e();
|
|
4360
4360
|
}), i.src = t.source;
|
|
4361
4361
|
});
|
|
4362
4362
|
}
|
|
@@ -4367,7 +4367,7 @@ async function tu(t) {
|
|
|
4367
4367
|
}
|
|
4368
4368
|
t.loading = !0;
|
|
4369
4369
|
const e = await fetch(t.source);
|
|
4370
|
-
e.ok ? t.svgData = await e.text() : (
|
|
4370
|
+
e.ok ? t.svgData = await e.text() : (Ze().error(`${le} Image not found`), t.error = !0), t.loading = !1;
|
|
4371
4371
|
}
|
|
4372
4372
|
function iu(t, e, i, n) {
|
|
4373
4373
|
var r;
|
|
@@ -4447,10 +4447,10 @@ var fe;
|
|
|
4447
4447
|
(function(t) {
|
|
4448
4448
|
t[t.Replace = 0] = "Replace", t[t.Combine = 1] = "Combine", t[t.RestoreBackground = 2] = "RestoreBackground", t[t.RestorePrevious = 3] = "RestorePrevious", t[t.UndefinedA = 4] = "UndefinedA", t[t.UndefinedB = 5] = "UndefinedB", t[t.UndefinedC = 6] = "UndefinedC", t[t.UndefinedD = 7] = "UndefinedD";
|
|
4449
4449
|
})(fe || (fe = {}));
|
|
4450
|
-
var
|
|
4450
|
+
var ze;
|
|
4451
4451
|
(function(t) {
|
|
4452
4452
|
t[t.Extension = 33] = "Extension", t[t.ApplicationExtension = 255] = "ApplicationExtension", t[t.GraphicsControlExtension = 249] = "GraphicsControlExtension", t[t.PlainTextExtension = 1] = "PlainTextExtension", t[t.CommentExtension = 254] = "CommentExtension", t[t.Image = 44] = "Image", t[t.EndOfFile = 59] = "EndOfFile";
|
|
4453
|
-
})(
|
|
4453
|
+
})(ze || (ze = {}));
|
|
4454
4454
|
const J = {
|
|
4455
4455
|
x: 0,
|
|
4456
4456
|
y: 0
|
|
@@ -4467,7 +4467,7 @@ function Ws(t, e) {
|
|
|
4467
4467
|
}
|
|
4468
4468
|
function ru(t, e, i, n) {
|
|
4469
4469
|
switch (t.nextByte()) {
|
|
4470
|
-
case
|
|
4470
|
+
case ze.GraphicsControlExtension: {
|
|
4471
4471
|
const s = e.frames[i(!1)];
|
|
4472
4472
|
t.pos++;
|
|
4473
4473
|
const o = t.nextByte();
|
|
@@ -4478,7 +4478,7 @@ function ru(t, e, i, n) {
|
|
|
4478
4478
|
r && n(a), t.pos++;
|
|
4479
4479
|
break;
|
|
4480
4480
|
}
|
|
4481
|
-
case
|
|
4481
|
+
case ze.ApplicationExtension: {
|
|
4482
4482
|
t.pos++;
|
|
4483
4483
|
const s = {
|
|
4484
4484
|
identifier: t.getString(8),
|
|
@@ -4488,11 +4488,11 @@ function ru(t, e, i, n) {
|
|
|
4488
4488
|
e.applicationExtensions.push(s);
|
|
4489
4489
|
break;
|
|
4490
4490
|
}
|
|
4491
|
-
case
|
|
4491
|
+
case ze.CommentExtension: {
|
|
4492
4492
|
e.comments.push([i(!1), t.readSubBlocks()]);
|
|
4493
4493
|
break;
|
|
4494
4494
|
}
|
|
4495
|
-
case
|
|
4495
|
+
case ze.PlainTextExtension: {
|
|
4496
4496
|
if (e.globalColorTable.length === 0)
|
|
4497
4497
|
throw new EvalError("plain text extension without global color table");
|
|
4498
4498
|
t.pos++, e.frames[i(!1)].plainTextData = {
|
|
@@ -4522,66 +4522,66 @@ async function au(t, e, i, n, s, o) {
|
|
|
4522
4522
|
r.sortFlag = (a & 32) === 32, r.reserved = (a & 24) >>> 3;
|
|
4523
4523
|
const u = 1 << (a & 7) + 1;
|
|
4524
4524
|
c && (r.localColorTable = Ws(t, u));
|
|
4525
|
-
const h = (
|
|
4526
|
-
const { r:
|
|
4527
|
-
return
|
|
4525
|
+
const h = (w) => {
|
|
4526
|
+
const { r: b, g: x, b: g } = (c ? r.localColorTable : e.globalColorTable)[w];
|
|
4527
|
+
return w !== s(null) ? { r: b, g: x, b: g, a: 255 } : { r: b, g: x, b: g, a: i ? ~~((b + x + g) / 3) : 0 };
|
|
4528
4528
|
}, d = (() => {
|
|
4529
4529
|
try {
|
|
4530
4530
|
return new ImageData(r.width, r.height, { colorSpace: "srgb" });
|
|
4531
|
-
} catch (
|
|
4532
|
-
if (
|
|
4531
|
+
} catch (w) {
|
|
4532
|
+
if (w instanceof DOMException && w.name === "IndexSizeError")
|
|
4533
4533
|
return null;
|
|
4534
|
-
throw
|
|
4534
|
+
throw w;
|
|
4535
4535
|
}
|
|
4536
4536
|
})();
|
|
4537
4537
|
if (d == null)
|
|
4538
4538
|
throw new EvalError("GIF frame size is to large");
|
|
4539
|
-
const f = t.nextByte(), p = t.readSubBlocksBin(), y = 1 << f, m = (
|
|
4540
|
-
const
|
|
4541
|
-
return (p[
|
|
4539
|
+
const f = t.nextByte(), p = t.readSubBlocksBin(), y = 1 << f, m = (w, b) => {
|
|
4540
|
+
const x = w >>> 3, g = w & 7;
|
|
4541
|
+
return (p[x] + (p[x + 1] << 8) + (p[x + 2] << 16) & (1 << b) - 1 << g) >>> g;
|
|
4542
4542
|
};
|
|
4543
4543
|
if (l) {
|
|
4544
|
-
for (let
|
|
4545
|
-
if (ki[
|
|
4546
|
-
let
|
|
4547
|
-
for (; !
|
|
4548
|
-
const ee =
|
|
4549
|
-
if (
|
|
4550
|
-
|
|
4551
|
-
for (let
|
|
4552
|
-
|
|
4544
|
+
for (let w = 0, b = f + 1, x = 0, g = [[0]], k = 0; k < 4; k++)
|
|
4545
|
+
if (ki[k] < r.height) {
|
|
4546
|
+
let O = 0, B = 0, U = !1;
|
|
4547
|
+
for (; !U; ) {
|
|
4548
|
+
const ee = w;
|
|
4549
|
+
if (w = m(x, b), x += b + 1, w === y) {
|
|
4550
|
+
b = f + 1, g.length = y + 2;
|
|
4551
|
+
for (let V = 0; V < g.length; V++)
|
|
4552
|
+
g[V] = V < y ? [V] : [];
|
|
4553
4553
|
} else {
|
|
4554
|
-
|
|
4555
|
-
for (const
|
|
4556
|
-
const { r: re, g: he, b:
|
|
4557
|
-
d.data.set([re, he,
|
|
4554
|
+
w >= g.length ? g.push(g[ee].concat(g[ee][0])) : ee !== y && g.push(g[ee].concat(g[w][0]));
|
|
4555
|
+
for (const V of g[w]) {
|
|
4556
|
+
const { r: re, g: he, b: E, a: ve } = h(V);
|
|
4557
|
+
d.data.set([re, he, E, ve], ki[k] * r.width + jn[k] * B + O % (r.width * 4)), O += 4;
|
|
4558
4558
|
}
|
|
4559
|
-
|
|
4559
|
+
g.length === 1 << b && b < 12 && b++;
|
|
4560
4560
|
}
|
|
4561
|
-
|
|
4561
|
+
O === r.width * 4 * (B + 1) && (B++, ki[k] + jn[k] * B >= r.height && (U = !0));
|
|
4562
4562
|
}
|
|
4563
4563
|
}
|
|
4564
4564
|
r.image = d, r.bitmap = await createImageBitmap(d);
|
|
4565
4565
|
} else {
|
|
4566
|
-
let
|
|
4567
|
-
const
|
|
4568
|
-
for (; !
|
|
4569
|
-
const
|
|
4570
|
-
if (
|
|
4571
|
-
|
|
4572
|
-
for (let
|
|
4573
|
-
|
|
4566
|
+
let w = 0, b = f + 1, x = 0, g = -4, k = !1;
|
|
4567
|
+
const O = [[0]];
|
|
4568
|
+
for (; !k; ) {
|
|
4569
|
+
const B = w;
|
|
4570
|
+
if (w = m(x, b), x += b, w === y) {
|
|
4571
|
+
b = f + 1, O.length = y + 2;
|
|
4572
|
+
for (let U = 0; U < O.length; U++)
|
|
4573
|
+
O[U] = U < y ? [U] : [];
|
|
4574
4574
|
} else {
|
|
4575
|
-
if (
|
|
4576
|
-
|
|
4575
|
+
if (w === y + 1) {
|
|
4576
|
+
k = !0;
|
|
4577
4577
|
break;
|
|
4578
4578
|
}
|
|
4579
|
-
|
|
4580
|
-
for (const
|
|
4581
|
-
const { r: ee, g:
|
|
4582
|
-
d.data.set([ee,
|
|
4579
|
+
w >= O.length ? O.push(O[B].concat(O[B][0])) : B !== y && O.push(O[B].concat(O[w][0]));
|
|
4580
|
+
for (const U of O[w]) {
|
|
4581
|
+
const { r: ee, g: V, b: re, a: he } = h(U);
|
|
4582
|
+
d.data.set([ee, V, re, he], g += 4);
|
|
4583
4583
|
}
|
|
4584
|
-
|
|
4584
|
+
O.length >= 1 << b && b < 12 && b++;
|
|
4585
4585
|
}
|
|
4586
4586
|
}
|
|
4587
4587
|
r.image = d, r.bitmap = await createImageBitmap(d);
|
|
@@ -4589,12 +4589,12 @@ async function au(t, e, i, n, s, o) {
|
|
|
4589
4589
|
}
|
|
4590
4590
|
async function cu(t, e, i, n, s, o) {
|
|
4591
4591
|
switch (t.nextByte()) {
|
|
4592
|
-
case
|
|
4592
|
+
case ze.EndOfFile:
|
|
4593
4593
|
return !0;
|
|
4594
|
-
case
|
|
4594
|
+
case ze.Image:
|
|
4595
4595
|
await au(t, e, i, n, s);
|
|
4596
4596
|
break;
|
|
4597
|
-
case
|
|
4597
|
+
case ze.Extension:
|
|
4598
4598
|
ru(t, e, n, s);
|
|
4599
4599
|
break;
|
|
4600
4600
|
default:
|
|
@@ -4636,21 +4636,21 @@ async function uu(t, e, i) {
|
|
|
4636
4636
|
const h = (() => {
|
|
4637
4637
|
try {
|
|
4638
4638
|
return new ImageData(o.width, o.height, { colorSpace: "srgb" });
|
|
4639
|
-
} catch (
|
|
4640
|
-
if (
|
|
4639
|
+
} catch (g) {
|
|
4640
|
+
if (g instanceof DOMException && g.name === "IndexSizeError")
|
|
4641
4641
|
return null;
|
|
4642
|
-
throw
|
|
4642
|
+
throw g;
|
|
4643
4643
|
}
|
|
4644
4644
|
})();
|
|
4645
4645
|
if (h == null)
|
|
4646
4646
|
throw new Error("GIF frame size is to large");
|
|
4647
4647
|
const { r: d, g: f, b: p } = o.globalColorTable[u];
|
|
4648
4648
|
h.data.set(c ? [d, f, p, 255] : [0, 0, 0, 0]);
|
|
4649
|
-
for (let
|
|
4650
|
-
h.data.copyWithin(
|
|
4649
|
+
for (let g = 4; g < h.data.length; g *= 2)
|
|
4650
|
+
h.data.copyWithin(g, 0, g);
|
|
4651
4651
|
o.backgroundImage = h;
|
|
4652
|
-
let y = -1, m = !0,
|
|
4653
|
-
const
|
|
4652
|
+
let y = -1, m = !0, w = -1;
|
|
4653
|
+
const b = (g) => (g && (m = !0), y), x = (g) => (g != null && (w = g), w);
|
|
4654
4654
|
try {
|
|
4655
4655
|
do
|
|
4656
4656
|
m && (o.frames.push({
|
|
@@ -4667,19 +4667,19 @@ async function uu(t, e, i) {
|
|
|
4667
4667
|
localColorTable: [],
|
|
4668
4668
|
reserved: 0,
|
|
4669
4669
|
GCreserved: 0
|
|
4670
|
-
}), y++,
|
|
4671
|
-
while (!await cu(r, o, i,
|
|
4670
|
+
}), y++, w = -1, m = !1);
|
|
4671
|
+
while (!await cu(r, o, i, b, x, e));
|
|
4672
4672
|
o.frames.length--;
|
|
4673
|
-
for (const
|
|
4674
|
-
if (
|
|
4673
|
+
for (const g of o.frames) {
|
|
4674
|
+
if (g.userInputDelayFlag && g.delayTime === 0) {
|
|
4675
4675
|
o.totalTime = 1 / 0;
|
|
4676
4676
|
break;
|
|
4677
4677
|
}
|
|
4678
|
-
o.totalTime +=
|
|
4678
|
+
o.totalTime += g.delayTime;
|
|
4679
4679
|
}
|
|
4680
4680
|
return o;
|
|
4681
|
-
} catch (
|
|
4682
|
-
throw
|
|
4681
|
+
} catch (g) {
|
|
4682
|
+
throw g instanceof EvalError ? new Error(`error while parsing frame ${y} "${g.message}"`) : g;
|
|
4683
4683
|
}
|
|
4684
4684
|
}
|
|
4685
4685
|
function hu(t) {
|
|
@@ -4835,7 +4835,7 @@ class vu {
|
|
|
4835
4835
|
this.src = "", this.gif = !1;
|
|
4836
4836
|
}
|
|
4837
4837
|
load(e) {
|
|
4838
|
-
|
|
4838
|
+
v(e) || (e.gif !== void 0 && (this.gif = e.gif), e.height !== void 0 && (this.height = e.height), e.name !== void 0 && (this.name = e.name), e.replaceColor !== void 0 && (this.replaceColor = e.replaceColor), e.src !== void 0 && (this.src = e.src), e.width !== void 0 && (this.width = e.width));
|
|
4839
4839
|
}
|
|
4840
4840
|
}
|
|
4841
4841
|
class bu {
|
|
@@ -4894,31 +4894,31 @@ async function _u(t, e = !0) {
|
|
|
4894
4894
|
const i = new bu(t);
|
|
4895
4895
|
await t.addPlugin(i, e), await t.addShape(new gu(t), e);
|
|
4896
4896
|
}
|
|
4897
|
-
class ku extends
|
|
4897
|
+
class ku extends Je {
|
|
4898
4898
|
constructor() {
|
|
4899
4899
|
super(), this.sync = !1;
|
|
4900
4900
|
}
|
|
4901
4901
|
load(e) {
|
|
4902
|
-
|
|
4902
|
+
v(e) || (super.load(e), e.sync !== void 0 && (this.sync = e.sync));
|
|
4903
4903
|
}
|
|
4904
4904
|
}
|
|
4905
|
-
class Cu extends
|
|
4905
|
+
class Cu extends Je {
|
|
4906
4906
|
constructor() {
|
|
4907
4907
|
super(), this.sync = !1;
|
|
4908
4908
|
}
|
|
4909
4909
|
load(e) {
|
|
4910
|
-
|
|
4910
|
+
v(e) || (super.load(e), e.sync !== void 0 && (this.sync = e.sync));
|
|
4911
4911
|
}
|
|
4912
4912
|
}
|
|
4913
|
-
class
|
|
4913
|
+
class Mu {
|
|
4914
4914
|
constructor() {
|
|
4915
4915
|
this.count = 0, this.delay = new ku(), this.duration = new Cu();
|
|
4916
4916
|
}
|
|
4917
4917
|
load(e) {
|
|
4918
|
-
|
|
4918
|
+
v(e) || (e.count !== void 0 && (this.count = e.count), this.delay.load(e.delay), this.duration.load(e.duration));
|
|
4919
4919
|
}
|
|
4920
4920
|
}
|
|
4921
|
-
const
|
|
4921
|
+
const ot = 0, Pu = -1, Yn = 0, Qn = 0;
|
|
4922
4922
|
function zu(t, e, i) {
|
|
4923
4923
|
if (!t.life)
|
|
4924
4924
|
return;
|
|
@@ -4926,21 +4926,21 @@ function zu(t, e, i) {
|
|
|
4926
4926
|
let s = !1;
|
|
4927
4927
|
if (t.spawning)
|
|
4928
4928
|
if (n.delayTime += e.value, n.delayTime >= t.life.delay)
|
|
4929
|
-
s = !0, t.spawning = !1, n.delayTime =
|
|
4929
|
+
s = !0, t.spawning = !1, n.delayTime = ot, n.time = ot;
|
|
4930
4930
|
else
|
|
4931
4931
|
return;
|
|
4932
|
-
if (n.duration ===
|
|
4932
|
+
if (n.duration === Pu || t.spawning || (s ? n.time = ot : n.time += e.value, n.time < n.duration))
|
|
4933
4933
|
return;
|
|
4934
|
-
if (n.time =
|
|
4934
|
+
if (n.time = ot, t.life.count > Yn && t.life.count--, t.life.count === Yn) {
|
|
4935
4935
|
t.destroy();
|
|
4936
4936
|
return;
|
|
4937
4937
|
}
|
|
4938
4938
|
const o = S(Qn, i.width), r = S(Qn, i.width);
|
|
4939
|
-
t.position.x = ne(o), t.position.y = ne(r), t.spawning = !0, n.delayTime =
|
|
4939
|
+
t.position.x = ne(o), t.position.y = ne(r), t.spawning = !0, n.delayTime = ot, n.time = ot, t.reset();
|
|
4940
4940
|
const a = t.options.life;
|
|
4941
|
-
a && (n.delay =
|
|
4941
|
+
a && (n.delay = _(a.delay.value) * j, n.duration = _(a.duration.value) * j);
|
|
4942
4942
|
}
|
|
4943
|
-
const
|
|
4943
|
+
const He = 0, Xn = 1, Zn = -1;
|
|
4944
4944
|
class Su {
|
|
4945
4945
|
constructor(e) {
|
|
4946
4946
|
this.container = e;
|
|
@@ -4948,18 +4948,18 @@ class Su {
|
|
|
4948
4948
|
init(e) {
|
|
4949
4949
|
const i = this.container, n = e.options, s = n.life;
|
|
4950
4950
|
s && (e.life = {
|
|
4951
|
-
delay: i.retina.reduceFactor ?
|
|
4952
|
-
delayTime:
|
|
4953
|
-
duration: i.retina.reduceFactor ?
|
|
4954
|
-
time:
|
|
4951
|
+
delay: i.retina.reduceFactor ? _(s.delay.value) * (s.delay.sync ? Xn : T()) / i.retina.reduceFactor * j : He,
|
|
4952
|
+
delayTime: He,
|
|
4953
|
+
duration: i.retina.reduceFactor ? _(s.duration.value) * (s.duration.sync ? Xn : T()) / i.retina.reduceFactor * j : He,
|
|
4954
|
+
time: He,
|
|
4955
4955
|
count: s.count
|
|
4956
|
-
}, e.life.duration <=
|
|
4956
|
+
}, e.life.duration <= He && (e.life.duration = Zn), e.life.count <= He && (e.life.count = Zn), e.life && (e.spawning = e.life.delay > He));
|
|
4957
4957
|
}
|
|
4958
4958
|
isEnabled(e) {
|
|
4959
4959
|
return !e.destroyed;
|
|
4960
4960
|
}
|
|
4961
4961
|
loadOptions(e, ...i) {
|
|
4962
|
-
e.life || (e.life = new
|
|
4962
|
+
e.life || (e.life = new Mu());
|
|
4963
4963
|
for (const n of i)
|
|
4964
4964
|
e.life.load(n == null ? void 0 : n.life);
|
|
4965
4965
|
}
|
|
@@ -4975,7 +4975,7 @@ function Ru(t) {
|
|
|
4975
4975
|
e.moveTo(-n, o), e.lineTo(n, o), e.lineCap = (s == null ? void 0 : s.cap) ?? "butt";
|
|
4976
4976
|
}
|
|
4977
4977
|
const Tu = 1;
|
|
4978
|
-
class
|
|
4978
|
+
class Eu {
|
|
4979
4979
|
constructor() {
|
|
4980
4980
|
this.validTypes = ["line"];
|
|
4981
4981
|
}
|
|
@@ -4986,19 +4986,19 @@ class Iu {
|
|
|
4986
4986
|
return Tu;
|
|
4987
4987
|
}
|
|
4988
4988
|
}
|
|
4989
|
-
async function
|
|
4990
|
-
t.checkVersion("3.9.1"), await t.addShape(new
|
|
4989
|
+
async function Iu(t, e = !0) {
|
|
4990
|
+
t.checkVersion("3.9.1"), await t.addShape(new Eu(), e);
|
|
4991
4991
|
}
|
|
4992
4992
|
const Kn = 0.5;
|
|
4993
4993
|
class Du {
|
|
4994
4994
|
init() {
|
|
4995
4995
|
}
|
|
4996
4996
|
isEnabled(e) {
|
|
4997
|
-
return !
|
|
4997
|
+
return !Ke() && !e.destroyed && e.container.actualOptions.interactivity.events.onHover.parallax.enable;
|
|
4998
4998
|
}
|
|
4999
4999
|
move(e) {
|
|
5000
5000
|
const i = e.container, n = i.actualOptions, s = n.interactivity.events.onHover.parallax;
|
|
5001
|
-
if (
|
|
5001
|
+
if (Ke() || !s.enable)
|
|
5002
5002
|
return;
|
|
5003
5003
|
const o = s.force, r = i.interactivity.mouse.position;
|
|
5004
5004
|
if (!r)
|
|
@@ -5027,7 +5027,7 @@ class Fu extends Gi {
|
|
|
5027
5027
|
}
|
|
5028
5028
|
interact(e) {
|
|
5029
5029
|
const i = this.container;
|
|
5030
|
-
e.attractDistance === void 0 && (e.attractDistance =
|
|
5030
|
+
e.attractDistance === void 0 && (e.attractDistance = _(e.options.move.attract.distance) * i.retina.pixelRatio);
|
|
5031
5031
|
const n = e.attractDistance, s = e.getPosition(), o = i.particles.quadTree.queryCircle(s, n);
|
|
5032
5032
|
for (const r of o) {
|
|
5033
5033
|
if (e === r || !r.options.move.attract.enable || r.destroyed || r.spawning)
|
|
@@ -5055,25 +5055,25 @@ function Hu(t, e, i, n) {
|
|
|
5055
5055
|
s === void 0 && o !== void 0 ? t.destroy() : s !== void 0 && o === void 0 ? e.destroy() : s !== void 0 && o !== void 0 && (s >= o ? es(t, s, e, o, i, n) : es(e, o, t, s, i, n));
|
|
5056
5056
|
}
|
|
5057
5057
|
const ts = (t) => {
|
|
5058
|
-
t.collisionMaxSpeed === void 0 && (t.collisionMaxSpeed =
|
|
5058
|
+
t.collisionMaxSpeed === void 0 && (t.collisionMaxSpeed = _(t.options.collisions.maxSpeed)), t.velocity.length > t.collisionMaxSpeed && (t.velocity.length = t.collisionMaxSpeed);
|
|
5059
5059
|
};
|
|
5060
5060
|
function js(t, e) {
|
|
5061
|
-
_s(
|
|
5061
|
+
_s(Ii(t), Ii(e)), ts(t), ts(e);
|
|
5062
5062
|
}
|
|
5063
5063
|
function Uu(t, e) {
|
|
5064
5064
|
!t.unbreakable && !e.unbreakable && js(t, e), t.getRadius() === void 0 && e.getRadius() !== void 0 ? t.destroy() : t.getRadius() !== void 0 && e.getRadius() === void 0 ? e.destroy() : t.getRadius() !== void 0 && e.getRadius() !== void 0 && (t.getRadius() >= e.getRadius() ? e : t).destroy();
|
|
5065
5065
|
}
|
|
5066
5066
|
function Wu(t, e, i, n) {
|
|
5067
5067
|
switch (t.options.collisions.mode) {
|
|
5068
|
-
case
|
|
5068
|
+
case ft.absorb: {
|
|
5069
5069
|
Hu(t, e, i, n);
|
|
5070
5070
|
break;
|
|
5071
5071
|
}
|
|
5072
|
-
case
|
|
5072
|
+
case ft.bounce: {
|
|
5073
5073
|
js(t, e);
|
|
5074
5074
|
break;
|
|
5075
5075
|
}
|
|
5076
|
-
case
|
|
5076
|
+
case ft.destroy: {
|
|
5077
5077
|
Uu(t, e);
|
|
5078
5078
|
break;
|
|
5079
5079
|
}
|
|
@@ -5112,7 +5112,7 @@ async function Nu(t, e = !0) {
|
|
|
5112
5112
|
t.checkVersion("3.9.1"), await t.addInteractor("particlesCollisions", (i) => Promise.resolve(new Gu(i)), e);
|
|
5113
5113
|
}
|
|
5114
5114
|
const Ci = 2;
|
|
5115
|
-
class Yu extends
|
|
5115
|
+
class Yu extends N {
|
|
5116
5116
|
constructor(e, i, n, s) {
|
|
5117
5117
|
super(e, i, n), this.canvasSize = s, this.canvasSize = { ...s };
|
|
5118
5118
|
}
|
|
@@ -5128,7 +5128,7 @@ class Yu extends G {
|
|
|
5128
5128
|
y: e.position.y - this.canvasSize.height
|
|
5129
5129
|
};
|
|
5130
5130
|
if (n.radius !== void 0) {
|
|
5131
|
-
const o = new
|
|
5131
|
+
const o = new N(s.x, s.y, n.radius * Ci);
|
|
5132
5132
|
return super.intersects(o);
|
|
5133
5133
|
} else if (i.size !== void 0) {
|
|
5134
5134
|
const o = new ge(s.x, s.y, i.size.width * Ci, i.size.height * Ci);
|
|
@@ -5139,10 +5139,10 @@ class Yu extends G {
|
|
|
5139
5139
|
}
|
|
5140
5140
|
class Qu {
|
|
5141
5141
|
constructor() {
|
|
5142
|
-
this.blur = 5, this.color = new
|
|
5142
|
+
this.blur = 5, this.color = new Q(), this.color.value = "#000", this.enable = !1;
|
|
5143
5143
|
}
|
|
5144
5144
|
load(e) {
|
|
5145
|
-
|
|
5145
|
+
v(e) || (e.blur !== void 0 && (this.blur = e.blur), this.color = Q.create(this.color, e.color), e.enable !== void 0 && (this.enable = e.enable));
|
|
5146
5146
|
}
|
|
5147
5147
|
}
|
|
5148
5148
|
class Xu {
|
|
@@ -5150,15 +5150,15 @@ class Xu {
|
|
|
5150
5150
|
this.enable = !1, this.frequency = 1;
|
|
5151
5151
|
}
|
|
5152
5152
|
load(e) {
|
|
5153
|
-
|
|
5153
|
+
v(e) || (e.color !== void 0 && (this.color = Q.create(this.color, e.color)), e.enable !== void 0 && (this.enable = e.enable), e.frequency !== void 0 && (this.frequency = e.frequency), e.opacity !== void 0 && (this.opacity = e.opacity));
|
|
5154
5154
|
}
|
|
5155
5155
|
}
|
|
5156
5156
|
class Zu {
|
|
5157
5157
|
constructor() {
|
|
5158
|
-
this.blink = !1, this.color = new
|
|
5158
|
+
this.blink = !1, this.color = new Q(), this.color.value = "#fff", this.consent = !1, this.distance = 100, this.enable = !1, this.frequency = 1, this.opacity = 1, this.shadow = new Qu(), this.triangles = new Xu(), this.width = 1, this.warp = !1;
|
|
5159
5159
|
}
|
|
5160
5160
|
load(e) {
|
|
5161
|
-
|
|
5161
|
+
v(e) || (e.id !== void 0 && (this.id = e.id), e.blink !== void 0 && (this.blink = e.blink), this.color = Q.create(this.color, e.color), e.consent !== void 0 && (this.consent = e.consent), e.distance !== void 0 && (this.distance = e.distance), e.enable !== void 0 && (this.enable = e.enable), e.frequency !== void 0 && (this.frequency = e.frequency), e.opacity !== void 0 && (this.opacity = e.opacity), this.shadow.load(e.shadow), this.triangles.load(e.triangles), e.width !== void 0 && (this.width = e.width), e.warp !== void 0 && (this.warp = e.warp));
|
|
5162
5162
|
}
|
|
5163
5163
|
}
|
|
5164
5164
|
const is = 2, Ku = 1, Wt = {
|
|
@@ -5205,7 +5205,7 @@ class th extends Gi {
|
|
|
5205
5205
|
return;
|
|
5206
5206
|
const o = e.options.links, r = o.opacity, a = e.retina.linksDistance ?? Ju, c = o.warp;
|
|
5207
5207
|
let l;
|
|
5208
|
-
c ? l = new Yu(i.x, i.y, a, s) : l = new
|
|
5208
|
+
c ? l = new Yu(i.x, i.y, a, s) : l = new N(i.x, i.y, a);
|
|
5209
5209
|
const u = n.particles.quadTree.query(l);
|
|
5210
5210
|
for (const h of u) {
|
|
5211
5211
|
const d = h.options.links;
|
|
@@ -5246,50 +5246,50 @@ function sh(t) {
|
|
|
5246
5246
|
let e = !1;
|
|
5247
5247
|
const { begin: i, end: n, engine: s, maxDistance: o, context: r, canvasSize: a, width: c, backgroundMask: l, colorLine: u, opacity: h, links: d } = t;
|
|
5248
5248
|
if (se(i, n) <= o)
|
|
5249
|
-
|
|
5249
|
+
Rt(r, i, n), e = !0;
|
|
5250
5250
|
else if (d.warp) {
|
|
5251
5251
|
let p, y;
|
|
5252
5252
|
const m = {
|
|
5253
5253
|
x: n.x - a.width,
|
|
5254
5254
|
y: n.y
|
|
5255
|
-
},
|
|
5256
|
-
if (
|
|
5257
|
-
const
|
|
5258
|
-
p = { x: 0, y:
|
|
5255
|
+
}, w = K(i, m);
|
|
5256
|
+
if (w.distance <= o) {
|
|
5257
|
+
const b = i.y - w.dy / w.dx * i.x;
|
|
5258
|
+
p = { x: 0, y: b }, y = { x: a.width, y: b };
|
|
5259
5259
|
} else {
|
|
5260
|
-
const
|
|
5260
|
+
const b = {
|
|
5261
5261
|
x: n.x,
|
|
5262
5262
|
y: n.y - a.height
|
|
5263
|
-
},
|
|
5264
|
-
if (
|
|
5265
|
-
const
|
|
5266
|
-
p = { x:
|
|
5263
|
+
}, x = K(i, b);
|
|
5264
|
+
if (x.distance <= o) {
|
|
5265
|
+
const k = -(i.y - x.dy / x.dx * i.x) / (x.dy / x.dx);
|
|
5266
|
+
p = { x: k, y: 0 }, y = { x: k, y: a.height };
|
|
5267
5267
|
} else {
|
|
5268
|
-
const
|
|
5268
|
+
const g = {
|
|
5269
5269
|
x: n.x - a.width,
|
|
5270
5270
|
y: n.y - a.height
|
|
5271
|
-
},
|
|
5272
|
-
if (
|
|
5273
|
-
const
|
|
5274
|
-
p = { x: -
|
|
5271
|
+
}, k = K(i, g);
|
|
5272
|
+
if (k.distance <= o) {
|
|
5273
|
+
const O = i.y - k.dy / k.dx * i.x;
|
|
5274
|
+
p = { x: -O / (k.dy / k.dx), y: O }, y = { x: p.x + a.width, y: p.y + a.height };
|
|
5275
5275
|
}
|
|
5276
5276
|
}
|
|
5277
5277
|
}
|
|
5278
|
-
p && y && (
|
|
5278
|
+
p && y && (Rt(r, i, p), Rt(r, n, y), e = !0);
|
|
5279
5279
|
}
|
|
5280
5280
|
if (!e)
|
|
5281
5281
|
return;
|
|
5282
|
-
r.lineWidth = c, l.enable && (r.globalCompositeOperation = l.composite), r.strokeStyle =
|
|
5282
|
+
r.lineWidth = c, l.enable && (r.globalCompositeOperation = l.composite), r.strokeStyle = Se(u, h);
|
|
5283
5283
|
const { shadow: f } = d;
|
|
5284
5284
|
if (f.enable) {
|
|
5285
5285
|
const p = me(s, f.color);
|
|
5286
|
-
p && (r.shadowBlur = f.blur, r.shadowColor =
|
|
5286
|
+
p && (r.shadowBlur = f.blur, r.shadowColor = Se(p));
|
|
5287
5287
|
}
|
|
5288
5288
|
r.stroke();
|
|
5289
5289
|
}
|
|
5290
5290
|
function oh(t) {
|
|
5291
5291
|
const { context: e, pos1: i, pos2: n, pos3: s, backgroundMask: o, colorTriangle: r, opacityTriangle: a } = t;
|
|
5292
|
-
nh(e, i, n, s), o.enable && (e.globalCompositeOperation = o.composite), e.fillStyle =
|
|
5292
|
+
nh(e, i, n, s), o.enable && (e.globalCompositeOperation = o.composite), e.fillStyle = Se(r, a), e.fill();
|
|
5293
5293
|
}
|
|
5294
5294
|
function rh(t) {
|
|
5295
5295
|
return t.sort((e, i) => e - i), t.join("_");
|
|
@@ -5297,9 +5297,9 @@ function rh(t) {
|
|
|
5297
5297
|
function ns(t, e) {
|
|
5298
5298
|
const i = rh(t.map((s) => s.id));
|
|
5299
5299
|
let n = e.get(i);
|
|
5300
|
-
return n === void 0 && (n =
|
|
5300
|
+
return n === void 0 && (n = T(), e.set(i, n)), n;
|
|
5301
5301
|
}
|
|
5302
|
-
const ss = 0,
|
|
5302
|
+
const ss = 0, Mi = 0, os = 0, ah = 0.5, ch = 1;
|
|
5303
5303
|
class lh {
|
|
5304
5304
|
constructor(e, i) {
|
|
5305
5305
|
this._drawLinkLine = (n, s) => {
|
|
@@ -5309,20 +5309,20 @@ class lh {
|
|
|
5309
5309
|
const r = this._container, a = r.actualOptions, c = s.destination, l = n.getPosition(), u = c.getPosition();
|
|
5310
5310
|
let h = s.opacity;
|
|
5311
5311
|
r.canvas.draw((d) => {
|
|
5312
|
-
var
|
|
5312
|
+
var b;
|
|
5313
5313
|
let f;
|
|
5314
|
-
const p = (
|
|
5314
|
+
const p = (b = n.options.twinkle) == null ? void 0 : b.lines;
|
|
5315
5315
|
if (p != null && p.enable) {
|
|
5316
|
-
const
|
|
5317
|
-
|
|
5316
|
+
const x = p.frequency, g = me(this._engine, p.color);
|
|
5317
|
+
T() < x && g && (f = g, h = _(p.opacity));
|
|
5318
5318
|
}
|
|
5319
5319
|
if (!f) {
|
|
5320
|
-
const
|
|
5321
|
-
f = Li(n, c,
|
|
5320
|
+
const x = o.id !== void 0 ? r.particles.linksColors.get(o.id) : r.particles.linksColor;
|
|
5321
|
+
f = Li(n, c, x);
|
|
5322
5322
|
}
|
|
5323
5323
|
if (!f)
|
|
5324
5324
|
return;
|
|
5325
|
-
const y = n.retina.linksWidth ??
|
|
5325
|
+
const y = n.retina.linksWidth ?? Mi, m = n.retina.linksDistance ?? os, { backgroundMask: w } = a;
|
|
5326
5326
|
sh({
|
|
5327
5327
|
context: d,
|
|
5328
5328
|
width: y,
|
|
@@ -5332,7 +5332,7 @@ class lh {
|
|
|
5332
5332
|
maxDistance: m,
|
|
5333
5333
|
canvasSize: r.canvas.size,
|
|
5334
5334
|
links: o,
|
|
5335
|
-
backgroundMask:
|
|
5335
|
+
backgroundMask: w,
|
|
5336
5336
|
colorLine: f,
|
|
5337
5337
|
opacity: h
|
|
5338
5338
|
});
|
|
@@ -5346,21 +5346,21 @@ class lh {
|
|
|
5346
5346
|
return;
|
|
5347
5347
|
const c = this._container, l = c.actualOptions, u = s.destination, h = o.destination, d = a.opacity ?? (s.opacity + o.opacity) * ah;
|
|
5348
5348
|
d <= ss || c.canvas.draw((f) => {
|
|
5349
|
-
const p = n.getPosition(), y = u.getPosition(), m = h.getPosition(),
|
|
5350
|
-
if (se(p, y) >
|
|
5349
|
+
const p = n.getPosition(), y = u.getPosition(), m = h.getPosition(), w = n.retina.linksDistance ?? os;
|
|
5350
|
+
if (se(p, y) > w || se(m, y) > w || se(m, p) > w)
|
|
5351
5351
|
return;
|
|
5352
|
-
let
|
|
5353
|
-
if (!
|
|
5354
|
-
const
|
|
5355
|
-
|
|
5352
|
+
let b = me(this._engine, a.color);
|
|
5353
|
+
if (!b) {
|
|
5354
|
+
const x = r.id !== void 0 ? c.particles.linksColors.get(r.id) : c.particles.linksColor;
|
|
5355
|
+
b = Li(n, u, x);
|
|
5356
5356
|
}
|
|
5357
|
-
|
|
5357
|
+
b && oh({
|
|
5358
5358
|
context: f,
|
|
5359
5359
|
pos1: p,
|
|
5360
5360
|
pos2: y,
|
|
5361
5361
|
pos3: m,
|
|
5362
5362
|
backgroundMask: l.backgroundMask,
|
|
5363
|
-
colorTriangle:
|
|
5363
|
+
colorTriangle: b,
|
|
5364
5364
|
opacityTriangle: d
|
|
5365
5365
|
});
|
|
5366
5366
|
});
|
|
@@ -5389,7 +5389,7 @@ class lh {
|
|
|
5389
5389
|
return;
|
|
5390
5390
|
const o = n.filter((r) => s.links && (s.links.frequency >= ch || this._getLinkFrequency(i, r.destination) <= s.links.frequency));
|
|
5391
5391
|
for (const r of o)
|
|
5392
|
-
this._drawTriangles(s, i, r, o), r.opacity > ss && (i.retina.linksWidth ??
|
|
5392
|
+
this._drawTriangles(s, i, r, o), r.opacity > ss && (i.retina.linksWidth ?? Mi) > Mi && this._drawLinkLine(i, r);
|
|
5393
5393
|
}
|
|
5394
5394
|
async init() {
|
|
5395
5395
|
this._freqs.links = /* @__PURE__ */ new Map(), this._freqs.triangles = /* @__PURE__ */ new Map(), await Promise.resolve();
|
|
@@ -5441,7 +5441,7 @@ class Gs {
|
|
|
5441
5441
|
}
|
|
5442
5442
|
getSidesCount(e) {
|
|
5443
5443
|
const i = e.shapeData;
|
|
5444
|
-
return Math.round(
|
|
5444
|
+
return Math.round(_((i == null ? void 0 : i.sides) ?? yh));
|
|
5445
5445
|
}
|
|
5446
5446
|
}
|
|
5447
5447
|
const rs = 3.5, as = 2.66, gh = 3;
|
|
@@ -5497,23 +5497,23 @@ async function kh(t, e = !0) {
|
|
|
5497
5497
|
async function Ch(t, e = !0) {
|
|
5498
5498
|
t.checkVersion("3.9.1"), await t.addShape(new _h(), e);
|
|
5499
5499
|
}
|
|
5500
|
-
async function
|
|
5500
|
+
async function Mh(t, e = !0) {
|
|
5501
5501
|
t.checkVersion("3.9.1"), await kh(t, e), await Ch(t, e);
|
|
5502
5502
|
}
|
|
5503
|
-
class
|
|
5503
|
+
class Ph {
|
|
5504
5504
|
constructor() {
|
|
5505
5505
|
this.enable = !1, this.speed = 0, this.decay = 0, this.sync = !1;
|
|
5506
5506
|
}
|
|
5507
5507
|
load(e) {
|
|
5508
|
-
|
|
5508
|
+
v(e) || (e.enable !== void 0 && (this.enable = e.enable), e.speed !== void 0 && (this.speed = S(e.speed)), e.decay !== void 0 && (this.decay = S(e.decay)), e.sync !== void 0 && (this.sync = e.sync));
|
|
5509
5509
|
}
|
|
5510
5510
|
}
|
|
5511
|
-
class zh extends
|
|
5511
|
+
class zh extends Je {
|
|
5512
5512
|
constructor() {
|
|
5513
|
-
super(), this.animation = new
|
|
5513
|
+
super(), this.animation = new Ph(), this.direction = de.clockwise, this.path = !1, this.value = 0;
|
|
5514
5514
|
}
|
|
5515
5515
|
load(e) {
|
|
5516
|
-
|
|
5516
|
+
v(e) || (super.load(e), e.direction !== void 0 && (this.direction = e.direction), this.animation.load(e.animation), e.path !== void 0 && (this.path = e.path));
|
|
5517
5517
|
}
|
|
5518
5518
|
}
|
|
5519
5519
|
const Ns = 2, Sh = Math.PI * Ns, Oh = 1, Rh = 360;
|
|
@@ -5527,22 +5527,22 @@ class Th {
|
|
|
5527
5527
|
return;
|
|
5528
5528
|
e.rotate = {
|
|
5529
5529
|
enable: i.animation.enable,
|
|
5530
|
-
value: Ie(
|
|
5530
|
+
value: Ie(_(i.value)),
|
|
5531
5531
|
min: 0,
|
|
5532
5532
|
max: Sh
|
|
5533
5533
|
}, e.pathRotation = i.path;
|
|
5534
5534
|
let n = i.direction;
|
|
5535
|
-
switch (n === de.random && (n = Math.floor(
|
|
5535
|
+
switch (n === de.random && (n = Math.floor(T() * Ns) > 0 ? de.counterClockwise : de.clockwise), n) {
|
|
5536
5536
|
case de.counterClockwise:
|
|
5537
5537
|
case "counterClockwise":
|
|
5538
|
-
e.rotate.status =
|
|
5538
|
+
e.rotate.status = A.decreasing;
|
|
5539
5539
|
break;
|
|
5540
5540
|
case de.clockwise:
|
|
5541
|
-
e.rotate.status =
|
|
5541
|
+
e.rotate.status = A.increasing;
|
|
5542
5542
|
break;
|
|
5543
5543
|
}
|
|
5544
5544
|
const s = i.animation;
|
|
5545
|
-
s.enable && (e.rotate.decay = Oh -
|
|
5545
|
+
s.enable && (e.rotate.decay = Oh - _(s.decay), e.rotate.velocity = _(s.speed) / Rh * this.container.retina.reduceFactor, s.sync || (e.rotate.velocity *= T())), e.rotation = e.rotate.value;
|
|
5546
5546
|
}
|
|
5547
5547
|
isEnabled(e) {
|
|
5548
5548
|
const i = e.options.rotate;
|
|
@@ -5554,13 +5554,13 @@ class Th {
|
|
|
5554
5554
|
e.rotate.load(n == null ? void 0 : n.rotate);
|
|
5555
5555
|
}
|
|
5556
5556
|
update(e, i) {
|
|
5557
|
-
this.isEnabled(e) && (e.isRotating = !!e.rotate, e.rotate && (Hi(e, e.rotate, !1,
|
|
5557
|
+
this.isEnabled(e) && (e.isRotating = !!e.rotate, e.rotate && (Hi(e, e.rotate, !1, Xe.none, i), e.rotation = e.rotate.value));
|
|
5558
5558
|
}
|
|
5559
5559
|
}
|
|
5560
|
-
async function
|
|
5560
|
+
async function Eh(t, e = !0) {
|
|
5561
5561
|
t.checkVersion("3.9.1"), await t.addParticleUpdater("rotate", (i) => Promise.resolve(new Th(i)), e);
|
|
5562
5562
|
}
|
|
5563
|
-
const
|
|
5563
|
+
const Ih = 2, Dh = Math.sqrt(Ih), Lh = 2;
|
|
5564
5564
|
function Ah(t) {
|
|
5565
5565
|
const { context: e, radius: i } = t, n = i / Dh, s = n * Lh;
|
|
5566
5566
|
e.rect(-n, -n, s, s);
|
|
@@ -5580,12 +5580,12 @@ class Bh {
|
|
|
5580
5580
|
async function qh(t, e = !0) {
|
|
5581
5581
|
t.checkVersion("3.9.1"), await t.addShape(new Bh(), e);
|
|
5582
5582
|
}
|
|
5583
|
-
const $h = 2,
|
|
5583
|
+
const $h = 2, rt = { x: 0, y: 0 };
|
|
5584
5584
|
function Vh(t) {
|
|
5585
5585
|
const { context: e, particle: i, radius: n } = t, s = i.sides, o = i.starInset ?? $h;
|
|
5586
|
-
e.moveTo(
|
|
5586
|
+
e.moveTo(rt.x, rt.y - n);
|
|
5587
5587
|
for (let r = 0; r < s; r++)
|
|
5588
|
-
e.rotate(Math.PI / s), e.lineTo(
|
|
5588
|
+
e.rotate(Math.PI / s), e.lineTo(rt.x, rt.y - n * o), e.rotate(Math.PI / s), e.lineTo(rt.x, rt.y - n);
|
|
5589
5589
|
}
|
|
5590
5590
|
const Hh = 2, Uh = 5;
|
|
5591
5591
|
class Wh {
|
|
@@ -5597,11 +5597,11 @@ class Wh {
|
|
|
5597
5597
|
}
|
|
5598
5598
|
getSidesCount(e) {
|
|
5599
5599
|
const i = e.shapeData;
|
|
5600
|
-
return Math.round(
|
|
5600
|
+
return Math.round(_((i == null ? void 0 : i.sides) ?? Uh));
|
|
5601
5601
|
}
|
|
5602
5602
|
particleInit(e, i) {
|
|
5603
5603
|
const n = i.shapeData;
|
|
5604
|
-
i.starInset =
|
|
5604
|
+
i.starInset = _((n == null ? void 0 : n.inset) ?? Hh);
|
|
5605
5605
|
}
|
|
5606
5606
|
}
|
|
5607
5607
|
async function jh(t, e = !0) {
|
|
@@ -5615,8 +5615,8 @@ class Nh {
|
|
|
5615
5615
|
init(e) {
|
|
5616
5616
|
var r;
|
|
5617
5617
|
const i = this._container, n = e.options, s = ce(n.stroke, e.id, n.reduceDuplicates);
|
|
5618
|
-
e.strokeWidth =
|
|
5619
|
-
const o =
|
|
5618
|
+
e.strokeWidth = _(s.width) * i.retina.pixelRatio, e.strokeOpacity = _(s.opacity ?? Gh), e.strokeAnimation = (r = s.color) == null ? void 0 : r.animation;
|
|
5619
|
+
const o = Et(this._engine, s.color) ?? e.getFillColor();
|
|
5620
5620
|
o && (e.strokeColor = Rs(o, e.strokeAnimation, i.retina.reduceFactor));
|
|
5621
5621
|
}
|
|
5622
5622
|
isEnabled(e) {
|
|
@@ -5631,9 +5631,9 @@ async function Yh(t, e = !0) {
|
|
|
5631
5631
|
t.checkVersion("3.9.1"), await t.addParticleUpdater("strokeColor", (i) => Promise.resolve(new Nh(i, t)), e);
|
|
5632
5632
|
}
|
|
5633
5633
|
async function Qh(t, e = !0) {
|
|
5634
|
-
t.checkVersion("3.9.1"), await Lu(t, !1), await qc(t, !1), await Yc(t, !1), await il(t, !1), await fl(t, !1), await _l(t, !1), await
|
|
5634
|
+
t.checkVersion("3.9.1"), await Lu(t, !1), await qc(t, !1), await Yc(t, !1), await il(t, !1), await fl(t, !1), await _l(t, !1), await Ml(t, !1), await Rl(t, !1), await Dl(t, !1), await jl(t, !1), await Xl(t, !1), await Bu(t, !1), await Nu(t, !1), await fh(t, !1), await Oc(t, !1), await Ec(t, !1), await _u(t, !1), await Iu(t, !1), await Mh(t, !1), await qh(t, !1), await jh(t, !1), await Ou(t, !1), await Eh(t, !1), await Yh(t, !1), await Sc(t, e);
|
|
5635
5635
|
}
|
|
5636
|
-
const
|
|
5636
|
+
const Ae = {
|
|
5637
5637
|
fullScreen: {
|
|
5638
5638
|
enable: !0,
|
|
5639
5639
|
zIndex: 0
|
|
@@ -5663,7 +5663,7 @@ const Ke = {
|
|
|
5663
5663
|
options: (t) => {
|
|
5664
5664
|
const e = Xh;
|
|
5665
5665
|
return {
|
|
5666
|
-
...
|
|
5666
|
+
...Ae,
|
|
5667
5667
|
interactivity: {
|
|
5668
5668
|
detectsOn: "window",
|
|
5669
5669
|
events: {
|
|
@@ -5722,7 +5722,7 @@ const Ke = {
|
|
|
5722
5722
|
description: "浪漫飘落雪花",
|
|
5723
5723
|
backgroundGradient: "linear-gradient(180deg, #1e3a5f 0%, #2d4a6b 50%, #3d5a7b 100%)",
|
|
5724
5724
|
options: (t) => ({
|
|
5725
|
-
...
|
|
5725
|
+
...Ae,
|
|
5726
5726
|
interactivity: {
|
|
5727
5727
|
detectsOn: "window",
|
|
5728
5728
|
events: {
|
|
@@ -5773,7 +5773,7 @@ const Ke = {
|
|
|
5773
5773
|
description: "梦幻上升气泡",
|
|
5774
5774
|
backgroundGradient: "linear-gradient(180deg, #0a2647 0%, #144272 50%, #205295 100%)",
|
|
5775
5775
|
options: (t) => ({
|
|
5776
|
-
...
|
|
5776
|
+
...Ae,
|
|
5777
5777
|
interactivity: {
|
|
5778
5778
|
detectsOn: "window",
|
|
5779
5779
|
events: {
|
|
@@ -5829,7 +5829,7 @@ const Ke = {
|
|
|
5829
5829
|
description: "闪烁星空效果",
|
|
5830
5830
|
backgroundGradient: "linear-gradient(180deg, #000000 0%, #1a1a2e 50%, #16213e 100%)",
|
|
5831
5831
|
options: (t) => ({
|
|
5832
|
-
...
|
|
5832
|
+
...Ae,
|
|
5833
5833
|
interactivity: {
|
|
5834
5834
|
detectsOn: "window",
|
|
5835
5835
|
events: {
|
|
@@ -5896,7 +5896,7 @@ const Ke = {
|
|
|
5896
5896
|
description: "温暖的萤火虫光效",
|
|
5897
5897
|
backgroundGradient: "linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%)",
|
|
5898
5898
|
options: (t) => ({
|
|
5899
|
-
...
|
|
5899
|
+
...Ae,
|
|
5900
5900
|
interactivity: {
|
|
5901
5901
|
detectsOn: "window",
|
|
5902
5902
|
events: {
|
|
@@ -5954,7 +5954,7 @@ const Ke = {
|
|
|
5954
5954
|
description: "漂浮的抽象几何图形",
|
|
5955
5955
|
backgroundGradient: "linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%)",
|
|
5956
5956
|
options: (t) => ({
|
|
5957
|
-
...
|
|
5957
|
+
...Ae,
|
|
5958
5958
|
interactivity: {
|
|
5959
5959
|
detectsOn: "window",
|
|
5960
5960
|
events: {
|
|
@@ -6021,11 +6021,19 @@ const Ke = {
|
|
|
6021
6021
|
isThreeJS: !0,
|
|
6022
6022
|
backgroundGradient: "linear-gradient(180deg, #000000 0%, #0a1628 50%, #0d1f3c 100%)",
|
|
6023
6023
|
options: () => ({
|
|
6024
|
-
...
|
|
6024
|
+
...Ae,
|
|
6025
6025
|
particles: {
|
|
6026
6026
|
number: { value: 0 }
|
|
6027
6027
|
}
|
|
6028
6028
|
})
|
|
6029
|
+
}, sf = {
|
|
6030
|
+
id: "wave2d",
|
|
6031
|
+
name: "轻量波浪",
|
|
6032
|
+
icon: "🌊",
|
|
6033
|
+
description: "轻量级 Canvas 2D 粒子波浪",
|
|
6034
|
+
isThreeJS: !0,
|
|
6035
|
+
options: () => Ae,
|
|
6036
|
+
backgroundGradient: "linear-gradient(180deg, #000000 0%, #0a1628 50%, #0d1f3c 100%)"
|
|
6029
6037
|
}, Qs = [
|
|
6030
6038
|
Ys,
|
|
6031
6039
|
Zh,
|
|
@@ -6033,43 +6041,44 @@ const Ke = {
|
|
|
6033
6041
|
Jh,
|
|
6034
6042
|
ef,
|
|
6035
6043
|
tf,
|
|
6036
|
-
nf
|
|
6037
|
-
|
|
6044
|
+
nf,
|
|
6045
|
+
sf
|
|
6046
|
+
], Xs = (t) => Qs.find((e) => e.id === t) || Ys, Zs = "starline", Yi = oo(null), cs = "rpb-theme-id", kf = ({
|
|
6038
6047
|
defaultTheme: t = Zs,
|
|
6039
6048
|
isDark: e = !0,
|
|
6040
6049
|
persist: i = !0,
|
|
6041
6050
|
children: n
|
|
6042
6051
|
}) => {
|
|
6043
6052
|
const [s, o] = Tt(() => i && typeof window < "u" && localStorage.getItem(cs) || t), [r, a] = Tt(e);
|
|
6044
|
-
|
|
6053
|
+
mt(() => {
|
|
6045
6054
|
a(e);
|
|
6046
6055
|
}, [e]);
|
|
6047
|
-
const c =
|
|
6056
|
+
const c = Ot((l) => {
|
|
6048
6057
|
o(l), i && typeof window < "u" && localStorage.setItem(cs, l);
|
|
6049
6058
|
}, [i]);
|
|
6050
|
-
return /* @__PURE__ */
|
|
6051
|
-
},
|
|
6059
|
+
return /* @__PURE__ */ D(Yi.Provider, { value: { themeId: s, isDark: r, setTheme: c, setDark: a }, children: n });
|
|
6060
|
+
}, of = () => {
|
|
6052
6061
|
const t = us(Yi);
|
|
6053
6062
|
if (!t)
|
|
6054
6063
|
throw new Error("useParticleTheme must be used within a <ParticleProvider>");
|
|
6055
6064
|
return t;
|
|
6056
|
-
},
|
|
6065
|
+
}, rf = () => us(Yi), af = ({
|
|
6057
6066
|
background: t = "linear-gradient(180deg, #000000 0%, #0a1628 50%, #0d1f3c 100%)",
|
|
6058
6067
|
className: e,
|
|
6059
6068
|
style: i
|
|
6060
6069
|
}) => {
|
|
6061
|
-
const n =
|
|
6062
|
-
return
|
|
6070
|
+
const n = Pe(null), s = Pe(), o = Pe(!0);
|
|
6071
|
+
return mt(() => {
|
|
6063
6072
|
let r = !1, a;
|
|
6064
6073
|
return (async () => {
|
|
6065
6074
|
let c;
|
|
6066
6075
|
try {
|
|
6067
|
-
const
|
|
6068
|
-
if (typeof
|
|
6069
|
-
c =
|
|
6076
|
+
const M = globalThis.require;
|
|
6077
|
+
if (typeof M == "function")
|
|
6078
|
+
c = M("three");
|
|
6070
6079
|
else {
|
|
6071
|
-
const
|
|
6072
|
-
c =
|
|
6080
|
+
const C = await import("three");
|
|
6081
|
+
c = C.default ?? C;
|
|
6073
6082
|
}
|
|
6074
6083
|
} catch {
|
|
6075
6084
|
o.current = !1, console.warn('[react-particle-backgrounds] 未安装 "three"。波浪主题需要它作为 peer dependency。');
|
|
@@ -6082,15 +6091,15 @@ const Ke = {
|
|
|
6082
6091
|
f.position.set(0, 50, 100), f.lookAt(0, 0, 0);
|
|
6083
6092
|
const p = new c.WebGLRenderer({ antialias: !0, alpha: !0 });
|
|
6084
6093
|
p.setSize(u, h), p.setPixelRatio(Math.min(window.devicePixelRatio, 2)), l.appendChild(p.domElement);
|
|
6085
|
-
const y = 15e3, m = 200,
|
|
6086
|
-
for (let
|
|
6087
|
-
const
|
|
6088
|
-
|
|
6094
|
+
const y = 15e3, m = 200, w = 100, b = new c.BufferGeometry(), x = new Float32Array(y * 3), g = new Float32Array(y * 3), k = new Float32Array(y);
|
|
6095
|
+
for (let M = 0; M < y; M++) {
|
|
6096
|
+
const C = M * 3;
|
|
6097
|
+
x[C] = (Math.random() - 0.5) * m, x[C + 1] = 0, x[C + 2] = (Math.random() - 0.5) * w;
|
|
6089
6098
|
const te = Math.random();
|
|
6090
|
-
te < 0.5 ? (
|
|
6099
|
+
te < 0.5 ? (g[C] = 0, g[C + 1] = 0.8 + Math.random() * 0.2, g[C + 2] = 1) : te < 0.8 ? (g[C] = 0.1, g[C + 1] = 0.3 + Math.random() * 0.3, g[C + 2] = 0.9 + Math.random() * 0.1) : (g[C] = 0.8 + Math.random() * 0.2, g[C + 1] = 0.9 + Math.random() * 0.1, g[C + 2] = 1), k[M] = Math.random() * 2 + 0.5;
|
|
6091
6100
|
}
|
|
6092
|
-
|
|
6093
|
-
const
|
|
6101
|
+
b.setAttribute("position", new c.BufferAttribute(x, 3)), b.setAttribute("color", new c.BufferAttribute(g, 3)), b.setAttribute("size", new c.BufferAttribute(k, 1));
|
|
6102
|
+
const O = `
|
|
6094
6103
|
attribute float size;
|
|
6095
6104
|
varying vec3 vColor;
|
|
6096
6105
|
void main() {
|
|
@@ -6099,7 +6108,7 @@ const Ke = {
|
|
|
6099
6108
|
gl_PointSize = size * (300.0 / -mvPosition.z);
|
|
6100
6109
|
gl_Position = projectionMatrix * mvPosition;
|
|
6101
6110
|
}
|
|
6102
|
-
`,
|
|
6111
|
+
`, B = `
|
|
6103
6112
|
varying vec3 vColor;
|
|
6104
6113
|
void main() {
|
|
6105
6114
|
float dist = length(gl_PointCoord - vec2(0.5));
|
|
@@ -6109,23 +6118,23 @@ const Ke = {
|
|
|
6109
6118
|
vec3 finalColor = vColor + glow * 0.5;
|
|
6110
6119
|
gl_FragColor = vec4(finalColor, alpha * 0.8);
|
|
6111
6120
|
}
|
|
6112
|
-
`,
|
|
6113
|
-
vertexShader:
|
|
6114
|
-
fragmentShader:
|
|
6121
|
+
`, U = new c.ShaderMaterial({
|
|
6122
|
+
vertexShader: O,
|
|
6123
|
+
fragmentShader: B,
|
|
6115
6124
|
transparent: !0,
|
|
6116
6125
|
vertexColors: !0,
|
|
6117
6126
|
blending: c.AdditiveBlending,
|
|
6118
6127
|
depthWrite: !1
|
|
6119
|
-
}), ee = new c.Points(
|
|
6128
|
+
}), ee = new c.Points(b, U);
|
|
6120
6129
|
d.add(ee);
|
|
6121
|
-
const
|
|
6122
|
-
for (let
|
|
6123
|
-
const
|
|
6124
|
-
he[
|
|
6130
|
+
const V = 100, re = new c.BufferGeometry(), he = new Float32Array(V * 3), E = new Float32Array(V * 3), ve = new Float32Array(V);
|
|
6131
|
+
for (let M = 0; M < V; M++) {
|
|
6132
|
+
const C = M * 3;
|
|
6133
|
+
he[C] = (Math.random() - 0.5) * m * 1.5, he[C + 1] = Math.random() * -30 - 10, he[C + 2] = (Math.random() - 0.5) * w * 2, E[C] = 0.2, E[C + 1] = 0.5 + Math.random() * 0.3, E[C + 2] = 1, ve[M] = Math.random() * 15 + 8;
|
|
6125
6134
|
}
|
|
6126
|
-
re.setAttribute("position", new c.BufferAttribute(he, 3)), re.setAttribute("color", new c.BufferAttribute(
|
|
6135
|
+
re.setAttribute("position", new c.BufferAttribute(he, 3)), re.setAttribute("color", new c.BufferAttribute(E, 3)), re.setAttribute("size", new c.BufferAttribute(ve, 1));
|
|
6127
6136
|
const Qi = new c.ShaderMaterial({
|
|
6128
|
-
vertexShader:
|
|
6137
|
+
vertexShader: O,
|
|
6129
6138
|
fragmentShader: `
|
|
6130
6139
|
varying vec3 vColor;
|
|
6131
6140
|
void main() {
|
|
@@ -6141,27 +6150,27 @@ const Ke = {
|
|
|
6141
6150
|
depthWrite: !1
|
|
6142
6151
|
}), Ks = new c.Points(re, Qi);
|
|
6143
6152
|
d.add(Ks);
|
|
6144
|
-
const be = 150, Ce = 12,
|
|
6145
|
-
for (let
|
|
6146
|
-
const
|
|
6147
|
-
|
|
6153
|
+
const be = 150, Ce = 12, Oe = [];
|
|
6154
|
+
for (let M = 0; M < be; M++) {
|
|
6155
|
+
const C = Math.random() < 0.1, te = (Math.random() - 0.5) * m * 0.9, et = (Math.random() - 0.5) * w * 0.7, tt = Math.sin(te * 0.05) * 8 + Math.sin(et * 0.08) * 5, Mt = C ? tt + Math.random() * 40 : -200;
|
|
6156
|
+
Oe.push({
|
|
6148
6157
|
x: te,
|
|
6149
|
-
z:
|
|
6150
|
-
y:
|
|
6151
|
-
velocity:
|
|
6152
|
-
active:
|
|
6153
|
-
maxHeight:
|
|
6154
|
-
trail: new Array(Ce).fill(
|
|
6155
|
-
opacity:
|
|
6158
|
+
z: et,
|
|
6159
|
+
y: Mt,
|
|
6160
|
+
velocity: C ? 0.5 + Math.random() * 0.7 : 0,
|
|
6161
|
+
active: C,
|
|
6162
|
+
maxHeight: tt + 80 + Math.random() * 120,
|
|
6163
|
+
trail: new Array(Ce).fill(Mt),
|
|
6164
|
+
opacity: C ? 1 : 0
|
|
6156
6165
|
});
|
|
6157
6166
|
}
|
|
6158
|
-
const si = be * Ce,
|
|
6159
|
-
for (let
|
|
6160
|
-
for (let
|
|
6161
|
-
Xi[
|
|
6162
|
-
|
|
6167
|
+
const si = be * Ce, xt = new c.BufferGeometry(), Js = new Float32Array(si * 3), eo = new Float32Array(si * 3), Xi = new Float32Array(si);
|
|
6168
|
+
for (let M = 0; M < be; M++)
|
|
6169
|
+
for (let C = 0; C < Ce; C++)
|
|
6170
|
+
Xi[M * Ce + C] = 4 * (1 - C / Ce) * 0.5;
|
|
6171
|
+
xt.setAttribute("position", new c.BufferAttribute(Js, 3)), xt.setAttribute("color", new c.BufferAttribute(eo, 3)), xt.setAttribute("size", new c.BufferAttribute(Xi, 1));
|
|
6163
6172
|
const Zi = new c.ShaderMaterial({
|
|
6164
|
-
vertexShader:
|
|
6173
|
+
vertexShader: O,
|
|
6165
6174
|
fragmentShader: `
|
|
6166
6175
|
varying vec3 vColor;
|
|
6167
6176
|
void main() {
|
|
@@ -6175,14 +6184,14 @@ const Ke = {
|
|
|
6175
6184
|
vertexColors: !0,
|
|
6176
6185
|
blending: c.AdditiveBlending,
|
|
6177
6186
|
depthWrite: !1
|
|
6178
|
-
}),
|
|
6179
|
-
d.add(
|
|
6180
|
-
const
|
|
6181
|
-
for (let
|
|
6182
|
-
Ki[
|
|
6183
|
-
|
|
6187
|
+
}), _t = new c.Points(xt, Zi);
|
|
6188
|
+
d.add(_t);
|
|
6189
|
+
const kt = new c.BufferGeometry(), to = new Float32Array(be * 3), io = new Float32Array(be * 3), Ki = new Float32Array(be);
|
|
6190
|
+
for (let M = 0; M < be; M++)
|
|
6191
|
+
Ki[M] = (6 + Math.random() * 4) * 0.5;
|
|
6192
|
+
kt.setAttribute("position", new c.BufferAttribute(to, 3)), kt.setAttribute("color", new c.BufferAttribute(io, 3)), kt.setAttribute("size", new c.BufferAttribute(Ki, 1));
|
|
6184
6193
|
const Ji = new c.ShaderMaterial({
|
|
6185
|
-
vertexShader:
|
|
6194
|
+
vertexShader: O,
|
|
6186
6195
|
fragmentShader: `
|
|
6187
6196
|
varying vec3 vColor;
|
|
6188
6197
|
void main() {
|
|
@@ -6198,71 +6207,71 @@ const Ke = {
|
|
|
6198
6207
|
vertexColors: !0,
|
|
6199
6208
|
blending: c.AdditiveBlending,
|
|
6200
6209
|
depthWrite: !1
|
|
6201
|
-
}),
|
|
6202
|
-
d.add(
|
|
6203
|
-
let
|
|
6204
|
-
const tn = (
|
|
6205
|
-
|
|
6206
|
-
const
|
|
6207
|
-
|
|
6210
|
+
}), Ct = new c.Points(kt, Ji);
|
|
6211
|
+
d.add(Ct);
|
|
6212
|
+
let Fe = 0, en = 0;
|
|
6213
|
+
const tn = (M, C, te) => Math.sin(M * 0.05 + te) * 8 + Math.sin(C * 0.08 + te * 0.8) * 5 + Math.sin((M + C) * 0.03 + te * 1.2) * 3, oi = (M) => {
|
|
6214
|
+
M.x = (Math.random() - 0.5) * m * 0.9, M.z = (Math.random() - 0.5) * w * 0.7;
|
|
6215
|
+
const C = tn(M.x, M.z, Fe);
|
|
6216
|
+
M.y = C, M.velocity = 0.5 + Math.random() * 0.7, M.maxHeight = C + 80 + Math.random() * 120, M.active = !0, M.opacity = 0.5, M.trail.fill(C);
|
|
6208
6217
|
}, nn = () => {
|
|
6209
|
-
|
|
6210
|
-
const
|
|
6211
|
-
for (let
|
|
6212
|
-
const P =
|
|
6213
|
-
|
|
6218
|
+
Fe += 0.02;
|
|
6219
|
+
const M = ee.geometry.attributes.position.array;
|
|
6220
|
+
for (let R = 0; R < y; R++) {
|
|
6221
|
+
const P = R * 3;
|
|
6222
|
+
M[P + 1] = tn(M[P], M[P + 2], Fe);
|
|
6214
6223
|
}
|
|
6215
6224
|
ee.geometry.attributes.position.needsUpdate = !0;
|
|
6216
|
-
const
|
|
6217
|
-
let
|
|
6218
|
-
const
|
|
6219
|
-
for (let
|
|
6220
|
-
const P =
|
|
6225
|
+
const C = _t.geometry.attributes.position.array, te = _t.geometry.attributes.color.array, et = Ct.geometry.attributes.position.array, tt = Ct.geometry.attributes.color.array;
|
|
6226
|
+
let Mt = 0;
|
|
6227
|
+
const it = [];
|
|
6228
|
+
for (let R = 0; R < be; R++) {
|
|
6229
|
+
const P = Oe[R];
|
|
6221
6230
|
if (P.active) {
|
|
6222
|
-
|
|
6231
|
+
Mt++;
|
|
6223
6232
|
for (let X = Ce - 1; X > 0; X--) P.trail[X] = P.trail[X - 1];
|
|
6224
|
-
P.trail[0] = P.y, P.velocity = Math.max(P.velocity * 0.995, 0.3), P.y += P.velocity, P.opacity < 1 && (P.opacity = Math.min(P.opacity + 0.05, 1)), P.y > P.maxHeight && (P.opacity -= 0.03, P.opacity <= 0 && (P.active = !1, P.y = -200, P.trail.fill(-200),
|
|
6233
|
+
P.trail[0] = P.y, P.velocity = Math.max(P.velocity * 0.995, 0.3), P.y += P.velocity, P.opacity < 1 && (P.opacity = Math.min(P.opacity + 0.05, 1)), P.y > P.maxHeight && (P.opacity -= 0.03, P.opacity <= 0 && (P.active = !1, P.y = -200, P.trail.fill(-200), it.push(R)));
|
|
6225
6234
|
} else
|
|
6226
|
-
|
|
6235
|
+
it.push(R);
|
|
6227
6236
|
}
|
|
6228
|
-
if (
|
|
6229
|
-
const
|
|
6230
|
-
for (let X = 0; X <
|
|
6231
|
-
en =
|
|
6237
|
+
if (Fe - en >= 0.1 && it.length > 0) {
|
|
6238
|
+
const R = Math.min(2 + Math.floor(Math.random() * 2), it.length), P = [...it].sort(() => Math.random() - 0.5);
|
|
6239
|
+
for (let X = 0; X < R; X++) oi(Oe[P[X]]);
|
|
6240
|
+
en = Fe;
|
|
6232
6241
|
}
|
|
6233
|
-
const no = Math.max(3, 20 -
|
|
6242
|
+
const no = Math.max(3, 20 - Mt), on = it.filter((R) => !Oe[R].active);
|
|
6234
6243
|
if (on.length > 0) {
|
|
6235
|
-
const
|
|
6236
|
-
for (let P = 0; P < Math.min(no,
|
|
6244
|
+
const R = [...on].sort(() => Math.random() - 0.5);
|
|
6245
|
+
for (let P = 0; P < Math.min(no, R.length); P++) oi(Oe[R[P]]);
|
|
6237
6246
|
}
|
|
6238
|
-
for (let
|
|
6239
|
-
!
|
|
6240
|
-
for (let
|
|
6241
|
-
const P =
|
|
6242
|
-
|
|
6243
|
-
const ri = P.active ? 0.8 + Math.sin(
|
|
6244
|
-
|
|
6245
|
-
for (let
|
|
6246
|
-
const
|
|
6247
|
-
|
|
6248
|
-
const ai = 1 -
|
|
6249
|
-
te[
|
|
6247
|
+
for (let R = 0; R < be; R++)
|
|
6248
|
+
!Oe[R].active && Math.random() < 0.25 && oi(Oe[R]);
|
|
6249
|
+
for (let R = 0; R < be; R++) {
|
|
6250
|
+
const P = Oe[R], X = R * 3;
|
|
6251
|
+
et[X] = P.x, et[X + 1] = P.y, et[X + 2] = P.z;
|
|
6252
|
+
const ri = P.active ? 0.8 + Math.sin(Fe * 5 + R) * 0.2 : 0;
|
|
6253
|
+
tt[X] = 0.5 * ri * P.opacity, tt[X + 1] = 1 * ri * P.opacity, tt[X + 2] = 1 * ri * P.opacity;
|
|
6254
|
+
for (let Pt = 0; Pt < Ce; Pt++) {
|
|
6255
|
+
const nt = (R * Ce + Pt) * 3;
|
|
6256
|
+
C[nt] = P.x, C[nt + 1] = P.trail[Pt], C[nt + 2] = P.z;
|
|
6257
|
+
const ai = 1 - Pt / Ce;
|
|
6258
|
+
te[nt] = 0.6 * ai * P.opacity, te[nt + 1] = 1 * ai * P.opacity, te[nt + 2] = 1 * ai * P.opacity;
|
|
6250
6259
|
}
|
|
6251
6260
|
}
|
|
6252
|
-
|
|
6261
|
+
_t.geometry.attributes.position.needsUpdate = !0, _t.geometry.attributes.color.needsUpdate = !0, Ct.geometry.attributes.position.needsUpdate = !0, Ct.geometry.attributes.color.needsUpdate = !0, f.position.x = Math.sin(Fe * 0.3) * 5, f.lookAt(0, 0, 0), p.render(d, f), s.current = requestAnimationFrame(nn);
|
|
6253
6262
|
};
|
|
6254
6263
|
nn();
|
|
6255
6264
|
const sn = () => {
|
|
6256
|
-
const
|
|
6257
|
-
f.aspect =
|
|
6265
|
+
const M = l.clientWidth, C = l.clientHeight;
|
|
6266
|
+
f.aspect = M / C, f.updateProjectionMatrix(), p.setSize(M, C);
|
|
6258
6267
|
};
|
|
6259
6268
|
window.addEventListener("resize", sn), a = () => {
|
|
6260
|
-
window.removeEventListener("resize", sn), s.current && cancelAnimationFrame(s.current), p.domElement.parentNode === l && l.removeChild(p.domElement),
|
|
6269
|
+
window.removeEventListener("resize", sn), s.current && cancelAnimationFrame(s.current), p.domElement.parentNode === l && l.removeChild(p.domElement), b.dispose(), U.dispose(), re.dispose(), Qi.dispose(), xt.dispose(), Zi.dispose(), kt.dispose(), Ji.dispose(), p.dispose();
|
|
6261
6270
|
};
|
|
6262
6271
|
})(), () => {
|
|
6263
6272
|
r = !0, a == null || a();
|
|
6264
6273
|
};
|
|
6265
|
-
}, [t]), /* @__PURE__ */
|
|
6274
|
+
}, [t]), /* @__PURE__ */ D(
|
|
6266
6275
|
"div",
|
|
6267
6276
|
{
|
|
6268
6277
|
ref: n,
|
|
@@ -6280,34 +6289,110 @@ const Ke = {
|
|
|
6280
6289
|
}
|
|
6281
6290
|
}
|
|
6282
6291
|
);
|
|
6292
|
+
}, cf = ({
|
|
6293
|
+
background: t = "linear-gradient(180deg, #000000 0%, #0a1628 50%, #0d1f3c 100%)",
|
|
6294
|
+
className: e,
|
|
6295
|
+
style: i
|
|
6296
|
+
}) => {
|
|
6297
|
+
const n = Pe(null), s = Pe(), o = Pe([]), r = Pe(0);
|
|
6298
|
+
return mt(() => {
|
|
6299
|
+
const a = n.current;
|
|
6300
|
+
if (!a) return;
|
|
6301
|
+
const c = a.getContext("2d");
|
|
6302
|
+
if (!c) return;
|
|
6303
|
+
const l = () => {
|
|
6304
|
+
a.width = a.offsetWidth * window.devicePixelRatio, a.height = a.offsetHeight * window.devicePixelRatio, c.scale(window.devicePixelRatio, window.devicePixelRatio);
|
|
6305
|
+
};
|
|
6306
|
+
l();
|
|
6307
|
+
const u = 800, h = [];
|
|
6308
|
+
for (let p = 0; p < u; p++) {
|
|
6309
|
+
const y = Math.random();
|
|
6310
|
+
let m;
|
|
6311
|
+
y < 0.5 ? m = `rgba(0, ${Math.floor(200 + Math.random() * 55)}, 255, ` : y < 0.8 ? m = `rgba(25, ${Math.floor(76 + Math.random() * 76)}, ${Math.floor(230 + Math.random() * 25)}, ` : m = `rgba(${Math.floor(200 + Math.random() * 55)}, ${Math.floor(230 + Math.random() * 25)}, 255, `, h.push({
|
|
6312
|
+
x: Math.random() * a.offsetWidth,
|
|
6313
|
+
y: Math.random() * a.offsetHeight,
|
|
6314
|
+
z: Math.random() * 1e3,
|
|
6315
|
+
vx: (Math.random() - 0.5) * 0.5,
|
|
6316
|
+
vy: (Math.random() - 0.5) * 0.3,
|
|
6317
|
+
size: Math.random() * 2 + 1,
|
|
6318
|
+
color: m,
|
|
6319
|
+
alpha: Math.random() * 0.5 + 0.3
|
|
6320
|
+
});
|
|
6321
|
+
}
|
|
6322
|
+
o.current = h;
|
|
6323
|
+
const d = () => {
|
|
6324
|
+
const p = a.offsetWidth, y = a.offsetHeight;
|
|
6325
|
+
c.clearRect(0, 0, p, y), r.current += 0.01, h.forEach((m) => {
|
|
6326
|
+
const w = Math.sin(m.x * 0.01 + r.current) * 20 + Math.sin(m.z * 5e-3 + r.current * 0.5) * 15;
|
|
6327
|
+
m.y += m.vy + Math.sin(r.current + m.x * 0.01) * 0.2, m.x += m.vx, m.z += 0.5, (m.x < 0 || m.x > p) && (m.vx *= -1), (m.y < 0 || m.y > y) && (m.vy *= -1), m.z > 1e3 && (m.z = 0);
|
|
6328
|
+
const b = 1e3 / (1e3 + m.z), x = m.x, g = m.y + w, k = m.size * b, O = m.alpha * b;
|
|
6329
|
+
if (c.beginPath(), c.arc(x, g, k, 0, Math.PI * 2), c.fillStyle = m.color + O + ")", c.fill(), b > 0.7) {
|
|
6330
|
+
const B = c.createRadialGradient(x, g, 0, x, g, k * 3);
|
|
6331
|
+
B.addColorStop(0, m.color + O * 0.3 + ")"), B.addColorStop(1, m.color + "0)"), c.fillStyle = B, c.fillRect(x - k * 3, g - k * 3, k * 6, k * 6);
|
|
6332
|
+
}
|
|
6333
|
+
}), s.current = requestAnimationFrame(d);
|
|
6334
|
+
};
|
|
6335
|
+
d();
|
|
6336
|
+
const f = () => l();
|
|
6337
|
+
return window.addEventListener("resize", f), () => {
|
|
6338
|
+
window.removeEventListener("resize", f), s.current && cancelAnimationFrame(s.current);
|
|
6339
|
+
};
|
|
6340
|
+
}, []), /* @__PURE__ */ D(
|
|
6341
|
+
"div",
|
|
6342
|
+
{
|
|
6343
|
+
className: e,
|
|
6344
|
+
style: {
|
|
6345
|
+
position: "fixed",
|
|
6346
|
+
top: 0,
|
|
6347
|
+
left: 0,
|
|
6348
|
+
width: "100%",
|
|
6349
|
+
height: "100%",
|
|
6350
|
+
zIndex: 1,
|
|
6351
|
+
pointerEvents: "none",
|
|
6352
|
+
background: t,
|
|
6353
|
+
...i
|
|
6354
|
+
},
|
|
6355
|
+
children: /* @__PURE__ */ D(
|
|
6356
|
+
"canvas",
|
|
6357
|
+
{
|
|
6358
|
+
ref: n,
|
|
6359
|
+
style: {
|
|
6360
|
+
width: "100%",
|
|
6361
|
+
height: "100%",
|
|
6362
|
+
display: "block"
|
|
6363
|
+
}
|
|
6364
|
+
}
|
|
6365
|
+
)
|
|
6366
|
+
}
|
|
6367
|
+
);
|
|
6283
6368
|
};
|
|
6284
6369
|
let ls = 0;
|
|
6285
|
-
const
|
|
6370
|
+
const Cf = ({
|
|
6286
6371
|
theme: t,
|
|
6287
6372
|
isDark: e,
|
|
6288
6373
|
onLoaded: i,
|
|
6289
6374
|
className: n,
|
|
6290
6375
|
style: s
|
|
6291
6376
|
}) => {
|
|
6292
|
-
const [o, r] = Tt(!1), [a, c] = Tt(() => ++ls), l =
|
|
6293
|
-
|
|
6294
|
-
Da(async (
|
|
6295
|
-
await Qh(
|
|
6377
|
+
const [o, r] = Tt(!1), [a, c] = Tt(() => ++ls), l = Pe(void 0), u = Pe(!0), h = rf(), d = t ?? (h == null ? void 0 : h.themeId) ?? Zs, f = e ?? (h == null ? void 0 : h.isDark) ?? !0, p = Xs(d);
|
|
6378
|
+
mt(() => {
|
|
6379
|
+
Da(async (b) => {
|
|
6380
|
+
await Qh(b);
|
|
6296
6381
|
}).then(() => {
|
|
6297
6382
|
r(!0);
|
|
6298
6383
|
}).catch(() => {
|
|
6299
6384
|
r(!0);
|
|
6300
6385
|
});
|
|
6301
|
-
}, []),
|
|
6386
|
+
}, []), mt(() => (u.current || c(++ls), u.current = !1, () => {
|
|
6302
6387
|
l.current && (l.current.destroy(), l.current = void 0);
|
|
6303
6388
|
}), [d, f]);
|
|
6304
|
-
const y =
|
|
6305
|
-
l.current && l.current !==
|
|
6306
|
-
}, [i]), m =
|
|
6389
|
+
const y = Ot(async (b) => {
|
|
6390
|
+
l.current && l.current !== b && l.current.destroy(), l.current = b, i == null || i(b);
|
|
6391
|
+
}, [i]), m = Pi(() => p.options(f), [p, f]);
|
|
6307
6392
|
if (d === "none") return null;
|
|
6308
6393
|
if (p.isThreeJS)
|
|
6309
|
-
return /* @__PURE__ */
|
|
6310
|
-
|
|
6394
|
+
return /* @__PURE__ */ D(
|
|
6395
|
+
d === "wave2d" ? cf : af,
|
|
6311
6396
|
{
|
|
6312
6397
|
background: p.backgroundGradient || p.backgroundColor,
|
|
6313
6398
|
className: n,
|
|
@@ -6315,24 +6400,24 @@ const _f = ({
|
|
|
6315
6400
|
}
|
|
6316
6401
|
);
|
|
6317
6402
|
if (!o) return null;
|
|
6318
|
-
const
|
|
6319
|
-
return /* @__PURE__ */
|
|
6320
|
-
|
|
6403
|
+
const w = `rpb-tsparticles-${a}`;
|
|
6404
|
+
return /* @__PURE__ */ D(
|
|
6405
|
+
Ia,
|
|
6321
6406
|
{
|
|
6322
|
-
id:
|
|
6407
|
+
id: w,
|
|
6323
6408
|
className: n,
|
|
6324
6409
|
style: s,
|
|
6325
6410
|
particlesLoaded: y,
|
|
6326
6411
|
options: m
|
|
6327
6412
|
},
|
|
6328
|
-
|
|
6413
|
+
w
|
|
6329
6414
|
);
|
|
6330
|
-
},
|
|
6415
|
+
}, lf = {
|
|
6331
6416
|
"bottom-right": { bottom: 80, right: 16 },
|
|
6332
6417
|
"bottom-left": { bottom: 80, left: 16 },
|
|
6333
6418
|
"top-right": { top: 80, right: 16 },
|
|
6334
6419
|
"top-left": { top: 80, left: 16 }
|
|
6335
|
-
},
|
|
6420
|
+
}, uf = {
|
|
6336
6421
|
position: "fixed",
|
|
6337
6422
|
zIndex: 9999,
|
|
6338
6423
|
width: 44,
|
|
@@ -6349,13 +6434,13 @@ const _f = ({
|
|
|
6349
6434
|
cursor: "pointer",
|
|
6350
6435
|
fontSize: 20,
|
|
6351
6436
|
transition: "transform 0.3s, box-shadow 0.3s"
|
|
6352
|
-
},
|
|
6437
|
+
}, hf = {
|
|
6353
6438
|
position: "fixed",
|
|
6354
6439
|
inset: 0,
|
|
6355
6440
|
zIndex: 1e4,
|
|
6356
6441
|
background: "rgba(0, 0, 0, 0.3)",
|
|
6357
6442
|
transition: "opacity 0.3s"
|
|
6358
|
-
},
|
|
6443
|
+
}, ff = {
|
|
6359
6444
|
position: "fixed",
|
|
6360
6445
|
top: 0,
|
|
6361
6446
|
width: 320,
|
|
@@ -6368,55 +6453,55 @@ const _f = ({
|
|
|
6368
6453
|
overflowY: "auto",
|
|
6369
6454
|
display: "flex",
|
|
6370
6455
|
flexDirection: "column"
|
|
6371
|
-
},
|
|
6456
|
+
}, df = {
|
|
6372
6457
|
display: "flex",
|
|
6373
6458
|
alignItems: "center",
|
|
6374
6459
|
justifyContent: "space-between",
|
|
6375
6460
|
padding: "16px 20px",
|
|
6376
6461
|
borderBottom: "1px solid #f0f0f0"
|
|
6377
|
-
},
|
|
6462
|
+
}, pf = {
|
|
6378
6463
|
background: "none",
|
|
6379
6464
|
border: "none",
|
|
6380
6465
|
fontSize: 20,
|
|
6381
6466
|
cursor: "pointer",
|
|
6382
6467
|
color: "#999",
|
|
6383
6468
|
padding: 4
|
|
6384
|
-
},
|
|
6469
|
+
}, mf = {
|
|
6385
6470
|
padding: 16,
|
|
6386
6471
|
display: "flex",
|
|
6387
6472
|
flexDirection: "column",
|
|
6388
6473
|
gap: 12
|
|
6389
|
-
},
|
|
6474
|
+
}, yf = {
|
|
6390
6475
|
padding: "0 16px 16px",
|
|
6391
6476
|
marginTop: "auto"
|
|
6392
|
-
},
|
|
6477
|
+
}, gf = {
|
|
6393
6478
|
padding: 16,
|
|
6394
6479
|
background: "#f9fafb",
|
|
6395
6480
|
borderRadius: 12,
|
|
6396
6481
|
fontSize: 13,
|
|
6397
6482
|
color: "#6b7280",
|
|
6398
6483
|
lineHeight: 1.6
|
|
6399
|
-
},
|
|
6484
|
+
}, vf = [...Qs, {
|
|
6400
6485
|
id: "none",
|
|
6401
6486
|
name: "无",
|
|
6402
6487
|
icon: "🚫",
|
|
6403
6488
|
description: "关闭粒子效果"
|
|
6404
|
-
}],
|
|
6489
|
+
}], Mf = ({
|
|
6405
6490
|
position: t = "bottom-right",
|
|
6406
6491
|
accentColor: e = "#3b82f6"
|
|
6407
6492
|
}) => {
|
|
6408
|
-
const [i, n] = Tt(!1), { themeId: s, setTheme: o } =
|
|
6409
|
-
...cf,
|
|
6410
|
-
...af[t]
|
|
6411
|
-
}), [t]), l = Mi(() => ({
|
|
6493
|
+
const [i, n] = Tt(!1), { themeId: s, setTheme: o } = of(), r = Xs(s), a = t.includes("right") ? "right" : "left", c = Pi(() => ({
|
|
6412
6494
|
...uf,
|
|
6495
|
+
...lf[t]
|
|
6496
|
+
}), [t]), l = Pi(() => ({
|
|
6497
|
+
...ff,
|
|
6413
6498
|
[a]: 0,
|
|
6414
6499
|
transform: i ? "translateX(0)" : `translateX(${a === "right" ? "100%" : "-100%"})`
|
|
6415
|
-
}), [a, i]), u =
|
|
6500
|
+
}), [a, i]), u = Ot(() => n(!0), []), h = Ot(() => n(!1), []), d = Ot((f) => {
|
|
6416
6501
|
o(f);
|
|
6417
6502
|
}, [o]);
|
|
6418
|
-
return /* @__PURE__ */
|
|
6419
|
-
/* @__PURE__ */
|
|
6503
|
+
return /* @__PURE__ */ zt(so, { children: [
|
|
6504
|
+
/* @__PURE__ */ D("style", { children: `
|
|
6420
6505
|
.rpb-trigger-button:hover {
|
|
6421
6506
|
transform: scale(1.05) translateY(-2px);
|
|
6422
6507
|
}
|
|
@@ -6427,7 +6512,7 @@ const _f = ({
|
|
|
6427
6512
|
border-color: ${e} !important;
|
|
6428
6513
|
}
|
|
6429
6514
|
` }),
|
|
6430
|
-
/* @__PURE__ */
|
|
6515
|
+
/* @__PURE__ */ D(
|
|
6431
6516
|
"button",
|
|
6432
6517
|
{
|
|
6433
6518
|
className: "rpb-trigger-button",
|
|
@@ -6437,15 +6522,15 @@ const _f = ({
|
|
|
6437
6522
|
children: r.icon
|
|
6438
6523
|
}
|
|
6439
6524
|
),
|
|
6440
|
-
i && /* @__PURE__ */
|
|
6441
|
-
/* @__PURE__ */
|
|
6442
|
-
/* @__PURE__ */
|
|
6443
|
-
/* @__PURE__ */
|
|
6444
|
-
/* @__PURE__ */
|
|
6525
|
+
i && /* @__PURE__ */ D("div", { onClick: h, style: hf }),
|
|
6526
|
+
/* @__PURE__ */ zt("div", { style: l, children: [
|
|
6527
|
+
/* @__PURE__ */ zt("div", { style: df, children: [
|
|
6528
|
+
/* @__PURE__ */ D("span", { style: { fontWeight: 600, fontSize: 16 }, children: "粒子主题" }),
|
|
6529
|
+
/* @__PURE__ */ D("button", { onClick: h, style: pf, children: "×" })
|
|
6445
6530
|
] }),
|
|
6446
|
-
/* @__PURE__ */
|
|
6531
|
+
/* @__PURE__ */ D("div", { style: mf, children: vf.map((f) => {
|
|
6447
6532
|
const p = f.id === s;
|
|
6448
|
-
return /* @__PURE__ */
|
|
6533
|
+
return /* @__PURE__ */ zt(
|
|
6449
6534
|
"div",
|
|
6450
6535
|
{
|
|
6451
6536
|
className: `rpb-theme-item${p ? " active" : ""}`,
|
|
@@ -6462,7 +6547,7 @@ const _f = ({
|
|
|
6462
6547
|
background: p ? `${e}10` : "#f5f5f5"
|
|
6463
6548
|
},
|
|
6464
6549
|
children: [
|
|
6465
|
-
/* @__PURE__ */
|
|
6550
|
+
/* @__PURE__ */ D(
|
|
6466
6551
|
"div",
|
|
6467
6552
|
{
|
|
6468
6553
|
style: {
|
|
@@ -6479,11 +6564,11 @@ const _f = ({
|
|
|
6479
6564
|
children: f.icon
|
|
6480
6565
|
}
|
|
6481
6566
|
),
|
|
6482
|
-
/* @__PURE__ */
|
|
6483
|
-
/* @__PURE__ */
|
|
6484
|
-
/* @__PURE__ */
|
|
6567
|
+
/* @__PURE__ */ zt("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
6568
|
+
/* @__PURE__ */ D("div", { style: { fontWeight: 600, fontSize: 14, color: "#1f2937" }, children: f.name }),
|
|
6569
|
+
/* @__PURE__ */ D("div", { style: { fontSize: 12, color: "#9ca3af", marginTop: 2 }, children: f.description })
|
|
6485
6570
|
] }),
|
|
6486
|
-
p && /* @__PURE__ */
|
|
6571
|
+
p && /* @__PURE__ */ D(
|
|
6487
6572
|
"div",
|
|
6488
6573
|
{
|
|
6489
6574
|
style: {
|
|
@@ -6496,7 +6581,7 @@ const _f = ({
|
|
|
6496
6581
|
justifyContent: "center",
|
|
6497
6582
|
flexShrink: 0
|
|
6498
6583
|
},
|
|
6499
|
-
children: /* @__PURE__ */
|
|
6584
|
+
children: /* @__PURE__ */ D("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ D("path", { d: "M5 13l4 4L19 7" }) })
|
|
6500
6585
|
}
|
|
6501
6586
|
)
|
|
6502
6587
|
]
|
|
@@ -6504,18 +6589,19 @@ const _f = ({
|
|
|
6504
6589
|
f.id
|
|
6505
6590
|
);
|
|
6506
6591
|
}) }),
|
|
6507
|
-
/* @__PURE__ */
|
|
6592
|
+
/* @__PURE__ */ D("div", { style: yf, children: /* @__PURE__ */ D("div", { style: gf, children: "你的主题选择会自动保存,下次访问时将自动恢复。" }) })
|
|
6508
6593
|
] })
|
|
6509
6594
|
] });
|
|
6510
6595
|
};
|
|
6511
6596
|
export {
|
|
6512
6597
|
Xh as DEFAULT_COLORS,
|
|
6513
6598
|
Zs as DEFAULT_THEME_ID,
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6599
|
+
kf as ParticleProvider,
|
|
6600
|
+
af as ParticleWave,
|
|
6601
|
+
cf as ParticleWave2D,
|
|
6602
|
+
Cf as ParticlesBackground,
|
|
6603
|
+
Mf as ThemeSelector,
|
|
6604
|
+
Ae as baseConfig,
|
|
6519
6605
|
Kh as bubbleTheme,
|
|
6520
6606
|
ef as fireflyTheme,
|
|
6521
6607
|
tf as geometryTheme,
|
|
@@ -6524,7 +6610,8 @@ export {
|
|
|
6524
6610
|
Zh as snowTheme,
|
|
6525
6611
|
Ys as starlineTheme,
|
|
6526
6612
|
Jh as starsTheme,
|
|
6527
|
-
|
|
6613
|
+
of as useParticleTheme,
|
|
6614
|
+
sf as wave2dTheme,
|
|
6528
6615
|
nf as waveTheme
|
|
6529
6616
|
};
|
|
6530
6617
|
//# sourceMappingURL=index.mjs.map
|