@tsparticles/preset-links 4.0.0-beta.15 → 4.0.0-beta.16
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/preset-links",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.16",
|
|
4
4
|
"description": "tsParticles links preset",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"./package.json": "./package.json"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@tsparticles/basic": "4.0.0-beta.
|
|
110
|
-
"@tsparticles/engine": "4.0.0-beta.
|
|
111
|
-
"@tsparticles/interaction-particles-links": "4.0.0-beta.
|
|
112
|
-
"@tsparticles/plugin-interactivity": "4.0.0-beta.
|
|
109
|
+
"@tsparticles/basic": "4.0.0-beta.16",
|
|
110
|
+
"@tsparticles/engine": "4.0.0-beta.16",
|
|
111
|
+
"@tsparticles/interaction-particles-links": "4.0.0-beta.16",
|
|
112
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.16"
|
|
113
113
|
},
|
|
114
114
|
"publishConfig": {
|
|
115
115
|
"access": "public"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Preset v4.0.0-beta.
|
|
2
|
+
/* Preset v4.0.0-beta.16 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1005,7 +1005,7 @@
|
|
|
1005
1005
|
return this._domArray;
|
|
1006
1006
|
}
|
|
1007
1007
|
get version() {
|
|
1008
|
-
return "4.0.0-beta.
|
|
1008
|
+
return "4.0.0-beta.16";
|
|
1009
1009
|
}
|
|
1010
1010
|
addEventListener(type, listener) {
|
|
1011
1011
|
this._eventDispatcher.addEventListener(type, listener);
|
|
@@ -2914,7 +2914,7 @@
|
|
|
2914
2914
|
}
|
|
2915
2915
|
|
|
2916
2916
|
async function loadCircleShape(engine) {
|
|
2917
|
-
engine.checkVersion("4.0.0-beta.
|
|
2917
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
2918
2918
|
await engine.pluginManager.register(e => {
|
|
2919
2919
|
e.pluginManager.addShape(["circle"], () => {
|
|
2920
2920
|
return Promise.resolve(new CircleDrawer());
|
|
@@ -2962,7 +2962,7 @@
|
|
|
2962
2962
|
}
|
|
2963
2963
|
|
|
2964
2964
|
async function loadHexColorPlugin(engine) {
|
|
2965
|
-
engine.checkVersion("4.0.0-beta.
|
|
2965
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
2966
2966
|
await engine.pluginManager.register(e => {
|
|
2967
2967
|
e.pluginManager.addColorManager("hex", new HexColorManager());
|
|
2968
2968
|
});
|
|
@@ -3015,7 +3015,7 @@
|
|
|
3015
3015
|
}
|
|
3016
3016
|
|
|
3017
3017
|
async function loadHslColorPlugin(engine) {
|
|
3018
|
-
engine.checkVersion("4.0.0-beta.
|
|
3018
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3019
3019
|
await engine.pluginManager.register(e => {
|
|
3020
3020
|
e.pluginManager.addColorManager("hsl", new HslColorManager());
|
|
3021
3021
|
});
|
|
@@ -3039,7 +3039,7 @@
|
|
|
3039
3039
|
}
|
|
3040
3040
|
|
|
3041
3041
|
async function loadMovePlugin(engine) {
|
|
3042
|
-
engine.checkVersion("4.0.0-beta.
|
|
3042
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3043
3043
|
await engine.pluginManager.register(e => {
|
|
3044
3044
|
const moveEngine = e, movePluginManager = moveEngine.pluginManager;
|
|
3045
3045
|
movePluginManager.initializers.pathGenerators ??= new Map();
|
|
@@ -3100,7 +3100,7 @@
|
|
|
3100
3100
|
}
|
|
3101
3101
|
|
|
3102
3102
|
async function loadOpacityUpdater(engine) {
|
|
3103
|
-
engine.checkVersion("4.0.0-beta.
|
|
3103
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3104
3104
|
await engine.pluginManager.register(e => {
|
|
3105
3105
|
e.pluginManager.addParticleUpdater("opacity", container => {
|
|
3106
3106
|
return Promise.resolve(new OpacityUpdater(container));
|
|
@@ -3452,7 +3452,7 @@
|
|
|
3452
3452
|
}
|
|
3453
3453
|
|
|
3454
3454
|
async function loadOutModesUpdater(engine) {
|
|
3455
|
-
engine.checkVersion("4.0.0-beta.
|
|
3455
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3456
3456
|
await engine.pluginManager.register(e => {
|
|
3457
3457
|
e.pluginManager.addParticleUpdater("outModes", container => {
|
|
3458
3458
|
return Promise.resolve(new OutOfCanvasUpdater(container));
|
|
@@ -3523,7 +3523,7 @@
|
|
|
3523
3523
|
}
|
|
3524
3524
|
|
|
3525
3525
|
async function loadPaintUpdater(engine) {
|
|
3526
|
-
engine.checkVersion("4.0.0-beta.
|
|
3526
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3527
3527
|
await engine.pluginManager.register(e => {
|
|
3528
3528
|
e.pluginManager.addParticleUpdater("paint", container => {
|
|
3529
3529
|
return Promise.resolve(new PaintUpdater(e.pluginManager, container));
|
|
@@ -3578,7 +3578,7 @@
|
|
|
3578
3578
|
}
|
|
3579
3579
|
|
|
3580
3580
|
async function loadRgbColorPlugin(engine) {
|
|
3581
|
-
engine.checkVersion("4.0.0-beta.
|
|
3581
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3582
3582
|
await engine.pluginManager.register(e => {
|
|
3583
3583
|
e.pluginManager.addColorManager("rgb", new RgbColorManager());
|
|
3584
3584
|
});
|
|
@@ -3621,7 +3621,7 @@
|
|
|
3621
3621
|
}
|
|
3622
3622
|
|
|
3623
3623
|
async function loadSizeUpdater(engine) {
|
|
3624
|
-
engine.checkVersion("4.0.0-beta.
|
|
3624
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3625
3625
|
await engine.pluginManager.register(e => {
|
|
3626
3626
|
e.pluginManager.addParticleUpdater("size", container => {
|
|
3627
3627
|
return Promise.resolve(new SizeUpdater(container));
|
|
@@ -3630,7 +3630,7 @@
|
|
|
3630
3630
|
}
|
|
3631
3631
|
|
|
3632
3632
|
async function loadBasic(engine) {
|
|
3633
|
-
engine.checkVersion("4.0.0-beta.
|
|
3633
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3634
3634
|
await engine.pluginManager.register(async (e) => {
|
|
3635
3635
|
await Promise.all([
|
|
3636
3636
|
loadHexColorPlugin(e),
|
|
@@ -3867,7 +3867,7 @@
|
|
|
3867
3867
|
const clickEvent = "click", mouseDownEvent = "pointerdown", mouseUpEvent = "pointerup", mouseLeaveEvent = "pointerleave", mouseMoveEvent = "pointermove", touchStartEvent = "touchstart", touchEndEvent = "touchend", touchMoveEvent = "touchmove", touchCancelEvent = "touchcancel";
|
|
3868
3868
|
|
|
3869
3869
|
async function loadInteractivityPlugin(engine) {
|
|
3870
|
-
engine.checkVersion("4.0.0-beta.
|
|
3870
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3871
3871
|
await engine.pluginManager.register(e => {
|
|
3872
3872
|
const interactivityEngine = e, interactivityPluginManager = interactivityEngine.pluginManager;
|
|
3873
3873
|
interactivityPluginManager.addPlugin(new InteractivityPlugin(interactivityPluginManager));
|
|
@@ -4193,7 +4193,7 @@
|
|
|
4193
4193
|
}
|
|
4194
4194
|
|
|
4195
4195
|
async function loadParticlesLinksInteraction(engine) {
|
|
4196
|
-
engine.checkVersion("4.0.0-beta.
|
|
4196
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
4197
4197
|
await engine.pluginManager.register((e) => {
|
|
4198
4198
|
const pluginManager = e.pluginManager;
|
|
4199
4199
|
ensureInteractivityPluginLoaded(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.links=t.__tsParticlesInternals.presets.links||{}))}(this,function(t){"use strict";const e="generated",i="visibilitychange",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,c=0,l=0,h=1,d="random",u="mid",p=2*Math.PI,g="true",f="false",_="canvas",y=255,v=360,m=100,w=100,b=.25;var P;function x(t){return"z"in t?t.z:o.z}!function(t){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"}(P||(P={}));class M{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function k(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function S(t){return"number"==typeof t}function C(t){return"object"==typeof t&&null!==t}function O(t){return Array.isArray(t)}function D(t){return null==t}const R=Math.PI/180;let T=Math.random;const L=t=>requestAnimationFrame(t),E=t=>{cancelAnimationFrame(t)};function A(){return U(T(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function U(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function V(t){const e=B(t);let i=$(t);return e===i&&(i=0),F(i,e)}function H(t){return S(t)?t:V(t)}function $(t){return S(t)?t:t.min}function B(t){return S(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&S(t))return t;const i=$(t),s=B(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function N(t){return t*R}function Z(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q,J,K,tt,et;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Y||(Y={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Q||(Q={})),function(t){t.none="none",t.max="max",t.min="min"}(J||(J={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(K||(K={})),function(t){t.precise="precise",t.percent="percent"}(tt||(tt={})),function(t){t.max="max",t.min="min",t.random="random"}(et||(et={}));function it(){return globalThis.document}function st(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function nt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(A()*t.length)}(t)]}function at(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==K.bottom||(n=t.top<e.height+i.x);!n||s&&s!==K.left||(n=t.right>i.x);!n||s&&s!==K.right||(n=t.left<e.width+i.y);!n||s&&s!==K.top||(n=t.bottom>i.y);return n}(ot(t,s??0),e,i,n)}function ot(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function rt(t,...e){for(const i of e){if(D(i))continue;if(!C(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):C(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return C(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>rt(void 0,t)):rt(e[n],a)}}return t}function ct(t,e){return O(t)?t.map((t,i)=>e(t,i)):e(t,0)}function lt(t,e,i){return O(t)?nt(t,e,i):t}function ht(t,e){const i=t.value,s=t.animation,o={delayTime:H(s.delay)*a,enable:s.enable,value:H(t.value)*e,max:B(i)*e,min:$(i)*e,loops:0,maxLoops:H(s.count),time:0};if(s.enable){switch(o.decay=1-H(s.decay),s.mode){case Y.increase:o.status=Q.increasing;break;case Y.decrease:o.status=Q.decreasing;break;case Y.random:o.status=A()>=n?Q.increasing:Q.decreasing}const t=s.mode===Y.auto;switch(s.startValue){case et.min:o.value=o.min,t&&(o.status=Q.increasing);break;case et.max:o.value=o.max,t&&(o.status=Q.decreasing);break;case et.random:default:o.value=V(o),t&&(o.status=A()>=n?Q.increasing:Q.decreasing)}}return o.initialValue=o.value,o}function dt(t,e){return function(t,e){if(t.mode!==tt.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}function ut(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,c=e.decay??1;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case Q.increasing:e.value+=a;break;case Q.decreasing:e.value-=a}switch(e.velocity&&1!==c&&(e.velocity*=c),e.status){case Q.increasing:e.value>=r&&(e.status=Q.decreasing,e.loops??=0,e.loops++);break;case Q.decreasing:e.value<=o&&(e.status=Q.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case J.max:i>=n&&t.destroy();break;case J.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=U(e.value,o,r))}}const pt=function(t){const e=new Map,i=(t,e=new WeakSet)=>{if(null===t)return"null";const s=typeof t;if("undefined"===s)return"undefined";if("number"===s||"boolean"===s||"string"===s)return JSON.stringify(t);if("function"===s)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===s)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>i(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(s=>`${JSON.stringify(s)}:${i(t[s],e)}`).join(",")}}`},s=t=>(t=>i(t))(t);return(...i)=>{const n=s(i),a=Date.now(),o=e.get(n);if(void 0!==o)return e.delete(n),e.set(n,{value:o.value,ts:o.ts}),o.value;const r=t(...i);return e.set(n,{value:r,ts:a}),r}}(function(t){const e=it().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function gt(t,e,i,s,n){if(s){let s={passive:!0};k(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ft(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function _t(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class yt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var vt;!function(t){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"}(vt||(vt={}));class mt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._engine.dispatchEvent(vt.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return _t(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return _t(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return ft(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const wt=t=>(...e)=>{t(...e)},bt={debug:wt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:wt(console.info),log:wt(console.log),trace:wt(console.trace),verbose:wt(console.log),warning:wt(console.warn)};function Pt(){return bt}const xt="100%";class Mt{pluginManager=new mt(this);_domArray=[];_eventDispatcher=new yt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0-beta.15"}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){await this.init();const{Container:i}=await Promise.resolve().then(function(){return ns}),s=t.id??t.element?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:n,url:a}=t,o=a?await async function(t){const e=lt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Pt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:n}):t.options,r=lt(o,n),{items:c}=this,l=c.findIndex(t=>t.id.description===s),h=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:r});if(l>=0){const t=this.item(l),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(l,e,h)}else c.push(h);const d=((t,i)=>{const s=it();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=g,s.body.append(n),n)})(s,t.element),u=(t=>{const i=it();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===_)s=t,s.dataset[e]??=f,s.dataset[e]===g&&(s.style.width||=xt,s.style.height||=xt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(_)[0];n?(s=n,s.dataset[e]=f):(s=i.createElement(_),s.dataset[e]=g,t.appendChild(s)),s.style.width||=xt,s.style.height||=xt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(d);return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var zt,kt,It,St,Ct,Ot,Dt,Rt;!function(t){t.circle="circle",t.rectangle="rectangle"}(zt||(zt={}));class Tt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Lt extends Tt{radius;constructor(t,e,i){super(t,e,zt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Lt||t.type===zt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Et||t.type===zt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Et extends Tt{size;constructor(t,e,i,s){super(t,e,zt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Lt)return t.intersects(this);if(!(t instanceof Et))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(kt||(kt={})),function(t){t.delete="delete",t.wait="wait"}(It||(It={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(St||(St={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ct||(Ct={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ot||(Ot={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Dt||(Dt={})),function(t){t.easeInBack="ease-in-back",t.easeInBounce="ease-in-bounce",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInElastic="ease-in-elastic",t.easeInExpo="ease-in-expo",t.easeInGaussian="ease-in-gaussian",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInSigmoid="ease-in-sigmoid",t.easeInSine="ease-in-sine",t.easeInSmoothstep="ease-in-smoothstep",t.easeOutBack="ease-out-back",t.easeOutBounce="ease-out-bounce",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutElastic="ease-out-elastic",t.easeOutExpo="ease-out-expo",t.easeOutGaussian="ease-out-gaussian",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutSigmoid="ease-out-sigmoid",t.easeOutSine="ease-out-sine",t.easeOutSmoothstep="ease-out-smoothstep",t.easeInOutBack="ease-in-out-back",t.easeInOutBounce="ease-in-out-bounce",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutElastic="ease-in-out-elastic",t.easeInOutExpo="ease-in-out-expo",t.easeInOutGaussian="ease-in-out-gaussian",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.easeInOutSigmoid="ease-in-out-sigmoid",t.easeInOutSine="ease-in-out-sine",t.easeInOutSmoothstep="ease-in-out-smoothstep"}(Rt||(Rt={}));class At{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){D(t)||(void 0!==t.count&&(this.count=W(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=W(t.speed)),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.delay&&(this.delay=W(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ft extends At{mode;startValue;constructor(){super(),this.mode=Y.auto,this.startValue=et.random}load(t){super.load(t),D(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Ut extends At{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),D(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=W(t.offset)))}}class qt{h=new Ut(0,v);l=new Ut(0,w);s=new Ut(0,m);load(t){D(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Vt{value;constructor(){this.value=""}static create(t,e){const i=new Vt;return i.load(t),void 0!==e&&(I(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){D(t)||D(t.value)||(this.value=t.value)}}class Ht extends Vt{animation;constructor(){super(),this.animation=new qt}static create(t,e){const i=new Ht;return i.load(t),void 0!==e&&(I(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class $t{color;image;opacity;position;repeat;size;constructor(){this.color=new Vt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){D(t)||(void 0!==t.color&&(this.color=Vt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Bt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Wt{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){D(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class Gt{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(D(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=rt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class jt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){D(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=W(t.opacity)))}}class Nt{offset;value;constructor(){this.offset=0,this.value=90}load(t){D(t)||(void 0!==t.offset&&(this.offset=W(t.offset)),void 0!==t.value&&(this.value=W(t.value)))}}class Zt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=tt.percent,this.radius=0}load(t){D(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Xt{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){D(t)||(void 0!==t.acceleration&&(this.acceleration=W(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=W(t.maxSpeed)))}}class Yt{value;constructor(){this.value=0}load(t){D(t)||D(t.value)||(this.value=W(t.value))}}class Qt extends Yt{animation=new At;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Jt extends Qt{animation;constructor(){super(),this.animation=new Ft}load(t){super.load(t)}}class Kt{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Yt,this.enable=!1,this.options={}}load(t){D(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=rt(this.options,t.options)))}}class te{bottom;default;left;right;top;constructor(){this.default=St.out}load(t){D(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class ee{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){D(t)||(void 0!==t.acceleration&&(this.acceleration=W(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=rt({},t.position)))}}class ie{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new Nt,this.center=new Zt,this.decay=0,this.distance={},this.direction=P.none,this.drift=0,this.enable=!1,this.gravity=new Xt,this.path=new Kt,this.outModes=new te,this.random=!1,this.size=!1,this.speed=2,this.spin=new ee,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(D(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=W(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(C(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=W(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class se extends Ft{destroy;constructor(){super(),this.destroy=J.none,this.speed=2}load(t){super.load(t),D(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ne extends Jt{animation;constructor(){super(),this.animation=new se,this.value=1}load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ae{color;opacity;width;constructor(){this.width=0}load(t){D(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.width&&(this.width=W(t.width)),void 0!==t.opacity&&(this.opacity=W(t.opacity)))}}class oe{color;fill;stroke;load(t){D(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new jt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class re extends Yt{constructor(){super(),this.value=1}}class ce{horizontal;vertical;constructor(){this.horizontal=new re,this.vertical=new re}load(t){D(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class le{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(D(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class he{mode;value;constructor(){this.mode=It.delete,this.value=0}load(t){D(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class de{density;limit;value;constructor(){this.density=new le,this.limit=new he,this.value=0}load(t){D(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class ue{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(D(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=rt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class pe extends Ft{destroy;constructor(){super(),this.destroy=J.none,this.speed=5}load(t){super.load(t),D(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ge extends Jt{animation;constructor(){super(),this.animation=new pe,this.value=3}load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class fe extends Yt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),D(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class _e{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new ce,this.effect=new Gt,this.groups={},this.move=new ie,this.number=new de,this.opacity=new ne,this.paint=new oe,this.paint.color=new Ht,this.paint.color.value="#fff",this.paint.fill=new jt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new ue,this.size=new ge,this.zIndex=new fe}load(t){if(D(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=rt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity);const e=t.paint;if(e&&(O(e)?this.paint=ct(e,t=>{const e=new oe;return e.load(t),e}):O(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(O(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function ye(t,...e){for(const i of e)t.load(i)}function ve(t,e,...i){const s=new _e(t,e);return ye(s,...i),s}class me{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new $t,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Bt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=ve(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new Wt,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(D(t))return;void 0!==t.preset&&(this.preset=t.preset,ct(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=W(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=W(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;k(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=rt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function we(t,e){t.clearRect(o.x,o.y,e.width,e.height)}function be(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Pe=new Map;function xe(t,e){let i=Pe.get(t);if(!i){if(i=e(),Pe.size>=1e3){[...Pe.keys()].slice(0,500).forEach(t=>Pe.delete(t))}Pe.set(t,i)}return i}function Me(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return ze(t,n.value,i,s);if(O(n.value)){const e=nt(n.value,i,s);if(!e)return;return Me(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function ze(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return n.value===d?Se():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(O(n.value)){const e=nt(n.value,i,s);if(!e)return;return ze(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function ke(t,e,i,s=!0){const a=Me(t,e,i,s);return a?function(t){const e=t.r/y,i=t.g/y,s=t.b/y,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o));r.l*=w,r.s*=m,r.h*=60,r.h<0&&(r.h+=v);r.h>=v&&(r.h-=v);return r}(a):void 0}function Ie(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(m,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/v,o=i/m,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},l=r<n?r*(1+o):r+o-r*o,h=2*r-l,d=1/3,u=Math.min(y,y*c(h,l,a+d)),p=Math.min(y,y*c(h,l,a)),g=Math.min(y,y*c(h,l,a-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function Se(t){const e=()=>Math.floor(F(0,256));return{b:e(),g:e(),r:e()}}function Ce(t,e,i){const s=i??1;return xe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Oe(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Oe(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function De(t,e,i){const s=i??1;return xe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return Oe(Ie(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Re(t,e,i){if(i===d)return Se();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return function(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ie(t)),"r"in a||(a=Ie(e)),{b:q(n.b,a.b,i,s),g:q(n.g,a.g,i,s),r:q(n.r,a.r,i,s)}}(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ie(t)}}}function Te(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Le(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:v},s:{enable:!1,value:t.s,min:0,max:m},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Ee(s.h,e.h,i),Ee(s.s,e.s,i),Ee(s.l,e.l,i)),s}function Ee(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=H(e.speed)/s*i,t.decay=1-H(e.decay),t.status=Q.increasing,t.loops=0,t.maxLoops=H(e.count),t.time=0,t.delayTime=H(e.delay)*a,e.sync||(t.velocity*=A(),t.value*=A()),t.initialValue=t.value,t.offset=W(e.offset)):t.velocity=0}function Ae(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?V(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==Q.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=Q.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Q.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=U(t.value,r,o)}function Fe(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ae(i,!1,e),Ae(s,!0,e),Ae(n,!0,e)}const Ue=new Mt;class qe{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:p};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=C(s)?{min:N(s.min),max:N(s.max)}:{min:0,max:N(s)}}}async function Ve(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new qe))})}var He;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(He||(He={}));const $e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Be=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class We{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace($e,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Be.exec(e);return i?{a:i[He.a]?Number.parseInt(i[He.a],16)/255:1,b:Number.parseInt(i[He.b]??"0",16),g:Number.parseInt(i[He.g]??"0",16),r:Number.parseInt(i[He.r]??"0",16)}:void 0}}async function Ge(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new We)})}var je;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(je||(je={}));const Ne=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ze{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ie(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ie({h:H(e.h),l:H(e.l),s:H(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ne.exec(t);return e?function(t){const e=Ie(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[je.a]):1,h:Number.parseInt(e[je.h]??"0",10),l:Number.parseInt(e[je.l]??"0",10),s:Number.parseInt(e[je.s]??"0",10)}):void 0}}async function Xe(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ze)})}class Ye{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return rs});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Qe(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,_t(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ye(t.pluginManager))})}class Je{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=ht(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=H(i.speed)/s*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&ut(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Ke(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Je(t)))})}class ti{container;modes;_particleBouncePlugins;constructor(t){this.container=t,this.modes=[St.bounce,St.split],this._particleBouncePlugins=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let a=!1;for(const s of this._particleBouncePlugins)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,c=t.getRadius(),l=ot(o,c),h=n.canvas.size;!function(t){if(t.outMode!==St.bounce&&t.outMode!==St.split||t.direction!==K.left&&t.direction!==K.right)return;t.bounds.right<0&&t.direction===K.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===K.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===K.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===K.left&&t.bounds.left<=0&&e<0){const e=H(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===K.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===K.left&&(t.particle.position.x=s),t.outMode===St.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,size:c}),function(t){if(t.outMode!==St.bounce&&t.outMode!==St.split||t.direction!==K.bottom&&t.direction!==K.top)return;t.bounds.bottom<0&&t.direction===K.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===K.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===K.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===K.top&&t.bounds.top<=0&&e<0){const e=H(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===K.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===K.top&&(t.particle.position.y=s),t.outMode===St.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,size:c})}}class ei{container;modes;constructor(t){this.container=t,this.modes=[St.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case Dt.normal:case Dt.outside:if(at(t.position,n.canvas.size,o,t.getRadius(),e))return;break;case Dt.inside:{const{dx:e,dy:i}=G(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}class ii{container;modes;constructor(t){this.container=t,this.modes=[St.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===K.left||e===K.right))??(t.options.move.distance.vertical&&(e===K.top||e===K.bottom)))return;const n=t.options.move.gravity,a=this.container,r=a.canvas.size,c=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+c&&e===K.bottom||n.inverse&&i.y<-c&&e===K.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=r.width+c||t.velocity.x<0&&t.position.x>=-c)return;at(t.position,a.canvas.size,o,c,e)||t.destroy()}}}const si=z.origin;class ni{container;modes;constructor(t){this.container=t,this.modes=[St.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case Dt.inside:{const{x:e,y:i}=t.velocity;si.setTo(o),si.length=t.moveCenter.radius,si.angle=t.velocity.angle+Math.PI,si.addTo(t.moveCenter);const{dx:s,dy:a}=G(t.position,si);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(V({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(V({min:0,max:n.canvas.size.height}));const{dx:r,dy:c}=G(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(at(t.position,n.canvas.size,o,t.getRadius(),e))return;switch(t.outType){case Dt.outside:{t.position.x=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=G(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Dt.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=ot(t.position,o);e===K.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=A()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===K.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=A()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===K.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=A()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===K.top&&r.bottom<-t.offset.y&&(i||(t.position.x=A()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,St.bounce,t=>new ti(t)),this._addUpdaterIfMissing(t,St.out,t=>new ni(t)),this._addUpdaterIfMissing(t,St.destroy,t=>new ei(t)),this._addUpdaterIfMissing(t,St.none,t=>new ii(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this._updateOutMode(t,e,i.bottom??i.default,K.bottom),this._updateOutMode(t,e,i.left??i.default,K.left),this._updateOutMode(t,e,i.right??i.default,K.right),this._updateOutMode(t,e,i.top??i.default,K.top)}_addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function oi(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ai(t)))})}class ri{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=lt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=H(o.opacity),t.fillAnimation=i.animation;const s=ke(this._pluginManager,i);s&&(t.fillColor=Le(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),r.color);t.strokeWidth=H(r.width)*e.retina.pixelRatio,t.strokeOpacity=H(r.opacity??1),t.strokeAnimation=i.animation;const s=ke(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=Le(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Fe(t.fillColor,e),Fe(t.strokeColor,e))}}async function ci(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ri(t.pluginManager,e)))})}var li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(li||(li={}));const hi=/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;class di{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:H(e.r),g:H(e.g),b:H(e.b)}}parseString(t){if(!this.accepts(t))return;const e=hi.exec(t);return e?{a:e.length>4?X(e[li.a]):1,b:parseInt(e[li.b]??"0",10),g:parseInt(e[li.g]??"0",10),r:parseInt(e[li.r]??"0",10)}:void 0}}async function ui(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi{_container;constructor(t){this._container=t}init(t){const e=this._container,i=t.options.size.animation;i.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,i.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&ut(t,t.size,0,t.options.size.animation.destroy,e)}}async function gi(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new pi(t)))})}async function fi(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(async t=>{await Promise.all([Ge(t),Xe(t),ui(t),Qe(t),Ve(t),ci(t),Ke(t),oi(t),gi(t)])})}class _i{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var yi,vi,mi;!function(t){t.circle="circle",t.rectangle="rectangle"}(yi||(yi={}));class wi{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=yi.circle}load(t){D(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class bi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class Pi{onClick;onDiv;onHover;constructor(){this.onClick=new _i,this.onDiv=new wi,this.onHover=new bi}load(t){if(D(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=ct(e,t=>{const e=new wi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(vi||(vi={}));class xi{_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}load(t){if(D(t))return;if(!this._container)return;const e=this._pluginManager.interactors?.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class Mi{detectsOn;events;modes;constructor(t,e){this.detectsOn=vi.window,this.events=new Pi,this.modes=new xi(t,e)}load(t){if(D(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class zi{id="interactivity";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(this._pluginManager,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Mi(this._pluginManager,t)),s.load(i?.interactivity);const n=this._pluginManager.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=rt({},i.interactivity));const s=this._pluginManager.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(mi||(mi={}));class ki{type=mi.particles;container;constructor(t){this.container=t}}const Ii="pointerdown",Si="pointerup",Ci="pointerleave",Oi="pointermove",Di="touchstart",Ri="touchend",Ti="touchmove",Li="touchcancel";class Ei extends Lt{canvasSize;constructor(t,e,i,s){super(t,e,i),this.canvasSize=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.canvasSize,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.canvasSize,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Lt)n=new Lt(i.x,i.y,t.radius);else{const e=t;n=new Et(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Ai{blur;color;enable;constructor(){this.blur=5,this.color=new Vt,this.color.value="#000",this.enable=!1}load(t){D(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=Vt.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Fi{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(t){D(t)||(void 0!==t.color&&(this.color=Vt.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Ui{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new Vt,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Ai,this.triangles=new Fi,this.width=1,this.warp=!1}load(t){D(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=Vt.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}function qi(t,e,i){const{dx:s,dy:n}=G(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class Vi extends ki{_maxDistance;_pluginManager;constructor(t,e){super(e),this._pluginManager=t,this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this._maxDistance&&(this._maxDistance=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<o.x||e.y<o.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,r=t.retina.linksDistance??0,c=n.warp,l=c?new Ei(e.x,e.y,r,s):new Lt(e.x,e.y,r),h=i.particles.grid.query(l);for(const i of h){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const h=i.getPosition();if(h.x<o.x||h.y<o.y||h.x>s.width||h.y>s.height)continue;const d=G(e,h).distance,u=c&&l.warp?qi(e,h,s):d,p=Math.min(d,u);if(p>r)continue;const g=(1-p/r)*a;this._setColor(t),t.links.push({destination:i,opacity:g,color:this._getLinkColor(t,i),isWarped:u<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links??=new Ui;for(const i of e)t.links.load(i?.links)}reset(){}_getLinkColor(t,e){const i=this.container,s=t.options.links;if(!s)return;return Re(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}_setColor(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=function(t,e,i,s){const n=I(e)?e:e.value;return n===d?s?Me(t,{value:n}):i?d:u:n===u?u:Me(t,{value:n})}(this._pluginManager,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Hi{id="links";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return us});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function $i(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{const e=t.pluginManager;!function(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}(t),e.addPlugin(new Hi(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Vi(e,t)))})}const Bi={background:{color:"#000000"},particles:{number:{value:100},links:{distance:150,enable:!0},move:{enable:!0},paint:{fill:{color:{value:"#ffffff"}}},size:{value:1},shape:{type:"circle"}}};async function Wi(t){await t.pluginManager.register(async t=>{await Promise.all([fi(t),(async()=>{await async function(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new zi(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,ft(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await $i(t)})()]),t.pluginManager.addPreset("links",Bi)})}const Gi=globalThis;Gi.__tsParticlesInternals=Gi.__tsParticlesInternals??{},Gi.loadLinksPreset=Wi;function ji(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Ni{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{we(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,g=this._reusableColorStyles,f=a?De(a,r.hdr,h*d):void 0,_=o?De(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=_,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,g,p),function(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(c),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const _={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(_);const y=s.effect?l.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(y,_),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(v,_),function(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}(v,_),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(v,_),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(y,_),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:d,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)be(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{!function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(o.x,o.y,e.width,e.height)}(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{!function(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,o.x,o.y,e.width,e.height),t.globalAlpha=n}(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation="source-over")}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{we(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)ji(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=ke(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ke(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}function Zi(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Xi{element;render;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new Ni(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*n/t,y:i*n/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.element;if(!i)return;const s=i.style,n=Me(this._pluginManager,e.color);s.backgroundColor=n?Ce(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this._container;this._generated=e in t.dataset?"true"===t.dataset[e]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=function(t){const e=it().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(this.element.style);const s=this._standardSize;s.height=t.offsetHeight,s.width=t.offsetWidth;const n=this._container.retina.pixelRatio,a=this.size;t.height=a.height=s.height*n,t.width=a.width=s.width*n;const o=st("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:o?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(this.element.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})}resize(){if(!this.element)return!1;const t=this._container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...e};e.height=i.height,e.width=i.width;const o=this.size;return this.element.width=o.width=n.width,this.element.height=o.height=n.height,this._container.started&&t.particles.setResizeFactor({width:e.width/a.width,height:e.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.element||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.element,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};_repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&Zi(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.element;t&&Zi(t,pt(this._container.actualOptions.fullScreen.zIndex),!0)}}class Yi{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(it().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*a)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),gt(document,i,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void gt(globalThis,"resize",e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this._handleWindowResize()}),this._resizeObserver.observe(s))}}function Qi(t){if(e=t.outMode,i=t.checkModes,!(e===i||O(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}class Ji{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this._container,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this._container.dispatchEvent(vt.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??Te(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??H(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??Te(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??r),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??l,this._cachedTransform.d=e.cos*(t.d??h),this._cachedTransform}init(t,e,i,s){const n=this._container;this.id=t,this.group=s,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=Dt.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,o=n.actualOptions,r=ve(this._pluginManager,n,o.particles),c=r.reduceDuplicates,l=r.effect.type,h=r.shape.type;this.effect=lt(l,this.id,c),this.shape=lt(h,this.id,c);const u=r.effect,p=r.shape;if(i){if(i.effect?.type){const t=lt(i.effect.type,this.id,c);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=lt(i.shape.type,this.id,c);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===d){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===d){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return rt({close:e.close},lt(n,i,s))}(this.effect,u,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return rt({close:e.close},lt(n,i,s))}(this.shape,p,this.id,c):void 0,r.load(i);const g=this.effectData;g&&r.load(g.particles);const f=this.shapeData;f&&r.load(f.particles),this.effectClose=g?.close??r.effect.close,this.shapeClose=f?.close??r.shape.close,this.options=r,n.retina.initParticle(this),this.size=ht(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy();let _,y;n.particles.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(_=n.effectDrawers.get(this.effect)),_?.loadEffect&&_.loadEffect(this),this.shape&&(y=n.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of n.particleUpdaters)t.init(this);_?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%p,i=e<0?e+p:e;return i>=Math.PI*n&&i<3*Math.PI*n}if(this.roll.horizontal){const e=(t+Math.PI*n)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size,l=new AbortController,{signal:h}=l;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=Z({size:c,position:s}),l=M.create(t.x,t.y,e);this._fixHorizontal(l,r,o.left??o.default),this._fixHorizontal(l,r,o.right??o.default),this._fixVertical(l,r,o.top??o.default),this._fixVertical(l,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,s=void 0}return s};_calculateVelocity=()=>{const t=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy(),e=this.options.move;if(e.direction===P.inside||e.direction===P.outside)return t;const i=N(H(e.angle.value)),s=N(H(e.angle.offset)),a={left:s-i*n,right:s+i*n};return e.straight||(t.angle+=V(W(a.left,a.right))),e.random&&"number"==typeof e.speed&&(t.length*=A()),t};_fixHorizontal=(t,e,i)=>{Qi({outMode:i,checkModes:[St.bounce],coord:t.x,maxCoord:this._container.canvas.size.width,setCb:e=>t.x+=e,radius:e})};_fixVertical=(t,e,i)=>{Qi({outMode:i,checkModes:[St.bounce],coord:t.y,maxCoord:this._container.canvas.size.height,setCb:e=>t.y+=e,radius:e})};_getRollColor=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Ct.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t;_initPosition=t=>{const e=this._container,i=H(this.options.zIndex.value),s=this._calcPosition(t,U(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...dt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return N(t);switch(t){case P.top:return-Math.PI*n;case P.topRight:return-Math.PI*b;case P.right:return 0;case P.bottomRight:return Math.PI*b;case P.bottom:return Math.PI*n;case P.bottomLeft:return.75*Math.PI;case P.left:return Math.PI;case P.topLeft:return.75*-Math.PI;case P.inside:return Math.atan2(i.y-e.y,i.x-e.x);case P.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return A()*p}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case P.inside:this.outType=Dt.inside;break;case P.outside:this.outType=Dt.outside}this.offset=z.origin}}class Ki{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Lt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Et(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof Lt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Et){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class ts{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_maxZIndex;_minZIndex;_needsSort;_nextId;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zArray;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._minZIndex=0,this._maxZIndex=0,this.grid=new Ki(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,a=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,o=this.count;if(a>0)switch(n){case It.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case It.wait:if(o>=a)return}try{const n=this._pool.pop()??new Ji(this._pluginManager,this._container);n.init(this._nextId,t,e,i);let a=!0;return s&&(a=s(n)),a?(this._array.push(n),this._zArray.push(n),this._nextId++,this._container.dispatchEvent(vt.particleAdded,{particle:n}),n):void this._pool.push(n)}catch(t){Pt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._pool.length=0,this._zArray=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this._minZIndex=0,this._maxZIndex=0,this._needsSort=!1,this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this.grid=new Ki(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=ve(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setLastZIndex(t){this._needsSort||=t>=this._maxZIndex||t>this._minZIndex&&t<this._maxZIndex}setResizeFactor(t){this._resizeFactor=t}update(t){const e=new Set;this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const i=this._resizeFactor;for(const s of this._array){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}for(const e of this._postUpdatePlugins)e.postUpdate?.(t);for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(i.destroyed||i.spawning)i.destroyed&&e.add(i);else for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t)}if(e.size)for(const t of e)this.remove(t);if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort((t,e)=>e.position.z-t.position.z||t.id-e.id);const e=t[0],i=t[t.length-1];if(!e||!i)return;this._maxZIndex=e.position.z,this._minZIndex=i.position.z,this._needsSort=!1}}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this._limit=n.limit.value*a:this._groupLimits.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)};_initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)};_removeParticle=(t,e,i)=>{const s=this._array[t];if(!s)return!1;if(s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(n,1),s.destroy(i),this._container.dispatchEvent(vt.particleRemoved,{particle:s}),this._addToPool(s),!0}}class es{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=H(s.gravity.maxSpeed)*i,a.moveDrift=H(s.drift)*i,a.moveSpeed=H(s.speed)*i,a.sizeAnimationSpeed=H(e.size.animation.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function is(t){return!t.destroyed}function ss(t,e,...i){const s=new me(t,e);return ye(s,...i),s}var ns=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this._pluginManager=i,this._dispatchCallback=e,this._onDestroy=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,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._sourceOptions=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new es(this),this.canvas=new Xi(this._pluginManager,this),this.particles=new ts(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=ss(this._pluginManager,this),this.actualOptions=ss(this._pluginManager,this),this._eventListeners=new Yi(this),this.dispatchEvent(vt.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&is(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(t=!0){if(is(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(t),this.dispatchEvent(vt.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!is(this))return;let e=t;this._drawAnimationFrame=L(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}Pt().error(`Export plugin with type ${t} not found`)}async init(){if(!is(this))return;const t=new Map;for(const e of this._pluginManager.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this._options=ss(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=ss(this._pluginManager,this,this._options),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,hdr:n,smooth:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this._duration=H(i)*a,this._delay=H(e)*a,this._lifeTime=0,this.fpsLimit=s>0?s:120,this._smooth=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(vt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(vt.particlesSetup)}async initDrawersAndUpdaters(){const t=this._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(is(this)&&(void 0!==this._drawAnimationFrame&&(t=this._drawAnimationFrame,E(t),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(vt.containerPaused)}}play(t){if(!is(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(vt.containerPlay),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(is(this))return this.stop(),this.start()}async reset(t){if(is(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=ss(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=ss(this._pluginManager,this,this._options),this.refresh()}async start(){is(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(vt.containerStarted),this.play(),t()};this._delayTimeout=setTimeout(()=>{e()},this._delay)}))}stop(){if(is(this)&&this.started){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();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(vt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+a/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Pt().error("error in animation loop",t)}}}});function as(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=c*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function os(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(c=a,l=n,Math.sqrt(j(c,l))),r=H(i.acceleration);var c,l;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?kt.clockwise:kt.counterClockwise,angle:A()*p,radius:o,acceleration:e.retina.spinAcceleration}}var rs=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-H(e.decay),t.pathDelay=H(s.delay.value)*a,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:H(i.acceleration),inverse:i.inverse},os(this._container,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options,s=i.move;if(!s.enable)return;const a=this._container,o=a.retina.pixelRatio,r=function(t){return t.slow.inRange?t.slow.factor:1}(t),c=a.retina.reduceFactor,l=t.retina.moveSpeed,h=t.retina.moveDrift,d=B(i.size.value)*o,u=l*(s.size?t.getRadius()/d:1)*r*(e.factor||1)*n,p=t.retina.maxSpeed;s.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===kt.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),c=r*n;e.spin.radius>c?(e.spin.radius=c,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(a,t,u,c):as(t,s,u,p,h,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&a>=c||l&&o>=l)&&!t.misplaced)t.misplaced=!!c&&a>c||!!l&&o>l,c&&(t.velocity.x=t.velocity.y*n-t.velocity.x),l&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!c||a<c)&&(!l||o<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(t)}preInit(){return this._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class cs{_canPush=!0;_clickPositionPlugins;_container;_handlers;_interactionManager;_touches;constructor(t,e){this._container=t,this._clickPositionPlugins=[],this._interactionManager=e,this._touches=new Map,this._handlers={mouseDown:()=>{this._mouseDown()},mouseLeave:()=>{this._mouseTouchFinish()},mouseMove:t=>{this._mouseTouchMove(t)},mouseUp:t=>{this._mouseTouchClick(t)},touchStart:t=>{this._touchStart(t)},touchMove:t=>{this._mouseTouchMove(t)},touchEnd:t=>{this._touchEnd(t)},touchCancel:t=>{this._touchEnd(t)},touchEndClick:t=>{this._touchEndClick(t)},visibilityChange:()=>{this._handleVisibilityChange()}}}addListeners(){this._manageListeners(!0)}init(){this._clickPositionPlugins.length=0;for(const t of this._container.plugins.filter(t=>!!t.clickPositionValid))this._clickPositionPlugins.push(t)}removeListeners(){this._manageListeners(!1)}_doMouseTouchClick=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions;if(this._canPush){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;ct(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this._mouseTouchFinish()},500)};_handleVisibilityChange=()=>{this._mouseTouchFinish()};_manageInteractivityListeners=t=>{const e=this._handlers,i=this._container,s=this._interactionManager,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.element?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(gt(a,Oi,e.mouseMove,t),gt(a,Di,e.touchStart,t),gt(a,Ti,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(gt(a,Ri,e.touchEndClick,t),gt(a,Si,e.mouseUp,t),gt(a,Ii,e.mouseDown,t)):gt(a,Ri,e.touchEnd,t):(gt(a,Ri,e.touchEndClick,t),gt(a,Si,e.mouseUp,t),gt(a,Ii,e.mouseDown,t),gt(a,Ri,e.touchEnd,t)),gt(a,Ci,e.mouseLeave,t),gt(a,Li,e.touchCancel,t))};_manageListeners=t=>{const e=this._handlers,s=this._container,n=this._interactionManager,a=s.actualOptions,o=a.interactivity?.detectsOn,r=s.canvas.element;o===vi.window?n.interactivityData.element=it():o===vi.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this._manageInteractivityListeners(t),gt(document,i,e.visibilityChange,t,!1)};_mouseDown=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position};_mouseTouchClick=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this._clickPositionPlugins)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this._doMouseTouchClick(t),n.clicking=!1}};_mouseTouchFinish=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Ci,e.inside=!1,e.clicking=!1};_mouseTouchMove=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,n=i.interactivityData,a=e.canvas.element;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(n.element===it()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===vi.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this._canPush="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=Oi};_touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()};_touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)};_touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)}}class ls{container;interactivityData;_clickHandlers;_eventListeners;_externalInteractors;_interactors;_intersectionObserver;_particleInteractors;_pluginManager;constructor(t,e){this.container=e,this._pluginManager=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[],this._clickHandlers=new Map,this._eventListeners=new cs(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this._intersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this._intersectionManager(t)})}addClickHandler(t){const{container:e,interactivityData:i}=this;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this._clickHandlers.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this._clickHandlers.set(Di,()=>{e.destroyed||(a=!0,o=!1)}),this._clickHandlers.set(Ti,()=>{e.destroyed||(o=!0)}),this._clickHandlers.set(Ri,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.element,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this._clickHandlers.set(Li,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this._clickHandlers)s.addEventListener(t,e)}addListeners(){this._eventListeners.addListeners()}clearClickHandlers(){const{container:t,interactivityData:e}=this;if(!t.destroyed){for(const[t,i]of this._clickHandlers)e.element?.removeEventListener(t,i);this._clickHandlers.clear()}}externalInteract(t){for(const e of this._externalInteractors){const{interactivityData:i}=this;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.container.destroyed)return;const{interactivityData:e}=this;for(const i of this._externalInteractors)i.handleClickMode?.(t,e)}init(){this._eventListeners.init();for(const t of this._interactors){switch(t.type){case mi.external:this._externalInteractors.push(t);break;case mi.particles:this._particleInteractors.push(t)}t.init()}}async initInteractors(){const t=await(this._pluginManager.getInteractors?.(this.container,!0));t&&(this._interactors=t,this._externalInteractors=[],this._particleInteractors=[])}particlesInteract(t,e){const{interactivityData:i}=this;for(const i of this._externalInteractors)i.clear(t,e);for(const s of this._particleInteractors)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this._eventListeners.removeListeners()}reset(t){const{interactivityData:e}=this;for(const i of this._externalInteractors)i.isEnabled(e)&&i.reset(e,t);for(const i of this._particleInteractors)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(t.element)}stopObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this._interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.container;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}_intersectionManager=t=>{const{container:e}=this;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var hs=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t,this.interactionManager=new ls(t,e),this._container.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this._pluginManager.interactors?.delete(this._container)}particleCreated(t){const e=t,i=new Mi(this._pluginManager,this._container);i.load(this._container.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});function ds(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=A(),e.set(i,n)),n}var us=Object.freeze({__proto__:null,LinkInstance:class{_colorCache=new Map;_container;_freqs;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const a=s.links,r=e.retina.linksWidth??0,c=e.getPosition(),l=e.options.twinkle?.links,h=a.triangles.enable,d=h?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,_=!1;const y=()=>{_&&(t.stroke(),_=!1)};for(const u of i){if(a.frequency<1&&this._getLinkFrequency(e,u.destination)>a.frequency)continue;const i=u.destination.getPosition();if(h&&!u.isWarped&&d&&(y(),this._drawTriangles(s,e,u,d,c,i,t)),u.opacity<=0||r<=0)continue;if(!a.enable)continue;let v=u.opacity,m=u.color;const w=l?.enable&&A()<l.frequency?Me(this._pluginManager,l.color):void 0;if(l&&w&&(m=w,v=H(l.opacity)),!m){const t=void 0!==a.id?this._container.particles.linksColors.get(a.id):this._container.particles.linksColor;m=Re(e,u.destination,t)}if(!m)continue;const b=this._getCachedStyle(m);if(b===p&&r===g&&v===f||(y(),t.strokeStyle=b,t.lineWidth=r,t.globalAlpha=v,p=b,g=r,f=v,t.beginPath(),_=!0),u.isWarped){const e=this._container.canvas.size,s=i.x-c.x,a=i.y-c.y;let r=o.x,l=o.y;Math.abs(s)>e.width*n&&(r=s>0?-e.width:e.width),Math.abs(a)>e.height*n&&(l=a>0?-e.height:e.height),t.moveTo(c.x,c.y),t.lineTo(i.x+r,i.y+l),t.moveTo(c.x-r,c.y-l),t.lineTo(i.x,i.y)}else t.moveTo(c.x,c.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this._freqs.links.clear(),this._freqs.triangles.clear(),this._colorCache.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this._container.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}_drawTriangles(t,e,i,s,a,o,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const h=c.links;if(h?.length)for(const d of h){if(d.isWarped||this._getLinkFrequency(c,d.destination)>c.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this._getTriangleFrequency(e,c,h)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+d.opacity)*n,p=Me(this._pluginManager,l.color)??i.color;if(!p||u<=0)continue;const g=h.getPosition();r.save(),r.fillStyle=this._getCachedStyle(p),r.globalAlpha=u,r.beginPath(),r.moveTo(a.x,a.y),r.lineTo(o.x,o.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}_getCachedStyle(t){const e=`${t.r},${t.g},${t.b}`;let i=this._colorCache.get(e);return i||(i=Ce(t,this._container.hdr),this._colorCache.set(e,i)),i}_getLinkFrequency(t,e){return ds([t,e],this._freqs.links)}_getTriangleFrequency(t,e,i){return ds([t,e,i],this._freqs.triangles)}}});t.loadLinksPreset=Wi,t.tsParticles=Ue}),Object.assign(globalThis.window||globalThis,{loadLinksPreset:(globalThis.__tsParticlesInternals.presets.links||{}).loadLinksPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.links=t.__tsParticlesInternals.presets.links||{}))}(this,function(t){"use strict";const e="generated",i="visibilitychange",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,c=0,l=0,h=1,d="random",u="mid",p=2*Math.PI,g="true",f="false",_="canvas",y=255,v=360,m=100,w=100,b=.25;var P;function x(t){return"z"in t?t.z:o.z}!function(t){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"}(P||(P={}));class M{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function k(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function S(t){return"number"==typeof t}function C(t){return"object"==typeof t&&null!==t}function O(t){return Array.isArray(t)}function D(t){return null==t}const R=Math.PI/180;let T=Math.random;const L=t=>requestAnimationFrame(t),E=t=>{cancelAnimationFrame(t)};function A(){return U(T(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function U(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function V(t){const e=B(t);let i=$(t);return e===i&&(i=0),F(i,e)}function H(t){return S(t)?t:V(t)}function $(t){return S(t)?t:t.min}function B(t){return S(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&S(t))return t;const i=$(t),s=B(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function N(t){return t*R}function Z(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q,J,K,tt,et;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Y||(Y={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Q||(Q={})),function(t){t.none="none",t.max="max",t.min="min"}(J||(J={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(K||(K={})),function(t){t.precise="precise",t.percent="percent"}(tt||(tt={})),function(t){t.max="max",t.min="min",t.random="random"}(et||(et={}));function it(){return globalThis.document}function st(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function nt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(A()*t.length)}(t)]}function at(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==K.bottom||(n=t.top<e.height+i.x);!n||s&&s!==K.left||(n=t.right>i.x);!n||s&&s!==K.right||(n=t.left<e.width+i.y);!n||s&&s!==K.top||(n=t.bottom>i.y);return n}(ot(t,s??0),e,i,n)}function ot(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function rt(t,...e){for(const i of e){if(D(i))continue;if(!C(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):C(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return C(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>rt(void 0,t)):rt(e[n],a)}}return t}function ct(t,e){return O(t)?t.map((t,i)=>e(t,i)):e(t,0)}function lt(t,e,i){return O(t)?nt(t,e,i):t}function ht(t,e){const i=t.value,s=t.animation,o={delayTime:H(s.delay)*a,enable:s.enable,value:H(t.value)*e,max:B(i)*e,min:$(i)*e,loops:0,maxLoops:H(s.count),time:0};if(s.enable){switch(o.decay=1-H(s.decay),s.mode){case Y.increase:o.status=Q.increasing;break;case Y.decrease:o.status=Q.decreasing;break;case Y.random:o.status=A()>=n?Q.increasing:Q.decreasing}const t=s.mode===Y.auto;switch(s.startValue){case et.min:o.value=o.min,t&&(o.status=Q.increasing);break;case et.max:o.value=o.max,t&&(o.status=Q.decreasing);break;case et.random:default:o.value=V(o),t&&(o.status=A()>=n?Q.increasing:Q.decreasing)}}return o.initialValue=o.value,o}function dt(t,e){return function(t,e){if(t.mode!==tt.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}function ut(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,c=e.decay??1;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case Q.increasing:e.value+=a;break;case Q.decreasing:e.value-=a}switch(e.velocity&&1!==c&&(e.velocity*=c),e.status){case Q.increasing:e.value>=r&&(e.status=Q.decreasing,e.loops??=0,e.loops++);break;case Q.decreasing:e.value<=o&&(e.status=Q.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case J.max:i>=n&&t.destroy();break;case J.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=U(e.value,o,r))}}const pt=function(t){const e=new Map,i=(t,e=new WeakSet)=>{if(null===t)return"null";const s=typeof t;if("undefined"===s)return"undefined";if("number"===s||"boolean"===s||"string"===s)return JSON.stringify(t);if("function"===s)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===s)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>i(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(s=>`${JSON.stringify(s)}:${i(t[s],e)}`).join(",")}}`},s=t=>(t=>i(t))(t);return(...i)=>{const n=s(i),a=Date.now(),o=e.get(n);if(void 0!==o)return e.delete(n),e.set(n,{value:o.value,ts:o.ts}),o.value;const r=t(...i);return e.set(n,{value:r,ts:a}),r}}(function(t){const e=it().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function gt(t,e,i,s,n){if(s){let s={passive:!0};k(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ft(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function _t(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class yt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var vt;!function(t){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"}(vt||(vt={}));class mt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._engine.dispatchEvent(vt.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return _t(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return _t(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return ft(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const wt=t=>(...e)=>{t(...e)},bt={debug:wt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:wt(console.info),log:wt(console.log),trace:wt(console.trace),verbose:wt(console.log),warning:wt(console.warn)};function Pt(){return bt}const xt="100%";class Mt{pluginManager=new mt(this);_domArray=[];_eventDispatcher=new yt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0-beta.16"}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){await this.init();const{Container:i}=await Promise.resolve().then(function(){return ns}),s=t.id??t.element?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:n,url:a}=t,o=a?await async function(t){const e=lt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Pt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:n}):t.options,r=lt(o,n),{items:c}=this,l=c.findIndex(t=>t.id.description===s),h=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:r});if(l>=0){const t=this.item(l),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(l,e,h)}else c.push(h);const d=((t,i)=>{const s=it();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=g,s.body.append(n),n)})(s,t.element),u=(t=>{const i=it();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===_)s=t,s.dataset[e]??=f,s.dataset[e]===g&&(s.style.width||=xt,s.style.height||=xt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(_)[0];n?(s=n,s.dataset[e]=f):(s=i.createElement(_),s.dataset[e]=g,t.appendChild(s)),s.style.width||=xt,s.style.height||=xt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(d);return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var zt,kt,It,St,Ct,Ot,Dt,Rt;!function(t){t.circle="circle",t.rectangle="rectangle"}(zt||(zt={}));class Tt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Lt extends Tt{radius;constructor(t,e,i){super(t,e,zt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Lt||t.type===zt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Et||t.type===zt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Et extends Tt{size;constructor(t,e,i,s){super(t,e,zt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Lt)return t.intersects(this);if(!(t instanceof Et))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(kt||(kt={})),function(t){t.delete="delete",t.wait="wait"}(It||(It={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(St||(St={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ct||(Ct={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ot||(Ot={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Dt||(Dt={})),function(t){t.easeInBack="ease-in-back",t.easeInBounce="ease-in-bounce",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInElastic="ease-in-elastic",t.easeInExpo="ease-in-expo",t.easeInGaussian="ease-in-gaussian",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInSigmoid="ease-in-sigmoid",t.easeInSine="ease-in-sine",t.easeInSmoothstep="ease-in-smoothstep",t.easeOutBack="ease-out-back",t.easeOutBounce="ease-out-bounce",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutElastic="ease-out-elastic",t.easeOutExpo="ease-out-expo",t.easeOutGaussian="ease-out-gaussian",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutSigmoid="ease-out-sigmoid",t.easeOutSine="ease-out-sine",t.easeOutSmoothstep="ease-out-smoothstep",t.easeInOutBack="ease-in-out-back",t.easeInOutBounce="ease-in-out-bounce",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutElastic="ease-in-out-elastic",t.easeInOutExpo="ease-in-out-expo",t.easeInOutGaussian="ease-in-out-gaussian",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.easeInOutSigmoid="ease-in-out-sigmoid",t.easeInOutSine="ease-in-out-sine",t.easeInOutSmoothstep="ease-in-out-smoothstep"}(Rt||(Rt={}));class At{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){D(t)||(void 0!==t.count&&(this.count=W(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=W(t.speed)),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.delay&&(this.delay=W(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ft extends At{mode;startValue;constructor(){super(),this.mode=Y.auto,this.startValue=et.random}load(t){super.load(t),D(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Ut extends At{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),D(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=W(t.offset)))}}class qt{h=new Ut(0,v);l=new Ut(0,w);s=new Ut(0,m);load(t){D(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Vt{value;constructor(){this.value=""}static create(t,e){const i=new Vt;return i.load(t),void 0!==e&&(I(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){D(t)||D(t.value)||(this.value=t.value)}}class Ht extends Vt{animation;constructor(){super(),this.animation=new qt}static create(t,e){const i=new Ht;return i.load(t),void 0!==e&&(I(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class $t{color;image;opacity;position;repeat;size;constructor(){this.color=new Vt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){D(t)||(void 0!==t.color&&(this.color=Vt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Bt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Wt{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){D(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class Gt{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(D(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=rt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class jt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){D(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=W(t.opacity)))}}class Nt{offset;value;constructor(){this.offset=0,this.value=90}load(t){D(t)||(void 0!==t.offset&&(this.offset=W(t.offset)),void 0!==t.value&&(this.value=W(t.value)))}}class Zt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=tt.percent,this.radius=0}load(t){D(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Xt{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){D(t)||(void 0!==t.acceleration&&(this.acceleration=W(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=W(t.maxSpeed)))}}class Yt{value;constructor(){this.value=0}load(t){D(t)||D(t.value)||(this.value=W(t.value))}}class Qt extends Yt{animation=new At;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Jt extends Qt{animation;constructor(){super(),this.animation=new Ft}load(t){super.load(t)}}class Kt{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Yt,this.enable=!1,this.options={}}load(t){D(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=rt(this.options,t.options)))}}class te{bottom;default;left;right;top;constructor(){this.default=St.out}load(t){D(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class ee{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){D(t)||(void 0!==t.acceleration&&(this.acceleration=W(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=rt({},t.position)))}}class ie{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new Nt,this.center=new Zt,this.decay=0,this.distance={},this.direction=P.none,this.drift=0,this.enable=!1,this.gravity=new Xt,this.path=new Kt,this.outModes=new te,this.random=!1,this.size=!1,this.speed=2,this.spin=new ee,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(D(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=W(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=W(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(C(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=W(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class se extends Ft{destroy;constructor(){super(),this.destroy=J.none,this.speed=2}load(t){super.load(t),D(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ne extends Jt{animation;constructor(){super(),this.animation=new se,this.value=1}load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ae{color;opacity;width;constructor(){this.width=0}load(t){D(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.width&&(this.width=W(t.width)),void 0!==t.opacity&&(this.opacity=W(t.opacity)))}}class oe{color;fill;stroke;load(t){D(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new jt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class re extends Yt{constructor(){super(),this.value=1}}class ce{horizontal;vertical;constructor(){this.horizontal=new re,this.vertical=new re}load(t){D(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class le{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(D(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class he{mode;value;constructor(){this.mode=It.delete,this.value=0}load(t){D(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class de{density;limit;value;constructor(){this.density=new le,this.limit=new he,this.value=0}load(t){D(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class ue{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(D(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=rt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class pe extends Ft{destroy;constructor(){super(),this.destroy=J.none,this.speed=5}load(t){super.load(t),D(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ge extends Jt{animation;constructor(){super(),this.animation=new pe,this.value=3}load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class fe extends Yt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),D(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class _e{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new ce,this.effect=new Gt,this.groups={},this.move=new ie,this.number=new de,this.opacity=new ne,this.paint=new oe,this.paint.color=new Ht,this.paint.color.value="#fff",this.paint.fill=new jt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new ue,this.size=new ge,this.zIndex=new fe}load(t){if(D(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=rt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity);const e=t.paint;if(e&&(O(e)?this.paint=ct(e,t=>{const e=new oe;return e.load(t),e}):O(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(O(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function ye(t,...e){for(const i of e)t.load(i)}function ve(t,e,...i){const s=new _e(t,e);return ye(s,...i),s}class me{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new $t,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Bt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=ve(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new Wt,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(D(t))return;void 0!==t.preset&&(this.preset=t.preset,ct(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=W(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=W(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;k(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=rt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function we(t,e){t.clearRect(o.x,o.y,e.width,e.height)}function be(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Pe=new Map;function xe(t,e){let i=Pe.get(t);if(!i){if(i=e(),Pe.size>=1e3){[...Pe.keys()].slice(0,500).forEach(t=>Pe.delete(t))}Pe.set(t,i)}return i}function Me(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return ze(t,n.value,i,s);if(O(n.value)){const e=nt(n.value,i,s);if(!e)return;return Me(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function ze(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return n.value===d?Se():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(O(n.value)){const e=nt(n.value,i,s);if(!e)return;return ze(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function ke(t,e,i,s=!0){const a=Me(t,e,i,s);return a?function(t){const e=t.r/y,i=t.g/y,s=t.b/y,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o));r.l*=w,r.s*=m,r.h*=60,r.h<0&&(r.h+=v);r.h>=v&&(r.h-=v);return r}(a):void 0}function Ie(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(m,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/v,o=i/m,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},l=r<n?r*(1+o):r+o-r*o,h=2*r-l,d=1/3,u=Math.min(y,y*c(h,l,a+d)),p=Math.min(y,y*c(h,l,a)),g=Math.min(y,y*c(h,l,a-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function Se(t){const e=()=>Math.floor(F(0,256));return{b:e(),g:e(),r:e()}}function Ce(t,e,i){const s=i??1;return xe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Oe(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Oe(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function De(t,e,i){const s=i??1;return xe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return Oe(Ie(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Re(t,e,i){if(i===d)return Se();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return function(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ie(t)),"r"in a||(a=Ie(e)),{b:q(n.b,a.b,i,s),g:q(n.g,a.g,i,s),r:q(n.r,a.r,i,s)}}(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ie(t)}}}function Te(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Le(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:v},s:{enable:!1,value:t.s,min:0,max:m},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Ee(s.h,e.h,i),Ee(s.s,e.s,i),Ee(s.l,e.l,i)),s}function Ee(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=H(e.speed)/s*i,t.decay=1-H(e.decay),t.status=Q.increasing,t.loops=0,t.maxLoops=H(e.count),t.time=0,t.delayTime=H(e.delay)*a,e.sync||(t.velocity*=A(),t.value*=A()),t.initialValue=t.value,t.offset=W(e.offset)):t.velocity=0}function Ae(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?V(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==Q.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=Q.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Q.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=U(t.value,r,o)}function Fe(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ae(i,!1,e),Ae(s,!0,e),Ae(n,!0,e)}const Ue=new Mt;class qe{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:p};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=C(s)?{min:N(s.min),max:N(s.max)}:{min:0,max:N(s)}}}async function Ve(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new qe))})}var He;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(He||(He={}));const $e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Be=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class We{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace($e,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Be.exec(e);return i?{a:i[He.a]?Number.parseInt(i[He.a],16)/255:1,b:Number.parseInt(i[He.b]??"0",16),g:Number.parseInt(i[He.g]??"0",16),r:Number.parseInt(i[He.r]??"0",16)}:void 0}}async function Ge(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new We)})}var je;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(je||(je={}));const Ne=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ze{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ie(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ie({h:H(e.h),l:H(e.l),s:H(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ne.exec(t);return e?function(t){const e=Ie(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[je.a]):1,h:Number.parseInt(e[je.h]??"0",10),l:Number.parseInt(e[je.l]??"0",10),s:Number.parseInt(e[je.s]??"0",10)}):void 0}}async function Xe(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ze)})}class Ye{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return rs});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Qe(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,_t(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ye(t.pluginManager))})}class Je{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=ht(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=H(i.speed)/s*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&ut(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Ke(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Je(t)))})}class ti{container;modes;_particleBouncePlugins;constructor(t){this.container=t,this.modes=[St.bounce,St.split],this._particleBouncePlugins=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let a=!1;for(const s of this._particleBouncePlugins)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,c=t.getRadius(),l=ot(o,c),h=n.canvas.size;!function(t){if(t.outMode!==St.bounce&&t.outMode!==St.split||t.direction!==K.left&&t.direction!==K.right)return;t.bounds.right<0&&t.direction===K.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===K.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===K.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===K.left&&t.bounds.left<=0&&e<0){const e=H(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===K.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===K.left&&(t.particle.position.x=s),t.outMode===St.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,size:c}),function(t){if(t.outMode!==St.bounce&&t.outMode!==St.split||t.direction!==K.bottom&&t.direction!==K.top)return;t.bounds.bottom<0&&t.direction===K.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===K.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===K.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===K.top&&t.bounds.top<=0&&e<0){const e=H(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===K.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===K.top&&(t.particle.position.y=s),t.outMode===St.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,size:c})}}class ei{container;modes;constructor(t){this.container=t,this.modes=[St.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case Dt.normal:case Dt.outside:if(at(t.position,n.canvas.size,o,t.getRadius(),e))return;break;case Dt.inside:{const{dx:e,dy:i}=G(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}class ii{container;modes;constructor(t){this.container=t,this.modes=[St.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===K.left||e===K.right))??(t.options.move.distance.vertical&&(e===K.top||e===K.bottom)))return;const n=t.options.move.gravity,a=this.container,r=a.canvas.size,c=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+c&&e===K.bottom||n.inverse&&i.y<-c&&e===K.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=r.width+c||t.velocity.x<0&&t.position.x>=-c)return;at(t.position,a.canvas.size,o,c,e)||t.destroy()}}}const si=z.origin;class ni{container;modes;constructor(t){this.container=t,this.modes=[St.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case Dt.inside:{const{x:e,y:i}=t.velocity;si.setTo(o),si.length=t.moveCenter.radius,si.angle=t.velocity.angle+Math.PI,si.addTo(t.moveCenter);const{dx:s,dy:a}=G(t.position,si);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(V({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(V({min:0,max:n.canvas.size.height}));const{dx:r,dy:c}=G(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(at(t.position,n.canvas.size,o,t.getRadius(),e))return;switch(t.outType){case Dt.outside:{t.position.x=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=G(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Dt.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=ot(t.position,o);e===K.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=A()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===K.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=A()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===K.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=A()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===K.top&&r.bottom<-t.offset.y&&(i||(t.position.x=A()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,St.bounce,t=>new ti(t)),this._addUpdaterIfMissing(t,St.out,t=>new ni(t)),this._addUpdaterIfMissing(t,St.destroy,t=>new ei(t)),this._addUpdaterIfMissing(t,St.none,t=>new ii(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this._updateOutMode(t,e,i.bottom??i.default,K.bottom),this._updateOutMode(t,e,i.left??i.default,K.left),this._updateOutMode(t,e,i.right??i.default,K.right),this._updateOutMode(t,e,i.top??i.default,K.top)}_addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function oi(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ai(t)))})}class ri{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=lt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=H(o.opacity),t.fillAnimation=i.animation;const s=ke(this._pluginManager,i);s&&(t.fillColor=Le(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),r.color);t.strokeWidth=H(r.width)*e.retina.pixelRatio,t.strokeOpacity=H(r.opacity??1),t.strokeAnimation=i.animation;const s=ke(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=Le(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Fe(t.fillColor,e),Fe(t.strokeColor,e))}}async function ci(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ri(t.pluginManager,e)))})}var li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(li||(li={}));const hi=/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;class di{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:H(e.r),g:H(e.g),b:H(e.b)}}parseString(t){if(!this.accepts(t))return;const e=hi.exec(t);return e?{a:e.length>4?X(e[li.a]):1,b:parseInt(e[li.b]??"0",10),g:parseInt(e[li.g]??"0",10),r:parseInt(e[li.r]??"0",10)}:void 0}}async function ui(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi{_container;constructor(t){this._container=t}init(t){const e=this._container,i=t.options.size.animation;i.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,i.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&ut(t,t.size,0,t.options.size.animation.destroy,e)}}async function gi(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new pi(t)))})}async function fi(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(async t=>{await Promise.all([Ge(t),Xe(t),ui(t),Qe(t),Ve(t),ci(t),Ke(t),oi(t),gi(t)])})}class _i{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var yi,vi,mi;!function(t){t.circle="circle",t.rectangle="rectangle"}(yi||(yi={}));class wi{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=yi.circle}load(t){D(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class bi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class Pi{onClick;onDiv;onHover;constructor(){this.onClick=new _i,this.onDiv=new wi,this.onHover=new bi}load(t){if(D(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=ct(e,t=>{const e=new wi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(vi||(vi={}));class xi{_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}load(t){if(D(t))return;if(!this._container)return;const e=this._pluginManager.interactors?.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class Mi{detectsOn;events;modes;constructor(t,e){this.detectsOn=vi.window,this.events=new Pi,this.modes=new xi(t,e)}load(t){if(D(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class zi{id="interactivity";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(this._pluginManager,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Mi(this._pluginManager,t)),s.load(i?.interactivity);const n=this._pluginManager.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=rt({},i.interactivity));const s=this._pluginManager.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(mi||(mi={}));class ki{type=mi.particles;container;constructor(t){this.container=t}}const Ii="pointerdown",Si="pointerup",Ci="pointerleave",Oi="pointermove",Di="touchstart",Ri="touchend",Ti="touchmove",Li="touchcancel";class Ei extends Lt{canvasSize;constructor(t,e,i,s){super(t,e,i),this.canvasSize=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.canvasSize,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.canvasSize,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Lt)n=new Lt(i.x,i.y,t.radius);else{const e=t;n=new Et(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Ai{blur;color;enable;constructor(){this.blur=5,this.color=new Vt,this.color.value="#000",this.enable=!1}load(t){D(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=Vt.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Fi{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(t){D(t)||(void 0!==t.color&&(this.color=Vt.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Ui{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new Vt,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Ai,this.triangles=new Fi,this.width=1,this.warp=!1}load(t){D(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=Vt.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}function qi(t,e,i){const{dx:s,dy:n}=G(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class Vi extends ki{_maxDistance;_pluginManager;constructor(t,e){super(e),this._pluginManager=t,this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this._maxDistance&&(this._maxDistance=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<o.x||e.y<o.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,r=t.retina.linksDistance??0,c=n.warp,l=c?new Ei(e.x,e.y,r,s):new Lt(e.x,e.y,r),h=i.particles.grid.query(l);for(const i of h){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const h=i.getPosition();if(h.x<o.x||h.y<o.y||h.x>s.width||h.y>s.height)continue;const d=G(e,h).distance,u=c&&l.warp?qi(e,h,s):d,p=Math.min(d,u);if(p>r)continue;const g=(1-p/r)*a;this._setColor(t),t.links.push({destination:i,opacity:g,color:this._getLinkColor(t,i),isWarped:u<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links??=new Ui;for(const i of e)t.links.load(i?.links)}reset(){}_getLinkColor(t,e){const i=this.container,s=t.options.links;if(!s)return;return Re(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}_setColor(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=function(t,e,i,s){const n=I(e)?e:e.value;return n===d?s?Me(t,{value:n}):i?d:u:n===u?u:Me(t,{value:n})}(this._pluginManager,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Hi{id="links";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return us});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function $i(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{const e=t.pluginManager;!function(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}(t),e.addPlugin(new Hi(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Vi(e,t)))})}const Bi={background:{color:"#000000"},particles:{number:{value:100},links:{distance:150,enable:!0},move:{enable:!0},paint:{fill:{color:{value:"#ffffff"}}},size:{value:1},shape:{type:"circle"}}};async function Wi(t){await t.pluginManager.register(async t=>{await Promise.all([fi(t),(async()=>{await async function(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new zi(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,ft(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await $i(t)})()]),t.pluginManager.addPreset("links",Bi)})}const Gi=globalThis;Gi.__tsParticlesInternals=Gi.__tsParticlesInternals??{},Gi.loadLinksPreset=Wi;function ji(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Ni{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{we(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,g=this._reusableColorStyles,f=a?De(a,r.hdr,h*d):void 0,_=o?De(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=_,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,g,p),function(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(c),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const _={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(_);const y=s.effect?l.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(y,_),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(v,_),function(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}(v,_),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(v,_),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(y,_),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:d,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)be(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{!function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(o.x,o.y,e.width,e.height)}(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{!function(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,o.x,o.y,e.width,e.height),t.globalAlpha=n}(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation="source-over")}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{we(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)ji(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=ke(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ke(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}function Zi(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Xi{element;render;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new Ni(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*n/t,y:i*n/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.element;if(!i)return;const s=i.style,n=Me(this._pluginManager,e.color);s.backgroundColor=n?Ce(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this._container;this._generated=e in t.dataset?"true"===t.dataset[e]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=function(t){const e=it().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(this.element.style);const s=this._standardSize;s.height=t.offsetHeight,s.width=t.offsetWidth;const n=this._container.retina.pixelRatio,a=this.size;t.height=a.height=s.height*n,t.width=a.width=s.width*n;const o=st("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:o?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(this.element.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})}resize(){if(!this.element)return!1;const t=this._container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...e};e.height=i.height,e.width=i.width;const o=this.size;return this.element.width=o.width=n.width,this.element.height=o.height=n.height,this._container.started&&t.particles.setResizeFactor({width:e.width/a.width,height:e.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.element||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.element,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};_repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&Zi(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.element;t&&Zi(t,pt(this._container.actualOptions.fullScreen.zIndex),!0)}}class Yi{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(it().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*a)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),gt(document,i,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void gt(globalThis,"resize",e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this._handleWindowResize()}),this._resizeObserver.observe(s))}}function Qi(t){if(e=t.outMode,i=t.checkModes,!(e===i||O(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}class Ji{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this._container,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this._container.dispatchEvent(vt.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??Te(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??H(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??Te(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??r),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??l,this._cachedTransform.d=e.cos*(t.d??h),this._cachedTransform}init(t,e,i,s){const n=this._container;this.id=t,this.group=s,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=Dt.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,o=n.actualOptions,r=ve(this._pluginManager,n,o.particles),c=r.reduceDuplicates,l=r.effect.type,h=r.shape.type;this.effect=lt(l,this.id,c),this.shape=lt(h,this.id,c);const u=r.effect,p=r.shape;if(i){if(i.effect?.type){const t=lt(i.effect.type,this.id,c);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=lt(i.shape.type,this.id,c);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===d){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===d){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return rt({close:e.close},lt(n,i,s))}(this.effect,u,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return rt({close:e.close},lt(n,i,s))}(this.shape,p,this.id,c):void 0,r.load(i);const g=this.effectData;g&&r.load(g.particles);const f=this.shapeData;f&&r.load(f.particles),this.effectClose=g?.close??r.effect.close,this.shapeClose=f?.close??r.shape.close,this.options=r,n.retina.initParticle(this),this.size=ht(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy();let _,y;n.particles.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(_=n.effectDrawers.get(this.effect)),_?.loadEffect&&_.loadEffect(this),this.shape&&(y=n.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of n.particleUpdaters)t.init(this);_?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%p,i=e<0?e+p:e;return i>=Math.PI*n&&i<3*Math.PI*n}if(this.roll.horizontal){const e=(t+Math.PI*n)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size,l=new AbortController,{signal:h}=l;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=Z({size:c,position:s}),l=M.create(t.x,t.y,e);this._fixHorizontal(l,r,o.left??o.default),this._fixHorizontal(l,r,o.right??o.default),this._fixVertical(l,r,o.top??o.default),this._fixVertical(l,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,s=void 0}return s};_calculateVelocity=()=>{const t=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy(),e=this.options.move;if(e.direction===P.inside||e.direction===P.outside)return t;const i=N(H(e.angle.value)),s=N(H(e.angle.offset)),a={left:s-i*n,right:s+i*n};return e.straight||(t.angle+=V(W(a.left,a.right))),e.random&&"number"==typeof e.speed&&(t.length*=A()),t};_fixHorizontal=(t,e,i)=>{Qi({outMode:i,checkModes:[St.bounce],coord:t.x,maxCoord:this._container.canvas.size.width,setCb:e=>t.x+=e,radius:e})};_fixVertical=(t,e,i)=>{Qi({outMode:i,checkModes:[St.bounce],coord:t.y,maxCoord:this._container.canvas.size.height,setCb:e=>t.y+=e,radius:e})};_getRollColor=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Ct.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t;_initPosition=t=>{const e=this._container,i=H(this.options.zIndex.value),s=this._calcPosition(t,U(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...dt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return N(t);switch(t){case P.top:return-Math.PI*n;case P.topRight:return-Math.PI*b;case P.right:return 0;case P.bottomRight:return Math.PI*b;case P.bottom:return Math.PI*n;case P.bottomLeft:return.75*Math.PI;case P.left:return Math.PI;case P.topLeft:return.75*-Math.PI;case P.inside:return Math.atan2(i.y-e.y,i.x-e.x);case P.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return A()*p}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case P.inside:this.outType=Dt.inside;break;case P.outside:this.outType=Dt.outside}this.offset=z.origin}}class Ki{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Lt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Et(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof Lt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Et){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class ts{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_maxZIndex;_minZIndex;_needsSort;_nextId;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zArray;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._minZIndex=0,this._maxZIndex=0,this.grid=new Ki(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,a=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,o=this.count;if(a>0)switch(n){case It.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case It.wait:if(o>=a)return}try{const n=this._pool.pop()??new Ji(this._pluginManager,this._container);n.init(this._nextId,t,e,i);let a=!0;return s&&(a=s(n)),a?(this._array.push(n),this._zArray.push(n),this._nextId++,this._container.dispatchEvent(vt.particleAdded,{particle:n}),n):void this._pool.push(n)}catch(t){Pt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._pool.length=0,this._zArray=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this._minZIndex=0,this._maxZIndex=0,this._needsSort=!1,this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this.grid=new Ki(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=ve(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setLastZIndex(t){this._needsSort||=t>=this._maxZIndex||t>this._minZIndex&&t<this._maxZIndex}setResizeFactor(t){this._resizeFactor=t}update(t){const e=new Set;this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const i=this._resizeFactor;for(const s of this._array){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}for(const e of this._postUpdatePlugins)e.postUpdate?.(t);for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(i.destroyed||i.spawning)i.destroyed&&e.add(i);else for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t)}if(e.size)for(const t of e)this.remove(t);if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort((t,e)=>e.position.z-t.position.z||t.id-e.id);const e=t[0],i=t[t.length-1];if(!e||!i)return;this._maxZIndex=e.position.z,this._minZIndex=i.position.z,this._needsSort=!1}}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this._limit=n.limit.value*a:this._groupLimits.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)};_initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)};_removeParticle=(t,e,i)=>{const s=this._array[t];if(!s)return!1;if(s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(n,1),s.destroy(i),this._container.dispatchEvent(vt.particleRemoved,{particle:s}),this._addToPool(s),!0}}class es{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=H(s.gravity.maxSpeed)*i,a.moveDrift=H(s.drift)*i,a.moveSpeed=H(s.speed)*i,a.sizeAnimationSpeed=H(e.size.animation.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function is(t){return!t.destroyed}function ss(t,e,...i){const s=new me(t,e);return ye(s,...i),s}var ns=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this._pluginManager=i,this._dispatchCallback=e,this._onDestroy=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,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._sourceOptions=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new es(this),this.canvas=new Xi(this._pluginManager,this),this.particles=new ts(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=ss(this._pluginManager,this),this.actualOptions=ss(this._pluginManager,this),this._eventListeners=new Yi(this),this.dispatchEvent(vt.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&is(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(t=!0){if(is(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(t),this.dispatchEvent(vt.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!is(this))return;let e=t;this._drawAnimationFrame=L(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}Pt().error(`Export plugin with type ${t} not found`)}async init(){if(!is(this))return;const t=new Map;for(const e of this._pluginManager.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this._options=ss(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=ss(this._pluginManager,this,this._options),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,hdr:n,smooth:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this._duration=H(i)*a,this._delay=H(e)*a,this._lifeTime=0,this.fpsLimit=s>0?s:120,this._smooth=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(vt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(vt.particlesSetup)}async initDrawersAndUpdaters(){const t=this._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(is(this)&&(void 0!==this._drawAnimationFrame&&(t=this._drawAnimationFrame,E(t),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(vt.containerPaused)}}play(t){if(!is(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(vt.containerPlay),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(is(this))return this.stop(),this.start()}async reset(t){if(is(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=ss(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=ss(this._pluginManager,this,this._options),this.refresh()}async start(){is(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(vt.containerStarted),this.play(),t()};this._delayTimeout=setTimeout(()=>{e()},this._delay)}))}stop(){if(is(this)&&this.started){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();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(vt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+a/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Pt().error("error in animation loop",t)}}}});function as(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=c*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function os(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(c=a,l=n,Math.sqrt(j(c,l))),r=H(i.acceleration);var c,l;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?kt.clockwise:kt.counterClockwise,angle:A()*p,radius:o,acceleration:e.retina.spinAcceleration}}var rs=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-H(e.decay),t.pathDelay=H(s.delay.value)*a,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:H(i.acceleration),inverse:i.inverse},os(this._container,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options,s=i.move;if(!s.enable)return;const a=this._container,o=a.retina.pixelRatio,r=function(t){return t.slow.inRange?t.slow.factor:1}(t),c=a.retina.reduceFactor,l=t.retina.moveSpeed,h=t.retina.moveDrift,d=B(i.size.value)*o,u=l*(s.size?t.getRadius()/d:1)*r*(e.factor||1)*n,p=t.retina.maxSpeed;s.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===kt.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),c=r*n;e.spin.radius>c?(e.spin.radius=c,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(a,t,u,c):as(t,s,u,p,h,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&a>=c||l&&o>=l)&&!t.misplaced)t.misplaced=!!c&&a>c||!!l&&o>l,c&&(t.velocity.x=t.velocity.y*n-t.velocity.x),l&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!c||a<c)&&(!l||o<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(t)}preInit(){return this._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class cs{_canPush=!0;_clickPositionPlugins;_container;_handlers;_interactionManager;_touches;constructor(t,e){this._container=t,this._clickPositionPlugins=[],this._interactionManager=e,this._touches=new Map,this._handlers={mouseDown:()=>{this._mouseDown()},mouseLeave:()=>{this._mouseTouchFinish()},mouseMove:t=>{this._mouseTouchMove(t)},mouseUp:t=>{this._mouseTouchClick(t)},touchStart:t=>{this._touchStart(t)},touchMove:t=>{this._mouseTouchMove(t)},touchEnd:t=>{this._touchEnd(t)},touchCancel:t=>{this._touchEnd(t)},touchEndClick:t=>{this._touchEndClick(t)},visibilityChange:()=>{this._handleVisibilityChange()}}}addListeners(){this._manageListeners(!0)}init(){this._clickPositionPlugins.length=0;for(const t of this._container.plugins.filter(t=>!!t.clickPositionValid))this._clickPositionPlugins.push(t)}removeListeners(){this._manageListeners(!1)}_doMouseTouchClick=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions;if(this._canPush){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;ct(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this._mouseTouchFinish()},500)};_handleVisibilityChange=()=>{this._mouseTouchFinish()};_manageInteractivityListeners=t=>{const e=this._handlers,i=this._container,s=this._interactionManager,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.element?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(gt(a,Oi,e.mouseMove,t),gt(a,Di,e.touchStart,t),gt(a,Ti,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(gt(a,Ri,e.touchEndClick,t),gt(a,Si,e.mouseUp,t),gt(a,Ii,e.mouseDown,t)):gt(a,Ri,e.touchEnd,t):(gt(a,Ri,e.touchEndClick,t),gt(a,Si,e.mouseUp,t),gt(a,Ii,e.mouseDown,t),gt(a,Ri,e.touchEnd,t)),gt(a,Ci,e.mouseLeave,t),gt(a,Li,e.touchCancel,t))};_manageListeners=t=>{const e=this._handlers,s=this._container,n=this._interactionManager,a=s.actualOptions,o=a.interactivity?.detectsOn,r=s.canvas.element;o===vi.window?n.interactivityData.element=it():o===vi.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this._manageInteractivityListeners(t),gt(document,i,e.visibilityChange,t,!1)};_mouseDown=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position};_mouseTouchClick=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this._clickPositionPlugins)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this._doMouseTouchClick(t),n.clicking=!1}};_mouseTouchFinish=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Ci,e.inside=!1,e.clicking=!1};_mouseTouchMove=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,n=i.interactivityData,a=e.canvas.element;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(n.element===it()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===vi.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this._canPush="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=Oi};_touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()};_touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)};_touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)}}class ls{container;interactivityData;_clickHandlers;_eventListeners;_externalInteractors;_interactors;_intersectionObserver;_particleInteractors;_pluginManager;constructor(t,e){this.container=e,this._pluginManager=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[],this._clickHandlers=new Map,this._eventListeners=new cs(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this._intersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this._intersectionManager(t)})}addClickHandler(t){const{container:e,interactivityData:i}=this;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this._clickHandlers.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this._clickHandlers.set(Di,()=>{e.destroyed||(a=!0,o=!1)}),this._clickHandlers.set(Ti,()=>{e.destroyed||(o=!0)}),this._clickHandlers.set(Ri,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.element,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this._clickHandlers.set(Li,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this._clickHandlers)s.addEventListener(t,e)}addListeners(){this._eventListeners.addListeners()}clearClickHandlers(){const{container:t,interactivityData:e}=this;if(!t.destroyed){for(const[t,i]of this._clickHandlers)e.element?.removeEventListener(t,i);this._clickHandlers.clear()}}externalInteract(t){for(const e of this._externalInteractors){const{interactivityData:i}=this;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.container.destroyed)return;const{interactivityData:e}=this;for(const i of this._externalInteractors)i.handleClickMode?.(t,e)}init(){this._eventListeners.init();for(const t of this._interactors){switch(t.type){case mi.external:this._externalInteractors.push(t);break;case mi.particles:this._particleInteractors.push(t)}t.init()}}async initInteractors(){const t=await(this._pluginManager.getInteractors?.(this.container,!0));t&&(this._interactors=t,this._externalInteractors=[],this._particleInteractors=[])}particlesInteract(t,e){const{interactivityData:i}=this;for(const i of this._externalInteractors)i.clear(t,e);for(const s of this._particleInteractors)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this._eventListeners.removeListeners()}reset(t){const{interactivityData:e}=this;for(const i of this._externalInteractors)i.isEnabled(e)&&i.reset(e,t);for(const i of this._particleInteractors)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(t.element)}stopObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this._interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.container;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}_intersectionManager=t=>{const{container:e}=this;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var hs=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t,this.interactionManager=new ls(t,e),this._container.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this._pluginManager.interactors?.delete(this._container)}particleCreated(t){const e=t,i=new Mi(this._pluginManager,this._container);i.load(this._container.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});function ds(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=A(),e.set(i,n)),n}var us=Object.freeze({__proto__:null,LinkInstance:class{_colorCache=new Map;_container;_freqs;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const a=s.links,r=e.retina.linksWidth??0,c=e.getPosition(),l=e.options.twinkle?.links,h=a.triangles.enable,d=h?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,_=!1;const y=()=>{_&&(t.stroke(),_=!1)};for(const u of i){if(a.frequency<1&&this._getLinkFrequency(e,u.destination)>a.frequency)continue;const i=u.destination.getPosition();if(h&&!u.isWarped&&d&&(y(),this._drawTriangles(s,e,u,d,c,i,t)),u.opacity<=0||r<=0)continue;if(!a.enable)continue;let v=u.opacity,m=u.color;const w=l?.enable&&A()<l.frequency?Me(this._pluginManager,l.color):void 0;if(l&&w&&(m=w,v=H(l.opacity)),!m){const t=void 0!==a.id?this._container.particles.linksColors.get(a.id):this._container.particles.linksColor;m=Re(e,u.destination,t)}if(!m)continue;const b=this._getCachedStyle(m);if(b===p&&r===g&&v===f||(y(),t.strokeStyle=b,t.lineWidth=r,t.globalAlpha=v,p=b,g=r,f=v,t.beginPath(),_=!0),u.isWarped){const e=this._container.canvas.size,s=i.x-c.x,a=i.y-c.y;let r=o.x,l=o.y;Math.abs(s)>e.width*n&&(r=s>0?-e.width:e.width),Math.abs(a)>e.height*n&&(l=a>0?-e.height:e.height),t.moveTo(c.x,c.y),t.lineTo(i.x+r,i.y+l),t.moveTo(c.x-r,c.y-l),t.lineTo(i.x,i.y)}else t.moveTo(c.x,c.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this._freqs.links.clear(),this._freqs.triangles.clear(),this._colorCache.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this._container.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}_drawTriangles(t,e,i,s,a,o,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const h=c.links;if(h?.length)for(const d of h){if(d.isWarped||this._getLinkFrequency(c,d.destination)>c.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this._getTriangleFrequency(e,c,h)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+d.opacity)*n,p=Me(this._pluginManager,l.color)??i.color;if(!p||u<=0)continue;const g=h.getPosition();r.save(),r.fillStyle=this._getCachedStyle(p),r.globalAlpha=u,r.beginPath(),r.moveTo(a.x,a.y),r.lineTo(o.x,o.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}_getCachedStyle(t){const e=`${t.r},${t.g},${t.b}`;let i=this._colorCache.get(e);return i||(i=Ce(t,this._container.hdr),this._colorCache.set(e,i)),i}_getLinkFrequency(t,e){return ds([t,e],this._freqs.links)}_getTriangleFrequency(t,e,i){return ds([t,e,i],this._freqs.triangles)}}});t.loadLinksPreset=Wi,t.tsParticles=Ue}),Object.assign(globalThis.window||globalThis,{loadLinksPreset:(globalThis.__tsParticlesInternals.presets.links||{}).loadLinksPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Preset v4.0.0-beta.
|
|
2
|
+
/* Preset v4.0.0-beta.16 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/plugin-interactivity'), require('@tsparticles/interaction-particles-links')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/plugin-interactivity', '@tsparticles/interaction-particles-links'], factory) :
|