@tsparticles/preset-squares 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/preset-squares",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "tsParticles squares preset",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -106,13 +106,13 @@
106
106
  "./package.json": "./package.json"
107
107
  },
108
108
  "dependencies": {
109
- "@tsparticles/engine": "4.2.0",
110
- "@tsparticles/plugin-emitters": "4.2.0",
111
- "@tsparticles/plugin-hex-color": "4.2.0",
112
- "@tsparticles/shape-square": "4.2.0",
113
- "@tsparticles/updater-paint": "4.2.0",
114
- "@tsparticles/updater-rotate": "4.2.0",
115
- "@tsparticles/updater-size": "4.2.0"
109
+ "@tsparticles/engine": "4.2.1",
110
+ "@tsparticles/plugin-emitters": "4.2.1",
111
+ "@tsparticles/plugin-hex-color": "4.2.1",
112
+ "@tsparticles/shape-square": "4.2.1",
113
+ "@tsparticles/updater-paint": "4.2.1",
114
+ "@tsparticles/updater-rotate": "4.2.1",
115
+ "@tsparticles/updater-size": "4.2.1"
116
116
  },
117
117
  "publishConfig": {
118
118
  "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.2.0 */
2
+ /* Preset v4.2.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) :
@@ -795,7 +795,7 @@
795
795
  return this.#domArray;
796
796
  }
797
797
  get version() {
798
- return "4.2.0";
798
+ return "4.2.1";
799
799
  }
800
800
  addEventListener(type, listener) {
801
801
  this.#eventDispatcher.addEventListener(type, listener);
@@ -2230,7 +2230,7 @@
2230
2230
  })(EmitterClickMode || (EmitterClickMode = {}));
2231
2231
 
2232
2232
  async function loadEmittersPluginSimple(engine) {
2233
- engine.checkVersion("4.2.0");
2233
+ engine.checkVersion("4.2.1");
2234
2234
  await engine.pluginManager.register(async (e) => {
2235
2235
  const instancesManager = await getEmittersInstancesManager(e);
2236
2236
  await addEmittersShapesManager(e);
@@ -2278,7 +2278,7 @@
2278
2278
  }
2279
2279
 
2280
2280
  async function loadHexColorPlugin(engine) {
2281
- engine.checkVersion("4.2.0");
2281
+ engine.checkVersion("4.2.1");
2282
2282
  await engine.pluginManager.register(e => {
2283
2283
  e.pluginManager.addColorManager("hex", new HexColorManager());
2284
2284
  });
@@ -2347,7 +2347,7 @@
2347
2347
  }
2348
2348
 
2349
2349
  async function loadPaintUpdater(engine) {
2350
- engine.checkVersion("4.2.0");
2350
+ engine.checkVersion("4.2.1");
2351
2351
  await engine.pluginManager.register(e => {
2352
2352
  e.pluginManager.addParticleUpdater("paint", container => {
2353
2353
  return Promise.resolve(new PaintUpdater(e.pluginManager, container));
@@ -2576,7 +2576,7 @@
2576
2576
  }
2577
2577
 
2578
2578
  async function loadRotateUpdater(engine) {
2579
- engine.checkVersion("4.2.0");
2579
+ engine.checkVersion("4.2.1");
2580
2580
  await engine.pluginManager.register(e => {
2581
2581
  e.pluginManager.addParticleUpdater("rotate", container => {
2582
2582
  return Promise.resolve(new RotateUpdater(container));
@@ -2663,7 +2663,7 @@
2663
2663
  }
2664
2664
 
2665
2665
  async function loadSizeUpdater(engine) {
2666
- engine.checkVersion("4.2.0");
2666
+ engine.checkVersion("4.2.1");
2667
2667
  await engine.pluginManager.register(e => {
2668
2668
  e.pluginManager.addParticleUpdater("size", container => {
2669
2669
  return Promise.resolve(new SizeUpdater(container));
@@ -2687,7 +2687,7 @@
2687
2687
  }
2688
2688
 
2689
2689
  async function loadSquareShape(engine) {
2690
- engine.checkVersion("4.2.0");
2690
+ engine.checkVersion("4.2.1");
2691
2691
  await engine.pluginManager.register(e => {
2692
2692
  e.pluginManager.addShape(["edge", "square"], () => Promise.resolve(new SquareDrawer()));
2693
2693
  });
@@ -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.squares=t.__tsParticlesInternals.presets.squares||{}))}(this,function(t){"use strict";const e="generated",i=100,s=.5,n=1e3,a=0,r=0,o=0,l=1,c=0,h=0,d=1,u="random",p=2*Math.PI,f="true",g="false",m="canvas",y=255,w=360,v=100,P=100,b=.25;var x;function z(t){return"z"in t?t.z:o}!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"}(x||(x={}));class S{x;y;z;constructor(t=a,e=r,i=o){this.x=t,this.y=e,this.z=i}static get origin(){return S.create(a,r,o)}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 S.create(t.x,t.y,z(t))}static create(t,e,i){return"number"==typeof t?new S(t,e??r,i??o):new S(t.x,t.y,z(t))}add(t){return S.create(this.x+t.x,this.y+t.y,this.z+z(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=z(t)}copy(){return S.clone(this)}div(t){return S.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return S.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 S.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o)}setTo(t){this.x=t.x,this.y=t.y,this.z=z(t)}sub(t){return S.create(this.x-t.x,this.y-t.y,this.z-z(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=z(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends S{constructor(t=a,e=r){super(t,e,o)}static get origin(){return M.create(a,r)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??r):new M(t.x,t.y)}}function C(t){return"boolean"==typeof t}function k(t){return"string"==typeof t}function I(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function _(t){return Array.isArray(t)}function O(t){return null==t}const E=Math.PI/180;let R=Math.random;const L=t=>requestAnimationFrame(t),F=t=>{cancelAnimationFrame(t)};function A(){return B(R(),0,1-Number.EPSILON)}function T(t,e){return A()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function U(t){const e=q(t);let i=V(t);return e===i&&(i=0),T(i,e)}function $(t){return I(t)?t:U(t)}function V(t){return I(t)?t:t.min}function q(t){return I(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&I(t))return t;const i=V(t),s=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function H(t){return t*E}function j(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return function(t){return{x:(t.position?.x??A()*i)*t.size.width/i,y:(t.position?.y??A()*i)*t.size.height/i}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var G,X;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(G||(G={})),function(t){t.precise="precise",t.percent="percent"}(X||(X={}));function Y(){return globalThis.document}function Q(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function K(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function Z(t,...e){for(const i of e){if(O(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(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 D(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=>Z(void 0,t)):Z(e[n],a)}}return t}function J(t,e){return _(t)?t.map((t,i)=>e(t,i)):e(t,0)}function tt(t,e,i){return _(t)?K(t,e,i):t}function et(t,e){return function(t,e){if(t.mode!==X.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/i*e.width,y:t.y/i*e.height}:{width:t.width/i*e.width,height:t.height/i*e.height}}(t,e)}let it,st;function nt(t,e,i,s,n){if(s){let s={passive:!0};C(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 at(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 rt{#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 ot;!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"}(ot||(ot={}));class lt{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;#r=!1;#o=!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(ot.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 at(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 at(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.#r&&!this.#o){this.#o=!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.#o=!1,this.#r=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#r)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#o?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 ct=t=>(...e)=>{t(...e)},ht={debug:ct(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:ct(console.info),log:ct(console.log),trace:ct(console.trace),verbose:ct(console.log),warning:ct(console.warn)};function dt(){return ht}const ut="100%";class pt{pluginManager=new lt(this);#h=[];#d=new rt;#r=!1;get items(){return this.#h}get version(){return"4.2.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.#r||(await this.pluginManager.init(),this.#r=!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 Pi}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:r}=t,o=r?await async function(t){const e=tt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(dt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:r,index:a}):t.options,l=tt(o,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=Y();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===m)s=t,s.dataset[e]??=g,s.dataset[e]===f&&(s.style.width||=ut,s.style.height||=ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(m).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(m),s.dataset[e]=f,t.appendChild(s)),s.style.width||=ut,s.style.height||=ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=Y();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=f,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 ft,gt,mt,yt,wt,vt,Pt,bt,xt,zt,St;!function(t){t.circle="circle",t.rectangle="rectangle"}(ft||(ft={}));class Mt{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 Ct extends Mt{radius;constructor(t,e,i){super(t,e,ft.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,function(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}(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 Ct||t.type===ft.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof kt||t.type===ft.rectangle){const e=t,{width:i,height:r}=e.size;return Math.pow(n-i,2)+Math.pow(a-r,2)<=s**2||n<=s+i&&a<=s+r||n<=i||a<=r}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class kt extends Mt{size;constructor(t,e,i,s){super(t,e,ft.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 Ct)return t.intersects(this);if(!(t instanceof kt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,r=a.width,o=a.height;return n.x<s.x+e&&n.x+r>s.x&&n.y<s.y+i&&n.y+o>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"}(gt||(gt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(mt||(mt={})),function(t){t.delete="delete",t.wait="wait"}(yt||(yt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(wt||(wt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(vt||(vt={})),function(t){t.none="none",t.max="max",t.min="min"}(Pt||(Pt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(bt||(bt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(xt||(xt={})),function(t){t.max="max",t.min="min",t.random="random"}(zt||(zt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(St||(St={}));class It{load(t){O(t)||this.doLoad(t)}}function Dt(t,...e){for(const i of e)t.load(i)}function _t(t,e,i){void 0!==i&&(t[e]=i)}function Ot(t,e,i){void 0!==i&&(t[e]=W(i))}function Et(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Rt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Lt extends It{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ot(this,"count",t.count),_t(this,"enable",t.enable),Ot(this,"speed",t.speed),Ot(this,"decay",t.decay),Ot(this,"delay",t.delay),_t(this,"sync",t.sync)}}class Ft extends Lt{mode=mt.auto;startValue=zt.random;doLoad(t){super.doLoad(t),_t(this,"mode",t.mode),_t(this,"startValue",t.startValue)}}class At extends Lt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),_t(this,"max",t.max),_t(this,"min",t.min),Ot(this,"offset",t.offset)}}class Tt extends It{h=new At(0,w);l=new At(0,P);s=new At(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Bt extends It{value="";static create(t,e){const i=new Bt;return i.load(t),void 0!==e&&(k(e)||_(e)?i.load({value:e}):i.load(e)),i}doLoad(t){O(t.value)||(this.value=t.value)}}class Ut extends Bt{animation=new Tt;static create(t,e){const i=new Ut;return i.load(t),void 0!==e&&(k(e)||_(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class $t extends It{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Bt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Bt.create(this.color,t.color)),_t(this,"image",t.image),_t(this,"position",t.position),_t(this,"repeat",t.repeat),_t(this,"size",t.size),_t(this,"opacity",t.opacity)}}class Vt extends It{enable=!0;zIndex=0;doLoad(t){_t(this,"enable",t.enable),_t(this,"zIndex",t.zIndex)}}class qt extends It{delay=.5;enable=!0;doLoad(t){_t(this,"delay",t.delay),_t(this,"enable",t.enable)}}class Wt extends It{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Z(this.options[t]??{},i))}_t(this,"close",t.close),_t(this,"type",t.type)}}class Ht extends It{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Ut.create(this.color,t.color)),_t(this,"enable",t.enable),Ot(this,"opacity",t.opacity)}}class jt extends It{offset=0;value=90;doLoad(t){Ot(this,"offset",t.offset),Ot(this,"value",t.value)}}class Nt extends It{mode=X.percent;radius=0;x=50;y=50;doLoad(t){_t(this,"x",t.x),_t(this,"y",t.y),_t(this,"mode",t.mode),_t(this,"radius",t.radius)}}class Gt extends It{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ot(this,"acceleration",t.acceleration),_t(this,"enable",t.enable),_t(this,"inverse",t.inverse),Ot(this,"maxSpeed",t.maxSpeed)}}class Xt extends It{value=0;doLoad(t){O(t.value)||(this.value=W(t.value))}}class Yt extends Xt{animation=new Lt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class Qt extends Yt{animation=new Ft}class Kt extends It{clamp=!0;delay=new Xt;enable=!1;generator;options={};doLoad(t){_t(this,"clamp",t.clamp),this.delay.load(t.delay),_t(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=Z(this.options,t.options))}}class Zt extends It{bottom;default=wt.out;left;right;top;doLoad(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 Jt extends It{acceleration=0;enable=!1;position;doLoad(t){Ot(this,"acceleration",t.acceleration),_t(this,"enable",t.enable),t.position&&(this.position=Z({},t.position))}}class te extends It{angle=new jt;center=new Nt;decay=0;direction=x.none;distance={};drift=0;enable=!1;gravity=new Gt;outModes=new Zt;path=new Kt;random=!1;size=!1;speed=2;spin=new Jt;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(I(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ot(this,"decay",t.decay),_t(this,"direction",t.direction),void 0!==t.distance&&(this.distance=I(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ot(this,"drift",t.drift),_t(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),_t(this,"random",t.random),_t(this,"size",t.size),Ot(this,"speed",t.speed),this.spin.load(t.spin),_t(this,"straight",t.straight),_t(this,"vibrate",t.vibrate),_t(this,"warp",t.warp)}}class ee extends It{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Ut.create(this.color,t.color)),Ot(this,"width",t.width),Ot(this,"opacity",t.opacity)}}class ie extends It{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Ut.create(this.color,t.color)),Et(this,"fill",t.fill,()=>new Ht),Et(this,"stroke",t.stroke,()=>new ee)}}class se extends Xt{value=1}class ne extends It{horizontal=new se;vertical=new se;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ae extends It{enable=!1;height=1080;width=1920;doLoad(t){_t(this,"enable",t.enable),_t(this,"width",t.width),_t(this,"height",t.height)}}class re extends It{mode=yt.delete;value=0;doLoad(t){_t(this,"mode",t.mode),_t(this,"value",t.value)}}class oe extends It{density=new ae;limit=new re;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),_t(this,"value",t.value)}}class le extends It{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Z(this.options[t]??{},i))}_t(this,"close",t.close),_t(this,"type",t.type)}}class ce extends Xt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),_t(this,"opacityRate",t.opacityRate),_t(this,"sizeRate",t.sizeRate),_t(this,"velocityRate",t.velocityRate)}}class he extends It{bounce=new ne;effect=new Wt;groups={};move=new te;number=new oe;paint;palette;reduceDuplicates=!1;shape=new le;zIndex=new ce;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ie,this.paint.color=new Ut,this.paint.color.value="#fff",this.paint.fill=new Ht,this.paint.fill.enable=!0}doLoad(t){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]=Z(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&&(_(e)?this.paint=J(e,t=>{const e=new ie;return e.load(t),e}):_(this.paint)?(this.paint=new ie,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=(_(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 de(t,e,...i){const s=new he(t,e);return Dt(s,...i),s}class ue extends It{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new $t,this.fullScreen=new Vt,this.particles=de(this.#p,this.#u),this.resize=new qt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,J(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),_t(this,"autoPlay",t.autoPlay),_t(this,"clear",t.clear),_t(this,"key",t.key),_t(this,"name",t.name),Ot(this,"delay",t.delay),_t(this,"detectRetina",t.detectRetina),Ot(this,"duration",t.duration),_t(this,"fpsLimit",t.fpsLimit),_t(this,"hdr",t.hdr),_t(this,"pauseOnBlur",t.pauseOnBlur),_t(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),_t(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Z(this.style,t.style),_t(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))}}const pe=new Map;function fe(t,e){let i=pe.get(t);return i||(i=e(),pe.size>2e3&&pe.clear(),pe.set(t,i)),i}function ge(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return me(t,n.value,i,s);if(_(n.value)){const e=K(n.value,i,s);if(!e)return;return ge(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=k(e)?{value:e}:e;if(k(n.value))return n.value===u?function(){const t=0,e=256,i=()=>Math.floor(T(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(_(n.value)){const e=K(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 ye(t,e,i,n=!0){const a=ge(t,e,i,n);return a?function(t){const e=t.r/y,i=t.g/y,n=t.b/y,a=Math.max(e,i,n),r=Math.min(e,i,n),o={h:0,l:(a+r)*s,s:0};a!==r&&(o.s=o.l<s?(a-r)/(a+r):(a-r)/(2-a-r),o.h=e===a?(i-n)/(a-r):i===a?2+(n-e)/(a-r):4+(e-i)/(a-r));o.l*=P,o.s*=v,o.h*=60,o.h<0&&(o.h+=w);o.h>=w&&(o.h-=w);return o}(a):void 0}function we(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}function ve(t,e,i){const s=i??1;return fe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Pe(t,e,i){const n=i??1;return fe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?ve(function(t){const e=(t.h%w+w)%w,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(P,t.l)),a=e/w,r=i/v,o=n/P;if(0===i){const t=Math.round(o*y);return{r:t,g:t,b:t}}const l=o<s?o*(1+r):o+r-o*r,c=2*o-l,h=1/3,d=Math.min(y,y*we(c,l,a+h)),u=Math.min(y,y*we(c,l,a)),p=Math.min(y,y*we(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function be(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function xe(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:w},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(ze(s.h,e.h,i),ze(s.s,e.s,i),ze(s.l,e.l,i)),s}function ze(t,e,s){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=$(e.speed)/i*s,t.decay=1-$(e.decay),t.status=St.increasing,t.loops=0,t.maxLoops=$(e.count),t.time=0,t.delayTime=$(e.delay)*n,e.sync||(t.velocity*=A(),t.value*=A()),t.initialValue=t.value,t.offset=W(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?U(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,r=t.max,o=t.min;e&&t.status!==St.increasing?(t.value-=n,t.value<o&&(t.loops??=0,t.loops++,t.status=St.increasing)):(t.value+=n,t.value>r&&(t.loops??=0,t.loops++,e?t.status=St.decreasing:t.value-=r)),t.velocity&&1!==a&&(t.velocity*=a),t.value=B(t.value,o,r)}function Me(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 Ce=new pt;class ke{count;delay;duration;wait=!1;load(t){O(t)||(_t(this,"count",t.count),Ot(this,"delay",t.delay),Ot(this,"duration",t.duration),_t(this,"wait",t.wait))}}class Ie{delay=.1;quantity=1;load(t){O(t)||(Ot(this,"quantity",t.quantity),Ot(this,"delay",t.delay))}}class De{color=!1;opacity=!1;load(t){O(t)||(_t(this,"color",t.color),_t(this,"opacity",t.opacity))}}class _e{options={};replace=new De;type="square";load(t){O(t)||(void 0!==t.options&&(this.options=Z({},t.options??{})),this.replace.load(t.replace),_t(this,"type",t.type))}}class Oe{height=0;mode=X.percent;width=0;load(t){O(t)||(_t(this,"mode",t.mode),_t(this,"height",t.height),_t(this,"width",t.width))}}class Ee{fill;stroke;load(t){O(t)||(t.fill&&(this.fill??=new Ht,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ee,this.stroke.load(t.stroke)))}}class Re{autoPlay=!0;direction;domId;fill=!0;life=new ke;name;particles;position;rate=new Ie;shape=new _e;size;spawn=new Ee;spawnFillColor;spawnStrokeColor;startCount=0;load(t){O(t)||(_t(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Oe,this.size.load(t.size)),_t(this,"direction",t.direction),_t(this,"domId",t.domId),_t(this,"fill",t.fill),this.life.load(t.life),_t(this,"name",t.name),this.particles=J(t.particles,t=>Z({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new Ut,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new Ut,this.spawnStrokeColor.load(t.spawnStrokeColor)),_t(this,"startCount",t.startCount))}}class Le{id="emitters";#m;constructor(t){this.#m=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return bi});return new e(this.#m,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=J(i.emitters,t=>{const e=new Re;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return _(e)&&!!e.length||void 0!==e}}const Fe=new WeakMap;var Ae,Te;async function Be(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Fe.get(e);return i||(i=Promise.resolve().then(function(){return Si}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Fe.delete(e),t}),Fe.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return zi}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Le(e))})}!function(t){t.emitter="emitter"}(Ae||(Ae={})),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 Ue=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ve{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(Ue,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=$e.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 qe(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}class We{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=tt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,r=s?.fill,o=s?.stroke;if(r){const i=Ut.create(void 0===a?void 0:Ut.create(void 0,a),r.color);t.fillEnabled=r.enable,t.fillOpacity=$(r.opacity),t.fillAnimation=i.animation;const s=ye(this.#p,i);s&&(t.fillColor=xe(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(o){const i=Ut.create(void 0===a?void 0:Ut.create(void 0,a),o.color);t.strokeWidth=$(o.width)*e.retina.pixelRatio,t.strokeOpacity=$(o.opacity??1),t.strokeAnimation=i.animation;const s=ye(this.#p,i)??t.getFillColor();s&&(t.strokeColor=xe(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),r=!!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||r)}update(t,e){this.isEnabled(t)&&(Me(t.fillColor,e),Me(t.strokeColor,e))}}async function He(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new We(t.pluginManager,e)))})}class je{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(_t(this,"enable",t.enable),Ot(this,"speed",t.speed),Ot(this,"decay",t.decay),_t(this,"sync",t.sync))}}class Ne extends Xt{animation=new je;direction=gt.clockwise;path=!1;load(t){O(t)||(super.load(t),_t(this,"direction",t.direction),this.animation.load(t.animation),_t(this,"path",t.path))}}function Ge(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,r=e.min,o=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case St.increasing:e.value+=a;break;case St.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case St.increasing:e.value>=o&&(i?e.status=St.decreasing:e.value-=o,e.loops??=0,e.loops++);break;case St.decreasing:e.value<=r&&(i?e.status=St.increasing:e.value+=o,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Pt.max:i>=n&&t.destroy();break;case Pt.min:i<=s&&t.destroy()}}(t,s,e.value,r,o),t.destroyed||(e.value=B(e.value,r,o))}}class Xe{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:H($(e.value)),min:0,max:p},t.pathRotation=e.path;let i=e.direction;if(i===gt.random){i=Math.floor(2*A())>0?gt.counterClockwise:gt.clockwise}switch(i){case gt.counterClockwise:case"counterClockwise":t.rotate.status=St.decreasing;break;case gt.clockwise:t.rotate.status=St.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-$(s.decay),t.rotate.velocity=$(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=A())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Rt(t,"rotate",Ne,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Ge(t,t.rotate,!1,Pt.none,e),t.rotation=t.rotate.value))}}async function Ye(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Xe(t)))})}class Qe extends Ft{destroy=Pt.none;load(t){super.load(t),O(t)||_t(this,"destroy",t.destroy)}}class Ke extends Qt{animation=new Qe;value=3;load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ze{#u;constructor(t){this.#u=t}init(t){const e=this.#u,s=t.options.size;if(!s)return;const n=s.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/i*e.retina.reduceFactor,n.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Rt(t,"size",Ke,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=function(t,e){const i=t.value,a=t.animation,r={delayTime:$(a.delay)*n,enable:a.enable,value:$(t.value)*e,max:q(i)*e,min:V(i)*e,loops:0,maxLoops:$(a.count),time:0};if(a.enable){switch(r.decay=1-$(a.decay),a.mode){case mt.increase:r.status=St.increasing;break;case mt.decrease:r.status=St.decreasing;break;case mt.random:r.status=A()>=s?St.increasing:St.decreasing}const t=a.mode===mt.auto;switch(a.startValue){case zt.min:r.value=r.min,t&&(r.status=St.increasing);break;case zt.max:r.value=r.max,t&&(r.status=St.decreasing);break;case zt.random:default:r.value=U(r),t&&(r.status=A()>=s?St.increasing:St.decreasing)}}return r.initialValue=r.value,r}(i,e),t.retina.sizeAnimationSpeed=$(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ge(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Je(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Ze(t)))})}class ti{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function ei(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new ti))})}const ii={particles:{paint:{stroke:{width:5,color:{value:["#5bc0eb","#fde74c","#9bc53d","#e55934","#fa7921","#2FF3E0","#F8D210","#FA26A0","#F51720"]}},fill:{enable:!1}},shape:{type:"square"},rotate:{value:0,direction:gt.counterClockwise,animation:{enable:!0,speed:2,sync:!0}},size:{value:{min:1,max:500},animation:{enable:!0,startValue:zt.min,speed:60,sync:!0,destroy:Pt.max}}},background:{color:"#000"},emitters:{position:{y:50,x:50},rate:{delay:1,quantity:1}}};async function si(t){await t.pluginManager.register(async t=>{await Promise.all([qe(t),Be(t),ei(t),Ye(t),Je(t),He(t)]),t.pluginManager.addPreset("squares",ii)})}const ni=globalThis;ni.loadSquaresPreset=si,ni.tsParticles=Ce;function ai(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ri{#w;#v;#P;#b;#x;#u;#z;#S;#M;#C;#k;#I;#D;#_;#p;#O;#E;#R={};#L=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#v=i,this.#z=null,this.#E=[],this.#O=[],this.#x=[],this.#w=[],this.#P=[],this.#b=[],this.#M=[],this.#C=[],this.#k=[],this.#I=[],this.#_=[],this.#D=[]}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(a,r,this.#v.size.width,this.#v.size.height)})}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.#O=[],this.#x=[],this.#w=[],this.#P=[],this.#b=[],this.#M=[],this.#C=[],this.#k=[],this.#I=[],this.#_=[],this.#D=[]}draw(t){const e=this.#z;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,r]=this.#A(t);if(a??=s,r??=n,!a&&!r)return;const o=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#F,f=this.#R,g=a?Pe(a,o.hdr,h*d):void 0,m=r?Pe(r,o.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#k)i.drawParticleSetup?.(s,t,e);this.#T(s,t,i,d,f,p),this.#B({container:o,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#U(t);for(const i of this.#C)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#M)this.#$(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#_)e.drawSettingsSetup?.(i,t);for(const e of this.#I)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#b)e.clearDraw?.(i,t);for(const e of this.#D)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#x=[],this.#w=[],this.#P=[],this.#b=[],this.#M=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[],this.#D=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#x.push(t),t.canvasClear&&this.#w.push(t),t.canvasPaint&&this.#P.push(t),t.drawParticle&&this.#M.push(t),t.drawParticleSetup&&this.#k.push(t),t.drawParticleCleanup&&this.#C.push(t),t.draw&&this.#I.push(t),t.drawSettingsSetup&&this.#_.push(t),t.drawSettingsCleanup&&this.#D.push(t),t.clearDraw&&this.#b.push(t)}initUpdaters(){this.#E=[],this.#O=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#O.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let t=!1;for(const e of this.#P)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(a,r,this.#v.size.width,this.#v.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,a,r,this.#v.size.width,this.#v.size.height),i.globalAlpha=s})}setContext(t){this.#z=t,this.#z&&(this.#z.globalCompositeOperation="source-over")}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(a,r,this.#v.size.width,this.#v.size.height)})}#U(t){for(const e of this.#O)e.afterDraw?.(t)}#T(t,e,i,s,n,a){for(const r of this.#E){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(e,t,i,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)ai(a,t,e)}r.beforeDraw?.(e)}}#V(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#B(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:r,opacity:o,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 m={context:i,particle:s,radius:r,drawRadius:1*r,opacity:o,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?.(m);const y=s.effect?c.get(s.effect):void 0,w=s.shape?h.get(s.shape):void 0;this.#q(y,m),this.#W(w,m),this.#H(w,m),this.#j(w,m),this.#V(y,m),i.resetTransform()}#$(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#H(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())}#j(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#W(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#A(t){let e,i;for(const s of this.#x)if(!e&&s.particleFillColor&&(e=ye(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ye(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#L[0]=e,this.#L[1]=i,this.#L}}const oi=new WeakMap;function li(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 ci{domElement;render;renderCanvas;size;zoom=1;#u;#N;#G;#X;#p;#Y;#Q;#K;#Z;constructor(t,e){this.#p=t,this.#u=e,this.render=new ri(t,e,this),this.#K={height:0,width:0};const i=e.retina.pixelRatio,s=this.#K;this.size={height:s.height*i,width:s.width*i},this.#N=!1,this.#Q=[],this.#Y="none"}get#J(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#N){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#tt();this.render.destroy(),this.#Q=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Z?this.#Z:{x:e*s/t,y:i*s/t}}init(){this.#et(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.#it()}),this.resize(),this.#st(),this.initBackground(),this.#et(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#nt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=ge(this.#p,e.color);s.backgroundColor=n?ve(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#Q=[];for(const t of this.#u.plugins)t.resize&&this.#Q.push(t)}loadCanvas(t){this.#N&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#N=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=oi.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 oi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#X=function(t){const e=Y().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(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}(s.style));const n=this.#K,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const r=this.#u.retina.pixelRatio,o=this.size;a.height=o.height=n.height*r,a.width=o.width=n.width*r}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.#K,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,r={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&r.height===i.height&&r.width===i.width)return!1;const o={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=r.width,i.height=l.height=r.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/o.width,height:s.height/o.height}),!0}setPointerEvents(t){this.domElement&&(this.#Y=t,this.#it())}setZoom(t,e){this.zoom=t,this.#Z=e}stop(){this.#et(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.#at(),e&&await t.refresh()}#at(){for(const t of this.#Q)t.resize?.()}#nt(){const t=this.#u.actualOptions.hdr&&Q("(color-gamut: p3)")?.matches&&Q("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#st(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#J?this.#rt():this.#tt();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")}}}#it(){const t=this.domElement;if(!t)return;this.#et(t=>{t.disconnect()}),this.#st(),this.initBackground();const e=this.#Y;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#et(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#tt(){const t=this.domElement,e=this.#X;t&&e&&li(t,e,!0)}#et(t){this.#G&&t(this.#G)}#rt(){const t=this.domElement;t&&li(t,function(t){if(it!==t||!st){it=t;const e=Y().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}st=e}return st}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class hi{#u;#ot;#lt;#ct;constructor(t){this.#u=t,this.#ot={visibilityChange:()=>{this.#ht()},resize:()=>{this.#dt()}}}addListeners(){this.#ut(!0)}removeListeners(){this.#ut(!1)}#ht(){const t=this.#u;t.actualOptions.pauseOnBlur&&(Y().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#dt(){this.#ct&&(clearTimeout(this.#ct),this.#ct=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ct=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*n)}#ut(t){const e=this.#ot;this.#pt(t),nt(document,"visibilitychange",e.visibilityChange,t,!1)}#pt(t){const e=this.#ot,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void nt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#lt&&!t?(s&&this.#lt.unobserve(s),this.#lt.disconnect(),this.#lt=void 0):!this.#lt&&t&&s&&(this.#lt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#dt()}),this.#lt.observe(s))}}function di(t){if(e=t.outMode,i=t.checkModes,!(e===i||_(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)}function ui(t,e){const i=t%e;return i<0?i+e:i}function pi(t,e,i,s){const n=de(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=tt(n.effect.type,t.id,a),t.shape=tt(n.shape.type,t.id,a);const r=n.effect,o=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=tt(e,t.id,a);i&&(t.effect=i)}r.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=tt(e,t.id,a);i&&(t.shape=i)}o.load(s.shape)}}if(t.effect===u){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===u){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return Z({close:e.close},tt(n,i,s))}(t.effect,r,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return Z({close:e.close},tt(n,i,s))}(t.shape,o,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class fi{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;#ft={fillOpacity:1,opacity:1,strokeOpacity:1};#gt=S.origin;#mt={sin:0,cos:0};#yt={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(ot.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.#wt(this.bubble.color??be(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*s}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??$(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#ft.fillOpacity=i*s*e,this.#ft.opacity=i*e,this.#ft.strokeOpacity=i*n*e,this.#ft}getPosition(){return this.#gt.x=this.position.x+this.offset.x,this.#gt.y=this.position.y+this.offset.y,this.#gt.z=this.position.z,this.#gt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#mt.sin=Math.sin(t),this.#mt.cos=Math.cos(t),this.#mt}getStrokeColor(){return this.#wt(this.bubble.color??be(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#yt.a=e.cos*(t.a??l),this.#yt.b=i?e.sin*(t.b??1):t.b??c,this.#yt.c=i?-e.sin*(t.c??1):t.c??h,this.#yt.d=e.cos*(t.d??d),this.#yt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=xt.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=pi(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#vt(e),this.initialVelocity=this.#Pt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#bt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#bt({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=ui(t,p);return e>=Math.PI*s&&e<3*Math.PI*s}if(this.roll.horizontal){const e=ui(t+Math.PI*s,p);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ui(t,p);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#xt(t,e){let i=0,s=t?S.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,r=this.options.move.outModes,o=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return S.create(i.x,i.y,e)}const t=N({size:l,position:s}),c=S.create(t.x,t.y,e);this.#zt(c,o,r.left??r.default),this.#zt(c,o,r.right??r.default),this.#St(c,o,r.top??r.default),this.#St(c,o,r.bottom??r.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}}#Pt(){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===x.inside||t.direction===x.outside)return e;const i=H($(t.angle.value)),n=H($(t.angle.offset)),a={left:n-i*s,right:n+i*s};return t.straight||(e.angle+=U(W(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=A()),e}#zt(t,e,i){di({outMode:i,checkModes:[wt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#St(t,e,i){di({outMode:i,checkModes:[wt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Mt(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===wt.bounce;return t===G.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===G.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===G.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===G.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"}}#Ct(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#bt(t){const e=this.#Mt(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,r=n?.isInsideCanvas;if(!a&&!r)return e;const o=this.#Ct(t.direction,t.outMode),l=a?this.#kt(a(o),"shape"):void 0,c=r?this.#kt(r(o),"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}#wt(t){return 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===vt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#vt(t){const e=this.#u,i=Math.floor($(this.options.zIndex.value)),n=this.#xt(t,B(i,0,e.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...et(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(I(t))return H(t);switch(t){case x.top:return-Math.PI*s;case x.topRight:return-Math.PI*b;case x.right:return 0;case x.bottomRight:return Math.PI*b;case x.bottom:return Math.PI*s;case x.bottomLeft:return.75*Math.PI;case x.left:return Math.PI;case x.topLeft:return.75*-Math.PI;case x.inside:return Math.atan2(i.y-e.y,i.x-e.x);case x.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return A()*p}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case x.inside:this.outType=xt.inside;break;case x.outside:this.outType=xt.outside}this.offset=M.origin}#kt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class gi{#It;#Dt=new Map;#_t=[];#Ot;#Et;#Rt=[];#Lt;constructor(t){this.#It=t,this.#Ot=0,this.#Lt=0}clear(){this.#Dt.clear();const t=this.#Et;t&&(this.#It=t),this.#Et=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ft(e,i);this.#Dt.has(s)||this.#Dt.set(s,[]),this.#Dt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#At(t);if(!s)return i;const n=Math.floor(s.minX/this.#It),a=Math.floor(s.maxX/this.#It),r=Math.floor(s.minY/this.#It),o=Math.floor(s.maxY/this.#It);for(let s=n;s<=a;s++)for(let n=r;n<=o;n++){const a=`${s}_${n}`,r=this.#Dt.get(a);if(r)for(const s of r)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Tt(t.x,t.y,e),a=this.query(n,i,s);return this.#Bt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ut(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Bt(),a}setCellSize(t){this.#Et=t}#Tt(t,e,i){return(this.#_t[this.#Ot++]??=new Ct(t,e,i)).reset(t,e,i)}#Ut(t,e,i,s){return(this.#Rt[this.#Lt++]??=new kt(t,e,i,s)).reset(t,e,i,s)}#Ft(t,e){return`${Math.floor(t/this.#It)}_${Math.floor(e/this.#It)}`}#At(t){if(t instanceof Ct){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 kt){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}#Bt(){this.#Ot=0,this.#Lt=0}}class mi{checkParticlePositionPlugins;grid;#$t;#u;#Vt;#qt;#Wt;#Ht;#jt;#Nt;#p;#Gt;#Xt;#Yt;#Qt;#Kt;#Zt;constructor(t,e){this.#p=t,this.#u=e,this.#Wt=0,this.#$t=[],this.#Gt=[],this.#qt=0,this.#Vt=new Map,this.#Ht=new Map,this.#Zt=this.#Jt(this.#u.zLayers),this.grid=new gi(100),this.checkParticlePositionPlugins=[],this.#jt=[],this.#Nt=[],this.#Yt=[],this.#Xt=[],this.#Kt=[]}get count(){return this.#$t.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#Vt.get(i)??this.#qt,r=this.count;if(a>0)switch(n){case yt.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case yt.wait:if(r>=a)return}try{const n=this.#Gt.pop()??new fi(this.#p,this.#u);n.init(this.#Wt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#$t.push(n),this.#te(n),this.#Wt++,this.#u.dispatchEvent(ot.particleAdded,{particle:n}),n):void this.#Gt.push(n)}catch(t){dt().warning(`error adding particle: ${t}`)}}clear(){this.#$t=[],this.#Ht.clear(),this.#ee(this.#u.zLayers)}destroy(){this.#$t=[],this.#Gt.length=0,this.#Ht.clear(),this.#Zt=[],this.checkParticlePositionPlugins=[],this.#jt=[],this.#Nt=[],this.#Yt=[],this.#Xt=[],this.#Kt=[]}drawParticles(t){for(let e=this.#Zt.length-1;e>=0;e--){const i=this.#Zt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#$t.filter(t)}find(t){return this.#$t.find(t)}get(t){return this.#$t[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Kt=[],this.#Nt=[],this.#Yt=[],this.#jt=[],this.#Xt=[],this.#Ht.clear(),this.#ee(t.zLayers),this.grid=new gi(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Kt.push(e),e.particleUpdate&&this.#Nt.push(e),e.postUpdate&&this.#Yt.push(e),e.particleReset&&this.#jt.push(e),e.postParticleUpdate&&this.#Xt.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.#$t.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.#ie(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.#se(n,i,t)}this.#se(t.particles,i)}setResizeFactor(t){this.#Qt=t}update(t){this.grid.clear();for(const e of this.#Kt)e.update?.(t);const e=this.#ne(t);for(const e of this.#Yt)e.postUpdate?.(t);if(this.#ae(t,e),e.size)for(const t of e)this.remove(t);this.#Qt=void 0}#re(...t){this.#Gt.push(...t)}#se(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#qt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Vt.set(i,s?.number.limit.value??n.limit.value));const a=this.#oe(n.density),r=n.value,o=n.limit.value>0?n.limit.value:r,l=Math.min(r,o)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#qt=n.limit.value*a:this.#Vt.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)}#Jt(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#le(t){const e=this.#Zt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#oe(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}#te(t){const e=this.#le(t.position.z),i=this.#Zt[e];i&&(i.push(t),this.#Ht.set(t.id,e))}#ie(t,e,i){const s=this.#$t[t];return!!s&&(s.group===e&&(this.#$t.splice(t,1),this.#ce(s),s.destroy(i),this.#u.dispatchEvent(ot.particleRemoved,{particle:s}),this.#re(s),!0))}#ce(t){const e=this.#Ht.get(t.id)??this.#le(t.position.z),i=this.#Zt[e];if(!i)return void this.#Ht.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Ht.delete(t.id)}#ee(t){const e=Math.max(Math.floor(t),1);if(this.#Zt.length===e)for(const t of this.#Zt)t.length=0;else this.#Zt=this.#Jt(e)}#he(t){const e=this.#le(t.position.z),i=this.#Ht.get(t.id);if(void 0===i)return void this.#te(t);if(i===e)return;const s=this.#Zt[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#Zt[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Ht.set(t.id,e)}else this.#Ht.set(t.id,e)}#ne(t){const e=new Set,i=this.#Qt;for(const s of this.#$t){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.#jt)t.particleReset?.(s);for(const e of this.#Nt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ae(t,e){for(const i of this.#$t)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.#Xt)e.postParticleUpdate?.(i,t);this.#he(i)}}}class yi{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=$(s.gravity.maxSpeed)*i,a.moveDrift=$(s.drift)*i,a.moveSpeed=$(s.speed)*i;const r=a.maxDistance;r.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,r.vertical=void 0===n.vertical?void 0:n.vertical*i}}function wi(t){return!t.destroyed}function vi(t,e,...i){const s=new ue(t,e);return Dt(s,...i),s}var Pi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#de;#ue;#pe={value:0,factor:0};#fe;#ge;#me;#ye;#we;#ve;#Pe;#be;#xe;#ze;#Se;#p;#Me;#Ce;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#fe=e,this.#xe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Me=!1,this.#de=0,this.#me=0,this.#be=0,this.#we=!0,this.started=!1,this.destroyed=!1,this.#Se=!0,this.#Pe=0,this.zLayers=100,this.pageHidden=!1,this.#Ce=a,this.#ve=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new yi(this),this.canvas=new ci(this.#p,this),this.particles=new mi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#ze=vi(this.#p,this),this.actualOptions=vi(this.#p,this),this.#ye=new hi(this),this.dispatchEvent(ot.containerBuilt)}get animationStatus(){return!this.#Se&&!this.pageHidden&&wi(this)}get options(){return this.#ze}get sourceOptions(){return this.#Ce}addLifeTime(t){this.#be+=t}alive(){return!this.#me||this.#be<=this.#me}destroy(t=!0){if(wi(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.#xe(t),this.dispatchEvent(ot.containerDestroyed)}}dispatchEvent(t,e){this.#fe(t,{container:this,data:e})}draw(t){if(!wi(this))return;let e=t;this.#ge=L(t=>{e&&(this.#Pe=void 0,e=!1),this.#ke(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}dt().error(`Export plugin with type ${t} not found`)}async init(){if(!wi(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.#ze=vi(this.#p,this,this.#ve,this.sourceOptions),this.actualOptions=vi(this.#p,this,this.#ze),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:a,smooth:r,zLayers:o}=this.actualOptions;this.hdr=a,this.zLayers=o,this.#me=$(i)*n,this.#de=$(e)*n,this.#be=0,this.fpsLimit=s>0?s:120,this.#Me=r;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ot.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ot.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(wi(this)&&(void 0!==this.#ge&&(t=this.#ge,F(t),this.#ge=void 0),!this.#Se)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Se=!0),this.dispatchEvent(ot.containerPaused)}}play(t){if(!wi(this))return;const e=this.#Se||t;if(!this.#we||this.actualOptions.autoPlay){if(this.#Se&&(this.#Se=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ot.containerPlay),this.draw(e??!1)}else this.#we=!1}async refresh(){if(wi(this))return this.stop(),this.start()}async reset(t){if(wi(this))return this.#ve=t,this.#Ce=t,this.#ze=vi(this.#p,this,this.#ve,this.sourceOptions),this.actualOptions=vi(this.#p,this,this.#ze),this.refresh()}async start(){wi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#ye.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ot.containerStarted),this.play(),t()};this.#ue=setTimeout(()=>{e()},this.#de)}))}stop(){if(wi(this)&&this.started){this.#ue&&(clearTimeout(this.#ue),this.#ue=void 0),this.#we=!0,this.started=!1,this.#ye.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.#Ce=this.#ze,this.dispatchEvent(ot.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ke(t){try{if(!this.#Me&&void 0!==this.#Pe&&t<this.#Pe+n/this.fpsLimit)return void this.draw(!1);if(this.#Pe??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/n}(this.#pe,t-this.#Pe,this.fpsLimit,this.#Me),this.addLifeTime(this.#pe.value),this.#Pe=t,this.#pe.value>n)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#pe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){dt().error("error in animation loop",t)}}}});var bi=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#m;constructor(t,e){this.#m=t,this.#u=e,this.#m.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(_(t))for(const e of t)await this.#m.addEmitter(this.#u,e);else await this.#m.addEmitter(this.#u,t)}pause(){for(const t of this.#m.getArray(this.#u))t.pause()}play(){for(const t of this.#m.getArray(this.#u))t.play()}resize(){for(const t of this.#m.getArray(this.#u))t.resize()}stop(){this.#m.clear(this.#u)}update(t){this.#m.getArray(this.#u).forEach(e=>{e.update(t)})}}});const xi=new Map;var zi=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||xi.set(t,e)}getShapeGenerator(t){return xi.get(t)}getSupportedShapeGenerators(){return xi.keys()}}});var Si=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ie;#p;constructor(t){this.#Ie=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Re;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ki}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Ie.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ie.get(t);return e||(e=[],this.#Ie.set(t,e)),e}initContainer(t){this.#Ie.has(t)||(this.#Ie.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||I(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});function Mi(t,e,i,s){(t.paint??=new ie).fill={color:Ut.create(void 0,{value:e}),enable:s,opacity:i}}function Ci(t,e,i,s){(t.paint??=new ie).stroke={color:Ut.create(void 0,{value:e}),opacity:i,width:s}}var ki=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#De;#_e;#Oe;#me;#Ee;#Re;#Le;#Fe;#Ae;#G;#Te;#Se;#p;#Be;#lt;#Ue;#$e;#Ve;#qe;constructor(t,e,s,a,r){this.#p=t,this.#u=e,this.#Be=s,this.#De=0,this.#_e=0,this.#Oe=0,this.#Fe=r,a instanceof Re?this.options=a:(this.options=new Re,this.options.load(a)),this.#Ve=e.retina.reduceFactor?$(this.options.life.delay??0)*n/e.retina.reduceFactor:1/0,this.position=this.#Fe??this.#xt(),this.name=this.options.name,this.fill=this.options.fill,this.#Re=!this.options.life.wait,this.#qe=!1;const o=Z({},this.options.particles);if(o.move??={},o.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=ye(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=ye(this.#p,this.options.spawn.stroke.color)),this.#Se=!this.options.autoPlay,this.#Te=o,this.#$e=this.#We(),this.size=this.#$e.mode===X.percent?{width:this.#$e.width/i*this.#u.canvas.size.width,height:this.#$e.height/i*this.#u.canvas.size.height}:{width:this.#$e.width,height:this.#$e.height},this.#Ae=this.options.life.count??-1,this.#Le=this.#Ae<=0,this.options.domId){const t=Y().getElementById(this.options.domId);t&&(this.#G=new MutationObserver(()=>{this.resize()}),this.#lt=new ResizeObserver(()=>{this.resize()}),this.#G.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#lt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#Ue=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Se=!0,this.pause()}externalPlay(){this.#Se=!1,this.play()}async init(){await(this.#Ue?.init())}pause(){this.#Se||(this.#Ee=void 0)}play(){if(this.#Se)return;if(!(this.#Ae>0||this.#Le)&&this.options.life.count||!(this.#Re||this.#Oe>=(this.#Ve??0)))return;const t=this.#u;if(void 0===this.#Ee){const e=$(this.options.rate.delay);this.#Ee=t.retina.reduceFactor?e*n/t.retina.reduceFactor:1/0}(this.#Ae>0||this.#Le)&&this.#He()}resize(){const t=this.#Fe,e=this.#u;var s,n,a;this.position=t&&(s=t,n=e.canvas.size,a=M.origin,function(t,e,i){let s=!0;return s=t.top<e.height+i.x,s&&(s=t.right>i.x),s&&(s=t.left<e.width+i.y),s&&(s=t.bottom>i.y),s}(function(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}(s,0),n,a))?t:this.#xt(),this.#$e=this.#We(),this.size=this.#$e.mode===X.percent?{width:this.#$e.width/i*e.canvas.size.width,height:this.#$e.height/i*e.canvas.size.height}:{width:this.#$e.width,height:this.#$e.height},this.#Ue?.resize(this.position,this.size)}update(t){if(this.#Se)return;const e=this.#u;this.#Re&&(this.#Re=!1,this.#Oe=this.#Ve??0,this.#_e=this.#Ee??0),this.#qe||(this.#qe=!0,this.#je(this.options.startCount)),void 0!==this.#me&&(this.#De+=t.value,this.#De>=this.#me&&(this.pause(),void 0!==this.#Ve&&(this.#Ve=void 0),this.#Le||this.#Ae--,this.#Ae>0||this.#Le?(this.position=this.#xt(),this.#Ue?.resize(this.position,this.size),this.#Ve=e.retina.reduceFactor?$(this.options.life.delay??0)*n/e.retina.reduceFactor:1/0):this.#Ne(),this.#De-=this.#me,this.#me=void 0)),void 0!==this.#Ve&&(this.#Oe+=t.value,this.#Oe>=this.#Ve&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Oe-=this.#Ve,this.#Ve=void 0)),void 0!==this.#Ee&&(this.#_e+=t.value,this.#_e>=this.#Ee&&(this.#Ge(),this.#_e-=this.#Ee))}#xt(){const t=this.#u;if(this.options.domId){const e=Y().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),n=t.retina.pixelRatio;return{x:(i.x+i.width*s)*n,y:(i.y+i.height*s)*n}}}return j({size:t.canvas.size,position:this.options.position})}#We(){const t=this.#u;if(this.options.domId){const e=Y().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:X.precise}}}return this.options.size??(()=>{const t=new Oe;return t.load({height:0,mode:X.percent,width:0}),t})()}#Ne(){this.#G?.disconnect(),this.#G=void 0,this.#lt?.disconnect(),this.#lt=void 0,this.#Be(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#Ge(){if(this.#Se)return;const t=$(this.options.rate.quantity);this.#je(t)}#je(t){const e=tt(this.#Te)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:$(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,r=void 0===this.options.spawn.stroke?.opacity?1:$(this.options.spawn.stroke.opacity),o=void 0===this.options.spawn.stroke?.width?1:$(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#Ue,u=c||h,p=u||d,f=u?{h:w,s:v,l:P}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?Z({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=r,this.spawnStrokeWidth=o,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#Xe(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#Xe(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#Xe(i.l,this.spawnFillColor.l,f.l)),Mi(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#Xe(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#Xe(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#Xe(a.l,this.spawnStrokeColor.l,f.l)),Ci(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Ue){const e=this.#Ue.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Mi(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#He(){if(this.#Se)return;const t=void 0!==this.options.life.duration?$(this.options.life.duration):void 0;(this.#Ae>0||this.#Le)&&void 0!==t&&t>0&&(this.#me=t*n)}#Xe(t,e,i,s=1){const a=this.#u;if(!t.enable)return e;const r=U(t.offset),o=$(this.options.rate.delay),l=a.retina.reduceFactor?o*n/a.retina.reduceFactor:1/0;return(e+$(t.speed)*a.fpsLimit/l+r*s)%i}}});t.loadSquaresPreset=si,t.tsParticles=Ce}),Object.assign(globalThis.window||globalThis,{loadSquaresPreset:(globalThis.__tsParticlesInternals.presets.squares||{}).loadSquaresPreset}),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.squares=t.__tsParticlesInternals.presets.squares||{}))}(this,function(t){"use strict";const e="generated",i=100,s=.5,n=1e3,a=0,r=0,o=0,l=1,c=0,h=0,d=1,u="random",p=2*Math.PI,f="true",g="false",m="canvas",y=255,w=360,v=100,P=100,b=.25;var x;function z(t){return"z"in t?t.z:o}!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"}(x||(x={}));class S{x;y;z;constructor(t=a,e=r,i=o){this.x=t,this.y=e,this.z=i}static get origin(){return S.create(a,r,o)}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 S.create(t.x,t.y,z(t))}static create(t,e,i){return"number"==typeof t?new S(t,e??r,i??o):new S(t.x,t.y,z(t))}add(t){return S.create(this.x+t.x,this.y+t.y,this.z+z(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=z(t)}copy(){return S.clone(this)}div(t){return S.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return S.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 S.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o)}setTo(t){this.x=t.x,this.y=t.y,this.z=z(t)}sub(t){return S.create(this.x-t.x,this.y-t.y,this.z-z(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=z(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends S{constructor(t=a,e=r){super(t,e,o)}static get origin(){return M.create(a,r)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??r):new M(t.x,t.y)}}function C(t){return"boolean"==typeof t}function k(t){return"string"==typeof t}function I(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function _(t){return Array.isArray(t)}function O(t){return null==t}const E=Math.PI/180;let R=Math.random;const L=t=>requestAnimationFrame(t),F=t=>{cancelAnimationFrame(t)};function A(){return B(R(),0,1-Number.EPSILON)}function T(t,e){return A()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function U(t){const e=q(t);let i=V(t);return e===i&&(i=0),T(i,e)}function $(t){return I(t)?t:U(t)}function V(t){return I(t)?t:t.min}function q(t){return I(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&I(t))return t;const i=V(t),s=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function H(t){return t*E}function j(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return function(t){return{x:(t.position?.x??A()*i)*t.size.width/i,y:(t.position?.y??A()*i)*t.size.height/i}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var G,X;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(G||(G={})),function(t){t.precise="precise",t.percent="percent"}(X||(X={}));function Y(){return globalThis.document}function Q(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function K(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function Z(t,...e){for(const i of e){if(O(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(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 D(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=>Z(void 0,t)):Z(e[n],a)}}return t}function J(t,e){return _(t)?t.map((t,i)=>e(t,i)):e(t,0)}function tt(t,e,i){return _(t)?K(t,e,i):t}function et(t,e){return function(t,e){if(t.mode!==X.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/i*e.width,y:t.y/i*e.height}:{width:t.width/i*e.width,height:t.height/i*e.height}}(t,e)}let it,st;function nt(t,e,i,s,n){if(s){let s={passive:!0};C(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 at(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 rt{#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 ot;!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"}(ot||(ot={}));class lt{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;#r=!1;#o=!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(ot.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 at(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 at(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.#r&&!this.#o){this.#o=!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.#o=!1,this.#r=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#r)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#o?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 ct=t=>(...e)=>{t(...e)},ht={debug:ct(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:ct(console.info),log:ct(console.log),trace:ct(console.trace),verbose:ct(console.log),warning:ct(console.warn)};function dt(){return ht}const ut="100%";class pt{pluginManager=new lt(this);#h=[];#d=new rt;#r=!1;get items(){return this.#h}get version(){return"4.2.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.#r||(await this.pluginManager.init(),this.#r=!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 Pi}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:r}=t,o=r?await async function(t){const e=tt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(dt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:r,index:a}):t.options,l=tt(o,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=Y();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===m)s=t,s.dataset[e]??=g,s.dataset[e]===f&&(s.style.width||=ut,s.style.height||=ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(m).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(m),s.dataset[e]=f,t.appendChild(s)),s.style.width||=ut,s.style.height||=ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=Y();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=f,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 ft,gt,mt,yt,wt,vt,Pt,bt,xt,zt,St;!function(t){t.circle="circle",t.rectangle="rectangle"}(ft||(ft={}));class Mt{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 Ct extends Mt{radius;constructor(t,e,i){super(t,e,ft.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,function(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}(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 Ct||t.type===ft.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof kt||t.type===ft.rectangle){const e=t,{width:i,height:r}=e.size;return Math.pow(n-i,2)+Math.pow(a-r,2)<=s**2||n<=s+i&&a<=s+r||n<=i||a<=r}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class kt extends Mt{size;constructor(t,e,i,s){super(t,e,ft.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 Ct)return t.intersects(this);if(!(t instanceof kt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,r=a.width,o=a.height;return n.x<s.x+e&&n.x+r>s.x&&n.y<s.y+i&&n.y+o>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"}(gt||(gt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(mt||(mt={})),function(t){t.delete="delete",t.wait="wait"}(yt||(yt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(wt||(wt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(vt||(vt={})),function(t){t.none="none",t.max="max",t.min="min"}(Pt||(Pt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(bt||(bt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(xt||(xt={})),function(t){t.max="max",t.min="min",t.random="random"}(zt||(zt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(St||(St={}));class It{load(t){O(t)||this.doLoad(t)}}function Dt(t,...e){for(const i of e)t.load(i)}function _t(t,e,i){void 0!==i&&(t[e]=i)}function Ot(t,e,i){void 0!==i&&(t[e]=W(i))}function Et(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Rt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Lt extends It{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ot(this,"count",t.count),_t(this,"enable",t.enable),Ot(this,"speed",t.speed),Ot(this,"decay",t.decay),Ot(this,"delay",t.delay),_t(this,"sync",t.sync)}}class Ft extends Lt{mode=mt.auto;startValue=zt.random;doLoad(t){super.doLoad(t),_t(this,"mode",t.mode),_t(this,"startValue",t.startValue)}}class At extends Lt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),_t(this,"max",t.max),_t(this,"min",t.min),Ot(this,"offset",t.offset)}}class Tt extends It{h=new At(0,w);l=new At(0,P);s=new At(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Bt extends It{value="";static create(t,e){const i=new Bt;return i.load(t),void 0!==e&&(k(e)||_(e)?i.load({value:e}):i.load(e)),i}doLoad(t){O(t.value)||(this.value=t.value)}}class Ut extends Bt{animation=new Tt;static create(t,e){const i=new Ut;return i.load(t),void 0!==e&&(k(e)||_(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class $t extends It{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Bt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Bt.create(this.color,t.color)),_t(this,"image",t.image),_t(this,"position",t.position),_t(this,"repeat",t.repeat),_t(this,"size",t.size),_t(this,"opacity",t.opacity)}}class Vt extends It{enable=!0;zIndex=0;doLoad(t){_t(this,"enable",t.enable),_t(this,"zIndex",t.zIndex)}}class qt extends It{delay=.5;enable=!0;doLoad(t){_t(this,"delay",t.delay),_t(this,"enable",t.enable)}}class Wt extends It{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Z(this.options[t]??{},i))}_t(this,"close",t.close),_t(this,"type",t.type)}}class Ht extends It{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Ut.create(this.color,t.color)),_t(this,"enable",t.enable),Ot(this,"opacity",t.opacity)}}class jt extends It{offset=0;value=90;doLoad(t){Ot(this,"offset",t.offset),Ot(this,"value",t.value)}}class Nt extends It{mode=X.percent;radius=0;x=50;y=50;doLoad(t){_t(this,"x",t.x),_t(this,"y",t.y),_t(this,"mode",t.mode),_t(this,"radius",t.radius)}}class Gt extends It{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ot(this,"acceleration",t.acceleration),_t(this,"enable",t.enable),_t(this,"inverse",t.inverse),Ot(this,"maxSpeed",t.maxSpeed)}}class Xt extends It{value=0;doLoad(t){O(t.value)||(this.value=W(t.value))}}class Yt extends Xt{animation=new Lt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class Qt extends Yt{animation=new Ft}class Kt extends It{clamp=!0;delay=new Xt;enable=!1;generator;options={};doLoad(t){_t(this,"clamp",t.clamp),this.delay.load(t.delay),_t(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=Z(this.options,t.options))}}class Zt extends It{bottom;default=wt.out;left;right;top;doLoad(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 Jt extends It{acceleration=0;enable=!1;position;doLoad(t){Ot(this,"acceleration",t.acceleration),_t(this,"enable",t.enable),t.position&&(this.position=Z({},t.position))}}class te extends It{angle=new jt;center=new Nt;decay=0;direction=x.none;distance={};drift=0;enable=!1;gravity=new Gt;outModes=new Zt;path=new Kt;random=!1;size=!1;speed=2;spin=new Jt;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(I(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ot(this,"decay",t.decay),_t(this,"direction",t.direction),void 0!==t.distance&&(this.distance=I(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ot(this,"drift",t.drift),_t(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),_t(this,"random",t.random),_t(this,"size",t.size),Ot(this,"speed",t.speed),this.spin.load(t.spin),_t(this,"straight",t.straight),_t(this,"vibrate",t.vibrate),_t(this,"warp",t.warp)}}class ee extends It{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Ut.create(this.color,t.color)),Ot(this,"width",t.width),Ot(this,"opacity",t.opacity)}}class ie extends It{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Ut.create(this.color,t.color)),Et(this,"fill",t.fill,()=>new Ht),Et(this,"stroke",t.stroke,()=>new ee)}}class se extends Xt{value=1}class ne extends It{horizontal=new se;vertical=new se;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ae extends It{enable=!1;height=1080;width=1920;doLoad(t){_t(this,"enable",t.enable),_t(this,"width",t.width),_t(this,"height",t.height)}}class re extends It{mode=yt.delete;value=0;doLoad(t){_t(this,"mode",t.mode),_t(this,"value",t.value)}}class oe extends It{density=new ae;limit=new re;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),_t(this,"value",t.value)}}class le extends It{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Z(this.options[t]??{},i))}_t(this,"close",t.close),_t(this,"type",t.type)}}class ce extends Xt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),_t(this,"opacityRate",t.opacityRate),_t(this,"sizeRate",t.sizeRate),_t(this,"velocityRate",t.velocityRate)}}class he extends It{bounce=new ne;effect=new Wt;groups={};move=new te;number=new oe;paint;palette;reduceDuplicates=!1;shape=new le;zIndex=new ce;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ie,this.paint.color=new Ut,this.paint.color.value="#fff",this.paint.fill=new Ht,this.paint.fill.enable=!0}doLoad(t){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]=Z(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&&(_(e)?this.paint=J(e,t=>{const e=new ie;return e.load(t),e}):_(this.paint)?(this.paint=new ie,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=(_(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 de(t,e,...i){const s=new he(t,e);return Dt(s,...i),s}class ue extends It{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new $t,this.fullScreen=new Vt,this.particles=de(this.#p,this.#u),this.resize=new qt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,J(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),_t(this,"autoPlay",t.autoPlay),_t(this,"clear",t.clear),_t(this,"key",t.key),_t(this,"name",t.name),Ot(this,"delay",t.delay),_t(this,"detectRetina",t.detectRetina),Ot(this,"duration",t.duration),_t(this,"fpsLimit",t.fpsLimit),_t(this,"hdr",t.hdr),_t(this,"pauseOnBlur",t.pauseOnBlur),_t(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),_t(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Z(this.style,t.style),_t(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))}}const pe=new Map;function fe(t,e){let i=pe.get(t);return i||(i=e(),pe.size>2e3&&pe.clear(),pe.set(t,i)),i}function ge(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return me(t,n.value,i,s);if(_(n.value)){const e=K(n.value,i,s);if(!e)return;return ge(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=k(e)?{value:e}:e;if(k(n.value))return n.value===u?function(){const t=0,e=256,i=()=>Math.floor(T(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(_(n.value)){const e=K(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 ye(t,e,i,n=!0){const a=ge(t,e,i,n);return a?function(t){const e=t.r/y,i=t.g/y,n=t.b/y,a=Math.max(e,i,n),r=Math.min(e,i,n),o={h:0,l:(a+r)*s,s:0};a!==r&&(o.s=o.l<s?(a-r)/(a+r):(a-r)/(2-a-r),o.h=e===a?(i-n)/(a-r):i===a?2+(n-e)/(a-r):4+(e-i)/(a-r));o.l*=P,o.s*=v,o.h*=60,o.h<0&&(o.h+=w);o.h>=w&&(o.h-=w);return o}(a):void 0}function we(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}function ve(t,e,i){const s=i??1;return fe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Pe(t,e,i){const n=i??1;return fe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?ve(function(t){const e=(t.h%w+w)%w,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(P,t.l)),a=e/w,r=i/v,o=n/P;if(0===i){const t=Math.round(o*y);return{r:t,g:t,b:t}}const l=o<s?o*(1+r):o+r-o*r,c=2*o-l,h=1/3,d=Math.min(y,y*we(c,l,a+h)),u=Math.min(y,y*we(c,l,a)),p=Math.min(y,y*we(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function be(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function xe(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:w},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(ze(s.h,e.h,i),ze(s.s,e.s,i),ze(s.l,e.l,i)),s}function ze(t,e,s){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=$(e.speed)/i*s,t.decay=1-$(e.decay),t.status=St.increasing,t.loops=0,t.maxLoops=$(e.count),t.time=0,t.delayTime=$(e.delay)*n,e.sync||(t.velocity*=A(),t.value*=A()),t.initialValue=t.value,t.offset=W(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?U(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,r=t.max,o=t.min;e&&t.status!==St.increasing?(t.value-=n,t.value<o&&(t.loops??=0,t.loops++,t.status=St.increasing)):(t.value+=n,t.value>r&&(t.loops??=0,t.loops++,e?t.status=St.decreasing:t.value-=r)),t.velocity&&1!==a&&(t.velocity*=a),t.value=B(t.value,o,r)}function Me(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 Ce=new pt;class ke{count;delay;duration;wait=!1;load(t){O(t)||(_t(this,"count",t.count),Ot(this,"delay",t.delay),Ot(this,"duration",t.duration),_t(this,"wait",t.wait))}}class Ie{delay=.1;quantity=1;load(t){O(t)||(Ot(this,"quantity",t.quantity),Ot(this,"delay",t.delay))}}class De{color=!1;opacity=!1;load(t){O(t)||(_t(this,"color",t.color),_t(this,"opacity",t.opacity))}}class _e{options={};replace=new De;type="square";load(t){O(t)||(void 0!==t.options&&(this.options=Z({},t.options??{})),this.replace.load(t.replace),_t(this,"type",t.type))}}class Oe{height=0;mode=X.percent;width=0;load(t){O(t)||(_t(this,"mode",t.mode),_t(this,"height",t.height),_t(this,"width",t.width))}}class Ee{fill;stroke;load(t){O(t)||(t.fill&&(this.fill??=new Ht,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ee,this.stroke.load(t.stroke)))}}class Re{autoPlay=!0;direction;domId;fill=!0;life=new ke;name;particles;position;rate=new Ie;shape=new _e;size;spawn=new Ee;spawnFillColor;spawnStrokeColor;startCount=0;load(t){O(t)||(_t(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Oe,this.size.load(t.size)),_t(this,"direction",t.direction),_t(this,"domId",t.domId),_t(this,"fill",t.fill),this.life.load(t.life),_t(this,"name",t.name),this.particles=J(t.particles,t=>Z({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new Ut,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new Ut,this.spawnStrokeColor.load(t.spawnStrokeColor)),_t(this,"startCount",t.startCount))}}class Le{id="emitters";#m;constructor(t){this.#m=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return bi});return new e(this.#m,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=J(i.emitters,t=>{const e=new Re;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return _(e)&&!!e.length||void 0!==e}}const Fe=new WeakMap;var Ae,Te;async function Be(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Fe.get(e);return i||(i=Promise.resolve().then(function(){return Si}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Fe.delete(e),t}),Fe.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return zi}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Le(e))})}!function(t){t.emitter="emitter"}(Ae||(Ae={})),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 Ue=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ve{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(Ue,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=$e.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 qe(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}class We{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=tt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,r=s?.fill,o=s?.stroke;if(r){const i=Ut.create(void 0===a?void 0:Ut.create(void 0,a),r.color);t.fillEnabled=r.enable,t.fillOpacity=$(r.opacity),t.fillAnimation=i.animation;const s=ye(this.#p,i);s&&(t.fillColor=xe(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(o){const i=Ut.create(void 0===a?void 0:Ut.create(void 0,a),o.color);t.strokeWidth=$(o.width)*e.retina.pixelRatio,t.strokeOpacity=$(o.opacity??1),t.strokeAnimation=i.animation;const s=ye(this.#p,i)??t.getFillColor();s&&(t.strokeColor=xe(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),r=!!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||r)}update(t,e){this.isEnabled(t)&&(Me(t.fillColor,e),Me(t.strokeColor,e))}}async function He(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new We(t.pluginManager,e)))})}class je{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(_t(this,"enable",t.enable),Ot(this,"speed",t.speed),Ot(this,"decay",t.decay),_t(this,"sync",t.sync))}}class Ne extends Xt{animation=new je;direction=gt.clockwise;path=!1;load(t){O(t)||(super.load(t),_t(this,"direction",t.direction),this.animation.load(t.animation),_t(this,"path",t.path))}}function Ge(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,r=e.min,o=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case St.increasing:e.value+=a;break;case St.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case St.increasing:e.value>=o&&(i?e.status=St.decreasing:e.value-=o,e.loops??=0,e.loops++);break;case St.decreasing:e.value<=r&&(i?e.status=St.increasing:e.value+=o,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Pt.max:i>=n&&t.destroy();break;case Pt.min:i<=s&&t.destroy()}}(t,s,e.value,r,o),t.destroyed||(e.value=B(e.value,r,o))}}class Xe{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:H($(e.value)),min:0,max:p},t.pathRotation=e.path;let i=e.direction;if(i===gt.random){i=Math.floor(2*A())>0?gt.counterClockwise:gt.clockwise}switch(i){case gt.counterClockwise:case"counterClockwise":t.rotate.status=St.decreasing;break;case gt.clockwise:t.rotate.status=St.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-$(s.decay),t.rotate.velocity=$(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=A())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Rt(t,"rotate",Ne,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Ge(t,t.rotate,!1,Pt.none,e),t.rotation=t.rotate.value))}}async function Ye(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Xe(t)))})}class Qe extends Ft{destroy=Pt.none;load(t){super.load(t),O(t)||_t(this,"destroy",t.destroy)}}class Ke extends Qt{animation=new Qe;value=3;load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ze{#u;constructor(t){this.#u=t}init(t){const e=this.#u,s=t.options.size;if(!s)return;const n=s.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/i*e.retina.reduceFactor,n.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Rt(t,"size",Ke,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=function(t,e){const i=t.value,a=t.animation,r={delayTime:$(a.delay)*n,enable:a.enable,value:$(t.value)*e,max:q(i)*e,min:V(i)*e,loops:0,maxLoops:$(a.count),time:0};if(a.enable){switch(r.decay=1-$(a.decay),a.mode){case mt.increase:r.status=St.increasing;break;case mt.decrease:r.status=St.decreasing;break;case mt.random:r.status=A()>=s?St.increasing:St.decreasing}const t=a.mode===mt.auto;switch(a.startValue){case zt.min:r.value=r.min,t&&(r.status=St.increasing);break;case zt.max:r.value=r.max,t&&(r.status=St.decreasing);break;case zt.random:default:r.value=U(r),t&&(r.status=A()>=s?St.increasing:St.decreasing)}}return r.initialValue=r.value,r}(i,e),t.retina.sizeAnimationSpeed=$(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ge(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Je(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Ze(t)))})}class ti{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function ei(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new ti))})}const ii={particles:{paint:{stroke:{width:5,color:{value:["#5bc0eb","#fde74c","#9bc53d","#e55934","#fa7921","#2FF3E0","#F8D210","#FA26A0","#F51720"]}},fill:{enable:!1}},shape:{type:"square"},rotate:{value:0,direction:gt.counterClockwise,animation:{enable:!0,speed:2,sync:!0}},size:{value:{min:1,max:500},animation:{enable:!0,startValue:zt.min,speed:60,sync:!0,destroy:Pt.max}}},background:{color:"#000"},emitters:{position:{y:50,x:50},rate:{delay:1,quantity:1}}};async function si(t){await t.pluginManager.register(async t=>{await Promise.all([qe(t),Be(t),ei(t),Ye(t),Je(t),He(t)]),t.pluginManager.addPreset("squares",ii)})}const ni=globalThis;ni.loadSquaresPreset=si,ni.tsParticles=Ce;function ai(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ri{#w;#v;#P;#b;#x;#u;#z;#S;#M;#C;#k;#I;#D;#_;#p;#O;#E;#R={};#L=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#v=i,this.#z=null,this.#E=[],this.#O=[],this.#x=[],this.#w=[],this.#P=[],this.#b=[],this.#M=[],this.#C=[],this.#k=[],this.#I=[],this.#_=[],this.#D=[]}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(a,r,this.#v.size.width,this.#v.size.height)})}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.#O=[],this.#x=[],this.#w=[],this.#P=[],this.#b=[],this.#M=[],this.#C=[],this.#k=[],this.#I=[],this.#_=[],this.#D=[]}draw(t){const e=this.#z;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,r]=this.#A(t);if(a??=s,r??=n,!a&&!r)return;const o=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#F,f=this.#R,g=a?Pe(a,o.hdr,h*d):void 0,m=r?Pe(r,o.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#k)i.drawParticleSetup?.(s,t,e);this.#T(s,t,i,d,f,p),this.#B({container:o,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#U(t);for(const i of this.#C)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#M)this.#$(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#_)e.drawSettingsSetup?.(i,t);for(const e of this.#I)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#b)e.clearDraw?.(i,t);for(const e of this.#D)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#x=[],this.#w=[],this.#P=[],this.#b=[],this.#M=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[],this.#D=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#x.push(t),t.canvasClear&&this.#w.push(t),t.canvasPaint&&this.#P.push(t),t.drawParticle&&this.#M.push(t),t.drawParticleSetup&&this.#k.push(t),t.drawParticleCleanup&&this.#C.push(t),t.draw&&this.#I.push(t),t.drawSettingsSetup&&this.#_.push(t),t.drawSettingsCleanup&&this.#D.push(t),t.clearDraw&&this.#b.push(t)}initUpdaters(){this.#E=[],this.#O=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#O.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let t=!1;for(const e of this.#P)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(a,r,this.#v.size.width,this.#v.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,a,r,this.#v.size.width,this.#v.size.height),i.globalAlpha=s})}setContext(t){this.#z=t,this.#z&&(this.#z.globalCompositeOperation="source-over")}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(a,r,this.#v.size.width,this.#v.size.height)})}#U(t){for(const e of this.#O)e.afterDraw?.(t)}#T(t,e,i,s,n,a){for(const r of this.#E){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(e,t,i,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)ai(a,t,e)}r.beforeDraw?.(e)}}#V(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#B(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:r,opacity:o,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 m={context:i,particle:s,radius:r,drawRadius:1*r,opacity:o,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?.(m);const y=s.effect?c.get(s.effect):void 0,w=s.shape?h.get(s.shape):void 0;this.#q(y,m),this.#W(w,m),this.#H(w,m),this.#j(w,m),this.#V(y,m),i.resetTransform()}#$(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#H(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())}#j(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#W(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#A(t){let e,i;for(const s of this.#x)if(!e&&s.particleFillColor&&(e=ye(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ye(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#L[0]=e,this.#L[1]=i,this.#L}}const oi=new WeakMap;function li(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 ci{domElement;render;renderCanvas;size;zoom=1;#u;#N;#G;#X;#p;#Y;#Q;#K;#Z;constructor(t,e){this.#p=t,this.#u=e,this.render=new ri(t,e,this),this.#K={height:0,width:0};const i=e.retina.pixelRatio,s=this.#K;this.size={height:s.height*i,width:s.width*i},this.#N=!1,this.#Q=[],this.#Y="none"}get#J(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#N){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#tt();this.render.destroy(),this.#Q=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Z?this.#Z:{x:e*s/t,y:i*s/t}}init(){this.#et(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.#it()}),this.resize(),this.#st(),this.initBackground(),this.#et(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#nt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=ge(this.#p,e.color);s.backgroundColor=n?ve(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#Q=[];for(const t of this.#u.plugins)t.resize&&this.#Q.push(t)}loadCanvas(t){this.#N&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#N=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=oi.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 oi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#X=function(t){const e=Y().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(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}(s.style));const n=this.#K,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const r=this.#u.retina.pixelRatio,o=this.size;a.height=o.height=n.height*r,a.width=o.width=n.width*r}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.#K,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,r={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&r.height===i.height&&r.width===i.width)return!1;const o={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=r.width,i.height=l.height=r.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/o.width,height:s.height/o.height}),!0}setPointerEvents(t){this.domElement&&(this.#Y=t,this.#it())}setZoom(t,e){this.zoom=t,this.#Z=e}stop(){this.#et(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.#at(),e&&await t.refresh()}#at(){for(const t of this.#Q)t.resize?.()}#nt(){const t=this.#u.actualOptions.hdr&&Q("(color-gamut: p3)")?.matches&&Q("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#st(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#J?this.#rt():this.#tt();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")}}}#it(){const t=this.domElement;if(!t)return;this.#et(t=>{t.disconnect()}),this.#st(),this.initBackground();const e=this.#Y;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#et(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#tt(){const t=this.domElement,e=this.#X;t&&e&&li(t,e,!0)}#et(t){this.#G&&t(this.#G)}#rt(){const t=this.domElement;t&&li(t,function(t){if(it!==t||!st){it=t;const e=Y().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}st=e}return st}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class hi{#u;#ot;#lt;#ct;constructor(t){this.#u=t,this.#ot={visibilityChange:()=>{this.#ht()},resize:()=>{this.#dt()}}}addListeners(){this.#ut(!0)}removeListeners(){this.#ut(!1)}#ht(){const t=this.#u;t.actualOptions.pauseOnBlur&&(Y().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#dt(){this.#ct&&(clearTimeout(this.#ct),this.#ct=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ct=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*n)}#ut(t){const e=this.#ot;this.#pt(t),nt(document,"visibilitychange",e.visibilityChange,t,!1)}#pt(t){const e=this.#ot,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void nt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#lt&&!t?(s&&this.#lt.unobserve(s),this.#lt.disconnect(),this.#lt=void 0):!this.#lt&&t&&s&&(this.#lt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#dt()}),this.#lt.observe(s))}}function di(t){if(e=t.outMode,i=t.checkModes,!(e===i||_(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)}function ui(t,e){const i=t%e;return i<0?i+e:i}function pi(t,e,i,s){const n=de(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=tt(n.effect.type,t.id,a),t.shape=tt(n.shape.type,t.id,a);const r=n.effect,o=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=tt(e,t.id,a);i&&(t.effect=i)}r.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=tt(e,t.id,a);i&&(t.shape=i)}o.load(s.shape)}}if(t.effect===u){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===u){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return Z({close:e.close},tt(n,i,s))}(t.effect,r,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return Z({close:e.close},tt(n,i,s))}(t.shape,o,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class fi{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;#ft={fillOpacity:1,opacity:1,strokeOpacity:1};#gt=S.origin;#mt={sin:0,cos:0};#yt={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(ot.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.#wt(this.bubble.color??be(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*s}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??$(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#ft.fillOpacity=i*s*e,this.#ft.opacity=i*e,this.#ft.strokeOpacity=i*n*e,this.#ft}getPosition(){return this.#gt.x=this.position.x+this.offset.x,this.#gt.y=this.position.y+this.offset.y,this.#gt.z=this.position.z,this.#gt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#mt.sin=Math.sin(t),this.#mt.cos=Math.cos(t),this.#mt}getStrokeColor(){return this.#wt(this.bubble.color??be(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#yt.a=e.cos*(t.a??l),this.#yt.b=i?e.sin*(t.b??1):t.b??c,this.#yt.c=i?-e.sin*(t.c??1):t.c??h,this.#yt.d=e.cos*(t.d??d),this.#yt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=xt.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=pi(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#vt(e),this.initialVelocity=this.#Pt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#bt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#bt({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=ui(t,p);return e>=Math.PI*s&&e<3*Math.PI*s}if(this.roll.horizontal){const e=ui(t+Math.PI*s,p);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ui(t,p);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#xt(t,e){let i=0,s=t?S.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,r=this.options.move.outModes,o=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return S.create(i.x,i.y,e)}const t=N({size:l,position:s}),c=S.create(t.x,t.y,e);this.#zt(c,o,r.left??r.default),this.#zt(c,o,r.right??r.default),this.#St(c,o,r.top??r.default),this.#St(c,o,r.bottom??r.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}}#Pt(){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===x.inside||t.direction===x.outside)return e;const i=H($(t.angle.value)),n=H($(t.angle.offset)),a={left:n-i*s,right:n+i*s};return t.straight||(e.angle+=U(W(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=A()),e}#zt(t,e,i){di({outMode:i,checkModes:[wt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#St(t,e,i){di({outMode:i,checkModes:[wt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Mt(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===wt.bounce;return t===G.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===G.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===G.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===G.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"}}#Ct(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#bt(t){const e=this.#Mt(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,r=n?.isInsideCanvas;if(!a&&!r)return e;const o=this.#Ct(t.direction,t.outMode),l=a?this.#kt(a(o),"shape"):void 0,c=r?this.#kt(r(o),"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}#wt(t){return 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===vt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#vt(t){const e=this.#u,i=Math.floor($(this.options.zIndex.value)),n=this.#xt(t,B(i,0,e.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...et(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(I(t))return H(t);switch(t){case x.top:return-Math.PI*s;case x.topRight:return-Math.PI*b;case x.right:return 0;case x.bottomRight:return Math.PI*b;case x.bottom:return Math.PI*s;case x.bottomLeft:return.75*Math.PI;case x.left:return Math.PI;case x.topLeft:return.75*-Math.PI;case x.inside:return Math.atan2(i.y-e.y,i.x-e.x);case x.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return A()*p}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case x.inside:this.outType=xt.inside;break;case x.outside:this.outType=xt.outside}this.offset=M.origin}#kt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class gi{#It;#Dt=new Map;#_t=[];#Ot;#Et;#Rt=[];#Lt;constructor(t){this.#It=t,this.#Ot=0,this.#Lt=0}clear(){this.#Dt.clear();const t=this.#Et;t&&(this.#It=t),this.#Et=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Ft(e,i);this.#Dt.has(s)||this.#Dt.set(s,[]),this.#Dt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#At(t);if(!s)return i;const n=Math.floor(s.minX/this.#It),a=Math.floor(s.maxX/this.#It),r=Math.floor(s.minY/this.#It),o=Math.floor(s.maxY/this.#It);for(let s=n;s<=a;s++)for(let n=r;n<=o;n++){const a=`${s}_${n}`,r=this.#Dt.get(a);if(r)for(const s of r)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Tt(t.x,t.y,e),a=this.query(n,i,s);return this.#Bt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ut(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Bt(),a}setCellSize(t){this.#Et=t}#Tt(t,e,i){return(this.#_t[this.#Ot++]??=new Ct(t,e,i)).reset(t,e,i)}#Ut(t,e,i,s){return(this.#Rt[this.#Lt++]??=new kt(t,e,i,s)).reset(t,e,i,s)}#Ft(t,e){return`${Math.floor(t/this.#It)}_${Math.floor(e/this.#It)}`}#At(t){if(t instanceof Ct){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 kt){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}#Bt(){this.#Ot=0,this.#Lt=0}}class mi{checkParticlePositionPlugins;grid;#$t;#u;#Vt;#qt;#Wt;#Ht;#jt;#Nt;#p;#Gt;#Xt;#Yt;#Qt;#Kt;#Zt;constructor(t,e){this.#p=t,this.#u=e,this.#Wt=0,this.#$t=[],this.#Gt=[],this.#qt=0,this.#Vt=new Map,this.#Ht=new Map,this.#Zt=this.#Jt(this.#u.zLayers),this.grid=new gi(100),this.checkParticlePositionPlugins=[],this.#jt=[],this.#Nt=[],this.#Yt=[],this.#Xt=[],this.#Kt=[]}get count(){return this.#$t.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#Vt.get(i)??this.#qt,r=this.count;if(a>0)switch(n){case yt.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case yt.wait:if(r>=a)return}try{const n=this.#Gt.pop()??new fi(this.#p,this.#u);n.init(this.#Wt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#$t.push(n),this.#te(n),this.#Wt++,this.#u.dispatchEvent(ot.particleAdded,{particle:n}),n):void this.#Gt.push(n)}catch(t){dt().warning(`error adding particle: ${t}`)}}clear(){this.#$t=[],this.#Ht.clear(),this.#ee(this.#u.zLayers)}destroy(){this.#$t=[],this.#Gt.length=0,this.#Ht.clear(),this.#Zt=[],this.checkParticlePositionPlugins=[],this.#jt=[],this.#Nt=[],this.#Yt=[],this.#Xt=[],this.#Kt=[]}drawParticles(t){for(let e=this.#Zt.length-1;e>=0;e--){const i=this.#Zt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#$t.filter(t)}find(t){return this.#$t.find(t)}get(t){return this.#$t[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Kt=[],this.#Nt=[],this.#Yt=[],this.#jt=[],this.#Xt=[],this.#Ht.clear(),this.#ee(t.zLayers),this.grid=new gi(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Kt.push(e),e.particleUpdate&&this.#Nt.push(e),e.postUpdate&&this.#Yt.push(e),e.particleReset&&this.#jt.push(e),e.postParticleUpdate&&this.#Xt.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.#$t.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.#ie(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.#se(n,i,t)}this.#se(t.particles,i)}setResizeFactor(t){this.#Qt=t}update(t){this.grid.clear();for(const e of this.#Kt)e.update?.(t);const e=this.#ne(t);for(const e of this.#Yt)e.postUpdate?.(t);if(this.#ae(t,e),e.size)for(const t of e)this.remove(t);this.#Qt=void 0}#re(...t){this.#Gt.push(...t)}#se(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#qt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Vt.set(i,s?.number.limit.value??n.limit.value));const a=this.#oe(n.density),r=n.value,o=n.limit.value>0?n.limit.value:r,l=Math.min(r,o)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#qt=n.limit.value*a:this.#Vt.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)}#Jt(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#le(t){const e=this.#Zt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#oe(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}#te(t){const e=this.#le(t.position.z),i=this.#Zt[e];i&&(i.push(t),this.#Ht.set(t.id,e))}#ie(t,e,i){const s=this.#$t[t];return!!s&&(s.group===e&&(this.#$t.splice(t,1),this.#ce(s),s.destroy(i),this.#u.dispatchEvent(ot.particleRemoved,{particle:s}),this.#re(s),!0))}#ce(t){const e=this.#Ht.get(t.id)??this.#le(t.position.z),i=this.#Zt[e];if(!i)return void this.#Ht.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Ht.delete(t.id)}#ee(t){const e=Math.max(Math.floor(t),1);if(this.#Zt.length===e)for(const t of this.#Zt)t.length=0;else this.#Zt=this.#Jt(e)}#he(t){const e=this.#le(t.position.z),i=this.#Ht.get(t.id);if(void 0===i)return void this.#te(t);if(i===e)return;const s=this.#Zt[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#Zt[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Ht.set(t.id,e)}else this.#Ht.set(t.id,e)}#ne(t){const e=new Set,i=this.#Qt;for(const s of this.#$t){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.#jt)t.particleReset?.(s);for(const e of this.#Nt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ae(t,e){for(const i of this.#$t)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.#Xt)e.postParticleUpdate?.(i,t);this.#he(i)}}}class yi{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=$(s.gravity.maxSpeed)*i,a.moveDrift=$(s.drift)*i,a.moveSpeed=$(s.speed)*i;const r=a.maxDistance;r.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,r.vertical=void 0===n.vertical?void 0:n.vertical*i}}function wi(t){return!t.destroyed}function vi(t,e,...i){const s=new ue(t,e);return Dt(s,...i),s}var Pi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#de;#ue;#pe={value:0,factor:0};#fe;#ge;#me;#ye;#we;#ve;#Pe;#be;#xe;#ze;#Se;#p;#Me;#Ce;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#fe=e,this.#xe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Me=!1,this.#de=0,this.#me=0,this.#be=0,this.#we=!0,this.started=!1,this.destroyed=!1,this.#Se=!0,this.#Pe=0,this.zLayers=100,this.pageHidden=!1,this.#Ce=a,this.#ve=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new yi(this),this.canvas=new ci(this.#p,this),this.particles=new mi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#ze=vi(this.#p,this),this.actualOptions=vi(this.#p,this),this.#ye=new hi(this),this.dispatchEvent(ot.containerBuilt)}get animationStatus(){return!this.#Se&&!this.pageHidden&&wi(this)}get options(){return this.#ze}get sourceOptions(){return this.#Ce}addLifeTime(t){this.#be+=t}alive(){return!this.#me||this.#be<=this.#me}destroy(t=!0){if(wi(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.#xe(t),this.dispatchEvent(ot.containerDestroyed)}}dispatchEvent(t,e){this.#fe(t,{container:this,data:e})}draw(t){if(!wi(this))return;let e=t;this.#ge=L(t=>{e&&(this.#Pe=void 0,e=!1),this.#ke(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}dt().error(`Export plugin with type ${t} not found`)}async init(){if(!wi(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.#ze=vi(this.#p,this,this.#ve,this.sourceOptions),this.actualOptions=vi(this.#p,this,this.#ze),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:a,smooth:r,zLayers:o}=this.actualOptions;this.hdr=a,this.zLayers=o,this.#me=$(i)*n,this.#de=$(e)*n,this.#be=0,this.fpsLimit=s>0?s:120,this.#Me=r;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ot.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ot.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(wi(this)&&(void 0!==this.#ge&&(t=this.#ge,F(t),this.#ge=void 0),!this.#Se)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Se=!0),this.dispatchEvent(ot.containerPaused)}}play(t){if(!wi(this))return;const e=this.#Se||t;if(!this.#we||this.actualOptions.autoPlay){if(this.#Se&&(this.#Se=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ot.containerPlay),this.draw(e??!1)}else this.#we=!1}async refresh(){if(wi(this))return this.stop(),this.start()}async reset(t){if(wi(this))return this.#ve=t,this.#Ce=t,this.#ze=vi(this.#p,this,this.#ve,this.sourceOptions),this.actualOptions=vi(this.#p,this,this.#ze),this.refresh()}async start(){wi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#ye.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ot.containerStarted),this.play(),t()};this.#ue=setTimeout(()=>{e()},this.#de)}))}stop(){if(wi(this)&&this.started){this.#ue&&(clearTimeout(this.#ue),this.#ue=void 0),this.#we=!0,this.started=!1,this.#ye.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.#Ce=this.#ze,this.dispatchEvent(ot.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ke(t){try{if(!this.#Me&&void 0!==this.#Pe&&t<this.#Pe+n/this.fpsLimit)return void this.draw(!1);if(this.#Pe??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/n}(this.#pe,t-this.#Pe,this.fpsLimit,this.#Me),this.addLifeTime(this.#pe.value),this.#Pe=t,this.#pe.value>n)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#pe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){dt().error("error in animation loop",t)}}}});var bi=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#m;constructor(t,e){this.#m=t,this.#u=e,this.#m.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(_(t))for(const e of t)await this.#m.addEmitter(this.#u,e);else await this.#m.addEmitter(this.#u,t)}pause(){for(const t of this.#m.getArray(this.#u))t.pause()}play(){for(const t of this.#m.getArray(this.#u))t.play()}resize(){for(const t of this.#m.getArray(this.#u))t.resize()}stop(){this.#m.clear(this.#u)}update(t){this.#m.getArray(this.#u).forEach(e=>{e.update(t)})}}});const xi=new Map;var zi=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||xi.set(t,e)}getShapeGenerator(t){return xi.get(t)}getSupportedShapeGenerators(){return xi.keys()}}});var Si=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ie;#p;constructor(t){this.#Ie=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Re;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ki}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Ie.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ie.get(t);return e||(e=[],this.#Ie.set(t,e)),e}initContainer(t){this.#Ie.has(t)||(this.#Ie.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||I(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});function Mi(t,e,i,s){(t.paint??=new ie).fill={color:Ut.create(void 0,{value:e}),enable:s,opacity:i}}function Ci(t,e,i,s){(t.paint??=new ie).stroke={color:Ut.create(void 0,{value:e}),opacity:i,width:s}}var ki=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#De;#_e;#Oe;#me;#Ee;#Re;#Le;#Fe;#Ae;#G;#Te;#Se;#p;#Be;#lt;#Ue;#$e;#Ve;#qe;constructor(t,e,s,a,r){this.#p=t,this.#u=e,this.#Be=s,this.#De=0,this.#_e=0,this.#Oe=0,this.#Fe=r,a instanceof Re?this.options=a:(this.options=new Re,this.options.load(a)),this.#Ve=e.retina.reduceFactor?$(this.options.life.delay??0)*n/e.retina.reduceFactor:1/0,this.position=this.#Fe??this.#xt(),this.name=this.options.name,this.fill=this.options.fill,this.#Re=!this.options.life.wait,this.#qe=!1;const o=Z({},this.options.particles);if(o.move??={},o.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=ye(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=ye(this.#p,this.options.spawn.stroke.color)),this.#Se=!this.options.autoPlay,this.#Te=o,this.#$e=this.#We(),this.size=this.#$e.mode===X.percent?{width:this.#$e.width/i*this.#u.canvas.size.width,height:this.#$e.height/i*this.#u.canvas.size.height}:{width:this.#$e.width,height:this.#$e.height},this.#Ae=this.options.life.count??-1,this.#Le=this.#Ae<=0,this.options.domId){const t=Y().getElementById(this.options.domId);t&&(this.#G=new MutationObserver(()=>{this.resize()}),this.#lt=new ResizeObserver(()=>{this.resize()}),this.#G.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#lt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#Ue=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Se=!0,this.pause()}externalPlay(){this.#Se=!1,this.play()}async init(){await(this.#Ue?.init())}pause(){this.#Se||(this.#Ee=void 0)}play(){if(this.#Se)return;if(!(this.#Ae>0||this.#Le)&&this.options.life.count||!(this.#Re||this.#Oe>=(this.#Ve??0)))return;const t=this.#u;if(void 0===this.#Ee){const e=$(this.options.rate.delay);this.#Ee=t.retina.reduceFactor?e*n/t.retina.reduceFactor:1/0}(this.#Ae>0||this.#Le)&&this.#He()}resize(){const t=this.#Fe,e=this.#u;var s,n,a;this.position=t&&(s=t,n=e.canvas.size,a=M.origin,function(t,e,i){let s=!0;return s=t.top<e.height+i.x,s&&(s=t.right>i.x),s&&(s=t.left<e.width+i.y),s&&(s=t.bottom>i.y),s}(function(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}(s,0),n,a))?t:this.#xt(),this.#$e=this.#We(),this.size=this.#$e.mode===X.percent?{width:this.#$e.width/i*e.canvas.size.width,height:this.#$e.height/i*e.canvas.size.height}:{width:this.#$e.width,height:this.#$e.height},this.#Ue?.resize(this.position,this.size)}update(t){if(this.#Se)return;const e=this.#u;this.#Re&&(this.#Re=!1,this.#Oe=this.#Ve??0,this.#_e=this.#Ee??0),this.#qe||(this.#qe=!0,this.#je(this.options.startCount)),void 0!==this.#me&&(this.#De+=t.value,this.#De>=this.#me&&(this.pause(),void 0!==this.#Ve&&(this.#Ve=void 0),this.#Le||this.#Ae--,this.#Ae>0||this.#Le?(this.position=this.#xt(),this.#Ue?.resize(this.position,this.size),this.#Ve=e.retina.reduceFactor?$(this.options.life.delay??0)*n/e.retina.reduceFactor:1/0):this.#Ne(),this.#De-=this.#me,this.#me=void 0)),void 0!==this.#Ve&&(this.#Oe+=t.value,this.#Oe>=this.#Ve&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Oe-=this.#Ve,this.#Ve=void 0)),void 0!==this.#Ee&&(this.#_e+=t.value,this.#_e>=this.#Ee&&(this.#Ge(),this.#_e-=this.#Ee))}#xt(){const t=this.#u;if(this.options.domId){const e=Y().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),n=t.retina.pixelRatio;return{x:(i.x+i.width*s)*n,y:(i.y+i.height*s)*n}}}return j({size:t.canvas.size,position:this.options.position})}#We(){const t=this.#u;if(this.options.domId){const e=Y().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:X.precise}}}return this.options.size??(()=>{const t=new Oe;return t.load({height:0,mode:X.percent,width:0}),t})()}#Ne(){this.#G?.disconnect(),this.#G=void 0,this.#lt?.disconnect(),this.#lt=void 0,this.#Be(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#Ge(){if(this.#Se)return;const t=$(this.options.rate.quantity);this.#je(t)}#je(t){const e=tt(this.#Te)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:$(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,r=void 0===this.options.spawn.stroke?.opacity?1:$(this.options.spawn.stroke.opacity),o=void 0===this.options.spawn.stroke?.width?1:$(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#Ue,u=c||h,p=u||d,f=u?{h:w,s:v,l:P}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?Z({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=r,this.spawnStrokeWidth=o,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#Xe(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#Xe(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#Xe(i.l,this.spawnFillColor.l,f.l)),Mi(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#Xe(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#Xe(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#Xe(a.l,this.spawnStrokeColor.l,f.l)),Ci(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Ue){const e=this.#Ue.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Mi(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#He(){if(this.#Se)return;const t=void 0!==this.options.life.duration?$(this.options.life.duration):void 0;(this.#Ae>0||this.#Le)&&void 0!==t&&t>0&&(this.#me=t*n)}#Xe(t,e,i,s=1){const a=this.#u;if(!t.enable)return e;const r=U(t.offset),o=$(this.options.rate.delay),l=a.retina.reduceFactor?o*n/a.retina.reduceFactor:1/0;return(e+$(t.speed)*a.fpsLimit/l+r*s)%i}}});t.loadSquaresPreset=si,t.tsParticles=Ce}),Object.assign(globalThis.window||globalThis,{loadSquaresPreset:(globalThis.__tsParticlesInternals.presets.squares||{}).loadSquaresPreset}),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.2.0 */
2
+ /* Preset v4.2.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/plugin-hex-color'), require('@tsparticles/updater-paint'), require('@tsparticles/updater-rotate'), require('@tsparticles/updater-size'), require('@tsparticles/shape-square'), require('@tsparticles/engine')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-emitters/plugin', '@tsparticles/plugin-hex-color', '@tsparticles/updater-paint', '@tsparticles/updater-rotate', '@tsparticles/updater-size', '@tsparticles/shape-square', '@tsparticles/engine'], factory) :