@tsparticles/preset-big-circles 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/preset-big-circles",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "tsParticles big circles preset",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"./package.json": "./package.json"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@tsparticles/basic": "4.1.
|
|
109
|
-
"@tsparticles/engine": "4.1.
|
|
108
|
+
"@tsparticles/basic": "4.1.1",
|
|
109
|
+
"@tsparticles/engine": "4.1.1"
|
|
110
110
|
},
|
|
111
111
|
"publishConfig": {
|
|
112
112
|
"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.1.
|
|
2
|
+
/* Preset v4.1.1 */
|
|
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) :
|
|
@@ -996,7 +996,7 @@
|
|
|
996
996
|
return this.#domArray;
|
|
997
997
|
}
|
|
998
998
|
get version() {
|
|
999
|
-
return "4.1.
|
|
999
|
+
return "4.1.1";
|
|
1000
1000
|
}
|
|
1001
1001
|
addEventListener(type, listener) {
|
|
1002
1002
|
this.#eventDispatcher.addEventListener(type, listener);
|
|
@@ -2789,7 +2789,7 @@
|
|
|
2789
2789
|
}
|
|
2790
2790
|
|
|
2791
2791
|
async function loadBlendPlugin(engine) {
|
|
2792
|
-
engine.checkVersion("4.1.
|
|
2792
|
+
engine.checkVersion("4.1.1");
|
|
2793
2793
|
await engine.pluginManager.register(e => {
|
|
2794
2794
|
e.pluginManager.addPlugin(new BlendPlugin());
|
|
2795
2795
|
});
|
|
@@ -2826,7 +2826,7 @@
|
|
|
2826
2826
|
}
|
|
2827
2827
|
|
|
2828
2828
|
async function loadCircleShape(engine) {
|
|
2829
|
-
engine.checkVersion("4.1.
|
|
2829
|
+
engine.checkVersion("4.1.1");
|
|
2830
2830
|
await engine.pluginManager.register(e => {
|
|
2831
2831
|
e.pluginManager.addShape(["circle"], () => {
|
|
2832
2832
|
return Promise.resolve(new CircleDrawer());
|
|
@@ -2874,7 +2874,7 @@
|
|
|
2874
2874
|
}
|
|
2875
2875
|
|
|
2876
2876
|
async function loadHexColorPlugin(engine) {
|
|
2877
|
-
engine.checkVersion("4.1.
|
|
2877
|
+
engine.checkVersion("4.1.1");
|
|
2878
2878
|
await engine.pluginManager.register(e => {
|
|
2879
2879
|
e.pluginManager.addColorManager("hex", new HexColorManager());
|
|
2880
2880
|
});
|
|
@@ -2927,7 +2927,7 @@
|
|
|
2927
2927
|
}
|
|
2928
2928
|
|
|
2929
2929
|
async function loadHslColorPlugin(engine) {
|
|
2930
|
-
engine.checkVersion("4.1.
|
|
2930
|
+
engine.checkVersion("4.1.1");
|
|
2931
2931
|
await engine.pluginManager.register(e => {
|
|
2932
2932
|
e.pluginManager.addColorManager("hsl", new HslColorManager());
|
|
2933
2933
|
});
|
|
@@ -2951,7 +2951,7 @@
|
|
|
2951
2951
|
}
|
|
2952
2952
|
|
|
2953
2953
|
async function loadMovePlugin(engine) {
|
|
2954
|
-
engine.checkVersion("4.1.
|
|
2954
|
+
engine.checkVersion("4.1.1");
|
|
2955
2955
|
await engine.pluginManager.register(e => {
|
|
2956
2956
|
const moveEngine = e, movePluginManager = moveEngine.pluginManager;
|
|
2957
2957
|
movePluginManager.initializers.pathGenerators ??= new Map();
|
|
@@ -3058,7 +3058,7 @@
|
|
|
3058
3058
|
}
|
|
3059
3059
|
|
|
3060
3060
|
async function loadOpacityUpdater(engine) {
|
|
3061
|
-
engine.checkVersion("4.1.
|
|
3061
|
+
engine.checkVersion("4.1.1");
|
|
3062
3062
|
await engine.pluginManager.register(e => {
|
|
3063
3063
|
e.pluginManager.addParticleUpdater("opacity", container => {
|
|
3064
3064
|
return Promise.resolve(new OpacityUpdater(container));
|
|
@@ -3405,7 +3405,7 @@
|
|
|
3405
3405
|
}
|
|
3406
3406
|
|
|
3407
3407
|
async function loadOutModesUpdater(engine) {
|
|
3408
|
-
engine.checkVersion("4.1.
|
|
3408
|
+
engine.checkVersion("4.1.1");
|
|
3409
3409
|
await engine.pluginManager.register(e => {
|
|
3410
3410
|
e.pluginManager.addParticleUpdater("outModes", container => {
|
|
3411
3411
|
return Promise.resolve(new OutOfCanvasUpdater(container));
|
|
@@ -3476,7 +3476,7 @@
|
|
|
3476
3476
|
}
|
|
3477
3477
|
|
|
3478
3478
|
async function loadPaintUpdater(engine) {
|
|
3479
|
-
engine.checkVersion("4.1.
|
|
3479
|
+
engine.checkVersion("4.1.1");
|
|
3480
3480
|
await engine.pluginManager.register(e => {
|
|
3481
3481
|
e.pluginManager.addParticleUpdater("paint", container => {
|
|
3482
3482
|
return Promise.resolve(new PaintUpdater(e.pluginManager, container));
|
|
@@ -3531,7 +3531,7 @@
|
|
|
3531
3531
|
}
|
|
3532
3532
|
|
|
3533
3533
|
async function loadRgbColorPlugin(engine) {
|
|
3534
|
-
engine.checkVersion("4.1.
|
|
3534
|
+
engine.checkVersion("4.1.1");
|
|
3535
3535
|
await engine.pluginManager.register(e => {
|
|
3536
3536
|
e.pluginManager.addColorManager("rgb", new RgbColorManager());
|
|
3537
3537
|
});
|
|
@@ -3630,7 +3630,7 @@
|
|
|
3630
3630
|
}
|
|
3631
3631
|
|
|
3632
3632
|
async function loadSizeUpdater(engine) {
|
|
3633
|
-
engine.checkVersion("4.1.
|
|
3633
|
+
engine.checkVersion("4.1.1");
|
|
3634
3634
|
await engine.pluginManager.register(e => {
|
|
3635
3635
|
e.pluginManager.addParticleUpdater("size", container => {
|
|
3636
3636
|
return Promise.resolve(new SizeUpdater(container));
|
|
@@ -3639,7 +3639,7 @@
|
|
|
3639
3639
|
}
|
|
3640
3640
|
|
|
3641
3641
|
async function loadBasic(engine) {
|
|
3642
|
-
engine.checkVersion("4.1.
|
|
3642
|
+
engine.checkVersion("4.1.1");
|
|
3643
3643
|
await engine.pluginManager.register(async (e) => {
|
|
3644
3644
|
await Promise.all([
|
|
3645
3645
|
loadBlendPlugin(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.bigCircles=t.__tsParticlesInternals.presets.bigCircles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",y=255,v=360,m=100,P=100,w=.25;var b;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"}(b||(b={}));class z{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 z.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??o.y,i??o.z):new z(t.x,t.y,x(t))}add(t){return z.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 z.clone(this)}div(t){return z.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 z.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 z.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 z.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)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends z{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return M.create(o.x,o.y)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??o.y):new M(t.x,t.y)}}function I(t){return"boolean"==typeof t}function C(t){return"string"==typeof t}function S(t){return"number"==typeof t}function k(t){return"object"==typeof t&&null!==t}function O(t){return Array.isArray(t)}function _(t){return null==t}const D=Math.PI/180;let F=Math.random;const R=t=>requestAnimationFrame(t),E=t=>{cancelAnimationFrame(t)};function T(){return B(F(),0,1-Number.EPSILON)}function L(t,e){return T()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function A(t){const e=$(t);let i=V(t);return e===i&&(i=0),L(i,e)}function U(t){return S(t)?t:A(t)}function V(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function q(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function j(t){return t*D}function H(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function N(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Q,X,Y,J,K,Z;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Q||(Q={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(X||(X={})),function(t){t.none="none",t.max="max",t.min="min"}(Y||(Y={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(J||(J={})),function(t){t.precise="precise",t.percent="percent"}(K||(K={})),function(t){t.max="max",t.min="min",t.random="random"}(Z||(Z={}));function tt(){return globalThis.document}function et(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function it(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(T()*t.length)}(t)]}function st(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==J.bottom||(n=t.top<e.height+i.x);!n||s&&s!==J.left||(n=t.right>i.x);!n||s&&s!==J.right||(n=t.left<e.width+i.y);!n||s&&s!==J.top||(n=t.bottom>i.y);return n}(nt(t,s??0),e,i,n)}function nt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function at(t,...e){for(const i of e){if(_(i))continue;if(!k(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):k(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 k(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=>at(void 0,t)):at(e[n],a)}}return t}function ot(t,e){return O(t)?t.map((t,i)=>e(t,i)):e(t,0)}function rt(t,e,i){return O(t)?it(t,e,i):t}function lt(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:$(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Q.increase:o.status=X.increasing;break;case Q.decrease:o.status=X.decreasing;break;case Q.random:o.status=T()>=n?X.increasing:X.decreasing}const t=s.mode===Q.auto;switch(s.startValue){case Z.min:o.value=o.min,t&&(o.status=X.increasing);break;case Z.max:o.value=o.max,t&&(o.status=X.decreasing);break;case Z.random:default:o.value=A(o),t&&(o.status=T()>=n?X.increasing:X.decreasing)}}return o.initialValue=o.value,o}function ct(t,e){return function(t,e){if(t.mode!==K.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 ht(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,l=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 X.increasing:e.value+=a;break;case X.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case X.increasing:e.value>=r&&(e.status=X.decreasing,e.loops??=0,e.loops++);break;case X.decreasing:e.value<=o&&(e.status=X.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Y.max:i>=n&&t.destroy();break;case Y.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=B(e.value,o,r))}}const dt=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=tt().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 ut(t,e,i,s,n){if(s){let s={passive:!0};I(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 pt(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 ft{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var gt;!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"}(gt||(gt={}));class yt{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;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(gt.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 pt(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 pt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(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}(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const vt=t=>(...e)=>{t(...e)},mt={debug:vt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:vt(console.info),log:vt(console.log),trace:vt(console.trace),verbose:vt(console.log),warning:vt(console.warn)};function Pt(){return mt}const wt="100%";class bt{pluginManager=new yt(this);#h=[];#d=new ft;#o=!1;get items(){return this.#h}get version(){return"4.1.0"}addEventListener(t,e){this.#d.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.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return _i}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=rt(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:o,index:a}):t.options,l=rt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=tt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=wt,s.style.height||=wt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=wt,s.style.height||=wt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=tt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var xt,zt,Mt,It,Ct,St,kt,Ot;!function(t){t.circle="circle",t.rectangle="rectangle"}(xt||(xt={}));class _t{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 Dt extends _t{radius;constructor(t,e,i){super(t,e,xt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,q(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 Dt||t.type===xt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ft||t.type===xt.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 Ft extends _t{size;constructor(t,e,i,s){super(t,e,xt.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 Dt)return t.intersects(this);if(!(t instanceof Ft))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"}(zt||(zt={})),function(t){t.delete="delete",t.wait="wait"}(Mt||(Mt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(It||(It={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ct||(Ct={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(St||(St={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(kt||(kt={})),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"}(Ot||(Ot={}));class Rt{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){_(t)||(void 0!==t.count&&(this.count=G(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=G(t.speed)),void 0!==t.decay&&(this.decay=G(t.decay)),void 0!==t.delay&&(this.delay=G(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Et extends Rt{mode;startValue;constructor(){super(),this.mode=Q.auto,this.startValue=Z.random}load(t){super.load(t),_(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Tt extends Rt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),_(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=G(t.offset)))}}class Lt{h=new Tt(0,v);l=new Tt(0,P);s=new Tt(0,m);load(t){_(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Bt{value;constructor(){this.value=""}static create(t,e){const i=new Bt;return i.load(t),void 0!==e&&(C(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){_(t)||_(t.value)||(this.value=t.value)}}class At extends Bt{animation;constructor(){super(),this.animation=new Lt}static create(t,e){const i=new At;return i.load(t),void 0!==e&&(C(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Ut{color;image;opacity;position;repeat;size;constructor(){this.color=new Bt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){_(t)||(void 0!==t.color&&(this.color=Bt.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 Vt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){_(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class $t{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){_(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(_(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=at(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Wt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){_(t)||(void 0!==t.color&&(this.color=At.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class qt{offset;value;constructor(){this.offset=0,this.value=90}load(t){_(t)||(void 0!==t.offset&&(this.offset=G(t.offset)),void 0!==t.value&&(this.value=G(t.value)))}}class jt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=K.percent,this.radius=0}load(t){_(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 Ht{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){_(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=G(t.maxSpeed)))}}class Nt{value;constructor(){this.value=0}load(t){_(t)||_(t.value)||(this.value=G(t.value))}}class Qt extends Nt{animation=new Rt;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Xt extends Qt{animation;constructor(){super(),this.animation=new Et}load(t){super.load(t)}}class Yt{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Nt,this.enable=!1,this.options={}}load(t){_(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=at(this.options,t.options)))}}class Jt{bottom;default;left;right;top;constructor(){this.default=It.out}load(t){_(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 Kt{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){_(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=at({},t.position)))}}class Zt{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new qt,this.center=new jt,this.decay=0,this.distance={},this.direction=b.none,this.drift=0,this.enable=!1,this.gravity=new Ht,this.path=new Yt,this.outModes=new Jt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Kt,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(_(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=G(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=G(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(k(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=G(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 te{color;opacity;width;constructor(){this.width=0}load(t){_(t)||(void 0!==t.color&&(this.color=At.create(this.color,t.color)),void 0!==t.width&&(this.width=G(t.width)),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class ee{color;fill;stroke;load(t){_(t)||(void 0!==t.color&&(this.color=At.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new Wt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new te,this.stroke.load(t.stroke)))}}class ie extends Nt{constructor(){super(),this.value=1}}class se{horizontal;vertical;constructor(){this.horizontal=new ie,this.vertical=new ie}load(t){_(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class ne{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(_(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 ae{mode;value;constructor(){this.mode=Mt.delete,this.value=0}load(t){_(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class oe{density;limit;value;constructor(){this.density=new ne,this.limit=new ae,this.value=0}load(t){_(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class re{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(_(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=at(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class le extends Nt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),_(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 ce{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.bounce=new se,this.effect=new Gt,this.groups={},this.move=new Zt,this.number=new oe,this.paint=new ee,this.paint.color=new At,this.paint.color.value="#fff",this.paint.fill=new Wt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new re,this.zIndex=new le}load(t){if(_(t))return;if(t.palette&&(this.palette=t.palette,this.#f(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]=at(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);const e=t.paint;if(e&&(O(e)?this.paint=ot(e,t=>{const e=new ee;return e.load(t),e}):O(this.paint)?(this.paint=new ee,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f=t=>{const e=this.#p.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 he(t,...e){for(const i of e)t.load(i)}function de(t,e,...i){const s=new ce(t,e);return he(s,...i),s}class ue{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.autoPlay=!0,this.background=new Ut,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Vt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=de(this.#p,this.#u),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new $t,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(_(t))return;void 0!==t.preset&&(this.preset=t.preset,ot(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(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=G(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=G(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;I(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=at(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function pe(t,e){t.clearRect(o.x,o.y,e.width,e.height)}function fe(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const ge=new Map;function ye(t,e){let i=ge.get(t);if(!i){if(i=e(),ge.size>=1e3){[...ge.keys()].slice(0,500).forEach(t=>ge.delete(t))}ge.set(t,i)}return i}function ve(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return me(t,n.value,i,s);if(O(n.value)){const e=it(n.value,i,s);if(!e)return;return ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function me(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(L(t,e));return{b:i(),g:i(),r:i()}}():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=it(n.value,i,s);if(!e)return;return me(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Pe(t,e,i,s=!0){const a=ve(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*=P,r.s*=m,r.h*=60,r.h<0&&(r.h+=v);r.h>=v&&(r.h-=v);return r}(a):void 0}function we(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(m,t.s)),s=Math.max(0,Math.min(P,t.l)),a=e/v,o=i/m,r=s/P;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=(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},c=r<n?r*(1+o):r+o-r*o,h=2*r-c,d=1/3,u=Math.min(y,y*l(h,c,a+d)),p=Math.min(y,y*l(h,c,a)),f=Math.min(y,y*l(h,c,a-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function be(t,e,i){const s=i??1;return ye(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?xe(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function xe(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function ze(t,e,i){const s=i??1;return ye(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return xe(we(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Me(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ie(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:P}};return e&&(Ce(s.h,e.h,i),Ce(s.s,e.s,i),Ce(s.l,e.l,i)),s}function Ce(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=X.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function Se(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?A(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!==X.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=X.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=X.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=B(t.value,r,o)}function ke(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Se(i,!1,e),Se(s,!0,e),Se(n,!0,e)}const Oe=new bt;class _e{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){_(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class De{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Di});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new _e),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new _e,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Fe(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new De)})}class Re{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};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=k(s)?{min:j(s.min),max:j(s.max)}:{min:0,max:j(s)}}}async function Ee(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Re))})}var Te;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Te||(Te={}));const Le=/^#?([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 Ae{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Le,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Be.exec(e);return i?{a:i[Te.a]?Number.parseInt(i[Te.a],16)/255:1,b:Number.parseInt(i[Te.b]??"0",16),g:Number.parseInt(i[Te.g]??"0",16),r:Number.parseInt(i[Te.r]??"0",16)}:void 0}}async function Ue(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ae)})}var Ve;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ve||(Ve={}));const $e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ge{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 we(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return we({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=$e.exec(t);return e?function(t){const e=we(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?N(e[Ve.a]):1,h:Number.parseInt(e[Ve.h]??"0",10),l:Number.parseInt(e[Ve.l]??"0",10),s:Number.parseInt(e[Ve.s]??"0",10)}):void 0}}async function We(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ge)})}class qe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ei});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function je(t){t.checkVersion("4.1.0"),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,pt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new qe(t.pluginManager))})}class He extends Et{destroy;constructor(){super(),this.destroy=Y.none,this.speed=2}load(t){super.load(t),_(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ne extends Xt{animation;constructor(){super(),this.animation=new He,this.value=1}load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Qe{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=lt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=T()))}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))}loadOptions(t,...e){t.opacity??=new Ne;for(const i of e)t.opacity.load(i?.opacity)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&ht(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Xe(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Qe(t)))})}class Ye{modes;#u;#v;constructor(t){this.#u=t,this.modes=[It.bounce,It.split],this.#v=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#v)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=nt(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==It.bounce&&t.outMode!==It.split||t.direction!==J.left&&t.direction!==J.right)return;t.bounds.right<0&&t.direction===J.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===J.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===J.right&&e>0||t.direction===J.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===J.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===J.left&&(t.particle.position.x=s),t.outMode===It.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==It.bounce&&t.outMode!==It.split||t.direction!==J.bottom&&t.direction!==J.top)return;t.bounds.bottom<0&&t.direction===J.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===J.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===J.bottom&&e>0||t.direction===J.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===J.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===J.top&&(t.particle.position.y=s),t.outMode===It.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class Je{modes;constructor(t){this.modes=[It.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case kt.normal:case kt.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case kt.inside:{const{dx:e,dy:i}=W(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 Ke{modes;#u;constructor(t){this.#u=t,this.modes=[It.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===J.left||e===J.right))??(t.options.move.distance.vertical&&(e===J.top||e===J.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===J.bottom||n.inverse&&i.y<-l&&e===J.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;st(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const Ze=M.origin;class ti{modes;#u;constructor(t){this.#u=t,this.modes=[It.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case kt.inside:{const{x:e,y:i}=t.velocity;Ze.setTo(o),Ze.length=t.moveCenter.radius,Ze.angle=t.velocity.angle+Math.PI,Ze.addTo(t.moveCenter);const{dx:s,dy:a}=W(t.position,Ze);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(A({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(A({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=W(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case kt.outside:{t.position.x=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case kt.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=nt(t.position,o);e===J.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===J.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===J.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===J.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ei{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#m(t,It.bounce,t=>new Ye(t)),this.#m(t,It.out,t=>new ti(t)),this.#m(t,It.destroy,t=>new Je(t)),this.#m(t,It.none,t=>new Ke(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#P(t,e,i.bottom??i.default,J.bottom),this.#P(t,e,i.left??i.default,J.left),this.#P(t,e,i.right??i.default,J.right),this.#P(t,e,i.top??i.default,J.top)}#m=(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.#u))};#P=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ii(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ei(t)))})}class si{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=rt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=At.create(void 0===a?void 0:At.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=Pe(this.#p,i);s&&(t.fillColor=Ie(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=At.create(void 0===a?void 0:At.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=Pe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ie(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)&&(ke(t.fillColor,e),ke(t.strokeColor,e))}}async function ni(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new si(t.pluginManager,e)))})}var ai;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ai||(ai={}));const oi=/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 ri{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:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=oi.exec(t);return e?{a:e.length>4?N(e[ai.a]):1,b:parseInt(e[ai.b]??"0",10),g:parseInt(e[ai.g]??"0",10),r:parseInt(e[ai.r]??"0",10)}:void 0}}async function li(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ri)})}class ci extends Et{destroy;constructor(){super(),this.destroy=Y.none,this.speed=5}load(t){super.load(t),_(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class hi extends Xt{animation;constructor(){super(),this.animation=new ci,this.value=3}load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class di{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=T()))}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))}loadOptions(t,...e){t.size??=new hi;for(const i of e)t.size.load(i?.size)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=lt(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&ht(t,t.size,0,t.options.size.animation.destroy,e)}}async function ui(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new di(t)))})}const pi={fpsLimit:120,background:{color:"#fff"},particles:{number:{value:100,density:{enable:!0}},paint:{fill:{color:{value:["#FF0000","#FF2A00","#FF5500","#FF8000","#FFAA00","#FFD400","#FFFF00","#D4FF00","#AAFF00","#80FF00","#55FF00","#2AFF00","#00FF00","#00FF2A","#00FF55","#00FF80","#00FFAA","#00FFD4","#00FFFF","#00D4FF","#00AAFF","#0080FF","#0055FF","#002AFF","#0000FF","#2A00FF","#5500FF","#8000FF","#AA00FF","#D400FF","#FF00FF","#FF00D4","#FF00AA","#FF0080","#FF0055","#FF002A"]},enable:!0}},shape:{type:"circle"},opacity:{value:{min:.4,max:.8}},size:{value:{min:150,max:300}},move:{enable:!0,angle:{value:30,offset:0},speed:{min:10,max:20},direction:b.top,outModes:It.out}},detectRetina:!0},fi=["bigCircles","big-circles"];async function gi(t){await t.pluginManager.register(async t=>{await async function(t){t.checkVersion("4.1.0"),await t.pluginManager.register(async t=>{await Promise.all([Fe(t),Ue(t),We(t),li(t),je(t),Ee(t),ni(t),Xe(t),ii(t),ui(t)])})}(t),fi.forEach(e=>{t.pluginManager.addPreset(e,pi)})})}const yi=globalThis;yi.__tsParticlesInternals=yi.__tsParticlesInternals??{},yi.loadBigCirclesPreset=gi;function vi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class mi{#w;#b;#x;#z;#M;#u;#I;#C;#S;#k;#O;#_;#D;#F;#p;#R;#E;#T={};#L=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#b=i,this.#I=null,this.#E=[],this.#R=[],this.#M=[],this.#w=[],this.#x=[],this.#z=[],this.#S=[],this.#k=[],this.#O=[],this.#_=[],this.#F=[],this.#D=[]}get settings(){return this.#C}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{pe(t,this.#b.size)})}clear(){let t=!1;for(const e of this.#w)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#E=[],this.#R=[],this.#M=[],this.#w=[],this.#x=[],this.#z=[],this.#S=[],this.#k=[],this.#O=[],this.#_=[],this.#F=[],this.#D=[]}draw(t){const e=this.#I;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.#A(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#T,g=a?ze(a,r.hdr,h*d):void 0,y=o?ze(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#O)i.drawParticleSetup?.(s,t,e);this.#U(s,t,i,d,f,p),function(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),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 f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const v=s.effect?c.get(s.effect):void 0,m=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(v,y),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(m,y),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())}(m,y),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(m,y),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(v,y),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#V(t);for(const i of this.#k)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#S)fe(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#F)e.drawSettingsSetup?.(i,t);for(const e of this.#_)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#z)e.clearDraw?.(i,t);for(const e of this.#D)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#M=[],this.#w=[],this.#x=[],this.#z=[],this.#S=[],this.#O=[],this.#k=[],this.#_=[],this.#F=[],this.#D=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#M.push(t),t.canvasClear&&this.#w.push(t),t.canvasPaint&&this.#x.push(t),t.drawParticle&&this.#S.push(t),t.drawParticleSetup&&this.#O.push(t),t.drawParticleCleanup&&this.#k.push(t),t.draw&&this.#_.push(t),t.drawSettingsSetup&&this.#F.push(t),t.drawSettingsCleanup&&this.#D.push(t),t.clearDraw&&this.#z.push(t)}initUpdaters(){this.#E=[],this.#R=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#R.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let t=!1;for(const e of this.#x)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.#b.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.#b.size,t,e)})}setContext(t){this.#I=t,this.#I&&(this.#I.globalCompositeOperation=i)}setContextSettings(t){this.#C=t}stop(){this.draw(t=>{pe(t,this.#b.size)})}#V=t=>{for(const e of this.#R)e.afterDraw?.(t)};#U=(t,e,i,s,n,a)=>{for(const o of this.#E){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)vi(a,t,e)}o.beforeDraw?.(e)}};#A=t=>{let e,i;for(const s of this.#M)if(!e&&s.particleFillColor&&(e=Pe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Pe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#L[0]=e,this.#L[1]=i,this.#L}}const Pi=new WeakMap;function wi(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 bi{domElement;render;renderCanvas;size;zoom=1;#u;#$;#G;#W;#p;#q;#j;#H;#N;constructor(t,e){this.#p=t,this.#u=e,this.render=new mi(t,e,this),this.#H={height:0,width:0};const i=e.retina.pixelRatio,s=this.#H;this.size={height:s.height*i,width:s.width*i},this.#$=!1,this.#j=[],this.#q="none"}get#Q(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#$){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#X();this.render.destroy(),this.#j=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#N?this.#N:{x:e*n/t,y:i*n/t}}init(){this.#Y(t=>{t.disconnect()}),this.#G=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#J()}),this.resize(),this.#K(),this.initBackground(),this.#Y(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=ve(this.#p,e.color);s.backgroundColor=n?be(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#j=[];for(const t of this.#u.plugins)t.resize&&this.#j.push(t)}loadCanvas(t){this.#$&&this.domElement&&this.domElement.remove();const i=this.#u,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#$=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=Pi.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Pi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#W=function(t){const e=tt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(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}(n.style));const a=this.#H,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#u.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=et("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#Y(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#Y(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#H,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#q=t,this.#J())}setZoom(t,e){this.zoom=t,this.#N=e}stop(){this.#Y(t=>{t.disconnect()}),this.#G=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Z(),e&&await t.refresh()}#Z=()=>{for(const t of this.#j)t.resize?.()};#K=()=>{const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Q?this.#tt():this.#X();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")}}};#J=()=>{const t=this.domElement;if(!t)return;this.#Y(t=>{t.disconnect()}),this.#K(),this.initBackground();const e=this.#q;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Y(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#X=()=>{const t=this.domElement,e=this.#W;t&&e&&wi(t,e,!0)};#Y=t=>{this.#G&&t(this.#G)};#tt=()=>{const t=this.domElement;t&&wi(t,dt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class xi{#u;#et;#it;#st;constructor(t){this.#u=t,this.#et={visibilityChange:()=>{this.#nt()},resize:()=>{this.#at()}}}addListeners(){this.#ot(!0)}removeListeners(){this.#ot(!1)}#nt=()=>{const t=this.#u;t.actualOptions.pauseOnBlur&&(tt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#at=()=>{this.#st&&(clearTimeout(this.#st),this.#st=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#st=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)};#ot=t=>{const e=this.#et;this.#rt(t),ut(document,"visibilitychange",e.visibilityChange,t,!1)};#rt=t=>{const e=this.#et,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void ut(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#it&&!t?(s&&this.#it.unobserve(s),this.#it.disconnect(),this.#it=void 0):!this.#it&&t&&s&&(this.#it=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#at()}),this.#it.observe(s))}}function zi(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 Mi{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;#lt={fillOpacity:1,opacity:1,strokeOpacity:1};#ct=z.origin;#ht={sin:0,cos:0};#dt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.#u,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.#u.dispatchEvent(gt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#ut(this.bubble.color??Me(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??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#lt.fillOpacity=i*s*e,this.#lt.opacity=i*e,this.#lt.strokeOpacity=i*n*e,this.#lt}getPosition(){return this.#ct.x=this.position.x+this.offset.x,this.#ct.y=this.position.y+this.offset.y,this.#ct.z=this.position.z,this.#ct}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ht.sin=Math.sin(t),this.#ht.cos=Math.cos(t),this.#ht}getStrokeColor(){return this.#ut(this.bubble.color??Me(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#dt.a=e.cos*(t.a??r),this.#dt.b=i?e.sin*(t.b??1):t.b??l,this.#dt.c=i?-e.sin*(t.c??1):t.c??c,this.#dt.d=e.cos*(t.d??h),this.#dt}init(t,e,i,s){const n=this.#u;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.size={value:1,max:1,min:1,enable:!1},this.outType=kt.normal,this.ignoresResizeRatio=!0;const a=n.actualOptions,o=de(this.#p,n,a.particles),r=o.reduceDuplicates,l=o.effect.type,c=o.shape.type;this.effect=rt(l,this.id,r),this.shape=rt(c,this.id,r);const h=o.effect,u=o.shape;if(i){if(i.effect?.type&&i.effect.type!==this.effect){const t=rt(i.effect.type,this.id,r);t&&(this.effect=t,h.load(i.effect))}if(i.shape?.type&&i.shape.type!==this.shape){const t=rt(i.shape.type,this.id,r);t&&(this.shape=t,u.load(i.shape))}}if(this.effect===d){const t=[...this.#u.effectDrawers.keys()];this.effect=t[Math.floor(T()*t.length)]}if(this.shape===d){const t=[...this.#u.shapeDrawers.keys()];this.shape=t[Math.floor(T()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return at({close:e.close},rt(n,i,s))}(this.effect,h,this.id,r):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return at({close:e.close},rt(n,i,s))}(this.shape,u,this.id,r):void 0,o.load(i);const p=this.effectData,f=this.shapeData;p&&o.load(p.particles),f&&o.load(f.particles),this.effectClose=p?.close??o.effect.close,this.shapeClose=f?.close??o.shape.close,this.options=o,n.retina.initParticle(this);for(const t of n.particleUpdaters)t.preInit?.(this);let g,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#pt(e),this.initialVelocity=this.#ft(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(g=n.effectDrawers.get(this.effect)),g?.loadEffect&&g.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);g?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#gt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#gt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%u,i=e<0?e+u: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.#u.particleUpdaters)t.reset?.(this)}#yt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=H({size:l,position:s}),c=z.create(t.x,t.y,e);this.#vt(c,r,o.left??o.default),this.#vt(c,r,o.right??o.default),this.#mt(c,r,o.top??o.default),this.#mt(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};#ft=()=>{const t=this.options.move,e=function(t){const e=M.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===b.inside||t.direction===b.outside)return e;const i=j(U(t.angle.value)),s=j(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=A(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=T()),e};#vt=(t,e,i)=>{zi({outMode:i,checkModes:[It.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})};#mt=(t,e,i)=>{zi({outMode:i,checkModes:[It.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})};#Pt=(t,e)=>{const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===It.bounce;return t===J.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===J.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===J.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===J.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}};#wt=(t,e)=>({canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#gt=t=>{const e=this.#Pt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#wt(t.direction,t.outMode),l=a?this.#bt(a(r),"shape"):void 0,c=o?this.#bt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e};#ut=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;#pt=t=>{const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#yt(t,B(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={...ct(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 j(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*w;case b.right:return 0;case b.bottomRight:return Math.PI*w;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=kt.inside;break;case b.outside:this.outType=kt.outside}this.offset=M.origin};#bt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class Ii{#xt;#zt=new Map;#Mt=[];#It;#Ct;#St=[];#kt;constructor(t){this.#xt=t,this.#It=0,this.#kt=0}clear(){this.#zt.clear();const t=this.#Ct;t&&(this.#xt=t),this.#Ct=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ot(e,i);this.#zt.has(s)||this.#zt.set(s,[]),this.#zt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#_t(t);if(!s)return i;const n=Math.floor(s.minX/this.#xt),a=Math.floor(s.maxX/this.#xt),o=Math.floor(s.minY/this.#xt),r=Math.floor(s.maxY/this.#xt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#zt.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.#Dt(t.x,t.y,e),a=this.query(n,i,s);return this.#Ft(),a}queryRectangle(t,e,i,s=[]){const n=this.#Rt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Ft(),a}setCellSize(t){this.#Ct=t}#Dt(t,e,i){return(this.#Mt[this.#It++]??=new Dt(t,e,i)).reset(t,e,i)}#Rt(t,e,i,s){return(this.#St[this.#kt++]??=new Ft(t,e,i,s)).reset(t,e,i,s)}#Ot(t,e){return`${Math.floor(t/this.#xt)}_${Math.floor(e/this.#xt)}`}#_t(t){if(t instanceof Dt){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 Ft){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}#Ft(){this.#It=0,this.#kt=0}}class Ci{checkParticlePositionPlugins;grid;#Et;#u;#Tt;#Lt;#Bt;#At;#Ut;#Vt;#p;#$t;#Gt;#Wt;#qt;#jt;#Ht;constructor(t,e){this.#p=t,this.#u=e,this.#Bt=0,this.#Et=[],this.#$t=[],this.#Lt=0,this.#Tt=new Map,this.#At=new Map,this.#Ht=this.#Nt(this.#u.zLayers),this.grid=new Ii(100),this.checkParticlePositionPlugins=[],this.#Ut=[],this.#Vt=[],this.#Wt=[],this.#Gt=[],this.#jt=[]}get count(){return this.#Et.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Lt:this.#Tt.get(i)??this.#Lt,o=this.count;if(a>0)switch(n){case Mt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case Mt.wait:if(o>=a)return}try{const n=this.#$t.pop()??new Mi(this.#p,this.#u);n.init(this.#Bt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Et.push(n),this.#Qt(n),this.#Bt++,this.#u.dispatchEvent(gt.particleAdded,{particle:n}),n):void this.#$t.push(n)}catch(t){Pt().warning(`error adding particle: ${t}`)}}clear(){this.#Et=[],this.#At.clear(),this.#Xt(this.#u.zLayers)}destroy(){this.#Et=[],this.#$t.length=0,this.#At.clear(),this.#Ht=[],this.checkParticlePositionPlugins=[],this.#Ut=[],this.#Vt=[],this.#Wt=[],this.#Gt=[],this.#jt=[]}drawParticles(t){for(let e=this.#Ht.length-1;e>=0;e--){const i=this.#Ht[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Et.filter(t)}find(t){return this.#Et.find(t)}get(t){return this.#Et[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#jt=[],this.#Vt=[],this.#Wt=[],this.#Ut=[],this.#Gt=[],this.#At.clear(),this.#Xt(t.zLayers),this.grid=new Ii(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#jt.push(e),e.particleUpdate&&this.#Vt.push(e),e.postUpdate&&this.#Wt.push(e),e.particleReset&&this.#Ut.push(e),e.postParticleUpdate&&this.#Gt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.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.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Et.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.#Yt(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=de(this.#p,this.#u,s);this.#Jt(n,i,t)}this.#Jt(t.particles,i)}setResizeFactor(t){this.#qt=t}update(t){this.grid.clear();for(const e of this.#jt)e.update?.(t);const e=this.#Kt(t);for(const e of this.#Wt)e.postUpdate?.(t);if(this.#Zt(t,e),e.size)for(const t of e)this.remove(t);this.#qt=void 0}#te=(...t)=>{this.#$t.push(...t)};#Jt=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Lt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Tt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ee(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Lt=n.limit.value*a:this.#Tt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)};#Nt=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#ie=t=>{const e=this.#Ht.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#se=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#ee=t=>{const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};#Qt=t=>{const e=this.#ie(t.position.z),i=this.#Ht[e];i&&(i.splice(this.#se(i,t.id),0,t),this.#At.set(t.id,e))};#Yt=(t,e,i)=>{const s=this.#Et[t];return!!s&&(s.group===e&&(this.#Et.splice(t,1),this.#ne(s),s.destroy(i),this.#u.dispatchEvent(gt.particleRemoved,{particle:s}),this.#te(s),!0))};#ne=t=>{const e=this.#At.get(t.id)??this.#ie(t.position.z),i=this.#Ht[e];if(!i)return void this.#At.delete(t.id);const s=this.#se(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#At.delete(t.id)):this.#At.delete(t.id)};#Xt=t=>{const e=Math.max(Math.floor(t),1);if(this.#Ht.length===e)for(const t of this.#Ht)t.length=0;else this.#Ht=this.#Nt(e)};#ae=t=>{const e=this.#ie(t.position.z),i=this.#At.get(t.id);if(void 0===i)return void this.#Qt(t);if(i===e)return;const s=this.#Ht[i];if(s){const e=this.#se(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#Ht[e];n?(n.splice(this.#se(n,t.id),0,t),this.#At.set(t.id,e)):this.#At.set(t.id,e)};#Kt=t=>{const e=new Set,i=this.#qt;for(const s of this.#Et){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.#Ut)t.particleReset?.(s);for(const e of this.#Vt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#Zt=(t,e)=>{for(const i of this.#Et)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Gt)e.postParticleUpdate?.(i,t);this.#ae(i)}}}class Si{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(s.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 ki(t){return!t.destroyed}function Oi(t,e,...i){const s=new ue(t,e);return he(s,...i),s}var _i=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#oe;#re;#le={value:0,factor:0};#ce;#he;#de;#ue;#pe;#fe;#ge;#ye;#ve;#me;#Pe;#p;#we;#be;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#ce=e,this.#ve=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#we=!1,this.#oe=0,this.#de=0,this.#ye=0,this.#pe=!0,this.started=!1,this.destroyed=!1,this.#Pe=!0,this.#ge=0,this.zLayers=100,this.pageHidden=!1,this.#be=a,this.#fe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Si(this),this.canvas=new bi(this.#p,this),this.particles=new Ci(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#me=Oi(this.#p,this),this.actualOptions=Oi(this.#p,this),this.#ue=new xi(this),this.dispatchEvent(gt.containerBuilt)}get animationStatus(){return!this.#Pe&&!this.pageHidden&&ki(this)}get options(){return this.#me}get sourceOptions(){return this.#be}addLifeTime(t){this.#ye+=t}alive(){return!this.#de||this.#ye<=this.#de}destroy(t=!0){if(ki(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.#p.clearPlugins(this),this.destroyed=!0,this.#ve(t),this.dispatchEvent(gt.containerDestroyed)}}dispatchEvent(t,e){this.#ce(t,{container:this,data:e})}draw(t){if(!ki(this))return;let e=t;this.#he=R(t=>{e&&(this.#ge=void 0,e=!1),this.#xe(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(!ki(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#me=Oi(this.#p,this,this.#fe,this.sourceOptions),this.actualOptions=Oi(this.#p,this,this.#me),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.#de=U(i)*a,this.#oe=U(e)*a,this.#ye=0,this.fpsLimit=s>0?s:120,this.#we=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(gt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(gt.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;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(ki(this)&&(void 0!==this.#he&&(t=this.#he,E(t),this.#he=void 0),!this.#Pe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Pe=!0),this.dispatchEvent(gt.containerPaused)}}play(t){if(!ki(this))return;const e=this.#Pe||t;if(!this.#pe||this.actualOptions.autoPlay){if(this.#Pe&&(this.#Pe=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(gt.containerPlay),this.draw(e??!1)}else this.#pe=!1}async refresh(){if(ki(this))return this.stop(),this.start()}async reset(t){if(ki(this))return this.#fe=t,this.#be=t,this.#me=Oi(this.#p,this,this.#fe,this.sourceOptions),this.actualOptions=Oi(this.#p,this,this.#me),this.refresh()}async start(){ki(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#ue.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(gt.containerStarted),this.play(),t()};this.#re=setTimeout(()=>{e()},this.#oe)}))}stop(){if(ki(this)&&this.started){this.#re&&(clearTimeout(this.#re),this.#re=void 0),this.#pe=!0,this.started=!1,this.#ue.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.#be=this.#me,this.dispatchEvent(gt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#xe=t=>{try{if(!this.#we&&void 0!==this.#ge&&t<this.#ge+a/this.fpsLimit)return void this.draw(!1);if(this.#ge??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#le,t-this.#ge,this.fpsLimit,this.#we),this.addLifeTime(this.#le.value),this.#ge=t,this.#le.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#le),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Pt().error("error in animation loop",t)}}}});var Di=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#ze;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#ze&&(t.globalCompositeOperation=this.#ze)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#ze=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Fi(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=B(t.velocity.x,-1,1),t.velocity.y=B(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??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=l*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 Ri(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=(l=a,c=n,Math.sqrt(q(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?zt.clockwise:zt.counterClockwise,angle:T()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Ei=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=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-U(e.decay),t.pathDelay=U(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:U(i.acceleration),inverse:i.inverse},Ri(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===zt.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),l=r*n;e.spin.radius>l?(e.spin.radius=l,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)}(s,t,h,o):Fi(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this.#Me()}redrawInit(){return this.#Me()}update(){for(const t of this.pathGenerators.values())t.update()}async#Me(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});t.loadBigCirclesPreset=gi,t.tsParticles=Oe}),Object.assign(globalThis.window||globalThis,{loadBigCirclesPreset:(globalThis.__tsParticlesInternals.presets.bigCircles||{}).loadBigCirclesPreset}),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.bigCircles=t.__tsParticlesInternals.presets.bigCircles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",y=255,v=360,m=100,P=100,w=.25;var b;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"}(b||(b={}));class z{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 z.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??o.y,i??o.z):new z(t.x,t.y,x(t))}add(t){return z.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 z.clone(this)}div(t){return z.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 z.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 z.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 z.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)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends z{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return M.create(o.x,o.y)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??o.y):new M(t.x,t.y)}}function I(t){return"boolean"==typeof t}function C(t){return"string"==typeof t}function S(t){return"number"==typeof t}function k(t){return"object"==typeof t&&null!==t}function O(t){return Array.isArray(t)}function _(t){return null==t}const D=Math.PI/180;let F=Math.random;const R=t=>requestAnimationFrame(t),E=t=>{cancelAnimationFrame(t)};function T(){return B(F(),0,1-Number.EPSILON)}function L(t,e){return T()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function A(t){const e=$(t);let i=V(t);return e===i&&(i=0),L(i,e)}function U(t){return S(t)?t:A(t)}function V(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function q(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function j(t){return t*D}function H(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function N(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Q,X,Y,J,K,Z;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Q||(Q={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(X||(X={})),function(t){t.none="none",t.max="max",t.min="min"}(Y||(Y={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(J||(J={})),function(t){t.precise="precise",t.percent="percent"}(K||(K={})),function(t){t.max="max",t.min="min",t.random="random"}(Z||(Z={}));function tt(){return globalThis.document}function et(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function it(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(T()*t.length)}(t)]}function st(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==J.bottom||(n=t.top<e.height+i.x);!n||s&&s!==J.left||(n=t.right>i.x);!n||s&&s!==J.right||(n=t.left<e.width+i.y);!n||s&&s!==J.top||(n=t.bottom>i.y);return n}(nt(t,s??0),e,i,n)}function nt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function at(t,...e){for(const i of e){if(_(i))continue;if(!k(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):k(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 k(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=>at(void 0,t)):at(e[n],a)}}return t}function ot(t,e){return O(t)?t.map((t,i)=>e(t,i)):e(t,0)}function rt(t,e,i){return O(t)?it(t,e,i):t}function lt(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:$(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Q.increase:o.status=X.increasing;break;case Q.decrease:o.status=X.decreasing;break;case Q.random:o.status=T()>=n?X.increasing:X.decreasing}const t=s.mode===Q.auto;switch(s.startValue){case Z.min:o.value=o.min,t&&(o.status=X.increasing);break;case Z.max:o.value=o.max,t&&(o.status=X.decreasing);break;case Z.random:default:o.value=A(o),t&&(o.status=T()>=n?X.increasing:X.decreasing)}}return o.initialValue=o.value,o}function ct(t,e){return function(t,e){if(t.mode!==K.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 ht(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,l=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 X.increasing:e.value+=a;break;case X.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case X.increasing:e.value>=r&&(e.status=X.decreasing,e.loops??=0,e.loops++);break;case X.decreasing:e.value<=o&&(e.status=X.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Y.max:i>=n&&t.destroy();break;case Y.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=B(e.value,o,r))}}const dt=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=tt().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 ut(t,e,i,s,n){if(s){let s={passive:!0};I(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 pt(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 ft{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var gt;!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"}(gt||(gt={}));class yt{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;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(gt.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 pt(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 pt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(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}(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const vt=t=>(...e)=>{t(...e)},mt={debug:vt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:vt(console.info),log:vt(console.log),trace:vt(console.trace),verbose:vt(console.log),warning:vt(console.warn)};function Pt(){return mt}const wt="100%";class bt{pluginManager=new yt(this);#h=[];#d=new ft;#o=!1;get items(){return this.#h}get version(){return"4.1.1"}addEventListener(t,e){this.#d.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.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return _i}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=rt(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:o,index:a}):t.options,l=rt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=tt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=wt,s.style.height||=wt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=wt,s.style.height||=wt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=tt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var xt,zt,Mt,It,Ct,St,kt,Ot;!function(t){t.circle="circle",t.rectangle="rectangle"}(xt||(xt={}));class _t{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 Dt extends _t{radius;constructor(t,e,i){super(t,e,xt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,q(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 Dt||t.type===xt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ft||t.type===xt.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 Ft extends _t{size;constructor(t,e,i,s){super(t,e,xt.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 Dt)return t.intersects(this);if(!(t instanceof Ft))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"}(zt||(zt={})),function(t){t.delete="delete",t.wait="wait"}(Mt||(Mt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(It||(It={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ct||(Ct={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(St||(St={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(kt||(kt={})),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"}(Ot||(Ot={}));class Rt{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){_(t)||(void 0!==t.count&&(this.count=G(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=G(t.speed)),void 0!==t.decay&&(this.decay=G(t.decay)),void 0!==t.delay&&(this.delay=G(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Et extends Rt{mode;startValue;constructor(){super(),this.mode=Q.auto,this.startValue=Z.random}load(t){super.load(t),_(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Tt extends Rt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),_(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=G(t.offset)))}}class Lt{h=new Tt(0,v);l=new Tt(0,P);s=new Tt(0,m);load(t){_(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Bt{value;constructor(){this.value=""}static create(t,e){const i=new Bt;return i.load(t),void 0!==e&&(C(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){_(t)||_(t.value)||(this.value=t.value)}}class At extends Bt{animation;constructor(){super(),this.animation=new Lt}static create(t,e){const i=new At;return i.load(t),void 0!==e&&(C(e)||O(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Ut{color;image;opacity;position;repeat;size;constructor(){this.color=new Bt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){_(t)||(void 0!==t.color&&(this.color=Bt.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 Vt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){_(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class $t{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){_(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(_(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=at(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Wt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){_(t)||(void 0!==t.color&&(this.color=At.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class qt{offset;value;constructor(){this.offset=0,this.value=90}load(t){_(t)||(void 0!==t.offset&&(this.offset=G(t.offset)),void 0!==t.value&&(this.value=G(t.value)))}}class jt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=K.percent,this.radius=0}load(t){_(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 Ht{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){_(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=G(t.maxSpeed)))}}class Nt{value;constructor(){this.value=0}load(t){_(t)||_(t.value)||(this.value=G(t.value))}}class Qt extends Nt{animation=new Rt;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Xt extends Qt{animation;constructor(){super(),this.animation=new Et}load(t){super.load(t)}}class Yt{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Nt,this.enable=!1,this.options={}}load(t){_(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=at(this.options,t.options)))}}class Jt{bottom;default;left;right;top;constructor(){this.default=It.out}load(t){_(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 Kt{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){_(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=at({},t.position)))}}class Zt{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new qt,this.center=new jt,this.decay=0,this.distance={},this.direction=b.none,this.drift=0,this.enable=!1,this.gravity=new Ht,this.path=new Yt,this.outModes=new Jt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Kt,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(_(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=G(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=G(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(k(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=G(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 te{color;opacity;width;constructor(){this.width=0}load(t){_(t)||(void 0!==t.color&&(this.color=At.create(this.color,t.color)),void 0!==t.width&&(this.width=G(t.width)),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class ee{color;fill;stroke;load(t){_(t)||(void 0!==t.color&&(this.color=At.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new Wt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new te,this.stroke.load(t.stroke)))}}class ie extends Nt{constructor(){super(),this.value=1}}class se{horizontal;vertical;constructor(){this.horizontal=new ie,this.vertical=new ie}load(t){_(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class ne{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(_(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 ae{mode;value;constructor(){this.mode=Mt.delete,this.value=0}load(t){_(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class oe{density;limit;value;constructor(){this.density=new ne,this.limit=new ae,this.value=0}load(t){_(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class re{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(_(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=at(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class le extends Nt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),_(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 ce{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.bounce=new se,this.effect=new Gt,this.groups={},this.move=new Zt,this.number=new oe,this.paint=new ee,this.paint.color=new At,this.paint.color.value="#fff",this.paint.fill=new Wt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new re,this.zIndex=new le}load(t){if(_(t))return;if(t.palette&&(this.palette=t.palette,this.#f(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]=at(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);const e=t.paint;if(e&&(O(e)?this.paint=ot(e,t=>{const e=new ee;return e.load(t),e}):O(this.paint)?(this.paint=new ee,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f=t=>{const e=this.#p.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 he(t,...e){for(const i of e)t.load(i)}function de(t,e,...i){const s=new ce(t,e);return he(s,...i),s}class ue{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.autoPlay=!0,this.background=new Ut,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Vt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=de(this.#p,this.#u),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new $t,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(_(t))return;void 0!==t.preset&&(this.preset=t.preset,ot(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(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=G(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=G(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;I(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=at(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function pe(t,e){t.clearRect(o.x,o.y,e.width,e.height)}function fe(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const ge=new Map;function ye(t,e){let i=ge.get(t);if(!i){if(i=e(),ge.size>=1e3){[...ge.keys()].slice(0,500).forEach(t=>ge.delete(t))}ge.set(t,i)}return i}function ve(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return me(t,n.value,i,s);if(O(n.value)){const e=it(n.value,i,s);if(!e)return;return ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function me(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(L(t,e));return{b:i(),g:i(),r:i()}}():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=it(n.value,i,s);if(!e)return;return me(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Pe(t,e,i,s=!0){const a=ve(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*=P,r.s*=m,r.h*=60,r.h<0&&(r.h+=v);r.h>=v&&(r.h-=v);return r}(a):void 0}function we(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(m,t.s)),s=Math.max(0,Math.min(P,t.l)),a=e/v,o=i/m,r=s/P;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=(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},c=r<n?r*(1+o):r+o-r*o,h=2*r-c,d=1/3,u=Math.min(y,y*l(h,c,a+d)),p=Math.min(y,y*l(h,c,a)),f=Math.min(y,y*l(h,c,a-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function be(t,e,i){const s=i??1;return ye(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?xe(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function xe(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function ze(t,e,i){const s=i??1;return ye(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return xe(we(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Me(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ie(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:P}};return e&&(Ce(s.h,e.h,i),Ce(s.s,e.s,i),Ce(s.l,e.l,i)),s}function Ce(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=X.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function Se(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?A(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!==X.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=X.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=X.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=B(t.value,r,o)}function ke(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Se(i,!1,e),Se(s,!0,e),Se(n,!0,e)}const Oe=new bt;class _e{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){_(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class De{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Di});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new _e),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new _e,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Fe(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new De)})}class Re{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};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=k(s)?{min:j(s.min),max:j(s.max)}:{min:0,max:j(s)}}}async function Ee(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Re))})}var Te;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Te||(Te={}));const Le=/^#?([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 Ae{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Le,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Be.exec(e);return i?{a:i[Te.a]?Number.parseInt(i[Te.a],16)/255:1,b:Number.parseInt(i[Te.b]??"0",16),g:Number.parseInt(i[Te.g]??"0",16),r:Number.parseInt(i[Te.r]??"0",16)}:void 0}}async function Ue(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ae)})}var Ve;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ve||(Ve={}));const $e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ge{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 we(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return we({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=$e.exec(t);return e?function(t){const e=we(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?N(e[Ve.a]):1,h:Number.parseInt(e[Ve.h]??"0",10),l:Number.parseInt(e[Ve.l]??"0",10),s:Number.parseInt(e[Ve.s]??"0",10)}):void 0}}async function We(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ge)})}class qe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ei});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function je(t){t.checkVersion("4.1.1"),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,pt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new qe(t.pluginManager))})}class He extends Et{destroy;constructor(){super(),this.destroy=Y.none,this.speed=2}load(t){super.load(t),_(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ne extends Xt{animation;constructor(){super(),this.animation=new He,this.value=1}load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Qe{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=lt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=T()))}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))}loadOptions(t,...e){t.opacity??=new Ne;for(const i of e)t.opacity.load(i?.opacity)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&ht(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Xe(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Qe(t)))})}class Ye{modes;#u;#v;constructor(t){this.#u=t,this.modes=[It.bounce,It.split],this.#v=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#v)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=nt(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==It.bounce&&t.outMode!==It.split||t.direction!==J.left&&t.direction!==J.right)return;t.bounds.right<0&&t.direction===J.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===J.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===J.right&&e>0||t.direction===J.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===J.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===J.left&&(t.particle.position.x=s),t.outMode===It.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==It.bounce&&t.outMode!==It.split||t.direction!==J.bottom&&t.direction!==J.top)return;t.bounds.bottom<0&&t.direction===J.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===J.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===J.bottom&&e>0||t.direction===J.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===J.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===J.top&&(t.particle.position.y=s),t.outMode===It.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class Je{modes;constructor(t){this.modes=[It.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case kt.normal:case kt.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case kt.inside:{const{dx:e,dy:i}=W(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 Ke{modes;#u;constructor(t){this.#u=t,this.modes=[It.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===J.left||e===J.right))??(t.options.move.distance.vertical&&(e===J.top||e===J.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===J.bottom||n.inverse&&i.y<-l&&e===J.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;st(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const Ze=M.origin;class ti{modes;#u;constructor(t){this.#u=t,this.modes=[It.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case kt.inside:{const{x:e,y:i}=t.velocity;Ze.setTo(o),Ze.length=t.moveCenter.radius,Ze.angle=t.velocity.angle+Math.PI,Ze.addTo(t.moveCenter);const{dx:s,dy:a}=W(t.position,Ze);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(A({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(A({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=W(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case kt.outside:{t.position.x=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case kt.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=nt(t.position,o);e===J.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===J.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===J.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===J.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ei{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#m(t,It.bounce,t=>new Ye(t)),this.#m(t,It.out,t=>new ti(t)),this.#m(t,It.destroy,t=>new Je(t)),this.#m(t,It.none,t=>new Ke(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#P(t,e,i.bottom??i.default,J.bottom),this.#P(t,e,i.left??i.default,J.left),this.#P(t,e,i.right??i.default,J.right),this.#P(t,e,i.top??i.default,J.top)}#m=(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.#u))};#P=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ii(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ei(t)))})}class si{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=rt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=At.create(void 0===a?void 0:At.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=Pe(this.#p,i);s&&(t.fillColor=Ie(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=At.create(void 0===a?void 0:At.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=Pe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ie(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)&&(ke(t.fillColor,e),ke(t.strokeColor,e))}}async function ni(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new si(t.pluginManager,e)))})}var ai;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ai||(ai={}));const oi=/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 ri{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:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=oi.exec(t);return e?{a:e.length>4?N(e[ai.a]):1,b:parseInt(e[ai.b]??"0",10),g:parseInt(e[ai.g]??"0",10),r:parseInt(e[ai.r]??"0",10)}:void 0}}async function li(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ri)})}class ci extends Et{destroy;constructor(){super(),this.destroy=Y.none,this.speed=5}load(t){super.load(t),_(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class hi extends Xt{animation;constructor(){super(),this.animation=new ci,this.value=3}load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class di{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=T()))}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))}loadOptions(t,...e){t.size??=new hi;for(const i of e)t.size.load(i?.size)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=lt(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&ht(t,t.size,0,t.options.size.animation.destroy,e)}}async function ui(t){t.checkVersion("4.1.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new di(t)))})}const pi={fpsLimit:120,background:{color:"#fff"},particles:{number:{value:100,density:{enable:!0}},paint:{fill:{color:{value:["#FF0000","#FF2A00","#FF5500","#FF8000","#FFAA00","#FFD400","#FFFF00","#D4FF00","#AAFF00","#80FF00","#55FF00","#2AFF00","#00FF00","#00FF2A","#00FF55","#00FF80","#00FFAA","#00FFD4","#00FFFF","#00D4FF","#00AAFF","#0080FF","#0055FF","#002AFF","#0000FF","#2A00FF","#5500FF","#8000FF","#AA00FF","#D400FF","#FF00FF","#FF00D4","#FF00AA","#FF0080","#FF0055","#FF002A"]},enable:!0}},shape:{type:"circle"},opacity:{value:{min:.4,max:.8}},size:{value:{min:150,max:300}},move:{enable:!0,angle:{value:30,offset:0},speed:{min:10,max:20},direction:b.top,outModes:It.out}},detectRetina:!0},fi=["bigCircles","big-circles"];async function gi(t){await t.pluginManager.register(async t=>{await async function(t){t.checkVersion("4.1.1"),await t.pluginManager.register(async t=>{await Promise.all([Fe(t),Ue(t),We(t),li(t),je(t),Ee(t),ni(t),Xe(t),ii(t),ui(t)])})}(t),fi.forEach(e=>{t.pluginManager.addPreset(e,pi)})})}const yi=globalThis;yi.__tsParticlesInternals=yi.__tsParticlesInternals??{},yi.loadBigCirclesPreset=gi;function vi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class mi{#w;#b;#x;#z;#M;#u;#I;#C;#S;#k;#O;#_;#D;#F;#p;#R;#E;#T={};#L=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#b=i,this.#I=null,this.#E=[],this.#R=[],this.#M=[],this.#w=[],this.#x=[],this.#z=[],this.#S=[],this.#k=[],this.#O=[],this.#_=[],this.#F=[],this.#D=[]}get settings(){return this.#C}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{pe(t,this.#b.size)})}clear(){let t=!1;for(const e of this.#w)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#E=[],this.#R=[],this.#M=[],this.#w=[],this.#x=[],this.#z=[],this.#S=[],this.#k=[],this.#O=[],this.#_=[],this.#F=[],this.#D=[]}draw(t){const e=this.#I;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.#A(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#T,g=a?ze(a,r.hdr,h*d):void 0,y=o?ze(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#O)i.drawParticleSetup?.(s,t,e);this.#U(s,t,i,d,f,p),function(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),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 f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const v=s.effect?c.get(s.effect):void 0,m=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(v,y),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(m,y),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())}(m,y),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(m,y),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(v,y),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#V(t);for(const i of this.#k)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#S)fe(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#F)e.drawSettingsSetup?.(i,t);for(const e of this.#_)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#z)e.clearDraw?.(i,t);for(const e of this.#D)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#M=[],this.#w=[],this.#x=[],this.#z=[],this.#S=[],this.#O=[],this.#k=[],this.#_=[],this.#F=[],this.#D=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#M.push(t),t.canvasClear&&this.#w.push(t),t.canvasPaint&&this.#x.push(t),t.drawParticle&&this.#S.push(t),t.drawParticleSetup&&this.#O.push(t),t.drawParticleCleanup&&this.#k.push(t),t.draw&&this.#_.push(t),t.drawSettingsSetup&&this.#F.push(t),t.drawSettingsCleanup&&this.#D.push(t),t.clearDraw&&this.#z.push(t)}initUpdaters(){this.#E=[],this.#R=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#R.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let t=!1;for(const e of this.#x)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.#b.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.#b.size,t,e)})}setContext(t){this.#I=t,this.#I&&(this.#I.globalCompositeOperation=i)}setContextSettings(t){this.#C=t}stop(){this.draw(t=>{pe(t,this.#b.size)})}#V=t=>{for(const e of this.#R)e.afterDraw?.(t)};#U=(t,e,i,s,n,a)=>{for(const o of this.#E){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)vi(a,t,e)}o.beforeDraw?.(e)}};#A=t=>{let e,i;for(const s of this.#M)if(!e&&s.particleFillColor&&(e=Pe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Pe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#L[0]=e,this.#L[1]=i,this.#L}}const Pi=new WeakMap;function wi(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 bi{domElement;render;renderCanvas;size;zoom=1;#u;#$;#G;#W;#p;#q;#j;#H;#N;constructor(t,e){this.#p=t,this.#u=e,this.render=new mi(t,e,this),this.#H={height:0,width:0};const i=e.retina.pixelRatio,s=this.#H;this.size={height:s.height*i,width:s.width*i},this.#$=!1,this.#j=[],this.#q="none"}get#Q(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#$){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#X();this.render.destroy(),this.#j=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#N?this.#N:{x:e*n/t,y:i*n/t}}init(){this.#Y(t=>{t.disconnect()}),this.#G=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#J()}),this.resize(),this.#K(),this.initBackground(),this.#Y(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=ve(this.#p,e.color);s.backgroundColor=n?be(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#j=[];for(const t of this.#u.plugins)t.resize&&this.#j.push(t)}loadCanvas(t){this.#$&&this.domElement&&this.domElement.remove();const i=this.#u,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#$=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=Pi.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Pi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#W=function(t){const e=tt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(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}(n.style));const a=this.#H,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#u.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=et("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#Y(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#Y(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#H,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#q=t,this.#J())}setZoom(t,e){this.zoom=t,this.#N=e}stop(){this.#Y(t=>{t.disconnect()}),this.#G=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Z(),e&&await t.refresh()}#Z=()=>{for(const t of this.#j)t.resize?.()};#K=()=>{const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Q?this.#tt():this.#X();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")}}};#J=()=>{const t=this.domElement;if(!t)return;this.#Y(t=>{t.disconnect()}),this.#K(),this.initBackground();const e=this.#q;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Y(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#X=()=>{const t=this.domElement,e=this.#W;t&&e&&wi(t,e,!0)};#Y=t=>{this.#G&&t(this.#G)};#tt=()=>{const t=this.domElement;t&&wi(t,dt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class xi{#u;#et;#it;#st;constructor(t){this.#u=t,this.#et={visibilityChange:()=>{this.#nt()},resize:()=>{this.#at()}}}addListeners(){this.#ot(!0)}removeListeners(){this.#ot(!1)}#nt=()=>{const t=this.#u;t.actualOptions.pauseOnBlur&&(tt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#at=()=>{this.#st&&(clearTimeout(this.#st),this.#st=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#st=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)};#ot=t=>{const e=this.#et;this.#rt(t),ut(document,"visibilitychange",e.visibilityChange,t,!1)};#rt=t=>{const e=this.#et,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void ut(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#it&&!t?(s&&this.#it.unobserve(s),this.#it.disconnect(),this.#it=void 0):!this.#it&&t&&s&&(this.#it=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#at()}),this.#it.observe(s))}}function zi(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 Mi{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;#lt={fillOpacity:1,opacity:1,strokeOpacity:1};#ct=z.origin;#ht={sin:0,cos:0};#dt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.#u,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.#u.dispatchEvent(gt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#ut(this.bubble.color??Me(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??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#lt.fillOpacity=i*s*e,this.#lt.opacity=i*e,this.#lt.strokeOpacity=i*n*e,this.#lt}getPosition(){return this.#ct.x=this.position.x+this.offset.x,this.#ct.y=this.position.y+this.offset.y,this.#ct.z=this.position.z,this.#ct}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ht.sin=Math.sin(t),this.#ht.cos=Math.cos(t),this.#ht}getStrokeColor(){return this.#ut(this.bubble.color??Me(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#dt.a=e.cos*(t.a??r),this.#dt.b=i?e.sin*(t.b??1):t.b??l,this.#dt.c=i?-e.sin*(t.c??1):t.c??c,this.#dt.d=e.cos*(t.d??h),this.#dt}init(t,e,i,s){const n=this.#u;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.size={value:1,max:1,min:1,enable:!1},this.outType=kt.normal,this.ignoresResizeRatio=!0;const a=n.actualOptions,o=de(this.#p,n,a.particles),r=o.reduceDuplicates,l=o.effect.type,c=o.shape.type;this.effect=rt(l,this.id,r),this.shape=rt(c,this.id,r);const h=o.effect,u=o.shape;if(i){if(i.effect?.type&&i.effect.type!==this.effect){const t=rt(i.effect.type,this.id,r);t&&(this.effect=t,h.load(i.effect))}if(i.shape?.type&&i.shape.type!==this.shape){const t=rt(i.shape.type,this.id,r);t&&(this.shape=t,u.load(i.shape))}}if(this.effect===d){const t=[...this.#u.effectDrawers.keys()];this.effect=t[Math.floor(T()*t.length)]}if(this.shape===d){const t=[...this.#u.shapeDrawers.keys()];this.shape=t[Math.floor(T()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return at({close:e.close},rt(n,i,s))}(this.effect,h,this.id,r):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return at({close:e.close},rt(n,i,s))}(this.shape,u,this.id,r):void 0,o.load(i);const p=this.effectData,f=this.shapeData;p&&o.load(p.particles),f&&o.load(f.particles),this.effectClose=p?.close??o.effect.close,this.shapeClose=f?.close??o.shape.close,this.options=o,n.retina.initParticle(this);for(const t of n.particleUpdaters)t.preInit?.(this);let g,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#pt(e),this.initialVelocity=this.#ft(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(g=n.effectDrawers.get(this.effect)),g?.loadEffect&&g.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);g?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#gt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#gt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%u,i=e<0?e+u: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.#u.particleUpdaters)t.reset?.(this)}#yt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=H({size:l,position:s}),c=z.create(t.x,t.y,e);this.#vt(c,r,o.left??o.default),this.#vt(c,r,o.right??o.default),this.#mt(c,r,o.top??o.default),this.#mt(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};#ft=()=>{const t=this.options.move,e=function(t){const e=M.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===b.inside||t.direction===b.outside)return e;const i=j(U(t.angle.value)),s=j(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=A(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=T()),e};#vt=(t,e,i)=>{zi({outMode:i,checkModes:[It.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})};#mt=(t,e,i)=>{zi({outMode:i,checkModes:[It.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})};#Pt=(t,e)=>{const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===It.bounce;return t===J.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===J.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===J.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===J.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}};#wt=(t,e)=>({canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#gt=t=>{const e=this.#Pt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#wt(t.direction,t.outMode),l=a?this.#bt(a(r),"shape"):void 0,c=o?this.#bt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e};#ut=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;#pt=t=>{const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#yt(t,B(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={...ct(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 j(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*w;case b.right:return 0;case b.bottomRight:return Math.PI*w;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=kt.inside;break;case b.outside:this.outType=kt.outside}this.offset=M.origin};#bt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class Ii{#xt;#zt=new Map;#Mt=[];#It;#Ct;#St=[];#kt;constructor(t){this.#xt=t,this.#It=0,this.#kt=0}clear(){this.#zt.clear();const t=this.#Ct;t&&(this.#xt=t),this.#Ct=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ot(e,i);this.#zt.has(s)||this.#zt.set(s,[]),this.#zt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#_t(t);if(!s)return i;const n=Math.floor(s.minX/this.#xt),a=Math.floor(s.maxX/this.#xt),o=Math.floor(s.minY/this.#xt),r=Math.floor(s.maxY/this.#xt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#zt.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.#Dt(t.x,t.y,e),a=this.query(n,i,s);return this.#Ft(),a}queryRectangle(t,e,i,s=[]){const n=this.#Rt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Ft(),a}setCellSize(t){this.#Ct=t}#Dt(t,e,i){return(this.#Mt[this.#It++]??=new Dt(t,e,i)).reset(t,e,i)}#Rt(t,e,i,s){return(this.#St[this.#kt++]??=new Ft(t,e,i,s)).reset(t,e,i,s)}#Ot(t,e){return`${Math.floor(t/this.#xt)}_${Math.floor(e/this.#xt)}`}#_t(t){if(t instanceof Dt){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 Ft){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}#Ft(){this.#It=0,this.#kt=0}}class Ci{checkParticlePositionPlugins;grid;#Et;#u;#Tt;#Lt;#Bt;#At;#Ut;#Vt;#p;#$t;#Gt;#Wt;#qt;#jt;#Ht;constructor(t,e){this.#p=t,this.#u=e,this.#Bt=0,this.#Et=[],this.#$t=[],this.#Lt=0,this.#Tt=new Map,this.#At=new Map,this.#Ht=this.#Nt(this.#u.zLayers),this.grid=new Ii(100),this.checkParticlePositionPlugins=[],this.#Ut=[],this.#Vt=[],this.#Wt=[],this.#Gt=[],this.#jt=[]}get count(){return this.#Et.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Lt:this.#Tt.get(i)??this.#Lt,o=this.count;if(a>0)switch(n){case Mt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case Mt.wait:if(o>=a)return}try{const n=this.#$t.pop()??new Mi(this.#p,this.#u);n.init(this.#Bt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Et.push(n),this.#Qt(n),this.#Bt++,this.#u.dispatchEvent(gt.particleAdded,{particle:n}),n):void this.#$t.push(n)}catch(t){Pt().warning(`error adding particle: ${t}`)}}clear(){this.#Et=[],this.#At.clear(),this.#Xt(this.#u.zLayers)}destroy(){this.#Et=[],this.#$t.length=0,this.#At.clear(),this.#Ht=[],this.checkParticlePositionPlugins=[],this.#Ut=[],this.#Vt=[],this.#Wt=[],this.#Gt=[],this.#jt=[]}drawParticles(t){for(let e=this.#Ht.length-1;e>=0;e--){const i=this.#Ht[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Et.filter(t)}find(t){return this.#Et.find(t)}get(t){return this.#Et[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#jt=[],this.#Vt=[],this.#Wt=[],this.#Ut=[],this.#Gt=[],this.#At.clear(),this.#Xt(t.zLayers),this.grid=new Ii(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#jt.push(e),e.particleUpdate&&this.#Vt.push(e),e.postUpdate&&this.#Wt.push(e),e.particleReset&&this.#Ut.push(e),e.postParticleUpdate&&this.#Gt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.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.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Et.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.#Yt(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=de(this.#p,this.#u,s);this.#Jt(n,i,t)}this.#Jt(t.particles,i)}setResizeFactor(t){this.#qt=t}update(t){this.grid.clear();for(const e of this.#jt)e.update?.(t);const e=this.#Kt(t);for(const e of this.#Wt)e.postUpdate?.(t);if(this.#Zt(t,e),e.size)for(const t of e)this.remove(t);this.#qt=void 0}#te=(...t)=>{this.#$t.push(...t)};#Jt=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Lt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Tt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ee(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Lt=n.limit.value*a:this.#Tt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)};#Nt=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#ie=t=>{const e=this.#Ht.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#se=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#ee=t=>{const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};#Qt=t=>{const e=this.#ie(t.position.z),i=this.#Ht[e];i&&(i.splice(this.#se(i,t.id),0,t),this.#At.set(t.id,e))};#Yt=(t,e,i)=>{const s=this.#Et[t];return!!s&&(s.group===e&&(this.#Et.splice(t,1),this.#ne(s),s.destroy(i),this.#u.dispatchEvent(gt.particleRemoved,{particle:s}),this.#te(s),!0))};#ne=t=>{const e=this.#At.get(t.id)??this.#ie(t.position.z),i=this.#Ht[e];if(!i)return void this.#At.delete(t.id);const s=this.#se(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#At.delete(t.id)):this.#At.delete(t.id)};#Xt=t=>{const e=Math.max(Math.floor(t),1);if(this.#Ht.length===e)for(const t of this.#Ht)t.length=0;else this.#Ht=this.#Nt(e)};#ae=t=>{const e=this.#ie(t.position.z),i=this.#At.get(t.id);if(void 0===i)return void this.#Qt(t);if(i===e)return;const s=this.#Ht[i];if(s){const e=this.#se(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#Ht[e];n?(n.splice(this.#se(n,t.id),0,t),this.#At.set(t.id,e)):this.#At.set(t.id,e)};#Kt=t=>{const e=new Set,i=this.#qt;for(const s of this.#Et){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.#Ut)t.particleReset?.(s);for(const e of this.#Vt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#Zt=(t,e)=>{for(const i of this.#Et)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Gt)e.postParticleUpdate?.(i,t);this.#ae(i)}}}class Si{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(s.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 ki(t){return!t.destroyed}function Oi(t,e,...i){const s=new ue(t,e);return he(s,...i),s}var _i=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#oe;#re;#le={value:0,factor:0};#ce;#he;#de;#ue;#pe;#fe;#ge;#ye;#ve;#me;#Pe;#p;#we;#be;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#ce=e,this.#ve=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#we=!1,this.#oe=0,this.#de=0,this.#ye=0,this.#pe=!0,this.started=!1,this.destroyed=!1,this.#Pe=!0,this.#ge=0,this.zLayers=100,this.pageHidden=!1,this.#be=a,this.#fe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Si(this),this.canvas=new bi(this.#p,this),this.particles=new Ci(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#me=Oi(this.#p,this),this.actualOptions=Oi(this.#p,this),this.#ue=new xi(this),this.dispatchEvent(gt.containerBuilt)}get animationStatus(){return!this.#Pe&&!this.pageHidden&&ki(this)}get options(){return this.#me}get sourceOptions(){return this.#be}addLifeTime(t){this.#ye+=t}alive(){return!this.#de||this.#ye<=this.#de}destroy(t=!0){if(ki(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.#p.clearPlugins(this),this.destroyed=!0,this.#ve(t),this.dispatchEvent(gt.containerDestroyed)}}dispatchEvent(t,e){this.#ce(t,{container:this,data:e})}draw(t){if(!ki(this))return;let e=t;this.#he=R(t=>{e&&(this.#ge=void 0,e=!1),this.#xe(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(!ki(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#me=Oi(this.#p,this,this.#fe,this.sourceOptions),this.actualOptions=Oi(this.#p,this,this.#me),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.#de=U(i)*a,this.#oe=U(e)*a,this.#ye=0,this.fpsLimit=s>0?s:120,this.#we=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(gt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(gt.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;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(ki(this)&&(void 0!==this.#he&&(t=this.#he,E(t),this.#he=void 0),!this.#Pe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Pe=!0),this.dispatchEvent(gt.containerPaused)}}play(t){if(!ki(this))return;const e=this.#Pe||t;if(!this.#pe||this.actualOptions.autoPlay){if(this.#Pe&&(this.#Pe=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(gt.containerPlay),this.draw(e??!1)}else this.#pe=!1}async refresh(){if(ki(this))return this.stop(),this.start()}async reset(t){if(ki(this))return this.#fe=t,this.#be=t,this.#me=Oi(this.#p,this,this.#fe,this.sourceOptions),this.actualOptions=Oi(this.#p,this,this.#me),this.refresh()}async start(){ki(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#ue.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(gt.containerStarted),this.play(),t()};this.#re=setTimeout(()=>{e()},this.#oe)}))}stop(){if(ki(this)&&this.started){this.#re&&(clearTimeout(this.#re),this.#re=void 0),this.#pe=!0,this.started=!1,this.#ue.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.#be=this.#me,this.dispatchEvent(gt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#xe=t=>{try{if(!this.#we&&void 0!==this.#ge&&t<this.#ge+a/this.fpsLimit)return void this.draw(!1);if(this.#ge??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#le,t-this.#ge,this.fpsLimit,this.#we),this.addLifeTime(this.#le.value),this.#ge=t,this.#le.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#le),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Pt().error("error in animation loop",t)}}}});var Di=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#ze;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#ze&&(t.globalCompositeOperation=this.#ze)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#ze=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Fi(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=B(t.velocity.x,-1,1),t.velocity.y=B(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??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=l*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 Ri(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=(l=a,c=n,Math.sqrt(q(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?zt.clockwise:zt.counterClockwise,angle:T()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Ei=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=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-U(e.decay),t.pathDelay=U(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:U(i.acceleration),inverse:i.inverse},Ri(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===zt.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),l=r*n;e.spin.radius>l?(e.spin.radius=l,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)}(s,t,h,o):Fi(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this.#Me()}redrawInit(){return this.#Me()}update(){for(const t of this.pathGenerators.values())t.update()}async#Me(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});t.loadBigCirclesPreset=gi,t.tsParticles=Oe}),Object.assign(globalThis.window||globalThis,{loadBigCirclesPreset:(globalThis.__tsParticlesInternals.presets.bigCircles||{}).loadBigCirclesPreset}),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.1.
|
|
2
|
+
/* Preset v4.1.1 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/engine'], factory) :
|